summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--std/prettier/vendor/parser_babylon.js4
-rw-r--r--std/prettier/vendor/parser_markdown.js135
-rw-r--r--std/prettier/vendor/parser_typescript.js17
-rw-r--r--std/prettier/vendor/standalone.js49203
4 files changed, 25153 insertions, 24206 deletions
diff --git a/std/prettier/vendor/parser_babylon.js b/std/prettier/vendor/parser_babylon.js
index b6139dc07..72a9329ba 100644
--- a/std/prettier/vendor/parser_babylon.js
+++ b/std/prettier/vendor/parser_babylon.js
@@ -1,4 +1,4 @@
-// This file is copied from prettier@1.18.2
+// This file is copied from prettier@1.19.1
/**
* Copyright © James Long and contributors
*
@@ -8,4 +8,4 @@
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babylon=e())}(globalThis,function(){"use strict";var t=function(t,e){var s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t,e){return t(e={exports:{}},e.exports),e.exports}var i=s(function(t){t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return null;var s=e.filter(function(t){return"\r\n"===t}).length;return s>e.length-s?"\r\n":"\n"},t.exports.graceful=function(e){return t.exports(e)||"\n"}}),r={EOL:"\n"},a=Object.freeze({default:r}),n=a&&r||a,o=s(function(t,e){var s,r;function a(){return s=(t=i)&&t.__esModule?t:{default:t};var t}function o(){return r=n}Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(t){var e=t.match(p);return e?e[0].trimLeft():""},e.strip=function(t){var e=t.match(p);return e&&e[0]?t.substring(e[0].length):t},e.parse=function(t){return y(t).pragmas},e.parseWithComments=y,e.print=function(t){var e=t.comments,i=void 0===e?"":e,n=t.pragmas,h=void 0===n?{}:n,u=(0,(s||a()).default)(i)||(r||o()).EOL,p=Object.keys(h),c=p.map(function(t){return D(t,h[t])}).reduce(function(t,e){return t.concat(e)},[]).map(function(t){return" * "+t+u}).join("");if(!i){if(0===p.length)return"";if(1===p.length&&!Array.isArray(h[p[0]])){var l=h[p[0]];return"".concat("/**"," ").concat(D(p[0],l)[0]).concat(" */")}}var d=i.split(u).map(function(t){return"".concat(" *"," ").concat(t)}).join(u)+u;return"/**"+u+(i?d:"")+(i&&p.length?" *"+u:"")+c+" */"};var h=/\*\/$/,u=/^\/\*\*/,p=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,c=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,d=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,f=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,m=/(\r?\n|^) *\* ?/g;function y(t){var e=(0,(s||a()).default)(t)||(r||o()).EOL;t=t.replace(u,"").replace(h,"").replace(m,"$1");for(var i="";i!==t;)i=t,t=t.replace(d,"".concat(e,"$1 $2").concat(e));t=t.replace(l,"").trimRight();for(var n,p=Object.create(null),y=t.replace(f,"").replace(l,"").trimRight();n=f.exec(t);){var D=n[2].replace(c,"");"string"==typeof p[n[1]]||Array.isArray(p[n[1]])?p[n[1]]=[].concat(p[n[1]],D):p[n[1]]=D}return{comments:y,pragmas:p}}function D(t,e){return[].concat(e).map(function(e){return"@".concat(t," ").concat(e).trim()})}});e(o);var h=function(t){var e=Object.keys(o.parse(o.extract(t)));return-1!==e.indexOf("prettier")||-1!==e.indexOf("format")},u=function(t){return t.length>0?t[t.length-1]:null};var p={locStart:function t(e,s){return!(s=s||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?t(e.declaration.decorators[0]):!s.ignoreDecorators&&e.decorators&&e.decorators.length>0?t(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null},locEnd:function t(e){var s=e.nodes&&u(e.nodes);if(s&&e.source&&!e.source.end&&(e=s),e.__location)return e.__location.endOffset;var i=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(i,t(e.typeAnnotation)):e.loc&&!i?e.loc.end:i}};function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l=s(function(t){t.exports=function(t){t=Object.assign({onlyFirst:!1},t);var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}}),d=s(function(t){t.exports=function(t){return!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))}}),f=s(function(t){var e=/\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;t.exports=function(t){if("string"!=typeof(t=t.replace(e," "))||0===t.length)return 0;t=function(t){return"string"==typeof t?t.replace(l(),""):t}(t);for(var s=0,i=0;i<t.length;i++){var r=t.codePointAt(i);r<=31||r>=127&&r<=159||(r>=768&&r<=879||(r>65535&&i++,s+=d(r)?2:1))}return s}}),m=/[|\\{}()[\]^$+*?.]/g,y=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(m,"\\$&")},D=/[^\x20-\x7F]/;function x(t){if(t)switch(t.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function v(t){return function(e,s,i){var r=i&&i.backwards;if(!1===s)return!1;for(var a=e.length,n=s;n>=0&&n<a;){var o=e.charAt(n);if(t instanceof RegExp){if(!t.test(o))return n}else if(-1===t.indexOf(o))return n;r?n--:n++}return(-1===n||n===a)&&n}}var P=v(/\s/),g=v(" \t"),b=v(",; \t"),C=v(/[^\r\n]/);function w(t,e){if(!1===e)return!1;if("/"===t.charAt(e)&&"*"===t.charAt(e+1))for(var s=e+2;s<t.length;++s)if("*"===t.charAt(s)&&"/"===t.charAt(s+1))return s+2;return e}function E(t,e){return!1!==e&&("/"===t.charAt(e)&&"/"===t.charAt(e+1)?C(t,e):e)}function A(t,e,s){var i=s&&s.backwards;if(!1===e)return!1;var r=t.charAt(e);if(i){if("\r"===t.charAt(e-1)&&"\n"===r)return e-2;if("\n"===r||"\r"===r||"\u2028"===r||"\u2029"===r)return e-1}else{if("\r"===r&&"\n"===t.charAt(e+1))return e+2;if("\n"===r||"\r"===r||"\u2028"===r||"\u2029"===r)return e+1}return e}function T(t,e,s){var i=g(t,(s=s||{}).backwards?e-1:e,s);return i!==A(t,i,s)}function N(t,e){for(var s=null,i=e;i!==s;)s=i,i=w(t,i=b(t,i)),i=g(t,i);return T(t,i=A(t,i=E(t,i)))}function k(t,e){for(var s=null;e!==s;)s=e,e=A(t,e=E(t,e=w(t,e=g(t,e))));return e}function F(t,e,s){return k(t,s(e))}var S={};function I(t){return S[t]}[["|>"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(t,e){t.forEach(function(t){S[t]=e})});var L={"==":!0,"!=":!0,"===":!0,"!==":!0},O={"*":!0,"/":!0,"%":!0},M={">>":!0,">>>":!0,"<<":!0};function R(t,e,s){for(var i=0,r=s=s||0;r<t.length;++r)"\t"===t[r]?i=i+e-i%e:i++;return i}function B(t,e){var s=t.slice(1,-1),i={quote:'"',regex:/"/g},r={quote:"'",regex:/'/g},a="'"===e?r:i,n=a===r?i:r,o=a.quote;(s.includes(a.quote)||s.includes(n.quote))&&(o=(s.match(a.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:a.quote);return o}function _(t,e,s){var i='"'===e?"'":'"',r=t.replace(/\\([\s\S])|(['"])/g,function(t,r,a){return r===i?r:a===e?"\\"+a:a||(s&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(r)?r:"\\"+r)});return e+r+e}function j(t){return t&&t.comments&&t.comments.length>0&&t.comments.some(function(t){return"prettier-ignore"===t.value.trim()})}function q(t,e){(t.comments||(t.comments=[])).push(e),e.printed=!1,"JSXText"===t.type&&(e.printed=!0)}var U={replaceEndOfLineWith:function(t,e){var s=[],i=!0,r=!1,a=void 0;try{for(var n,o=t.split("\n")[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var h=n.value;0!==s.length&&s.push(e),s.push(h)}}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return s},getStringWidth:function(t){return t?D.test(t)?f(t):t.length:0},getMaxContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(y(e),")+"),"g"));return null===s?0:s.reduce(function(t,s){return Math.max(t,s.length/e.length)},0)},getMinNotPresentContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(y(e),")+"),"g"));if(null===s)return 0;var i=new Map,r=0,a=!0,n=!1,o=void 0;try{for(var h,u=s[Symbol.iterator]();!(a=(h=u.next()).done);a=!0){var p=h.value.length/e.length;i.set(p,!0),p>r&&(r=p)}}catch(t){n=!0,o=t}finally{try{a||null==u.return||u.return()}finally{if(n)throw o}}for(var c=1;c<r;c++)if(!i.get(c))return c;return r+1},getPrecedence:I,shouldFlatten:function(t,e){return!(I(e)!==I(t)||"**"===t||L[t]&&L[e]||"%"===e&&O[t]||"%"===t&&O[e]||e!==t&&O[e]&&O[t]||M[t]&&M[e])},isBitwiseOperator:function(t){return!!M[t]||"|"===t||"^"===t||"&"===t},isExportDeclaration:x,getParentExportDeclaration:function(t){var e=t.getParentNode();return"declaration"===t.getName()&&x(e)?e:null},getPenultimate:function(t){return t.length>1?t[t.length-2]:null},getLast:u,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:k,getNextNonSpaceNonCommentCharacterIndex:F,getNextNonSpaceNonCommentCharacter:function(t,e,s){return t.charAt(F(t,e,s))},skip:v,skipWhitespace:P,skipSpaces:g,skipToLineEnd:b,skipEverythingButNewLine:C,skipInlineComment:w,skipTrailingComment:E,skipNewline:A,isNextLineEmptyAfterIndex:N,isNextLineEmpty:function(t,e,s){return N(t,s(e))},isPreviousLineEmpty:function(t,e,s){var i=s(e)-1;return i=A(t,i=g(t,i,{backwards:!0}),{backwards:!0}),(i=g(t,i,{backwards:!0}))!==A(t,i,{backwards:!0})},hasNewline:T,hasNewlineInRange:function(t,e,s){for(var i=e;i<s;++i)if("\n"===t.charAt(i))return!0;return!1},hasSpaces:function(t,e,s){return g(t,(s=s||{}).backwards?e-1:e,s)!==e},setLocStart:function(t,e){t.range?t.range[0]=e:t.start=e},setLocEnd:function(t,e){t.range?t.range[1]=e:t.end=e},startsWithNoLookaheadToken:function t(e,s){switch((e=function t(e){return e.left?t(e.left):e}(e)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return s;case"ObjectExpression":return!0;case"MemberExpression":return t(e.object,s);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&t(e.tag,s);case"CallExpression":return"FunctionExpression"!==e.callee.type&&t(e.callee,s);case"ConditionalExpression":return t(e.test,s);case"UpdateExpression":return!e.prefix&&t(e.argument,s);case"BindExpression":return e.object&&t(e.object,s);case"SequenceExpression":return t(e.expressions[0],s);case"TSAsExpression":return t(e.expression,s);default:return!1}},getAlignmentSize:R,getIndentSize:function(t,e){var s=t.lastIndexOf("\n");return-1===s?0:R(t.slice(s+1).match(/^[ \t]*/)[0],e)},getPreferredQuote:B,printString:function(t,e,s){var i=t.slice(1,-1),r=!i.includes('"')&&!i.includes("'"),a="json"===e.parser?'"':e.__isInHtmlAttribute?"'":B(t,e.singleQuote?"'":'"');return s?r?a+i+a:t:_(i,a,!("css"===e.parser||"less"===e.parser||"scss"===e.parser||e.embeddedInHtml))},printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function(t){return j(t.getValue())},hasNodeIgnoreComment:j,makeString:_,matchAncestorTypes:function(t,e,s){for(s=s||0,e=e.slice();e.length;){var i=t.getParentNode(s),r=e.shift();if(!i||i.type!==r)return!1;s++}return!0},addLeadingComment:function(t,e){e.leading=!0,e.trailing=!1,q(t,e)},addDanglingComment:function(t,e){e.leading=!1,e.trailing=!1,q(t,e)},addTrailingComment:function(t,e){e.leading=!1,e.trailing=!0,q(t,e)},isWithinParentArrayProperty:function(t,e){var s=t.getValue(),i=t.getParentNode();if(null==i)return!1;if(!Array.isArray(i[e]))return!1;var r=t.getName();return i[e][r]===s}}.getLast;var V=function(t,e){return function t(e,s){if(e&&"object"===c(e))if(Array.isArray(e)){var i=!0,r=!1,a=void 0;try{for(var n,o=e[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var h=n.value;t(h,s)}}catch(t){r=!0,a=t}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}}else if("string"==typeof e.type){for(var u=Object.keys(e),p=0;p<u.length;p++){var l=u[p];t(e[l],s)}s(e)}}(t,function(t){switch(t.type){case"VariableDeclaration":var s=U(t.declarations);s&&s.init&&function(t,s){var i;";"!==e.originalText[(i=s,"flow"===e.parser?i.range[1]:i.end)]&&("flow"===e.parser?t.range=[t.range[0],s.range[1]]:t.end=s.end,t.loc=Object.assign({},t.loc,{end:t.loc.end}))}(t,s)}}),t},W=s(function(t,e){function s(t){var e,s;function i(e,s){try{var a=t[e](s),n=a.value,o=n instanceof function(t){this.wrapped=t};Promise.resolve(o?n.wrapped:n).then(function(t){o?i("next",t):r(a.done?"return":"normal",t)},function(t){i("throw",t)})}catch(t){r("throw",t)}}function r(t,r){switch(t){case"return":e.resolve({value:r,done:!0});break;case"throw":e.reject(r);break;default:e.resolve({value:r,done:!1})}(e=e.next)?i(e.key,e.arg):s=null}this._invoke=function(t,r){return new Promise(function(a,n){var o={key:t,arg:r,resolve:a,reject:n,next:null};s?s=s.next=o:(e=s=o,i(t,r))})},"function"!=typeof t.return&&(this.return=void 0)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}Object.defineProperty(e,"__esModule",{value:!0}),"function"==typeof Symbol&&Symbol.asyncIterator&&(s.prototype[Symbol.asyncIterator]=function(){return this}),s.prototype.next=function(t){return this._invoke("next",t)},s.prototype.throw=function(t){return this._invoke("throw",t)},s.prototype.return=function(t){return this._invoke("return",t)};var r=!0,a=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=0===e.binop?0:e.binop||null,this.updateContext=null};function n(t,e){return void 0===e&&(e={}),new a(t,Object.assign({},e,{keyword:t}))}function o(t,e){return new a(t,{beforeExpr:r,binop:e})}var h={num:new a("num",{startsExpr:!0}),bigint:new a("bigint",{startsExpr:!0}),regexp:new a("regexp",{startsExpr:!0}),string:new a("string",{startsExpr:!0}),name:new a("name",{startsExpr:!0}),eof:new a("eof"),bracketL:new a("[",{beforeExpr:r,startsExpr:!0}),bracketR:new a("]"),braceL:new a("{",{beforeExpr:r,startsExpr:!0}),braceBarL:new a("{|",{beforeExpr:r,startsExpr:!0}),braceR:new a("}"),braceBarR:new a("|}"),parenL:new a("(",{beforeExpr:r,startsExpr:!0}),parenR:new a(")"),comma:new a(",",{beforeExpr:r}),semi:new a(";",{beforeExpr:r}),colon:new a(":",{beforeExpr:r}),doubleColon:new a("::",{beforeExpr:r}),dot:new a("."),question:new a("?",{beforeExpr:r}),questionDot:new a("?."),arrow:new a("=>",{beforeExpr:r}),template:new a("template"),ellipsis:new a("...",{beforeExpr:r}),backQuote:new a("`",{startsExpr:!0}),dollarBraceL:new a("${",{beforeExpr:r,startsExpr:!0}),at:new a("@"),hash:new a("#"),interpreterDirective:new a("#!..."),eq:new a("=",{beforeExpr:r,isAssign:!0}),assign:new a("_=",{beforeExpr:r,isAssign:!0}),incDec:new a("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new a("!",{beforeExpr:r,prefix:!0,startsExpr:!0}),tilde:new a("~",{beforeExpr:r,prefix:!0,startsExpr:!0}),pipeline:new o("|>",0),nullishCoalescing:new o("??",1),logicalOR:new o("||",1),logicalAND:new o("&&",2),bitwiseOR:new o("|",3),bitwiseXOR:new o("^",4),bitwiseAND:new o("&",5),equality:new o("==/!=",6),relational:new o("</>",7),bitShift:new o("<</>>",8),plusMin:new a("+/-",{beforeExpr:r,binop:9,prefix:!0,startsExpr:!0}),modulo:new o("%",10),star:new o("*",10),slash:new o("/",10),exponent:new a("**",{beforeExpr:r,binop:11,rightAssociative:!0})},u={break:new n("break"),case:new n("case",{beforeExpr:r}),catch:new n("catch"),continue:new n("continue"),debugger:new n("debugger"),default:new n("default",{beforeExpr:r}),do:new n("do",{isLoop:!0,beforeExpr:r}),else:new n("else",{beforeExpr:r}),finally:new n("finally"),for:new n("for",{isLoop:!0}),function:new n("function",{startsExpr:!0}),if:new n("if"),return:new n("return",{beforeExpr:r}),switch:new n("switch"),throw:new n("throw",{beforeExpr:r,prefix:!0,startsExpr:!0}),try:new n("try"),var:new n("var"),let:new n("let"),const:new n("const"),while:new n("while",{isLoop:!0}),with:new n("with"),new:new n("new",{beforeExpr:r,startsExpr:!0}),this:new n("this",{startsExpr:!0}),super:new n("super",{startsExpr:!0}),class:new n("class",{startsExpr:!0}),extends:new n("extends",{beforeExpr:r}),export:new n("export"),import:new n("import",{startsExpr:!0}),yield:new n("yield",{beforeExpr:r,startsExpr:!0}),null:new n("null",{startsExpr:!0}),true:new n("true",{startsExpr:!0}),false:new n("false",{startsExpr:!0}),in:new n("in",{beforeExpr:r,binop:7}),instanceof:new n("instanceof",{beforeExpr:r,binop:7}),typeof:new n("typeof",{beforeExpr:r,prefix:!0,startsExpr:!0}),void:new n("void",{beforeExpr:r,prefix:!0,startsExpr:!0}),delete:new n("delete",{beforeExpr:r,prefix:!0,startsExpr:!0})};function p(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}Object.keys(u).forEach(function(t){h["_"+t]=u[t]});var c=/\r\n?|\n|\u2028|\u2029/,l=new RegExp(c.source,"g");function d(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var f=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function m(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var y=function(t,e,s,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i},D={braceStatement:new y("{",!1),braceExpression:new y("{",!0),templateQuasi:new y("${",!1),parenStatement:new y("(",!1),parenExpression:new y("(",!0),template:new y("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new y("function",!0),functionStatement:new y("function",!1)};function x(t){var e=t.split(" ");return function(t){return e.indexOf(t)>=0}}h.parenR.updateContext=h.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===D.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},h.name.updateContext=function(t){var e=!1;t!==h.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.state.inGenerator)&&(e=!0),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},h.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?D.braceStatement:D.braceExpression),this.state.exprAllowed=!0},h.dollarBraceL.updateContext=function(){this.state.context.push(D.templateQuasi),this.state.exprAllowed=!0},h.parenL.updateContext=function(t){var e=t===h._if||t===h._for||t===h._with||t===h._while;this.state.context.push(e?D.parenStatement:D.parenExpression),this.state.exprAllowed=!0},h.incDec.updateContext=function(){},h._function.updateContext=h._class.updateContext=function(t){!t.beforeExpr||t===h.semi||t===h._else||t===h._return&&c.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(t===h.colon||t===h.braceL)&&this.curContext()===D.b_stat?this.state.context.push(D.functionStatement):this.state.context.push(D.functionExpression),this.state.exprAllowed=!1},h.backQuote.updateContext=function(){this.curContext()===D.template?this.state.context.pop():this.state.context.push(D.template),this.state.exprAllowed=!1};var v={6:x("enum await"),strict:x("implements interface let package private protected public static yield"),strictBind:x("eval arguments")},P=x("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),g="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",C=new RegExp("["+g+"]"),w=new RegExp("["+g+b+"]");g=b=null;var E=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],A=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function T(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function N(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&C.test(String.fromCharCode(t)):T(t,E)))}function k(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&w.test(String.fromCharCode(t)):T(t,E)||T(t,A))))}var F=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void","interface","extends","_"];function S(t){return"type"===t.importKind||"typeof"===t.importKind}function I(t){return(t.type===h.name||!!t.type.keyword)&&"from"!==t.value}var L={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var O=/\*?\s*@((?:no)?flow)\b/,M={quot:'"',amp:"&",apos:"'",lt:"<",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:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},R=/^[\da-fA-F]+$/,B=/^\d+$/;function _(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function j(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return j(t.object)+"."+j(t.property);throw new Error("Node had unexpected type: "+t.type)}D.j_oTag=new y("<tag",!1),D.j_cTag=new y("</tag",!1),D.j_expr=new y("<tag>...</tag>",!0,!0),h.jsxName=new a("jsxName"),h.jsxText=new a("jsxText",{beforeExpr:!0}),h.jsxTagStart=new a("jsxTagStart",{startsExpr:!0}),h.jsxTagEnd=new a("jsxTagEnd"),h.jsxTagStart.updateContext=function(){this.state.context.push(D.j_expr),this.state.context.push(D.j_oTag),this.state.exprAllowed=!1},h.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===D.j_oTag&&t===h.slash||e===D.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===D.j_expr):this.state.exprAllowed=!0};var q={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1};var U=function(t,e){this.line=t,this.column=e},V=function(t,e){this.start=t,this.end=e};function W(t){return t[t.length-1]}var K=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.raise=function(t,e,s){var i=void 0===s?{}:s,r=i.missingPluginNames,a=i.code,n=function(t,e){var s,i=1,r=0;for(l.lastIndex=0;(s=l.exec(t))&&s.index<e;)i++,r=l.lastIndex;return new U(i,e-r)}(this.input,t);e+=" ("+n.line+":"+n.column+")";var o=new SyntaxError(e);throw o.pos=t,o.loc=n,r&&(o.missingPlugin=r),void 0!==a&&(o.code=a),o},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.addComment=function(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)},s.processComment=function(t){if(!("Program"===t.type&&t.body.length>0)){var e,s,i,r,a,n=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(n.length>0){var o=W(n);o.trailingComments&&o.trailingComments[0].start>=t.end&&(i=o.trailingComments,delete o.trailingComments)}for(n.length>0&&W(n).start>=t.start&&(e=n.pop());n.length>0&&W(n).start>=t.start;)s=n.pop();if(!s&&e&&(s=e),e&&this.state.leadingComments.length>0){var h=W(this.state.leadingComments);if("ObjectProperty"===e.type){if(h.start>=t.start&&this.state.commentPreviousNode){for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(e.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===t.type&&t.arguments&&t.arguments.length){var u=W(t.arguments);if(u&&h.start>=u.start&&h.end<=t.end&&this.state.commentPreviousNode){for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(u.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}}if(s){if(s.leadingComments)if(s!==t&&s.leadingComments.length>0&&W(s.leadingComments).end<=t.start)t.leadingComments=s.leadingComments,delete s.leadingComments;else for(r=s.leadingComments.length-2;r>=0;--r)if(s.leadingComments[r].end<=t.start){t.leadingComments=s.leadingComments.splice(0,r+1);break}}else if(this.state.leadingComments.length>0)if(W(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(r=0;r<this.state.leadingComments.length&&!(this.state.leadingComments[r].end>t.start);r++);var p=this.state.leadingComments.slice(0,r);p.length&&(t.leadingComments=p),0===(i=this.state.leadingComments.slice(r)).length&&(i=null)}this.state.commentPreviousNode=t,i&&(i.length&&i[0].start>=t.start&&W(i).end<=t.end?t.innerComments=i:t.trailingComments=i),n.push(t)}},e}(function(){function t(){this.sawUnambiguousESM=!1}var e=t.prototype;return e.isReservedWord=function(t){return"await"===t?this.inModule:v[6](t)},e.hasPlugin=function(t){return Object.hasOwnProperty.call(this.plugins,t)},e.getPluginOption=function(t,e){if(this.hasPlugin(t))return this.plugins[t][e]},t}())),G=function(){function t(){}var e=t.prototype;return e.init=function(t,e){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inMethod=!1,this.inFunction=!1,this.inParameters=!1,this.maybeInArrowParameters=!1,this.inGenerator=!1,this.inAsync=!1,this.inPipeline=!1,this.inPropertyName=!1,this.inType=!1,this.inClassProperty=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldOrAwaitInPossibleArrowParameters=null,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=this.lineStart=0,this.curLine=t.startLine,this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[D.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},e.curPosition=function(){return new U(this.curLine,this.pos-this.lineStart)},e.clone=function(e){var s=this,i=new t;return Object.keys(this).forEach(function(t){var r=s[t];e&&"context"!==t||!Array.isArray(r)||(r=r.slice()),i[t]=r}),i},t}(),X=function(t){return t>=48&&t<=57},J={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},H={bin:[48,49]};H.oct=H.bin.concat([50,51,52,53,54,55]),H.dec=H.oct.concat([56,57]),H.hex=H.dec.concat([65,66,67,68,69,70,97,98,99,100,101,102]);var z=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.addExtra=function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)},s.isRelational=function(t){return this.match(h.relational)&&this.state.value===t},s.isLookaheadRelational=function(t){var e=this.lookahead();return e.type==h.relational&&e.value==t},s.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,h.relational)},s.eatRelational=function(t){return!!this.isRelational(t)&&(this.next(),!0)},s.isContextual=function(t){return this.match(h.name)&&this.state.value===t&&!this.state.containsEsc},s.isLookaheadContextual=function(t){var e=this.lookahead();return e.type===h.name&&e.value===t},s.eatContextual=function(t){return this.isContextual(t)&&this.eat(h.name)},s.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},s.canInsertSemicolon=function(){return this.match(h.eof)||this.match(h.braceR)||this.hasPrecedingLineBreak()},s.hasPrecedingLineBreak=function(){return c.test(this.input.slice(this.state.lastTokEnd,this.state.start))},s.isLineTerminator=function(){return this.eat(h.semi)||this.canInsertSemicolon()},s.semicolon=function(){this.isLineTerminator()||this.unexpected(null,h.semi)},s.expect=function(t,e){this.eat(t)||this.unexpected(e,t)},s.unexpected=function(t,e){throw void 0===e&&(e="Unexpected token"),"string"!=typeof e&&(e='Unexpected token, expected "'+e.label+'"'),this.raise(null!=t?t:this.state.start,e)},s.expectPlugin=function(t,e){if(!this.hasPlugin(t))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling the parser plugin: '"+t+"'",{missingPluginNames:[t]});return!0},s.expectOnePlugin=function(t,e){var s=this;if(!t.some(function(t){return s.hasPlugin(t)}))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling one of the following parser plugin(s): '"+t.join(", ")+"'",{missingPluginNames:t})},e}(function(t){function e(e,s){var i;return(i=t.call(this)||this).state=new G,i.state.init(e,s),i.isLookahead=!1,i}i(e,t);var s=e.prototype;return s.next=function(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new V(t.startLoc,t.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},s.eat=function(t){return!!this.match(t)&&(this.next(),!0)},s.match=function(t){return this.state.type===t},s.isKeyword=function(t){return P(t)},s.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state;return this.state=t,e},s.setStrict=function(t){if(this.state.strict=t,this.match(h.num)||this.match(h.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},s.curContext=function(){return this.state.context[this.state.context.length-1]},s.nextToken=function(){var t=this.curContext();t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(h.eof):t.override?t.override(this):this.readToken(this.input.codePointAt(this.state.pos))},s.readToken=function(t){N(t)||92===t?this.readWord():this.getTokenFromCode(t)},s.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new V(r,a)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},s.skipBlockComment=function(){var t,e=this.state.curPosition(),s=this.state.pos,i=this.input.indexOf("*/",this.state.pos+=2);for(-1===i&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=i+2,l.lastIndex=s;(t=l.exec(this.input))&&t.index<this.state.pos;)++this.state.curLine,this.state.lineStart=t.index+t[0].length;this.pushComment(!0,this.input.slice(s+2,i),s,this.state.pos,e,this.state.curPosition())},s.skipLineComment=function(t){var e=this.state.pos,s=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.input.length)for(;10!==i&&13!==i&&8232!==i&&8233!==i&&++this.state.pos<this.input.length;)i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())},s.skipSpace=function(){t:for(;this.state.pos<this.input.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!m(t))break t;++this.state.pos}}},s.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(s)},s.readToken_numberSign=function(){if(0!==this.state.pos||!this.readToken_interpreter()){var t=this.state.pos+1,e=this.input.charCodeAt(t);if(e>=48&&e<=57&&this.raise(this.state.pos,"Unexpected digit after hash token"),(this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(h.hash);"smart"===this.getPluginOption("pipelineOperator","proposal")?this.finishOp(h.hash,1):this.raise(this.state.pos,"Unexpected character '#'")}},s.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57)this.readNumber(!0);else{var e=this.input.charCodeAt(this.state.pos+2);46===t&&46===e?(this.state.pos+=3,this.finishToken(h.ellipsis)):(++this.state.pos,this.finishToken(h.dot))}},s.readToken_slash=function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.assign,2):this.finishOp(h.slash,1)},s.readToken_interpreter=function(){if(0!==this.state.pos||this.state.input.length<2)return!1;var t=this.state.pos;this.state.pos+=1;var e=this.input.charCodeAt(this.state.pos);if(33!==e)return!1;for(;10!==e&&13!==e&&8232!==e&&8233!==e&&++this.state.pos<this.input.length;)e=this.input.charCodeAt(this.state.pos);var s=this.input.slice(t+2,this.state.pos);return this.finishToken(h.interpreterDirective,s),!0},s.readToken_mult_modulo=function(t){var e=42===t?h.star:h.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1),r=this.state.exprAllowed;42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=h.exponent),61!==i||r||(s++,e=h.assign),this.finishOp(e,s)},s.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(h.pipeline,2);if(125===e&&this.hasPlugin("flow"))return void this.finishOp(h.braceBarR,2)}61!==e?this.finishOp(124===t?h.bitwiseOR:h.bitwiseAND,1):this.finishOp(h.assign,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(h.assign,3):this.finishOp(124===t?h.logicalOR:h.logicalAND,2)},s.readToken_caret=function(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.assign,2):this.finishOp(h.bitwiseXOR,1)},s.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45===e&&!this.inModule&&62===this.input.charCodeAt(this.state.pos+2)&&c.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),void this.nextToken()):void this.finishOp(h.incDec,2);61===e?this.finishOp(h.assign,2):this.finishOp(h.plusMin,1)},s.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(h.assign,s+1):void this.finishOp(h.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(h.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())},s.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(h.arrow)):void this.finishOp(61===t?h.eq:h.bang,1);this.finishOp(h.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)},s.readToken_question=function(){var t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63!==t||this.state.inType?46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(h.question)):(this.state.pos+=2,this.finishToken(h.questionDot)):61===e?this.finishOp(h.assign,3):this.finishOp(h.nullishCoalescing,2)},s.getTokenFromCode=function(t){switch(t){case 35:return void this.readToken_numberSign();case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(h.parenL);case 41:return++this.state.pos,void this.finishToken(h.parenR);case 59:return++this.state.pos,void this.finishToken(h.semi);case 44:return++this.state.pos,void this.finishToken(h.comma);case 91:return++this.state.pos,void this.finishToken(h.bracketL);case 93:return++this.state.pos,void this.finishToken(h.bracketR);case 123:return void(this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.braceBarL,2):(++this.state.pos,this.finishToken(h.braceL)));case 125:return++this.state.pos,void this.finishToken(h.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(h.doubleColon,2):(++this.state.pos,this.finishToken(h.colon)));case 63:return void this.readToken_question();case 64:return++this.state.pos,void this.finishToken(h.at);case 96:return++this.state.pos,void this.finishToken(h.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(h.tilde,1)}this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(t)+"'")},s.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)},s.readRegexp=function(){for(var t,e,s=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(c.test(i)&&this.raise(s,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.state.pos}var r=this.input.slice(s,this.state.pos);++this.state.pos;for(var a="";this.state.pos<this.input.length;){var n=this.input[this.state.pos],o=this.input.codePointAt(this.state.pos);if("gmsiyu".indexOf(n)>-1)a.indexOf(n)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag"),++this.state.pos,a+=n;else{if(!k(o)&&92!==o)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}}this.finishToken(h.regexp,{pattern:r,flags:a})},s.readInt=function(t,e){for(var s=this.state.pos,i=16===t?J.hex:J.decBinOct,r=16===t?H.hex:10===t?H.dec:8===t?H.oct:H.bin,a=0,n=0,o=null==e?1/0:e;n<o;++n){var h=this.input.charCodeAt(this.state.pos),u=void 0;if(this.hasPlugin("numericSeparator")){var p=this.input.charCodeAt(this.state.pos-1),c=this.input.charCodeAt(this.state.pos+1);if(95===h){-1===r.indexOf(c)&&this.raise(this.state.pos,"Invalid or unexpected token"),(i.indexOf(p)>-1||i.indexOf(c)>-1||Number.isNaN(c))&&this.raise(this.state.pos,"Invalid or unexpected token"),++this.state.pos;continue}}if((u=h>=97?h-97+10:h>=65?h-65+10:X(h)?h-48:1/0)>=t)break;++this.state.pos,a=a*t+u}return this.state.pos===s||null!=e&&this.state.pos-s!==e?null:a},s.readRadixNumber=function(t){var e=this.state.pos,s=!1;this.state.pos+=2;var i=this.readInt(t);if(null==i&&this.raise(this.state.start+2,"Expected number in radix "+t),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,s=!0),N(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number"),s){var r=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(h.bigint,r)}else this.finishToken(h.num,i)},s.readNumber=function(t){var e=this.state.pos,s=!1,i=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number");var r=this.state.pos-e>=2&&48===this.input.charCodeAt(e);r&&(this.state.strict&&this.raise(e,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(e,this.state.pos))&&(r=!1));var a=this.input.charCodeAt(this.state.pos);46!==a||r||(++this.state.pos,this.readInt(10),s=!0,a=this.input.charCodeAt(this.state.pos)),69!==a&&101!==a||r||(43!==(a=this.input.charCodeAt(++this.state.pos))&&45!==a||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),s=!0,a=this.input.charCodeAt(this.state.pos)),this.hasPlugin("bigInt")&&110===a&&((s||r)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,i=!0),N(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number");var n=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");if(i)this.finishToken(h.bigint,n);else{var o=r?parseInt(n,8):parseFloat(n);this.finishToken(h.num,o)}},s.readCodePoint=function(t){var e;if(123===this.input.charCodeAt(this.state.pos)){var s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,t);return e},s.readString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):8232===i||8233===i?(++this.state.pos,++this.state.curLine):d(i)?this.raise(this.state.start,"Unterminated string constant"):++this.state.pos}e+=this.input.slice(s,this.state.pos++),this.finishToken(h.string,e)},s.readTmplToken=function(){for(var t="",e=this.state.pos,s=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(h.template)?36===i?(this.state.pos+=2,void this.finishToken(h.dollarBraceL)):(++this.state.pos,void this.finishToken(h.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(h.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(d(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},s.readEscapedChar=function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,e);return null===i?null:String.fromCharCode(i);case 117:var r=this.readCodePoint(e);return null===r?null:String.fromCodePoint(r);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(s>=48&&s<=55){var a=this.state.pos-1,n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);if(o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),o>0){if(t)return this.state.invalidTemplateEscapePosition=a,null;this.state.strict?this.raise(a,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=a)}return this.state.pos+=n.length-1,String.fromCharCode(o)}return String.fromCharCode(s)}},s.readHexChar=function(t,e){var s=this.state.pos,i=this.readInt(16,t);return null===i&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),i},s.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,s=this.state.pos;this.state.pos<this.input.length;){var i=this.input.codePointAt(this.state.pos);if(k(i))this.state.pos+=i<=65535?1:2;else if(this.state.isIterator&&64===i)this.state.pos+=1;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);var r=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint(!0);(e?N:k)(a,!0)||this.raise(r,"Invalid Unicode escape"),t+=String.fromCodePoint(a),s=this.state.pos}e=!1}return t+this.input.slice(s,this.state.pos)},s.isIterator=function(t){return"@@iterator"===t||"@@asyncIterator"===t},s.readWord=function(){var t=this.readWord1(),e=h.name;this.isKeyword(t)&&(this.state.containsEsc&&this.raise(this.state.pos,"Escape sequence in keyword "+t),e=u[t]),!this.state.isIterator||this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,"Invalid identifier "+t),this.finishToken(e,t)},s.braceIsBlock=function(t){var e=this.curContext();return e===D.functionExpression||e===D.functionStatement||(t!==h.colon||e!==D.braceStatement&&e!==D.braceExpression?t===h._return||t===h._yield||t===h.name&&this.state.exprAllowed?c.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===h._else||t===h.semi||t===h.eof||t===h.parenR||t===h.arrow||(t===h.braceL?e===D.braceStatement:t!==h._var&&t!==h._let&&t!==h._const&&(t===h.relational||!this.state.exprAllowed)):!e.isExpr)},s.updateContext=function(t){var e,s=this.state.type;!s.keyword||t!==h.dot&&t!==h.questionDot?(e=s.updateContext)?e.call(this,t):this.state.exprAllowed=s.beforeExpr:this.state.exprAllowed=!1},e}(K)),Q=["leadingComments","trailingComments","innerComments"],$=function(){function t(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new V(s),t&&t.options.ranges&&(this.range=[e,0]),t&&t.filename&&(this.loc.filename=t.filename)}return t.prototype.__clone=function(){var e=this,s=new t;return Object.keys(this).forEach(function(t){Q.indexOf(t)<0&&(s[t]=e[t])}),s},t}(),Y=[],Z={kind:"loop"},tt={kind:"switch"},et=function(t){function e(e,s){var i;return e=function(t){var e={};for(var s in q)e[s]=t&&null!=t[s]?t[s]:q[s];return e}(e),(i=t.call(this,e,s)||this).options=e,i.inModule="module"===i.options.sourceType,i.input=s,i.plugins=function(t){for(var e=Object.create(null),s=0;s<t.length;s++){var i=t[s],r=Array.isArray(i)?i:[i,{}],a=r[0],n=r[1],o=void 0===n?{}:n;e[a]||(e[a]=o||{})}return e}(i.options.plugins),i.filename=e.sourceFilename,i}return i(e,t),e.prototype.parse=function(){var t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.parseTopLevel=function(t,e){return e.sourceType=this.options.sourceType,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,h.eof),t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.state.tokens),this.finishNode(t,"File")},s.stmtToDirective=function(t){var e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),r=this.input.slice(e.start,e.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)},s.parseInterpreterDirective=function(){if(!this.match(h.interpreterDirective))return null;var t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")},s.parseStatement=function(t,e){return this.match(h.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)},s.parseStatementContent=function(t,e){var s=this.state.type,i=this.startNode();switch(s){case h._break:case h._continue:return this.parseBreakContinueStatement(i,s.keyword);case h._debugger:return this.parseDebuggerStatement(i);case h._do:return this.parseDoStatement(i);case h._for:return this.parseForStatement(i);case h._function:if(this.lookahead().type===h.dot)break;return t||this.unexpected(),this.parseFunctionStatement(i);case h._class:return t||this.unexpected(),this.parseClass(i,!0);case h._if:return this.parseIfStatement(i);case h._return:return this.parseReturnStatement(i);case h._switch:return this.parseSwitchStatement(i);case h._throw:return this.parseThrowStatement(i);case h._try:return this.parseTryStatement(i);case h._let:case h._const:t||this.unexpected();case h._var:return this.parseVarStatement(i,s);case h._while:return this.parseWhileStatement(i);case h._with:return this.parseWithStatement(i);case h.braceL:return this.parseBlock();case h.semi:return this.parseEmptyStatement(i);case h._export:case h._import:var r,a=this.lookahead();if(a.type===h.parenL||a.type===h.dot)break;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.next(),s==h._import?"ImportDeclaration"!==(r=this.parseImport(i)).type||r.importKind&&"value"!==r.importKind||(this.sawUnambiguousESM=!0):("ExportNamedDeclaration"!==(r=this.parseExport(i)).type||r.exportKind&&"value"!==r.exportKind)&&("ExportAllDeclaration"!==r.type||r.exportKind&&"value"!==r.exportKind)&&"ExportDefaultDeclaration"!==r.type||(this.sawUnambiguousESM=!0),this.assertModuleNodeAllowed(i),r;case h.name:if(this.isContextual("async")){var n=this.state.clone();if(this.next(),this.match(h._function)&&!this.canInsertSemicolon())return this.expect(h._function),this.parseFunction(i,!0,!1,!0);this.state=n}}var o=this.state.value,u=this.parseExpression();return s===h.name&&"Identifier"===u.type&&this.eat(h.colon)?this.parseLabeledStatement(i,o,u):this.parseExpressionStatement(i,u)},s.assertModuleNodeAllowed=function(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"})},s.takeDecorators=function(t){var e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])},s.canHaveLeadingDecorator=function(){return this.match(h._class)},s.parseDecorators=function(t){for(var e=this.state.decoratorStack[this.state.decoratorStack.length-1];this.match(h.at);){var s=this.parseDecorator();e.push(s)}this.match(h._export)?(t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.")):this.canHaveLeadingDecorator()||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},s.parseDecorator=function(){this.expectOnePlugin(["decorators-legacy","decorators"]);var t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);var e,s=this.state.start,i=this.state.startLoc;if(this.eat(h.parenL))e=this.parseExpression(),this.expect(h.parenR);else for(e=this.parseIdentifier(!1);this.eat(h.dot);){var r=this.startNodeAt(s,i);r.object=e,r.property=this.parseIdentifier(!0),r.computed=!1,e=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(e),this.state.decoratorStack.pop()}else t.expression=this.parseMaybeAssign();return this.finishNode(t,"Decorator")},s.parseMaybeDecoratorArguments=function(t){if(this.eat(h.parenL)){var e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(h.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t},s.parseBreakContinueStatement=function(t,e){var s,i="break"===e;for(this.next(),this.isLineTerminator()?t.label=null:this.match(h.name)?(t.label=this.parseIdentifier(),this.semicolon()):this.unexpected(),s=0;s<this.state.labels.length;++s){var r=this.state.labels[s];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(t.label&&i)break}}return s===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},s.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},s.parseDoStatement=function(t){var e=this;return this.next(),this.state.labels.push(Z),t.body=this.withTopicForbiddingContext(function(){return e.parseStatement(!1)}),this.state.labels.pop(),this.expect(h._while),t.test=this.parseParenExpression(),this.eat(h.semi),this.finishNode(t,"DoWhileStatement")},s.parseForStatement=function(t){this.next(),this.state.labels.push(Z);var e=!1;if(this.state.inAsync&&this.isContextual("await")&&(e=!0,this.next()),this.expect(h.parenL),this.match(h.semi))return e&&this.unexpected(),this.parseFor(t,null);if(this.match(h._var)||this.match(h._let)||this.match(h._const)){var s=this.startNode(),i=this.state.type;if(this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),(this.match(h._in)||this.isContextual("of"))&&1===s.declarations.length){var r=s.declarations[0],a=i===h._var&&r.init&&"ObjectPattern"!=r.id.type&&"ArrayPattern"!=r.id.type&&!this.isContextual("of");if(this.state.strict&&a)this.raise(this.state.start,"for-in initializer in strict mode");else if(a||!r.init)return this.parseForIn(t,s,e)}return e&&this.unexpected(),this.parseFor(t,s)}var n={start:0},o=this.parseExpression(!0,n);if(this.match(h._in)||this.isContextual("of")){var u=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(o,void 0,u),this.checkLVal(o,void 0,void 0,u),this.parseForIn(t,o,e)}return n.start&&this.unexpected(n.start),e&&this.unexpected(),this.parseFor(t,o)},s.parseFunctionStatement=function(t){return this.next(),this.parseFunction(t,!0)},s.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!1),t.alternate=this.eat(h._else)?this.parseStatement(!1):null,this.finishNode(t,"IfStatement")},s.parseReturnStatement=function(t){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},s.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression();var e,s,i=t.cases=[];for(this.expect(h.braceL),this.state.labels.push(tt);!this.match(h.braceR);)if(this.match(h._case)||this.match(h._default)){var r=this.match(h._case);e&&this.finishNode(e,"SwitchCase"),i.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(s&&this.raise(this.state.lastTokStart,"Multiple default clauses"),s=!0,e.test=null),this.expect(h.colon)}else e?e.consequent.push(this.parseStatement(!0)):this.unexpected();return e&&this.finishNode(e,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")},s.parseThrowStatement=function(t){return this.next(),c.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")},s.parseTryStatement=function(t){var e=this;if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(h._catch)){var s=this.startNode();if(this.next(),this.match(h.parenL)){this.expect(h.parenL),s.param=this.parseBindingAtom();var i=Object.create(null);this.checkLVal(s.param,!0,i,"catch clause"),this.expect(h.parenR)}else s.param=null;s.body=this.withTopicForbiddingContext(function(){return e.parseBlock(!1)}),t.handler=this.finishNode(s,"CatchClause")}return t.guardedHandlers=Y,t.finalizer=this.eat(h._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},s.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},s.parseWhileStatement=function(t){var e=this;return this.next(),t.test=this.parseParenExpression(),this.state.labels.push(Z),t.body=this.withTopicForbiddingContext(function(){return e.parseStatement(!1)}),this.state.labels.pop(),this.finishNode(t,"WhileStatement")},s.parseWithStatement=function(t){var e=this;return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.withTopicForbiddingContext(function(){return e.parseStatement(!1)}),this.finishNode(t,"WithStatement")},s.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},s.parseLabeledStatement=function(t,e,s){for(var i=0,r=this.state.labels;i<r.length;i++){r[i].name===e&&this.raise(s.start,"Label '"+e+"' is already declared")}for(var a=this.state.type.isLoop?"loop":this.match(h._switch)?"switch":null,n=this.state.labels.length-1;n>=0;n--){var o=this.state.labels[n];if(o.statementStart!==t.start)break;o.statementStart=this.state.start,o.kind=a}return this.state.labels.push({name:e,kind:a,statementStart:this.state.start}),t.body=this.parseStatement(!0),("ClassDeclaration"==t.body.type||"VariableDeclaration"==t.body.type&&"var"!==t.body.kind||"FunctionDeclaration"==t.body.type&&(this.state.strict||t.body.generator||t.body.async))&&this.raise(t.body.start,"Invalid labeled declaration"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},s.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},s.parseBlock=function(t){var e=this.startNode();return this.expect(h.braceL),this.parseBlockBody(e,t,!1,h.braceR),this.finishNode(e,"BlockStatement")},s.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},s.parseBlockBody=function(t,e,s,i){var r=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(r,e?a:void 0,s,i)},s.parseBlockOrModuleBlockBody=function(t,e,s,i){for(var r,a,n=!1;!this.eat(i);){n||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,s);if(e&&!n&&this.isValidDirective(o)){var h=this.stmtToDirective(o);e.push(h),void 0===r&&"use strict"===h.value.value&&(r=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else n=!0,t.push(o)}!1===r&&this.setStrict(!1)},s.parseFor=function(t,e){var s=this;return t.init=e,this.expect(h.semi),t.test=this.match(h.semi)?null:this.parseExpression(),this.expect(h.semi),t.update=this.match(h.parenR)?null:this.parseExpression(),this.expect(h.parenR),t.body=this.withTopicForbiddingContext(function(){return s.parseStatement(!1)}),this.state.labels.pop(),this.finishNode(t,"ForStatement")},s.parseForIn=function(t,e,s){var i=this,r=this.match(h._in)?"ForInStatement":"ForOfStatement";return s?this.eatContextual("of"):this.next(),"ForOfStatement"===r&&(t.await=!!s),t.left=e,t.right=this.parseExpression(),this.expect(h.parenR),t.body=this.withTopicForbiddingContext(function(){return i.parseStatement(!1)}),this.state.labels.pop(),this.finishNode(t,r)},s.parseVar=function(t,e,s){var i=t.declarations=[];for(t.kind=s.keyword;;){var r=this.startNode();if(this.parseVarHead(r),this.eat(h.eq)?r.init=this.parseMaybeAssign(e):(s!==h._const||this.match(h._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(h._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.hasPlugin("typescript")||this.unexpected(),r.init=null),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(h.comma))break}return t},s.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},s.parseFunction=function(t,e,s,i,r){var a=this,n=this.state.inFunction,o=this.state.inMethod,u=this.state.inAsync,p=this.state.inGenerator,c=this.state.inClassProperty;return this.state.inFunction=!0,this.state.inMethod=!1,this.state.inClassProperty=!1,this.initFunction(t,i),this.match(h.star)&&(t.generator=!0,this.next()),!e||r||this.match(h.name)||this.match(h._yield)||this.unexpected(),e||(this.state.inAsync=i,this.state.inGenerator=t.generator),(this.match(h.name)||this.match(h._yield))&&(t.id=this.parseBindingIdentifier()),e&&(this.state.inAsync=i,this.state.inGenerator=t.generator),this.parseFunctionParams(t),this.withTopicForbiddingContext(function(){a.parseFunctionBodyAndFinish(t,e?"FunctionDeclaration":"FunctionExpression",s)}),this.state.inFunction=n,this.state.inMethod=o,this.state.inAsync=u,this.state.inGenerator=p,this.state.inClassProperty=c,t},s.parseFunctionParams=function(t,e){var s=this.state.inParameters;this.state.inParameters=!0,this.expect(h.parenL),t.params=this.parseBindingList(h.parenR,!1,e),this.state.inParameters=s},s.parseClass=function(t,e,s){return this.next(),this.takeDecorators(t),this.parseClassId(t,e,s),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},s.isClassProperty=function(){return this.match(h.eq)||this.match(h.semi)||this.match(h.braceR)},s.isClassMethod=function(){return this.match(h.parenL)},s.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},s.parseClassBody=function(t){var e=this,s=this.state.strict;this.state.strict=!0,this.state.classLevel++;var i={hadConstructor:!1},r=[],a=this.startNode();a.body=[],this.expect(h.braceL),this.withTopicForbiddingContext(function(){for(;!e.eat(h.braceR);)if(e.eat(h.semi))r.length>0&&e.raise(e.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(e.match(h.at))r.push(e.parseDecorator());else{var t=e.startNode();r.length&&(t.decorators=r,e.resetStartLocationFromNode(t,r[0]),r=[]),e.parseClassMember(a,t,i),"constructor"===t.kind&&t.decorators&&t.decorators.length>0&&e.raise(t.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}}),r.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(a,"ClassBody"),this.state.classLevel--,this.state.strict=s},s.parseClassMember=function(t,e,s){var i=!1,r=this.state.containsEsc;if(this.match(h.name)&&"static"===this.state.value){var a=this.parseIdentifier(!0);if(this.isClassMethod()){var n=e;return n.kind="method",n.computed=!1,n.key=a,n.static=!1,void this.pushClassMethod(t,n,!1,!1,!1)}if(this.isClassProperty()){var o=e;return o.computed=!1,o.key=a,o.static=!1,void t.body.push(this.parseClassProperty(o))}if(r)throw this.unexpected();i=!0}this.parseClassMemberWithIsStatic(t,e,s,i)},s.parseClassMemberWithIsStatic=function(t,e,s,i){var r=e,a=e,n=e,o=e,u=r,p=r;if(e.static=i,this.eat(h.star))return u.kind="method",this.parseClassPropertyName(u),"PrivateName"===u.key.type?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be a generator"),void this.pushClassMethod(t,r,!0,!1,!1));var c=this.parseClassPropertyName(e),l="PrivateName"===c.type,d="Identifier"===c.type;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(u.kind="method",l)return void this.pushClassPrivateMethod(t,a,!1,!1);var f=this.isNonstaticConstructor(r);f&&(r.kind="constructor",r.decorators&&this.raise(r.start,"You can't attach decorators to a class constructor"),s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(c.start,"Duplicate constructor in the same class"),s.hadConstructor=!0),this.pushClassMethod(t,r,!1,!1,f)}else if(this.isClassProperty())l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(d&&"async"===c.name&&!this.isLineTerminator()){var m=this.eat(h.star);u.kind="method",this.parseClassPropertyName(u),"PrivateName"===u.key.type?this.pushClassPrivateMethod(t,a,m,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be an async function"),this.pushClassMethod(t,r,m,!0,!1))}else!d||"get"!==c.name&&"set"!==c.name||this.isLineTerminator()&&this.match(h.star)?this.isLineTerminator()?l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected():(u.kind=c.name,this.parseClassPropertyName(r),"PrivateName"===u.key.type?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(t,r,!1,!1,!1)),this.checkGetterSetterParams(r))},s.parseClassPropertyName=function(t){var e=this.parsePropertyName(t);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,"Classes may not have static property named prototype"),"PrivateName"===e.type&&"constructor"===e.id.name&&this.raise(e.start,"Classes may not have a private field named '#constructor'"),e},s.pushClassProperty=function(t,e){this.isNonstaticConstructor(e)&&this.raise(e.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(e))},s.pushClassPrivateProperty=function(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))},s.pushClassMethod=function(t,e,s,i,r){t.body.push(this.parseMethod(e,s,i,r,"ClassMethod"))},s.pushClassPrivateMethod=function(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,i,!1,"ClassPrivateMethod"))},s.parsePostMemberNameModifiers=function(t){},s.parseAccessModifier=function(){},s.parseClassPrivateProperty=function(t){var e=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,t.value=this.eat(h.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=e,this.finishNode(t,"ClassPrivateProperty")},s.parseClassProperty=function(t){t.typeAnnotation||this.expectPlugin("classProperties");var e=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,this.match(h.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=e,this.finishNode(t,"ClassProperty")},s.parseClassId=function(t,e,s){this.match(h.name)?t.id=this.parseIdentifier():s||!e?t.id=null:this.unexpected(null,"A class name is required")},s.parseClassSuper=function(t){t.superClass=this.eat(h._extends)?this.parseExprSubscripts():null},s.parseExport=function(t){if(this.shouldParseExportStar()){if(this.parseExportStar(t),"ExportAllDeclaration"===t.type)return t}else if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var e=this.startNode();e.exported=this.parseIdentifier(!0);var s=[this.finishNode(e,"ExportDefaultSpecifier")];if(t.specifiers=s,this.match(h.comma)&&this.lookahead().type===h.star){this.expect(h.comma);var i=this.startNode();this.expect(h.star),this.expectContextual("as"),i.exported=this.parseIdentifier(),s.push(this.finishNode(i,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(t);this.parseExportFrom(t,!0)}else{if(this.eat(h._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var r=this.lookahead();r.type!==h._function&&this.unexpected(r.start,'Unexpected token, expected "function"')}t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t)}else t.declaration=null,t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t)}return this.checkExport(t,!0),this.finishNode(t,"ExportNamedDeclaration")},s.isAsyncFunction=function(){if(!this.isContextual("async"))return!1;var t=this.state,e=t.input,s=t.pos;f.lastIndex=s;var i=f.exec(e);if(!i||!i.length)return!1;var r=s+i[0].length;return!(c.test(e.slice(s,r))||"function"!==e.slice(r,r+8)||r+8!==e.length&&k(e.charAt(r+8)))},s.parseExportDefaultExpression=function(){var t=this.startNode(),e=this.isAsyncFunction();if(this.eat(h._function)||e)return e&&(this.eatContextual("async"),this.expect(h._function)),this.parseFunction(t,!0,!1,e,!0);if(this.match(h._class))return this.parseClass(t,!0,!0);if(this.match(h.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(h._let)||this.match(h._const)||this.match(h._var))return this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var s=this.parseMaybeAssign();return this.semicolon(),s},s.parseExportDeclaration=function(t){return this.parseStatement(!0)},s.isExportDefaultSpecifier=function(){if(this.match(h.name))return"async"!==this.state.value;if(!this.match(h._default))return!1;var t=this.lookahead();return t.type===h.comma||t.type===h.name&&"from"===t.value},s.parseExportSpecifiersMaybe=function(t){this.eat(h.comma)&&(t.specifiers=t.specifiers.concat(this.parseExportSpecifiers()))},s.parseExportFrom=function(t,e){this.eatContextual("from")?(t.source=this.match(h.string)?this.parseExprAtom():this.unexpected(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()},s.shouldParseExportStar=function(){return this.match(h.star)},s.parseExportStar=function(t){this.expect(h.star),this.isContextual("as")?this.parseExportNamespace(t):(this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration"))},s.parseExportNamespace=function(t){this.expectPlugin("exportNamespaceFrom");var e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next(),e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(t),this.parseExportFrom(t,!0)},s.shouldParseExportDeclaration=function(){if(this.match(h.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isAsyncFunction()},s.checkExport=function(t,e,s){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(var i=0,r=t.specifiers;i<r.length;i++){var a=r[i];this.checkDuplicateExports(a,a.exported.name)}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){var n=t.declaration.id;if(!n)throw new Error("Assertion failure");this.checkDuplicateExports(t,n.name)}else if("VariableDeclaration"===t.declaration.type)for(var o=0,h=t.declaration.declarations;o<h.length;o++){var u=h[o];this.checkDeclaration(u.id)}if(this.state.decoratorStack[this.state.decoratorStack.length-1].length){var p=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);if(!t.declaration||!p)throw this.raise(t.start,"You can only use decorators on an export when exporting a class");this.takeDecorators(t.declaration)}},s.checkDeclaration=function(t){if("ObjectPattern"===t.type)for(var e=0,s=t.properties;e<s.length;e++){var i=s[e];this.checkDeclaration(i)}else if("ArrayPattern"===t.type)for(var r=0,a=t.elements;r<a.length;r++){var n=a[r];n&&this.checkDeclaration(n)}else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"Identifier"===t.type&&this.checkDuplicateExports(t,t.name)},s.checkDuplicateExports=function(t,e){this.state.exportedIdentifiers.indexOf(e)>-1&&this.raiseDuplicateExportError(t,e),this.state.exportedIdentifiers.push(e)},s.raiseDuplicateExportError=function(t,e){throw this.raise(t.start,"default"===e?"Only one default export allowed per module.":"`"+e+"` has already been exported. Exported identifiers must be unique.")},s.parseExportSpecifiers=function(){var t,e=[],s=!0;for(this.expect(h.braceL);!this.eat(h.braceR);){if(s)s=!1;else if(this.expect(h.comma),this.eat(h.braceR))break;var i=this.match(h._default);i&&!t&&(t=!0);var r=this.startNode();r.local=this.parseIdentifier(i),r.exported=this.eatContextual("as")?this.parseIdentifier(!0):r.local.__clone(),e.push(this.finishNode(r,"ExportSpecifier"))}return t&&!this.isContextual("from")&&this.unexpected(),e},s.parseImport=function(t){return this.match(h.string)?(t.specifiers=[],t.source=this.parseExprAtom()):(t.specifiers=[],this.parseImportSpecifiers(t),this.expectContextual("from"),t.source=this.match(h.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},s.shouldParseDefaultImport=function(t){return this.match(h.name)},s.parseImportSpecifierLocal=function(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,!0,void 0,i),t.specifiers.push(this.finishNode(e,s))},s.parseImportSpecifiers=function(t){var e=!0;if(!this.shouldParseDefaultImport(t)||(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),this.eat(h.comma))){if(this.match(h.star)){var s=this.startNode();return this.next(),this.expectContextual("as"),void this.parseImportSpecifierLocal(t,s,"ImportNamespaceSpecifier","import namespace specifier")}for(this.expect(h.braceL);!this.eat(h.braceR);){if(e)e=!1;else if(this.eat(h.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(h.comma),this.eat(h.braceR))break;this.parseImportSpecifier(t)}}},s.parseImportSpecifier=function(t){var e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.checkPropClash=function(t,e){if(!t.computed&&!t.kind){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}},s.getExpression=function(){this.nextToken();var t=this.parseExpression();return this.match(h.eof)||this.unexpected(),t.comments=this.state.comments,t},s.parseExpression=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.parseMaybeAssign(t,e);if(this.match(h.comma)){var a=this.startNodeAt(s,i);for(a.expressions=[r];this.eat(h.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return r},s.parseMaybeAssign=function(t,e,s,i){var r,a=this.state.start,n=this.state.startLoc;if(this.match(h._yield)&&this.state.inGenerator){var o=this.parseYield();return s&&(o=s.call(this,o,a,n)),o}e?r=!1:(e={start:0},r=!0),(this.match(h.parenL)||this.match(h.name)||this.match(h._yield))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(t,e,i);if(s&&(u=s.call(this,u,a,n)),this.state.type.isAssign){var p,c=this.startNodeAt(a,n),l=this.state.value;if(c.operator=l,"??="===l&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==l&&"&&="!==l||this.expectPlugin("logicalAssignment"),c.left=this.match(h.eq)?this.toAssignable(u,void 0,"assignment expression"):u,e.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized)"ObjectPattern"===u.type?p="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(p="`([a]) = 0` use `([a] = 0)`"),p&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+p);return this.next(),c.right=this.parseMaybeAssign(t),this.finishNode(c,"AssignmentExpression")}return r&&e.start&&this.unexpected(e.start),u},s.parseMaybeConditional=function(t,e,s){var i=this.state.start,r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return"ArrowFunctionExpression"===n.type&&n.start===a?n:e&&e.start?n:this.parseConditional(n,t,i,r,s)},s.parseConditional=function(t,e,s,i,r){if(this.eat(h.question)){var a=this.startNodeAt(s,i);return a.test=t,a.consequent=this.parseMaybeAssign(),this.expect(h.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return t},s.parseExprOps=function(t,e){var s=this.state.start,i=this.state.startLoc,r=this.state.potentialArrowAt,a=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===a.type&&a.start===r?a:e&&e.start?a:this.parseExprOp(a,s,i,-1,t)},s.parseExprOp=function(t,e,s,i,r){var a=this.state.type.binop;if(!(null==a||r&&this.match(h._in))&&a>i){var n=this.startNodeAt(e,s),o=this.state.value;n.left=t,n.operator=o,"**"!==o||"UnaryExpression"!==t.type||t.extra&&t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var u=this.state.type;if(u===h.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)):u===h.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),u===h.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(h.name)&&"await"===this.state.value&&this.state.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');return n.right=this.parseExprOpRightExpr(u,a,r),this.finishNode(n,u===h.logicalOR||u===h.logicalAND||u===h.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(n,e,s,i,r)}return t},s.parseExprOpRightExpr=function(t,e,s){var i=this;switch(t){case h.pipeline:if("smart"===this.getPluginOption("pipelineOperator","proposal")){var r=this.state.start,a=this.state.startLoc;return this.withTopicPermittingContext(function(){return i.parseSmartPipelineBody(i.parseExprOpBaseRightExpr(t,e,s),r,a)})}default:return this.parseExprOpBaseRightExpr(t,e,s)}},s.parseExprOpBaseRightExpr=function(t,e,s){var i=this.state.start,r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),i,r,t.rightAssociative?e-1:e,s)},s.parseMaybeUnary=function(t){if(this.state.type.prefix){var e=this.startNode(),s=this.match(h.incDec);if(e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next(),e.argument=this.parseMaybeUnary(),t&&t.start&&this.unexpected(t.start),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){var i=e.argument;"Identifier"===i.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===i.type&&"PrivateName"===i.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var r=this.state.start,a=this.state.startLoc,n=this.parseExprSubscripts(t);if(t&&t.start)return n;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(r,a);o.operator=this.state.value,o.prefix=!1,o.argument=n,this.checkLVal(n,void 0,void 0,"postfix operation"),this.next(),n=this.finishNode(o,"UpdateExpression")}return n},s.parseExprSubscripts=function(t){var e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return"ArrowFunctionExpression"===r.type&&r.start===i?r:t&&t.start?r:this.parseSubscripts(r,e,s)},s.parseSubscripts=function(t,e,s,i){var r={optionalChainMember:!1,stop:!1};do{t=this.parseSubscript(t,e,s,i,r)}while(!r.stop);return t},s.parseSubscript=function(t,e,s,i,r){if(!i&&this.eat(h.doubleColon)){var a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}if(this.match(h.questionDot)){if(this.expectPlugin("optionalChaining"),r.optionalChainMember=!0,i&&this.lookahead().type==h.parenL)return r.stop=!0,t;this.next();var n=this.startNodeAt(e,s);if(this.eat(h.bracketL))return n.object=t,n.property=this.parseExpression(),n.computed=!0,n.optional=!0,this.expect(h.bracketR),this.finishNode(n,"OptionalMemberExpression");if(this.eat(h.parenL)){var o=this.atPossibleAsync(t);return n.callee=t,n.arguments=this.parseCallExpressionArguments(h.parenR,o),n.optional=!0,this.finishNode(n,"OptionalCallExpression")}return n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"OptionalMemberExpression")}if(this.eat(h.dot)){var u=this.startNodeAt(e,s);return u.object=t,u.property=this.parseMaybePrivateName(),u.computed=!1,r.optionalChainMember?(u.optional=!1,this.finishNode(u,"OptionalMemberExpression")):this.finishNode(u,"MemberExpression")}if(this.eat(h.bracketL)){var p=this.startNodeAt(e,s);return p.object=t,p.property=this.parseExpression(),p.computed=!0,this.expect(h.bracketR),r.optionalChainMember?(p.optional=!1,this.finishNode(p,"OptionalMemberExpression")):this.finishNode(p,"MemberExpression")}if(!i&&this.match(h.parenL)){var c=this.state.maybeInArrowParameters,l=this.state.yieldOrAwaitInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldOrAwaitInPossibleArrowParameters=null;var d=this.atPossibleAsync(t);this.next();var f=this.startNodeAt(e,s);f.callee=t;var m={start:-1};return f.arguments=this.parseCallExpressionArguments(h.parenR,d,m),r.optionalChainMember?this.finishOptionalCallExpression(f):this.finishCallExpression(f),d&&this.shouldParseAsyncArrow()?(r.stop=!0,m.start>-1&&this.raise(m.start,"A trailing comma is not permitted after the rest element"),f=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),f),this.state.yieldOrAwaitInPossibleArrowParameters=l):(this.toReferencedListDeep(f.arguments),this.state.yieldOrAwaitInPossibleArrowParameters=this.state.yieldOrAwaitInPossibleArrowParameters||l),this.state.maybeInArrowParameters=c,f}return this.match(h.backQuote)?this.parseTaggedTemplateExpression(e,s,t,r):(r.stop=!0,t)},s.parseTaggedTemplateExpression=function(t,e,s,i,r){var a=this.startNodeAt(t,e);return a.tag=s,a.quasi=this.parseTemplate(!0),r&&(a.typeParameters=r),i.optionalChainMember&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(a,"TaggedTemplateExpression")},s.atPossibleAsync=function(t){return!this.state.containsEsc&&this.state.potentialArrowAt===t.start&&"Identifier"===t.type&&"async"===t.name&&!this.canInsertSemicolon()},s.finishCallExpression=function(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");var e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"CallExpression")},s.finishOptionalCallExpression=function(t){if("Import"===t.callee.type){1!==t.arguments.length&&this.raise(t.start,"import() requires exactly one argument");var e=t.arguments[0];e&&"SpreadElement"===e.type&&this.raise(e.start,"... is not allowed in import()")}return this.finishNode(t,"OptionalCallExpression")},s.parseCallExpressionArguments=function(t,e,s){for(var i,r=[],a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(h.comma),this.eat(t))break;this.match(h.parenL)&&!i&&(i=this.state.start),r.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,e?s:void 0))}return e&&i&&this.shouldParseAsyncArrow()&&this.unexpected(),r},s.shouldParseAsyncArrow=function(){return this.match(h.arrow)},s.parseAsyncArrowFromCallExpression=function(t,e){return this.expect(h.arrow),this.parseArrowExpression(t,e.arguments,!0),t},s.parseNoCallExpr=function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)},s.parseExprAtom=function(t){this.state.type===h.slash&&this.readRegexp();var e,s=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case h._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"super is only allowed in object methods and classes"),e=this.startNode(),this.next(),this.match(h.parenL)||this.match(h.bracketL)||this.match(h.dot)||this.unexpected(),this.match(h.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(e.start,"super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'."),this.finishNode(e,"Super");case h._import:return this.lookahead().type===h.dot?this.parseImportMetaProperty():(this.expectPlugin("dynamicImport"),e=this.startNode(),this.next(),this.match(h.parenL)||this.unexpected(null,h.parenL),this.finishNode(e,"Import"));case h._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case h._yield:this.state.inGenerator&&this.unexpected();case h.name:e=this.startNode();var i="await"===this.state.value&&(this.state.inAsync||!this.state.inFunction&&this.options.allowAwaitOutsideFunction),r=this.state.containsEsc,a=this.shouldAllowYieldIdentifier(),n=this.parseIdentifier(i||a);if("await"===n.name){if(this.state.inAsync||this.inModule||!this.state.inFunction&&this.options.allowAwaitOutsideFunction)return this.parseAwait(e)}else{if(!r&&"async"===n.name&&this.match(h._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,!1,!1,!0);if(s&&!this.canInsertSemicolon()&&"async"===n.name&&this.match(h.name)){var o=this.state.yieldOrAwaitInPossibleArrowParameters,u=this.state.inAsync;this.state.yieldOrAwaitInPossibleArrowParameters=null,this.state.inAsync=!0;var p=[this.parseIdentifier()];return this.expect(h.arrow),this.parseArrowExpression(e,p,!0),this.state.yieldOrAwaitInPossibleArrowParameters=o,this.state.inAsync=u,e}}if(s&&!this.canInsertSemicolon()&&this.eat(h.arrow)){var c=this.state.yieldOrAwaitInPossibleArrowParameters;return this.state.yieldOrAwaitInPossibleArrowParameters=null,this.parseArrowExpression(e,[n]),this.state.yieldOrAwaitInPossibleArrowParameters=c,e}return n;case h._do:this.expectPlugin("doExpressions");var l=this.startNode();this.next();var d=this.state.inFunction,f=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,l.body=this.parseBlock(!1),this.state.inFunction=d,this.state.labels=f,this.finishNode(l,"DoExpression");case h.regexp:var m=this.state.value;return(e=this.parseLiteral(m.value,"RegExpLiteral")).pattern=m.pattern,e.flags=m.flags,e;case h.num:return this.parseLiteral(this.state.value,"NumericLiteral");case h.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case h.string:return this.parseLiteral(this.state.value,"StringLiteral");case h._null:return e=this.startNode(),this.next(),this.finishNode(e,"NullLiteral");case h._true:case h._false:return this.parseBooleanLiteral();case h.parenL:return this.parseParenAndDistinguishExpression(s);case h.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(h.bracketR,!0,t),this.state.maybeInArrowParameters||this.toReferencedList(e.elements),this.finishNode(e,"ArrayExpression");case h.braceL:return this.parseObj(!1,t);case h._function:return this.parseFunctionExpression();case h.at:this.parseDecorators();case h._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate(!1);case h.doubleColon:e=this.startNode(),this.next(),e.object=null;var y=e.callee=this.parseNoCallExpr();if("MemberExpression"===y.type)return this.finishNode(e,"BindExpression");throw this.raise(y.start,"Binding should be performed on object property.");case h.hash:if(this.state.inPipeline){if(e=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(e.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext())return this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference");throw this.raise(e.start,"Topic reference was used in a lexical context without topic binding")}default:throw this.unexpected()}},s.parseBooleanLiteral=function(){var t=this.startNode();return t.value=this.match(h._true),this.next(),this.finishNode(t,"BooleanLiteral")},s.parseMaybePrivateName=function(){if(this.match(h.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var t=this.startNode(),e=this.state.end;this.next();var s=this.state.start;return 0!=s-e&&this.raise(s,"Unexpected space between # and identifier"),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)},s.parseFunctionExpression=function(){var t=this.startNode(),e=this.startNode();return this.next(),e=this.createIdentifier(e,"function"),this.state.inGenerator&&this.eat(h.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t,!1)},s.parseMetaProperty=function(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,"The only valid meta property for "+e.name+" is "+e.name+"."+s),this.finishNode(t,"MetaProperty")},s.parseImportMetaProperty=function(){var t=this.startNode(),e=this.parseIdentifier(!0);return this.expect(h.dot),"import"===e.name&&(this.isContextual("meta")?this.expectPlugin("importMeta"):this.hasPlugin("importMeta")||this.raise(e.start,"Dynamic imports require a parameter: import('a.js')")),this.inModule||this.raise(e.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0,this.parseMetaProperty(t,e,"meta")},s.parseLiteral=function(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;var r=this.startNodeAt(s,i);return this.addExtra(r,"rawValue",t),this.addExtra(r,"raw",this.input.slice(s,this.state.end)),r.value=t,this.next(),this.finishNode(r,e)},s.parseParenExpression=function(){this.expect(h.parenL);var t=this.parseExpression();return this.expect(h.parenR),t},s.parseParenAndDistinguishExpression=function(t){var e,s=this.state.start,i=this.state.startLoc;this.expect(h.parenL);var r=this.state.maybeInArrowParameters,a=this.state.yieldOrAwaitInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldOrAwaitInPossibleArrowParameters=null;for(var n,o,u=this.state.start,p=this.state.startLoc,c=[],l={start:0},d={start:0},f=!0;!this.match(h.parenR);){if(f)f=!1;else if(this.expect(h.comma,d.start||null),this.match(h.parenR)){o=this.state.start;break}if(this.match(h.ellipsis)){var m=this.state.start,y=this.state.startLoc;if(n=this.state.start,c.push(this.parseParenItem(this.parseRest(),m,y)),this.match(h.comma)){var D=this.lookahead().type===h.parenR?"A trailing comma is not permitted after the rest element":"Rest parameter must be last formal parameter";this.raise(this.state.start,D)}break}c.push(this.parseMaybeAssign(!1,l,this.parseParenItem,d))}var x=this.state.start,v=this.state.startLoc;this.expect(h.parenR),this.state.maybeInArrowParameters=r;var P=this.startNodeAt(s,i);if(t&&this.shouldParseArrow()&&(P=this.parseArrow(P))){for(var g=0;g<c.length;g++){var b=c[g];b.extra&&b.extra.parenthesized&&this.unexpected(b.extra.parenStart)}return this.parseArrowExpression(P,c),this.state.yieldOrAwaitInPossibleArrowParameters=a,P}return this.state.yieldOrAwaitInPossibleArrowParameters=this.state.yieldOrAwaitInPossibleArrowParameters||a,c.length||this.unexpected(this.state.lastTokStart),o&&this.unexpected(o),n&&this.unexpected(n),l.start&&this.unexpected(l.start),d.start&&this.unexpected(d.start),this.toReferencedListDeep(c,!0),c.length>1?((e=this.startNodeAt(u,p)).expressions=c,this.finishNodeAt(e,"SequenceExpression",x,v)):e=c[0],this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s),e},s.shouldParseArrow=function(){return!this.canInsertSemicolon()},s.parseArrow=function(t){if(this.eat(h.arrow))return t},s.parseParenItem=function(t,e,s){return t},s.parseNew=function(){var t=this.startNode(),e=this.parseIdentifier(!0);if(this.eat(h.dot)){var s=this.parseMetaProperty(t,e,"target");if(!this.state.inFunction&&!this.state.inClassProperty){var i="new.target can only be used in functions";this.hasPlugin("classProperties")&&(i+=" or class properties"),this.raise(s.start,i)}return s}return t.callee=this.parseNoCallExpr(),"OptionalMemberExpression"!==t.callee.type&&"OptionalCallExpression"!==t.callee.type||this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"),this.eat(h.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(t),this.finishNode(t,"NewExpression")},s.parseNewArguments=function(t){if(this.eat(h.parenL)){var e=this.parseExprList(h.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]},s.parseTemplateElement=function(t){var e=this.startNode();return null===this.state.value&&(t?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(h.backQuote),this.finishNode(e,"TemplateElement")},s.parseTemplate=function(t){var e=this.startNode();this.next(),e.expressions=[];var s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(h.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(h.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")},s.parseObj=function(t,e){var s=[],i=Object.create(null),r=!0,a=this.startNode();a.properties=[],this.next();for(var n=null;!this.eat(h.braceR);){if(r)r=!1;else if(this.expect(h.comma),this.eat(h.braceR))break;if(this.match(h.at))if(this.hasPlugin("decorators"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(h.at);)s.push(this.parseDecorator());var o=this.startNode(),u=!1,p=!1,c=void 0,l=void 0;if(s.length&&(o.decorators=s,s=[]),this.match(h.ellipsis)){if(o=this.parseSpread(t?{start:0}:void 0),t&&this.toAssignable(o,!0,"object pattern"),a.properties.push(o),!t)continue;var d=this.state.start;if(null!==n)this.unexpected(n,"Cannot have multiple rest elements when destructuring");else{if(this.eat(h.braceR))break;if(!this.match(h.comma)||this.lookahead().type!==h.braceR){n=d;continue}this.unexpected(d,"A trailing comma is not permitted after the rest element")}}o.method=!1,(t||e)&&(c=this.state.start,l=this.state.startLoc),t||(u=this.eat(h.star));var f=this.state.containsEsc;if(!t&&this.isContextual("async")){u&&this.unexpected();var m=this.parseIdentifier();this.match(h.colon)||this.match(h.parenL)||this.match(h.braceR)||this.match(h.eq)||this.match(h.comma)?(o.key=m,o.computed=!1):(p=!0,u=this.eat(h.star),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,l,u,p,t,e,f),this.checkPropClash(o,i),o.shorthand&&this.addExtra(o,"shorthand",!0),a.properties.push(o)}return null!==n&&this.unexpected(n,"The rest element has to be the last element when destructuring"),s.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(a,t?"ObjectPattern":"ObjectExpression")},s.isGetterOrSetterMethod=function(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(h.string)||this.match(h.num)||this.match(h.bracketL)||this.match(h.name)||!!this.state.type.keyword)},s.checkGetterSetterParams=function(t){var e="get"===t.kind?0:1,s=t.start;t.params.length!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&"RestElement"===t.params[0].type&&this.raise(s,"setter function argument must not be a rest parameter")},s.parseObjectMethod=function(t,e,s,i,r){return s||e||this.match(h.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,"ObjectMethod")):!r&&this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):void 0},s.parseObjectProperty=function(t,e,s,i,r){return t.shorthand=!1,this.eat(h.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,r),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(h.eq)&&r?(r.start||(r.start=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))},s.parseObjPropValue=function(t,e,s,i,r,a,n,o){var h=this.parseObjectMethod(t,i,r,a,o)||this.parseObjectProperty(t,e,s,a,n);return h||this.unexpected(),h},s.parsePropertyName=function(t){if(this.eat(h.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(h.bracketR);else{var e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(h.num)||this.match(h.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=e}return t.key},s.initFunction=function(t,e){t.id=null,t.generator=!1,t.async=!!e},s.parseMethod=function(t,e,s,i,r){var a=this.state.inFunction,n=this.state.inMethod,o=this.state.inAsync,h=this.state.inGenerator;this.state.inFunction=!0,this.state.inMethod=t.kind||!0,this.state.inAsync=s,this.state.inGenerator=e,this.initFunction(t,s),t.generator=!!e;var u=i;return this.parseFunctionParams(t,u),this.parseFunctionBodyAndFinish(t,r),this.state.inFunction=a,this.state.inMethod=n,this.state.inAsync=o,this.state.inGenerator=h,t},s.parseArrowExpression=function(t,e,s){var i=this.state.yieldOrAwaitInPossibleArrowParameters;i&&("YieldExpression"===i.type?this.raise(i.start,"yield is not allowed in the parameters of an arrow function inside a generator"):this.raise(i.start,"await is not allowed in the parameters of an arrow function inside an async function"));var r=this.state.inFunction;this.state.inFunction=!0,this.initFunction(t,s),e&&this.setArrowFunctionParameters(t,e);var a=this.state.inAsync,n=this.state.inGenerator,o=this.state.maybeInArrowParameters;return this.state.inAsync=s,this.state.inGenerator=!1,this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.state.inAsync=a,this.state.inGenerator=n,this.state.inFunction=r,this.state.maybeInArrowParameters=o,this.finishNode(t,"ArrowFunctionExpression")},s.setArrowFunctionParameters=function(t,e){t.params=this.toAssignableList(e,!0,"arrow function parameters")},s.isStrictBody=function(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(var e=0,s=t.body.directives;e<s.length;e++){if("use strict"===s[e].value.value)return!0}return!1},s.parseFunctionBodyAndFinish=function(t,e,s){this.parseFunctionBody(t,s),this.finishNode(t,e)},s.parseFunctionBody=function(t,e){var s=e&&!this.match(h.braceL),i=this.state.inParameters;if(this.state.inParameters=!1,s)t.body=this.parseMaybeAssign();else{var r=this.state.inGenerator,a=this.state.inFunction,n=this.state.labels;this.state.inGenerator=t.generator,this.state.inFunction=!0,this.state.labels=[],t.body=this.parseBlock(!0),this.state.inFunction=a,this.state.inGenerator=r,this.state.labels=n}this.checkFunctionNameAndParams(t,e),this.state.inParameters=i},s.checkFunctionNameAndParams=function(t,e){var s=this.isStrictBody(t),i=this.state.strict||s||e,r=this.state.strict;if(s&&(this.state.strict=s),i){var a=Object.create(null);t.id&&this.checkLVal(t.id,!0,void 0,"function name");for(var n=0,o=t.params;n<o.length;n++){var h=o[n];s&&"Identifier"!==h.type&&this.raise(h.start,"Non-simple parameter in strict mode"),this.checkLVal(h,!0,a,"function parameter list")}}this.state.strict=r},s.parseExprList=function(t,e,s){for(var i=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(h.comma),this.eat(t))break;i.push(this.parseExprListItem(e,s))}return i},s.parseExprListItem=function(t,e,s,i){var r;if(t&&this.match(h.comma))r=null;else if(this.match(h.ellipsis)){var a=this.state.start,n=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e,s),a,n),i&&this.match(h.comma)&&(i.start=this.state.start)}else r=this.parseMaybeAssign(!1,e,this.parseParenItem,s);return r},s.parseIdentifier=function(t){var e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)},s.createIdentifier=function(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")},s.parseIdentifierName=function(t,e){var s;if(e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(h.name))s=this.state.value;else{if(!this.state.type.keyword)throw this.unexpected();"class"!==(s=this.state.type.keyword)&&"function"!==s||this.state.lastTokEnd===this.state.lastTokStart+1&&46===this.input.charCodeAt(this.state.lastTokStart)||this.state.context.pop()}return!e&&"await"===s&&this.state.inAsync&&this.raise(t,"invalid use of await inside of an async function"),this.next(),s},s.checkReservedWord=function(t,e,s,i){this.state.strict&&(v.strict(t)||i&&v.strictBind(t))&&this.raise(e,t+" is a reserved word in strict mode"),this.state.inGenerator&&"yield"===t&&this.raise(e,"yield is a reserved word inside generator functions"),this.state.inClassProperty&&"arguments"===t&&this.raise(e,"'arguments' is not allowed in class field initializer"),(this.isReservedWord(t)||s&&this.isKeyword(t))&&this.raise(e,t+" is a reserved word")},s.parseAwait=function(t){return this.state.inAsync||!this.state.inFunction&&this.options.allowAwaitOutsideFunction||this.unexpected(),this.state.inParameters&&this.raise(t.start,"await is not allowed in async function parameters"),this.match(h.star)&&this.raise(t.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),this.state.maybeInArrowParameters&&!this.state.yieldOrAwaitInPossibleArrowParameters&&(this.state.yieldOrAwaitInPossibleArrowParameters=t),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")},s.parseYield=function(){var t=this.startNode();return this.state.inParameters&&this.raise(t.start,"yield is not allowed in generator parameters"),this.state.maybeInArrowParameters&&!this.state.yieldOrAwaitInPossibleArrowParameters&&(this.state.yieldOrAwaitInPossibleArrowParameters=t),this.next(),this.match(h.semi)||this.canInsertSemicolon()||!this.match(h.star)&&!this.state.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(h.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")},s.checkPipelineAtInfixOperator=function(t,e){if("smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type)throw this.raise(e,"Pipeline head should not be a comma-separated sequence expression")},s.parseSmartPipelineBody=function(t,e,s){var i=this.checkSmartPipelineBodyStyle(t);return this.checkSmartPipelineBodyEarlyErrors(t,i,e),this.parseSmartPipelineBodyInStyle(t,i,e,s)},s.checkSmartPipelineBodyEarlyErrors=function(t,e,s){if(this.match(h.arrow))throw this.raise(this.state.start,'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized');if("PipelineTopicExpression"===e&&"SequenceExpression"===t.type)throw this.raise(s,"Pipeline body may not be a comma-separated sequence expression")},s.parseSmartPipelineBodyInStyle=function(t,e,s,i){var r=this.startNodeAt(s,i);switch(e){case"PipelineBareFunction":r.callee=t;break;case"PipelineBareConstructor":r.callee=t.callee;break;case"PipelineBareAwaitedFunction":r.callee=t.argument;break;case"PipelineTopicExpression":if(!this.topicReferenceWasUsedInCurrentTopicContext())throw this.raise(s,"Pipeline is in topic style but does not use topic reference");r.expression=t;break;default:throw this.raise(s,"Unknown pipeline style "+e)}return this.finishNode(r,e)},s.checkSmartPipelineBodyStyle=function(t){return t.type,this.isSimpleReference(t)?"PipelineBareFunction":"PipelineTopicExpression"},s.isSimpleReference=function(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}},s.withTopicPermittingContext=function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}},s.withTopicForbiddingContext=function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}},s.registerTopicReference=function(){this.state.topicContext.maxTopicIndex=0},s.primaryTopicReferenceIsAllowedInCurrentTopicContext=function(){return this.state.topicContext.maxNumOfResolvableTopics>=1},s.topicReferenceWasUsedInCurrentTopicContext=function(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.toAssignable=function(t,e,s){if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var i=0;i<t.properties.length;i++){var r=t.properties[i],a=i===t.properties.length-1;this.toAssignableObjectExpressionProp(r,e,a)}break;case"ObjectProperty":this.toAssignable(t.value,e,s);break;case"SpreadElement":this.checkToRestConversion(t),t.type="RestElement";var n=t.argument;this.toAssignable(n,e,s);break;case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e,s);break;case"AssignmentExpression":"="===t.operator?(t.type="AssignmentPattern",delete t.operator):this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!e)break;default:var o="Invalid left-hand side"+(s?" in "+s:"expression");this.raise(t.start,o)}return t},s.toAssignableObjectExpressionProp=function(t,e,s){if("ObjectMethod"===t.type){var i="get"===t.kind||"set"===t.kind?"Object pattern can't contain getter or setter":"Object pattern can't contain methods";this.raise(t.key.start,i)}else"SpreadElement"!==t.type||s?this.toAssignable(t,e,"object destructuring pattern"):this.raise(t.start,"The rest element has to be the last element when destructuring")},s.toAssignableList=function(t,e,s){var i=t.length;if(i){var r=t[i-1];if(r&&"RestElement"===r.type)--i;else if(r&&"SpreadElement"===r.type){r.type="RestElement";var a=r.argument;this.toAssignable(a,e,s),-1===["Identifier","MemberExpression","ArrayPattern","ObjectPattern"].indexOf(a.type)&&this.unexpected(a.start),--i}}for(var n=0;n<i;n++){var o=t[n];o&&"SpreadElement"===o.type&&this.raise(o.start,"The rest element has to be the last element when destructuring"),o&&this.toAssignable(o,e,s)}return t},s.toReferencedList=function(t,e){return t},s.toReferencedListDeep=function(t,e){this.toReferencedList(t,e);for(var s=0;s<t.length;s++){var i=t[s];i&&"ArrayExpression"===i.type&&this.toReferencedListDeep(i.elements)}return t},s.parseSpread=function(t,e){var s=this.startNode();return this.next(),s.argument=this.parseMaybeAssign(!1,t,void 0,e),this.finishNode(s,"SpreadElement")},s.parseRest=function(){var t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},s.shouldAllowYieldIdentifier=function(){return this.match(h._yield)&&!this.state.strict&&!this.state.inGenerator},s.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},s.parseBindingAtom=function(){switch(this.state.type){case h._yield:case h.name:return this.parseBindingIdentifier();case h.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(h.bracketR,!0),this.finishNode(t,"ArrayPattern");case h.braceL:return this.parseObj(!0);default:throw this.unexpected()}},s.parseBindingList=function(t,e,s){for(var i=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(h.comma),e&&this.match(h.comma))i.push(null);else{if(this.eat(t))break;if(this.match(h.ellipsis)){if(i.push(this.parseAssignableListItemTypes(this.parseRest())),this.state.inFunction&&this.state.inParameters&&this.match(h.comma)){var a=this.lookahead().type===h.parenR?"A trailing comma is not permitted after the rest element":"Rest parameter must be last formal parameter";this.raise(this.state.start,a)}else this.expect(t);break}var n=[];for(this.match(h.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators cannot be used to decorate parameters");this.match(h.at);)n.push(this.parseDecorator());i.push(this.parseAssignableListItem(s,n))}return i},s.parseAssignableListItem=function(t,e){var s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);var i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i},s.parseAssignableListItemTypes=function(t){return t},s.parseMaybeDefault=function(t,e,s){if(e=e||this.state.startLoc,t=t||this.state.start,s=s||this.parseBindingAtom(),!this.eat(h.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},s.checkLVal=function(t,e,s,i){switch(t.type){case"Identifier":if(this.checkReservedWord(t.name,t.start,!1,!0),s){var r="_"+t.name;s[r]?this.raise(t.start,"Argument name clash in strict mode"):s[r]=!0}break;case"MemberExpression":e&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(var a=0,n=t.properties;a<n.length;a++){var o=n[a];"ObjectProperty"===o.type&&(o=o.value),this.checkLVal(o,e,s,"object destructuring pattern")}break;case"ArrayPattern":for(var h=0,u=t.elements;h<u.length;h++){var p=u[h];p&&this.checkLVal(p,e,s,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;default:var c=(e?"Binding invalid":"Invalid")+" left-hand side"+(i?" in "+i:"expression");this.raise(t.start,c)}},s.checkToRestConversion=function(t){-1===["Identifier","MemberExpression"].indexOf(t.argument.type)&&this.raise(t.argument.start,"Invalid rest operator's argument")},e}(function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.startNode=function(){return new $(this,this.state.start,this.state.startLoc)},s.startNodeAt=function(t,e){return new $(this,t,e)},s.startNodeAtNode=function(t){return this.startNodeAt(t.start,t.loc.start)},s.finishNode=function(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)},s.finishNodeAt=function(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.processComment(t),t},s.resetStartLocationFromNode=function(t,e){t.start=e.start,t.loc.start=e.loc.start,this.options.ranges&&(t.range[0]=e.range[0])},e}(z)))));function st(t){if(null==t)throw new Error("Unexpected "+t+" value.");return t}function it(t){if(!t)throw new Error("Assert fail")}function rt(t,e){return t.some(function(t){return Array.isArray(t)?t[0]===e:t===e})}function at(t,e,s){var i=t.find(function(t){return Array.isArray(t)?t[0]===e:t===e});return i&&Array.isArray(i)?i[1][s]:null}var nt=["minimal","smart"];var ot=["estree","jsx","flow","typescript"],ht={estree:function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.estreeParseRegExpLiteral=function(t){var e=t.pattern,s=t.flags,i=null;try{i=new RegExp(e,s)}catch(t){}var r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r},s.estreeParseLiteral=function(t){return this.parseLiteral(t,"Literal")},s.directiveToStmt=function(t){var e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)},s.initFunction=function(e,s){t.prototype.initFunction.call(this,e,s),e.expression=!1},s.checkDeclaration=function(e){p(e)?this.checkDeclaration(e.value):t.prototype.checkDeclaration.call(this,e)},s.checkGetterSetterParams=function(t){var e=t,s="get"===e.kind?0:1,i=e.start;e.value.params.length!==s&&("get"===e.kind?this.raise(i,"getter must not have any formal parameters"):this.raise(i,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raise(i,"setter function argument must not be a rest parameter")},s.checkLVal=function(e,s,i,r){var a=this;switch(e.type){case"ObjectPattern":e.properties.forEach(function(t){a.checkLVal("Property"===t.type?t.value:t,s,i,"object destructuring pattern")});break;default:t.prototype.checkLVal.call(this,e,s,i,r)}},s.checkPropClash=function(t,e){if(!t.computed&&p(t)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.proto&&this.raise(s.start,"Redefinition of __proto__ property"),e.proto=!0)}},s.isStrictBody=function(t){if("BlockStatement"===t.body.type&&t.body.body.length>0)for(var e=0,s=t.body.body;e<s.length;e++){var i=s[e];if("ExpressionStatement"!==i.type||"Literal"!==i.expression.type)break;if("use strict"===i.expression.value)return!0}return!1},s.isValidDirective=function(t){return!("ExpressionStatement"!==t.type||"Literal"!==t.expression.type||"string"!=typeof t.expression.value||t.expression.extra&&t.expression.extra.parenthesized)},s.stmtToDirective=function(e){var s=t.prototype.stmtToDirective.call(this,e),i=e.expression.value;return s.value.value=i,s},s.parseBlockBody=function(e,s,i,r){var a=this;t.prototype.parseBlockBody.call(this,e,s,i,r);var n=e.directives.map(function(t){return a.directiveToStmt(t)});e.body=n.concat(e.body),delete e.directives},s.pushClassMethod=function(t,e,s,i,r){this.parseMethod(e,s,i,r,"MethodDefinition"),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)},s.parseExprAtom=function(e){switch(this.state.type){case h.regexp:return this.estreeParseRegExpLiteral(this.state.value);case h.num:case h.string:return this.estreeParseLiteral(this.state.value);case h._null:return this.estreeParseLiteral(null);case h._true:return this.estreeParseLiteral(!0);case h._false:return this.estreeParseLiteral(!1);default:return t.prototype.parseExprAtom.call(this,e)}},s.parseLiteral=function(e,s,i,r){var a=t.prototype.parseLiteral.call(this,e,s,i,r);return a.raw=a.extra.raw,delete a.extra,a},s.parseFunctionBody=function(e,s){t.prototype.parseFunctionBody.call(this,e,s),e.expression="BlockStatement"!==e.body.type},s.parseMethod=function(e,s,i,r,a){var n=this.startNode();return n.kind=e.kind,delete(n=t.prototype.parseMethod.call(this,n,s,i,r,"FunctionExpression")).kind,e.value=n,this.finishNode(e,a)},s.parseObjectMethod=function(e,s,i,r,a){var n=t.prototype.parseObjectMethod.call(this,e,s,i,r,a);return n&&(n.type="Property","method"===n.kind&&(n.kind="init"),n.shorthand=!1),n},s.parseObjectProperty=function(e,s,i,r,a){var n=t.prototype.parseObjectProperty.call(this,e,s,i,r,a);return n&&(n.kind="init",n.type="Property"),n},s.toAssignable=function(e,s,i){return p(e)?(this.toAssignable(e.value,s,i),e):t.prototype.toAssignable.call(this,e,s,i)},s.toAssignableObjectExpressionProp=function(e,s,i){"get"===e.kind||"set"===e.kind?this.raise(e.key.start,"Object pattern can't contain getter or setter"):e.method?this.raise(e.key.start,"Object pattern can't contain methods"):t.prototype.toAssignableObjectExpressionProp.call(this,e,s,i)},e}(t)},jsx:function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.jsxReadToken=function(){for(var t="",e=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(h.jsxTagStart)):this.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(h.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:d(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}},s.jsxReadNewLine=function(t){var e,s=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===s&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,e},s.jsxReadString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):d(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(h.string,e)},s.jsxReadEntity=function(){for(var t,e="",s=0,i=this.input[this.state.pos],r=++this.state.pos;this.state.pos<this.input.length&&s++<10;){if(";"===(i=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),R.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),B.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=M[e];break}e+=i}return t||(this.state.pos=r,"&")},s.jsxReadWord=function(){var t,e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(k(t)||45===t);return this.finishToken(h.jsxName,this.input.slice(e,this.state.pos))},s.jsxParseIdentifier=function(){var t=this.startNode();return this.match(h.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")},s.jsxParseNamespacedName=function(){var t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(h.colon))return s;var i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")},s.jsxParseElementName=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.jsxParseNamespacedName();this.eat(h.dot);){var i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s},s.jsxParseAttributeValue=function(){var t;switch(this.state.type){case h.braceL:if("JSXEmptyExpression"===(t=this.jsxParseExpressionContainer()).expression.type)throw this.raise(t.start,"JSX attributes must only be assigned a non-empty expression");return t;case h.jsxTagStart:case h.string:return this.parseExprAtom();default:throw this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},s.jsxParseEmptyExpression=function(){var t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)},s.jsxParseSpreadChild=function(){var t=this.startNode();return this.expect(h.braceL),this.expect(h.ellipsis),t.expression=this.parseExpression(),this.expect(h.braceR),this.finishNode(t,"JSXSpreadChild")},s.jsxParseExpressionContainer=function(){var t=this.startNode();return this.next(),this.match(h.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(h.braceR),this.finishNode(t,"JSXExpressionContainer")},s.jsxParseAttribute=function(){var t=this.startNode();return this.eat(h.braceL)?(this.expect(h.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(h.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(h.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))},s.jsxParseOpeningElementAt=function(t,e){var s=this.startNodeAt(t,e);return this.match(h.jsxTagEnd)?(this.expect(h.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))},s.jsxParseOpeningElementAfterName=function(t){for(var e=[];!this.match(h.slash)&&!this.match(h.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(h.slash),this.expect(h.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")},s.jsxParseClosingElementAt=function(t,e){var s=this.startNodeAt(t,e);return this.match(h.jsxTagEnd)?(this.expect(h.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(h.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))},s.jsxParseElementAt=function(t,e){var s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e),a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case h.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(h.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case h.jsxText:i.push(this.parseExprAtom());break;case h.braceL:this.lookahead().type===h.ellipsis?i.push(this.jsxParseSpreadChild()):i.push(this.jsxParseExpressionContainer());break;default:throw this.unexpected()}_(r)&&!_(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <>"):!_(r)&&_(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+j(r.name)+">"):_(r)||_(a)||j(a.name)!==j(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+j(r.name)+">")}return _(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.match(h.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"),_(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")},s.jsxParseElement=function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)},s.parseExprAtom=function(e){return this.match(h.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(h.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.state.input.charCodeAt(this.state.pos)?(this.finishToken(h.jsxTagStart),this.jsxParseElement()):t.prototype.parseExprAtom.call(this,e)},s.readToken=function(e){if(this.state.inPropertyName)return t.prototype.readToken.call(this,e);var s=this.curContext();if(s===D.j_expr)return this.jsxReadToken();if(s===D.j_oTag||s===D.j_cTag){if(N(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(h.jsxTagEnd);if((34===e||39===e)&&s===D.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed&&33!==this.state.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(h.jsxTagStart)):t.prototype.readToken.call(this,e)},s.updateContext=function(e){if(this.match(h.braceL)){var s=this.curContext();s===D.j_oTag?this.state.context.push(D.braceExpression):s===D.j_expr?this.state.context.push(D.templateQuasi):t.prototype.updateContext.call(this,e),this.state.exprAllowed=!0}else{if(!this.match(h.slash)||e!==h.jsxTagStart)return t.prototype.updateContext.call(this,e);this.state.context.length-=2,this.state.context.push(D.j_cTag),this.state.exprAllowed=!1}},e}(t)},flow:function(t){return function(t){function e(e,s){var i;return(i=t.call(this,e,s)||this).flowPragma=void 0,i}i(e,t);var s=e.prototype;return s.shouldParseTypes=function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma},s.addComment=function(e){if(void 0===this.flowPragma){var s=O.exec(e.value);if(s)if("flow"===s[1])this.flowPragma="flow";else{if("noflow"!==s[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else this.flowPragma=null}return t.prototype.addComment.call(this,e)},s.flowParseTypeInitialiser=function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||h.colon);var s=this.flowParseType();return this.state.inType=e,s},s.flowParsePredicate=function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(h.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(h.parenL)?(t.value=this.parseExpression(),this.expect(h.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")},s.flowParseTypeAndPredicateInitialiser=function(){var t=this.state.inType;this.state.inType=!0,this.expect(h.colon);var e=null,s=null;return this.match(h.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(h.modulo)&&(s=this.flowParsePredicate())),[e,s]},s.flowParseDeclareClass=function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")},s.flowParseDeclareFunction=function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(h.parenL);var r=this.flowParseFunctionTypeParams();s.params=r.params,s.rest=r.rest,this.expect(h.parenR);var a=this.flowParseTypeAndPredicateInitialiser();return s.returnType=a[0],t.predicate=a[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.finishNode(e,e.type),this.semicolon(),this.finishNode(t,"DeclareFunction")},s.flowParseDeclare=function(t,e){if(this.match(h._class))return this.flowParseDeclareClass(t);if(this.match(h._function))return this.flowParseDeclareFunction(t);if(this.match(h._var))return this.flowParseDeclareVariable(t);if(this.isContextual("module"))return this.lookahead().type===h.dot?this.flowParseDeclareModuleExports(t):(e&&this.unexpected(null,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(h._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()},s.flowParseDeclareVariable=function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.semicolon(),this.finishNode(t,"DeclareVariable")},s.flowParseDeclareModule=function(t){var e=this;this.next(),this.match(h.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(h.braceL);!this.match(h.braceR);){var r=this.startNode();if(this.match(h._import)){var a=this.lookahead();"type"!==a.value&&"typeof"!==a.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.next(),this.parseImport(r)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),r=this.flowParseDeclare(r,!0);i.push(r)}this.expect(h.braceR),this.finishNode(s,"BlockStatement");var n=null,o=!1,u="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return i.forEach(function(t){!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(o&&e.unexpected(t.start,"Duplicate `declare module.exports` statement"),"ES"===n&&e.unexpected(t.start,u),n="CommonJS",o=!0):("CommonJS"===n&&e.unexpected(t.start,u),n="ES")}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")},s.flowParseDeclareExportDeclaration=function(t,e){if(this.expect(h._export),this.eat(h._default))return this.match(h._function)||this.match(h._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(h._const)||this.match(h._let)||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=L[s];this.unexpected(this.state.start,"`declare export "+s+"` is not supported. Use `"+i+"` instead")}if(this.match(h._var)||this.match(h._function)||this.match(h._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(h.star)||this.match(h.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()},s.flowParseDeclareModuleExports=function(t){return this.expectContextual("module"),this.expect(h.dot),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")},s.flowParseDeclareTypeAlias=function(t){return this.next(),this.flowParseTypeAlias(t),this.finishNode(t,"DeclareTypeAlias")},s.flowParseDeclareOpaqueType=function(t){return this.next(),this.flowParseOpaqueType(t,!0),this.finishNode(t,"DeclareOpaqueType")},s.flowParseDeclareInterface=function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")},s.flowParseInterfaceish=function(t,e){if(void 0===e&&(e=!1),t.id=this.flowParseRestrictedIdentifier(!e),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(h._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(h.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})},s.flowParseInterfaceExtends=function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")},s.flowParseInterface=function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")},s.checkNotUnderscore=function(t){if("_"===t)throw this.unexpected(null,"`_` is only allowed as a type argument to call or new")},s.checkReservedType=function(t,e){F.indexOf(t)>-1&&this.raise(e,"Cannot overwrite reserved type "+t)},s.flowParseRestrictedIdentifier=function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)},s.flowParseTypeAlias=function(t){return t.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(h.eq),this.semicolon(),this.finishNode(t,"TypeAlias")},s.flowParseOpaqueType=function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(h.colon)&&(t.supertype=this.flowParseTypeInitialiser(h.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(h.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")},s.flowParseTypeParameter=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!1),!t&&e)throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).");var s=this.state.start,i=this.startNode(),r=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return i.name=a.name,i.variance=r,i.bound=a.typeAnnotation,this.match(h.eq)?t?(this.eat(h.eq),i.default=this.flowParseType()):this.unexpected():e&&this.unexpected(s,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(i,"TypeParameter")},s.flowParseTypeParameterDeclaration=function(t){void 0===t&&(t=!0);var e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.isRelational("<")||this.match(h.jsxTagStart)?this.next():this.unexpected();var i=!1;do{var r=this.flowParseTypeParameter(t,i);s.params.push(r),r.default&&(i=!0),this.isRelational(">")||this.expect(h.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")},s.flowParseTypeParameterInstantiation=function(){var t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");var s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(h.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},s.flowParseTypeParameterInstantiationCallOrNew=function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(h.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")},s.flowParseInterfaceType=function(){var t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(h._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(h.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")},s.flowParseObjectPropertyKey=function(){return this.match(h.num)||this.match(h.string)?this.parseExprAtom():this.parseIdentifier(!0)},s.flowParseObjectTypeIndexer=function(t,e,s){return t.static=e,this.lookahead().type===h.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(h.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")},s.flowParseObjectTypeInternalSlot=function(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(h.bracketR),this.expect(h.bracketR),this.isRelational("<")||this.match(h.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(h.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")},s.flowParseObjectTypeMethodish=function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration(!1)),this.expect(h.parenL);!this.match(h.parenR)&&!this.match(h.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(h.parenR)||this.expect(h.comma);return this.eat(h.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(h.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")},s.flowParseObjectTypeCallProperty=function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")},s.flowParseObjectType=function(t){var e=t.allowStatic,s=t.allowExact,i=t.allowSpread,r=t.allowProto,a=t.allowInexact,n=this.state.inType;this.state.inType=!0;var o,u,p=this.startNode();p.callProperties=[],p.properties=[],p.indexers=[],p.internalSlots=[];var c=!1;for(s&&this.match(h.braceBarL)?(this.expect(h.braceBarL),o=h.braceBarR,u=!0):(this.expect(h.braceL),o=h.braceR,u=!1),p.exact=u;!this.match(o);){var l=!1,d=null,f=this.startNode();if(r&&this.isContextual("proto")){var m=this.lookahead();m.type!==h.colon&&m.type!==h.question&&(this.next(),d=this.state.start,e=!1)}if(e&&this.isContextual("static")){var y=this.lookahead();y.type!==h.colon&&y.type!==h.question&&(this.next(),l=!0)}var D=this.flowParseVariance();if(this.eat(h.bracketL))null!=d&&this.unexpected(d),this.eat(h.bracketL)?(D&&this.unexpected(D.start),p.internalSlots.push(this.flowParseObjectTypeInternalSlot(f,l))):p.indexers.push(this.flowParseObjectTypeIndexer(f,l,D));else if(this.match(h.parenL)||this.isRelational("<"))null!=d&&this.unexpected(d),D&&this.unexpected(D.start),p.callProperties.push(this.flowParseObjectTypeCallProperty(f,l));else{var x="init";if(this.isContextual("get")||this.isContextual("set")){var v=this.lookahead();v.type!==h.name&&v.type!==h.string&&v.type!==h.num||(x=this.state.value,this.next())}var P=this.flowParseObjectTypeProperty(f,l,d,D,x,i,a);null===P?c=!0:p.properties.push(P)}this.flowObjectTypeSemicolon()}this.expect(o),i&&(p.inexact=c);var g=this.finishNode(p,"ObjectTypeAnnotation");return this.state.inType=n,g},s.flowParseObjectTypeProperty=function(t,e,s,i,r,a,n){if(this.match(h.ellipsis)){a||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),null!=s&&this.unexpected(s),i&&this.unexpected(i.start,"Spread properties cannot have variance"),this.expect(h.ellipsis);var o=this.eat(h.comma)||this.eat(h.semi);if(this.match(h.braceR)){if(n)return null;this.unexpected(null,"Explicit inexact syntax is only allowed inside inexact objects")}return this.match(h.braceBarR)&&this.unexpected(null,"Explicit inexact syntax cannot appear inside an explicit exact object type"),o&&this.unexpected(null,"Explicit inexact syntax must appear at the end of an inexact object"),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty")}t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=r;var u=!1;return this.isRelational("<")||this.match(h.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(t)):("init"!==r&&this.unexpected(),t.method=!1,this.eat(h.question)&&(u=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=u,this.finishNode(t,"ObjectTypeProperty")},s.flowCheckGetterSetterParams=function(t){var e="get"===t.kind?0:1,s=t.start;t.value.params.length+(t.value.rest?1:0)!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&t.value.rest&&this.raise(s,"setter function argument must not be a rest parameter")},s.flowObjectTypeSemicolon=function(){this.eat(h.semi)||this.eat(h.comma)||this.match(h.braceR)||this.match(h.braceBarR)||this.unexpected()},s.flowParseQualifiedTypeIdentifier=function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(h.dot);){var r=this.startNodeAt(t,e);r.qualification=i,r.id=this.parseIdentifier(),i=this.finishNode(r,"QualifiedTypeIdentifier")}return i},s.flowParseGenericType=function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")},s.flowParseTypeofType=function(){var t=this.startNode();return this.expect(h._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")},s.flowParseTupleType=function(){var t=this.startNode();for(t.types=[],this.expect(h.bracketL);this.state.pos<this.input.length&&!this.match(h.bracketR)&&(t.types.push(this.flowParseType()),!this.match(h.bracketR));)this.expect(h.comma);return this.expect(h.bracketR),this.finishNode(t,"TupleTypeAnnotation")},s.flowParseFunctionTypeParam=function(){var t=null,e=!1,s=null,i=this.startNode(),r=this.lookahead();return r.type===h.colon||r.type===h.question?(t=this.parseIdentifier(),this.eat(h.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=t,i.optional=e,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")},s.reinterpretTypeAsFunctionTypeParam=function(t){var e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")},s.flowParseFunctionTypeParams=function(t){void 0===t&&(t=[]);for(var e=null;!this.match(h.parenR)&&!this.match(h.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(h.parenR)||this.expect(h.comma);return this.eat(h.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}},s.flowIdentToTypeAnnotation=function(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"void":return this.finishNode(s,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}},s.flowParsePrimaryType=function(){var t,e,s=this.state.start,i=this.state.startLoc,r=this.startNode(),a=!1,n=this.state.noAnonFunctionType;switch(this.state.type){case h.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(s,i,r,this.parseIdentifier());case h.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case h.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case h.bracketL:return this.flowParseTupleType();case h.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(!1),this.expect(h.parenL),t=this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(h.parenR),this.expect(h.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case h.parenL:if(this.next(),!this.match(h.parenR)&&!this.match(h.ellipsis))if(this.match(h.name)){var o=this.lookahead().type;a=o!==h.question&&o!==h.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,e=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(h.comma)||this.match(h.parenR)&&this.lookahead().type===h.arrow))return this.expect(h.parenR),e;this.eat(h.comma)}return t=e?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(e)]):this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(h.parenR),this.expect(h.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case h.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case h._true:case h._false:return r.value=this.match(h._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case h.plusMin:if("-"===this.state.value)return this.next(),this.match(h.num)||this.unexpected(null,'Unexpected token, expected "number"'),this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case h.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case h._null:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case h._this:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case h.star:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}throw this.unexpected()},s.flowParsePostfixType=function(){for(var t=this.state.start,e=this.state.startLoc,s=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(h.bracketL);){var i=this.startNodeAt(t,e);i.elementType=s,this.expect(h.bracketL),this.expect(h.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s},s.flowParsePrefixType=function(){var t=this.startNode();return this.eat(h.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()},s.flowParseAnonFunctionWithoutParens=function(){var t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(h.arrow)){var e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t},s.flowParseIntersectionType=function(){var t=this.startNode();this.eat(h.bitwiseAND);var e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(h.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")},s.flowParseUnionType=function(){var t=this.startNode();this.eat(h.bitwiseOR);var e=this.flowParseIntersectionType();for(t.types=[e];this.eat(h.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")},s.flowParseType=function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e},s.flowParseTypeOrImplicitInstantiation=function(){if(this.state.type===h.name&&"_"===this.state.value){var t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()},s.flowParseTypeAnnotation=function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")},s.flowParseTypeAnnotatableIdentifier=function(t){var e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(h.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},s.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},s.flowParseVariance=function(){var t=null;return this.match(h.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t},s.parseFunctionBody=function(e,s){var i=this;return s?this.forwardNoArrowParamsConversionAt(e,function(){return t.prototype.parseFunctionBody.call(i,e,!0)}):t.prototype.parseFunctionBody.call(this,e,!1)},s.parseFunctionBodyAndFinish=function(e,s,i){if(!i&&this.match(h.colon)){var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},s.parseStatement=function(e,s){if(this.state.strict&&this.match(h.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}var r=t.prototype.parseStatement.call(this,e,s);return void 0!==this.flowPragma||this.isValidDirective(r)||(this.flowPragma=null),r},s.parseExpressionStatement=function(e,s){if("Identifier"===s.type)if("declare"===s.name){if(this.match(h._class)||this.match(h.name)||this.match(h._function)||this.match(h._var)||this.match(h._export))return this.flowParseDeclare(e)}else if(this.match(h.name)){if("interface"===s.name)return this.flowParseInterface(e);if("type"===s.name)return this.flowParseTypeAlias(e);if("opaque"===s.name)return this.flowParseOpaqueType(e,!1)}return t.prototype.parseExpressionStatement.call(this,e,s)},s.shouldParseExportDeclaration=function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||t.prototype.shouldParseExportDeclaration.call(this)},s.isExportDefaultSpecifier=function(){return(!this.match(h.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!=this.state.value)&&t.prototype.isExportDefaultSpecifier.call(this)},s.parseConditional=function(e,s,i,r,a){var n=this;if(!this.match(h.question))return e;if(a){var o=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(t instanceof SyntaxError)return this.state=o,a.start=t.pos||this.state.start,e;throw t}}this.expect(h.question);var u=this.state.clone(),p=this.state.noArrowAt,c=this.startNodeAt(i,r),l=this.tryParseConditionalConsequent(),d=l.consequent,f=l.failed,m=this.getArrowLikeExpressions(d),y=m[0],D=m[1];if(f||D.length>0){var x=p.concat();if(D.length>0){this.state=u,this.state.noArrowAt=x;for(var v=0;v<D.length;v++)x.push(D[v].start);var P=this.tryParseConditionalConsequent();d=P.consequent,f=P.failed;var g=this.getArrowLikeExpressions(d);y=g[0],D=g[1]}if(f&&y.length>1&&this.raise(u.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),f&&1===y.length){this.state=u,this.state.noArrowAt=x.concat(y[0].start);var b=this.tryParseConditionalConsequent();d=b.consequent,f=b.failed}this.getArrowLikeExpressions(d,!0)}return this.state.noArrowAt=p,this.expect(h.colon),c.test=e,c.consequent=d,c.alternate=this.forwardNoArrowParamsConversionAt(c,function(){return n.parseMaybeAssign(s,void 0,void 0,void 0)}),this.finishNode(c,"ConditionalExpression")},s.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var t=this.parseMaybeAssign(),e=!this.match(h.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}},s.getArrowLikeExpressions=function(e,s){for(var i=this,r=[e],a=[];0!==r.length;){var n=r.pop();"ArrowFunctionExpression"===n.type?(n.typeParameters||!n.returnType?(this.toAssignableList(n.params,!0,"arrow function parameters"),t.prototype.checkFunctionNameAndParams.call(this,n,!0)):a.push(n),r.push(n.body)):"ConditionalExpression"===n.type&&(r.push(n.consequent),r.push(n.alternate))}if(s){for(var o=0;o<a.length;o++)this.toAssignableList(e.params,!0,"arrow function parameters");return[a,[]]}return function(t,e){for(var s=[],i=[],r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}(a,function(t){try{return i.toAssignableList(t.params,!0,"arrow function parameters"),!0}catch(t){return!1}})},s.forwardNoArrowParamsConversionAt=function(t,e){var s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s},s.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(h.question)&&(e.optional=!0),this.match(h.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e},s.assertModuleNodeAllowed=function(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||t.prototype.assertModuleNodeAllowed.call(this,e)},s.parseExport=function(e){return"ExportNamedDeclaration"!==(e=t.prototype.parseExport.call(this,e)).type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e},s.parseExportDeclaration=function(e){if(this.isContextual("type")){e.exportKind="type";var s=this.startNode();return this.next(),this.match(h.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(s)}if(this.isContextual("opaque")){e.exportKind="type";var i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}if(this.isContextual("interface")){e.exportKind="type";var r=this.startNode();return this.next(),this.flowParseInterface(r)}return t.prototype.parseExportDeclaration.call(this,e)},s.shouldParseExportStar=function(){return t.prototype.shouldParseExportStar.call(this)||this.isContextual("type")&&this.lookahead().type===h.star},s.parseExportStar=function(e){return this.eatContextual("type")&&(e.exportKind="type"),t.prototype.parseExportStar.call(this,e)},s.parseExportNamespace=function(e){return"type"===e.exportKind&&this.unexpected(),t.prototype.parseExportNamespace.call(this,e)},s.parseClassId=function(e,s,i){t.prototype.parseClassId.call(this,e,s,i),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())},s.isKeyword=function(e){return(!this.state.inType||"void"!==e)&&t.prototype.isKeyword.call(this,e)},s.readToken=function(e){var s=this.input.charCodeAt(this.state.pos+1);return!this.state.inType||62!==e&&60!==e?function(t,e){return 64===t&&64===e}(e,s)?(this.state.isIterator=!0,t.prototype.readWord.call(this)):t.prototype.readToken.call(this,e):this.finishOp(h.relational,1)},s.toAssignable=function(e,s,i){return"TypeCastExpression"===e.type?t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i):t.prototype.toAssignable.call(this,e,s,i)},s.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},s.toReferencedList=function(t,e){for(var s=0;s<t.length;s++){var i=t[s];!i||"TypeCastExpression"!==i.type||i.extra&&i.extra.parenthesized||!(t.length>1)&&e||this.raise(i.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return t},s.checkLVal=function(e,s,i,r){if("TypeCastExpression"!==e.type)return t.prototype.checkLVal.call(this,e,s,i,r)},s.parseClassProperty=function(e){return this.match(h.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassProperty.call(this,e)},s.parseClassPrivateProperty=function(e){return this.match(h.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassPrivateProperty.call(this,e)},s.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},s.isClassProperty=function(){return this.match(h.colon)||t.prototype.isClassProperty.call(this)},s.isNonstaticConstructor=function(e){return!this.match(h.colon)&&t.prototype.isNonstaticConstructor.call(this,e)},s.pushClassMethod=function(e,s,i,r,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration(!1)),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},s.pushClassPrivateMethod=function(e,s,i,r){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},s.parseClassSuper=function(e){if(t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=e.implements=[];do{var i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(h.comma))}},s.parsePropertyName=function(e){var s=this.flowParseVariance(),i=t.prototype.parsePropertyName.call(this,e);return e.variance=s,i},s.parseObjPropValue=function(e,s,i,r,a,n,o,u){var p;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(p=this.flowParseTypeParameterDeclaration(!1),this.match(h.parenL)||this.unexpected()),t.prototype.parseObjPropValue.call(this,e,s,i,r,a,n,o,u),p&&((e.value||e).typeParameters=p)},s.parseAssignableListItemTypes=function(t){if(this.eat(h.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}return this.match(h.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(t,t.type),t},s.parseMaybeDefault=function(e,s,i){var r=t.prototype.parseMaybeDefault.call(this,e,s,i);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),r},s.shouldParseDefaultImport=function(e){return S(e)?I(this.state):t.prototype.shouldParseDefaultImport.call(this,e)},s.parseImportSpecifierLocal=function(t,e,s,i){e.local=S(t)?this.flowParseRestrictedIdentifier(!0):this.parseIdentifier(),this.checkLVal(e.local,!0,void 0,i),t.specifiers.push(this.finishNode(e,s))},s.parseImportSpecifiers=function(e){e.importKind="value";var s=null;if(this.match(h._typeof)?s="typeof":this.isContextual("type")&&(s="type"),s){var i=this.lookahead();"type"===s&&i.type===h.star&&this.unexpected(i.start),(I(i)||i.type===h.braceL||i.type===h.star)&&(this.next(),e.importKind=s)}t.prototype.parseImportSpecifiers.call(this,e)},s.parseImportSpecifier=function(t){var e=this.startNode(),s=this.state.start,i=this.parseIdentifier(!0),r=null;"type"===i.name?r="type":"typeof"===i.name&&(r="typeof");var a=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){var n=this.parseIdentifier(!0);null===r||this.match(h.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=n,e.importKind=r,e.local=n.__clone())}else null!==r&&(this.match(h.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=r,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=e.imported.__clone())):(a=!0,e.imported=i,e.importKind=null,e.local=e.imported.__clone());var o=S(t),u=S(e);o&&u&&this.raise(s,"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements"),(o||u)&&this.checkReservedType(e.local.name,e.local.start),!a||o||u||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,!0,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))},s.parseFunctionParams=function(e){var s=e.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration(!1)),t.prototype.parseFunctionParams.call(this,e)},s.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e),this.match(h.colon)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e.id,e.id.type))},s.parseAsyncArrowFromCallExpression=function(e,s){if(this.match(h.colon)){var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},s.shouldParseAsyncArrow=function(){return this.match(h.colon)||t.prototype.shouldParseAsyncArrow.call(this)},s.parseMaybeAssign=function(e,s,i,r){var a=this,n=null;if(this.hasPlugin("jsx")&&(this.match(h.jsxTagStart)||this.isRelational("<"))){var o=this.state.clone();try{return t.prototype.parseMaybeAssign.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=o;var u=this.state.context.length;this.state.context[u-1]===D.j_oTag&&(this.state.context.length-=2),n=t}}if(null!=n||this.isRelational("<")){var p,c;try{c=this.flowParseTypeParameterDeclaration(),(p=this.forwardNoArrowParamsConversionAt(c,function(){return t.prototype.parseMaybeAssign.call(a,e,s,i,r)})).typeParameters=c,this.resetStartLocationFromNode(p,c)}catch(t){throw n||t}if("ArrowFunctionExpression"===p.type)return p;if(null!=n)throw n;this.raise(c.start,"Expected an arrow function after this type parameter declaration")}return t.prototype.parseMaybeAssign.call(this,e,s,i,r)},s.parseArrow=function(e){if(this.match(h.colon)){var s=this.state.clone();try{var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var r=this.startNode(),a=this.flowParseTypeAndPredicateInitialiser();r.typeAnnotation=a[0],e.predicate=a[1],this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(h.arrow)||this.unexpected(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},s.shouldParseArrow=function(){return this.match(h.colon)||t.prototype.shouldParseArrow.call(this)},s.setArrowFunctionParameters=function(e,s){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=s:t.prototype.setArrowFunctionParameters.call(this,e,s)},s.checkFunctionNameAndParams=function(e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(e.start))return t.prototype.checkFunctionNameAndParams.call(this,e,s)},s.parseParenAndDistinguishExpression=function(e){return t.prototype.parseParenAndDistinguishExpression.call(this,e&&-1===this.state.noArrowAt.indexOf(this.state.start))},s.parseSubscripts=function(e,s,i,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(s)){this.next();var a=this.startNodeAt(s,i);a.callee=e,a.arguments=this.parseCallExpressionArguments(h.parenR,!1),e=this.finishNode(a,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.isRelational("<")){var n,o=this.state.clone();try{var u=this.parseAsyncArrowWithTypeParameters(s,i);if(u)return u}catch(t){n=t}this.state=o;try{return t.prototype.parseSubscripts.call(this,e,s,i,r)}catch(t){throw n||t}}return t.prototype.parseSubscripts.call(this,e,s,i,r)},s.parseSubscript=function(e,s,i,r,a){if(this.match(h.questionDot)&&this.isLookaheadRelational("<")){if(this.expectPlugin("optionalChaining"),a.optionalChainMember=!0,r)return a.stop=!0,e;this.next();var n=this.startNodeAt(s,i);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(h.parenL),n.arguments=this.parseCallExpressionArguments(h.parenR,!1),n.optional=!0,this.finishNode(n,"OptionalCallExpression")}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){var o=this.startNodeAt(s,i);o.callee=e;var u=this.state.clone();try{return o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(h.parenL),o.arguments=this.parseCallExpressionArguments(h.parenR,!1),a.optionalChainMember?(o.optional=!1,this.finishNode(o,"OptionalCallExpression")):this.finishNode(o,"CallExpression")}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=u}}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},s.parseNewArguments=function(e){var s=null;if(this.shouldParseTypes()&&this.isRelational("<")){var i=this.state.clone();try{s=this.flowParseTypeParameterInstantiationCallOrNew()}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=i}}e.typeArguments=s,t.prototype.parseNewArguments.call(this,e)},s.parseAsyncArrowWithTypeParameters=function(t,e){var s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)},s.readToken_mult_modulo=function(e){var s=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===s&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();t.prototype.readToken_mult_modulo.call(this,e)},s.skipBlockComment=function(){return this.hasPlugin("flow")&&this.hasPlugin("flowComments")&&this.skipFlowComment()?(this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0)):this.hasPlugin("flow")&&this.state.hasFlowComment?(-1===(e=this.input.indexOf("*-/",this.state.pos+=2))&&this.raise(this.state.pos-2,"Unterminated comment"),void(this.state.pos=e+3)):void t.prototype.skipBlockComment.call(this);var e},s.skipFlowComment=function(){var t=this.input.charCodeAt(this.state.pos+2),e=this.input.charCodeAt(this.state.pos+3);return 58===t&&58===e?4:"flow-include"===this.input.slice(this.state.pos+2,14)?14:58===t&&58!==e&&2},s.hasFlowCommentCompletion=function(){-1===this.input.indexOf("*/",this.state.pos)&&this.raise(this.state.pos,"Unterminated comment")},e}(t)},typescript:function(t){return function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var s=e.prototype;return s.tsIsIdentifier=function(){return this.match(h.name)},s.tsNextTokenCanFollowModifier=function(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(h.parenL)||this.match(h.parenR)||this.match(h.colon)||this.match(h.eq)||this.match(h.question))},s.tsParseModifier=function(t){if(this.match(h.name)){var e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}},s.tsIsListTerminator=function(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(h.braceR);case"HeritageClauseElement":return this.match(h.braceL);case"TupleElementTypes":return this.match(h.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")},s.tsParseList=function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s},s.tsParseDelimitedList=function(t,e){return st(this.tsParseDelimitedListWorker(t,e,!0))},s.tsTryParseDelimitedList=function(t,e){return this.tsParseDelimitedListWorker(t,e,!1)},s.tsParseDelimitedListWorker=function(t,e,s){for(var i=[];!this.tsIsListTerminator(t);){var r=e();if(null==r)return;if(i.push(r),!this.eat(h.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(h.comma))}}return i},s.tsParseBracketedList=function(t,e,s,i){i||(s?this.expect(h.bracketL):this.expectRelational("<"));var r=this.tsParseDelimitedList(t,e);return s?this.expect(h.bracketR):this.expectRelational(">"),r},s.tsParseEntityName=function(t){for(var e=this.parseIdentifier();this.eat(h.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e},s.tsParseTypeReference=function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")},s.tsParseThisTypePredicate=function(t){this.next();var e=this.startNode();return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")},s.tsParseThisTypeNode=function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")},s.tsParseTypeQuery=function(){var t=this.startNode();return this.expect(h._typeof),t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")},s.tsParseTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(h._extends),t.default=this.tsEatThenParseType(h.eq),this.finishNode(t,"TSTypeParameter")},s.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},s.tsParseTypeParameters=function(){var t=this.startNode();return this.isRelational("<")||this.match(h.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")},s.tsFillSignature=function(t,e){var s=t===h.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(h.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))},s.tsParseBindingListForSignature=function(){var t=this;return this.parseBindingList(h.parenR).map(function(e){if("Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type)throw t.unexpected(e.start,"Name in a signature must be an Identifier or ObjectPattern, instead got "+e.type);return e})},s.tsParseTypeMemberSemicolon=function(){this.eat(h.comma)||this.semicolon()},s.tsParseSignatureMember=function(t){var e=this.startNode();return"TSConstructSignatureDeclaration"===t&&this.expect(h._new),this.tsFillSignature(h.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)},s.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(h.name)&&this.match(h.colon)},s.tsTryParseIndexSignature=function(t){if(this.match(h.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(h.bracketL);var e=this.parseIdentifier();this.expect(h.colon),e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(h.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}},s.tsParsePropertyOrMethodSignature=function(t,e){this.parsePropertyName(t),this.eat(h.question)&&(t.optional=!0);var s=t;if(e||!this.match(h.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var r=this.tsTryParseTypeAnnotation();return r&&(i.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var a=s;return this.tsFillSignature(h.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")},s.tsParseTypeMember=function(){if(this.match(h.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(h._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var t=this.startNode(),e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):this.tsParsePropertyOrMethodSignature(t,e)},s.tsIsStartOfConstructSignature=function(){return this.next(),this.match(h.parenL)||this.isRelational("<")},s.tsParseTypeLiteral=function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")},s.tsParseObjectTypeMembers=function(){this.expect(h.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(h.braceR),t},s.tsIsStartOfMappedType=function(){return this.next(),this.eat(h.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(h.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(h._in))))},s.tsParseMappedTypeParameter=function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(h._in),this.finishNode(t,"TSTypeParameter")},s.tsParseMappedType=function(){var t=this.startNode();return this.expect(h.braceL),this.match(h.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(h.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(h.bracketR),this.match(h.plusMin)?(t.optional=this.state.value,this.next(),this.expect(h.question)):this.eat(h.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(h.braceR),this.finishNode(t,"TSMappedType")},s.tsParseTupleType=function(){var t=this,e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var s=!1;return e.elementTypes.forEach(function(i,r){"TSRestType"===i.type?r!==e.elementTypes.length-1&&t.raise(i.start,"A rest element must be last in a tuple type."):"TSOptionalType"===i.type?s=!0:s&&t.raise(i.start,"A required element cannot follow an optional element.")}),this.finishNode(e,"TSTupleType")},s.tsParseTupleElementType=function(){if(this.match(h.ellipsis)){var t=this.startNode();return this.next(),t.typeAnnotation=this.tsParseType(),this.finishNode(t,"TSRestType")}var e=this.tsParseType();if(this.eat(h.question)){var s=this.startNodeAtNode(e);return s.typeAnnotation=e,this.finishNode(s,"TSOptionalType")}return e},s.tsParseParenthesizedType=function(){var t=this.startNode();return this.expect(h.parenL),t.typeAnnotation=this.tsParseType(),this.expect(h.parenR),this.finishNode(t,"TSParenthesizedType")},s.tsParseFunctionOrConstructorType=function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(h._new),this.tsFillSignature(h.arrow,e),this.finishNode(e,t)},s.tsParseLiteralTypeNode=function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case h.num:return t.parseLiteral(t.state.value,"NumericLiteral");case h.string:return t.parseLiteral(t.state.value,"StringLiteral");case h._true:case h._false:return t.parseBooleanLiteral();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")},s.tsParseNonArrayType=function(){switch(this.state.type){case h.name:case h._void:case h._null:var t=this.match(h._void)?"TSVoidKeyword":this.match(h._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&this.lookahead().type!==h.dot){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case h.string:case h.num:case h._true:case h._false:return this.tsParseLiteralTypeNode();case h.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.next(),!this.match(h.num))throw this.unexpected();return s.literal=this.parseLiteral(-this.state.value,"NumericLiteral",s.start,s.loc.start),this.finishNode(s,"TSLiteralType")}break;case h._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case h._typeof:return this.tsParseTypeQuery();case h.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case h.bracketL:return this.tsParseTupleType();case h.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},s.tsParseArrayTypeOrHigher=function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(h.bracketL);)if(this.match(h.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(h.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(h.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t},s.tsParseTypeOperator=function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(e,"TSTypeOperator")},s.tsParseInferType=function(){var t=this.startNode();this.expectContextual("infer");var e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")},s.tsParseTypeOperatorOrHigher=function(){var t=this,e=["keyof","unique"].find(function(e){return t.isContextual(e)});return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()},s.tsParseUnionOrIntersectionType=function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var r=[i];this.eat(s);)r.push(e());var a=this.startNodeAtNode(i);a.types=r,i=this.finishNode(a,t)}return i},s.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),h.bitwiseAND)},s.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),h.bitwiseOR)},s.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(h.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},s.tsSkipParameterStart=function(){if(this.match(h.name)||this.match(h._this))return this.next(),!0;if(this.match(h.braceL)){var t=1;for(this.next();t>0;)this.match(h.braceL)?++t:this.match(h.braceR)&&--t,this.next();return!0}return!1},s.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(h.parenR)||this.match(h.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(h.colon)||this.match(h.comma)||this.match(h.question)||this.match(h.eq))return!0;if(this.match(h.parenR)&&(this.next(),this.match(h.arrow)))return!0}return!1},s.tsParseTypeOrTypePredicateAnnotation=function(t){var e=this;return this.tsInType(function(){var s=e.startNode();e.expect(t);var i=e.tsIsIdentifier()&&e.tsTryParse(e.tsParseTypePredicatePrefix.bind(e));if(!i)return e.tsParseTypeAnnotation(!1,s);var r=e.tsParseTypeAnnotation(!1),a=e.startNodeAtNode(i);return a.parameterName=i,a.typeAnnotation=r,s.typeAnnotation=e.finishNode(a,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")})},s.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(h.colon)?this.tsParseTypeOrTypePredicateAnnotation(h.colon):void 0},s.tsTryParseTypeAnnotation=function(){return this.match(h.colon)?this.tsParseTypeAnnotation():void 0},s.tsTryParseType=function(){return this.tsEatThenParseType(h.colon)},s.tsParseTypePredicatePrefix=function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t},s.tsParseTypeAnnotation=function(t,e){var s=this;return void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),this.tsInType(function(){t&&s.expect(h.colon),e.typeAnnotation=s.tsParseType()}),this.finishNode(e,"TSTypeAnnotation")},s.tsParseType=function(){it(this.state.inType);var t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(h._extends))return t;var e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(h.question),e.trueType=this.tsParseType(),this.expect(h.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")},s.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(h._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()},s.tsParseTypeAssertion=function(){var t=this,e=this.startNode();return e.typeAnnotation=this.tsInType(function(){return t.tsParseType()}),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")},s.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},s.tsParseExpressionWithTypeArguments=function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")},s.tsParseInterfaceDeclaration=function(t){t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(h._extends)&&(t.extends=this.tsParseHeritageClause());var e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")},s.tsParseTypeAliasDeclaration=function(t){return t.id=this.parseIdentifier(),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(h.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")},s.tsInNoContext=function(t){var e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}},s.tsInType=function(t){var e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}},s.tsEatThenParseType=function(t){return this.match(t)?this.tsNextThenParseType():void 0},s.tsExpectThenParseType=function(t){var e=this;return this.tsDoThenParseType(function(){return e.expect(t)})},s.tsNextThenParseType=function(){var t=this;return this.tsDoThenParseType(function(){return t.next()})},s.tsDoThenParseType=function(t){var e=this;return this.tsInType(function(){return t(),e.tsParseType()})},s.tsParseEnumMember=function(){var t=this.startNode();return t.id=this.match(h.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(h.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")},s.tsParseEnumDeclaration=function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.expect(h.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(h.braceR),this.finishNode(t,"TSEnumDeclaration")},s.tsParseModuleBlock=function(){var t=this.startNode();return this.expect(h.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,h.braceR),this.finishNode(t,"TSModuleBlock")},s.tsParseModuleOrNamespaceDeclaration=function(t){if(t.id=this.parseIdentifier(),this.eat(h.dot)){var e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e),t.body=e}else t.body=this.tsParseModuleBlock();return this.finishNode(t,"TSModuleDeclaration")},s.tsParseAmbientExternalModuleDeclaration=function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(h.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(h.braceL)?t.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(t,"TSModuleDeclaration")},s.tsParseImportEqualsDeclaration=function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(h.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")},s.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===h.parenL},s.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},s.tsParseExternalModuleReference=function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(h.parenL),!this.match(h.string))throw this.unexpected();return t.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(h.parenR),this.finishNode(t,"TSExternalModuleReference")},s.tsLookAhead=function(t){var e=this.state.clone(),s=t();return this.state=e,s},s.tsTryParseAndCatch=function(t){var e=this.state.clone();try{return t()}catch(t){if(t instanceof SyntaxError)return void(this.state=e);throw t}},s.tsTryParse=function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)},s.nodeWithSamePosition=function(t,e){var s=this.startNodeAtNode(t);return s.type=e,s.end=t.end,s.loc.end=t.loc.end,t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),t.innerComments&&(s.innerComments=t.innerComments),s},s.tsTryParseDeclare=function(t){switch(this.state.type){case h._function:return this.next(),this.parseFunction(t,!0);case h._class:return this.parseClass(t,!0,!1);case h._const:if(this.match(h._const)&&this.isLookaheadContextual("enum"))return this.expect(h._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case h._var:case h._let:return this.parseVarStatement(t,this.state.type);case h.name:var e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}},s.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},s.tsParseExpressionStatement=function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(h.braceL)){var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}},s.tsParseDeclaration=function(t,e,s){switch(e){case"abstract":if(s||this.match(h._class)){var i=t;return i.abstract=!0,s&&this.next(),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(h.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(s||this.match(h.name))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(h.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(s||this.match(h.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(s||this.match(h.name))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(s||this.match(h.name))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}},s.tsTryParseGenericAsyncArrowFunction=function(e,s){var i=this,r=this.tsTryParseAndCatch(function(){var r=i.startNodeAt(e,s);return r.typeParameters=i.tsParseTypeParameters(),t.prototype.parseFunctionParams.call(i,r),r.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(h.arrow),r});if(r){var a=this.state.inAsync,n=this.state.inGenerator;return this.state.inAsync=!0,this.state.inGenerator=!1,r.id=null,r.generator=!1,r.expression=!0,r.async=!0,this.parseFunctionBody(r,!0),this.state.inAsync=a,this.state.inGenerator=n,this.finishNode(r,"ArrowFunctionExpression")}},s.tsParseTypeArguments=function(){var t=this,e=this.startNode();return e.params=this.tsInType(function(){return t.tsInNoContext(function(){return t.expectRelational("<"),t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t))})}),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")},s.tsIsDeclarationStart=function(){if(this.match(h.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1},s.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&t.prototype.isExportDefaultSpecifier.call(this)},s.parseAssignableListItem=function(t,e){var s,i=!1;t&&(s=this.parseAccessModifier(),i=!!this.tsParseModifier(["readonly"]));var r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);var a=this.parseMaybeDefault(r.start,r.loc.start,r);if(s||i){var n=this.startNodeAtNode(a);if(e.length&&(n.decorators=e),s&&(n.accessibility=s),i&&(n.readonly=i),"Identifier"!==a.type&&"AssignmentPattern"!==a.type)throw this.raise(n.start,"A parameter property may not be declared using a binding pattern.");return n.parameter=a,this.finishNode(n,"TSParameterProperty")}return e.length&&(r.decorators=e),a},s.parseFunctionBodyAndFinish=function(e,s,i){!i&&this.match(h.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(h.colon));var r="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;r&&!this.match(h.braceL)&&this.isLineTerminator()?this.finishNode(e,r):t.prototype.parseFunctionBodyAndFinish.call(this,e,s,i)},s.parseSubscript=function(e,s,i,r,a){var n=this;if(!this.hasPrecedingLineBreak()&&this.match(h.bang)){this.state.exprAllowed=!1,this.next();var o=this.startNodeAt(s,i);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}if(this.isRelational("<")){var u=this.tsTryParseAndCatch(function(){if(!r&&n.atPossibleAsync(e)){var t=n.tsTryParseGenericAsyncArrowFunction(s,i);if(t)return t}var o=n.startNodeAt(s,i);o.callee=e;var u=n.tsParseTypeArguments();if(u){if(!r&&n.eat(h.parenL))return o.arguments=n.parseCallExpressionArguments(h.parenR,!1),o.typeParameters=u,n.finishCallExpression(o);if(n.match(h.backQuote))return n.parseTaggedTemplateExpression(s,i,e,a,u)}n.unexpected()});if(u)return u}return t.prototype.parseSubscript.call(this,e,s,i,r,a)},s.parseNewArguments=function(e){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch(function(){var t=s.tsParseTypeArguments();return s.match(h.parenL)||s.unexpected(),t});i&&(e.typeParameters=i)}t.prototype.parseNewArguments.call(this,e)},s.parseExprOp=function(e,s,i,r,a){if(st(h._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var n=this.startNodeAt(s,i);return n.expression=e,n.typeAnnotation=this.tsNextThenParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,r,a)}return t.prototype.parseExprOp.call(this,e,s,i,r,a)},s.checkReservedWord=function(t,e,s,i){},s.checkDuplicateExports=function(){},s.parseImport=function(e){return this.match(h.name)&&this.lookahead().type===h.eq?this.tsParseImportEqualsDeclaration(e):t.prototype.parseImport.call(this,e)},s.parseExport=function(e){if(this.match(h._import))return this.expect(h._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(h.eq)){var s=e;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=e;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return t.prototype.parseExport.call(this,e)},s.isAbstractClass=function(){return this.isContextual("abstract")&&this.lookahead().type===h._class},s.parseExportDefaultExpression=function(){if(this.isAbstractClass()){var e=this.startNode();return this.next(),this.parseClass(e,!0,!0),e.abstract=!0,e}if("interface"===this.state.value){var s=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(s)return s}return t.prototype.parseExportDefaultExpression.call(this)},s.parseStatementContent=function(e,s){if(this.state.type===h._const){var i=this.lookahead();if(i.type===h.name&&"enum"===i.value){var r=this.startNode();return this.expect(h._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(r,!0)}}return t.prototype.parseStatementContent.call(this,e,s)},s.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},s.parseClassMember=function(e,s,i){var r=this.parseAccessModifier();r&&(s.accessibility=r),t.prototype.parseClassMember.call(this,e,s,i)},s.parseClassMemberWithIsStatic=function(e,s,i,r){var a=s,n=s,o=s,h=!1,u=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":u=!0,h=!!this.tsParseModifier(["abstract"]);break;case"abstract":h=!0,u=!!this.tsParseModifier(["readonly"])}if(h&&(a.abstract=!0),u&&(o.readonly=!0),!h&&!r&&!a.accessibility){var p=this.tsTryParseIndexSignature(s);if(p)return void e.body.push(p)}if(u)return a.static=r,this.parseClassPropertyName(n),this.parsePostMemberNameModifiers(a),void this.pushClassProperty(e,n);t.prototype.parseClassMemberWithIsStatic.call(this,e,s,i,r)},s.parsePostMemberNameModifiers=function(t){this.eat(h.question)&&(t.optional=!0)},s.parseExpressionStatement=function(e,s){return("Identifier"===s.type?this.tsParseExpressionStatement(e,s):void 0)||t.prototype.parseExpressionStatement.call(this,e,s)},s.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||t.prototype.shouldParseExportDeclaration.call(this)},s.parseConditional=function(e,s,i,r,a){if(!a||!this.match(h.question))return t.prototype.parseConditional.call(this,e,s,i,r,a);var n=this.state.clone();try{return t.prototype.parseConditional.call(this,e,s,i,r)}catch(t){if(!(t instanceof SyntaxError))throw t;return this.state=n,a.start=t.pos||this.state.start,e}},s.parseParenItem=function(e,s,i){if(e=t.prototype.parseParenItem.call(this,e,s,i),this.eat(h.question)&&(e.optional=!0),this.match(h.colon)){var r=this.startNodeAt(s,i);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e},s.parseExportDeclaration=function(e){var s,i=this.eatContextual("declare");return this.match(h.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=t.prototype.parseExportDeclaration.call(this,e)),s&&i&&(s.declare=!0),s},s.parseClassId=function(e,s,i){if(s&&!i||!this.isContextual("implements")){t.prototype.parseClassId.apply(this,arguments);var r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r)}},s.parseClassProperty=function(e){!e.optional&&this.eat(h.bang)&&(e.definite=!0);var s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),t.prototype.parseClassProperty.call(this,e)},s.pushClassMethod=function(e,s,i,r,a){var n=this.tsTryParseTypeParameters();n&&(s.typeParameters=n),t.prototype.pushClassMethod.call(this,e,s,i,r,a)},s.pushClassPrivateMethod=function(e,s,i,r){var a=this.tsTryParseTypeParameters();a&&(s.typeParameters=a),t.prototype.pushClassPrivateMethod.call(this,e,s,i,r)},s.parseClassSuper=function(e){t.prototype.parseClassSuper.call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause())},s.parseObjPropValue=function(e){var s,i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i);for(var r=arguments.length,a=new Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];(s=t.prototype.parseObjPropValue).call.apply(s,[this,e].concat(a))},s.parseFunctionParams=function(e,s){var i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i),t.prototype.parseFunctionParams.call(this,e,s)},s.parseVarHead=function(e){t.prototype.parseVarHead.call(this,e),"Identifier"===e.id.type&&this.eat(h.bang)&&(e.definite=!0);var s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.finishNode(e.id,e.id.type))},s.parseAsyncArrowFromCallExpression=function(e,s){return this.match(h.colon)&&(e.returnType=this.tsParseTypeAnnotation()),t.prototype.parseAsyncArrowFromCallExpression.call(this,e,s)},s.parseMaybeAssign=function(){for(var e,s,i,r,a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];if(this.match(h.jsxTagStart)){it(this.curContext()===D.j_oTag),it(this.state.context[this.state.context.length-2]===D.j_expr);var u=this.state.clone();try{var p;return(p=t.prototype.parseMaybeAssign).call.apply(p,[this].concat(n))}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=u,it(this.curContext()===D.j_oTag),this.state.context.pop(),it(this.curContext()===D.j_expr),this.state.context.pop(),e=t}}if(void 0===e&&!this.isRelational("<"))return(s=t.prototype.parseMaybeAssign).call.apply(s,[this].concat(n));var c=this.state.clone();try{var l;r=this.tsParseTypeParameters(),"ArrowFunctionExpression"!==(i=(l=t.prototype.parseMaybeAssign).call.apply(l,[this].concat(n))).type&&this.unexpected()}catch(s){var d;if(!(s instanceof SyntaxError))throw s;if(e)throw e;return it(!this.hasPlugin("jsx")),this.state=c,(d=t.prototype.parseMaybeAssign).call.apply(d,[this].concat(n))}return r&&0!==r.params.length&&this.resetStartLocationFromNode(i,r.params[0]),i.typeParameters=r,i},s.parseMaybeUnary=function(e){return!this.hasPlugin("jsx")&&this.eatRelational("<")?this.tsParseTypeAssertion():t.prototype.parseMaybeUnary.call(this,e)},s.parseArrow=function(e){if(this.match(h.colon)){var s=this.state.clone();try{var i=this.tsParseTypeOrTypePredicateAnnotation(h.colon);this.canInsertSemicolon()&&this.unexpected(),this.match(h.arrow)||this.unexpected(),e.returnType=i}catch(t){if(!(t instanceof SyntaxError))throw t;this.state=s}}return t.prototype.parseArrow.call(this,e)},s.parseAssignableListItemTypes=function(t){if(this.eat(h.question)){if("Identifier"!==t.type)throw this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature.");t.optional=!0}var e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.finishNode(t,t.type)},s.toAssignable=function(e,s,i){switch(e.type){case"TSTypeCastExpression":return t.prototype.toAssignable.call(this,this.typeCastToParameter(e),s,i);case"TSParameterProperty":return t.prototype.toAssignable.call(this,e,s,i);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return e.expression=this.toAssignable(e.expression,s,i),e;default:return t.prototype.toAssignable.call(this,e,s,i)}},s.checkLVal=function(e,s,i,r){switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,s,i,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(e.expression,s,i,r);default:return void t.prototype.checkLVal.call(this,e,s,i,r)}},s.parseBindingAtom=function(){switch(this.state.type){case h._this:return this.parseIdentifier(!0);default:return t.prototype.parseBindingAtom.call(this)}},s.parseMaybeDecoratorArguments=function(e){if(this.isRelational("<")){var s=this.tsParseTypeArguments();if(this.match(h.parenL)){var i=t.prototype.parseMaybeDecoratorArguments.call(this,e);return i.typeParameters=s,i}this.unexpected(this.state.start,h.parenL)}return t.prototype.parseMaybeDecoratorArguments.call(this,e)},s.isClassMethod=function(){return this.isRelational("<")||t.prototype.isClassMethod.call(this)},s.isClassProperty=function(){return this.match(h.bang)||this.match(h.colon)||t.prototype.isClassProperty.call(this)},s.parseMaybeDefault=function(){for(var e,s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];var a=(e=t.prototype.parseMaybeDefault).call.apply(e,[this].concat(i));return"AssignmentPattern"===a.type&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(a.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),a},s.readToken=function(e){return!this.state.inType||62!==e&&60!==e?t.prototype.readToken.call(this,e):this.finishOp(h.relational,1)},s.toAssignableList=function(e,s,i){for(var r=0;r<e.length;r++){var a=e[r];a&&"TSTypeCastExpression"===a.type&&(e[r]=this.typeCastToParameter(a))}return t.prototype.toAssignableList.call(this,e,s,i)},s.typeCastToParameter=function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.finishNodeAt(t.expression,t.expression.type,t.typeAnnotation.end,t.typeAnnotation.loc.end)},s.toReferencedList=function(t,e){for(var s=0;s<t.length;s++){var i=t[s];i&&i._exprListItem&&"TsTypeCastExpression"===i.type&&this.raise(i.start,"Did not expect a type annotation here.")}return t},s.shouldParseArrow=function(){return this.match(h.colon)||t.prototype.shouldParseArrow.call(this)},s.shouldParseAsyncArrow=function(){return this.match(h.colon)||t.prototype.shouldParseAsyncArrow.call(this)},s.canHaveLeadingDecorator=function(){return t.prototype.canHaveLeadingDecorator.call(this)||this.isAbstractClass()},s.jsxParseOpeningElementAfterName=function(e){var s=this,i=this.tsTryParseAndCatch(function(){return s.tsParseTypeArguments()});return i&&(e.typeParameters=i),t.prototype.jsxParseOpeningElementAfterName.call(this,e)},e}(t)}};function ut(t,e){var s=et;return t&&t.plugins&&(!function(t){if(rt(t,"decorators")){if(rt(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var e=at(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(rt(t,"flow")&&rt(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(rt(t,"pipelineOperator")&&-1===nt.indexOf(at(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+nt.map(function(t){return"'"+t+"'"}).join(", "))}(t.plugins),s=function(t){var e=ot.filter(function(e){return rt(t,e)}),s=e.join("/"),i=pt[s];if(!i){i=et;for(var r=0;r<e.length;r++){var a=e[r];i=ht[a](i)}pt[s]=i}return i}(t.plugins)),new s(t,e)}var pt={};e.parse=function(t,e){if(!e||"unambiguous"!==e.sourceType)return ut(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";var s=ut(e,t),i=s.parse();return s.sawUnambiguousESM||(i.program.sourceType="script"),i}catch(s){try{return e.sourceType="script",ut(e,t).parse()}catch(t){}throw s}},e.parseExpression=function(t,e){var s=ut(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=h});e(W);var K=h;function G(t,e){return Object.assign({sourceType:"module",allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,plugins:["jsx","doExpressions","objectRestSpread","classProperties","exportDefaultFrom","exportNamespaceFrom","asyncGenerators","functionBind","functionSent","dynamicImport","numericSeparator","importMeta","optionalCatchBinding","optionalChaining","classPrivateProperties",["pipelineOperator",{proposal:"minimal"}],"nullishCoalescingOperator","bigInt","throwExpressions","logicalAssignment","classPrivateMethods"].concat(e)},t)}function X(e,s){return function(i,r,a){var n,o=W,h=[G({strictMode:!0},["decorators-legacy"].concat(s)),G({strictMode:!1},["decorators-legacy"].concat(s)),G({strictMode:!0},[["decorators",{decoratorsBeforeExport:!1}]].concat(s)),G({strictMode:!1},[["decorators",{decoratorsBeforeExport:!1}]].concat(s))];try{n=function(t,e){for(var s,i=0;i<e.length;i++)try{return t(e[i])}catch(t){s||(s=t)}throw s}(o[e].bind(null,i),h)}catch(e){throw t(e.message.replace(/ \(.*\)/,""),{start:{line:e.loc.line,column:e.loc.column+1}})}return delete n.tokens,V(n,Object.assign({},a,{originalText:i}))}}var J=X("parse",["flow"]),H=X("parse",[["flow",{all:!0}]]),z=X("parseExpression");function Q(e,s){switch(e.type){case"ArrayExpression":return e.elements.forEach(i);case"ObjectExpression":return e.properties.forEach(i);case"ObjectProperty":if(e.computed)throw r("computed");if(e.shorthand)throw r("shorthand");return[e.key,e.value].forEach(i);case"UnaryExpression":switch(e.operator){case"+":case"-":return i(e.argument);default:throw r("operator")}case"Identifier":if(s&&"ObjectProperty"===s.type&&s.key===e)return;throw r();case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":return;default:throw r()}function i(t){return Q(t,e)}function r(s){var i=s?"".concat(e.type," with ").concat(s,"=").concat(JSON.stringify(e[s])):e.type;return t("".concat(i," is not allowed in JSON."),{start:{line:e.loc.start.line,column:e.loc.start.column+1}})}}var $=Object.assign({parse:J,astFormat:"estree",hasPragma:K},p),Y=Object.assign({},$,{parse:H}),Z=Object.assign({},$,{parse:z});return{parsers:{babel:$,"babel-flow":Y,babylon:$,json:Object.assign({},Z,{hasPragma:function(){return!0}}),json5:Z,"json-stringify":Object.assign({parse:function(t,e,s){var i=z(t,e,s);return i.comments.forEach(Q),Q(i),i},astFormat:"estree-json"},p),__js_expression:Z,__vue_expression:Z,__vue_event_binding:$}}});
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babylon={}))}(globalThis,(function(t){"use strict";var e=function(t,e){var s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a,r=Object.freeze({__proto__:null,default:{EOL:"\n"}}),n=i((function(t){t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return null;var s=e.filter((function(t){return"\r\n"===t})).length;return s>e.length-s?"\r\n":"\n"},t.exports.graceful=function(e){return t.exports(e)||"\n"}})),o=(n.graceful,(a=r)&&a.default||a),h=i((function(t,e){function s(){var t=o;return s=function(){return t},t}function i(){var t,e=(t=n)&&t.__esModule?t:{default:t};return i=function(){return e},e}Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(t){var e=t.match(h);return e?e[0].trimLeft():""},e.strip=function(t){var e=t.match(h);return e&&e[0]?t.substring(e[0].length):t},e.parse=function(t){return f(t).pragmas},e.parseWithComments=f,e.print=function(t){var e=t.comments,a=void 0===e?"":e,r=t.pragmas,n=void 0===r?{}:r,o=(0,i().default)(a)||s().EOL,h=Object.keys(n),u=h.map((function(t){return m(t,n[t])})).reduce((function(t,e){return t.concat(e)}),[]).map((function(t){return" * "+t+o})).join("");if(!a){if(0===h.length)return"";if(1===h.length&&!Array.isArray(n[h[0]])){var l=n[h[0]];return"".concat("/**"," ").concat(m(h[0],l)[0]).concat(" */")}}var c=a.split(o).map((function(t){return"".concat(" *"," ").concat(t)})).join(o)+o;return"/**"+o+(a?c:"")+(a&&h.length?" *"+o:"")+u+" */"};var a=/\*\/$/,r=/^\/\*\*/,h=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,u=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,c=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,p=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,d=/(\r?\n|^) *\* ?/g;function f(t){var e=(0,i().default)(t)||s().EOL;t=t.replace(r,"").replace(a,"").replace(d,"$1");for(var n="";n!==t;)n=t,t=t.replace(c,"".concat(e,"$1 $2").concat(e));t=t.replace(l,"").trimRight();for(var o,h=Object.create(null),f=t.replace(p,"").replace(l,"").trimRight();o=p.exec(t);){var m=o[2].replace(u,"");"string"==typeof h[o[1]]||Array.isArray(h[o[1]])?h[o[1]]=[].concat(h[o[1]],m):h[o[1]]=m}return{comments:f,pragmas:h}}function m(t,e){return[].concat(e).map((function(e){return"@".concat(t," ").concat(e).trim()}))}}));s(h);h.extract,h.strip,h.parse,h.parseWithComments,h.print;var u=function(t){var e=Object.keys(h.parse(h.extract(t)));return-1!==e.indexOf("prettier")||-1!==e.indexOf("format")},l=function(t){return t.length>0?t[t.length-1]:null};var c={locStart:function t(e,s){return!(s=s||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?t(e.declaration.decorators[0]):!s.ignoreDecorators&&e.decorators&&e.decorators.length>0?t(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null},locEnd:function t(e){var s=e.nodes&&l(e.nodes);if(s&&e.source&&!e.source.end&&(e=s),e.__location)return e.__location.endOffset;var i=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(i,t(e.typeAnnotation)):e.loc&&!i?e.loc.end:i}};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function m(t,e,s){return e&&f(t.prototype,e),s&&f(t,s),t}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function D(t){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?x(t):e}function k(t,e,s){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,s){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(s):a.value}})(t,e,s||t)}function P(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var s=[],i=!0,a=!1,r=void 0;try{for(var n,o=t[Symbol.iterator]();!(i=(n=o.next()).done)&&(s.push(n.value),!e||s.length!==e);i=!0);}catch(t){a=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(a)throw r}}return s}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function b(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e<t.length;e++)s[e]=t[e];return s}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var E=function(t){return"string"==typeof t?t.replace(function(t){t=Object.assign({onlyFirst:!1},t);var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}(),""):t},C=E,A=E;C.default=A;var w=function(t){return!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))},T=w,F=w;T.default=F;var N=function(t){if("string"!=typeof(t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===t.length)return 0;t=C(t);for(var e=0,s=0;s<t.length;s++){var i=t.codePointAt(s);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&s++,e+=T(i)?2:1))}return e},S=N,I=N;S.default=I;var L=/[|\\{}()[\]^$+*?.]/g,B=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(L,"\\$&")},O=/[^\x20-\x7F]/;function M(t){if(t)switch(t.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function R(t){return function(e,s,i){var a=i&&i.backwards;if(!1===s)return!1;for(var r=e.length,n=s;n>=0&&n<r;){var o=e.charAt(n);if(t instanceof RegExp){if(!t.test(o))return n}else if(-1===t.indexOf(o))return n;a?n--:n++}return(-1===n||n===r)&&n}}var _=R(/\s/),j=R(" \t"),q=R(",; \t"),U=R(/[^\r\n]/);function V(t,e){if(!1===e)return!1;if("/"===t.charAt(e)&&"*"===t.charAt(e+1))for(var s=e+2;s<t.length;++s)if("*"===t.charAt(s)&&"/"===t.charAt(s+1))return s+2;return e}function z(t,e){return!1!==e&&("/"===t.charAt(e)&&"/"===t.charAt(e+1)?U(t,e):e)}function W(t,e,s){var i=s&&s.backwards;if(!1===e)return!1;var a=t.charAt(e);if(i){if("\r"===t.charAt(e-1)&&"\n"===a)return e-2;if("\n"===a||"\r"===a||"\u2028"===a||"\u2029"===a)return e-1}else{if("\r"===a&&"\n"===t.charAt(e+1))return e+2;if("\n"===a||"\r"===a||"\u2028"===a||"\u2029"===a)return e+1}return e}function K(t,e,s){var i=j(t,(s=s||{}).backwards?e-1:e,s);return i!==W(t,i,s)}function X(t,e){for(var s=null,i=e;i!==s;)s=i,i=V(t,i=q(t,i)),i=j(t,i);return!1!==(i=W(t,i=z(t,i)))&&K(t,i)}function J(t,e){for(var s=null,i=e;i!==s;)s=i,i=W(t,i=z(t,i=V(t,i=j(t,i))));return i}function H(t,e,s){return J(t,s(e))}var G={};function Q(t){return G[t]}[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(t,e){t.forEach((function(t){G[t]=e}))}));var $={"==":!0,"!=":!0,"===":!0,"!==":!0},Y={"*":!0,"/":!0,"%":!0},Z={">>":!0,">>>":!0,"<<":!0};function tt(t,e,s){for(var i=0,a=s=s||0;a<t.length;++a)"\t"===t[a]?i=i+e-i%e:i++;return i}function et(t,e){var s=t.slice(1,-1),i={quote:'"',regex:/"/g},a={quote:"'",regex:/'/g},r="'"===e?a:i,n=r===a?i:a,o=r.quote;(s.includes(r.quote)||s.includes(n.quote))&&(o=(s.match(r.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:r.quote);return o}function st(t,e,s){var i='"'===e?"'":'"',a=t.replace(/\\([\s\S])|(['"])/g,(function(t,a,r){return a===i?a:r===e?"\\"+r:r||(s&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(a)?a:"\\"+a)}));return e+a+e}function it(t){return t&&t.comments&&t.comments.length>0&&t.comments.some((function(t){return"prettier-ignore"===t.value.trim()}))}function at(t,e){(t.comments||(t.comments=[])).push(e),e.printed=!1,"JSXText"===t.type&&(e.printed=!0)}var rt={replaceEndOfLineWith:function(t,e){var s=[],i=!0,a=!1,r=void 0;try{for(var n,o=t.split("\n")[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var h=n.value;0!==s.length&&s.push(e),s.push(h)}}catch(t){a=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(a)throw r}}return s},getStringWidth:function(t){return t?O.test(t)?S(t):t.length:0},getMaxContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(B(e),")+"),"g"));return null===s?0:s.reduce((function(t,s){return Math.max(t,s.length/e.length)}),0)},getMinNotPresentContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(B(e),")+"),"g"));if(null===s)return 0;var i=new Map,a=0,r=!0,n=!1,o=void 0;try{for(var h,u=s[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var l=h.value.length/e.length;i.set(l,!0),l>a&&(a=l)}}catch(t){n=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}for(var c=1;c<a;c++)if(!i.get(c))return c;return a+1},getPrecedence:Q,shouldFlatten:function(t,e){return Q(e)===Q(t)&&("**"!==t&&((!$[t]||!$[e])&&(!("%"===e&&Y[t]||"%"===t&&Y[e])&&((e===t||!Y[e]||!Y[t])&&(!Z[t]||!Z[e])))))},isBitwiseOperator:function(t){return!!Z[t]||"|"===t||"^"===t||"&"===t},isExportDeclaration:M,getParentExportDeclaration:function(t){var e=t.getParentNode();return"declaration"===t.getName()&&M(e)?e:null},getPenultimate:function(t){return t.length>1?t[t.length-2]:null},getLast:l,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:J,getNextNonSpaceNonCommentCharacterIndex:H,getNextNonSpaceNonCommentCharacter:function(t,e,s){return t.charAt(H(t,e,s))},skip:R,skipWhitespace:_,skipSpaces:j,skipToLineEnd:q,skipEverythingButNewLine:U,skipInlineComment:V,skipTrailingComment:z,skipNewline:W,isNextLineEmptyAfterIndex:X,isNextLineEmpty:function(t,e,s){return X(t,s(e))},isPreviousLineEmpty:function(t,e,s){var i=s(e)-1;return i=W(t,i=j(t,i,{backwards:!0}),{backwards:!0}),(i=j(t,i,{backwards:!0}))!==W(t,i,{backwards:!0})},hasNewline:K,hasNewlineInRange:function(t,e,s){for(var i=e;i<s;++i)if("\n"===t.charAt(i))return!0;return!1},hasSpaces:function(t,e,s){return j(t,(s=s||{}).backwards?e-1:e,s)!==e},setLocStart:function(t,e){t.range?t.range[0]=e:t.start=e},setLocEnd:function(t,e){t.range?t.range[1]=e:t.end=e},startsWithNoLookaheadToken:function t(e,s){switch((e=function t(e){if(e.left)return t(e.left);return e}(e)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return s;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return t(e.object,s);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&t(e.tag,s);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&t(e.callee,s);case"ConditionalExpression":return t(e.test,s);case"UpdateExpression":return!e.prefix&&t(e.argument,s);case"BindExpression":return e.object&&t(e.object,s);case"SequenceExpression":return t(e.expressions[0],s);case"TSAsExpression":return t(e.expression,s);default:return!1}},getAlignmentSize:tt,getIndentSize:function(t,e){var s=t.lastIndexOf("\n");return-1===s?0:tt(t.slice(s+1).match(/^[ \t]*/)[0],e)},getPreferredQuote:et,printString:function(t,e,s){var i=t.slice(1,-1),a=!i.includes('"')&&!i.includes("'"),r="json"===e.parser?'"':e.__isInHtmlAttribute?"'":et(t,e.singleQuote?"'":'"');return s?a?r+i+r:t:st(i,r,!("css"===e.parser||"less"===e.parser||"scss"===e.parser||e.embeddedInHtml))},printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function(t){return it(t.getValue())},hasNodeIgnoreComment:it,makeString:st,matchAncestorTypes:function(t,e,s){for(s=s||0,e=e.slice();e.length;){var i=t.getParentNode(s),a=e.shift();if(!i||i.type!==a)return!1;s++}return!0},addLeadingComment:function(t,e){e.leading=!0,e.trailing=!1,at(t,e)},addDanglingComment:function(t,e){e.leading=!1,e.trailing=!1,at(t,e)},addTrailingComment:function(t,e){e.leading=!1,e.trailing=!0,at(t,e)},isWithinParentArrayProperty:function(t,e){var s=t.getValue(),i=t.getParentNode();if(null==i)return!1;if(!Array.isArray(i[e]))return!1;var a=t.getName();return i[e][a]===s}}.getLast;var nt=function(t,e){return function t(e,s,i,a){if(!e||"object"!==p(e))return;if(Array.isArray(e)){for(var r=0;r<e.length;r++)t(e[r],s,e,r);return}if("string"!=typeof e.type)return;for(var n=0,o=Object.keys(e);n<o.length;n++){var h=o[n];t(e[h],s,e,h)}var u=s(e);u&&(i[a]=u)}(t,(function(t){switch(t.type){case"VariableDeclaration":var s=rt(t.declarations);s&&s.init&&function(t,s){if(";"===e.originalText[(i=s,"flow"===e.parser?i.range[1]:i.end)])return;var i;"flow"===e.parser?t.range=[t.range[0],s.range[1]]:t.end=s.end;t.loc=Object.assign({},t.loc,{end:t.loc.end})}(t,s);break;case"TSParenthesizedType":return t.typeAnnotation;case"TSUnionType":case"TSIntersectionType":if(1===t.types.length)return Object.assign({},t.types[0],{loc:t.loc,range:t.range});break;case"EnumDeclaration":"flow"===e.parser&&t.body.range[0]===t.range[0]&&t.body.range[1]===t.range[1]&&(t.body.range=[t.id.range[1],t.range[1]-1]),"babel-flow"===e.parser&&(t.body.start=t.id.end,t.body.end=t.end-1)}})),t},ot=i((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var s=!0,i=function t(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,t),this.label=e,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=null!=s.binop?s.binop:null,this.updateContext=null},a=new Map;function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.keyword=t;var s=new i(t,e);return a.set(t,s),s}function n(t,e){return new i(t,{beforeExpr:s,binop:e})}var o={num:new i("num",{startsExpr:!0}),bigint:new i("bigint",{startsExpr:!0}),regexp:new i("regexp",{startsExpr:!0}),string:new i("string",{startsExpr:!0}),name:new i("name",{startsExpr:!0}),eof:new i("eof"),bracketL:new i("[",{beforeExpr:s,startsExpr:!0}),bracketR:new i("]"),braceL:new i("{",{beforeExpr:s,startsExpr:!0}),braceBarL:new i("{|",{beforeExpr:s,startsExpr:!0}),braceR:new i("}"),braceBarR:new i("|}"),parenL:new i("(",{beforeExpr:s,startsExpr:!0}),parenR:new i(")"),comma:new i(",",{beforeExpr:s}),semi:new i(";",{beforeExpr:s}),colon:new i(":",{beforeExpr:s}),doubleColon:new i("::",{beforeExpr:s}),dot:new i("."),question:new i("?",{beforeExpr:s}),questionDot:new i("?."),arrow:new i("=>",{beforeExpr:s}),template:new i("template"),ellipsis:new i("...",{beforeExpr:s}),backQuote:new i("`",{startsExpr:!0}),dollarBraceL:new i("${",{beforeExpr:s,startsExpr:!0}),at:new i("@"),hash:new i("#",{startsExpr:!0}),interpreterDirective:new i("#!..."),eq:new i("=",{beforeExpr:s,isAssign:!0}),assign:new i("_=",{beforeExpr:s,isAssign:!0}),incDec:new i("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new i("!",{beforeExpr:s,prefix:!0,startsExpr:!0}),tilde:new i("~",{beforeExpr:s,prefix:!0,startsExpr:!0}),pipeline:n("|>",0),nullishCoalescing:n("??",1),logicalOR:n("||",2),logicalAND:n("&&",3),bitwiseOR:n("|",4),bitwiseXOR:n("^",5),bitwiseAND:n("&",6),equality:n("==/!=/===/!==",7),relational:n("</>/<=/>=",8),bitShift:n("<</>>/>>>",9),plusMin:new i("+/-",{beforeExpr:s,binop:10,prefix:!0,startsExpr:!0}),modulo:new i("%",{beforeExpr:s,binop:11,startsExpr:!0}),star:n("*",11),slash:n("/",11),exponent:new i("**",{beforeExpr:s,binop:12,rightAssociative:!0}),_break:r("break"),_case:r("case",{beforeExpr:s}),_catch:r("catch"),_continue:r("continue"),_debugger:r("debugger"),_default:r("default",{beforeExpr:s}),_do:r("do",{isLoop:!0,beforeExpr:s}),_else:r("else",{beforeExpr:s}),_finally:r("finally"),_for:r("for",{isLoop:!0}),_function:r("function",{startsExpr:!0}),_if:r("if"),_return:r("return",{beforeExpr:s}),_switch:r("switch"),_throw:r("throw",{beforeExpr:s,prefix:!0,startsExpr:!0}),_try:r("try"),_var:r("var"),_const:r("const"),_while:r("while",{isLoop:!0}),_with:r("with"),_new:r("new",{beforeExpr:s,startsExpr:!0}),_this:r("this",{startsExpr:!0}),_super:r("super",{startsExpr:!0}),_class:r("class",{startsExpr:!0}),_extends:r("extends",{beforeExpr:s}),_export:r("export"),_import:r("import",{startsExpr:!0}),_null:r("null",{startsExpr:!0}),_true:r("true",{startsExpr:!0}),_false:r("false",{startsExpr:!0}),_in:r("in",{beforeExpr:s,binop:8}),_instanceof:r("instanceof",{beforeExpr:s,binop:8}),_typeof:r("typeof",{beforeExpr:s,prefix:!0,startsExpr:!0}),_void:r("void",{beforeExpr:s,prefix:!0,startsExpr:!0}),_delete:r("delete",{beforeExpr:s,prefix:!0,startsExpr:!0})},h=2,u=4,l=8,c=513|h;function p(t,e){return h|(t?u:0)|(e?l:0)}function f(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}var v=/\r\n?|[\n\u2028\u2029]/,E=new RegExp(v.source,"g");function C(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var A=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function w(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var T=function t(e,s,i,a){d(this,t),this.token=e,this.isExpr=!!s,this.preserveSpace=!!i,this.override=a},F={braceStatement:new T("{",!1),braceExpression:new T("{",!0),templateQuasi:new T("${",!1),parenStatement:new T("(",!1),parenExpression:new T("(",!0),template:new T("`",!0,!0,(function(t){return t.readTmplToken()})),functionExpression:new T("function",!0),functionStatement:new T("function",!1)};o.parenR.updateContext=o.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===F.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},o.name.updateContext=function(t){var e=!1;t!==o.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.scope.inGenerator)&&(e=!0),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},o.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?F.braceStatement:F.braceExpression),this.state.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.state.context.push(F.templateQuasi),this.state.exprAllowed=!0},o.parenL.updateContext=function(t){var e=t===o._if||t===o._for||t===o._with||t===o._while;this.state.context.push(e?F.parenStatement:F.parenExpression),this.state.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(t){!t.beforeExpr||t===o.semi||t===o._else||t===o._return&&v.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(t===o.colon||t===o.braceL)&&this.curContext()===F.b_stat?this.state.context.push(F.functionStatement):this.state.context.push(F.functionExpression),this.state.exprAllowed=!1},o.backQuote.updateContext=function(){this.curContext()===F.template?this.state.context.pop():this.state.context.push(F.template),this.state.exprAllowed=!1};var N=["eval","arguments"],S=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),I=new Set(N),L=function(t,e){return e&&"await"===t||"enum"===t};function B(t,e){return L(t,e)||S.has(t)}function O(t){return I.has(t)}function M(t,e){return B(t,e)||O(t)}var R=/^in(stanceof)?$/,_="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",j="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",q=new RegExp("["+_+"]"),U=new RegExp("["+_+j+"]");_=j=null;var V=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],z=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function W(t,e){for(var s=65536,i=0,a=e.length;i<a;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function K(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&q.test(String.fromCharCode(t)):W(t,V)))}function X(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&U.test(String.fromCharCode(t)):W(t,V)||W(t,z))))}var J=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void","interface","extends","_"];function H(t){return"type"===t.importKind||"typeof"===t.importKind}function G(t){return(t.type===o.name||!!t.type.keyword)&&"from"!==t.value}var Q={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var $=/\*?\s*@((?:no)?flow)\b/,Y={quot:'"',amp:"&",apos:"'",lt:"<",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:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Z=/^[\da-fA-F]+$/,tt=/^\d+$/;function et(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function st(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return st(t.object)+"."+st(t.property);throw new Error("Node had unexpected type: "+t.type)}F.j_oTag=new T("<tag",!1),F.j_cTag=new T("</tag",!1),F.j_expr=new T("<tag>...</tag>",!0,!0),o.jsxName=new i("jsxName"),o.jsxText=new i("jsxText",{beforeExpr:!0}),o.jsxTagStart=new i("jsxTagStart",{startsExpr:!0}),o.jsxTagEnd=new i("jsxTagEnd"),o.jsxTagStart.updateContext=function(){this.state.context.push(F.j_expr),this.state.context.push(F.j_oTag),this.state.exprAllowed=!1},o.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===F.j_oTag&&t===o.slash||e===F.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===F.j_expr):this.state.exprAllowed=!0};var it=function t(e){d(this,t),this.var=[],this.lexical=[],this.functions=[],this.flags=e},at=function(){function t(e,s){d(this,t),this.scopeStack=[],this.undefinedExports=new Map,this.raise=e,this.inModule=s}return m(t,[{key:"createScope",value:function(t){return new it(t)}},{key:"enter",value:function(t){this.scopeStack.push(this.createScope(t))}},{key:"exit",value:function(){this.scopeStack.pop()}},{key:"treatFunctionsAsVarInScope",value:function(t){return!!(t.flags&h||!this.inModule&&1&t.flags)}},{key:"declareName",value:function(t,e,s){var i=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(i,t,e,s),16&e?i.functions.push(t):i.lexical.push(t),8&e&&this.maybeExportDefined(i,t);else if(4&e)for(var a=this.scopeStack.length-1;a>=0&&(i=this.scopeStack[a],this.checkRedeclarationInScope(i,t,e,s),i.var.push(t),this.maybeExportDefined(i,t),!(i.flags&c));--a);this.inModule&&1&i.flags&&this.undefinedExports.delete(t)}},{key:"maybeExportDefined",value:function(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}},{key:"checkRedeclarationInScope",value:function(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.raise(i,"Identifier '".concat(e,"' has already been declared"))}},{key:"isRedeclaredInScope",value:function(t,e,s){return!!(1&s)&&(8&s?t.lexical.indexOf(e)>-1||t.functions.indexOf(e)>-1||t.var.indexOf(e)>-1:16&s?t.lexical.indexOf(e)>-1||!this.treatFunctionsAsVarInScope(t)&&t.var.indexOf(e)>-1:t.lexical.indexOf(e)>-1&&!(32&t.flags&&t.lexical[0]===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.indexOf(e)>-1)}},{key:"checkLocalExport",value:function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&-1===this.scopeStack[0].functions.indexOf(t.name)&&this.undefinedExports.set(t.name,t.start)}},{key:"currentScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"currentVarScope",value:function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&c)return e}}},{key:"currentThisScope",value:function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if((e.flags&c||256&e.flags)&&!(16&e.flags))return e}}},{key:"inFunction",get:function(){return(this.currentVarScope().flags&h)>0}},{key:"inGenerator",get:function(){return(this.currentVarScope().flags&l)>0}},{key:"inAsync",get:function(){return(this.currentVarScope().flags&u)>0}},{key:"allowSuper",get:function(){return(64&this.currentThisScope().flags)>0}},{key:"allowDirectSuper",get:function(){return(128&this.currentThisScope().flags)>0}},{key:"inNonArrowFunction",get:function(){return(this.currentThisScope().flags&h)>0}},{key:"treatFunctionsAsVar",get:function(){return this.treatFunctionsAsVarInScope(this.currentScope())}}]),t}(),rt=function(t){function e(){var t,s;d(this,e);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(s=g(this,(t=D(e)).call.apply(t,[this].concat(a)))).types=[],s.enums=[],s.constEnums=[],s.classes=[],s.exportOnlyBindings=[],s}return y(e,t),e}(it),nt=function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"createScope",value:function(t){return new rt(t)}},{key:"declareName",value:function(t,s,i){var a=this.currentScope();if(1024&s)return this.maybeExportDefined(a,t),void a.exportOnlyBindings.push(t);k(D(e.prototype),"declareName",this).apply(this,arguments),2&s&&(1&s||(this.checkRedeclarationInScope(a,t,s,i),this.maybeExportDefined(a,t)),a.types.push(t)),256&s&&a.enums.push(t),512&s&&a.constEnums.push(t),128&s&&a.classes.push(t)}},{key:"isRedeclaredInScope",value:function(t,s,i){if(t.enums.indexOf(s)>-1){if(256&i){var a=!!(512&i),r=t.constEnums.indexOf(s)>-1;return a!==r}return!0}return 128&i&&t.classes.indexOf(s)>-1?t.lexical.indexOf(s)>-1&&!!(1&i):!!(2&i&&t.types.indexOf(s)>-1)||k(D(e.prototype),"isRedeclaredInScope",this).apply(this,arguments)}},{key:"checkLocalExport",value:function(t){-1===this.scopeStack[0].types.indexOf(t.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(t.name)&&k(D(e.prototype),"checkLocalExport",this).call(this,t)}}]),e}(at);function ot(t){if(null==t)throw new Error("Unexpected ".concat(t," value."));return t}function ht(t){if(!t)throw new Error("Assert fail")}o.placeholder=new i("%%",{startsExpr:!0});function ut(t,e){return t.some((function(t){return Array.isArray(t)?t[0]===e:t===e}))}function lt(t,e,s){var i=t.find((function(t){return Array.isArray(t)?t[0]===e:t===e}));return i&&Array.isArray(i)?i[1][s]:null}var ct=["minimal","smart","fsharp"];var pt={estree:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"estreeParseRegExpLiteral",value:function(t){var e=t.pattern,s=t.flags,i=null;try{i=new RegExp(e,s)}catch(t){}var a=this.estreeParseLiteral(i);return a.regex={pattern:e,flags:s},a}},{key:"estreeParseLiteral",value:function(t){return this.parseLiteral(t,"Literal")}},{key:"directiveToStmt",value:function(t){var e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}},{key:"initFunction",value:function(t,s){k(D(e.prototype),"initFunction",this).call(this,t,s),t.expression=!1}},{key:"checkDeclaration",value:function(t){f(t)?this.checkDeclaration(t.value):k(D(e.prototype),"checkDeclaration",this).call(this,t)}},{key:"checkGetterSetterParams",value:function(t){var e=t,s="get"===e.kind?0:1,i=e.start;e.value.params.length!==s?"get"===e.kind?this.raise(i,"getter must not have any formal parameters"):this.raise(i,"setter must have exactly one formal parameter"):"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raise(i,"setter function argument must not be a rest parameter")}},{key:"checkLVal",value:function(t){var s=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,a=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;switch(t.type){case"ObjectPattern":t.properties.forEach((function(t){s.checkLVal("Property"===t.type?t.value:t,i,a,"object destructuring pattern",n)}));break;default:k(D(e.prototype),"checkLVal",this).call(this,t,i,a,r,n)}}},{key:"checkDuplicatedProto",value:function(t,e){if(!("SpreadElement"===t.type||t.computed||t.method||t.shorthand)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&"init"===t.kind&&(e.used&&!e.start&&(e.start=s.start),e.used=!0)}}},{key:"isStrictBody",value:function(t){if("BlockStatement"===t.body.type&&t.body.body.length>0)for(var e=0,s=t.body.body;e<s.length;e++){var i=s[e];if("ExpressionStatement"!==i.type||"Literal"!==i.expression.type)break;if("use strict"===i.expression.value)return!0}return!1}},{key:"isValidDirective",value:function(t){return!("ExpressionStatement"!==t.type||"Literal"!==t.expression.type||"string"!=typeof t.expression.value||t.expression.extra&&t.expression.extra.parenthesized)}},{key:"stmtToDirective",value:function(t){var s=k(D(e.prototype),"stmtToDirective",this).call(this,t),i=t.expression.value;return s.value.value=i,s}},{key:"parseBlockBody",value:function(t,s,i,a){var r=this;k(D(e.prototype),"parseBlockBody",this).call(this,t,s,i,a);var n=t.directives.map((function(t){return r.directiveToStmt(t)}));t.body=n.concat(t.body),delete t.directives}},{key:"pushClassMethod",value:function(t,e,s,i,a,r){this.parseMethod(e,s,i,a,r,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}},{key:"parseExprAtom",value:function(t){switch(this.state.type){case o.regexp:return this.estreeParseRegExpLiteral(this.state.value);case o.num:case o.string:return this.estreeParseLiteral(this.state.value);case o._null:return this.estreeParseLiteral(null);case o._true:return this.estreeParseLiteral(!0);case o._false:return this.estreeParseLiteral(!1);default:return k(D(e.prototype),"parseExprAtom",this).call(this,t)}}},{key:"parseLiteral",value:function(t,s,i,a){var r=k(D(e.prototype),"parseLiteral",this).call(this,t,s,i,a);return r.raw=r.extra.raw,delete r.extra,r}},{key:"parseFunctionBody",value:function(t,s){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];k(D(e.prototype),"parseFunctionBody",this).call(this,t,s,i),t.expression="BlockStatement"!==t.body.type}},{key:"parseMethod",value:function(t,s,i,a,r,n){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],h=this.startNode();return h.kind=t.kind,(h=k(D(e.prototype),"parseMethod",this).call(this,h,s,i,a,r,n,o)).type="FunctionExpression",delete h.kind,t.value=h,n="ClassMethod"===n?"MethodDefinition":n,this.finishNode(t,n)}},{key:"parseObjectMethod",value:function(t,s,i,a,r){var n=k(D(e.prototype),"parseObjectMethod",this).call(this,t,s,i,a,r);return n&&(n.type="Property","method"===n.kind&&(n.kind="init"),n.shorthand=!1),n}},{key:"parseObjectProperty",value:function(t,s,i,a,r){var n=k(D(e.prototype),"parseObjectProperty",this).call(this,t,s,i,a,r);return n&&(n.kind="init",n.type="Property"),n}},{key:"toAssignable",value:function(t,s,i){return f(t)?(this.toAssignable(t.value,s,i),t):k(D(e.prototype),"toAssignable",this).call(this,t,s,i)}},{key:"toAssignableObjectExpressionProp",value:function(t,s,i){if("get"===t.kind||"set"===t.kind)throw this.raise(t.key.start,"Object pattern can't contain getter or setter");if(t.method)throw this.raise(t.key.start,"Object pattern can't contain methods");k(D(e.prototype),"toAssignableObjectExpressionProp",this).call(this,t,s,i)}}]),e}(t)},jsx:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"jsxReadToken",value:function(){for(var t="",s=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated JSX contents");var i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:return this.state.pos===this.state.start?60===i&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.jsxTagStart)):k(D(e.prototype),"getTokenFromCode",this).call(this,i):(t+=this.input.slice(s,this.state.pos),this.finishToken(o.jsxText,t));case 38:t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos;break;default:C(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}},{key:"jsxReadNewLine",value:function(t){var e,s=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===s&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,e}},{key:"jsxReadString",value:function(t){for(var e="",s=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):C(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(o.string,e)}},{key:"jsxReadEntity",value:function(){for(var t,e="",s=0,i=this.input[this.state.pos],a=++this.state.pos;this.state.pos<this.length&&s++<10;){if(";"===(i=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),Z.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),tt.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=Y[e];break}e+=i}return t||(this.state.pos=a,"&")}},{key:"jsxReadWord",value:function(){var t,e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(X(t)||45===t);return this.finishToken(o.jsxName,this.input.slice(e,this.state.pos))}},{key:"jsxParseIdentifier",value:function(){var t=this.startNode();return this.match(o.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}},{key:"jsxParseNamespacedName",value:function(){var t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(o.colon))return s;var i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}},{key:"jsxParseElementName",value:function(){var t=this.state.start,e=this.state.startLoc,s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(o.dot);){var i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}},{key:"jsxParseAttributeValue",value:function(){var t;switch(this.state.type){case o.braceL:return t=this.startNode(),this.next(),"JSXEmptyExpression"===(t=this.jsxParseExpressionContainer(t)).expression.type&&this.raise(t.start,"JSX attributes must only be assigned a non-empty expression"),t;case o.jsxTagStart:case o.string:return this.parseExprAtom();default:throw this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}}},{key:"jsxParseEmptyExpression",value:function(){var t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}},{key:"jsxParseSpreadChild",value:function(t){return this.next(),t.expression=this.parseExpression(),this.expect(o.braceR),this.finishNode(t,"JSXSpreadChild")}},{key:"jsxParseExpressionContainer",value:function(t){return this.match(o.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(o.braceR),this.finishNode(t,"JSXExpressionContainer")}},{key:"jsxParseAttribute",value:function(){var t=this.startNode();return this.eat(o.braceL)?(this.expect(o.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(o.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(o.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}},{key:"jsxParseOpeningElementAt",value:function(t,e){var s=this.startNodeAt(t,e);return this.match(o.jsxTagEnd)?(this.expect(o.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}},{key:"jsxParseOpeningElementAfterName",value:function(t){for(var e=[];!this.match(o.slash)&&!this.match(o.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(o.slash),this.expect(o.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")}},{key:"jsxParseClosingElementAt",value:function(t,e){var s=this.startNodeAt(t,e);return this.match(o.jsxTagEnd)?(this.expect(o.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(o.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))}},{key:"jsxParseElementAt",value:function(t,e){var s=this.startNodeAt(t,e),i=[],a=this.jsxParseOpeningElementAt(t,e),r=null;if(!a.selfClosing){t:for(;;)switch(this.state.type){case o.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(o.slash)){r=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case o.jsxText:i.push(this.parseExprAtom());break;case o.braceL:var n=this.startNode();this.next(),this.match(o.ellipsis)?i.push(this.jsxParseSpreadChild(n)):i.push(this.jsxParseExpressionContainer(n));break;default:throw this.unexpected()}et(a)&&!et(r)?this.raise(r.start,"Expected corresponding JSX closing tag for <>"):!et(a)&&et(r)?this.raise(r.start,"Expected corresponding JSX closing tag for <"+st(a.name)+">"):et(a)||et(r)||st(r.name)!==st(a.name)&&this.raise(r.start,"Expected corresponding JSX closing tag for <"+st(a.name)+">")}if(et(a)?(s.openingFragment=a,s.closingFragment=r):(s.openingElement=a,s.closingElement=r),s.children=i,this.isRelational("<"))throw this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?");return et(a)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}},{key:"jsxParseElement",value:function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}},{key:"parseExprAtom",value:function(t){return this.match(o.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(o.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(o.jsxTagStart),this.jsxParseElement()):k(D(e.prototype),"parseExprAtom",this).call(this,t)}},{key:"getTokenFromCode",value:function(t){if(this.state.inPropertyName)return k(D(e.prototype),"getTokenFromCode",this).call(this,t);var s=this.curContext();if(s===F.j_expr)return this.jsxReadToken();if(s===F.j_oTag||s===F.j_cTag){if(K(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(o.jsxTagEnd);if((34===t||39===t)&&s===F.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(o.jsxTagStart)):k(D(e.prototype),"getTokenFromCode",this).call(this,t)}},{key:"updateContext",value:function(t){if(this.match(o.braceL)){var s=this.curContext();s===F.j_oTag?this.state.context.push(F.braceExpression):s===F.j_expr?this.state.context.push(F.templateQuasi):k(D(e.prototype),"updateContext",this).call(this,t),this.state.exprAllowed=!0}else{if(!this.match(o.slash)||t!==o.jsxTagStart)return k(D(e.prototype),"updateContext",this).call(this,t);this.state.context.length-=2,this.state.context.push(F.j_cTag),this.state.exprAllowed=!1}}}]),e}(t)},flow:function(t){return function(t){function e(t,s){var i;return d(this,e),(i=g(this,D(e).call(this,t,s))).flowPragma=void 0,i}return y(e,t),m(e,[{key:"shouldParseTypes",value:function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}},{key:"shouldParseEnums",value:function(){return!!this.getPluginOption("flow","enums")}},{key:"finishToken",value:function(t,s){return t!==o.string&&t!==o.semi&&t!==o.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),k(D(e.prototype),"finishToken",this).call(this,t,s)}},{key:"addComment",value:function(t){if(void 0===this.flowPragma){var s=$.exec(t.value);if(s)if("flow"===s[1])this.flowPragma="flow";else{if("noflow"!==s[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return k(D(e.prototype),"addComment",this).call(this,t)}},{key:"flowParseTypeInitialiser",value:function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||o.colon);var s=this.flowParseType();return this.state.inType=e,s}},{key:"flowParsePredicate",value:function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(o.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(o.parenL)?(t.value=this.parseExpression(),this.expect(o.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}},{key:"flowParseTypeAndPredicateInitialiser",value:function(){var t=this.state.inType;this.state.inType=!0,this.expect(o.colon);var e=null,s=null;return this.match(o.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(o.modulo)&&(s=this.flowParsePredicate())),[e,s]}},{key:"flowParseDeclareClass",value:function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}},{key:"flowParseDeclareFunction",value:function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(o.parenL);var a=this.flowParseFunctionTypeParams();s.params=a.params,s.rest=a.rest,this.expect(o.parenR);var r=P(this.flowParseTypeAndPredicateInitialiser(),2);return s.returnType=r[0],t.predicate=r[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.finishNode(t,"DeclareFunction")}},{key:"flowParseDeclare",value:function(t,e){if(this.match(o._class))return this.flowParseDeclareClass(t);if(this.match(o._function))return this.flowParseDeclareFunction(t);if(this.match(o._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(o.dot)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(o._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}},{key:"flowParseDeclareVariable",value:function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}},{key:"flowParseDeclareModule",value:function(t){var e=this;this.scope.enter(0),this.match(o.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(o.braceL);!this.match(o.braceR);){var a=this.startNode();this.match(o._import)?(this.next(),this.isContextual("type")||this.match(o._typeof)||this.raise(this.state.lastTokStart,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(a)):(this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(o.braceR),this.finishNode(s,"BlockStatement");var r=null,n=!1,h="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return i.forEach((function(t){!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(n&&e.raise(t.start,"Duplicate `declare module.exports` statement"),"ES"===r&&e.raise(t.start,h),r="CommonJS",n=!0):("CommonJS"===r&&e.raise(t.start,h),r="ES")})),t.kind=r||"CommonJS",this.finishNode(t,"DeclareModule")}},{key:"flowParseDeclareExportDeclaration",value:function(t,e){if(this.expect(o._export),this.eat(o._default))return this.match(o._function)||this.match(o._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(o._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=Q[s];this.unexpected(this.state.start,"`declare export ".concat(s,"` is not supported. Use `").concat(i,"` instead"))}if(this.match(o._var)||this.match(o._function)||this.match(o._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(o.star)||this.match(o.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}},{key:"flowParseDeclareModuleExports",value:function(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}},{key:"flowParseDeclareTypeAlias",value:function(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}},{key:"flowParseDeclareOpaqueType",value:function(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}},{key:"flowParseDeclareInterface",value:function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}},{key:"flowParseInterfaceish",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.id=this.flowParseRestrictedIdentifier(!e),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(o._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(o.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}},{key:"flowParseInterfaceExtends",value:function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}},{key:"flowParseInterface",value:function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}},{key:"checkNotUnderscore",value:function(t){"_"===t&&this.raise(this.state.start,"`_` is only allowed as a type argument to call or new")}},{key:"checkReservedType",value:function(t,e){J.indexOf(t)>-1&&this.raise(e,"Cannot overwrite reserved type ".concat(t))}},{key:"flowParseRestrictedIdentifier",value:function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)}},{key:"flowParseTypeAlias",value:function(t){return t.id=this.flowParseRestrictedIdentifier(),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(o.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}},{key:"flowParseOpaqueType",value:function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(o.colon)&&(t.supertype=this.flowParseTypeInitialiser(o.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(o.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}},{key:"flowParseTypeParameter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.state.start,s=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return s.name=a.name,s.variance=i,s.bound=a.typeAnnotation,this.match(o.eq)?(this.eat(o.eq),s.default=this.flowParseType()):t&&this.raise(e,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(s,"TypeParameter")}},{key:"flowParseTypeParameterDeclaration",value:function(){var t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(o.jsxTagStart)?this.next():this.unexpected();var s=!1;do{var i=this.flowParseTypeParameter(s);e.params.push(i),i.default&&(s=!0),this.isRelational(">")||this.expect(o.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}},{key:"flowParseTypeParameterInstantiation",value:function(){var t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");var s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(o.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}},{key:"flowParseTypeParameterInstantiationCallOrNew",value:function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(o.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}},{key:"flowParseInterfaceType",value:function(){var t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(o._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}},{key:"flowParseObjectPropertyKey",value:function(){return this.match(o.num)||this.match(o.string)?this.parseExprAtom():this.parseIdentifier(!0)}},{key:"flowParseObjectTypeIndexer",value:function(t,e,s){return t.static=e,this.lookahead().type===o.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(o.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}},{key:"flowParseObjectTypeInternalSlot",value:function(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(o.bracketR),this.expect(o.bracketR),this.isRelational("<")||this.match(o.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(o.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}},{key:"flowParseObjectTypeMethodish",value:function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(o.parenL);!this.match(o.parenR)&&!this.match(o.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(o.parenR)||this.expect(o.comma);return this.eat(o.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(o.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}},{key:"flowParseObjectTypeCallProperty",value:function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}},{key:"flowParseObjectType",value:function(t){var e=t.allowStatic,s=t.allowExact,i=t.allowSpread,a=t.allowProto,r=t.allowInexact,n=this.state.inType;this.state.inType=!0;var h,u,l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];var c=!1;for(s&&this.match(o.braceBarL)?(this.expect(o.braceBarL),h=o.braceBarR,u=!0):(this.expect(o.braceL),h=o.braceR,u=!1),l.exact=u;!this.match(h);){var p=!1,d=null,f=null,m=this.startNode();if(a&&this.isContextual("proto")){var y=this.lookahead();y.type!==o.colon&&y.type!==o.question&&(this.next(),d=this.state.start,e=!1)}if(e&&this.isContextual("static")){var D=this.lookahead();D.type!==o.colon&&D.type!==o.question&&(this.next(),p=!0)}var v=this.flowParseVariance();if(this.eat(o.bracketL))null!=d&&this.unexpected(d),this.eat(o.bracketL)?(v&&this.unexpected(v.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(m,p))):l.indexers.push(this.flowParseObjectTypeIndexer(m,p,v));else if(this.match(o.parenL)||this.isRelational("<"))null!=d&&this.unexpected(d),v&&this.unexpected(v.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(m,p));else{var x,g="init";if(this.isContextual("get")||this.isContextual("set")){var k=this.lookahead();k.type!==o.name&&k.type!==o.string&&k.type!==o.num||(g=this.state.value,this.next())}var P=this.flowParseObjectTypeProperty(m,p,d,v,g,i,null!==(x=r)&&void 0!==x?x:!u);null===P?(c=!0,f=this.state.lastTokStart):l.properties.push(P)}this.flowObjectTypeSemicolon(),!f||this.match(o.braceR)||this.match(o.braceBarR)||this.raise(f,"Explicit inexact syntax must appear at the end of an inexact object")}this.expect(h),i&&(l.inexact=c);var b=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=n,b}},{key:"flowParseObjectTypeProperty",value:function(t,e,s,i,a,r,n){if(this.eat(o.ellipsis))return this.match(o.comma)||this.match(o.semi)||this.match(o.braceR)||this.match(o.braceBarR)?(r?n||this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear inside an explicit exact object type"):this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear in class or interface definitions"),i&&this.raise(i.start,"Explicit inexact syntax cannot have variance"),null):(r||this.raise(this.state.lastTokStart,"Spread operator cannot appear in class or interface definitions"),null!=s&&this.unexpected(s),i&&this.raise(i.start,"Spread properties cannot have variance"),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=a;var h=!1;return this.isRelational("<")||this.match(o.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==a&&"set"!==a||this.flowCheckGetterSetterParams(t)):("init"!==a&&this.unexpected(),t.method=!1,this.eat(o.question)&&(h=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=h,this.finishNode(t,"ObjectTypeProperty")}},{key:"flowCheckGetterSetterParams",value:function(t){var e="get"===t.kind?0:1,s=t.start;t.value.params.length+(t.value.rest?1:0)!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&t.value.rest&&this.raise(s,"setter function argument must not be a rest parameter")}},{key:"flowObjectTypeSemicolon",value:function(){this.eat(o.semi)||this.eat(o.comma)||this.match(o.braceR)||this.match(o.braceBarR)||this.unexpected()}},{key:"flowParseQualifiedTypeIdentifier",value:function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(o.dot);){var a=this.startNodeAt(t,e);a.qualification=i,a.id=this.parseIdentifier(),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}},{key:"flowParseGenericType",value:function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}},{key:"flowParseTypeofType",value:function(){var t=this.startNode();return this.expect(o._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}},{key:"flowParseTupleType",value:function(){var t=this.startNode();for(t.types=[],this.expect(o.bracketL);this.state.pos<this.length&&!this.match(o.bracketR)&&(t.types.push(this.flowParseType()),!this.match(o.bracketR));)this.expect(o.comma);return this.expect(o.bracketR),this.finishNode(t,"TupleTypeAnnotation")}},{key:"flowParseFunctionTypeParam",value:function(){var t=null,e=!1,s=null,i=this.startNode(),a=this.lookahead();return a.type===o.colon||a.type===o.question?(t=this.parseIdentifier(),this.eat(o.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=t,i.optional=e,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")}},{key:"reinterpretTypeAsFunctionTypeParam",value:function(t){var e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}},{key:"flowParseFunctionTypeParams",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=null;!this.match(o.parenR)&&!this.match(o.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(o.parenR)||this.expect(o.comma);return this.eat(o.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}}},{key:"flowIdentToTypeAnnotation",value:function(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}}},{key:"flowParsePrimaryType",value:function(){var t,s,i=this.state.start,a=this.state.startLoc,r=this.startNode(),n=!1,h=this.state.noAnonFunctionType;switch(this.state.type){case o.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(i,a,r,this.parseIdentifier());case o.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case o.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case o.bracketL:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=h,s;case o.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(o.parenL),t=this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(o.parenR),this.expect(o.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case o.parenL:if(this.next(),!this.match(o.parenR)&&!this.match(o.ellipsis))if(this.match(o.name)){var u=this.lookahead().type;n=u!==o.question&&u!==o.colon}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=h,this.state.noAnonFunctionType||!(this.match(o.comma)||this.match(o.parenR)&&this.lookahead().type===o.arrow))return this.expect(o.parenR),s;this.eat(o.comma)}return t=s?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(o.parenR),this.expect(o.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case o.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case o._true:case o._false:return r.value=this.match(o._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case o.plusMin:if("-"===this.state.value){if(this.next(),this.match(o.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",r.start,r.loc.start);if(this.match(o.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",r.start,r.loc.start);throw this.raise(this.state.start,'Unexpected token, expected "number" or "bigint"')}this.unexpected();case o.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case o.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case o._void:return this.next(),this.finishNode(r,"VoidTypeAnnotation");case o._null:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case o._this:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case o.star:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){var l=this.state.type.label;return this.next(),k(D(e.prototype),"createIdentifier",this).call(this,r,l)}}throw this.unexpected()}},{key:"flowParsePostfixType",value:function(){for(var t=this.state.start,e=this.state.startLoc,s=this.flowParsePrimaryType();this.match(o.bracketL)&&!this.canInsertSemicolon();){var i=this.startNodeAt(t,e);i.elementType=s,this.expect(o.bracketL),this.expect(o.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s}},{key:"flowParsePrefixType",value:function(){var t=this.startNode();return this.eat(o.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}},{key:"flowParseAnonFunctionWithoutParens",value:function(){var t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(o.arrow)){var e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}},{key:"flowParseIntersectionType",value:function(){var t=this.startNode();this.eat(o.bitwiseAND);var e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(o.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}},{key:"flowParseUnionType",value:function(){var t=this.startNode();this.eat(o.bitwiseOR);var e=this.flowParseIntersectionType();for(t.types=[e];this.eat(o.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}},{key:"flowParseType",value:function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e}},{key:"flowParseTypeOrImplicitInstantiation",value:function(){if(this.state.type===o.name&&"_"===this.state.value){var t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}},{key:"flowParseTypeAnnotation",value:function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}},{key:"flowParseTypeAnnotatableIdentifier",value:function(t){var e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(o.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}},{key:"typeCastToParameter",value:function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}},{key:"flowParseVariance",value:function(){var t=null;return this.match(o.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}},{key:"parseFunctionBody",value:function(t,s){var i=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s?this.forwardNoArrowParamsConversionAt(t,(function(){return k(D(e.prototype),"parseFunctionBody",i).call(i,t,!0,a)})):k(D(e.prototype),"parseFunctionBody",this).call(this,t,!1,a)}},{key:"parseFunctionBodyAndFinish",value:function(t,s){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.match(o.colon)){var a=this.startNode(),r=this.flowParseTypeAndPredicateInitialiser(),n=P(r,2);a.typeAnnotation=n[0],t.predicate=n[1],t.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}k(D(e.prototype),"parseFunctionBodyAndFinish",this).call(this,t,s,i)}},{key:"parseStatement",value:function(t,s){if(this.state.strict&&this.match(o.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}if(this.shouldParseEnums()&&this.isContextual("enum")){var a=this.startNode();return this.next(),this.flowParseEnumDeclaration(a)}var r=k(D(e.prototype),"parseStatement",this).call(this,t,s);return void 0!==this.flowPragma||this.isValidDirective(r)||(this.flowPragma=null),r}},{key:"parseExpressionStatement",value:function(t,s){if("Identifier"===s.type)if("declare"===s.name){if(this.match(o._class)||this.match(o.name)||this.match(o._function)||this.match(o._var)||this.match(o._export))return this.flowParseDeclare(t)}else if(this.match(o.name)){if("interface"===s.name)return this.flowParseInterface(t);if("type"===s.name)return this.flowParseTypeAlias(t);if("opaque"===s.name)return this.flowParseOpaqueType(t,!1)}return k(D(e.prototype),"parseExpressionStatement",this).call(this,t,s)}},{key:"shouldParseExportDeclaration",value:function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||k(D(e.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"isExportDefaultSpecifier",value:function(){return(!this.match(o.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&k(D(e.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseExportDefaultExpression",value:function(){if(this.shouldParseEnums()&&this.isContextual("enum")){var t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return k(D(e.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseConditional",value:function(t,s,i,a,r){var n=this;if(!this.match(o.question))return t;if(r){var h=this.tryParse((function(){return k(D(e.prototype),"parseConditional",n).call(n,t,s,i,a)}));return h.node?(h.error&&(this.state=h.failState),h.node):(r.start=h.error.pos||this.state.start,t)}this.expect(o.question);var u=this.state.clone(),l=this.state.noArrowAt,c=this.startNodeAt(i,a),p=this.tryParseConditionalConsequent(),d=p.consequent,f=p.failed,m=P(this.getArrowLikeExpressions(d),2),y=m[0],v=m[1];if(f||v.length>0){var x=b(l);if(v.length>0){this.state=u,this.state.noArrowAt=x;for(var g=0;g<v.length;g++)x.push(v[g].start);var E=this.tryParseConditionalConsequent();d=E.consequent,f=E.failed;var C=P(this.getArrowLikeExpressions(d),2);y=C[0],v=C[1]}if(f&&y.length>1&&this.raise(u.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),f&&1===y.length){this.state=u,this.state.noArrowAt=x.concat(y[0].start);var A=this.tryParseConditionalConsequent();d=A.consequent,f=A.failed}}return this.getArrowLikeExpressions(d,!0),this.state.noArrowAt=l,this.expect(o.colon),c.test=t,c.consequent=d,c.alternate=this.forwardNoArrowParamsConversionAt(c,(function(){return n.parseMaybeAssign(s,void 0,void 0,void 0)})),this.finishNode(c,"ConditionalExpression")}},{key:"tryParseConditionalConsequent",value:function(){this.state.noArrowParamsConversionAt.push(this.state.start);var t=this.parseMaybeAssign(),e=!this.match(o.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}},{key:"getArrowLikeExpressions",value:function(t,e){for(var s=this,i=[t],a=[];0!==i.length;){var r=i.pop();"ArrowFunctionExpression"===r.type?(r.typeParameters||!r.returnType?this.finishArrowValidation(r):a.push(r),i.push(r.body)):"ConditionalExpression"===r.type&&(i.push(r.consequent),i.push(r.alternate))}return e?(a.forEach((function(t){return s.finishArrowValidation(t)})),[a,[]]):function(t,e){for(var s=[],i=[],a=0;a<t.length;a++)(e(t[a],a,t)?s:i).push(t[a]);return[s,i]}(a,(function(t){return t.params.every((function(t){return s.isAssignable(t,!0)}))}))}},{key:"finishArrowValidation",value:function(t){var s;this.toAssignableList(t.params,!0,"arrow function parameters",null===(s=t.extra)||void 0===s?void 0:s.trailingComma),this.scope.enter(16|p(!1,!1)),k(D(e.prototype),"checkParams",this).call(this,t,!1,!0),this.scope.exit()}},{key:"forwardNoArrowParamsConversionAt",value:function(t,e){var s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}},{key:"parseParenItem",value:function(t,s,i){if(t=k(D(e.prototype),"parseParenItem",this).call(this,t,s,i),this.eat(o.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(o.colon)){var a=this.startNodeAt(s,i);return a.expression=t,a.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(a,"TypeCastExpression")}return t}},{key:"assertModuleNodeAllowed",value:function(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||k(D(e.prototype),"assertModuleNodeAllowed",this).call(this,t)}},{key:"parseExport",value:function(t){var s=k(D(e.prototype),"parseExport",this).call(this,t);return"ExportNamedDeclaration"!==s.type&&"ExportAllDeclaration"!==s.type||(s.exportKind=s.exportKind||"value"),s}},{key:"parseExportDeclaration",value:function(t){if(this.isContextual("type")){t.exportKind="type";var s=this.startNode();return this.next(),this.match(o.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(s)}if(this.isContextual("opaque")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}if(this.isContextual("interface")){t.exportKind="type";var a=this.startNode();return this.next(),this.flowParseInterface(a)}if(this.shouldParseEnums()&&this.isContextual("enum")){t.exportKind="value";var r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return k(D(e.prototype),"parseExportDeclaration",this).call(this,t)}},{key:"eatExportStar",value:function(t){return!!k(D(e.prototype),"eatExportStar",this).apply(this,arguments)||!(!this.isContextual("type")||this.lookahead().type!==o.star)&&(t.exportKind="type",this.next(),this.next(),!0)}},{key:"maybeParseExportNamespaceSpecifier",value:function(t){var s=this.state.start,i=k(D(e.prototype),"maybeParseExportNamespaceSpecifier",this).call(this,t);return i&&"type"===t.exportKind&&this.unexpected(s),i}},{key:"parseClassId",value:function(t,s,i){k(D(e.prototype),"parseClassId",this).call(this,t,s,i),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}},{key:"getTokenFromCode",value:function(t){var s=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===s?this.finishOp(o.braceBarL,2):!this.state.inType||62!==t&&60!==t?function(t,e){return 64===t&&64===e}(t,s)?(this.state.isIterator=!0,k(D(e.prototype),"readWord",this).call(this)):k(D(e.prototype),"getTokenFromCode",this).call(this,t):this.finishOp(o.relational,1)}},{key:"isAssignable",value:function(t,e){var s=this;switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":return!0;case"ObjectExpression":var i=t.properties.length-1;return t.properties.every((function(t,e){return"ObjectMethod"!==t.type&&(e===i||"SpreadElement"===t.type)&&s.isAssignable(t)}));case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every((function(t){return s.isAssignable(t)}));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":case"TypeCastExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}},{key:"toAssignable",value:function(t,s,i){return"TypeCastExpression"===t.type?k(D(e.prototype),"toAssignable",this).call(this,this.typeCastToParameter(t),s,i):k(D(e.prototype),"toAssignable",this).call(this,t,s,i)}},{key:"toAssignableList",value:function(t,s,i,a){for(var r=0;r<t.length;r++){var n=t[r];n&&"TypeCastExpression"===n.type&&(t[r]=this.typeCastToParameter(n))}return k(D(e.prototype),"toAssignableList",this).call(this,t,s,i,a)}},{key:"toReferencedList",value:function(t,e){for(var s=0;s<t.length;s++){var i=t[s];!i||"TypeCastExpression"!==i.type||i.extra&&i.extra.parenthesized||!(t.length>1)&&e||this.raise(i.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return t}},{key:"checkLVal",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if("TypeCastExpression"!==t.type)return k(D(e.prototype),"checkLVal",this).call(this,t,s,i,a)}},{key:"parseClassProperty",value:function(t){return this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),k(D(e.prototype),"parseClassProperty",this).call(this,t)}},{key:"parseClassPrivateProperty",value:function(t){return this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),k(D(e.prototype),"parseClassPrivateProperty",this).call(this,t)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||k(D(e.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(o.colon)||k(D(e.prototype),"isClassProperty",this).call(this)}},{key:"isNonstaticConstructor",value:function(t){return!this.match(o.colon)&&k(D(e.prototype),"isNonstaticConstructor",this).call(this,t)}},{key:"pushClassMethod",value:function(t,s,i,a,r,n){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),k(D(e.prototype),"pushClassMethod",this).call(this,t,s,i,a,r,n)}},{key:"pushClassPrivateMethod",value:function(t,s,i,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),k(D(e.prototype),"pushClassPrivateMethod",this).call(this,t,s,i,a)}},{key:"parseClassSuper",value:function(t){if(k(D(e.prototype),"parseClassSuper",this).call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=t.implements=[];do{var i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(o.comma))}}},{key:"parsePropertyName",value:function(t){var s=this.flowParseVariance(),i=k(D(e.prototype),"parsePropertyName",this).call(this,t);return t.variance=s,i}},{key:"parseObjPropValue",value:function(t,s,i,a,r,n,h,u){var l;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(l=this.flowParseTypeParameterDeclaration(),this.match(o.parenL)||this.unexpected()),k(D(e.prototype),"parseObjPropValue",this).call(this,t,s,i,a,r,n,h,u),l&&((t.value||t).typeParameters=l)}},{key:"parseAssignableListItemTypes",value:function(t){return this.eat(o.question)&&("Identifier"!==t.type&&this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature."),t.optional=!0),this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(t),t}},{key:"parseMaybeDefault",value:function(t,s,i){var a=k(D(e.prototype),"parseMaybeDefault",this).call(this,t,s,i);return"AssignmentPattern"===a.type&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(a.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),a}},{key:"shouldParseDefaultImport",value:function(t){return H(t)?G(this.state):k(D(e.prototype),"shouldParseDefaultImport",this).call(this,t)}},{key:"parseImportSpecifierLocal",value:function(t,e,s,i){e.local=H(t)?this.flowParseRestrictedIdentifier(!0):this.parseIdentifier(),this.checkLVal(e.local,9,void 0,i),t.specifiers.push(this.finishNode(e,s))}},{key:"maybeParseDefaultImportSpecifier",value:function(t){t.importKind="value";var s=null;if(this.match(o._typeof)?s="typeof":this.isContextual("type")&&(s="type"),s){var i=this.lookahead();"type"===s&&i.type===o.star&&this.unexpected(i.start),(G(i)||i.type===o.braceL||i.type===o.star)&&(this.next(),t.importKind=s)}return k(D(e.prototype),"maybeParseDefaultImportSpecifier",this).call(this,t)}},{key:"parseImportSpecifier",value:function(t){var e=this.startNode(),s=this.state.start,i=this.parseIdentifier(!0),a=null;"type"===i.name?a="type":"typeof"===i.name&&(a="typeof");var r=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){var n=this.parseIdentifier(!0);null===a||this.match(o.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=n,e.importKind=a,e.local=n.__clone())}else null!==a&&(this.match(o.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=a,this.eatContextual("as")?e.local=this.parseIdentifier():(r=!0,e.local=e.imported.__clone())):(r=!0,e.imported=i,e.importKind=null,e.local=e.imported.__clone());var h=H(t),u=H(e);h&&u&&this.raise(s,"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements"),(h||u)&&this.checkReservedType(e.local.name,e.local.start),!r||h||u||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,9,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}},{key:"parseFunctionParams",value:function(t,s){var i=t.kind;"get"!==i&&"set"!==i&&this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),k(D(e.prototype),"parseFunctionParams",this).call(this,t,s)}},{key:"parseVarId",value:function(t,s){k(D(e.prototype),"parseVarId",this).call(this,t,s),this.match(o.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}},{key:"parseAsyncArrowFromCallExpression",value:function(t,s){if(this.match(o.colon)){var i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return k(D(e.prototype),"parseAsyncArrowFromCallExpression",this).call(this,t,s)}},{key:"shouldParseAsyncArrow",value:function(){return this.match(o.colon)||k(D(e.prototype),"shouldParseAsyncArrow",this).call(this)}},{key:"parseMaybeAssign",value:function(t,s,i,a){var r,n=this,h=null;if(this.hasPlugin("jsx")&&(this.match(o.jsxTagStart)||this.isRelational("<"))){if(h=this.state.clone(),!(r=this.tryParse((function(){return k(D(e.prototype),"parseMaybeAssign",n).call(n,t,s,i,a)}),h)).error)return r.node;var u=this.state.context;u[u.length-1]===F.j_oTag?u.length-=2:u[u.length-1]===F.j_expr&&(u.length-=1)}if(r&&r.error||this.isRelational("<")){var l;h=h||this.state.clone();var c=this.tryParse((function(){l=n.flowParseTypeParameterDeclaration();var r=n.forwardNoArrowParamsConversionAt(l,(function(){return k(D(e.prototype),"parseMaybeAssign",n).call(n,t,s,i,a)}));return r.typeParameters=l,n.resetStartLocationFromNode(r,l),r}),h),p=c.node&&"ArrowFunctionExpression"===c.node.type?c.node:null;if(!c.error&&p)return p;if(r&&r.node)return this.state=r.failState,r.node;if(p)return this.state=c.failState,p;if(r&&r.thrown)throw r.error;if(c.thrown)throw c.error;throw this.raise(l.start,"Expected an arrow function after this type parameter declaration")}return k(D(e.prototype),"parseMaybeAssign",this).call(this,t,s,i,a)}},{key:"parseArrow",value:function(t){var s=this;if(this.match(o.colon)){var i=this.tryParse((function(){var e=s.state.noAnonFunctionType;s.state.noAnonFunctionType=!0;var i=s.startNode(),a=P(s.flowParseTypeAndPredicateInitialiser(),2);return i.typeAnnotation=a[0],t.predicate=a[1],s.state.noAnonFunctionType=e,s.canInsertSemicolon()&&s.unexpected(),s.match(o.arrow)||s.unexpected(),i}));if(i.thrown)return null;i.error&&(this.state=i.failState),t.returnType=i.node.typeAnnotation?this.finishNode(i.node,"TypeAnnotation"):null}return k(D(e.prototype),"parseArrow",this).call(this,t)}},{key:"shouldParseArrow",value:function(){return this.match(o.colon)||k(D(e.prototype),"shouldParseArrow",this).call(this)}},{key:"setArrowFunctionParameters",value:function(t,s){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=s:k(D(e.prototype),"setArrowFunctionParameters",this).call(this,t,s)}},{key:"checkParams",value:function(t,s,i){if(!i||-1===this.state.noArrowParamsConversionAt.indexOf(t.start))return k(D(e.prototype),"checkParams",this).apply(this,arguments)}},{key:"parseParenAndDistinguishExpression",value:function(t){return k(D(e.prototype),"parseParenAndDistinguishExpression",this).call(this,t&&-1===this.state.noArrowAt.indexOf(this.state.start))}},{key:"parseSubscripts",value:function(t,s,i,a){var r=this;if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(s)){this.next();var n=this.startNodeAt(s,i);n.callee=t,n.arguments=this.parseCallExpressionArguments(o.parenR,!1),t=this.finishNode(n,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.isRelational("<")){var h=this.state.clone(),u=this.tryParse((function(t){return r.parseAsyncArrowWithTypeParameters(s,i)||t()}),h);if(!u.error&&!u.aborted)return u.node;var l=this.tryParse((function(){return k(D(e.prototype),"parseSubscripts",r).call(r,t,s,i,a)}),h);if(l.node&&!l.error)return l.node;if(u.node)return this.state=u.failState,u.node;if(l.node)return this.state=l.failState,l.node;throw u.error||l.error}return k(D(e.prototype),"parseSubscripts",this).call(this,t,s,i,a)}},{key:"parseSubscript",value:function(t,s,i,a,r){var n=this;if(this.match(o.questionDot)&&this.isLookaheadRelational("<")){if(this.expectPlugin("optionalChaining"),r.optionalChainMember=!0,a)return r.stop=!0,t;this.next();var h=this.startNodeAt(s,i);return h.callee=t,h.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(o.parenL),h.arguments=this.parseCallExpressionArguments(o.parenR,!1),h.optional=!0,this.finishCallExpression(h,!0)}if(!a&&this.shouldParseTypes()&&this.isRelational("<")){var u=this.startNodeAt(s,i);u.callee=t;var l=this.tryParse((function(){return u.typeArguments=n.flowParseTypeParameterInstantiationCallOrNew(),n.expect(o.parenL),u.arguments=n.parseCallExpressionArguments(o.parenR,!1),r.optionalChainMember&&(u.optional=!1),n.finishCallExpression(u,r.optionalChainMember)}));if(l.node)return l.error&&(this.state=l.failState),l.node}return k(D(e.prototype),"parseSubscript",this).call(this,t,s,i,a,r)}},{key:"parseNewArguments",value:function(t){var s=this,i=null;this.shouldParseTypes()&&this.isRelational("<")&&(i=this.tryParse((function(){return s.flowParseTypeParameterInstantiationCallOrNew()})).node),t.typeArguments=i,k(D(e.prototype),"parseNewArguments",this).call(this,t)}},{key:"parseAsyncArrowWithTypeParameters",value:function(t,e){var s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}},{key:"readToken_mult_modulo",value:function(t){var s=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===s&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();k(D(e.prototype),"readToken_mult_modulo",this).call(this,t)}},{key:"readToken_pipe_amp",value:function(t){var s=this.input.charCodeAt(this.state.pos+1);124!==t||125!==s?k(D(e.prototype),"readToken_pipe_amp",this).call(this,t):this.finishOp(o.braceBarR,2)}},{key:"parseTopLevel",value:function(t,s){var i=k(D(e.prototype),"parseTopLevel",this).call(this,t,s);return this.state.hasFlowComment&&this.raise(this.state.pos,"Unterminated flow-comment"),i}},{key:"skipBlockComment",value:function(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,"Cannot have a flow comment inside another flow comment"),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){var t=this.input.indexOf("*-/",this.state.pos+=2);if(-1===t)throw this.raise(this.state.pos-2,"Unterminated comment");this.state.pos=t+3}else k(D(e.prototype),"skipBlockComment",this).call(this)}},{key:"skipFlowComment",value:function(){for(var t=this.state.pos,e=2;-1!==[32,9].indexOf(this.input.charCodeAt(t+e));)e++;var s=this.input.charCodeAt(e+t),i=this.input.charCodeAt(e+t+1);return 58===s&&58===i?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==i&&e}},{key:"hasFlowCommentCompletion",value:function(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,"Unterminated comment")}},{key:"flowEnumErrorBooleanMemberNotInitialized",value:function(t,e){var s=e.enumName,i=e.memberName;this.raise(t,"Boolean enum members need to be initialized. Use either `".concat(i," = true,` ")+"or `".concat(i," = false,` in enum `").concat(s,"`."))}},{key:"flowEnumErrorInvalidMemberName",value:function(t,e){var s=e.enumName,i=e.memberName,a=i[0].toUpperCase()+i.slice(1);this.raise(t,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using "+"`".concat(i,"`, consider using `").concat(a,"`, in enum `").concat(s,"`."))}},{key:"flowEnumErrorDuplicateMemberName",value:function(t,e){var s=e.enumName,i=e.memberName;this.raise(t,"Enum member names need to be unique, but the name `".concat(i,"` has already been used ")+"before in enum `".concat(s,"`."))}},{key:"flowEnumErrorInconsistentMemberValues",value:function(t,e){var s=e.enumName;this.raise(t,"Enum `".concat(s,"` has inconsistent member initializers. Either use no initializers, or ")+"consistently use literals (either booleans, numbers, or strings) for all member initializers.")}},{key:"flowEnumErrorInvalidExplicitType",value:function(t,e){var s=e.enumName,i=e.suppliedType,a="Use one of `boolean`, `number`, `string`, or `symbol` in "+"enum `".concat(s,"`."),r=null===i?"Supplied enum type is not valid. ".concat(a):"Enum type `".concat(i,"` is not valid. ").concat(a);return this.raise(t,r)}},{key:"flowEnumErrorInvalidMemberInitializer",value:function(t,e){var s=e.enumName,i=e.explicitType,a=e.memberName,r=null;switch(i){case"boolean":case"number":case"string":r="Enum `".concat(s,"` has type `").concat(i,"`, so the initializer of ")+"`".concat(a,"` needs to be a ").concat(i," literal.");break;case"symbol":r="Symbol enum members cannot be initialized. Use `".concat(a,",` in ")+"enum `".concat(s,"`.");break;default:r="The enum member initializer for `".concat(a,"` needs to be a literal (either ")+"a boolean, number, or string) in enum `".concat(s,"`.")}return this.raise(t,r)}},{key:"flowEnumErrorNumberMemberNotInitialized",value:function(t,e){var s=e.enumName,i=e.memberName;this.raise(t,"Number enum members need to be initialized, e.g. `".concat(i," = 1` in enum `").concat(s,"`."))}},{key:"flowEnumErrorStringMemberInconsistentlyInitailized",value:function(t,e){var s=e.enumName;this.raise(t,"String enum members need to consistently either all use initializers, or use no initializers, "+"in enum `".concat(s,"`."))}},{key:"flowEnumMemberInit",value:function(){var t=this,e=this.state.start,s=function(){return t.match(o.comma)||t.match(o.braceR)};switch(this.state.type){case o.num:var i=this.parseLiteral(this.state.value,"NumericLiteral");return s()?{type:"number",pos:i.start,value:i}:{type:"invalid",pos:e};case o.string:var a=this.parseLiteral(this.state.value,"StringLiteral");return s()?{type:"string",pos:a.start,value:a}:{type:"invalid",pos:e};case o._true:case o._false:var r=this.parseBooleanLiteral();return s()?{type:"boolean",pos:r.start,value:r}:{type:"invalid",pos:e};default:return{type:"invalid",pos:e}}}},{key:"flowEnumMemberRaw",value:function(){var t=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(o.eq)?this.flowEnumMemberInit():{type:"none",pos:t}}}},{key:"flowEnumCheckExplicitTypeMismatch",value:function(t,e,s){var i=e.explicitType;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(t,e)}},{key:"flowEnumMembers",value:function(t){for(var e=t.enumName,s=t.explicitType,i=new Set,a={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};!this.match(o.braceR);){var r=this.startNode(),n=this.flowEnumMemberRaw(),h=n.id,u=n.init,l=h.name;if(""!==l){/^[a-z]/.test(l)&&this.flowEnumErrorInvalidMemberName(h.start,{enumName:e,memberName:l}),i.has(l)&&this.flowEnumErrorDuplicateMemberName(h.start,{enumName:e,memberName:l}),i.add(l);var c={enumName:e,explicitType:s,memberName:l};switch(r.id=h,u.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(u.pos,c,"boolean"),r.init=u.value,a.booleanMembers.push(this.finishNode(r,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(u.pos,c,"number"),r.init=u.value,a.numberMembers.push(this.finishNode(r,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(u.pos,c,"string"),r.init=u.value,a.stringMembers.push(this.finishNode(r,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.pos,c);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.pos,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.pos,c);break;default:a.defaultedMembers.push(this.finishNode(r,"EnumDefaultedMember"))}}this.match(o.braceR)||this.expect(o.comma)}}return a}},{key:"flowEnumStringBody",value:function(t,e,s,i){var a=i.enumName;if(0===e.length)t.members=s;else if(0===s.length)t.members=e;else if(s.length>e.length){t.members=s;for(var r=0;r<e.length;r++){var n=e[r];this.flowEnumErrorStringMemberInconsistentlyInitailized(n.start,{enumName:a})}}else{t.members=e;for(var o=0;o<s.length;o++){var h=s[o];this.flowEnumErrorStringMemberInconsistentlyInitailized(h.start,{enumName:a})}}return this.finishNode(t,"EnumStringBody")}},{key:"flowEnumParseExplicitType",value:function(t){var e=t.enumName;if(this.eatContextual("of")){if(!this.match(o.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:null});var s=this.state.value;return this.next(),"boolean"!==s&&"number"!==s&&"string"!==s&&"symbol"!==s&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:s}),s}return null}},{key:"flowParseEnumDeclaration",value:function(t){var e=this,s=this.parseIdentifier();t.id=s;var i=s.name,a=this.flowEnumParseExplicitType({enumName:i});this.expect(o.braceL);var r=this.startNode(),n=this.flowEnumMembers({enumName:i,explicitType:a});switch(a){case"boolean":r.explicitType=!0,r.members=n.booleanMembers,t.body=this.finishNode(r,"EnumBooleanBody");break;case"number":r.explicitType=!0,r.members=n.numberMembers,t.body=this.finishNode(r,"EnumNumberBody");break;case"string":r.explicitType=!0,t.body=this.flowEnumStringBody(r,n.stringMembers,n.defaultedMembers,{enumName:i});break;case"symbol":r.members=n.defaultedMembers,t.body=this.finishNode(r,"EnumSymbolBody");break;default:var h=function(){return r.members=[],e.finishNode(r,"EnumStringBody")};r.explicitType=!1;var u=n.booleanMembers.length,l=n.numberMembers.length,c=n.stringMembers.length,p=n.defaultedMembers.length;if(u||l||c||p)if(u||l)if(!l&&!c&&u>=p){r.members=n.booleanMembers,t.body=this.finishNode(r,"EnumBooleanBody");for(var d=0,f=n.defaultedMembers;d<f.length;d++){var m=f[d];this.flowEnumErrorBooleanMemberNotInitialized(m.start,{enumName:i,memberName:m.id.name})}}else if(!u&&!c&&l>=p){r.members=n.numberMembers,t.body=this.finishNode(r,"EnumNumberBody");for(var y=0,D=n.defaultedMembers;y<D.length;y++){var v=D[y];this.flowEnumErrorNumberMemberNotInitialized(v.start,{enumName:i,memberName:v.id.name})}}else t.body=h(),this.flowEnumErrorInconsistentMemberValues(s.start,{enumName:i});else t.body=this.flowEnumStringBody(r,n.stringMembers,n.defaultedMembers,{enumName:i});else t.body=h()}return this.expect(o.braceR),this.finishNode(t,"EnumDeclaration")}}]),e}(t)},typescript:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"getScopeHandler",value:function(){return nt}},{key:"tsIsIdentifier",value:function(){return this.match(o.name)}},{key:"tsNextTokenCanFollowModifier",value:function(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(o.parenL)||this.match(o.parenR)||this.match(o.colon)||this.match(o.eq)||this.match(o.question)||this.match(o.bang))}},{key:"tsParseModifier",value:function(t){if(this.match(o.name)){var e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}}},{key:"tsParseModifiers",value:function(t){for(var e=Object.create(null);;){var s=this.state.start,i=this.tsParseModifier(t);if(!i)break;Object.hasOwnProperty.call(e,i)&&this.raise(s,"Duplicate modifier: '".concat(i,"'")),e[i]=!0}return e}},{key:"tsIsListTerminator",value:function(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(o.braceR);case"HeritageClauseElement":return this.match(o.braceL);case"TupleElementTypes":return this.match(o.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}},{key:"tsParseList",value:function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s}},{key:"tsParseDelimitedList",value:function(t,e){return ot(this.tsParseDelimitedListWorker(t,e,!0))}},{key:"tsParseDelimitedListWorker",value:function(t,e,s){for(var i=[];!this.tsIsListTerminator(t);){var a=e();if(null==a)return;if(i.push(a),!this.eat(o.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(o.comma))}}return i}},{key:"tsParseBracketedList",value:function(t,e,s,i){i||(s?this.expect(o.bracketL):this.expectRelational("<"));var a=this.tsParseDelimitedList(t,e);return s?this.expect(o.bracketR):this.expectRelational(">"),a}},{key:"tsParseImportType",value:function(){var t=this.startNode();return this.expect(o._import),this.expect(o.parenL),this.match(o.string)||this.raise(this.state.start,"Argument in a type import must be a string literal"),t.argument=this.parseExprAtom(),this.expect(o.parenR),this.eat(o.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}},{key:"tsParseEntityName",value:function(t){for(var e=this.parseIdentifier();this.eat(o.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}},{key:"tsParseTypeReference",value:function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}},{key:"tsParseThisTypePredicate",value:function(t){this.next();var e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")}},{key:"tsParseThisTypeNode",value:function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}},{key:"tsParseTypeQuery",value:function(){var t=this.startNode();return this.expect(o._typeof),this.match(o._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}},{key:"tsParseTypeParameter",value:function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(o._extends),t.default=this.tsEatThenParseType(o.eq),this.finishNode(t,"TSTypeParameter")}},{key:"tsTryParseTypeParameters",value:function(){if(this.isRelational("<"))return this.tsParseTypeParameters()}},{key:"tsParseTypeParameters",value:function(){var t=this.startNode();return this.isRelational("<")||this.match(o.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")}},{key:"tsTryNextParseConstantContext",value:function(){return this.lookahead().type===o._const?(this.next(),this.tsParseTypeReference()):null}},{key:"tsFillSignature",value:function(t,e){var s=t===o.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(o.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}},{key:"tsParseBindingListForSignature",value:function(){var t=this;return this.parseBindingList(o.parenR,41).map((function(e){return"Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&t.raise(e.start,"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern,"+"instead got ".concat(e.type)),e}))}},{key:"tsParseTypeMemberSemicolon",value:function(){this.eat(o.comma)||this.semicolon()}},{key:"tsParseSignatureMember",value:function(t,e){return this.tsFillSignature(o.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}},{key:"tsIsUnambiguouslyIndexSignature",value:function(){return this.next(),this.eat(o.name)&&this.match(o.colon)}},{key:"tsTryParseIndexSignature",value:function(t){if(this.match(o.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(o.bracketL);var e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(o.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}}},{key:"tsParsePropertyOrMethodSignature",value:function(t,e){this.eat(o.question)&&(t.optional=!0);var s=t;if(e||!this.match(o.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var r=s;return this.tsFillSignature(o.colon,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSMethodSignature")}},{key:"tsParseTypeMember",value:function(){var t=this.startNode();if(this.match(o.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(o._new)){var e=this.startNode();return this.next(),this.match(o.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}var s=!!this.tsParseModifier(["readonly"]),i=this.tsTryParseIndexSignature(t);return i?(s&&(t.readonly=!0),i):(this.parsePropertyName(t),this.tsParsePropertyOrMethodSignature(t,s))}},{key:"tsParseTypeLiteral",value:function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}},{key:"tsParseObjectTypeMembers",value:function(){this.expect(o.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(o.braceR),t}},{key:"tsIsStartOfMappedType",value:function(){return this.next(),this.eat(o.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(o.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(o._in))))}},{key:"tsParseMappedTypeParameter",value:function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(o._in),this.finishNode(t,"TSTypeParameter")}},{key:"tsParseMappedType",value:function(){var t=this.startNode();return this.expect(o.braceL),this.match(o.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(o.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(o.bracketR),this.match(o.plusMin)?(t.optional=this.state.value,this.next(),this.expect(o.question)):this.eat(o.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(o.braceR),this.finishNode(t,"TSMappedType")}},{key:"tsParseTupleType",value:function(){var t=this,e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var s=!1;return e.elementTypes.forEach((function(e){"TSOptionalType"===e.type?s=!0:s&&"TSRestType"!==e.type&&t.raise(e.start,"A required element cannot follow an optional element.")})),this.finishNode(e,"TSTupleType")}},{key:"tsParseTupleElementType",value:function(){if(this.match(o.ellipsis)){var t=this.startNode();return this.next(),t.typeAnnotation=this.tsParseType(),this.checkCommaAfterRest(93),this.finishNode(t,"TSRestType")}var e=this.tsParseType();if(this.eat(o.question)){var s=this.startNodeAtNode(e);return s.typeAnnotation=e,this.finishNode(s,"TSOptionalType")}return e}},{key:"tsParseParenthesizedType",value:function(){var t=this.startNode();return this.expect(o.parenL),t.typeAnnotation=this.tsParseType(),this.expect(o.parenR),this.finishNode(t,"TSParenthesizedType")}},{key:"tsParseFunctionOrConstructorType",value:function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(o._new),this.tsFillSignature(o.arrow,e),this.finishNode(e,t)}},{key:"tsParseLiteralTypeNode",value:function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case o.num:case o.string:case o._true:case o._false:return t.parseExprAtom();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")}},{key:"tsParseTemplateLiteralType",value:function(){var t=this.startNode(),e=this.parseTemplate(!1);return e.expressions.length>0&&this.raise(e.expressions[0].start,"Template literal types cannot have any substitution"),t.literal=e,this.finishNode(t,"TSLiteralType")}},{key:"tsParseNonArrayType",value:function(){switch(this.state.type){case o.name:case o._void:case o._null:var t=this.match(o._void)?"TSVoidKeyword":this.match(o._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case o.string:case o.num:case o._true:case o._false:return this.tsParseLiteralTypeNode();case o.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.lookahead().type!==o.num)throw this.unexpected();return s.literal=this.parseMaybeUnary(),this.finishNode(s,"TSLiteralType")}break;case o._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case o._typeof:return this.tsParseTypeQuery();case o._import:return this.tsParseImportType();case o.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case o.bracketL:return this.tsParseTupleType();case o.parenL:return this.tsParseParenthesizedType();case o.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}},{key:"tsParseArrayTypeOrHigher",value:function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(o.bracketL);)if(this.match(o.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(o.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(o.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t}},{key:"tsParseTypeOperator",value:function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}},{key:"tsCheckTypeAnnotationForReadOnly",value:function(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,"'readonly' type modifier is only permitted on array and tuple literal types.")}}},{key:"tsParseInferType",value:function(){var t=this.startNode();this.expectContextual("infer");var e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}},{key:"tsParseTypeOperatorOrHigher",value:function(){var t=this,e=["keyof","unique","readonly"].find((function(e){return t.isContextual(e)}));return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}},{key:"tsParseUnionOrIntersectionType",value:function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var a=[i];this.eat(s);)a.push(e());var r=this.startNodeAtNode(i);r.types=a,i=this.finishNode(r,t)}return i}},{key:"tsParseIntersectionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),o.bitwiseAND)}},{key:"tsParseUnionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),o.bitwiseOR)}},{key:"tsIsStartOfFunctionType",value:function(){return!!this.isRelational("<")||this.match(o.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}},{key:"tsSkipParameterStart",value:function(){if(this.match(o.name)||this.match(o._this))return this.next(),!0;if(this.match(o.braceL)){var t=1;for(this.next();t>0;)this.match(o.braceL)?++t:this.match(o.braceR)&&--t,this.next();return!0}if(this.match(o.bracketL)){var e=1;for(this.next();e>0;)this.match(o.bracketL)?++e:this.match(o.bracketR)&&--e,this.next();return!0}return!1}},{key:"tsIsUnambiguouslyStartOfFunctionType",value:function(){if(this.next(),this.match(o.parenR)||this.match(o.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(o.colon)||this.match(o.comma)||this.match(o.question)||this.match(o.eq))return!0;if(this.match(o.parenR)&&(this.next(),this.match(o.arrow)))return!0}return!1}},{key:"tsParseTypeOrTypePredicateAnnotation",value:function(t){var e=this;return this.tsInType((function(){var s=e.startNode();e.expect(t);var i=e.tsTryParse(e.tsParseTypePredicateAsserts.bind(e)),a=e.tsIsIdentifier()&&e.tsTryParse(e.tsParseTypePredicatePrefix.bind(e));if(!a){if(!i)return e.tsParseTypeAnnotation(!1,s);var r=e.startNodeAtNode(s);return r.parameterName=e.parseIdentifier(),r.asserts=i,s.typeAnnotation=e.finishNode(r,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")}var n=e.tsParseTypeAnnotation(!1),o=e.startNodeAtNode(s);return o.parameterName=a,o.typeAnnotation=n,o.asserts=i,s.typeAnnotation=e.finishNode(o,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")}))}},{key:"tsTryParseTypeOrTypePredicateAnnotation",value:function(){return this.match(o.colon)?this.tsParseTypeOrTypePredicateAnnotation(o.colon):void 0}},{key:"tsTryParseTypeAnnotation",value:function(){return this.match(o.colon)?this.tsParseTypeAnnotation():void 0}},{key:"tsTryParseType",value:function(){return this.tsEatThenParseType(o.colon)}},{key:"tsParseTypePredicatePrefix",value:function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}},{key:"tsParseTypePredicateAsserts",value:function(){return!!this.tsIsIdentifier()&&!("asserts"!==this.parseIdentifier().name||this.hasPrecedingLineBreak()||!this.tsIsIdentifier())}},{key:"tsParseTypeAnnotation",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.startNode();return this.tsInType((function(){e&&t.expect(o.colon),s.typeAnnotation=t.tsParseType()})),this.finishNode(s,"TSTypeAnnotation")}},{key:"tsParseType",value:function(){ht(this.state.inType);var t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(o._extends))return t;var e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(o.question),e.trueType=this.tsParseType(),this.expect(o.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}},{key:"tsParseNonConditionalType",value:function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(o._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}},{key:"tsParseTypeAssertion",value:function(){var t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}},{key:"tsParseHeritageClause",value:function(t){var e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,"'".concat(t,"' list cannot be empty.")),s}},{key:"tsParseExpressionWithTypeArguments",value:function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}},{key:"tsParseInterfaceDeclaration",value:function(t){t.id=this.parseIdentifier(),this.checkLVal(t.id,130,void 0,"typescript interface declaration"),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(o._extends)&&(t.extends=this.tsParseHeritageClause("extends"));var e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}},{key:"tsParseTypeAliasDeclaration",value:function(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,2,void 0,"typescript type alias"),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(o.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}},{key:"tsInNoContext",value:function(t){var e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}},{key:"tsInType",value:function(t){var e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}},{key:"tsEatThenParseType",value:function(t){return this.match(t)?this.tsNextThenParseType():void 0}},{key:"tsExpectThenParseType",value:function(t){var e=this;return this.tsDoThenParseType((function(){return e.expect(t)}))}},{key:"tsNextThenParseType",value:function(){var t=this;return this.tsDoThenParseType((function(){return t.next()}))}},{key:"tsDoThenParseType",value:function(t){var e=this;return this.tsInType((function(){return t(),e.tsParseType()}))}},{key:"tsParseEnumMember",value:function(){var t=this.startNode();return t.id=this.match(o.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(o.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")}},{key:"tsParseEnumDeclaration",value:function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,e?779:267,void 0,"typescript enum declaration"),this.expect(o.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(o.braceR),this.finishNode(t,"TSEnumDeclaration")}},{key:"tsParseModuleBlock",value:function(){var t=this.startNode();return this.scope.enter(0),this.expect(o.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,o.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}},{key:"tsParseModuleOrNamespaceDeclaration",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,1024,null,"module or namespace declaration"),this.eat(o.dot)){var s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),t.body=s}else this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}},{key:"tsParseAmbientExternalModuleDeclaration",value:function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(o.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(o.braceL)?(this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}},{key:"tsParseImportEqualsDeclaration",value:function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(o.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}},{key:"tsIsExternalModuleReference",value:function(){return this.isContextual("require")&&40===this.lookaheadCharCode()}},{key:"tsParseModuleReference",value:function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}},{key:"tsParseExternalModuleReference",value:function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(o.parenL),!this.match(o.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(o.parenR),this.finishNode(t,"TSExternalModuleReference")}},{key:"tsLookAhead",value:function(t){var e=this.state.clone(),s=t();return this.state=e,s}},{key:"tsTryParseAndCatch",value:function(t){var e=this.tryParse((function(e){return t()||e()}));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}},{key:"tsTryParse",value:function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}},{key:"tsTryParseDeclare",value:function(t){if(!this.isLineTerminator()){var e,s=this.state.type;switch(this.isContextual("let")&&(s=o._var,e="let"),s){case o._function:return this.parseFunctionStatement(t,!1,!0);case o._class:return t.declare=!0,this.parseClass(t,!0,!1);case o._const:if(this.match(o._const)&&this.isLookaheadContextual("enum"))return this.expect(o._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case o._var:return e=e||this.state.value,this.parseVarStatement(t,e);case o.name:var i=this.state.value;return"global"===i?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,i,!0)}}}},{key:"tsTryParseExportDeclaration",value:function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}},{key:"tsParseExpressionStatement",value:function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(o.braceL)){this.scope.enter(512);var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}},{key:"tsParseDeclaration",value:function(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminatorAndMatch(o._class,s)){var i=t;return i.abstract=!0,s&&(this.next(),this.match(o._class)||this.unexpected(null,o._class)),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(o.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(o.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.tsCheckLineTerminatorAndMatch(o.name,s))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}}},{key:"tsCheckLineTerminatorAndMatch",value:function(t,e){return(e||this.match(t))&&!this.isLineTerminator()}},{key:"tsTryParseGenericAsyncArrowFunction",value:function(t,s){var i=this;if(this.isRelational("<")){var a=this.tsTryParseAndCatch((function(){var a=i.startNodeAt(t,s);return a.typeParameters=i.tsParseTypeParameters(),k(D(e.prototype),"parseFunctionParams",i).call(i,a),a.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(o.arrow),a}));if(a)return this.parseArrowExpression(a,null,!0)}}},{key:"tsParseTypeArguments",value:function(){var t=this,e=this.startNode();return e.params=this.tsInType((function(){return t.tsInNoContext((function(){return t.expectRelational("<"),t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t))}))})),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")}},{key:"tsIsDeclarationStart",value:function(){if(this.match(o.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}},{key:"isExportDefaultSpecifier",value:function(){return!this.tsIsDeclarationStart()&&k(D(e.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseAssignableListItem",value:function(t,e){var s,i=this.state.start,a=this.state.startLoc,r=!1;t&&(s=this.parseAccessModifier(),r=!!this.tsParseModifier(["readonly"]));var n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n);var o=this.parseMaybeDefault(n.start,n.loc.start,n);if(s||r){var h=this.startNodeAt(i,a);return e.length&&(h.decorators=e),s&&(h.accessibility=s),r&&(h.readonly=r),"Identifier"!==o.type&&"AssignmentPattern"!==o.type&&this.raise(h.start,"A parameter property may not be declared using a binding pattern."),h.parameter=o,this.finishNode(h,"TSParameterProperty")}return e.length&&(n.decorators=e),o}},{key:"parseFunctionBodyAndFinish",value:function(t,s){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.match(o.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(o.colon));var a="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;a&&!this.match(o.braceL)&&this.isLineTerminator()?this.finishNode(t,a):k(D(e.prototype),"parseFunctionBodyAndFinish",this).call(this,t,s,i)}},{key:"registerFunctionStatementId",value:function(t){!t.body&&t.id?this.checkLVal(t.id,1024,null,"function name"):k(D(e.prototype),"registerFunctionStatementId",this).apply(this,arguments)}},{key:"parseSubscript",value:function(t,s,i,a,r){var n=this;if(!this.hasPrecedingLineBreak()&&this.match(o.bang)){this.state.exprAllowed=!1,this.next();var h=this.startNodeAt(s,i);return h.expression=t,this.finishNode(h,"TSNonNullExpression")}if(this.isRelational("<")){var u=this.tsTryParseAndCatch((function(){if(!a&&n.atPossibleAsync(t)){var e=n.tsTryParseGenericAsyncArrowFunction(s,i);if(e)return e}var h=n.startNodeAt(s,i);h.callee=t;var u=n.tsParseTypeArguments();if(u){if(!a&&n.eat(o.parenL))return h.arguments=n.parseCallExpressionArguments(o.parenR,!1),h.typeParameters=u,n.finishCallExpression(h,r.optionalChainMember);if(n.match(o.backQuote))return n.parseTaggedTemplateExpression(s,i,t,r,u)}n.unexpected()}));if(u)return u}return k(D(e.prototype),"parseSubscript",this).call(this,t,s,i,a,r)}},{key:"parseNewArguments",value:function(t){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch((function(){var t=s.tsParseTypeArguments();return s.match(o.parenL)||s.unexpected(),t}));i&&(t.typeParameters=i)}k(D(e.prototype),"parseNewArguments",this).call(this,t)}},{key:"parseExprOp",value:function(t,s,i,a,r){if(ot(o._in.binop)>a&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var n=this.startNodeAt(s,i);n.expression=t;var h=this.tsTryNextParseConstantContext();return n.typeAnnotation=h||this.tsNextThenParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,a,r)}return k(D(e.prototype),"parseExprOp",this).call(this,t,s,i,a,r)}},{key:"checkReservedWord",value:function(t,e,s,i){}},{key:"checkDuplicateExports",value:function(){}},{key:"parseImport",value:function(t){return this.match(o.name)&&this.lookahead().type===o.eq?this.tsParseImportEqualsDeclaration(t):k(D(e.prototype),"parseImport",this).call(this,t)}},{key:"parseExport",value:function(t){if(this.match(o._import))return this.expect(o._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(o.eq)){var s=t;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=t;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return k(D(e.prototype),"parseExport",this).call(this,t)}},{key:"isAbstractClass",value:function(){return this.isContextual("abstract")&&this.lookahead().type===o._class}},{key:"parseExportDefaultExpression",value:function(){if(this.isAbstractClass()){var t=this.startNode();return this.next(),this.parseClass(t,!0,!0),t.abstract=!0,t}if("interface"===this.state.value){var s=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(s)return s}return k(D(e.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseStatementContent",value:function(t,s){if(this.state.type===o._const){var i=this.lookahead();if(i.type===o.name&&"enum"===i.value){var a=this.startNode();return this.expect(o._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(a,!0)}}return k(D(e.prototype),"parseStatementContent",this).call(this,t,s)}},{key:"parseAccessModifier",value:function(){return this.tsParseModifier(["public","protected","private"])}},{key:"parseClassMember",value:function(t,s,i,a){var r=this.parseAccessModifier();r&&(s.accessibility=r),k(D(e.prototype),"parseClassMember",this).call(this,t,s,i,a)}},{key:"parseClassMemberWithIsStatic",value:function(t,s,i,a,r){var n=this.tsParseModifiers(["abstract","readonly","declare"]);Object.assign(s,n);var o=this.tsTryParseIndexSignature(s);if(o)return t.body.push(o),n.abstract&&this.raise(s.start,"Index signatures cannot have the 'abstract' modifier"),a&&this.raise(s.start,"Index signatures cannot have the 'static' modifier"),void(s.accessibility&&this.raise(s.start,"Index signatures cannot have an accessibility modifier ('".concat(s.accessibility,"')")));k(D(e.prototype),"parseClassMemberWithIsStatic",this).call(this,t,s,i,a,r)}},{key:"parsePostMemberNameModifiers",value:function(t){this.eat(o.question)&&(t.optional=!0),t.readonly&&this.match(o.parenL)&&this.raise(t.start,"Class methods cannot have the 'readonly' modifier"),t.declare&&this.match(o.parenL)&&this.raise(t.start,"Class methods cannot have the 'declare' modifier")}},{key:"parseExpressionStatement",value:function(t,s){return("Identifier"===s.type?this.tsParseExpressionStatement(t,s):void 0)||k(D(e.prototype),"parseExpressionStatement",this).call(this,t,s)}},{key:"shouldParseExportDeclaration",value:function(){return!!this.tsIsDeclarationStart()||k(D(e.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"parseConditional",value:function(t,s,i,a,r){var n=this;if(!r||!this.match(o.question))return k(D(e.prototype),"parseConditional",this).call(this,t,s,i,a,r);var h=this.tryParse((function(){return k(D(e.prototype),"parseConditional",n).call(n,t,s,i,a)}));return h.node?(h.error&&(this.state=h.failState),h.node):(r.start=h.error.pos||this.state.start,t)}},{key:"parseParenItem",value:function(t,s,i){if(t=k(D(e.prototype),"parseParenItem",this).call(this,t,s,i),this.eat(o.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(o.colon)){var a=this.startNodeAt(s,i);return a.expression=t,a.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(a,"TSTypeCastExpression")}return t}},{key:"parseExportDeclaration",value:function(t){var s,i=this.state.start,a=this.state.startLoc,r=this.eatContextual("declare");return this.match(o.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=k(D(e.prototype),"parseExportDeclaration",this).call(this,t)),s&&r&&(this.resetStartLocation(s,i,a),s.declare=!0),s}},{key:"parseClassId",value:function(t,s,i){if(s&&!i||!this.isContextual("implements")){k(D(e.prototype),"parseClassId",this).call(this,t,s,i,t.declare?1024:139);var a=this.tsTryParseTypeParameters();a&&(t.typeParameters=a)}}},{key:"parseClassPropertyAnnotation",value:function(t){!t.optional&&this.eat(o.bang)&&(t.definite=!0);var e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}},{key:"parseClassProperty",value:function(t){return this.parseClassPropertyAnnotation(t),t.declare&&this.match(o.equal)&&this.raise(this.state.start,"'declare' class fields cannot have an initializer"),k(D(e.prototype),"parseClassProperty",this).call(this,t)}},{key:"parseClassPrivateProperty",value:function(t){return t.abstract&&this.raise(t.start,"Private elements cannot have the 'abstract' modifier."),t.accessibility&&this.raise(t.start,"Private elements cannot have an accessibility modifier ('".concat(t.accessibility,"')")),this.parseClassPropertyAnnotation(t),k(D(e.prototype),"parseClassPrivateProperty",this).call(this,t)}},{key:"pushClassMethod",value:function(t,s,i,a,r,n){var o=this.tsTryParseTypeParameters();o&&(s.typeParameters=o),k(D(e.prototype),"pushClassMethod",this).call(this,t,s,i,a,r,n)}},{key:"pushClassPrivateMethod",value:function(t,s,i,a){var r=this.tsTryParseTypeParameters();r&&(s.typeParameters=r),k(D(e.prototype),"pushClassPrivateMethod",this).call(this,t,s,i,a)}},{key:"parseClassSuper",value:function(t){k(D(e.prototype),"parseClassSuper",this).call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}},{key:"parseObjPropValue",value:function(t){var s,i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i);for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];(s=k(D(e.prototype),"parseObjPropValue",this)).call.apply(s,[this,t].concat(r))}},{key:"parseFunctionParams",value:function(t,s){var i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i),k(D(e.prototype),"parseFunctionParams",this).call(this,t,s)}},{key:"parseVarId",value:function(t,s){k(D(e.prototype),"parseVarId",this).call(this,t,s),"Identifier"===t.id.type&&this.eat(o.bang)&&(t.definite=!0);var i=this.tsTryParseTypeAnnotation();i&&(t.id.typeAnnotation=i,this.resetEndLocation(t.id))}},{key:"parseAsyncArrowFromCallExpression",value:function(t,s){return this.match(o.colon)&&(t.returnType=this.tsParseTypeAnnotation()),k(D(e.prototype),"parseAsyncArrowFromCallExpression",this).call(this,t,s)}},{key:"parseMaybeAssign",value:function(){for(var t,s,i,a,r,n=this,h=arguments.length,u=new Array(h),l=0;l<h;l++)u[l]=arguments[l];if(this.match(o.jsxTagStart)){if(t=this.state.clone(),!(s=this.tryParse((function(){var t;return(t=k(D(e.prototype),"parseMaybeAssign",n)).call.apply(t,[n].concat(u))}),t)).error)return s.node;var c=this.state.context;c[c.length-1]===F.j_oTag?c.length-=2:c[c.length-1]===F.j_expr&&(c.length-=1)}if(!(s&&s.error||this.isRelational("<")))return(a=k(D(e.prototype),"parseMaybeAssign",this)).call.apply(a,[this].concat(u));t=t||this.state.clone();var p=this.tryParse((function(t){var s;r=n.tsParseTypeParameters();var i=(s=k(D(e.prototype),"parseMaybeAssign",n)).call.apply(s,[n].concat(u));return("ArrowFunctionExpression"!==i.type||i.extra&&i.extra.parenthesized)&&t(),r&&0!==r.params.length&&n.resetStartLocationFromNode(i,r),i.typeParameters=r,i}),t);if(!p.error&&!p.aborted)return p.node;if(!s&&(ht(!this.hasPlugin("jsx")),!(i=this.tryParse((function(){var t;return(t=k(D(e.prototype),"parseMaybeAssign",n)).call.apply(t,[n].concat(u))}),t)).error))return i.node;if(s&&s.node)return this.state=s.failState,s.node;if(p.node)return this.state=p.failState,p.node;if(i&&i.node)return this.state=i.failState,i.node;if(s&&s.thrown)throw s.error;if(p.thrown)throw p.error;if(i&&i.thrown)throw i.error;throw s&&s.error||p.error||i&&i.error}},{key:"parseMaybeUnary",value:function(t){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():k(D(e.prototype),"parseMaybeUnary",this).call(this,t)}},{key:"parseArrow",value:function(t){var s=this;if(this.match(o.colon)){var i=this.tryParse((function(t){var e=s.tsParseTypeOrTypePredicateAnnotation(o.colon);return!s.canInsertSemicolon()&&s.match(o.arrow)||t(),e}));if(i.aborted)return;i.thrown||(i.error&&(this.state=i.failState),t.returnType=i.node)}return k(D(e.prototype),"parseArrow",this).call(this,t)}},{key:"parseAssignableListItemTypes",value:function(t){this.eat(o.question)&&("Identifier"!==t.type&&this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature."),t.optional=!0);var e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}},{key:"toAssignable",value:function(t,s,i){switch(t.type){case"TSTypeCastExpression":return k(D(e.prototype),"toAssignable",this).call(this,this.typeCastToParameter(t),s,i);case"TSParameterProperty":return k(D(e.prototype),"toAssignable",this).call(this,t,s,i);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression,s,i),t;default:return k(D(e.prototype),"toAssignable",this).call(this,t,s,i)}}},{key:"checkLVal",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,s,i,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(t.expression,s,i,a);default:return void k(D(e.prototype),"checkLVal",this).call(this,t,s,i,a)}}},{key:"parseBindingAtom",value:function(){switch(this.state.type){case o._this:return this.parseIdentifier(!0);default:return k(D(e.prototype),"parseBindingAtom",this).call(this)}}},{key:"parseMaybeDecoratorArguments",value:function(t){if(this.isRelational("<")){var s=this.tsParseTypeArguments();if(this.match(o.parenL)){var i=k(D(e.prototype),"parseMaybeDecoratorArguments",this).call(this,t);return i.typeParameters=s,i}this.unexpected(this.state.start,o.parenL)}return k(D(e.prototype),"parseMaybeDecoratorArguments",this).call(this,t)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||k(D(e.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(o.bang)||this.match(o.colon)||k(D(e.prototype),"isClassProperty",this).call(this)}},{key:"parseMaybeDefault",value:function(){for(var t,s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];var r=(t=k(D(e.prototype),"parseMaybeDefault",this)).call.apply(t,[this].concat(i));return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),r}},{key:"getTokenFromCode",value:function(t){return!this.state.inType||62!==t&&60!==t?k(D(e.prototype),"getTokenFromCode",this).call(this,t):this.finishOp(o.relational,1)}},{key:"toAssignableList",value:function(t){for(var s=0;s<t.length;s++){var i=t[s];if(i)switch(i.type){case"TSTypeCastExpression":t[s]=this.typeCastToParameter(i);break;case"TSAsExpression":case"TSTypeAssertion":this.raise(i.start,"Unexpected type cast in parameter position.")}}return k(D(e.prototype),"toAssignableList",this).apply(this,arguments)}},{key:"typeCastToParameter",value:function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}},{key:"toReferencedList",value:function(t,e){for(var s=0;s<t.length;s++){var i=t[s];i&&i._exprListItem&&"TsTypeCastExpression"===i.type&&this.raise(i.start,"Did not expect a type annotation here.")}return t}},{key:"shouldParseArrow",value:function(){return this.match(o.colon)||k(D(e.prototype),"shouldParseArrow",this).call(this)}},{key:"shouldParseAsyncArrow",value:function(){return this.match(o.colon)||k(D(e.prototype),"shouldParseAsyncArrow",this).call(this)}},{key:"canHaveLeadingDecorator",value:function(){return k(D(e.prototype),"canHaveLeadingDecorator",this).call(this)||this.isAbstractClass()}},{key:"jsxParseOpeningElementAfterName",value:function(t){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch((function(){return s.tsParseTypeArguments()}));i&&(t.typeParameters=i)}return k(D(e.prototype),"jsxParseOpeningElementAfterName",this).call(this,t)}},{key:"getGetterSetterExpectedParamCount",value:function(t){var s=k(D(e.prototype),"getGetterSetterExpectedParamCount",this).call(this,t),i=t.params[0];return i&&"Identifier"===i.type&&"this"===i.name?s+1:s}}]),e}(t)},v8intrinsic:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"parseV8Intrinsic",value:function(){if(this.match(o.modulo)){var t=this.state.start,e=this.startNode();if(this.eat(o.modulo),this.match(o.name)){var s=this.parseIdentifierName(this.state.start),i=this.createIdentifier(e,s);if(i.type="V8IntrinsicIdentifier",this.match(o.parenL))return i}this.unexpected(t)}}},{key:"parseExprAtom",value:function(){return this.parseV8Intrinsic()||k(D(e.prototype),"parseExprAtom",this).apply(this,arguments)}}]),e}(t)},placeholders:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"parsePlaceholder",value:function(t){if(this.match(o.placeholder)){var s=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),s.name=k(D(e.prototype),"parseIdentifier",this).call(this,!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(o.placeholder),this.finishPlaceholder(s,t)}}},{key:"finishPlaceholder",value:function(t,e){var s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}},{key:"getTokenFromCode",value:function(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.placeholder,2):k(D(e.prototype),"getTokenFromCode",this).apply(this,arguments)}},{key:"parseExprAtom",value:function(){return this.parsePlaceholder("Expression")||k(D(e.prototype),"parseExprAtom",this).apply(this,arguments)}},{key:"parseIdentifier",value:function(){return this.parsePlaceholder("Identifier")||k(D(e.prototype),"parseIdentifier",this).apply(this,arguments)}},{key:"checkReservedWord",value:function(t){void 0!==t&&k(D(e.prototype),"checkReservedWord",this).apply(this,arguments)}},{key:"parseBindingAtom",value:function(){return this.parsePlaceholder("Pattern")||k(D(e.prototype),"parseBindingAtom",this).apply(this,arguments)}},{key:"checkLVal",value:function(t){"Placeholder"!==t.type&&k(D(e.prototype),"checkLVal",this).apply(this,arguments)}},{key:"toAssignable",value:function(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):k(D(e.prototype),"toAssignable",this).apply(this,arguments)}},{key:"verifyBreakContinue",value:function(t){t.label&&"Placeholder"===t.label.type||k(D(e.prototype),"verifyBreakContinue",this).apply(this,arguments)}},{key:"parseExpressionStatement",value:function(t,s){if("Placeholder"!==s.type||s.extra&&s.extra.parenthesized)return k(D(e.prototype),"parseExpressionStatement",this).apply(this,arguments);if(this.match(o.colon)){var i=t;return i.label=this.finishPlaceholder(s,"Identifier"),this.next(),i.body=this.parseStatement("label"),this.finishNode(i,"LabeledStatement")}return this.semicolon(),t.name=s.name,this.finishPlaceholder(t,"Statement")}},{key:"parseBlock",value:function(){return this.parsePlaceholder("BlockStatement")||k(D(e.prototype),"parseBlock",this).apply(this,arguments)}},{key:"parseFunctionId",value:function(){return this.parsePlaceholder("Identifier")||k(D(e.prototype),"parseFunctionId",this).apply(this,arguments)}},{key:"parseClass",value:function(t,e,s){var i=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);var a=this.parsePlaceholder("Identifier");if(a)if(this.match(o._extends)||this.match(o.placeholder)||this.match(o.braceL))t.id=a;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,i);this.unexpected(null,"A class name is required")}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass),this.finishNode(t,i)}},{key:"parseExport",value:function(t){var s=this.parsePlaceholder("Identifier");if(!s)return k(D(e.prototype),"parseExport",this).apply(this,arguments);if(!this.isContextual("from")&&!this.match(o.comma))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");var i=this.startNode();return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],k(D(e.prototype),"parseExport",this).call(this,t)}},{key:"maybeParseExportDefaultSpecifier",value:function(t){return!!(t.specifiers&&t.specifiers.length>0)||k(D(e.prototype),"maybeParseExportDefaultSpecifier",this).apply(this,arguments)}},{key:"checkExport",value:function(t){var s=t.specifiers;s&&s.length&&(t.specifiers=s.filter((function(t){return"Placeholder"===t.exported.type}))),k(D(e.prototype),"checkExport",this).call(this,t),t.specifiers=s}},{key:"parseImport",value:function(t){var s=this.parsePlaceholder("Identifier");if(!s)return k(D(e.prototype),"parseImport",this).apply(this,arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(o.comma))return t.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");var i=this.startNodeAtNode(s);if(i.local=s,this.finishNode(i,"ImportDefaultSpecifier"),t.specifiers.push(i),this.eat(o.comma)){var a=this.maybeParseStarImportSpecifier(t);a||this.parseNamedImportSpecifiers(t)}return this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.parsePlaceholder("StringLiteral")||k(D(e.prototype),"parseImportSource",this).apply(this,arguments)}}]),e}(t)}},dt=Object.keys(pt),ft={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};var mt=function t(e,s){d(this,t),this.line=e,this.column=s},yt=function t(e,s){d(this,t),this.start=e,this.end=s};function Dt(t){return t[t.length-1]}var vt=function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"getLocationForPosition",value:function(t){return t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){var s,i=1,a=0;for(E.lastIndex=0;(s=E.exec(t))&&s.index<e;)i++,a=E.lastIndex;return new mt(i,e-a)}(this.input,t)}},{key:"raise",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=s.missingPluginNames,a=s.code,r=this.getLocationForPosition(t);e+=" (".concat(r.line,":").concat(r.column,")");var n=new SyntaxError(e);if(n.pos=t,n.loc=r,i&&(n.missingPlugin=i),void 0!==a&&(n.code=a),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(n),n;throw n}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"addComment",value:function(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)}},{key:"adjustCommentsAfterTrailingComma",value:function(t,e,s){if(0!==this.state.leadingComments.length){for(var i=null,a=e.length;null===i&&a>0;)i=e[--a];if(null!==i){for(var r=0;r<this.state.leadingComments.length;r++)this.state.leadingComments[r].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(r,1),r--);for(var n=[],o=0;o<this.state.leadingComments.length;o++){var h=this.state.leadingComments[o];h.end<t.end?(n.push(h),s||(this.state.leadingComments.splice(o,1),o--)):(void 0===t.trailingComments&&(t.trailingComments=[]),t.trailingComments.push(h))}s&&(this.state.leadingComments=[]),n.length>0?i.trailingComments=n:void 0!==i.trailingComments&&(i.trailingComments=[])}}}},{key:"processComment",value:function(t){if(!("Program"===t.type&&t.body.length>0)){var e,s,i,a,r,n=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(n.length>0){var o=Dt(n);o.trailingComments&&o.trailingComments[0].start>=t.end&&(i=o.trailingComments,delete o.trailingComments)}for(n.length>0&&Dt(n).start>=t.start&&(e=n.pop());n.length>0&&Dt(n).start>=t.start;)s=n.pop();if(!s&&e&&(s=e),e)switch(t.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(t,t.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(t,t.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(t,t.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(t,t.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(t,t.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==t.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==t.type)&&this.adjustCommentsAfterTrailingComma(t,[this.state.commentPreviousNode],!0);if(s){if(s.leadingComments)if(s!==t&&s.leadingComments.length>0&&Dt(s.leadingComments).end<=t.start)t.leadingComments=s.leadingComments,delete s.leadingComments;else for(a=s.leadingComments.length-2;a>=0;--a)if(s.leadingComments[a].end<=t.start){t.leadingComments=s.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(Dt(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(r=0;r<this.state.leadingComments.length;r++)this.state.leadingComments[r].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(r,1),r--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;a<this.state.leadingComments.length&&!(this.state.leadingComments[a].end>t.start);a++);var h=this.state.leadingComments.slice(0,a);h.length&&(t.leadingComments=h),0===(i=this.state.leadingComments.slice(a)).length&&(i=null)}this.state.commentPreviousNode=t,i&&(i.length&&i[0].start>=t.start&&Dt(i).end<=t.end?t.innerComments=i:t.trailingComments=i),n.push(t)}}}]),e}(function(){function t(){d(this,t),this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}return m(t,[{key:"hasPlugin",value:function(t){return this.plugins.has(t)}},{key:"getPluginOption",value:function(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}]),t}())),xt=function(){function t(){d(this,t),this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.inClassProperty=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=o.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[F.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this.invalidTemplateEscapePosition=null}return m(t,[{key:"init",value:function(t){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}},{key:"curPosition",value:function(){return new mt(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(e){for(var s=new t,i=Object.keys(this),a=0,r=i.length;a<r;a++){var n=i[a],o=this[n];!e&&Array.isArray(o)&&(o=o.slice()),s[n]=o}return s}}]),t}(),gt=function(t){return t>=48&&t<=57},kt=new Set(["g","m","s","i","y","u"]),Pt={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},bt={bin:[48,49]};bt.oct=[].concat(b(bt.bin),[50,51,52,53,54,55]),bt.dec=[].concat(b(bt.oct),[56,57]),bt.hex=[].concat(b(bt.dec),[65,66,67,68,69,70,97,98,99,100,101,102]);var Et=function t(e){d(this,t),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new yt(e.startLoc,e.endLoc)},Ct=/^('|")((?:\\?.)*?)\1/,At=function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"addExtra",value:function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)}},{key:"isRelational",value:function(t){return this.match(o.relational)&&this.state.value===t}},{key:"isLookaheadRelational",value:function(t){var e=this.nextTokenStart();if(this.input.charAt(e)===t){if(e+1===this.input.length)return!0;var s=this.input.charCodeAt(e+1);return s!==t.charCodeAt(0)&&61!==s}return!1}},{key:"expectRelational",value:function(t){this.isRelational(t)?this.next():this.unexpected(null,o.relational)}},{key:"eatRelational",value:function(t){return!!this.isRelational(t)&&(this.next(),!0)}},{key:"isContextual",value:function(t){return this.match(o.name)&&this.state.value===t&&!this.state.containsEsc}},{key:"isUnparsedContextual",value:function(t,e){var s=t+e.length;return this.input.slice(t,s)===e&&(s===this.input.length||!X(this.input.charCodeAt(s)))}},{key:"isLookaheadContextual",value:function(t){var e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}},{key:"eatContextual",value:function(t){return this.isContextual(t)&&this.eat(o.name)}},{key:"expectContextual",value:function(t,e){this.eatContextual(t)||this.unexpected(null,e)}},{key:"canInsertSemicolon",value:function(){return this.match(o.eof)||this.match(o.braceR)||this.hasPrecedingLineBreak()}},{key:"hasPrecedingLineBreak",value:function(){return v.test(this.input.slice(this.state.lastTokEnd,this.state.start))}},{key:"isLineTerminator",value:function(){return this.eat(o.semi)||this.canInsertSemicolon()}},{key:"semicolon",value:function(){this.isLineTerminator()||this.unexpected(null,o.semi)}},{key:"expect",value:function(t,e){this.eat(t)||this.unexpected(e,t)}},{key:"assertNoSpace",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected space.";this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,t)}},{key:"unexpected",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";throw"string"!=typeof e&&(e='Unexpected token, expected "'.concat(e.label,'"')),this.raise(null!=t?t:this.state.start,e)}},{key:"expectPlugin",value:function(t,e){if(!this.hasPlugin(t))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling the parser plugin: '".concat(t,"'"),{missingPluginNames:[t]});return!0}},{key:"expectOnePlugin",value:function(t,e){var s=this;if(!t.some((function(t){return s.hasPlugin(t)})))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling one of the following parser plugin(s): '".concat(t.join(", "),"'"),{missingPluginNames:t})}},{key:"checkYieldAwaitInDefaultParams",value:function(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos<this.state.awaitPos)&&this.raise(this.state.yieldPos,"Yield cannot be used as name inside a generator function"),-1!==this.state.awaitPos&&this.raise(this.state.awaitPos,"Await cannot be used as name inside an async function")}},{key:"strictDirective",value:function(t){for(;;){A.lastIndex=t,t+=A.exec(this.input)[0].length;var e=Ct.exec(this.input.slice(t));if(!e)break;if("use strict"===e[2])return!0;t+=e[0].length,A.lastIndex=t,t+=A.exec(this.input)[0].length,";"===this.input[t]&&t++}return!1}},{key:"tryParse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.clone(),s={node:null};try{var i=t((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;throw s.node=t,s}));if(this.state.errors.length>e.errors.length){var a=this.state;return this.state=e,{node:i,error:a.errors[e.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(t){var r=this.state;if(this.state=e,t instanceof SyntaxError)return{node:null,error:t,thrown:!0,aborted:!1,failState:r};if(t===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw t}}}]),e}(function(t){function e(t,s){var i;return d(this,e),(i=g(this,D(e).call(this))).state=new xt,i.state.init(t),i.input=s,i.length=s.length,i.isLookahead=!1,i}return y(e,t),m(e,[{key:"next",value:function(){this.isLookahead||(this.checkKeywordEscapes(),this.options.tokens&&this.state.tokens.push(new Et(this.state))),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}},{key:"eat",value:function(t){return!!this.match(t)&&(this.next(),!0)}},{key:"match",value:function(t){return this.state.type===t}},{key:"lookahead",value:function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state;return this.state=t,e}},{key:"nextTokenStart",value:function(){var t=this.state.pos;return A.lastIndex=t,t+A.exec(this.input)[0].length}},{key:"lookaheadCharCode",value:function(){return this.input.charCodeAt(this.nextTokenStart())}},{key:"setStrict",value:function(t){if(this.state.strict=t,this.match(o.num)||this.match(o.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}}},{key:"curContext",value:function(){return this.state.context[this.state.context.length-1]}},{key:"nextToken",value:function(){var t=this.curContext();t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.length?this.finishToken(o.eof):t.override?t.override(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}},{key:"pushComment",value:function(t,e,s,i,a,r){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new yt(a,r)};this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n)}},{key:"skipBlockComment",value:function(){var t,e=this.state.curPosition(),s=this.state.pos,i=this.input.indexOf("*/",this.state.pos+2);if(-1===i)throw this.raise(s,"Unterminated comment");for(this.state.pos=i+2,E.lastIndex=s;(t=E.exec(this.input))&&t.index<this.state.pos;)++this.state.curLine,this.state.lineStart=t.index+t[0].length;this.isLookahead||this.pushComment(!0,this.input.slice(s+2,i),s,this.state.pos,e,this.state.curPosition())}},{key:"skipLineComment",value:function(t){var e=this.state.pos,s=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!C(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);this.isLookahead||this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())}},{key:"skipSpace",value:function(){t:for(;this.state.pos<this.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!w(t))break t;++this.state.pos}}}},{key:"finishToken",value:function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}},{key:"readToken_numberSign",value:function(){if(0!==this.state.pos||!this.readToken_interpreter()){var t=this.state.pos+1,e=this.input.charCodeAt(t);if(e>=48&&e<=57)throw this.raise(this.state.pos,"Unexpected digit after hash token");if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(o.hash);if("smart"!==this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.pos,"Unexpected character '#'");this.finishOp(o.hash,1)}}},{key:"readToken_dot",value:function(){var t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(o.ellipsis)):(++this.state.pos,this.finishToken(o.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.assign,2):this.finishOp(o.slash,1)}},{key:"readToken_interpreter",value:function(){if(0!==this.state.pos||this.length<2)return!1;var t=this.state.pos;this.state.pos+=1;var e=this.input.charCodeAt(this.state.pos);if(33!==e)return!1;for(;!C(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);var s=this.input.slice(t+2,this.state.pos);return this.finishToken(o.interpreterDirective,s),!0}},{key:"readToken_mult_modulo",value:function(t){var e=42===t?o.star:o.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1),a=this.state.exprAllowed;42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=o.exponent),61!==i||a||(s++,e=o.assign),this.finishOp(e,s)}},{key:"readToken_pipe_amp",value:function(t){var e=this.input.charCodeAt(this.state.pos+1);e!==t?124!==t||62!==e?61!==e?this.finishOp(124===t?o.bitwiseOR:o.bitwiseAND,1):this.finishOp(o.assign,2):this.finishOp(o.pipeline,2):61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(o.assign,3):this.finishOp(124===t?o.logicalOR:o.logicalAND,2)}},{key:"readToken_caret",value:function(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)}},{key:"readToken_plus_min",value:function(t){var e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45!==e||this.inModule||62!==this.input.charCodeAt(this.state.pos+2)||0!==this.state.lastTokEnd&&!v.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?void this.finishOp(o.incDec,2):(this.skipLineComment(3),this.skipSpace(),void this.nextToken());61===e?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)}},{key:"readToken_lt_gt",value:function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(o.assign,s+1):void this.finishOp(o.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(o.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())}},{key:"readToken_eq_excl",value:function(t){var e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(o.arrow)):void this.finishOp(61===t?o.eq:o.bang,1);this.finishOp(o.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}},{key:"readToken_question",value:function(){var t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63!==t||this.state.inType?46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(o.question)):(this.state.pos+=2,this.finishToken(o.questionDot)):61===e?this.finishOp(o.assign,3):this.finishOp(o.nullishCoalescing,2)}},{key:"getTokenFromCode",value:function(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(o.parenL);case 41:return++this.state.pos,void this.finishToken(o.parenR);case 59:return++this.state.pos,void this.finishToken(o.semi);case 44:return++this.state.pos,void this.finishToken(o.comma);case 91:return++this.state.pos,void this.finishToken(o.bracketL);case 93:return++this.state.pos,void this.finishToken(o.bracketR);case 123:return++this.state.pos,void this.finishToken(o.braceL);case 125:return++this.state.pos,void this.finishToken(o.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.doubleColon,2):(++this.state.pos,this.finishToken(o.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(o.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(o.tilde,1);case 64:return++this.state.pos,void this.finishToken(o.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(K(t))return void this.readWord()}throw this.raise(this.state.pos,"Unexpected character '".concat(String.fromCodePoint(t),"'"))}},{key:"finishOp",value:function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}},{key:"readRegexp",value:function(){for(var t,e,s=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(v.test(i))throw this.raise(s,"Unterminated regular expression");if(t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.state.pos}var a=this.input.slice(s,this.state.pos);++this.state.pos;for(var r="";this.state.pos<this.length;){var n=this.input[this.state.pos],h=this.input.codePointAt(this.state.pos);if(kt.has(n))r.indexOf(n)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag");else{if(!X(h)&&92!==h)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}++this.state.pos,r+=n}this.finishToken(o.regexp,{pattern:a,flags:r})}},{key:"readInt",value:function(t,e,s){for(var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this.state.pos,r=16===t?Pt.hex:Pt.decBinOct,n=16===t?bt.hex:10===t?bt.dec:8===t?bt.oct:bt.bin,o=!1,h=0,u=0,l=null==e?1/0:e;u<l;++u){var c=this.input.charCodeAt(this.state.pos),p=void 0;if(this.hasPlugin("numericSeparator")&&95===c){var d=this.input.charCodeAt(this.state.pos-1),f=this.input.charCodeAt(this.state.pos+1);-1===n.indexOf(f)?this.raise(this.state.pos,"A numeric separator is only allowed between two digits"):(r.indexOf(d)>-1||r.indexOf(f)>-1||Number.isNaN(f))&&this.raise(this.state.pos,"A numeric separator is only allowed between two digits"),i||this.raise(this.state.pos,"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences"),++this.state.pos}else{if((p=c>=97?c-97+10:c>=65?c-65+10:gt(c)?c-48:1/0)>=t)if(this.options.errorRecovery&&p<=9)p=0,this.raise(this.state.start+u+2,"Expected number in radix "+t);else{if(!s)break;p=0,o=!0}++this.state.pos,h=h*t+p}}return this.state.pos===a||null!=e&&this.state.pos-a!==e||o?null:h}},{key:"readRadixNumber",value:function(t){var e=this.state.pos,s=!1;this.state.pos+=2;var i=this.readInt(t);if(null==i&&this.raise(this.state.start+2,"Expected number in radix "+t),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,s=!0),K(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");if(s){var a=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(o.bigint,a)}else this.finishToken(o.num,i)}},{key:"readNumber",value:function(t){var e=this.state.pos,s=!1,i=!1,a=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number");var r=this.state.pos-e>=2&&48===this.input.charCodeAt(e);r&&(this.state.strict&&this.raise(e,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(e,this.state.pos))&&(r=!1,a=!0));var n=this.input.charCodeAt(this.state.pos);if(46!==n||r||(++this.state.pos,this.readInt(10),s=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||r||(43!==(n=this.input.charCodeAt(++this.state.pos))&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),s=!0,n=this.input.charCodeAt(this.state.pos)),this.hasPlugin("numericSeparator")&&(r||a)){var h=this.input.slice(e,this.state.pos).indexOf("_");h>0&&this.raise(h+e,"Numeric separator can not be used after leading 0")}if(this.hasPlugin("bigInt")&&110===n&&((s||r||a)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,i=!0),K(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");var u=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");if(i)this.finishToken(o.bigint,u);else{var l=r?parseInt(u,8):parseFloat(u);this.finishToken(o.num,l)}}},{key:"readCodePoint",value:function(t){var e;if(123===this.input.charCodeAt(this.state.pos)){var s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,!1,t);return e}},{key:"readString",value:function(t){for(var e="",s=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;if(92===i)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===i||8233===i)++this.state.pos,++this.state.curLine;else{if(C(i))throw this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(o.string,e)}},{key:"readTmplToken",value:function(){for(var t="",e=this.state.pos,s=!1;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(o.template)?36===i?(this.state.pos+=2,void this.finishToken(o.dollarBraceL)):(++this.state.pos,void this.finishToken(o.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(o.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var a=this.readEscapedChar(!0);null===a?s=!0:t+=a,e=this.state.pos}else if(C(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,!1,e);return null===i?null:String.fromCharCode(i);case 117:var a=this.readCodePoint(e);return null===a?null:String.fromCodePoint(a);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t){var r=this.state.pos-1;return this.state.invalidTemplateEscapePosition=r,null}default:if(s>=48&&s<=55){var n=this.state.pos-1,o=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],h=parseInt(o,8);h>255&&(o=o.slice(0,-1),h=parseInt(o,8)),this.state.pos+=o.length-1;var u=this.input.charCodeAt(this.state.pos);if("0"!==o||56===u||57===u){if(t)return this.state.invalidTemplateEscapePosition=n,null;this.state.strict?this.raise(n,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=n)}return String.fromCharCode(h)}return String.fromCharCode(s)}}},{key:"readHexChar",value:function(t,e,s){var i=this.state.pos,a=this.readInt(16,t,e,!1);return null===a&&(s?this.raise(i,"Bad character escape sequence"):(this.state.pos=i-1,this.state.invalidTemplateEscapePosition=i-1)),a}},{key:"readWord1",value:function(){var t="";this.state.containsEsc=!1;for(var e=this.state.pos,s=this.state.pos;this.state.pos<this.length;){var i=this.input.codePointAt(this.state.pos);if(X(i))this.state.pos+=i<=65535?1:2;else if(this.state.isIterator&&64===i)++this.state.pos;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);var a=this.state.pos,r=this.state.pos===e?K:X;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX");continue}++this.state.pos;var n=this.readCodePoint(!0);null!==n&&(r(n)||this.raise(a,"Invalid Unicode escape"),t+=String.fromCodePoint(n)),s=this.state.pos}}return t+this.input.slice(s,this.state.pos)}},{key:"isIterator",value:function(t){return"@@iterator"===t||"@@asyncIterator"===t}},{key:"readWord",value:function(){var t=this.readWord1(),e=a.get(t)||o.name;!this.state.isIterator||this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,"Invalid identifier ".concat(t)),this.finishToken(e,t)}},{key:"checkKeywordEscapes",value:function(){var t=this.state.type.keyword;t&&this.state.containsEsc&&this.raise(this.state.start,"Escape sequence in keyword ".concat(t))}},{key:"braceIsBlock",value:function(t){var e=this.curContext();return e===F.functionExpression||e===F.functionStatement||(t!==o.colon||e!==F.braceStatement&&e!==F.braceExpression?t===o._return||t===o.name&&this.state.exprAllowed?v.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===o._else||t===o.semi||t===o.eof||t===o.parenR||t===o.arrow||(t===o.braceL?e===F.braceStatement:t!==o._var&&t!==o._const&&t!==o.name&&(t===o.relational||!this.state.exprAllowed)):!e.isExpr)}},{key:"updateContext",value:function(t){var e,s=this.state.type;!s.keyword||t!==o.dot&&t!==o.questionDot?(e=s.updateContext)?e.call(this,t):this.state.exprAllowed=s.beforeExpr:this.state.exprAllowed=!1}}]),e}(vt)),wt=function(){function t(e,s,i){d(this,t),this.type="",this.start=s,this.end=0,this.loc=new yt(i),e&&e.options.ranges&&(this.range=[s,0]),e&&e.filename&&(this.loc.filename=e.filename)}return m(t,[{key:"__clone",value:function(){for(var e=new t,s=Object.keys(this),i=0,a=s.length;i<a;i++){var r=s[i];"leadingComments"!==r&&"trailingComments"!==r&&"innerComments"!==r&&(e[r]=this[r])}return e}}]),t}(),Tt={kind:"loop"},Ft={kind:"switch"},Nt=function(t){function e(t,s){var i;d(this,e),t=function(t){for(var e={},s=0,i=Object.keys(ft);s<i.length;s++){var a=i[s];e[a]=t&&null!=t[a]?t[a]:ft[a]}return e}(t);var a=(i=g(this,D(e).call(this,t,s))).getScopeHandler();return i.options=t,i.inModule="module"===i.options.sourceType,i.scope=new a(i.raise.bind(x(i)),i.inModule),i.plugins=function(t){for(var e=new Map,s=0;s<t.length;s++){var i=t[s],a=P(Array.isArray(i)?i:[i,{}],2),r=a[0],n=a[1];e.has(r)||e.set(r,n||{})}return e}(i.options.plugins),i.filename=t.sourceFilename,i}return y(e,t),m(e,[{key:"getScopeHandler",value:function(){return at}},{key:"parse",value:function(){this.scope.enter(1);var t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"parseTopLevel",value:function(t,e){if(e.sourceType=this.options.sourceType,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,o.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(var s=0,i=Array.from(this.scope.undefinedExports);s<i.length;s++){var a=P(i[s],1)[0],r=this.scope.undefinedExports.get(a);this.raise(r,"Export '".concat(a,"' is not defined"))}return t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.state.tokens),this.finishNode(t,"File")}},{key:"stmtToDirective",value:function(t){var e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),a=this.input.slice(e.start,e.end),r=s.value=a.slice(1,-1);return this.addExtra(s,"raw",a),this.addExtra(s,"rawValue",r),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)}},{key:"parseInterpreterDirective",value:function(){if(!this.match(o.interpreterDirective))return null;var t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}},{key:"isLet",value:function(t){if(!this.isContextual("let"))return!1;var e=this.nextTokenStart(),s=this.input.charCodeAt(e);if(91===s)return!0;if(t)return!1;if(123===s)return!0;if(K(s)){for(var i=e+1;X(this.input.charCodeAt(i));)++i;var a=this.input.slice(e,i);if(!R.test(a))return!0}return!1}},{key:"parseStatement",value:function(t,e){return this.match(o.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}},{key:"parseStatementContent",value:function(t,e){var s,i=this.state.type,a=this.startNode();switch(this.isLet(t)&&(i=o._var,s="let"),i){case o._break:case o._continue:return this.parseBreakContinueStatement(a,i.keyword);case o._debugger:return this.parseDebuggerStatement(a);case o._do:return this.parseDoStatement(a);case o._for:return this.parseForStatement(a);case o._function:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,"In strict mode code, functions can only be declared at top level or inside a block"):"if"!==t&&"label"!==t&&this.raise(this.state.start,"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement")),this.parseFunctionStatement(a,!1,!t);case o._class:return t&&this.unexpected(),this.parseClass(a,!0);case o._if:return this.parseIfStatement(a);case o._return:return this.parseReturnStatement(a);case o._switch:return this.parseSwitchStatement(a);case o._throw:return this.parseThrowStatement(a);case o._try:return this.parseTryStatement(a);case o._const:case o._var:return s=s||this.state.value,t&&"var"!==s&&this.raise(this.state.start,"Lexical declaration cannot appear in a single-statement context"),this.parseVarStatement(a,s);case o._while:return this.parseWhileStatement(a);case o._with:return this.parseWithStatement(a);case o.braceL:return this.parseBlock();case o.semi:return this.parseEmptyStatement(a);case o._export:case o._import:var r,n=this.lookaheadCharCode();if(40===n||46===n)break;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.next(),i===o._import?"ImportDeclaration"!==(r=this.parseImport(a)).type||r.importKind&&"value"!==r.importKind||(this.sawUnambiguousESM=!0):("ExportNamedDeclaration"!==(r=this.parseExport(a)).type||r.exportKind&&"value"!==r.exportKind)&&("ExportAllDeclaration"!==r.type||r.exportKind&&"value"!==r.exportKind)&&"ExportDefaultDeclaration"!==r.type||(this.sawUnambiguousESM=!0),this.assertModuleNodeAllowed(a),r;default:if(this.isAsyncFunction())return t&&this.raise(this.state.start,"Async functions can only be declared at the top level or inside a block"),this.next(),this.parseFunctionStatement(a,!0,!t)}var h=this.state.value,u=this.parseExpression();return i===o.name&&"Identifier"===u.type&&this.eat(o.colon)?this.parseLabeledStatement(a,h,u,t):this.parseExpressionStatement(a,u)}},{key:"assertModuleNodeAllowed",value:function(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"})}},{key:"takeDecorators",value:function(t){var e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}},{key:"canHaveLeadingDecorator",value:function(){return this.match(o._class)}},{key:"parseDecorators",value:function(t){for(var e=this.state.decoratorStack[this.state.decoratorStack.length-1];this.match(o.at);){var s=this.parseDecorator();e.push(s)}if(this.match(o._export))t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.");else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,"Leading decorators must be attached to a class declaration")}},{key:"parseDecorator",value:function(){this.expectOnePlugin(["decorators-legacy","decorators"]);var t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);var e,s=this.state.start,i=this.state.startLoc;if(this.eat(o.parenL))e=this.parseExpression(),this.expect(o.parenR);else for(e=this.parseIdentifier(!1);this.eat(o.dot);){var a=this.startNodeAt(s,i);a.object=e,a.property=this.parseIdentifier(!0),a.computed=!1,e=this.finishNode(a,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(e),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}},{key:"parseMaybeDecoratorArguments",value:function(t){if(this.eat(o.parenL)){var e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(o.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}},{key:"parseBreakContinueStatement",value:function(t,e){var s="break"===e;return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")}},{key:"verifyBreakContinue",value:function(t,e){var s,i="break"===e;for(s=0;s<this.state.labels.length;++s){var a=this.state.labels[s];if(null==t.label||a.name===t.label.name){if(null!=a.kind&&(i||"loop"===a.kind))break;if(t.label&&i)break}}s===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e)}},{key:"parseDebuggerStatement",value:function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}},{key:"parseHeaderExpression",value:function(){this.expect(o.parenL);var t=this.parseExpression();return this.expect(o.parenR),t}},{key:"parseDoStatement",value:function(t){var e=this;return this.next(),this.state.labels.push(Tt),t.body=this.withTopicForbiddingContext((function(){return e.parseStatement("do")})),this.state.labels.pop(),this.expect(o._while),t.test=this.parseHeaderExpression(),this.eat(o.semi),this.finishNode(t,"DoWhileStatement")}},{key:"parseForStatement",value:function(t){this.next(),this.state.labels.push(Tt);var e=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(e=this.state.lastTokStart),this.scope.enter(0),this.expect(o.parenL),this.match(o.semi))return e>-1&&this.unexpected(e),this.parseFor(t,null);var s=this.isLet();if(this.match(o._var)||this.match(o._const)||s){var i=this.startNode(),a=s?"let":this.state.value;return this.next(),this.parseVar(i,!0,a),this.finishNode(i,"VariableDeclaration"),(this.match(o._in)||this.isContextual("of"))&&1===i.declarations.length?this.parseForIn(t,i,e):(e>-1&&this.unexpected(e),this.parseFor(t,i))}var r={start:0},n=this.parseExpression(!0,r);if(this.match(o._in)||this.isContextual("of")){var h=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(n,void 0,h),this.checkLVal(n,void 0,void 0,h),this.parseForIn(t,n,e)}return r.start&&this.unexpected(r.start),e>-1&&this.unexpected(e),this.parseFor(t,n)}},{key:"parseFunctionStatement",value:function(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}},{key:"parseIfStatement",value:function(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}},{key:"parseReturnStatement",value:function(t){return this.scope.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}},{key:"parseSwitchStatement",value:function(t){this.next(),t.discriminant=this.parseHeaderExpression();var e,s,i=t.cases=[];for(this.expect(o.braceL),this.state.labels.push(Ft),this.scope.enter(0);!this.match(o.braceR);)if(this.match(o._case)||this.match(o._default)){var a=this.match(o._case);e&&this.finishNode(e,"SwitchCase"),i.push(e=this.startNode()),e.consequent=[],this.next(),a?e.test=this.parseExpression():(s&&this.raise(this.state.lastTokStart,"Multiple default clauses"),s=!0,e.test=null),this.expect(o.colon)}else e?e.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}},{key:"parseThrowStatement",value:function(t){return this.next(),v.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}},{key:"parseTryStatement",value:function(t){var e=this;if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(o._catch)){var s=this.startNode();if(this.next(),this.match(o.parenL)){this.expect(o.parenL),s.param=this.parseBindingAtom();var i="Identifier"===s.param.type;this.scope.enter(i?32:0),this.checkLVal(s.param,9,null,"catch clause"),this.expect(o.parenR)}else s.param=null,this.scope.enter(0);s.body=this.withTopicForbiddingContext((function(){return e.parseBlock(!1,!1)})),this.scope.exit(),t.handler=this.finishNode(s,"CatchClause")}return t.finalizer=this.eat(o._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")}},{key:"parseVarStatement",value:function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}},{key:"parseWhileStatement",value:function(t){var e=this;return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Tt),t.body=this.withTopicForbiddingContext((function(){return e.parseStatement("while")})),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}},{key:"parseWithStatement",value:function(t){var e=this;return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withTopicForbiddingContext((function(){return e.parseStatement("with")})),this.finishNode(t,"WithStatement")}},{key:"parseEmptyStatement",value:function(t){return this.next(),this.finishNode(t,"EmptyStatement")}},{key:"parseLabeledStatement",value:function(t,e,s,i){for(var a=0,r=this.state.labels;a<r.length;a++){r[a].name===e&&this.raise(s.start,"Label '".concat(e,"' is already declared"))}for(var n=this.state.type.isLoop?"loop":this.match(o._switch)?"switch":null,h=this.state.labels.length-1;h>=0;h--){var u=this.state.labels[h];if(u.statementStart!==t.start)break;u.statementStart=this.state.start,u.kind=n}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}},{key:"parseExpressionStatement",value:function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}},{key:"parseBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.startNode();return this.expect(o.braceL),e&&this.scope.enter(0),this.parseBlockBody(s,t,!1,o.braceR),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}},{key:"isValidDirective",value:function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}},{key:"parseBlockBody",value:function(t,e,s,i){var a=t.body=[],r=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?r:void 0,s,i)}},{key:"parseBlockOrModuleBlockBody",value:function(t,e,s,i){for(var a,r,n=!1;!this.eat(i);){n||!this.state.containsOctal||r||(r=this.state.octalPosition);var o=this.parseStatement(null,s);if(e&&!n&&this.isValidDirective(o)){var h=this.stmtToDirective(o);e.push(h),void 0===a&&"use strict"===h.value.value&&(a=this.state.strict,this.setStrict(!0),r&&this.raise(r,"Octal literal in strict mode"))}else n=!0,t.push(o)}!1===a&&this.setStrict(!1)}},{key:"parseFor",value:function(t,e){var s=this;return t.init=e,this.expect(o.semi),t.test=this.match(o.semi)?null:this.parseExpression(),this.expect(o.semi),t.update=this.match(o.parenR)?null:this.parseExpression(),this.expect(o.parenR),t.body=this.withTopicForbiddingContext((function(){return s.parseStatement("for")})),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}},{key:"parseForIn",value:function(t,e,s){var i=this,a=this.match(o._in);return this.next(),a?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||a&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,"Invalid left-hand side in for-loop"):this.raise(e.start,"".concat(a?"for-in":"for-of"," loop variable declaration may not have an initializer")),t.left=e,t.right=a?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),t.body=this.withTopicForbiddingContext((function(){return i.parseStatement("for")})),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,a?"ForInStatement":"ForOfStatement")}},{key:"parseVar",value:function(t,e,s){var i=t.declarations=[],a=this.hasPlugin("typescript");for(t.kind=s;;){var r=this.startNode();if(this.parseVarId(r,s),this.eat(o.eq)?r.init=this.parseMaybeAssign(e):("const"!==s||this.match(o._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(o._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):a||this.unexpected(),r.init=null),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(o.comma))break}return t}},{key:"parseVarId",value:function(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?5:9,void 0,"variable declaration","var"!==e)}},{key:"parseFunction",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=1&s,r=2&s,n=!(!a||4&s);this.initFunction(t,i),this.match(o.star)&&r&&this.raise(this.state.start,"Generators can only be declared at the top level or inside a block"),t.generator=this.eat(o.star),a&&(t.id=this.parseFunctionId(n));var h=this.state.maybeInArrowParameters,u=this.state.inClassProperty,l=this.state.yieldPos,c=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.inClassProperty=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(p(t.async,t.generator)),a||(t.id=this.parseFunctionId()),this.parseFunctionParams(t),this.withTopicForbiddingContext((function(){e.parseFunctionBodyAndFinish(t,a?"FunctionDeclaration":"FunctionExpression")})),this.scope.exit(),a&&!r&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=h,this.state.inClassProperty=u,this.state.yieldPos=l,this.state.awaitPos=c,t}},{key:"parseFunctionId",value:function(t){return t||this.match(o.name)?this.parseIdentifier():null}},{key:"parseFunctionParams",value:function(t,e){var s=this.state.inParameters;this.state.inParameters=!0,this.expect(o.parenL),t.params=this.parseBindingList(o.parenR,41,!1,e),this.state.inParameters=s,this.checkYieldAwaitInDefaultParams()}},{key:"registerFunctionStatementId",value:function(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}},{key:"parseClass",value:function(t,e,s){this.next(),this.takeDecorators(t);var i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass),this.state.strict=i,this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}},{key:"isClassProperty",value:function(){return this.match(o.eq)||this.match(o.semi)||this.match(o.braceR)}},{key:"isClassMethod",value:function(){return this.match(o.parenL)}},{key:"isNonstaticConstructor",value:function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)}},{key:"parseClassBody",value:function(t){var e=this;this.state.classLevel++;var s={hadConstructor:!1},i=[],a=this.startNode();if(a.body=[],this.expect(o.braceL),this.withTopicForbiddingContext((function(){for(;!e.eat(o.braceR);)if(e.eat(o.semi)){if(i.length>0)throw e.raise(e.state.lastTokEnd,"Decorators must not be followed by a semicolon")}else if(e.match(o.at))i.push(e.parseDecorator());else{var r=e.startNode();i.length&&(r.decorators=i,e.resetStartLocationFromNode(r,i[0]),i=[]),e.parseClassMember(a,r,s,t),"constructor"===r.kind&&r.decorators&&r.decorators.length>0&&e.raise(r.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}})),i.length)throw this.raise(this.state.start,"You have trailing decorators with no method");return this.state.classLevel--,this.finishNode(a,"ClassBody")}},{key:"parseClassMember",value:function(t,e,s,i){var a=!1,r=this.state.containsEsc;if(this.match(o.name)&&"static"===this.state.value){var n=this.parseIdentifier(!0);if(this.isClassMethod()){var h=e;return h.kind="method",h.computed=!1,h.key=n,h.static=!1,void this.pushClassMethod(t,h,!1,!1,!1,!1)}if(this.isClassProperty()){var u=e;return u.computed=!1,u.key=n,u.static=!1,void t.body.push(this.parseClassProperty(u))}if(r)throw this.unexpected();a=!0}this.parseClassMemberWithIsStatic(t,e,s,a,i)}},{key:"parseClassMemberWithIsStatic",value:function(t,e,s,i,a){var r=e,n=e,h=e,u=e,l=r,c=r;if(e.static=i,this.eat(o.star))return l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?void this.pushClassPrivateMethod(t,n,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be a generator"),void this.pushClassMethod(t,r,!0,!1,!1,!1));var p=this.state.containsEsc,d=this.parseClassPropertyName(e),f="PrivateName"===d.type,m="Identifier"===d.type,y=this.state.start;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",f)return void this.pushClassPrivateMethod(t,n,!1,!1);var D=this.isNonstaticConstructor(r),v=!1;D&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,"Duplicate constructor in the same class"),s.hadConstructor=!0,v=a),this.pushClassMethod(t,r,!1,!1,D,v)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,h);else if(!m||"async"!==d.name||p||this.isLineTerminator())!m||"get"!==d.name&&"set"!==d.name||p||this.match(o.star)&&this.isLineTerminator()?this.isLineTerminator()?f?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,h):this.unexpected():(l.kind=d.name,this.parseClassPropertyName(r),"PrivateName"===l.key.type?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r));else{var x=this.eat(o.star);c.optional&&this.unexpected(y),l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?this.pushClassPrivateMethod(t,n,x,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be an async function"),this.pushClassMethod(t,r,x,!0,!1,!1))}}},{key:"parseClassPropertyName",value:function(t){var e=this.parsePropertyName(t);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,"Classes may not have static property named prototype"),"PrivateName"===e.type&&"constructor"===e.id.name&&this.raise(e.start,"Classes may not have a private field named '#constructor'"),e}},{key:"pushClassProperty",value:function(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,"Classes may not have a field named 'constructor'"),t.body.push(this.parseClassProperty(e))}},{key:"pushClassPrivateProperty",value:function(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))}},{key:"pushClassMethod",value:function(t,e,s,i,a,r){t.body.push(this.parseMethod(e,s,i,a,r,"ClassMethod",!0))}},{key:"pushClassPrivateMethod",value:function(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0))}},{key:"parsePostMemberNameModifiers",value:function(t){}},{key:"parseAccessModifier",value:function(){}},{key:"parseClassPrivateProperty",value:function(t){return this.state.inClassProperty=!0,this.scope.enter(320),t.value=this.eat(o.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassPrivateProperty")}},{key:"parseClassProperty",value:function(t){return t.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.scope.enter(320),this.match(o.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassProperty")}},{key:"parseClassId",value:function(t,e,s){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:139;this.match(o.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,i,void 0,"class name")):s||!e?t.id=null:this.unexpected(null,"A class name is required")}},{key:"parseClassSuper",value:function(t){t.superClass=this.eat(o._extends)?this.parseExprSubscripts():null}},{key:"parseExport",value:function(t){var e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(o.comma),i=s&&this.eatExportStar(t),a=i&&this.maybeParseExportNamespaceSpecifier(t),r=s&&(!a||this.eat(o.comma)),n=e||i;if(i&&!a)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");var h,u=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!u||a&&r&&!u)throw this.unexpected(null,o.braceL);if(n||u?(h=!1,this.parseExportFrom(t,n)):h=this.maybeParseExportDeclaration(t),n||u||h)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(o._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,o.braceL)}},{key:"eatExportStar",value:function(t){return this.eat(o.star)}},{key:"maybeParseExportDefaultSpecifier",value:function(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}},{key:"maybeParseExportNamespaceSpecifier",value:function(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]);var e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseIdentifier(!0),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}},{key:"maybeParseExportNamedSpecifiers",value:function(t){var e;return!!this.match(o.braceL)&&(t.specifiers||(t.specifiers=[]),(e=t.specifiers).push.apply(e,b(this.parseExportSpecifiers())),t.source=null,t.declaration=null,!0)}},{key:"maybeParseExportDeclaration",value:function(t){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var e=this.nextTokenStart();this.isUnparsedContextual(e,"function")||this.unexpected(e,'Unexpected token, expected "function"')}return t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0}return!1}},{key:"isAsyncFunction",value:function(){if(!this.isContextual("async"))return!1;var t=this.nextTokenStart();return!v.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}},{key:"parseExportDefaultExpression",value:function(){var t=this.startNode(),e=this.isAsyncFunction();if(this.match(o._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(o._class))return this.parseClass(t,!0,!0);if(this.match(o.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(o._const)||this.match(o._var)||this.isLet())throw this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var s=this.parseMaybeAssign();return this.semicolon(),s}},{key:"parseExportDeclaration",value:function(t){return this.parseStatement(null)}},{key:"isExportDefaultSpecifier",value:function(){if(this.match(o.name))return"async"!==this.state.value&&"let"!==this.state.value;if(!this.match(o._default))return!1;var t=this.nextTokenStart();return 44===this.input.charCodeAt(t)||this.isUnparsedContextual(t,"from")}},{key:"parseExportFrom",value:function(t,e){this.eatContextual("from")?(t.source=this.parseImportSource(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()}},{key:"shouldParseExportDeclaration",value:function(){if(this.match(o.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}},{key:"checkExport",value:function(t,e,s,i){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(var a=0,r=t.specifiers;a<r.length;a++){var n=r[a];this.checkDuplicateExports(n,n.exported.name),!i&&n.local&&(this.checkReservedWord(n.local.name,n.local.start,!0,!1),this.scope.checkLocalExport(n.local))}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){var o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if("VariableDeclaration"===t.declaration.type)for(var h=0,u=t.declaration.declarations;h<u.length;h++){var l=u[h];this.checkDeclaration(l.id)}if(this.state.decoratorStack[this.state.decoratorStack.length-1].length){var c=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);if(!t.declaration||!c)throw this.raise(t.start,"You can only use decorators on an export when exporting a class");this.takeDecorators(t.declaration)}}},{key:"checkDeclaration",value:function(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(var e=0,s=t.properties;e<s.length;e++){var i=s[e];this.checkDeclaration(i)}else if("ArrayPattern"===t.type)for(var a=0,r=t.elements;a<r.length;a++){var n=r[a];n&&this.checkDeclaration(n)}else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}},{key:"checkDuplicateExports",value:function(t,e){this.state.exportedIdentifiers.indexOf(e)>-1&&this.raise(t.start,"default"===e?"Only one default export allowed per module.":"`".concat(e,"` has already been exported. Exported identifiers must be unique.")),this.state.exportedIdentifiers.push(e)}},{key:"parseExportSpecifiers",value:function(){var t=[],e=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else if(this.expect(o.comma),this.eat(o.braceR))break;var s=this.startNode();s.local=this.parseIdentifier(!0),s.exported=this.eatContextual("as")?this.parseIdentifier(!0):s.local.__clone(),t.push(this.finishNode(s,"ExportSpecifier"))}return t}},{key:"parseImport",value:function(t){if(t.specifiers=[],!this.match(o.string)){var e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(o.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}return t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.match(o.string)||this.unexpected(),this.parseExprAtom()}},{key:"shouldParseDefaultImport",value:function(t){return this.match(o.name)}},{key:"parseImportSpecifierLocal",value:function(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,9,void 0,i),t.specifiers.push(this.finishNode(e,s))}},{key:"maybeParseDefaultImportSpecifier",value:function(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}},{key:"maybeParseStarImportSpecifier",value:function(t){if(this.match(o.star)){var e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}},{key:"parseNamedImportSpecifiers",value:function(t){var e=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else{if(this.eat(o.colon))throw this.raise(this.state.start,"ES2015 named imports do not destructure. Use another statement for destructuring after the import.");if(this.expect(o.comma),this.eat(o.braceR))break}this.parseImportSpecifier(t)}}},{key:"parseImportSpecifier",value:function(t){var e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,9,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"checkDuplicatedProto",value:function(t,e){if(!("SpreadElement"===t.type||t.computed||t.kind||t.shorthand)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.used&&!e.start&&(e.start=s.start),e.used=!0)}}},{key:"getExpression",value:function(){this.scope.enter(1),this.nextToken();var t=this.parseExpression();return this.match(o.eof)||this.unexpected(),t.comments=this.state.comments,t.errors=this.state.errors,t}},{key:"parseExpression",value:function(t,e){var s=this.state.start,i=this.state.startLoc,a=this.parseMaybeAssign(t,e);if(this.match(o.comma)){var r=this.startNodeAt(s,i);for(r.expressions=[a];this.eat(o.comma);)r.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return a}},{key:"parseMaybeAssign",value:function(t,e,s,i){var a,r=this.state.start,n=this.state.startLoc;if(this.isContextual("yield")){if(this.scope.inGenerator){var h=this.parseYield(t);return s&&(h=s.call(this,h,r,n)),h}this.state.exprAllowed=!1}e?a=!1:(e={start:0},a=!0),(this.match(o.parenL)||this.match(o.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(t,e,i);if(s&&(u=s.call(this,u,r,n)),this.state.type.isAssign){var l=this.startNodeAt(r,n),c=this.state.value;l.operator=c,"??="===c&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==c&&"&&="!==c||this.expectPlugin("logicalAssignment"),l.left=this.match(o.eq)?this.toAssignable(u,void 0,"assignment expression"):u,e.start>=l.left.start&&(e.start=0),this.checkLVal(u,void 0,void 0,"assignment expression");var p,d=function t(e){return"ParenthesizedExpression"===e.type?t(e.expression):e}(u);return"ObjectPattern"===d.type?p="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===d.type&&(p="`([a]) = 0` use `([a] = 0)`"),p&&(u.extra&&u.extra.parenthesized||"ParenthesizedExpression"===u.type)&&this.raise(d.start,"You're trying to assign to a parenthesized expression, eg. instead of ".concat(p)),this.next(),l.right=this.parseMaybeAssign(t),this.finishNode(l,"AssignmentExpression")}return a&&e.start&&this.unexpected(e.start),u}},{key:"parseMaybeConditional",value:function(t,e,s){var i=this.state.start,a=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return"ArrowFunctionExpression"===n.type&&n.start===r?n:e&&e.start?n:this.parseConditional(n,t,i,a,s)}},{key:"parseConditional",value:function(t,e,s,i,a){if(this.eat(o.question)){var r=this.startNodeAt(s,i);return r.test=t,r.consequent=this.parseMaybeAssign(),this.expect(o.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return t}},{key:"parseExprOps",value:function(t,e){var s=this.state.start,i=this.state.startLoc,a=this.state.potentialArrowAt,r=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===r.type&&r.start===a?r:e&&e.start?r:this.parseExprOp(r,s,i,-1,t)}},{key:"parseExprOp",value:function(t,e,s,i,a){var r=this.state.type.binop;if(!(null==r||a&&this.match(o._in))&&r>i){var n=this.state.value;if("|>"===n&&this.state.inFSharpPipelineDirectBody)return t;var h=this.startNodeAt(e,s);h.left=t,h.operator=n,"**"!==n||"UnaryExpression"!==t.type||!this.options.createParenthesizedExpressions&&t.extra&&t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var u=this.state.type;if(u===o.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)):u===o.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),u===o.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(o.name)&&"await"===this.state.value&&this.scope.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');if(h.right=this.parseExprOpRightExpr(u,r,a),u===o.nullishCoalescing){if(!("LogicalExpression"!==t.type||"??"===t.operator||t.extra&&t.extra.parenthesized))throw this.raise(t.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators");if(!("LogicalExpression"!==h.right.type||"??"===h.right.operator||h.right.extra&&h.right.extra.parenthesized))throw this.raise(h.right.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators")}return this.finishNode(h,u===o.logicalOR||u===o.logicalAND||u===o.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(h,e,s,i,a)}return t}},{key:"parseExprOpRightExpr",value:function(t,e,s){var i=this,a=this.state.start,r=this.state.startLoc;switch(t){case o.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((function(){return i.parseSmartPipelineBody(i.parseExprOpBaseRightExpr(t,e,s),a,r)}));case"fsharp":return this.withSoloAwaitPermittingContext((function(){return i.parseFSharpPipelineBody(e,s)}))}default:return this.parseExprOpBaseRightExpr(t,e,s)}}},{key:"parseExprOpBaseRightExpr",value:function(t,e,s){var i=this.state.start,a=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),i,a,t.rightAssociative?e-1:e,s)}},{key:"parseMaybeUnary",value:function(t){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){var e=this.startNode(),s=this.match(o.incDec);if(e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next(),e.argument=this.parseMaybeUnary(),t&&t.start&&this.unexpected(t.start),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){var i=e.argument;"Identifier"===i.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===i.type&&"PrivateName"===i.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var a=this.state.start,r=this.state.startLoc,n=this.parseExprSubscripts(t);if(t&&t.start)return n;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(a,r);h.operator=this.state.value,h.prefix=!1,h.argument=n,this.checkLVal(n,void 0,void 0,"postfix operation"),this.next(),n=this.finishNode(h,"UpdateExpression")}return n}},{key:"parseExprSubscripts",value:function(t){var e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseExprAtom(t);return"ArrowFunctionExpression"===a.type&&a.start===i?a:t&&t.start?a:this.parseSubscripts(a,e,s)}},{key:"parseSubscripts",value:function(t,e,s,i){var a={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsync(t),stop:!1};do{t=this.parseSubscript(t,e,s,i,a),a.maybeAsyncArrow=!1}while(!a.stop);return t}},{key:"parseSubscript",value:function(t,e,s,i,a){if(!i&&this.eat(o.doubleColon)){var r=this.startNodeAt(e,s);return r.object=t,r.callee=this.parseNoCallExpr(),a.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s,i)}if(this.match(o.questionDot)){if(this.expectPlugin("optionalChaining"),a.optionalChainMember=!0,i&&40===this.lookaheadCharCode())return a.stop=!0,t;this.next();var n=this.startNodeAt(e,s);return this.eat(o.bracketL)?(n.object=t,n.property=this.parseExpression(),n.computed=!0,n.optional=!0,this.expect(o.bracketR),this.finishNode(n,"OptionalMemberExpression")):this.eat(o.parenL)?(n.callee=t,n.arguments=this.parseCallExpressionArguments(o.parenR,!1),n.optional=!0,this.finishCallExpression(n,!0)):(n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"OptionalMemberExpression"))}if(this.eat(o.dot)){var h=this.startNodeAt(e,s);return h.object=t,h.property=this.parseMaybePrivateName(),h.computed=!1,"PrivateName"===h.property.type&&"Super"===h.object.type&&this.raise(e,"Private fields can't be accessed on super"),a.optionalChainMember?(h.optional=!1,this.finishNode(h,"OptionalMemberExpression")):this.finishNode(h,"MemberExpression")}if(this.eat(o.bracketL)){var u=this.startNodeAt(e,s);return u.object=t,u.property=this.parseExpression(),u.computed=!0,this.expect(o.bracketR),a.optionalChainMember?(u.optional=!1,this.finishNode(u,"OptionalMemberExpression")):this.finishNode(u,"MemberExpression")}if(!i&&this.match(o.parenL)){var l=this.state.maybeInArrowParameters,c=this.state.yieldPos,p=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();var d=this.startNodeAt(e,s);return d.callee=t,d.arguments=this.parseCallExpressionArguments(o.parenR,a.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,d),this.finishCallExpression(d,a.optionalChainMember),a.maybeAsyncArrow&&this.shouldParseAsyncArrow()?(a.stop=!0,d=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),d),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=c,this.state.awaitPos=p):(this.toReferencedListDeep(d.arguments),-1!==c&&(this.state.yieldPos=c),(this.isAwaitAllowed()||l)&&-1===p||(this.state.awaitPos=p)),this.state.maybeInArrowParameters=l,d}return this.match(o.backQuote)?this.parseTaggedTemplateExpression(e,s,t,a):(a.stop=!0,t)}},{key:"parseTaggedTemplateExpression",value:function(t,e,s,i,a){var r=this.startNodeAt(t,e);return r.tag=s,r.quasi=this.parseTemplate(!0),a&&(r.typeParameters=a),i.optionalChainMember&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(r,"TaggedTemplateExpression")}},{key:"atPossibleAsync",value:function(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end)}},{key:"finishCallExpression",value:function(t,e){if("Import"===t.callee.type)if(1!==t.arguments.length)this.raise(t.start,"import() requires exactly one argument");else{var s=t.arguments[0];s&&"SpreadElement"===s.type&&this.raise(s.start,"... is not allowed in import()")}return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}},{key:"parseCallExpressionArguments",value:function(t,e,s,i,a){var r,n=[],h=!0,u=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(h)h=!1;else if(this.expect(o.comma),this.match(t)){s&&this.raise(this.state.lastTokStart,"Trailing comma is disallowed inside import(...) arguments"),a&&this.addExtra(a,"trailingComma",this.state.lastTokStart),this.next();break}this.match(o.parenL)&&!r&&(r=this.state.start),n.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,i))}return e&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=u,n}},{key:"shouldParseAsyncArrow",value:function(){return this.match(o.arrow)&&!this.canInsertSemicolon()}},{key:"parseAsyncArrowFromCallExpression",value:function(t,e){var s;return this.expect(o.arrow),this.parseArrowExpression(t,e.arguments,!0,null===(s=e.extra)||void 0===s?void 0:s.trailingComma),t}},{key:"parseNoCallExpr",value:function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}},{key:"parseExprAtom",value:function(t){this.state.type===o.slash&&this.readRegexp();var e,s=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case o._super:return e=this.startNode(),this.next(),!this.match(o.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(e.start,"super is only allowed in object methods and classes"):this.raise(e.start,"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?"),this.match(o.parenL)||this.match(o.bracketL)||this.match(o.dot)||this.raise(e.start,"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])"),this.finishNode(e,"Super");case o._import:return e=this.startNode(),this.next(),this.match(o.dot)?this.parseImportMetaProperty(e):(this.expectPlugin("dynamicImport",e.start),this.match(o.parenL)||this.unexpected(null,o.parenL),this.finishNode(e,"Import"));case o._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case o.name:e=this.startNode();var i=this.state.containsEsc,a=this.parseIdentifier();if(!i&&"async"===a.name&&this.match(o._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,void 0,!0);if(s&&!i&&"async"===a.name&&this.match(o.name)&&!this.canInsertSemicolon()){var r=[this.parseIdentifier()];return this.expect(o.arrow),this.parseArrowExpression(e,r,!0),e}return s&&this.match(o.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(e,[a],!1),e):a;case o._do:this.expectPlugin("doExpressions");var n=this.startNode();this.next();var h=this.state.labels;return this.state.labels=[],n.body=this.parseBlock(),this.state.labels=h,this.finishNode(n,"DoExpression");case o.regexp:var u=this.state.value;return(e=this.parseLiteral(u.value,"RegExpLiteral")).pattern=u.pattern,e.flags=u.flags,e;case o.num:return this.parseLiteral(this.state.value,"NumericLiteral");case o.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case o.string:return this.parseLiteral(this.state.value,"StringLiteral");case o._null:return e=this.startNode(),this.next(),this.finishNode(e,"NullLiteral");case o._true:case o._false:return this.parseBooleanLiteral();case o.parenL:return this.parseParenAndDistinguishExpression(s);case o.bracketL:var l=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,e=this.startNode(),this.next(),e.elements=this.parseExprList(o.bracketR,!0,t,e),this.state.maybeInArrowParameters||this.toReferencedList(e.elements),this.state.inFSharpPipelineDirectBody=l,this.finishNode(e,"ArrayExpression");case o.braceL:var c=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var p=this.parseObj(!1,t);return this.state.inFSharpPipelineDirectBody=c,p;case o._function:return this.parseFunctionExpression();case o.at:this.parseDecorators();case o._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate(!1);case o.doubleColon:e=this.startNode(),this.next(),e.object=null;var d=e.callee=this.parseNoCallExpr();if("MemberExpression"===d.type)return this.finishNode(e,"BindExpression");throw this.raise(d.start,"Binding should be performed on object property.");case o.hash:if(this.state.inPipeline)return e=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(e.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(e.start,"Topic reference was used in a lexical context without topic binding"),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference");default:throw this.unexpected()}}},{key:"parseBooleanLiteral",value:function(){var t=this.startNode();return t.value=this.match(o._true),this.next(),this.finishNode(t,"BooleanLiteral")}},{key:"parseMaybePrivateName",value:function(){if(this.match(o.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)}},{key:"parseFunctionExpression",value:function(){var t=this.startNode(),e=this.startNode();return this.next(),e=this.createIdentifier(e,"function"),this.scope.inGenerator&&this.eat(o.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t)}},{key:"parseMetaProperty",value:function(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,"The only valid meta property for ".concat(e.name," is ").concat(e.name,".").concat(s)),this.finishNode(t,"MetaProperty")}},{key:"parseImportMetaProperty",value:function(t){var e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.expect(o.dot),this.isContextual("meta")?(this.expectPlugin("importMeta"),this.inModule||this.raise(e.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0):this.hasPlugin("importMeta")||this.raise(e.start,"Dynamic imports require a parameter: import('a.js')"),this.parseMetaProperty(t,e,"meta")}},{key:"parseLiteral",value:function(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;var a=this.startNodeAt(s,i);return this.addExtra(a,"rawValue",t),this.addExtra(a,"raw",this.input.slice(s,this.state.end)),a.value=t,this.next(),this.finishNode(a,e)}},{key:"parseParenAndDistinguishExpression",value:function(t){var e,s=this.state.start,i=this.state.startLoc;this.expect(o.parenL);var a=this.state.maybeInArrowParameters,r=this.state.yieldPos,n=this.state.awaitPos,h=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;for(var u,l,c=this.state.start,p=this.state.startLoc,d=[],f={start:0},m={start:0},y=!0;!this.match(o.parenR);){if(y)y=!1;else if(this.expect(o.comma,m.start||null),this.match(o.parenR)){l=this.state.start;break}if(this.match(o.ellipsis)){var D=this.state.start,v=this.state.startLoc;u=this.state.start,d.push(this.parseParenItem(this.parseRestBinding(),D,v)),this.checkCommaAfterRest(41);break}d.push(this.parseMaybeAssign(!1,f,this.parseParenItem,m))}var x=this.state.start,g=this.state.startLoc;this.expect(o.parenR),this.state.maybeInArrowParameters=a,this.state.inFSharpPipelineDirectBody=h;var k=this.startNodeAt(s,i);if(t&&this.shouldParseArrow()&&(k=this.parseArrow(k))){this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=r,this.state.awaitPos=n;for(var P=0;P<d.length;P++){var b=d[P];b.extra&&b.extra.parenthesized&&this.unexpected(b.extra.parenStart)}return this.parseArrowExpression(k,d,!1),k}if(-1!==r&&(this.state.yieldPos=r),-1!==n&&(this.state.awaitPos=n),d.length||this.unexpected(this.state.lastTokStart),l&&this.unexpected(l),u&&this.unexpected(u),f.start&&this.unexpected(f.start),m.start&&this.unexpected(m.start),this.toReferencedListDeep(d,!0),d.length>1?((e=this.startNodeAt(c,p)).expressions=d,this.finishNodeAt(e,"SequenceExpression",x,g)):e=d[0],!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s),e;var E=this.startNodeAt(s,i);return E.expression=e,this.finishNode(E,"ParenthesizedExpression"),E}},{key:"shouldParseArrow",value:function(){return!this.canInsertSemicolon()}},{key:"parseArrow",value:function(t){if(this.eat(o.arrow))return t}},{key:"parseParenItem",value:function(t,e,s){return t}},{key:"parseNew",value:function(){var t=this.startNode(),e=this.startNode();if(this.next(),e=this.createIdentifier(e,"new"),this.eat(o.dot)){var s=this.parseMetaProperty(t,e,"target");if(!this.scope.inNonArrowFunction&&!this.state.inClassProperty){var i="new.target can only be used in functions";this.hasPlugin("classProperties")&&(i+=" or class properties"),this.raise(s.start,i)}return s}return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,"Cannot use new with import(...)"):"OptionalMemberExpression"===t.callee.type||"OptionalCallExpression"===t.callee.type?this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"):this.eat(o.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}},{key:"parseNewArguments",value:function(t){if(this.eat(o.parenL)){var e=this.parseExprList(o.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}},{key:"parseTemplateElement",value:function(t){var e=this.startNode();return null===this.state.value&&(t?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(o.backQuote),this.finishNode(e,"TemplateElement")}},{key:"parseTemplate",value:function(t){var e=this.startNode();this.next(),e.expressions=[];var s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(o.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(o.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}},{key:"parseObj",value:function(t,e){var s=Object.create(null),i=!0,a=this.startNode();for(a.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.match(o.braceR)){this.addExtra(a,"trailingComma",this.state.lastTokStart),this.next();break}var r=this.parseObjectMember(t,e);t||this.checkDuplicatedProto(r,s),r.shorthand&&this.addExtra(r,"shorthand",!0),a.properties.push(r)}return this.match(o.eq)||void 0===s.start||this.raise(s.start,"Redefinition of __proto__ property"),this.finishNode(a,t?"ObjectPattern":"ObjectExpression")}},{key:"isAsyncProp",value:function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.match(o.name)||this.match(o.num)||this.match(o.string)||this.match(o.bracketL)||this.state.type.keyword||this.match(o.star))&&!this.hasPrecedingLineBreak()}},{key:"parseObjectMember",value:function(t,e){var s=[];if(this.match(o.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");this.match(o.at);)s.push(this.parseDecorator());var i,a,r=this.startNode(),n=!1,h=!1;if(this.match(o.ellipsis))return s.length&&this.unexpected(),t?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();s.length&&(r.decorators=s,s=[]),r.method=!1,(t||e)&&(i=this.state.start,a=this.state.startLoc),t||(n=this.eat(o.star));var u=this.state.containsEsc;return this.parsePropertyName(r),t||u||n||!this.isAsyncProp(r)?h=!1:(h=!0,n=this.eat(o.star),this.parsePropertyName(r)),this.parseObjPropValue(r,i,a,n,h,t,e,u),r}},{key:"isGetterOrSetterMethod",value:function(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(o.string)||this.match(o.num)||this.match(o.bracketL)||this.match(o.name)||!!this.state.type.keyword)}},{key:"getGetterSetterExpectedParamCount",value:function(t){return"get"===t.kind?0:1}},{key:"checkGetterSetterParams",value:function(t){var e=this.getGetterSetterExpectedParamCount(t),s=t.start;t.params.length!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&"RestElement"===t.params[t.params.length-1].type&&this.raise(s,"setter function argument must not be a rest parameter")}},{key:"parseObjectMethod",value:function(t,e,s,i,a){return s||e||this.match(o.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):!a&&this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):void 0}},{key:"parseObjectProperty",value:function(t,e,s,i,a){return t.shorthand=!1,this.eat(o.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,a),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(o.eq)&&a?(a.start||(a.start=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}},{key:"parseObjPropValue",value:function(t,e,s,i,a,r,n,o){var h=this.parseObjectMethod(t,i,a,r,o)||this.parseObjectProperty(t,e,s,r,n);return h||this.unexpected(),h}},{key:"parsePropertyName",value:function(t){if(this.eat(o.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(o.bracketR);else{var e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(o.num)||this.match(o.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=e}return t.key}},{key:"initFunction",value:function(t,e){t.id=null,t.generator=!1,t.async=!!e}},{key:"parseMethod",value:function(t,e,s,i,a,r){var n=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=this.state.yieldPos,h=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(t,s),t.generator=!!e;var u=i;return this.scope.enter(64|p(s,t.generator)|(n?256:0)|(a?128:0)),this.parseFunctionParams(t,u),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBodyAndFinish(t,r,!0),this.scope.exit(),this.state.yieldPos=o,this.state.awaitPos=h,t}},{key:"parseArrowExpression",value:function(t,e,s,i){this.scope.enter(16|p(s,!1)),this.initFunction(t,s);var a=this.state.maybeInArrowParameters,r=this.state.yieldPos,n=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,e&&this.setArrowFunctionParameters(t,e,i),this.parseFunctionBody(t,!0),this.scope.exit(),this.state.maybeInArrowParameters=a,this.state.yieldPos=r,this.state.awaitPos=n,this.finishNode(t,"ArrowFunctionExpression")}},{key:"setArrowFunctionParameters",value:function(t,e,s){t.params=this.toAssignableList(e,!0,"arrow function parameters",s)}},{key:"isStrictBody",value:function(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(var e=0,s=t.body.directives;e<s.length;e++){if("use strict"===s[e].value.value)return!0}return!1}},{key:"parseFunctionBodyAndFinish",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}},{key:"parseFunctionBody",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e&&!this.match(o.braceL),a=this.state.strict,r=!1,n=this.state.inParameters;if(this.state.inParameters=!1,i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{var h=!this.isSimpleParamList(t.params);if((!a||h)&&(r=this.strictDirective(this.state.end))&&h){var u="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(u,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.state.labels;this.state.labels=[],r&&(this.state.strict=!0),this.checkParams(t,!(a||r||e||s||h),e,!a&&r),t.body=this.parseBlock(!0,!1),this.state.labels=l}this.state.inParameters=n,this.state.strict&&t.id&&this.checkLVal(t.id,65,void 0,"function name",void 0,!a&&r),this.state.strict=a}},{key:"isSimpleParamList",value:function(t){for(var e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}},{key:"checkParams",value:function(t,e,s){for(var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Object.create(null),r=0;r<t.params.length;r++)this.checkLVal(t.params[r],5,e?null:a,"function parameter list",void 0,i)}},{key:"parseExprList",value:function(t,e,s,i){for(var a=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(o.comma),this.match(t)){i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}a.push(this.parseExprListItem(e,s))}return a}},{key:"parseExprListItem",value:function(t,e,s,i){var a;if(t&&this.match(o.comma))a=null;else if(this.match(o.ellipsis)){var r=this.state.start,n=this.state.startLoc;a=this.parseParenItem(this.parseSpread(e,s),r,n)}else if(this.match(o.question)){this.expectPlugin("partialApplication"),i||this.raise(this.state.start,"Unexpected argument placeholder");var h=this.startNode();this.next(),a=this.finishNode(h,"ArgumentPlaceholder")}else a=this.parseMaybeAssign(!1,e,this.parseParenItem,s);return a}},{key:"parseIdentifier",value:function(t){var e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}},{key:"createIdentifier",value:function(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}},{key:"parseIdentifierName",value:function(t,e){var s;if(this.match(o.name))s=this.state.value;else{if(!this.state.type.keyword)throw this.unexpected();"class"!==(s=this.state.type.keyword)&&"function"!==s||this.state.lastTokEnd===this.state.lastTokStart+1&&46===this.input.charCodeAt(this.state.lastTokStart)||this.state.context.pop()}return e?this.state.type=o.name:this.checkReservedWord(s,this.state.start,!!this.state.type.keyword,!1),this.next(),s}},{key:"checkReservedWord",value:function(t,e,s,i){if(this.scope.inGenerator&&"yield"===t)this.raise(e,"Can not use 'yield' as identifier inside a generator");else{if("await"===t){if(this.scope.inAsync)return void this.raise(e,"Can not use 'await' as identifier inside an async function");-1===this.state.awaitPos&&(this.state.maybeInArrowParameters||this.isAwaitAllowed())&&(this.state.awaitPos=this.state.start)}if(this.state.inClassProperty&&"arguments"===t)this.raise(e,"'arguments' is not allowed in class field initializer");else if(s&&function(t){return a.has(t)}(t))this.raise(e,"Unexpected keyword '".concat(t,"'"));else(this.state.strict?i?M:B:L)(t,this.inModule)&&(this.scope.inAsync||"await"!==t?this.raise(e,"Unexpected reserved word '".concat(t,"'")):this.raise(e,"Can not use keyword 'await' outside an async function"))}}},{key:"isAwaitAllowed",value:function(){return this.scope.inFunction?this.scope.inAsync:!!this.options.allowAwaitOutsideFunction||!!this.hasPlugin("topLevelAwait")&&this.inModule}},{key:"parseAwait",value:function(){var t=this.startNode();return this.next(),this.state.inParameters?this.raise(t.start,"await is not allowed in async function parameters"):-1===this.state.awaitPos&&(this.state.awaitPos=t.start),this.eat(o.star)&&this.raise(t.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.hasPrecedingLineBreak()||this.match(o.plusMin)||this.match(o.parenL)||this.match(o.bracketL)||this.match(o.backQuote)||this.match(o.regexp)||this.match(o.slash)||this.hasPlugin("v8intrinsic")&&this.match(o.modulo)?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary()),this.finishNode(t,"AwaitExpression")}},{key:"parseYield",value:function(t){var e=this.startNode();return this.state.inParameters?this.raise(e.start,"yield is not allowed in generator parameters"):-1===this.state.yieldPos&&(this.state.yieldPos=e.start),this.next(),this.match(o.semi)||!this.match(o.star)&&!this.state.type.startsExpr||this.hasPrecedingLineBreak()?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(o.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")}},{key:"checkPipelineAtInfixOperator",value:function(t,e){"smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type&&this.raise(e,"Pipeline head should not be a comma-separated sequence expression")}},{key:"parseSmartPipelineBody",value:function(t,e,s){var i=this.checkSmartPipelineBodyStyle(t);return this.checkSmartPipelineBodyEarlyErrors(t,i,e),this.parseSmartPipelineBodyInStyle(t,i,e,s)}},{key:"checkSmartPipelineBodyEarlyErrors",value:function(t,e,s){if(this.match(o.arrow))throw this.raise(this.state.start,'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized');"PipelineTopicExpression"===e&&"SequenceExpression"===t.type&&this.raise(s,"Pipeline body may not be a comma-separated sequence expression")}},{key:"parseSmartPipelineBodyInStyle",value:function(t,e,s,i){var a=this.startNodeAt(s,i);switch(e){case"PipelineBareFunction":a.callee=t;break;case"PipelineBareConstructor":a.callee=t.callee;break;case"PipelineBareAwaitedFunction":a.callee=t.argument;break;case"PipelineTopicExpression":this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(s,"Pipeline is in topic style but does not use topic reference"),a.expression=t;break;default:throw new Error("Internal @babel/parser error: Unknown pipeline style (".concat(e,")"))}return this.finishNode(a,e)}},{key:"checkSmartPipelineBodyStyle",value:function(t){return t.type,this.isSimpleReference(t)?"PipelineBareFunction":"PipelineTopicExpression"}},{key:"isSimpleReference",value:function(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}},{key:"withTopicPermittingContext",value:function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}},{key:"withTopicForbiddingContext",value:function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}},{key:"withSoloAwaitPermittingContext",value:function(t){var e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}},{key:"registerTopicReference",value:function(){this.state.topicContext.maxTopicIndex=0}},{key:"primaryTopicReferenceIsAllowedInCurrentTopicContext",value:function(){return this.state.topicContext.maxNumOfResolvableTopics>=1}},{key:"topicReferenceWasUsedInCurrentTopicContext",value:function(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}},{key:"parseFSharpPipelineBody",value:function(t,e){var s=this.state.start,i=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var r=this.parseExprOp(this.parseMaybeUnary(),s,i,t,e);return this.state.inFSharpPipelineDirectBody=a,r}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"toAssignable",value:function(t,e,s){var i;if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var a=0,r=t.properties.length,n=r-1;a<r;a++){var o,h=t.properties[a],u=a===n;this.toAssignableObjectExpressionProp(h,e,u),u&&"RestElement"===h.type&&(null===(o=t.extra)||void 0===o?void 0:o.trailingComma)&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value,e,s);break;case"SpreadElement":this.checkToRestConversion(t),t.type="RestElement";var l=t.argument;this.toAssignable(l,e,s);break;case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,e,s,null===(i=t.extra)||void 0===i?void 0:i.trailingComma);break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e,s);break;case"ParenthesizedExpression":t.expression=this.toAssignable(t.expression,e,s)}return t}},{key:"toAssignableObjectExpressionProp",value:function(t,e,s){if("ObjectMethod"===t.type){var i="get"===t.kind||"set"===t.kind?"Object pattern can't contain getter or setter":"Object pattern can't contain methods";this.raise(t.key.start,i)}else"SpreadElement"!==t.type||s?this.toAssignable(t,e,"object destructuring pattern"):this.raiseRestNotLast(t.start)}},{key:"toAssignableList",value:function(t,e,s,i){var a=t.length;if(a){var r=t[a-1];if(r&&"RestElement"===r.type)--a;else if(r&&"SpreadElement"===r.type){r.type="RestElement";var n=r.argument;this.toAssignable(n,e,s),"Identifier"!==n.type&&"MemberExpression"!==n.type&&"ArrayPattern"!==n.type&&"ObjectPattern"!==n.type&&this.unexpected(n.start),i&&this.raiseTrailingCommaAfterRest(i),--a}}for(var o=0;o<a;o++){var h=t[o];h&&(this.toAssignable(h,e,s),"RestElement"===h.type&&this.raiseRestNotLast(h.start))}return t}},{key:"toReferencedList",value:function(t,e){return t}},{key:"toReferencedListDeep",value:function(t,e){this.toReferencedList(t,e);for(var s=0;s<t.length;s++){var i=t[s];i&&"ArrayExpression"===i.type&&this.toReferencedListDeep(i.elements)}return t}},{key:"parseSpread",value:function(t,e){var s=this.startNode();return this.next(),s.argument=this.parseMaybeAssign(!1,t,void 0,e),this.finishNode(s,"SpreadElement")}},{key:"parseRestBinding",value:function(){var t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}},{key:"parseBindingAtom",value:function(){switch(this.state.type){case o.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(o.bracketR,93,!0),this.finishNode(t,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdentifier()}},{key:"parseBindingList",value:function(t,e,s,i){for(var a=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(o.comma),s&&this.match(o.comma))a.push(null);else{if(this.eat(t))break;if(this.match(o.ellipsis)){a.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}var n=[];for(this.match(o.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators cannot be used to decorate parameters");this.match(o.at);)n.push(this.parseDecorator());a.push(this.parseAssignableListItem(i,n))}return a}},{key:"parseAssignableListItem",value:function(t,e){var s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);var i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i}},{key:"parseAssignableListItemTypes",value:function(t){return t}},{key:"parseMaybeDefault",value:function(t,e,s){if(e=e||this.state.startLoc,t=t||this.state.start,s=s||this.parseBindingAtom(),!this.eat(o.eq))return s;var i=this.startNodeAt(t,e);return i.left=s,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")}},{key:"checkLVal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,s=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];switch(t.type){case"Identifier":if(this.state.strict&&(r?M(t.name,this.inModule):O(t.name))&&this.raise(t.start,"".concat(64===e?"Assigning to":"Binding"," '").concat(t.name,"' in strict mode")),s){var n="_".concat(t.name);s[n]?this.raise(t.start,"Argument name clash"):s[n]=!0}a&&"let"===t.name&&this.raise(t.start,"'let' is not allowed to be used as a name in 'let' or 'const' declarations."),64&e||this.scope.declareName(t.name,e,t.start);break;case"MemberExpression":64!==e&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(var o=0,h=t.properties;o<h.length;o++){var u=h[o];if("ObjectProperty"===u.type)u=u.value;else if("ObjectMethod"===u.type)continue;this.checkLVal(u,e,s,"object destructuring pattern",a)}break;case"ArrayPattern":for(var l=0,c=t.elements;l<c.length;l++){var p=c[l];p&&this.checkLVal(p,e,s,"array destructuring pattern",a)}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;case"ParenthesizedExpression":this.checkLVal(t.expression,e,s,"parenthesized expression");break;default:var d=(64===e?"Invalid":"Binding invalid")+" left-hand side"+(i?" in "+i:"expression");this.raise(t.start,d)}}},{key:"checkToRestConversion",value:function(t){"Identifier"!==t.argument.type&&"MemberExpression"!==t.argument.type&&this.raise(t.argument.start,"Invalid rest operator's argument")}},{key:"checkCommaAfterRest",value:function(t){this.match(o.comma)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}},{key:"raiseRestNotLast",value:function(t){throw this.raise(t,"Rest element must be last element")}},{key:"raiseTrailingCommaAfterRest",value:function(t){this.raise(t,"Unexpected trailing comma after rest element")}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"startNode",value:function(){return new wt(this,this.state.start,this.state.startLoc)}},{key:"startNodeAt",value:function(t,e){return new wt(this,t,e)}},{key:"startNodeAtNode",value:function(t){return this.startNodeAt(t.start,t.loc.start)}},{key:"finishNode",value:function(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}},{key:"finishNodeAt",value:function(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.processComment(t),t}},{key:"resetStartLocation",value:function(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}},{key:"resetEndLocation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.lastTokEnd,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.lastTokEndLoc;t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}},{key:"resetStartLocationFromNode",value:function(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}]),e}(At)))));function St(t,e){var s=Nt;return t&&t.plugins&&(!function(t){if(ut(t,"decorators")){if(ut(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var e=lt(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(ut(t,"flow")&&ut(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(ut(t,"placeholders")&&ut(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(ut(t,"pipelineOperator")&&-1===ct.indexOf(lt(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+ct.map((function(t){return"'".concat(t,"'")})).join(", "))}(t.plugins),s=function(t){var e=dt.filter((function(e){return ut(t,e)})),s=e.join("/"),i=It[s];if(!i){i=Nt;for(var a=0;a<e.length;a++){var r=e[a];i=pt[r](i)}It[s]=i}return i}(t.plugins)),new s(t,e)}var It={};e.parse=function(t,e){if(!e||"unambiguous"!==e.sourceType)return St(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";var s=St(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",St(e,t).parse()}catch(t){}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",St(e,t).parse()}catch(t){}throw s}},e.parseExpression=function(t,e){var s=St(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=o}));s(ot);ot.parse,ot.parseExpression,ot.tokTypes;var ht=u;function ut(t,e){return Object.assign({sourceType:"module",allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,plugins:["jsx","doExpressions","objectRestSpread","classProperties","exportDefaultFrom","exportNamespaceFrom","asyncGenerators","functionBind","functionSent","dynamicImport","numericSeparator","importMeta","optionalCatchBinding","optionalChaining","classPrivateProperties",["pipelineOperator",{proposal:"minimal"}],"nullishCoalescingOperator","bigInt","throwExpressions","logicalAssignment","classPrivateMethods","v8intrinsic","partialApplication"].concat(e)},t)}function lt(t,s){return function(i,a,r){var n,o=ot,h=[ut({strictMode:!0},["decorators-legacy"].concat(s)),ut({strictMode:!1},["decorators-legacy"].concat(s)),ut({strictMode:!0},[["decorators",{decoratorsBeforeExport:!1}]].concat(s)),ut({strictMode:!1},[["decorators",{decoratorsBeforeExport:!1}]].concat(s))];try{n=function(t,e){for(var s,i=0;i<e.length;i++)try{return t(e[i])}catch(t){s||(s=t)}throw s}(o[t].bind(null,i),h)}catch(t){throw e(t.message.replace(/ \(.*\)/,""),{start:{line:t.loc.line,column:t.loc.column+1}})}return delete n.tokens,nt(n,Object.assign({},r,{originalText:i}))}}var ct=lt("parse",["flow"]),pt=lt("parse",[["flow",{all:!0,enums:!0}]]),dt=lt("parseExpression");function ft(t,s){switch(t.type){case"ArrayExpression":return t.elements.forEach(i);case"ObjectExpression":return t.properties.forEach(i);case"ObjectProperty":if(t.computed)throw a("computed");if(t.shorthand)throw a("shorthand");return[t.key,t.value].forEach(i);case"UnaryExpression":switch(t.operator){case"+":case"-":return i(t.argument);default:throw a("operator")}case"Identifier":if(s&&"ObjectProperty"===s.type&&s.key===t)return;throw a();case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":return;default:throw a()}function i(e){return ft(e,t)}function a(s){var i=s?"".concat(t.type," with ").concat(s,"=").concat(JSON.stringify(t[s])):t.type;return e("".concat(i," is not allowed in JSON."),{start:{line:t.loc.start.line,column:t.loc.start.column+1}})}}var mt=Object.assign({parse:ct,astFormat:"estree",hasPragma:ht},c),yt=Object.assign({},mt,{parse:pt}),Dt=Object.assign({},mt,{parse:dt}),vt={parsers:{babel:mt,"babel-flow":yt,babylon:mt,json:Object.assign({},Dt,{hasPragma:function(){return!0}}),json5:Dt,"json-stringify":Object.assign({parse:function(t,e,s){var i=dt(t,e,s);return i.comments.forEach(ft),ft(i),i},astFormat:"estree-json"},c),__js_expression:Dt,__vue_expression:Dt,__vue_event_binding:mt}},xt=vt.parsers;t.default=vt,t.parsers=xt,Object.defineProperty(t,"__esModule",{value:!0})}));
diff --git a/std/prettier/vendor/parser_markdown.js b/std/prettier/vendor/parser_markdown.js
index d4df8331c..fd4364dd1 100644
--- a/std/prettier/vendor/parser_markdown.js
+++ b/std/prettier/vendor/parser_markdown.js
@@ -1,4 +1,4 @@
-// This file is copied from prettier@1.18.2
+// This file is copied from prettier@1.19.1
/**
* Copyright © James Long and contributors
*
@@ -8,4 +8,135 @@
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r.prettierPlugins=r.prettierPlugins||{},r.prettierPlugins.markdown=e())}(globalThis,function(){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function e(r,e){return t(r)||function(r,e){var t=[],u=!0,n=!1,a=void 0;try{for(var o,i=r[Symbol.iterator]();!(u=(o=i.next()).done)&&(t.push(o.value),!e||t.length!==e);u=!0);}catch(r){n=!0,a=r}finally{try{u||null==i.return||i.return()}finally{if(n)throw a}}return t}(r,e)||u()}function t(r){if(Array.isArray(r))return r}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var n=function(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var u in t)a.call(t,u)&&(r[u]=t[u])}return r},a=Object.prototype.hasOwnProperty;function o(r,e){return r(e={exports:{}},e.exports),e.exports}var i={},c=Object.freeze({default:i}),l=o(function(r){"function"==typeof Object.create?r.exports=function(r,e){r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(r,e){r.super_=e;var t=function(){};t.prototype=e.prototype,r.prototype=new t,r.prototype.constructor=r}}),s=c&&i||c,f=o(function(r){try{var e=s;if("function"!=typeof e.inherits)throw"";r.exports=e.inherits}catch(e){r.exports=l}}),p=function(e){var t,u,a;for(u in f(i,e),f(o,i),t=i.prototype)(a=t[u])&&"object"===r(a)&&(t[u]="concat"in a?a.concat():n(a));return i;function o(r){return e.apply(this,r)}function i(){return this instanceof i?e.apply(this,arguments):new o(arguments)}};var D=function(r,e,t){return function(){var u=t||this,n=u[r];return u[r]=!e,function(){u[r]=n}}};var d=function(r){var e=function(r){var e=[],t=r.indexOf("\n");for(;-1!==t;)e.push(t+1),t=r.indexOf("\n",t+1);return e.push(r.length+1),e}(String(r));return{toPosition:function(r){return function(e){var t=-1,u=r.length;if(e<0)return{};for(;++t<u;)if(r[t]>e)return{line:t+1,column:e-(r[t-1]||0)+1,offset:e};return{}}}(e),toOffset:function(r){return function(e){var t=e&&e.line,u=e&&e.column;if(!isNaN(t)&&!isNaN(u)&&t-1 in r)return(r[t-2]||0)+u-1||0;return-1}}(e)}};var h=function(r,e){return function(t){var u,n=0,a=t.indexOf("\\"),o=r[e],i=[];for(;-1!==a;)i.push(t.slice(n,a)),n=a+1,(u=t.charAt(n))&&-1!==o.indexOf(u)||i.push("\\"),a=t.indexOf("\\",n);return i.push(t.slice(n)),i.join("")}};var g={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌",Map:"⤅",in:"∈"},m=Object.freeze({AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌",default:g}),b={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},v=Object.freeze({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ",default:b}),E={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},w=Object.freeze({default:E}),y=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=48&&e<=57};var A=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57};var C=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=122||e>=65&&e<=90};var q=function(r){return C(r)||y(r)};var F=m&&g||m,k=v&&b||v,x=w&&E||w,L=function(r,e){var t,u,n={};e||(e={});for(u in Z)t=e[u],n[u]=null===t||void 0===t?Z[u]:t;(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start);return function(r,e){var t,u,n,a,o,i,c,l,s,f,p,D,d,h,g,m,b,v,E=e.additional,w=e.nonTerminated,y=e.text,A=e.reference,C=e.warning,L=e.textContext,Z=e.referenceContext,ar=e.warningContext,or=e.position,ir=e.indent||[],sr=r.length,fr=0,pr=-1,Dr=or.column||1,dr=or.line||1,hr=M,gr=[];g=br(),c=C?function(r,e){var t=br();t.column+=e,t.offset+=e,C.call(ar,cr[r],t,r)}:T,fr--,sr++;for(;++fr<sr;)if(a===I&&(Dr=ir[pr]||1),(a=vr(fr))!==R)a===I&&(dr++,pr++,Dr=0),a?(hr+=a,Dr++):Er();else{if((i=vr(fr+1))===$||i===I||i===N||i===j||i===G||i===R||i===M||E&&i===E){hr+=a,Dr++;continue}for(p=D=fr+1,v=D,i!==U?d=Y:(v=++p,(i=vr(v))===V||i===z?(d=_,v=++p):d=J),t=M,f=M,n=M,h=K[d],v--;++v<sr&&(i=vr(v),h(i));)n+=i,d===Y&&B.call(k,n)&&(t=n,f=k[n]);(u=vr(v)===P)&&(v++,d===Y&&B.call(F,n)&&(t=n,f=F[n])),b=1+v-D,(u||w)&&(n?d===Y?(u&&!f?c(tr,1):(t!==n&&(v=p+t.length,b=1+v-p,u=!1),u||(l=t?W:rr,e.attribute?(i=vr(v))===H?(c(l,b),f=null):q(i)?f=null:c(l,b):c(l,b))),o=f):(u||c(X,b),o=parseInt(n,Q[d]),(mr=o)>=55296&&mr<=57343||mr>1114111?(c(nr,b),o=O):o in x?(c(ur,b),o=x[o]):(s=M,lr(o)&&c(ur,b),o>65535&&(s+=S((o-=65536)>>>10|55296),o=56320|1023&o),o=s+S(o))):d!==Y&&c(er,b)),o?(Er(),g=br(),fr=v-1,Dr+=v-D+1,gr.push(o),(m=br()).offset++,A&&A.call(Z,o,{start:g,end:m},r.slice(D-1,v)),g=m):(n=r.slice(D-1,v),hr+=n,Dr+=n.length,fr=v-1)}var mr;return gr.join(M);function br(){return{line:dr,column:Dr,offset:fr+(or.offset||0)}}function vr(e){return r.charAt(e)}function Er(){hr&&(gr.push(hr),y&&y.call(L,hr,{start:g,end:br()}),hr=M)}}(r,n)},B={}.hasOwnProperty,S=String.fromCharCode,T=Function.prototype,O="�",N="\f",R="&",U="#",P=";",I="\n",V="x",z="X",j=" ",G="<",H="=",M="",$="\t",Z={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Y="named",_="hexadecimal",J="decimal",Q={};Q[_]=16,Q[J]=10;var K={};K[Y]=q,K[J]=y,K[_]=A;var W=1,X=2,rr=3,er=4,tr=5,ur=6,nr=7,ar="Numeric character references",or=" must be terminated by a semicolon",ir=" cannot be empty",cr={};function lr(r){return r>=1&&r<=8||11===r||r>=13&&r<=31||r>=127&&r<=159||r>=64976&&r<=65007||65535==(65535&r)||65534==(65535&r)}cr[W]="Named character references"+or,cr[X]=ar+or,cr[rr]="Named character references"+ir,cr[er]=ar+ir,cr[tr]="Named character references must be known",cr[ur]=ar+" cannot be disallowed",cr[nr]=ar+" cannot be outside the permissible Unicode range";var sr=function(r){return u.raw=function(r,u,a){return L(r,n(a,{position:e(u),warning:t}))},u;function e(e){for(var t=r.offset,u=e.line,n=[];++u&&u in t;)n.push((t[u]||0)+1);return{start:e,indent:n}}function t(e,t,u){3!==u&&r.file.message(e,t)}function u(u,n,a){L(u,{position:e(n),warning:t,text:a,reference:a,textContext:r,referenceContext:r})}};var fr=function(r){return function(e,t){var u,n,a,o,i,c,l=this,s=l.offset,f=[],p=l[r+"Methods"],D=l[r+"Tokenizers"],d=t.line,h=t.column;if(!e)return f;v.now=m,v.file=l.file,g("");for(;e;){for(u=-1,n=p.length,i=!1;++u<n&&(o=p[u],!(a=D[o])||a.onlyAtStart&&!l.atStart||a.notInList&&l.inList||a.notInBlock&&l.inBlock||a.notInLink&&l.inLink||(c=e.length,a.apply(l,[v,e]),!(i=c!==e.length))););i||l.file.fail(new Error("Infinite loop"),v.now())}return l.eof=m(),f;function g(r){for(var e=-1,t=r.indexOf("\n");-1!==t;)d++,e=t,t=r.indexOf("\n",t+1);-1===e?h+=r.length:h=r.length-e,d in s&&(-1!==e?h+=s[d]:h<=s[d]&&(h=s[d]+1))}function m(){var r={line:d,column:h};return r.offset=l.toOffset(r),r}function b(){var r=m();return function(e,t){var u=e.position,n=u?u.start:r,a=[],o=u&&u.end.line,i=r.line;if(e.position=new function(r){this.start=r,this.end=m()}(n),u&&t&&u.indent){if(a=u.indent,o<i){for(;++o<i;)a.push((s[o]||0)+1);a.push(r.column)}t=a.concat(t)}return e.position.indent=t||[],e}}function v(r){var t=function(){var r=[],e=d+1;return function(){for(var t=d+1;e<t;)r.push((s[e]||0)+1),e++;return r}}(),u=b(),n=m();return function(r){e.substring(0,r.length)!==r&&l.file.fail(new Error("Incorrectly eaten value: please report this warning on http://git.io/vg5Ft"),m())}(r),a.reset=o,o.test=i,a.test=i,e=e.substring(r.length),g(r),t=t(),a;function a(r,e){return u(function(r,e){var t=e?e.children:f,u=t[t.length-1];u&&r.type===u.type&&r.type in pr&&Dr(u)&&Dr(r)&&(r=pr[r.type].call(l,u,r));r!==u&&t.push(r);l.atStart&&0!==f.length&&l.exitStart();return r}(u(r),e),t)}function o(){var t=a.apply(null,arguments);return d=n.line,h=n.column,e=r+e,t}function i(){var t=u({});return d=n.line,h=n.column,e=r+e,t.position}}}},pr={text:function(r,e){return r.value+=e.value,r},blockquote:function(r,e){if(this.options.commonmark)return e;return r.children=r.children.concat(e.children),r}};function Dr(r){var e,t;return"text"!==r.type||!r.position||(e=r.position.start,t=r.position.end,e.line!==t.line||t.column-e.column===r.value.length)}var dr=br,hr=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],gr=hr.concat(["~","|"]),mr=gr.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function br(r){var e=r||{};return e.commonmark?mr:e.gfm?gr:hr}br.default=hr,br.gfm=gr,br.commonmark=mr;var vr=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Er=Object.freeze({default:vr}),wr={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:Er&&vr||Er},yr=function(e){var t,u,a=this.options;if(null==e)e={};else{if("object"!==r(e))throw new Error("Invalid value `"+e+"` for setting `options`");e=n(e)}for(t in wr){if(null==(u=e[t])&&(u=a[t]),"blocks"!==t&&"boolean"!=typeof u||"blocks"===t&&"object"!==r(u))throw new Error("Invalid value `"+u+"` for setting `options."+t+"`");e[t]=u}return this.options=e,this.escape=dr(e),this};var Ar=function(r,e,t,u){"function"==typeof e&&(u=t,t=e,e=null);function n(r,a,o){var i;return a=a||(o?0:null),e&&r.type!==e||(i=t(r,a,o||null)),r.children&&!1!==i?function(r,e){var t,a=u?-1:1,o=r.length,i=(u?o:-1)+a;for(;i>-1&&i<o;){if((t=r[i])&&!1===n(t,i,e))return!1;i+=a}return!0}(r.children,r):i}n(r)};var Cr=function(r,e){return Ar(r,e?qr:Fr),r};function qr(r){delete r.position}function Fr(r){r.position=void 0}var kr=function(){var r,e=String(this.file),t={line:1,column:1,offset:0},u=n(t);65279===(e=e.replace(Lr,xr)).charCodeAt(0)&&(e=e.slice(1),u.column++,u.offset++);r={type:"root",children:this.tokenizeBlock(e,u),position:{start:t,end:this.eof||n(t)}},this.options.position||Cr(r,!0);return r},xr="\n",Lr=/\r\n|\r/g;var Br=function(r){return Tr.test("number"==typeof r?Sr(r):r.charAt(0))},Sr=String.fromCharCode,Tr=/\s/;var Or=function(r,e,t){var u,n,a,o,i=e.charAt(0);if("\n"!==i)return;if(t)return!0;o=1,u=e.length,n=i,a="";for(;o<u&&(i=e.charAt(o),Br(i));)a+=i,"\n"===i&&(n+=a,a=""),o++;r(n)};var Nr,Rr="",Ur=function(r,e){if("string"!=typeof r)throw new TypeError("expected a string");if(1===e)return r;if(2===e)return r+r;var t=r.length*e;if(Nr!==r||void 0===Nr)Nr=r,Rr="";else if(Rr.length>=t)return Rr.substr(0,t);for(;t>Rr.length&&e>1;)1&e&&(Rr+=r),e>>=1,r+=r;return Rr=(Rr+=r).substr(0,t)};var Pr=function(r){var e=String(r),t=e.length;for(;e.charAt(--t)===Ir;);return e.slice(0,t+1)},Ir="\n";var Vr=function(r,e,t){var u,n,a,o=-1,i=e.length,c="",l="",s="",f="";for(;++o<i;)if(u=e.charAt(o),a)if(a=!1,c+=s,l+=f,s="",f="",u===zr)s=u,f=u;else for(c+=u,l+=u;++o<i;){if(!(u=e.charAt(o))||u===zr){f=u,s=u;break}c+=u,l+=u}else if(u===Gr&&e.charAt(o+1)===u&&e.charAt(o+2)===u&&e.charAt(o+3)===u)s+=Hr,o+=3,a=!0;else if(u===jr)s+=u,a=!0;else{for(n="";u===jr||u===Gr;)n+=u,u=e.charAt(++o);if(u!==zr)break;s+=n+u,f+=u}if(l)return!!t||r(c)({type:"code",lang:null,value:Pr(l)})},zr="\n",jr="\t",Gr=" ",Hr=Ur(Gr,4);var Mr=function(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d=this.options,h=e.length+1,g=0,m="";if(!d.gfm)return;for(;g<h&&((a=e.charAt(g))===Yr||a===Zr);)m+=a,g++;if(p=g,(a=e.charAt(g))!==_r&&a!==Jr)return;g++,n=a,u=1,m+=a;for(;g<h&&(a=e.charAt(g))===n;)m+=a,u++,g++;if(u<Qr)return;for(;g<h&&((a=e.charAt(g))===Yr||a===Zr);)m+=a,g++;o="",i="";for(;g<h&&(a=e.charAt(g))!==$r&&a!==_r&&a!==Jr;)a===Yr||a===Zr?i+=a:(o+=i+a,i=""),g++;if((a=e.charAt(g))&&a!==$r)return;if(t)return!0;(D=r.now()).column+=m.length,D.offset+=m.length,m+=o,o=this.decode.raw(this.unescape(o),D),i&&(m+=i);i="",s="",f="",c="",l="";for(;g<h;)if(a=e.charAt(g),c+=s,l+=f,s="",f="",a===$r){for(c?(s+=a,f+=a):m+=a,i="",g++;g<h&&(a=e.charAt(g))===Yr;)i+=a,g++;if(s+=i,f+=i.slice(p),!(i.length>=Kr)){for(i="";g<h&&(a=e.charAt(g))===n;)i+=a,g++;if(s+=i,f+=i,!(i.length<u)){for(i="";g<h&&((a=e.charAt(g))===Yr||a===Zr);)s+=a,f+=a,g++;if(!a||a===$r)break}}}else c+=a,f+=a,g++;return r(m+=c+s)({type:"code",lang:o||null,value:Pr(l)})},$r="\n",Zr="\t",Yr=" ",_r="~",Jr="`",Qr=3,Kr=4;var Wr=o(function(r,e){(e=r.exports=function(r){return r.replace(/^\s*|\s*$/g,"")}).left=function(r){return r.replace(/^\s*/,"")},e.right=function(r){return r.replace(/\s*$/,"")}}),Xr=function(r,e,t,u){var n,a,o,i,c,l,s=["pedantic","commonmark"],f=s.length,p=r.length,D=-1;for(;++D<p;){for(n=r[D],a=n[1]||{},o=n[0],i=-1,l=!1;++i<f;)if(void 0!==a[c=s[i]]&&a[c]!==t.options[c]){l=!0;break}if(!l&&e[o].apply(t,u))return!0}return!1};var re=function(r,e,t){var u,n,a,o,i,c,l,s,f,p=this.offset,D=this.blockTokenizers,d=this.interruptBlockquote,h=r.now(),g=h.line,m=e.length,b=[],v=[],E=[],w=0;for(;w<m&&((n=e.charAt(w))===ue||n===te);)w++;if(e.charAt(w)!==ne)return;if(t)return!0;w=0;for(;w<m;){for(o=e.indexOf(ee,w),l=w,s=!1,-1===o&&(o=m);w<m&&((n=e.charAt(w))===ue||n===te);)w++;if(e.charAt(w)===ne?(w++,s=!0,e.charAt(w)===ue&&w++):w=l,i=e.slice(w,o),!s&&!Wr(i)){w=l;break}if(!s&&(a=e.slice(w),Xr(d,D,this,[r,a,!0])))break;c=l===w?i:e.slice(l,o),E.push(w-l),b.push(c),v.push(i),w=o+1}w=-1,m=E.length,u=r(b.join(ee));for(;++w<m;)p[g]=(p[g]||0)+E[w],g++;return f=this.enterBlock(),v=this.tokenizeBlock(v.join(ee),h),f(),u({type:"blockquote",children:v})},ee="\n",te="\t",ue=" ",ne=">";var ae=function(r,e,t){var u,n,a,o=this.options,i=e.length+1,c=-1,l=r.now(),s="",f="";for(;++c<i;){if((u=e.charAt(c))!==ce&&u!==ie){c--;break}s+=u}a=0;for(;++c<=i;){if((u=e.charAt(c))!==le){c--;break}s+=u,a++}if(a>se)return;if(!a||!o.pedantic&&e.charAt(c+1)===le)return;i=e.length+1,n="";for(;++c<i;){if((u=e.charAt(c))!==ce&&u!==ie){c--;break}n+=u}if(!o.pedantic&&0===n.length&&u&&u!==oe)return;if(t)return!0;s+=n,n="",f="";for(;++c<i&&(u=e.charAt(c))&&u!==oe;)if(u===ce||u===ie||u===le){for(;u===ce||u===ie;)n+=u,u=e.charAt(++c);for(;u===le;)n+=u,u=e.charAt(++c);for(;u===ce||u===ie;)n+=u,u=e.charAt(++c);c--}else f+=n+u,n="";return l.column+=s.length,l.offset+=s.length,r(s+=f+n)({type:"heading",depth:a,children:this.tokenizeInline(f,l)})},oe="\n",ie="\t",ce=" ",le="#",se=6;var fe=function(r,e,t){var u,n,a,o,i=-1,c=e.length+1,l="";for(;++i<c&&((u=e.charAt(i))===De||u===de);)l+=u;if(u!==he&&u!==me&&u!==ge)return;n=u,l+=u,a=1,o="";for(;++i<c;)if((u=e.charAt(i))===n)a++,l+=o+n,o="";else{if(u!==de)return a>=be&&(!u||u===pe)?(l+=o,!!t||r(l)({type:"thematicBreak"})):void 0;o+=u}},pe="\n",De="\t",de=" ",he="*",ge="_",me="-",be=3;var ve=function(r){var e,t=0,u=0,n=r.charAt(t),a={};for(;n in Ee;)e=Ee[n],u+=e,e>1&&(u=Math.floor(u/e)*e),a[u]=t,n=r.charAt(++t);return{indent:u,stops:a}},Ee={" ":1,"\t":4};var we=function(r,e){var t,u,n,a,o=r.split(Ae),i=o.length+1,c=1/0,l=[];o.unshift(Ur(ye,e)+"!");for(;i--;)if(u=ve(o[i]),l[i]=u.stops,0!==Wr(o[i]).length){if(!u.indent){c=1/0;break}u.indent>0&&u.indent<c&&(c=u.indent)}if(c!==1/0)for(i=o.length;i--;){for(n=l[i],t=c;t&&!(t in n);)t--;a=0!==Wr(o[i]).length&&c&&t!==c?Ce:"",o[i]=a+o[i].slice(t in n?n[t]+1:0)}return o.shift(),o.join(Ae)},ye=" ",Ae="\n",Ce="\t";var qe=function(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d,h,g,m,b,v,E,w,A,C,q,F,k,x=this.options.commonmark,L=this.options.pedantic,B=this.blockTokenizers,S=this.interruptList,T=0,O=e.length,N=null,R=0;for(;T<O;){if((o=e.charAt(T))===Se)R+=Oe-R%Oe;else{if(o!==Le)break;R++}T++}if(R>=Oe)return;if(o=e.charAt(T),u=x?je:ze,!0===Ve[o])i=o,a=!1;else{for(a=!0,n="";T<O&&(o=e.charAt(T),y(o));)n+=o,T++;if(o=e.charAt(T),!n||!0!==u[o])return;N=parseInt(n,10),i=o}if((o=e.charAt(++T))!==Le&&o!==Se)return;if(t)return!0;T=0,g=[],m=[],b=[];for(;T<O;){for(c=e.indexOf(Be,T),l=T,s=!1,k=!1,-1===c&&(c=O),F=T+Oe,R=0;T<O;){if((o=e.charAt(T))===Se)R+=Oe-R%Oe;else{if(o!==Le)break;R++}T++}if(R>=Oe&&(k=!0),v&&R>=v.indent&&(k=!0),o=e.charAt(T),f=null,!k){if(!0===Ve[o])f=o,T++,R++;else{for(n="";T<O&&(o=e.charAt(T),y(o));)n+=o,T++;o=e.charAt(T),T++,n&&!0===u[o]&&(f=o,R+=n.length+1)}if(f)if((o=e.charAt(T))===Se)R+=Oe-R%Oe,T++;else if(o===Le){for(F=T+Oe;T<F&&e.charAt(T)===Le;)T++,R++;T===F&&e.charAt(T)===Le&&(T-=Oe-1,R-=Oe-1)}else o!==Be&&""!==o&&(f=null)}if(f){if(!L&&i!==f)break;s=!0}else x||k||e.charAt(l)!==Le?x&&v&&(k=R>=v.indent||R>Oe):k=!0,s=!1,T=l;if(D=e.slice(l,c),p=l===T?D:e.slice(T,c),(f===Fe||f===ke||f===xe)&&B.thematicBreak.call(this,r,D,!0))break;if(d=h,h=!Wr(p).length,k&&v)v.value=v.value.concat(b,D),m=m.concat(b,D),b=[];else if(s)0!==b.length&&(v.value.push(""),v.trail=b.concat()),v={value:[D],indent:R,trail:[]},g.push(v),m=m.concat(b,D),b=[];else if(h){if(d)break;b.push(D)}else{if(d)break;if(Xr(S,B,this,[r,D,!0]))break;v.value=v.value.concat(b,D),m=m.concat(b,D),b=[]}T=c+1}C=r(m.join(Be)).reset({type:"list",ordered:a,start:N,loose:null,children:[]}),E=this.enterList(),w=this.enterBlock(),A=!1,T=-1,O=g.length;for(;++T<O;)v=g[T].value.join(Be),q=r.now(),(v=r(v)(Ge(this,v,q),C)).loose&&(A=!0),v=g[T].trail.join(Be),T!==O-1&&(v+=Be),r(v);return E(),w(),C.loose=A,C},Fe="*",ke="_",xe="-",Le=" ",Be="\n",Se="\t",Te="x",Oe=4,Ne=/\n\n(?!\s*$)/,Re=/^\[([ \t]|x|X)][ \t]/,Ue=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Pe=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Ie=/^( {1,4}|\t)?/gm,Ve={};Ve[Fe]=!0,Ve["+"]=!0,Ve[xe]=!0;var ze={".":!0},je={};function Ge(r,e,t){var u,n,a=r.offset,o=null;return e=(r.options.pedantic?He:Me).apply(null,arguments),r.options.gfm&&(u=e.match(Re))&&(n=u[0].length,o=u[1].toLowerCase()===Te,a[t.line]+=n,e=e.slice(n)),{type:"listItem",loose:Ne.test(e)||e.charAt(e.length-1)===Be,checked:o,children:r.tokenizeBlock(e,t)}}function He(r,e,t){var u=r.offset,n=t.line;return e=e.replace(Pe,a),n=t.line,e.replace(Ie,a);function a(r){return u[n]=(u[n]||0)+r.length,n++,""}}function Me(r,e,t){var u,n,a,o,i,c,l,s=r.offset,f=t.line;for(o=(e=e.replace(Ue,function(r,e,t,o,i){n=e+t+o,a=i,Number(t)<10&&n.length%2==1&&(t=Le+t);return(u=e+Ur(Le,t.length)+o)+a})).split(Be),(i=we(e,ve(u).indent).split(Be))[0]=a,s[f]=(s[f]||0)+n.length,f++,c=0,l=o.length;++c<l;)s[f]=(s[f]||0)+o[c].length-i[c].length,f++;return i.join(Be)}je["."]=!0,je[")"]=!0;var $e=function(r,e,t){var u,n,a,o,i,c=r.now(),l=e.length,s=-1,f="";for(;++s<l;){if((a=e.charAt(s))!==_e||s>=Je){s--;break}f+=a}u="",n="";for(;++s<l;){if((a=e.charAt(s))===Ze){s--;break}a===_e||a===Ye?n+=a:(u+=n+a,n="")}if(c.column+=f.length,c.offset+=f.length,f+=u+n,a=e.charAt(++s),o=e.charAt(++s),a!==Ze||!Qe[o])return;f+=a,n=o,i=Qe[o];for(;++s<l;){if((a=e.charAt(s))!==o){if(a!==Ze)return;s--;break}n+=a}if(t)return!0;return r(f+n)({type:"heading",depth:i,children:this.tokenizeInline(u,c)})},Ze="\n",Ye="\t",_e=" ",Je=3,Qe={};Qe["="]=1,Qe["-"]=2;var Ke="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",We="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Xe={openCloseTag:new RegExp("^(?:"+Ke+"|"+We+")"),tag:new RegExp("^(?:"+Ke+"|"+We+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Za-z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)")},rt=Xe.openCloseTag,et=function(r,e,t){var u,n,a,o,i,c,l,s=this.options.blocks,f=e.length,p=0,D=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+s.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(rt.source+"\\s*$"),/^$/,!1]];for(;p<f&&((o=e.charAt(p))===tt||o===ut);)p++;if(e.charAt(p)!==at)return;u=-1===(u=e.indexOf(nt,p+1))?f:u,n=e.slice(p,u),a=-1,i=D.length;for(;++a<i;)if(D[a][0].test(n)){c=D[a];break}if(!c)return;if(t)return c[2];if(p=u,!c[1].test(n))for(;p<f;){if(u=-1===(u=e.indexOf(nt,p+1))?f:u,n=e.slice(p+1,u),c[1].test(n)){n&&(p=u);break}p=u}return l=e.slice(0,p),r(l)({type:"html",value:l})},tt="\t",ut=" ",nt="\n",at="<";var ot=function(r){return String(r).replace(/\s+/g," ")};var it=function(r){return ot(r).toLowerCase()};var ct=bt;bt.notInList=!0,bt.notInBlock=!0;var lt="\\",st="\n",ft="\t",pt=" ",Dt="[",dt="]",ht="^",gt=":",mt=/^( {4}|\t)?/gm;function bt(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d,h=this.offset;if(this.options.footnotes){for(u=0,n=e.length,a="",o=r.now(),i=o.line;u<n&&(f=e.charAt(u),Br(f));)a+=f,u++;if(e.charAt(u)===Dt&&e.charAt(u+1)===ht){for(u=(a+=Dt+ht).length,l="";u<n&&(f=e.charAt(u))!==dt;)f===lt&&(l+=f,u++,f=e.charAt(u)),l+=f,u++;if(l&&e.charAt(u)===dt&&e.charAt(u+1)===gt){if(t)return!0;for(p=it(l),u=(a+=l+dt+gt).length;u<n&&((f=e.charAt(u))===ft||f===pt);)a+=f,u++;for(o.column+=a.length,o.offset+=a.length,l="",c="",s="";u<n;){if((f=e.charAt(u))===st){for(s=f,u++;u<n&&(f=e.charAt(u))===st;)s+=f,u++;for(l+=s,s="";u<n&&(f=e.charAt(u))===pt;)s+=f,u++;if(0===s.length)break;l+=s}l&&(c+=l,l=""),c+=f,u++}return a+=c,c=c.replace(mt,function(r){return h[i]=(h[i]||0)+r.length,i++,""}),D=r(a),d=this.enterBlock(),c=this.tokenizeBlock(c,o),d(),D({type:"footnoteDefinition",identifier:p,children:c})}}}}var vt=Ot;Ot.notInList=!0,Ot.notInBlock=!0;var Et='"',wt="'",yt="\\",At="\n",Ct="\t",qt=" ",Ft="[",kt="]",xt="(",Lt=")",Bt=":",St="<",Tt=">";function Ot(r,e,t){for(var u,n,a,o,i,c,l,s,f=this.options.commonmark,p=0,D=e.length,d="";p<D&&((o=e.charAt(p))===qt||o===Ct);)d+=o,p++;if((o=e.charAt(p))===Ft){for(p++,d+=o,a="";p<D&&(o=e.charAt(p))!==kt;)o===yt&&(a+=o,p++,o=e.charAt(p)),a+=o,p++;if(a&&e.charAt(p)===kt&&e.charAt(p+1)===Bt){for(c=a,p=(d+=a+kt+Bt).length,a="";p<D&&((o=e.charAt(p))===Ct||o===qt||o===At);)d+=o,p++;if(a="",u=d,(o=e.charAt(p))===St){for(p++;p<D&&Nt(o=e.charAt(p));)a+=o,p++;if((o=e.charAt(p))===Nt.delimiter)d+=St+a+o,p++;else{if(f)return;p-=a.length+1,a=""}}if(!a){for(;p<D&&Rt(o=e.charAt(p));)a+=o,p++;d+=a}if(a){for(l=a,a="";p<D&&((o=e.charAt(p))===Ct||o===qt||o===At);)a+=o,p++;if(i=null,(o=e.charAt(p))===Et?i=Et:o===wt?i=wt:o===xt&&(i=Lt),i){if(!a)return;for(p=(d+=a+o).length,a="";p<D&&(o=e.charAt(p))!==i;){if(o===At){if(p++,(o=e.charAt(p))===At||o===i)return;a+=At}a+=o,p++}if((o=e.charAt(p))!==i)return;n=d,d+=a+o,p++,s=a,a=""}else a="",p=d.length;for(;p<D&&((o=e.charAt(p))===Ct||o===qt);)d+=o,p++;return(o=e.charAt(p))&&o!==At?void 0:!!t||(u=r(u).test().end,l=this.decode.raw(this.unescape(l),u,{nonTerminated:!1}),s&&(n=r(n).test().end,s=this.decode.raw(this.unescape(s),n)),r(d)({type:"definition",identifier:it(c),title:s||null,url:l}))}}}}function Nt(r){return r!==Tt&&r!==Ft&&r!==kt}function Rt(r){return r!==Ft&&r!==kt&&!Br(r)}Nt.delimiter=Tt;var Ut=function(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d,h,g,m,b,v,E,w,y,A,C,q,F;if(!this.options.gfm)return;u=0,E=0,c=e.length+1,l=[];for(;u<c;){if(C=e.indexOf(Ht,u),q=e.indexOf(zt,u+1),-1===C&&(C=e.length),-1===q||q>C){if(E<Zt)return;break}l.push(e.slice(u,C)),E++,u=C+1}o=l.join(Ht),n=l.splice(1,1)[0]||[],u=0,c=n.length,E--,a=!1,D=[];for(;u<c;){if((f=n.charAt(u))===zt){if(p=null,!1===a){if(!1===F)return}else D.push(a),a=!1;F=!1}else if(f===Vt)p=!0,a=a||Qt;else if(f===jt)a=a===Yt?_t:p&&a===Qt?Jt:Yt;else if(!Br(f))return;u++}!1!==a&&D.push(a);if(D.length<$t)return;if(t)return!0;v=-1,y=[],A=r(o).reset({type:"table",align:D,children:y});for(;++v<E;){for(w=l[v],i={type:"tableRow",children:[]},v&&r(Ht),r(w).reset(i,A),c=w.length+1,u=0,s="",d="",h=!0,g=null,m=null;u<c;)if((f=w.charAt(u))!==Mt&&f!==Gt){if(""===f||f===zt)if(h)r(f);else{if(f&&m){s+=f,u++;continue}!d&&!f||h||(o=d,s.length>1&&(f?(o+=s.slice(0,s.length-1),s=s.charAt(s.length-1)):(o+=s,s="")),b=r.now(),r(o)({type:"tableCell",children:this.tokenizeInline(d,b)},i)),r(s+f),s="",d=""}else if(s&&(d+=s,s=""),d+=f,f===Pt&&u!==c-2&&(d+=w.charAt(u+1),u++),f===It){for(g=1;w.charAt(u+1)===f;)d+=f,u++,g++;m?g>=m&&(m=0):m=g}h=!1,u++}else d?s+=f:r(f),u++;v||r(Ht+n)}return A},Pt="\\",It="`",Vt="-",zt="|",jt=":",Gt=" ",Ht="\n",Mt="\t",$t=1,Zt=2,Yt="left",_t="center",Jt="right",Qt=null;var Kt=function(r,e,t){var u,n,a,o,i,c=this.options,l=c.commonmark,s=c.gfm,f=this.blockTokenizers,p=this.interruptParagraph,D=e.indexOf(Wt),d=e.length;for(;D<d;){if(-1===D){D=d;break}if(e.charAt(D+1)===Wt)break;if(l){for(o=0,u=D+1;u<d;){if((a=e.charAt(u))===Xt){o=eu;break}if(a!==ru)break;o++,u++}if(o>=eu){D=e.indexOf(Wt,D+1);continue}}if(n=e.slice(D+1),Xr(p,f,this,[r,n,!0]))break;if(f.list.call(this,r,n,!0)&&(this.inList||l||s&&!y(Wr.left(n).charAt(0))))break;if(u=D,-1!==(D=e.indexOf(Wt,D+1))&&""===Wr(e.slice(u,D))){D=u;break}}if(n=e.slice(0,D),""===Wr(n))return r(n),null;if(t)return!0;return i=r.now(),n=Pr(n),r(n)({type:"paragraph",children:this.tokenizeInline(n,i)})},Wt="\n",Xt="\t",ru=" ",eu=4;var tu=function(r,e){return r.indexOf("\\",e)};var uu=nu;function nu(r,e,t){var u,n;if("\\"===e.charAt(0)&&(u=e.charAt(1),-1!==this.escape.indexOf(u)))return!!t||(n="\n"===u?{type:"break"}:{type:"text",value:u},r("\\"+u)(n))}nu.locator=tu;var au=function(r,e){return r.indexOf("<",e)};var ou=Du;Du.locator=au,Du.notInLink=!0;var iu="<",cu=">",lu="@",su="/",fu="mailto:",pu=fu.length;function Du(r,e,t){var u,n,a,o,i,c,l,s,f,p,D;if(e.charAt(0)===iu){for(this,u="",n=e.length,a=0,o="",c=!1,l="",a++,u=iu;a<n&&(i=e.charAt(a),!(Br(i)||i===cu||i===lu||":"===i&&e.charAt(a+1)===su));)o+=i,a++;if(o){if(l+=o,o="",l+=i=e.charAt(a),a++,i===lu)c=!0;else{if(":"!==i||e.charAt(a+1)!==su)return;l+=su,a++}for(;a<n&&(i=e.charAt(a),!Br(i)&&i!==cu);)o+=i,a++;if(i=e.charAt(a),o&&i===cu)return!!t||(f=l+=o,u+=l+i,(s=r.now()).column++,s.offset++,c&&(l.slice(0,pu).toLowerCase()===fu?(f=f.substr(pu),s.column+=pu,s.offset+=pu):l=fu+l),p=this.inlineTokenizers,this.inlineTokenizers={text:p.text},D=this.enterLink(),f=this.tokenizeInline(f,s),this.inlineTokenizers=p,D(),r(u)({type:"link",title:null,url:L(l,{nonTerminated:!1}),children:f}))}}}var du=function(r,e){var t,u=hu.length,n=-1,a=-1;if(!this.options.gfm)return-1;for(;++n<u;)-1!==(t=r.indexOf(hu[n],e))&&(t<a||-1===a)&&(a=t);return a},hu=["https://","http://","mailto:"];var gu=Fu;Fu.locator=du,Fu.notInLink=!0;var mu="[",bu="]",vu="(",Eu=")",wu="<",yu="@",Au="mailto:",Cu=["http://","https://",Au],qu=Cu.length;function Fu(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d;if(this.options.gfm){for(u="",o=-1,s=qu;++o<s;)if(c=Cu[o],(l=e.slice(0,c.length)).toLowerCase()===c){u=l;break}if(u){for(o=u.length,s=e.length,f="",p=0;o<s&&(a=e.charAt(o),!Br(a)&&a!==wu)&&("."!==a&&","!==a&&":"!==a&&";"!==a&&'"'!==a&&"'"!==a&&")"!==a&&"]"!==a||(D=e.charAt(o+1))&&!Br(D))&&(a!==vu&&a!==mu||p++,a!==Eu&&a!==bu||!(--p<0));)f+=a,o++;if(f){if(n=u+=f,c===Au){if(-1===(i=f.indexOf(yu))||i===s-1)return;n=n.substr(Au.length)}return!!t||(d=this.enterLink(),n=this.tokenizeInline(n,r.now()),d(),r(u)({type:"link",title:null,url:L(u,{nonTerminated:!1}),children:n}))}}}}var ku=Xe.tag,xu=Su;Su.locator=au;var Lu=/^<a /i,Bu=/^<\/a>/i;function Su(r,e,t){var u,n,a=e.length;if(!("<"!==e.charAt(0)||a<3)&&(u=e.charAt(1),(C(u)||"?"===u||"!"===u||"/"===u)&&(n=e.match(ku))))return!!t||(n=n[0],!this.inLink&&Lu.test(n)?this.inLink=!0:this.inLink&&Bu.test(n)&&(this.inLink=!1),r(n)({type:"html",value:n}))}var Tu=function(r,e){var t=r.indexOf("[",e),u=r.indexOf("![",e);if(-1===u)return t;return t<u?t:u};var Ou=$u;$u.locator=Tu;var Nu={}.hasOwnProperty,Ru="\\",Uu="[",Pu="]",Iu="(",Vu=")",zu="<",ju=">",Gu="`",Hu={'"':'"',"'":"'"},Mu={};function $u(r,e,t){var u,n,a,o,i,c,l,s,f,p,D,d,h,g,m,b,v,E,w,y="",A=0,C=e.charAt(0),q=this.options.pedantic,F=this.options.commonmark,k=this.options.gfm;if("!"===C&&(f=!0,y=C,C=e.charAt(++A)),C===Uu&&(f||!this.inLink)){for(y+=C,m="",A++,d=e.length,g=0,(v=r.now()).column+=A,v.offset+=A;A<d;){if(c=C=e.charAt(A),C===Gu){for(n=1;e.charAt(A+1)===Gu;)c+=C,A++,n++;a?n>=a&&(a=0):a=n}else if(C===Ru)A++,c+=e.charAt(A);else if(a&&!k||C!==Uu){if((!a||k)&&C===Pu){if(!g){if(!q)for(;A<d&&(C=e.charAt(A+1),Br(C));)c+=C,A++;if(e.charAt(A+1)!==Iu)return;c+=Iu,u=!0,A++;break}g--}}else g++;m+=c,c="",A++}if(u){for(p=m,y+=m+c,A++;A<d&&(C=e.charAt(A),Br(C));)y+=C,A++;if(C=e.charAt(A),s=F?Mu:Hu,m="",o=y,C===zu){for(A++,o+=zu;A<d&&(C=e.charAt(A))!==ju;){if(F&&"\n"===C)return;m+=C,A++}if(e.charAt(A)!==ju)return;y+=zu+m+ju,b=m,A++}else{for(C=null,c="";A<d&&(C=e.charAt(A),!c||!Nu.call(s,C));){if(Br(C)){if(!q)break;c+=C}else{if(C===Iu)g++;else if(C===Vu){if(0===g)break;g--}m+=c,c="",C===Ru&&(m+=Ru,C=e.charAt(++A)),m+=C}A++}b=m,A=(y+=m).length}for(m="";A<d&&(C=e.charAt(A),Br(C));)m+=C,A++;if(C=e.charAt(A),y+=m,m&&Nu.call(s,C))if(A++,y+=C,m="",D=s[C],i=y,F){for(;A<d&&(C=e.charAt(A))!==D;)C===Ru&&(m+=Ru,C=e.charAt(++A)),A++,m+=C;if((C=e.charAt(A))!==D)return;for(h=m,y+=m+C,A++;A<d&&(C=e.charAt(A),Br(C));)y+=C,A++}else for(c="";A<d;){if((C=e.charAt(A))===D)l&&(m+=D+c,c=""),l=!0;else if(l){if(C===Vu){y+=m+D+c,h=m;break}Br(C)?c+=C:(m+=D+c+C,c="",l=!1)}else m+=C;A++}if(e.charAt(A)===Vu)return!!t||(y+=Vu,b=this.decode.raw(this.unescape(b),r(o).test().end,{nonTerminated:!1}),h&&(i=r(i).test().end,h=this.decode.raw(this.unescape(h),i)),w={type:f?"image":"link",title:h||null,url:b},f?w.alt=this.decode.raw(this.unescape(p),v)||null:(E=this.enterLink(),w.children=this.tokenizeInline(p,v),E()),r(y)(w))}}}Mu['"']='"',Mu["'"]="'",Mu[Iu]=Vu;var Zu=un;un.locator=Tu;var Yu="link",_u="image",Ju="footnote",Qu="shortcut",Ku="collapsed",Wu="full",Xu="^",rn="\\",en="[",tn="]";function un(r,e,t){var u,n,a,o,i,c,l,s,f=e.charAt(0),p=0,D=e.length,d="",h="",g=Yu,m=Qu;if("!"===f&&(g=_u,h=f,f=e.charAt(++p)),f===en){if(p++,h+=f,c="",this.options.footnotes&&e.charAt(p)===Xu){if(g===_u)return;h+=Xu,p++,g=Ju}for(s=0;p<D;){if((f=e.charAt(p))===en)l=!0,s++;else if(f===tn){if(!s)break;s--}f===rn&&(c+=rn,f=e.charAt(++p)),c+=f,p++}if(d=c,u=c,(f=e.charAt(p))===tn){for(p++,d+=f,c="";p<D&&(f=e.charAt(p),Br(f));)c+=f,p++;if(f=e.charAt(p),g!==Ju&&f===en){for(n="",c+=f,p++;p<D&&(f=e.charAt(p))!==en&&f!==tn;)f===rn&&(n+=rn,f=e.charAt(++p)),n+=f,p++;(f=e.charAt(p))===tn?(m=n?Wu:Ku,c+=n+f,p++):n="",d+=c,c=""}else{if(!u)return;n=u}if(m===Wu||!l)return d=h+d,g===Yu&&this.inLink?null:!!t||(g===Ju&&-1!==u.indexOf(" ")?r(d)({type:"footnote",children:this.tokenizeInline(u,r.now())}):((a=r.now()).column+=h.length,a.offset+=h.length,o={type:g+"Reference",identifier:it(n=m===Wu?n:u)},g!==Yu&&g!==_u||(o.referenceType=m),g===Yu?(i=this.enterLink(),o.children=this.tokenizeInline(u,a),i()):g===_u&&(o.alt=this.decode.raw(this.unescape(u),a)||null),r(d)(o)))}}}var nn=function(r,e){var t=r.indexOf("**",e),u=r.indexOf("__",e);if(-1===u)return t;if(-1===t)return u;return u<t?u:t};var an=ln;ln.locator=nn;var on="*",cn="_";function ln(r,e,t){var u,n,a,o,i,c,l,s=0,f=e.charAt(s);if(!(f!==on&&f!==cn||e.charAt(++s)!==f||(n=this.options.pedantic,i=(a=f)+a,c=e.length,s++,o="",f="",n&&Br(e.charAt(s)))))for(;s<c;){if(l=f,!((f=e.charAt(s))!==a||e.charAt(s+1)!==a||n&&Br(l))&&(f=e.charAt(s+2))!==a){if(!Wr(o))return;return!!t||((u=r.now()).column+=2,u.offset+=2,r(i+o+i)({type:"strong",children:this.tokenizeInline(o,u)}))}n||"\\"!==f||(o+=f,f=e.charAt(++s)),o+=f,s++}}var sn=function(r){return pn.test("number"==typeof r?fn(r):r.charAt(0))},fn=String.fromCharCode,pn=/\w/;var Dn=function(r,e){var t=r.indexOf("*",e),u=r.indexOf("_",e);if(-1===u)return t;if(-1===t)return u;return u<t?u:t};var dn=mn;mn.locator=Dn;var hn="*",gn="_";function mn(r,e,t){var u,n,a,o,i,c,l,s=0,f=e.charAt(s);if(!(f!==hn&&f!==gn||(n=this.options.pedantic,i=f,a=f,c=e.length,s++,o="",f="",n&&Br(e.charAt(s)))))for(;s<c;){if(l=f,!((f=e.charAt(s))!==a||n&&Br(l))){if((f=e.charAt(++s))!==a){if(!Wr(o)||l===a)return;if(!n&&a===gn&&sn(f)){o+=a;continue}return!!t||((u=r.now()).column++,u.offset++,r(i+o+a)({type:"emphasis",children:this.tokenizeInline(o,u)}))}o+=a}n||"\\"!==f||(o+=f,f=e.charAt(++s)),o+=f,s++}}var bn=function(r,e){return r.indexOf("~~",e)};var vn=yn;yn.locator=bn;var En="~",wn="~~";function yn(r,e,t){var u,n,a,o="",i="",c="",l="";if(this.options.gfm&&e.charAt(0)===En&&e.charAt(1)===En&&!Br(e.charAt(2)))for(u=1,n=e.length,(a=r.now()).column+=2,a.offset+=2;++u<n;){if(!((o=e.charAt(u))!==En||i!==En||c&&Br(c)))return!!t||r(wn+l+wn)({type:"delete",children:this.tokenizeInline(l,a)});l+=i,c=i,i=o}}var An=function(r,e){return r.indexOf("`",e)};var Cn=Fn;Fn.locator=An;var qn="`";function Fn(r,e,t){for(var u,n,a,o,i,c,l,s,f=e.length,p=0,D="",d="";p<f&&e.charAt(p)===qn;)D+=qn,p++;if(D){for(i=D,o=p,D="",s=e.charAt(p),a=0;p<f;){if(c=s,s=e.charAt(p+1),c===qn?(a++,d+=c):(a=0,D+=c),a&&s!==qn){if(a===o){i+=D+d,l=!0;break}D+=d,d=""}p++}if(!l){if(o%2!=0)return;D=""}if(t)return!0;for(u="",n="",f=D.length,p=-1;++p<f;)c=D.charAt(p),Br(c)?n+=c:(n&&(u&&(u+=n),n=""),u+=c);return r(i)({type:"inlineCode",value:u})}}var kn=function(r,e){var t=r.indexOf("\n",e);for(;t>e&&" "===r.charAt(t-1);)t--;return t};var xn=Bn;Bn.locator=kn;var Ln=2;function Bn(r,e,t){for(var u,n=e.length,a=-1,o="";++a<n;){if("\n"===(u=e.charAt(a))){if(a<Ln)return;return!!t||r(o+=u)({type:"break"})}if(" "!==u)return;o+=u}}var Sn=function(r,e,t){var u,n,a,o,i,c,l,s,f,p;if(t)return!0;u=this.inlineMethods,o=u.length,n=this.inlineTokenizers,a=-1,f=e.length;for(;++a<o;)"text"!==(s=u[a])&&n[s]&&((l=n[s].locator)||r.file.fail("Missing locator: `"+s+"`"),-1!==(c=l.call(this,e,1))&&c<f&&(f=c));i=e.slice(0,f),p=r.now(),this.decode(i,p,function(e,t,u){r(u||e)({type:"text",value:e})})};var Tn=On;function On(r,e){this.file=e,this.offset={},this.options=n(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=d(e).toOffset,this.unescape=h(this,"escape"),this.decode=sr(this)}var Nn=On.prototype;function Rn(r){var e,t=[];for(e in r)t.push(e);return t}Nn.setOptions=yr,Nn.parse=kr,Nn.options=wr,Nn.exitStart=D("atStart",!0),Nn.enterList=D("inList",!1),Nn.enterLink=D("inLink",!1),Nn.enterBlock=D("inBlock",!1),Nn.interruptParagraph=[["thematicBreak"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Nn.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Nn.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Nn.blockTokenizers={newline:Or,indentedCode:Vr,fencedCode:Mr,blockquote:re,atxHeading:ae,thematicBreak:fe,list:qe,setextHeading:$e,html:et,footnote:ct,definition:vt,table:Ut,paragraph:Kt},Nn.inlineTokenizers={escape:uu,autoLink:ou,url:gu,html:xu,link:Ou,reference:Zu,strong:an,emphasis:dn,deletion:vn,code:Cn,break:xn,text:Sn},Nn.blockMethods=Rn(Nn.blockTokenizers),Nn.inlineMethods=Rn(Nn.inlineTokenizers),Nn.tokenizeBlock=fr("block"),Nn.tokenizeInline=fr("inline"),Nn.tokenizeFactory=fr;var Un=Pn;function Pn(r){var e=p(Tn);e.prototype.options=n(e.prototype.options,this.data("settings"),r),this.Parser=e}Pn.Parser=Tn;var In=Object.prototype.hasOwnProperty,Vn=Object.prototype.toString,zn=function(r){return"function"==typeof Array.isArray?Array.isArray(r):"[object Array]"===Vn.call(r)},jn=function(r){if(!r||"[object Object]"!==Vn.call(r))return!1;var e,t=In.call(r,"constructor"),u=r.constructor&&r.constructor.prototype&&In.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!u)return!1;for(e in r);return void 0===e||In.call(r,e)},Gn=function e(){var t,u,n,a,o,i,c=arguments[0],l=1,s=arguments.length,f=!1;for("boolean"==typeof c&&(f=c,c=arguments[1]||{},l=2),(null==c||"object"!==r(c)&&"function"!=typeof c)&&(c={});l<s;++l)if(null!=(t=arguments[l]))for(u in t)n=c[u],c!==(a=t[u])&&(f&&a&&(jn(a)||(o=zn(a)))?(o?(o=!1,i=n&&zn(n)?n:[]):i=n&&jn(n)?n:{},c[u]=e(f,i,a)):void 0!==a&&(c[u]=a));return c},Hn=function(r){if(r)throw r};var Mn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function $n(){throw new Error("setTimeout has not been defined")}function Zn(){throw new Error("clearTimeout has not been defined")}var Yn=$n,_n=Zn;function Jn(r){if(Yn===setTimeout)return setTimeout(r,0);if((Yn===$n||!Yn)&&setTimeout)return Yn=setTimeout,setTimeout(r,0);try{return Yn(r,0)}catch(e){try{return Yn.call(null,r,0)}catch(e){return Yn.call(this,r,0)}}}"function"==typeof Mn.setTimeout&&(Yn=setTimeout),"function"==typeof Mn.clearTimeout&&(_n=clearTimeout);var Qn,Kn=[],Wn=!1,Xn=-1;function ra(){Wn&&Qn&&(Wn=!1,Qn.length?Kn=Qn.concat(Kn):Xn=-1,Kn.length&&ea())}function ea(){if(!Wn){var r=Jn(ra);Wn=!0;for(var e=Kn.length;e;){for(Qn=Kn,Kn=[];++Xn<e;)Qn&&Qn[Xn].run();Xn=-1,e=Kn.length}Qn=null,Wn=!1,function(r){if(_n===clearTimeout)return clearTimeout(r);if((_n===Zn||!_n)&&clearTimeout)return _n=clearTimeout,clearTimeout(r);try{_n(r)}catch(e){try{return _n.call(null,r)}catch(e){return _n.call(this,r)}}}(r)}}function ta(r,e){this.fun=r,this.array=e}ta.prototype.run=function(){this.fun.apply(null,this.array)};function ua(){}var na=ua,aa=ua,oa=ua,ia=ua,ca=ua,la=ua,sa=ua;var fa=Mn.performance||{},pa=fa.now||fa.mozNow||fa.msNow||fa.oNow||fa.webkitNow||function(){return(new Date).getTime()};var Da=new Date;var da={nextTick:function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];Kn.push(new ta(r,e)),1!==Kn.length||Wn||Jn(ea)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:na,addListener:aa,once:oa,off:ia,removeListener:ca,removeAllListeners:la,emit:sa,binding:function(r){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(r){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(r){var e=.001*pa.call(fa),t=Math.floor(e),u=Math.floor(e%1*1e9);return r&&(t-=r[0],(u-=r[1])<0&&(t--,u+=1e9)),[t,u]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Da)/1e3}},ha={},ga=Object.freeze({default:ha}),ma=ga&&ha||ga;var ba=function(r,e){if("string"!=typeof r)return r;if(0===r.length)return r;var t=ma.basename(r,ma.extname(r))+e;return ma.join(ma.dirname(r),t)},va={}.hasOwnProperty,Ea=function(e){if(!e||"object"!==r(e))return null;if(va.call(e,"position")||va.call(e,"type"))return ya(e.position);if(va.call(e,"start")||va.call(e,"end"))return ya(e);if(va.call(e,"line")||va.call(e,"column"))return wa(e);return null};function wa(e){return e&&"object"===r(e)||(e={}),Aa(e.line)+":"+Aa(e.column)}function ya(e){return e&&"object"===r(e)||(e={}),wa(e.start)+"-"+wa(e.end)}function Aa(r){return r&&"number"==typeof r?r:1}var Ca=function(r){return null!=r&&(qa(r)||function(r){return"function"==typeof r.readFloatLE&&"function"==typeof r.slice&&qa(r.slice(0,0))}(r)||!!r._isBuffer)};function qa(r){return!!r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}var Fa=Ba,ka={}.hasOwnProperty,xa=Ba.prototype;xa.toString=function(r){var e=this.contents||"";return Ca(e)?e.toString(r):String(e)},xa.message=Sa,xa.info=function(){var r=this.message.apply(this,arguments);return r.fatal=null,r},xa.fail=function(){var r=this.message.apply(this,arguments);throw r.fatal=!0,r},xa.warn=Sa;var La=["history","path","basename","stem","extname","dirname"];function Ba(r){var e,t,u;if(r){if("string"==typeof r||Ca(r))r={contents:r};else if("message"in r&&"messages"in r)return r}else r={};if(!(this instanceof Ba))return new Ba(r);for(this.data={},this.messages=[],this.history=[],this.cwd=da.cwd(),t=-1,u=La.length;++t<u;)e=La[t],ka.call(r,e)&&(this[e]=r[e]);for(e in r)-1===La.indexOf(e)&&(this[e]=r[e])}function Sa(r,e,t){var u,n,a=this.path,o=Ea(e)||"1:1";return u={start:{line:null,column:null},end:{line:null,column:null}},e&&e.position&&(e=e.position),e&&(e.start?(u=e,e=e.start):u.start=e),(n=new Oa(r.message||r)).name=(a?a+":":"")+o,n.file=a||"",n.reason=r.message||r,n.line=e?e.line:null,n.column=e?e.column:null,n.location=u,n.ruleId=t||null,n.source=null,n.fatal=!1,r.stack&&(n.stack=r.stack),this.messages.push(n),n}function Ta(){}function Oa(r){this.message=r}function Na(r,e){if(-1!==r.indexOf(ma.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ma.sep+"`")}function Ra(r,e){if(!r)throw new Error("`"+e+"` cannot be empty")}function Ua(r,e){if(!r)throw new Error("Setting `"+e+"` requires `path` to be set too")}Object.defineProperty(xa,"path",{get:function(){return this.history[this.history.length-1]},set:function(r){Ra(r,"path"),r!==this.path&&this.history.push(r)}}),Object.defineProperty(xa,"dirname",{get:function(){return"string"==typeof this.path?ma.dirname(this.path):void 0},set:function(r){Ua(this.path,"dirname"),this.path=ma.join(r||"",this.basename)}}),Object.defineProperty(xa,"basename",{get:function(){return"string"==typeof this.path?ma.basename(this.path):void 0},set:function(r){Ra(r,"basename"),Na(r,"basename"),this.path=ma.join(this.dirname||"",r)}}),Object.defineProperty(xa,"extname",{get:function(){return"string"==typeof this.path?ma.extname(this.path):void 0},set:function(r){var e=r||"";if(Na(e,"extname"),Ua(this.path,"extname"),e){if("."!==e.charAt(0))throw new Error("`extname` must start with `.`");if(-1!==e.indexOf(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ba(this.path,e)}}),Object.defineProperty(xa,"stem",{get:function(){return"string"==typeof this.path?ma.basename(this.path,this.extname):void 0},set:function(r){Ra(r,"stem"),Na(r,"stem"),this.path=ma.join(this.dirname||"",r+(this.extname||""))}}),Ta.prototype=Error.prototype,Oa.prototype=new Ta,(xa=Oa.prototype).file="",xa.name="",xa.reason="",xa.message="",xa.stack="",xa.fatal=null,xa.column=null,xa.line=null;var Pa=function(){var r=[],e={};return e.run=function(){var e=-1,t=Ia.call(arguments,0,-1),u=arguments[arguments.length-1];if("function"!=typeof u)throw new Error("Expected function as last argument, not "+u);(function n(a){var o=r[++e],i=Ia.call(arguments,0),c=i.slice(1),l=t.length,s=-1;if(a)u(a);else{for(;++s<l;)null!==c[s]&&void 0!==c[s]||(c[s]=t[s]);t=c,o?function(r,e){var t;return function(){var e,a=Ia.call(arguments,0),o=r.length>a.length;o&&a.push(u);try{e=r.apply(null,a)}catch(r){if(o&&t)throw r;return u(r)}o||(e&&"function"==typeof e.then?e.then(n,u):e instanceof Error?u(e):n(e))};function u(){t||(t=!0,e.apply(null,arguments))}function n(r){u(null,r)}}(o,n).apply(null,t):u.apply(null,[null].concat(t))}}).apply(null,[null].concat(t))},e.use=function(t){if("function"!=typeof t)throw new Error("Expected `fn` to be a function, not "+t);return r.push(t),e},e},Ia=[].slice;var Va=Object.prototype.toString,za=function(r){return"[object String]"===Va.call(r)};var ja=function(r){return"[object Function]"===Object.prototype.toString.call(r)},Ga=Object.prototype.toString,Ha=function(r){var e;return"[object Object]"===Ga.call(r)&&(null===(e=Object.getPrototypeOf(r))||e===Object.getPrototypeOf({}))},Ma=function e(){var t=[];var u=Pa();var n={};var a=!1;var o=-1;i.data=function(r,e){if(za(r))return 2===arguments.length?(Ka("data",a),n[r]=e,i):Za.call(n,r)&&n[r]||null;if(r)return Ka("data",a),n=r,i;return n};i.freeze=c;i.attachers=t;i.use=function(e){var u;if(Ka("use",a),null===e||void 0===e);else if(ja(e))s.apply(null,arguments);else{if("object"!==r(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?l(e):o(e)}u&&(n.settings=Gn(n.settings||{},u));return i;function o(r){l(r.plugins),r.settings&&(u=Gn(u||{},r.settings))}function c(e){if(ja(e))s(e);else{if("object"!==r(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?s.apply(null,e):o(e)}}function l(e){var t,u;if(null===e||void 0===e);else{if(!("object"===r(e)&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(t=e.length,u=-1;++u<t;)c(e[u])}}function s(r,e){var u=function(r){var e,u=t.length,n=-1;for(;++n<u;)if((e=t[n])[0]===r)return e}(r);u?(Ha(u[1])&&Ha(e)&&(e=Gn(u[1],e)),u[1]=e):t.push($a.call(arguments))}};i.parse=function(r){var e,t=Fa(r);if(c(),Ja("parse",e=i.Parser),_a(e))return new e(String(t),t).parse();return e(String(t),t)};i.stringify=function(r,e){var t,u=Fa(e);if(c(),Qa("stringify",t=i.Compiler),Wa(r),_a(t))return new t(r,u).compile();return t(r,u)};i.run=l;i.runSync=function(r,e){var t,u=!1;return l(r,e,function(r,e){u=!0,Hn(r),t=e}),Xa("runSync","run",u),t};i.process=s;i.processSync=function(r){var e,t=!1;return c(),Ja("processSync",i.Parser),Qa("processSync",i.Compiler),s(e=Fa(r),function(r){t=!0,Hn(r)}),Xa("processSync","process",t),e};return i;function i(){for(var r=e(),u=t.length,a=-1;++a<u;)r.use.apply(null,t[a]);return r.data(Gn(!0,{},n)),r}function c(){var r,e,n,c;if(a)return i;for(;++o<t.length;)r=t[o],e=r[0],n=r[1],c=null,!1!==n&&(!0===n&&(r[1]=void 0),c=e.apply(i,r.slice(1)),ja(c)&&u.use(c));return a=!0,o=1/0,i}function l(r,e,t){if(Wa(r),c(),!t&&ja(e)&&(t=e,e=null),!t)return new Promise(n);function n(n,a){u.run(r,Fa(e),function(e,u,o){u=u||r,e?a(e):n?n(u):t(null,u,o)})}n(null,t)}function s(r,e){if(c(),Ja("process",i.Parser),Qa("process",i.Compiler),!e)return new Promise(t);function t(t,u){var n=Fa(r);Ya.run(i,{file:n},function(r){r?u(r):t?t(n):e(null,n)})}t(null,e)}}().freeze(),$a=[].slice,Za={}.hasOwnProperty,Ya=Pa().use(function(r,e){e.tree=r.parse(e.file)}).use(function(r,e,t){r.run(e.tree,e.file,function(r,u,n){r?t(r):(e.tree=u,e.file=n,t())})}).use(function(r,e){e.file.contents=r.stringify(e.tree,e.file)});function _a(r){return ja(r)&&function(r){var e;for(e in r)return!0;return!1}(r.prototype)}function Ja(r,e){if(!ja(e))throw new Error("Cannot `"+r+"` without `Parser`")}function Qa(r,e){if(!ja(e))throw new Error("Cannot `"+r+"` without `Compiler`")}function Ka(r,e){if(e)throw new Error("Cannot invoke `"+r+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function Wa(r){if(!r||!za(r.type))throw new Error("Expected node, got `"+r+"`")}function Xa(r,e,t){if(!t)throw new Error("`"+r+"` finished async. Use `"+e+"` instead")}var ro=/[|\\{}()[\]^$+*?.]/g,eo=function(r){if("string"!=typeof r)throw new TypeError("Expected a string");return r.replace(ro,"\\$&")},to={"---":"yaml","+++":"toml"};var uo=function(r){var e=Object.keys(to).map(eo).join("|"),t=r.match(new RegExp("^(".concat(e,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===t)return{frontMatter:null,content:r};var u=t[0].replace(/\n$/,""),n=t[1],a=t[2];return{frontMatter:{type:to[n],value:a,raw:u},content:t[0].replace(/[^\n]/g," ")+r.slice(t[0].length)}},no=o(function(r){var e=["format","prettier"];function t(r){var t="@(".concat(e.join("|"),")"),u=new RegExp(["\x3c!--\\s*".concat(t,"\\s*--\x3e"),"\x3c!--.*\r?\n[\\s\\S]*(^|\n)[^\\S\n]*".concat(t,"[^\\S\n]*($|\n)[\\s\\S]*\n.*--\x3e")].join("|"),"m"),n=r.match(u);return n&&0===n.index}r.exports={startWithPragma:t,hasPragma:function(r){return t(uo(r).content.trimLeft())},insertPragma:function(r){var t=uo(r),u="\x3c!-- @".concat(e[0]," --\x3e");return t.frontMatter?"".concat(t.frontMatter.raw,"\n\n").concat(u,"\n\n").concat(t.content):"".concat(u,"\n\n").concat(t.content)}}}),ao=o(function(r){r.exports=function(r){r=Object.assign({onlyFirst:!1},r);var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r.onlyFirst?void 0:"g")}}),oo=o(function(r){r.exports=function(r){return!Number.isNaN(r)&&(r>=4352&&(r<=4447||9001===r||9002===r||11904<=r&&r<=12871&&12351!==r||12880<=r&&r<=19903||19968<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65131||65281<=r&&r<=65376||65504<=r&&r<=65510||110592<=r&&r<=110593||127488<=r&&r<=127569||131072<=r&&r<=262141))}});o(function(r){var e=/\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;r.exports=function(r){if("string"!=typeof(r=r.replace(e," "))||0===r.length)return 0;r=function(r){return"string"==typeof r?r.replace(ao(),""):r}(r);for(var t=0,u=0;u<r.length;u++){var n=r.codePointAt(u);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&u++,t+=oo(n)?2:1))}return t}});function io(r){return function(e,t,u){var n=u&&u.backwards;if(!1===t)return!1;for(var a=e.length,o=t;o>=0&&o<a;){var i=e.charAt(o);if(r instanceof RegExp){if(!r.test(i))return o}else if(-1===r.indexOf(i))return o;n?o--:o++}return(-1===o||o===a)&&o}}io(/\s/),io(" \t"),io(",; \t"),io(/[^\r\n]/);var co={};[["|>"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(r,e){r.forEach(function(r){co[r]=e})});var lo="[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312e\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fea\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]",so="[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]",fo="[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]",po=function(r){return r.length>0?r[r.length-1]:null},Do=["liquidNode","inlineCode","emphasis","strong","delete","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"],ho=Do.concat(["tableCell","paragraph","heading"]),go=new RegExp(so),mo=new RegExp(fo);var bo={mapAst:function(r,e){return function r(t,u,n){n=n||[];var a=Object.assign({},e(t,u,n));return a.children&&(a.children=a.children.map(function(e,t){return r(e,t,[a].concat(n))})),a}(r,null,null)},splitText:function(r,e){var t="non-cjk",u="cj-letter",n="cjk-punctuation",a=[];return("preserve"===e.proseWrap?r:r.replace(new RegExp("(".concat(lo,")\n(").concat(lo,")"),"g"),"$1$2")).split(/([ \t\n]+)/).forEach(function(r,e,i){e%2!=1?(0!==e&&e!==i.length-1||""!==r)&&r.split(new RegExp("(".concat(lo,")"))).forEach(function(r,e,a){(0!==e&&e!==a.length-1||""!==r)&&(e%2!=0?o(mo.test(r)?{type:"word",value:r,kind:n,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:r,kind:go.test(r)?"k-letter":u,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==r&&o({type:"word",value:r,kind:t,hasLeadingPunctuation:mo.test(r[0]),hasTrailingPunctuation:mo.test(po(r))}))}):a.push({type:"whitespace",value:/\n/.test(r)?"\n":" "})}),a;function o(r){var e,o,i=po(a);i&&"word"===i.type&&(i.kind===t&&r.kind===u&&!i.hasTrailingPunctuation||i.kind===u&&r.kind===t&&!r.hasLeadingPunctuation?a.push({type:"whitespace",value:" "}):(e=t,o=n,i.kind===e&&r.kind===o||i.kind===o&&r.kind===e||[i.value,r.value].some(function(r){return/\u3000/.test(r)})||a.push({type:"whitespace",value:""}))),a.push(r)}},punctuationPattern:fo,getFencedCodeBlockValue:function(r,e){var t=e.slice(r.position.start.offset,r.position.end.offset),u=t.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,".concat(u,"}")),a=t.split("\n"),o=t[u],i=t.slice(u).match(new RegExp("^[".concat(o,"]+")))[0],c=new RegExp("^\\s{0,3}".concat(i)).test(a[a.length-1].slice(l(a.length-1)));return a.slice(1,c?-1:void 0).map(function(r,e){return r.slice(l(e+1)).replace(n,"")}).join("\n");function l(e){return r.position.indent[e-1]-1}},getOrderedListItemInfo:function(r,t){var u=e(t.slice(r.position.start.offset,r.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),4);return{numberText:u[1],marker:u[2],leadingSpaces:u[3]}},INLINE_NODE_TYPES:Do,INLINE_NODE_WRAPPER_TYPES:ho},vo=o(function(r){var e=/^import/,t=/^export/,u=function(r){return e.test(r)},n=function(r){return t.test(r)},a=function(r,e){var t=e.indexOf("\n\n"),a=e.slice(0,t);if(n(a)||u(a))return r(a)({type:n(a)?"export":"import",value:a})};a.locator=function(r){return n(r)||u(r)?-1:1},r.exports={esSyntax:function(){var r=this.Parser,e=r.prototype.blockTokenizers,t=r.prototype.blockMethods;e.esSyntax=a,t.splice(t.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z\\.]+(\\.){0,1}[a-z\\.]"}});function Eo(r,e){return r.indexOf("$",e)}var wo=/^\\\$/,yo=/^\$((?:\\\$|[^$])+)\$/,Ao=/^\$\$((?:\\\$|[^$])+)\$\$/,Co="\n",qo="\t",Fo=" ",ko="$",xo=2,Lo=4,Bo=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(function(r){var e=this.Parser,t=e.prototype.blockTokenizers,u=e.prototype.blockMethods;t.math=function(r,e,t){for(var u,n,a,o,i,c,l,s,f,p,D=e.length+1,d=0,h="";d<D&&((a=e.charAt(d))===Fo||a===qo);)h+=a,d++;if(f=d,(a=e.charAt(d))===ko){for(d++,n=a,u=1,h+=a;d<D&&(a=e.charAt(d))===n;)h+=a,u++,d++;if(!(u<xo)){for(;d<D&&(a=e.charAt(d))!==Co;){if(a===ko)return;h+=a,d++}if(a=e.charAt(d),t)return!0;for((p=r.now()).column+=h.length,p.offset+=h.length,o=l=s=i=c="";d<D;)if(i+=l,c+=s,l=s="",(a=e.charAt(d))===Co){for(i?(l+=a,s+=a):h+=a,o="",d++;d<D&&(a=e.charAt(d))===Fo;)o+=a,d++;if(l+=o,s+=o.slice(f),!(o.length>=Lo)){for(o="";d<D&&(a=e.charAt(d))===n;)o+=a,d++;if(l+=o,s+=o,!(o.length<u)){for(o="";d<D&&(a=e.charAt(d))!==Co;)l+=a,s+=a,d++;break}}}else i+=a,s+=a,d++;h+=i+l;var g=Pr(c);return r(h)({type:"math",value:g,data:{hName:"div",hProperties:{className:"math"},hChildren:[{type:"text",value:g}]}})}}},u.splice(u.indexOf("fencedCode")+1,0,"math");var n=e.prototype.interruptParagraph,a=e.prototype.interruptList,o=e.prototype.interruptBlockquote;n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),o.splice(o.indexOf("fencedCode")+1,0,["math"]);var i=this.Compiler;null!=i&&(i.prototype.visitors.math=function(r){return"$$\n"+r.value+"\n$$"})}).call(this,r),function(r){function e(e,t,u){var n=!0,a=Ao.exec(t);a||(a=yo.exec(t),n=!1);var o=wo.exec(t);if(o)return!!u||e(o[0])({type:"text",value:"$"});if("\\$"===t.slice(-2))return e(t)({type:"text",value:t.slice(0,-2)+"$"});if(a){if(u)return!0;if(a[0].includes("`")&&t.slice(a[0].length).includes("`")){var i=t.slice(0,t.indexOf("`"));return e(i)({type:"text",value:i})}var c=a[1].trim();return e(a[0])({type:"inlineMath",value:c,data:{hName:"span",hProperties:{className:"inlineMath"+(n&&r.inlineMathDouble?" inlineMathDouble":"")},hChildren:[{type:"text",value:c}]}})}}e.locator=Eo;var t=this.Parser,u=t.prototype.inlineTokenizers,n=t.prototype.inlineMethods;u.math=e,n.splice(n.indexOf("text"),0,"math");var a=this.Compiler;null!=a&&(a.prototype.visitors.inlineMath=function(r){return"$"+r.value+"$"})}.call(this,r)},So=bo.mapAst,To=bo.INLINE_NODE_WRAPPER_TYPES;function Oo(r){var e=r.isMDX;return function(r){var t=Ma().use(Un,Object.assign({footnotes:!0,commonmark:!0},e&&{blocks:[vo.BLOCKS_REGEX]})).use(Uo).use(Bo).use(e?vo.esSyntax:No).use(Po).use(e?Ro:No);return t.runSync(t.parse(r))}}function No(r){return r}function Ro(){return function(r){return So(r,function(r,t,u){var n=e(u,1)[0];return"html"!==r.type||/^<!--[\s\S]*-->$/.test(r.value)||-1!==To.indexOf(n.type)?r:Object.assign({},r,{type:"jsx"})})}}function Uo(){var r=this.Parser.prototype;function e(r,e){var t=uo(e);if(t.frontMatter)return r(t.frontMatter.raw)(t.frontMatter)}r.blockMethods=["frontMatter"].concat(r.blockMethods),r.blockTokenizers.frontMatter=e,e.onlyAtStart=!0}function Po(){var r=this.Parser.prototype,e=r.inlineMethods;function t(r,e){var t=e.match(/^({%[\s\S]*?%}|{{[\s\S]*?}})/);if(t)return r(t[0])({type:"liquidNode",value:t[0]})}e.splice(e.indexOf("text"),0,"liquid"),r.inlineTokenizers.liquid=t,t.locator=function(r,e){return r.indexOf("{",e)}}var Io={astFormat:"mdast",hasPragma:no.hasPragma,locStart:function(r){return r.position.start.offset},locEnd:function(r){return r.position.end.offset},preprocess:function(r){return r.replace(/\n\s+$/,"\n")}},Vo=Object.assign({},Io,{parse:Oo({isMDX:!1})});return{parsers:{remark:Vo,markdown:Vo,mdx:Object.assign({},Io,{parse:Oo({isMDX:!0})})}}});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.markdown={}))}(globalThis,(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)f.call(r,n)&&(e[n]=r[n])}return e},f=Object.prototype.hasOwnProperty;function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}function D(e){return e&&e.default||e}var g=Object.freeze({__proto__:null,default:{}}),m=d((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),v=D(g),b=d((function(e){try{var t=v;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=m}})),y=function(e){var r,n,i;for(n in b(o,e),b(a,o),r=o.prototype)(i=r[n])&&"object"===t(i)&&(r[n]="concat"in i?i.concat():p(i));return o;function a(t){return e.apply(this,t)}function o(){return this instanceof o?e.apply(this,arguments):new a(arguments)}}
+/**
+ * @author Titus Wormer
+ * @copyright 2016 Titus Wormer
+ * @license MIT
+ * @module state-toggle
+ * @fileoverview Enter/exit a state.
+ */;var E=function(e,t,r){return function(){var n=r||this,i=n[e];return n[e]=!t,function(){n[e]=i}}};var C=function(e){var t=function(e){var t=[],r=e.indexOf("\n");for(;-1!==r;)t.push(r+1),r=e.indexOf("\n",r+1);return t.push(e.length+1),t}(String(e));return{toPosition:A(t),toOffset:w(t)}};function A(e){return function(t){var r=-1,n=e.length;if(t<0)return{};for(;++r<n;)if(e[r]>t)return{line:r+1,column:t-(e[r-1]||0)+1,offset:t};return{}}}function w(e){return function(t){var r=t&&t.line,n=t&&t.column;if(!isNaN(r)&&!isNaN(n)&&r-1 in e)return(e[r-2]||0)+n-1||0;return-1}}var k=function(e,t){return function(r){var n,i=0,a=r.indexOf("\\"),o=e[t],u=[];for(;-1!==a;)u.push(r.slice(i,a)),i=a+1,(n=r.charAt(i))&&-1!==o.indexOf(n)||u.push("\\"),a=r.indexOf("\\",i);return u.push(r.slice(i)),u.join("")}};var T={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},_=Object.freeze({__proto__:null,AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌",default:T}),S={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},F=Object.freeze({__proto__:null,AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ",default:S}),x=Object.freeze({__proto__:null,default:{0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"}}),q=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var N=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var L=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var B=function(e){return L(e)||q(e)};var P=D(_),O=D(F),R=D(x),I=function(e,t){var r,n,i={};t||(t={});for(n in te)r=t[n],i[n]=null==r?te[n]:r;(i.position.indent||i.position.start)&&(i.indent=i.position.indent||[],i.position=i.position.start);return function(e,t){var r,n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y=t.additional,E=t.nonTerminated,C=t.text,A=t.reference,w=t.warning,k=t.textContext,T=t.referenceContext,_=t.warningContext,S=t.position,F=t.indent||[],x=e.length,q=0,N=-1,L=S.column||1,I=S.line||1,te=K,de=[];g=ge(),s=w?function(e,t){var r=ge();r.column+=t,r.offset+=t,w.call(_,me[e],r,e)}:V,q--,x++;for(;++q<x;)if(a===X&&(L=F[N]||1),(a=be(q))!==z)a===X&&(I++,N++,L=0),a?(te+=a,L++):ye();else{if((u=be(q+1))===ee||u===X||u===j||u===Y||u===Z||u===z||u===K||y&&u===y){te+=a,L++;continue}for(f=h=q+1,b=h,u!==G?d=re:(b=++f,(u=be(b))===W||u===Q?(d=ne,b=++f):d=ie),r=K,p=K,i=K,D=oe[d],b--;++b<x&&(u=be(b),D(u));)i+=u,d===re&&U.call(O,i)&&(r=i,p=O[i]);(n=be(b)===H)&&(b++,d===re&&U.call(P,i)&&(r=i,p=P[i])),v=1+b-h,(n||E)&&(i?d===re?(n&&!p?s(pe,1):(r!==i&&(b=f+r.length,v=1+b-f,n=!1),n||(c=r?ue:ce,t.attribute?(u=be(b))===J?(s(c,v),p=null):B(u)?p=null:s(c,v):s(c,v))),o=p):(n||s(se,v),o=parseInt(i,ae[d]),(De=o)>=55296&&De<=57343||De>1114111?(s(he,v),o=M):o in R?(s(fe,v),o=R[o]):(l=K,ve(o)&&s(fe,v),o>65535&&(l+=$((o-=65536)>>>10|55296),o=56320|1023&o),o=l+$(o))):d!==re&&s(le,v)),o?(ye(),g=ge(),q=b-1,L+=b-h+1,de.push(o),(m=ge()).offset++,A&&A.call(T,o,{start:g,end:m},e.slice(h-1,b)),g=m):(i=e.slice(h-1,b),te+=i,L+=i.length,q=b-1)}var De;return de.join(K);function ge(){return{line:I,column:L,offset:q+(S.offset||0)}}function be(t){return e.charAt(t)}function ye(){te&&(de.push(te),C&&C.call(k,te,{start:g,end:ge()}),te=K)}}(e,i)},U={}.hasOwnProperty,$=String.fromCharCode,V=Function.prototype,M="�",j="\f",z="&",G="#",H=";",X="\n",W="x",Q="X",Y=" ",Z="<",J="=",K="",ee="\t",te={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},re="named",ne="hexadecimal",ie="decimal",ae={};ae[ne]=16,ae[ie]=10;var oe={};oe[re]=B,oe[ie]=q,oe[ne]=N;var ue=1,se=2,ce=3,le=4,pe=5,fe=6,he=7,de="Numeric character references",De=" must be terminated by a semicolon",ge=" cannot be empty",me={};function ve(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}me[ue]="Named character references"+De,me[se]=de+De,me[ce]="Named character references"+ge,me[le]=de+ge,me[pe]="Named character references must be known",me[fe]=de+" cannot be disallowed",me[he]=de+" cannot be outside the permissible Unicode range";var be=function(e){return n.raw=function(e,n,i){return I(e,p(i,{position:t(n),warning:r}))},n;function t(t){for(var r=e.offset,n=t.line,i=[];++n&&n in r;)i.push((r[n]||0)+1);return{start:t,indent:i}}function r(t,r,n){3!==n&&e.file.message(t,r)}function n(n,i,a){I(n,{position:t(i),warning:r,text:a,reference:a,textContext:e,referenceContext:e})}};var ye=function(e){return function(t,r){var n,i,a,o,u,s,c=this,l=c.offset,p=[],f=c[e+"Methods"],h=c[e+"Tokenizers"],d=r.line,D=r.column;if(!t)return p;b.now=m,b.file=c.file,g("");for(;t;){for(n=-1,i=f.length,u=!1;++n<i&&(o=f[n],!(a=h[o])||a.onlyAtStart&&!c.atStart||a.notInList&&c.inList||a.notInBlock&&c.inBlock||a.notInLink&&c.inLink||(s=t.length,a.apply(c,[b,t]),!(u=s!==t.length))););u||c.file.fail(new Error("Infinite loop"),b.now())}return c.eof=m(),p;function g(e){for(var t=-1,r=e.indexOf("\n");-1!==r;)d++,t=r,r=e.indexOf("\n",r+1);-1===t?D+=e.length:D=e.length-t,d in l&&(-1!==t?D+=l[d]:D<=l[d]&&(D=l[d]+1))}function m(){var e={line:d,column:D};return e.offset=c.toOffset(e),e}function v(e){this.start=e,this.end=m()}function b(e){var r,n=function(){var e=[],t=d+1;return function(){for(var r=d+1;t<r;)e.push((l[t]||0)+1),t++;return e}}(),i=(r=m(),function(e,t){var n=e.position,i=n?n.start:r,a=[],o=n&&n.end.line,u=r.line;if(e.position=new v(i),n&&t&&n.indent){if(a=n.indent,o<u){for(;++o<u;)a.push((l[o]||0)+1);a.push(r.column)}t=a.concat(t)}return e.position.indent=t||[],e}),a=m();return function(e){t.substring(0,e.length)!==e&&c.file.fail(new Error("Incorrectly eaten value: please report this warning on http://git.io/vg5Ft"),m())}(e),o.reset=u,u.test=s,o.test=s,t=t.substring(e.length),g(e),n=n(),o;function o(e,t){return i(function(e,t){var r=t?t.children:p,n=r[r.length-1];return n&&e.type===n.type&&e.type in Ee&&Ce(n)&&Ce(e)&&(e=Ee[e.type].call(c,n,e)),e!==n&&r.push(e),c.atStart&&0!==p.length&&c.exitStart(),e}(i(e),t),n)}function u(){var r=o.apply(null,arguments);return d=a.line,D=a.column,t=e+t,r}function s(){var r=i({});return d=a.line,D=a.column,t=e+t,r.position}}}},Ee={text:function(e,t){return e.value+=t.value,e},blockquote:function(e,t){if(this.options.commonmark)return t;return e.children=e.children.concat(t.children),e}};function Ce(e){var t,r;return"text"!==e.type||!e.position||(t=e.position.start,r=e.position.end,t.line!==r.line||r.column-t.column===e.value.length)}var Ae=_e,we=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],ke=we.concat(["~","|"]),Te=ke.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function _e(e){var t=e||{};return t.commonmark?Te:t.gfm?ke:we}_e.default=we,_e.gfm=ke,_e.commonmark=Te;var Se={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:D(Object.freeze({__proto__:null,default:["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}))},Fe=function(e){var r,n,i=this.options;if(null==e)e={};else{if("object"!==t(e))throw new Error("Invalid value `"+e+"` for setting `options`");e=p(e)}for(r in Se){if(null==(n=e[r])&&(n=i[r]),"blocks"!==r&&"boolean"!=typeof n||"blocks"===r&&"object"!==t(n))throw new Error("Invalid value `"+n+"` for setting `options."+r+"`");e[r]=n}return this.options=e,this.escape=Ae(e),this};var xe=function(e,t,r,n){"function"==typeof t&&(n=r,r=t,t=null);function i(e,a,o){var u;return a=a||(o?0:null),t&&e.type!==t||(u=r(e,a,o||null)),e.children&&!1!==u?function(e,t){var r,a=n?-1:1,o=e.length,u=(n?o:-1)+a;for(;u>-1&&u<o;){if((r=e[u])&&!1===i(r,u,t))return!1;u+=a}return!0}(e.children,e):u}i(e)};var qe=function(e,t){return xe(e,t?Ne:Le),e};function Ne(e){delete e.position}function Le(e){e.position=void 0}var Be=function(){var e,t=String(this.file),r={line:1,column:1,offset:0},n=p(r);65279===(t=t.replace(Oe,Pe)).charCodeAt(0)&&(t=t.slice(1),n.column++,n.offset++);e={type:"root",children:this.tokenizeBlock(t,n),position:{start:r,end:this.eof||p(r)}},this.options.position||qe(e,!0);return e},Pe="\n",Oe=/\r\n|\r/g;var Re=function(e){return Ue.test("number"==typeof e?Ie(e):e.charAt(0))},Ie=String.fromCharCode,Ue=/\s/;var $e=function(e,t,r){var n,i,a,o,u=t.charAt(0);if("\n"!==u)return;if(r)return!0;o=1,n=t.length,i=u,a="";for(;o<n&&(u=t.charAt(o),Re(u));)a+=u,"\n"===u&&(i+=a,a=""),o++;e(i)}
+/*!
+ * repeat-string <https://github.com/jonschlinkert/repeat-string>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */;var Ve,Me="",je=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(Ve!==e||void 0===Ve)Ve=e,Me="";else if(Me.length>=r)return Me.substr(0,r);for(;r>Me.length&&t>1;)1&t&&(Me+=e),t>>=1,e+=e;return Me=(Me+=e).substr(0,r)};var ze=function(e){var t=String(e),r=t.length;for(;t.charAt(--r)===Ge;);return t.slice(0,r+1)},Ge="\n";var He=function(e,t,r){var n,i,a,o=-1,u=t.length,s="",c="",l="",p="";for(;++o<u;)if(n=t.charAt(o),a)if(a=!1,s+=l,c+=p,l="",p="",n===Xe)l=n,p=n;else for(s+=n,c+=n;++o<u;){if(!(n=t.charAt(o))||n===Xe){p=n,l=n;break}s+=n,c+=n}else if(n===Qe&&t.charAt(o+1)===n&&t.charAt(o+2)===n&&t.charAt(o+3)===n)l+=Ye,o+=3,a=!0;else if(n===We)l+=n,a=!0;else{for(i="";n===We||n===Qe;)i+=n,n=t.charAt(++o);if(n!==Xe)break;l+=i+n,p+=n}if(c)return!!r||e(s)({type:"code",lang:null,value:ze(c)})},Xe="\n",We="\t",Qe=" ",Ye=je(Qe,4);var Ze=function(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d=this.options,D=t.length+1,g=0,m="";if(!d.gfm)return;for(;g<D&&((a=t.charAt(g))===et||a===Ke);)m+=a,g++;if(f=g,(a=t.charAt(g))!==tt&&a!==rt)return;g++,i=a,n=1,m+=a;for(;g<D&&(a=t.charAt(g))===i;)m+=a,n++,g++;if(n<nt)return;for(;g<D&&((a=t.charAt(g))===et||a===Ke);)m+=a,g++;o="",u="";for(;g<D&&(a=t.charAt(g))!==Je&&a!==tt&&a!==rt;)a===et||a===Ke?u+=a:(o+=u+a,u=""),g++;if((a=t.charAt(g))&&a!==Je)return;if(r)return!0;(h=e.now()).column+=m.length,h.offset+=m.length,m+=o,o=this.decode.raw(this.unescape(o),h),u&&(m+=u);u="",l="",p="",s="",c="";for(;g<D;)if(a=t.charAt(g),s+=l,c+=p,l="",p="",a===Je){for(s?(l+=a,p+=a):m+=a,u="",g++;g<D&&(a=t.charAt(g))===et;)u+=a,g++;if(l+=u,p+=u.slice(f),!(u.length>=it)){for(u="";g<D&&(a=t.charAt(g))===i;)u+=a,g++;if(l+=u,p+=u,!(u.length<n)){for(u="";g<D&&((a=t.charAt(g))===et||a===Ke);)l+=a,p+=a,g++;if(!a||a===Je)break}}}else s+=a,p+=a,g++;return e(m+=s+l)({type:"code",lang:o||null,value:ze(c)})},Je="\n",Ke="\t",et=" ",tt="~",rt="`",nt=3,it=4;var at=d((function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}})),ot=(at.left,at.right,function(e,t,r,n){var i,a,o,u,s,c,l=["pedantic","commonmark"],p=l.length,f=e.length,h=-1;for(;++h<f;){for(i=e[h],a=i[1]||{},o=i[0],u=-1,c=!1;++u<p;)if(void 0!==a[s=l[u]]&&a[s]!==r.options[s]){c=!0;break}if(!c&&t[o].apply(r,n))return!0}return!1});var ut=function(e,t,r){var n,i,a,o,u,s,c,l,p,f=this.offset,h=this.blockTokenizers,d=this.interruptBlockquote,D=e.now(),g=D.line,m=t.length,v=[],b=[],y=[],E=0;for(;E<m&&((i=t.charAt(E))===lt||i===ct);)E++;if(t.charAt(E)!==pt)return;if(r)return!0;E=0;for(;E<m;){for(o=t.indexOf(st,E),c=E,l=!1,-1===o&&(o=m);E<m&&((i=t.charAt(E))===lt||i===ct);)E++;if(t.charAt(E)===pt?(E++,l=!0,t.charAt(E)===lt&&E++):E=c,u=t.slice(E,o),!l&&!at(u)){E=c;break}if(!l&&(a=t.slice(E),ot(d,h,this,[e,a,!0])))break;s=c===E?u:t.slice(c,o),y.push(E-c),v.push(s),b.push(u),E=o+1}E=-1,m=y.length,n=e(v.join(st));for(;++E<m;)f[g]=(f[g]||0)+y[E],g++;return p=this.enterBlock(),b=this.tokenizeBlock(b.join(st),D),p(),n({type:"blockquote",children:b})},st="\n",ct="\t",lt=" ",pt=">";var ft=function(e,t,r){var n,i,a,o=this.options,u=t.length+1,s=-1,c=e.now(),l="",p="";for(;++s<u;){if((n=t.charAt(s))!==Dt&&n!==dt){s--;break}l+=n}a=0;for(;++s<=u;){if((n=t.charAt(s))!==gt){s--;break}l+=n,a++}if(a>mt)return;if(!a||!o.pedantic&&t.charAt(s+1)===gt)return;u=t.length+1,i="";for(;++s<u;){if((n=t.charAt(s))!==Dt&&n!==dt){s--;break}i+=n}if(!o.pedantic&&0===i.length&&n&&n!==ht)return;if(r)return!0;l+=i,i="",p="";for(;++s<u&&(n=t.charAt(s))&&n!==ht;)if(n===Dt||n===dt||n===gt){for(;n===Dt||n===dt;)i+=n,n=t.charAt(++s);for(;n===gt;)i+=n,n=t.charAt(++s);for(;n===Dt||n===dt;)i+=n,n=t.charAt(++s);s--}else p+=i+n,i="";return c.column+=l.length,c.offset+=l.length,e(l+=p+i)({type:"heading",depth:a,children:this.tokenizeInline(p,c)})},ht="\n",dt="\t",Dt=" ",gt="#",mt=6;var vt=function(e,t,r){var n,i,a,o,u=-1,s=t.length+1,c="";for(;++u<s&&((n=t.charAt(u))===yt||n===Et);)c+=n;if(n!==Ct&&n!==wt&&n!==At)return;i=n,c+=n,a=1,o="";for(;++u<s;)if((n=t.charAt(u))===i)a++,c+=o+i,o="";else{if(n!==Et)return a>=kt&&(!n||n===bt)?(c+=o,!!r||e(c)({type:"thematicBreak"})):void 0;o+=n}},bt="\n",yt="\t",Et=" ",Ct="*",At="_",wt="-",kt=3;var Tt=function(e){var t,r=0,n=0,i=e.charAt(r),a={};for(;i in _t;)t=_t[i],n+=t,t>1&&(n=Math.floor(n/t)*t),a[n]=r,i=e.charAt(++r);return{indent:n,stops:a}},_t={" ":1,"\t":4};var St=function(e,t){var r,n,i,a,o=e.split(xt),u=o.length+1,s=1/0,c=[];o.unshift(je(Ft,t)+"!");for(;u--;)if(n=Tt(o[u]),c[u]=n.stops,0!==at(o[u]).length){if(!n.indent){s=1/0;break}n.indent>0&&n.indent<s&&(s=n.indent)}if(s!==1/0)for(u=o.length;u--;){for(i=c[u],r=s;r&&!(r in i);)r--;a=0!==at(o[u]).length&&s&&r!==s?qt:"",o[u]=a+o[u].slice(r in i?i[r]+1:0)}return o.shift(),o.join(xt)},Ft=" ",xt="\n",qt="\t";var Nt=function(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y,E,C,A,w,k,T,_=this.options.commonmark,S=this.options.pedantic,F=this.blockTokenizers,x=this.interruptList,N=0,L=t.length,B=null,P=0;for(;N<L;){if((o=t.charAt(N))===It)P+=$t-P%$t;else{if(o!==Ot)break;P++}N++}if(P>=$t)return;if(o=t.charAt(N),n=_?Wt:Xt,!0===Ht[o])u=o,a=!1;else{for(a=!0,i="";N<L&&(o=t.charAt(N),q(o));)i+=o,N++;if(o=t.charAt(N),!i||!0!==n[o])return;B=parseInt(i,10),u=o}if((o=t.charAt(++N))!==Ot&&o!==It)return;if(r)return!0;N=0,g=[],m=[],v=[];for(;N<L;){for(s=t.indexOf(Rt,N),c=N,l=!1,T=!1,-1===s&&(s=L),k=N+$t,P=0;N<L;){if((o=t.charAt(N))===It)P+=$t-P%$t;else{if(o!==Ot)break;P++}N++}if(P>=$t&&(T=!0),b&&P>=b.indent&&(T=!0),o=t.charAt(N),p=null,!T){if(!0===Ht[o])p=o,N++,P++;else{for(i="";N<L&&(o=t.charAt(N),q(o));)i+=o,N++;o=t.charAt(N),N++,i&&!0===n[o]&&(p=o,P+=i.length+1)}if(p)if((o=t.charAt(N))===It)P+=$t-P%$t,N++;else if(o===Ot){for(k=N+$t;N<k&&t.charAt(N)===Ot;)N++,P++;N===k&&t.charAt(N)===Ot&&(N-=$t-1,P-=$t-1)}else o!==Rt&&""!==o&&(p=null)}if(p){if(!S&&u!==p)break;l=!0}else _||T||t.charAt(c)!==Ot?_&&b&&(T=P>=b.indent||P>$t):T=!0,l=!1,N=c;if(h=t.slice(c,s),f=c===N?h:t.slice(N,s),(p===Lt||p===Bt||p===Pt)&&F.thematicBreak.call(this,e,h,!0))break;if(d=D,D=!at(f).length,T&&b)b.value=b.value.concat(v,h),m=m.concat(v,h),v=[];else if(l)0!==v.length&&(b.value.push(""),b.trail=v.concat()),b={value:[h],indent:P,trail:[]},g.push(b),m=m.concat(v,h),v=[];else if(D){if(d)break;v.push(h)}else{if(d)break;if(ot(x,F,this,[e,h,!0]))break;b.value=b.value.concat(v,h),m=m.concat(v,h),v=[]}N=s+1}A=e(m.join(Rt)).reset({type:"list",ordered:a,start:B,loose:null,children:[]}),y=this.enterList(),E=this.enterBlock(),C=!1,N=-1,L=g.length;for(;++N<L;)b=g[N].value.join(Rt),w=e.now(),(b=e(b)(Qt(this,b,w),A)).loose&&(C=!0),b=g[N].trail.join(Rt),N!==L-1&&(b+=Rt),e(b);return y(),E(),A.loose=C,A},Lt="*",Bt="_",Pt="-",Ot=" ",Rt="\n",It="\t",Ut="x",$t=4,Vt=/\n\n(?!\s*$)/,Mt=/^\[([ \t]|x|X)][ \t]/,jt=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,zt=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Gt=/^( {1,4}|\t)?/gm,Ht={};Ht[Lt]=!0,Ht["+"]=!0,Ht[Pt]=!0;var Xt={".":!0},Wt={};function Qt(e,t,r){var n,i,a=e.offset,o=null;return t=(e.options.pedantic?Yt:Zt).apply(null,arguments),e.options.gfm&&(n=t.match(Mt))&&(i=n[0].length,o=n[1].toLowerCase()===Ut,a[r.line]+=i,t=t.slice(i)),{type:"listItem",loose:Vt.test(t)||t.charAt(t.length-1)===Rt,checked:o,children:e.tokenizeBlock(t,r)}}function Yt(e,t,r){var n=e.offset,i=r.line;return t=t.replace(zt,a),i=r.line,t.replace(Gt,a);function a(e){return n[i]=(n[i]||0)+e.length,i++,""}}function Zt(e,t,r){var n,i,a,o,u,s,c,l=e.offset,p=r.line;for(o=(t=t.replace(jt,(function(e,t,r,o,u){i=t+r+o,a=u,Number(r)<10&&i.length%2==1&&(r=Ot+r);return(n=t+je(Ot,r.length)+o)+a}))).split(Rt),(u=St(t,Tt(n).indent).split(Rt))[0]=a,l[p]=(l[p]||0)+i.length,p++,s=0,c=o.length;++s<c;)l[p]=(l[p]||0)+o[s].length-u[s].length,p++;return u.join(Rt)}Wt["."]=!0,Wt[")"]=!0;var Jt=function(e,t,r){var n,i,a,o,u,s=e.now(),c=t.length,l=-1,p="";for(;++l<c;){if((a=t.charAt(l))!==tr||l>=rr){l--;break}p+=a}n="",i="";for(;++l<c;){if((a=t.charAt(l))===Kt){l--;break}a===tr||a===er?i+=a:(n+=i+a,i="")}if(s.column+=p.length,s.offset+=p.length,p+=n+i,a=t.charAt(++l),o=t.charAt(++l),a!==Kt||!nr[o])return;p+=a,i=o,u=nr[o];for(;++l<c;){if((a=t.charAt(l))!==o){if(a!==Kt)return;l--;break}i+=a}if(r)return!0;return e(p+i)({type:"heading",depth:u,children:this.tokenizeInline(n,s)})},Kt="\n",er="\t",tr=" ",rr=3,nr={};nr["="]=1,nr["-"]=2;var ir="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ar="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",or={openCloseTag:new RegExp("^(?:"+ir+"|"+ar+")"),tag:new RegExp("^(?:"+ir+"|"+ar+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Za-z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)")},ur=or.openCloseTag,sr=function(e,t,r){var n,i,a,o,u,s,c,l=this.options.blocks,p=t.length,f=0,h=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+l.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ur.source+"\\s*$"),/^$/,!1]];for(;f<p&&((o=t.charAt(f))===cr||o===lr);)f++;if(t.charAt(f)!==fr)return;n=-1===(n=t.indexOf(pr,f+1))?p:n,i=t.slice(f,n),a=-1,u=h.length;for(;++a<u;)if(h[a][0].test(i)){s=h[a];break}if(!s)return;if(r)return s[2];if(f=n,!s[1].test(i))for(;f<p;){if(n=-1===(n=t.indexOf(pr,f+1))?p:n,i=t.slice(f+1,n),s[1].test(i)){i&&(f=n);break}f=n}return c=t.slice(0,f),e(c)({type:"html",value:c})},cr="\t",lr=" ",pr="\n",fr="<";var hr=function(e){return String(e).replace(/\s+/g," ")};var dr=function(e){return hr(e).toLowerCase()};var Dr=kr;kr.notInList=!0,kr.notInBlock=!0;var gr="\\",mr="\n",vr="\t",br=" ",yr="[",Er="]",Cr="^",Ar=":",wr=/^( {4}|\t)?/gm;function kr(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d,D=this.offset;if(this.options.footnotes){for(n=0,i=t.length,a="",o=e.now(),u=o.line;n<i&&(p=t.charAt(n),Re(p));)a+=p,n++;if(t.charAt(n)===yr&&t.charAt(n+1)===Cr){for(n=(a+=yr+Cr).length,c="";n<i&&(p=t.charAt(n))!==Er;)p===gr&&(c+=p,n++,p=t.charAt(n)),c+=p,n++;if(c&&t.charAt(n)===Er&&t.charAt(n+1)===Ar){if(r)return!0;for(f=dr(c),n=(a+=c+Er+Ar).length;n<i&&((p=t.charAt(n))===vr||p===br);)a+=p,n++;for(o.column+=a.length,o.offset+=a.length,c="",s="",l="";n<i;){if((p=t.charAt(n))===mr){for(l=p,n++;n<i&&(p=t.charAt(n))===mr;)l+=p,n++;for(c+=l,l="";n<i&&(p=t.charAt(n))===br;)l+=p,n++;if(0===l.length)break;c+=l}c&&(s+=c,c=""),s+=p,n++}return a+=s,s=s.replace(wr,(function(e){return D[u]=(D[u]||0)+e.length,u++,""})),h=e(a),d=this.enterBlock(),s=this.tokenizeBlock(s,o),d(),h({type:"footnoteDefinition",identifier:f,children:s})}}}}var Tr=$r;$r.notInList=!0,$r.notInBlock=!0;var _r='"',Sr="'",Fr="\\",xr="\n",qr="\t",Nr=" ",Lr="[",Br="]",Pr="(",Or=")",Rr=":",Ir="<",Ur=">";function $r(e,t,r){for(var n,i,a,o,u,s,c,l,p=this.options.commonmark,f=0,h=t.length,d="";f<h&&((o=t.charAt(f))===Nr||o===qr);)d+=o,f++;if((o=t.charAt(f))===Lr){for(f++,d+=o,a="";f<h&&(o=t.charAt(f))!==Br;)o===Fr&&(a+=o,f++,o=t.charAt(f)),a+=o,f++;if(a&&t.charAt(f)===Br&&t.charAt(f+1)===Rr){for(s=a,f=(d+=a+Br+Rr).length,a="";f<h&&((o=t.charAt(f))===qr||o===Nr||o===xr);)d+=o,f++;if(a="",n=d,(o=t.charAt(f))===Ir){for(f++;f<h&&Vr(o=t.charAt(f));)a+=o,f++;if((o=t.charAt(f))===Vr.delimiter)d+=Ir+a+o,f++;else{if(p)return;f-=a.length+1,a=""}}if(!a){for(;f<h&&Mr(o=t.charAt(f));)a+=o,f++;d+=a}if(a){for(c=a,a="";f<h&&((o=t.charAt(f))===qr||o===Nr||o===xr);)a+=o,f++;if(u=null,(o=t.charAt(f))===_r?u=_r:o===Sr?u=Sr:o===Pr&&(u=Or),u){if(!a)return;for(f=(d+=a+o).length,a="";f<h&&(o=t.charAt(f))!==u;){if(o===xr){if(f++,(o=t.charAt(f))===xr||o===u)return;a+=xr}a+=o,f++}if((o=t.charAt(f))!==u)return;i=d,d+=a+o,f++,l=a,a=""}else a="",f=d.length;for(;f<h&&((o=t.charAt(f))===qr||o===Nr);)d+=o,f++;return(o=t.charAt(f))&&o!==xr?void 0:!!r||(n=e(n).test().end,c=this.decode.raw(this.unescape(c),n,{nonTerminated:!1}),l&&(i=e(i).test().end,l=this.decode.raw(this.unescape(l),i)),e(d)({type:"definition",identifier:dr(s),title:l||null,url:c}))}}}}function Vr(e){return e!==Ur&&e!==Lr&&e!==Br}function Mr(e){return e!==Lr&&e!==Br&&!Re(e)}Vr.delimiter=Ur;var jr=function(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y,E,C,A,w,k,T;if(!this.options.gfm)return;n=0,y=0,s=t.length+1,c=[];for(;n<s;){if(w=t.indexOf(Yr,n),k=t.indexOf(Xr,n+1),-1===w&&(w=t.length),-1===k||k>w){if(y<Kr)return;break}c.push(t.slice(n,w)),y++,n=w+1}o=c.join(Yr),i=c.splice(1,1)[0]||[],n=0,s=i.length,y--,a=!1,h=[];for(;n<s;){if((p=i.charAt(n))===Xr){if(f=null,!1===a){if(!1===T)return}else h.push(a),a=!1;T=!1}else if(p===Hr)f=!0,a=a||nn;else if(p===Wr)a=a===en?tn:f&&a===nn?rn:en;else if(!Re(p))return;n++}!1!==a&&h.push(a);if(h.length<Jr)return;if(r)return!0;b=-1,C=[],A=e(o).reset({type:"table",align:h,children:C});for(;++b<y;){for(E=c[b],u={type:"tableRow",children:[]},b&&e(Yr),e(E).reset(u,A),s=E.length+1,n=0,l="",d="",D=!0,g=null,m=null;n<s;)if((p=E.charAt(n))!==Zr&&p!==Qr){if(""===p||p===Xr)if(D)e(p);else{if(p&&m){l+=p,n++;continue}!d&&!p||D||(o=d,l.length>1&&(p?(o+=l.slice(0,l.length-1),l=l.charAt(l.length-1)):(o+=l,l="")),v=e.now(),e(o)({type:"tableCell",children:this.tokenizeInline(d,v)},u)),e(l+p),l="",d=""}else if(l&&(d+=l,l=""),d+=p,p===zr&&n!==s-2&&(d+=E.charAt(n+1),n++),p===Gr){for(g=1;E.charAt(n+1)===p;)d+=p,n++,g++;m?g>=m&&(m=0):m=g}D=!1,n++}else d?l+=p:e(p),n++;b||e(Yr+i)}return A},zr="\\",Gr="`",Hr="-",Xr="|",Wr=":",Qr=" ",Yr="\n",Zr="\t",Jr=1,Kr=2,en="left",tn="center",rn="right",nn=null;var an=function(e,t,r){var n,i,a,o,u,s=this.options,c=s.commonmark,l=s.gfm,p=this.blockTokenizers,f=this.interruptParagraph,h=t.indexOf(on),d=t.length;for(;h<d;){if(-1===h){h=d;break}if(t.charAt(h+1)===on)break;if(c){for(o=0,n=h+1;n<d;){if((a=t.charAt(n))===un){o=cn;break}if(a!==sn)break;o++,n++}if(o>=cn){h=t.indexOf(on,h+1);continue}}if(i=t.slice(h+1),ot(f,p,this,[e,i,!0]))break;if(p.list.call(this,e,i,!0)&&(this.inList||c||l&&!q(at.left(i).charAt(0))))break;if(n=h,-1!==(h=t.indexOf(on,h+1))&&""===at(t.slice(n,h))){h=n;break}}if(i=t.slice(0,h),""===at(i))return e(i),null;if(r)return!0;return u=e.now(),i=ze(i),e(i)({type:"paragraph",children:this.tokenizeInline(i,u)})},on="\n",un="\t",sn=" ",cn=4;var ln=function(e,t){return e.indexOf("\\",t)};var pn=fn;function fn(e,t,r){var n,i;if("\\"===t.charAt(0)&&(n=t.charAt(1),-1!==this.escape.indexOf(n)))return!!r||(i="\n"===n?{type:"break"}:{type:"text",value:n},e("\\"+n)(i))}fn.locator=ln;var hn=function(e,t){return e.indexOf("<",t)};var dn=En;En.locator=hn,En.notInLink=!0;var Dn="<",gn=">",mn="@",vn="/",bn="mailto:",yn=bn.length;function En(e,t,r){var n,i,a,o,u,s,c,l,p,f,h;if(t.charAt(0)===Dn){for(this,n="",i=t.length,a=0,o="",s=!1,c="",a++,n=Dn;a<i&&(u=t.charAt(a),!(Re(u)||u===gn||u===mn||":"===u&&t.charAt(a+1)===vn));)o+=u,a++;if(o){if(c+=o,o="",c+=u=t.charAt(a),a++,u===mn)s=!0;else{if(":"!==u||t.charAt(a+1)!==vn)return;c+=vn,a++}for(;a<i&&(u=t.charAt(a),!Re(u)&&u!==gn);)o+=u,a++;if(u=t.charAt(a),o&&u===gn)return!!r||(p=c+=o,n+=c+u,(l=e.now()).column++,l.offset++,s&&(c.slice(0,yn).toLowerCase()===bn?(p=p.substr(yn),l.column+=yn,l.offset+=yn):c=bn+c),f=this.inlineTokenizers,this.inlineTokenizers={text:f.text},h=this.enterLink(),p=this.tokenizeInline(p,l),this.inlineTokenizers=f,h(),e(n)({type:"link",title:null,url:I(c,{nonTerminated:!1}),children:p}))}}}var Cn=function(e,t){var r,n=An.length,i=-1,a=-1;if(!this.options.gfm)return-1;for(;++i<n;)-1!==(r=e.indexOf(An[i],t))&&(r<a||-1===a)&&(a=r);return a},An=["https://","http://","mailto:"];var wn=Bn;Bn.locator=Cn,Bn.notInLink=!0;var kn="[",Tn="]",_n="(",Sn=")",Fn="<",xn="@",qn="mailto:",Nn=["http://","https://",qn],Ln=Nn.length;function Bn(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d;if(this.options.gfm){for(n="",o=-1,l=Ln;++o<l;)if(s=Nn[o],(c=t.slice(0,s.length)).toLowerCase()===s){n=c;break}if(n){for(o=n.length,l=t.length,p="",f=0;o<l&&(a=t.charAt(o),!Re(a)&&a!==Fn)&&("."!==a&&","!==a&&":"!==a&&";"!==a&&'"'!==a&&"'"!==a&&")"!==a&&"]"!==a||(h=t.charAt(o+1))&&!Re(h))&&(a!==_n&&a!==kn||f++,a!==Sn&&a!==Tn||!(--f<0));)p+=a,o++;if(p){if(i=n+=p,s===qn){if(-1===(u=p.indexOf(xn))||u===l-1)return;i=i.substr(qn.length)}return!!r||(d=this.enterLink(),i=this.tokenizeInline(i,e.now()),d(),e(n)({type:"link",title:null,url:I(n,{nonTerminated:!1}),children:i}))}}}}var Pn=or.tag,On=Un;Un.locator=hn;var Rn=/^<a /i,In=/^<\/a>/i;function Un(e,t,r){var n,i,a=t.length;if(!("<"!==t.charAt(0)||a<3)&&(n=t.charAt(1),(L(n)||"?"===n||"!"===n||"/"===n)&&(i=t.match(Pn))))return!!r||(i=i[0],!this.inLink&&Rn.test(i)?this.inLink=!0:this.inLink&&In.test(i)&&(this.inLink=!1),e(i)({type:"html",value:i}))}var $n=function(e,t){var r=e.indexOf("[",t),n=e.indexOf("![",t);if(-1===n)return r;return r<n?r:n};var Vn=Kn;Kn.locator=$n;var Mn={}.hasOwnProperty,jn="\\",zn="[",Gn="]",Hn="(",Xn=")",Wn="<",Qn=">",Yn="`",Zn={'"':'"',"'":"'"},Jn={};function Kn(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y,E,C="",A=0,w=t.charAt(0),k=this.options.pedantic,T=this.options.commonmark,_=this.options.gfm;if("!"===w&&(p=!0,C=w,w=t.charAt(++A)),w===zn&&(p||!this.inLink)){for(C+=w,m="",A++,d=t.length,g=0,(b=e.now()).column+=A,b.offset+=A;A<d;){if(s=w=t.charAt(A),w===Yn){for(i=1;t.charAt(A+1)===Yn;)s+=w,A++,i++;a?i>=a&&(a=0):a=i}else if(w===jn)A++,s+=t.charAt(A);else if(a&&!_||w!==zn){if((!a||_)&&w===Gn){if(!g){if(!k)for(;A<d&&(w=t.charAt(A+1),Re(w));)s+=w,A++;if(t.charAt(A+1)!==Hn)return;s+=Hn,n=!0,A++;break}g--}}else g++;m+=s,s="",A++}if(n){for(f=m,C+=m+s,A++;A<d&&(w=t.charAt(A),Re(w));)C+=w,A++;if(w=t.charAt(A),l=T?Jn:Zn,m="",o=C,w===Wn){for(A++,o+=Wn;A<d&&(w=t.charAt(A))!==Qn;){if(T&&"\n"===w)return;m+=w,A++}if(t.charAt(A)!==Qn)return;C+=Wn+m+Qn,v=m,A++}else{for(w=null,s="";A<d&&(w=t.charAt(A),!s||!Mn.call(l,w));){if(Re(w)){if(!k)break;s+=w}else{if(w===Hn)g++;else if(w===Xn){if(0===g)break;g--}m+=s,s="",w===jn&&(m+=jn,w=t.charAt(++A)),m+=w}A++}v=m,A=(C+=m).length}for(m="";A<d&&(w=t.charAt(A),Re(w));)m+=w,A++;if(w=t.charAt(A),C+=m,m&&Mn.call(l,w))if(A++,C+=w,m="",h=l[w],u=C,T){for(;A<d&&(w=t.charAt(A))!==h;)w===jn&&(m+=jn,w=t.charAt(++A)),A++,m+=w;if((w=t.charAt(A))!==h)return;for(D=m,C+=m+w,A++;A<d&&(w=t.charAt(A),Re(w));)C+=w,A++}else for(s="";A<d;){if((w=t.charAt(A))===h)c&&(m+=h+s,s=""),c=!0;else if(c){if(w===Xn){C+=m+h+s,D=m;break}Re(w)?s+=w:(m+=h+s+w,s="",c=!1)}else m+=w;A++}if(t.charAt(A)===Xn)return!!r||(C+=Xn,v=this.decode.raw(this.unescape(v),e(o).test().end,{nonTerminated:!1}),D&&(u=e(u).test().end,D=this.decode.raw(this.unescape(D),u)),E={type:p?"image":"link",title:D||null,url:v},p?E.alt=this.decode.raw(this.unescape(f),b)||null:(y=this.enterLink(),E.children=this.tokenizeInline(f,b),y()),e(C)(E))}}}Jn['"']='"',Jn["'"]="'",Jn[Hn]=Xn;var ei=pi;pi.locator=$n;var ti="link",ri="image",ni="footnote",ii="shortcut",ai="collapsed",oi="full",ui="^",si="\\",ci="[",li="]";function pi(e,t,r){var n,i,a,o,u,s,c,l,p=t.charAt(0),f=0,h=t.length,d="",D="",g=ti,m=ii;if("!"===p&&(g=ri,D=p,p=t.charAt(++f)),p===ci){if(f++,D+=p,s="",this.options.footnotes&&t.charAt(f)===ui){if(g===ri)return;D+=ui,f++,g=ni}for(l=0;f<h;){if((p=t.charAt(f))===ci)c=!0,l++;else if(p===li){if(!l)break;l--}p===si&&(s+=si,p=t.charAt(++f)),s+=p,f++}if(d=s,n=s,(p=t.charAt(f))===li){for(f++,d+=p,s="";f<h&&(p=t.charAt(f),Re(p));)s+=p,f++;if(p=t.charAt(f),g!==ni&&p===ci){for(i="",s+=p,f++;f<h&&(p=t.charAt(f))!==ci&&p!==li;)p===si&&(i+=si,p=t.charAt(++f)),i+=p,f++;(p=t.charAt(f))===li?(m=i?oi:ai,s+=i+p,f++):i="",d+=s,s=""}else{if(!n)return;i=n}if(m===oi||!c)return d=D+d,g===ti&&this.inLink?null:!!r||(g===ni&&-1!==n.indexOf(" ")?e(d)({type:"footnote",children:this.tokenizeInline(n,e.now())}):((a=e.now()).column+=D.length,a.offset+=D.length,o={type:g+"Reference",identifier:dr(i=m===oi?i:n)},g!==ti&&g!==ri||(o.referenceType=m),g===ti?(u=this.enterLink(),o.children=this.tokenizeInline(n,a),u()):g===ri&&(o.alt=this.decode.raw(this.unescape(n),a)||null),e(d)(o)))}}}var fi=function(e,t){var r=e.indexOf("**",t),n=e.indexOf("__",t);if(-1===n)return r;if(-1===r)return n;return n<r?n:r};var hi=gi;gi.locator=fi;var di="*",Di="_";function gi(e,t,r){var n,i,a,o,u,s,c,l=0,p=t.charAt(l);if(!(p!==di&&p!==Di||t.charAt(++l)!==p||(i=this.options.pedantic,u=(a=p)+a,s=t.length,l++,o="",p="",i&&Re(t.charAt(l)))))for(;l<s;){if(c=p,!((p=t.charAt(l))!==a||t.charAt(l+1)!==a||i&&Re(c))&&(p=t.charAt(l+2))!==a){if(!at(o))return;return!!r||((n=e.now()).column+=2,n.offset+=2,e(u+o+u)({type:"strong",children:this.tokenizeInline(o,n)}))}i||"\\"!==p||(o+=p,p=t.charAt(++l)),o+=p,l++}}var mi=function(e){return bi.test("number"==typeof e?vi(e):e.charAt(0))},vi=String.fromCharCode,bi=/\w/;var yi=function(e,t){var r=e.indexOf("*",t),n=e.indexOf("_",t);if(-1===n)return r;if(-1===r)return n;return n<r?n:r};var Ei=wi;wi.locator=yi;var Ci="*",Ai="_";function wi(e,t,r){var n,i,a,o,u,s,c,l=0,p=t.charAt(l);if(!(p!==Ci&&p!==Ai||(i=this.options.pedantic,u=p,a=p,s=t.length,l++,o="",p="",i&&Re(t.charAt(l)))))for(;l<s;){if(c=p,!((p=t.charAt(l))!==a||i&&Re(c))){if((p=t.charAt(++l))!==a){if(!at(o)||c===a)return;if(!i&&a===Ai&&mi(p)){o+=a;continue}return!!r||((n=e.now()).column++,n.offset++,e(u+o+a)({type:"emphasis",children:this.tokenizeInline(o,n)}))}o+=a}i||"\\"!==p||(o+=p,p=t.charAt(++l)),o+=p,l++}}var ki=function(e,t){return e.indexOf("~~",t)};var Ti=Fi;Fi.locator=ki;var _i="~",Si="~~";function Fi(e,t,r){var n,i,a,o="",u="",s="",c="";if(this.options.gfm&&t.charAt(0)===_i&&t.charAt(1)===_i&&!Re(t.charAt(2)))for(n=1,i=t.length,(a=e.now()).column+=2,a.offset+=2;++n<i;){if(!((o=t.charAt(n))!==_i||u!==_i||s&&Re(s)))return!!r||e(Si+c+Si)({type:"delete",children:this.tokenizeInline(c,a)});c+=u,s=u,u=o}}var xi=function(e,t){return e.indexOf("`",t)};var qi=Li;Li.locator=xi;var Ni="`";function Li(e,t,r){for(var n,i,a,o,u,s,c,l,p=t.length,f=0,h="",d="";f<p&&t.charAt(f)===Ni;)h+=Ni,f++;if(h){for(u=h,o=f,h="",l=t.charAt(f),a=0;f<p;){if(s=l,l=t.charAt(f+1),s===Ni?(a++,d+=s):(a=0,h+=s),a&&l!==Ni){if(a===o){u+=h+d,c=!0;break}h+=d,d=""}f++}if(!c){if(o%2!=0)return;h=""}if(r)return!0;for(n="",i="",p=h.length,f=-1;++f<p;)s=h.charAt(f),Re(s)?i+=s:(i&&(n&&(n+=i),i=""),n+=s);return e(u)({type:"inlineCode",value:n})}}var Bi=function(e,t){var r=e.indexOf("\n",t);for(;r>t&&" "===e.charAt(r-1);)r--;return r};var Pi=Ri;Ri.locator=Bi;var Oi=2;function Ri(e,t,r){for(var n,i=t.length,a=-1,o="";++a<i;){if("\n"===(n=t.charAt(a))){if(a<Oi)return;return!!r||e(o+=n)({type:"break"})}if(" "!==n)return;o+=n}}var Ii=function(e,t,r){var n,i,a,o,u,s,c,l,p,f;if(r)return!0;n=this.inlineMethods,o=n.length,i=this.inlineTokenizers,a=-1,p=t.length;for(;++a<o;)"text"!==(l=n[a])&&i[l]&&((c=i[l].locator)||e.file.fail("Missing locator: `"+l+"`"),-1!==(s=c.call(this,t,1))&&s<p&&(p=s));u=t.slice(0,p),f=e.now(),this.decode(u,f,(function(t,r,n){e(n||t)({type:"text",value:t})}))};var Ui=$i;function $i(e,t){this.file=t,this.offset={},this.options=p(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=C(t).toOffset,this.unescape=k(this,"escape"),this.decode=be(this)}var Vi=$i.prototype;function Mi(e){var t,r=[];for(t in e)r.push(t);return r}Vi.setOptions=Fe,Vi.parse=Be,Vi.options=Se,Vi.exitStart=E("atStart",!0),Vi.enterList=E("inList",!1),Vi.enterLink=E("inLink",!1),Vi.enterBlock=E("inBlock",!1),Vi.interruptParagraph=[["thematicBreak"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Vi.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Vi.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],Vi.blockTokenizers={newline:$e,indentedCode:He,fencedCode:Ze,blockquote:ut,atxHeading:ft,thematicBreak:vt,list:Nt,setextHeading:Jt,html:sr,footnote:Dr,definition:Tr,table:jr,paragraph:an},Vi.inlineTokenizers={escape:pn,autoLink:dn,url:wn,html:On,link:Vn,reference:ei,strong:hi,emphasis:Ei,deletion:Ti,code:qi,break:Pi,text:Ii},Vi.blockMethods=Mi(Vi.blockTokenizers),Vi.inlineMethods=Mi(Vi.inlineTokenizers),Vi.tokenizeBlock=ye("block"),Vi.tokenizeInline=ye("inline"),Vi.tokenizeFactory=ye;var ji=zi;function zi(e){var t=y(Ui);t.prototype.options=p(t.prototype.options,this.data("settings"),e),this.Parser=t}zi.Parser=Ui;var Gi=Object.prototype.hasOwnProperty,Hi=Object.prototype.toString,Xi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Qi=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hi.call(e)},Yi=function(e){if(!e||"[object Object]"!==Hi.call(e))return!1;var t,r=Gi.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Gi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Gi.call(e,t)},Zi=function(e,t){Xi&&"__proto__"===t.name?Xi(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ji=function(e,t){if("__proto__"===t){if(!Gi.call(e,t))return;if(Wi)return Wi(e,t).value}return e[t]},Ki=function e(){var r,n,i,a,o,u,s=arguments[0],c=1,l=arguments.length,p=!1;for("boolean"==typeof s&&(p=s,s=arguments[1]||{},c=2),(null==s||"object"!==t(s)&&"function"!=typeof s)&&(s={});c<l;++c)if(null!=(r=arguments[c]))for(n in r)i=Ji(s,n),s!==(a=Ji(r,n))&&(p&&a&&(Yi(a)||(o=Qi(a)))?(o?(o=!1,u=i&&Qi(i)?i:[]):u=i&&Yi(i)?i:{},Zi(s,{name:n,newValue:e(p,u,a)})):void 0!==a&&Zi(s,{name:n,newValue:a}));return s},ea=function(e){if(e)throw e};var ta={}.hasOwnProperty,ra=function(e){if(!e||"object"!==t(e))return"";if(ta.call(e,"position")||ta.call(e,"type"))return ia(e.position);if(ta.call(e,"start")||ta.call(e,"end"))return ia(e);if(ta.call(e,"line")||ta.call(e,"column"))return na(e);return""};function na(e){return e&&"object"===t(e)||(e={}),aa(e.line)+":"+aa(e.column)}function ia(e){return e&&"object"===t(e)||(e={}),na(e.start)+"-"+na(e.end)}function aa(e){return e&&"number"==typeof e?e:1}var oa=ca;function ua(){}ua.prototype=Error.prototype,ca.prototype=new ua;var sa=ca.prototype;function ca(e,t,r){var n,i,a;"string"==typeof t&&(r=t,t=null),n=function(e){var t,r=[null,null];"string"==typeof e&&(-1===(t=e.indexOf(":"))?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1)));return r}(r),i=ra(t)||"1:1",a={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(a=t,t=t.start):a.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=i,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=a,this.source=n[0],this.ruleId=n[1]}sa.file="",sa.name="",sa.reason="",sa.message="",sa.stack="",sa.fatal=null,sa.column=null,sa.line=null;var la="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function pa(){throw new Error("setTimeout has not been defined")}function fa(){throw new Error("clearTimeout has not been defined")}var ha=pa,da=fa;function Da(e){if(ha===setTimeout)return setTimeout(e,0);if((ha===pa||!ha)&&setTimeout)return ha=setTimeout,setTimeout(e,0);try{return ha(e,0)}catch(t){try{return ha.call(null,e,0)}catch(t){return ha.call(this,e,0)}}}"function"==typeof la.setTimeout&&(ha=setTimeout),"function"==typeof la.clearTimeout&&(da=clearTimeout);var ga,ma=[],va=!1,ba=-1;function ya(){va&&ga&&(va=!1,ga.length?ma=ga.concat(ma):ba=-1,ma.length&&Ea())}function Ea(){if(!va){var e=Da(ya);va=!0;for(var t=ma.length;t;){for(ga=ma,ma=[];++ba<t;)ga&&ga[ba].run();ba=-1,t=ma.length}ga=null,va=!1,function(e){if(da===clearTimeout)return clearTimeout(e);if((da===fa||!da)&&clearTimeout)return da=clearTimeout,clearTimeout(e);try{da(e)}catch(t){try{return da.call(null,e)}catch(t){return da.call(this,e)}}}(e)}}function Ca(e,t){this.fun=e,this.array=t}Ca.prototype.run=function(){this.fun.apply(null,this.array)};function Aa(){}var wa=Aa,ka=Aa,Ta=Aa,_a=Aa,Sa=Aa,Fa=Aa,xa=Aa;var qa=la.performance||{},Na=qa.now||qa.mozNow||qa.msNow||qa.oNow||qa.webkitNow||function(){return(new Date).getTime()};var La=new Date;var Ba={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];ma.push(new Ca(e,t)),1!==ma.length||va||Da(Ea)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:wa,addListener:ka,once:Ta,off:_a,removeListener:Sa,removeAllListeners:Fa,emit:xa,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Na.call(qa),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-La)/1e3}};var Pa=D(Object.freeze({__proto__:null,extname:function(e){var t=e.lastIndexOf(".");return-1===t?"":e.slice(t)}}));var Oa=function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r=Pa.basename(e,Pa.extname(e))+t;return Pa.join(Pa.dirname(e),r)},Ra=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},Ia=Ma,Ua={}.hasOwnProperty,$a=Ma.prototype,Va=["history","path","basename","stem","extname","dirname"];
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */function Ma(e){var t,r,n;if(e){if("string"==typeof e||Ra(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof Ma))return new Ma(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Ba.cwd(),r=-1,n=Va.length;++r<n;)t=Va[r],Ua.call(e,t)&&(this[t]=e[t]);for(t in e)-1===Va.indexOf(t)&&(this[t]=e[t])}function ja(e,t){if(-1!==e.indexOf(Pa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pa.sep+"`")}function za(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ga(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}$a.toString=function(e){var t=this.contents||"";return Ra(t)?t.toString(e):String(t)},Object.defineProperty($a,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){za(e,"path"),e!==this.path&&this.history.push(e)}}),Object.defineProperty($a,"dirname",{get:function(){return"string"==typeof this.path?Pa.dirname(this.path):void 0},set:function(e){Ga(this.path,"dirname"),this.path=Pa.join(e||"",this.basename)}}),Object.defineProperty($a,"basename",{get:function(){return"string"==typeof this.path?Pa.basename(this.path):void 0},set:function(e){za(e,"basename"),ja(e,"basename"),this.path=Pa.join(this.dirname||"",e)}}),Object.defineProperty($a,"extname",{get:function(){return"string"==typeof this.path?Pa.extname(this.path):void 0},set:function(e){var t=e||"";if(ja(t,"extname"),Ga(this.path,"extname"),t){if("."!==t.charAt(0))throw new Error("`extname` must start with `.`");if(-1!==t.indexOf(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Oa(this.path,t)}}),Object.defineProperty($a,"stem",{get:function(){return"string"==typeof this.path?Pa.basename(this.path,this.extname):void 0},set:function(e){za(e,"stem"),ja(e,"stem"),this.path=Pa.join(this.dirname||"",e+(this.extname||""))}});var Ha=Ia,Xa=Ia.prototype;Xa.message=function(e,t,r){var n=this.path,i=new oa(e,t,r);n&&(i.name=n+":"+i.name,i.file=n);return i.fatal=!1,this.messages.push(i),i},Xa.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},Xa.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e};var Wa=function(){var e=[],t={};return t.run=function(){var t=-1,r=Qa.call(arguments,0,-1),n=arguments[arguments.length-1];if("function"!=typeof n)throw new Error("Expected function as last argument, not "+n);(function i(a){var o=e[++t],u=Qa.call(arguments,0).slice(1),s=r.length,c=-1;if(a)n(a);else{for(;++c<s;)null!==u[c]&&void 0!==u[c]||(u[c]=r[c]);r=u,o?function(e,t){var r;return function(){var t,a=Qa.call(arguments,0),o=e.length>a.length;o&&a.push(n);try{t=e.apply(null,a)}catch(e){if(o&&r)throw e;return n(e)}o||(t&&"function"==typeof t.then?t.then(i,n):t instanceof Error?n(t):i(t))};function n(){r||(r=!0,t.apply(null,arguments))}function i(e){n(null,e)}}(o,i).apply(null,r):n.apply(null,[null].concat(r))}}).apply(null,[null].concat(r))},t.use=function(r){if("function"!=typeof r)throw new Error("Expected `fn` to be a function, not "+r);return e.push(r),t},t},Qa=[].slice;var Ya=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},Za=function e(){var r=[];var n=Wa();var i={};var a=!1;var o=-1;u.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(io("data",a),i[e]=t,u):Ka.call(i,e)&&i[e]||null;if(e)return io("data",a),i=e,u;return i};u.freeze=s;u.attachers=r;u.use=function(e){var n;if(io("use",a),null==e);else if("function"==typeof e)l.apply(null,arguments);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):o(e)}n&&(i.settings=Ki(i.settings||{},n));return u;function o(e){c(e.plugins),e.settings&&(n=Ki(n||{},e.settings))}function s(e){if("function"==typeof e)l(e);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):o(e)}}function c(e){var r,n;if(null==e);else{if(!("object"===t(e)&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(r=e.length,n=-1;++n<r;)s(e[n])}}function l(e,t){var n=function(e){var t,n=r.length,i=-1;for(;++i<n;)if((t=r[i])[0]===e)return t}(e);n?(Ya(n[1])&&Ya(t)&&(t=Ki(n[1],t)),n[1]=t):r.push(Ja.call(arguments))}};u.parse=function(e){var t,r=Ha(e);if(s(),ro("parse",t=u.Parser),to(t,"parse"))return new t(String(r),r).parse();return t(String(r),r)};u.stringify=function(e,t){var r,n=Ha(t);if(s(),no("stringify",r=u.Compiler),ao(e),to(r,"compile"))return new r(e,n).compile();return r(e,n)};u.run=c;u.runSync=function(e,t){var r,n=!1;return c(e,t,(function(e,t){n=!0,ea(e),r=t})),oo("runSync","run",n),r};u.process=l;u.processSync=function(e){var t,r=!1;return s(),ro("processSync",u.Parser),no("processSync",u.Compiler),l(t=Ha(e),(function(e){r=!0,ea(e)})),oo("processSync","process",r),t};return u;function u(){for(var t=e(),n=r.length,a=-1;++a<n;)t.use.apply(null,r[a]);return t.data(Ki(!0,{},i)),t}function s(){var e,t,i,s;if(a)return u;for(;++o<r.length;)t=(e=r[o])[0],null,!1!==(i=e[1])&&(!0===i&&(e[1]=void 0),"function"==typeof(s=t.apply(u,e.slice(1)))&&n.use(s));return a=!0,o=1/0,u}function c(e,t,r){if(ao(e),s(),r||"function"!=typeof t||(r=t,t=null),!r)return new Promise(i);function i(i,a){n.run(e,Ha(t),(function(t,n,o){n=n||e,t?a(t):i?i(n):r(null,n,o)}))}i(null,r)}function l(e,t){if(s(),ro("process",u.Parser),no("process",u.Compiler),!t)return new Promise(r);function r(r,n){var i=Ha(e);eo.run(u,{file:i},(function(e){e?n(e):r?r(i):t(null,i)}))}r(null,t)}}().freeze(),Ja=[].slice,Ka={}.hasOwnProperty,eo=Wa().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,r){e.run(t.tree,t.file,(function(e,n,i){e?r(e):(t.tree=n,t.file=i,r())}))})).use((function(e,t){t.file.contents=e.stringify(t.tree,t.file)}));function to(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function ro(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function no(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function io(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function ao(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function oo(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}var uo=/[|\\{}()[\]^$+*?.]/g,so=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(uo,"\\$&")},co={"---":"yaml","+++":"toml"};var lo=function(e){var t=Object.keys(co).map(so).join("|"),r=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===r)return{frontMatter:null,content:e};var n=r[0].replace(/\n$/,""),i=r[1],a=r[2];return{frontMatter:{type:co[i],value:a,raw:n},content:r[0].replace(/[^\n]/g," ")+e.slice(r[0].length)}},po=["format","prettier"];function fo(e){var t="@(".concat(po.join("|"),")"),r=new RegExp(["\x3c!--\\s*".concat(t,"\\s*--\x3e"),"\x3c!--.*\r?\n[\\s\\S]*(^|\n)[^\\S\n]*".concat(t,"[^\\S\n]*($|\n)[\\s\\S]*\n.*--\x3e")].join("|"),"m"),n=e.match(r);return n&&0===n.index}var ho={startWithPragma:fo,hasPragma:function(e){return fo(lo(e).content.trimLeft())},insertPragma:function(e){var t=lo(e),r="\x3c!-- @".concat(po[0]," --\x3e");return t.frontMatter?"".concat(t.frontMatter.raw,"\n\n").concat(r,"\n\n").concat(t.content):"".concat(r,"\n\n").concat(t.content)}},Do="[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]",go="[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]",mo="[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]",vo=function(e){return"string"==typeof e?e.replace(function(e){e=Object.assign({onlyFirst:!1},e);var t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}(),""):e},bo=vo,yo=vo;bo.default=yo;var Eo=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))},Co=Eo,Ao=Eo;Co.default=Ao;var wo=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=bo(e);for(var t=0,r=0;r<e.length;r++){var n=e.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=Co(n)?2:1))}return t},ko=wo,To=wo;ko.default=To;function _o(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o<a;){var u=t.charAt(o);if(e instanceof RegExp){if(!e.test(u))return o}else if(-1===e.indexOf(u))return o;i?o--:o++}return(-1===o||o===a)&&o}}_o(/\s/),_o(" \t"),_o(",; \t"),_o(/[^\r\n]/);var So={};[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){So[e]=t}))}));var Fo=Do,xo=go,qo=mo,No=function(e){return e.length>0?e[e.length-1]:null},Lo=["liquidNode","inlineCode","emphasis","strong","delete","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"],Bo=Lo.concat(["tableCell","paragraph","heading"]),Po=new RegExp(xo),Oo=new RegExp(qo);var Ro={mapAst:function(e,t){return function e(r,n,i){var a=t(r,n,i=i||[]);return Array.isArray(a)?a:((a=Object.assign({},a)).children&&(a.children=a.children.reduce((function(t,r,n){var o=e(r,n,[a].concat(i));return Array.isArray(o)||(o=[o]),t.push.apply(t,o),t}),[])),a)}(e,null,null)},splitText:function(e,t){var r="non-cjk",n="cj-letter",i="cjk-punctuation",a=[];return("preserve"===t.proseWrap?e:e.replace(new RegExp("(".concat(Fo,")\n(").concat(Fo,")"),"g"),"$1$2")).split(/([ \t\n]+)/).forEach((function(e,t,u){t%2!=1?(0!==t&&t!==u.length-1||""!==e)&&e.split(new RegExp("(".concat(Fo,")"))).forEach((function(e,t,a){(0!==t&&t!==a.length-1||""!==e)&&(t%2!=0?o(Oo.test(e)?{type:"word",value:e,kind:i,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:e,kind:Po.test(e)?"k-letter":n,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==e&&o({type:"word",value:e,kind:r,hasLeadingPunctuation:Oo.test(e[0]),hasTrailingPunctuation:Oo.test(No(e))}))})):a.push({type:"whitespace",value:/\n/.test(e)?"\n":" "})})),a;function o(e){var t,o,u=No(a);u&&"word"===u.type&&(u.kind===r&&e.kind===n&&!u.hasTrailingPunctuation||u.kind===n&&e.kind===r&&!e.hasLeadingPunctuation?a.push({type:"whitespace",value:" "}):(t=r,o=i,u.kind===t&&e.kind===o||u.kind===o&&e.kind===t||[u.value,e.value].some((function(e){return/\u3000/.test(e)}))||a.push({type:"whitespace",value:""}))),a.push(e)}},punctuationPattern:qo,getFencedCodeBlockValue:function(e,t){var r=t.slice(e.position.start.offset,e.position.end.offset),n=r.match(/^\s*/)[0].length,i=new RegExp("^\\s{0,".concat(n,"}")),a=r.split("\n"),o=r[n],u=r.slice(n).match(new RegExp("^[".concat(o,"]+")))[0],s=new RegExp("^\\s{0,3}".concat(u)).test(a[a.length-1].slice(c(a.length-1)));return a.slice(1,s?-1:void 0).map((function(e,t){return e.slice(c(t+1)).replace(i,"")})).join("\n");function c(t){return e.position.indent[t-1]-1}},getOrderedListItemInfo:function(e,t){var r=l(t.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),4);return{numberText:r[1],marker:r[2],leadingSpaces:r[3]}},INLINE_NODE_TYPES:Lo,INLINE_NODE_WRAPPER_TYPES:Bo},Io=/^import\s/,Uo=/^export\s/,$o=function(e){return Io.test(e)},Vo=function(e){return Uo.test(e)},Mo=function(e,t){var r=t.indexOf("\n\n"),n=t.slice(0,r);if(Vo(n)||$o(n))return e(n)({type:Vo(n)?"export":"import",value:n})};Mo.locator=function(e){return Vo(e)||$o(e)?-1:1};var jo={esSyntax:function(){var e=this.Parser,t=e.prototype.blockTokenizers,r=e.prototype.blockMethods;t.esSyntax=Mo,r.splice(r.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z\\.]*(\\.){0,1}[a-z][a-z0-9\\.]*",COMMENT_REGEX:"\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e"};function zo(e,t){return e.indexOf("$",t)}var Go=/^\\\$/,Ho=/^\$((?:\\\$|[^$])+)\$/,Xo=/^\$\$((?:\\\$|[^$])+)\$\$/,Wo=function(e){function t(t,r,n){var i=!0,a=Xo.exec(r);a||(a=Ho.exec(r),i=!1);var o=Go.exec(r);if(o)return!!n||t(o[0])({type:"text",value:"$"});if("\\$"===r.slice(-2))return t(r)({type:"text",value:r.slice(0,-2)+"$"});if(a){if(n)return!0;if(a[0].includes("`")&&r.slice(a[0].length).includes("`")){var u=r.slice(0,r.indexOf("`"));return t(u)({type:"text",value:u})}var s=a[1].trim();return t(a[0])({type:"inlineMath",value:s,data:{hName:"span",hProperties:{className:"inlineMath"+(i&&e.inlineMathDouble?" inlineMathDouble":"")},hChildren:[{type:"text",value:s}]}})}}t.locator=zo;var r=this.Parser,n=r.prototype.inlineTokenizers,i=r.prototype.inlineMethods;n.math=t,i.splice(i.indexOf("text"),0,"math");var a=this.Compiler;null!=a&&(a.prototype.visitors.inlineMath=function(e){return"$"+e.value+"$"})},Qo="\n",Yo="\t",Zo=" ",Jo="$",Ko=2,eu=4,tu=function(e){var t=this.Parser,r=t.prototype.blockTokenizers,n=t.prototype.blockMethods;r.math=function(e,t,r){for(var n,i,a,o,u,s,c,l,p,f,h=t.length+1,d=0,D="";d<h&&((a=t.charAt(d))===Zo||a===Yo);)D+=a,d++;if(p=d,(a=t.charAt(d))===Jo){for(d++,i=a,n=1,D+=a;d<h&&(a=t.charAt(d))===i;)D+=a,n++,d++;if(!(n<Ko)){for(;d<h&&(a=t.charAt(d))!==Qo;){if(a===Jo)return;D+=a,d++}if(a=t.charAt(d),r)return!0;for((f=e.now()).column+=D.length,f.offset+=D.length,o=c=l=u=s="";d<h;)if(u+=c,s+=l,c=l="",(a=t.charAt(d))===Qo){for(u?(c+=a,l+=a):D+=a,o="",d++;d<h&&(a=t.charAt(d))===Zo;)o+=a,d++;if(c+=o,l+=o.slice(p),!(o.length>=eu)){for(o="";d<h&&(a=t.charAt(d))===i;)o+=a,d++;if(c+=o,l+=o,!(o.length<n)){for(o="";d<h&&(a=t.charAt(d))!==Qo;)c+=a,l+=a,d++;break}}}else u+=a,l+=a,d++;D+=u+c;var g=ze(s);return e(D)({type:"math",value:g,data:{hName:"div",hProperties:{className:"math"},hChildren:[{type:"text",value:g}]}})}}},n.splice(n.indexOf("fencedCode")+1,0,"math");var i=t.prototype.interruptParagraph,a=t.prototype.interruptList,o=t.prototype.interruptBlockquote;i.splice(i.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),o.splice(o.indexOf("fencedCode")+1,0,["math"]);var u=this.Compiler;null!=u&&(u.prototype.visitors.math=function(e){return"$$\n"+e.value+"\n$$"})},ru=function(e){null==e&&(e={}),tu.call(this,e),Wo.call(this,e)},nu={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},iu="inline",au={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},ou="normal",uu=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]}),su=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],cu=["title"],lu=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],pu=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],fu=["autoplay","controls","crossorigin","loop","muted","preload","src"],hu=["href","target"],du=["color","face","size"],Du=["dir"],gu=["cite"],mu=["alink","background","bgcolor","link","text","vlink"],vu=["clear"],bu=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],yu=["height","width"],Eu=["align"],Cu=["align","char","charoff","span","valign","width"],Au=["align","char","charoff","span","valign","width"],wu=["value"],ku=["cite","datetime"],Tu=["open"],_u=["title"],Su=["open"],Fu=["compact"],xu=["align"],qu=["compact"],Nu=["height","src","type","width"],Lu=["disabled","form","name"],Bu=["color","face","size"],Pu=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],Ou=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],Ru=["cols","rows"],Iu=["align"],Uu=["align"],$u=["align"],Vu=["align"],Mu=["align"],ju=["align"],zu=["profile"],Gu=["align","noshade","size","width"],Hu=["manifest","version"],Xu=["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],Wu=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],Qu=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],Yu=["cite","datetime"],Zu=["prompt"],Ju=["accesskey","for","form"],Ku=["accesskey","align"],es=["type","value"],ts=["as","charset","color","crossorigin","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],rs=["name"],ns=["compact"],is=["charset","content","http-equiv","name","scheme"],as=["high","low","max","min","optimum","value"],os=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],us=["compact","reversed","start","type"],ss=["disabled","label"],cs=["disabled","label","selected","value"],ls=["for","form","name"],ps=["align"],fs=["name","type","value","valuetype"],hs=["width"],ds=["max","value"],Ds=["cite"],gs=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],ms=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],vs=["name"],bs=["media","sizes","src","srcset","type"],ys=["media","nonce","title","type"],Es=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],Cs=["align","char","charoff","valign"],As=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],ws=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],ks=["align","char","charoff","valign"],Ts=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],_s=["align","char","charoff","valign"],Ss=["datetime"],Fs=["align","bgcolor","char","charoff","valign"],xs=["default","kind","label","src","srclang"],qs=["compact","type"],Ns=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],Ls={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:su,abbr:cu,applet:lu,area:pu,audio:fu,base:hu,basefont:du,bdo:Du,blockquote:gu,body:mu,br:vu,button:bu,canvas:yu,caption:Eu,col:Cu,colgroup:Au,data:wu,del:ku,details:Tu,dfn:_u,dialog:Su,dir:Fu,div:xu,dl:qu,embed:Nu,fieldset:Lu,font:Bu,form:Pu,frame:Ou,frameset:Ru,h1:Iu,h2:Uu,h3:$u,h4:Vu,h5:Mu,h6:ju,head:zu,hr:Gu,html:Hu,iframe:Xu,img:Wu,input:Qu,ins:Yu,isindex:Zu,label:Ju,legend:Ku,li:es,link:ts,map:rs,menu:ns,meta:is,meter:as,object:os,ol:us,optgroup:ss,option:cs,output:ls,p:ps,param:fs,pre:hs,progress:ds,q:Ds,script:gs,select:ms,slot:vs,source:bs,style:ys,table:Es,tbody:Cs,td:As,textarea:ws,tfoot:ks,th:Ts,thead:_s,time:Ss,tr:Fs,track:xs,ul:qs,video:Ns},Bs=Object.freeze({__proto__:null,a:su,abbr:cu,applet:lu,area:pu,audio:fu,base:hu,basefont:du,bdo:Du,blockquote:gu,body:mu,br:vu,button:bu,canvas:yu,caption:Eu,col:Cu,colgroup:Au,data:wu,del:ku,details:Tu,dfn:_u,dialog:Su,dir:Fu,div:xu,dl:qu,embed:Nu,fieldset:Lu,font:Bu,form:Pu,frame:Ou,frameset:Ru,h1:Iu,h2:Uu,h3:$u,h4:Vu,h5:Mu,h6:ju,head:zu,hr:Gu,html:Hu,iframe:Xu,img:Wu,input:Qu,ins:Yu,isindex:Zu,label:Ju,legend:Ku,li:es,link:ts,map:rs,menu:ns,meta:is,meter:as,object:os,ol:us,optgroup:ss,option:cs,output:ls,p:ps,param:fs,pre:hs,progress:ds,q:Ds,script:gs,select:ms,slot:vs,source:bs,style:ys,table:Es,tbody:Cs,td:As,textarea:ws,tfoot:ks,th:Ts,thead:_s,time:Ss,tr:Fs,track:xs,ul:qs,video:Ns,default:Ls}),Ps=D(uu),Os=D(Bs),Rs=nu,Is=iu,Us=au,$s=ou,Vs=Ms(Ps);function Ms(e){var t=Object.create(null),r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){t[a.value]=!0}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return t}function js(e,t){return!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||("vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&-1===["template","style","script","html"].indexOf(e.fullName)||!(!rc(e)||!e.children.some((function(e){return"text"!==e.type&&"interpolation"!==e.type}))))))}function zs(e){return"attribute"!==e.type&&!Gs(e)&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))}function Gs(e){return"text"===e.type||"comment"===e.type}function Hs(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName)}function Xs(e){return"yaml"===e.type||"toml"===e.type}function Ws(e){return nc(e).startsWith("pre")}function Qs(e){return"element"===e.type&&0!==e.children.length&&(-1!==["html","head","ul","ol","select"].indexOf(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function Ys(e){return ec(e)||"element"===e.type&&"br"===e.fullName||Zs(e)}function Zs(e){return Js(e)&&Ks(e)}function Js(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:"root"===e.parent.type||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function Ks(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function ec(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return-1!==["script","select"].indexOf(e.name)}return!1}function tc(e){return"block"===e||"list-item"===e||e.startsWith("table")}function rc(e){return nc(e).startsWith("pre")}function nc(e){return"element"===e.type&&!e.namespace&&Us[e.name]||$s}var ic={HTML_ELEMENT_ATTRIBUTES:function(e,t){for(var r=Object.create(null),n=0,i=Object.keys(e);n<i.length;n++){var a=i[n];r[a]=t(e[a],a)}return r}(Os,Ms),HTML_TAGS:Vs,canHaveInterpolation:function(e){return e.children&&!Hs(e)},countChars:function(e,t){for(var r=0,n=0;n<e.length;n++)e[n]===t&&r++;return r},countParents:function(e){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=0,i=e.stack.length-1;i>=0;i--){var a=e.stack[i];a&&"object"===t(a)&&!Array.isArray(a)&&r(a)&&n++}return n},dedentString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t=1/0,r=!0,n=!1,i=void 0;try{for(var a,o=e.split("\n")[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var u=a.value;if(0!==u.length){if(/\S/.test(u[0]))return 0;var s=u.match(/^\s*/)[0].length;u.length!==s&&s<t&&(t=s)}}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return t===1/0?0:t}(e);return 0===t?e:e.split("\n").map((function(e){return e.slice(t)})).join("\n")},forceBreakChildren:Qs,forceBreakContent:function(e){return Qs(e)||"element"===e.type&&0!==e.children.length&&(-1!==["body","script","style"].indexOf(e.name)||e.children.some((function(e){return function(e){return e.children&&e.children.some((function(e){return"text"!==e.type}))}(e)})))||e.firstChild&&e.firstChild===e.lastChild&&Js(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||Ks(e.lastChild))},forceNextEmptyLine:function(e){return Xs(e)||e.next&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){var r=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(r)return r[1]}var n=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){for(var r=e;r;){if(t(r))return!0;r=r.parent}return!1}(e,(function(e){return"svg:foreignObject"===e.fullName})))return"svg"===e.name?"inline-block":"block";n=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||n)&&Rs[e.name]||Is}},getNodeCssStyleWhiteSpace:nc,getPrettierIgnoreAttributeCommentData:function(e){var t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:zs,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type)return"babel";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown";if(e.attrMap.type.endsWith("json")||e.attrMap.type.endsWith("importmap"))return"json"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang||"css"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!tc(t=e.cssDisplay)&&"inline-block"!==t&&!Hs(e);var t},isFrontMatterNode:Xs,isIndentationSensitiveNode:Ws,isLeadingSpaceSensitiveNode:function(e){var t=function(){if(Xs(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(rc(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||Hs(e.parent)||(t=e.parent.cssDisplay,tc(t)||"inline-block"===t)))return!1;var t;if(e.prev&&!function(e){return!tc(e)}(e.prev.cssDisplay))return!1;return!0}();return t&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:t},isPreLikeNode:rc,isScriptLikeTag:Hs,isTextLikeNode:Gs,isTrailingSpaceSensitiveNode:function(e){return!Xs(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!rc(e.parent)||!(!e.next&&("root"===e.parent.type||Hs(e.parent)||(t=e.parent.cssDisplay,tc(t)||"inline-block"===t)))&&!(e.next&&!function(e){return!tc(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return Hs(e)||"interpolation"===e.type||Ws(e)},normalizeParts:function(e){for(var t=[],r=e.slice();0!==r.length;){var n=r.shift();n&&("concat"!==n.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof n?t.push(n):t.push(t.pop()+n):Array.prototype.unshift.apply(r,n.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return ec(e)||e.prev&&Ys(e.prev)||Zs(e)},preferHardlineAsTrailingSpaces:Ys,shouldNotPrintClosingTag:function(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(zs(e)||js(e.parent,t))},shouldPreserveContent:js,unescapeQuoteEntities:function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"')}};var ac=function(e){return/^\s*<!--\s*@(format|prettier)\s*-->/.test(e)};var oc=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r},uc={attrs:!0,children:!0},sc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);for(var n=0,i=Object.keys(t);n<i.length;n++){var a=i[n],o=t[a];a in uc?this._setNodes(a,o):this[a]=o}}return i(e,[{key:"_setNodes",value:function(e,t){t!==this[e]&&(this[e]=lc(t,this),"attrs"===e&&pc(this,{attrMap:this[e].reduce((function(e,t){return e[t.fullName]=t.value,e}),Object.create(null))}))}},{key:"map",value:function(t){var r=null;for(var n in uc){var i=this[n];if(i){var a=cc(i,(function(e){return e.map(t)}));r!==i&&(r||(r=new e),r._setNodes(n,a))}}if(r){for(var o in this)o in uc||(r[o]=this[o]);pc(r,{index:this.index,siblings:this.siblings,prev:this.prev,next:this.next,parent:this.parent})}return t(r||this)}},{key:"clone",value:function(t){return new e(t?Object.assign({},this,t):this)}},{key:"firstChild",get:function(){return this.children&&0!==this.children.length?this.children[0]:null}},{key:"lastChild",get:function(){return this.children&&0!==this.children.length?this.children[this.children.length-1]:null}},{key:"rawName",get:function(){return this.hasExplicitNamespace?this.fullName:this.name}},{key:"fullName",get:function(){return this.namespace?this.namespace+":"+this.name:this.name}}]),e}();function cc(e,t){var r=e.map(t);return r.some((function(t,r){return t!==e[r]}))?r:e}function lc(e,t){for(var r=e.map((function(e){return e instanceof sc?e.clone():new sc(e)})),n=null,i=r[0],a=r[1]||null,o=0;o<r.length;o++)pc(i,{index:o,siblings:r,prev:n,next:a,parent:t}),n=i,i=a,a=r[o+2]||null;return r}function pc(e,t){var r=Object.keys(t).reduce((function(e,r){return e[r]={value:t[r],enumerable:!1},e}),{});Object.defineProperties(e,r)}var fc={Node:sc},hc=[[/^(\[if([^\]]*?)\]>)([\s\S]*?)<!\s*\[endif\]$/,function(e,t,r){var n=l(r,4),i=n[1],a=n[2],o=n[3],u="\x3c!--".length+i.length,s=e.sourceSpan.start.moveBy(u),c=s.moveBy(o.length),p=e.sourceSpan.constructor,f=l(function(){try{return[!0,t(o,s).children]}catch(e){return[!1,[{type:"text",value:o,sourceSpan:new p(s,c)}]]}}(),2),h=f[0],d=f[1];return{type:"ieConditionalComment",complete:h,children:d,condition:a.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new p(e.sourceSpan.start,s),endSourceSpan:new p(c,e.sourceSpan.end)}}],[/^\[if([^\]]*?)\]><!$/,function(e,t,r){return{type:"ieConditionalStartComment",condition:l(r,2)[1].trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan}}],[/^<!\s*\[endif\]$/,function(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}]];var dc=function(e,t){if(e.value){var r,n=!0,i=!1,a=void 0;try{for(var o,u=hc[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){var s=l(o.value,2),c=s[0],p=s[1];if(r=e.value.match(c))return p(e,t,r)}}catch(e){i=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}}return null},Dc=d((function(e,t){function r(e){if(":"!=e[0])return[null,e];var t=e.indexOf(":",1);if(-1==t)throw new Error('Unsupported format "'.concat(e,'" expecting ":namespace:name"'));return[e.slice(1,t),e.slice(t+1)]}
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(t.TagContentType||(t.TagContentType={})),t.splitNsName=r,t.isNgContainer=function(e){return"ng-container"===r(e)[1]},t.isNgContent=function(e){return"ng-content"===r(e)[1]},t.isNgTemplate=function(e){return"ng-template"===r(e)[1]},t.getNsPrefix=function(e){return null===e?null:r(e)[0]},t.mergeNsAndName=function(e,t){return e?":".concat(e,":").concat(t):t},t.NAMED_ENTITIES={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},t.NGSP_UNICODE="",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE}));h(Dc);Dc.TagContentType,Dc.splitNsName,Dc.isNgContainer,Dc.isNgContent,Dc.isNgTemplate,Dc.getNsPrefix,Dc.mergeNsAndName,Dc.NAMED_ENTITIES,Dc.NGSP_UNICODE;var gc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n,a,o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.closedByChildren,a=n.requiredParents,o=n.implicitNamespacePrefix,u=n.contentType,s=void 0===u?Dc.TagContentType.PARSABLE_DATA:u,c=n.closedByParent,l=void 0!==c&&c,p=n.isVoid,f=void 0!==p&&p,h=n.ignoreFirstLf,d=void 0!==h&&h;r(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=f,this.closedByParent=l||f,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach((function(e){return t.requiredParents[e]=!0}))),this.implicitNamespacePrefix=o||null,this.contentType=s,this.ignoreFirstLf=d}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();t.HtmlTagDefinition=o,t.getHtmlTagDefinition=function(e){return a||(n=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Dc.TagContentType.RAW_TEXT}),script:new o({contentType:Dc.TagContentType.RAW_TEXT}),title:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e]||n}}));h(gc);gc.HtmlTagDefinition,gc.getHtmlTagDefinition;var mc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(e,"' to be an array of strings."));for(var r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error("Expected '".concat(e,"' to be an array of strings."))}};var r=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var n=t[0],i=t[1];r.forEach((function(e){if(e.test(n)||e.test(i))throw new Error("['".concat(n,"', '").concat(i,"'] contains unusable interpolation symbol."))}))}}}));h(mc);mc.assertArrayOfStrings,mc.assertInterpolationSymbols;var vc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.start=t,this.end=n}return i(e,null,[{key:"fromArray",value:function(r){return r?(mc.assertInterpolationSymbols("interpolation",r),new e(r[0],r[1])):t.DEFAULT_INTERPOLATION_CONFIG}}]),e}();t.InterpolationConfig=n,t.DEFAULT_INTERPOLATION_CONFIG=new n("{{","}}")}));h(vc);vc.InterpolationConfig,vc.DEFAULT_INTERPOLATION_CONFIG;var bc=d((function(e,t){function r(e){return t.$0<=e&&e<=t.$9}
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=r,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||r(e)}}));h(bc);bc.$EOF,bc.$TAB,bc.$LF,bc.$VTAB,bc.$FF,bc.$CR,bc.$SPACE,bc.$BANG,bc.$DQ,bc.$HASH,bc.$$,bc.$PERCENT,bc.$AMPERSAND,bc.$SQ,bc.$LPAREN,bc.$RPAREN,bc.$STAR,bc.$PLUS,bc.$COMMA,bc.$MINUS,bc.$PERIOD,bc.$SLASH,bc.$COLON,bc.$SEMICOLON,bc.$LT,bc.$EQ,bc.$GT,bc.$QUESTION,bc.$0,bc.$9,bc.$A,bc.$E,bc.$F,bc.$X,bc.$Z,bc.$LBRACKET,bc.$BACKSLASH,bc.$RBRACKET,bc.$CARET,bc.$_,bc.$a,bc.$e,bc.$f,bc.$n,bc.$r,bc.$t,bc.$u,bc.$v,bc.$x,bc.$z,bc.$LBRACE,bc.$BAR,bc.$RBRACE,bc.$NBSP,bc.$PIPE,bc.$TILDA,bc.$AT,bc.$BT,bc.isWhitespace,bc.isDigit,bc.isAsciiLetter,bc.isAsciiHexDigit;var yc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,i){r(this,e),this.filePath=t,this.name=n,this.members=i}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n;var a=function(){function e(){r(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}();t.StaticSymbolCache=a}));h(yc);yc.StaticSymbol,yc.StaticSymbolCache;var Ec=d((function(e,n){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(n,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,r){var n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function u(e,r,n){return Array.isArray(e)?r.visitArray(e,n):"object"===t(i=e)&&null!==i&&Object.getPrototypeOf(i)===p?r.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?r.visitPrimitive(e,n):r.visitOther(e,n);var i}n.dashCaseToCamelCase=function(e){return e.replace(a,(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[1].toUpperCase()}))},n.splitAtColon=function(e,t){return o(e,":",t)},n.splitAtPeriod=function(e,t){return o(e,".",t)},n.visitValue=u,n.isDefined=function(e){return null!=e},n.noUndefined=function(e){return void 0===e?null:e};var s=function(){function e(){r(this,e)}return i(e,[{key:"visitArray",value:function(e,t){var r=this;return e.map((function(e){return u(e,r,t)}))}},{key:"visitStringMap",value:function(e,t){var r=this,n={};return Object.keys(e).forEach((function(i){n[i]=u(e[i],r,t)})),n}},{key:"visitPrimitive",value:function(e,t){return e}},{key:"visitOther",value:function(e,t){return e}}]),e}();n.ValueTransformer=s,n.SyncAsync={assertSync:function(e){if(f(e))throw new Error("Illegal state: value cannot be a promise");return e},then:function(e,t){return f(e)?e.then(t):t(e)},all:function(e){return e.some(f)?Promise.all(e):e}},n.error=function(e){throw new Error("Internal Error: ".concat(e))},n.syntaxError=function(e,t){var r=Error(e);return r[c]=!0,t&&(r[l]=t),r};var c="ngSyntaxError",l="ngParseErrors";n.isSyntaxError=function(e){return e[c]},n.getParseErrors=function(e){return e[l]||[]},n.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var p=Object.getPrototypeOf({});function f(e){return!!e&&"function"==typeof e.then}n.utf8Encode=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&e.length>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(r++,n=(n-55296<<10)+i-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t},n.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var r=t.toString();if(null==r)return""+r;var n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},n.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},n.isPromise=f;n.Version=function e(t){r(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}}));h(Ec);Ec.dashCaseToCamelCase,Ec.splitAtColon,Ec.splitAtPeriod,Ec.visitValue,Ec.isDefined,Ec.noUndefined,Ec.ValueTransformer,Ec.SyncAsync,Ec.error,Ec.syntaxError,Ec.isSyntaxError,Ec.getParseErrors,Ec.escapeRegExp,Ec.utf8Encode,Ec.stringify,Ec.resolveForwardRef,Ec.isPromise,Ec.Version;var Cc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=a;var o,u=0;function s(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof yc.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var r=Ec.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(u++),t.__anonymousType=r):r=a(r),r}t.identifierName=s,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof yc.StaticSymbol?t.filePath:"./".concat(Ec.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(s({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(s({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(s({reference:e}))},t.componentFactoryName=function(e){return"".concat(s({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?a(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,i=t.styles,a=t.styleUrls;r(this,e),this.moduleUrl=n||null,this.styles=d(i),this.styleUrls=d(a)};var c=function(){function e(t){var n=t.encapsulation,i=t.template,a=t.templateUrl,o=t.htmlAst,u=t.styles,s=t.styleUrls,c=t.externalStylesheets,l=t.animations,p=t.ngContentSelectors,f=t.interpolation,h=t.isInline,g=t.preserveWhitespaces;if(r(this,e),this.encapsulation=n,this.template=i,this.templateUrl=a,this.htmlAst=o,this.styles=d(u),this.styleUrls=d(s),this.externalStylesheets=d(c),this.animations=l?D(l):[],this.ngContentSelectors=p||[],f&&2!=f.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=f,this.isInline=h,this.preserveWhitespaces=g}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();t.CompileTemplateMetadata=c;var l=function(){function e(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.hostListeners,f=t.hostProperties,h=t.hostAttributes,D=t.providers,g=t.viewProviders,m=t.queries,v=t.guards,b=t.viewQueries,y=t.entryComponents,E=t.template,C=t.componentViewType,A=t.rendererType,w=t.componentFactory;r(this,e),this.isHost=!!n,this.type=i,this.isComponent=a,this.selector=o,this.exportAs=u,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=p,this.hostProperties=f,this.hostAttributes=h,this.providers=d(D),this.viewProviders=d(g),this.queries=d(m),this.guards=v,this.viewQueries=d(b),this.entryComponents=d(y),this.template=E,this.componentViewType=C,this.rendererType=A,this.componentFactory=w}return i(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.host,f=t.providers,h=t.viewProviders,d=t.queries,D=t.guards,g=t.viewQueries,m=t.entryComponents,v=t.template,b=t.componentViewType,y=t.rendererType,E=t.componentFactory,C={},A={},w={};null!=p&&Object.keys(p).forEach((function(e){var t=p[e],r=e.match(n);null===r?w[e]=t:null!=r[1]?A[r[1]]=t:null!=r[2]&&(C[r[2]]=t)}));var k={};null!=c&&c.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);k[t[0]]=t[1]}));var T={};return null!=l&&l.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);T[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:u,changeDetection:s,inputs:k,outputs:T,hostListeners:C,hostProperties:A,hostAttributes:w,providers:f,viewProviders:h,queries:d,guards:D,viewQueries:g,entryComponents:m,template:v,componentViewType:b,rendererType:y,componentFactory:E})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();t.CompileDirectiveMetadata=l;var p=function(){function e(t){var n=t.type,i=t.name,a=t.pure;r(this,e),this.type=n,this.name=i,this.pure=!!a}return i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}();t.CompilePipeMetadata=p;t.CompileShallowModuleMetadata=function e(){r(this,e)};var f=function(){function e(t){var n=t.type,i=t.providers,a=t.declaredDirectives,o=t.exportedDirectives,u=t.declaredPipes,s=t.exportedPipes,c=t.entryComponents,l=t.bootstrapComponents,p=t.importedModules,f=t.exportedModules,h=t.schemas,D=t.transitiveModule,g=t.id;r(this,e),this.type=n||null,this.declaredDirectives=d(a),this.exportedDirectives=d(o),this.declaredPipes=d(u),this.exportedPipes=d(s),this.providers=d(i),this.entryComponents=d(c),this.bootstrapComponents=d(l),this.importedModules=d(p),this.exportedModules=d(f),this.schemas=d(h),this.id=g||null,this.transitiveModule=D||null}return i(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}();t.CompileNgModuleMetadata=f;var h=function(){function e(){r(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return i(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}();function d(e){return e||[]}t.TransitiveCompileNgModuleMetadata=h;function D(e){return e.reduce((function(e,t){var r=Array.isArray(t)?D(t):t;return e.concat(r)}),[])}function g(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=function e(t,n){var i=n.useClass,a=n.useValue,o=n.useExisting,u=n.useFactory,s=n.deps,c=n.multi;r(this,e),this.token=t,this.useClass=i||null,this.useValue=a,this.useExisting=o,this.useFactory=u||null,this.dependencies=s||null,this.multi=!!c},t.flatten=D,t.templateSourceUrl=function(e,t,r){var n;return n=r.isInline?t.type.reference instanceof yc.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(s(e),"/").concat(s(t.type),".html"):r.templateUrl,t.type.reference instanceof yc.StaticSymbol?n:g(n)},t.sharedStylesheetJitUrl=function(e,t){var r=e.moduleUrl.split(/\/\\/g),n=r[r.length-1];return g("css/".concat(t).concat(n,".ngstyle.js"))},t.ngModuleJitUrl=function(e){return g("".concat(s(e.type),"/module.ngfactory.js"))},t.templateJitUrl=function(e,t){return g("".concat(s(e),"/").concat(s(t.type),".ngfactory.js"))}}));h(Cc);Cc.sanitizeIdentifier,Cc.identifierName,Cc.identifierModuleUrl,Cc.viewClassName,Cc.rendererTypeName,Cc.hostViewClassName,Cc.componentFactoryName,Cc.CompileSummaryKind,Cc.tokenName,Cc.tokenReference,Cc.CompileStylesheetMetadata,Cc.CompileTemplateMetadata,Cc.CompileDirectiveMetadata,Cc.CompilePipeMetadata,Cc.CompileShallowModuleMetadata,Cc.CompileNgModuleMetadata,Cc.TransitiveCompileNgModuleMetadata,Cc.ProviderMeta,Cc.flatten,Cc.templateSourceUrl,Cc.sharedStylesheetJitUrl,Cc.ngModuleJitUrl,Cc.templateJitUrl;var Ac=d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+var n=function(){function e(t,n,i,a){r(this,e),this.file=t,this.offset=n,this.line=i,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var r=this.file.content,n=r.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;){if(i--,t++,r.charCodeAt(i)==bc.$LF){a--;var u=r.substr(0,i-1).lastIndexOf(String.fromCharCode(bc.$LF));o=u>0?i-u:i}else o--}for(;i<n&&t>0;){var s=r.charCodeAt(i);i++,t--,s==bc.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var r=this.file.content,n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);for(var i=n,a=0,o=0;a<e&&n>0&&(a++,"\n"!=r[--n]||++o!=t););for(a=0,o=0;a<e&&i<r.length-1&&(a++,"\n"!=r[++i]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,i+1)}}return null}}]),e}();t.ParseLocation=n;var a=function e(t,n){r(this,e),this.content=t,this.url=n};t.ParseSourceFile=a;var o,u=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,e),this.start=t,this.end=n,this.details=i}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=u,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));var s=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;r(this,e),this.span=t,this.msg=n,this.level=i}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();t.ParseError=s,t.typeSourceSpan=function(e,t){var r=Cc.identifierModuleUrl(t),i=null!=r?"in ".concat(e," ").concat(Cc.identifierName(t)," in ").concat(r):"in ".concat(e," ").concat(Cc.identifierName(t)),o=new a("",i);return new u(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));h(Ac);Ac.ParseLocation,Ac.ParseSourceFile,Ac.ParseSourceSpan,Ac.ParseErrorLevel,Ac.ParseError,Ac.typeSourceSpan;var wc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;r(this,e),this.path=t,this.position=n}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var r=this.path[t];if(r instanceof e)return r}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();t.AstPath=n}));h(wc);wc.AstPath;var kc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();t.Text=n;var u=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();t.CDATA=u;var c=function(){function e(t,n,i,a,o){r(this,e),this.switchValue=t,this.type=n,this.cases=i,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();t.Expansion=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();t.ExpansionCase=l;var p=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;r(this,e),this.name=t,this.value=n,this.sourceSpan=i,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();t.Attribute=p;var f=function(){function e(t,n,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;r(this,e),this.name=t,this.attrs=n,this.children=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=u,this.nameSpan=s}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();t.Element=f;var h=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();t.Comment=h;var d=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function D(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach((function(e){var t=i(e);t&&n.push(t)})),n}t.DocType=d,t.visitAll=D;var g=function(){function e(){r(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,(function(t){t(e.attrs),t(e.children)}))}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,(function(t){t(e.cases)}))}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var r=[],n=this;return t((function(t){t&&r.push(D(n,t,e))})),[].concat.apply([],r)}}]),e}();t.RecursiveVisitor=g,t.findNode=function(e,t){var n=[];return D(new(function(e){function u(){return r(this,u),s(this,o(u).apply(this,arguments))}return a(u,e),i(u,[{key:"visit",value:function(e,r){var i=function e(t){var r=t.sourceSpan.start.offset,n=t.sourceSpan.end.offset;return t instanceof f&&(t.endSourceSpan?n=t.endSourceSpan.end.offset:t.children&&t.children.length&&(n=e(t.children[t.children.length-1]).end)),{start:r,end:n}}(e);if(!(i.start<=t&&t<i.end))return!0;n.push(e)}}]),u}(g)),e),new wc.AstPath(n,t)}}));h(kc);kc.Text,kc.CDATA,kc.Expansion,kc.ExpansionCase,kc.Attribute,kc.Element,kc.Comment,kc.DocType,kc.visitAll,kc.RecursiveVisitor,kc.findNode;var Tc=d((function(e,t){var n;
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE_START=13]="DOC_TYPE_START",e[e.DOC_TYPE_END=14]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(n=t.TokenType||(t.TokenType={}));var u=function e(t,n,i){r(this,e),this.type=t,this.parts=n,this.sourceSpan=i};t.Token=u;var c=function(e){function t(e,n,i){var a;return r(this,t),(a=s(this,o(t).call(this,i,e))).tokenType=n,a}return a(t,e),t}(Ac.ParseError);t.TokenError=c;var l=function e(t,n){r(this,e),this.tokens=t,this.errors=n};t.TokenizeResult=l,t.tokenize=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return new D(new Ac.ParseSourceFile(e,t),r,n,i,a,o).tokenize()};var p=/\r\n?/g;function f(e){var t=e===bc.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function h(e){return'Unknown entity "'.concat(e,'" - use the "&#<decimal>;" or "&#x<hex>;" syntax')}var d=function e(t){r(this,e),this.error=t},D=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5];r(this,e),this._file=t,this._getTagDefinition=n,this._tokenizeIcu=i,this._interpolationConfig=a,this.canSelfClose=o,this.allowHtmComponentClosingTags=u,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=t.content,this._length=t.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(p,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==bc.$EOF;){var e=this._getLocation();try{if(this._attemptCharCode(bc.$LT))if(this._attemptCharCode(bc.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(bc.$SLASH))this._consumeTagClose(e);else{var t=this._savePosition();this._attemptCharCode(bc.$QUESTION)?(this._restorePosition(t),this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof d))throw e;this.errors.push(e.error)}}return this._beginToken(n.EOF),this._endToken([]),new l(function(e){for(var t=[],r=void 0,i=0;i<e.length;i++){var a=e[i];r&&r.type==n.TEXT&&a.type==n.TEXT?(r.parts[0]+=a.parts[0],r.sourceSpan.end=a.sourceSpan.end):(r=a,t.push(r))}return t}(this.tokens),this.errors)}},{key:"_tokenizeExpansionForm",value:function(){if(y(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(((e=this._peek)===bc.$EQ||bc.isAsciiLetter(e)||bc.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._peek===bc.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}},{key:"_getLocation",value:function(){return new Ac.ParseLocation(this._file,this._index,this._line,this._column)}},{key:"_getSpan",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLocation(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();return new Ac.ParseSourceSpan(e,t)}},{key:"_beginToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();this._currentTokenStart=t,this._currentTokenType=e}},{key:"_endToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation(),r=new u(this._currentTokenType,e,new Ac.ParseSourceSpan(this._currentTokenStart,t));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}},{key:"_createError",value:function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var r=new c(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new d(r)}},{key:"_advance",value:function(){if(this._index>=this._length)throw this._createError(f(bc.$EOF),this._getSpan());this._peek===bc.$LF?(this._line++,this._column=0):this._peek!==bc.$LF&&this._peek!==bc.$CR&&this._column++,this._index++,this._peek=this._index>=this._length?bc.$EOF:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?bc.$EOF:this._input.charCodeAt(this._index+1)}},{key:"_attemptCharCode",value:function(e){return this._peek===e&&(this._advance(),!0)}},{key:"_attemptCharCodeCaseInsensitive",value:function(e){return t=this._peek,r=e,E(t)==E(r)&&(this._advance(),!0);var t,r}},{key:"_requireCharCode",value:function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(f(this._peek),this._getSpan(t,t))}},{key:"_attemptStr",value:function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var r=this._savePosition(),n=0;n<t;n++)if(!this._attemptCharCode(e.charCodeAt(n)))return this._restorePosition(r),!1;return!0}},{key:"_attemptStrCaseInsensitive",value:function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}},{key:"_requireStr",value:function(e){var t=this._getLocation();if(!this._attemptStr(e))throw this._createError(f(this._peek),this._getSpan(t))}},{key:"_requireStrCaseInsensitive",value:function(e){var t=this._getLocation();if(!this._attemptStrCaseInsensitive(e))throw this._createError(f(this._peek),this._getSpan(t))}},{key:"_attemptCharCodeUntilFn",value:function(e){for(;!e(this._peek);)this._advance()}},{key:"_requireCharCodeUntilFn",value:function(e,t){var r=this._getLocation();if(this._attemptCharCodeUntilFn(e),this._index-r.offset<t)throw this._createError(f(this._peek),this._getSpan(r,r))}},{key:"_attemptUntilChar",value:function(e){for(;this._peek!==e;)this._advance()}},{key:"_readChar",value:function(e){if(e&&this._peek===bc.$AMPERSAND)return this._decodeEntity();var t=this._index;return this._advance(),this._input[t]}},{key:"_decodeEntity",value:function(){var e=this._getLocation();if(this._advance(),!this._attemptCharCode(bc.$HASH)){var t=this._savePosition();if(this._attemptCharCodeUntilFn(b),this._peek!=bc.$SEMICOLON)return this._restorePosition(t),"&";this._advance();var r=this._input.substring(e.offset+1,this._index-1),n=Dc.NAMED_ENTITIES[r];if(!n)throw this._createError(h(r),this._getSpan(e));return n}var i=this._attemptCharCode(bc.$x)||this._attemptCharCode(bc.$X),a=this._getLocation().offset;if(this._attemptCharCodeUntilFn(v),this._peek!=bc.$SEMICOLON)throw this._createError(f(this._peek),this._getSpan());this._advance();var o=this._input.substring(a,this._index-1);try{var u=parseInt(o,i?16:10);return String.fromCharCode(u)}catch(t){var s=this._input.substring(e.offset+1,this._index-1);throw this._createError(h(s),this._getSpan(e))}}},{key:"_consumeRawText",value:function(e,t,r){var i,a=this._getLocation();this._beginToken(e?n.ESCAPABLE_RAW_TEXT:n.RAW_TEXT,a);for(var o=[];i=this._getLocation(),!this._attemptCharCode(t)||!r();)for(this._index>i.offset&&o.push(this._input.substring(i.offset,this._index));this._peek!==t;)o.push(this._readChar(e));return this._endToken([this._processCarriageReturns(o.join(""))],i)}},{key:"_consumeComment",value:function(e){var t=this;this._beginToken(n.COMMENT_START,e),this._endToken([]);var r=this._consumeRawText(!1,bc.$MINUS,(function(){return t._attemptStr("->")}));this._beginToken(n.COMMENT_END,r.sourceSpan.end),this._endToken([])}},{key:"_consumeBogusComment",value:function(e){this._beginToken(n.COMMENT_START,e),this._endToken([]);var t=this._consumeRawText(!1,bc.$GT,(function(){return!0}));this._beginToken(n.COMMENT_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumeCdata",value:function(e){var t=this;this._beginToken(n.CDATA_START,e),this._endToken([]);var r=this._consumeRawText(!1,bc.$RBRACKET,(function(){return t._attemptStr("]>")}));this._beginToken(n.CDATA_END,r.sourceSpan.end),this._endToken([])}},{key:"_consumeDocType",value:function(e){this._beginToken(n.DOC_TYPE_START,e),this._endToken([]);var t=this._consumeRawText(!1,bc.$GT,(function(){return!0}));this._beginToken(n.DOC_TYPE_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumePrefixAndName",value:function(){for(var e,t,r=this._index,n=null;this._peek!==bc.$COLON&&!(((e=this._peek)<bc.$a||bc.$z<e)&&(e<bc.$A||bc.$Z<e)&&(e<bc.$0||e>bc.$9));)this._advance();return this._peek===bc.$COLON?(this._advance(),n=this._input.substring(r,this._index-1),t=this._index):t=r,this._requireCharCodeUntilFn(m,this._index===t?1:0),[n,this._input.substring(t,this._index)]}},{key:"_consumeTagOpen",value:function(e){var t,r,i=this._savePosition();try{if(!bc.isAsciiLetter(this._peek))throw this._createError(f(this._peek),this._getSpan());var a=this._index;for(this._consumeTagOpenStart(e),r=(t=this._input.substring(a,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(g);this._peek!==bc.$SLASH&&this._peek!==bc.$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(g),this._attemptCharCode(bc.$EQ)&&(this._attemptCharCodeUntilFn(g),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(g);this._consumeTagOpenEnd()}catch(t){if(t instanceof d)return this._restorePosition(i),this._beginToken(n.TEXT,e),void this._endToken(["<"]);throw t}if(!this.canSelfClose||this.tokens[this.tokens.length-1].type!==n.TAG_OPEN_END_VOID){var o=this._getTagDefinition(t).contentType;o===Dc.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,!1):o===Dc.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,!0)}}},{key:"_consumeRawTextWithTagClose",value:function(e,t){var r=this,i=this._consumeRawText(t,bc.$LT,(function(){return!!r._attemptCharCode(bc.$SLASH)&&(r._attemptCharCodeUntilFn(g),!!r._attemptStrCaseInsensitive(e)&&(r._attemptCharCodeUntilFn(g),r._attemptCharCode(bc.$GT)))}));this._beginToken(n.TAG_CLOSE,i.sourceSpan.end),this._endToken([null,e])}},{key:"_consumeTagOpenStart",value:function(e){this._beginToken(n.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)}},{key:"_consumeAttributeName",value:function(){this._beginToken(n.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)}},{key:"_consumeAttributeValue",value:function(){var e;if(this._beginToken(n.ATTR_VALUE),this._peek===bc.$SQ||this._peek===bc.$DQ){var t=this._peek;this._advance();for(var r=[];this._peek!==t;)r.push(this._readChar(!0));e=r.join(""),this._advance()}else{var i=this._index;this._requireCharCodeUntilFn(m,1),e=this._input.substring(i,this._index)}this._endToken([this._processCarriageReturns(e)])}},{key:"_consumeTagOpenEnd",value:function(){var e=this._attemptCharCode(bc.$SLASH)?n.TAG_OPEN_END_VOID:n.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(bc.$GT),this._endToken([])}},{key:"_consumeTagClose",value:function(e){if(this._beginToken(n.TAG_CLOSE,e),this._attemptCharCodeUntilFn(g),this.allowHtmComponentClosingTags&&this._attemptCharCode(bc.$SLASH))this._attemptCharCodeUntilFn(g),this._requireCharCode(bc.$GT),this._endToken([]);else{var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(g),this._requireCharCode(bc.$GT),this._endToken(t)}}},{key:"_consumeExpansionFormStart",value:function(){this._beginToken(n.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(bc.$LBRACE),this._endToken([]),this._expansionCaseStack.push(n.EXPANSION_FORM_START),this._beginToken(n.RAW_TEXT,this._getLocation());var e=this._readUntil(bc.$COMMA);this._endToken([e],this._getLocation()),this._requireCharCode(bc.$COMMA),this._attemptCharCodeUntilFn(g),this._beginToken(n.RAW_TEXT,this._getLocation());var t=this._readUntil(bc.$COMMA);this._endToken([t],this._getLocation()),this._requireCharCode(bc.$COMMA),this._attemptCharCodeUntilFn(g)}},{key:"_consumeExpansionCaseStart",value:function(){this._beginToken(n.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(bc.$LBRACE).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(g),this._beginToken(n.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(bc.$LBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(g),this._expansionCaseStack.push(n.EXPANSION_CASE_EXP_START)}},{key:"_consumeExpansionCaseEnd",value:function(){this._beginToken(n.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(bc.$RBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(g),this._expansionCaseStack.pop()}},{key:"_consumeExpansionFormEnd",value:function(){this._beginToken(n.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(bc.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}},{key:"_consumeText",value:function(){var e=this._getLocation();this._beginToken(n.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}},{key:"_isTextEnd",value:function(){if(this._peek===bc.$LT||this._peek===bc.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(y(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===bc.$RBRACE&&this._isInExpansionCase())return!0}return!1}},{key:"_savePosition",value:function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]}},{key:"_readUntil",value:function(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)}},{key:"_restorePosition",value:function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t<this.tokens.length&&(this.tokens=this.tokens.slice(0,t))}},{key:"_isInExpansionCase",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_CASE_EXP_START}},{key:"_isInExpansionForm",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_FORM_START}}]),e}();function g(e){return!bc.isWhitespace(e)||e===bc.$EOF}function m(e){return bc.isWhitespace(e)||e===bc.$GT||e===bc.$SLASH||e===bc.$SQ||e===bc.$DQ||e===bc.$EQ}function v(e){return e==bc.$SEMICOLON||e==bc.$EOF||!bc.isAsciiHexDigit(e)}function b(e){return e==bc.$SEMICOLON||e==bc.$EOF||!bc.isAsciiLetter(e)}function y(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==bc.$LBRACE&&!n}function E(e){return e>=bc.$a&&e<=bc.$z?e-bc.$a+bc.$A:e}}));h(Tc);Tc.TokenType,Tc.Token,Tc.TokenError,Tc.TokenizeResult,Tc.tokenize;var _c=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(e,n,i){var a;return r(this,t),(a=s(this,o(t).call(this,n,i))).elementName=e,a}return a(t,e),i(t,null,[{key:"create",value:function(e,r,n){return new t(e,r,n)}}]),t}(Ac.ParseError);t.TreeError=n;var u=function e(t,n){r(this,e),this.rootNodes=t,this.errors=n};t.ParseTreeResult=u;var c=function(){function e(t){r(this,e),this.getTagDefinition=t}return i(e,[{key:"parse",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=s?this.getTagDefinition:function(e){return r.getTagDefinition(e.toLowerCase())},p=Tc.tokenize(e,t,c,n,i,a,o),f=new l(p.tokens,c,a,o,s).build();return new u(f.rootNodes,p.errors.concat(f.errors))}}]),e}();t.Parser=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.tokens=t,this.getTagDefinition=n,this.canSelfClose=i,this.allowHtmComponentClosingTags=a,this.isTagNameCaseSensitive=o,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==Tc.TokenType.EOF;)this._peek.type===Tc.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Tc.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Tc.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Tc.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Tc.TokenType.TEXT||this._peek.type===Tc.TokenType.RAW_TEXT||this._peek.type===Tc.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Tc.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Tc.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new u(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}},{key:"_advanceIf",value:function(e){return this._peek.type===e?this._advance():null}},{key:"_consumeCdata",value:function(e){var t=this._advance(),r=this._getText(t),n=this._advanceIf(Tc.TokenType.CDATA_END);this._addToParent(new kc.CDATA(r,new Ac.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}},{key:"_consumeComment",value:function(e){var t=this._advanceIf(Tc.TokenType.RAW_TEXT),r=this._advanceIf(Tc.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,i=new Ac.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new kc.Comment(n,i))}},{key:"_consumeDocType",value:function(e){var t=this._advanceIf(Tc.TokenType.RAW_TEXT),r=this._advanceIf(Tc.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,i=new Ac.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new kc.DocType(n,i))}},{key:"_consumeExpansion",value:function(e){for(var t=this._advance(),r=this._advance(),i=[];this._peek.type===Tc.TokenType.EXPANSION_CASE_VALUE;){var a=this._parseExpansionCase();if(!a)return;i.push(a)}if(this._peek.type===Tc.TokenType.EXPANSION_FORM_END){var o=new Ac.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new kc.Expansion(t.parts[0],r.parts[0],i,o,t.sourceSpan)),this._advance()}else this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))}},{key:"_parseExpansionCase",value:function(){var t=this._advance();if(this._peek.type!==Tc.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var r=this._advance(),i=this._collectExpansionExpTokens(r);if(!i)return null;var a=this._advance();i.push(new Tc.Token(Tc.TokenType.EOF,[],a.sourceSpan));var o=new e(i,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var u=new Ac.ParseSourceSpan(t.sourceSpan.start,a.sourceSpan.end),s=new Ac.ParseSourceSpan(r.sourceSpan.start,a.sourceSpan.end);return new kc.ExpansionCase(t.parts[0],o.rootNodes,u,t.sourceSpan,s)}},{key:"_collectExpansionExpTokens",value:function(e){for(var t=[],r=[Tc.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==Tc.TokenType.EXPANSION_FORM_START&&this._peek.type!==Tc.TokenType.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===Tc.TokenType.EXPANSION_CASE_EXP_END){if(!p(r,Tc.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===Tc.TokenType.EXPANSION_FORM_END){if(!p(r,Tc.TokenType.EXPANSION_FORM_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===Tc.TokenType.EOF)return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}},{key:"_getText",value:function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();null!=r&&0==r.children.length&&this.getTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}return t}},{key:"_consumeText",value:function(e){var t=this._getText(e);t.length>0&&this._addToParent(new kc.Text(t,e.sourceSpan))}},{key:"_closeVoidElement",value:function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},{key:"_consumeStartTag",value:function(e){for(var t=e.parts[0],r=e.parts[1],i=[];this._peek.type===Tc.TokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var a=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===Tc.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;var u=this.getTagDefinition(a);this.canSelfClose||u.canSelfClose||null!==Dc.getNsPrefix(a)||u.isVoid||this._errors.push(n.create(a,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===Tc.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);var s=this._peek.sourceSpan.start,c=new Ac.ParseSourceSpan(e.sourceSpan.start,s),l=new Ac.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),p=new kc.Element(a,i,[],c,c,void 0,l);this._pushElement(p),o&&(this._popElement(a),p.endSourceSpan=c)}},{key:"_pushElement",value:function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop();var r=this.getTagDefinition(e.name),n=this._getParentElementSkippingContainers(),i=n.parent,a=n.container;if(i&&r.requireExtraParent(i.name)){var o=new kc.Element(r.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(i,a,o)}this._addToParent(e),this._elementStack.push(e)}},{key:"_consumeEndTag",value:function(e){var t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(n.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){var r='Unexpected closing tag "'.concat(t,'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags');this._errors.push(n.create(t,e.sourceSpan,r))}}},{key:"_popElement",value:function(e){for(var t=this._elementStack.length-1;t>=0;t--){var r=this._elementStack[t];if(!e||(Dc.getNsPrefix(r.name)?r.name==e:r.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1}},{key:"_consumeAttr",value:function(e){var t=Dc.mergeNsAndName(e.parts[0],e.parts[1]),r=e.sourceSpan.end,n="",i=void 0;if(this._peek.type===Tc.TokenType.ATTR_VALUE){var a=this._advance();n=a.parts[0],r=a.sourceSpan.end,i=a.sourceSpan}return new kc.Attribute(t,n,new Ac.ParseSourceSpan(e.sourceSpan.start,r),i,e.sourceSpan)}},{key:"_getParentElement",value:function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}},{key:"_getParentElementSkippingContainers",value:function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!Dc.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}},{key:"_addToParent",value:function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}},{key:"_insertBeforeContainer",value:function(e,t,r){if(t){if(e){var n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)}},{key:"_getElementFullName",value:function(e,t,r){return null==e&&null==(e=this.getTagDefinition(t).implicitNamespacePrefix)&&null!=r&&(e=Dc.getNsPrefix(r.name)),Dc.mergeNsAndName(e,t)}}]),e}();function p(e,t){return e.length>0&&e[e.length-1]===t}}));h(_c);_c.TreeError,_c.ParseTreeResult,_c.Parser;var Sc=d((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var n=_c;t.ParseTreeResult=n.ParseTreeResult,t.TreeError=n.TreeError;var u=function(e){function t(){return r(this,t),s(this,o(t).call(this,gc.getHtmlTagDefinition))}return a(t,e),i(t,[{key:"parse",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return c(o(t.prototype),"parse",this).call(this,e,r,n,i,a,u,s)}}]),t}(_c.Parser);t.HtmlParser=u}));h(Sc);Sc.ParseTreeResult,Sc.TreeError,Sc.HtmlParser;var Fc=d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=null,n=function(){return r||(r=new Sc.HtmlParser),r};t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.canSelfClose,i=void 0!==r&&r,a=t.allowHtmComponentClosingTags,o=void 0!==a&&a,u=t.isTagNameCaseSensitive,s=void 0!==u&&u;return n().parse(e,"angular-html-parser",!1,void 0,i,o,s)}}));h(Fc);Fc.parse;var xc=ic.HTML_ELEMENT_ATTRIBUTES,qc=ic.HTML_TAGS,Nc=ac,Lc=fc.Node,Bc=dc;function Pc(e,t){var n=t.recognizeSelfClosing,u=t.normalizeTagName,c=t.normalizeAttributeName,l=t.allowHtmComponentClosingTags,p=t.isTagNameCaseSensitive,f=Fc,h=kc.RecursiveVisitor,d=kc.visitAll,D=kc.Attribute,g=kc.CDATA,m=kc.Comment,v=kc.DocType,b=kc.Element,y=kc.Text,E=Ac.ParseSourceSpan,C=gc.getHtmlTagDefinition,A=f.parse(e,{canSelfClose:n,allowHtmComponentClosingTags:l,isTagNameCaseSensitive:p}),w=A.rootNodes,k=A.errors;if(0!==k.length){var T=k[0],_=T.msg,S=T.span.start,F=S.line,x=S.col;throw oc(_,{start:{line:F+1,column:x+1}})}var q=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan?e.nameSpan.toString():e.name,n=r.startsWith("".concat(t,":")),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},N=function(e,t){var r=e.toLowerCase();return t(r)?r:e};return d(new(function(e){function t(){return r(this,t),s(this,o(t).apply(this,arguments))}return a(t,e),i(t,[{key:"visit",value:function(e){!function(e){if(e instanceof D)e.type="attribute";else if(e instanceof g)e.type="cdata";else if(e instanceof m)e.type="comment";else if(e instanceof v)e.type="docType";else if(e instanceof b)e.type="element";else{if(!(e instanceof y))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof b?(q(e),e.attrs.forEach((function(e){q(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null}))):e instanceof m?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof y&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof b){var t=C(p?e.name:e.name.toLowerCase());e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=C(""):e.tagDefinition=t}}(e),function(e){if(e instanceof b&&(!u||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=N(e.name,(function(e){return e in qc}))),c)){var t=xc[e.name]||Object.create(null);e.attrs.forEach((function(r){r.namespace||(r.name=N(r.name,(function(r){return e.name in xc&&(r in xc["*"]||r in t)})))}))}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new E(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),t}(h)),w),w}function Oc(e){return e.sourceSpan.start.offset}function Rc(e){return e.sourceSpan.end.offset}function Ic(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recognizeSelfClosing,r=void 0!==t&&t,n=e.normalizeTagName,i=void 0!==n&&n,a=e.normalizeAttributeName,o=void 0!==a&&a,u=e.allowHtmComponentClosingTags,s=void 0!==u&&u,c=e.isTagNameCaseSensitive,l=void 0!==c&&c;return{parse:function(e,t,n){return function e(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?lo(t):{frontMatter:null,content:t},a=i.frontMatter,o=i.content,u={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},children:Pc(o,n)};a&&u.children.unshift(a);var s=new Lc(u),c=function(i,a){var o=a.offset,u=e(t.slice(0,o).replace(/[^\r\n]/g," ")+i,r,n,!1),s=u.children[0].sourceSpan.constructor;u.sourceSpan=new s(a,u.children[u.children.length-1].sourceSpan.end);var c=u.children[0];return c.length===o?u.children.shift():(c.sourceSpan=new s(c.sourceSpan.start.moveBy(o),c.sourceSpan.end),c.value=c.value.slice(o)),u},l=function(e){return"element"===e.type&&!e.nameSpan};return s.map((function(e){if(e.children&&e.children.some(l)){var t=[],r=!0,n=!1,i=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var u=a.value;l(u)?Array.prototype.push.apply(t,u.children):t.push(u)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return e.clone({children:t})}if("comment"===e.type){var s=Bc(e,c);if(s)return s}return e}))}(e,n,{recognizeSelfClosing:r,normalizeTagName:i,normalizeAttributeName:o,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:l})},hasPragma:Nc,astFormat:"html",locStart:Oc,locEnd:Rc}}var Uc={parsers:{html:Ic({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Ic(),vue:Ic({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0}),lwc:Ic()}},$c=Ro.mapAst,Vc=Ro.INLINE_NODE_WRAPPER_TYPES,Mc=Uc.parsers.html;function jc(e){var t=e.isMDX;return function(e){var r=Za().use(ji,Object.assign({footnotes:!0,commonmark:!0},t&&{blocks:[jo.BLOCKS_REGEX]})).use(Hc).use(ru).use(t?jo.esSyntax:zc).use(Xc).use(t?Gc:zc);return r.runSync(r.parse(e))}}function zc(e){return e}function Gc(){return function(e){return $c(e,(function(e,t,r){var n=l(r,1)[0];if("html"!==e.type||e.value.match(jo.COMMENT_REGEX)||-1!==Vc.indexOf(n.type))return e;var i=Mc.parse(e.value).children;return i.length<=1?Object.assign({},e,{type:"jsx"}):i.reduce((function(t,r){var n=r.sourceSpan,i=r.type,a=e.value.slice(n.start.offset,n.end.offset);return a&&t.push({type:"element"===i?"jsx":i,value:a,position:n}),t}),[])}))}}function Hc(){var e=this.Parser.prototype;function t(e,t){var r=lo(t);if(r.frontMatter)return e(r.frontMatter.raw)(r.frontMatter)}e.blockMethods=["frontMatter"].concat(e.blockMethods),e.blockTokenizers.frontMatter=t,t.onlyAtStart=!0}function Xc(){var e=this.Parser.prototype,t=e.inlineMethods;function r(e,t){var r=t.match(/^({%[\s\S]*?%}|{{[\s\S]*?}})/);if(r)return e(r[0])({type:"liquidNode",value:r[0]})}t.splice(t.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=r,r.locator=function(e,t){return e.indexOf("{",t)}}var Wc={astFormat:"mdast",hasPragma:ho.hasPragma,locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset},preprocess:function(e){return e.replace(/\n\s+$/,"\n")}},Qc=Object.assign({},Wc,{parse:jc({isMDX:!1})}),Yc={parsers:{remark:Qc,markdown:Qc,mdx:Object.assign({},Wc,{parse:jc({isMDX:!0})})}},Zc=Yc.parsers;e.default=Yc,e.parsers=Zc,Object.defineProperty(e,"__esModule",{value:!0})}));
diff --git a/std/prettier/vendor/parser_typescript.js b/std/prettier/vendor/parser_typescript.js
index e6c44e2be..108c3964f 100644
--- a/std/prettier/vendor/parser_typescript.js
+++ b/std/prettier/vendor/parser_typescript.js
@@ -1,4 +1,4 @@
-// This file is copied from prettier@1.18.2
+// This file is copied from prettier@1.19.1
/**
* Copyright © James Long and contributors
*
@@ -8,4 +8,17 @@
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.typescript=t())}(globalThis,function(){"use strict";var e=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var t=function(e,t){if(e.startsWith("#!")){var r=e.indexOf("\n"),n={type:"Line",value:e.slice(2,r),range:[0,r],loc:{source:null,start:{line:1,column:0},end:{line:1,column:r}}};t.comments=[n].concat(t.comments)}},r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var o=a(function(e){e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return null;var r=t.filter(function(e){return"\r\n"===e}).length;return r>t.length-r?"\r\n":"\n"},e.exports.graceful=function(t){return e.exports(t)||"\n"}}),s={EOL:"\n"},c=Object.freeze({default:s}),u=c&&s||c,l=a(function(e,t){var r,n;function i(){return r=(e=o)&&e.__esModule?e:{default:e};var e}function a(){return n=u}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(l);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(l);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return g(e).pragmas},t.parseWithComments=g,t.print=function(e){var t=e.comments,o=void 0===t?"":t,s=e.pragmas,c=void 0===s?{}:s,u=(0,(r||i()).default)(o)||(n||a()).EOL,l=Object.keys(c),_=l.map(function(e){return y(e,c[e])}).reduce(function(e,t){return e.concat(t)},[]).map(function(e){return" * "+e+u}).join("");if(!o){if(0===l.length)return"";if(1===l.length&&!Array.isArray(c[l[0]])){var d=c[l[0]];return"".concat("/**"," ").concat(y(l[0],d)[0]).concat(" */")}}var p=o.split(u).map(function(e){return"".concat(" *"," ").concat(e)}).join(u)+u;return"/**"+u+(o?p:"")+(o&&l.length?" *"+u:"")+_+" */"};var s=/\*\/$/,c=/^\/\*\*/,l=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,_=/(^|\s+)\/\/([^\r\n]*)/g,d=/^(\r?\n)+/,p=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,f=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,m=/(\r?\n|^) *\* ?/g;function g(e){var t=(0,(r||i()).default)(e)||(n||a()).EOL;e=e.replace(c,"").replace(s,"").replace(m,"$1");for(var o="";o!==e;)o=e,e=e.replace(p,"".concat(t,"$1 $2").concat(t));e=e.replace(d,"").trimRight();for(var u,l=Object.create(null),g=e.replace(f,"").replace(d,"").trimRight();u=f.exec(e);){var y=u[2].replace(_,"");"string"==typeof l[u[1]]||Array.isArray(l[u[1]])?l[u[1]]=[].concat(l[u[1]],y):l[u[1]]=y}return{comments:g,pragmas:l}}function y(e,t){return[].concat(t).map(function(t){return"@".concat(e," ").concat(t).trim()})}});i(l);var _=function(e){var t=Object.keys(l.parse(l.extract(e)));return-1!==t.indexOf("prettier")||-1!==t.indexOf("format")},d=function(e){return e.length>0?e[e.length-1]:null};var p={locStart:function e(t,r){return!(r=r||{}).ignoreDecorators&&t.declaration&&t.declaration.decorators&&t.declaration.decorators.length>0?e(t.declaration.decorators[0]):!r.ignoreDecorators&&t.decorators&&t.decorators.length>0?e(t.decorators[0]):t.__location?t.__location.startOffset:t.range?t.range[0]:"number"==typeof t.start?t.start:t.loc?t.loc.start:null},locEnd:function e(t){var r=t.nodes&&d(t.nodes);if(r&&t.source&&!t.source.end&&(t=r),t.__location)return t.__location.endOffset;var n=t.range?t.range[1]:"number"==typeof t.end?t.end:null;return t.typeAnnotation?Math.max(n,e(t.typeAnnotation)):t.loc&&!n?t.loc.end:n}};function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y=a(function(e){e.exports=function(e){e=Object.assign({onlyFirst:!1},e);var t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}}),h=a(function(e){e.exports=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))}}),v=a(function(e){var t=/\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;e.exports=function(e){if("string"!=typeof(e=e.replace(t," "))||0===e.length)return 0;e=function(e){return"string"==typeof e?e.replace(y(),""):e}(e);for(var r=0,n=0;n<e.length;n++){var i=e.codePointAt(n);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&n++,r+=h(i)?2:1))}return r}}),b=/[|\\{}()[\]^$+*?.]/g,D=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(b,"\\$&")},x=/[^\x20-\x7F]/;function S(e){if(e)switch(e.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function T(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o<a;){var s=t.charAt(o);if(e instanceof RegExp){if(!e.test(s))return o}else if(-1===e.indexOf(s))return o;i?o--:o++}return(-1===o||o===a)&&o}}var C=T(/\s/),E=T(" \t"),k=T(",; \t"),N=T(/[^\r\n]/);function A(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(var r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function F(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?N(e,t):t)}function P(e,t,r){var n=r&&r.backwards;if(!1===t)return!1;var i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function w(e,t,r){var n=E(e,(r=r||{}).backwards?t-1:t,r);return n!==P(e,n,r)}function I(e,t){for(var r=null,n=t;n!==r;)r=n,n=A(e,n=k(e,n)),n=E(e,n);return w(e,n=P(e,n=F(e,n)))}function O(e,t){for(var r=null;t!==r;)r=t,t=P(e,t=F(e,t=A(e,t=E(e,t))));return t}function M(e,t,r){return O(e,r(t))}var L={};function R(e){return L[e]}[["|>"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(e,t){e.forEach(function(e){L[e]=t})});var B={"==":!0,"!=":!0,"===":!0,"!==":!0},j={"*":!0,"/":!0,"%":!0},J={">>":!0,">>>":!0,"<<":!0};function z(e,t,r){for(var n=0,i=r=r||0;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function K(e,t){var r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},a="'"===t?i:n,o=a===i?n:i,s=a.quote;(r.includes(a.quote)||r.includes(o.quote))&&(s=(r.match(a.regex)||[]).length>(r.match(o.regex)||[]).length?o.quote:a.quote);return s}function U(e,t,r){var n='"'===t?"'":'"',i=e.replace(/\\([\s\S])|(['"])/g,function(e,i,a){return i===n?i:a===t?"\\"+a:a||(r&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(i)?i:"\\"+i)});return t+i+t}function V(e){return e&&e.comments&&e.comments.length>0&&e.comments.some(function(e){return"prettier-ignore"===e.value.trim()})}function q(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var W={replaceEndOfLineWith:function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e.split("\n")[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;0!==r.length&&r.push(t),r.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r},getStringWidth:function(e){return e?x.test(e)?v(e):e.length:0},getMaxContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(D(t),")+"),"g"));return null===r?0:r.reduce(function(e,r){return Math.max(e,r.length/t.length)},0)},getMinNotPresentContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(D(t),")+"),"g"));if(null===r)return 0;var n=new Map,i=0,a=!0,o=!1,s=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value.length/t.length;n.set(l,!0),l>i&&(i=l)}}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}for(var _=1;_<i;_++)if(!n.get(_))return _;return i+1},getPrecedence:R,shouldFlatten:function(e,t){return!(R(t)!==R(e)||"**"===e||B[e]&&B[t]||"%"===t&&j[e]||"%"===e&&j[t]||t!==e&&j[t]&&j[e]||J[e]&&J[t])},isBitwiseOperator:function(e){return!!J[e]||"|"===e||"^"===e||"&"===e},isExportDeclaration:S,getParentExportDeclaration:function(e){var t=e.getParentNode();return"declaration"===e.getName()&&S(t)?t:null},getPenultimate:function(e){return e.length>1?e[e.length-2]:null},getLast:d,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:O,getNextNonSpaceNonCommentCharacterIndex:M,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(M(e,t,r))},skip:T,skipWhitespace:C,skipSpaces:E,skipToLineEnd:k,skipEverythingButNewLine:N,skipInlineComment:A,skipTrailingComment:F,skipNewline:P,isNextLineEmptyAfterIndex:I,isNextLineEmpty:function(e,t,r){return I(e,r(t))},isPreviousLineEmpty:function(e,t,r){var n=r(t)-1;return n=P(e,n=E(e,n,{backwards:!0}),{backwards:!0}),(n=E(e,n,{backwards:!0}))!==P(e,n,{backwards:!0})},hasNewline:w,hasNewlineInRange:function(e,t,r){for(var n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1},hasSpaces:function(e,t,r){return E(e,(r=r||{}).backwards?t-1:t,r)!==t},setLocStart:function(e,t){e.range?e.range[0]=t:e.start=t},setLocEnd:function(e,t){e.range?e.range[1]=t:e.end=t},startsWithNoLookaheadToken:function e(t,r){switch((t=function e(t){return t.left?e(t.left):t}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return r;case"ObjectExpression":return!0;case"MemberExpression":return e(t.object,r);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,r);case"CallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,r);case"ConditionalExpression":return e(t.test,r);case"UpdateExpression":return!t.prefix&&e(t.argument,r);case"BindExpression":return t.object&&e(t.object,r);case"SequenceExpression":return e(t.expressions[0],r);case"TSAsExpression":return e(t.expression,r);default:return!1}},getAlignmentSize:z,getIndentSize:function(e,t){var r=e.lastIndexOf("\n");return-1===r?0:z(e.slice(r+1).match(/^[ \t]*/)[0],t)},getPreferredQuote:K,printString:function(e,t,r){var n=e.slice(1,-1),i=!n.includes('"')&&!n.includes("'"),a="json"===t.parser?'"':t.__isInHtmlAttribute?"'":K(e,t.singleQuote?"'":'"');return r?i?a+n+a:e:U(n,a,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.embeddedInHtml))},printNumber:function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function(e){return V(e.getValue())},hasNodeIgnoreComment:V,makeString:U,matchAncestorTypes:function(e,t,r){for(r=r||0,t=t.slice();t.length;){var n=e.getParentNode(r),i=t.shift();if(!n||n.type!==i)return!1;r++}return!0},addLeadingComment:function(e,t){t.leading=!0,t.trailing=!1,q(e,t)},addDanglingComment:function(e,t){t.leading=!1,t.trailing=!1,q(e,t)},addTrailingComment:function(e,t){t.leading=!1,t.trailing=!0,q(e,t)},isWithinParentArrayProperty:function(e,t){var r=e.getValue(),n=e.getParentNode();if(null==n)return!1;if(!Array.isArray(n[t]))return!1;var i=e.getName();return n[t][i]===r}}.getLast;var H=function(e,t){return function e(t,r){if(t&&"object"===f(t))if(Array.isArray(t)){var n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;e(c,r)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}else if("string"==typeof t.type){for(var u=Object.keys(t),l=0;l<u.length;l++){var _=u[l];e(t[_],r)}r(t)}}(e,function(e){switch(e.type){case"VariableDeclaration":var r=W(e.declarations);r&&r.init&&function(e,r){var n;";"!==t.originalText[(n=r,"flow"===t.parser?n.range[1]:n.end)]&&("flow"===t.parser?e.range=[e.range[0],r.range[1]]:e.end=r.end,e.loc=Object.assign({},e.loc,{end:e.loc.end}))}(e,r)}}),e},G="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Y(){throw new Error("setTimeout has not been defined")}function X(){throw new Error("clearTimeout has not been defined")}var Q=Y,$=X;function Z(e){if(Q===setTimeout)return setTimeout(e,0);if((Q===Y||!Q)&&setTimeout)return Q=setTimeout,setTimeout(e,0);try{return Q(e,0)}catch(t){try{return Q.call(null,e,0)}catch(t){return Q.call(this,e,0)}}}"function"==typeof G.setTimeout&&(Q=setTimeout),"function"==typeof G.clearTimeout&&($=clearTimeout);var ee,te=[],re=!1,ne=-1;function ie(){re&&ee&&(re=!1,ee.length?te=ee.concat(te):ne=-1,te.length&&ae())}function ae(){if(!re){var e=Z(ie);re=!0;for(var t=te.length;t;){for(ee=te,te=[];++ne<t;)ee&&ee[ne].run();ne=-1,t=te.length}ee=null,re=!1,function(e){if($===clearTimeout)return clearTimeout(e);if(($===X||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(e);try{$(e)}catch(t){try{return $.call(null,e)}catch(t){return $.call(this,e)}}}(e)}}function oe(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];te.push(new se(e,t)),1!==te.length||re||Z(ae)}function se(e,t){this.fun=e,this.array=t}se.prototype.run=function(){this.fun.apply(null,this.array)};function ce(){}var ue=ce,le=ce,_e=ce,de=ce,pe=ce,fe=ce,me=ce;var ge=G.performance||{},ye=ge.now||ge.mozNow||ge.msNow||ge.oNow||ge.webkitNow||function(){return(new Date).getTime()};var he=new Date;var ve={nextTick:oe,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:ue,addListener:le,once:_e,off:de,removeListener:pe,removeAllListeners:fe,emit:me,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*ye.call(ge),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-he)/1e3}},be={},De=Object.freeze({default:be}),xe="/Users/dual/Code/prettier/node_modules/typescript/lib",Se={},Te=Object.freeze({default:Se}),Ce={},Ee=(Object.freeze({default:Ce}),{}),ke=(Object.freeze({default:Ee}),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("")),Ne=function(e){if(0<=e&&e<ke.length)return ke[e];throw new TypeError("Must be between 0 and 63: "+e)},Ae=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};var Fe=function(e){var t,r="",n=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&n,(n>>>=5)>0&&(t|=32),r+=Ne(t)}while(n>0);return r},Pe=function(e,t,r){var n,i,a,o,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=Ae(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&i),c+=(i&=31)<<u,u+=5}while(n);r.value=(o=(a=c)>>1,1==(1&a)?-o:o),r.rest=t},we=a(function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?u:function(e){return l(e)?"$"+e:e},t.fromSetString=c?u:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=_(e.source,t.source);return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:_(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=_(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:_(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=_(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:_(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}}),Ie=Object.prototype.hasOwnProperty,Oe="undefined"!=typeof Map;function Me(){this._array=[],this._set=Oe?new Map:Object.create(null)}Me.fromArray=function(e,t){for(var r=new Me,n=0,i=e.length;n<i;n++)r.add(e[n],t);return r},Me.prototype.size=function(){return Oe?this._set.size:Object.getOwnPropertyNames(this._set).length},Me.prototype.add=function(e,t){var r=Oe?e:we.toSetString(e),n=Oe?this.has(e):Ie.call(this._set,r),i=this._array.length;n&&!t||this._array.push(e),n||(Oe?this._set.set(e,i):this._set[r]=i)},Me.prototype.has=function(e){if(Oe)return this._set.has(e);var t=we.toSetString(e);return Ie.call(this._set,t)},Me.prototype.indexOf=function(e){if(Oe){var t=this._set.get(e);if(t>=0)return t}else{var r=we.toSetString(e);if(Ie.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},Me.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},Me.prototype.toArray=function(){return this._array.slice()};var Le={ArraySet:Me};function Re(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Re.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},Re.prototype.add=function(e){var t,r,n,i,a,o;t=this._last,r=e,n=t.generatedLine,i=r.generatedLine,a=t.generatedColumn,o=r.generatedColumn,i>n||i==n&&o>=a||we.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},Re.prototype.toArray=function(){return this._sorted||(this._array.sort(we.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var Be=Le.ArraySet,je={MappingList:Re}.MappingList;function Je(e){e||(e={}),this._file=we.getArg(e,"file",null),this._sourceRoot=we.getArg(e,"sourceRoot",null),this._skipValidation=we.getArg(e,"skipValidation",!1),this._sources=new Be,this._names=new Be,this._mappings=new je,this._sourcesContents=null}Je.prototype._version=3,Je.fromSourceMap=function(e){var t=e.sourceRoot,r=new Je({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=we.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(n){var i=n;null!==t&&(i=we.relative(t,n)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)}),r},Je.prototype.addMapping=function(e){var t=we.getArg(e,"generated"),r=we.getArg(e,"original",null),n=we.getArg(e,"source",null),i=we.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},Je.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=we.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[we.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[we.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},Je.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=we.relative(i,n));var a=new Be,o=new Be;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=we.join(r,t.source)),null!=i&&(t.source=we.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||o.has(u)||o.add(u)},this),this._sources=a,this._names=o,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=we.join(r,t)),null!=i&&(t=we.relative(i,t)),this.setSourceContent(t,n))},this)},Je.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},Je.prototype._serializeMappings=function(){for(var e,t,r,n,i=0,a=1,o=0,s=0,c=0,u=0,l="",_=this._mappings.toArray(),d=0,p=_.length;d<p;d++){if(e="",(t=_[d]).generatedLine!==a)for(i=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!we.compareByGeneratedPositionsInflated(t,_[d-1]))continue;e+=","}e+=Fe(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=Fe(n-u),u=n,e+=Fe(t.originalLine-1-s),s=t.originalLine-1,e+=Fe(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=Fe(r-c),c=r)),l+=e}return l},Je.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=we.relative(t,e));var r=we.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},Je.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},Je.prototype.toString=function(){return JSON.stringify(this.toJSON())};var ze={SourceMapGenerator:Je},Ke=a(function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,i){if(0===r.length)return-1;var a=function e(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?e(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n<a.length?n:-1:c:c-r>1?e(r,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===n(r[a],r[a-1],!0);)--a;return a}});function Ue(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Ve(e,t,r,n){if(r<n){var i=r-1;Ue(e,(c=r,u=n,Math.round(c+Math.random()*(u-c))),n);for(var a=e[n],o=r;o<n;o++)t(e[o],a)<=0&&Ue(e,i+=1,o);Ue(e,i+1,o);var s=i+1;Ve(e,t,r,s-1),Ve(e,t,s+1,n)}var c,u}var qe=Le.ArraySet,We=function(e,t){Ve(e,t,0,e.length-1)};function He(e,t){var r=e;return"string"==typeof e&&(r=we.parseSourceMapInput(e)),null!=r.sections?new Xe(r,t):new Ge(r,t)}He.fromSourceMap=function(e,t){return Ge.fromSourceMap(e,t)},He.prototype._version=3,He.prototype.__generatedMappings=null,Object.defineProperty(He.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),He.prototype.__originalMappings=null,Object.defineProperty(He.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),He.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},He.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},He.GENERATED_ORDER=1,He.ORIGINAL_ORDER=2,He.GREATEST_LOWER_BOUND=1,He.LEAST_UPPER_BOUND=2,He.prototype.eachMapping=function(e,t,r){var n,i=t||null;switch(r||He.GENERATED_ORDER){case He.GENERATED_ORDER:n=this._generatedMappings;break;case He.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;n.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=we.computeSourceURL(a,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},He.prototype.allGeneratedPositionsFor=function(e){var t=we.getArg(e,"line"),r={source:we.getArg(e,"source"),originalLine:t,originalColumn:we.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",we.compareByOriginalPositions,Ke.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:we.getArg(a,"generatedLine",null),column:we.getArg(a,"generatedColumn",null),lastColumn:we.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)n.push({line:we.getArg(a,"generatedLine",null),column:we.getArg(a,"generatedColumn",null),lastColumn:we.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};function Ge(e,t){var r=e;"string"==typeof e&&(r=we.parseSourceMapInput(e));var n=we.getArg(r,"version"),i=we.getArg(r,"sources"),a=we.getArg(r,"names",[]),o=we.getArg(r,"sourceRoot",null),s=we.getArg(r,"sourcesContent",null),c=we.getArg(r,"mappings"),u=we.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=we.normalize(o)),i=i.map(String).map(we.normalize).map(function(e){return o&&we.isAbsolute(o)&&we.isAbsolute(e)?we.relative(o,e):e}),this._names=qe.fromArray(a.map(String),!0),this._sources=qe.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(e){return we.computeSourceURL(o,e,t)}),this.sourceRoot=o,this.sourcesContent=s,this._mappings=c,this._sourceMapURL=t,this.file=u}function Ye(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ge.prototype=Object.create(He.prototype),Ge.prototype.consumer=He,Ge.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=we.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},Ge.fromSourceMap=function(e,t){var r=Object.create(Ge.prototype),n=r._names=qe.fromArray(e._names.toArray(),!0),i=r._sources=qe.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(e){return we.computeSourceURL(r.sourceRoot,e,t)});for(var a=e._mappings.toArray().slice(),o=r.__generatedMappings=[],s=r.__originalMappings=[],c=0,u=a.length;c<u;c++){var l=a[c],_=new Ye;_.generatedLine=l.generatedLine,_.generatedColumn=l.generatedColumn,l.source&&(_.source=i.indexOf(l.source),_.originalLine=l.originalLine,_.originalColumn=l.originalColumn,l.name&&(_.name=n.indexOf(l.name)),s.push(_)),o.push(_)}return We(r.__originalMappings,we.compareByOriginalPositions),r},Ge.prototype._version=3,Object.defineProperty(Ge.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),Ge.prototype._parseMappings=function(e,t){for(var r,n,i,a,o,s=1,c=0,u=0,l=0,_=0,d=0,p=e.length,f=0,m={},g={},y=[],h=[];f<p;)if(";"===e.charAt(f))s++,f++,c=0;else if(","===e.charAt(f))f++;else{for((r=new Ye).generatedLine=s,a=f;a<p&&!this._charIsMappingSeparator(e,a);a++);if(i=m[n=e.slice(f,a)])f+=n.length;else{for(i=[];f<a;)Pe(e,f,g),o=g.value,f=g.rest,i.push(o);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");m[n]=i}r.generatedColumn=c+i[0],c=r.generatedColumn,i.length>1&&(r.source=_+i[1],_+=i[1],r.originalLine=u+i[2],u=r.originalLine,r.originalLine+=1,r.originalColumn=l+i[3],l=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),h.push(r),"number"==typeof r.originalLine&&y.push(r)}We(h,we.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,We(y,we.compareByOriginalPositions),this.__originalMappings=y},Ge.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return Ke.search(e,t,i,a)},Ge.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},Ge.prototype.originalPositionFor=function(e){var t={generatedLine:we.getArg(e,"line"),generatedColumn:we.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",we.compareByGeneratedPositionsDeflated,we.getArg(e,"bias",He.GREATEST_LOWER_BOUND));if(r>=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var i=we.getArg(n,"source",null);null!==i&&(i=this._sources.at(i),i=we.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=we.getArg(n,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:we.getArg(n,"originalLine",null),column:we.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},Ge.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},Ge.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,i=e;if(null!=this.sourceRoot&&(i=we.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=we.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},Ge.prototype.generatedPositionFor=function(e){var t=we.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:we.getArg(e,"line"),originalColumn:we.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",we.compareByOriginalPositions,we.getArg(e,"bias",He.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===r.source)return{line:we.getArg(i,"generatedLine",null),column:we.getArg(i,"generatedColumn",null),lastColumn:we.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};function Xe(e,t){var r=e;"string"==typeof e&&(r=we.parseSourceMapInput(e));var n=we.getArg(r,"version"),i=we.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new qe,this._names=new qe;var a={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=we.getArg(e,"offset"),n=we.getArg(r,"line"),i=we.getArg(r,"column");if(n<a.line||n===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new He(we.getArg(e,"map"),t)}})}Xe.prototype=Object.create(He.prototype),Xe.prototype.constructor=He,Xe.prototype._version=3,Object.defineProperty(Xe.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),Xe.prototype.originalPositionFor=function(e){var t={generatedLine:we.getArg(e,"line"),generatedColumn:we.getArg(e,"column")},r=Ke.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},Xe.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},Xe.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},Xe.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer._findSourceIndex(we.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n)return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},Xe.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],s=n.consumer._sources.at(o.source);s=we.computeSourceURL(n.consumer.sourceRoot,s,this._sourceMapURL),this._sources.add(s),s=this._sources.indexOf(s);var c=null;o.name&&(c=n.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var u={source:s,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(u),"number"==typeof u.originalLine&&this.__originalMappings.push(u)}We(this.__generatedMappings,we.compareByGeneratedPositionsDeflated),We(this.__originalMappings,we.compareByOriginalPositions)};var Qe=ze.SourceMapGenerator,$e=/(\r?\n)/,Ze="$$$isSourceNode$$$";function et(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[Ze]=!0,null!=n&&this.add(n)}et.fromStringWithSourceMap=function(e,t,r){var n=new et,i=e.split($e),a=0,o=function(){return e()+(e()||"");function e(){return a<i.length?i[a++]:void 0}},s=1,c=0,u=null;return t.eachMapping(function(e){if(null!==u){if(!(s<e.generatedLine)){var t=(r=i[a]||"").substr(0,e.generatedColumn-c);return i[a]=r.substr(e.generatedColumn-c),c=e.generatedColumn,l(u,t),void(u=e)}l(u,o()),s++,c=0}for(;s<e.generatedLine;)n.add(o()),s++;if(c<e.generatedColumn){var r=i[a]||"";n.add(r.substr(0,e.generatedColumn)),i[a]=r.substr(e.generatedColumn),c=e.generatedColumn}u=e},this),a<i.length&&(u&&l(u,o()),n.add(i.splice(a).join(""))),t.sources.forEach(function(e){var i=t.sourceContentFor(e);null!=i&&(null!=r&&(e=we.join(r,e)),n.setSourceContent(e,i))}),n;function l(e,t){if(null===e||void 0===e.source)n.add(t);else{var i=r?we.join(r,e.source):e.source;n.add(new et(e.originalLine,e.originalColumn,i,t,e.name))}}},et.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[Ze]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},et.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[Ze]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},et.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[Ze]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},et.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},et.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[Ze]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},et.prototype.setSourceContent=function(e,t){this.sourceContents[we.toSetString(e)]=t},et.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][Ze]&&this.children[t].walkSourceContents(e);var n=Object.keys(this.sourceContents);for(t=0,r=n.length;t<r;t++)e(we.fromSetString(n[t]),this.sourceContents[n[t]])},et.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},et.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new Qe(e),n=!1,i=null,a=null,o=null,s=null;return this.walk(function(e,c){t.code+=e,null!==c.source&&null!==c.line&&null!==c.column?(i===c.source&&a===c.line&&o===c.column&&s===c.name||r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name}),i=c.source,a=c.line,o=c.column,s=c.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),i=null,n=!1);for(var u=0,l=e.length;u<l;u++)10===e.charCodeAt(u)?(t.line++,t.column=0,u+1===l?(i=null,n=!1):n&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}};var tt=[],rt=[],nt="undefined"!=typeof Uint8Array?Uint8Array:Array,it=!1;function at(){it=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)tt[t]=e[t],rt[e.charCodeAt(t)]=t;rt["-".charCodeAt(0)]=62,rt["_".charCodeAt(0)]=63}function ot(e,t,r){for(var n,i,a=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(tt[(i=n)>>18&63]+tt[i>>12&63]+tt[i>>6&63]+tt[63&i]);return a.join("")}function st(e){var t;it||at();for(var r=e.length,n=r%3,i="",a=[],o=0,s=r-n;o<s;o+=16383)a.push(ot(e,o,o+16383>s?s:o+16383));return 1===n?(t=e[r-1],i+=tt[t>>2],i+=tt[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=tt[t>>10],i+=tt[t>>4&63],i+=tt[t<<2&63],i+="="),a.push(i),a.join("")}function ct(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,_=r?i-1:0,d=r?-1:1,p=e[t+_];for(_+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+_],_+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+_],_+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)}function ut(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,_=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+_>=1?d/c:d*Math.pow(2,1-_))*c>=2&&(o++,c/=2),o+_>=l?(s=0,o=l):o+_>=1?(s=(t*c-1)*Math.pow(2,i),o+=_):(s=t*Math.pow(2,_-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*m}var lt={}.toString,_t=Array.isArray||function(e){return"[object Array]"==lt.call(e)};function dt(){return ft.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function pt(e,t){if(dt()<t)throw new RangeError("Invalid typed array length");return ft.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=ft.prototype:(null===e&&(e=new ft(t)),e.length=t),e}function ft(e,t,r){if(!(ft.TYPED_ARRAY_SUPPORT||this instanceof ft))return new ft(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return yt(this,e)}return mt(this,e,t,r)}function mt(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);ft.TYPED_ARRAY_SUPPORT?(e=t).__proto__=ft.prototype:e=ht(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!ft.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Dt(t,r),i=(e=pt(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(bt(t)){var r=0|vt(t.length);return 0===(e=pt(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?pt(e,0):ht(e,t);if("Buffer"===t.type&&_t(t.data))return ht(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function gt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function yt(e,t){if(gt(t),e=pt(e,t<0?0:0|vt(t)),!ft.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function ht(e,t){var r=t.length<0?0:0|vt(t.length);e=pt(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function vt(e){if(e>=dt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dt().toString(16)+" bytes");return 0|e}function bt(e){return!(null==e||!e._isBuffer)}function Dt(e,t){if(bt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ht(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Gt(e).length;default:if(n)return Ht(e).length;t=(""+t).toLowerCase(),n=!0}}function xt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function St(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=ft.from(t,n)),bt(t))return 0===t.length?-1:Tt(e,t,r,n,i);if("number"==typeof t)return t&=255,ft.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Tt(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Tt(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(u(e,a)===u(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===c)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){for(var _=!0,d=0;d<c;d++)if(u(e,a+d)!==u(t,d)){_=!1;break}if(_)return a}return-1}function Ct(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function Et(e,t,r,n){return Yt(Ht(t,e.length-r),e,r,n)}function kt(e,t,r,n){return Yt(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function Nt(e,t,r,n){return kt(e,t,r,n)}function At(e,t,r,n){return Yt(Gt(t),e,r,n)}function Ft(e,t,r,n){return Yt(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function Pt(e,t,r){return 0===t&&r===e.length?st(e):st(e.slice(t,r))}function wt(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,c,u=e[i],l=null,_=u>239?4:u>223?3:u>191?2:1;if(i+_<=r)switch(_){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,_=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=_}return function(e){var t=e.length;if(t<=It)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=It));return r}(n)}ft.TYPED_ARRAY_SUPPORT=void 0===G.TYPED_ARRAY_SUPPORT||G.TYPED_ARRAY_SUPPORT,ft.poolSize=8192,ft._augment=function(e){return e.__proto__=ft.prototype,e},ft.from=function(e,t,r){return mt(null,e,t,r)},ft.TYPED_ARRAY_SUPPORT&&(ft.prototype.__proto__=Uint8Array.prototype,ft.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&ft[Symbol.species]),ft.alloc=function(e,t,r){return function(e,t,r,n){return gt(t),t<=0?pt(e,t):void 0!==r?"string"==typeof n?pt(e,t).fill(r,n):pt(e,t).fill(r):pt(e,t)}(null,e,t,r)},ft.allocUnsafe=function(e){return yt(null,e)},ft.allocUnsafeSlow=function(e){return yt(null,e)},ft.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Xt(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Xt(e.slice(0,0))}(e))},ft.compare=function(e,t){if(!bt(e)||!bt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},ft.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ft.concat=function(e,t){if(!_t(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return ft.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=ft.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!bt(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},ft.byteLength=Dt,ft.prototype._isBuffer=!0,ft.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)xt(this,t,t+1);return this},ft.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)xt(this,t,t+3),xt(this,t+1,t+2);return this},ft.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)xt(this,t,t+7),xt(this,t+1,t+6),xt(this,t+2,t+5),xt(this,t+3,t+4);return this},ft.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?wt(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Lt(this,t,r);case"utf8":case"utf-8":return wt(this,t,r);case"ascii":return Ot(this,t,r);case"latin1":case"binary":return Mt(this,t,r);case"base64":return Pt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},ft.prototype.equals=function(e){if(!bt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===ft.compare(this,e)},ft.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},ft.prototype.compare=function(e,t,r,n,i){if(!bt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),l=0;l<s;++l)if(c[l]!==u[l]){a=c[l],o=u[l];break}return a<o?-1:o<a?1:0},ft.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},ft.prototype.indexOf=function(e,t,r){return St(this,e,t,r,!0)},ft.prototype.lastIndexOf=function(e,t,r){return St(this,e,t,r,!1)},ft.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return Ct(this,e,t,r);case"utf8":case"utf-8":return Et(this,e,t,r);case"ascii":return kt(this,e,t,r);case"latin1":case"binary":return Nt(this,e,t,r);case"base64":return At(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},ft.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var It=4096;function Ot(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function Mt(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function Lt(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=Wt(e[a]);return i}function Rt(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function Bt(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function jt(e,t,r,n,i,a){if(!bt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function Jt(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function zt(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function Kt(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ut(e,t,r,n,i){return i||Kt(e,0,r,4),ut(e,t,r,n,23,4),r+4}function Vt(e,t,r,n,i){return i||Kt(e,0,r,8),ut(e,t,r,n,52,8),r+8}ft.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),ft.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=ft.prototype;else{var i=t-e;r=new ft(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},ft.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||Bt(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},ft.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||Bt(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},ft.prototype.readUInt8=function(e,t){return t||Bt(e,1,this.length),this[e]},ft.prototype.readUInt16LE=function(e,t){return t||Bt(e,2,this.length),this[e]|this[e+1]<<8},ft.prototype.readUInt16BE=function(e,t){return t||Bt(e,2,this.length),this[e]<<8|this[e+1]},ft.prototype.readUInt32LE=function(e,t){return t||Bt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ft.prototype.readUInt32BE=function(e,t){return t||Bt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ft.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Bt(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},ft.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Bt(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},ft.prototype.readInt8=function(e,t){return t||Bt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ft.prototype.readInt16LE=function(e,t){t||Bt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},ft.prototype.readInt16BE=function(e,t){t||Bt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},ft.prototype.readInt32LE=function(e,t){return t||Bt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ft.prototype.readInt32BE=function(e,t){return t||Bt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ft.prototype.readFloatLE=function(e,t){return t||Bt(e,4,this.length),ct(this,e,!0,23,4)},ft.prototype.readFloatBE=function(e,t){return t||Bt(e,4,this.length),ct(this,e,!1,23,4)},ft.prototype.readDoubleLE=function(e,t){return t||Bt(e,8,this.length),ct(this,e,!0,52,8)},ft.prototype.readDoubleBE=function(e,t){return t||Bt(e,8,this.length),ct(this,e,!1,52,8)},ft.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||jt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},ft.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||jt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},ft.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,1,255,0),ft.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ft.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,2,65535,0),ft.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Jt(this,e,t,!0),t+2},ft.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,2,65535,0),ft.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Jt(this,e,t,!1),t+2},ft.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,4,4294967295,0),ft.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):zt(this,e,t,!0),t+4},ft.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,4,4294967295,0),ft.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):zt(this,e,t,!1),t+4},ft.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);jt(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},ft.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);jt(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},ft.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,1,127,-128),ft.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ft.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,2,32767,-32768),ft.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Jt(this,e,t,!0),t+2},ft.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,2,32767,-32768),ft.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Jt(this,e,t,!1),t+2},ft.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,4,2147483647,-2147483648),ft.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):zt(this,e,t,!0),t+4},ft.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||jt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ft.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):zt(this,e,t,!1),t+4},ft.prototype.writeFloatLE=function(e,t,r){return Ut(this,e,t,!0,r)},ft.prototype.writeFloatBE=function(e,t,r){return Ut(this,e,t,!1,r)},ft.prototype.writeDoubleLE=function(e,t,r){return Vt(this,e,t,!0,r)},ft.prototype.writeDoubleBE=function(e,t,r){return Vt(this,e,t,!1,r)},ft.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!ft.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},ft.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!ft.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=bt(e)?e:Ht(new ft(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var qt=/[^+\/0-9A-Za-z-_]/g;function Wt(e){return e<16?"0"+e.toString(16):e.toString(16)}function Ht(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Gt(e){return function(e){var t,r,n,i,a,o;it||at();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new nt(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t<n;t+=4,r+=3)i=rt[e.charCodeAt(t)]<<18|rt[e.charCodeAt(t+1)]<<12|rt[e.charCodeAt(t+2)]<<6|rt[e.charCodeAt(t+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=rt[e.charCodeAt(t)]<<2|rt[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=rt[e.charCodeAt(t)]<<10|rt[e.charCodeAt(t+1)]<<4|rt[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(qt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Yt(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Xt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Qt=Object.prototype.toString,$t="function"==typeof ft.alloc&&"function"==typeof ft.allocUnsafe&&"function"==typeof ft.from;var Zt,er=function(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return n=e,"ArrayBuffer"===Qt.call(n).slice(8,-1)?function(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=n;else if((r>>>=0)>n)throw new RangeError("'length' is out of bounds");return $t?ft.from(e.slice(t,t+r)):new ft(new Uint8Array(e.slice(t,t+r)))}(e,t,r):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ft.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return $t?ft.from(e,t):new ft(e,t)}(e,t):$t?ft.from(e):new ft(e);var n},tr={},rr=(Object.freeze({default:tr}),De&&be||De),nr=Te&&Se||Te,ir=rr;try{(Zt=nr).existsSync&&Zt.readFileSync||(Zt=null)}catch(e){}var ar="auto",or={},sr=/^data:application\/json[^,]+base64,/,cr=[],ur=[];function lr(){return"browser"===ar||"node"!==ar&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function _r(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var dr=_r(cr);function pr(e,t){if(!e)return t;var r=ir.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",a=r.slice(i.length);return i&&/^\/\w\:/.test(a)?(i+="/")+ir.resolve(r.slice(i.length),t).replace(/\\/g,"/"):i+ir.resolve(r.slice(i.length),t)}cr.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(e,t){return t?"":"/"})),e in or)return or[e];var t=null;if(Zt){if(Zt.existsSync(e))try{t=Zt.readFileSync(e,"utf8")}catch(e){t=""}}else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null);t=null;4===r.readyState&&200===r.status&&(t=r.responseText)}return or[e]=t});_r(ur);ur.push(function(e){var t,r=function(e){var t;if(lr())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=4===r.readyState?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch(e){}t=dr(e);for(var i,a,o=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!r)return null;if(sr.test(r)){var n=r.slice(r.indexOf(",")+1);t=er(n,"base64").toString(),r=e}else r=pr(e,r),t=dr(r);return t?{url:r,map:t}:null});cr.slice(0),ur.slice(0);var fr=a(function(e){var t,i=r&&r.__assign||function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=r&&r.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},o=r&&r.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},s=r&&r.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)},function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});!function(e){e.versionMajorMinor="3.4",e.version=e.versionMajorMinor+".1"}(c||(c={})),function(e){!function(e){e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan"}(e.Comparison||(e.Comparison={}))}(c||(c={})),function(e){function t(){var e=Object.create(null);return e.__=void 0,delete e.__,e}function r(){return new e.MapCtr}function n(){var e=function(){function e(e,t){this.currentEntry=e,this.selector=t}return e.prototype.next=function(){for(;this.currentEntry;){var e=!!this.currentEntry.skipNext;if(this.currentEntry=this.currentEntry.nextEntry,!e)break}return this.currentEntry?{value:this.selector(this.currentEntry.key,this.currentEntry.value),done:!1}:{value:void 0,done:!0}},e}();return function(){function r(){this.data=t(),this.size=0,this.firstEntry={},this.lastEntry=this.firstEntry}return r.prototype.get=function(e){var t=this.data[e];return t&&t.value},r.prototype.set=function(e,t){if(this.has(e))this.data[e].value=t;else{this.size++;var r={key:e,value:t};this.data[e]=r;var n=this.lastEntry;n.nextEntry=r,r.previousEntry=n,this.lastEntry=r}return this},r.prototype.has=function(e){return e in this.data},r.prototype.delete=function(e){if(this.has(e)){this.size--;var t=this.data[e];delete this.data[e];var r=t.previousEntry;return r.nextEntry=t.nextEntry,t.nextEntry&&(t.nextEntry.previousEntry=r),this.lastEntry===t&&(this.lastEntry=r),t.previousEntry=void 0,t.nextEntry=r,t.skipNext=!0,!0}return!1},r.prototype.clear=function(){this.data=t(),this.size=0;for(var e=this.firstEntry,r=e.nextEntry;r;){var n=r.nextEntry;r.previousEntry=void 0,r.nextEntry=e,r.skipNext=!0,r=n}e.nextEntry=void 0,this.lastEntry=e},r.prototype.keys=function(){return new e(this.firstEntry,function(e){return e})},r.prototype.values=function(){return new e(this.firstEntry,function(e,t){return t})},r.prototype.entries=function(){return new e(this.firstEntry,function(e,t){return[e,t]})},r.prototype.forEach=function(e){for(var t=this.entries();;){var r=t.next(),n=r.value;if(r.done)break;e(n[1],n[0])}},r}()}function i(e,t,r){if(void 0===r&&(r=P),e)for(var n=0,i=e;n<i.length;n++){if(r(i[n],t))return!0}return!1}function a(e,t){var r;if(e){r=[];for(var n=0;n<e.length;n++)r.push(t(e[n],n))}return r}function o(e,t){if(e){if(!t)return e.length>0;for(var r=0,n=e;r<n.length;r++){if(t(n[r]))return!0}}return!1}function s(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)}function c(e,t){return t<0?e.length+t:t}function u(e,t,r,n){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(r,n);r=void 0===r?0:c(t,r),n=void 0===n?t.length:c(t,n);for(var i=r;i<n&&i<t.length;i++)void 0!==t[i]&&e.push(t[i]);return e}function l(e,t,r){return!i(e,t,r)&&(e.push(t),!0)}function _(e,t,r){t.sort(function(t,n){return r(e[t],e[n])||I(t,n)})}function d(e,t){return 0===e.length?e:e.slice().sort(t)}function p(e){var t=0;return{next:function(){return t===e.length?{value:void 0,done:!0}:{value:e[++t-1],done:!1}}}}function m(e,t,r,n,i){return g(e,r(t),r,n,i)}function g(e,t,r,n,i){if(!o(e))return-1;for(var a=i||0,s=e.length-1;a<=s;){var c=a+(s-a>>1);switch(n(r(e[c]),t)){case-1:a=c+1;break;case 0:return c;case 1:s=c-1}}return~a}function y(e,t,r,n,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===n||n<0?0:n,s=void 0===i||o+i>a-1?a-1:o+i,c=void 0;for(arguments.length<=2?(c=e[o],o++):c=r;o<=s;)c=t(c,e[o],o),o++;return c}}return r}e.emptyArray=[],e.createMap=r,e.createMapFromEntries=function(e){for(var t=r(),n=0,i=e;n<i.length;n++){var a=i[n],o=a[0],s=a[1];t.set(o,s)}return t},e.createMapFromTemplate=function(t){var r=new e.MapCtr;for(var n in t)v.call(t,n)&&r.set(n,t[n]);return r},e.MapCtr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:n(),e.shimMap=n,e.length=function(e){return e?e.length:0},e.forEach=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(n)return n}},e.firstDefined=function(e,t){if(void 0!==e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(void 0!==n)return n}},e.firstDefinedIterator=function(e,t){for(;;){var r=e.next(),n=r.value;if(r.done)return;var i=t(n);if(void 0!==i)return i}},e.zipWith=function(e,t,r){var n=[];h.assertEqual(e.length,t.length);for(var i=0;i<e.length;i++)n.push(r(e[i],t[i],i));return n},e.zipToIterator=function(e,t){h.assertEqual(e.length,t.length);var r=0;return{next:function(){return r===e.length?{value:void 0,done:!0}:{value:[e[++r-1],t[r-1]],done:!1}}}},e.zipToMap=function(e,t){h.assert(e.length===t.length);for(var n=r(),i=0;i<e.length;++i)n.set(e[i],t[i]);return n},e.every=function(e,t){if(e)for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0},e.find=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t(n,r))return n}},e.findLast=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(t(n,r))return n}},e.findIndex=function(e,t,r){for(var n=r||0;n<e.length;n++)if(t(e[n],n))return n;return-1},e.findLastIndex=function(e,t,r){for(var n=void 0===r?e.length-1:r;n>=0;n--)if(t(e[n],n))return n;return-1},e.findMap=function(e,t){for(var r=0;r<e.length;r++){var n=t(e[r],r);if(n)return n}return h.fail()},e.contains=i,e.arraysEqual=function(e,t,r){return void 0===r&&(r=P),e.length===t.length&&e.every(function(e,n){return r(e,t[n])})},e.indexOfAnyCharCode=function(e,t,r){for(var n=r||0;n<e.length;n++)if(i(t,e.charCodeAt(n)))return n;return-1},e.countWhere=function(e,t){var r=0;if(e)for(var n=0;n<e.length;n++)t(e[n],n)&&r++;return r},e.filter=function(e,t){if(e){for(var r=e.length,n=0;n<r&&t(e[n]);)n++;if(n<r){var i=e.slice(0,n);for(n++;n<r;){var a=e[n];t(a)&&i.push(a),n++}return i}}return e},e.filterMutate=function(e,t){for(var r=0,n=0;n<e.length;n++)t(e[n],n,e)&&(e[r]=e[n],r++);e.length=r},e.clear=function(e){e.length=0},e.map=a,e.mapIterator=function(e,t){return{next:function(){var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}},e.sameMap=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=e[r],i=t(n,r);if(n!==i){var a=e.slice(0,r);for(a.push(i),r++;r<e.length;r++)a.push(t(e[r],r));return a}}return e},e.flatten=function(e){var t;if(e){t=[];for(var r=0,n=e;r<n.length;r++){var i=n[r];i&&(E(i)?u(t,i):t.push(i))}}return t},e.flatMap=function(t,r){var n;if(t)for(var i=0;i<t.length;i++){var a=r(t[i],i);a&&(n=E(a)?u(n,a):s(n,a))}return n||e.emptyArray},e.flatMapToMutable=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);i&&(E(i)?u(r,i):r.push(i))}return r},e.flatMapIterator=function(t,r){var n=t.next();if(n.done)return e.emptyIterator;var i=a(n.value);return{next:function(){for(;;){var e=i.next();if(!e.done)return e;var r=t.next();if(r.done)return r;i=a(r.value)}}};function a(t){var n=r(t);return void 0===n?e.emptyIterator:E(n)?p(n):n}},e.sameFlatMap=function(e,t){var r;if(e)for(var n=0;n<e.length;n++){var i=e[n],a=t(i,n);(r||i!==a||E(a))&&(r||(r=e.slice(0,n)),E(a)?u(r,a):r.push(a))}return r||e},e.mapAllOrFail=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);if(void 0===i)return;r.push(i)}return r},e.mapDefined=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);void 0!==i&&r.push(i)}return r},e.mapDefinedIterator=function(e,t){return{next:function(){for(;;){var r=e.next();if(r.done)return r;var n=t(r.value);if(void 0!==n)return{value:n,done:!1}}}}},e.emptyIterator={next:function(){return{value:void 0,done:!0}}},e.singleIterator=function(e){var t=!1;return{next:function(){var r=t;return t=!0,r?{value:void 0,done:!0}:{value:e,done:!1}}}},e.spanMap=function(e,t,r){var n;if(e){n=[];for(var i=e.length,a=void 0,o=void 0,s=0,c=0;s<i;){for(;c<i;){if(o=t(e[c],c),0===c)a=o;else if(o!==a)break;c++}if(s<c){var u=r(e.slice(s,c),a,s,c);u&&n.push(u),s=c}a=o,c++}}return n},e.mapEntries=function(e,t){if(e){var n=r();return e.forEach(function(e,r){var i=t(r,e),a=i[0],o=i[1];n.set(a,o)}),n}},e.some=o,e.getRangesWhere=function(e,t,r){for(var n,i=0;i<e.length;i++)t(e[i])?n=void 0===n?i:n:void 0!==n&&(r(n,i),n=void 0);void 0!==n&&r(n,e.length)},e.concatenate=function(e,t){return o(t)?o(e)?e.concat(t):t:e},e.deduplicate=function(e,t,r){return 0===e.length?[]:1===e.length?e.slice():r?function(e,t,r){var n=e.map(function(e,t){return t});_(e,n,r);for(var i=e[n[0]],a=[n[0]],o=1;o<n.length;o++){var s=n[o],c=e[s];t(i,c)||(a.push(s),i=c)}return a.sort(),a.map(function(t){return e[t]})}(e,t,r):function(e,t){for(var r=[],n=0,i=e;n<i.length;n++)l(r,i[n],t);return r}(e,t)},e.insertSorted=function(e,t,r){if(0!==e.length){var n=m(e,t,N,r);n<0&&e.splice(~n,0,t)}else e.push(t)},e.sortAndDeduplicate=function(t,r,n){return function(t,r){if(0===t.length)return e.emptyArray;for(var n=t[0],i=[n],a=1;a<t.length;a++){var o=t[a];switch(r(o,n)){case!0:case 0:continue;case-1:return h.fail("Array is unsorted.")}i.push(n=o)}return i}(d(t,r),n||r||M)},e.arrayIsEqualTo=function(e,t,r){if(void 0===r&&(r=P),!e||!t)return e===t;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t[n],n))return!1;return!0},e.compact=function(e){var t;if(e)for(var r=0;r<e.length;r++){var n=e[r];!t&&n||(t||(t=e.slice(0,r)),n&&t.push(n))}return t||e},e.relativeComplement=function(e,t,r){if(!t||!e||0===t.length||0===e.length)return t;var n=[];e:for(var i=0,a=0;a<t.length;a++){a>0&&h.assertGreaterThanOrEqual(r(t[a],t[a-1]),0);t:for(var o=i;i<e.length;i++)switch(i>o&&h.assertGreaterThanOrEqual(r(e[i],e[i-1]),0),r(t[a],e[i])){case-1:n.push(t[a]);continue e;case 0:continue e;case 1:continue t}}return n},e.sum=function(e,t){for(var r=0,n=0,i=e;n<i.length;n++)r+=i[n][t];return r},e.append=s,e.addRange=u,e.pushIfUnique=l,e.appendIfUnique=function(e,t,r){return e?(l(e,t,r),e):[t]},e.sort=d,e.arrayIterator=p,e.arrayReverseIterator=function(e){var t=e.length;return{next:function(){return 0===t?{value:void 0,done:!0}:{value:e[--t],done:!1}}}},e.stableSort=function(e,t){var r=e.map(function(e,t){return t});return _(e,r,t),r.map(function(t){return e[t]})},e.rangeEquals=function(e,t,r,n){for(;r<n;){if(e[r]!==t[r])return!1;r++}return!0},e.elementAt=function(e,t){if(e&&(t=c(e,t))<e.length)return e[t]},e.firstOrUndefined=function(e){return 0===e.length?void 0:e[0]},e.first=function(e){return h.assert(0!==e.length),e[0]},e.lastOrUndefined=function(e){return 0===e.length?void 0:e[e.length-1]},e.last=function(e){return h.assert(0!==e.length),e[e.length-1]},e.singleOrUndefined=function(e){return e&&1===e.length?e[0]:void 0},e.singleOrMany=function(e){return e&&1===e.length?e[0]:e},e.replaceElement=function(e,t,r){var n=e.slice(0);return n[t]=r,n},e.binarySearch=m,e.binarySearchKey=g,e.reduceLeft=y;var h,v=Object.prototype.hasOwnProperty;function b(e,t){return v.call(e,t)}function D(e,t){for(var r,n=[],i=e.next(),a=i.value,o=i.done;!o;a=(r=e.next()).value,o=r.done,r)n.push(t?t(a):a);return n}function x(e,t,r){void 0===r&&(r=N);for(var n=S(),i=0,a=e;i<a.length;i++){var o=a[i];n.add(t(o),r(o))}return n}function S(){var e=r();return e.add=T,e.remove=C,e}function T(e,t){var r=this.get(e);return r?r.push(t):this.set(e,r=[t]),r}function C(e,t){var r=this.get(e);r&&(V(r,t),r.length||this.delete(e))}function E(e){return Array.isArray?Array.isArray(e):e instanceof Array}function k(e){}function N(e){return e}function A(e){return e.toLowerCase()}function F(e,t,r,n,i){if(i){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return function(e){return y(a,function(e,t){return t(e)},e)}}return n?function(i){return n(r(t(e(i))))}:r?function(n){return r(t(e(n)))}:t?function(r){return t(e(r))}:e?function(t){return e(t)}:function(e){return e}}function P(e,t){return e===t}function w(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e<t?-1:1}function I(e,t){return w(e,t)}function O(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function M(e,t){return w(e,t)}e.hasProperty=b,e.getProperty=function(e,t){return v.call(e,t)?e[t]:void 0},e.getOwnKeys=function(e){var t=[];for(var r in e)v.call(e,r)&&t.push(r);return t},e.getOwnValues=function(e){var t=[];for(var r in e)v.call(e,r)&&t.push(e[r]);return t},e.arrayFrom=D,e.assign=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];if(void 0!==a)for(var o in a)b(a,o)&&(e[o]=a[o])}return e},e.equalOwnProperties=function(e,t,r){if(void 0===r&&(r=P),e===t)return!0;if(!e||!t)return!1;for(var n in e)if(v.call(e,n)){if(!v.call(t,n))return!1;if(!r(e[n],t[n]))return!1}for(var n in t)if(v.call(t,n)&&!v.call(e,n))return!1;return!0},e.arrayToMap=function(e,t,n){void 0===n&&(n=N);for(var i=r(),a=0,o=e;a<o.length;a++){var s=o[a],c=t(s);void 0!==c&&i.set(c,n(s))}return i},e.arrayToNumericMap=function(e,t,r){void 0===r&&(r=N);for(var n=[],i=0,a=e;i<a.length;i++){var o=a[i];n[t(o)]=r(o)}return n},e.arrayToMultiMap=x,e.group=function(e,t){return D(x(e,t).values())},e.clone=function(e){var t={};for(var r in e)v.call(e,r)&&(t[r]=e[r]);return t},e.extend=function(e,t){var r={};for(var n in t)v.call(t,n)&&(r[n]=t[n]);for(var n in e)v.call(e,n)&&(r[n]=e[n]);return r},e.copyProperties=function(e,t){for(var r in t)v.call(t,r)&&(e[r]=t[r])},e.maybeBind=function(e,t){return t?t.bind(e):void 0},e.createMultiMap=S,e.isArray=E,e.toArray=function(e){return E(e)?e:[e]},e.isString=function(e){return"string"==typeof e},e.isNumber=function(e){return"number"==typeof e},e.tryCast=function(e,t){return void 0!==e&&t(e)?e:void 0},e.cast=function(e,t){return void 0!==e&&t(e)?e:h.fail("Invalid cast. The supplied value "+e+" did not pass the test '"+h.getFunctionName(t)+"'.")},e.noop=k,e.returnFalse=function(){return!1},e.returnTrue=function(){return!0},e.returnUndefined=function(){},e.identity=N,e.toLowerCase=A,e.notImplemented=function(){throw new Error("Not implemented")},e.memoize=function(e){var t;return function(){return e&&(t=e(),e=void 0),t}},e.chain=function(e,t,r,n,i){if(i){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return function(e){return F.apply(void 0,a(o,function(t){return t(e)}))}}return n?function(i){return F(e(i),t(i),r(i),n(i))}:r?function(n){return F(e(n),t(n),r(n))}:t?function(r){return F(e(r),t(r))}:e?function(t){return F(e(t))}:function(e){return function(e){return e}}},e.compose=F,function(e){e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive"}(e.AssertionLevel||(e.AssertionLevel={})),function(e){function t(e,r){var n=new Error(e?"Debug Failure. "+e:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(n,r||t),n}function r(e,r){return void 0===e||null===e?t(r):e}e.currentAssertionLevel=0,e.isDebugging=!1,e.shouldAssert=function(t){return e.currentAssertionLevel>=t},e.assert=function e(r,n,i,a){r||(i&&(n+="\r\nVerbose Debug Information: "+("string"==typeof i?i:i())),t(n?"False expression: "+n:"False expression.",a||e))},e.assertEqual=function(e,r,n,i){e!==r&&t("Expected "+e+" === "+r+". "+(n?i?n+" "+i:n:""))},e.assertLessThan=function(e,r,n){e>=r&&t("Expected "+e+" < "+r+". "+(n||""))},e.assertLessThanOrEqual=function(e,r){e>r&&t("Expected "+e+" <= "+r)},e.assertGreaterThanOrEqual=function(e,r){e<r&&t("Expected "+e+" >= "+r)},e.fail=t,e.assertDefined=r,e.assertEachDefined=function(e,t){for(var n=0,i=e;n<i.length;n++)r(i[n],t);return e},e.assertNever=function r(n,i,a){return void 0===i&&(i="Illegal value:"),t(i+" "+("object"===f(n)&&"kind"in n&&"pos"in n?"SyntaxKind: "+e.showSyntaxKind(n):JSON.stringify(n)),a||r)},e.getFunctionName=function(e){if("function"!=typeof e)return"";if(e.hasOwnProperty("name"))return e.name;var t=Function.prototype.toString.call(e),r=/^function\s+([\w\$]+)\s*\(/.exec(t);return r?r[1]:""}}(h=e.Debug||(e.Debug={})),e.equateValues=P,e.equateStringsCaseInsensitive=function(e,t){return e===t||void 0!==e&&void 0!==t&&e.toUpperCase()===t.toUpperCase()},e.equateStringsCaseSensitive=function(e,t){return P(e,t)},e.compareValues=I,e.min=function(e,t,r){return-1===r(e,t)?e:t},e.compareStringsCaseInsensitive=O,e.compareStringsCaseSensitive=M,e.getStringComparer=function(e){return e?O:M};var L,R,B=function(){var e,t,r=function(){if("object"===("undefined"==typeof Intl?"undefined":f(Intl))&&"function"==typeof Intl.Collator)return i;if("function"==typeof String.prototype.localeCompare&&"function"==typeof String.prototype.toLocaleUpperCase&&"a".localeCompare("B")<0)return a;return o}();return function(n){return void 0===n?e||(e=r(n)):"en-US"===n?t||(t=r(n)):r(n)};function n(e,t,r){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;var n=r(e,t);return n<0?-1:n>0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,r){return n(e,r,t)}}function a(e){return void 0!==e?o():function(e,r){return n(e,r,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,r){return n(t,r,e)};function e(e,r){return t(e.toUpperCase(),r.toUpperCase())||t(e,r)}function t(e,t){return e<t?-1:e>t?1:0}}}();function j(e,t,r){for(var n=new Array(t.length+1),i=new Array(t.length+1),a=r+1,o=0;o<=t.length;o++)n[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),c=o>r?o-r:1,u=t.length>r+o?r+o:t.length;i[0]=o;for(var l=o,_=1;_<c;_++)i[_]=a;for(_=c;_<=u;_++){var d=s===t.charCodeAt(_-1)?n[_-1]:Math.min(n[_]+1,i[_-1]+1,n[_-1]+2);i[_]=d,l=Math.min(l,d)}for(_=u+1;_<=t.length;_++)i[_]=a;if(l>r)return;var p=n;n=i,i=p}var f=n[t.length];return f>r?void 0:f}function J(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function z(e,t){return e.length>t.length&&J(e,t)}function K(e,t){for(var r=t;r<e.length-1;r++)e[r]=e[r+1];e.pop()}function U(e,t){e[t]=e[e.length-1],e.pop()}function V(e,t){return function(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return U(e,r),!0;return!1}(e,function(e){return e===t})}function q(e,t){return 0===e.lastIndexOf(t,0)}function W(e,t){var r=e.prefix,n=e.suffix;return t.length>=r.length+n.length&&q(t,r)&&J(t,n)}e.getUILocale=function(){return R},e.setUILocale=function(e){R!==e&&(R=e,L=void 0)},e.compareStringsCaseSensitiveUI=function(e,t){return(L||(L=B(R)))(e,t)},e.compareProperties=function(e,t,r,n){return e===t?0:void 0===e?-1:void 0===t?1:n(e[r],t[r])},e.compareBooleans=function(e,t){return I(e?1:0,t?1:0)},e.getSpellingSuggestion=function(e,t,r){for(var n,i=Math.min(2,Math.floor(.34*e.length)),a=Math.floor(.4*e.length)+1,o=!1,s=e.toLowerCase(),c=0,u=t;c<u.length;c++){var l=u[c],_=r(l);if(void 0!==_&&Math.abs(_.length-s.length)<=i){var d=_.toLowerCase();if(d===s){if(_===e)continue;return l}if(o)continue;if(_.length<3)continue;var p=j(s,d,a-1);if(void 0===p)continue;p<3?(o=!0,n=l):(h.assert(p<a),a=p,n=l)}}return n},e.endsWith=J,e.removeSuffix=function(e,t){return J(e,t)?e.slice(0,e.length-t.length):e},e.tryRemoveSuffix=function(e,t){return J(e,t)?e.slice(0,e.length-t.length):void 0},e.stringContains=function(e,t){return-1!==e.indexOf(t)},e.fileExtensionIs=z,e.fileExtensionIsOneOf=function(e,t){for(var r=0,n=t;r<n.length;r++)if(z(e,n[r]))return!0;return!1},e.removeMinAndVersionNumbers=function(e){var t=/[.-]((min)|(\d+(\.\d+)*))$/;return e.replace(t,"").replace(t,"")},e.orderedRemoveItem=function(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return K(e,r),!0;return!1},e.orderedRemoveItemAt=K,e.unorderedRemoveItemAt=U,e.unorderedRemoveItem=V,e.createGetCanonicalFileName=function(e){return e?N:A},e.patternText=function(e){return e.prefix+"*"+e.suffix},e.matchedText=function(e,t){return h.assert(W(e,t)),t.substring(e.prefix.length,t.length-e.suffix.length)},e.findBestPatternMatch=function(e,t,r){for(var n,i=-1,a=0,o=e;a<o.length;a++){var s=o[a],c=t(s);W(c,r)&&c.prefix.length>i&&(i=c.prefix.length,n=s)}return n},e.startsWith=q,e.removePrefix=function(e,t){return q(e,t)?e.substr(t.length):e},e.tryRemovePrefix=function(e,t,r){return void 0===r&&(r=N),q(r(e),r(t))?e.substring(t.length):void 0},e.and=function(e,t){return function(r){return e(r)&&t(r)}},e.or=function(e,t){return function(r){return e(r)||t(r)}},e.assertType=function(e){},e.singleElementArray=function(e){return void 0===e?void 0:[e]},e.enumerateInsertsAndDeletes=function(e,t,r,n,i,a){a=a||k;for(var o=0,s=0,c=e.length,u=t.length;o<c&&s<u;){var l=e[o],_=t[s],d=r(l,_);-1===d?(n(l),o++):1===d?(i(_),s++):(a(_,l),o++,s++)}for(;o<c;)n(e[o++]);for(;s<u;)i(t[s++])},e.fill=function(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t(n);return r}}(c||(c={})),function(e){e.timestamp="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:Date.now?Date.now:function(){return+new Date}}(c||(c={})),function(e){!function(t){var r,n,i,a="function"==typeof onProfilerEvent&&!0===onProfilerEvent.profiler?onProfilerEvent:function(){},o=!1,s=0;function c(t,r,n){var i=0;return{enter:function(){1==++i&&u(r)},exit:function(){0==--i?(u(n),l(t,r,n)):i<0&&e.Debug.fail("enter/exit count does not match.")}}}function u(t){o&&(n.set(t,e.timestamp()),r.set(t,(r.get(t)||0)+1),a(t))}function l(t,r,a){if(o){var c=a&&n.get(a)||e.timestamp(),u=r&&n.get(r)||s;i.set(t,(i.get(t)||0)+(c-u))}}t.createTimerIf=function(e,r,n,i){return e?c(r,n,i):t.nullTimer},t.createTimer=c,t.nullTimer={enter:e.noop,exit:e.noop},t.mark=u,t.measure=l,t.getCount=function(e){return r&&r.get(e)||0},t.getDuration=function(e){return i&&i.get(e)||0},t.forEachMeasure=function(e){i.forEach(function(t,r){e(r,t)})},t.enable=function(){r=e.createMap(),n=e.createMap(),i=e.createMap(),o=!0,s=e.timestamp()},t.disable=function(){o=!1}}(e.performance||(e.performance={}))}(c||(c={})),function(e){var t=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,r=/^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i,n=/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i,i=/^(0|[1-9]\d*)$/,a=function(){function t(t,i,a,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=""),void 0===c&&(c=""),"string"==typeof t){var u=e.Debug.assertDefined(o(t),"Invalid version");t=u.major,i=u.minor,a=u.patch,s=u.prerelease,c=u.build}e.Debug.assert(t>=0,"Invalid argument: major"),e.Debug.assert(i>=0,"Invalid argument: minor"),e.Debug.assert(a>=0,"Invalid argument: patch"),e.Debug.assert(!s||r.test(s),"Invalid argument: prerelease"),e.Debug.assert(!c||n.test(c),"Invalid argument: build"),this.major=t,this.minor=i,this.patch=a,this.prerelease=s?s.split("."):e.emptyArray,this.build=c?c.split("."):e.emptyArray}return t.tryParse=function(e){var r=o(e);if(r)return new t(r.major,r.minor,r.patch,r.prerelease,r.build)},t.prototype.compareTo=function(t){return this===t?0:void 0===t?1:e.compareValues(this.major,t.major)||e.compareValues(this.minor,t.minor)||e.compareValues(this.patch,t.patch)||function(t,r){if(t===r)return 0;if(0===t.length)return 0===r.length?0:1;if(0===r.length)return-1;for(var n=Math.min(t.length,r.length),a=0;a<n;a++){var o=t[a],s=r[a];if(o!==s){var c=i.test(o),u=i.test(s);if(c||u){if(c!==u)return c?-1:1;var l=e.compareValues(+o,+s);if(l)return l}else{var l=e.compareStringsCaseSensitive(o,s);if(l)return l}}}return e.compareValues(t.length,r.length)}(this.prerelease,t.prerelease)},t.prototype.increment=function(r){switch(r){case"major":return new t(this.major+1,0,0);case"minor":return new t(this.major,this.minor+1,0);case"patch":return new t(this.major,this.minor,this.patch+1);default:return e.Debug.assertNever(r)}},t.prototype.toString=function(){var t=this.major+"."+this.minor+"."+this.patch;return e.some(this.prerelease)&&(t+="-"+this.prerelease.join(".")),e.some(this.build)&&(t+="+"+this.build.join(".")),t},t.zero=new t(0,0,0),t}();function o(e){var i=t.exec(e);if(i){var a=i[1],o=i[2],s=void 0===o?"0":o,c=i[3],u=void 0===c?"0":c,l=i[4],_=void 0===l?"":l,d=i[5],p=void 0===d?"":d;if((!_||r.test(_))&&(!p||n.test(p)))return{major:parseInt(a,10),minor:parseInt(s,10),patch:parseInt(u,10),prerelease:_,build:p}}}e.Version=a;var s=function(){function t(t){this._alternatives=t?e.Debug.assertDefined(p(t),"Invalid range spec."):e.emptyArray}return t.tryParse=function(e){var r=p(e);if(r){var n=new t("");return n._alternatives=r,n}},t.prototype.test=function(e){return"string"==typeof e&&(e=new a(e)),function(e,t){if(0===t.length)return!0;for(var r=0,n=t;r<n.length;r++){var i=n[r];if(v(e,i))return!0}return!1}(e,this._alternatives)},t.prototype.toString=function(){return t=this._alternatives,e.map(t,D).join(" || ")||"*";var t},t}();e.VersionRange=s;var c=/\s*\|\|\s*/g,u=/\s+/g,l=/^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,_=/^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i,d=/^\s*(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;function p(e){for(var t=[],r=0,n=e.trim().split(c);r<n.length;r++){var i=n[r];if(i){var a=[],o=_.exec(i);if(o){if(!m(o[1],o[2],a))return}else for(var s=0,l=i.split(u);s<l.length;s++){var p=l[s],f=d.exec(p);if(!f||!g(f[1],f[2],a))return}t.push(a)}}return t}function f(e){var t=l.exec(e);if(t){var r=t[1],n=t[2],i=void 0===n?"*":n,o=t[3],s=void 0===o?"*":o,c=t[4],u=t[5];return{version:new a(y(r)?0:parseInt(r,10),y(r)||y(i)?0:parseInt(i,10),y(r)||y(i)||y(s)?0:parseInt(s,10),c,u),major:r,minor:i,patch:s}}}function m(e,t,r){var n=f(e);if(!n)return!1;var i=f(t);return!!i&&(y(n.major)||r.push(h(">=",n.version)),y(i.major)||r.push(y(i.minor)?h("<",i.version.increment("major")):y(i.patch)?h("<",i.version.increment("minor")):h("<=",i.version)),!0)}function g(e,t,r){var n=f(t);if(!n)return!1;var i=n.version,o=n.major,s=n.minor,c=n.patch;if(y(o))"<"!==e&&">"!==e||r.push(h("<",a.zero));else switch(e){case"~":r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")));break;case"^":r.push(h(">=",i)),r.push(h("<",i.increment(i.major>0||y(s)?"major":i.minor>0||y(c)?"minor":"patch")));break;case"<":case">=":r.push(h(e,i));break;case"<=":case">":r.push(y(s)?h("<="===e?"<":">=",i.increment("major")):y(c)?h("<="===e?"<":">=",i.increment("minor")):h(e,i));break;case"=":case void 0:y(s)||y(c)?(r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")))):r.push(h("=",i));break;default:return!1}return!0}function y(e){return"*"===e||"x"===e||"X"===e}function h(e,t){return{operator:e,operand:t}}function v(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!b(e,i.operator,i.operand))return!1}return!0}function b(t,r,n){var i=t.compareTo(n);switch(r){case"<":return i<0;case"<=":return i<=0;case">":return i>0;case">=":return i>=0;case"=":return 0===i;default:return e.Debug.assertNever(r)}}function D(t){return e.map(t,x).join(" ")}function x(e){return""+e.operator+e.operand}}(c||(c={})),function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.LessThanToken=28]="LessThanToken",e[e.LessThanSlashToken=29]="LessThanSlashToken",e[e.GreaterThanToken=30]="GreaterThanToken",e[e.LessThanEqualsToken=31]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=32]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=33]="EqualsEqualsToken",e[e.ExclamationEqualsToken=34]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=35]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=36]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=37]="EqualsGreaterThanToken",e[e.PlusToken=38]="PlusToken",e[e.MinusToken=39]="MinusToken",e[e.AsteriskToken=40]="AsteriskToken",e[e.AsteriskAsteriskToken=41]="AsteriskAsteriskToken",e[e.SlashToken=42]="SlashToken",e[e.PercentToken=43]="PercentToken",e[e.PlusPlusToken=44]="PlusPlusToken",e[e.MinusMinusToken=45]="MinusMinusToken",e[e.LessThanLessThanToken=46]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=47]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=48]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=49]="AmpersandToken",e[e.BarToken=50]="BarToken",e[e.CaretToken=51]="CaretToken",e[e.ExclamationToken=52]="ExclamationToken",e[e.TildeToken=53]="TildeToken",e[e.AmpersandAmpersandToken=54]="AmpersandAmpersandToken",e[e.BarBarToken=55]="BarBarToken",e[e.QuestionToken=56]="QuestionToken",e[e.ColonToken=57]="ColonToken",e[e.AtToken=58]="AtToken",e[e.EqualsToken=59]="EqualsToken",e[e.PlusEqualsToken=60]="PlusEqualsToken",e[e.MinusEqualsToken=61]="MinusEqualsToken",e[e.AsteriskEqualsToken=62]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=63]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=64]="SlashEqualsToken",e[e.PercentEqualsToken=65]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=66]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=67]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=68]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=69]="AmpersandEqualsToken",e[e.BarEqualsToken=70]="BarEqualsToken",e[e.CaretEqualsToken=71]="CaretEqualsToken",e[e.Identifier=72]="Identifier",e[e.BreakKeyword=73]="BreakKeyword",e[e.CaseKeyword=74]="CaseKeyword",e[e.CatchKeyword=75]="CatchKeyword",e[e.ClassKeyword=76]="ClassKeyword",e[e.ConstKeyword=77]="ConstKeyword",e[e.ContinueKeyword=78]="ContinueKeyword",e[e.DebuggerKeyword=79]="DebuggerKeyword",e[e.DefaultKeyword=80]="DefaultKeyword",e[e.DeleteKeyword=81]="DeleteKeyword",e[e.DoKeyword=82]="DoKeyword",e[e.ElseKeyword=83]="ElseKeyword",e[e.EnumKeyword=84]="EnumKeyword",e[e.ExportKeyword=85]="ExportKeyword",e[e.ExtendsKeyword=86]="ExtendsKeyword",e[e.FalseKeyword=87]="FalseKeyword",e[e.FinallyKeyword=88]="FinallyKeyword",e[e.ForKeyword=89]="ForKeyword",e[e.FunctionKeyword=90]="FunctionKeyword",e[e.IfKeyword=91]="IfKeyword",e[e.ImportKeyword=92]="ImportKeyword",e[e.InKeyword=93]="InKeyword",e[e.InstanceOfKeyword=94]="InstanceOfKeyword",e[e.NewKeyword=95]="NewKeyword",e[e.NullKeyword=96]="NullKeyword",e[e.ReturnKeyword=97]="ReturnKeyword",e[e.SuperKeyword=98]="SuperKeyword",e[e.SwitchKeyword=99]="SwitchKeyword",e[e.ThisKeyword=100]="ThisKeyword",e[e.ThrowKeyword=101]="ThrowKeyword",e[e.TrueKeyword=102]="TrueKeyword",e[e.TryKeyword=103]="TryKeyword",e[e.TypeOfKeyword=104]="TypeOfKeyword",e[e.VarKeyword=105]="VarKeyword",e[e.VoidKeyword=106]="VoidKeyword",e[e.WhileKeyword=107]="WhileKeyword",e[e.WithKeyword=108]="WithKeyword",e[e.ImplementsKeyword=109]="ImplementsKeyword",e[e.InterfaceKeyword=110]="InterfaceKeyword",e[e.LetKeyword=111]="LetKeyword",e[e.PackageKeyword=112]="PackageKeyword",e[e.PrivateKeyword=113]="PrivateKeyword",e[e.ProtectedKeyword=114]="ProtectedKeyword",e[e.PublicKeyword=115]="PublicKeyword",e[e.StaticKeyword=116]="StaticKeyword",e[e.YieldKeyword=117]="YieldKeyword",e[e.AbstractKeyword=118]="AbstractKeyword",e[e.AsKeyword=119]="AsKeyword",e[e.AnyKeyword=120]="AnyKeyword",e[e.AsyncKeyword=121]="AsyncKeyword",e[e.AwaitKeyword=122]="AwaitKeyword",e[e.BooleanKeyword=123]="BooleanKeyword",e[e.ConstructorKeyword=124]="ConstructorKeyword",e[e.DeclareKeyword=125]="DeclareKeyword",e[e.GetKeyword=126]="GetKeyword",e[e.InferKeyword=127]="InferKeyword",e[e.IsKeyword=128]="IsKeyword",e[e.KeyOfKeyword=129]="KeyOfKeyword",e[e.ModuleKeyword=130]="ModuleKeyword",e[e.NamespaceKeyword=131]="NamespaceKeyword",e[e.NeverKeyword=132]="NeverKeyword",e[e.ReadonlyKeyword=133]="ReadonlyKeyword",e[e.RequireKeyword=134]="RequireKeyword",e[e.NumberKeyword=135]="NumberKeyword",e[e.ObjectKeyword=136]="ObjectKeyword",e[e.SetKeyword=137]="SetKeyword",e[e.StringKeyword=138]="StringKeyword",e[e.SymbolKeyword=139]="SymbolKeyword",e[e.TypeKeyword=140]="TypeKeyword",e[e.UndefinedKeyword=141]="UndefinedKeyword",e[e.UniqueKeyword=142]="UniqueKeyword",e[e.UnknownKeyword=143]="UnknownKeyword",e[e.FromKeyword=144]="FromKeyword",e[e.GlobalKeyword=145]="GlobalKeyword",e[e.BigIntKeyword=146]="BigIntKeyword",e[e.OfKeyword=147]="OfKeyword",e[e.QualifiedName=148]="QualifiedName",e[e.ComputedPropertyName=149]="ComputedPropertyName",e[e.TypeParameter=150]="TypeParameter",e[e.Parameter=151]="Parameter",e[e.Decorator=152]="Decorator",e[e.PropertySignature=153]="PropertySignature",e[e.PropertyDeclaration=154]="PropertyDeclaration",e[e.MethodSignature=155]="MethodSignature",e[e.MethodDeclaration=156]="MethodDeclaration",e[e.Constructor=157]="Constructor",e[e.GetAccessor=158]="GetAccessor",e[e.SetAccessor=159]="SetAccessor",e[e.CallSignature=160]="CallSignature",e[e.ConstructSignature=161]="ConstructSignature",e[e.IndexSignature=162]="IndexSignature",e[e.TypePredicate=163]="TypePredicate",e[e.TypeReference=164]="TypeReference",e[e.FunctionType=165]="FunctionType",e[e.ConstructorType=166]="ConstructorType",e[e.TypeQuery=167]="TypeQuery",e[e.TypeLiteral=168]="TypeLiteral",e[e.ArrayType=169]="ArrayType",e[e.TupleType=170]="TupleType",e[e.OptionalType=171]="OptionalType",e[e.RestType=172]="RestType",e[e.UnionType=173]="UnionType",e[e.IntersectionType=174]="IntersectionType",e[e.ConditionalType=175]="ConditionalType",e[e.InferType=176]="InferType",e[e.ParenthesizedType=177]="ParenthesizedType",e[e.ThisType=178]="ThisType",e[e.TypeOperator=179]="TypeOperator",e[e.IndexedAccessType=180]="IndexedAccessType",e[e.MappedType=181]="MappedType",e[e.LiteralType=182]="LiteralType",e[e.ImportType=183]="ImportType",e[e.ObjectBindingPattern=184]="ObjectBindingPattern",e[e.ArrayBindingPattern=185]="ArrayBindingPattern",e[e.BindingElement=186]="BindingElement",e[e.ArrayLiteralExpression=187]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=188]="ObjectLiteralExpression",e[e.PropertyAccessExpression=189]="PropertyAccessExpression",e[e.ElementAccessExpression=190]="ElementAccessExpression",e[e.CallExpression=191]="CallExpression",e[e.NewExpression=192]="NewExpression",e[e.TaggedTemplateExpression=193]="TaggedTemplateExpression",e[e.TypeAssertionExpression=194]="TypeAssertionExpression",e[e.ParenthesizedExpression=195]="ParenthesizedExpression",e[e.FunctionExpression=196]="FunctionExpression",e[e.ArrowFunction=197]="ArrowFunction",e[e.DeleteExpression=198]="DeleteExpression",e[e.TypeOfExpression=199]="TypeOfExpression",e[e.VoidExpression=200]="VoidExpression",e[e.AwaitExpression=201]="AwaitExpression",e[e.PrefixUnaryExpression=202]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=203]="PostfixUnaryExpression",e[e.BinaryExpression=204]="BinaryExpression",e[e.ConditionalExpression=205]="ConditionalExpression",e[e.TemplateExpression=206]="TemplateExpression",e[e.YieldExpression=207]="YieldExpression",e[e.SpreadElement=208]="SpreadElement",e[e.ClassExpression=209]="ClassExpression",e[e.OmittedExpression=210]="OmittedExpression",e[e.ExpressionWithTypeArguments=211]="ExpressionWithTypeArguments",e[e.AsExpression=212]="AsExpression",e[e.NonNullExpression=213]="NonNullExpression",e[e.MetaProperty=214]="MetaProperty",e[e.SyntheticExpression=215]="SyntheticExpression",e[e.TemplateSpan=216]="TemplateSpan",e[e.SemicolonClassElement=217]="SemicolonClassElement",e[e.Block=218]="Block",e[e.VariableStatement=219]="VariableStatement",e[e.EmptyStatement=220]="EmptyStatement",e[e.ExpressionStatement=221]="ExpressionStatement",e[e.IfStatement=222]="IfStatement",e[e.DoStatement=223]="DoStatement",e[e.WhileStatement=224]="WhileStatement",e[e.ForStatement=225]="ForStatement",e[e.ForInStatement=226]="ForInStatement",e[e.ForOfStatement=227]="ForOfStatement",e[e.ContinueStatement=228]="ContinueStatement",e[e.BreakStatement=229]="BreakStatement",e[e.ReturnStatement=230]="ReturnStatement",e[e.WithStatement=231]="WithStatement",e[e.SwitchStatement=232]="SwitchStatement",e[e.LabeledStatement=233]="LabeledStatement",e[e.ThrowStatement=234]="ThrowStatement",e[e.TryStatement=235]="TryStatement",e[e.DebuggerStatement=236]="DebuggerStatement",e[e.VariableDeclaration=237]="VariableDeclaration",e[e.VariableDeclarationList=238]="VariableDeclarationList",e[e.FunctionDeclaration=239]="FunctionDeclaration",e[e.ClassDeclaration=240]="ClassDeclaration",e[e.InterfaceDeclaration=241]="InterfaceDeclaration",e[e.TypeAliasDeclaration=242]="TypeAliasDeclaration",e[e.EnumDeclaration=243]="EnumDeclaration",e[e.ModuleDeclaration=244]="ModuleDeclaration",e[e.ModuleBlock=245]="ModuleBlock",e[e.CaseBlock=246]="CaseBlock",e[e.NamespaceExportDeclaration=247]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=248]="ImportEqualsDeclaration",e[e.ImportDeclaration=249]="ImportDeclaration",e[e.ImportClause=250]="ImportClause",e[e.NamespaceImport=251]="NamespaceImport",e[e.NamedImports=252]="NamedImports",e[e.ImportSpecifier=253]="ImportSpecifier",e[e.ExportAssignment=254]="ExportAssignment",e[e.ExportDeclaration=255]="ExportDeclaration",e[e.NamedExports=256]="NamedExports",e[e.ExportSpecifier=257]="ExportSpecifier",e[e.MissingDeclaration=258]="MissingDeclaration",e[e.ExternalModuleReference=259]="ExternalModuleReference",e[e.JsxElement=260]="JsxElement",e[e.JsxSelfClosingElement=261]="JsxSelfClosingElement",e[e.JsxOpeningElement=262]="JsxOpeningElement",e[e.JsxClosingElement=263]="JsxClosingElement",e[e.JsxFragment=264]="JsxFragment",e[e.JsxOpeningFragment=265]="JsxOpeningFragment",e[e.JsxClosingFragment=266]="JsxClosingFragment",e[e.JsxAttribute=267]="JsxAttribute",e[e.JsxAttributes=268]="JsxAttributes",e[e.JsxSpreadAttribute=269]="JsxSpreadAttribute",e[e.JsxExpression=270]="JsxExpression",e[e.CaseClause=271]="CaseClause",e[e.DefaultClause=272]="DefaultClause",e[e.HeritageClause=273]="HeritageClause",e[e.CatchClause=274]="CatchClause",e[e.PropertyAssignment=275]="PropertyAssignment",e[e.ShorthandPropertyAssignment=276]="ShorthandPropertyAssignment",e[e.SpreadAssignment=277]="SpreadAssignment",e[e.EnumMember=278]="EnumMember",e[e.UnparsedPrologue=279]="UnparsedPrologue",e[e.UnparsedPrepend=280]="UnparsedPrepend",e[e.UnparsedText=281]="UnparsedText",e[e.UnparsedInternalText=282]="UnparsedInternalText",e[e.UnparsedSyntheticReference=283]="UnparsedSyntheticReference",e[e.SourceFile=284]="SourceFile",e[e.Bundle=285]="Bundle",e[e.UnparsedSource=286]="UnparsedSource",e[e.InputFiles=287]="InputFiles",e[e.JSDocTypeExpression=288]="JSDocTypeExpression",e[e.JSDocAllType=289]="JSDocAllType",e[e.JSDocUnknownType=290]="JSDocUnknownType",e[e.JSDocNullableType=291]="JSDocNullableType",e[e.JSDocNonNullableType=292]="JSDocNonNullableType",e[e.JSDocOptionalType=293]="JSDocOptionalType",e[e.JSDocFunctionType=294]="JSDocFunctionType",e[e.JSDocVariadicType=295]="JSDocVariadicType",e[e.JSDocComment=296]="JSDocComment",e[e.JSDocTypeLiteral=297]="JSDocTypeLiteral",e[e.JSDocSignature=298]="JSDocSignature",e[e.JSDocTag=299]="JSDocTag",e[e.JSDocAugmentsTag=300]="JSDocAugmentsTag",e[e.JSDocClassTag=301]="JSDocClassTag",e[e.JSDocCallbackTag=302]="JSDocCallbackTag",e[e.JSDocEnumTag=303]="JSDocEnumTag",e[e.JSDocParameterTag=304]="JSDocParameterTag",e[e.JSDocReturnTag=305]="JSDocReturnTag",e[e.JSDocThisTag=306]="JSDocThisTag",e[e.JSDocTypeTag=307]="JSDocTypeTag",e[e.JSDocTemplateTag=308]="JSDocTemplateTag",e[e.JSDocTypedefTag=309]="JSDocTypedefTag",e[e.JSDocPropertyTag=310]="JSDocPropertyTag",e[e.SyntaxList=311]="SyntaxList",e[e.NotEmittedStatement=312]="NotEmittedStatement",e[e.PartiallyEmittedExpression=313]="PartiallyEmittedExpression",e[e.CommaListExpression=314]="CommaListExpression",e[e.MergeDeclarationMarker=315]="MergeDeclarationMarker",e[e.EndOfDeclarationMarker=316]="EndOfDeclarationMarker",e[e.Count=317]="Count",e[e.FirstAssignment=59]="FirstAssignment",e[e.LastAssignment=71]="LastAssignment",e[e.FirstCompoundAssignment=60]="FirstCompoundAssignment",e[e.LastCompoundAssignment=71]="LastCompoundAssignment",e[e.FirstReservedWord=73]="FirstReservedWord",e[e.LastReservedWord=108]="LastReservedWord",e[e.FirstKeyword=73]="FirstKeyword",e[e.LastKeyword=147]="LastKeyword",e[e.FirstFutureReservedWord=109]="FirstFutureReservedWord",e[e.LastFutureReservedWord=117]="LastFutureReservedWord",e[e.FirstTypeNode=163]="FirstTypeNode",e[e.LastTypeNode=183]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=71]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=147]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=28]="FirstBinaryOperator",e[e.LastBinaryOperator=71]="LastBinaryOperator",e[e.FirstNode=148]="FirstNode",e[e.FirstJSDocNode=288]="FirstJSDocNode",e[e.LastJSDocNode=310]="LastJSDocNode",e[e.FirstJSDocTagNode=299]="FirstJSDocTagNode",e[e.LastJSDocTagNode=310]="LastJSDocTagNode",e[e.FirstContextualKeyword=118]="FirstContextualKeyword",e[e.LastContextualKeyword=147]="LastContextualKeyword"}(e.SyntaxKind||(e.SyntaxKind={})),function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.NestedNamespace=4]="NestedNamespace",e[e.Synthesized=8]="Synthesized",e[e.Namespace=16]="Namespace",e[e.ExportContext=32]="ExportContext",e[e.ContainsThis=64]="ContainsThis",e[e.HasImplicitReturn=128]="HasImplicitReturn",e[e.HasExplicitReturn=256]="HasExplicitReturn",e[e.GlobalAugmentation=512]="GlobalAugmentation",e[e.HasAsyncFunctions=1024]="HasAsyncFunctions",e[e.DisallowInContext=2048]="DisallowInContext",e[e.YieldContext=4096]="YieldContext",e[e.DecoratorContext=8192]="DecoratorContext",e[e.AwaitContext=16384]="AwaitContext",e[e.ThisNodeHasError=32768]="ThisNodeHasError",e[e.JavaScriptFile=65536]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=131072]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=262144]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=524288]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=1048576]="PossiblyContainsImportMeta",e[e.JSDoc=2097152]="JSDoc",e[e.Ambient=4194304]="Ambient",e[e.InWithStatement=8388608]="InWithStatement",e[e.JsonFile=16777216]="JsonFile",e[e.BlockScoped=3]="BlockScoped",e[e.ReachabilityCheckFlags=384]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=1408]="ReachabilityAndEmitFlags",e[e.ContextFlags=12679168]="ContextFlags",e[e.TypeExcludesFlags=20480]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=1572864]="PermanentlySetIncrementalFlags"}(e.NodeFlags||(e.NodeFlags={})),function(e){e[e.None=0]="None",e[e.Export=1]="Export",e[e.Ambient=2]="Ambient",e[e.Public=4]="Public",e[e.Private=8]="Private",e[e.Protected=16]="Protected",e[e.Static=32]="Static",e[e.Readonly=64]="Readonly",e[e.Abstract=128]="Abstract",e[e.Async=256]="Async",e[e.Default=512]="Default",e[e.Const=2048]="Const",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=92]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=2270]="TypeScriptModifier",e[e.ExportDefault=513]="ExportDefault",e[e.All=3071]="All"}(e.ModifierFlags||(e.ModifierFlags={})),function(e){e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement"}(e.JsxFlags||(e.JsxFlags={})),function(e){e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.FailedAndReported=3]="FailedAndReported"}(e.RelationComparisonResult||(e.RelationComparisonResult={})),function(e){e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel"}(e.GeneratedIdentifierFlags||(e.GeneratedIdentifierFlags={})),function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.NumericLiteralFlags=1008]="NumericLiteralFlags"}(e.TokenFlags||(e.TokenFlags={})),function(e){e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Referenced=512]="Referenced",e[e.Shared=1024]="Shared",e[e.PreFinally=2048]="PreFinally",e[e.AfterFinally=4096]="AfterFinally",e[e.Label=12]="Label",e[e.Condition=96]="Condition"}(e.FlowFlags||(e.FlowFlags={}));var t,r=function(){return function(){}}();e.OperationCanceledException=r,function(e){e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely"}(e.StructureIsReused||(e.StructureIsReused={})),function(e){e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated"}(e.ExitStatus||(e.ExitStatus={})),function(e){e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype"}(e.UnionReduction||(e.UnionReduction={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifedNameInPlaceOfIdentifier=65536]="AllowQualifedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e[e.InReverseMappedType=33554432]="InReverseMappedType"}(e.NodeBuilderFlags||(e.NodeBuilderFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.WriteOwnNameForAnyLike=0]="WriteOwnNameForAnyLike",e[e.NodeBuilderFlagsMask=9469291]="NodeBuilderFlagsMask"}(e.TypeFormatFlags||(e.TypeFormatFlags={})),function(e){e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.DoNotIncludeSymbolChain=16]="DoNotIncludeSymbolChain"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={})),function(e){e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed"}(e.SymbolAccessibility||(e.SymbolAccessibility={})),function(e){e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread"}(e.SyntheticSymbolKind||(e.SyntheticSymbolKind={})),function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier"}(e.TypePredicateKind||(e.TypePredicateKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType"}(e.TypeReferenceSerializationKind||(e.TypeReferenceSerializationKind={})),function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=67108863]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=67220415]="Value",e[e.Type=67897832]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=67220414]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=67220415]="BlockScopedVariableExcludes",e[e.ParameterExcludes=67220415]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=68008959]="EnumMemberExcludes",e[e.FunctionExcludes=67219887]="FunctionExcludes",e[e.ClassExcludes=68008383]="ClassExcludes",e[e.InterfaceExcludes=67897736]="InterfaceExcludes",e[e.RegularEnumExcludes=68008191]="RegularEnumExcludes",e[e.ConstEnumExcludes=68008831]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=67212223]="MethodExcludes",e[e.GetAccessorExcludes=67154879]="GetAccessorExcludes",e[e.SetAccessorExcludes=67187647]="SetAccessorExcludes",e[e.TypeParameterExcludes=67635688]="TypeParameterExcludes",e[e.TypeAliasExcludes=67897832]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6240]="LateBindingContainer"}(e.SymbolFlags||(e.SymbolFlags={})),function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal"}(e.EnumKind||(e.EnumKind={})),function(e){e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.Partial=16]="Partial",e[e.HasNonUniformType=32]="HasNonUniformType",e[e.HasLiteralType=64]="HasLiteralType",e[e.ContainsPublic=128]="ContainsPublic",e[e.ContainsProtected=256]="ContainsProtected",e[e.ContainsPrivate=512]="ContainsPrivate",e[e.ContainsStatic=1024]="ContainsStatic",e[e.Late=2048]="Late",e[e.ReverseMapped=4096]="ReverseMapped",e[e.OptionalParameter=8192]="OptionalParameter",e[e.RestParameter=16384]="RestParameter",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=96]="Discriminant"}(e.CheckFlags||(e.CheckFlags={})),function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this"}(e.InternalSymbolName||(e.InternalSymbolName={})),function(e){e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=256]="SuperInstance",e[e.SuperStatic=512]="SuperStatic",e[e.ContextChecked=1024]="ContextChecked",e[e.AsyncMethodWithSuper=2048]="AsyncMethodWithSuper",e[e.AsyncMethodWithSuperBinding=4096]="AsyncMethodWithSuperBinding",e[e.CaptureArguments=8192]="CaptureArguments",e[e.EnumValuesComputed=16384]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=32768]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=65536]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=131072]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=262144]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=524288]="BlockScopedBindingInLoop",e[e.ClassWithBodyScopedClassBinding=1048576]="ClassWithBodyScopedClassBinding",e[e.BodyScopedClassBinding=2097152]="BodyScopedClassBinding",e[e.NeedsLoopOutParameter=4194304]="NeedsLoopOutParameter",e[e.AssignmentsMarked=8388608]="AssignmentsMarked",e[e.ClassWithConstructorReference=16777216]="ClassWithConstructorReference",e[e.ConstructorReferenceInClass=33554432]="ConstructorReferenceInClass"}(e.NodeCheckFlags||(e.NodeCheckFlags={})),function(e){e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109440]="Unit",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.Primitive=131068]="Primitive",e[e.StringLike=132]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.DisjointDomains=67238908]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=4194304]="InstantiablePrimitive",e[e.Instantiable=63176704]="Instantiable",e[e.StructuredOrInstantiable=66846720]="StructuredOrInstantiable",e[e.ObjectFlagsType=3768320]="ObjectFlagsType",e[e.Narrowable=133970943]="Narrowable",e[e.NotUnionOrUnit=67637251]="NotUnionOrUnit",e[e.NotPrimitiveUnion=66994211]="NotPrimitiveUnion",e[e.IncludesMask=1835007]="IncludesMask",e[e.IncludesStructuredOrInstantiable=262144]="IncludesStructuredOrInstantiable",e[e.IncludesNonWideningType=2097152]="IncludesNonWideningType",e[e.IncludesWildcard=4194304]="IncludesWildcard",e[e.IncludesEmptyObject=8388608]="IncludesEmptyObject",e[e.GenericMappedType=131072]="GenericMappedType"}(e.TypeFlags||(e.TypeFlags={})),function(e){e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ContainsSpread=1024]="ContainsSpread",e[e.ReverseMapped=2048]="ReverseMapped",e[e.JsxAttributes=4096]="JsxAttributes",e[e.MarkerType=8192]="MarkerType",e[e.JSLiteral=16384]="JSLiteral",e[e.FreshLiteral=32768]="FreshLiteral",e[e.PrimitiveUnion=65536]="PrimitiveUnion",e[e.ContainsWideningType=131072]="ContainsWideningType",e[e.ContainsObjectLiteral=262144]="ContainsObjectLiteral",e[e.ContainsAnyFunctionType=524288]="ContainsAnyFunctionType",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=393216]="RequiresWidening",e[e.PropagatingFlags=917504]="PropagatingFlags"}(e.ObjectFlags||(e.ObjectFlags={})),function(e){e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent"}(e.Variance||(e.Variance={})),function(e){e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed"}(e.JsxReferenceKind||(e.JsxReferenceKind={})),function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"}(e.SignatureKind||(e.SignatureKind={})),function(e){e[e.String=0]="String",e[e.Number=1]="Number"}(e.IndexKind||(e.IndexKind={})),function(e){e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.HomomorphicMappedType=2]="HomomorphicMappedType",e[e.MappedTypeConstraint=4]="MappedTypeConstraint",e[e.ReturnType=8]="ReturnType",e[e.LiteralKeyof=16]="LiteralKeyof",e[e.NoConstraints=32]="NoConstraints",e[e.AlwaysStrict=64]="AlwaysStrict",e[e.PriorityImpliesCombination=28]="PriorityImpliesCombination"}(e.InferencePriority||(e.InferencePriority={})),function(e){e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction"}(e.InferenceFlags||(e.InferenceFlags={})),function(e){e[e.False=0]="False",e[e.Maybe=1]="Maybe",e[e.True=-1]="True"}(e.Ternary||(e.Ternary={})),function(e){e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty"}(e.AssignmentDeclarationKind||(e.AssignmentDeclarationKind={})),function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(t=e.DiagnosticCategory||(e.DiagnosticCategory={})),e.diagnosticCategoryName=function(e,r){void 0===r&&(r=!0);var n=t[e.category];return r?n.toLowerCase():n},function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(e.ModuleResolutionKind||(e.ModuleResolutionKind={})),function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=6]="ESNext"}(e.ModuleKind||(e.ModuleKind={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative"}(e.JsxEmit||(e.JsxEmit={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(e.NewLineKind||(e.NewLineKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"}(e.ScriptKind||(e.ScriptKind={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ESNext=7]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=7]="Latest"}(e.ScriptTarget||(e.ScriptTarget={})),function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(e.LanguageVariant||(e.LanguageVariant={})),function(e){e[e.None=0]="None",e[e.Recursive=1]="Recursive"}(e.WatchDirectoryFlags||(e.WatchDirectoryFlags={})),function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(e.CharacterCodes||(e.CharacterCodes={})),function(e){e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo"}(e.Extension||(e.Extension={})),function(e){e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2019=8]="ContainsES2019",e[e.ContainsES2018=16]="ContainsES2018",e[e.ContainsES2017=32]="ContainsES2017",e[e.ContainsES2016=64]="ContainsES2016",e[e.ContainsES2015=128]="ContainsES2015",e[e.ContainsGenerator=256]="ContainsGenerator",e[e.ContainsDestructuringAssignment=512]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=1024]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=2048]="ContainsLexicalThis",e[e.ContainsRestOrSpread=4096]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=8192]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=16384]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=32768]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=65536]="ContainsBindingPattern",e[e.ContainsYield=131072]="ContainsYield",e[e.ContainsHoistedDeclarationOrCompletion=262144]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=524288]="ContainsDynamicImport",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2019=8]="AssertES2019",e[e.AssertES2018=16]="AssertES2018",e[e.AssertES2017=32]="AssertES2017",e[e.AssertES2016=64]="AssertES2016",e[e.AssertES2015=128]="AssertES2015",e[e.AssertGenerator=256]="AssertGenerator",e[e.AssertDestructuringAssignment=512]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=536870912]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=536870912]="PropertyAccessExcludes",e[e.NodeExcludes=536870912]="NodeExcludes",e[e.ArrowFunctionExcludes=537371648]="ArrowFunctionExcludes",e[e.FunctionExcludes=537373696]="FunctionExcludes",e[e.ConstructorExcludes=537372672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=537372672]="MethodOrAccessorExcludes",e[e.PropertyExcludes=536872960]="PropertyExcludes",e[e.ClassExcludes=536888320]="ClassExcludes",e[e.ModuleExcludes=537168896]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=536896512]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=536875008]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=536944640]="VariableDeclarationListExcludes",e[e.ParameterExcludes=536870912]="ParameterExcludes",e[e.CatchClauseExcludes=536879104]="CatchClauseExcludes",e[e.BindingPatternExcludes=536875008]="BindingPatternExcludes",e[e.PropertyNamePropagatingFlags=2048]="PropertyNamePropagatingFlags"}(e.TransformFlags||(e.TransformFlags={})),function(e){e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.AdviseOnEmitNode=2]="AdviseOnEmitNode",e[e.NoSubstitution=4]="NoSubstitution",e[e.CapturesThis=8]="CapturesThis",e[e.NoLeadingSourceMap=16]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=32]="NoTrailingSourceMap",e[e.NoSourceMap=48]="NoSourceMap",e[e.NoNestedSourceMaps=64]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=128]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=256]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=384]="NoTokenSourceMaps",e[e.NoLeadingComments=512]="NoLeadingComments",e[e.NoTrailingComments=1024]="NoTrailingComments",e[e.NoComments=1536]="NoComments",e[e.NoNestedComments=2048]="NoNestedComments",e[e.HelperName=4096]="HelperName",e[e.ExportName=8192]="ExportName",e[e.LocalName=16384]="LocalName",e[e.InternalName=32768]="InternalName",e[e.Indented=65536]="Indented",e[e.NoIndentation=131072]="NoIndentation",e[e.AsyncFunctionBody=262144]="AsyncFunctionBody",e[e.ReuseTempVariableScope=524288]="ReuseTempVariableScope",e[e.CustomPrologue=1048576]="CustomPrologue",e[e.NoHoisting=2097152]="NoHoisting",e[e.HasEndOfDeclarationMarker=4194304]="HasEndOfDeclarationMarker",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e[e.TypeScriptClassWrapper=33554432]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=67108864]="NeverApplyImportHelper"}(e.EmitFlags||(e.EmitFlags={})),function(e){e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.Spread=1024]="Spread",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.MakeTemplateObject=65536]="MakeTemplateObject",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=65536]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes"}(e.ExternalEmitHelpers||(e.ExternalEmitHelpers={})),function(e){e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement"}(e.EmitHint||(e.EmitHint={})),function(e){e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal"}(e.BundleFileSectionKind||(e.BundleFileSectionKind={})),function(e){e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.Modifiers=262656]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.TupleTypeElements=528]="TupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=49153]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment"}(e.ListFormat||(e.ListFormat={})),function(e){e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default"}(e.PragmaKindFlags||(e.PragmaKindFlags={})),e.commentPragmas={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4}}}(c||(c={})),function(e){function t(e){for(var t=5381,r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r);return t.toString()}var r,n;function a(e){var t;return(t={})[n.Low]=e.Low,t[n.Medium]=e.Medium,t[n.High]=e.High,t}e.generateDjb2Hash=t,e.setStackTraceLimit=function(){Error.stackTraceLimit<100&&(Error.stackTraceLimit=100)},function(e){e[e.Created=0]="Created",e[e.Changed=1]="Changed",e[e.Deleted=2]="Deleted"}(r=e.FileWatcherEventKind||(e.FileWatcherEventKind={})),function(e){e[e.High=2e3]="High",e[e.Medium=500]="Medium",e[e.Low=250]="Low"}(n=e.PollingInterval||(e.PollingInterval={})),e.missingFileModifiedTime=new Date(0);var o={Low:32,Medium:64,High:256},s=a(o);function c(t){if(t.getEnvironmentVariable){var r=function(e,t){var r=c(e);if(r)return n("Low"),n("Medium"),n("High"),!0;return!1;function n(e){t[e]=r[e]||t[e]}}("TSC_WATCH_POLLINGINTERVAL",n);s=u("TSC_WATCH_POLLINGCHUNKSIZE",o)||s,e.unchangedPollThresholds=u("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",o)||e.unchangedPollThresholds}function c(e){var r;return n("Low"),n("Medium"),n("High"),r;function n(n){var i=function(e,r){return t.getEnvironmentVariable(e+"_"+r.toUpperCase())}(e,n);i&&((r||(r={}))[n]=Number(i))}}function u(e,t){var n=c(e);return(r||n)&&a(n?i({},t,n):t)}}function u(t){var r=[],i=[],a=u(n.Low),o=u(n.Medium),c=u(n.High);return function(t,n,i){var a={fileName:t,callback:n,unchangedPolls:0,mtime:v(t)};return r.push(a),m(a,i),{close:function(){a.isClosed=!0,e.unorderedRemoveItem(r,a)}}};function u(e){var t=[];return t.pollingInterval=e,t.pollIndex=0,t.pollScheduled=!1,t}function _(t){t.pollIndex=p(t,t.pollingInterval,t.pollIndex,s[t.pollingInterval]),t.length?h(t.pollingInterval):(e.Debug.assert(0===t.pollIndex),t.pollScheduled=!1)}function d(e){p(i,n.Low,0,i.length),_(e),!e.pollScheduled&&i.length&&h(n.Low)}function p(t,r,a,o){for(var s=t.length,c=a,u=0;u<o&&s>0;p(),s--){var _=t[a];if(_)if(_.isClosed)t[a]=void 0;else{u++;var d=l(_,v(_.fileName));_.isClosed?t[a]=void 0:d?(_.unchangedPolls=0,t!==i&&(t[a]=void 0,g(_))):_.unchangedPolls!==e.unchangedPollThresholds[r]?_.unchangedPolls++:t===i?(_.unchangedPolls=1,t[a]=void 0,m(_,n.Low)):r!==n.High&&(_.unchangedPolls++,t[a]=void 0,m(_,r===n.Low?n.Medium:n.High)),t[a]&&(c<a&&(t[c]=_,t[a]=void 0),c++)}}return a;function p(){++a===t.length&&(c<a&&(t.length=c),a=0,c=0)}}function f(e){switch(e){case n.Low:return a;case n.Medium:return o;case n.High:return c}}function m(e,t){f(t).push(e),y(t)}function g(e){i.push(e),y(n.Low)}function y(e){f(e).pollScheduled||h(e)}function h(e){f(e).pollScheduled=t.setTimeout(e===n.Low?d:_,e,f(e))}function v(r){return t.getModifiedTime(r)||e.missingFileModifiedTime}}function l(e,t){var r=e.mtime.getTime(),n=t.getTime();return r!==n&&(e.mtime=t,e.callback(e.fileName,_(r,n)),!0)}function _(e,t){return 0===e?r.Created:0===t?r.Deleted:r.Changed}function d(t){var r=e.createMap(),n=e.createMultiMap(),i=e.getStringComparer(!t.useCaseSensitiveFileNames),a=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames);return o;function o(i,o){var u=a(i),l=r.get(u);return l?l.refCount++:(l={watcher:t.watchDirectory(i,function(t){c(t)||(n.forEach(function(r,n){(n===u||e.startsWith(u,n)&&u[n.length]===e.directorySeparator)&&r.forEach(function(e){return e(t)})}),s(i,u))}),refCount:1,childWatches:e.emptyArray},r.set(u,l),s(i,u)),o&&n.add(u,o),{dirName:i,close:function(){var t=e.Debug.assertDefined(r.get(u));o&&n.remove(u,o),t.refCount--,t.refCount||(r.delete(u),e.closeFileWatcherOf(t),t.childWatches.forEach(e.closeFileWatcher))}}}function s(n,a){var s=r.get(a);s&&(s.childWatches=function(r,n){var a;return e.enumerateInsertsAndDeletes(t.directoryExists(r)?e.mapDefined(t.getAccessibleSortedChildDirectories(r),function(n){var a=e.getNormalizedAbsolutePath(n,r);return c(a)||0!==i(a,e.normalizePath(t.realpath(a)))?void 0:a}):e.emptyArray,n,function(e,t){return i(e,t.dirName)},function(e){s(o(e))},e.closeFileWatcher,s),a||e.emptyArray;function s(e){(a||(a=[])).push(e)}}(n,s.childWatches))}function c(r){return e.some(e.ignoredPaths,function(n){return function(r,n){return!!e.stringContains(r,n)||!t.useCaseSensitiveFileNames&&e.stringContains(a(r),n)}(r,n)})}}function p(){if(void 0!==ve){var e=ve.version;if(e){var t=e.indexOf(".");if(-1!==t)return parseInt(e.substring(1,t))}}}e.unchangedPollThresholds=a(o),e.setCustomPollingValues=c,e.createDynamicPriorityPollingWatchFile=u,e.onWatchedFileStat=l,e.getFileWatcherEventKind=_,e.ignoredPaths=["/node_modules/.","/.git"],e.createRecursiveDirectoryWatcher=d,e.getNodeMajorVersion=p,e.sys=function(){var t,r,n="\ufeff";if("undefined"!=typeof ChakraHost&&(r=ChakraHost.realpath&&function(e){return ChakraHost.realpath(e)},t={newLine:ChakraHost.newLine||"\r\n",args:ChakraHost.args,useCaseSensitiveFileNames:!!ChakraHost.useCaseSensitiveFileNames,write:ChakraHost.echo,readFile:function(e,t){return ChakraHost.readFile(e)},writeFile:function(e,t,r){r&&(t=n+t),ChakraHost.writeFile(e,t)},resolvePath:ChakraHost.resolvePath,fileExists:ChakraHost.fileExists,deleteFile:ChakraHost.deleteFile,getModifiedTime:ChakraHost.getModifiedTime,setModifiedTime:ChakraHost.setModifiedTime,directoryExists:ChakraHost.directoryExists,createDirectory:ChakraHost.createDirectory,getExecutingFilePath:function(){return ChakraHost.executingFile},getCurrentDirectory:function(){return ChakraHost.currentDirectory},getDirectories:ChakraHost.getDirectories,getEnvironmentVariable:ChakraHost.getEnvironmentVariable||function(){return""},readDirectory:function(t,r,n,i,a){var o=e.getFileMatcherPatterns(t,n,i,!!ChakraHost.useCaseSensitiveFileNames,ChakraHost.currentDirectory);return ChakraHost.readDirectory(t,r,o.basePaths,o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern)},exit:ChakraHost.quit,realpath:r}),t){var i=t.writeFile;t.writeFile=function(r,n,a){var o=e.getDirectoryPath(e.normalizeSlashes(r));o&&!t.directoryExists(o)&&function t(r,n){var i=e.getDirectoryPath(r),a=""!==i&&r!==i&&!n.directoryExists(i);a&&t(i,n),!a&&n.directoryExists(r)||n.createDirectory(r)}(o,t),i.call(t,r,n,a)}}return t}(),e.sys&&e.sys.getEnvironmentVariable&&(c(e.sys),e.Debug.currentAssertionLevel=/^development$/i.test(e.sys.getEnvironmentVariable("NODE_ENV"))?1:0),e.sys&&e.sys.debugMode&&(e.Debug.isDebugging=!0)}(c||(c={})),function(e){function t(e,t,r,n,i){return{code:e,category:t,key:r,message:n,reportsUnnecessary:i}}e.Diagnostics={Unterminated_string_literal:t(1002,e.DiagnosticCategory.Error,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:t(1003,e.DiagnosticCategory.Error,"Identifier_expected_1003","Identifier expected."),_0_expected:t(1005,e.DiagnosticCategory.Error,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:t(1006,e.DiagnosticCategory.Error,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),Trailing_comma_not_allowed:t(1009,e.DiagnosticCategory.Error,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:t(1010,e.DiagnosticCategory.Error,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:t(1011,e.DiagnosticCategory.Error,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:t(1012,e.DiagnosticCategory.Error,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:t(1013,e.DiagnosticCategory.Error,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:t(1014,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:t(1015,e.DiagnosticCategory.Error,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:t(1016,e.DiagnosticCategory.Error,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:t(1017,e.DiagnosticCategory.Error,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:t(1018,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:t(1019,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:t(1020,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:t(1021,e.DiagnosticCategory.Error,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:t(1022,e.DiagnosticCategory.Error,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),An_index_signature_parameter_type_must_be_string_or_number:t(1023,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_must_be_string_or_number_1023","An index signature parameter type must be 'string' or 'number'."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:t(1024,e.DiagnosticCategory.Error,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),Accessibility_modifier_already_seen:t(1028,e.DiagnosticCategory.Error,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:t(1029,e.DiagnosticCategory.Error,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:t(1030,e.DiagnosticCategory.Error,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_a_class_element:t(1031,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_class_element_1031","'{0}' modifier cannot appear on a class element."),super_must_be_followed_by_an_argument_list_or_member_access:t(1034,e.DiagnosticCategory.Error,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:t(1035,e.DiagnosticCategory.Error,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:t(1036,e.DiagnosticCategory.Error,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:t(1038,e.DiagnosticCategory.Error,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:t(1039,e.DiagnosticCategory.Error,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:t(1040,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_with_a_class_declaration:t(1041,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_a_class_declaration_1041","'{0}' modifier cannot be used with a class declaration."),_0_modifier_cannot_be_used_here:t(1042,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_data_property:t(1043,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_data_property_1043","'{0}' modifier cannot appear on a data property."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:t(1044,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),A_0_modifier_cannot_be_used_with_an_interface_declaration:t(1045,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_interface_declaration_1045","A '{0}' modifier cannot be used with an interface declaration."),A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file:t(1046,e.DiagnosticCategory.Error,"A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046","A 'declare' modifier is required for a top level declaration in a .d.ts file."),A_rest_parameter_cannot_be_optional:t(1047,e.DiagnosticCategory.Error,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:t(1048,e.DiagnosticCategory.Error,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:t(1049,e.DiagnosticCategory.Error,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:t(1051,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:t(1052,e.DiagnosticCategory.Error,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:t(1053,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:t(1054,e.DiagnosticCategory.Error,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:t(1055,e.DiagnosticCategory.Error,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:t(1056,e.DiagnosticCategory.Error,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),An_async_function_or_method_must_have_a_valid_awaitable_return_type:t(1057,e.DiagnosticCategory.Error,"An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057","An async function or method must have a valid awaitable return type."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1058,e.DiagnosticCategory.Error,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:t(1059,e.DiagnosticCategory.Error,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:t(1060,e.DiagnosticCategory.Error,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:t(1061,e.DiagnosticCategory.Error,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:t(1062,e.DiagnosticCategory.Error,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:t(1063,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:t(1064,e.DiagnosticCategory.Error,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064","The return type of an async function or method must be the global Promise<T> type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:t(1066,e.DiagnosticCategory.Error,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:t(1068,e.DiagnosticCategory.Error,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:t(1069,e.DiagnosticCategory.Error,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:t(1070,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:t(1071,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:t(1079,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:t(1084,e.DiagnosticCategory.Error,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:t(1085,e.DiagnosticCategory.Error,"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085","Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),An_accessor_cannot_be_declared_in_an_ambient_context:t(1086,e.DiagnosticCategory.Error,"An_accessor_cannot_be_declared_in_an_ambient_context_1086","An accessor cannot be declared in an ambient context."),_0_modifier_cannot_appear_on_a_constructor_declaration:t(1089,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:t(1090,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:t(1091,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:t(1092,e.DiagnosticCategory.Error,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:t(1093,e.DiagnosticCategory.Error,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:t(1094,e.DiagnosticCategory.Error,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:t(1095,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:t(1096,e.DiagnosticCategory.Error,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:t(1097,e.DiagnosticCategory.Error,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:t(1098,e.DiagnosticCategory.Error,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:t(1099,e.DiagnosticCategory.Error,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:t(1100,e.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:t(1101,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:t(1102,e.DiagnosticCategory.Error,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator:t(1103,e.DiagnosticCategory.Error,"A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103","A 'for-await-of' statement is only allowed within an async function or async generator."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:t(1104,e.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:t(1105,e.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),Jump_target_cannot_cross_function_boundary:t(1107,e.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:t(1108,e.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:t(1109,e.DiagnosticCategory.Error,"Expression_expected_1109","Expression expected."),Type_expected:t(1110,e.DiagnosticCategory.Error,"Type_expected_1110","Type expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:t(1113,e.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:t(1114,e.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:t(1115,e.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:t(1116,e.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:t(1117,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:t(1118,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:t(1119,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:t(1120,e.DiagnosticCategory.Error,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_in_strict_mode:t(1121,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode."),Variable_declaration_list_cannot_be_empty:t(1123,e.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:t(1124,e.DiagnosticCategory.Error,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:t(1125,e.DiagnosticCategory.Error,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:t(1126,e.DiagnosticCategory.Error,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:t(1127,e.DiagnosticCategory.Error,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:t(1128,e.DiagnosticCategory.Error,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:t(1129,e.DiagnosticCategory.Error,"Statement_expected_1129","Statement expected."),case_or_default_expected:t(1130,e.DiagnosticCategory.Error,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:t(1131,e.DiagnosticCategory.Error,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:t(1132,e.DiagnosticCategory.Error,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:t(1134,e.DiagnosticCategory.Error,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:t(1135,e.DiagnosticCategory.Error,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:t(1136,e.DiagnosticCategory.Error,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:t(1137,e.DiagnosticCategory.Error,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:t(1138,e.DiagnosticCategory.Error,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:t(1139,e.DiagnosticCategory.Error,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:t(1140,e.DiagnosticCategory.Error,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:t(1141,e.DiagnosticCategory.Error,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:t(1142,e.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:t(1144,e.DiagnosticCategory.Error,"or_expected_1144","'{' or ';' expected."),Declaration_expected:t(1146,e.DiagnosticCategory.Error,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:t(1147,e.DiagnosticCategory.Error,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:t(1148,e.DiagnosticCategory.Error,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:t(1149,e.DiagnosticCategory.Error,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead:t(1150,e.DiagnosticCategory.Error,"new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150","'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead."),const_declarations_must_be_initialized:t(1155,e.DiagnosticCategory.Error,"const_declarations_must_be_initialized_1155","'const' declarations must be initialized."),const_declarations_can_only_be_declared_inside_a_block:t(1156,e.DiagnosticCategory.Error,"const_declarations_can_only_be_declared_inside_a_block_1156","'const' declarations can only be declared inside a block."),let_declarations_can_only_be_declared_inside_a_block:t(1157,e.DiagnosticCategory.Error,"let_declarations_can_only_be_declared_inside_a_block_1157","'let' declarations can only be declared inside a block."),Unterminated_template_literal:t(1160,e.DiagnosticCategory.Error,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:t(1161,e.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:t(1162,e.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:t(1163,e.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:t(1164,e.DiagnosticCategory.Error,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1165,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1166,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166","A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1168,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1169,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1170,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:t(1171,e.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:t(1172,e.DiagnosticCategory.Error,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:t(1173,e.DiagnosticCategory.Error,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:t(1174,e.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:t(1175,e.DiagnosticCategory.Error,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:t(1176,e.DiagnosticCategory.Error,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:t(1177,e.DiagnosticCategory.Error,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:t(1178,e.DiagnosticCategory.Error,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:t(1179,e.DiagnosticCategory.Error,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:t(1180,e.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:t(1181,e.DiagnosticCategory.Error,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:t(1182,e.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:t(1183,e.DiagnosticCategory.Error,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:t(1184,e.DiagnosticCategory.Error,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:t(1185,e.DiagnosticCategory.Error,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:t(1186,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:t(1187,e.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:t(1188,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:t(1189,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:t(1190,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:t(1191,e.DiagnosticCategory.Error,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:t(1192,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:t(1193,e.DiagnosticCategory.Error,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:t(1194,e.DiagnosticCategory.Error,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),Catch_clause_variable_cannot_have_a_type_annotation:t(1196,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_a_type_annotation_1196","Catch clause variable cannot have a type annotation."),Catch_clause_variable_cannot_have_an_initializer:t(1197,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:t(1198,e.DiagnosticCategory.Error,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:t(1199,e.DiagnosticCategory.Error,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:t(1200,e.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:t(1202,e.DiagnosticCategory.Error,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:t(1203,e.DiagnosticCategory.Error,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided:t(1205,e.DiagnosticCategory.Error,"Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205","Cannot re-export a type when the '--isolatedModules' flag is provided."),Decorators_are_not_valid_here:t(1206,e.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:t(1207,e.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided:t(1208,e.DiagnosticCategory.Error,"Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208","Cannot compile namespaces when the '--isolatedModules' flag is provided."),Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:t(1210,e.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:t(1211,e.DiagnosticCategory.Error,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:t(1212,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t(1213,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:t(1214,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:t(1215,e.DiagnosticCategory.Error,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:t(1216,e.DiagnosticCategory.Error,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:t(1218,e.DiagnosticCategory.Error,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning:t(1219,e.DiagnosticCategory.Error,"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219","Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."),Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher:t(1220,e.DiagnosticCategory.Error,"Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220","Generators are only available when targeting ECMAScript 2015 or higher."),Generators_are_not_allowed_in_an_ambient_context:t(1221,e.DiagnosticCategory.Error,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:t(1222,e.DiagnosticCategory.Error,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:t(1223,e.DiagnosticCategory.Error,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:t(1224,e.DiagnosticCategory.Error,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:t(1225,e.DiagnosticCategory.Error,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:t(1226,e.DiagnosticCategory.Error,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:t(1227,e.DiagnosticCategory.Error,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:t(1228,e.DiagnosticCategory.Error,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:t(1229,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:t(1230,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_can_only_be_used_in_a_module:t(1231,e.DiagnosticCategory.Error,"An_export_assignment_can_only_be_used_in_a_module_1231","An export assignment can only be used in a module."),An_import_declaration_can_only_be_used_in_a_namespace_or_module:t(1232,e.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module."),An_export_declaration_can_only_be_used_in_a_module:t(1233,e.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:t(1234,e.DiagnosticCategory.Error,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:t(1235,e.DiagnosticCategory.Error,"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235","A namespace declaration is only allowed in a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:t(1236,e.DiagnosticCategory.Error,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:t(1237,e.DiagnosticCategory.Error,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:t(1238,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:t(1239,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:t(1240,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:t(1241,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:t(1242,e.DiagnosticCategory.Error,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:t(1243,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:t(1244,e.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:t(1245,e.DiagnosticCategory.Error,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:t(1246,e.DiagnosticCategory.Error,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:t(1247,e.DiagnosticCategory.Error,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:t(1248,e.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:t(1249,e.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5:t(1250,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:t(1251,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:t(1252,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag:t(1253,e.DiagnosticCategory.Error,"_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253","'{0}' tag cannot be used independently as a top level JSDoc tag."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:t(1254,e.DiagnosticCategory.Error,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:t(1255,e.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_rest_element_must_be_last_in_a_tuple_type:t(1256,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_tuple_type_1256","A rest element must be last in a tuple type."),A_required_element_cannot_follow_an_optional_element:t(1257,e.DiagnosticCategory.Error,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),with_statements_are_not_allowed_in_an_async_function_block:t(1300,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expression_is_only_allowed_within_an_async_function:t(1308,e.DiagnosticCategory.Error,"await_expression_is_only_allowed_within_an_async_function_1308","'await' expression is only allowed within an async function."),can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment:t(1312,e.DiagnosticCategory.Error,"can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312","'=' can only be used in an object literal property inside a destructuring assignment."),The_body_of_an_if_statement_cannot_be_the_empty_statement:t(1313,e.DiagnosticCategory.Error,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:t(1314,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:t(1315,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:t(1316,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:t(1317,e.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:t(1318,e.DiagnosticCategory.Error,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:t(1319,e.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1320,e.DiagnosticCategory.Error,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1321,e.DiagnosticCategory.Error,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1322,e.DiagnosticCategory.Error,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext:t(1323,e.DiagnosticCategory.Error,"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323","Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'."),Dynamic_import_must_have_one_specifier_as_an_argument:t(1324,e.DiagnosticCategory.Error,"Dynamic_import_must_have_one_specifier_as_an_argument_1324","Dynamic import must have one specifier as an argument."),Specifier_of_dynamic_import_cannot_be_spread_element:t(1325,e.DiagnosticCategory.Error,"Specifier_of_dynamic_import_cannot_be_spread_element_1325","Specifier of dynamic import cannot be spread element."),Dynamic_import_cannot_have_type_arguments:t(1326,e.DiagnosticCategory.Error,"Dynamic_import_cannot_have_type_arguments_1326","Dynamic import cannot have type arguments"),String_literal_with_double_quotes_expected:t(1327,e.DiagnosticCategory.Error,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:t(1328,e.DiagnosticCategory.Error,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:t(1329,e.DiagnosticCategory.Error,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:t(1330,e.DiagnosticCategory.Error,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:t(1331,e.DiagnosticCategory.Error,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:t(1332,e.DiagnosticCategory.Error,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:t(1333,e.DiagnosticCategory.Error,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:t(1334,e.DiagnosticCategory.Error,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:t(1335,e.DiagnosticCategory.Error,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead:t(1336,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336","An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead:t(1337,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337","An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:t(1338,e.DiagnosticCategory.Error,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:t(1339,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:t(1340,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Type_arguments_cannot_be_used_here:t(1342,e.DiagnosticCategory.Error,"Type_arguments_cannot_be_used_here_1342","Type arguments cannot be used here."),The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options:t(1343,e.DiagnosticCategory.Error,"The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343","The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options."),A_label_is_not_allowed_here:t(1344,e.DiagnosticCategory.Error,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:t(1345,e.DiagnosticCategory.Error,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness"),This_parameter_is_not_allowed_with_use_strict_directive:t(1346,e.DiagnosticCategory.Error,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:t(1347,e.DiagnosticCategory.Error,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:t(1348,e.DiagnosticCategory.Error,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:t(1349,e.DiagnosticCategory.Error,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:t(1350,e.DiagnosticCategory.Message,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:t(1351,e.DiagnosticCategory.Error,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:t(1352,e.DiagnosticCategory.Error,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:t(1353,e.DiagnosticCategory.Error,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:t(1354,e.DiagnosticCategory.Error,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertion_can_only_be_applied_to_a_string_number_boolean_array_or_object_literal:t(1355,e.DiagnosticCategory.Error,"A_const_assertion_can_only_be_applied_to_a_string_number_boolean_array_or_object_literal_1355","A 'const' assertion can only be applied to a string, number, boolean, array, or object literal."),Duplicate_identifier_0:t(2300,e.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:t(2301,e.DiagnosticCategory.Error,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:t(2302,e.DiagnosticCategory.Error,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:t(2303,e.DiagnosticCategory.Error,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:t(2304,e.DiagnosticCategory.Error,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:t(2305,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:t(2306,e.DiagnosticCategory.Error,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0:t(2307,e.DiagnosticCategory.Error,"Cannot_find_module_0_2307","Cannot find module '{0}'."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:t(2308,e.DiagnosticCategory.Error,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:t(2309,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:t(2310,e.DiagnosticCategory.Error,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),A_class_may_only_extend_another_class:t(2311,e.DiagnosticCategory.Error,"A_class_may_only_extend_another_class_2311","A class may only extend another class."),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2312,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:t(2313,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:t(2314,e.DiagnosticCategory.Error,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:t(2315,e.DiagnosticCategory.Error,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:t(2316,e.DiagnosticCategory.Error,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:t(2317,e.DiagnosticCategory.Error,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:t(2318,e.DiagnosticCategory.Error,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:t(2319,e.DiagnosticCategory.Error,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:t(2320,e.DiagnosticCategory.Error,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:t(2321,e.DiagnosticCategory.Error,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:t(2322,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:t(2323,e.DiagnosticCategory.Error,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:t(2324,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:t(2325,e.DiagnosticCategory.Error,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:t(2326,e.DiagnosticCategory.Error,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:t(2327,e.DiagnosticCategory.Error,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:t(2328,e.DiagnosticCategory.Error,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_is_missing_in_type_0:t(2329,e.DiagnosticCategory.Error,"Index_signature_is_missing_in_type_0_2329","Index signature is missing in type '{0}'."),Index_signatures_are_incompatible:t(2330,e.DiagnosticCategory.Error,"Index_signatures_are_incompatible_2330","Index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:t(2331,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:t(2332,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:t(2333,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:t(2334,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:t(2335,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:t(2336,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:t(2337,e.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:t(2338,e.DiagnosticCategory.Error,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:t(2339,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:t(2340,e.DiagnosticCategory.Error,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:t(2341,e.DiagnosticCategory.Error,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:t(2342,e.DiagnosticCategory.Error,"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342","An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1:t(2343,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343","This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'."),Type_0_does_not_satisfy_the_constraint_1:t(2344,e.DiagnosticCategory.Error,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:t(2345,e.DiagnosticCategory.Error,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:t(2346,e.DiagnosticCategory.Error,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:t(2347,e.DiagnosticCategory.Error,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:t(2348,e.DiagnosticCategory.Error,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures:t(2349,e.DiagnosticCategory.Error,"Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349","Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures."),Only_a_void_function_can_be_called_with_the_new_keyword:t(2350,e.DiagnosticCategory.Error,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature:t(2351,e.DiagnosticCategory.Error,"Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351","Cannot use 'new' with an expression whose type lacks a call or construct signature."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:t(2352,e.DiagnosticCategory.Error,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:t(2353,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:t(2354,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:t(2355,e.DiagnosticCategory.Error,"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'void' nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:t(2356,e.DiagnosticCategory.Error,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:t(2357,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2358,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:t(2359,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:t(2360,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2361,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2362,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2363,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:t(2364,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:t(2365,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:t(2366,e.DiagnosticCategory.Error,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap:t(2367,e.DiagnosticCategory.Error,"This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367","This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."),Type_parameter_name_cannot_be_0:t(2368,e.DiagnosticCategory.Error,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:t(2369,e.DiagnosticCategory.Error,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:t(2370,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:t(2371,e.DiagnosticCategory.Error,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_be_referenced_in_its_initializer:t(2372,e.DiagnosticCategory.Error,"Parameter_0_cannot_be_referenced_in_its_initializer_2372","Parameter '{0}' cannot be referenced in its initializer."),Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:t(2373,e.DiagnosticCategory.Error,"Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_string_index_signature:t(2374,e.DiagnosticCategory.Error,"Duplicate_string_index_signature_2374","Duplicate string index signature."),Duplicate_number_index_signature:t(2375,e.DiagnosticCategory.Error,"Duplicate_number_index_signature_2375","Duplicate number index signature."),A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:t(2376,e.DiagnosticCategory.Error,"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376","A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties."),Constructors_for_derived_classes_must_contain_a_super_call:t(2377,e.DiagnosticCategory.Error,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:t(2378,e.DiagnosticCategory.Error,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Getter_and_setter_accessors_do_not_agree_in_visibility:t(2379,e.DiagnosticCategory.Error,"Getter_and_setter_accessors_do_not_agree_in_visibility_2379","Getter and setter accessors do not agree in visibility."),get_and_set_accessor_must_have_the_same_type:t(2380,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_type_2380","'get' and 'set' accessor must have the same type."),A_signature_with_an_implementation_cannot_use_a_string_literal_type:t(2381,e.DiagnosticCategory.Error,"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381","A signature with an implementation cannot use a string literal type."),Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:t(2382,e.DiagnosticCategory.Error,"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382","Specialized overload signature is not assignable to any non-specialized signature."),Overload_signatures_must_all_be_exported_or_non_exported:t(2383,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:t(2384,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:t(2385,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:t(2386,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:t(2387,e.DiagnosticCategory.Error,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:t(2388,e.DiagnosticCategory.Error,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:t(2389,e.DiagnosticCategory.Error,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:t(2390,e.DiagnosticCategory.Error,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:t(2391,e.DiagnosticCategory.Error,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:t(2392,e.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:t(2393,e.DiagnosticCategory.Error,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:t(2394,e.DiagnosticCategory.Error,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:t(2395,e.DiagnosticCategory.Error,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:t(2396,e.DiagnosticCategory.Error,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:t(2397,e.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:t(2399,e.DiagnosticCategory.Error,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:t(2400,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:t(2401,e.DiagnosticCategory.Error,"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401","Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:t(2402,e.DiagnosticCategory.Error,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:t(2403,e.DiagnosticCategory.Error,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:t(2404,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:t(2405,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:t(2406,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:t(2407,e.DiagnosticCategory.Error,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:t(2408,e.DiagnosticCategory.Error,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:t(2409,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:t(2410,e.DiagnosticCategory.Error,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Property_0_of_type_1_is_not_assignable_to_string_index_type_2:t(2411,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411","Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:t(2412,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412","Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),Numeric_index_type_0_is_not_assignable_to_string_index_type_1:t(2413,e.DiagnosticCategory.Error,"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413","Numeric index type '{0}' is not assignable to string index type '{1}'."),Class_name_cannot_be_0:t(2414,e.DiagnosticCategory.Error,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:t(2415,e.DiagnosticCategory.Error,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:t(2416,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:t(2417,e.DiagnosticCategory.Error,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:t(2418,e.DiagnosticCategory.Error,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Class_0_incorrectly_implements_interface_1:t(2420,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2422,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2423,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property:t(2424,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:t(2425,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:t(2426,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:t(2427,e.DiagnosticCategory.Error,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:t(2428,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:t(2430,e.DiagnosticCategory.Error,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:t(2431,e.DiagnosticCategory.Error,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:t(2432,e.DiagnosticCategory.Error,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:t(2433,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:t(2434,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:t(2435,e.DiagnosticCategory.Error,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:t(2436,e.DiagnosticCategory.Error,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:t(2437,e.DiagnosticCategory.Error,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:t(2438,e.DiagnosticCategory.Error,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:t(2439,e.DiagnosticCategory.Error,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:t(2440,e.DiagnosticCategory.Error,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:t(2441,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:t(2442,e.DiagnosticCategory.Error,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:t(2443,e.DiagnosticCategory.Error,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:t(2444,e.DiagnosticCategory.Error,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:t(2445,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:t(2446,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:t(2447,e.DiagnosticCategory.Error,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:t(2448,e.DiagnosticCategory.Error,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:t(2449,e.DiagnosticCategory.Error,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:t(2450,e.DiagnosticCategory.Error,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:t(2451,e.DiagnosticCategory.Error,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:t(2452,e.DiagnosticCategory.Error,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:t(2453,e.DiagnosticCategory.Error,"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453","The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),Variable_0_is_used_before_being_assigned:t(2454,e.DiagnosticCategory.Error,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:t(2455,e.DiagnosticCategory.Error,"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455","Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),Type_alias_0_circularly_references_itself:t(2456,e.DiagnosticCategory.Error,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:t(2457,e.DiagnosticCategory.Error,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:t(2458,e.DiagnosticCategory.Error,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Type_0_is_not_an_array_type:t(2461,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:t(2462,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:t(2463,e.DiagnosticCategory.Error,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:t(2464,e.DiagnosticCategory.Error,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:t(2465,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:t(2466,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:t(2467,e.DiagnosticCategory.Error,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:t(2468,e.DiagnosticCategory.Error,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:t(2469,e.DiagnosticCategory.Error,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:t(2470,e.DiagnosticCategory.Error,"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470","'Symbol' reference does not refer to the global Symbol constructor object."),A_computed_property_name_of_the_form_0_must_be_of_type_symbol:t(2471,e.DiagnosticCategory.Error,"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471","A computed property name of the form '{0}' must be of type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:t(2472,e.DiagnosticCategory.Error,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:t(2473,e.DiagnosticCategory.Error,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values:t(2474,e.DiagnosticCategory.Error,"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474","const enum member initializers can only contain literal values and other computed enum values."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:t(2475,e.DiagnosticCategory.Error,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:t(2476,e.DiagnosticCategory.Error,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:t(2477,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:t(2478,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),Property_0_does_not_exist_on_const_enum_1:t(2479,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_const_enum_1_2479","Property '{0}' does not exist on 'const' enum '{1}'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:t(2480,e.DiagnosticCategory.Error,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:t(2481,e.DiagnosticCategory.Error,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:t(2483,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:t(2484,e.DiagnosticCategory.Error,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:t(2487,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2488,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:t(2489,e.DiagnosticCategory.Error,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property:t(2490,e.DiagnosticCategory.Error,"The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the 'next()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:t(2491,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:t(2492,e.DiagnosticCategory.Error,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:t(2493,e.DiagnosticCategory.Error,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:t(2494,e.DiagnosticCategory.Error,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:t(2495,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:t(2496,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496","The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:t(2497,e.DiagnosticCategory.Error,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:t(2498,e.DiagnosticCategory.Error,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2499,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2500,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:t(2501,e.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:t(2502,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:t(2503,e.DiagnosticCategory.Error,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:t(2504,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:t(2505,e.DiagnosticCategory.Error,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:t(2506,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:t(2507,e.DiagnosticCategory.Error,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:t(2508,e.DiagnosticCategory.Error,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2509,e.DiagnosticCategory.Error,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:t(2510,e.DiagnosticCategory.Error,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:t(2511,e.DiagnosticCategory.Error,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:t(2512,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:t(2513,e.DiagnosticCategory.Error,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),Classes_containing_abstract_methods_must_be_marked_abstract:t(2514,e.DiagnosticCategory.Error,"Classes_containing_abstract_methods_must_be_marked_abstract_2514","Classes containing abstract methods must be marked abstract."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:t(2515,e.DiagnosticCategory.Error,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:t(2516,e.DiagnosticCategory.Error,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:t(2517,e.DiagnosticCategory.Error,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:t(2518,e.DiagnosticCategory.Error,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:t(2519,e.DiagnosticCategory.Error,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:t(2520,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:t(2521,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521","Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method:t(2522,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522","The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:t(2523,e.DiagnosticCategory.Error,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:t(2524,e.DiagnosticCategory.Error,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:t(2525,e.DiagnosticCategory.Error,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:t(2526,e.DiagnosticCategory.Error,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:t(2527,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:t(2528,e.DiagnosticCategory.Error,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:t(2529,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:t(2530,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:t(2531,e.DiagnosticCategory.Error,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:t(2532,e.DiagnosticCategory.Error,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:t(2533,e.DiagnosticCategory.Error,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:t(2534,e.DiagnosticCategory.Error,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Enum_type_0_has_members_with_initializers_that_are_not_literals:t(2535,e.DiagnosticCategory.Error,"Enum_type_0_has_members_with_initializers_that_are_not_literals_2535","Enum type '{0}' has members with initializers that are not literals."),Type_0_cannot_be_used_to_index_type_1:t(2536,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:t(2537,e.DiagnosticCategory.Error,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:t(2538,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:t(2539,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:t(2540,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),The_target_of_an_assignment_must_be_a_variable_or_a_property_access:t(2541,e.DiagnosticCategory.Error,"The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541","The target of an assignment must be a variable or a property access."),Index_signature_in_type_0_only_permits_reading:t(2542,e.DiagnosticCategory.Error,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:t(2543,e.DiagnosticCategory.Error,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:t(2544,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:t(2545,e.DiagnosticCategory.Error,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1:t(2546,e.DiagnosticCategory.Error,"Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546","Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."),The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:t(2547,e.DiagnosticCategory.Error,"The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547","The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2548,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2549,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:t(2551,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:t(2552,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:t(2553,e.DiagnosticCategory.Error,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:t(2554,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:t(2555,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),Expected_0_arguments_but_got_1_or_more:t(2556,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_or_more_2556","Expected {0} arguments, but got {1} or more."),Expected_at_least_0_arguments_but_got_1_or_more:t(2557,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_or_more_2557","Expected at least {0} arguments, but got {1} or more."),Expected_0_type_arguments_but_got_1:t(2558,e.DiagnosticCategory.Error,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:t(2559,e.DiagnosticCategory.Error,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:t(2560,e.DiagnosticCategory.Error,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:t(2561,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:t(2562,e.DiagnosticCategory.Error,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:t(2563,e.DiagnosticCategory.Error,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:t(2564,e.DiagnosticCategory.Error,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:t(2565,e.DiagnosticCategory.Error,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:t(2566,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:t(2567,e.DiagnosticCategory.Error,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2569,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569","Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await:t(2570,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570","Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?"),Object_is_of_type_unknown:t(2571,e.DiagnosticCategory.Error,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Rest_signatures_are_incompatible:t(2572,e.DiagnosticCategory.Error,"Rest_signatures_are_incompatible_2572","Rest signatures are incompatible."),Property_0_is_incompatible_with_rest_element_type:t(2573,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_rest_element_type_2573","Property '{0}' is incompatible with rest element type."),A_rest_element_type_must_be_an_array_type:t(2574,e.DiagnosticCategory.Error,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:t(2575,e.DiagnosticCategory.Error,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_is_a_static_member_of_type_1:t(2576,e.DiagnosticCategory.Error,"Property_0_is_a_static_member_of_type_1_2576","Property '{0}' is a static member of type '{1}'"),Return_type_annotation_circularly_references_itself:t(2577,e.DiagnosticCategory.Error,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode:t(2580,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery:t(2581,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha:t(2582,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2583,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:t(2584,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2585,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Enum_type_0_circularly_references_itself:t(2586,e.DiagnosticCategory.Error,"Enum_type_0_circularly_references_itself_2586","Enum type '{0}' circularly references itself."),JSDoc_type_0_circularly_references_itself:t(2587,e.DiagnosticCategory.Error,"JSDoc_type_0_circularly_references_itself_2587","JSDoc type '{0}' circularly references itself."),Cannot_assign_to_0_because_it_is_a_constant:t(2588,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:t(2589,e.DiagnosticCategory.Error,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:t(2590,e.DiagnosticCategory.Error,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:t(2591,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:t(2592,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:t(2593,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig."),JSX_element_attributes_type_0_may_not_be_a_union_type:t(2600,e.DiagnosticCategory.Error,"JSX_element_attributes_type_0_may_not_be_a_union_type_2600","JSX element attributes type '{0}' may not be a union type."),The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:t(2601,e.DiagnosticCategory.Error,"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601","The return type of a JSX element constructor must return an object type."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:t(2602,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:t(2603,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:t(2604,e.DiagnosticCategory.Error,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:t(2605,e.DiagnosticCategory.Error,"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605","JSX element type '{0}' is not a constructor function for JSX elements."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:t(2606,e.DiagnosticCategory.Error,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:t(2607,e.DiagnosticCategory.Error,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:t(2608,e.DiagnosticCategory.Error,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:t(2609,e.DiagnosticCategory.Error,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:t(2649,e.DiagnosticCategory.Error,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:t(2651,e.DiagnosticCategory.Error,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:t(2652,e.DiagnosticCategory.Error,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:t(2653,e.DiagnosticCategory.Error,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:t(2654,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654","Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:t(2656,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656","Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),JSX_expressions_must_have_one_parent_element:t(2657,e.DiagnosticCategory.Error,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:t(2658,e.DiagnosticCategory.Error,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:t(2659,e.DiagnosticCategory.Error,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:t(2660,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:t(2661,e.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:t(2662,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:t(2663,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:t(2664,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:t(2665,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:t(2666,e.DiagnosticCategory.Error,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:t(2667,e.DiagnosticCategory.Error,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:t(2668,e.DiagnosticCategory.Error,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:t(2669,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:t(2670,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:t(2671,e.DiagnosticCategory.Error,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:t(2672,e.DiagnosticCategory.Error,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:t(2673,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:t(2674,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:t(2675,e.DiagnosticCategory.Error,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:t(2676,e.DiagnosticCategory.Error,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:t(2677,e.DiagnosticCategory.Error,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:t(2678,e.DiagnosticCategory.Error,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:t(2679,e.DiagnosticCategory.Error,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:t(2680,e.DiagnosticCategory.Error,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:t(2681,e.DiagnosticCategory.Error,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),get_and_set_accessor_must_have_the_same_this_type:t(2682,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_this_type_2682","'get' and 'set' accessor must have the same 'this' type."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:t(2683,e.DiagnosticCategory.Error,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:t(2684,e.DiagnosticCategory.Error,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:t(2685,e.DiagnosticCategory.Error,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:t(2686,e.DiagnosticCategory.Error,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:t(2687,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:t(2688,e.DiagnosticCategory.Error,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:t(2689,e.DiagnosticCategory.Error,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead:t(2691,e.DiagnosticCategory.Error,"An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691","An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:t(2692,e.DiagnosticCategory.Error,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:t(2693,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:t(2694,e.DiagnosticCategory.Error,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:t(2695,e.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:t(2696,e.DiagnosticCategory.Error,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2697,e.DiagnosticCategory.Error,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),Spread_types_may_only_be_created_from_object_types:t(2698,e.DiagnosticCategory.Error,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:t(2699,e.DiagnosticCategory.Error,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:t(2700,e.DiagnosticCategory.Error,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:t(2701,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:t(2702,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:t(2703,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a delete operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:t(2704,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a delete operator cannot be a read-only property."),An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2705,e.DiagnosticCategory.Error,"An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705","An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Required_type_parameters_may_not_follow_optional_type_parameters:t(2706,e.DiagnosticCategory.Error,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:t(2707,e.DiagnosticCategory.Error,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:t(2708,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:t(2709,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:t(2710,e.DiagnosticCategory.Error,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2711,e.DiagnosticCategory.Error,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2712,e.DiagnosticCategory.Error,"A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712","A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:t(2713,e.DiagnosticCategory.Error,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:t(2714,e.DiagnosticCategory.Error,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:t(2715,e.DiagnosticCategory.Error,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:t(2716,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:t(2717,e.DiagnosticCategory.Error,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:t(2718,e.DiagnosticCategory.Error,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:t(2719,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:t(2720,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:t(2721,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:t(2722,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:t(2723,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),Module_0_has_no_exported_member_1_Did_you_mean_2:t(2724,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_2_2724","Module '{0}' has no exported member '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:t(2725,e.DiagnosticCategory.Error,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:t(2726,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:t(2727,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:t(2728,e.DiagnosticCategory.Message,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:t(2729,e.DiagnosticCategory.Error,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:t(2730,e.DiagnosticCategory.Error,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:t(2731,e.DiagnosticCategory.Error,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:t(2732,e.DiagnosticCategory.Error,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"),Property_0_was_also_declared_here:t(2733,e.DiagnosticCategory.Error,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),It_is_highly_likely_that_you_are_missing_a_semicolon:t(2734,e.DiagnosticCategory.Error,"It_is_highly_likely_that_you_are_missing_a_semicolon_2734","It is highly likely that you are missing a semicolon."),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:t(2735,e.DiagnosticCategory.Error,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:t(2736,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ESNext:t(2737,e.DiagnosticCategory.Error,"BigInt_literals_are_not_available_when_targeting_lower_than_ESNext_2737","BigInt literals are not available when targeting lower than ESNext."),An_outer_value_of_this_is_shadowed_by_this_container:t(2738,e.DiagnosticCategory.Message,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:t(2739,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:t(2740,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:t(2741,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:t(2742,e.DiagnosticCategory.Error,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:t(2743,e.DiagnosticCategory.Error,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:t(2744,e.DiagnosticCategory.Error,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:t(2745,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:t(2746,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:t(2747,e.DiagnosticCategory.Error,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided:t(2748,e.DiagnosticCategory.Error,"Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748","Cannot access ambient const enums when the '--isolatedModules' flag is provided."),_0_refers_to_a_value_but_is_being_used_as_a_type_here:t(2749,e.DiagnosticCategory.Error,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749","'{0}' refers to a value, but is being used as a type here."),The_implementation_signature_is_declared_here:t(2750,e.DiagnosticCategory.Error,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:t(2751,e.DiagnosticCategory.Error,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:t(2752,e.DiagnosticCategory.Error,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:t(2753,e.DiagnosticCategory.Error,"Another_export_default_is_here_2753","Another export default is here."),Import_declaration_0_is_using_private_name_1:t(4e3,e.DiagnosticCategory.Error,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:t(4002,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:t(4004,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4006,e.DiagnosticCategory.Error,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4008,e.DiagnosticCategory.Error,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4010,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4012,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4014,e.DiagnosticCategory.Error,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4016,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4019,e.DiagnosticCategory.Error,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4020,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:t(4022,e.DiagnosticCategory.Error,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4023,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:t(4024,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:t(4025,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4026,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4027,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t(4028,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4029,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4030,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:t(4031,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4032,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:t(4033,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4034,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4035,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4036,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4037,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4038,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4039,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4040,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4041,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4042,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4043,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4044,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:t(4045,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4046,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:t(4047,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4048,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:t(4049,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4050,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4051,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t(4052,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4053,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4054,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t(4055,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4056,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:t(4057,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4058,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:t(4059,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:t(4060,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4061,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4062,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:t(4063,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4064,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4065,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4066,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4067,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4068,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4069,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4070,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4071,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4072,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4073,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4074,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4075,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4076,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:t(4077,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4078,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:t(4081,e.DiagnosticCategory.Error,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:t(4082,e.DiagnosticCategory.Error,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:t(4083,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict:t(4090,e.DiagnosticCategory.Error,"Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090","Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4091,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:t(4092,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:t(4094,e.DiagnosticCategory.Error,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4095,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4096,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t(4097,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4098,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4099,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:t(4100,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4101,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:t(4102,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:t(4103,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_current_host_does_not_support_the_0_option:t(5001,e.DiagnosticCategory.Error,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:t(5009,e.DiagnosticCategory.Error,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5010,e.DiagnosticCategory.Error,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:t(5012,e.DiagnosticCategory.Error,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:t(5014,e.DiagnosticCategory.Error,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:t(5023,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:t(5024,e.DiagnosticCategory.Error,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Could_not_write_file_0_Colon_1:t(5033,e.DiagnosticCategory.Error,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:t(5042,e.DiagnosticCategory.Error,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:t(5047,e.DiagnosticCategory.Error,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:t(5051,e.DiagnosticCategory.Error,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:t(5052,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:t(5053,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:t(5054,e.DiagnosticCategory.Error,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:t(5055,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:t(5056,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:t(5057,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:t(5058,e.DiagnosticCategory.Error,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:t(5059,e.DiagnosticCategory.Error,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Option_paths_cannot_be_used_without_specifying_baseUrl_option:t(5060,e.DiagnosticCategory.Error,"Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060","Option 'paths' cannot be used without specifying '--baseUrl' option."),Pattern_0_can_have_at_most_one_Asterisk_character:t(5061,e.DiagnosticCategory.Error,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character:t(5062,e.DiagnosticCategory.Error,"Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' in can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:t(5063,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:t(5064,e.DiagnosticCategory.Error,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5065,e.DiagnosticCategory.Error,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:t(5066,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:t(5067,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:t(5068,e.DiagnosticCategory.Error,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:t(5069,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy:t(5070,e.DiagnosticCategory.Error,"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070","Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:t(5071,e.DiagnosticCategory.Error,"Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071","Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),Unknown_build_option_0:t(5072,e.DiagnosticCategory.Error,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:t(5073,e.DiagnosticCategory.Error,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:t(6e3,e.DiagnosticCategory.Message,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:t(6001,e.DiagnosticCategory.Message,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:t(6002,e.DiagnosticCategory.Message,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:t(6003,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:t(6004,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:t(6005,e.DiagnosticCategory.Message,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:t(6006,e.DiagnosticCategory.Message,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:t(6007,e.DiagnosticCategory.Message,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:t(6008,e.DiagnosticCategory.Message,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:t(6009,e.DiagnosticCategory.Message,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:t(6010,e.DiagnosticCategory.Message,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:t(6011,e.DiagnosticCategory.Message,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:t(6012,e.DiagnosticCategory.Message,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:t(6013,e.DiagnosticCategory.Message,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:t(6014,e.DiagnosticCategory.Message,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT:t(6015,e.DiagnosticCategory.Message,"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT_6015","Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'."),Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext:t(6016,e.DiagnosticCategory.Message,"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016","Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'."),Print_this_message:t(6017,e.DiagnosticCategory.Message,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:t(6019,e.DiagnosticCategory.Message,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:t(6020,e.DiagnosticCategory.Message,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:t(6023,e.DiagnosticCategory.Message,"Syntax_Colon_0_6023","Syntax: {0}"),options:t(6024,e.DiagnosticCategory.Message,"options_6024","options"),file:t(6025,e.DiagnosticCategory.Message,"file_6025","file"),Examples_Colon_0:t(6026,e.DiagnosticCategory.Message,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:t(6027,e.DiagnosticCategory.Message,"Options_Colon_6027","Options:"),Version_0:t(6029,e.DiagnosticCategory.Message,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:t(6030,e.DiagnosticCategory.Message,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:t(6031,e.DiagnosticCategory.Message,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:t(6032,e.DiagnosticCategory.Message,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:t(6034,e.DiagnosticCategory.Message,"KIND_6034","KIND"),FILE:t(6035,e.DiagnosticCategory.Message,"FILE_6035","FILE"),VERSION:t(6036,e.DiagnosticCategory.Message,"VERSION_6036","VERSION"),LOCATION:t(6037,e.DiagnosticCategory.Message,"LOCATION_6037","LOCATION"),DIRECTORY:t(6038,e.DiagnosticCategory.Message,"DIRECTORY_6038","DIRECTORY"),STRATEGY:t(6039,e.DiagnosticCategory.Message,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:t(6040,e.DiagnosticCategory.Message,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Generates_corresponding_map_file:t(6043,e.DiagnosticCategory.Message,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:t(6044,e.DiagnosticCategory.Error,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:t(6045,e.DiagnosticCategory.Error,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:t(6046,e.DiagnosticCategory.Error,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:t(6048,e.DiagnosticCategory.Error,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."),Unsupported_locale_0:t(6049,e.DiagnosticCategory.Error,"Unsupported_locale_0_6049","Unsupported locale '{0}'."),Unable_to_open_file_0:t(6050,e.DiagnosticCategory.Error,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:t(6051,e.DiagnosticCategory.Error,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:t(6052,e.DiagnosticCategory.Message,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:t(6053,e.DiagnosticCategory.Error,"File_0_not_found_6053","File '{0}' not found."),File_0_has_unsupported_extension_The_only_supported_extensions_are_1:t(6054,e.DiagnosticCategory.Error,"File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:t(6055,e.DiagnosticCategory.Message,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:t(6056,e.DiagnosticCategory.Message,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:t(6058,e.DiagnosticCategory.Message,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:t(6059,e.DiagnosticCategory.Error,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:t(6060,e.DiagnosticCategory.Message,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:t(6061,e.DiagnosticCategory.Message,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file:t(6064,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_6064","Option '{0}' can only be specified in 'tsconfig.json' file."),Enables_experimental_support_for_ES7_decorators:t(6065,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:t(6066,e.DiagnosticCategory.Message,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Enables_experimental_support_for_ES7_async_functions:t(6068,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_async_functions_6068","Enables experimental support for ES7 async functions."),Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:t(6069,e.DiagnosticCategory.Message,"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069","Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:t(6070,e.DiagnosticCategory.Message,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:t(6071,e.DiagnosticCategory.Message,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:t(6072,e.DiagnosticCategory.Message,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:t(6073,e.DiagnosticCategory.Message,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:t(6074,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:t(6075,e.DiagnosticCategory.Message,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:t(6076,e.DiagnosticCategory.Message,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:t(6077,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:t(6078,e.DiagnosticCategory.Message,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:t(6079,e.DiagnosticCategory.Message,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation_Colon_preserve_react_native_or_react:t(6080,e.DiagnosticCategory.Message,"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080","Specify JSX code generation: 'preserve', 'react-native', or 'react'."),File_0_has_an_unsupported_extension_so_skipping_it:t(6081,e.DiagnosticCategory.Message,"File_0_has_an_unsupported_extension_so_skipping_it_6081","File '{0}' has an unsupported extension, so skipping it."),Only_amd_and_system_modules_are_supported_alongside_0:t(6082,e.DiagnosticCategory.Error,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:t(6083,e.DiagnosticCategory.Message,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:t(6084,e.DiagnosticCategory.Message,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:t(6085,e.DiagnosticCategory.Message,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:t(6086,e.DiagnosticCategory.Message,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:t(6087,e.DiagnosticCategory.Message,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:t(6088,e.DiagnosticCategory.Message,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:t(6089,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:t(6090,e.DiagnosticCategory.Message,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:t(6091,e.DiagnosticCategory.Message,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:t(6092,e.DiagnosticCategory.Message,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:t(6093,e.DiagnosticCategory.Message,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:t(6094,e.DiagnosticCategory.Message,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1:t(6095,e.DiagnosticCategory.Message,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095","Loading module as file / folder, candidate module location '{0}', target file type '{1}'."),File_0_does_not_exist:t(6096,e.DiagnosticCategory.Message,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exist_use_it_as_a_name_resolution_result:t(6097,e.DiagnosticCategory.Message,"File_0_exist_use_it_as_a_name_resolution_result_6097","File '{0}' exist - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_type_1:t(6098,e.DiagnosticCategory.Message,"Loading_module_0_from_node_modules_folder_target_file_type_1_6098","Loading module '{0}' from 'node_modules' folder, target file type '{1}'."),Found_package_json_at_0:t(6099,e.DiagnosticCategory.Message,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:t(6100,e.DiagnosticCategory.Message,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:t(6101,e.DiagnosticCategory.Message,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:t(6102,e.DiagnosticCategory.Message,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Option_0_should_have_array_of_strings_as_a_value:t(6103,e.DiagnosticCategory.Error,"Option_0_should_have_array_of_strings_as_a_value_6103","Option '{0}' should have array of strings as a value."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:t(6104,e.DiagnosticCategory.Message,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:t(6105,e.DiagnosticCategory.Message,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:t(6106,e.DiagnosticCategory.Message,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:t(6107,e.DiagnosticCategory.Message,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:t(6108,e.DiagnosticCategory.Message,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:t(6109,e.DiagnosticCategory.Message,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:t(6110,e.DiagnosticCategory.Message,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:t(6111,e.DiagnosticCategory.Message,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:t(6112,e.DiagnosticCategory.Message,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:t(6113,e.DiagnosticCategory.Message,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:t(6114,e.DiagnosticCategory.Error,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:t(6115,e.DiagnosticCategory.Message,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:t(6116,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Resolving_using_primary_search_paths:t(6117,e.DiagnosticCategory.Message,"Resolving_using_primary_search_paths_6117","Resolving using primary search paths..."),Resolving_from_node_modules_folder:t(6118,e.DiagnosticCategory.Message,"Resolving_from_node_modules_folder_6118","Resolving from node_modules folder..."),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:t(6119,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:t(6120,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:t(6121,e.DiagnosticCategory.Message,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:t(6122,e.DiagnosticCategory.Message,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:t(6123,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:t(6124,e.DiagnosticCategory.Message,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:t(6125,e.DiagnosticCategory.Message,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:t(6126,e.DiagnosticCategory.Message,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:t(6127,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:t(6128,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:t(6130,e.DiagnosticCategory.Message,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:t(6131,e.DiagnosticCategory.Error,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:t(6132,e.DiagnosticCategory.Message,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:t(6133,e.DiagnosticCategory.Error,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:t(6134,e.DiagnosticCategory.Message,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:t(6135,e.DiagnosticCategory.Message,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:t(6136,e.DiagnosticCategory.Message,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:t(6137,e.DiagnosticCategory.Error,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:t(6138,e.DiagnosticCategory.Error,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:t(6139,e.DiagnosticCategory.Message,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:t(6140,e.DiagnosticCategory.Error,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:t(6141,e.DiagnosticCategory.Message,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:t(6142,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:t(6144,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:t(6145,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:t(6146,e.DiagnosticCategory.Message,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:t(6147,e.DiagnosticCategory.Message,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:t(6148,e.DiagnosticCategory.Message,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:t(6149,e.DiagnosticCategory.Message,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:t(6150,e.DiagnosticCategory.Message,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:t(6151,e.DiagnosticCategory.Message,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:t(6152,e.DiagnosticCategory.Message,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:t(6153,e.DiagnosticCategory.Message,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:t(6154,e.DiagnosticCategory.Message,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:t(6155,e.DiagnosticCategory.Message,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:t(6156,e.DiagnosticCategory.Message,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:t(6157,e.DiagnosticCategory.Message,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:t(6158,e.DiagnosticCategory.Message,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:t(6159,e.DiagnosticCategory.Message,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:t(6160,e.DiagnosticCategory.Message,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:t(6161,e.DiagnosticCategory.Message,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:t(6162,e.DiagnosticCategory.Message,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:t(6163,e.DiagnosticCategory.Message,"The_character_set_of_the_input_files_6163","The character set of the input files."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:t(6164,e.DiagnosticCategory.Message,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Do_not_truncate_error_messages:t(6165,e.DiagnosticCategory.Message,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:t(6166,e.DiagnosticCategory.Message,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:t(6167,e.DiagnosticCategory.Message,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:t(6168,e.DiagnosticCategory.Message,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:t(6169,e.DiagnosticCategory.Message,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:t(6170,e.DiagnosticCategory.Message,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:t(6171,e.DiagnosticCategory.Message,"Command_line_Options_6171","Command-line Options"),Basic_Options:t(6172,e.DiagnosticCategory.Message,"Basic_Options_6172","Basic Options"),Strict_Type_Checking_Options:t(6173,e.DiagnosticCategory.Message,"Strict_Type_Checking_Options_6173","Strict Type-Checking Options"),Module_Resolution_Options:t(6174,e.DiagnosticCategory.Message,"Module_Resolution_Options_6174","Module Resolution Options"),Source_Map_Options:t(6175,e.DiagnosticCategory.Message,"Source_Map_Options_6175","Source Map Options"),Additional_Checks:t(6176,e.DiagnosticCategory.Message,"Additional_Checks_6176","Additional Checks"),Experimental_Options:t(6177,e.DiagnosticCategory.Message,"Experimental_Options_6177","Experimental Options"),Advanced_Options:t(6178,e.DiagnosticCategory.Message,"Advanced_Options_6178","Advanced Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:t(6179,e.DiagnosticCategory.Message,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),Enable_all_strict_type_checking_options:t(6180,e.DiagnosticCategory.Message,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),List_of_language_service_plugins:t(6181,e.DiagnosticCategory.Message,"List_of_language_service_plugins_6181","List of language service plugins."),Scoped_package_detected_looking_in_0:t(6182,e.DiagnosticCategory.Message,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_to_file_1_from_old_program:t(6183,e.DiagnosticCategory.Message,"Reusing_resolution_of_module_0_to_file_1_from_old_program_6183","Reusing resolution of module '{0}' to file '{1}' from old program."),Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program:t(6184,e.DiagnosticCategory.Message,"Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184","Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),Disable_strict_checking_of_generic_signatures_in_function_types:t(6185,e.DiagnosticCategory.Message,"Disable_strict_checking_of_generic_signatures_in_function_types_6185","Disable strict checking of generic signatures in function types."),Enable_strict_checking_of_function_types:t(6186,e.DiagnosticCategory.Message,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:t(6187,e.DiagnosticCategory.Message,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:t(6188,e.DiagnosticCategory.Error,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:t(6189,e.DiagnosticCategory.Error,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Found_package_json_at_0_Package_ID_is_1:t(6190,e.DiagnosticCategory.Message,"Found_package_json_at_0_Package_ID_is_1_6190","Found 'package.json' at '{0}'. Package ID is '{1}'."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:t(6191,e.DiagnosticCategory.Message,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:t(6192,e.DiagnosticCategory.Error,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:t(6193,e.DiagnosticCategory.Message,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:t(6194,e.DiagnosticCategory.Message,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:t(6195,e.DiagnosticCategory.Message,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:t(6196,e.DiagnosticCategory.Error,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:t(6197,e.DiagnosticCategory.Message,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:t(6198,e.DiagnosticCategory.Error,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:t(6199,e.DiagnosticCategory.Error,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:t(6200,e.DiagnosticCategory.Error,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:t(6201,e.DiagnosticCategory.Message,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),_0_was_also_declared_here:t(6203,e.DiagnosticCategory.Message,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:t(6204,e.DiagnosticCategory.Message,"and_here_6204","and here."),All_type_parameters_are_unused:t(6205,e.DiagnosticCategory.Error,"All_type_parameters_are_unused_6205","All type parameters are unused"),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:t(6206,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:t(6207,e.DiagnosticCategory.Message,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:t(6208,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:t(6209,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:t(6210,e.DiagnosticCategory.Message,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:t(6211,e.DiagnosticCategory.Message,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:t(6212,e.DiagnosticCategory.Message,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:t(6213,e.DiagnosticCategory.Message,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:t(6214,e.DiagnosticCategory.Message,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:t(6215,e.DiagnosticCategory.Message,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:t(6216,e.DiagnosticCategory.Message,"Found_1_error_6216","Found 1 error."),Found_0_errors:t(6217,e.DiagnosticCategory.Message,"Found_0_errors_6217","Found {0} errors."),Projects_to_reference:t(6300,e.DiagnosticCategory.Message,"Projects_to_reference_6300","Projects to reference"),Enable_project_compilation:t(6302,e.DiagnosticCategory.Message,"Enable_project_compilation_6302","Enable project compilation"),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:t(6202,e.DiagnosticCategory.Error,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),Composite_projects_may_not_disable_declaration_emit:t(6304,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:t(6305,e.DiagnosticCategory.Error,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:t(6306,e.DiagnosticCategory.Error,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern:t(6307,e.DiagnosticCategory.Error,"File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307","File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern."),Cannot_prepend_project_0_because_it_does_not_have_outFile_set:t(6308,e.DiagnosticCategory.Error,"Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308","Cannot prepend project '{0}' because it does not have 'outFile' set"),Output_file_0_from_project_1_does_not_exist:t(6309,e.DiagnosticCategory.Error,"Output_file_0_from_project_1_does_not_exist_6309","Output file '{0}' from project '{1}' does not exist"),Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2:t(6350,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350","Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2:t(6351,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:t(6352,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:t(6353,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:t(6354,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:t(6355,e.DiagnosticCategory.Message,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:t(6356,e.DiagnosticCategory.Message,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:t(6357,e.DiagnosticCategory.Message,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:t(6358,e.DiagnosticCategory.Message,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:t(6359,e.DiagnosticCategory.Message,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),delete_this_Project_0_is_up_to_date_because_it_was_previously_built:t(6360,e.DiagnosticCategory.Message,"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360","delete this - Project '{0}' is up to date because it was previously built"),Project_0_is_up_to_date:t(6361,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:t(6362,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:t(6363,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:t(6364,e.DiagnosticCategory.Message,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:t(6365,e.DiagnosticCategory.Message,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects"),Enable_verbose_logging:t(6366,e.DiagnosticCategory.Message,"Enable_verbose_logging_6366","Enable verbose logging"),Show_what_would_be_built_or_deleted_if_specified_with_clean:t(6367,e.DiagnosticCategory.Message,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Build_all_projects_including_those_that_appear_to_be_up_to_date:t(6368,e.DiagnosticCategory.Message,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368","Build all projects, including those that appear to be up to date"),Option_build_must_be_the_first_command_line_argument:t(6369,e.DiagnosticCategory.Error,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:t(6370,e.DiagnosticCategory.Error,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:t(6371,e.DiagnosticCategory.Message,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed:t(6372,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372","Project '{0}' is out of date because output of its dependency '{1}' has changed"),Updating_output_of_project_0:t(6373,e.DiagnosticCategory.Message,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:t(6374,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),A_non_dry_build_would_update_output_of_project_0:t(6375,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_output_of_project_0_6375","A non-dry build would update output of project '{0}'"),Cannot_update_output_of_project_0_because_there_was_error_reading_file_1:t(6376,e.DiagnosticCategory.Message,"Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376","Cannot update output of project '{0}' because there was error reading file '{1}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:t(6377,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Enable_incremental_compilation:t(6378,e.DiagnosticCategory.Message,"Enable_incremental_compilation_6378","Enable incremental compilation"),Composite_projects_may_not_disable_incremental_compilation:t(6379,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:t(6380,e.DiagnosticCategory.Message,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:t(6381,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:t(6500,e.DiagnosticCategory.Message,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:t(6501,e.DiagnosticCategory.Message,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:t(6502,e.DiagnosticCategory.Message,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Variable_0_implicitly_has_an_1_type:t(7005,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:t(7006,e.DiagnosticCategory.Error,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:t(7008,e.DiagnosticCategory.Error,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:t(7009,e.DiagnosticCategory.Error,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:t(7010,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7011,e.DiagnosticCategory.Error,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7013,e.DiagnosticCategory.Error,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7014,e.DiagnosticCategory.Error,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:t(7015,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:t(7016,e.DiagnosticCategory.Error,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:t(7017,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:t(7018,e.DiagnosticCategory.Error,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:t(7019,e.DiagnosticCategory.Error,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7020,e.DiagnosticCategory.Error,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:t(7022,e.DiagnosticCategory.Error,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7023,e.DiagnosticCategory.Error,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7024,e.DiagnosticCategory.Error,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type:t(7025,e.DiagnosticCategory.Error,"Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025","Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:t(7026,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:t(7027,e.DiagnosticCategory.Error,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:t(7028,e.DiagnosticCategory.Error,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:t(7029,e.DiagnosticCategory.Error,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:t(7030,e.DiagnosticCategory.Error,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:t(7031,e.DiagnosticCategory.Error,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:t(7032,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:t(7033,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:t(7034,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:t(7035,e.DiagnosticCategory.Error,"Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035","Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:t(7036,e.DiagnosticCategory.Error,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:t(7037,e.DiagnosticCategory.Message,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:t(7038,e.DiagnosticCategory.Message,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:t(7039,e.DiagnosticCategory.Error,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:t(7040,e.DiagnosticCategory.Error,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`"),The_containing_arrow_function_captures_the_global_value_of_this:t(7041,e.DiagnosticCategory.Error,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:t(7042,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7043,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7044,e.DiagnosticCategory.Suggestion,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7045,e.DiagnosticCategory.Suggestion,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:t(7046,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:t(7047,e.DiagnosticCategory.Suggestion,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:t(7048,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:t(7049,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:t(7050,e.DiagnosticCategory.Suggestion,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:t(7051,e.DiagnosticCategory.Error,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),You_cannot_rename_this_element:t(8e3,e.DiagnosticCategory.Error,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:t(8001,e.DiagnosticCategory.Error,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_a_ts_file:t(8002,e.DiagnosticCategory.Error,"import_can_only_be_used_in_a_ts_file_8002","'import ... =' can only be used in a .ts file."),export_can_only_be_used_in_a_ts_file:t(8003,e.DiagnosticCategory.Error,"export_can_only_be_used_in_a_ts_file_8003","'export=' can only be used in a .ts file."),type_parameter_declarations_can_only_be_used_in_a_ts_file:t(8004,e.DiagnosticCategory.Error,"type_parameter_declarations_can_only_be_used_in_a_ts_file_8004","'type parameter declarations' can only be used in a .ts file."),implements_clauses_can_only_be_used_in_a_ts_file:t(8005,e.DiagnosticCategory.Error,"implements_clauses_can_only_be_used_in_a_ts_file_8005","'implements clauses' can only be used in a .ts file."),interface_declarations_can_only_be_used_in_a_ts_file:t(8006,e.DiagnosticCategory.Error,"interface_declarations_can_only_be_used_in_a_ts_file_8006","'interface declarations' can only be used in a .ts file."),module_declarations_can_only_be_used_in_a_ts_file:t(8007,e.DiagnosticCategory.Error,"module_declarations_can_only_be_used_in_a_ts_file_8007","'module declarations' can only be used in a .ts file."),type_aliases_can_only_be_used_in_a_ts_file:t(8008,e.DiagnosticCategory.Error,"type_aliases_can_only_be_used_in_a_ts_file_8008","'type aliases' can only be used in a .ts file."),_0_can_only_be_used_in_a_ts_file:t(8009,e.DiagnosticCategory.Error,"_0_can_only_be_used_in_a_ts_file_8009","'{0}' can only be used in a .ts file."),types_can_only_be_used_in_a_ts_file:t(8010,e.DiagnosticCategory.Error,"types_can_only_be_used_in_a_ts_file_8010","'types' can only be used in a .ts file."),type_arguments_can_only_be_used_in_a_ts_file:t(8011,e.DiagnosticCategory.Error,"type_arguments_can_only_be_used_in_a_ts_file_8011","'type arguments' can only be used in a .ts file."),parameter_modifiers_can_only_be_used_in_a_ts_file:t(8012,e.DiagnosticCategory.Error,"parameter_modifiers_can_only_be_used_in_a_ts_file_8012","'parameter modifiers' can only be used in a .ts file."),non_null_assertions_can_only_be_used_in_a_ts_file:t(8013,e.DiagnosticCategory.Error,"non_null_assertions_can_only_be_used_in_a_ts_file_8013","'non-null assertions' can only be used in a .ts file."),enum_declarations_can_only_be_used_in_a_ts_file:t(8015,e.DiagnosticCategory.Error,"enum_declarations_can_only_be_used_in_a_ts_file_8015","'enum declarations' can only be used in a .ts file."),type_assertion_expressions_can_only_be_used_in_a_ts_file:t(8016,e.DiagnosticCategory.Error,"type_assertion_expressions_can_only_be_used_in_a_ts_file_8016","'type assertion expressions' can only be used in a .ts file."),Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:t(8017,e.DiagnosticCategory.Error,"Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017","Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0:t(8018,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018","Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),Report_errors_in_js_files:t(8019,e.DiagnosticCategory.Message,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:t(8020,e.DiagnosticCategory.Error,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:t(8021,e.DiagnosticCategory.Error,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:t(8022,e.DiagnosticCategory.Error,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:t(8023,e.DiagnosticCategory.Error,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:t(8024,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:t(8025,e.DiagnosticCategory.Error,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one `@augments` or `@extends` tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:t(8026,e.DiagnosticCategory.Error,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:t(8027,e.DiagnosticCategory.Error,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:t(8028,e.DiagnosticCategory.Error,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:t(8029,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:t(8030,e.DiagnosticCategory.Error,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:t(8031,e.DiagnosticCategory.Error,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:t(8032,e.DiagnosticCategory.Error,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause:t(9002,e.DiagnosticCategory.Error,"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002","Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),class_expressions_are_not_currently_supported:t(9003,e.DiagnosticCategory.Error,"class_expressions_are_not_currently_supported_9003","'class' expressions are not currently supported."),Language_service_is_disabled:t(9004,e.DiagnosticCategory.Error,"Language_service_is_disabled_9004","Language service is disabled."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:t(17e3,e.DiagnosticCategory.Error,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:t(17001,e.DiagnosticCategory.Error,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:t(17002,e.DiagnosticCategory.Error,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),JSX_attribute_expected:t(17003,e.DiagnosticCategory.Error,"JSX_attribute_expected_17003","JSX attribute expected."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:t(17004,e.DiagnosticCategory.Error,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:t(17005,e.DiagnosticCategory.Error,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17006,e.DiagnosticCategory.Error,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17007,e.DiagnosticCategory.Error,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:t(17008,e.DiagnosticCategory.Error,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:t(17009,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:t(17010,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:t(17011,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:t(17012,e.DiagnosticCategory.Error,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:t(17013,e.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:t(17014,e.DiagnosticCategory.Error,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:t(17015,e.DiagnosticCategory.Error,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),JSX_fragment_is_not_supported_when_using_jsxFactory:t(17016,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_jsxFactory_17016","JSX fragment is not supported when using --jsxFactory"),JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma:t(17017,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017","JSX fragment is not supported when using an inline JSX factory pragma"),Circularity_detected_while_resolving_configuration_Colon_0:t(18e3,e.DiagnosticCategory.Error,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not:t(18001,e.DiagnosticCategory.Error,"A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001","A path in an 'extends' option must be relative or rooted, but '{0}' is not."),The_files_list_in_config_file_0_is_empty:t(18002,e.DiagnosticCategory.Error,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:t(18003,e.DiagnosticCategory.Error,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module:t(80001,e.DiagnosticCategory.Suggestion,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001","File is a CommonJS module; it may be converted to an ES6 module."),This_constructor_function_may_be_converted_to_a_class_declaration:t(80002,e.DiagnosticCategory.Suggestion,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:t(80003,e.DiagnosticCategory.Suggestion,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:t(80004,e.DiagnosticCategory.Suggestion,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:t(80005,e.DiagnosticCategory.Suggestion,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:t(80006,e.DiagnosticCategory.Suggestion,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),Add_missing_super_call:t(90001,e.DiagnosticCategory.Message,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:t(90002,e.DiagnosticCategory.Message,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:t(90003,e.DiagnosticCategory.Message,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_declaration_for_Colon_0:t(90004,e.DiagnosticCategory.Message,"Remove_declaration_for_Colon_0_90004","Remove declaration for: '{0}'"),Remove_import_from_0:t(90005,e.DiagnosticCategory.Message,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:t(90006,e.DiagnosticCategory.Message,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:t(90007,e.DiagnosticCategory.Message,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:t(90008,e.DiagnosticCategory.Message,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_destructuring:t(90009,e.DiagnosticCategory.Message,"Remove_destructuring_90009","Remove destructuring"),Remove_variable_statement:t(90010,e.DiagnosticCategory.Message,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:t(90011,e.DiagnosticCategory.Message,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:t(90012,e.DiagnosticCategory.Message,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_module_1:t(90013,e.DiagnosticCategory.Message,"Import_0_from_module_1_90013","Import '{0}' from module \"{1}\""),Change_0_to_1:t(90014,e.DiagnosticCategory.Message,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Add_0_to_existing_import_declaration_from_1:t(90015,e.DiagnosticCategory.Message,"Add_0_to_existing_import_declaration_from_1_90015","Add '{0}' to existing import declaration from \"{1}\""),Declare_property_0:t(90016,e.DiagnosticCategory.Message,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:t(90017,e.DiagnosticCategory.Message,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:t(90018,e.DiagnosticCategory.Message,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:t(90019,e.DiagnosticCategory.Message,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:t(90020,e.DiagnosticCategory.Message,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:t(90021,e.DiagnosticCategory.Message,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:t(90022,e.DiagnosticCategory.Message,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:t(90023,e.DiagnosticCategory.Message,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:t(90024,e.DiagnosticCategory.Message,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:t(90025,e.DiagnosticCategory.Message,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:t(90026,e.DiagnosticCategory.Message,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:t(90027,e.DiagnosticCategory.Message,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:t(90028,e.DiagnosticCategory.Message,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:t(90029,e.DiagnosticCategory.Message,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:t(90030,e.DiagnosticCategory.Message,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:t(90031,e.DiagnosticCategory.Message,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Import_default_0_from_module_1:t(90032,e.DiagnosticCategory.Message,"Import_default_0_from_module_1_90032","Import default '{0}' from module \"{1}\""),Add_default_import_0_to_existing_import_declaration_from_1:t(90033,e.DiagnosticCategory.Message,"Add_default_import_0_to_existing_import_declaration_from_1_90033","Add default import '{0}' to existing import declaration from \"{1}\""),Add_parameter_name:t(90034,e.DiagnosticCategory.Message,"Add_parameter_name_90034","Add parameter name"),Convert_function_to_an_ES2015_class:t(95001,e.DiagnosticCategory.Message,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_function_0_to_class:t(95002,e.DiagnosticCategory.Message,"Convert_function_0_to_class_95002","Convert function '{0}' to class"),Extract_to_0_in_1:t(95004,e.DiagnosticCategory.Message,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:t(95005,e.DiagnosticCategory.Message,"Extract_function_95005","Extract function"),Extract_constant:t(95006,e.DiagnosticCategory.Message,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:t(95007,e.DiagnosticCategory.Message,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:t(95008,e.DiagnosticCategory.Message,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:t(95009,e.DiagnosticCategory.Message,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Annotate_with_types_from_JSDoc:t(95010,e.DiagnosticCategory.Message,"Annotate_with_types_from_JSDoc_95010","Annotate with types from JSDoc"),Infer_type_of_0_from_usage:t(95011,e.DiagnosticCategory.Message,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:t(95012,e.DiagnosticCategory.Message,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:t(95013,e.DiagnosticCategory.Message,"Convert_to_default_import_95013","Convert to default import"),Install_0:t(95014,e.DiagnosticCategory.Message,"Install_0_95014","Install '{0}'"),Replace_import_with_0:t(95015,e.DiagnosticCategory.Message,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:t(95016,e.DiagnosticCategory.Message,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES6_module:t(95017,e.DiagnosticCategory.Message,"Convert_to_ES6_module_95017","Convert to ES6 module"),Add_undefined_type_to_property_0:t(95018,e.DiagnosticCategory.Message,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:t(95019,e.DiagnosticCategory.Message,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:t(95020,e.DiagnosticCategory.Message,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Add_all_missing_members:t(95022,e.DiagnosticCategory.Message,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:t(95023,e.DiagnosticCategory.Message,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:t(95024,e.DiagnosticCategory.Message,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:t(95025,e.DiagnosticCategory.Message,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:t(95026,e.DiagnosticCategory.Message,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:t(95027,e.DiagnosticCategory.Message,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:t(95028,e.DiagnosticCategory.Message,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:t(95029,e.DiagnosticCategory.Message,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:t(95030,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:t(95031,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:t(95032,e.DiagnosticCategory.Message,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:t(95033,e.DiagnosticCategory.Message,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:t(95034,e.DiagnosticCategory.Message,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:t(95035,e.DiagnosticCategory.Message,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:t(95036,e.DiagnosticCategory.Message,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:t(95037,e.DiagnosticCategory.Message,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:t(95038,e.DiagnosticCategory.Message,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:t(95039,e.DiagnosticCategory.Message,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:t(95040,e.DiagnosticCategory.Message,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:t(95041,e.DiagnosticCategory.Message,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:t(95042,e.DiagnosticCategory.Message,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:t(95043,e.DiagnosticCategory.Message,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:t(95044,e.DiagnosticCategory.Message,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:t(95045,e.DiagnosticCategory.Message,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:t(95046,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:t(95047,e.DiagnosticCategory.Message,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:t(95048,e.DiagnosticCategory.Message,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:t(95049,e.DiagnosticCategory.Message,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:t(95050,e.DiagnosticCategory.Message,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:t(95051,e.DiagnosticCategory.Message,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:t(95052,e.DiagnosticCategory.Message,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:t(95053,e.DiagnosticCategory.Message,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:t(95054,e.DiagnosticCategory.Message,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:t(95055,e.DiagnosticCategory.Message,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:t(95056,e.DiagnosticCategory.Message,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:t(95057,e.DiagnosticCategory.Message,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:t(95058,e.DiagnosticCategory.Message,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:t(95059,e.DiagnosticCategory.Message,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:t(95060,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:t(95061,e.DiagnosticCategory.Message,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:t(95062,e.DiagnosticCategory.Message,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:t(95063,e.DiagnosticCategory.Message,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:t(95064,e.DiagnosticCategory.Message,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:t(95065,e.DiagnosticCategory.Message,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:t(95066,e.DiagnosticCategory.Message,"Convert_all_to_async_functions_95066","Convert all to async functions"),Generate_types_for_0:t(95067,e.DiagnosticCategory.Message,"Generate_types_for_0_95067","Generate types for '{0}'"),Generate_types_for_all_packages_without_types:t(95068,e.DiagnosticCategory.Message,"Generate_types_for_all_packages_without_types_95068","Generate types for all packages without types"),Add_unknown_conversion_for_non_overlapping_types:t(95069,e.DiagnosticCategory.Message,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:t(95070,e.DiagnosticCategory.Message,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:t(95071,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:t(95072,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:t(95073,e.DiagnosticCategory.Message,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:t(95074,e.DiagnosticCategory.Message,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:t(95075,e.DiagnosticCategory.Message,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object")}}(c||(c={})),function(e){var t;function r(e){return e>=72}e.tokenIsIdentifierOrKeyword=r,e.tokenIsIdentifierOrKeywordOrGreaterThan=function(e){return 30===e||r(e)};var n=((t={abstract:118,any:120,as:119,bigint:146,boolean:123,break:73,case:74,catch:75,class:76,continue:78,const:77}).constructor=124,t.debugger=79,t.declare=125,t.default=80,t.delete=81,t.do=82,t.else=83,t.enum=84,t.export=85,t.extends=86,t.false=87,t.finally=88,t.for=89,t.from=144,t.function=90,t.get=126,t.if=91,t.implements=109,t.import=92,t.in=93,t.infer=127,t.instanceof=94,t.interface=110,t.is=128,t.keyof=129,t.let=111,t.module=130,t.namespace=131,t.never=132,t.new=95,t.null=96,t.number=135,t.object=136,t.package=112,t.private=113,t.protected=114,t.public=115,t.readonly=133,t.require=134,t.global=145,t.return=97,t.set=137,t.static=116,t.string=138,t.super=98,t.switch=99,t.symbol=139,t.this=100,t.throw=101,t.true=102,t.try=103,t.type=140,t.typeof=104,t.undefined=141,t.unique=142,t.unknown=143,t.var=105,t.void=106,t.while=107,t.with=108,t.yield=117,t.async=121,t.await=122,t.of=147,t),a=e.createMapFromTemplate(n),o=e.createMapFromTemplate(i({},n,{"{":18,"}":19,"(":20,")":21,"[":22,"]":23,".":24,"...":25,";":26,",":27,"<":28,">":30,"<=":31,">=":32,"==":33,"!=":34,"===":35,"!==":36,"=>":37,"+":38,"-":39,"**":41,"*":40,"/":42,"%":43,"++":44,"--":45,"<<":46,"</":29,">>":47,">>>":48,"&":49,"|":50,"^":51,"!":52,"~":53,"&&":54,"||":55,"?":56,":":57,"=":59,"+=":60,"-=":61,"*=":62,"**=":63,"/=":64,"%=":65,"<<=":66,">>=":67,">>>=":68,"&=":69,"|=":70,"^=":71,"@":58})),s=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],c=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],u=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],l=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500];function _(e,t){if(e<t[0])return!1;for(var r,n=0,i=t.length;n+1<i;){if(r=n+(i-n)/2,t[r-=r%2]<=e&&e<=t[r+1])return!0;e<t[r]?i=r:n=r+2}return!1}function d(e,t){return _(e,t>=1?u:s)}e.isUnicodeIdentifierStart=d;var p,f=(p=[],o.forEach(function(e,t){p[e]=t}),p);function m(e){for(var t=new Array,r=0,n=0;r<e.length;){var i=e.charCodeAt(r);switch(r++,i){case 13:10===e.charCodeAt(r)&&r++;case 10:t.push(n),n=r;break;default:i>127&&D(i)&&(t.push(n),n=r)}}return t.push(n),t}function g(t,r,n,i,a){(r<0||r>=t.length)&&(a?r=r<0?0:r>=t.length?t.length-1:r:e.Debug.fail("Bad line number. Line: "+r+", lineStarts.length: "+t.length+" , line map is correct? "+(void 0!==i?e.arraysEqual(t,m(i)):"unknown")));var o=t[r]+n;return a?o>t[r+1]?t[r+1]:"string"==typeof i&&o>i.length?i.length:o:(r<t.length-1?e.Debug.assert(o<t[r+1]):void 0!==i&&e.Debug.assert(o<=i.length),o)}function y(e){return e.lineMap||(e.lineMap=m(e.text))}function h(t,r){var n=e.binarySearch(t,r,e.identity,e.compareValues);return n<0&&(n=~n-1,e.Debug.assert(-1!==n,"position cannot precede the beginning of the file")),{line:n,character:r-t[n]}}function v(e){return b(e)||D(e)}function b(e){return 32===e||9===e||11===e||12===e||160===e||133===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function D(e){return 10===e||13===e||8232===e||8233===e}function x(e){return e>=48&&e<=57}function S(e){return e>=48&&e<=55}e.tokenToString=function(e){return f[e]},e.stringToToken=function(e){return o.get(e)},e.computeLineStarts=m,e.getPositionOfLineAndCharacter=function(e,t,r,n){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,r,n):g(y(e),t,r,e.text,n)},e.computePositionOfLineAndCharacter=g,e.getLineStarts=y,e.computeLineAndCharacterOfPosition=h,e.getLineAndCharacterOfPosition=function(e,t){return h(y(e),t)},e.isWhiteSpaceLike=v,e.isWhiteSpaceSingleLine=b,e.isLineBreak=D,e.isOctalDigit=S,e.couldStartTrivia=function(e,t){var r=e.charCodeAt(t);switch(r){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return r>127}},e.skipTrivia=function(t,r,n,i){if(void 0===i&&(i=!1),e.positionIsSynthesized(r))return r;for(;;){var a=t.charCodeAt(r);switch(a){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)return r;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(i)break;if(47===t.charCodeAt(r+1)){for(r+=2;r<t.length&&!D(t.charCodeAt(r));)r++;continue}if(42===t.charCodeAt(r+1)){for(r+=2;r<t.length;){if(42===t.charCodeAt(r)&&47===t.charCodeAt(r+1)){r+=2;break}r++}continue}break;case 60:case 124:case 61:case 62:if(C(t,r)){r=E(t,r);continue}break;case 35:if(0===r&&N(t,r)){r=A(t,r);continue}break;default:if(a>127&&v(a)){r++;continue}}return r}};var T="<<<<<<<".length;function C(t,r){if(e.Debug.assert(r>=0),0===r||D(t.charCodeAt(r-1))){var n=t.charCodeAt(r);if(r+T<t.length){for(var i=0;i<T;i++)if(t.charCodeAt(r+i)!==n)return!1;return 61===n||32===t.charCodeAt(r+T)}}return!1}function E(t,r,n){n&&n(e.Diagnostics.Merge_conflict_marker_encountered,r,T);var i=t.charCodeAt(r),a=t.length;if(60===i||62===i)for(;r<a&&!D(t.charCodeAt(r));)r++;else for(e.Debug.assert(124===i||61===i);r<a;){var o=t.charCodeAt(r);if((61===o||62===o)&&o!==i&&C(t,r))break;r++}return r}var k=/^#!.*/;function N(t,r){return e.Debug.assert(0===r),k.test(t)}function A(e,t){return t+=k.exec(e)[0].length}function F(e,t,r,n,i,a,o){var s,c,u,l,_=!1,d=n,p=o;if(0===r){d=!0;var f=O(t);f&&(r=f.length)}e:for(;r>=0&&r<t.length;){var m=t.charCodeAt(r);switch(m){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)break e;d=!0,_&&(l=!0);continue;case 9:case 11:case 12:case 32:r++;continue;case 47:var g=t.charCodeAt(r+1),y=!1;if(47===g||42===g){var h=47===g?2:3,b=r;if(r+=2,47===g)for(;r<t.length;){if(D(t.charCodeAt(r))){y=!0;break}r++}else for(;r<t.length;){if(42===t.charCodeAt(r)&&47===t.charCodeAt(r+1)){r+=2;break}r++}if(d){if(_&&(p=i(s,c,u,l,a,p),!e&&p))return p;s=b,c=r,u=h,l=y,_=!0}continue}break e;default:if(m>127&&v(m)){_&&D(m)&&(l=!0),r++;continue}break e}}return _&&(p=i(s,c,u,l,a,p)),p}function P(e,t,r,n,i){return F(!0,e,t,!1,r,n,i)}function w(e,t,r,n,i){return F(!0,e,t,!0,r,n,i)}function I(e,t,r,n,i,a){return a||(a=[]),a.push({kind:r,pos:e,end:t,hasTrailingNewLine:n}),a}function O(e){var t=k.exec(e);if(t)return t[0]}function M(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&d(e,t)}function L(e,t){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||e>127&&function(e,t){return _(e,t>=1?l:c)}(e,t)}e.isShebangTrivia=N,e.scanShebangTrivia=A,e.forEachLeadingCommentRange=function(e,t,r,n){return F(!1,e,t,!1,r,n)},e.forEachTrailingCommentRange=function(e,t,r,n){return F(!1,e,t,!0,r,n)},e.reduceEachLeadingCommentRange=P,e.reduceEachTrailingCommentRange=w,e.getLeadingCommentRanges=function(e,t){return P(e,t,I,void 0,void 0)},e.getTrailingCommentRanges=function(e,t){return w(e,t,I,void 0,void 0)},e.getShebang=O,e.isIdentifierStart=M,e.isIdentifierPart=L,e.isIdentifierText=function(e,t){if(!M(e.charCodeAt(0),t))return!1;for(var r=1;r<e.length;r++)if(!L(e.charCodeAt(r),t))return!1;return!0},e.createScanner=function(t,n,i,o,s,c,u){void 0===i&&(i=0);var l,_,d,p,f,m,g,y=o,h=0;return X(y,c,u),{getStartPos:function(){return d},getTextPos:function(){return l},getToken:function(){return f},getTokenPos:function(){return p},getTokenText:function(){return y.substring(p,l)},getTokenValue:function(){return m},hasExtendedUnicodeEscape:function(){return 0!=(8&g)},hasPrecedingLineBreak:function(){return 0!=(1&g)},isIdentifier:function(){return 72===f||f>108},isReservedWord:function(){return f>=73&&f<=108},isUnterminated:function(){return 0!=(4&g)},getTokenFlags:function(){return g},reScanGreaterToken:function(){if(30===f){if(62===y.charCodeAt(l))return 62===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=68):(l+=2,f=48):61===y.charCodeAt(l+1)?(l+=2,f=67):(l++,f=47);if(61===y.charCodeAt(l))return l++,f=32}return f},reScanSlashToken:function(){if(42===f||64===f){for(var r=p+1,n=!1,i=!1;;){if(r>=_){g|=4,T(e.Diagnostics.Unterminated_regular_expression_literal);break}var a=y.charCodeAt(r);if(D(a)){g|=4,T(e.Diagnostics.Unterminated_regular_expression_literal);break}if(n)n=!1;else{if(47===a&&!i){r++;break}91===a?i=!0:92===a?n=!0:93===a&&(i=!1)}r++}for(;r<_&&L(y.charCodeAt(r),t);)r++;l=r,m=y.substring(p,l),f=13}return f},reScanTemplateToken:function(){return e.Debug.assert(19===f,"'reScanTemplateToken' should only be called on a '}'"),l=p,f=j()},scanJsxIdentifier:function(){if(r(f)){for(var e=l;l<_;){var n=y.charCodeAt(l);if(45!==n&&(e===l?!M(n,t):!L(n,t)))break;l++}m+=y.substring(e,l)}return f},scanJsxAttributeValue:function(){switch(d=l,y.charCodeAt(l)){case 34:case 39:return m=B(!0),f=10;default:return H()}},reScanJsxToken:function(){return l=p=d,f=G()},reScanLessThanToken:function(){return 46===f?(l=p+1,f=28):f},scanJsxToken:G,scanJSDocToken:function(){if(d=p=l,g=0,l>=_)return f=1;var e=y.charCodeAt(l);switch(l++,e){case 9:case 11:case 12:case 32:for(;l<_&&b(y.charCodeAt(l));)l++;return f=5;case 64:return f=58;case 10:case 13:return g|=1,f=4;case 42:return f=40;case 123:return f=18;case 125:return f=19;case 91:return f=22;case 93:return f=23;case 60:return f=28;case 61:return f=59;case 44:return f=27;case 46:return f=24;case 96:for(;l<_&&96!==y.charCodeAt(l);)l++;return m=y.substring(p+1,l),l++,f=14}if(M(e,7)){for(;L(y.charCodeAt(l),7)&&l<_;)l++;return m=y.substring(p,l),f=V()}return f=0},scan:H,getText:function(){return y},setText:X,setScriptTarget:function(e){t=e},setLanguageVariant:function(e){i=e},setOnError:function(e){s=e},setTextPos:Q,setInJSDocType:function(e){h+=e?1:-1},tryScan:function(e){return Y(e,!1)},lookAhead:function(e){return Y(e,!0)},scanRange:function(e,t,r){var n=_,i=l,a=d,o=p,s=f,c=m,u=g;X(y,e,t);var h=r();return _=n,l=i,d=a,p=o,f=s,m=c,g=u,h}};function T(e,t,r){if(void 0===t&&(t=l),s){var n=l;l=t,s(e,r||0),l=n}}function k(){for(var t=l,r=!1,n=!1,i="";;){var a=y.charCodeAt(l);if(95!==a){if(!x(a))break;r=!0,n=!1,l++}else g|=512,r?(r=!1,n=!0,i+=y.substring(t,l)):T(n?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),t=++l}return 95===y.charCodeAt(l-1)&&T(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),i+y.substring(t,l)}function F(){var t,r,n=l,i=k();46===y.charCodeAt(l)&&(l++,t=k());var a,o=l;if(69===y.charCodeAt(l)||101===y.charCodeAt(l)){l++,g|=16,43!==y.charCodeAt(l)&&45!==y.charCodeAt(l)||l++;var s=l,c=k();c?(r=y.substring(o,s)+c,o=l):T(e.Diagnostics.Digit_expected)}if(512&g?(a=i,t&&(a+="."+t),r&&(a+=r)):a=y.substring(n,o),void 0!==t||16&g)return P(n,void 0===t&&!!(16&g)),{type:8,value:""+ +a};m=a;var u=W();return P(n),{type:u,value:m}}function P(r,n){if(M(y.charCodeAt(l),t)){var i=l,a=U().length;1===a&&"n"===y[i]?T(n?e.Diagnostics.A_bigint_literal_cannot_use_exponential_notation:e.Diagnostics.A_bigint_literal_must_be_an_integer,r,i-r+1):(T(e.Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,i,a),l=i)}}function w(){for(var e=l;S(y.charCodeAt(l));)l++;return+y.substring(e,l)}function I(e,t){var r=R(e,!1,t);return r?parseInt(r,16):-1}function O(e,t){return R(e,!0,t)}function R(t,r,n){for(var i=[],a=!1,o=!1;i.length<t||r;){var s=y.charCodeAt(l);if(n&&95===s)g|=512,a?(a=!1,o=!0):T(o?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++;else{if(a=n,s>=65&&s<=70)s+=32;else if(!(s>=48&&s<=57||s>=97&&s<=102))break;i.push(s),l++,o=!1}}return i.length<t&&(i=[]),95===y.charCodeAt(l-1)&&T(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),String.fromCharCode.apply(String,i)}function B(t){void 0===t&&(t=!1);for(var r=y.charCodeAt(l),n="",i=++l;;){if(l>=_){n+=y.substring(i,l),g|=4,T(e.Diagnostics.Unterminated_string_literal);break}var a=y.charCodeAt(l);if(a===r){n+=y.substring(i,l),l++;break}if(92!==a||t){if(D(a)&&!t){n+=y.substring(i,l),g|=4,T(e.Diagnostics.Unterminated_string_literal);break}l++}else n+=y.substring(i,l),n+=J(),i=l}return n}function j(){for(var t,r=96===y.charCodeAt(l),n=++l,i="";;){if(l>=_){i+=y.substring(n,l),g|=4,T(e.Diagnostics.Unterminated_template_literal),t=r?14:17;break}var a=y.charCodeAt(l);if(96===a){i+=y.substring(n,l),l++,t=r?14:17;break}if(36===a&&l+1<_&&123===y.charCodeAt(l+1)){i+=y.substring(n,l),l+=2,t=r?15:16;break}92!==a?13!==a?l++:(i+=y.substring(n,l),++l<_&&10===y.charCodeAt(l)&&l++,i+="\n",n=l):(i+=y.substring(n,l),i+=J(),n=l)}return e.Debug.assert(void 0!==t),m=i,t}function J(){if(++l>=_)return T(e.Diagnostics.Unexpected_end_of_text),"";var t,r,n,i=y.charCodeAt(l);switch(l++,i){case 48:return"\0";case 98:return"\b";case 116:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:return l<_&&123===y.charCodeAt(l)?(g|=8,l++,t=O(1,!1),r=t?parseInt(t,16):-1,n=!1,r<0?(T(e.Diagnostics.Hexadecimal_digit_expected),n=!0):r>1114111&&(T(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),n=!0),l>=_?(T(e.Diagnostics.Unexpected_end_of_text),n=!0):125===y.charCodeAt(l)?l++:(T(e.Diagnostics.Unterminated_Unicode_escape_sequence),n=!0),n?"":function(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var r=Math.floor((t-65536)/1024)+55296,n=(t-65536)%1024+56320;return String.fromCharCode(r,n)}(r)):z(4);case 120:return z(2);case 13:l<_&&10===y.charCodeAt(l)&&l++;case 10:case 8232:case 8233:return"";default:return String.fromCharCode(i)}}function z(t){var r=I(t,!1);return r>=0?String.fromCharCode(r):(T(e.Diagnostics.Hexadecimal_digit_expected),"")}function K(){if(l+5<_&&117===y.charCodeAt(l+1)){var e=l;l+=2;var t=I(4,!1);return l=e,t}return-1}function U(){for(var e="",r=l;l<_;){var n=y.charCodeAt(l);if(L(n,t))l++;else{if(92!==n)break;if(!((n=K())>=0&&L(n,t)))break;e+=y.substring(r,l),e+=String.fromCharCode(n),r=l+=6}}return e+=y.substring(r,l)}function V(){var e=m.length;if(e>=2&&e<=11){var t=m.charCodeAt(0);if(t>=97&&t<=122){var r=a.get(m);if(void 0!==r)return f=r}}return f=72}function q(t){for(var r="",n=!1,i=!1;;){var a=y.charCodeAt(l);if(95!==a){if(n=!0,!x(a)||a-48>=t)break;r+=y[l],l++,i=!1}else g|=512,n?(n=!1,i=!0):T(i?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++}return 95===y.charCodeAt(l-1)&&T(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),r}function W(){if(110===y.charCodeAt(l))return m+="n",384&g&&(m=e.parsePseudoBigInt(m)+"n"),l++,9;var t=128&g?parseInt(m.slice(2),2):256&g?parseInt(m.slice(2),8):+m;return m=""+t,8}function H(){var r;d=l,g=0;for(var a=!1;;){if(p=l,l>=_)return f=1;var o=y.charCodeAt(l);if(35===o&&0===l&&N(y,l)){if(l=A(y,l),n)continue;return f=6}switch(o){case 10:case 13:if(g|=1,n){l++;continue}return 13===o&&l+1<_&&10===y.charCodeAt(l+1)?l+=2:l++,f=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(n){l++;continue}for(;l<_&&b(y.charCodeAt(l));)l++;return f=5;case 33:return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=36):(l+=2,f=34):(l++,f=52);case 34:case 39:return m=B(),f=10;case 96:return f=j();case 37:return 61===y.charCodeAt(l+1)?(l+=2,f=65):(l++,f=43);case 38:return 38===y.charCodeAt(l+1)?(l+=2,f=54):61===y.charCodeAt(l+1)?(l+=2,f=69):(l++,f=49);case 40:return l++,f=20;case 41:return l++,f=21;case 42:if(61===y.charCodeAt(l+1))return l+=2,f=62;if(42===y.charCodeAt(l+1))return 61===y.charCodeAt(l+2)?(l+=3,f=63):(l+=2,f=41);if(l++,h&&!a&&1&g){a=!0;continue}return f=40;case 43:return 43===y.charCodeAt(l+1)?(l+=2,f=44):61===y.charCodeAt(l+1)?(l+=2,f=60):(l++,f=38);case 44:return l++,f=27;case 45:return 45===y.charCodeAt(l+1)?(l+=2,f=45):61===y.charCodeAt(l+1)?(l+=2,f=61):(l++,f=39);case 46:return x(y.charCodeAt(l+1))?(m=F().value,f=8):46===y.charCodeAt(l+1)&&46===y.charCodeAt(l+2)?(l+=3,f=25):(l++,f=24);case 47:if(47===y.charCodeAt(l+1)){for(l+=2;l<_&&!D(y.charCodeAt(l));)l++;if(n)continue;return f=2}if(42===y.charCodeAt(l+1)){l+=2,42===y.charCodeAt(l)&&47!==y.charCodeAt(l+1)&&(g|=2);for(var s=!1;l<_;){var c=y.charCodeAt(l);if(42===c&&47===y.charCodeAt(l+1)){l+=2,s=!0;break}D(c)&&(g|=1),l++}if(s||T(e.Diagnostics.Asterisk_Slash_expected),n)continue;return s||(g|=4),f=3}return 61===y.charCodeAt(l+1)?(l+=2,f=64):(l++,f=42);case 48:if(l+2<_&&(88===y.charCodeAt(l+1)||120===y.charCodeAt(l+1)))return l+=2,(m=O(1,!0))||(T(e.Diagnostics.Hexadecimal_digit_expected),m="0"),m="0x"+m,g|=64,f=W();if(l+2<_&&(66===y.charCodeAt(l+1)||98===y.charCodeAt(l+1)))return l+=2,(m=q(2))||(T(e.Diagnostics.Binary_digit_expected),m="0"),m="0b"+m,g|=128,f=W();if(l+2<_&&(79===y.charCodeAt(l+1)||111===y.charCodeAt(l+1)))return l+=2,(m=q(8))||(T(e.Diagnostics.Octal_digit_expected),m="0"),m="0o"+m,g|=256,f=W();if(l+1<_&&S(y.charCodeAt(l+1)))return m=""+w(),g|=32,f=8;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r=F(),f=r.type,m=r.value,f;case 58:return l++,f=57;case 59:return l++,f=26;case 60:if(C(y,l)){if(l=E(y,l,T),n)continue;return f=7}return 60===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=66):(l+=2,f=46):61===y.charCodeAt(l+1)?(l+=2,f=31):1===i&&47===y.charCodeAt(l+1)&&42!==y.charCodeAt(l+2)?(l+=2,f=29):(l++,f=28);case 61:if(C(y,l)){if(l=E(y,l,T),n)continue;return f=7}return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=35):(l+=2,f=33):62===y.charCodeAt(l+1)?(l+=2,f=37):(l++,f=59);case 62:if(C(y,l)){if(l=E(y,l,T),n)continue;return f=7}return l++,f=30;case 63:return l++,f=56;case 91:return l++,f=22;case 93:return l++,f=23;case 94:return 61===y.charCodeAt(l+1)?(l+=2,f=71):(l++,f=51);case 123:return l++,f=18;case 124:if(C(y,l)){if(l=E(y,l,T),n)continue;return f=7}return 124===y.charCodeAt(l+1)?(l+=2,f=55):61===y.charCodeAt(l+1)?(l+=2,f=70):(l++,f=50);case 125:return l++,f=19;case 126:return l++,f=53;case 64:return l++,f=58;case 92:var u=K();return u>=0&&M(u,t)?(l+=6,m=String.fromCharCode(u)+U(),f=V()):(T(e.Diagnostics.Invalid_character),l++,f=0);default:if(M(o,t)){for(l++;l<_&&L(o=y.charCodeAt(l),t);)l++;return m=y.substring(p,l),92===o&&(m+=U()),f=V()}if(b(o)){l++;continue}if(D(o)){g|=1,l++;continue}return T(e.Diagnostics.Invalid_character),l++,f=0}}}function G(){if(d=p=l,l>=_)return f=1;var e=y.charCodeAt(l);if(60===e)return 47===y.charCodeAt(l+1)?(l+=2,f=29):(l++,f=28);if(123===e)return l++,f=18;for(var t=0;l<_&&123!==(e=y.charCodeAt(l));){if(60===e){if(C(y,l))return l=E(y,l,T),f=7;break}D(e)&&0===t?t=-1:v(e)||(t=l),l++}return m=y.substring(d,l),-1===t?12:11}function Y(e,t){var r=l,n=d,i=p,a=f,o=m,s=g,c=e();return c&&!t||(l=r,d=n,p=i,f=a,m=o,g=s),c}function X(e,t,r){y=e||"",_=void 0===r?y.length:t+r,Q(t||0)}function Q(t){e.Debug.assert(t>=0),l=t,d=t,p=t,f=0,m=void 0,g=0}}}(c||(c={})),function(e){e.isExternalModuleNameRelative=function(t){return e.pathIsRelative(t)||e.isRootedDiskPath(t)},e.sortAndDeduplicateDiagnostics=function(t){return e.sortAndDeduplicate(t,e.compareDiagnostics)}}(c||(c={})),function(e){e.resolvingEmptyArray=[],e.emptyMap=e.createMap(),e.emptyUnderscoreEscapedMap=e.emptyMap,e.externalHelpersModuleNameText="tslib",e.defaultMaximumTruncationLength=160,e.getDeclarationOfKind=function(e,t){var r=e.declarations;if(r)for(var n=0,i=r;n<i.length;n++){var a=i[n];if(a.kind===t)return a}},e.createUnderscoreEscapedMap=function(){return new e.MapCtr},e.hasEntries=function(e){return!!e&&!!e.size},e.createSymbolTable=function(t){var r=e.createMap();if(t)for(var n=0,i=t;n<i.length;n++){var a=i[n];r.set(a.escapedName,a)}return r};var t,r,n=(t="",{getText:function(){return t},write:r=function(e){return t+=e},rawWrite:r,writeKeyword:r,writeOperator:r,writePunctuation:r,writeSpace:r,writeStringLiteral:r,writeLiteral:r,writeParameter:r,writeProperty:r,writeSymbol:function(e,t){return r(e)},writeTrailingSemicolon:r,writeComment:r,getTextPos:function(){return t.length},getLine:function(){return 0},getColumn:function(){return 0},getIndent:function(){return 0},isAtStartOfLine:function(){return!1},writeLine:function(){return t+=" "},increaseIndent:e.noop,decreaseIndent:e.noop,clear:function(){return t=""},trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop});function a(t,r,n){return n(e.isRootedDiskPath(t)?e.normalizePath(t):e.getNormalizedAbsolutePath(t,r))}function o(e,t){for(;e;){var r=t(e);if("quit"===r)return;if(r)return e;e=e.parent}}function s(e,t){e.forEach(function(e,r){t.set(r,e)})}function c(e){return e.end-e.pos}function u(t){return function(t){if(!(262144&t.flags)){var r=0!=(32768&t.flags)||e.forEachChild(t,u);r&&(t.flags|=131072),t.flags|=262144}}(t),0!=(131072&t.flags)}function l(e){for(;e&&284!==e.kind;)e=e.parent;return e}function _(t,r){e.Debug.assert(t>=0);var n=e.getLineStarts(r),i=t,a=r.text;if(i+1===n.length)return a.length-1;var o=n[i],s=n[i+1]-1;for(e.Debug.assert(e.isLineBreak(a.charCodeAt(s)));o<=s&&e.isLineBreak(a.charCodeAt(s));)s--;return s}function d(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function p(e){return!d(e)}function m(e,t,r){if(void 0===t||0===t.length)return e;for(var n=0;n<e.length&&r(e[n]);++n);return e.splice.apply(e,[n,0].concat(t)),e}function g(e,t,r){if(void 0===t)return e;for(var n=0;n<e.length&&r(e[n]);++n);return e.splice(n,0,t),e}function y(e){return K(e)||!!(1048576&T(e))}function h(e,t){return 42===e.charCodeAt(t+1)&&33===e.charCodeAt(t+2)}function v(t,r,n){return d(t)?t.pos:e.isJSDocNode(t)?e.skipTrivia((r||l(t)).text,t.pos,!1,!0):n&&e.hasJSDocNodes(t)?v(t.jsDoc[0]):311===t.kind&&t._children.length>0?v(t._children[0],r,n):e.skipTrivia((r||l(t)).text,t.pos)}function b(e,t,r){return void 0===r&&(r=!1),D(e.text,t,r)}function D(t,r,n){if(void 0===n&&(n=!1),d(r))return"";var i=t.substring(n?r.pos:e.skipTrivia(t,r.pos),r.end);return function e(t){return 288===t.kind||t.parent&&e(t.parent)}(r)&&(i=i.replace(/(^|\r?\n|\r)\s*\*\s*/g,"$1")),i}function x(e,t){return void 0===t&&(t=!1),b(l(e),e,t)}function S(e){return e.pos}function T(e){var t=e.emitNode;return t&&t.flags||0}function C(e){var t=Xe(e);return 237===t.kind&&274===t.parent.kind}function E(t){return e.isModuleDeclaration(t)&&(10===t.name.kind||k(t))}function k(e){return!!(512&e.flags)}function N(e){return E(e)&&A(e)}function A(t){switch(t.parent.kind){case 284:return e.isExternalModule(t.parent);case 245:return E(t.parent.parent)&&e.isSourceFile(t.parent.parent.parent)&&!e.isExternalModule(t.parent.parent.parent)}return!1}function F(t,r){switch(t.kind){case 284:case 246:case 274:case 244:case 225:case 226:case 227:case 157:case 156:case 158:case 159:case 239:case 196:case 197:return!0;case 218:return!e.isFunctionLike(r)}return!1}function P(t){switch(t.kind){case 160:case 161:case 155:case 162:case 165:case 166:case 294:case 240:case 209:case 241:case 242:case 308:case 239:case 156:case 157:case 158:case 159:case 196:case 197:return!0;default:return e.assertType(t),!1}}function w(e){switch(e.kind){case 249:case 248:return!0;default:return!1}}function I(e){return e&&0!==c(e)?x(e):"(Missing)"}function O(t){switch(t.kind){case 72:return t.escapedText;case 10:case 8:case 14:return e.escapeLeadingUnderscores(t.text);case 149:return Ue(t.expression)?e.escapeLeadingUnderscores(t.expression.text):e.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");default:return e.Debug.assertNever(t)}}function M(t,r,n,i,a,o,s){var c=R(t,r);return e.createFileDiagnostic(t,c.start,c.length,n,i,a,o,s)}function L(t,r){var n=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);n.scan();var i=n.getTokenPos();return e.createTextSpanFromBounds(i,n.getTextPos())}function R(t,r){var n=r;switch(r.kind){case 284:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):L(t,i);case 237:case 186:case 240:case 209:case 241:case 244:case 243:case 278:case 239:case 196:case 156:case 158:case 159:case 242:case 154:case 153:n=r.name;break;case 197:return function(t,r){var n=e.skipTrivia(t.text,r.pos);if(r.body&&218===r.body.kind){var i=e.getLineAndCharacterOfPosition(t,r.body.pos).line;if(i<e.getLineAndCharacterOfPosition(t,r.body.end).line)return e.createTextSpan(n,_(i,t)-n+1)}return e.createTextSpanFromBounds(n,r.end)}(t,r)}if(void 0===n)return L(t,r.pos);var a=d(n),o=a||e.isJsxText(r)?n.pos:e.skipTrivia(t.text,n.pos);return a?(e.Debug.assert(o===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(o===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(e.Debug.assert(o>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(o<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),e.createTextSpanFromBounds(o,n.end)}function B(e){return 6===e.scriptKind}function j(t){return!!(2&e.getCombinedNodeFlags(t))}function J(e){return 191===e.kind&&92===e.expression.kind}function z(t){return e.isImportTypeNode(t)&&e.isLiteralTypeNode(t.argument)&&e.isStringLiteral(t.argument.literal)}function K(e){return 221===e.kind&&10===e.expression.kind}e.toPath=a,e.changesAffectModuleResolution=function(t,r){return t.configFilePath!==r.configFilePath||e.moduleResolutionOptionDeclarations.some(function(n){return!e.isJsonEqual(e.getCompilerOptionValue(t,n),e.getCompilerOptionValue(r,n))})},e.findAncestor=o,e.forEachAncestor=function(t,r){for(;;){var n=r(t);if("quit"===n)return;if(void 0!==n)return n;if(e.isSourceFile(t))return;t=t.parent}},e.forEachEntry=function(e,t){for(var r,n=e.entries(),i=n.next(),a=i.value,o=i.done;!o;a=(r=n.next()).value,o=r.done,r){var s=a[0],c=t(a[1],s);if(c)return c}},e.forEachKey=function(e,t){for(var r,n=e.keys(),i=n.next(),a=i.value,o=i.done;!o;a=(r=n.next()).value,o=r.done,r){var s=t(a);if(s)return s}},e.copyEntries=s,e.arrayToSet=function(t,r){return e.arrayToMap(t,r||function(e){return e},function(){return!0})},e.cloneMap=function(t){var r=e.createMap();return s(t,r),r},e.usingSingleLineStringWriter=function(e){var t=n.getText();try{return e(n),n.getText()}finally{n.clear(),n.writeKeyword(t)}},e.getFullWidth=c,e.getResolvedModule=function(e,t){return e&&e.resolvedModules&&e.resolvedModules.get(t)},e.setResolvedModule=function(t,r,n){t.resolvedModules||(t.resolvedModules=e.createMap()),t.resolvedModules.set(r,n)},e.setResolvedTypeReferenceDirective=function(t,r,n){t.resolvedTypeReferenceDirectiveNames||(t.resolvedTypeReferenceDirectiveNames=e.createMap()),t.resolvedTypeReferenceDirectiveNames.set(r,n)},e.projectReferenceIsEqualTo=function(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular},e.moduleResolutionIsEqualTo=function(e,t){return e.isExternalLibraryImport===t.isExternalLibraryImport&&e.extension===t.extension&&e.resolvedFileName===t.resolvedFileName&&e.originalPath===t.originalPath&&(r=e.packageId,n=t.packageId,r===n||!!r&&!!n&&r.name===n.name&&r.subModuleName===n.subModuleName&&r.version===n.version);var r,n},e.packageIdToString=function(e){var t=e.name,r=e.subModuleName,n=e.version;return(r?t+"/"+r:t)+"@"+n},e.typeDirectiveIsEqualTo=function(e,t){return e.resolvedFileName===t.resolvedFileName&&e.primary===t.primary},e.hasChangesInResolutions=function(t,r,n,i){e.Debug.assert(t.length===r.length);for(var a=0;a<t.length;a++){var o=r[a],s=n&&n.get(t[a]);if(s?!o||!i(s,o):o)return!0}return!1},e.containsParseError=u,e.getSourceFileOfNode=l,e.isStatementWithLocals=function(e){switch(e.kind){case 218:case 246:case 225:case 226:case 227:return!0}return!1},e.getStartPositionOfLine=function(t,r){return e.Debug.assert(t>=0),e.getLineStarts(r)[t]},e.nodePosToString=function(t){var r=l(t),n=e.getLineAndCharacterOfPosition(r,t.pos);return r.fileName+"("+(n.line+1)+","+(n.character+1)+")"},e.getEndLinePosition=_,e.isFileLevelUniqueName=function(e,t,r){return!(r&&r(t)||e.identifiers.has(t))},e.nodeIsMissing=d,e.nodeIsPresent=p,e.insertStatementsAfterStandardPrologue=function(e,t){return m(e,t,K)},e.insertStatementsAfterCustomPrologue=function(e,t){return m(e,t,y)},e.insertStatementAfterStandardPrologue=function(e,t){return g(e,t,K)},e.insertStatementAfterCustomPrologue=function(e,t){return g(e,t,y)},e.isRecognizedTripleSlashComment=function(t,r,n){if(47===t.charCodeAt(r+1)&&r+2<n&&47===t.charCodeAt(r+2)){var i=t.substring(r,n);return!!(i.match(e.fullTripleSlashReferencePathRegEx)||i.match(e.fullTripleSlashAMDReferencePathRegEx)||i.match(U)||i.match(V))}return!1},e.isPinnedComment=h,e.getTokenPosOfNode=v,e.getNonDecoratorTokenPosOfNode=function(t,r){return d(t)||!t.decorators?v(t,r):e.skipTrivia((r||l(t)).text,t.decorators.end)},e.getSourceTextOfNodeFromSourceFile=b,e.getTextOfNodeFromSourceText=D,e.getTextOfNode=x,e.indexOfNode=function(t,r){return e.binarySearch(t,r,S,e.compareValues)},e.getEmitFlags=T,e.getLiteralText=function(t,r,n){if(!Qe(t)&&t.parent&&!(e.isNumericLiteral(t)&&512&t.numericLiteralFlags||e.isBigIntLiteral(t)))return b(r,t);var i=n||16777216&T(t)?ot:lt;switch(t.kind){case 10:return t.singleQuote?"'"+i(t.text,39)+"'":'"'+i(t.text,34)+'"';case 14:return"`"+i(t.text,96)+"`";case 15:return"`"+i(t.text,96)+"${";case 16:return"}"+i(t.text,96)+"${";case 17:return"}"+i(t.text,96)+"`";case 8:case 9:case 13:return t.text}return e.Debug.fail("Literal kind '"+t.kind+"' not accounted for.")},e.getTextOfConstantValue=function(t){return e.isString(t)?'"'+lt(t)+'"':""+t},e.makeIdentifierFromModuleName=function(t){return e.getBaseFileName(t).replace(/^(\d)/,"_$1").replace(/\W/g,"_")},e.isBlockOrCatchScoped=function(t){return 0!=(3&e.getCombinedNodeFlags(t))||C(t)},e.isCatchClauseVariableDeclarationOrBindingElement=C,e.isAmbientModule=E,e.isModuleWithStringLiteralName=function(t){return e.isModuleDeclaration(t)&&10===t.name.kind},e.isNonGlobalAmbientModule=function(t){return e.isModuleDeclaration(t)&&e.isStringLiteral(t.name)},e.isEffectiveModuleDeclaration=function(t){return e.isModuleDeclaration(t)||e.isIdentifier(t)},e.isShorthandAmbientModuleSymbol=function(e){return(t=e.valueDeclaration)&&244===t.kind&&!t.body;var t},e.isBlockScopedContainerTopLevel=function(t){return 284===t.kind||244===t.kind||e.isFunctionLike(t)},e.isGlobalScopeAugmentation=k,e.isExternalModuleAugmentation=N,e.isModuleAugmentationExternal=A,e.getNonAugmentationDeclaration=function(t){return e.find(t.declarations,function(t){return!(N(t)||e.isModuleDeclaration(t)&&k(t))})},e.isEffectiveExternalModule=function(t,r){return e.isExternalModule(t)||r.isolatedModules||e.getEmitModuleKind(r)===e.ModuleKind.CommonJS&&!!t.commonJsModuleIndicator},e.isBlockScope=F,e.isDeclarationWithTypeParameters=function(t){switch(t.kind){case 302:case 309:case 298:return!0;default:return e.assertType(t),P(t)}},e.isDeclarationWithTypeParameterChildren=P,e.isAnyImportSyntax=w,e.isLateVisibilityPaintedStatement=function(e){switch(e.kind){case 249:case 248:case 219:case 240:case 239:case 244:case 242:case 241:case 243:return!0;default:return!1}},e.isAnyImportOrReExport=function(t){return w(t)||e.isExportDeclaration(t)},e.getEnclosingBlockScopeContainer=function(e){return o(e.parent,function(e){return F(e,e.parent)})},e.declarationNameToString=I,e.getNameFromIndexInfo=function(e){return e.declaration?I(e.declaration.parameters[0].name):void 0},e.getTextOfPropertyName=O,e.entityNameToString=function t(r){switch(r.kind){case 72:return 0===c(r)?e.idText(r):x(r);case 148:return t(r.left)+"."+t(r.right);case 189:return t(r.expression)+"."+t(r.name);default:throw e.Debug.assertNever(r)}},e.createDiagnosticForNode=function(e,t,r,n,i,a){return M(l(e),e,t,r,n,i,a)},e.createDiagnosticForNodeArray=function(t,r,n,i,a,o,s){var c=e.skipTrivia(t.text,r.pos);return e.createFileDiagnostic(t,c,r.end-c,n,i,a,o,s)},e.createDiagnosticForNodeInSourceFile=M,e.createDiagnosticForNodeFromMessageChain=function(e,t,r){var n=l(e),i=R(n,e);return{file:n,start:i.start,length:i.length,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}},e.getSpanOfTokenAtPosition=L,e.getErrorSpanForNode=R,e.isExternalOrCommonJsModule=function(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)},e.isJsonSourceFile=B,e.isEnumConst=function(t){return!!(2048&e.getCombinedModifierFlags(t))},e.isDeclarationReadonly=function(t){return!(!(64&e.getCombinedModifierFlags(t))||e.isParameterPropertyDeclaration(t))},e.isVarConst=j,e.isLet=function(t){return!!(1&e.getCombinedNodeFlags(t))},e.isSuperCall=function(e){return 191===e.kind&&98===e.expression.kind},e.isImportCall=J,e.isLiteralImportTypeNode=z,e.isPrologueDirective=K,e.getLeadingCommentRangesOfNode=function(t,r){return 11!==t.kind?e.getLeadingCommentRanges(r.text,t.pos):void 0},e.getJSDocCommentRanges=function(t,r){var n=151===t.kind||150===t.kind||196===t.kind||197===t.kind||195===t.kind?e.concatenate(e.getTrailingCommentRanges(r,t.pos),e.getLeadingCommentRanges(r,t.pos)):e.getLeadingCommentRanges(r,t.pos);return e.filter(n,function(e){return 42===r.charCodeAt(e.pos+1)&&42===r.charCodeAt(e.pos+2)&&47!==r.charCodeAt(e.pos+3)})},e.fullTripleSlashReferencePathRegEx=/^(\/\/\/\s*<reference\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;var U=/^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;e.fullTripleSlashAMDReferencePathRegEx=/^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;var V=/^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/;function q(t){if(163<=t.kind&&t.kind<=183)return!0;switch(t.kind){case 120:case 143:case 135:case 146:case 138:case 123:case 139:case 136:case 141:case 132:return!0;case 106:return 200!==t.parent.kind;case 211:return!Ut(t);case 150:return 181===t.parent.kind||176===t.parent.kind;case 72:148===t.parent.kind&&t.parent.right===t?t=t.parent:189===t.parent.kind&&t.parent.name===t&&(t=t.parent),e.Debug.assert(72===t.kind||148===t.kind||189===t.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 148:case 189:case 100:var r=t.parent;if(167===r.kind)return!1;if(183===r.kind)return!r.isTypeOf;if(163<=r.kind&&r.kind<=183)return!0;switch(r.kind){case 211:return!Ut(r);case 150:case 308:return t===r.constraint;case 154:case 153:case 151:case 237:return t===r.type;case 239:case 196:case 197:case 157:case 156:case 155:case 158:case 159:return t===r.type;case 160:case 161:case 162:case 194:return t===r.type;case 191:case 192:return e.contains(r.typeArguments,t);case 193:return!1}}return!1}function W(e){if(e)switch(e.kind){case 186:case 278:case 151:case 275:case 154:case 153:case 276:case 237:return!0}return!1}function H(e){return 238===e.parent.kind&&219===e.parent.parent.kind}function G(e,t,r){return e.properties.filter(function(e){if(275===e.kind){var n=O(e.name);return t===n||!!r&&r===n}return!1})}function Y(t){if(t&&t.statements.length){var r=t.statements[0].expression;return e.tryCast(r,e.isObjectLiteralExpression)}}function X(t,r){var n=Y(t);return n?G(n,r):e.emptyArray}function Q(t,r){for(e.Debug.assert(284!==t.kind);;){if(!(t=t.parent))return e.Debug.fail();switch(t.kind){case 149:if(e.isClassLike(t.parent.parent))return t;t=t.parent;break;case 152:151===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent);break;case 197:if(!r)continue;case 239:case 196:case 244:case 154:case 153:case 156:case 155:case 157:case 158:case 159:case 160:case 161:case 162:case 243:case 284:return t}}}function $(e){var t=e.kind;return(189===t||190===t)&&98===e.expression.kind}function Z(e,t,r){switch(e.kind){case 240:return!0;case 154:return 240===t.kind;case 158:case 159:case 156:return void 0!==e.body&&240===t.kind;case 151:return void 0!==t.body&&(157===t.kind||156===t.kind||159===t.kind)&&240===r.kind}return!1}function ee(e,t,r){return void 0!==e.decorators&&Z(e,t,r)}function te(e,t,r){return ee(e,t,r)||re(e,t)}function re(t,r){switch(t.kind){case 240:return e.some(t.members,function(e){return te(e,t,r)});case 156:case 159:return e.some(t.parameters,function(e){return ee(e,t,r)});default:return!1}}function ne(e){var t=e.parent;return(262===t.kind||261===t.kind||263===t.kind)&&t.tagName===e}function ie(e){switch(e.kind){case 98:case 96:case 102:case 87:case 13:case 187:case 188:case 189:case 190:case 191:case 192:case 193:case 212:case 194:case 213:case 195:case 196:case 209:case 197:case 200:case 198:case 199:case 202:case 203:case 204:case 205:case 208:case 206:case 14:case 210:case 260:case 261:case 264:case 207:case 201:case 214:return!0;case 148:for(;148===e.parent.kind;)e=e.parent;return 167===e.parent.kind||ne(e);case 72:if(167===e.parent.kind||ne(e))return!0;case 8:case 9:case 10:case 100:return ae(e);default:return!1}}function ae(e){var t=e.parent;switch(t.kind){case 237:case 151:case 154:case 153:case 278:case 275:case 186:return t.initializer===e;case 221:case 222:case 223:case 224:case 230:case 231:case 232:case 271:case 234:return t.expression===e;case 225:var r=t;return r.initializer===e&&238!==r.initializer.kind||r.condition===e||r.incrementor===e;case 226:case 227:var n=t;return n.initializer===e&&238!==n.initializer.kind||n.expression===e;case 194:case 212:case 216:case 149:return e===t.expression;case 152:case 270:case 269:case 277:return!0;case 211:return t.expression===e&&Ut(t);case 276:return t.objectAssignmentInitializer===e;default:return ie(t)}}function oe(e){return 248===e.kind&&259===e.moduleReference.kind}function se(e){return ce(e)}function ce(e){return!!e&&!!(65536&e.flags)}function ue(t,r){if(191!==t.kind)return!1;var n=t,i=n.expression,a=n.arguments;if(72!==i.kind||"require"!==i.escapedText)return!1;if(1!==a.length)return!1;var o=a[0];return!r||e.isStringLiteralLike(o)}function le(t){return ce(t)&&t.initializer&&e.isBinaryExpression(t.initializer)&&55===t.initializer.operatorToken.kind&&t.name&&Vt(t.name)&&de(t.name,t.initializer.left)?t.initializer.right:t.initializer}function _e(t,r){if(e.isCallExpression(t)){var n=Ie(t.expression);return 196===n.kind||197===n.kind?t:void 0}return 196===t.kind||209===t.kind||197===t.kind?t:e.isObjectLiteralExpression(t)&&(0===t.properties.length||r)?t:void 0}function de(t,r){return e.isIdentifier(t)&&e.isIdentifier(r)?t.escapedText===r.escapedText:e.isIdentifier(t)&&e.isPropertyAccessExpression(r)?(100===r.expression.kind||e.isIdentifier(r.expression)&&("window"===r.expression.escapedText||"self"===r.expression.escapedText||"global"===r.expression.escapedText))&&de(t,r.name):!(!e.isPropertyAccessExpression(t)||!e.isPropertyAccessExpression(r))&&(t.name.escapedText===r.name.escapedText&&de(t.expression,r.expression))}function pe(t){return e.isIdentifier(t)&&"exports"===t.escapedText}function fe(t){return e.isPropertyAccessExpression(t)&&e.isIdentifier(t.expression)&&"module"===t.expression.escapedText&&"exports"===t.name.escapedText}function me(t){var r=function(t){if(e.isCallExpression(t)){if(!ge(t))return 0;var r=t.arguments[0];return pe(r)||fe(r)?8:e.isPropertyAccessExpression(r)&&"prototype"===r.name.escapedText&&Vt(r.expression)?9:7}if(59!==t.operatorToken.kind||!e.isPropertyAccessExpression(t.left))return 0;var n=t.left;if(Vt(n.expression)&&"prototype"===n.name.escapedText&&e.isObjectLiteralExpression(he(t)))return 6;return ye(n)}(t);return 5===r||ce(t)?r:0}function ge(t){return 3===e.length(t.arguments)&&e.isPropertyAccessExpression(t.expression)&&e.isIdentifier(t.expression.expression)&&"Object"===e.idText(t.expression.expression)&&"defineProperty"===e.idText(t.expression.name)&&Ue(t.arguments[1])&&Vt(t.arguments[0])}function ye(t){if(100===t.expression.kind)return 4;if(fe(t))return 2;if(Vt(t.expression)){if(Wt(t.expression))return 3;for(var r=t;e.isPropertyAccessExpression(r.expression);)r=r.expression;e.Debug.assert(e.isIdentifier(r.expression));var n=r.expression;return"exports"===n.escapedText||"module"===n.escapedText&&"exports"===r.name.escapedText?1:5}return 0}function he(t){for(;e.isBinaryExpression(t.right);)t=t.right;return t.right}function ve(t){switch(t.parent.kind){case 249:case 255:return t.parent;case 259:return t.parent.parent;case 191:return J(t.parent)||ue(t.parent,!1)?t.parent:void 0;case 182:return e.Debug.assert(e.isStringLiteral(t)),e.tryCast(t.parent.parent,e.isImportTypeNode);default:return}}function be(e){return 309===e.kind||302===e.kind}function De(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&0!==me(t.expression)&&e.isBinaryExpression(t.expression.right)&&55===t.expression.right.operatorToken.kind?t.expression.right.right:void 0}function xe(e){switch(e.kind){case 219:var t=Se(e);return t&&t.initializer;case 154:case 275:return e.initializer}}function Se(t){return e.isVariableStatement(t)?e.firstOrUndefined(t.declarationList.declarations):void 0}function Te(t){return e.isModuleDeclaration(t)&&t.body&&244===t.body.kind?t.body:void 0}function Ce(t){var r=t.parent;return 275===r.kind||154===r.kind||221===r.kind&&189===t.kind||Te(r)||e.isBinaryExpression(t)&&59===t.operatorToken.kind?r:r.parent&&(Se(r.parent)===t||e.isBinaryExpression(r)&&59===r.operatorToken.kind)?r.parent:r.parent&&r.parent.parent&&(Se(r.parent.parent)||xe(r.parent.parent)===t||De(r.parent.parent))?r.parent.parent:void 0}function Ee(e){return ke(Ne(e))}function ke(t){var r,n=De(t)||(r=t,e.isExpressionStatement(r)&&r.expression&&e.isBinaryExpression(r.expression)&&59===r.expression.operatorToken.kind?r.expression.right:void 0)||xe(t)||Se(t)||Te(t)||t;return n&&e.isFunctionLike(n)?n:void 0}function Ne(t){return e.Debug.assertDefined(o(t.parent,e.isJSDoc)).parent}function Ae(t){var r=e.isJSDocParameterTag(t)?t.typeExpression&&t.typeExpression.type:t.type;return void 0!==t.dotDotDotToken||!!r&&295===r.kind}function Fe(e){for(var t=e.parent;;){switch(t.kind){case 204:var r=t.operatorToken.kind;return jt(r)&&t.left===e?59===r?1:2:0;case 202:case 203:var n=t.operator;return 44===n||45===n?2:0;case 226:case 227:return t.initializer===e?1:0;case 195:case 187:case 208:case 213:e=t;break;case 276:if(t.name!==e)return 0;e=t.parent;break;case 275:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function Pe(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function we(e){return Pe(e,195)}function Ie(e){for(;195===e.kind;)e=e.expression;return e}function Oe(t){var r=e.isExportAssignment(t)?t.expression:t.right;return Vt(r)||e.isClassExpression(r)}function Me(t){var r=Le(t);if(r&&ce(t)){var n=e.getJSDocAugmentsTag(t);if(n)return n.class}return r}function Le(e){var t=je(e.heritageClauses,86);return t&&t.types.length>0?t.types[0]:void 0}function Re(e){var t=je(e.heritageClauses,109);return t?t.types:void 0}function Be(e){var t=je(e.heritageClauses,86);return t?t.types:void 0}function je(e,t){if(e)for(var r=0,n=e;r<n.length;r++){var i=n[r];if(i.token===t)return i}}function Je(e){return 73<=e&&e<=147}function ze(e){return 118<=e&&e<=147}function Ke(e){return Je(e)&&!ze(e)}function Ue(t){return e.isStringLiteralLike(t)||e.isNumericLiteral(t)}function Ve(t){var r=e.getNameOfDeclaration(t);return!!r&&qe(r)}function qe(e){return 149===e.kind&&!Ue(e.expression)&&!We(e.expression)}function We(t){return e.isPropertyAccessExpression(t)&&Ye(t.expression)}function He(t){switch(t.kind){case 72:return t.escapedText;case 10:case 8:return e.escapeLeadingUnderscores(t.text);case 149:var r=t.expression;return We(r)?Ge(e.idText(r.name)):Ue(r)?e.escapeLeadingUnderscores(r.text):void 0;default:return e.Debug.assertNever(t)}}function Ge(e){return"__@"+e}function Ye(e){return 72===e.kind&&"Symbol"===e.escapedText}function Xe(e){for(;186===e.kind;)e=e.parent.parent;return e}function Qe(t){return e.positionIsSynthesized(t.pos)||e.positionIsSynthesized(t.end)}function $e(e,t,r){switch(e){case 192:return r?0:1;case 202:case 199:case 200:case 198:case 201:case 205:case 207:return 1;case 204:switch(t){case 41:case 59:case 60:case 61:case 63:case 62:case 64:case 65:case 66:case 67:case 68:case 69:case 71:case 70:return 1}}return 0}function Ze(e){return 204===e.kind?e.operatorToken.kind:202===e.kind||203===e.kind?e.operator:e.kind}function et(e,t,r){switch(e){case 314:return 0;case 208:return 1;case 207:return 2;case 205:return 4;case 204:switch(t){case 27:return 0;case 59:case 60:case 61:case 63:case 62:case 64:case 65:case 66:case 67:case 68:case 69:case 71:case 70:return 3;default:return tt(t)}case 202:case 199:case 200:case 198:case 201:return 16;case 203:return 17;case 191:return 18;case 192:return r?19:18;case 193:case 189:case 190:return 19;case 100:case 98:case 72:case 96:case 102:case 87:case 8:case 9:case 10:case 187:case 188:case 196:case 197:case 209:case 260:case 261:case 264:case 13:case 14:case 206:case 195:case 210:return 20;default:return-1}}function tt(e){switch(e){case 55:return 5;case 54:return 6;case 50:return 7;case 51:return 8;case 49:return 9;case 33:case 34:case 35:case 36:return 10;case 28:case 30:case 31:case 32:case 94:case 93:case 119:return 11;case 46:case 47:case 48:return 12;case 38:case 39:return 13;case 40:case 42:case 43:return 14;case 41:return 15}return-1}e.isPartOfTypeNode=q,e.isChildOfNodeWithKind=function(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1},e.forEachReturnStatement=function(t,r){return function t(n){switch(n.kind){case 230:return r(n);case 246:case 218:case 222:case 223:case 224:case 225:case 226:case 227:case 231:case 232:case 271:case 272:case 233:case 235:case 274:return e.forEachChild(n,t)}}(t)},e.forEachYieldExpression=function(t,r){return function t(n){switch(n.kind){case 207:r(n);var i=n.expression;return void(i&&t(i));case 243:case 241:case 244:case 242:case 240:case 209:return;default:if(e.isFunctionLike(n)){if(n.name&&149===n.name.kind)return void t(n.name.expression)}else q(n)||e.forEachChild(n,t)}}(t)},e.getRestParameterElementType=function(t){return t&&169===t.kind?t.elementType:t&&164===t.kind?e.singleOrUndefined(t.typeArguments):void 0},e.getMembersOfDeclaration=function(e){switch(e.kind){case 241:case 240:case 209:case 168:return e.members;case 188:return e.properties}},e.isVariableLike=W,e.isVariableLikeOrAccessor=function(t){return W(t)||e.isAccessor(t)},e.isVariableDeclarationInVariableStatement=H,e.isValidESSymbolDeclaration=function(t){return e.isVariableDeclaration(t)?j(t)&&e.isIdentifier(t.name)&&H(t):e.isPropertyDeclaration(t)?Ot(t)&&It(t):e.isPropertySignature(t)&&Ot(t)},e.introducesArgumentsExoticObject=function(e){switch(e.kind){case 156:case 155:case 157:case 158:case 159:case 239:case 196:return!0}return!1},e.unwrapInnermostStatementOfLabel=function(e,t){for(;;){if(t&&t(e),233!==e.statement.kind)return e.statement;e=e.statement}},e.isFunctionBlock=function(t){return t&&218===t.kind&&e.isFunctionLike(t.parent)},e.isObjectLiteralMethod=function(e){return e&&156===e.kind&&188===e.parent.kind},e.isObjectLiteralOrClassExpressionMethod=function(e){return 156===e.kind&&(188===e.parent.kind||209===e.parent.kind)},e.isIdentifierTypePredicate=function(e){return e&&1===e.kind},e.isThisTypePredicate=function(e){return e&&0===e.kind},e.getPropertyAssignment=G,e.getTsConfigObjectLiteralExpression=Y,e.getTsConfigPropArrayElementValue=function(t,r,n){return e.firstDefined(X(t,r),function(t){return e.isArrayLiteralExpression(t.initializer)?e.find(t.initializer.elements,function(t){return e.isStringLiteral(t)&&t.text===n}):void 0})},e.getTsConfigPropArray=X,e.getContainingFunction=function(t){return o(t.parent,e.isFunctionLike)},e.getContainingClass=function(t){return o(t.parent,e.isClassLike)},e.getThisContainer=Q,e.getNewTargetContainer=function(e){var t=Q(e,!1);if(t)switch(t.kind){case 157:case 239:case 196:return t}},e.getSuperContainer=function(t,r){for(;;){if(!(t=t.parent))return t;switch(t.kind){case 149:t=t.parent;break;case 239:case 196:case 197:if(!r)continue;case 154:case 153:case 156:case 155:case 157:case 158:case 159:return t;case 152:151===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent)}}},e.getImmediatelyInvokedFunctionExpression=function(e){if(196===e.kind||197===e.kind){for(var t=e,r=e.parent;195===r.kind;)t=r,r=r.parent;if(191===r.kind&&r.expression===t)return r}},e.isSuperOrSuperProperty=function(e){return 98===e.kind||$(e)},e.isSuperProperty=$,e.isThisProperty=function(e){var t=e.kind;return(189===t||190===t)&&100===e.expression.kind},e.getEntityNameFromTypeNode=function(e){switch(e.kind){case 164:return e.typeName;case 211:return Vt(e.expression)?e.expression:void 0;case 72:case 148:return e}},e.getInvokedExpression=function(e){switch(e.kind){case 193:return e.tag;case 262:case 261:return e.tagName;default:return e.expression}},e.nodeCanBeDecorated=Z,e.nodeIsDecorated=ee,e.nodeOrChildIsDecorated=te,e.childIsDecorated=re,e.isJSXTagName=ne,e.isExpressionNode=ie,e.isInExpressionContext=ae,e.isExternalModuleImportEqualsDeclaration=oe,e.getExternalModuleImportEqualsDeclarationExpression=function(t){return e.Debug.assert(oe(t)),t.moduleReference.expression},e.isInternalModuleImportEqualsDeclaration=function(e){return 248===e.kind&&259!==e.moduleReference.kind},e.isSourceFileJS=se,e.isSourceFileNotJS=function(e){return!ce(e)},e.isInJSFile=ce,e.isInJsonFile=function(e){return!!e&&!!(16777216&e.flags)},e.isInJSDoc=function(e){return!!e&&!!(2097152&e.flags)},e.isJSDocIndexSignature=function(t){return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText&&t.typeArguments&&2===t.typeArguments.length&&(138===t.typeArguments[0].kind||135===t.typeArguments[0].kind)},e.isRequireCall=ue,e.isSingleOrDoubleQuote=function(e){return 39===e||34===e},e.isStringDoubleQuoted=function(e,t){return 34===b(t,e).charCodeAt(0)},e.getDeclarationOfExpando=function(t){if(t.parent){var r,n;if(e.isVariableDeclaration(t.parent)&&t.parent.initializer===t){if(!ce(t)&&!j(t.parent))return;r=t.parent.name,n=t.parent}else if(e.isBinaryExpression(t.parent)&&59===t.parent.operatorToken.kind&&t.parent.right===t)n=r=t.parent.left;else if(e.isBinaryExpression(t.parent)&&55===t.parent.operatorToken.kind&&(e.isVariableDeclaration(t.parent.parent)&&t.parent.parent.initializer===t.parent?(r=t.parent.parent.name,n=t.parent.parent):e.isBinaryExpression(t.parent.parent)&&59===t.parent.parent.operatorToken.kind&&t.parent.parent.right===t.parent&&(n=r=t.parent.parent.left),!r||!Vt(r)||!de(r,t.parent.left)))return;if(r&&_e(t,Wt(r)))return n}},e.isAssignmentDeclaration=function(t){return e.isBinaryExpression(t)||e.isPropertyAccessExpression(t)||e.isIdentifier(t)||e.isCallExpression(t)},e.getEffectiveInitializer=le,e.getDeclaredExpandoInitializer=function(e){var t=le(e);return t&&_e(t,Wt(e.name))},e.getAssignedExpandoInitializer=function(t){if(t&&t.parent&&e.isBinaryExpression(t.parent)&&59===t.parent.operatorToken.kind){var r=Wt(t.parent.left);return _e(t.parent.right,r)||function(t,r,n){var i=e.isBinaryExpression(r)&&55===r.operatorToken.kind&&_e(r.right,n);if(i&&de(t,r.left))return i}(t.parent.left,t.parent.right,r)}if(t&&e.isCallExpression(t)&&ge(t)){var n=function(t,r){return e.forEach(t.properties,function(t){return e.isPropertyAssignment(t)&&e.isIdentifier(t.name)&&"value"===t.name.escapedText&&t.initializer&&_e(t.initializer,r)})}(t.arguments[2],"prototype"===t.arguments[1].text);if(n)return n}},e.getExpandoInitializer=_e,e.isDefaultedExpandoInitializer=function(t){var r=e.isVariableDeclaration(t.parent)?t.parent.name:e.isBinaryExpression(t.parent)&&59===t.parent.operatorToken.kind?t.parent.left:void 0;return r&&_e(t.right,Wt(r))&&Vt(r)&&de(r,t.left)},e.getNameOfExpando=function(t){if(e.isBinaryExpression(t.parent)){var r=55===t.parent.operatorToken.kind&&e.isBinaryExpression(t.parent.parent)?t.parent.parent:t.parent;if(59===r.operatorToken.kind&&e.isIdentifier(r.left))return r.left}else if(e.isVariableDeclaration(t.parent))return t.parent.name},e.getRightMostAssignedExpression=function(e){for(;Kt(e,!0);)e=e.right;return e},e.isExportsIdentifier=pe,e.isModuleExportsPropertyAccessExpression=fe,e.getAssignmentDeclarationKind=me,e.isBindableObjectDefinePropertyCall=ge,e.getAssignmentDeclarationPropertyAccessKind=ye,e.getInitializerOfBinaryExpression=he,e.isPrototypePropertyAssignment=function(t){return e.isBinaryExpression(t)&&3===me(t)},e.isSpecialPropertyDeclaration=function(t){return ce(t)&&t.parent&&221===t.parent.kind&&!!e.getJSDocTypeTag(t.parent)},e.isFunctionSymbol=function(t){if(!t||!t.valueDeclaration)return!1;var r=t.valueDeclaration;return 239===r.kind||e.isVariableDeclaration(r)&&r.initializer&&e.isFunctionLike(r.initializer)},e.importFromModuleSpecifier=function(t){return ve(t)||e.Debug.fail(e.Debug.showSyntaxKind(t.parent))},e.tryGetImportFromModuleSpecifier=ve,e.getExternalModuleName=function(t){switch(t.kind){case 249:case 255:return t.moduleSpecifier;case 248:return 259===t.moduleReference.kind?t.moduleReference.expression:void 0;case 183:return z(t)?t.argument.literal:void 0;default:return e.Debug.assertNever(t)}},e.getNamespaceDeclarationNode=function(t){switch(t.kind){case 249:return t.importClause&&e.tryCast(t.importClause.namedBindings,e.isNamespaceImport);case 248:return t;case 255:return;default:return e.Debug.assertNever(t)}},e.isDefaultImport=function(e){return 249===e.kind&&!!e.importClause&&!!e.importClause.name},e.hasQuestionToken=function(e){if(e)switch(e.kind){case 151:case 156:case 155:case 276:case 275:case 154:case 153:return void 0!==e.questionToken}return!1},e.isJSDocConstructSignature=function(t){var r=e.isJSDocFunctionType(t)?e.firstOrUndefined(t.parameters):void 0,n=e.tryCast(r&&r.name,e.isIdentifier);return!!n&&"new"===n.escapedText},e.isJSDocTypeAlias=be,e.isTypeAlias=function(t){return be(t)||e.isTypeAliasDeclaration(t)},e.getSingleInitializerOfVariableStatementOrPropertyDeclaration=xe,e.getJSDocCommentsAndTags=function(t){var r;W(t)&&e.hasInitializer(t)&&e.hasJSDocNodes(t.initializer)&&(r=e.addRange(r,t.initializer.jsDoc));for(var n=t;n&&n.parent;){if(e.hasJSDocNodes(n)&&(r=e.addRange(r,n.jsDoc)),151===n.kind){r=e.addRange(r,e.getJSDocParameterTags(n));break}if(150===n.kind){r=e.addRange(r,e.getJSDocTypeParameterTags(n));break}n=Ce(n)}return r||e.emptyArray},e.getParameterSymbolFromJSDoc=function(t){if(t.symbol)return t.symbol;if(e.isIdentifier(t.name)){var r=t.name.escapedText,n=Ee(t);if(n){var i=e.find(n.parameters,function(e){return 72===e.name.kind&&e.name.escapedText===r});return i&&i.symbol}}},e.getHostSignatureFromJSDoc=Ee,e.getHostSignatureFromJSDocHost=ke,e.getJSDocHost=Ne,e.getTypeParameterFromJsDoc=function(t){var r=t.name.escapedText,n=t.parent.parent.parent.typeParameters;return e.find(n,function(e){return e.name.escapedText===r})},e.hasRestParameter=function(t){var r=e.lastOrUndefined(t.parameters);return!!r&&Ae(r)},e.isRestParameter=Ae,function(e){e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound"}(e.AssignmentKind||(e.AssignmentKind={})),e.getAssignmentTargetKind=Fe,e.isAssignmentTarget=function(e){return 0!==Fe(e)},e.isNodeWithPossibleHoistedDeclaration=function(e){switch(e.kind){case 218:case 219:case 231:case 222:case 232:case 246:case 271:case 272:case 233:case 225:case 226:case 227:case 223:case 224:case 235:case 274:return!0}return!1},e.isValueSignatureDeclaration=function(t){return e.isFunctionExpression(t)||e.isArrowFunction(t)||e.isMethodOrAccessor(t)||e.isFunctionDeclaration(t)||e.isConstructorDeclaration(t)},e.walkUpParenthesizedTypes=function(e){return Pe(e,177)},e.walkUpParenthesizedExpressions=we,e.skipParentheses=Ie,e.isDeleteTarget=function(e){return(189===e.kind||190===e.kind)&&(e=we(e.parent))&&198===e.kind},e.isNodeDescendantOf=function(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1},e.isDeclarationName=function(t){return!e.isSourceFile(t)&&!e.isBindingPattern(t)&&e.isDeclaration(t.parent)&&t.parent.name===t},e.getDeclarationFromName=function(t){var r=t.parent;switch(t.kind){case 10:case 8:if(e.isComputedPropertyName(r))return r.parent;case 72:if(e.isDeclaration(r))return r.name===t?r:void 0;if(e.isQualifiedName(r)){var n=r.parent;return e.isJSDocParameterTag(n)&&n.name===r?n:void 0}var i=r.parent;return e.isBinaryExpression(i)&&0!==me(i)&&(i.left.symbol||i.symbol)&&e.getNameOfDeclaration(i)===t?i:void 0;default:return}},e.isLiteralComputedPropertyDeclarationName=function(t){return(10===t.kind||8===t.kind)&&149===t.parent.kind&&e.isDeclaration(t.parent.parent)},e.isIdentifierName=function(e){var t=e.parent;switch(t.kind){case 154:case 153:case 156:case 155:case 158:case 159:case 278:case 275:case 189:return t.name===e;case 148:if(t.right===e){for(;148===t.kind;)t=t.parent;return 167===t.kind||164===t.kind}return!1;case 186:case 253:return t.propertyName===e;case 257:case 267:return!0}return!1},e.isAliasSymbolDeclaration=function(t){return 248===t.kind||247===t.kind||250===t.kind&&!!t.name||251===t.kind||253===t.kind||257===t.kind||254===t.kind&&Oe(t)||e.isBinaryExpression(t)&&2===me(t)&&Oe(t)},e.exportAssignmentIsAlias=Oe,e.getEffectiveBaseTypeNode=Me,e.getClassExtendsHeritageElement=Le,e.getClassImplementsHeritageClauseElements=Re,e.getAllSuperTypeNodes=function(t){return e.isInterfaceDeclaration(t)?Be(t)||e.emptyArray:e.isClassLike(t)&&e.concatenate(e.singleElementArray(Me(t)),Re(t))||e.emptyArray},e.getInterfaceBaseTypeNodes=Be,e.getHeritageClause=je,e.tryResolveScriptReference=function(t,r,n){if(!t.getCompilerOptions().noResolve){var i=e.isRootedDiskPath(n.fileName)?n.fileName:e.combinePaths(e.getDirectoryPath(r.fileName),n.fileName);return t.getSourceFile(i)}},e.getAncestor=function(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}},e.isKeyword=Je,e.isContextualKeyword=ze,e.isNonContextualKeyword=Ke,e.isStringANonContextualKeyword=function(t){var r=e.stringToToken(t);return void 0!==r&&Ke(r)},e.isIdentifierANonContextualKeyword=function(e){var t=e.originalKeywordKind;return!!t&&!ze(t)},e.isTrivia=function(e){return 2<=e&&e<=7},function(e){e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator"}(e.FunctionFlags||(e.FunctionFlags={})),e.getFunctionFlags=function(e){if(!e)return 4;var t=0;switch(e.kind){case 239:case 196:case 156:e.asteriskToken&&(t|=1);case 197:wt(e,256)&&(t|=2)}return e.body||(t|=4),t},e.isAsyncFunction=function(e){switch(e.kind){case 239:case 196:case 197:case 156:return void 0!==e.body&&void 0===e.asteriskToken&&wt(e,256)}return!1},e.isStringOrNumericLiteralLike=Ue,e.hasDynamicName=Ve,e.isDynamicName=qe,e.isWellKnownSymbolSyntactically=We,e.getPropertyNameForPropertyNameNode=He,e.isPropertyNameLiteral=function(e){switch(e.kind){case 72:case 10:case 14:case 8:return!0;default:return!1}},e.getTextOfIdentifierOrLiteral=function(t){return 72===t.kind?e.idText(t):t.text},e.getEscapedTextOfIdentifierOrLiteral=function(t){return 72===t.kind?t.escapedText:e.escapeLeadingUnderscores(t.text)},e.getPropertyNameForKnownSymbolName=Ge,e.isKnownSymbol=function(t){return e.startsWith(t.escapedName,"__@")},e.isESSymbolIdentifier=Ye,e.isPushOrUnshiftIdentifier=function(e){return"push"===e.escapedText||"unshift"===e.escapedText},e.isParameterDeclaration=function(e){return 151===Xe(e).kind},e.getRootDeclaration=Xe,e.nodeStartsNewLexicalEnvironment=function(e){var t=e.kind;return 157===t||196===t||239===t||197===t||156===t||158===t||159===t||244===t||284===t},e.nodeIsSynthesized=Qe,e.getOriginalSourceFile=function(t){return e.getParseTreeNode(t,e.isSourceFile)||t},function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(e.Associativity||(e.Associativity={})),e.getExpressionAssociativity=function(e){var t=Ze(e),r=192===e.kind&&void 0!==e.arguments;return $e(e.kind,t,r)},e.getOperatorAssociativity=$e,e.getExpressionPrecedence=function(e){var t=Ze(e),r=192===e.kind&&void 0!==e.arguments;return et(e.kind,t,r)},e.getOperator=Ze,e.getOperatorPrecedence=et,e.getBinaryOperatorPrecedence=tt,e.createDiagnosticCollection=function(){var t=[],r=[],n=e.createMap(),i=!1;return{add:function(a){var o;a.file?(o=n.get(a.file.fileName))||(o=[],n.set(a.file.fileName,o),e.insertSorted(r,a.file.fileName,e.compareStringsCaseSensitive)):(i&&(i=!1,t=t.slice()),o=t),e.insertSorted(o,a,e.compareDiagnostics)},lookup:function(r){var i;if(i=r.file?n.get(r.file.fileName):t){var a=e.binarySearch(i,r,e.identity,e.compareDiagnosticsSkipRelatedInformation);return a>=0?i[a]:void 0}},getGlobalDiagnostics:function(){return i=!0,t},getDiagnostics:function(i){if(i)return n.get(i)||[];var a=e.flatMapToMutable(r,function(e){return n.get(e)});return t.length?(a.unshift.apply(a,t),a):a},reattachFileDiagnostics:function(t){e.forEach(n.get(t.fileName),function(e){return e.file=t})}}};var rt=/[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,nt=/[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,it=/[\\\`\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,at=e.createMapFromTemplate({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085"});function ot(e,t){var r=96===t?it:39===t?nt:rt;return e.replace(r,st)}function st(e,t,r){if(0===e.charCodeAt(0)){var n=r.charCodeAt(t+e.length);return n>=48&&n<=57?"\\x00":"\\0"}return at.get(e)||ct(e.charCodeAt(0))}function ct(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}e.escapeString=ot,e.isIntrinsicJsxName=function(t){var r=t.charCodeAt(0);return r>=97&&r<=122||e.stringContains(t,"-")};var ut=/[^\u0000-\u007F]/g;function lt(e,t){return e=ot(e,t),ut.test(e)?e.replace(ut,function(e){return ct(e.charCodeAt(0))}):e}e.escapeNonAsciiString=lt;var _t=[""," "];function dt(e){return void 0===_t[e]&&(_t[e]=dt(e-1)+_t[1]),_t[e]}function pt(){return _t[1].length}function ft(e,t,r){return t.moduleName||mt(e,t.fileName,r&&r.fileName)}function mt(t,r,n){var i=function(e){return t.getCanonicalFileName(e)},o=a(n?e.getDirectoryPath(n):t.getCommonSourceDirectory(),t.getCurrentDirectory(),i),s=e.getNormalizedAbsolutePath(r,t.getCurrentDirectory()),c=e.getRelativePathToDirectoryOrUrl(o,s,o,i,!1),u=e.removeFileExtension(c);return n?e.ensurePathIsNonModuleName(u):u}function gt(t,r,n,i,a){var o=r.declarationDir||r.outDir,s=o?vt(t,o,n,i,a):t;return e.removeFileExtension(s)+".d.ts"}function yt(e,t,r,n){return!(t.noEmitForJsFiles&&se(e)||e.isDeclarationFile||r(e)||B(e)&&n(e.fileName))}function ht(e,t,r){return vt(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),function(e){return t.getCanonicalFileName(e)})}function vt(t,r,n,i,a){var o=e.getNormalizedAbsolutePath(t,n);return o=0===a(o).indexOf(a(i))?o.substring(i.length):o,e.combinePaths(r,o)}function bt(t,r){return e.getLineAndCharacterOfPosition(t,r).line}function Dt(t,r){return e.computeLineAndCharacterOfPosition(t,r).line}function xt(e){if(e&&e.parameters.length>0){var t=2===e.parameters.length&&St(e.parameters[0]);return e.parameters[t?1:0]}}function St(e){return Tt(e.name)}function Tt(e){return!!e&&72===e.kind&&Ct(e)}function Ct(e){return 100===e.originalKeywordKind}function Et(t){var r=t.type;return r||!ce(t)?r:e.isJSDocPropertyLikeTag(t)?t.typeExpression&&t.typeExpression.type:e.getJSDocType(t)}function kt(e,t,r,n){Nt(e,t,r.pos,n)}function Nt(e,t,r,n){n&&n.length&&r!==n[0].pos&&Dt(e,r)!==Dt(e,n[0].pos)&&t.writeLine()}function At(e,t,r,n,i,a,o,s){if(n&&n.length>0){i&&r.writeSpace(" ");for(var c=!1,u=0,l=n;u<l.length;u++){var _=l[u];c&&(r.writeSpace(" "),c=!1),s(e,t,r,_.pos,_.end,o),_.hasTrailingNewLine?r.writeLine():c=!0}c&&a&&r.writeSpace(" ")}}function Ft(e,t,r,n,i,a){var o=Math.min(t,a-1),s=e.substring(i,o).replace(/^\s+|\s+$/g,"");s?(r.writeComment(s),o!==t&&r.writeLine()):r.rawWrite(n)}function Pt(t,r,n){for(var i=0;r<n&&e.isWhiteSpaceSingleLine(t.charCodeAt(r));r++)9===t.charCodeAt(r)?i+=pt()-i%pt():i++;return i}function wt(e,t){return!!Mt(e,t)}function It(e){return wt(e,32)}function Ot(e){return wt(e,64)}function Mt(e,t){return Lt(e)&t}function Lt(e){if(536870912&e.modifierFlagsCache)return-536870913&e.modifierFlagsCache;var t=Rt(e);return e.modifierFlagsCache=536870912|t,t}function Rt(e){var t=0;if(e.modifiers)for(var r=0,n=e.modifiers;r<n.length;r++){t|=Bt(n[r].kind)}return(4&e.flags||72===e.kind&&e.isInJSDocNamespace)&&(t|=1),t}function Bt(e){switch(e){case 116:return 32;case 115:return 4;case 114:return 16;case 113:return 8;case 118:return 128;case 85:return 1;case 125:return 2;case 77:return 2048;case 80:return 512;case 121:return 256;case 133:return 64}return 0}function jt(e){return e>=59&&e<=71}function Jt(e){var t=zt(e);return t&&!t.isImplements?t.class:void 0}function zt(t){return e.isExpressionWithTypeArguments(t)&&e.isHeritageClause(t.parent)&&e.isClassLike(t.parent.parent)?{class:t.parent.parent,isImplements:109===t.parent.token}:void 0}function Kt(t,r){return e.isBinaryExpression(t)&&(r?59===t.operatorToken.kind:jt(t.operatorToken.kind))&&e.isLeftHandSideExpression(t.left)}function Ut(e){return void 0!==Jt(e)}function Vt(e){return 72===e.kind||qt(e)}function qt(t){return e.isPropertyAccessExpression(t)&&Vt(t.expression)}function Wt(t){return e.isPropertyAccessExpression(t)&&"prototype"===t.name.escapedText}e.getIndentString=dt,e.getIndentSize=pt,e.createTextWriter=function(t){var r,n,i,a,o;function s(t){var n=e.computeLineStarts(t);n.length>1?(a=a+n.length-1,o=r.length-t.length+e.last(n),i=o-r.length==0):i=!1}function c(e){e&&e.length&&(i&&(e=dt(n)+e,i=!1),r+=e,s(e))}function u(){r="",n=0,i=!0,a=0,o=0}return u(),{write:c,rawWrite:function(e){void 0!==e&&(r+=e,s(e))},writeLiteral:function(e){e&&e.length&&c(e)},writeLine:function(){i||(a++,o=(r+=t).length,i=!0)},increaseIndent:function(){n++},decreaseIndent:function(){n--},getIndent:function(){return n},getTextPos:function(){return r.length},getLine:function(){return a},getColumn:function(){return i?n*pt():r.length-o},getText:function(){return r},isAtStartOfLine:function(){return i},clear:u,reportInaccessibleThisError:e.noop,reportPrivateInBaseOfClassExpression:e.noop,reportInaccessibleUniqueSymbolError:e.noop,trackSymbol:e.noop,writeKeyword:c,writeOperator:c,writeParameter:c,writeProperty:c,writePunctuation:c,writeSpace:c,writeStringLiteral:c,writeSymbol:function(e,t){return c(e)},writeTrailingSemicolon:c,writeComment:c,getTextPosWithWriteLine:function(){return i?r.length:r.length+t.length}}},e.getTrailingSemicolonOmittingWriter=function(e){var t=!1;function r(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return i({},e,{writeTrailingSemicolon:function(){t=!0},writeLiteral:function(t){r(),e.writeLiteral(t)},writeStringLiteral:function(t){r(),e.writeStringLiteral(t)},writeSymbol:function(t,n){r(),e.writeSymbol(t,n)},writePunctuation:function(t){r(),e.writePunctuation(t)},writeKeyword:function(t){r(),e.writeKeyword(t)},writeOperator:function(t){r(),e.writeOperator(t)},writeParameter:function(t){r(),e.writeParameter(t)},writeSpace:function(t){r(),e.writeSpace(t)},writeProperty:function(t){r(),e.writeProperty(t)},writeComment:function(t){r(),e.writeComment(t)},writeLine:function(){r(),e.writeLine()},increaseIndent:function(){r(),e.increaseIndent()},decreaseIndent:function(){r(),e.decreaseIndent()}})},e.getResolvedExternalModuleName=ft,e.getExternalModuleNameFromDeclaration=function(e,t,r){var n=t.getExternalModuleFileFromDeclaration(r);if(n&&!n.isDeclarationFile)return ft(e,n)},e.getExternalModuleNameFromPath=mt,e.getOwnEmitOutputFilePath=function(t,r,n){var i=r.getCompilerOptions();return(i.outDir?e.removeFileExtension(ht(t,r,i.outDir)):e.removeFileExtension(t))+n},e.getDeclarationEmitOutputFilePath=function(e,t){return gt(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),function(e){return t.getCanonicalFileName(e)})},e.getDeclarationEmitOutputFilePathWorker=gt,e.getSourceFilesToEmit=function(t,r){var n=t.getCompilerOptions(),i=function(e){return t.isSourceFileFromExternalLibrary(e)},a=function(e){return t.getResolvedProjectReferenceToRedirect(e)};if(n.outFile||n.out){var o=e.getEmitModuleKind(n),s=n.emitDeclarationOnly||o===e.ModuleKind.AMD||o===e.ModuleKind.System;return e.filter(t.getSourceFiles(),function(t){return(s||!e.isExternalModule(t))&&yt(t,n,i,a)})}var c=void 0===r?t.getSourceFiles():[r];return e.filter(c,function(e){return yt(e,n,i,a)})},e.sourceFileMayBeEmitted=yt,e.getSourceFilePathInNewDir=ht,e.getSourceFilePathInNewDirWorker=vt,e.writeFile=function(t,r,n,i,a,o){t.writeFile(n,i,a,function(t){r.add(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,n,t))},o)},e.getLineOfLocalPosition=bt,e.getLineOfLocalPositionFromLineMap=Dt,e.getFirstConstructorWithBody=function(t){return e.find(t.members,function(t){return e.isConstructorDeclaration(t)&&p(t.body)})},e.getSetAccessorTypeAnnotationNode=function(e){var t=xt(e);return t&&t.type},e.getThisParameter=function(t){if(t.parameters.length&&!e.isJSDocSignature(t)){var r=t.parameters[0];if(St(r))return r}},e.parameterIsThisKeyword=St,e.isThisIdentifier=Tt,e.identifierIsThisKeyword=Ct,e.getAllAccessorDeclarations=function(t,r){var n,i,a,o;return Ve(r)?(n=r,158===r.kind?a=r:159===r.kind?o=r:e.Debug.fail("Accessor has wrong kind")):e.forEach(t,function(t){e.isAccessor(t)&&wt(t,32)===wt(r,32)&&He(t.name)===He(r.name)&&(n?i||(i=t):n=t,158!==t.kind||a||(a=t),159!==t.kind||o||(o=t))}),{firstAccessor:n,secondAccessor:i,getAccessor:a,setAccessor:o}},e.getEffectiveTypeAnnotationNode=Et,e.getTypeAnnotationNode=function(e){return e.type},e.getEffectiveReturnTypeNode=function(t){return e.isJSDocSignature(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(ce(t)?e.getJSDocReturnType(t):void 0)},e.getJSDocTypeParameterDeclarations=function(t){return e.flatMap(e.getJSDocTags(t),function(t){return function(t){return e.isJSDocTemplateTag(t)&&!(296===t.parent.kind&&t.parent.tags.some(be))}(t)?t.typeParameters:void 0})},e.getEffectiveSetAccessorTypeAnnotationNode=function(e){var t=xt(e);return t&&Et(t)},e.emitNewLineBeforeLeadingComments=kt,e.emitNewLineBeforeLeadingCommentsOfPosition=Nt,e.emitNewLineBeforeLeadingCommentOfPosition=function(e,t,r,n){r!==n&&Dt(e,r)!==Dt(e,n)&&t.writeLine()},e.emitComments=At,e.emitDetachedComments=function(t,r,n,i,a,o,s){var c,u;if(s?0===a.pos&&(c=e.filter(e.getLeadingCommentRanges(t,a.pos),function(e){return h(t,e.pos)})):c=e.getLeadingCommentRanges(t,a.pos),c){for(var l=[],_=void 0,d=0,p=c;d<p.length;d++){var f=p[d];if(_){var m=Dt(r,_.end);if(Dt(r,f.pos)>=m+2)break}l.push(f),_=f}l.length&&(m=Dt(r,e.last(l).end),Dt(r,e.skipTrivia(t,a.pos))>=m+2&&(kt(r,n,a,c),At(t,r,n,l,!1,!0,o,i),u={nodePos:a.pos,detachedCommentEndPos:e.last(l).end}))}return u},e.writeCommentRange=function(t,r,n,i,a,o){if(42===t.charCodeAt(i+1))for(var s=e.computeLineAndCharacterOfPosition(r,i),c=r.length,u=void 0,l=i,_=s.line;l<a;_++){var d=_+1===c?t.length+1:r[_+1];if(l!==i){void 0===u&&(u=Pt(t,r[s.line],i));var p=n.getIndent()*pt()-u+Pt(t,l,d);if(p>0){var f=p%pt(),m=dt((p-f)/pt());for(n.rawWrite(m);f;)n.rawWrite(" "),f--}else n.rawWrite("")}Ft(t,a,n,o,l,d),l=d}else n.writeComment(t.substring(i,a))},e.hasModifiers=function(e){return 0!==Lt(e)},e.hasModifier=wt,e.hasStaticModifier=It,e.hasReadonlyModifier=Ot,e.getSelectedModifierFlags=Mt,e.getModifierFlags=Lt,e.getModifierFlagsNoCache=Rt,e.modifierToFlag=Bt,e.isLogicalOperator=function(e){return 55===e||54===e||52===e},e.isAssignmentOperator=jt,e.tryGetClassExtendingExpressionWithTypeArguments=Jt,e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments=zt,e.isAssignmentExpression=Kt,e.isDestructuringAssignment=function(e){if(Kt(e,!0)){var t=e.left.kind;return 188===t||187===t}return!1},e.isExpressionWithTypeArgumentsInClassExtendsClause=Ut,e.isEntityNameExpression=Vt,e.isPropertyAccessEntityNameExpression=qt,e.isPrototypeAccess=Wt,e.isRightSideOfQualifiedNameOrPropertyAccess=function(e){return 148===e.parent.kind&&e.parent.right===e||189===e.parent.kind&&e.parent.name===e},e.isEmptyObjectLiteral=function(e){return 188===e.kind&&0===e.properties.length},e.isEmptyArrayLiteral=function(e){return 187===e.kind&&0===e.elements.length},e.getLocalSymbolForExportDefault=function(t){return function(t){return t&&e.length(t.declarations)>0&&wt(t.declarations[0],512)}(t)?t.declarations[0].localSymbol:void 0},e.tryExtractTSExtension=function(t){return e.find(e.supportedTSExtensionsForExtractExtension,function(r){return e.fileExtensionIs(t,r)})};var Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Gt(t){for(var r,n,i,a,o="",s=function(t){for(var r=[],n=t.length,i=0;i<n;i++){var a=t.charCodeAt(i);a<128?r.push(a):a<2048?(r.push(a>>6|192),r.push(63&a|128)):a<65536?(r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)):a<131072?(r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)):e.Debug.assert(!1,"Unexpected code point")}return r}(t),c=0,u=s.length;c<u;)r=s[c]>>2,n=(3&s[c])<<4|s[c+1]>>4,i=(15&s[c+1])<<2|s[c+2]>>6,a=63&s[c+2],c+1>=u?i=a=64:c+2>=u&&(a=64),o+=Ht.charAt(r)+Ht.charAt(n)+Ht.charAt(i)+Ht.charAt(a),c+=3;return o}e.convertToBase64=Gt,e.base64encode=function(e,t){return e&&e.base64encode?e.base64encode(t):Gt(t)},e.base64decode=function(e,t){if(e&&e.base64decode)return e.base64decode(t);for(var r=t.length,n=[],i=0;i<r&&t.charCodeAt(i)!==Ht.charCodeAt(64);){var a=Ht.indexOf(t[i]),o=Ht.indexOf(t[i+1]),s=Ht.indexOf(t[i+2]),c=Ht.indexOf(t[i+3]),u=(63&a)<<2|o>>4&3,l=(15&o)<<4|s>>2&15,_=(3&s)<<6|63&c;0===l&&0!==s?n.push(u):0===_&&0!==c?n.push(u,l):n.push(u,l,_),i+=4}return function(e){for(var t="",r=0,n=e.length;r<n;){var i=e[r];if(i<128)t+=String.fromCharCode(i),r++;else if(192==(192&i)){for(var a=63&i,o=e[++r];128==(192&o);)a=a<<6|63&o,o=e[++r];t+=String.fromCharCode(a)}else t+=String.fromCharCode(i),r++}return t}(n)},e.readJson=function(t,r){try{var n=r.readFile(t);if(!n)return{};var i=e.parseConfigFileTextToJson(t,n);return i.error?{}:i.config}catch(e){return{}}},e.directoryProbablyExists=function(e,t){return!t.directoryExists||t.directoryExists(e)};var Yt,Xt="\r\n",Qt="\n";function $t(t,r,n){void 0===t&&(t=0);var i=function(t){var r=[];for(var n in t){var i=t[n];"number"==typeof i&&r.push([i,n])}return e.stableSort(r,function(t,r){return e.compareValues(t[0],r[0])})}(r);if(0===t)return i.length>0&&0===i[0][0]?i[0][1]:"0";if(n){for(var a="",o=t,s=i.length-1;s>=0&&0!==o;s--){var c=i[s],u=c[0],l=c[1];0!==u&&(o&u)===u&&(o&=~u,a=l+(a?", ":"")+a)}if(0===o)return a}else for(var _=0,d=i;_<d.length;_++){var p=d[_];u=p[0],l=p[1];if(u===t)return l}return t.toString()}function Zt(t,r){return void 0===r&&(r=t),e.Debug.assert(r>=t||-1===r),{pos:t,end:r}}function er(e,t){return Zt(t,e.end)}function tr(e){return e.decorators&&e.decorators.length>0?er(e,e.decorators.end):e}function rr(e,t,r){return nr(ir(e,r),t.end,r)}function nr(e,t,r){return e===t||bt(r,e)===bt(r,t)}function ir(t,r){return e.positionIsSynthesized(t.pos)?-1:e.skipTrivia(r.text,t.pos)}function ar(e){return void 0!==e.initializer}function or(e){return 33554432&e.flags?e.checkFlags:0}function sr(t){var r=t.parent;if(!r)return 0;switch(r.kind){case 195:return sr(r);case 203:case 202:var n=r.operator;return 44===n||45===n?c():0;case 204:var i=r,a=i.left,o=i.operatorToken;return a===t&&jt(o.kind)?59===o.kind?1:c():0;case 189:return r.name!==t?0:sr(r);case 275:var s=sr(r.parent);return t===r.name?function(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return e.Debug.assertNever(t)}}(s):s;case 276:return t===r.objectAssignmentInitializer?0:sr(r.parent);case 187:return sr(r);default:return 0}function c(){return r.parent&&221===function(e){for(;195===e.kind;)e=e.parent;return e}(r.parent).kind?1:2}}function cr(t,r){for(;;){var n=r(t);if(void 0!==n)return n;var i=e.getDirectoryPath(t);if(i===t)return;t=i}}function ur(e){if(32&e.flags){var t=lr(e);return!!t&&wt(t,128)}return!1}function lr(t){return e.find(t.declarations,e.isClassLike)}function _r(e){return 3768320&e.flags?e.objectFlags:0}e.getNewLineCharacter=function(t,r){switch(t.newLine){case 0:return Xt;case 1:return Qt}return r?r():e.sys?e.sys.newLine:Xt},e.formatSyntaxKind=function(t){return $t(t,e.SyntaxKind,!1)},e.formatModifierFlags=function(t){return $t(t,e.ModifierFlags,!0)},e.formatTransformFlags=function(t){return $t(t,e.TransformFlags,!0)},e.formatEmitFlags=function(t){return $t(t,e.EmitFlags,!0)},e.formatSymbolFlags=function(t){return $t(t,e.SymbolFlags,!0)},e.formatTypeFlags=function(t){return $t(t,e.TypeFlags,!0)},e.formatObjectFlags=function(t){return $t(t,e.ObjectFlags,!0)},e.createRange=Zt,e.moveRangeEnd=function(e,t){return Zt(e.pos,t)},e.moveRangePos=er,e.moveRangePastDecorators=tr,e.moveRangePastModifiers=function(e){return e.modifiers&&e.modifiers.length>0?er(e,e.modifiers.end):tr(e)},e.isCollapsedRange=function(e){return e.pos===e.end},e.createTokenRange=function(t,r){return Zt(t,t+e.tokenToString(r).length)},e.rangeIsOnSingleLine=function(e,t){return rr(e,e,t)},e.rangeStartPositionsAreOnSameLine=function(e,t,r){return nr(ir(e,r),ir(t,r),r)},e.rangeEndPositionsAreOnSameLine=function(e,t,r){return nr(e.end,t.end,r)},e.rangeStartIsOnSameLineAsRangeEnd=rr,e.rangeEndIsOnSameLineAsRangeStart=function(e,t,r){return nr(e.end,ir(t,r),r)},e.positionsAreOnSameLine=nr,e.getStartPositionOfRange=ir,e.isDeclarationNameOfEnumOrNamespace=function(t){var r=e.getParseTreeNode(t);if(r)switch(r.parent.kind){case 243:case 244:return r===r.parent.name}return!1},e.getInitializedVariables=function(t){return e.filter(t.declarations,ar)},e.isWatchSet=function(e){return e.watch&&e.hasOwnProperty("watch")},e.closeFileWatcher=function(e){e.close()},e.getCheckFlags=or,e.getDeclarationModifierFlagsFromSymbol=function(t){if(t.valueDeclaration){var r=e.getCombinedModifierFlags(t.valueDeclaration);return t.parent&&32&t.parent.flags?r:-29&r}if(6&or(t)){var n=t.checkFlags;return(512&n?8:128&n?4:16)|(1024&n?32:0)}return 4194304&t.flags?36:0},e.skipAlias=function(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e},e.getCombinedLocalAndExportSymbolFlags=function(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags},e.isWriteOnlyAccess=function(e){return 1===sr(e)},e.isWriteAccess=function(e){return 0!==sr(e)},function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(Yt||(Yt={})),e.compareDataObjects=function e(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(var n in t)if("object"===f(t[n])){if(!e(t[n],r[n]))return!1}else if("function"!=typeof t[n]&&t[n]!==r[n])return!1;return!0},e.clearMap=function(e,t){e.forEach(t),e.clear()},e.mutateMap=function(e,t,r){var n=r.createNewValue,i=r.onDeleteValue,a=r.onExistingValue;e.forEach(function(r,n){var o=t.get(n);void 0===o?(e.delete(n),i(r,n)):a&&a(r,o,n)}),t.forEach(function(t,r){e.has(r)||e.set(r,n(r,t))})},e.forEachAncestorDirectory=cr,e.isAbstractConstructorType=function(e){return!!(16&_r(e))&&!!e.symbol&&ur(e.symbol)},e.isAbstractConstructorSymbol=ur,e.getClassLikeDeclarationOfSymbol=lr,e.getObjectFlags=_r,e.typeHasCallOrConstructSignatures=function(e,t){return 0!==t.getSignaturesOfType(e,0).length||0!==t.getSignaturesOfType(e,1).length},e.forSomeAncestorDirectory=function(e,t){return!!cr(e,function(e){return!!t(e)||void 0})},e.isUMDExportSymbol=function(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&e.isNamespaceExportDeclaration(t.declarations[0])},e.showModuleSpecifier=function(t){var r=t.moduleSpecifier;return e.isStringLiteral(r)?r.text:x(r)},e.getLastChild=function(t){var r;return e.forEachChild(t,function(e){p(e)&&(r=e)},function(e){for(var t=e.length-1;t>=0;t--)if(p(e[t])){r=e[t];break}}),r},e.addToSeen=function(e,t,r){return void 0===r&&(r=!0),t=String(t),!e.has(t)&&(e.set(t,r),!0)},e.isObjectTypeDeclaration=function(t){return e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isTypeLiteralNode(t)},e.isTypeNodeKind=function(e){return e>=163&&e<=183||120===e||143===e||135===e||146===e||136===e||123===e||138===e||139===e||100===e||106===e||141===e||96===e||132===e||211===e||289===e||290===e||291===e||292===e||293===e||294===e||295===e},e.isAccessExpression=function(e){return 189===e.kind||190===e.kind},e.isBundleFileTextLike=function(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}}}(c||(c={})),function(e){function t(e){return e.start+e.length}function r(e){return 0===e.length}function n(e,t){var r=a(e,t);return r&&0===r.length?void 0:r}function i(e,t,r,n){return r<=e+t&&r+n>=e}function a(e,r){var n=Math.max(e.start,r.start),i=Math.min(t(e),t(r));return n<=i?s(n,i):void 0}function o(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function s(e,t){return o(e,t-e)}function c(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function u(t){return!!e.isBindingPattern(t)&&e.every(t.elements,l)}function l(t){return!!e.isOmittedExpression(t)||u(t.name)}function _(t){for(var r=t.parent;e.isBindingElement(r.parent);)r=r.parent.parent;return r.parent}function d(t,r){e.isBindingElement(t)&&(t=_(t));var n=r(t);return 237===t.kind&&(t=t.parent),t&&238===t.kind&&(n|=r(t),t=t.parent),t&&219===t.kind&&(n|=r(t)),n}function p(e,t){if(e)for(;void 0!==e.original;)e=e.original;return!t||t(e)?e:void 0}function f(e){return 0==(8&e.flags)}function m(e){var t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function g(t){var r=v(t);return r&&e.isIdentifier(r)?r:void 0}function y(t){return t.name||function(t){var r=t.parent.parent;if(r){if(e.isDeclaration(r))return g(r);switch(r.kind){case 219:if(r.declarationList&&r.declarationList.declarations[0])return g(r.declarationList.declarations[0]);break;case 221:var n=r.expression;switch(n.kind){case 189:return n.name;case 190:var i=n.argumentExpression;if(e.isIdentifier(i))return i}break;case 195:return g(r.expression);case 233:if(e.isDeclaration(r.statement)||e.isExpression(r.statement))return g(r.statement)}}}(t)}function h(t){switch(t.kind){case 72:return t;case 310:case 304:var r=t.name;if(148===r.kind)return r.right;break;case 191:case 204:var n=t;switch(e.getAssignmentDeclarationKind(n)){case 1:case 4:case 5:case 3:return n.left.name;case 7:case 8:case 9:return n.arguments[1];default:return}case 309:return y(t);case 254:var i=t.expression;return e.isIdentifier(i)?i:void 0}return t.name}function v(t){if(void 0!==t)return h(t)||(e.isFunctionExpression(t)||e.isClassExpression(t)?function(t){if(!t.parent)return;if(e.isPropertyAssignment(t.parent)||e.isBindingElement(t.parent))return t.parent.name;if(e.isBinaryExpression(t.parent)&&t===t.parent.right){if(e.isIdentifier(t.parent.left))return t.parent.left;if(e.isPropertyAccessExpression(t.parent.left))return t.parent.left.name}}(t):void 0)}function b(t){if(t.name){if(e.isIdentifier(t.name)){var r=t.name.escapedText;return T(t.parent).filter(function(t){return e.isJSDocParameterTag(t)&&e.isIdentifier(t.name)&&t.name.escapedText===r})}var n=t.parent.parameters.indexOf(t);e.Debug.assert(n>-1,"Parameters should always be in their parents' parameter list");var i=T(t.parent).filter(e.isJSDocParameterTag);if(n<i.length)return[i[n]]}return e.emptyArray}function D(t){return C(t,e.isJSDocReturnTag)}function x(t){var r=C(t,e.isJSDocTypeTag);if(r&&r.typeExpression&&r.typeExpression.type)return r}function S(t){var r=C(t,e.isJSDocTypeTag);return!r&&e.isParameter(t)&&(r=e.find(b(t),function(e){return!!e.typeExpression})),r&&r.typeExpression&&r.typeExpression.type}function T(t){var r=t.jsDocCache;if(void 0===r){var n=e.getJSDocCommentsAndTags(t);e.Debug.assert(n.length<2||n[0]!==n[1]),t.jsDocCache=r=e.flatMap(n,function(t){return e.isJSDoc(t)?t.tags:t})}return r}function C(t,r){return e.find(T(t),r)}e.getDefaultLibFileName=function(e){switch(e.target){case 7:return"lib.esnext.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}},e.textSpanEnd=t,e.textSpanIsEmpty=r,e.textSpanContainsPosition=function(e,r){return r>=e.start&&r<t(e)},e.textRangeContainsPositionInclusive=function(e,t){return t>=e.pos&&t<=e.end},e.textSpanContainsTextSpan=function(e,r){return r.start>=e.start&&t(r)<=t(e)},e.textSpanOverlapsWith=function(e,t){return void 0!==n(e,t)},e.textSpanOverlap=n,e.textSpanIntersectsWithTextSpan=function(e,t){return i(e.start,e.length,t.start,t.length)},e.textSpanIntersectsWith=function(e,t,r){return i(e.start,e.length,t,r)},e.decodedTextSpanIntersectsWith=i,e.textSpanIntersectsWithPosition=function(e,r){return r<=t(e)&&r>=e.start},e.textSpanIntersection=a,e.createTextSpan=o,e.createTextSpanFromBounds=s,e.textChangeRangeNewSpan=function(e){return o(e.span.start,e.newLength)},e.textChangeRangeIsUnchanged=function(e){return r(e.span)&&0===e.newLength},e.createTextChangeRange=c,e.unchangedTextChangeRange=c(o(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=function(r){if(0===r.length)return e.unchangedTextChangeRange;if(1===r.length)return r[0];for(var n=r[0],i=n.span.start,a=t(n.span),o=i+n.newLength,u=1;u<r.length;u++){var l=r[u],_=i,d=a,p=o,f=l.span.start,m=t(l.span),g=f+l.newLength;i=Math.min(_,f),a=Math.max(d,d+(m-p)),o=Math.max(g,g+(p-m))}return c(s(i,a),o-i)},e.getTypeParameterOwner=function(t){if(t&&150===t.kind)for(var r=t;r;r=r.parent)if(e.isFunctionLike(r)||e.isClassLike(r)||241===r.kind)return r},e.isParameterPropertyDeclaration=function(t){return e.hasModifier(t,92)&&157===t.parent.kind},e.isEmptyBindingPattern=u,e.isEmptyBindingElement=l,e.walkUpBindingElementsAndPatterns=_,e.getCombinedModifierFlags=function(t){return d(t,e.getModifierFlags)},e.getCombinedNodeFlags=function(e){return d(e,function(e){return e.flags})},e.validateLocaleAndSetLanguage=function(t,r,n){var i=/^([a-z]+)([_\-]([a-z]+))?$/.exec(t.toLowerCase());if(i){var a=i[1];o(a,i[3],n)||o(a,void 0,n),e.setUILocale(t)}else n&&n.push(e.createCompilerDiagnostic(e.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1,"en","ja-jp"));function o(t,n,i){var a=e.normalizePath(r.getExecutingFilePath()),o=e.getDirectoryPath(a),s=e.combinePaths(o,t);if(n&&(s=s+"-"+n),s=r.resolvePath(e.combinePaths(s,"diagnosticMessages.generated.json")),!r.fileExists(s))return!1;var c="";try{c=r.readFile(s)}catch(t){return i&&i.push(e.createCompilerDiagnostic(e.Diagnostics.Unable_to_open_file_0,s)),!1}try{e.localizedDiagnosticMessages=JSON.parse(c)}catch(t){return i&&i.push(e.createCompilerDiagnostic(e.Diagnostics.Corrupted_locale_file_0,s)),!1}return!0}},e.getOriginalNode=p,e.isParseTreeNode=f,e.getParseTreeNode=function(e,t){return void 0===e||f(e)?e:!f(e=p(e))||t&&!t(e)?void 0:e},e.escapeLeadingUnderscores=function(e){return e.length>=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e},e.unescapeLeadingUnderscores=m,e.idText=function(e){return m(e.escapedText)},e.symbolName=function(e){return m(e.escapedName)},e.getNameOfJSDocTypedef=y,e.isNamedDeclaration=function(e){return!!e.name},e.getNonAssignedNameOfDeclaration=h,e.getNameOfDeclaration=v,e.getJSDocParameterTags=b,e.getJSDocTypeParameterTags=function(t){var r=t.name.escapedText;return T(t.parent).filter(function(t){return e.isJSDocTemplateTag(t)&&t.typeParameters.some(function(e){return e.name.escapedText===r})})},e.hasJSDocParameterTags=function(t){return!!C(t,e.isJSDocParameterTag)},e.getJSDocAugmentsTag=function(t){return C(t,e.isJSDocAugmentsTag)},e.getJSDocClassTag=function(t){return C(t,e.isJSDocClassTag)},e.getJSDocEnumTag=function(t){return C(t,e.isJSDocEnumTag)},e.getJSDocThisTag=function(t){return C(t,e.isJSDocThisTag)},e.getJSDocReturnTag=D,e.getJSDocTemplateTag=function(t){return C(t,e.isJSDocTemplateTag)},e.getJSDocTypeTag=x,e.getJSDocType=S,e.getJSDocReturnType=function(t){var r=D(t);if(r&&r.typeExpression)return r.typeExpression.type;var n=x(t);if(n&&n.typeExpression){var i=n.typeExpression.type;if(e.isTypeLiteralNode(i)){var a=e.find(i.members,e.isCallSignatureDeclaration);return a&&a.type}if(e.isFunctionTypeNode(i))return i.type}},e.getJSDocTags=T,e.getAllJSDocTagsOfKind=function(e,t){return T(e).filter(function(e){return e.kind===t})},e.getEffectiveTypeParameterDeclarations=function(t){if(e.isJSDocSignature(t))return e.emptyArray;if(e.isJSDocTypeAlias(t))return e.Debug.assert(296===t.parent.kind),e.flatMap(t.parent.tags,function(t){return e.isJSDocTemplateTag(t)?t.typeParameters:void 0});if(t.typeParameters)return t.typeParameters;if(e.isInJSFile(t)){var r=e.getJSDocTypeParameterDeclarations(t);if(r.length)return r;var n=S(t);if(n&&e.isFunctionTypeNode(n)&&n.typeParameters)return n.typeParameters}return e.emptyArray},e.getEffectiveConstraintOfTypeParameter=function(t){return t.constraint?t.constraint:e.isJSDocTemplateTag(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0}}(c||(c={})),function(e){function t(e){return 72===e.kind}function r(e){return 164===e.kind}function n(e){switch(e.kind){case 281:case 282:return!0;default:return!1}}e.isNumericLiteral=function(e){return 8===e.kind},e.isBigIntLiteral=function(e){return 9===e.kind},e.isStringLiteral=function(e){return 10===e.kind},e.isJsxText=function(e){return 11===e.kind},e.isRegularExpressionLiteral=function(e){return 13===e.kind},e.isNoSubstitutionTemplateLiteral=function(e){return 14===e.kind},e.isTemplateHead=function(e){return 15===e.kind},e.isTemplateMiddle=function(e){return 16===e.kind},e.isTemplateTail=function(e){return 17===e.kind},e.isIdentifier=t,e.isQualifiedName=function(e){return 148===e.kind},e.isComputedPropertyName=function(e){return 149===e.kind},e.isTypeParameterDeclaration=function(e){return 150===e.kind},e.isParameter=function(e){return 151===e.kind},e.isDecorator=function(e){return 152===e.kind},e.isPropertySignature=function(e){return 153===e.kind},e.isPropertyDeclaration=function(e){return 154===e.kind},e.isMethodSignature=function(e){return 155===e.kind},e.isMethodDeclaration=function(e){return 156===e.kind},e.isConstructorDeclaration=function(e){return 157===e.kind},e.isGetAccessorDeclaration=function(e){return 158===e.kind},e.isSetAccessorDeclaration=function(e){return 159===e.kind},e.isCallSignatureDeclaration=function(e){return 160===e.kind},e.isConstructSignatureDeclaration=function(e){return 161===e.kind},e.isIndexSignatureDeclaration=function(e){return 162===e.kind},e.isGetOrSetAccessorDeclaration=function(e){return 159===e.kind||158===e.kind},e.isTypePredicateNode=function(e){return 163===e.kind},e.isTypeReferenceNode=r,e.isFunctionTypeNode=function(e){return 165===e.kind},e.isConstructorTypeNode=function(e){return 166===e.kind},e.isTypeQueryNode=function(e){return 167===e.kind},e.isTypeLiteralNode=function(e){return 168===e.kind},e.isArrayTypeNode=function(e){return 169===e.kind},e.isTupleTypeNode=function(e){return 170===e.kind},e.isUnionTypeNode=function(e){return 173===e.kind},e.isIntersectionTypeNode=function(e){return 174===e.kind},e.isConditionalTypeNode=function(e){return 175===e.kind},e.isInferTypeNode=function(e){return 176===e.kind},e.isParenthesizedTypeNode=function(e){return 177===e.kind},e.isThisTypeNode=function(e){return 178===e.kind},e.isTypeOperatorNode=function(e){return 179===e.kind},e.isIndexedAccessTypeNode=function(e){return 180===e.kind},e.isMappedTypeNode=function(e){return 181===e.kind},e.isLiteralTypeNode=function(e){return 182===e.kind},e.isImportTypeNode=function(e){return 183===e.kind},e.isObjectBindingPattern=function(e){return 184===e.kind},e.isArrayBindingPattern=function(e){return 185===e.kind},e.isBindingElement=function(e){return 186===e.kind},e.isArrayLiteralExpression=function(e){return 187===e.kind},e.isObjectLiteralExpression=function(e){return 188===e.kind},e.isPropertyAccessExpression=function(e){return 189===e.kind},e.isElementAccessExpression=function(e){return 190===e.kind},e.isCallExpression=function(e){return 191===e.kind},e.isNewExpression=function(e){return 192===e.kind},e.isTaggedTemplateExpression=function(e){return 193===e.kind},e.isTypeAssertion=function(e){return 194===e.kind},e.isConstTypeReference=function(e){return r(e)&&t(e.typeName)&&"const"===e.typeName.escapedText&&!e.typeArguments},e.isParenthesizedExpression=function(e){return 195===e.kind},e.skipPartiallyEmittedExpressions=function(e){for(;313===e.kind;)e=e.expression;return e},e.isFunctionExpression=function(e){return 196===e.kind},e.isArrowFunction=function(e){return 197===e.kind},e.isDeleteExpression=function(e){return 198===e.kind},e.isTypeOfExpression=function(e){return 199===e.kind},e.isVoidExpression=function(e){return 200===e.kind},e.isAwaitExpression=function(e){return 201===e.kind},e.isPrefixUnaryExpression=function(e){return 202===e.kind},e.isPostfixUnaryExpression=function(e){return 203===e.kind},e.isBinaryExpression=function(e){return 204===e.kind},e.isConditionalExpression=function(e){return 205===e.kind},e.isTemplateExpression=function(e){return 206===e.kind},e.isYieldExpression=function(e){return 207===e.kind},e.isSpreadElement=function(e){return 208===e.kind},e.isClassExpression=function(e){return 209===e.kind},e.isOmittedExpression=function(e){return 210===e.kind},e.isExpressionWithTypeArguments=function(e){return 211===e.kind},e.isAsExpression=function(e){return 212===e.kind},e.isNonNullExpression=function(e){return 213===e.kind},e.isMetaProperty=function(e){return 214===e.kind},e.isTemplateSpan=function(e){return 216===e.kind},e.isSemicolonClassElement=function(e){return 217===e.kind},e.isBlock=function(e){return 218===e.kind},e.isVariableStatement=function(e){return 219===e.kind},e.isEmptyStatement=function(e){return 220===e.kind},e.isExpressionStatement=function(e){return 221===e.kind},e.isIfStatement=function(e){return 222===e.kind},e.isDoStatement=function(e){return 223===e.kind},e.isWhileStatement=function(e){return 224===e.kind},e.isForStatement=function(e){return 225===e.kind},e.isForInStatement=function(e){return 226===e.kind},e.isForOfStatement=function(e){return 227===e.kind},e.isContinueStatement=function(e){return 228===e.kind},e.isBreakStatement=function(e){return 229===e.kind},e.isBreakOrContinueStatement=function(e){return 229===e.kind||228===e.kind},e.isReturnStatement=function(e){return 230===e.kind},e.isWithStatement=function(e){return 231===e.kind},e.isSwitchStatement=function(e){return 232===e.kind},e.isLabeledStatement=function(e){return 233===e.kind},e.isThrowStatement=function(e){return 234===e.kind},e.isTryStatement=function(e){return 235===e.kind},e.isDebuggerStatement=function(e){return 236===e.kind},e.isVariableDeclaration=function(e){return 237===e.kind},e.isVariableDeclarationList=function(e){return 238===e.kind},e.isFunctionDeclaration=function(e){return 239===e.kind},e.isClassDeclaration=function(e){return 240===e.kind},e.isInterfaceDeclaration=function(e){return 241===e.kind},e.isTypeAliasDeclaration=function(e){return 242===e.kind},e.isEnumDeclaration=function(e){return 243===e.kind},e.isModuleDeclaration=function(e){return 244===e.kind},e.isModuleBlock=function(e){return 245===e.kind},e.isCaseBlock=function(e){return 246===e.kind},e.isNamespaceExportDeclaration=function(e){return 247===e.kind},e.isImportEqualsDeclaration=function(e){return 248===e.kind},e.isImportDeclaration=function(e){return 249===e.kind},e.isImportClause=function(e){return 250===e.kind},e.isNamespaceImport=function(e){return 251===e.kind},e.isNamedImports=function(e){return 252===e.kind},e.isImportSpecifier=function(e){return 253===e.kind},e.isExportAssignment=function(e){return 254===e.kind},e.isExportDeclaration=function(e){return 255===e.kind},e.isNamedExports=function(e){return 256===e.kind},e.isExportSpecifier=function(e){return 257===e.kind},e.isMissingDeclaration=function(e){return 258===e.kind},e.isExternalModuleReference=function(e){return 259===e.kind},e.isJsxElement=function(e){return 260===e.kind},e.isJsxSelfClosingElement=function(e){return 261===e.kind},e.isJsxOpeningElement=function(e){return 262===e.kind},e.isJsxClosingElement=function(e){return 263===e.kind},e.isJsxFragment=function(e){return 264===e.kind},e.isJsxOpeningFragment=function(e){return 265===e.kind},e.isJsxClosingFragment=function(e){return 266===e.kind},e.isJsxAttribute=function(e){return 267===e.kind},e.isJsxAttributes=function(e){return 268===e.kind},e.isJsxSpreadAttribute=function(e){return 269===e.kind},e.isJsxExpression=function(e){return 270===e.kind},e.isCaseClause=function(e){return 271===e.kind},e.isDefaultClause=function(e){return 272===e.kind},e.isHeritageClause=function(e){return 273===e.kind},e.isCatchClause=function(e){return 274===e.kind},e.isPropertyAssignment=function(e){return 275===e.kind},e.isShorthandPropertyAssignment=function(e){return 276===e.kind},e.isSpreadAssignment=function(e){return 277===e.kind},e.isEnumMember=function(e){return 278===e.kind},e.isSourceFile=function(e){return 284===e.kind},e.isBundle=function(e){return 285===e.kind},e.isUnparsedSource=function(e){return 286===e.kind},e.isUnparsedPrepend=function(e){return 280===e.kind},e.isUnparsedTextLike=n,e.isUnparsedNode=function(e){return n(e)||279===e.kind||283===e.kind},e.isJSDocTypeExpression=function(e){return 288===e.kind},e.isJSDocAllType=function(e){return 289===e.kind},e.isJSDocUnknownType=function(e){return 290===e.kind},e.isJSDocNullableType=function(e){return 291===e.kind},e.isJSDocNonNullableType=function(e){return 292===e.kind},e.isJSDocOptionalType=function(e){return 293===e.kind},e.isJSDocFunctionType=function(e){return 294===e.kind},e.isJSDocVariadicType=function(e){return 295===e.kind},e.isJSDoc=function(e){return 296===e.kind},e.isJSDocAugmentsTag=function(e){return 300===e.kind},e.isJSDocClassTag=function(e){return 301===e.kind},e.isJSDocEnumTag=function(e){return 303===e.kind},e.isJSDocThisTag=function(e){return 306===e.kind},e.isJSDocParameterTag=function(e){return 304===e.kind},e.isJSDocReturnTag=function(e){return 305===e.kind},e.isJSDocTypeTag=function(e){return 307===e.kind},e.isJSDocTemplateTag=function(e){return 308===e.kind},e.isJSDocTypedefTag=function(e){return 309===e.kind},e.isJSDocPropertyTag=function(e){return 310===e.kind},e.isJSDocPropertyLikeTag=function(e){return 310===e.kind||304===e.kind},e.isJSDocTypeLiteral=function(e){return 297===e.kind},e.isJSDocCallbackTag=function(e){return 302===e.kind},e.isJSDocSignature=function(e){return 298===e.kind}}(c||(c={})),function(e){function t(e){return e>=148}function r(e){return 8<=e&&e<=14}function n(e){return 14<=e&&e<=17}function i(e){switch(e){case 118:case 121:case 77:case 125:case 80:case 85:case 115:case 113:case 114:case 133:case 116:return!0}return!1}function a(t){return!!(92&e.modifierToFlag(t))}function o(e){return e&&c(e.kind)}function s(e){switch(e){case 239:case 156:case 157:case 158:case 159:case 196:case 197:return!0;default:return!1}}function c(e){switch(e){case 155:case 160:case 298:case 161:case 162:case 165:case 294:case 166:return!0;default:return s(e)}}function u(e){var t=e.kind;return 157===t||154===t||156===t||158===t||159===t||162===t||217===t}function l(e){var t=e.kind;return 161===t||160===t||153===t||155===t||162===t}function _(e){var t=e.kind;return 275===t||276===t||277===t||156===t||158===t||159===t}function d(e){switch(e.kind){case 184:case 188:return!0}return!1}function p(e){switch(e.kind){case 185:case 187:return!0}return!1}function f(e){switch(e){case 189:case 190:case 192:case 191:case 260:case 261:case 264:case 193:case 187:case 195:case 188:case 209:case 196:case 72:case 13:case 8:case 9:case 10:case 14:case 206:case 87:case 96:case 100:case 102:case 98:case 213:case 214:case 92:return!0;default:return!1}}function m(e){switch(e){case 202:case 203:case 198:case 199:case 200:case 201:case 194:return!0;default:return f(e)}}function g(t){return function(e){switch(e){case 205:case 207:case 197:case 204:case 208:case 212:case 210:case 314:case 313:return!0;default:return m(e)}}(e.skipPartiallyEmittedExpressions(t).kind)}function y(e){return 313===e.kind}function h(e){return 312===e.kind}function v(e){return 239===e||258===e||240===e||241===e||242===e||243===e||244===e||249===e||248===e||255===e||254===e||247===e}function b(e){return 229===e||228===e||236===e||223===e||221===e||220===e||226===e||227===e||225===e||222===e||233===e||230===e||232===e||234===e||235===e||219===e||224===e||231===e||312===e||316===e||315===e}function D(e){return e.kind>=299&&e.kind<=310}function x(e){return!!e.initializer}e.isSyntaxList=function(e){return 311===e.kind},e.isNode=function(e){return t(e.kind)},e.isNodeKind=t,e.isToken=function(e){return e.kind>=0&&e.kind<=147},e.isNodeArray=function(e){return e.hasOwnProperty("pos")&&e.hasOwnProperty("end")},e.isLiteralKind=r,e.isLiteralExpression=function(e){return r(e.kind)},e.isTemplateLiteralKind=n,e.isTemplateLiteralToken=function(e){return n(e.kind)},e.isTemplateMiddleOrTemplateTail=function(e){var t=e.kind;return 16===t||17===t},e.isImportOrExportSpecifier=function(t){return e.isImportSpecifier(t)||e.isExportSpecifier(t)},e.isStringTextContainingNode=function(e){return 10===e.kind||n(e.kind)},e.isGeneratedIdentifier=function(t){return e.isIdentifier(t)&&(7&t.autoGenerateFlags)>0},e.isModifierKind=i,e.isParameterPropertyModifier=a,e.isClassMemberModifier=function(e){return a(e)||116===e},e.isModifier=function(e){return i(e.kind)},e.isEntityName=function(e){var t=e.kind;return 148===t||72===t},e.isPropertyName=function(e){var t=e.kind;return 72===t||10===t||8===t||149===t},e.isBindingName=function(e){var t=e.kind;return 72===t||184===t||185===t},e.isFunctionLike=o,e.isFunctionLikeDeclaration=function(e){return e&&s(e.kind)},e.isFunctionLikeKind=c,e.isFunctionOrModuleBlock=function(t){return e.isSourceFile(t)||e.isModuleBlock(t)||e.isBlock(t)&&o(t.parent)},e.isClassElement=u,e.isClassLike=function(e){return e&&(240===e.kind||209===e.kind)},e.isAccessor=function(e){return e&&(158===e.kind||159===e.kind)},e.isMethodOrAccessor=function(e){switch(e.kind){case 156:case 158:case 159:return!0;default:return!1}},e.isTypeElement=l,e.isClassOrTypeElement=function(e){return l(e)||u(e)},e.isObjectLiteralElementLike=_,e.isTypeNode=function(t){return e.isTypeNodeKind(t.kind)},e.isFunctionOrConstructorTypeNode=function(e){switch(e.kind){case 165:case 166:return!0}return!1},e.isBindingPattern=function(e){if(e){var t=e.kind;return 185===t||184===t}return!1},e.isAssignmentPattern=function(e){var t=e.kind;return 187===t||188===t},e.isArrayBindingElement=function(e){var t=e.kind;return 186===t||210===t},e.isDeclarationBindingElement=function(e){switch(e.kind){case 237:case 151:case 186:return!0}return!1},e.isBindingOrAssignmentPattern=function(e){return d(e)||p(e)},e.isObjectBindingOrAssignmentPattern=d,e.isArrayBindingOrAssignmentPattern=p,e.isPropertyAccessOrQualifiedNameOrImportTypeNode=function(e){var t=e.kind;return 189===t||148===t||183===t},e.isPropertyAccessOrQualifiedName=function(e){var t=e.kind;return 189===t||148===t},e.isCallLikeExpression=function(e){switch(e.kind){case 262:case 261:case 191:case 192:case 193:case 152:return!0;default:return!1}},e.isCallOrNewExpression=function(e){return 191===e.kind||192===e.kind},e.isTemplateLiteral=function(e){var t=e.kind;return 206===t||14===t},e.isLeftHandSideExpression=function(t){return f(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpression=function(t){return m(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpressionWithWrite=function(e){switch(e.kind){case 203:return!0;case 202:return 44===e.operator||45===e.operator;default:return!1}},e.isExpression=g,e.isAssertionExpression=function(e){var t=e.kind;return 194===t||212===t},e.isPartiallyEmittedExpression=y,e.isNotEmittedStatement=h,e.isNotEmittedOrPartiallyEmittedNode=function(e){return h(e)||y(e)},e.isIterationStatement=function e(t,r){switch(t.kind){case 225:case 226:case 227:case 223:case 224:return!0;case 233:return r&&e(t.statement,r)}return!1},e.isForInOrOfStatement=function(e){return 226===e.kind||227===e.kind},e.isConciseBody=function(t){return e.isBlock(t)||g(t)},e.isFunctionBody=function(t){return e.isBlock(t)},e.isForInitializer=function(t){return e.isVariableDeclarationList(t)||g(t)},e.isModuleBody=function(e){var t=e.kind;return 245===t||244===t||72===t},e.isNamespaceBody=function(e){var t=e.kind;return 245===t||244===t},e.isJSDocNamespaceBody=function(e){var t=e.kind;return 72===t||244===t},e.isNamedImportBindings=function(e){var t=e.kind;return 252===t||251===t},e.isModuleOrEnumDeclaration=function(e){return 244===e.kind||243===e.kind},e.isDeclaration=function(t){return 150===t.kind?t.parent&&308!==t.parent.kind||e.isInJSFile(t):197===(r=t.kind)||186===r||240===r||209===r||157===r||243===r||278===r||257===r||239===r||196===r||158===r||250===r||248===r||253===r||241===r||267===r||156===r||155===r||244===r||247===r||251===r||151===r||275===r||154===r||153===r||159===r||276===r||242===r||150===r||237===r||309===r||302===r||310===r;var r},e.isDeclarationStatement=function(e){return v(e.kind)},e.isStatementButNotDeclaration=function(e){return b(e.kind)},e.isStatement=function(t){var r=t.kind;return b(r)||v(r)||function(t){return 218===t.kind&&((void 0===t.parent||235!==t.parent.kind&&274!==t.parent.kind)&&!e.isFunctionBlock(t))}(t)},e.isModuleReference=function(e){var t=e.kind;return 259===t||148===t||72===t},e.isJsxTagNameExpression=function(e){var t=e.kind;return 100===t||72===t||189===t},e.isJsxChild=function(e){var t=e.kind;return 260===t||270===t||261===t||11===t||264===t},e.isJsxAttributeLike=function(e){var t=e.kind;return 267===t||269===t},e.isStringLiteralOrJsxExpression=function(e){var t=e.kind;return 10===t||270===t},e.isJsxOpeningLikeElement=function(e){var t=e.kind;return 262===t||261===t},e.isCaseOrDefaultClause=function(e){var t=e.kind;return 271===t||272===t},e.isJSDocNode=function(e){return e.kind>=288&&e.kind<=310},e.isJSDocCommentContainingNode=function(t){return 296===t.kind||D(t)||e.isJSDocTypeLiteral(t)||e.isJSDocSignature(t)},e.isJSDocTag=D,e.isSetAccessor=function(e){return 159===e.kind},e.isGetAccessor=function(e){return 158===e.kind},e.hasJSDocNodes=function(e){var t=e.jsDoc;return!!t&&t.length>0},e.hasType=function(e){return!!e.type},e.hasInitializer=x,e.hasOnlyExpressionInitializer=function(t){return x(t)&&!e.isForStatement(t)&&!e.isForInStatement(t)&&!e.isForOfStatement(t)&&!e.isJsxAttribute(t)},e.isObjectLiteralElement=function(e){return 267===e.kind||269===e.kind||_(e)},e.isTypeReferenceType=function(e){return 164===e.kind||211===e.kind};var S=1073741823;e.guessIndentation=function(t){for(var r=S,n=0,i=t;n<i.length;n++){var a=i[n];if(a.length){for(var o=0;o<a.length&&o<r&&e.isWhiteSpaceLike(a.charCodeAt(o));o++);if(o<r&&(r=o),0===r)return 0}}return r===S?void 0:r},e.isStringLiteralLike=function(e){return 10===e.kind||14===e.kind}}(c||(c={})),function(e){function t(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=void 0,this.mergeId=void 0,this.parent=void 0}function r(t,r){this.flags=r,e.Debug.isDebugging&&(this.checker=t)}function n(){}function i(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0}function a(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||function(e){return e}}function o(t,r,n){return void 0===n&&(n=0),t.replace(/{(\d+)}/g,function(t,i){return""+e.Debug.assertDefined(r[+i+n])})}function s(t){return e.localizedDiagnosticMessages&&e.localizedDiagnosticMessages[t.key]||t.message}function c(e){return e.file?e.file.path:void 0}function u(t,r){return l(t,r)||function(t,r){if(!t.relatedInformation&&!r.relatedInformation)return 0;if(t.relatedInformation&&r.relatedInformation)return e.compareValues(t.relatedInformation.length,r.relatedInformation.length)||e.forEach(t.relatedInformation,function(e,t){var n=r.relatedInformation[t];return u(e,n)})||0;return t.relatedInformation?-1:1}(t,r)||0}function l(t,r){return e.compareStringsCaseSensitive(c(t),c(r))||e.compareValues(t.start,r.start)||e.compareValues(t.length,r.length)||e.compareValues(t.code,r.code)||function(t,r){var n=t,i=r;for(;n&&i;){var a=e.isString(n)?n:n.messageText,o=e.isString(i)?i:i.messageText,s=e.compareStringsCaseSensitive(a,o);if(s)return s;n=e.isString(n)?void 0:n.next,i=e.isString(i)?void 0:i.next}if(!n&&!i)return 0;return n?1:-1}(t.messageText,r.messageText)||0}function _(e){return e.target||0}function d(t){return"number"==typeof t.module?t.module:_(t)>=2?e.ModuleKind.ES2015:e.ModuleKind.CommonJS}function p(e){return!(!e.declaration&&!e.composite)}function f(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function m(e,t){return t.strictFlag?f(e,t.name):e[t.name]}e.isNamedImportsOrExports=function(e){return 252===e.kind||256===e.kind},e.objectAllocator={getNodeConstructor:function(){return i},getTokenConstructor:function(){return i},getIdentifierConstructor:function(){return i},getSourceFileConstructor:function(){return i},getSymbolConstructor:function(){return t},getTypeConstructor:function(){return r},getSignatureConstructor:function(){return n},getSourceMapSourceConstructor:function(){return a}},e.formatStringFromArgs=o,e.getLocaleSpecificMessage=s,e.createFileDiagnostic=function(t,r,n,i){e.Debug.assertGreaterThanOrEqual(r,0),e.Debug.assertGreaterThanOrEqual(n,0),t&&(e.Debug.assertLessThanOrEqual(r,t.text.length),e.Debug.assertLessThanOrEqual(r+n,t.text.length));var a=s(i);return arguments.length>4&&(a=o(a,arguments,4)),{file:t,start:r,length:n,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary}},e.formatMessage=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),r},e.createCompilerDiagnostic=function(e){var t=s(e);return arguments.length>1&&(t=o(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary}},e.createCompilerDiagnosticFromMessageChain=function(e){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText}},e.chainDiagnosticMessages=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:e}},e.concatenateDiagnosticMessageChains=function(e,t){for(var r=e;r.next;)r=r.next;return r.next=t,e},e.compareDiagnostics=u,e.compareDiagnosticsSkipRelatedInformation=l,e.getEmitScriptTarget=_,e.getEmitModuleKind=d,e.getEmitModuleResolutionKind=function(t){var r=t.moduleResolution;return void 0===r&&(r=d(t)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic),r},e.hasJsonModuleEmitEnabled=function(t){switch(d(t)){case e.ModuleKind.CommonJS:case e.ModuleKind.AMD:case e.ModuleKind.ES2015:case e.ModuleKind.ESNext:return!0;default:return!1}},e.unreachableCodeIsError=function(e){return!1===e.allowUnreachableCode},e.unusedLabelIsError=function(e){return!1===e.allowUnusedLabels},e.getAreDeclarationMapsEnabled=function(e){return!(!p(e)||!e.declarationMap)},e.getAllowSyntheticDefaultImports=function(t){var r=d(t);return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:t.esModuleInterop||r===e.ModuleKind.System},e.getEmitDeclarations=p,e.isIncrementalCompilation=function(e){return!(!e.incremental&&!e.composite)},e.getStrictOptionValue=f,e.compilerOptionsAffectSemanticDiagnostics=function(t,r){return r!==t&&e.semanticDiagnosticsOptionDeclarations.some(function(n){return!e.isJsonEqual(m(r,n),m(t,n))})},e.getCompilerOptionValue=m,e.hasZeroOrOneAsteriskCharacter=function(e){for(var t=!1,r=0;r<e.length;r++)if(42===e.charCodeAt(r)){if(t)return!1;t=!0}return!0},e.directorySeparator="/";var g="\\",y="://",h=/\\/g;function v(t){return t.replace(h,e.directorySeparator)}function b(e){return e>=97&&e<=122||e>=65&&e<=90}function D(t){if(!t)return 0;var r=t.charCodeAt(0);if(47===r||92===r){if(t.charCodeAt(1)!==r)return 1;var n=t.indexOf(47===r?e.directorySeparator:g,2);return n<0?t.length:n+1}if(b(r)&&58===t.charCodeAt(1)){var i=t.charCodeAt(2);if(47===i||92===i)return 3;if(2===t.length)return 2}var a=t.indexOf(y);if(-1!==a){var o=a+y.length,s=t.indexOf(e.directorySeparator,o);if(-1!==s){var c=t.slice(0,a),u=t.slice(o,s);if("file"===c&&(""===u||"localhost"===u)&&b(t.charCodeAt(s+1))){var l=function(e,t){var r=e.charCodeAt(t);if(58===r)return t+1;if(37===r&&51===e.charCodeAt(t+1)){var n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(t,s+2);if(-1!==l){if(47===t.charCodeAt(l))return~(l+1);if(l===t.length)return~l}}return~(s+1)}return~t.length}return 0}function x(e){var t=D(e);return t<0?~t:t}function S(e){return D(e)>0}function T(t,r){return void 0===r&&(r=""),function(t,r){var n=t.substring(0,r),i=t.substring(r).split(e.directorySeparator);return i.length&&!e.lastOrUndefined(i)&&i.pop(),[n].concat(i)}(t=e.combinePaths(r,t),x(t))}function C(t){if(!e.some(t))return[];for(var r=[t[0]],n=1;n<t.length;n++){var i=t[n];if(i&&"."!==i){if(".."===i)if(r.length>1){if(".."!==r[r.length-1]){r.pop();continue}}else if(r[0])continue;r.push(i)}}return r}function E(e,t){return C(T(e,t))}function k(t){return 0===t.length?"":(t[0]&&e.ensureTrailingDirectorySeparator(t[0]))+t.slice(1).join(e.directorySeparator)}e.normalizeSlashes=v,e.getRootLength=x,e.normalizePath=function(t){return e.resolvePath(t)},e.normalizePathAndParts=function(t){var r=C(T(t=v(t))),n=r[0],i=r.slice(1);if(i.length){var a=n+i.join(e.directorySeparator);return{path:e.hasTrailingDirectorySeparator(t)?e.ensureTrailingDirectorySeparator(a):a,parts:i}}return{path:n,parts:i}},e.getDirectoryPath=function(t){var r=x(t=v(t));return r===t.length?t:(t=e.removeTrailingDirectorySeparator(t)).slice(0,Math.max(r,t.lastIndexOf(e.directorySeparator)))},e.startsWithDirectory=function(t,r,n){var i=n(t),a=n(r);return e.startsWith(i,a+"/")||e.startsWith(i,a+"\\")},e.isUrl=function(e){return D(e)<0},e.pathIsRelative=function(e){return/^\.\.?($|[\\/])/.test(e)},e.isRootedDiskPath=S,e.isDiskPathRoot=function(e){var t=D(e);return t>0&&t===e.length},e.convertToRelativePath=function(t,r,n){return S(t)?e.getRelativePathToDirectoryOrUrl(r,t,r,n,!1):t},e.getPathComponents=T,e.reducePathComponents=C,e.getNormalizedPathComponents=E,e.getNormalizedAbsolutePath=function(e,t){return k(E(e,t))},e.getPathFromPathComponents=k}(c||(c={})),function(e){function t(t,r,n,i){var a,o=e.reducePathComponents(e.getPathComponents(t)),s=e.reducePathComponents(e.getPathComponents(r));for(a=0;a<o.length&&a<s.length;a++){var c=i(o[a]),u=i(s[a]);if(!(0===a?e.equateStringsCaseInsensitive:n)(c,u))break}if(0===a)return s;for(var l=s.slice(a),_=[];a<o.length;a++)_.push("..");return[""].concat(_,l)}function r(r,n,i){L.assert(e.getRootLength(r)>0==e.getRootLength(n)>0,"Paths must either both be absolute or both be relative");var a="function"==typeof i?i:e.identity,o=t(r,n,"boolean"==typeof i&&i?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,a);return e.getPathFromPathComponents(o)}function n(t){return 0!==e.getRootLength(t)||e.pathIsRelative(t)?t:"./"+t}function i(t,r,n){if(t=e.normalizeSlashes(t),e.getRootLength(t)===t.length)return"";var i=(t=c(t)).slice(Math.max(e.getRootLength(t),t.lastIndexOf(e.directorySeparator)+1)),a=void 0!==r&&void 0!==n?V(i,r,n):void 0;return a?i.slice(0,i.length-a.length):i}function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];t&&(t=e.normalizeSlashes(t));for(var i=0,a=r;i<a.length;i++){var o=a[i];o&&(o=e.normalizeSlashes(o),t=t&&0===e.getRootLength(o)?u(t)+o:o)}return t}function o(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=e.some(r)?a.apply(void 0,[t].concat(r)):e.normalizeSlashes(t),o=e.getPathFromPathComponents(e.reducePathComponents(e.getPathComponents(i)));return o&&s(i)?u(o):o}function s(e){if(0===e.length)return!1;var t=e.charCodeAt(e.length-1);return 47===t||92===t}function c(e){return s(e)?e.substr(0,e.length-1):e}function u(t){return s(t)?t:t+e.directorySeparator}e.getPathComponentsRelativeTo=t,e.getRelativePathFromFile=function(t,i,a){return n(r(e.getDirectoryPath(t),i,a))},e.getRelativePathFromDirectory=r,e.getRelativePathToDirectoryOrUrl=function(r,n,i,a,s){var c=t(o(i,r),o(i,n),e.equateStringsCaseSensitive,a),u=c[0];if(s&&e.isRootedDiskPath(u)){var l=u.charAt(0)===e.directorySeparator?"file://":"file:///";c[0]=l+u}return e.getPathFromPathComponents(c)},e.ensurePathIsNonModuleName=n,e.getBaseFileName=i,e.combinePaths=a,e.resolvePath=o,e.hasTrailingDirectorySeparator=s,e.removeTrailingDirectorySeparator=c,e.ensureTrailingDirectorySeparator=u;var l=/(^|\/)\.{0,2}($|\/)/;function _(t,r,n){if(t===r)return 0;if(void 0===t)return-1;if(void 0===r)return 1;var i=t.substring(0,e.getRootLength(t)),a=r.substring(0,e.getRootLength(r)),o=e.compareStringsCaseInsensitive(i,a);if(0!==o)return o;var s=t.substring(i.length),c=r.substring(a.length);if(!l.test(s)&&!l.test(c))return n(s,c);for(var u=e.reducePathComponents(e.getPathComponents(t)),_=e.reducePathComponents(e.getPathComponents(r)),d=Math.min(u.length,_.length),p=1;p<d;p++){var f=n(u[p],_[p]);if(0!==f)return f}return e.compareValues(u.length,_.length)}function d(t,r,n,i){if("string"==typeof n?(t=a(n,t),r=a(n,r)):"boolean"==typeof n&&(i=n),void 0===t||void 0===r)return!1;if(t===r)return!0;var o=e.reducePathComponents(e.getPathComponents(t)),s=e.reducePathComponents(e.getPathComponents(r));if(s.length<o.length)return!1;for(var c=i?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,u=0;u<o.length;u++){if(!(0===u?e.equateStringsCaseInsensitive:c)(o[u],s[u]))return!1}return!0}e.comparePathsCaseSensitive=function(t,r){return _(t,r,e.compareStringsCaseSensitive)},e.comparePathsCaseInsensitive=function(t,r){return _(t,r,e.compareStringsCaseInsensitive)},e.comparePaths=function(t,r,n,i){return"string"==typeof n?(t=a(n,t),r=a(n,r)):"boolean"==typeof n&&(i=n),_(t,r,e.getStringComparer(i))},e.containsPath=d,e.tryRemoveDirectoryPrefix=function(t,r,n){var i,a,o=e.tryRemovePrefix(t,r,n);return void 0===o?void 0:47===(a=(i=o).charCodeAt(0))||92===a?i.slice(1):void 0};var p=/[^\w\s\/]/g;function m(e){return"\\"+e}e.regExpEscape=function(e){return e.replace(p,m)};var g=[42,63];function y(t){return e.stringContains(i(t),".")}e.hasExtension=y,e.commonPackageFolders=["node_modules","bower_components","jspm_packages"];var h="(?!("+e.commonPackageFolders.join("|")+")(/|$))",v={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:"(/"+h+"[^/.][^/]*)*?",replaceWildcardCharacter:function(e){return E(e,v.singleAsteriskRegexFragment)}},b={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/"+h+"[^/.][^/]*)*?",replaceWildcardCharacter:function(e){return E(e,b.singleAsteriskRegexFragment)}},D={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:function(e){return E(e,D.singleAsteriskRegexFragment)}},x={files:v,directories:b,exclude:D};function S(e,t,r){var n=T(e,t,r);if(n&&n.length)return"^("+n.map(function(e){return"("+e+")"}).join("|")+")"+("exclude"===r?"($|/)":"$")}function T(t,r,n){if(void 0!==t&&0!==t.length)return e.flatMap(t,function(t){return t&&function(t,r,n,i){var a=i.singleAsteriskRegexFragment,o=i.doubleAsteriskRegexFragment,s=i.replaceWildcardCharacter,u="",l=!1,_=e.getNormalizedPathComponents(t,r),d=e.last(_);if("exclude"!==n&&"**"===d)return;_[0]=c(_[0]),C(d)&&_.push("**","*");for(var f=0,m=0,g=_;m<g.length;m++){var y=g[m];if("**"===y)u+=o;else if("directories"===n&&(u+="(",f++),l&&(u+=e.directorySeparator),"exclude"!==n){var v="";42===y.charCodeAt(0)?(v+="([^./]"+a+")?",y=y.substr(1)):63===y.charCodeAt(0)&&(v+="[^./]",y=y.substr(1)),(v+=y.replace(p,s))!==y&&(u+=h),u+=v}else u+=y.replace(p,s);l=!0}for(;f>0;)u+=")?",f--;return u}(t,r,n,x[n])})}function C(e){return!/[.*?]/.test(e)}function E(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function k(t,r,n,i,o){t=e.normalizePath(t);var s=a(o=e.normalizePath(o),t);return{includeFilePatterns:e.map(T(n,s,"files"),function(e){return"^"+e+"$"}),includeFilePattern:S(n,s,"files"),includeDirectoryPattern:S(n,s,"directories"),excludePattern:S(r,s,"exclude"),basePaths:function(t,r,n){var i=[t];if(r){for(var o=[],s=0,c=r;s<c.length;s++){var u=c[s],l=e.isRootedDiskPath(u)?u:e.normalizePath(a(t,u));o.push(A(l))}o.sort(e.getStringComparer(!n));for(var _=function(r){e.every(i,function(e){return!d(e,r,t,!n)})&&i.push(r)},p=0,f=o;p<f.length;p++){var m=f[p];_(m)}}return i}(t,n,i)}}function N(e,t){return new RegExp(e,t?"":"i")}function A(t){var r=e.indexOfAnyCharCode(t,g);return r<0?y(t)?c(e.getDirectoryPath(t)):t:t.substring(0,t.lastIndexOf(e.directorySeparator,r))}function F(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":return 1;case".jsx":return 2;case".ts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}e.getRegularExpressionForWildcard=S,e.getRegularExpressionsForWildcards=T,e.isImplicitGlob=C,e.getFileMatcherPatterns=k,e.getRegexFromPattern=N,e.matchFiles=function(t,r,n,i,o,s,c,u,l){t=e.normalizePath(t),s=e.normalizePath(s);for(var _=k(t,n,i,o,s),d=_.includeFilePatterns&&_.includeFilePatterns.map(function(e){return N(e,o)}),p=_.includeDirectoryPattern&&N(_.includeDirectoryPattern,o),f=_.excludePattern&&N(_.excludePattern,o),m=d?d.map(function(){return[]}):[[]],g=e.createMap(),y=e.createGetCanonicalFileName(o),h=0,v=_.basePaths;h<v.length;h++){var b=v[h];D(b,a(s,b),c)}return e.flatten(m);function D(t,n,i){var o=y(l(n));if(!g.has(o)){g.set(o,!0);for(var s=u(t),c=s.files,_=s.directories,h=function(i){var o=a(t,i),s=a(n,i);if(r&&!e.fileExtensionIsOneOf(o,r))return"continue";if(f&&f.test(s))return"continue";if(d){var c=e.findIndex(d,function(e){return e.test(s)});-1!==c&&m[c].push(o)}else m[0].push(o)},v=0,b=e.sort(c,e.compareStringsCaseSensitive);v<b.length;v++)h(T=b[v]);if(void 0===i||0!=--i)for(var x=0,S=e.sort(_,e.compareStringsCaseSensitive);x<S.length;x++){var T=S[x],C=a(t,T),E=a(n,T);p&&!p.test(E)||f&&f.test(E)||D(C,E,i)}}}},e.ensureScriptKind=function(e,t){return t||F(e)||3},e.getScriptKindFromFileName=F,e.supportedTSExtensions=[".ts",".tsx",".d.ts"],e.supportedTSExtensionsWithJson=[".ts",".tsx",".d.ts",".json"],e.supportedTSExtensionsForExtractExtension=[".d.ts",".ts",".tsx"],e.supportedJSExtensions=[".js",".jsx"],e.supportedJSAndJsonExtensions=[".js",".jsx",".json"];var P=e.supportedTSExtensions.concat(e.supportedJSExtensions),w=e.supportedTSExtensions.concat(e.supportedJSExtensions,[".json"]);function I(t,r){var n=t&&t.allowJs;if(!r||0===r.length)return n?P:e.supportedTSExtensions;var i=(n?P:e.supportedTSExtensions).concat(e.mapDefined(r,function(e){return 7===e.scriptKind||n&&(1===(t=e.scriptKind)||2===t)?e.extension:void 0;var t}));return e.deduplicate(i,e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}function O(t,r){return t&&t.resolveJsonModule?r===P?w:r===e.supportedTSExtensions?e.supportedTSExtensionsWithJson:r.concat([".json"]):r}function M(e,t){return e<2?0:e<t.length?2:t.length}e.getSupportedExtensions=I,e.getSuppoertedExtensionsWithJsonIfResolveJsonModule=O,e.hasJSFileExtension=function(t){return e.some(e.supportedJSExtensions,function(r){return e.fileExtensionIs(t,r)})},e.hasJSOrJsonFileExtension=function(t){return e.supportedJSAndJsonExtensions.some(function(r){return e.fileExtensionIs(t,r)})},e.hasTSFileExtension=function(t){return e.some(e.supportedTSExtensions,function(r){return e.fileExtensionIs(t,r)})},e.isSupportedSourceFileName=function(t,r,n){if(!t)return!1;for(var i=0,a=O(r,I(r,n));i<a.length;i++){var o=a[i];if(e.fileExtensionIs(t,o))return!0}return!1},function(e){e[e.TypeScriptFiles=0]="TypeScriptFiles",e[e.DeclarationAndJavaScriptFiles=2]="DeclarationAndJavaScriptFiles",e[e.Highest=0]="Highest",e[e.Lowest=2]="Lowest"}(e.ExtensionPriority||(e.ExtensionPriority={})),e.getExtensionPriority=function(t,r){for(var n=r.length-1;n>=0;n--)if(e.fileExtensionIs(t,r[n]))return M(n,r);return 0},e.adjustExtensionPriority=M,e.getNextLowestExtensionPriority=function(e,t){return e<2?2:t.length};var L,R=[".d.ts",".ts",".js",".tsx",".jsx",".json"];function B(t,r){return e.fileExtensionIs(t,r)?j(t,r):void 0}function j(e,t){return e.substring(0,e.length-t.length)}function J(t,r,n,i){var a=void 0!==n&&void 0!==i?V(t,n,i):V(t);return a?t.slice(0,t.length-a.length)+(e.startsWith(r,".")?r:"."+r):t}function z(t){L.assert(e.hasZeroOrOneAsteriskCharacter(t));var r=t.indexOf("*");return-1===r?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function K(e){return".ts"===e||".tsx"===e||".d.ts"===e}function U(t){return e.find(R,function(r){return e.fileExtensionIs(t,r)})}function V(t,r,n){if(r)return function(t,r,n){"string"==typeof r&&(r=[r]);for(var i=0,a=r;i<a.length;i++){var o=a[i];if(e.startsWith(o,".")||(o="."+o),t.length>=o.length&&"."===t.charAt(t.length-o.length)){var s=t.slice(t.length-o.length);if(n(s,o))return s}}return""}(t,r,n?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive);var a=i(t),o=a.lastIndexOf(".");return o>=0?a.substring(o):""}e.removeFileExtension=function(e){for(var t=0,r=R;t<r.length;t++){var n=B(e,r[t]);if(void 0!==n)return n}return e},e.tryRemoveExtension=B,e.removeExtension=j,e.changeExtension=function(e,t){return J(e,t,R,!1)},e.changeAnyExtension=J,function(t){function r(t){var r=e.SyntaxKind;return r?r[t.kind]:t.kind.toString()}t.showSymbol=function(t){var n=e.SymbolFlags;return"{ flags: "+(n?function(e,t){for(var r=[],n=0;n<=30;n++){var i=1<<n;e&i&&r.push(t[i])}return r.join("|")}(t.flags,n):t.flags)+"; declarations: "+e.map(t.declarations,r)+" }"},t.showSyntaxKind=r}(L=e.Debug||(e.Debug={})),e.tryParsePattern=z,e.positionIsSynthesized=function(e){return!(e>=0)},e.extensionIsTS=K,e.resolutionExtensionIsTSOrJson=function(e){return K(e)||".json"===e},e.extensionFromPath=function(e){var t=U(e);return void 0!==t?t:L.fail("File "+e+" has unknown extension.")},e.isAnySupportedFileExtension=function(e){return void 0!==U(e)},e.tryGetExtensionFromPath=U,e.getAnyExtensionFromPath=V,e.isCheckJsEnabledForFile=function(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs},e.emptyFileSystemEntries={files:e.emptyArray,directories:e.emptyArray},e.matchPatternOrExact=function(t,r){for(var n=[],i=0,a=t;i<a.length;i++){var o=a[i],s=z(o);if(s)n.push(s);else if(o===r)return o}return e.findBestPatternMatch(n,function(e){return e},r)},e.sliceAfter=function(e,t){var r=e.indexOf(t);return L.assert(-1!==r),e.slice(r)},e.addRelatedInfo=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.relatedInformation||(e.relatedInformation=[]),(t=e.relatedInformation).push.apply(t,r),e},e.minAndMax=function(e,t){L.assert(0!==e.length);for(var r=t(e[0]),n=r,i=1;i<e.length;i++){var a=t(e[i]);a<r?r=a:a>n&&(n=a)}return{min:r,max:n}};var q=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getNodeId(t)),t)},t.prototype.tryAdd=function(e){return!this.has(e)&&(this.add(e),!0)},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.some=function(t){return e.forEachEntry(this.map,t)||!1},t}();e.NodeSet=q;var W=function(){function t(){this.map=e.createMap()}return t.prototype.get=function(t){var r=this.map.get(String(e.getNodeId(t)));return r&&r.value},t.prototype.getOrUpdate=function(e,t){var r=this.get(e);if(r)return r;var n=t();return this.set(e,n),n},t.prototype.set=function(t,r){this.map.set(String(e.getNodeId(t)),{node:t,value:r})},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(function(t){var r=t.node,n=t.value;return e(n,r)})},t}();e.NodeMap=W,e.rangeOfNode=function(t){return{pos:e.getTokenPosOfNode(t),end:t.end}},e.rangeOfTypeParameters=function(e){return{pos:e.pos-1,end:e.end+1}},e.skipTypeChecking=function(e,t){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib},e.isJsonEqual=function t(r,n){return r===n||"object"===f(r)&&null!==r&&"object"===f(n)&&null!==n&&e.equalOwnProperties(r,n,t)},e.getOrUpdate=function(e,t,r){var n=e.get(t);if(void 0===n){var i=r();return e.set(t,i),i}return n},e.parsePseudoBigInt=function(e){var t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:for(var r=e.length-1,n=0;48===e.charCodeAt(n);)n++;return e.slice(n,r)||"0"}for(var i=e.length-1,a=(i-2)*t,o=new Uint16Array((a>>>4)+(15&a?1:0)),s=i-1,c=0;s>=2;s--,c+=t){var u=c>>>4,l=e.charCodeAt(s),_=(l<=57?l-48:10+l-(l<=70?65:97))<<(15&c);o[u]|=_;var d=_>>>16;d&&(o[u+1]|=d)}for(var p="",f=o.length-1,m=!0;m;){var g=0;for(m=!1,u=f;u>=0;u--){var y=g<<16|o[u],h=y/10|0;o[u]=h,g=y-10*h,h&&!m&&(f=u,m=!0)}p=g+p}return p},e.pseudoBigIntToString=function(e){var t=e.negative,r=e.base10Value;return(t&&"0"!==r?"-":"")+r}}(c||(c={})),function(e){var t,r,n,i,a,o,s;function c(e,t){return t&&e(t)}function u(e,t,r){if(r){if(t)return t(r);for(var n=0,i=r;n<i.length;n++){var a=e(i[n]);if(a)return a}}}function l(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function _(t,r,n){if(t&&!(t.kind<=147))switch(t.kind){case 148:return c(r,t.left)||c(r,t.right);case 150:return c(r,t.name)||c(r,t.constraint)||c(r,t.default)||c(r,t.expression);case 276:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||c(r,t.equalsToken)||c(r,t.objectAssignmentInitializer);case 277:return c(r,t.expression);case 151:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.dotDotDotToken)||c(r,t.name)||c(r,t.questionToken)||c(r,t.type)||c(r,t.initializer);case 154:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||c(r,t.type)||c(r,t.initializer);case 153:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.type)||c(r,t.initializer);case 275:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.initializer);case 237:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.exclamationToken)||c(r,t.type)||c(r,t.initializer);case 186:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.dotDotDotToken)||c(r,t.propertyName)||c(r,t.name)||c(r,t.initializer);case 165:case 166:case 160:case 161:case 162:return u(r,n,t.decorators)||u(r,n,t.modifiers)||u(r,n,t.typeParameters)||u(r,n,t.parameters)||c(r,t.type);case 156:case 155:case 157:case 158:case 159:case 196:case 239:case 197:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.asteriskToken)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||u(r,n,t.typeParameters)||u(r,n,t.parameters)||c(r,t.type)||c(r,t.equalsGreaterThanToken)||c(r,t.body);case 164:return c(r,t.typeName)||u(r,n,t.typeArguments);case 163:return c(r,t.parameterName)||c(r,t.type);case 167:return c(r,t.exprName);case 168:return u(r,n,t.members);case 169:return c(r,t.elementType);case 170:return u(r,n,t.elementTypes);case 173:case 174:return u(r,n,t.types);case 175:return c(r,t.checkType)||c(r,t.extendsType)||c(r,t.trueType)||c(r,t.falseType);case 176:return c(r,t.typeParameter);case 183:return c(r,t.argument)||c(r,t.qualifier)||u(r,n,t.typeArguments);case 177:case 179:return c(r,t.type);case 180:return c(r,t.objectType)||c(r,t.indexType);case 181:return c(r,t.readonlyToken)||c(r,t.typeParameter)||c(r,t.questionToken)||c(r,t.type);case 182:return c(r,t.literal);case 184:case 185:case 187:return u(r,n,t.elements);case 188:return u(r,n,t.properties);case 189:return c(r,t.expression)||c(r,t.name);case 190:return c(r,t.expression)||c(r,t.argumentExpression);case 191:case 192:return c(r,t.expression)||u(r,n,t.typeArguments)||u(r,n,t.arguments);case 193:return c(r,t.tag)||u(r,n,t.typeArguments)||c(r,t.template);case 194:return c(r,t.type)||c(r,t.expression);case 195:case 198:case 199:case 200:return c(r,t.expression);case 202:return c(r,t.operand);case 207:return c(r,t.asteriskToken)||c(r,t.expression);case 201:return c(r,t.expression);case 203:return c(r,t.operand);case 204:return c(r,t.left)||c(r,t.operatorToken)||c(r,t.right);case 212:return c(r,t.expression)||c(r,t.type);case 213:return c(r,t.expression);case 214:return c(r,t.name);case 205:return c(r,t.condition)||c(r,t.questionToken)||c(r,t.whenTrue)||c(r,t.colonToken)||c(r,t.whenFalse);case 208:return c(r,t.expression);case 218:case 245:return u(r,n,t.statements);case 284:return u(r,n,t.statements)||c(r,t.endOfFileToken);case 219:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.declarationList);case 238:return u(r,n,t.declarations);case 221:return c(r,t.expression);case 222:return c(r,t.expression)||c(r,t.thenStatement)||c(r,t.elseStatement);case 223:return c(r,t.statement)||c(r,t.expression);case 224:return c(r,t.expression)||c(r,t.statement);case 225:return c(r,t.initializer)||c(r,t.condition)||c(r,t.incrementor)||c(r,t.statement);case 226:return c(r,t.initializer)||c(r,t.expression)||c(r,t.statement);case 227:return c(r,t.awaitModifier)||c(r,t.initializer)||c(r,t.expression)||c(r,t.statement);case 228:case 229:return c(r,t.label);case 230:return c(r,t.expression);case 231:return c(r,t.expression)||c(r,t.statement);case 232:return c(r,t.expression)||c(r,t.caseBlock);case 246:return u(r,n,t.clauses);case 271:return c(r,t.expression)||u(r,n,t.statements);case 272:return u(r,n,t.statements);case 233:return c(r,t.label)||c(r,t.statement);case 234:return c(r,t.expression);case 235:return c(r,t.tryBlock)||c(r,t.catchClause)||c(r,t.finallyBlock);case 274:return c(r,t.variableDeclaration)||c(r,t.block);case 152:return c(r,t.expression);case 240:case 209:case 241:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.typeParameters)||u(r,n,t.heritageClauses)||u(r,n,t.members);case 242:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.typeParameters)||c(r,t.type);case 243:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.members);case 278:return c(r,t.name)||c(r,t.initializer);case 244:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.body);case 248:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.moduleReference);case 249:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.importClause)||c(r,t.moduleSpecifier);case 250:return c(r,t.name)||c(r,t.namedBindings);case 247:case 251:return c(r,t.name);case 252:case 256:return u(r,n,t.elements);case 255:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.exportClause)||c(r,t.moduleSpecifier);case 253:case 257:return c(r,t.propertyName)||c(r,t.name);case 254:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.expression);case 206:return c(r,t.head)||u(r,n,t.templateSpans);case 216:return c(r,t.expression)||c(r,t.literal);case 149:return c(r,t.expression);case 273:return u(r,n,t.types);case 211:return c(r,t.expression)||u(r,n,t.typeArguments);case 259:return c(r,t.expression);case 258:return u(r,n,t.decorators);case 314:return u(r,n,t.elements);case 260:return c(r,t.openingElement)||u(r,n,t.children)||c(r,t.closingElement);case 264:return c(r,t.openingFragment)||u(r,n,t.children)||c(r,t.closingFragment);case 261:case 262:return c(r,t.tagName)||u(r,n,t.typeArguments)||c(r,t.attributes);case 268:return u(r,n,t.properties);case 267:return c(r,t.name)||c(r,t.initializer);case 269:return c(r,t.expression);case 270:return c(r,t.dotDotDotToken)||c(r,t.expression);case 263:return c(r,t.tagName);case 171:case 172:case 288:case 292:case 291:case 293:case 295:return c(r,t.type);case 294:return u(r,n,t.parameters)||c(r,t.type);case 296:return u(r,n,t.tags);case 304:case 310:return c(r,t.tagName)||(t.isNameFirst?c(r,t.name)||c(r,t.typeExpression):c(r,t.typeExpression)||c(r,t.name));case 300:return c(r,t.tagName)||c(r,t.class);case 308:return c(r,t.tagName)||c(r,t.constraint)||u(r,n,t.typeParameters);case 309:return c(r,t.tagName)||(t.typeExpression&&288===t.typeExpression.kind?c(r,t.typeExpression)||c(r,t.fullName):c(r,t.fullName)||c(r,t.typeExpression));case 302:return c(r,t.tagName)||c(r,t.fullName)||c(r,t.typeExpression);case 305:case 307:case 306:case 303:return c(r,t.tagName)||c(r,t.typeExpression);case 298:return e.forEach(t.typeParameters,r)||e.forEach(t.parameters,r)||c(r,t.type);case 297:return e.forEach(t.jsDocPropertyTags,r);case 299:case 301:return c(r,t.tagName);case 313:return c(r,t.expression)}}function d(t){return e.fileExtensionIs(t,".d.ts")}function p(t,r){for(var n=e.createScanner(t.languageVersion,!1,0,r),i=[];;){var a=n.scan();if(!e.isTrivia(a))break;var o={kind:n.getToken(),pos:n.getTokenPos(),end:n.getTextPos()};v(i,o,r.substring(o.pos,o.end))}t.pragmas=e.createMap();for(var s=0,c=i;s<c.length;s++){var u=c[s];if(t.pragmas.has(u.name)){var l=t.pragmas.get(u.name);l instanceof Array?l.push(u.args):t.pragmas.set(u.name,[l,u.args])}else t.pragmas.set(u.name,u.args)}}function f(t,r){t.checkJsDirective=void 0,t.referencedFiles=[],t.typeReferenceDirectives=[],t.libReferenceDirectives=[],t.amdDependencies=[],t.hasNoDefaultLib=!1,t.pragmas.forEach(function(n,i){switch(i){case"reference":var a=t.referencedFiles,o=t.typeReferenceDirectives,s=t.libReferenceDirectives;e.forEach(e.toArray(n),function(n){var i=n.arguments,c=i.types,u=i.lib,l=i.path;n.arguments["no-default-lib"]?t.hasNoDefaultLib=!0:c?o.push({pos:c.pos,end:c.end,fileName:c.value}):u?s.push({pos:u.pos,end:u.end,fileName:u.value}):l?a.push({pos:l.pos,end:l.end,fileName:l.value}):r(n.range.pos,n.range.end-n.range.pos,e.Diagnostics.Invalid_reference_directive_syntax)});break;case"amd-dependency":t.amdDependencies=e.map(e.toArray(n),function(e){return{name:e.arguments.name,path:e.arguments.path}});break;case"amd-module":if(n instanceof Array)for(var c=0,u=n;c<u.length;c++){var l=u[c];t.moduleName&&r(l.range.pos,l.range.end-l.range.pos,e.Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments),t.moduleName=l.arguments.name}else t.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":e.forEach(e.toArray(n),function(e){(!t.checkJsDirective||e.range.pos>t.checkJsDirective.pos)&&(t.checkJsDirective={enabled:"ts-check"===i,end:e.range.end,pos:e.range.pos})});break;case"jsx":return;default:e.Debug.fail("Unhandled pragma kind")}})}!function(e){e[e.None=0]="None",e[e.Yield=1]="Yield",e[e.Await=2]="Await",e[e.Type=4]="Type",e[e.IgnoreMissingOpenBrace=16]="IgnoreMissingOpenBrace",e[e.JSDoc=32]="JSDoc"}(t||(t={})),e.createNode=function(t,o,s){return 284===t?new(a||(a=e.objectAllocator.getSourceFileConstructor()))(t,o,s):72===t?new(i||(i=e.objectAllocator.getIdentifierConstructor()))(t,o,s):e.isNodeKind(t)?new(r||(r=e.objectAllocator.getNodeConstructor()))(t,o,s):new(n||(n=e.objectAllocator.getTokenConstructor()))(t,o,s)},e.isJSDocLikeText=l,e.forEachChild=_,e.createSourceFile=function(t,r,n,i,a){var s;return void 0===i&&(i=!1),e.performance.mark("beforeParse"),s=100===n?o.parseSourceFile(t,r,n,void 0,i,6):o.parseSourceFile(t,r,n,void 0,i,a),e.performance.mark("afterParse"),e.performance.measure("Parse","beforeParse","afterParse"),s},e.parseIsolatedEntityName=function(e,t){return o.parseIsolatedEntityName(e,t)},e.parseJsonText=function(e,t){return o.parseJsonText(e,t)},e.isExternalModule=function(e){return void 0!==e.externalModuleIndicator},e.updateSourceFile=function(e,t,r,n){void 0===n&&(n=!1);var i=s.updateSourceFile(e,t,r,n);return i.flags|=1572864&e.flags,i},e.parseIsolatedJSDocComment=function(e,t,r){var n=o.JSDocParser.parseIsolatedJSDocComment(e,t,r);return n&&n.jsDoc&&o.fixupParentReferences(n.jsDoc),n},e.parseJSDocTypeExpressionForTests=function(e,t,r){return o.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)},function(t){var r,n,i,a,o,s,c,u,m,g,y,h,v,b,x,S,T,C=e.createScanner(7,!0),E=10240,k=!1;function N(t,r,n,i,a){void 0===n&&(n=2),F(r,n,i,6),(o=M(t,2,6,!1)).flags=b,ne();var c=te();if(1===re())o.statements=De([],c,c),o.endOfFileToken=ge();else{var u=ve(221);switch(re()){case 22:u.expression=Ar();break;case 102:case 87:case 96:u.expression=ge();break;case 39:ue(function(){return 8===ne()&&57!==ne()})?u.expression=ur():u.expression=Pr();break;case 8:case 10:if(ue(function(){return 57!==ne()})){u.expression=nt();break}default:u.expression=Pr()}xe(u),o.statements=De([u],c),o.endOfFileToken=me(1,e.Diagnostics.Unexpected_token)}a&&O(o),o.parseDiagnostics=s;var l=o;return P(),l}function A(e){return 4===e||2===e||1===e||6===e?1:0}function F(t,o,u,l){switch(r=e.objectAllocator.getNodeConstructor(),n=e.objectAllocator.getTokenConstructor(),i=e.objectAllocator.getIdentifierConstructor(),a=e.objectAllocator.getSourceFileConstructor(),m=t,c=u,s=[],v=0,y=e.createMap(),h=0,g=0,l){case 1:case 2:b=65536;break;case 6:b=16842752;break;default:b=0}k=!1,C.setText(m),C.setOnError(ee),C.setScriptTarget(o),C.setLanguageVariant(A(l))}function P(){C.setText(""),C.setOnError(void 0),s=void 0,o=void 0,y=void 0,c=void 0,m=void 0}function w(t,r,n,i){var a=d(t);return a&&(b|=4194304),(o=M(t,r,i,a)).flags=b,ne(),p(o,m),f(o,function(t,r,n){s.push(e.createFileDiagnostic(o,t,r,n))}),o.statements=qe(0,Gr),e.Debug.assert(1===re()),o.endOfFileToken=I(ge()),function(t){t.externalModuleIndicator=e.forEach(t.statements,Ln)||function(e){return 1048576&e.flags?Rn(e):void 0}(t)}(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s,n&&O(o),o}function I(t){e.Debug.assert(!t.jsDoc);var r=e.mapDefined(e.getJSDocCommentRanges(t,o.text),function(e){return T.parseJSDocComment(t,e.pos,e.end-e.pos)});return r.length&&(t.jsDoc=r),t}function O(t){var r=t;return void _(t,function t(n){if(n.parent!==r){n.parent=r;var i=r;if(r=n,_(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a<o.length;a++){var s=o[a];s.parent=n,r=s,_(s,t)}r=i}})}function M(t,r,n,i){var o=new a(284,0,m.length);return g++,o.text=m,o.bindDiagnostics=[],o.bindSuggestionDiagnostics=void 0,o.languageVersion=r,o.fileName=e.normalizePath(t),o.languageVariant=A(n),o.isDeclarationFile=i,o.scriptKind=n,o}function L(e,t){e?b|=t:b&=~t}function R(e){L(e,2048)}function B(e){L(e,4096)}function j(e){L(e,8192)}function J(e){L(e,16384)}function z(e,t){var r=e&b;if(r){L(!1,r);var n=t();return L(!0,r),n}return t()}function K(e,t){var r=e&~b;if(r){L(!0,r);var n=t();return L(!1,r),n}return t()}function U(e){return z(2048,e)}function V(e){return K(16384,e)}function q(e){return 0!=(b&e)}function W(){return q(4096)}function H(){return q(2048)}function G(){return q(8192)}function Y(){return q(16384)}function X(e,t){$(C.getTokenPos(),C.getTextPos(),e,t)}function Q(t,r,n,i){var a=e.lastOrUndefined(s);a&&t===a.start||s.push(e.createFileDiagnostic(o,t,r,n,i)),k=!0}function $(e,t,r,n){Q(e,t-e,r,n)}function Z(e,t,r){$(e.pos,e.end,t,r)}function ee(e,t){Q(C.getTextPos(),t,e)}function te(){return C.getStartPos()}function re(){return u}function ne(){return u=C.scan()}function ie(){return u=C.reScanGreaterToken()}function ae(){return u=C.reScanLessThanToken()}function oe(){return u=C.scanJsxIdentifier()}function se(){return u=C.scanJsxToken()}function ce(t,r){var n=u,i=s.length,a=k,o=b,c=r?C.lookAhead(t):C.tryScan(t);return e.Debug.assert(o===b),c&&!r||(u=n,s.length=i,k=a),c}function ue(e){return ce(e,!0)}function le(e){return ce(e,!1)}function _e(){return 72===re()||(117!==re()||!W())&&((122!==re()||!Y())&&re()>108)}function de(t,r,n){return void 0===n&&(n=!0),re()===t?(n&&ne(),!0):(r?X(r):X(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function pe(e){return re()===e&&(ne(),!0)}function fe(e){if(re()===e)return ge()}function me(t,r,n){return fe(t)||Se(t,!1,r||e.Diagnostics._0_expected,n||e.tokenToString(t))}function ge(){var e=ve(re());return ne(),xe(e)}function ye(){return 26===re()||(19===re()||1===re()||C.hasPrecedingLineBreak())}function he(){return ye()?(26===re()&&ne(),!0):de(26)}function ve(t,a){g++;var o=a>=0?a:C.getStartPos();return e.isNodeKind(t)||0===t?new r(t,o,o):72===t?new i(t,o,o):new n(t,o,o)}function be(e,t){var r=ve(e,t);return 2&C.getTokenFlags()&&I(r),r}function De(e,t,r){var n=e.length,i=n>=1&&n<=4?e.slice():e;return i.pos=t,i.end=void 0===r?C.getStartPos():r,i}function xe(e,t){return e.end=void 0===t?C.getStartPos():t,b&&(e.flags|=b),k&&(k=!1,e.flags|=32768),e}function Se(t,r,n,i){r?Q(C.getStartPos(),0,n,i):n&&X(n,i);var a=ve(t);return 72===t?a.escapedText="":(e.isLiteralKind(t)||e.isTemplateLiteralKind(t))&&(a.text=""),xe(a)}function Te(e){var t=y.get(e);return void 0===t&&y.set(e,t=e),t}function Ce(t,r){if(h++,t){var n=ve(72);return 72!==re()&&(n.originalKeywordKind=re()),n.escapedText=e.escapeLeadingUnderscores(Te(C.getTokenValue())),ne(),xe(n)}return Se(72,1===re(),r||e.Diagnostics.Identifier_expected)}function Ee(e){return Ce(_e(),e)}function ke(t){return Ce(e.tokenIsIdentifierOrKeyword(re()),t)}function Ne(){return e.tokenIsIdentifierOrKeyword(re())||10===re()||8===re()}function Ae(e){if(10===re()||8===re()){var t=nt();return t.text=Te(t.text),t}return e&&22===re()?function(){var e=ve(149);return de(22),e.expression=U(Yt),de(23),xe(e)}():ke()}function Fe(){return Ae(!0)}function Pe(e){return re()===e&&le(Ie)}function we(){return ne(),!C.hasPrecedingLineBreak()&&Oe()}function Ie(){switch(re()){case 77:return 84===ne();case 85:return ne(),80===re()?ue(Me):40!==re()&&119!==re()&&18!==re()&&Oe();case 80:return Me();case 116:case 126:case 137:return ne(),Oe();default:return we()}}function Oe(){return 22===re()||18===re()||40===re()||25===re()||Ne()}function Me(){return ne(),76===re()||90===re()||110===re()||118===re()&&ue(zr)||121===re()&&ue(Kr)}function Le(t,r){if(He(t))return!0;switch(t){case 0:case 1:case 3:return!(26===re()&&r)&&Wr();case 2:return 74===re()||80===re();case 4:return ue(bt);case 5:return ue(fn)||26===re()&&!r;case 6:return 22===re()||Ne();case 12:switch(re()){case 22:case 40:case 25:case 24:return!0;default:return Ne()}case 18:return Ne();case 9:return 22===re()||25===re()||Ne();case 7:return 18===re()?ue(Re):r?_e()&&!ze():Ht()&&!ze();case 8:return rn();case 10:return 27===re()||25===re()||rn();case 19:return _e();case 15:switch(re()){case 27:case 24:return!0}case 11:return 25===re()||Gt();case 16:return dt(!1);case 17:return dt(!0);case 20:case 21:return 27===re()||Mt();case 22:return Cn();case 23:return e.tokenIsIdentifierOrKeyword(re());case 13:return e.tokenIsIdentifierOrKeyword(re())||18===re();case 14:return!0}return e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function Re(){if(e.Debug.assert(18===re()),19===ne()){var t=ne();return 27===t||18===t||86===t||109===t}return!0}function Be(){return ne(),_e()}function je(){return ne(),e.tokenIsIdentifierOrKeyword(re())}function Je(){return ne(),e.tokenIsIdentifierOrKeywordOrGreaterThan(re())}function ze(){return(109===re()||86===re())&&ue(Ke)}function Ke(){return ne(),Gt()}function Ue(){return ne(),Mt()}function Ve(e){if(1===re())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:return 19===re();case 3:return 19===re()||74===re()||80===re();case 7:return 18===re()||86===re()||109===re();case 8:return function(){if(ye())return!0;if(ar(re()))return!0;if(37===re())return!0;return!1}();case 19:return 30===re()||20===re()||18===re()||86===re()||109===re();case 11:return 21===re()||26===re();case 15:case 21:case 10:return 23===re();case 17:case 16:case 18:return 21===re()||23===re();case 20:return 27!==re();case 22:return 18===re()||19===re();case 13:return 30===re()||42===re();case 14:return 28===re()&&ue(Fn);default:return!1}}function qe(e,t){var r=v;v|=1<<e;for(var n=[],i=te();!Ve(e);)if(Le(e,!1)){var a=We(e,t);n.push(a)}else if(Ge(e))break;return v=r,De(n,i)}function We(e,t){var r=He(e);return r?function(e){return C.setTextPos(e.end),ne(),e}(r):t()}function He(t){if(c&&function(e){switch(e){case 5:case 2:case 0:case 1:case 3:case 6:case 4:case 8:case 17:case 16:return!0}return!1}(t)&&!k){var r=c.currentNode(C.getStartPos());if(!(e.nodeIsMissing(r)||r.intersectsChange||e.containsParseError(r)))if((12679168&r.flags)===b&&function(e,t){switch(t){case 5:return function(e){if(e)switch(e.kind){case 157:case 162:case 158:case 159:case 154:case 217:return!0;case 156:var t=e,r=72===t.name.kind&&124===t.name.originalKeywordKind;return!r}return!1}(e);case 2:return function(e){if(e)switch(e.kind){case 271:case 272:return!0}return!1}(e);case 0:case 1:case 3:return function(e){if(e)switch(e.kind){case 239:case 219:case 218:case 222:case 221:case 234:case 230:case 232:case 229:case 228:case 226:case 227:case 225:case 224:case 231:case 220:case 235:case 233:case 223:case 236:case 249:case 248:case 255:case 254:case 244:case 240:case 241:case 243:case 242:return!0}return!1}(e);case 6:return function(e){return 278===e.kind}(e);case 4:return function(e){if(e)switch(e.kind){case 161:case 155:case 162:case 153:case 160:return!0}return!1}(e);case 8:return function(e){if(237!==e.kind)return!1;return void 0===e.initializer}(e);case 17:case 16:return function(e){if(151!==e.kind)return!1;return void 0===e.initializer}(e)}return!1}(r,t))return r.jsDocCache&&(r.jsDocCache=void 0),r}}function Ge(t){return X(function(t){switch(t){case 0:case 1:return e.Diagnostics.Declaration_or_statement_expected;case 2:return e.Diagnostics.case_or_default_expected;case 3:return e.Diagnostics.Statement_expected;case 18:case 4:return e.Diagnostics.Property_or_signature_expected;case 5:return e.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected;case 6:return e.Diagnostics.Enum_member_expected;case 7:return e.Diagnostics.Expression_expected;case 8:return e.Diagnostics.Variable_declaration_expected;case 9:return e.Diagnostics.Property_destructuring_pattern_expected;case 10:return e.Diagnostics.Array_element_destructuring_pattern_expected;case 11:return e.Diagnostics.Argument_expression_expected;case 12:return e.Diagnostics.Property_assignment_expected;case 15:return e.Diagnostics.Expression_or_comma_expected;case 17:case 16:return e.Diagnostics.Parameter_declaration_expected;case 19:return e.Diagnostics.Type_parameter_declaration_expected;case 20:return e.Diagnostics.Type_argument_expected;case 21:return e.Diagnostics.Type_expected;case 22:return e.Diagnostics.Unexpected_token_expected;case 23:case 13:case 14:return e.Diagnostics.Identifier_expected;default:return}}(t)),!!function(){for(var e=0;e<24;e++)if(v&1<<e&&(Le(e,!0)||Ve(e)))return!0;return!1}()||(ne(),!1)}function Ye(e,t,r){var n=v;v|=1<<e;for(var i=[],a=te(),o=-1;;)if(Le(e,!1)){var s=C.getStartPos();if(i.push(We(e,t)),o=C.getTokenPos(),pe(27))continue;if(o=-1,Ve(e))break;de(27),r&&26===re()&&!C.hasPrecedingLineBreak()&&ne(),s===C.getStartPos()&&ne()}else{if(Ve(e))break;if(Ge(e))break}v=n;var c=De(i,a);return o>=0&&(c.hasTrailingComma=!0),c}function Xe(){var e=De([],te());return e.isMissingList=!0,e}function Qe(e,t,r,n){if(de(r)){var i=Ye(e,t);return de(n),i}return Xe()}function $e(e,t){for(var r=e?ke(t):Ee(t),n=C.getStartPos();pe(24);){if(28===re()){r.jsdocDotPos=n;break}n=C.getStartPos(),r=Ze(r,et(e))}return r}function Ze(e,t){var r=ve(148,e.pos);return r.left=e,r.right=t,xe(r)}function et(t){if(C.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(re())&&ue(Jr))return Se(72,!0,e.Diagnostics.Identifier_expected);return t?ke():Ee()}function tt(){var t,r=ve(206);r.head=(t=it(re()),e.Debug.assert(15===t.kind,"Template head has wrong token kind"),t),e.Debug.assert(15===r.head.kind,"Template head has wrong token kind");var n=[],i=te();do{n.push(rt())}while(16===e.last(n).literal.kind);return r.templateSpans=De(n,i),xe(r)}function rt(){var t,r,n=ve(216);return n.expression=U(Yt),19===re()?(u=C.reScanTemplateToken(),r=it(re()),e.Debug.assert(16===r.kind||17===r.kind,"Template fragment has wrong token kind"),t=r):t=me(17,e.Diagnostics._0_expected,e.tokenToString(19)),n.literal=t,xe(n)}function nt(){return it(re())}function it(e){var t=ve(e);return t.text=C.getTokenValue(),C.hasExtendedUnicodeEscape()&&(t.hasExtendedUnicodeEscape=!0),C.isUnterminated()&&(t.isUnterminated=!0),8===t.kind&&(t.numericLiteralFlags=1008&C.getTokenFlags()),ne(),xe(t),t}function at(){var t=ve(164);return t.typeName=$e(!0,e.Diagnostics.Type_expected),C.hasPrecedingLineBreak()||28!==ae()||(t.typeArguments=Qe(20,Vt,28,30)),xe(t)}function ot(e){var t=ve(289);return e?Rt(293,t):(ne(),xe(t))}function st(){var e=ve(151);return 100!==re()&&95!==re()||(e.name=ke(),de(57)),e.type=ct(),xe(e)}function ct(){C.setInJSDocType(!0);var e=fe(25),t=Kt();if(C.setInJSDocType(!1),e){var r=ve(295,e.pos);r.type=t,t=xe(r)}return 59===re()?Rt(293,t):t}function ut(){var e=ve(150);return e.name=Ee(),pe(86)&&(Mt()||!Gt()?e.constraint=Vt():e.expression=lr()),pe(59)&&(e.default=Vt()),xe(e)}function lt(){if(28===re())return Qe(19,ut,28,30)}function _t(){if(pe(57))return Vt()}function dt(t){return 25===re()||rn()||e.isModifierKind(re())||58===re()||Mt(!t)}function pt(){var t=be(151);return 100===re()?(t.name=Ce(!0),t.type=_t(),xe(t)):(t.decorators=mn(),t.modifiers=gn(),t.dotDotDotToken=fe(25),t.name=nn(),0===e.getFullWidth(t.name)&&!e.hasModifiers(t)&&e.isModifierKind(re())&&ne(),t.questionToken=fe(56),t.type=_t(),t.initializer=Xt(),xe(t))}function ft(t,r,n){32&r||(n.typeParameters=lt());var i=function(e,t){if(!de(20))return e.parameters=Xe(),!1;var r=W(),n=Y();return B(!!(1&t)),J(!!(2&t)),e.parameters=32&t?Ye(17,st):Ye(16,pt),B(r),J(n),de(21)}(n,r);return(!function(t,r){if(37===t)return de(t),!0;if(pe(57))return!0;if(r&&37===re())return X(e.Diagnostics._0_expected,e.tokenToString(57)),ne(),!0;return!1}(t,!!(4&r))||(n.type=Kt(),!function t(r){switch(r.kind){case 164:return e.nodeIsMissing(r.typeName);case 165:case 166:var n=r,i=n.parameters,a=n.type;return!!i.isMissingList||t(a);case 177:return t(r.type);default:return!1}}(n.type)))&&i}function mt(){pe(27)||he()}function gt(e){var t=be(e);return 161===e&&de(95),ft(57,4,t),mt(),xe(t)}function yt(){return 22===re()&&ue(ht)}function ht(){if(ne(),25===re()||23===re())return!0;if(e.isModifierKind(re())){if(ne(),_e())return!0}else{if(!_e())return!1;ne()}return 57===re()||27===re()||56===re()&&(ne(),57===re()||27===re()||23===re())}function vt(e){return e.kind=162,e.parameters=Qe(16,pt,22,23),e.type=Wt(),mt(),xe(e)}function bt(){if(20===re()||28===re())return!0;for(var t=!1;e.isModifierKind(re());)t=!0,ne();return 22===re()||(Ne()&&(t=!0,ne()),!!t&&(20===re()||28===re()||56===re()||57===re()||27===re()||ye()))}function Dt(){if(20===re()||28===re())return gt(160);if(95===re()&&ue(xt))return gt(161);var e=be(0);return e.modifiers=gn(),yt()?vt(e):function(e){return e.name=Fe(),e.questionToken=fe(56),20===re()||28===re()?(e.kind=155,ft(57,4,e)):(e.kind=153,e.type=Wt(),59===re()&&(e.initializer=Xt())),mt(),xe(e)}(e)}function xt(){return ne(),20===re()||28===re()}function St(){return 24===ne()}function Tt(){switch(ne()){case 20:case 28:case 24:return!0}return!1}function Ct(){var e;return de(18)?(e=qe(4,Dt),de(19)):e=Xe(),e}function Et(){return ne(),38===re()||39===re()?133===ne():(133===re()&&ne(),22===re()&&Be()&&93===ne())}function kt(){var e=ve(181);return de(18),133!==re()&&38!==re()&&39!==re()||(e.readonlyToken=ge(),133!==e.readonlyToken.kind&&me(133)),de(22),e.typeParameter=function(){var e=ve(150);return e.name=Ee(),de(93),e.constraint=Vt(),xe(e)}(),de(23),56!==re()&&38!==re()&&39!==re()||(e.questionToken=ge(),56!==e.questionToken.kind&&me(56)),e.type=Wt(),he(),de(19),xe(e)}function Nt(){var e=te();if(pe(25)){var t=ve(172,e);return t.type=Vt(),xe(t)}var r=Vt();return 2097152&b||291!==r.kind||r.pos!==r.type.pos||(r.kind=171),r}function At(){var e=ge();return 24===re()?void 0:e}function Ft(e){var t,r=ve(182);e&&((t=ve(202)).operator=39,ne());var n=102===re()||87===re()?ge():it(re());return e&&(t.operand=n,xe(t),n=t),r.literal=n,xe(r)}function Pt(){return ne(),92===re()}function wt(){o.flags|=524288;var t=ve(183);return pe(104)&&(t.isTypeOf=!0),de(92),de(20),t.argument=Vt(),de(21),pe(24)&&(t.qualifier=$e(!0,e.Diagnostics.Type_expected)),t.typeArguments=Tn(),xe(t)}function It(){return ne(),8===re()||9===re()}function Ot(){switch(re()){case 120:case 143:case 138:case 135:case 146:case 139:case 123:case 141:case 132:case 136:return le(At)||at();case 40:return ot(!1);case 62:return ot(!0);case 56:return n=C.getStartPos(),ne(),27===re()||19===re()||21===re()||30===re()||59===re()||50===re()?xe(r=ve(290,n)):((r=ve(291,n)).type=Vt(),xe(r));case 90:return function(){if(ue(An)){var e=be(294);return ne(),ft(57,36,e),xe(e)}var t=ve(164);return t.typeName=ke(),xe(t)}();case 52:return function(){var e=ve(292);return ne(),e.type=Ot(),xe(e)}();case 14:case 10:case 8:case 9:case 102:case 87:return Ft();case 39:return ue(It)?Ft(!0):at();case 106:case 96:return ge();case 100:var e=(t=ve(178),ne(),xe(t));return 128!==re()||C.hasPrecedingLineBreak()?e:function(e){ne();var t=ve(163,e.pos);return t.parameterName=e,t.type=Vt(),xe(t)}(e);case 104:return ue(Pt)?wt():function(){var e=ve(167);return de(104),e.exprName=$e(!0),xe(e)}();case 18:return ue(Et)?kt():function(){var e=ve(168);return e.members=Ct(),xe(e)}();case 22:return function(){var e=ve(170);return e.elementTypes=Qe(21,Nt,22,23),xe(e)}();case 20:return function(){var e=ve(177);return de(20),e.type=Vt(),de(21),xe(e)}();case 92:return wt();default:return at()}var t,r,n}function Mt(e){switch(re()){case 120:case 143:case 138:case 135:case 146:case 123:case 133:case 139:case 142:case 106:case 141:case 96:case 100:case 104:case 132:case 18:case 22:case 28:case 50:case 49:case 95:case 10:case 8:case 9:case 102:case 87:case 136:case 40:case 56:case 52:case 25:case 127:case 92:return!0;case 90:return!e;case 39:return!e&&ue(It);case 20:return!e&&ue(Lt);default:return _e()}}function Lt(){return ne(),21===re()||dt(!1)||Mt()}function Rt(e,t){ne();var r=ve(e,t.pos);return r.type=t,xe(r)}function Bt(){var e=re();switch(e){case 129:case 142:case 133:return function(e){var t=ve(179);return de(e),t.operator=e,t.type=Bt(),xe(t)}(e);case 127:return function(){var e=ve(176);de(127);var t=ve(150);return t.name=Ee(),e.typeParameter=xe(t),xe(e)}()}return function(){for(var e=Ot();!C.hasPrecedingLineBreak();)switch(re()){case 52:e=Rt(292,e);break;case 56:if(!(2097152&b)&&ue(Ue))return e;e=Rt(291,e);break;case 22:var t;de(22),Mt()?((t=ve(180,e.pos)).objectType=e,t.indexType=Vt(),de(23),e=xe(t)):((t=ve(169,e.pos)).elementType=e,de(23),e=xe(t));break;default:return e}return e}()}function jt(e,t,r){pe(r);var n=t();if(re()===r){for(var i=[n];pe(r);)i.push(t());var a=ve(e,n.pos);a.types=De(i,n.pos),n=xe(a)}return n}function Jt(){return jt(174,Bt,49)}function zt(){if(ne(),21===re()||25===re())return!0;if(function(){if(e.isModifierKind(re())&&gn(),_e()||100===re())return ne(),!0;if(22===re()||18===re()){var t=s.length;return nn(),t===s.length}return!1}()){if(57===re()||27===re()||56===re()||59===re())return!0;if(21===re()&&(ne(),37===re()))return!0}return!1}function Kt(){var e=_e()&&le(Ut),t=Vt();if(e){var r=ve(163,e.pos);return r.parameterName=e,r.type=t,xe(r)}return t}function Ut(){var e=Ee();if(128===re()&&!C.hasPrecedingLineBreak())return ne(),e}function Vt(){return z(20480,qt)}function qt(e){if(28===re()||20===re()&&ue(zt)||95===re())return function(){var e=te(),t=be(pe(95)?166:165,e);return ft(37,4,t),xe(t)}();var t=jt(173,Jt,50);if(!e&&!C.hasPrecedingLineBreak()&&pe(86)){var r=ve(175,t.pos);return r.checkType=t,r.extendsType=qt(!0),de(56),r.trueType=qt(),de(57),r.falseType=qt(),xe(r)}return t}function Wt(){return pe(57)?Vt():void 0}function Ht(){switch(re()){case 100:case 98:case 96:case 102:case 87:case 8:case 9:case 10:case 14:case 15:case 20:case 22:case 18:case 90:case 76:case 95:case 42:case 64:case 72:return!0;case 92:return ue(Tt);default:return _e()}}function Gt(){if(Ht())return!0;switch(re()){case 38:case 39:case 53:case 52:case 81:case 104:case 106:case 44:case 45:case 28:case 122:case 117:return!0;default:return!!function(){if(H()&&93===re())return!1;return e.getBinaryOperatorPrecedence(re())>0}()||_e()}}function Yt(){var e=G();e&&j(!1);for(var t,r=Qt();t=fe(27);)r=sr(r,t,Qt());return e&&j(!0),r}function Xt(){return pe(59)?Qt():void 0}function Qt(){if(function(){if(117===re())return!!W()||ue(Ur);return!1}())return t=ve(207),ne(),C.hasPrecedingLineBreak()||40!==re()&&!Gt()?xe(t):(t.asteriskToken=fe(40),t.expression=Qt(),xe(t));var t,r=function(){var t=function(){if(20===re()||28===re()||121===re())return ue(Zt);if(37===re())return 1;return 0}();if(0===t)return;var r=1===t?rr(!0):le(er);if(!r)return;var n=e.hasModifier(r,256),i=re();return r.equalsGreaterThanToken=me(37),r.body=37===i||18===i?nr(n):Ee(),xe(r)}()||function(){if(121===re()&&1===ue(tr)){var e=yn(),t=ir(0);return $t(t,e)}return}();if(r)return r;var n=ir(0);return 72===n.kind&&37===re()?$t(n):e.isLeftHandSideExpression(n)&&e.isAssignmentOperator(ie())?sr(n,ge(),Qt()):function(t){var r=fe(56);if(!r)return t;var n=ve(205,t.pos);return n.condition=t,n.questionToken=r,n.whenTrue=z(E,Qt),n.colonToken=me(57),n.whenFalse=e.nodeIsPresent(n.colonToken)?Qt():Se(72,!1,e.Diagnostics._0_expected,e.tokenToString(57)),xe(n)}(n)}function $t(t,r){var n;e.Debug.assert(37===re(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>"),r?(n=ve(197,r.pos)).modifiers=r:n=ve(197,t.pos);var i=ve(151,t.pos);return i.name=t,xe(i),n.parameters=De([i],i.pos,i.end),n.equalsGreaterThanToken=me(37),n.body=nr(!!r),I(xe(n))}function Zt(){if(121===re()){if(ne(),C.hasPrecedingLineBreak())return 0;if(20!==re()&&28!==re())return 0}var t=re(),r=ne();if(20===t){if(21===r)switch(ne()){case 37:case 57:case 18:return 1;default:return 0}if(22===r||18===r)return 2;if(25===r)return 1;if(e.isModifierKind(r)&&121!==r&&ue(Be))return 1;if(!_e()&&100!==r)return 0;switch(ne()){case 57:return 1;case 56:return ne(),57===re()||27===re()||59===re()||21===re()?1:0;case 27:case 59:case 21:return 2}return 0}return e.Debug.assert(28===t),_e()?1===o.languageVariant?ue(function(){var e=ne();if(86===e)switch(ne()){case 59:case 30:return!1;default:return!0}else if(27===e)return!0;return!1})?1:0:2:0}function er(){return rr(!1)}function tr(){if(121===re()){if(ne(),C.hasPrecedingLineBreak()||37===re())return 0;var e=ir(0);if(!C.hasPrecedingLineBreak()&&72===e.kind&&37===re())return 1}return 0}function rr(t){var r=be(197);if(r.modifiers=yn(),(ft(57,e.hasModifier(r,256)?2:0,r)||t)&&(t||37===re()||18===re()))return r}function nr(e){return 18===re()?Mr(e?2:0):26===re()||90===re()||76===re()||!Wr()||18!==re()&&90!==re()&&76!==re()&&58!==re()&&Gt()?e?V(Qt):z(16384,Qt):Mr(16|(e?2:0))}function ir(e){return or(e,lr())}function ar(e){return 93===e||147===e}function or(t,r){for(;;){ie();var n=e.getBinaryOperatorPrecedence(re());if(!(41===re()?n>=t:n>t))break;if(93===re()&&H())break;if(119===re()){if(C.hasPrecedingLineBreak())break;ne(),r=cr(r,Vt())}else r=sr(r,ge(),ir(n))}return r}function sr(e,t,r){var n=ve(204,e.pos);return n.left=e,n.operatorToken=t,n.right=r,xe(n)}function cr(e,t){var r=ve(212,e.pos);return r.expression=e,r.type=t,xe(r)}function ur(){var e=ve(202);return e.operator=re(),ne(),e.operand=_r(),xe(e)}function lr(){if(function(){switch(re()){case 38:case 39:case 53:case 52:case 81:case 104:case 106:case 122:return!1;case 28:if(1!==o.languageVariant)return!1;default:return!0}}()){var t=dr();return 41===re()?or(e.getBinaryOperatorPrecedence(re()),t):t}var r=re(),n=_r();if(41===re()){var i=e.skipTrivia(m,n.pos),a=n.end;194===n.kind?$(i,a,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):$(i,a,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(r))}return n}function _r(){switch(re()){case 38:case 39:case 53:case 52:return ur();case 81:return e=ve(198),ne(),e.expression=_r(),xe(e);case 104:return function(){var e=ve(199);return ne(),e.expression=_r(),xe(e)}();case 106:return function(){var e=ve(200);return ne(),e.expression=_r(),xe(e)}();case 28:return function(){var e=ve(194);return de(28),e.type=Vt(),de(30),e.expression=_r(),xe(e)}();case 122:if(122===re()&&(Y()||ue(Ur)))return function(){var e=ve(201);return ne(),e.expression=_r(),xe(e)}();default:return dr()}var e}function dr(){if(44===re()||45===re())return(t=ve(202)).operator=re(),ne(),t.operand=pr(),xe(t);if(1===o.languageVariant&&28===re()&&ue(Je))return mr(!0);var t,r=pr();return e.Debug.assert(e.isLeftHandSideExpression(r)),44!==re()&&45!==re()||C.hasPrecedingLineBreak()?r:((t=ve(203,r.pos)).operand=r,t.operator=re(),ne(),xe(t))}function pr(){var t;if(92===re())if(ue(xt))o.flags|=524288,t=ge();else if(ue(St)){var r=C.getStartPos();ne(),ne();var n=ve(214,r);n.keywordToken=92,n.name=ke(),t=xe(n),o.flags|=1048576}else t=fr();else t=98===re()?function(){var t=ge();if(20===re()||24===re()||22===re())return t;var r=ve(189,t.pos);return r.expression=t,me(24,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),r.name=et(!0),xe(r)}():fr();return function(e){for(;;)if(e=Dr(e),28!==re()&&46!==re()){if(20!==re())return e;var t=ve(191,e.pos);t.expression=e,t.arguments=Tr(),e=xe(t)}else{var r=le(Cr);if(!r)return e;if(xr()){e=Sr(e,r);continue}var t=ve(191,e.pos);t.expression=e,t.typeArguments=r,t.arguments=Tr(),e=xe(t)}}(t)}function fr(){return Dr(Er())}function mr(t){var r,n=function(e){var t=C.getStartPos();if(de(28),30===re()){var r=ve(265,t);return se(),xe(r)}var n,i=hr(),a=Tn(),o=(s=ve(268),s.properties=qe(13,br),xe(s));var s;30===re()?(n=ve(262,t),se()):(de(42),e?de(30):(de(30,void 0,!1),se()),n=ve(261,t));return n.tagName=i,n.typeArguments=a,n.attributes=o,xe(n)}(t);if(262===n.kind)(i=ve(260,n.pos)).openingElement=n,i.children=yr(i.openingElement),i.closingElement=function(e){var t=ve(263);de(29),t.tagName=hr(),e?de(30):(de(30,void 0,!1),se());return xe(t)}(t),D(i.openingElement.tagName,i.closingElement.tagName)||Z(i.closingElement,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(m,i.openingElement.tagName)),r=xe(i);else if(265===n.kind){var i;(i=ve(264,n.pos)).openingFragment=n,i.children=yr(i.openingFragment),i.closingFragment=function(t){var r=ve(266);de(29),e.tokenIsIdentifierOrKeyword(re())&&Z(hr(),e.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);t?de(30):(de(30,void 0,!1),se());return xe(r)}(t),r=xe(i)}else e.Debug.assert(261===n.kind),r=n;if(t&&28===re()){var a=le(function(){return mr(!0)});if(a){X(e.Diagnostics.JSX_expressions_must_have_one_parent_element);var o=ve(204,r.pos);return o.end=a.end,o.left=r,o.right=a,o.operatorToken=Se(27,!1,void 0),o.operatorToken.pos=o.operatorToken.end=o.right.pos,o}}return r}function gr(t,r){switch(r){case 1:return void(e.isJsxOpeningFragment(t)?Z(t,e.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag):Z(t.tagName,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(m,t.tagName)));case 29:case 7:return;case 11:case 12:return(n=ve(11)).text=C.getTokenValue(),n.containsOnlyTriviaWhiteSpaces=12===u,u=C.scanJsxToken(),xe(n);case 18:return vr(!1);case 28:return mr(!1);default:return e.Debug.assertNever(r)}var n}function yr(e){var t=[],r=te(),n=v;for(v|=16384;;){var i=gr(e,u=C.reScanJsxToken());if(!i)break;t.push(i)}return v=n,De(t,r)}function hr(){oe();for(var e=100===re()?ge():ke();pe(24);){var t=ve(189,e.pos);t.expression=e,t.name=et(!0),e=xe(t)}return e}function vr(e){var t=ve(270);if(de(18))return 19!==re()&&(t.dotDotDotToken=fe(25),t.expression=Qt()),e?de(19):(de(19,void 0,!1),se()),xe(t)}function br(){if(18===re())return function(){var e=ve(269);return de(18),de(25),e.expression=Yt(),de(19),xe(e)}();oe();var e=ve(267);if(e.name=ke(),59===re())switch(u=C.scanJsxAttributeValue()){case 10:e.initializer=nt();break;default:e.initializer=vr(!0)}return xe(e)}function Dr(t){for(;;){if(fe(24)){var r=ve(189,t.pos);r.expression=t,r.name=et(!0),t=xe(r)}else if(52!==re()||C.hasPrecedingLineBreak())if(G()||!pe(22)){if(!xr())return t;t=Sr(t,void 0)}else{var n=ve(190,t.pos);if(n.expression=t,23===re())n.argumentExpression=Se(72,!0,e.Diagnostics.An_element_access_expression_should_take_an_argument);else{var i=U(Yt);e.isStringOrNumericLiteralLike(i)&&(i.text=Te(i.text)),n.argumentExpression=i}de(23),t=xe(n)}else{ne();var a=ve(213,t.pos);a.expression=t,t=xe(a)}}}function xr(){return 14===re()||15===re()}function Sr(e,t){var r=ve(193,e.pos);return r.tag=e,r.typeArguments=t,r.template=14===re()?nt():tt(),xe(r)}function Tr(){de(20);var e=Ye(11,Nr);return de(21),e}function Cr(){if(28===ae()){ne();var e=Ye(20,Vt);if(de(30))return e&&function(){switch(re()){case 20:case 14:case 15:case 24:case 21:case 23:case 57:case 26:case 56:case 33:case 35:case 34:case 36:case 54:case 55:case 51:case 49:case 50:case 19:case 1:return!0;case 27:case 18:default:return!1}}()?e:void 0}}function Er(){switch(re()){case 8:case 9:case 10:case 14:return nt();case 100:case 98:case 96:case 102:case 87:return ge();case 20:return t=be(195),de(20),t.expression=U(Yt),de(21),xe(t);case 22:return Ar();case 18:return Pr();case 121:if(!ue(Kr))break;return wr();case 76:return bn(be(0),209);case 90:return wr();case 95:return function(){var t=C.getStartPos();if(de(95),pe(24)){var r=ve(214,t);return r.keywordToken=95,r.name=ke(),xe(r)}var n,i=Er();for(;;){i=Dr(i),n=le(Cr),xr()&&(e.Debug.assert(!!n,"Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'"),i=Sr(i,n),n=void 0);break}var a=ve(192,t);a.expression=i,a.typeArguments=n,(a.typeArguments||20===re())&&(a.arguments=Tr());return xe(a)}();case 42:case 64:if(13===(u=C.reScanSlashToken()))return nt();break;case 15:return tt()}var t;return Ee(e.Diagnostics.Expression_expected)}function kr(){return 25===re()?(e=ve(208),de(25),e.expression=Qt(),xe(e)):27===re()?ve(210):Qt();var e}function Nr(){return z(E,kr)}function Ar(){var e=ve(187);return de(22),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.elements=Ye(15,kr),de(23),xe(e)}function Fr(){var e=be(0);if(fe(25))return e.kind=277,e.expression=Qt(),xe(e);if(e.decorators=mn(),e.modifiers=gn(),Pe(126))return pn(e,158);if(Pe(137))return pn(e,159);var t=fe(40),r=_e();if(e.name=Fe(),e.questionToken=fe(56),e.exclamationToken=fe(52),t||20===re()||28===re())return _n(e,t);if(r&&57!==re()){e.kind=276;var n=fe(59);n&&(e.equalsToken=n,e.objectAssignmentInitializer=U(Qt))}else e.kind=275,de(57),e.initializer=U(Qt);return xe(e)}function Pr(){var e=ve(188);return de(18),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.properties=Ye(12,Fr,!0),de(19),xe(e)}function wr(){var t=G();t&&j(!1);var r=be(196);r.modifiers=gn(),de(90),r.asteriskToken=fe(40);var n=r.asteriskToken?1:0,i=e.hasModifier(r,256)?2:0;return r.name=n&&i?K(20480,Ir):n?function(e){return K(4096,e)}(Ir):i?V(Ir):Ir(),ft(57,n|i,r),r.body=Mr(n|i),t&&j(!0),xe(r)}function Ir(){return _e()?Ee():void 0}function Or(e,t){var r=ve(218);return de(18,t)||e?(C.hasPrecedingLineBreak()&&(r.multiLine=!0),r.statements=qe(1,Gr),de(19)):r.statements=Xe(),xe(r)}function Mr(e,t){var r=W();B(!!(1&e));var n=Y();J(!!(2&e));var i=G();i&&j(!1);var a=Or(!!(16&e),t);return i&&j(!0),B(r),J(n),a}function Lr(){var e=te();de(89);var t,r,n=fe(122);if(de(20),26!==re()&&(t=105===re()||111===re()||77===re()?sn(!0):K(2048,Yt)),n?de(147):pe(147)){var i=ve(227,e);i.awaitModifier=n,i.initializer=t,i.expression=U(Qt),de(21),r=i}else if(pe(93)){var a=ve(226,e);a.initializer=t,a.expression=U(Yt),de(21),r=a}else{var o=ve(225,e);o.initializer=t,de(26),26!==re()&&21!==re()&&(o.condition=U(Yt)),de(26),21!==re()&&(o.incrementor=U(Yt)),de(21),r=o}return r.statement=Gr(),xe(r)}function Rr(e){var t=ve(e);return de(229===e?73:78),ye()||(t.label=Ee()),he(),xe(t)}function Br(){return 74===re()?(e=ve(271),de(74),e.expression=U(Yt),de(57),e.statements=qe(3,Gr),xe(e)):function(){var e=ve(272);return de(80),de(57),e.statements=qe(3,Gr),xe(e)}();var e}function jr(){var e=ve(235);return de(103),e.tryBlock=Or(!1),e.catchClause=75===re()?function(){var e=ve(274);de(75),pe(20)?(e.variableDeclaration=on(),de(21)):e.variableDeclaration=void 0;return e.block=Or(!1),xe(e)}():void 0,e.catchClause&&88!==re()||(de(88),e.finallyBlock=Or(!1)),xe(e)}function Jr(){return ne(),e.tokenIsIdentifierOrKeyword(re())&&!C.hasPrecedingLineBreak()}function zr(){return ne(),76===re()&&!C.hasPrecedingLineBreak()}function Kr(){return ne(),90===re()&&!C.hasPrecedingLineBreak()}function Ur(){return ne(),(e.tokenIsIdentifierOrKeyword(re())||8===re()||9===re()||10===re())&&!C.hasPrecedingLineBreak()}function Vr(){for(;;)switch(re()){case 105:case 111:case 77:case 90:case 76:case 84:return!0;case 110:case 140:return ne(),!C.hasPrecedingLineBreak()&&_e();case 130:case 131:return $r();case 118:case 121:case 125:case 113:case 114:case 115:case 133:if(ne(),C.hasPrecedingLineBreak())return!1;continue;case 145:return ne(),18===re()||72===re()||85===re();case 92:return ne(),10===re()||40===re()||18===re()||e.tokenIsIdentifierOrKeyword(re());case 85:if(ne(),59===re()||40===re()||18===re()||80===re()||119===re())return!0;continue;case 116:ne();continue;default:return!1}}function qr(){return ue(Vr)}function Wr(){switch(re()){case 58:case 26:case 18:case 105:case 111:case 90:case 76:case 84:case 91:case 82:case 107:case 89:case 78:case 73:case 97:case 108:case 99:case 101:case 103:case 79:case 75:case 88:return!0;case 92:return qr()||ue(Tt);case 77:case 85:return qr();case 121:case 125:case 110:case 130:case 131:case 140:case 145:return!0;case 115:case 113:case 114:case 116:case 133:return qr()||!ue(Jr);default:return Gt()}}function Hr(){return ne(),_e()||18===re()||22===re()}function Gr(){switch(re()){case 26:return e=ve(220),de(26),xe(e);case 18:return Or(!1);case 105:return un(be(237));case 111:if(ue(Hr))return un(be(237));break;case 90:return ln(be(239));case 76:return vn(be(240));case 91:return function(){var e=ve(222);return de(91),de(20),e.expression=U(Yt),de(21),e.thenStatement=Gr(),e.elseStatement=pe(83)?Gr():void 0,xe(e)}();case 82:return function(){var e=ve(223);return de(82),e.statement=Gr(),de(107),de(20),e.expression=U(Yt),de(21),pe(26),xe(e)}();case 107:return function(){var e=ve(224);return de(107),de(20),e.expression=U(Yt),de(21),e.statement=Gr(),xe(e)}();case 89:return Lr();case 78:return Rr(228);case 73:return Rr(229);case 97:return function(){var e=ve(230);return de(97),ye()||(e.expression=U(Yt)),he(),xe(e)}();case 108:return function(){var e=ve(231);return de(108),de(20),e.expression=U(Yt),de(21),e.statement=K(8388608,Gr),xe(e)}();case 99:return function(){var e=ve(232);de(99),de(20),e.expression=U(Yt),de(21);var t=ve(246);return de(18),t.clauses=qe(2,Br),de(19),e.caseBlock=xe(t),xe(e)}();case 101:return function(){var e=ve(234);return de(101),e.expression=C.hasPrecedingLineBreak()?void 0:U(Yt),he(),xe(e)}();case 103:case 75:case 88:return jr();case 79:return function(){var e=ve(236);return de(79),he(),xe(e)}();case 58:return Xr();case 121:case 110:case 140:case 130:case 131:case 125:case 77:case 84:case 85:case 92:case 113:case 114:case 115:case 118:case 116:case 133:case 145:if(qr())return Xr()}var e;return function(){var e=be(0),t=U(Yt);return 72===t.kind&&pe(57)?(e.kind=233,e.label=t,e.statement=Gr()):(e.kind=221,e.expression=t,he()),xe(e)}()}function Yr(e){return 125===e.kind}function Xr(){var t=be(0);if(t.decorators=mn(),t.modifiers=gn(),e.some(t.modifiers,Yr)){for(var r=0,n=t.modifiers;r<n.length;r++){n[r].flags|=4194304}return K(4194304,function(){return Qr(t)})}return Qr(t)}function Qr(t){switch(re()){case 105:case 111:case 77:return un(t);case 90:return ln(t);case 76:return vn(t);case 110:return function(e){return e.kind=241,de(110),e.name=Ee(),e.typeParameters=lt(),e.heritageClauses=Dn(),e.members=Ct(),xe(e)}(t);case 140:return function(e){return e.kind=242,de(140),e.name=Ee(),e.typeParameters=lt(),de(59),e.type=Vt(),he(),xe(e)}(t);case 84:return function(e){e.kind=243,de(84),e.name=Ee(),de(18)?(e.members=Ye(6,En),de(19)):e.members=Xe();return xe(e)}(t);case 145:case 130:case 131:return function(e){var t=0;if(145===re())return Nn(e);if(pe(131))t|=16;else if(de(130),10===re())return Nn(e);return function e(t,r){t.kind=244;var n=16&r;t.flags|=r;t.name=Ee();t.body=pe(24)?e(ve(0),4|n):kn();return xe(t)}(e,t)}(t);case 92:return function(e){de(92);var t,r=C.getStartPos();if(_e()&&(t=Ee(),27!==re()&&144!==re()))return function(e,t){return e.kind=248,e.name=t,de(59),e.moduleReference=function(){return 134===re()&&ue(An)?(e=ve(259),de(134),de(20),e.expression=Pn(),de(21),xe(e)):$e(!1);var e}(),he(),xe(e)}(e,t);e.kind=249,(t||40===re()||18===re())&&(e.importClause=function(e,t){var r=ve(250,t);e&&(r.name=e);r.name&&!pe(27)||(r.namedBindings=40===re()?(n=ve(251),de(40),de(119),n.name=Ee(),xe(n)):wn(252));var n;return xe(r)}(t,r),de(144));return e.moduleSpecifier=Pn(),he(),xe(e)}(t);case 85:switch(ne(),re()){case 80:case 59:return function(e){e.kind=254,pe(59)?e.isExportEquals=!0:de(80);return e.expression=Qt(),he(),xe(e)}(t);case 119:return function(e){return e.kind=247,de(119),de(131),e.name=Ee(),he(),xe(e)}(t);default:return function(e){e.kind=255,pe(40)?(de(144),e.moduleSpecifier=Pn()):(e.exportClause=wn(256),(144===re()||10===re()&&!C.hasPrecedingLineBreak())&&(de(144),e.moduleSpecifier=Pn()));return he(),xe(e)}(t)}default:if(t.decorators||t.modifiers){var r=Se(258,!0,e.Diagnostics.Declaration_expected);return r.pos=t.pos,r.decorators=t.decorators,r.modifiers=t.modifiers,xe(r)}return}}function $r(){return ne(),!C.hasPrecedingLineBreak()&&(_e()||10===re())}function Zr(e,t){if(18===re()||!ye())return Mr(e,t);he()}function en(){if(27===re())return ve(210);var e=ve(186);return e.dotDotDotToken=fe(25),e.name=nn(),e.initializer=Xt(),xe(e)}function tn(){var e=ve(186);e.dotDotDotToken=fe(25);var t=_e(),r=Fe();return t&&57!==re()?e.name=r:(de(57),e.propertyName=r,e.name=nn()),e.initializer=Xt(),xe(e)}function rn(){return 18===re()||22===re()||_e()}function nn(){return 22===re()?(e=ve(185),de(22),e.elements=Ye(10,en),de(23),xe(e)):18===re()?function(){var e=ve(184);return de(18),e.elements=Ye(9,tn),de(19),xe(e)}():Ee();var e}function an(){return on(!0)}function on(e){var t=ve(237);return t.name=nn(),e&&72===t.name.kind&&52===re()&&!C.hasPrecedingLineBreak()&&(t.exclamationToken=ge()),t.type=Wt(),ar(re())||(t.initializer=Xt()),xe(t)}function sn(t){var r=ve(238);switch(re()){case 105:break;case 111:r.flags|=1;break;case 77:r.flags|=2;break;default:e.Debug.fail()}if(ne(),147===re()&&ue(cn))r.declarations=Xe();else{var n=H();R(t),r.declarations=Ye(8,t?on:an),R(n)}return xe(r)}function cn(){return Be()&&21===ne()}function un(e){return e.kind=219,e.declarationList=sn(!1),he(),xe(e)}function ln(t){t.kind=239,de(90),t.asteriskToken=fe(40),t.name=e.hasModifier(t,512)?Ir():Ee();var r=t.asteriskToken?1:0,n=e.hasModifier(t,256)?2:0;return ft(57,r|n,t),t.body=Zr(r|n,e.Diagnostics.or_expected),xe(t)}function _n(t,r,n){t.kind=156,t.asteriskToken=r;var i=r?1:0,a=e.hasModifier(t,256)?2:0;return ft(57,i|a,t),t.body=Zr(i|a,n),xe(t)}function dn(t){return t.kind=154,t.questionToken||52!==re()||C.hasPrecedingLineBreak()||(t.exclamationToken=ge()),t.type=Wt(),t.initializer=e.hasModifier(t,32)?U(Xt):z(6144,Xt),he(),xe(t)}function pn(e,t){return e.kind=t,e.name=Fe(),ft(57,0,e),e.body=Zr(0),xe(e)}function fn(){var t;if(58===re())return!0;for(;e.isModifierKind(re());){if(t=re(),e.isClassMemberModifier(t))return!0;ne()}if(40===re())return!0;if(Ne()&&(t=re(),ne()),22===re())return!0;if(void 0!==t){if(!e.isKeyword(t)||137===t||126===t)return!0;switch(re()){case 20:case 28:case 52:case 57:case 59:case 56:return!0;default:return ye()}}return!1}function mn(){for(var e,t=te();;){var r=te();if(!pe(58))break;var n=ve(152,r);n.expression=K(8192,pr),xe(n),(e||(e=[])).push(n)}return e&&De(e,t)}function gn(t){for(var r,n=te();;){var i=C.getStartPos(),a=re();if(77===re()&&t){if(!le(we))break}else if(!e.isModifierKind(re())||!le(Ie))break;var o=xe(ve(a,i));(r||(r=[])).push(o)}return r&&De(r,n)}function yn(){var e;if(121===re()){var t=C.getStartPos(),r=re();ne(),e=De([xe(ve(r,t))],t)}return e}function hn(){if(26===re()){var t=ve(217);return ne(),xe(t)}var r=be(0);return r.decorators=mn(),r.modifiers=gn(!0),Pe(126)?pn(r,158):Pe(137)?pn(r,159):124===re()?function(t){return t.kind=157,de(124),ft(57,0,t),t.body=Zr(0,e.Diagnostics.or_expected),xe(t)}(r):yt()?vt(r):e.tokenIsIdentifierOrKeyword(re())||10===re()||8===re()||40===re()||22===re()?function(t){var r=fe(40);return t.name=Fe(),t.questionToken=fe(56),r||20===re()||28===re()?_n(t,r,e.Diagnostics.or_expected):dn(t)}(r):r.decorators||r.modifiers?(r.name=Se(72,!0,e.Diagnostics.Declaration_expected),dn(r)):e.Debug.fail("Should not have attempted to parse class member declaration.")}function vn(e){return bn(e,240)}function bn(e,t){return e.kind=t,de(76),e.name=!_e()||109===re()&&ue(je)?void 0:Ee(),e.typeParameters=lt(),e.heritageClauses=Dn(),de(18)?(e.members=qe(5,hn),de(19)):e.members=Xe(),xe(e)}function Dn(){if(Cn())return qe(22,xn)}function xn(){var t=re();e.Debug.assert(86===t||109===t);var r=ve(273);return r.token=t,ne(),r.types=Ye(7,Sn),xe(r)}function Sn(){var e=ve(211);return e.expression=pr(),e.typeArguments=Tn(),xe(e)}function Tn(){return 28===re()?Qe(20,Vt,28,30):void 0}function Cn(){return 86===re()||109===re()}function En(){var e=be(278);return e.name=Fe(),e.initializer=U(Xt),xe(e)}function kn(){var e=ve(245);return de(18)?(e.statements=qe(1,Gr),de(19)):e.statements=Xe(),xe(e)}function Nn(e){return e.kind=244,145===re()?(e.name=Ee(),e.flags|=512):(e.name=nt(),e.name.text=Te(e.name.text)),18===re()?e.body=kn():he(),xe(e)}function An(){return 20===ne()}function Fn(){return 42===ne()}function Pn(){if(10===re()){var e=nt();return e.text=Te(e.text),e}return Yt()}function wn(e){var t=ve(e);return t.elements=Qe(23,252===e?On:In,18,19),xe(t)}function In(){return Mn(257)}function On(){return Mn(253)}function Mn(t){var r=ve(t),n=e.isKeyword(re())&&!_e(),i=C.getTokenPos(),a=C.getTextPos(),o=ke();return 119===re()?(r.propertyName=o,de(119),n=e.isKeyword(re())&&!_e(),i=C.getTokenPos(),a=C.getTextPos(),r.name=ke()):r.name=o,253===t&&n&&$(i,a,e.Diagnostics.Identifier_expected),xe(r)}function Ln(t){return e.hasModifier(t,1)||248===t.kind&&259===t.moduleReference.kind||249===t.kind||254===t.kind||255===t.kind?t:void 0}function Rn(t){return function(t){return e.isMetaProperty(t)&&92===t.keywordToken&&"meta"===t.name.escapedText}(t)?t:_(t,Rn)}t.parseSourceFile=function(t,r,n,i,a,o){if(void 0===a&&(a=!1),6===(o=e.ensureScriptKind(t,o))){var s=N(t,r,n,i,a);return e.convertToObjectWorker(s,s.parseDiagnostics,!1,void 0,void 0),s.referencedFiles=e.emptyArray,s.typeReferenceDirectives=e.emptyArray,s.libReferenceDirectives=e.emptyArray,s.amdDependencies=e.emptyArray,s.hasNoDefaultLib=!1,s.pragmas=e.emptyMap,s}F(r,n,i,o);var c=w(t,n,a,o);return P(),c},t.parseIsolatedEntityName=function(e,t){F(e,t,void 0,1),ne();var r=$e(!0),n=1===re()&&!s.length;return P(),n?r:void 0},t.parseJsonText=N,t.fixupParentReferences=O,function(e){e[e.SourceElements=0]="SourceElements",e[e.BlockStatements=1]="BlockStatements",e[e.SwitchClauses=2]="SwitchClauses",e[e.SwitchClauseStatements=3]="SwitchClauseStatements",e[e.TypeMembers=4]="TypeMembers",e[e.ClassMembers=5]="ClassMembers",e[e.EnumMembers=6]="EnumMembers",e[e.HeritageClauseElement=7]="HeritageClauseElement",e[e.VariableDeclarations=8]="VariableDeclarations",e[e.ObjectBindingElements=9]="ObjectBindingElements",e[e.ArrayBindingElements=10]="ArrayBindingElements",e[e.ArgumentExpressions=11]="ArgumentExpressions",e[e.ObjectLiteralMembers=12]="ObjectLiteralMembers",e[e.JsxAttributes=13]="JsxAttributes",e[e.JsxChildren=14]="JsxChildren",e[e.ArrayLiteralMembers=15]="ArrayLiteralMembers",e[e.Parameters=16]="Parameters",e[e.JSDocParameters=17]="JSDocParameters",e[e.RestProperties=18]="RestProperties",e[e.TypeParameters=19]="TypeParameters",e[e.TypeArguments=20]="TypeArguments",e[e.TupleElementTypes=21]="TupleElementTypes",e[e.HeritageClauses=22]="HeritageClauses",e[e.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",e[e.Count=24]="Count"}(x||(x={})),function(e){e[e.False=0]="False",e[e.True=1]="True",e[e.Unknown=2]="Unknown"}(S||(S={})),function(t){function r(e){var t=ve(288),r=(e?pe:de)(18);return t.type=K(2097152,ct),e&&!r||de(19),O(t),xe(t)}var n,i;function a(t,n){void 0===t&&(t=0);var i=m,a=void 0===n?i.length:t+n;if(n=a-t,e.Debug.assert(t>=0),e.Debug.assert(t<=a),e.Debug.assert(a<=i.length),l(i,t)){var o,s,c,_=[];return C.scanRange(t+3,n-5,function(){var e,r,n=1,u=t-Math.max(i.lastIndexOf("\n",t),0)+4;function l(t){e||(e=u),_.push(t),u+=t.length}for(I();O(5););O(4)&&(n=0,u=0);e:for(;;){switch(re()){case 58:0===n||1===n?(p(_),b(h(u)),n=0,e=void 0,u++):l(C.getTokenText());break;case 4:_.push(C.getTokenText()),n=0,u=0;break;case 40:var f=C.getTokenText();1===n||2===n?(n=2,l(f)):(n=1,u+=f.length);break;case 5:var m=C.getTokenText();2===n?_.push(m):void 0!==e&&u+m.length>e&&_.push(m.slice(e-u-1)),u+=m.length;break;case 1:break e;default:n=2,l(C.getTokenText())}I()}return d(_),p(_),(r=ve(296,t)).tags=o&&De(o,s,c),r.comment=_.length?_.join(""):void 0,xe(r,a)})}function d(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function p(e){for(;e.length&&""===e[e.length-1].trim();)e.pop()}function f(){for(;;){if(I(),1===re())return!0;if(5!==re()&&4!==re())return!1}}function g(){if(5!==re()&&4!==re()||!ue(f))for(;5===re()||4===re();)I()}function y(){if(5!==re()&&4!==re()||!ue(f))for(var e=C.hasPrecedingLineBreak();e&&40===re()||5===re()||4===re();)4===re()?e=!0:40===re()&&(e=!1),I()}function h(t){e.Debug.assert(58===re());var n=C.getTokenPos();I();var i,a=M(void 0);switch(y(),a.escapedText){case"augments":case"extends":i=function(e,t){var r=ve(300,e);return r.tagName=t,r.class=function(){var e=pe(18),t=ve(211);t.expression=function(){for(var e=M();pe(24);){var t=ve(189,e.pos);t.expression=e,t.name=M(),e=xe(t)}return e}(),t.typeArguments=Tn();var r=xe(t);return e&&de(19),r}(),xe(r)}(n,a);break;case"class":case"constructor":i=function(e,t){var r=ve(301,e);return r.tagName=t,xe(r)}(n,a);break;case"this":i=function(e,t){var n=ve(306,e);return n.tagName=t,n.typeExpression=r(!0),g(),xe(n)}(n,a);break;case"enum":i=function(e,t){var n=ve(303,e);return n.tagName=t,n.typeExpression=r(!0),g(),xe(n)}(n,a);break;case"arg":case"argument":case"param":return T(n,a,2,t);case"return":case"returns":i=function(t,r){e.forEach(o,function(e){return 305===e.kind})&&$(r.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,r.escapedText);var n=ve(305,t);return n.tagName=r,n.typeExpression=D(),xe(n)}(n,a);break;case"template":i=function(t,n){var i;18===re()&&(i=r());var a=[],o=te();do{g();var s=ve(150);s.name=M(e.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),xe(s),g(),a.push(s)}while(O(27));var c=ve(308,t);return c.tagName=n,c.constraint=i,c.typeParameters=De(a,o),xe(c),c}(n,a);break;case"type":i=E(n,a);break;case"typedef":i=function(t,r,n){var i=D();y();var a,o=ve(309,t);if(o.tagName=r,o.fullName=k(),o.name=N(o.fullName),g(),o.comment=v(n),o.typeExpression=i,!i||S(i.type)){for(var s=void 0,c=void 0,u=void 0;s=le(function(){return F(n)});)if(c||(c=ve(297,t)),307===s.kind){if(u)break;u=s}else c.jsDocPropertyTags=e.append(c.jsDocPropertyTags,s);c&&(i&&169===i.type.kind&&(c.isArrayType=!0),o.typeExpression=u&&u.typeExpression&&!S(u.typeExpression.type)?u.typeExpression:xe(c),a=o.typeExpression.end)}return xe(o,a||void 0!==o.comment?C.getStartPos():(o.fullName||o.typeExpression||o.tagName).end)}(n,a,t);break;case"callback":i=function(t,r,n){var i,a=ve(302,t);a.tagName=r,a.fullName=k(),a.name=N(a.fullName),g(),a.comment=v(n);var o=ve(298,t);o.parameters=[];for(;i=le(function(){return P(4,n)});)o.parameters=e.append(o.parameters,i);var s=le(function(){if(O(58)){var e=h(n);if(e&&305===e.kind)return e}});s&&(o.type=s);return a.typeExpression=xe(o),xe(a)}(n,a,t);break;default:i=function(e,t){var r=ve(299,e);return r.tagName=t,xe(r)}(n,a)}return i.comment||(i.comment=v(t+i.end-i.pos)),i}function v(t){var r,n=[],i=0;function a(e){r||(r=t),n.push(e),t+=e.length}var o=re();e:for(;;){switch(o){case 4:i>=1&&(i=0,n.push(C.getTokenText())),t=0;break;case 58:C.setTextPos(C.getTextPos()-1);case 1:break e;case 5:if(2===i)a(C.getTokenText());else{var s=C.getTokenText();void 0!==r&&t+s.length>r&&n.push(s.slice(r-t-1)),t+=s.length}break;case 18:i=2,ue(function(){return 58===I()&&e.tokenIsIdentifierOrKeyword(I())&&"link"===C.getTokenText()})&&(a(C.getTokenText()),I(),a(C.getTokenText()),I()),a(C.getTokenText());break;case 40:if(0===i){i=1,t+=1;break}default:i=2,a(C.getTokenText())}o=I()}return d(n),p(n),0===n.length?void 0:n.join("")}function b(e){e&&(o?o.push(e):(o=[e],s=e.pos),c=e.end)}function D(){return y(),18===re()?r():void 0}function x(){if(14===re())return{name:Ce(!0),isBracketed:!1};var e=pe(22),t=function(){var e=M();pe(22)&&de(23);for(;pe(24);){var t=M();pe(22)&&de(23),e=Ze(e,t)}return e}();return e&&(g(),fe(59)&&Yt(),de(23)),{name:t,isBracketed:e}}function S(t){switch(t.kind){case 136:return!0;case 169:return S(t.elementType);default:return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText}}function T(t,r,n,i){var a=D(),o=!a;y();var s=x(),c=s.name,u=s.isBracketed;g(),o&&(a=D());var l=ve(1===n?310:304,t),_=v(i+C.getStartPos()-t),d=4!==n&&function(t,r,n,i){if(t&&S(t.type)){for(var a=ve(288,C.getTokenPos()),o=void 0,s=void 0,c=C.getStartPos(),u=void 0;o=le(function(){return P(n,i,r)});)304!==o.kind&&310!==o.kind||(u=e.append(u,o));if(u)return(s=ve(297,c)).jsDocPropertyTags=u,169===t.type.kind&&(s.isArrayType=!0),a.type=xe(s),xe(a)}}(a,c,n,i);return d&&(a=d,o=!0),l.tagName=r,l.typeExpression=a,l.name=c,l.isNameFirst=o,l.isBracketed=u,l.comment=_,xe(l)}function E(t,n){e.forEach(o,function(e){return 307===e.kind})&&$(n.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,n.escapedText);var i=ve(307,t);return i.tagName=n,i.typeExpression=r(!0),xe(i)}function k(t){var r=C.getTokenPos();if(e.tokenIsIdentifierOrKeyword(re())){var n=M();if(pe(24)){var i=ve(244,r);return t&&(i.flags|=4),i.name=n,i.body=k(!0),xe(i)}return t&&(n.isInJSDocNamespace=!0),n}}function N(t){if(t)for(var r=t;;){if(e.isIdentifier(r)||!r.body)return e.isIdentifier(r)?r:r.name;r=r.body}}function A(t,r){for(;!e.isIdentifier(t)||!e.isIdentifier(r);){if(e.isIdentifier(t)||e.isIdentifier(r)||t.right.escapedText!==r.right.escapedText)return!1;t=t.left,r=r.left}return t.escapedText===r.escapedText}function F(e){return P(1,e)}function P(t,r,n){for(var i=!0,a=!1;;)switch(I()){case 58:if(i){var o=w(t,r);return!(o&&(304===o.kind||310===o.kind)&&4!==t&&n&&(e.isIdentifier(o.name)||!A(n,o.name.left)))&&o}a=!1;break;case 4:i=!0,a=!1;break;case 40:a&&(i=!1),a=!0;break;case 72:i=!1;break;case 1:return!1}}function w(t,r){e.Debug.assert(58===re());var n=C.getStartPos();I();var i,a=M();switch(g(),a.escapedText){case"type":return 1===t&&E(n,a);case"prop":case"property":i=1;break;case"arg":case"argument":case"param":i=6;break;default:return!1}return!!(t&i)&&T(n,a,t,r)}function I(){return u=C.scanJSDocToken()}function O(e){return re()===e&&(I(),!0)}function M(t){if(!e.tokenIsIdentifierOrKeyword(re()))return Se(72,!t,t||e.Diagnostics.Identifier_expected);var r=C.getTokenPos(),n=C.getTextPos(),i=ve(72,r);return i.escapedText=e.escapeLeadingUnderscores(C.getTokenText()),xe(i,n),I(),i}}t.parseJSDocTypeExpressionForTests=function(e,t,n){F(e,7,void 0,1),o=M("file.js",7,1,!1),C.setText(e,t,n),u=C.scan();var i=r(),a=s;return P(),i?{jsDocTypeExpression:i,diagnostics:a}:void 0},t.parseJSDocTypeExpression=r,t.parseIsolatedJSDocComment=function(e,t,r){F(e,7,void 0,1),o={languageVariant:0,text:e};var n=a(t,r),i=s;return P(),n?{jsDoc:n,diagnostics:i}:void 0},t.parseJSDocComment=function(e,t,r){var n,i=u,c=s.length,l=k,_=a(t,r);return _&&(_.parent=e),65536&b&&(o.jsDocDiagnostics||(o.jsDocDiagnostics=[]),(n=o.jsDocDiagnostics).push.apply(n,s)),u=i,s.length=c,k=l,_},function(e){e[e.BeginningOfLine=0]="BeginningOfLine",e[e.SawAsterisk=1]="SawAsterisk",e[e.SavingComments=2]="SavingComments"}(n||(n={})),function(e){e[e.Property=1]="Property",e[e.Parameter=2]="Parameter",e[e.CallbackParameter=4]="CallbackParameter"}(i||(i={})),t.parseJSDocCommentWorker=a}(T=t.JSDocParser||(t.JSDocParser={}))}(o||(o={})),function(t){function r(t,r,i,o,s,c){return void(r?l(t):u(t));function u(t){var r="";if(c&&n(t)&&(r=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),t.pos+=i,t.end+=i,c&&n(t)&&e.Debug.assert(r===s.substring(t.pos,t.end)),_(t,u,l),e.hasJSDocNodes(t))for(var d=0,p=t.jsDoc;d<p.length;d++){u(p[d])}a(t,c)}function l(e){e._children=void 0,e.pos+=i,e.end+=i;for(var t=0,r=e;t<r.length;t++){u(r[t])}}}function n(e){switch(e.kind){case 10:case 8:case 72:return!0}return!1}function i(t,r,n,i,a){e.Debug.assert(t.end>=r,"Adjusting an element that was entirely before the change range"),e.Debug.assert(t.pos<=n,"Adjusting an element that was entirely after the change range"),e.Debug.assert(t.pos<=t.end),t.pos=Math.min(t.pos,i),t.end>=n?t.end+=a:t.end=Math.min(t.end,i),e.Debug.assert(t.pos<=t.end),t.parent&&(e.Debug.assert(t.pos>=t.parent.pos),e.Debug.assert(t.end<=t.parent.end))}function a(t,r){if(r){var n=t.pos,i=function(t){e.Debug.assert(t.pos>=n),n=t.end};if(e.hasJSDocNodes(t))for(var a=0,o=t.jsDoc;a<o.length;a++){i(o[a])}_(t,i),e.Debug.assert(n<=t.end)}}function s(t,r){var n,i=t;if(_(t,function t(a){if(e.nodeIsMissing(a))return;if(!(a.pos<=r))return e.Debug.assert(a.pos>r),!0;if(a.pos>=i.pos&&(i=a),r<a.end)return _(a,t),!0;e.Debug.assert(a.end<=r),n=a}),n){var a=function(t){for(;;){var r=e.getLastChild(t);if(!r)return t;t=r}}(n);a.pos>i.pos&&(i=a)}return i}function c(t,r,n,i){var a=t.text;if(n&&(e.Debug.assert(a.length-n.span.length+n.newLength===r.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,n.span.start),s=r.substr(0,n.span.start);e.Debug.assert(o===s);var c=a.substring(e.textSpanEnd(n.span),a.length),u=r.substring(e.textSpanEnd(e.textChangeRangeNewSpan(n)),r.length);e.Debug.assert(c===u)}}var u;t.updateSourceFile=function(t,n,u,l){if(c(t,n,u,l=l||e.Debug.shouldAssert(2)),e.textChangeRangeIsUnchanged(u))return t;if(0===t.statements.length)return o.parseSourceFile(t.fileName,n,t.languageVersion,void 0,!0,t.scriptKind);var d=t;e.Debug.assert(!d.hasBeenIncrementallyParsed),d.hasBeenIncrementallyParsed=!0;var p=t.text,f=function(t){var r=t.statements,n=0;e.Debug.assert(n<r.length);var i=r[n],a=-1;return{currentNode:function(o){return o!==a&&(i&&i.end===o&&n<r.length-1&&(i=r[++n]),i&&i.pos===o||function(e){return r=void 0,n=-1,i=void 0,void _(t,a,o);function a(t){return e>=t.pos&&e<t.end&&(_(t,a,o),!0)}function o(t){if(e>=t.pos&&e<t.end)for(var s=0;s<t.length;s++){var c=t[s];if(c){if(c.pos===e)return r=t,n=s,i=c,!0;if(c.pos<e&&e<c.end)return _(c,a,o),!0}}return!1}}(o)),a=o,e.Debug.assert(!i||i.pos===o),i}}}(t),m=function(t,r){for(var n=r.span.start,i=0;n>0&&i<=1;i++){var a=s(t,n);e.Debug.assert(a.pos<=n);var o=a.pos;n=Math.max(0,o-1)}var c=e.createTextSpanFromBounds(n,e.textSpanEnd(r.span)),u=r.newLength+(r.span.start-n);return e.createTextChangeRange(c,u)}(t,u);c(t,n,m,l),e.Debug.assert(m.span.start<=u.span.start),e.Debug.assert(e.textSpanEnd(m.span)===e.textSpanEnd(u.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(m))===e.textSpanEnd(e.textChangeRangeNewSpan(u)));var g=e.textChangeRangeNewSpan(m).length-m.span.length;return function(t,n,o,s,c,u,l,d){return void p(t);function p(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!1,c,u,l,d);else{var m=t.end;if(m>=n){if(t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c),_(t,p,f),e.hasJSDocNodes(t))for(var g=0,y=t.jsDoc;g<y.length;g++){var h=y[g];p(h)}a(t,d)}else e.Debug.assert(m<n)}}function f(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!0,c,u,l,d);else{var a=t.end;if(a>=n){t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c);for(var _=0,f=t;_<f.length;_++){var m=f[_];p(m)}}else e.Debug.assert(a<n)}}}(d,m.span.start,e.textSpanEnd(m.span),e.textSpanEnd(e.textChangeRangeNewSpan(m)),g,p,n,l),o.parseSourceFile(t.fileName,n,t.languageVersion,f,!0,t.scriptKind)},function(e){e[e.Value=-1]="Value"}(u||(u={}))}(s||(s={})),e.isDeclarationFileName=d,e.processCommentPragmas=p,e.processPragmasIntoFields=f;var m=e.createMap();function g(e){if(m.has(e))return m.get(e);var t=new RegExp("(\\s"+e+"\\s*=\\s*)('|\")(.+?)\\2","im");return m.set(e,t),t}var y=/^\/\/\/\s*<(\S+)\s.*?\/>/im,h=/^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im;function v(t,r,n){var i=2===r.kind&&y.exec(n);if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(!(o&&1&o.kind))return;if(o.args){for(var s={},c=0,u=o.args;c<u.length;c++){var l=u[c],_=g(l.name).exec(n);if(!_&&!l.optional)return;if(_)if(l.captureSpan){var d=r.pos+_.index+_[1].length+_[2].length;s[l.name]={value:_[3],pos:d,end:d+_[3].length}}else s[l.name]=_[3]}t.push({name:a,args:{arguments:s,range:r}})}else t.push({name:a,args:{arguments:{},range:r}})}else{var p=2===r.kind&&h.exec(n);if(p)return b(t,r,2,p);if(3===r.kind)for(var f=/\s*@(\S+)\s*(.*)\s*$/gim,m=void 0;m=f.exec(n);)b(t,r,4,m)}}function b(t,r,n,i){if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(o&&o.kind&n){var s=function(t,r){if(!r)return{};if(!t.args)return{};for(var n=r.split(/\s+/),i={},a=0;a<t.args.length;a++){var o=t.args[a];if(!n[a]&&!o.optional)return"fail";if(o.captureSpan)return e.Debug.fail("Capture spans not yet implemented for non-xml pragmas");i[o.name]=n[a]}return i}(o,i[2]);"fail"!==s&&t.push({name:a,args:{arguments:s,range:r}})}}}function D(e,t){return e.kind===t.kind&&(72===e.kind?e.escapedText===t.escapedText:100===e.kind||e.name.escapedText===t.name.escapedText&&D(e.expression,t.expression))}e.tagNamesAreEquivalent=D}(c||(c={})),function(e){e.compileOnSaveCommandLineOption={name:"compileOnSave",type:"boolean"};var t,r,n=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["esnext.array","lib.es2019.array.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.bigint","lib.esnext.bigint.d.ts"]];function a(e){return e&&void 0!==e.enableAutoDiscovery&&void 0===e.enable?{enable:e.enableAutoDiscovery,include:e.include||[],exclude:e.exclude||[]}:e}function o(){return t||(t=s(e.optionDeclarations))}function s(t){var r=e.createMap(),n=e.createMap();return e.forEach(t,function(e){r.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)}),{optionNameMap:r,shortOptionNames:n}}function c(t){return u(t,e.createCompilerDiagnostic)}function u(t,r){var n=e.arrayFrom(t.type.keys()).map(function(e){return"'"+e+"'"}).join(", ");return r(e.Diagnostics.Argument_for_0_option_must_be_Colon_1,"--"+t.name,n)}function l(e,t,r){return q(e,W(t||""),r)}function _(t,r,n){if(void 0===r&&(r=""),r=W(r),!e.startsWith(r,"-")){if(""===r)return[];var i=r.split(",");switch(t.element.type){case"number":return e.map(i,parseInt);case"string":return e.map(i,function(e){return e||""});default:return e.mapDefined(i,function(e){return l(t.element,e,n)})}}}function d(t,r,n,i){var a=r[0],o=r[1],s={},c=[],u=[];return d(n),{options:s,fileNames:c,errors:u};function d(r){for(var n=0;n<r.length;){var i=r[n];if(n++,64===i.charCodeAt(0))p(i.slice(1));else if(45===i.charCodeAt(0)){var d=m(t,i.slice(45===i.charCodeAt(1)?2:1),!0);if(d)if(d.isTSConfigOnly)u.push(e.createCompilerDiagnostic(e.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file,d.name));else switch(r[n]||"boolean"===d.type||u.push(e.createCompilerDiagnostic(o,d.name)),d.type){case"number":s[d.name]=parseInt(r[n]),n++;break;case"boolean":var f=r[n];s[d.name]="false"!==f,"false"!==f&&"true"!==f||n++;break;case"string":s[d.name]=r[n]||"",n++;break;case"list":var g=_(d,r[n],u);s[d.name]=g||[],g&&n++;break;default:s[d.name]=l(d,r[n],u),n++}else u.push(e.createCompilerDiagnostic(a,i))}else c.push(i)}}function p(t){var r=i?i(t):e.sys.readFile(t);if(r){for(var n=[],a=0;;){for(;a<r.length&&r.charCodeAt(a)<=32;)a++;if(a>=r.length)break;var o=a;if(34===r.charCodeAt(o)){for(a++;a<r.length&&34!==r.charCodeAt(a);)a++;a<r.length?(n.push(r.substring(o+1,a)),a++):u.push(e.createCompilerDiagnostic(e.Diagnostics.Unterminated_quoted_string_in_response_file_0,t))}else{for(;r.charCodeAt(a)>32;)a++;n.push(r.substring(o,a))}}d(n)}else u.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t))}}function p(e,t){return m(o,e,t)}function m(e,t,r){void 0===r&&(r=!1),t=t.toLowerCase();var n=e(),i=n.optionNameMap,a=n.shortOptionNames;if(r){var o=a.get(t);void 0!==o&&(t=o)}return i.get(t)}function g(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.createCompilerDiagnostic.apply(void 0,arguments).messageText}function y(t,r){var n=e.parseJsonText(t,r);return{config:D(n,n.parseDiagnostics),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function h(t,r){var n=v(t,r);return e.isString(n)?e.parseJsonText(t,n):{parseDiagnostics:[n]}}function v(t,r){var n;try{n=r(t)}catch(r){return e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r.message)}return void 0===n?e.createCompilerDiagnostic(e.Diagnostics.The_specified_path_does_not_exist_Colon_0,t):n}function b(t){return e.arrayToMap(t,function(e){return e.name})}function D(e,t){return x(e,t,!0,void 0,void 0)}function x(t,r,n,i,a){return t.statements.length?c(t.statements[0].expression,i):n?{}:void 0;function o(e){return i&&i.elementOptions===e}function s(i,s,u,_){for(var d=n?{}:void 0,p=0,f=i.properties;p<f.length;p++){var m=f[p];if(275===m.kind){m.questionToken&&r.push(e.createDiagnosticForNodeInSourceFile(t,m.questionToken,e.Diagnostics._0_can_only_be_used_in_a_ts_file,"?")),l(m.name)||r.push(e.createDiagnosticForNodeInSourceFile(t,m.name,e.Diagnostics.String_literal_with_double_quotes_expected));var g=e.getTextOfPropertyName(m.name),y=g&&e.unescapeLeadingUnderscores(g),h=y&&s?s.get(y):void 0;y&&u&&!h&&r.push(e.createDiagnosticForNodeInSourceFile(t,m.name,u,y));var v=c(m.initializer,h);if(void 0!==y&&(n&&(d[y]=v),a&&(_||o(s)))){var b=T(h,v);_?b&&a.onSetValidOptionKeyValueInParent(_,h,v):o(s)&&(b?a.onSetValidOptionKeyValueInRoot(y,m.name,v,m.initializer):h||a.onSetUnknownOptionKeyValueInRoot(y,m.name,v,m.initializer))}}else r.push(e.createDiagnosticForNodeInSourceFile(t,m,e.Diagnostics.Property_assignment_expected))}return d}function c(i,a){switch(i.kind){case 102:return g(a&&"boolean"!==a.type),!0;case 87:return g(a&&"boolean"!==a.type),!1;case 96:return g(a&&"extends"===a.name),null;case 10:l(i)||r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.String_literal_with_double_quotes_expected)),g(a&&e.isString(a.type)&&"string"!==a.type);var o=i.text;if(a&&!e.isString(a.type)){var _=a;_.type.has(o.toLowerCase())||r.push(u(_,function(r,n,a){return e.createDiagnosticForNodeInSourceFile(t,i,r,n,a)}))}return o;case 8:return g(a&&"number"!==a.type),Number(i.text);case 202:if(39!==i.operator||8!==i.operand.kind)break;return g(a&&"number"!==a.type),-Number(i.operand.text);case 188:g(a&&"object"!==a.type);var d=i;if(a){var p=a;return s(d,p.elementOptions,p.extraKeyDiagnosticMessage,p.name)}return s(d,void 0,void 0,void 0);case 187:return g(a&&"list"!==a.type),f=i.elements,m=a&&a.element,n?e.filter(f.map(function(e){return c(e,m)}),function(e){return void 0!==e}):f.forEach(function(e){return c(e,m)})}var f,m;return void(a?g(!0):r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal)));function g(n){n&&r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,a.name,S(a)))}}function l(r){return e.isStringLiteral(r)&&e.isStringDoubleQuoted(r,t)}}function S(t){return"list"===t.type?"Array":e.isString(t.type)?t.type:"string"}function T(t,r){if(t){if(A(r))return!0;if("list"===t.type)return e.isArray(r);var n=e.isString(t.type)?t.type:"string";return f(r)===n}return!1}function C(t,r){return e.forEachEntry(r,function(e,r){if(e===t)return r})}function E(t,r){var n=e.createMap(),i=o().optionNameMap,a=r&&e.createGetCanonicalFileName(r.useCaseSensitiveFileNames),s=function(o){if(e.hasProperty(t,o)){if(i.has(o)&&i.get(o).category===e.Diagnostics.Command_line_Options)return"continue";var s=t[o],c=i.get(o.toLowerCase());if(c){var u=function e(t){return"string"===t.type||"number"===t.type||"boolean"===t.type||"object"===t.type?void 0:"list"===t.type?e(t.element):t.type}(c);u?"list"===c.type?n.set(o,s.map(function(e){return C(e,u)})):n.set(o,C(s,u)):r&&c.isFilePath?n.set(o,e.getRelativePathFromFile(r.configFilePath,e.getNormalizedAbsolutePath(s,e.getDirectoryPath(r.configFilePath)),a)):n.set(o,s)}}};for(var c in t)s(c);return n}function k(e,t,r,n,i,a,o){return P(void 0,e,t,r,n,i,a,o)}function N(e,t){t&&Object.defineProperty(e,"configFile",{enumerable:!1,writable:!1,value:t})}function A(e){return void 0===e||null===e}function F(t,r){return e.getDirectoryPath(e.getNormalizedAbsolutePath(t,r))}function P(t,r,n,i,a,o,s,c){void 0===a&&(a={}),void 0===s&&(s=[]),void 0===c&&(c=[]),e.Debug.assert(void 0===t&&void 0!==r||void 0!==t&&void 0===r);var u,l=[],_=L(t,r,n,i,o,s,l),d=_.raw,p=e.extend(a,_.options||{});p.configFilePath=o&&e.normalizeSlashes(o),N(p,r);var f=function(){var t,a,_;if(e.hasProperty(d,"files")&&!A(d.files))if(e.isArray(d.files)){t=d.files;var f=e.hasProperty(d,"references")&&!A(d.references),m=!f||0===d.references.length,g=e.hasProperty(d,"extends");if(0===t.length&&m&&!g)if(r){var y=o||"tsconfig.json",v=e.Diagnostics.The_files_list_in_config_file_0_is_empty,b=e.firstDefined(e.getTsConfigPropArray(r,"files"),function(e){return e.initializer}),D=b?e.createDiagnosticForNodeInSourceFile(r,b,v,y):e.createCompilerDiagnostic(v,y);l.push(D)}else h(e.Diagnostics.The_files_list_in_config_file_0_is_empty,o||"tsconfig.json")}else h(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"files","Array");e.hasProperty(d,"include")&&!A(d.include)&&(e.isArray(d.include)?a=d.include:h(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"include","Array"));if(e.hasProperty(d,"exclude")&&!A(d.exclude))e.isArray(d.exclude)?_=d.exclude:h(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"exclude","Array");else if(d.compilerOptions){var x=d.compilerOptions.outDir,S=d.compilerOptions.declarationDir;(x||S)&&(_=[x,S].filter(function(e){return!!e}))}void 0===t&&void 0===a&&(a=["**/*"]);var T=function(t,r,n,i,a,o,s,c,u){var l,_;i=e.normalizePath(i),r&&(l=$(r,s,!1,u,"include"));n&&(_=$(n,s,!0,u,"exclude"));var d=function(t,r,n,i){var a=e.getRegularExpressionForWildcard(r,n,"exclude"),o=a&&new RegExp(a,i?"":"i"),s={};if(void 0!==t){for(var c=[],u=0,l=t;u<l.length;u++){var _=l[u],d=e.normalizePath(e.combinePaths(n,_));if(!o||!o.test(d)){var p=Z(d,i);if(p){var f=p.key,m=p.flags,g=s[f];(void 0===g||g<m)&&(s[f]=m,1===m&&c.push(f))}}}for(var f in s)if(e.hasProperty(s,f))for(var y=0,h=c;y<h.length;y++){var v=h[y];f!==v&&e.containsPath(v,f,n,!i)&&delete s[f]}}return s}(l,_,i,o.useCaseSensitiveFileNames);return Q({filesSpecs:t,includeSpecs:r,excludeSpecs:n,validatedIncludeSpecs:l,validatedExcludeSpecs:_,wildcardDirectories:d},i,a,o,c)}(t,a,_,o?F(o,i):i,p,n,l,c,r);I(T,O(d),s)&&l.push(w(T.spec,o));if(e.hasProperty(d,"references")&&!A(d.references))if(e.isArray(d.references))for(var C=0,E=d.references;C<E.length;C++){var k=E[C];"string"!=typeof k.path?h(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(u||(u=[])).push({path:e.getNormalizedAbsolutePath(k.path,i),originalPath:k.path,prepend:k.prepend,circular:k.circular})}else h(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"references","Array");return T}(),m=f.fileNames,g=f.wildcardDirectories,y=f.spec;return{options:p,fileNames:m,projectReferences:u,typeAcquisition:_.typeAcquisition||J(),raw:d,errors:l,wildcardDirectories:g,compileOnSave:!!d.compileOnSave,configFileSpecs:y};function h(t,n,i){r||l.push(e.createCompilerDiagnostic(t,n,i))}}function w(t,r){var n=t.includeSpecs,i=t.excludeSpecs;return e.createCompilerDiagnostic(e.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,r||"tsconfig.json",JSON.stringify(n||[]),JSON.stringify(i||[]))}function I(e,t,r){return 0===e.fileNames.length&&t&&(!r||0===r.length)}function O(t){return!e.hasProperty(t,"files")&&!e.hasProperty(t,"references")}function M(e){return!!e.options}function L(t,n,i,a,o,s,c){a=e.normalizeSlashes(a);var u=e.getNormalizedAbsolutePath(o||"",a);if(s.indexOf(u)>=0)return c.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,s.concat([u]).join(" -> "))),{raw:t||D(n,c)};var l=t?function(t,r,n,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=j(t.compilerOptions,n,a,i),c=z(t.typeAcquisition||t.typingOptions,n,a,i);if(t.compileOnSave=function(t,r,n){if(!e.hasProperty(t,e.compileOnSaveCommandLineOption.name))return!1;var i=U(e.compileOnSaveCommandLineOption,t.compileOnSave,r,n);return"boolean"==typeof i&&i}(t,n,a),t.extends)if(e.isString(t.extends)){var u=i?F(i,n):n;o=R(t.extends,r,u,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,typeAcquisition:c,extendedConfigPath:o}}(t,i,a,o,c):function(t,n,i,a,o){var s,c,u,l=B(a),_={onSetValidOptionKeyValueInParent:function(t,r,n){e.Debug.assert("compilerOptions"===t||"typeAcquisition"===t||"typingOptions"===t);var o="compilerOptions"===t?l:"typeAcquisition"===t?s||(s=J(a)):c||(c=J(a));o[r.name]=function t(r,n,i){if(A(i))return;if("list"===r.type){var a=r;return a.element.isFilePath||!e.isString(a.element.type)?e.filter(e.map(i,function(e){return t(a.element,n,e)}),function(e){return!!e}):i}if(!e.isString(r.type))return r.type.get(e.isString(i)?i.toLowerCase():i);return V(r,n,i)}(r,i,n)},onSetValidOptionKeyValueInRoot:function(r,s,c,l){switch(r){case"extends":var _=a?F(a,i):i;return void(u=R(c,n,_,o,function(r,n){return e.createDiagnosticForNodeInSourceFile(t,l,r,n)}))}},onSetUnknownOptionKeyValueInRoot:function(r,n,i,a){"excludes"===r&&o.push(e.createDiagnosticForNodeInSourceFile(t,n,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},d=x(t,o,!0,(void 0===r&&(r={name:void 0,type:"object",elementOptions:b([{name:"compilerOptions",type:"object",elementOptions:b(e.optionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_compiler_option_0},{name:"typingOptions",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"typeAcquisition",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"extends",type:"string"},{name:"references",type:"list",element:{name:"references",type:"object"}},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])}),r),_);s||(s=c?void 0!==c.enableAutoDiscovery?{enable:c.enableAutoDiscovery,include:c.include,exclude:c.exclude}:c:J(a));return{raw:d,options:l,typeAcquisition:s,extendedConfigPath:u}}(n,i,a,o,c);if(l.extendedConfigPath){s=s.concat([u]);var _=function(t,r,n,i,a,o){var s,c=h(r,function(e){return n.readFile(e)});t&&(t.extendedSourceFiles=[c.fileName]);if(c.parseDiagnostics.length)return void o.push.apply(o,c.parseDiagnostics);var u=e.getDirectoryPath(r),l=L(void 0,c,n,u,e.getBaseFileName(r),a,o);t&&c.extendedSourceFiles&&(s=t.extendedSourceFiles).push.apply(s,c.extendedSourceFiles);if(M(l)){var _=e.convertToRelativePath(u,i,e.identity),d=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(_,t)},p=function(t){f[t]&&(f[t]=e.map(f[t],d))},f=l.raw;p("include"),p("exclude"),p("files")}return l}(n,l.extendedConfigPath,i,a,s,c);if(_&&M(_)){var d=_.raw,p=l.raw,f=function(e){var t=p[e]||d[e];t&&(p[e]=t)};f("include"),f("exclude"),f("files"),void 0===p.compileOnSave&&(p.compileOnSave=d.compileOnSave),l.options=e.assign({},_.options,l.options)}}return l}function R(t,r,n,i,a){if(t=e.normalizeSlashes(t),e.isRootedDiskPath(t)||e.startsWith(t,"./")||e.startsWith(t,"../")){var o=e.getNormalizedAbsolutePath(t,n);return r.fileExists(o)||e.endsWith(o,".json")||(o+=".json",r.fileExists(o))?o:void i.push(a(e.Diagnostics.File_0_does_not_exist,t))}var s=e.nodeModuleNameResolver(t,e.combinePaths(n,"tsconfig.json"),{moduleResolution:e.ModuleResolutionKind.NodeJs},r,void 0,void 0,!0);if(s.resolvedModule)return s.resolvedModule.resolvedFileName;i.push(a(e.Diagnostics.File_0_does_not_exist,t))}function B(t){return t&&"jsconfig.json"===e.getBaseFileName(t)?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function j(t,r,n,i){var a=B(i);return K(e.optionDeclarations,t,r,a,e.Diagnostics.Unknown_compiler_option_0,n),i&&(a.configFilePath=e.normalizeSlashes(i)),a}function J(t){return{enable:!!t&&"jsconfig.json"===e.getBaseFileName(t),include:[],exclude:[]}}function z(t,r,n,i){var o=J(i),s=a(t);return K(e.typeAcquisitionDeclarations,s,r,o,e.Diagnostics.Unknown_type_acquisition_option_0,n),o}function K(t,r,n,i,a,o){if(r){var s=b(t);for(var c in r){var u=s.get(c);u?i[u.name]=U(u,r[c],n,o):o.push(e.createCompilerDiagnostic(a,c))}}}function U(t,r,n,i){if(T(t,r)){var a=t.type;return"list"===a&&e.isArray(r)?function(t,r,n,i){return e.filter(e.map(r,function(e){return U(t.element,e,n,i)}),function(e){return!!e})}(t,r,n,i):e.isString(a)?V(t,n,r):q(t,r,i)}i.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,t.name,S(t)))}function V(t,r,n){return t.isFilePath&&""===(n=e.normalizePath(e.combinePaths(r,n)))&&(n="."),n}function q(e,t,r){if(!A(t)){var n=t.toLowerCase(),i=e.type.get(n);if(void 0!==i)return i;r.push(c(e))}}function W(e){return"function"==typeof e.trim?e.trim():e.replace(/^[\s]+|[\s]+$/g,"")}e.libs=n.map(function(e){return e[0]}),e.libMap=e.createMapFromEntries(n),e.commonOptionsWithBuild=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_this_message},{name:"help",shortName:"?",type:"boolean"},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen},{name:"listFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_files_part_of_the_compilation},{name:"listEmittedFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_generated_files_part_of_the_compilation},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental},{name:"traceResolution",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Enable_tracing_of_the_name_resolution_process},{name:"diagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_diagnostic_information},{name:"extendedDiagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_verbose_diagnostic_information}],e.optionDeclarations=e.commonOptionsWithBuild.concat([{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_all_compiler_options},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_the_compiler_s_version},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,paramType:e.Diagnostics.FILE_OR_DIRECTORY,description:e.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date},{name:"showConfig",type:"boolean",category:e.Diagnostics.Command_line_Options,isCommandLineOnly:!0,description:e.Diagnostics.Print_the_final_configuration_instead_of_building},{name:"target",shortName:"t",type:e.createMapFromTemplate({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,esnext:7}),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:e.Diagnostics.VERSION,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT},{name:"module",shortName:"m",type:e.createMapFromTemplate({none:e.ModuleKind.None,commonjs:e.ModuleKind.CommonJS,amd:e.ModuleKind.AMD,system:e.ModuleKind.System,umd:e.ModuleKind.UMD,es6:e.ModuleKind.ES2015,es2015:e.ModuleKind.ES2015,esnext:e.ModuleKind.ESNext}),affectsModuleResolution:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext},{name:"lib",type:"list",element:{name:"lib",type:e.libMap},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_library_files_to_be_included_in_the_compilation},{name:"allowJs",type:"boolean",affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:"checkJs",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Report_errors_in_js_files},{name:"jsx",type:e.createMapFromTemplate({preserve:1,"react-native":3,react:2}),affectsSourceFile:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react},{name:"declaration",shortName:"d",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_d_ts_file},{name:"declarationMap",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file},{name:"emitDeclarationOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Only_emit_d_ts_declaration_files},{name:"sourceMap",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_map_file},{name:"outFile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file},{name:"outDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Redirect_output_structure_to_the_directory},{name:"rootDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir},{name:"composite",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_project_compilation},{name:"incremental",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_incremental_compilation},{name:"tsBuildInfoFile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE,isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_file_to_store_incremental_compilation_information},{name:"removeComments",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_comments_to_output},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_outputs},{name:"importHelpers",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Import_emit_helpers_from_tslib},{name:"downlevelIteration",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3},{name:"isolatedModules",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule},{name:"strict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_all_strict_type_checking_options},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_null_checks},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_function_types},{name:"strictBindCallApply",type:"boolean",strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_locals},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_parameters},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:"moduleResolution",type:e.createMapFromTemplate({node:e.ModuleResolutionKind.NodeJs,classic:e.ModuleResolutionKind.Classic}),affectsModuleResolution:!0,paramType:e.Diagnostics.STRATEGY,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Base_directory_to_resolve_non_absolute_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,isTSConfigOnly:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_folders_to_include_type_definitions_from},{name:"types",type:"list",element:{name:"types",type:"string"},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Type_declaration_files_to_be_included_in_compilation},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports},{name:"preserveSymlinks",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Do_not_resolve_the_real_path_of_symlinks},{name:"sourceRoot",type:"string",paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations},{name:"mapRoot",type:"string",paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSourceMap",type:"boolean",category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file},{name:"inlineSources",type:"boolean",category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set},{name:"experimentalDecorators",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:"emitDecoratorMetadata",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:"jsxFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h},{name:"resolveJsonModule",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Include_modules_imported_with_json_extension},{name:"out",type:"string",isFilePath:!1,category:e.Diagnostics.Advanced_Options,paramType:e.Diagnostics.FILE,description:e.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file},{name:"reactNamespace",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit},{name:"skipDefaultLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files},{name:"charset",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_character_set_of_the_input_files},{name:"emitBOM",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files},{name:"locale",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us},{name:"newLine",type:e.createMapFromTemplate({crlf:0,lf:1}),paramType:e.Diagnostics.NEWLINE,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix},{name:"noErrorTruncation",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_truncate_error_messages},{name:"noLib",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files},{name:"stripInternal",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation},{name:"disableSizeLimit",type:"boolean",affectsSourceFile:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_size_limitations_on_JavaScript_projects},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:"noEmitHelpers",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output},{name:"noEmitOnError",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported},{name:"preserveConstEnums",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:"declarationDir",type:"string",isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Skip_type_checking_of_declaration_files},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:"forceConsistentCasingInFileNames",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types},{name:"keyofStringsOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:e.Diagnostics.List_of_language_service_plugins}]),e.semanticDiagnosticsOptionDeclarations=e.optionDeclarations.filter(function(e){return!!e.affectsSemanticDiagnostics}),e.moduleResolutionOptionDeclarations=e.optionDeclarations.filter(function(e){return!!e.affectsModuleResolution}),e.sourceFileAffectingCompilerOptions=e.optionDeclarations.filter(function(e){return!!e.affectsSourceFile||!!e.affectsModuleResolution||!!e.affectsBindDiagnostics}),e.buildOpts=e.commonOptionsWithBuild.concat([{name:"verbose",shortName:"v",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Enable_verbose_logging,type:"boolean"},{name:"dry",shortName:"d",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean"},{name:"force",shortName:"f",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean"},{name:"clean",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Delete_the_outputs_of_all_projects,type:"boolean"}]),e.typeAcquisitionDeclarations=[{name:"enableAutoDiscovery",type:"boolean"},{name:"enable",type:"boolean"},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}}],e.defaultInitCompilerOptions={module:e.ModuleKind.CommonJS,target:1,strict:!0,esModuleInterop:!0},e.convertEnableAutoDiscoveryToEnable=a,e.createOptionNameMap=s,e.createCompilerDiagnosticForInvalidCustomType=c,e.parseCustomTypeOption=l,e.parseListTypeOption=_,e.parseCommandLine=function(t,r){return d(o,[e.Diagnostics.Unknown_compiler_option_0,e.Diagnostics.Compiler_option_0_expects_an_argument],t,r)},e.getOptionFromName=p,e.parseBuildCommand=function(t){var r,n=d(function(){return r||(r=s(e.buildOpts))},[e.Diagnostics.Unknown_build_option_0,e.Diagnostics.Build_option_0_requires_a_value_of_type_1],t),i=n.options,a=n.fileNames,o=n.errors,c=i;return 0===a.length&&a.push("."),c.clean&&c.force&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","force")),c.clean&&c.verbose&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","verbose")),c.clean&&c.watch&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","watch")),c.watch&&c.dry&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:c,projects:a,errors:o}},e.printVersion=function(){e.sys.write(g(e.Diagnostics.Version_0,e.version)+e.sys.newLine)},e.printHelp=function(t,r){void 0===r&&(r="");var n=[],i=g(e.Diagnostics.Syntax_Colon_0,"").length,a=g(e.Diagnostics.Examples_Colon_0,"").length,o=Math.max(i,a),s=F(o-i);s+="tsc "+r+"["+g(e.Diagnostics.options)+"] ["+g(e.Diagnostics.file)+"...]",n.push(g(e.Diagnostics.Syntax_Colon_0,s)),n.push(e.sys.newLine+e.sys.newLine);var c=F(o);n.push(g(e.Diagnostics.Examples_Colon_0,F(o-a)+"tsc hello.ts")+e.sys.newLine),n.push(c+"tsc --outFile file.js file.ts"+e.sys.newLine),n.push(c+"tsc @args.txt"+e.sys.newLine),n.push(c+"tsc --build tsconfig.json"+e.sys.newLine),n.push(e.sys.newLine),n.push(g(e.Diagnostics.Options_Colon)+e.sys.newLine),o=0;for(var u=[],l=[],_=e.createMap(),d=0,p=t;d<p.length;d++){var f=p[d];if(f.description){var m=" ";f.shortName&&(m+="-"+f.shortName,m+=A(f),m+=", "),m+="--"+f.name,m+=A(f),u.push(m);var y=void 0;if("lib"===f.name){y=g(f.description);var h=f.element.type;_.set(y,e.arrayFrom(h.keys()).map(function(e){return"'"+e+"'"}))}else y=g(f.description);l.push(y),o=Math.max(m.length,o)}}var v=" @<"+g(e.Diagnostics.file)+">";u.push(v),l.push(g(e.Diagnostics.Insert_command_line_options_and_files_from_a_file)),o=Math.max(v.length,o);for(var b=0;b<u.length;b++){var D=u[b],x=(y=l[b],_.get(y));if(n.push(D+F(o-D.length+2)+y+e.sys.newLine),x){n.push(F(o+4));for(var S=0,T=x;S<T.length;S++){var C=T[S];n.push(C+" ")}n.push(e.sys.newLine)}}for(var E=0,k=n;E<k.length;E++){var N=k[E];e.sys.write(N)}return;function A(e){return void 0!==e.paramType?" "+g(e.paramType):""}function F(e){return Array(e+1).join(" ")}},e.getParsedCommandLineOfConfigFile=function(t,r,n){var i;try{i=n.readFile(t)}catch(r){var a=e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r.message);return void n.onUnRecoverableConfigFileDiagnostic(a)}if(i){var o=e.parseJsonText(t,i),s=n.getCurrentDirectory();return o.path=e.toPath(t,s,e.createGetCanonicalFileName(n.useCaseSensitiveFileNames)),o.resolvedPath=o.path,o.originalFileName=o.fileName,k(o,n,e.getNormalizedAbsolutePath(e.getDirectoryPath(t),s),r,e.getNormalizedAbsolutePath(t,s))}a=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t),n.onUnRecoverableConfigFileDiagnostic(a)},e.readConfigFile=function(t,r){var n=v(t,r);return e.isString(n)?y(t,n):{config:{},error:n}},e.parseConfigFileTextToJson=y,e.readJsonConfigFile=h,e.convertToObject=D,e.convertToObjectWorker=x,e.convertToTSConfig=function(t,r,n){var a,o=e.createGetCanonicalFileName(n.useCaseSensitiveFileNames),s=e.map(e.filter(t.fileNames,t.configFileSpecs&&t.configFileSpecs.validatedIncludeSpecs?function(t,r,n){if(!r)return function(e){return!0};var i=e.getFileMatcherPatterns(t,n,r,e.sys.useCaseSensitiveFileNames,e.sys.getCurrentDirectory()),a=i.excludePattern&&e.getRegexFromPattern(i.excludePattern,e.sys.useCaseSensitiveFileNames),o=i.includeFilePattern&&e.getRegexFromPattern(i.includeFilePattern,e.sys.useCaseSensitiveFileNames);return o?a?function(e){return!(o.test(e)&&!a.test(e))}:function(e){return!o.test(e)}:a?function(e){return a.test(e)}:function(e){return!0}}(r,t.configFileSpecs.validatedIncludeSpecs,t.configFileSpecs.validatedExcludeSpecs):function(e){return!0}),function(t){return e.getRelativePathFromFile(e.getNormalizedAbsolutePath(r,n.getCurrentDirectory()),e.getNormalizedAbsolutePath(t,n.getCurrentDirectory()),o)}),c=E(t.options,{configFilePath:e.getNormalizedAbsolutePath(r,n.getCurrentDirectory()),useCaseSensitiveFileNames:n.useCaseSensitiveFileNames});return i({compilerOptions:i({},e.arrayFrom(c.entries()).reduce(function(e,t){var r;return i({},e,((r={})[t[0]]=t[1],r))},{}),{showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0}),references:e.map(t.projectReferences,function(e){return i({},e,{path:e.originalPath,originalPath:void 0})}),files:e.length(s)?s:void 0},t.configFileSpecs?{include:(a=t.configFileSpecs.validatedIncludeSpecs,e.length(a)?1!==e.length(a)?a:"**/*"===a[0]?void 0:a:void 0),exclude:t.configFileSpecs.validatedExcludeSpecs}:{},{compilerOnSave:!!t.compileOnSave||void 0})},e.generateTSConfig=function(t,r,n){var i=E(e.extend(t,e.defaultInitCompilerOptions));return function(){for(var t=e.createMultiMap(),c=0,u=e.optionDeclarations;c<u.length;c++){var l=u[c],_=l.category;s(l)&&t.add(e.getLocaleSpecificMessage(_),l)}var d=0,p=0,f=[],m=[];t.forEach(function(t,r){0!==f.length&&(f.push(""),m.push("")),f.push("/* "+r+" */"),m.push("");for(var n=0,o=t;n<o.length;n++){var s=o[n],c=void 0;c=i.has(s.name)?'"'+s.name+'": '+JSON.stringify(i.get(s.name))+((p+=1)===i.size?"":","):'// "'+s.name+'": '+JSON.stringify(a(s))+",",f.push(c),m.push("/* "+(s.description&&e.getLocaleSpecificMessage(s.description)||s.name)+" */"),d=Math.max(c.length,d)}});var g=o(2),y=[];y.push("{"),y.push(g+'"compilerOptions": {');for(var h=0;h<f.length;h++){var v=f[h],b=m[h];y.push(v&&""+g+g+v+(b&&o(d-v.length+2)+b))}if(r.length){y.push(g+"},"),y.push(g+'"files": [');for(var h=0;h<r.length;h++)y.push(""+g+g+JSON.stringify(r[h])+(h===r.length-1?"":","));y.push(g+"]")}else y.push(g+"}");return y.push("}"),y.join(n)+n}();function a(e){switch(e.type){case"number":return 1;case"boolean":return!0;case"string":return e.isFilePath?"./":"";case"list":return[];case"object":return{};default:return e.type.keys().next().value}}function o(e){return Array(e+1).join(" ")}function s(t){var r=t.category,n=t.name;return void 0!==r&&r!==e.Diagnostics.Command_line_Options&&(r!==e.Diagnostics.Advanced_Options||i.has(n))}},e.parseJsonConfigFileContent=function(e,t,r,n,i,a,o){return P(e,void 0,t,r,n,i,a,o)},e.parseJsonSourceFileConfigFileContent=k,e.setConfigFileInOptions=N,e.canJsonReportNoInutFiles=O,e.updateErrorForNoInputFiles=function(t,r,n,i,a){var o=i.length;return I(t,a)?i.push(w(n,r)):e.filterMutate(i,function(t){return!function(t){return t.code===e.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(t)}),o!==i.length},e.convertCompilerOptionsFromJson=function(e,t,r){var n=[];return{options:j(e,t,n,r),errors:n}},e.convertTypeAcquisitionFromJson=function(e,t,r){var n=[];return{options:z(e,t,n,r),errors:n}};var H=/(^|\/)\*\*\/?$/,G=/(^|\/)\*\*\/(.*\/)?\.\.($|\/)/,Y=/\/[^/]*?[*?][^/]*\//,X=/^[^*?]*(?=\/[^/]*[*?])/;function Q(t,r,n,i,a){void 0===a&&(a=[]),r=e.normalizePath(r);var o,s=i.useCaseSensitiveFileNames?e.identity:e.toLowerCase,c=e.createMap(),u=e.createMap(),l=e.createMap(),_=t.filesSpecs,d=t.validatedIncludeSpecs,p=t.validatedExcludeSpecs,f=t.wildcardDirectories,m=e.getSupportedExtensions(n,a),g=e.getSuppoertedExtensionsWithJsonIfResolveJsonModule(n,m);if(_)for(var y=0,h=_;y<h.length;y++){var v=h[y],b=e.getNormalizedAbsolutePath(v,r);c.set(s(b),b)}if(d&&d.length>0)for(var D=function(t){if(e.fileExtensionIs(t,".json")){if(!o){var n=d.filter(function(t){return e.endsWith(t,".json")}),a=e.map(e.getRegularExpressionsForWildcards(n,r,"files"),function(e){return"^"+e+"$"});o=a?a.map(function(t){return e.getRegexFromPattern(t,i.useCaseSensitiveFileNames)}):e.emptyArray}if(-1!==e.findIndex(o,function(e){return e.test(t)})){var _=s(t);c.has(_)||l.has(_)||l.set(_,t)}return"continue"}if(function(t,r,n,i,a){for(var o=e.getExtensionPriority(t,i),s=e.adjustExtensionPriority(o,i),c=0;c<s;c++){var u=i[c],l=a(e.changeExtension(t,u));if(r.has(l)||n.has(l))return!0}return!1}(t,c,u,m,s))return"continue";!function(t,r,n,i){for(var a=e.getExtensionPriority(t,n),o=e.getNextLowestExtensionPriority(a,n);o<n.length;o++){var s=n[o],c=i(e.changeExtension(t,s));r.delete(c)}}(t,u,m,s);var p=s(t);c.has(p)||u.has(p)||u.set(p,t)},x=0,S=i.readDirectory(r,g,p,d,void 0);x<S.length;x++){D(b=S[x])}var T=e.arrayFrom(c.values()),C=e.arrayFrom(u.values());return{fileNames:T.concat(C,e.arrayFrom(l.values())),wildcardDirectories:f,spec:t}}function $(t,r,n,i,a){return t.filter(function(t){var o=function(t,r){if(!r&&H.test(t))return e.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0;if(G.test(t))return e.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0}(t,n);return void 0!==o&&r.push(function(t,r){var n=e.getTsConfigPropArrayElementValue(i,a,r);return n?e.createDiagnosticForNodeInSourceFile(i,n,t,r):e.createCompilerDiagnostic(t,r)}(o,t)),void 0===o})}function Z(t,r){var n=X.exec(t);return n?{key:r?n[0]:n[0].toLowerCase(),flags:Y.test(t)?1:0}:e.isImplicitGlob(t)?{key:t,flags:1}:void 0}function ee(t,r){switch(r.type){case"object":case"string":return"";case"number":return"number"==typeof t?t:"";case"boolean":return"boolean"==typeof t?t:"";case"list":var n=r.element;return e.isArray(t)?t.map(function(e){return ee(e,n)}):"";default:return e.forEachEntry(r.type,function(e,r){if(e===t)return r})}}e.getFileNamesFromConfigSpecs=Q,e.convertCompilerOptionsForTelemetry=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=p(r);void 0!==n&&(t[r]=ee(e[r],n))}return t}}(c||(c={})),function(e){function t(t){t.trace(e.formatMessage.apply(void 0,arguments))}function r(e,t){return!!e.traceResolution&&void 0!==t.trace}function n(e,t){return t&&{path:t.path,extension:t.ext,packageId:e}}function a(e){return n(void 0,e)}function o(t){if(t)return e.Debug.assert(void 0===t.packageId),{path:t.path,ext:t.extension}}var s,c;function u(t){if(t)return e.Debug.assert(e.extensionIsTS(t.extension)),{fileName:t.path,packageId:t.packageId}}function l(e,t,r){return{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId},failedLookupLocations:r}}function _(r,n,i,a){if(e.hasProperty(r,n)){var o=r[n];if(f(o)===i&&null!==o)return o;a.traceEnabled&&t(a.host,e.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2,n,i,null===o?"null":f(o))}else a.traceEnabled&&t(a.host,e.Diagnostics.package_json_does_not_have_a_0_field,n)}function d(r,n,i,a){var o=_(r,n,"string",a);if(void 0!==o){var s=e.normalizePath(e.combinePaths(i,o));return a.traceEnabled&&t(a.host,e.Diagnostics.package_json_has_0_field_1_that_references_2,n,o,s),s}}function p(e,t,r){return d(e,"typings",t,r)||d(e,"types",t,r)}function m(e,t,r){return d(e,"main",t,r)}function g(r,n){var i=function(r,n){var i=_(r,"typesVersions","object",n);if(void 0!==i)return n.traceEnabled&&t(n.host,e.Diagnostics.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),i}(r,n);if(void 0!==i){if(n.traceEnabled)for(var a in i)e.hasProperty(i,a)&&!e.VersionRange.tryParse(a)&&t(n.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,a);var o=y(i);if(o){var s=o.version,c=o.paths;if("object"===f(c))return o;n.traceEnabled&&t(n.host,e.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2,"typesVersions['"+s+"']","object",f(c))}else n.traceEnabled&&t(n.host,e.Diagnostics.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,e.versionMajorMinor)}}function y(t){for(var r in c||(c=new e.Version(e.version)),t)if(e.hasProperty(t,r)){var n=e.VersionRange.tryParse(r);if(void 0!==n&&n.test(c))return{version:r,paths:t[r]}}}function h(t,r){return t.typeRoots?t.typeRoots:(t.configFilePath?n=e.getDirectoryPath(t.configFilePath):r.getCurrentDirectory&&(n=r.getCurrentDirectory()),void 0!==n?function(t,r){if(!r.directoryExists)return[e.combinePaths(t,v)];var n;return e.forEachAncestorDirectory(e.normalizePath(t),function(t){var i=e.combinePaths(t,v);r.directoryExists(i)&&(n||(n=[])).push(i)}),n}(n,r):void 0);var n}e.trace=t,e.isTraceEnabled=r,function(e){e[e.TypeScript=0]="TypeScript",e[e.JavaScript=1]="JavaScript",e[e.Json=2]="Json",e[e.TSConfig=3]="TSConfig",e[e.DtsOnly=4]="DtsOnly"}(s||(s={})),e.getPackageJsonTypesVersionsPaths=y,e.getEffectiveTypeRoots=h;var v=e.combinePaths("node_modules","@types");function b(){var t=e.createMap(),r=e.createMap();return{ownMap:t,redirectsMap:r,getOrCreateMapOfCacheRedirects:function(n){if(!n)return t;var i=n.sourceFile.path,a=r.get(i);a||(a=e.createMap(),r.set(i,a));return a},clear:function(){t.clear(),r.clear()}}}function D(t,r,n,i){return{getOrCreateCacheForDirectory:function(r,o){var s=e.toPath(r,n,i);return a(t,o,s,e.createMap)},getOrCreateCacheForModuleName:function(t,n){return e.Debug.assert(!e.isExternalModuleNameRelative(t)),a(r,n,t,o)}};function a(e,t,r,n){var i=e.getOrCreateMapOfCacheRedirects(t),a=i.get(r);return a||(a=n(),i.set(r,a)),a}function o(){var t=e.createMap();return{get:function(r){return t.get(e.toPath(r,n,i))},set:function(r,a){var o=e.toPath(r,n,i);if(t.has(o))return;t.set(o,a);var s=a.resolvedModule&&(a.resolvedModule.originalPath||a.resolvedModule.resolvedFileName),c=s&&function(t,r){var a=e.toPath(e.getDirectoryPath(r),n,i),o=0,s=Math.min(t.length,a.length);for(;o<s&&t.charCodeAt(o)===a.charCodeAt(o);)o++;if(o===t.length&&(a.length===o||a[o]===e.directorySeparator))return t;var c=e.getRootLength(t);if(o<c)return;var u=t.lastIndexOf(e.directorySeparator,o-1);if(-1===u)return;return t.substr(0,Math.max(u,c))}(o,s),u=o;for(;u!==c;){var l=e.getDirectoryPath(u);if(l===u||t.has(l))break;t.set(l,a),u=l}}}}}function x(r,n,i,a,o){var s=function(r,n,i,a){var o=a.compilerOptions,s=o.baseUrl,c=o.paths;if(s&&c&&!e.pathIsRelative(n))return a.traceEnabled&&(t(a.host,e.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,s,n),t(a.host,e.Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,n)),H(r,n,s,c,i,!1,a)}(r,n,a,o);return s?s.value:e.isExternalModuleNameRelative(n)?function(r,n,i,a,o){if(!o.compilerOptions.rootDirs)return;o.traceEnabled&&t(o.host,e.Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,n);for(var s,c,u=e.normalizePath(e.combinePaths(i,n)),l=0,_=o.compilerOptions.rootDirs;l<_.length;l++){var d=_[l],p=e.normalizePath(d);e.endsWith(p,e.directorySeparator)||(p+=e.directorySeparator);var f=e.startsWith(u,p)&&(void 0===c||c.length<p.length);o.traceEnabled&&t(o.host,e.Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2,p,u,f),f&&(c=p,s=d)}if(c){o.traceEnabled&&t(o.host,e.Diagnostics.Longest_matching_prefix_for_0_is_1,u,c);var m=u.substr(c.length);o.traceEnabled&&t(o.host,e.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2,m,c,u);var g=a(r,u,!e.directoryProbablyExists(i,o.host),o);if(g)return g;o.traceEnabled&&t(o.host,e.Diagnostics.Trying_other_entries_in_rootDirs);for(var y=0,h=o.compilerOptions.rootDirs;y<h.length;y++){var d=h[y];if(d!==s){var v=e.combinePaths(e.normalizePath(d),m);o.traceEnabled&&t(o.host,e.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2,m,d,v);var b=e.getDirectoryPath(v),D=a(r,v,!e.directoryProbablyExists(b,o.host),o);if(D)return D}}o.traceEnabled&&t(o.host,e.Diagnostics.Module_resolution_using_rootDirs_has_failed)}return}(r,n,i,a,o):function(r,n,i,a){var o=a.compilerOptions.baseUrl;if(!o)return;a.traceEnabled&&t(a.host,e.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,o,n);var s=e.normalizePath(e.combinePaths(o,n));a.traceEnabled&&t(a.host,e.Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2,n,o,s);return i(r,s,!e.directoryProbablyExists(e.getDirectoryPath(s),a.host),a)}(r,n,a,o)}e.resolveTypeReferenceDirective=function(n,i,a,o,c){var l=r(a,o);c&&(a=c.commandLine.options);var _=[],d={compilerOptions:a,host:o,traceEnabled:l,failedLookupLocations:_},p=h(a,o);l&&(void 0===i?void 0===p?t(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,n):t(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,n,p):void 0===p?t(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,n,i):t(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,n,i,p),c&&t(o,e.Diagnostics.Using_compiler_options_of_project_reference_redirect_0,c.sourceFile.fileName));var f,m=function(){if(p&&p.length)return l&&t(o,e.Diagnostics.Resolving_with_primary_search_path_0,p.join(", ")),e.firstDefined(p,function(r){var i=e.combinePaths(r,n),a=e.getDirectoryPath(i),c=e.directoryProbablyExists(a,o);return!c&&l&&t(o,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,a),u(j(s.DtsOnly,i,!c,d))});l&&t(o,e.Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),g=!0;if(m||(m=function(){var r=i&&e.getDirectoryPath(i);if(void 0!==r){l&&t(o,e.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0,r);var a=void 0;if(e.isExternalModuleNameRelative(n)){var c=e.normalizePathAndParts(e.combinePaths(r,n)).path;a=P(s.DtsOnly,c,!1,d,!0)}else{var _=U(s.DtsOnly,n,r,d,void 0,void 0);a=_&&_.value}var p=u(a);return!p&&l&&t(o,e.Diagnostics.Type_reference_directive_0_was_not_resolved,n),p}l&&t(o,e.Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),g=!1),m){var y=m.fileName,v=m.packageId,b=a.preserveSymlinks?y:F(y,o,l);l&&t(o,e.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,n,b,g),f={primary:g,resolvedFileName:b,packageId:v,isExternalLibraryImport:w(y)}}return{resolvedTypeReferenceDirective:f,failedLookupLocations:_}},e.getAutomaticTypeDirectiveNames=function(t,r){if(t.types)return t.types;var n=[];if(r.directoryExists&&r.getDirectories){var i=h(t,r);if(i)for(var a=0,o=i;a<o.length;a++){var s=o[a];if(r.directoryExists(s))for(var c=0,u=r.getDirectories(s);c<u.length;c++){var l=u[c],_=e.normalizePath(l),d=e.combinePaths(s,_,"package.json");if(!r.fileExists(d)||null!==e.readJson(d,r).typings){var p=e.getBaseFileName(_);46!==p.charCodeAt(0)&&n.push(p)}}}}return n},e.createModuleResolutionCache=function(e,t){return D(b(),b(),e,t)},e.createCacheWithRedirects=b,e.createModuleResolutionCacheWithMaps=D,e.resolveModuleNameFromCache=function(t,r,n){var i=e.getDirectoryPath(r),a=n&&n.getOrCreateCacheForDirectory(i);return a&&a.get(t)},e.resolveModuleName=function(n,i,a,o,s,c){var u=r(a,o);c&&(a=c.commandLine.options),u&&(t(o,e.Diagnostics.Resolving_module_0_from_1,n,i),c&&t(o,e.Diagnostics.Using_compiler_options_of_project_reference_redirect_0,c.sourceFile.fileName));var l=e.getDirectoryPath(i),_=s&&s.getOrCreateCacheForDirectory(l,c),d=_&&_.get(n);if(d)u&&t(o,e.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1,n,l);else{var p=a.moduleResolution;switch(void 0===p?(p=e.getEmitModuleKind(a)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic,u&&t(o,e.Diagnostics.Module_resolution_kind_is_not_specified_using_0,e.ModuleResolutionKind[p])):u&&t(o,e.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0,e.ModuleResolutionKind[p]),p){case e.ModuleResolutionKind.NodeJs:d=N(n,i,a,o,s,c);break;case e.ModuleResolutionKind.Classic:d=$(n,i,a,o,s,c);break;default:return e.Debug.fail("Unexpected moduleResolution: "+p)}_&&(_.set(n,d),e.isExternalModuleNameRelative(n)||s.getOrCreateCacheForModuleName(n,c).set(l,d))}return u&&(d.resolvedModule?t(o,e.Diagnostics.Module_name_0_was_successfully_resolved_to_1,n,d.resolvedModule.resolvedFileName):t(o,e.Diagnostics.Module_name_0_was_not_resolved,n)),d},e.resolveJSModule=function(e,t,r){var n=k(e,t,r),i=n.resolvedModule,a=n.failedLookupLocations;if(!i)throw new Error("Could not resolve JS module '"+e+"' starting at '"+t+"'. Looked in: "+a.join(", "));return i.resolvedFileName},e.tryResolveJSModule=function(e,t,r){var n=k(e,t,r).resolvedModule;return n&&n.resolvedFileName};var S=[s.JavaScript],T=[s.TypeScript,s.JavaScript],C=T.concat([s.Json]),E=[s.TSConfig];function k(t,r,n){return A(t,r,{moduleResolution:e.ModuleResolutionKind.NodeJs,allowJs:!0},n,void 0,S,void 0)}function N(t,r,n,i,a,o,s){return A(t,e.getDirectoryPath(r),n,i,a,s?E:n.resolveJsonModule?C:T,o)}function A(n,a,o,c,u,_,d){var p=r(o,c),f=[],m={compilerOptions:o,host:c,traceEnabled:p,failedLookupLocations:f},g=e.forEach(_,function(r){return function(r){var l=x(r,n,a,function(e,t,r,n){return P(e,t,r,n,!0)},m);if(l)return Z({resolved:l,isExternalLibraryImport:w(l.path)});if(e.isExternalModuleNameRelative(n)){var _=e.normalizePathAndParts(e.combinePaths(a,n)),f=_.path,g=_.parts,y=P(r,f,!1,m,!0);return y&&Z({resolved:y,isExternalLibraryImport:e.contains(g,"node_modules")})}p&&t(c,e.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1,n,s[r]);var h=U(r,n,a,m,u,d);if(!h)return;var v=h.value;if(!o.preserveSymlinks&&v&&!v.originalPath){var b=F(v.path,c,p),D=b===v.path?void 0:v.path;v=i({},v,{path:b,originalPath:D})}return{value:v&&{resolved:v,isExternalLibraryImport:!0}}}(r)});if(g&&g.value){var y=g.value;return l(y.resolved,y.isExternalLibraryImport,f)}return{resolvedModule:void 0,failedLookupLocations:f}}function F(r,n,i){if(!n.realpath)return r;var a=e.normalizePath(n.realpath(r));return i&&t(n,e.Diagnostics.Resolving_real_path_for_0_result_1,r,a),e.Debug.assert(n.fileExists(a),r+" linked to nonexistent file "+a),a}function P(r,i,a,o,c){if(o.traceEnabled&&t(o.host,e.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1,i,s[r]),!e.hasTrailingDirectorySeparator(i)){if(!a){var u=e.getDirectoryPath(i);e.directoryProbablyExists(u,o.host)||(o.traceEnabled&&t(o.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,u),a=!0)}var l=L(r,i,a,o);if(l){var _=c?function(t){var r=e.normalizePath(t.path),n=r.lastIndexOf(e.nodeModulesPathPart);if(-1===n)return;var i=n+e.nodeModulesPathPart.length,a=I(r,i);64===r.charCodeAt(i)&&(a=I(r,a));var o=r.slice(0,a),s=e.removeExtension(r.slice(a+1),t.ext)+".d.ts";return{packageDirectory:o,subModuleName:s}}(l):void 0,d=_&&J(_.packageDirectory,_.subModuleName,!1,o);return n(d&&d.packageId,l)}}a||(e.directoryProbablyExists(i,o.host)||(o.traceEnabled&&t(o.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,i),a=!0));return j(r,i,a,o,c)}function w(t){return e.stringContains(t,e.nodeModulesPathPart)}function I(t,r){var n=t.indexOf(e.directorySeparator,r+1);return-1===n?r:n}function O(t){return""===t?"index.d.ts":e.endsWith(t,".d.ts")?t:"index"===t||e.endsWith(t,"/index")?t+".d.ts":t+"/index.d.ts"}function M(e,t,r,n){return a(L(e,t,r,n))}function L(r,n,i,a){if(r===s.Json||r===s.TSConfig){var o=e.tryRemoveExtension(n,".json");return void 0===o&&r===s.Json?void 0:R(o||n,r,i,a)}var c=R(n,r,i,a);if(c)return c;if(e.hasJSFileExtension(n)){var u=e.removeFileExtension(n);if(a.traceEnabled){var l=n.substring(u.length);t(a.host,e.Diagnostics.File_name_0_has_a_1_extension_stripping_it,n,l)}return R(u,r,i,a)}}function R(t,r,n,i){if(!n){var a=e.getDirectoryPath(t);a&&(n=!e.directoryProbablyExists(a,i.host))}switch(r){case s.DtsOnly:return o(".d.ts");case s.TypeScript:return o(".ts")||o(".tsx")||o(".d.ts");case s.JavaScript:return o(".js")||o(".jsx");case s.TSConfig:case s.Json:return o(".json")}function o(e){var r=B(t+e,n,i);return void 0===r?void 0:{path:r,ext:e}}}function B(r,n,i){if(!n){if(i.host.fileExists(r))return i.traceEnabled&&t(i.host,e.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result,r),r;i.traceEnabled&&t(i.host,e.Diagnostics.File_0_does_not_exist,r)}i.failedLookupLocations.push(r)}function j(e,t,r,i,a){void 0===a&&(a=!0);var o=a?J(t,"",r,i):void 0,s=o&&o.packageId,c=o&&o.packageJsonContent;return n(s,z(e,t,r,i,c,c&&g(c,i)))}function J(r,n,i,a){var o=a.host,s=a.traceEnabled,c=!i&&e.directoryProbablyExists(r,o),u=e.combinePaths(r,"package.json");if(c&&o.fileExists(u)){var l=e.readJson(u,o);if(""===n){var _=p(l,r,a);if("string"==typeof _)n=O(_.substring(r.length+1));else{var d=m(l,r,a);if("string"==typeof d&&d.length>r.length){var f=d.substring(r.length+1);n=(e.forEach(e.supportedJSExtensions,function(t){return e.tryRemoveExtension(f,t)})||f)+".d.ts"}else n="index.d.ts"}}e.endsWith(n,".d.ts")||(n=O(n));var y=g(l,a),h="string"==typeof l.name&&"string"==typeof l.version?{name:l.name,subModuleName:n,version:l.version}:void 0;return s&&(h?t(o,e.Diagnostics.Found_package_json_at_0_Package_ID_is_1,u,e.packageIdToString(h)):t(o,e.Diagnostics.Found_package_json_at_0,u)),{packageJsonContent:l,packageId:h,versionPaths:y}}c&&s&&t(o,e.Diagnostics.File_0_does_not_exist,u),a.failedLookupLocations.push(u)}function z(r,n,i,c,u,l){var _;if(u)switch(r){case s.JavaScript:case s.Json:_=m(u,n,c);break;case s.TypeScript:_=p(u,n,c)||m(u,n,c);break;case s.DtsOnly:_=p(u,n,c);break;case s.TSConfig:_=function(e,t,r){return d(e,"tsconfig",t,r)}(u,n,c);break;default:return e.Debug.assertNever(r)}var f=function(r,n,i,o){var c=B(n,i,o);if(c){var u=function(t,r){var n=e.tryGetExtensionFromPath(r);return void 0!==n&&function(e,t){switch(e){case s.JavaScript:return".js"===t||".jsx"===t;case s.TSConfig:case s.Json:return".json"===t;case s.TypeScript:return".ts"===t||".tsx"===t||".d.ts"===t;case s.DtsOnly:return".d.ts"===t}}(t,n)?{path:r,ext:n}:void 0}(r,c);if(u)return a(u);o.traceEnabled&&t(o.host,e.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it,c)}return P(r===s.DtsOnly?s.TypeScript:r,n,i,o,!1)},g=_?!e.directoryProbablyExists(e.getDirectoryPath(_),c.host):void 0,y=i||!e.directoryProbablyExists(n,c.host),h=e.combinePaths(n,r===s.TSConfig?"tsconfig":"index");if(l&&(!_||e.containsPath(n,_))){var v=e.getRelativePathFromDirectory(n,_||h,!1);c.traceEnabled&&t(c.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,l.version,e.version,v);var b=H(r,v,n,l.paths,f,g||y,c);if(b)return o(b.value)}var D=_&&o(f(r,_,g,c));return D||L(r,h,y,c)}function K(t){var r=t.indexOf(e.directorySeparator);return"@"===t[0]&&(r=t.indexOf(e.directorySeparator,r+1)),-1===r?{packageName:t,rest:""}:{packageName:t.slice(0,r),rest:t.slice(r+1)}}function U(e,t,r,n,i,a){return V(e,t,r,n,!1,i,a)}function V(t,r,n,i,a,o,s){var c=o&&o.getOrCreateCacheForModuleName(r,s);return e.forEachAncestorDirectory(e.normalizeSlashes(n),function(n){if("node_modules"!==e.getBaseFileName(n)){var o=Q(c,r,n,i);return o||Z(q(t,r,n,i,a))}})}function q(r,n,i,a,o){var c=e.combinePaths(i,"node_modules"),u=e.directoryProbablyExists(c,a.host);!u&&a.traceEnabled&&t(a.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,c);var l=o?void 0:W(r,n,c,u,a);if(l)return l;if(r===s.TypeScript||r===s.DtsOnly){var _=e.combinePaths(c,"@types"),d=u;return u&&!e.directoryProbablyExists(_,a.host)&&(a.traceEnabled&&t(a.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,_),d=!1),W(s.DtsOnly,function(r,n){var i=Y(r);n.traceEnabled&&i!==r&&t(n.host,e.Diagnostics.Scoped_package_detected_looking_in_0,i);return i}(n,a),_,d,a)}}function W(r,i,o,s,c){var u,l,_,d=e.normalizePath(e.combinePaths(o,i)),p=J(d,"",!s,c);if(p){u=p.packageJsonContent,l=p.packageId,_=p.versionPaths;var f=L(r,d,!s,c);if(f)return a(f);var m=z(r,d,!s,c,u,_);return n(l,m)}var g=function(e,t,r,i){var a=L(e,t,r,i)||z(e,t,r,i,u,_);return n(l,a)},y=K(i),h=y.packageName,v=y.rest;if(""!==v){var b=e.combinePaths(o,h),D=J(b,v,!s,c);if(D&&(l=D.packageId,_=D.versionPaths),_){c.traceEnabled&&t(c.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,_.version,e.version,v);var x=s&&e.directoryProbablyExists(b,c.host),S=H(r,v,b,_.paths,g,!x,c);if(S)return S.value}}return g(r,d,!s,c)}function H(r,n,i,o,s,c,u){var l=e.matchPatternOrExact(e.getOwnKeys(o),n);if(l){var _=e.isString(l)?void 0:e.matchedText(l,n),d=e.isString(l)?l:e.patternText(l);return u.traceEnabled&&t(u.host,e.Diagnostics.Module_name_0_matched_pattern_1,n,d),{value:e.forEach(o[d],function(n){var o=_?n.replace("*",_):n,l=e.normalizePath(e.combinePaths(i,o));u.traceEnabled&&t(u.host,e.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1,n,o);var d=e.tryGetExtensionFromPath(l);if(void 0!==d){var p=B(l,c,u);if(void 0!==p)return a({path:p,ext:d})}return s(r,l,c||!e.directoryProbablyExists(e.getDirectoryPath(l),u.host),u)})}}}e.nodeModuleNameResolver=N,e.nodeModulesPathPart="/node_modules/",e.pathContainsNodeModules=w,e.parsePackageName=K;var G="__";function Y(t){if(e.startsWith(t,"@")){var r=t.replace(e.directorySeparator,G);if(r!==t)return r.slice(1)}return t}function X(t){return e.stringContains(t,G)?"@"+t.replace(G,e.directorySeparator):t}function Q(r,n,i,a){var o,s=r&&r.get(i);if(s)return a.traceEnabled&&t(a.host,e.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1,n,i),(o=a.failedLookupLocations).push.apply(o,s.failedLookupLocations),{value:s.resolvedModule&&{path:s.resolvedModule.resolvedFileName,originalPath:s.resolvedModule.originalPath||!0,extension:s.resolvedModule.extension,packageId:s.resolvedModule.packageId}}}function $(t,n,i,a,o,c){var u=[],_={compilerOptions:i,host:a,traceEnabled:r(i,a),failedLookupLocations:u},d=e.getDirectoryPath(n),p=f(s.TypeScript)||f(s.JavaScript);return l(p&&p.value,!1,u);function f(r){var n=x(r,t,d,M,_);if(n)return{value:n};if(e.isExternalModuleNameRelative(t)){var i=e.normalizePath(e.combinePaths(d,t));return Z(M(r,i,!1,_))}var a=o&&o.getOrCreateCacheForModuleName(t,c),u=e.forEachAncestorDirectory(d,function(n){var i=Q(a,t,n,_);if(i)return i;var o=e.normalizePath(e.combinePaths(n,t));return Z(M(r,o,!1,_))});return u||(r===s.TypeScript?function(e,t,r){return V(s.DtsOnly,e,t,r,!0,void 0,void 0)}(t,d,_):void 0)}}function Z(e){return void 0!==e?{value:e}:void 0}e.getTypesPackageName=function(e){return"@types/"+Y(e)},e.mangleScopedPackageName=Y,e.getPackageNameFromTypesPackageName=function(t){var r=e.removePrefix(t,"@types/");return r!==t?X(r):t},e.unmangleScopedPackageName=X,e.classicNameResolver=$,e.loadModuleFromGlobalCache=function(n,i,a,o,c){var u=r(a,o);u&&t(o,e.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,i,n,c);var _=[],d={compilerOptions:a,host:o,traceEnabled:u,failedLookupLocations:_};return l(q(s.DtsOnly,n,c,d,!1),!0,_)}}(c||(c={})),function(e){var t;function r(t){return t.body?function t(n){switch(n.kind){case 241:case 242:return 0;case 243:if(e.isEnumConst(n))return 2;break;case 249:case 248:if(!e.hasModifier(n,1))return 0;break;case 245:var i=0;return e.forEachChild(n,function(r){var n=t(r);switch(n){case 0:return;case 2:return void(i=2);case 1:return i=1,!0;default:e.Debug.assertNever(n)}}),i;case 244:return r(n);case 72:if(n.isInJSDocNamespace)return 0}return 1}(t.body):1}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={})),e.getModuleInstanceState=r,function(e){e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethod=128]="IsObjectLiteralOrClassExpressionMethod"}(t||(t={}));var n=e.identity,a=function(){var t,a,_,f,m,g,y,h,v,b,D,x,S,T,C,E,k,N,A,F,P,w,I,O,M=0,L={flags:1},R={flags:1},B=0;function j(r,n,i,a,o){return e.createDiagnosticForNodeInSourceFile(e.getSourceFileOfNode(r)||t,r,n,i,a,o)}return function(r,n){t=r,a=n,_=e.getEmitScriptTarget(a),P=function(t,r){return!(!e.getStrictOptionValue(r,"alwaysStrict")||t.isDeclarationFile)||!!t.externalModuleIndicator}(t,n),I=e.createUnderscoreEscapedMap(),M=0,O=t.isDeclarationFile,w=e.objectAllocator.getSymbolConstructor(),t.locals||(Pe(t),t.symbolCount=M,t.classifiableNames=I,function(){if(!v)return;for(var r=m,n=h,i=y,a=f,o=D,s=0,c=v;s<c.length;s++){var u=c[s],l=e.getJSDocHost(u);m=e.findAncestor(l.parent,function(e){return!!(1&he(e))})||t,y=e.getEnclosingBlockScopeContainer(l)||t,D={flags:2},f=u,Pe(u.typeExpression),u.fullName&&72!==u.fullName.kind?Pe(u.fullName):(f=u.parent,Te(u,524288,67897832))}m=r,h=n,y=i,f=a,D=o}());t=void 0,a=void 0,_=void 0,f=void 0,m=void 0,g=void 0,y=void 0,h=void 0,v=void 0,b=!1,D=void 0,x=void 0,S=void 0,T=void 0,C=void 0,E=void 0,N=void 0,A=!1,F=0,B=0};function J(e,t){return M++,new w(e,t)}function z(t,r,n){t.flags|=n,r.symbol=t,t.declarations=e.append(t.declarations,r),1955&n&&!t.exports&&(t.exports=e.createSymbolTable()),6240&n&&!t.members&&(t.members=e.createSymbolTable()),t.constEnumOnlyModule&&304&t.flags&&(t.constEnumOnlyModule=!1),67220415&n&&K(t,r)}function K(t,r){var n=t.valueDeclaration;(!n||e.isAssignmentDeclaration(n)&&!e.isAssignmentDeclaration(r)||n.kind!==r.kind&&e.isEffectiveModuleDeclaration(n))&&(t.valueDeclaration=r)}function U(t){if(254===t.kind)return t.isExportEquals?"export=":"default";var r=e.getNameOfDeclaration(t);if(r){if(e.isAmbientModule(t)){var n=e.getTextOfIdentifierOrLiteral(r);return e.isGlobalScopeAugmentation(t)?"__global":'"'+n+'"'}if(149===r.kind){var i=r.expression;return e.isStringOrNumericLiteralLike(i)?e.escapeLeadingUnderscores(i.text):(e.Debug.assert(e.isWellKnownSymbolSyntactically(i)),e.getPropertyNameForKnownSymbolName(e.idText(i.name)))}return e.isPropertyNameLiteral(r)?e.getEscapedTextOfIdentifierOrLiteral(r):void 0}switch(t.kind){case 157:return"__constructor";case 165:case 160:case 298:return"__call";case 166:case 161:return"__new";case 162:return"__index";case 255:return"__export";case 284:return"export=";case 204:if(2===e.getAssignmentDeclarationKind(t))return"export=";e.Debug.fail("Unknown binary declaration kind");break;case 294:return e.isJSDocConstructSignature(t)?"__new":"__call";case 151:e.Debug.assert(294===t.parent.kind,"Impossible parameter parent kind",function(){return"parent is: "+(e.SyntaxKind?e.SyntaxKind[t.parent.kind]:t.parent.kind)+", expected JSDocFunctionType"});var a=t.parent,o=a.parameters.indexOf(t);return"arg"+o}}function V(t){return e.isNamedDeclaration(t)?e.declarationNameToString(t.name):e.unescapeLeadingUnderscores(e.Debug.assertDefined(U(t)))}function q(r,n,i,a,o,s){e.Debug.assert(!e.hasDynamicName(i));var c,u=e.hasModifier(i,512),l=u&&n?"default":U(i);if(void 0===l)c=J(0,"__missing");else if(c=r.get(l),2885600&a&&I.set(l,!0),c){if(s&&!c.isReplaceableByMethod)return c;if(c.flags&o)if(c.isReplaceableByMethod)r.set(l,c=J(0,l));else if(!(3&a&&67108864&c.flags)){e.isNamedDeclaration(i)&&(i.name.parent=i);var _=2&c.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,d=!0;(384&c.flags||384&a)&&(_=e.Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,d=!1);var p=!1;e.length(c.declarations)&&(u?(_=e.Diagnostics.A_module_cannot_have_multiple_default_exports,d=!1,p=!0):c.declarations&&c.declarations.length&&254===i.kind&&!i.isExportEquals&&(_=e.Diagnostics.A_module_cannot_have_multiple_default_exports,d=!1,p=!0));var f=e.getNameOfDeclaration(i)||i,m=[];e.forEach(c.declarations,function(r,n){var i=e.getNameOfDeclaration(r)||r,a=j(i,_,d?V(r):void 0);t.bindDiagnostics.push(p?e.addRelatedInfo(a,j(f,0===n?e.Diagnostics.Another_export_default_is_here:e.Diagnostics.and_here)):a),p&&m.push(j(i,e.Diagnostics.The_first_export_default_is_here))});var g=j(f,_,d?V(i):void 0);t.bindDiagnostics.push(p?e.addRelatedInfo.apply(void 0,[g].concat(m)):g),c=J(0,l)}}else r.set(l,c=J(0,l)),s&&(c.isReplaceableByMethod=!0);return z(c,i,a),c.parent?e.Debug.assert(c.parent===n,"Existing symbol parent should match new one"):c.parent=n,c}function W(t,r,n){var i=1&e.getCombinedModifierFlags(t);if(2097152&r)return 257===t.kind||248===t.kind&&i?q(m.symbol.exports,m.symbol,t,r,n):q(m.locals,void 0,t,r,n);if(e.isJSDocTypeAlias(t)&&e.Debug.assert(e.isInJSFile(t)),!e.isAmbientModule(t)&&(i||32&m.flags)||e.isJSDocTypeAlias(t)){if(e.hasModifier(t,512)&&!U(t))return q(m.symbol.exports,m.symbol,t,r,n);var a=67220415&r?1048576:0,o=q(m.locals,void 0,t,a,n);return o.exportSymbol=q(m.symbol.exports,m.symbol,t,r,n),t.localSymbol=o,o}return q(m.locals,void 0,t,r,n)}function H(e){if(O)Q(e);else if(536870912&e.transformFlags)O=!0,Q(e),O=!1,B|=e.transformFlags&~d(e.kind);else{var t=B;B=0,Q(e),B=t|l(e,B)}}function G(e){Y(e,function(e){return 239===e.kind?Pe(e):void 0}),Y(e,function(e){return 239!==e.kind?Pe(e):void 0})}function Y(t,r){if(void 0===r&&(r=Pe),void 0!==t)if(O)e.forEach(t,r);else{var n=B;B=0;for(var i=0,a=0,o=t;a<o.length;a++){var s=o[a];r(s),i|=-536870913&s.transformFlags}t.transformFlags=536870912|i,B|=n}}function X(t){e.forEachChild(t,Pe,Y)}function Q(t){if(function(t){if(!(1&D.flags))return!1;if(D===L){var n=e.isStatementButNotDeclaration(t)&&220!==t.kind||240===t.kind||244===t.kind&&function(e){var t=r(e);return 1===t||2===t&&!!a.preserveConstEnums}(t);if(n&&(D=R,!a.allowUnreachableCode)){var i=e.unreachableCodeIsError(a)&&!(4194304&t.flags)&&(!e.isVariableStatement(t)||!!(3&e.getCombinedNodeFlags(t.declarationList))||t.declarationList.declarations.some(function(e){return!!e.initializer}));!function(t,r){if(e.isStatement(t)&&o(t)&&e.isBlock(t.parent)){var n=t.parent.statements,i=e.sliceAfter(n,t);e.getRangesWhere(i,o,function(e,t){return r(i[e],i[t-1])})}else r(t,t)}(t,function(t,r){return Fe(i,t,r,e.Diagnostics.Unreachable_code_detected)})}}return!0}(t))return X(t),void we(t);switch(t.kind){case 224:!function(e){var t=ne(),r=re(),n=re();ae(t,D),D=t,de(e.expression,r,n),D=le(r),pe(e.statement,n,t),ae(t,D),D=le(n)}(t);break;case 223:!function(t){var r=ne(),n=233===t.parent.kind?e.lastOrUndefined(N):void 0,i=n?n.continueTarget:re(),a=n?n.breakTarget:re();ae(r,D),D=r,pe(t.statement,a,i),ae(i,D),D=le(i),de(t.expression,r,a),D=le(a)}(t);break;case 225:!function(e){var t=ne(),r=re(),n=re();Pe(e.initializer),ae(t,D),D=t,de(e.condition,r,n),D=le(r),pe(e.statement,n,t),Pe(e.incrementor),ae(t,D),D=le(n)}(t);break;case 226:case 227:!function(e){var t=ne(),r=re();ae(t,D),D=t,227===e.kind&&Pe(e.awaitModifier);Pe(e.expression),ae(r,D),Pe(e.initializer),238!==e.initializer.kind&&ge(e.initializer);pe(e.statement,r,t),ae(t,D),D=le(r)}(t);break;case 222:!function(e){var t=re(),r=re(),n=re();de(e.expression,t,r),D=le(t),Pe(e.thenStatement),ae(n,D),D=le(r),Pe(e.elseStatement),ae(n,D),D=le(n)}(t);break;case 230:case 234:!function(e){Pe(e.expression),230===e.kind&&(A=!0,T&&ae(T,D));D=L}(t);break;case 229:case 228:!function(e){if(Pe(e.label),e.label){var t=function(e){if(N)for(var t=0,r=N;t<r.length;t++){var n=r[t];if(n.name===e)return n}return}(e.label.escapedText);t&&(t.referenced=!0,fe(e,t.breakTarget,t.continueTarget))}else fe(e,x,S)}(t);break;case 235:!function(e){var t=re(),r=D,i=[],a=n;(e.catchClause||e.finallyBlock)&&(n=function(e){return i.push(e),e});Pe(e.tryBlock),n=a,ae(t,D);var o=D,s=L;if(e.catchClause){if(D=r,i.length){var c=re();ae(c,D);for(var u=0,l=i;u<l.length;u++){var _=l[u];ae(c,_)}D=le(c)}Pe(e.catchClause),ae(t,D),s=D}if(e.finallyBlock){var d=r;if(!e.catchClause&&i.length){var p=re();ae(p,r);for(var f=0,m=i;f<m.length;f++){var _=m[f];ae(p,_)}d=le(p)}var g={flags:2048,antecedent:d,lock:{}};if(ae(t,g),D=le(t),Pe(e.finallyBlock),1&D.flags||1&o.flags&&1&s.flags&&(D=o===R||s===R?R:L),!(1&D.flags)){var y=n({flags:4096,antecedent:D});g.lock=y,D=y}}else D=le(t)}(t);break;case 232:!function(t){var r=re();Pe(t.expression);var n=x,i=k;x=r,k=D,Pe(t.caseBlock),ae(r,D);var a=e.forEach(t.caseBlock.clauses,function(e){return 272===e.kind});t.possiblyExhaustive=!a&&!r.antecedents,a||ae(r,se(k,t,0,0));x=n,k=i,D=le(r)}(t);break;case 246:!function(t){var r=B;B=0;for(var n=t.clauses,i=L,o=0;o<n.length;o++){for(var s=o;!n[o].statements.length&&o+1<n.length;)Pe(n[o]),o++;var c=re();ae(c,se(k,t.parent,s,o+1)),ae(c,i),D=le(c);var u=n[o];Pe(u),i=D,1&D.flags||o===n.length-1||!a.noFallthroughCasesInSwitch||Ae(u,e.Diagnostics.Fallthrough_case_in_switch)}n.transformFlags=536870912|B,B|=r}(t);break;case 271:!function(e){var t=D;D=k,Pe(e.expression),D=t,Y(e.statements)}(t);break;case 233:!function(t){var r=ne(),n=re();Pe(t.label),ae(r,D);var i=function(e,t,r){var n={name:e,breakTarget:t,continueTarget:r,referenced:!1};return(N||(N=[])).push(n),n}(t.label.escapedText,n,r);Pe(t.statement),N.pop(),i.referenced||a.allowUnusedLabels||function(e,t,r){Fe(e,t,t,r)}(e.unusedLabelIsError(a),t.label,e.Diagnostics.Unused_label);t.statement&&223===t.statement.kind||(ae(n,D),D=le(n))}(t);break;case 202:!function(e){if(52===e.operator){var t=C;C=E,E=t,X(e),E=C,C=t}else X(e),44!==e.operator&&45!==e.operator||ge(e.operand)}(t);break;case 203:!function(e){X(e),(44===e.operator||45===e.operator)&&ge(e.operand)}(t);break;case 204:!function(t){var r=t.operatorToken.kind;if(54===r||55===r)if(function(e){for(;195===e.parent.kind||202===e.parent.kind&&52===e.parent.operator;)e=e.parent;return!function(e){var t=e.parent;switch(t.kind){case 222:case 224:case 223:return t.expression===e;case 225:case 205:return t.condition===e}return!1}(e)&&!_e(e.parent)}(t)){var n=re();ye(t,n,n),D=le(n)}else ye(t,C,E);else if(X(t),e.isAssignmentOperator(r)&&!e.isAssignmentTarget(t)&&(ge(t.left),59===r&&190===t.left.kind)){var i=t.left;te(i.expression)&&(D=ue(D,t))}}(t);break;case 198:!function(e){X(e),189===e.expression.kind&&ge(e.expression)}(t);break;case 205:!function(e){var t=re(),r=re(),n=re();de(e.condition,t,r),D=le(t),Pe(e.questionToken),Pe(e.whenTrue),ae(n,D),D=le(r),Pe(e.colonToken),Pe(e.whenFalse),ae(n,D),D=le(n)}(t);break;case 237:!function(t){X(t),(t.initializer||e.isForInOrOfStatement(t.parent.parent))&&function t(r){var n=e.isOmittedExpression(r)?void 0:r.name;if(e.isBindingPattern(n))for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];t(o)}else D=ce(D,r)}(t)}(t);break;case 191:!function(t){var r=t.expression;for(;195===r.kind;)r=r.expression;196===r.kind||197===r.kind?(Y(t.typeArguments),Y(t.arguments),Pe(t.expression)):X(t);if(189===t.expression.kind){var n=t.expression;te(n.expression)&&e.isPushOrUnshiftIdentifier(n.name)&&(D=ue(D,t))}}(t);break;case 309:case 302:!function(e){e.tagName.parent=e,e.fullName&&p(e,e.fullName)}(t);break;case 284:G(t.statements),Pe(t.endOfFileToken);break;case 218:case 245:G(t.statements);break;default:X(t)}we(t)}function $(t){switch(t.kind){case 72:case 100:case 189:case 190:return Z(t);case 191:return function(e){if(e.arguments)for(var t=0,r=e.arguments;t<r.length;t++){var n=r[t];if(Z(n))return!0}if(189===e.expression.kind&&Z(e.expression.expression))return!0;return!1}(t);case 195:return $(t.expression);case 204:return function(t){switch(t.operatorToken.kind){case 59:return Z(t.left);case 33:case 34:case 35:case 36:return te(t.left)||te(t.right)||ee(t.right,t.left)||ee(t.left,t.right);case 94:return te(t.left);case 93:return r=t.left,n=t.right,e.isStringLiteralLike(r)&&$(n);case 27:return $(t.right)}var r,n;return!1}(t);case 202:return 52===t.operator&&$(t.operand);case 199:return $(t.expression)}return!1}function Z(t){return 72===t.kind||100===t.kind||98===t.kind||(e.isPropertyAccessExpression(t)||e.isNonNullExpression(t)||e.isParenthesizedExpression(t))&&Z(t.expression)||e.isElementAccessExpression(t)&&t.argumentExpression&&(e.isStringLiteral(t.argumentExpression)||e.isNumericLiteral(t.argumentExpression))&&Z(t.expression)}function ee(t,r){return e.isTypeOfExpression(t)&&te(t.expression)&&e.isStringLiteralLike(r)}function te(e){switch(e.kind){case 195:return te(e.expression);case 204:switch(e.operatorToken.kind){case 59:return te(e.left);case 27:return te(e.right)}}return Z(e)}function re(){return{flags:4,antecedents:void 0}}function ne(){return{flags:8,antecedents:void 0}}function ie(e){e.flags|=512&e.flags?1024:512}function ae(t,r){1&r.flags||e.contains(t.antecedents,r)||((t.antecedents||(t.antecedents=[])).push(r),ie(r))}function oe(e,t,r){return 1&t.flags?t:r?102===r.kind&&64&e||87===r.kind&&32&e?L:$(r)?(ie(t),n({flags:e,expression:r,antecedent:t})):t:32&e?t:L}function se(e,t,r,i){return $(t.expression)?(ie(e),n({flags:128,switchStatement:t,clauseStart:r,clauseEnd:i,antecedent:e})):e}function ce(e,t){return ie(e),n({flags:16,antecedent:e,node:t})}function ue(e,t){ie(e);var r=n({flags:256,antecedent:e,node:t});return r}function le(e){var t=e.antecedents;return t?1===t.length?t[0]:e:L}function _e(e){for(;;)if(195===e.kind)e=e.expression;else{if(202!==e.kind||52!==e.operator)return 204===e.kind&&(54===e.operatorToken.kind||55===e.operatorToken.kind);e=e.operand}}function de(e,t,r){var n=C,i=E;C=t,E=r,Pe(e),C=n,E=i,e&&_e(e)||(ae(t,oe(32,D,e)),ae(r,oe(64,D,e)))}function pe(e,t,r){var n=x,i=S;x=t,S=r,Pe(e),x=n,S=i}function fe(e,t,r){var n=229===e.kind?t:r;n&&(ae(n,D),D=L)}function me(e){204===e.kind&&59===e.operatorToken.kind?ge(e.left):ge(e)}function ge(e){if(Z(e))D=ce(D,e);else if(187===e.kind)for(var t=0,r=e.elements;t<r.length;t++){var n=r[t];208===n.kind?ge(n.expression):me(n)}else if(188===e.kind)for(var i=0,a=e.properties;i<a.length;i++){var o=a[i];275===o.kind?me(o.initializer):276===o.kind?ge(o.name):277===o.kind&&ge(o.expression)}}function ye(e,t,r){var n=re();54===e.operatorToken.kind?de(e.left,n,r):de(e.left,t,n),D=le(n),Pe(e.operatorToken),de(e.right,t,r)}function he(t){switch(t.kind){case 209:case 240:case 243:case 188:case 168:case 297:case 268:return 1;case 241:return 65;case 244:case 242:case 181:return 33;case 284:return 37;case 156:if(e.isObjectLiteralOrClassExpressionMethod(t))return 173;case 157:case 239:case 155:case 158:case 159:case 160:case 298:case 294:case 165:case 161:case 162:case 166:return 45;case 196:case 197:return 61;case 245:return 4;case 154:return t.initializer?4:0;case 274:case 225:case 226:case 227:case 246:return 2;case 218:return e.isFunctionLike(t.parent)?0:2}return 0}function ve(e){h&&(h.nextContainer=e),h=e}function be(r,n,i){switch(m.kind){case 244:return W(r,n,i);case 284:return function(r,n,i){return e.isExternalModule(t)?W(r,n,i):q(t.locals,void 0,r,n,i)}(r,n,i);case 209:case 240:return function(t,r,n){return e.hasModifier(t,32)?q(m.symbol.exports,m.symbol,t,r,n):q(m.symbol.members,m.symbol,t,r,n)}(r,n,i);case 243:return q(m.symbol.exports,m.symbol,r,n,i);case 168:case 297:case 188:case 241:case 268:return q(m.symbol.members,m.symbol,r,n,i);case 165:case 166:case 160:case 161:case 298:case 162:case 156:case 155:case 157:case 158:case 159:case 239:case 196:case 197:case 294:case 309:case 302:case 242:case 181:return q(m.locals,void 0,r,n,i)}}function De(e){4194304&e.flags&&!function(e){var t=284===e.kind?e:e.body;if(t&&(284===t.kind||245===t.kind))for(var r=0,n=t.statements;r<n.length;r++){var i=n[r];if(255===i.kind||254===i.kind)return!0}return!1}(e)?e.flags|=32:e.flags&=-33}function xe(e){var t=r(e),n=0!==t;return be(e,n?512:1024,n?110735:0),t}function Se(e,t,r){var n=J(t,r);return 106508&t&&(n.parent=m.symbol),z(n,e,t),n}function Te(t,r,n){switch(y.kind){case 244:W(t,r,n);break;case 284:if(e.isExternalOrCommonJsModule(m)){W(t,r,n);break}default:y.locals||(y.locals=e.createSymbolTable(),ve(y)),q(y.locals,void 0,t,r,n)}}function Ce(r){!(P&&r.originalKeywordKind>=109&&r.originalKeywordKind<=117)||e.isIdentifierName(r)||4194304&r.flags||t.parseDiagnostics.length||t.bindDiagnostics.push(j(r,function(r){if(e.getContainingClass(r))return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(r),e.declarationNameToString(r)))}function Ee(r,n){if(n&&72===n.kind){var i=n;if(o=i,e.isIdentifier(o)&&("eval"===o.escapedText||"arguments"===o.escapedText)){var a=e.getErrorSpanForNode(t,n);t.bindDiagnostics.push(e.createFileDiagnostic(t,a.start,a.length,function(r){if(e.getContainingClass(r))return e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Invalid_use_of_0_in_strict_mode}(r),e.idText(i)))}}var o}function ke(e){P&&Ee(e,e.name)}function Ne(r){if(_<2&&284!==y.kind&&244!==y.kind&&!e.isFunctionLike(y)){var n=e.getErrorSpanForNode(t,r);t.bindDiagnostics.push(e.createFileDiagnostic(t,n.start,n.length,function(r){if(e.getContainingClass(r))return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode;if(t.externalModuleIndicator)return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5}(r)))}}function Ae(r,n,i,a,o){var s=e.getSpanOfTokenAtPosition(t,r.pos);t.bindDiagnostics.push(e.createFileDiagnostic(t,s.start,s.length,n,i,a,o))}function Fe(r,n,a,o){!function(r,n,a){var o=e.createFileDiagnostic(t,n.pos,n.end-n.pos,a);r?t.bindDiagnostics.push(o):t.bindSuggestionDiagnostics=e.append(t.bindSuggestionDiagnostics,i({},o,{category:e.DiagnosticCategory.Suggestion}))}(r,{pos:e.getTokenPosOfNode(n,t),end:a.end},o)}function Pe(r){if(r){r.parent=f;var i=P;if(function(r){switch(r.kind){case 72:if(r.isInJSDocNamespace){for(var n=r.parent;n&&!e.isJSDocTypeAlias(n);)n=n.parent;Te(n,524288,67897832);break}case 100:return D&&(e.isExpression(r)||276===f.kind)&&(r.flowNode=D),Ce(r);case 189:case 190:D&&Z(r)&&(r.flowNode=D),e.isSpecialPropertyDeclaration(r)&&function(t){100===t.expression.kind?Re(t):e.isPropertyAccessEntityNameExpression(t)&&284===t.parent.parent.kind&&(e.isPrototypeAccess(t.expression)?Be(t,t.parent):je(t))}(r),e.isInJSFile(r)&&t.commonJsModuleIndicator&&e.isModuleExportsPropertyAccessExpression(r)&&!u(y,"module")&&q(t.locals,void 0,r.expression,134217729,67220414);break;case 204:var i=e.getAssignmentDeclarationKind(r);switch(i){case 1:Le(r);break;case 2:!function(r){if(!Me(r))return;var n=e.getRightMostAssignedExpression(r.right);if(e.isEmptyObjectLiteral(n)||m===t&&s(t,n))return;var i=e.exportAssignmentIsAlias(r)?2097152:1049092;q(t.symbol.exports,t.symbol,r,67108864|i,0)}(r);break;case 3:Be(r.left,r);break;case 6:!function(e){e.left.parent=e,e.right.parent=e;var t=e.left;Ke(t.expression,t,!1)}(r);break;case 4:Re(r);break;case 5:!function(r){var n=r.left,i=Ue(n.expression);if(!e.isInJSFile(r)&&!e.isFunctionSymbol(i))return;r.left.parent=r,r.right.parent=r,e.isIdentifier(n.expression)&&m===t&&c(t,n.expression)?Le(r):je(n)}(r);break;case 0:break;default:e.Debug.fail("Unknown binary expression special property assignment kind")}return function(t){P&&e.isLeftHandSideExpression(t.left)&&e.isAssignmentOperator(t.operatorToken.kind)&&Ee(t,t.left)}(r);case 274:return function(e){P&&e.variableDeclaration&&Ee(e,e.variableDeclaration.name)}(r);case 198:return function(r){if(P&&72===r.expression.kind){var n=e.getErrorSpanForNode(t,r.expression);t.bindDiagnostics.push(e.createFileDiagnostic(t,n.start,n.length,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(r);case 8:return function(r){P&&32&r.numericLiteralFlags&&t.bindDiagnostics.push(j(r,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode))}(r);case 203:return function(e){P&&Ee(e,e.operand)}(r);case 202:return function(e){P&&(44!==e.operator&&45!==e.operator||Ee(e,e.operand))}(r);case 231:return function(t){P&&Ae(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode)}(r);case 233:return function(t){P&&a.target>=2&&(e.isDeclarationStatement(t.statement)||e.isVariableStatement(t.statement))&&Ae(t.label,e.Diagnostics.A_label_is_not_allowed_here)}(r);case 178:return void(b=!0);case 163:break;case 150:return function(t){if(e.isJSDocTemplateTag(t.parent)){var r=e.find(t.parent.parent.tags,e.isJSDocTypeAlias)||e.getHostSignatureFromJSDoc(t.parent);r?(r.locals||(r.locals=e.createSymbolTable()),q(r.locals,void 0,t,262144,67635688)):be(t,262144,67635688)}else if(176===t.parent.kind){var n=function(t){var r=e.findAncestor(t,function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&t.parent.extendsType===t});return r&&r.parent}(t.parent);n?(n.locals||(n.locals=e.createSymbolTable()),q(n.locals,void 0,t,262144,67635688)):Se(t,262144,U(t))}else be(t,262144,67635688)}(r);case 151:return We(r);case 237:return qe(r);case 186:return r.flowNode=D,qe(r);case 154:case 153:return function(e){return He(e,4|(e.questionToken?16777216:0),0)}(r);case 275:case 276:return He(r,4,0);case 278:return He(r,8,68008959);case 160:case 161:case 162:return be(r,131072,0);case 156:case 155:return He(r,8192|(r.questionToken?16777216:0),e.isObjectLiteralMethod(r)?0:67212223);case 239:return function(r){t.isDeclarationFile||4194304&r.flags||e.isAsyncFunction(r)&&(F|=1024);ke(r),P?(Ne(r),Te(r,16,67219887)):be(r,16,67219887)}(r);case 157:return be(r,16384,0);case 158:return He(r,32768,67154879);case 159:return He(r,65536,67187647);case 165:case 294:case 298:case 166:return function(t){var r=J(131072,U(t));z(r,t,131072);var n=J(2048,"__type");z(n,t,2048),n.members=e.createSymbolTable(),n.members.set(r.escapedName,r)}(r);case 168:case 297:case 181:return function(e){return Se(e,2048,"__type")}(r);case 188:return function(r){var n;if(function(e){e[e.Property=1]="Property",e[e.Accessor=2]="Accessor"}(n||(n={})),P)for(var i=e.createUnderscoreEscapedMap(),a=0,o=r.properties;a<o.length;a++){var s=o[a];if(277!==s.kind&&72===s.name.kind){var c=s.name,u=275===s.kind||276===s.kind||156===s.kind?1:2,l=i.get(c.escapedText);if(l){if(1===u&&1===l){var _=e.getErrorSpanForNode(t,c);t.bindDiagnostics.push(e.createFileDiagnostic(t,_.start,_.length,e.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode))}}else i.set(c.escapedText,u)}}return Se(r,4096,"__object")}(r);case 196:case 197:return function(r){t.isDeclarationFile||4194304&r.flags||e.isAsyncFunction(r)&&(F|=1024);D&&(r.flowNode=D);ke(r);var n=r.name?r.name.escapedText:"__function";return Se(r,16,n)}(r);case 191:var o=e.getAssignmentDeclarationKind(r);switch(o){case 7:return function(e){var t=Ue(e.arguments[0]),r=284===e.parent.parent.kind;t=Je(t,e.arguments[0],r,!1),ze(e,t,!1)}(r);case 8:return function(e){if(!Me(e))return;var t=Ve(e.arguments[0],void 0,function(e,t){return t&&z(t,e,67110400),t});if(t){q(t.exports,t,e,1048580,0)}}(r);case 9:return function(e){var t=Ue(e.arguments[0].expression);ze(e,t,!0)}(r);case 0:break;default:return e.Debug.fail("Unknown call expression assignment declaration kind")}e.isInJSFile(r)&&function(r){!t.commonJsModuleIndicator&&e.isRequireCall(r,!1)&&Me(r)}(r);break;case 209:case 240:return P=!0,function(r){if(240===r.kind)Te(r,32,68008383);else{var n=r.name?r.name.escapedText:"__class";Se(r,32,n),r.name&&I.set(r.name.escapedText,!0)}var i=r.symbol,a=J(4194308,"prototype"),o=i.exports.get(a.escapedName);o&&(r.name&&(r.name.parent=r),t.bindDiagnostics.push(j(o.declarations[0],e.Diagnostics.Duplicate_identifier_0,e.symbolName(a))));i.exports.set(a.escapedName,a),a.parent=i}(r);case 241:return Te(r,64,67897736);case 242:return Te(r,524288,67897832);case 243:return function(t){return e.isEnumConst(t)?Te(t,128,68008831):Te(t,256,68008191)}(r);case 244:return function(r){if(De(r),e.isAmbientModule(r))if(e.hasModifier(r,1)&&Ae(r,e.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),e.isModuleAugmentationExternal(r))xe(r);else{var n=void 0;if(10===r.name.kind){var i=r.name.text;e.hasZeroOrOneAsteriskCharacter(i)?n=e.tryParsePattern(i):Ae(r.name,e.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,i)}var a=be(r,512,110735);t.patternAmbientModules=e.append(t.patternAmbientModules,n&&{pattern:n,symbol:a})}else{var o=xe(r);if(0!==o){var a=r.symbol;a.constEnumOnlyModule=!(304&a.flags)&&2===o&&!1!==a.constEnumOnlyModule}}}(r);case 268:return function(e){return Se(e,4096,"__jsxAttributes")}(r);case 267:return function(e,t,r){return be(e,t,r)}(r,4,0);case 248:case 251:case 253:case 257:return be(r,2097152,2097152);case 247:return function(r){r.modifiers&&r.modifiers.length&&t.bindDiagnostics.push(j(r,e.Diagnostics.Modifiers_cannot_appear_here));var n=e.isSourceFile(r.parent)?e.isExternalModule(r.parent)?r.parent.isDeclarationFile?void 0:e.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files:e.Diagnostics.Global_module_exports_may_only_appear_in_module_files:e.Diagnostics.Global_module_exports_may_only_appear_at_top_level;n?t.bindDiagnostics.push(j(r,n)):(t.symbol.globalExports=t.symbol.globalExports||e.createSymbolTable(),q(t.symbol.globalExports,t.symbol,r,2097152,2097152))}(r);case 250:return function(e){e.name&&be(e,2097152,2097152)}(r);case 255:return function(e){m.symbol&&m.symbol.exports?e.exportClause||q(m.symbol.exports,m.symbol,e,8388608,0):Se(e,8388608,U(e))}(r);case 254:return function(t){if(m.symbol&&m.symbol.exports){var r=e.exportAssignmentIsAlias(t)?2097152:4,n=q(m.symbol.exports,m.symbol,t,r,67108863);t.isExportEquals&&K(n,t)}else Se(t,2097152,U(t))}(r);case 284:return Ie(r.statements),function(){if(De(t),e.isExternalModule(t))Oe();else if(e.isJsonSourceFile(t)){Oe();var r=t.symbol;q(t.symbol.exports,t.symbol,t,4,67108863),t.symbol=r}}();case 218:if(!e.isFunctionLike(r.parent))return;case 245:return Ie(r.statements);case 304:if(298===r.parent.kind)return We(r);if(297!==r.parent.kind)break;case 310:var l=r,_=l.isBracketed||l.typeExpression&&293===l.typeExpression.type.kind?16777220:4;return be(l,_,0);case 309:case 302:(v||(v=[])).push(r)}}(r),r.kind>147){var o=f;f=r;var _=he(r);0===_?H(r):function(t,r){var i=m,a=g,o=y;1&r?(197!==t.kind&&(g=m),m=y=t,32&r&&(m.locals=e.createSymbolTable()),ve(m)):2&r&&((y=t).locals=void 0);if(4&r){var s=n,c=D,u=x,l=S,_=T,d=N,p=A,f=16&r&&!e.hasModifier(t,256)&&!t.asteriskToken&&!!e.getImmediatelyInvokedFunctionExpression(t);f||(D={flags:2},144&r&&(D.container=t)),T=f||157===t.kind?re():void 0,x=void 0,S=void 0,N=void 0,A=!1,n=e.identity,H(t),t.flags&=-1409,!(1&D.flags)&&8&r&&e.nodeIsPresent(t.body)&&(t.flags|=128,A&&(t.flags|=256)),284===t.kind&&(t.flags|=F),T&&(ae(T,D),D=le(T),157===t.kind&&(t.returnFlowNode=D)),f||(D=c),x=u,S=l,T=_,N=d,A=p,n=s}else 64&r?(b=!1,H(t),t.flags=b?64|t.flags:-65&t.flags):H(t);m=i,g=a,y=o}(r,_),f=o}else if(!O&&0==(536870912&r.transformFlags)){B|=l(r,0);var o=f;1===r.kind&&(f=r),we(r),f=o}P=i}}function we(t){if(e.hasJSDocNodes(t))if(e.isInJSFile(t))for(var r=0,n=t.jsDoc;r<n.length;r++){var i=n[r];Pe(i)}else for(var a=0,o=t.jsDoc;a<o.length;a++){var i=o[a];p(t,i)}}function Ie(r){if(!P)for(var n=0,i=r;n<i.length;n++){var a=i[n];if(!e.isPrologueDirective(a))return;if(o=a,void 0,'"use strict"'===(s=e.getSourceTextOfNodeFromSourceFile(t,o.expression))||"'use strict'"===s)return void(P=!0)}var o,s}function Oe(){Se(t,512,'"'+e.removeFileExtension(t.fileName)+'"')}function Me(e){return!t.externalModuleIndicator&&(t.commonJsModuleIndicator||(t.commonJsModuleIndicator=e,Oe()),!0)}function Le(t){if(Me(t)){var r=t.left,n=Ve(r.expression,void 0,function(e,t){return t&&z(t,e,67110400),t});if(n){var i=e.isClassExpression(t.right)?1048612:1048580;q(n.exports,n,r,i,0)}}}function Re(t){e.Debug.assert(e.isInJSFile(t));var r=e.getThisContainer(t,!1);switch(r.kind){case 239:case 196:var n=r.symbol;if(e.isBinaryExpression(r.parent)&&59===r.parent.operatorToken.kind){var i=r.parent.left;e.isPropertyAccessEntityNameExpression(i)&&e.isPrototypeAccess(i.expression)&&(n=Ue(i.expression.expression,g))}n&&(n.members=n.members||e.createSymbolTable(),q(n.members,n,t,4,0));break;case 157:case 154:case 156:case 158:case 159:var a=r.parent,o=e.hasModifier(r,32)?a.symbol.exports:a.symbol.members;q(o,a.symbol,t,4,0,!0);break;case 284:r.commonJsModuleIndicator?q(r.symbol.exports,r.symbol,t,1048580,0):be(t,1,67220414);break;default:e.Debug.fail(e.Debug.showSyntaxKind(r))}}function Be(e,t){var r=e.expression,n=r.expression;e.parent=t,n.parent=r,r.parent=e,Ke(n,e,!0)}function je(e){e.expression.parent=e,Ke(e.expression,e,!1)}function Je(r,n,i,a){if(i&&!a&&(!r||!(1920&r.flags))){r=Ve(n,r,function(r,n,i){if(n)return z(n,r,67110400),n;var a=i?i.exports:t.jsGlobalAugmentations||(t.jsGlobalAugmentations=e.createSymbolTable());return q(a,i,r,67110400,110735)})}return r}function ze(t,r,n){if(r&&function(t){if(1072&t.flags)return!0;var r=t.valueDeclaration;if(r&&e.isCallExpression(r))return!!e.getAssignedExpandoInitializer(r);var n=r?e.isVariableDeclaration(r)?r.initializer:e.isBinaryExpression(r)?r.right:e.isPropertyAccessExpression(r)&&e.isBinaryExpression(r.parent)?r.parent.right:void 0:void 0;if(n=n&&e.getRightMostAssignedExpression(n)){var i=e.isPrototypeAccess(e.isVariableDeclaration(r)?r.name:e.isBinaryExpression(r)?r.left:r);return!!e.getExpandoInitializer(e.isBinaryExpression(n)&&55===n.operatorToken.kind?n.right:n,i)}return!1}(r)){var i=n?r.members||(r.members=e.createSymbolTable()):r.exports||(r.exports=e.createSymbolTable()),a=e.isFunctionLikeDeclaration(e.getAssignedExpandoInitializer(t)),o=a?8192:4,s=a?67212223:0;q(i,r,t,67108864|o,-67108865&s)}}function Ke(t,r,n){var i=Ue(t),a=e.isBinaryExpression(r.parent)?284===function(t){for(;e.isBinaryExpression(t.parent);)t=t.parent;return t.parent}(r.parent).parent.kind:284===r.parent.parent.kind;i=Je(i,r.expression,a,n),ze(r,i,n)}function Ue(t,r){if(void 0===r&&(r=m),e.isIdentifier(t))return u(r,t.escapedText);var n=Ue(t.expression);return n&&n.exports&&n.exports.get(t.name.escapedText)}function Ve(r,n,i){if(s(t,r))return t.symbol;if(e.isIdentifier(r))return i(r,Ue(r),n);var a=Ve(r.expression,n,i);return a&&a.exports?i(r.name,a.exports.get(r.name.escapedText),a):e.Debug.fail()}function qe(t){if(P&&Ee(t,t.name),!e.isBindingPattern(t.name)){var r=e.isInJSFile(t)&&!!e.getJSDocEnumTag(t),n=r?256:0,i=r?68008191:0;e.isBlockOrCatchScoped(t)?Te(t,2|n,67220415|i):e.isParameterDeclaration(t)?be(t,1,67220415):be(t,1|n,67220414|i)}}function We(t){if((304!==t.kind||298===m.kind)&&(!P||4194304&t.flags||Ee(t,t.name),e.isBindingPattern(t.name)?Se(t,1,"__"+t.parent.parameters.indexOf(t)):be(t,1,67220415),e.isParameterPropertyDeclaration(t))){var r=t.parent.parent;q(r.symbol.members,r.symbol,t,4|(t.questionToken?16777216:0),0)}}function He(r,n,i){return t.isDeclarationFile||4194304&r.flags||!e.isAsyncFunction(r)||(F|=1024),D&&e.isObjectLiteralOrClassExpressionMethod(r)&&(r.flowNode=D),e.hasDynamicName(r)?Se(r,n,"__computed"):be(r,n,i)}}();function o(t){return!(e.isFunctionDeclaration(t)||function(t){switch(t.kind){case 241:case 242:return!0;case 244:return 1!==r(t);case 243:return e.hasModifier(t,2048);default:return!1}}(t)||e.isEnumDeclaration(t)||e.isVariableStatement(t)&&!(3&e.getCombinedNodeFlags(t))&&t.declarationList.declarations.some(function(e){return!e.initializer}))}function s(t,r){return e.isExportsIdentifier(r)||e.isModuleExportsPropertyAccessExpression(r)||e.isIdentifier(r)&&c(t,r)}function c(t,r){var n=u(t,r.escapedText);return!!n&&!!n.valueDeclaration&&e.isVariableDeclaration(n.valueDeclaration)&&!!n.valueDeclaration.initializer&&function t(r,n){return s(r,n)||e.isAssignmentExpression(n,!0)&&(t(r,n.left)||t(r,n.right))}(t,n.valueDeclaration.initializer)}function u(t,r){var n=t.locals&&t.locals.get(r);return n?n.exportSymbol||n:e.isSourceFile(t)&&t.jsGlobalAugmentations&&t.jsGlobalAugmentations.has(r)?t.jsGlobalAugmentations.get(r):t.symbol&&t.symbol.exports&&t.symbol.exports.get(r)}function l(t,r){var n=t.kind;switch(n){case 191:return function(t,r){var n=r,i=e.skipOuterExpressions(t.expression),a=t.expression;t.typeArguments&&(n|=1);(4096&r||e.isSuperOrSuperProperty(i))&&(n|=128,e.isSuperProperty(i)&&(n|=2048));92===a.kind&&(n|=524288);return t.transformFlags=536870912|n,-536875009&n}(t,r);case 192:return function(e,t){var r=t;e.typeArguments&&(r|=1);4096&t&&(r|=128);return e.transformFlags=536870912|r,-536875009&r}(t,r);case 244:return function(t,r){var n=1;0==(2&e.getModifierFlags(t))&&(n|=r);return t.transformFlags=536870912|n,-537168897&n}(t,r);case 195:return function(e,t){var r=t,n=e.expression.kind;212!==n&&194!==n||(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 204:return function(e,t){var r=t,n=e.operatorToken.kind,i=e.left.kind;59===n&&188===i?r|=656:59===n&&187===i?r|=640:41!==n&&63!==n||(r|=64);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 221:return function(e,t){var r=t;return e.transformFlags=536870912|r,-536870913&r}(t,r);case 151:return function(t,r){var n=r,i=t.name,a=t.initializer,o=t.dotDotDotToken;(t.questionToken||t.type||1024&r&&e.some(t.decorators)||e.isThisIdentifier(i))&&(n|=1);e.hasModifier(t,92)&&(n|=1025);8192&r&&(n|=16);(65536&r||a||o)&&(n|=128);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 197:return function(t,r){var n=128|r;(e.hasModifier(t,2270)||t.typeParameters||t.type)&&(n|=1);e.hasModifier(t,256)&&(n|=32);8192&r&&(n|=16);return t.transformFlags=536870912|n,-537371649&n}(t,r);case 196:return function(t,r){var n=r;(e.hasModifier(t,2270)||t.typeParameters||t.type)&&(n|=1);e.hasModifier(t,256)&&(n|=t.asteriskToken?16:32);8192&r&&(n|=16);t.asteriskToken&&(n|=256);return t.transformFlags=536870912|n,-537373697&n}(t,r);case 239:return function(t,r){var n,i=e.getModifierFlags(t);!t.body||2&i?n=1:(n=262144|r,(2270&i||t.typeParameters||t.type)&&(n|=1),256&i&&(n|=t.asteriskToken?16:32),8192&r&&(n|=16),t.asteriskToken&&(n|=256));return t.transformFlags=536870912|n,-537373697&n}(t,r);case 237:return function(e,t){var r=t;r|=65664,8192&t&&(r|=16);e.type&&(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 238:return function(e,t){var r=262144|t;65536&t&&(r|=128);3&e.flags&&(r|=32896);return e.transformFlags=536870912|r,-536944641&r}(t,r);case 219:return function(t,r){var n,i=t.declarationList.transformFlags;e.hasModifier(t,2)?n=1:(n=r,65536&i&&(n|=128));return t.transformFlags=536870912|n,-536870913&n}(t,r);case 233:return function(t,r){var n=r;32768&r&&e.isIterationStatement(t,!0)&&(n|=128);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 240:return function(t,r){var n;e.hasModifier(t,2)?n=1:(n=128|r,(1024&r||t.typeParameters)&&(n|=1));return t.transformFlags=536870912|n,-536888321&n}(t,r);case 209:return function(e,t){var r=128|t;(1024&t||e.typeParameters)&&(r|=1);return e.transformFlags=536870912|r,-536888321&r}(t,r);case 273:return function(t,r){var n=r;switch(t.token){case 86:n|=128;break;case 109:n|=1;break;default:e.Debug.fail("Unexpected token for heritage clause")}return t.transformFlags=536870912|n,-536870913&n}(t,r);case 274:return function(t,r){var n=r;t.variableDeclaration?e.isBindingPattern(t.variableDeclaration.name)&&(n|=128):n|=8;return t.transformFlags=536870912|n,-536879105&n}(t,r);case 211:return function(e,t){var r=128|t;e.typeArguments&&(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 157:return function(t,r){var n=r;!e.hasModifier(t,2270)&&t.body||(n|=1);8192&r&&(n|=16);return t.transformFlags=536870912|n,-537372673&n}(t,r);case 154:return function(t,r){var n=1|r;(t.initializer||e.isComputedPropertyName(t.name))&&(n|=1024);return t.transformFlags=536870912|n,_(t.name,-536872961&n)}(t,r);case 156:return function(t,r){var n=128|r;(t.decorators||e.hasModifier(t,2270)||t.typeParameters||t.type||t.name&&e.isComputedPropertyName(t.name)||!t.body)&&(n|=1);8192&r&&(n|=16);e.hasModifier(t,256)&&(n|=t.asteriskToken?16:32);t.asteriskToken&&(n|=256);return t.transformFlags=536870912|n,_(t.name,-537372673&n)}(t,r);case 158:case 159:return function(t,r){var n=r;(t.decorators||e.hasModifier(t,2270)||t.type||t.name&&e.isComputedPropertyName(t.name)||!t.body)&&(n|=1);8192&r&&(n|=16);return t.transformFlags=536870912|n,_(t.name,-537372673&n)}(t,r);case 248:return function(t,r){var n=r;e.isExternalModuleImportEqualsDeclaration(t)||(n|=1);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 189:case 190:return function(e,t){var r=t;98===e.expression.kind&&(r|=48);return e.transformFlags=536870912|r,-536870913&r}(t,r);default:return function(e,t,r){var n=r,i=536870912;switch(t){case 121:case 201:n|=48;break;case 194:case 212:case 313:n|=1,i=536870912;break;case 115:case 113:case 114:case 118:case 125:case 77:case 243:case 278:case 213:case 133:n|=1;break;case 260:case 261:case 262:case 11:case 263:case 264:case 265:case 266:case 267:case 268:case 269:case 270:n|=2;break;case 14:case 15:case 16:case 17:case 206:case 193:case 276:case 116:case 214:n|=128;break;case 10:e.hasExtendedUnicodeEscape&&(n|=128);break;case 8:384&e.numericLiteralFlags&&(n|=128);break;case 9:n|=4;break;case 227:e.awaitModifier&&(n|=16),n|=128;break;case 207:n|=131216;break;case 120:case 135:case 146:case 132:case 136:case 138:case 123:case 139:case 106:case 150:case 153:case 155:case 160:case 161:case 162:case 163:case 164:case 165:case 166:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:case 176:case 177:case 241:case 242:case 178:case 179:case 180:case 181:case 182:case 247:n=1,i=-2;break;case 149:n|=16384;break;case 208:n|=4224;break;case 277:n|=8208;break;case 98:n|=128,i=536870912;break;case 100:n|=2048;break;case 184:n|=65664,4096&r&&(n|=8208),i=536875008;break;case 185:n|=65664,i=536875008;break;case 186:n|=128,e.dotDotDotToken&&(n|=4096);break;case 152:n|=1025;break;case 188:i=536896512,16384&r&&(n|=128),8192&r&&(n|=16);break;case 187:i=536875008;break;case 223:case 224:case 225:case 226:32768&r&&(n|=128);break;case 284:break;case 230:n|=262160;break;case 228:case 229:n|=262144}return e.transformFlags=536870912|n,n&~i}(t,n,r)}}function _(e,t){return t|2048&e.transformFlags}function d(e){if(e>=163&&e<=183)return-2;switch(e){case 191:case 192:case 187:return 536875008;case 244:return 537168896;case 151:return 536870912;case 197:return 537371648;case 196:case 239:return 537373696;case 238:return 536944640;case 240:case 209:return 536888320;case 157:return 537372672;case 156:case 158:case 159:return 537372672;case 120:case 135:case 146:case 132:case 138:case 136:case 123:case 139:case 106:case 150:case 153:case 155:case 160:case 161:case 162:case 241:case 242:return-2;case 188:return 536896512;case 274:return 536879104;case 184:case 185:return 536875008;case 194:case 212:case 313:case 195:case 98:return 536870912;case 189:case 190:default:return 536870912}}function p(t,r){r.parent=t,e.forEachChild(r,function(e){return p(r,e)})}e.bindSourceFile=function(t,r){e.performance.mark("beforeBind"),a(t,r),e.performance.mark("afterBind"),e.performance.measure("Bind","beforeBind","afterBind")},e.isExportsOrModuleExportsOrAlias=s,e.computeTransformFlagsForNode=l,e.getTransformFlagsSubtreeExclusions=d}(c||(c={})),function(e){e.createGetSymbolWalker=function(t,r,n,i,a,o,s,c,u,l){return function(_){void 0===_&&(_=function(){return!0});var d=[],p=[];return{walkType:function(t){try{return f(t),{visitedTypes:e.getOwnValues(d),visitedSymbols:e.getOwnValues(p)}}finally{e.clear(d),e.clear(p)}},walkSymbol:function(t){try{return y(t),{visitedTypes:e.getOwnValues(d),visitedSymbols:e.getOwnValues(p)}}finally{e.clear(d),e.clear(p)}}};function f(t){if(t&&!d[t.id]){d[t.id]=t;var r=y(t.symbol);if(!r){if(524288&t.flags){var n=t,a=n.objectFlags;4&a&&function(t){f(t.target),e.forEach(t.typeArguments,f)}(t),32&a&&function(e){f(e.typeParameter),f(e.constraintType),f(e.templateType),f(e.modifiersType)}(t),3&a&&(g(o=t),e.forEach(o.typeParameters,f),e.forEach(i(o),f),f(o.thisType)),24&a&&g(n)}var o;262144&t.flags&&function(e){f(u(e))}(t),3145728&t.flags&&function(t){e.forEach(t.types,f)}(t),4194304&t.flags&&function(e){f(e.type)}(t),8388608&t.flags&&function(e){f(e.objectType),f(e.indexType),f(e.constraint)}(t)}}}function m(i){var a=r(i);a&&f(a.type),e.forEach(i.typeParameters,f);for(var o=0,s=i.parameters;o<s.length;o++){var c=s[o];y(c)}f(t(i)),f(n(i))}function g(e){var t=c(e,0);f(t);var r=c(e,1);f(r);for(var n=a(e),i=0,o=n.callSignatures;i<o.length;i++){var s=o[i];m(s)}for(var u=0,l=n.constructSignatures;u<l.length;u++){var s=l[u];m(s)}for(var _=0,d=n.properties;_<d.length;_++){var p=d[_];y(p)}}function y(t){if(!t)return!1;var r=e.getSymbolId(t);if(p[r])return!1;if(p[r]=t,!_(t))return!0;var n=o(t);return f(n),t.exports&&t.exports.forEach(y),e.forEach(t.declarations,function(e){if(e.type&&167===e.type.kind){var t=e.type,r=s(l(t.exprName));y(r)}}),!1}}}}(c||(c={})),function(e){var t,r=/^".+"$/,n=1,o=1,s=1,c=1;function u(e){return e.id||(e.id=o,o++),e.id}function l(e){return e.id||(e.id=n,n++),e.id}function _(t,r){var n=e.getModuleInstanceState(t);return 1===n||r&&2===n}function d(t){switch(t.parent.kind){case 253:case 257:return e.isIdentifier(t);default:return e.isDeclarationName(t)}}function p(e){switch(e.kind){case 250:case 248:case 251:case 253:return!0;case 72:return 253===e.parent.kind;default:return!1}}e.getNodeId=u,e.getSymbolId=l,e.isInstantiatedModule=_,e.createTypeChecker=function(n,o){var m,g,y,h,v=e.memoize(function(){var t=e.createMap();return n.getSourceFiles().forEach(function(r){r.resolvedModules&&e.forEachEntry(r.resolvedModules,function(e){e&&e.packageId&&t.set(e.packageId.name,!0)})}),t}),b=e.objectAllocator.getSymbolConstructor(),D=e.objectAllocator.getTypeConstructor(),x=e.objectAllocator.getSignatureConstructor(),S=0,T=0,C=0,E=0,k=0,N=e.createSymbolTable(),A=e.identity,F=n.getCompilerOptions(),P=e.getEmitScriptTarget(F),w=e.getEmitModuleKind(F),I=e.getAllowSyntheticDefaultImports(F),O=e.getStrictOptionValue(F,"strictNullChecks"),M=e.getStrictOptionValue(F,"strictFunctionTypes"),L=e.getStrictOptionValue(F,"strictBindCallApply"),R=e.getStrictOptionValue(F,"strictPropertyInitialization"),B=e.getStrictOptionValue(F,"noImplicitAny"),j=e.getStrictOptionValue(F,"noImplicitThis"),J=!!F.keyofStringsOnly,z=F.suppressExcessPropertyErrors?0:32768,K=function(){var t,r=n.getResolvedTypeReferenceDirectives();return r&&(t=e.createMap(),r.forEach(function(r,i){if(r&&r.resolvedFileName){var a=n.getSourceFile(r.resolvedFileName);!function r(i,a){if(!t.has(i.path)){t.set(i.path,a);for(var o=0,s=i.referencedFiles;o<s.length;o++){var c=s[o].fileName,u=e.resolveTripleslashReference(c,i.originalFileName),l=n.getSourceFile(u);l&&r(l,a)}}}(a,i)}})),{getReferencedExportContainer:Bh,getReferencedImportDeclaration:jh,getReferencedDeclarationWithCollidingName:zh,isDeclarationWithCollidingName:Kh,isValueAliasDeclaration:function(t){return!(t=e.getParseTreeNode(t))||Uh(t)},hasGlobalName:sv,isReferencedAliasDeclaration:function(t,r){return!(t=e.getParseTreeNode(t))||function t(r,n){if(e.isAliasSymbolDeclaration(r)){var i=In(r);if(i&&Ur(i).referenced)return!0;var a=Ur(i).target;if(a&&1&e.getModifierFlags(r)&&67220415&a.flags&&(F.preserveConstEnums||!Wh(a)))return!0}return!!n&&!!e.forEachChild(r,function(e){return t(e,n)})}(t,r)},getNodeCheckFlags:function(t){return(t=e.getParseTreeNode(t))?$h(t):0},isTopLevelValueImportEqualsWithEntityName:Vh,isDeclarationVisible:hi,isImplementationOfOverload:Hh,isRequiredInitializedParameter:Gh,isOptionalUninitializedParameterProperty:Yh,isExpandoFunctionDeclaration:Xh,getPropertiesOfContainerFunction:Qh,createTypeOfDeclaration:iv,createReturnTypeOfSignatureDeclaration:av,createTypeOfExpression:ov,createLiteralConstValue:_v,isSymbolAccessible:ri,isEntityNameVisible:si,getConstantValue:function(t){var r=e.getParseTreeNode(t,ev);return r?tv(r):void 0},collectLinkedAliases:vi,getReferencedValueDeclaration:uv,getTypeReferenceSerializationKind:nv,isOptionalParameter:es,moduleExportsSomeValue:Rh,isArgumentsLocalBinding:Lh,getExternalModuleFileFromDeclaration:dv,getTypeReferenceDirectivesForEntityName:function(e){if(t){var r=67899368;(72===e.kind&&Y_(e)||189===e.kind&&!function(e){return e.parent&&211===e.parent.kind&&e.parent.parent&&273===e.parent.parent.kind}(e))&&(r=68268991);var n=yn(e,r,!0);return n&&n!==oe?i(n,r):void 0}},getTypeReferenceDirectivesForSymbol:i,isLiteralConstDeclaration:lv,isLateBound:function(t){var r=e.getParseTreeNode(t,e.isDeclaration),n=r&&In(r);return!!(n&&2048&e.getCheckFlags(n))},getJsxFactoryEntity:function(t){return t?(Fr(t),e.getSourceFileOfNode(t).localJsxFactory||_r):_r},getAllAccessorDeclarations:function(t){var r=159===(t=e.getParseTreeNode(t,e.isGetOrSetAccessorDeclaration)).kind?158:159,n=e.getDeclarationOfKind(In(t),r),i=n&&n.pos<t.pos?n:t,a=n&&n.pos<t.pos?t:n,o=159===t.kind?t:n,s=158===t.kind?t:n;return{firstAccessor:i,secondAccessor:a,setAccessor:o,getAccessor:s}},getSymbolOfExternalModuleSpecifier:function(e){return bn(e,e,void 0)},isBindingCapturedByNode:function(t,r){var n=e.getParseTreeNode(t),i=e.getParseTreeNode(r);return!!n&&!!i&&(e.isVariableDeclaration(i)||e.isBindingElement(i))&&function(t,r){var n=Vr(t);return!!n&&e.contains(n.capturedBlockScopeBindings,In(r))}(n,i)}};function i(r,n){if(t&&function(r){if(!r.declarations)return!1;for(var n=r;;){var i=On(n);if(!i)break;n=i}if(n.valueDeclaration&&284===n.valueDeclaration.kind&&512&n.flags)return!1;for(var a=0,o=r.declarations;a<o.length;a++){var s=o[a],c=e.getSourceFileOfNode(s);if(t.has(c.path))return!0}return!1}(r)){for(var i,a=0,o=r.declarations;a<o.length;a++){var s=o[a];if(s.symbol&&s.symbol.flags&n){var c=e.getSourceFileOfNode(s),u=t.get(c.path);if(!u)return;(i||(i=[])).push(u)}}return i}}}(),U=function(){return{typeToTypeNode:function(e,r,n,i){return t(r,n,i,function(t){return o(e,t)})},indexInfoToIndexSignatureDeclaration:function(e,r,n,i,a){return t(n,i,a,function(t){return _(e,r,t)})},signatureToSignatureDeclaration:function(e,r,n,i,a){return t(n,i,a,function(t){return d(e,r,t)})},symbolToEntityName:function(e,r,n,i,a){return t(n,i,a,function(t){return T(e,t,r,!1)})},symbolToExpression:function(r,n,i,a,o){return t(i,a,o,function(t){return function(t,r,n){var i=v(t,r,n);return function t(n,i){var a=D(n,i,r),o=n[i];if(e.some(o.declarations,ai))return e.createLiteral(x(o,r));0===i&&(r.flags|=16777216);var s=yi(o,r);0===i&&(r.flags^=16777216);var c=s.charCodeAt(0),u=e.isIdentifierStart(c,P);if(0===i||u){var l=e.setEmitFlags(e.createIdentifier(s,a),16777216);return l.symbol=o,i>0?e.createPropertyAccess(t(n,i-1),l):l}91===c&&(s=s.substring(1,s.length-1),c=s.charCodeAt(0));var _=void 0;return e.isSingleOrDoubleQuote(c)?(_=e.createLiteral(s.substring(1,s.length-1).replace(/\\./g,function(e){return e.substring(1)}))).singleQuote=39===c:""+ +s===s&&(_=e.createLiteral(+s)),_||((_=e.setEmitFlags(e.createIdentifier(s,a),16777216)).symbol=o),e.createElementAccess(t(n,i-1),_)}(i,i.length-1)}(r,t,n)})},symbolToTypeParameterDeclarations:function(e,r,n,i){return t(r,n,i,function(t){return b(e,t)})},symbolToParameterDeclaration:function(e,r,n,i){return t(r,n,i,function(t){return y(e,t)})},typeParameterToDeclaration:function(e,r,n,i){return t(r,n,i,function(t){return g(e,t)})}};function t(t,r,i,a){e.Debug.assert(void 0===t||0==(8&t.flags));var o={enclosingDeclaration:t,flags:r||0,tracker:i&&i.trackSymbol?i:{trackSymbol:e.noop,moduleResolverHost:134217728&r?{getCommonSourceDirectory:n.getCommonSourceDirectory?function(){return n.getCommonSourceDirectory()}:function(){return""},getSourceFiles:function(){return n.getSourceFiles()},getCurrentDirectory:n.getCurrentDirectory&&function(){return n.getCurrentDirectory()}}:void 0},encounteredError:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0},s=a(o);return o.encounteredError?void 0:s}function a(t){return t.truncating?t.truncating:t.truncating=!(1&t.flags)&&t.approximateLength>e.defaultMaximumTruncationLength}function o(t,r){m&&m.throwIfCancellationRequested&&m.throwIfCancellationRequested();var n=8388608&r.flags;if(r.flags&=-8388609,t){if(1&t.flags)return r.approximateLength+=3,e.createKeywordTypeNode(120);if(2&t.flags)return e.createKeywordTypeNode(143);if(4&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(138);if(8&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(135);if(64&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(146);if(16&t.flags)return r.approximateLength+=7,e.createKeywordTypeNode(123);if(1024&t.flags&&!(1048576&t.flags)){var i=On(t.symbol),g=S(i,r,67897832),y=Na(i)===t?g:M(g,e.createTypeReferenceNode(e.symbolName(t.symbol),void 0));return y}if(1056&t.flags)return S(t.symbol,r,67897832);if(128&t.flags)return r.approximateLength+=t.value.length+2,e.createLiteralTypeNode(e.setEmitFlags(e.createLiteral(t.value),16777216));if(256&t.flags)return r.approximateLength+=(""+t.value).length,e.createLiteralTypeNode(e.createLiteral(t.value));if(2048&t.flags)return r.approximateLength+=e.pseudoBigIntToString(t.value).length+1,e.createLiteralTypeNode(e.createLiteral(t.value));if(512&t.flags)return r.approximateLength+=t.intrinsicName.length,"true"===t.intrinsicName?e.createTrue():e.createFalse();if(8192&t.flags){if(!(1048576&r.flags)){if(ti(t.symbol,r.enclosingDeclaration))return r.approximateLength+=6,S(t.symbol,r,67220415);r.tracker.reportInaccessibleUniqueSymbolError&&r.tracker.reportInaccessibleUniqueSymbolError()}return r.approximateLength+=13,e.createTypeOperatorNode(142,e.createKeywordTypeNode(139))}if(16384&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(106);if(32768&t.flags)return r.approximateLength+=9,e.createKeywordTypeNode(141);if(65536&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(96);if(131072&t.flags)return r.approximateLength+=5,e.createKeywordTypeNode(132);if(4096&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(139);if(67108864&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(136);if(262144&t.flags&&t.isThisType)return 4194304&r.flags&&(r.encounteredError||32768&r.flags||(r.encounteredError=!0),r.tracker.reportInaccessibleThisError&&r.tracker.reportInaccessibleThisError()),r.approximateLength+=4,e.createThis();var h=e.getObjectFlags(t);if(4&h)return e.Debug.assert(!!(524288&t.flags)),function(t){var n=t.typeArguments||e.emptyArray;if(t.target===$e||t.target===Ze){if(2&r.flags){var i=o(n[0],r);return e.createTypeReferenceNode(t.target===$e?"Array":"ReadonlyArray",[i])}var a=o(n[0],r),s=e.createArrayTypeNode(a);return t.target===$e?s:e.createTypeOperatorNode(133,s)}if(!(8&t.target.objectFlags)){if(2048&r.flags&&t.symbol.valueDeclaration&&e.isClassLike(t.symbol.valueDeclaration)&&!ti(t.symbol,r.enclosingDeclaration))return I(t);var c=t.target.outerTypeParameters,l=0,_=void 0;if(c)for(var d=c.length;l<d;){var p=l,f=Fs(c[l]);do{l++}while(l<d&&Fs(c[l])===f);if(!e.rangeEquals(c,n,p,l)){var m=u(n.slice(p,l),r),g=r.flags;r.flags|=16;var y=S(f,r,67897832,m);r.flags=g,_=_?M(_,y):y}}var h=void 0;if(n.length>0){var v=(t.target.typeParameters||e.emptyArray).length;h=u(n.slice(l,v),r)}var b=r.flags;r.flags|=16;var D=S(t.symbol,r,67897832,h);return r.flags=b,_?M(_,D):D}if(n.length>0){var x=Ms(t),T=u(n.slice(0,x),r),C=t.target.hasRestElement;if(T){for(var l=t.target.minLength;l<Math.min(x,T.length);l++)T[l]=C&&l===x-1?e.createRestTypeNode(e.createArrayTypeNode(T[l])):e.createOptionalTypeNode(T[l]);var E=e.createTupleTypeNode(T);return t.target.readonly?e.createTypeOperatorNode(133,E):E}}if(r.encounteredError||524288&r.flags){var E=e.createTupleTypeNode([]);return t.target.readonly?e.createTypeOperatorNode(133,E):E}r.encounteredError=!0}(t);if(262144&t.flags||3&h){if(262144&t.flags&&e.contains(r.inferTypeParameters,t))return r.approximateLength+=e.symbolName(t.symbol).length+6,e.createInferTypeNode(f(t,r,void 0));if(4&r.flags&&262144&t.flags&&e.length(t.symbol.declarations)&&e.isTypeParameterDeclaration(t.symbol.declarations[0])&&p(t,r)&&!ei(t.symbol,r.enclosingDeclaration)){var v=t.symbol.declarations[0].name;return r.approximateLength+=e.idText(v).length,e.createTypeReferenceNode(e.getGeneratedNameForNode(v,24),void 0)}return t.symbol?S(t.symbol,r,67897832):e.createTypeReferenceNode(e.createIdentifier("?"),void 0)}if(!n&&t.aliasSymbol&&(16384&r.flags||ei(t.aliasSymbol,r.enclosingDeclaration))){var b=u(t.aliasTypeArguments,r);return!Wn(t.aliasSymbol.escapedName)||32&t.aliasSymbol.flags?S(t.aliasSymbol,r,67897832,b):e.createTypeReferenceNode(e.createIdentifier(""),b)}if(!(3145728&t.flags)){if(48&h)return e.Debug.assert(!!(524288&t.flags)),I(t);if(4194304&t.flags){var D=t.type;r.approximateLength+=6;var x=o(D,r);return e.createTypeOperatorNode(x)}if(8388608&t.flags){var T=o(t.objectType,r),x=o(t.indexType,r);return r.approximateLength+=2,e.createIndexedAccessTypeNode(T,x)}if(16777216&t.flags){var C=o(t.checkType,r),E=r.inferTypeParameters;r.inferTypeParameters=t.root.inferTypeParameters;var k=o(t.extendsType,r);r.inferTypeParameters=E;var N=o(t.trueType,r),A=o(t.falseType,r);return r.approximateLength+=15,e.createConditionalTypeNode(C,k,N,A)}return 33554432&t.flags?o(t.typeVariable,r):e.Debug.fail("Should be unreachable.")}var F=1048576&t.flags?function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e[n];if(r|=i.flags,!(98304&i.flags)){if(1536&i.flags){var a=512&i.flags?Te:Ta(i);if(1048576&a.flags){var o=a.types.length;if(n+o<=e.length&&gu(e[n+o-1])===gu(a.types[o-1])){t.push(a),n+=o-1;continue}}}t.push(i)}}return 65536&r&&t.push(me),32768&r&&t.push(pe),t||e}(t.types):t.types;if(1===e.length(F))return o(F[0],r);var P=u(F,r,!0);if(P&&P.length>0){var w=e.createUnionOrIntersectionTypeNode(1048576&t.flags?173:174,P);return w}r.encounteredError||262144&r.flags||(r.encounteredError=!0)}else r.encounteredError=!0;function I(t){var n,i=""+t.id,a=t.symbol;if(a){var o=16&e.getObjectFlags(t)&&t.symbol&&32&t.symbol.flags;if(n=(o?"+":"")+l(a),lm(a.valueDeclaration)){var c=t===pm(a)?67897832:67220415;return S(a,r,c)}if(32&a.flags&&!ta(a)&&!(209===a.valueDeclaration.kind&&2048&r.flags)||896&a.flags||function(){var t=!!(8192&a.flags)&&e.some(a.declarations,function(t){return e.hasModifier(t,32)}),n=!!(16&a.flags)&&(a.parent||e.forEach(a.declarations,function(e){return 284===e.parent.kind||245===e.parent.kind}));if(t||n)return(!!(4096&r.flags)||r.visitedTypes&&r.visitedTypes.has(i))&&(!(8&r.flags)||ti(a,r.enclosingDeclaration))}())return S(a,r,67220415);if(r.visitedTypes&&r.visitedTypes.has(i)){var u=function(t){if(t.symbol&&2048&t.symbol.flags){var r=e.findAncestor(t.symbol.declarations[0].parent,function(e){return 177!==e.kind});if(242===r.kind)return In(r)}}(t);return u?S(u,r,67897832):s(r)}r.visitedTypes||(r.visitedTypes=e.createMap()),r.symbolDepth||(r.symbolDepth=e.createMap());var _=r.symbolDepth.get(n)||0;if(_>10)return s(r);r.symbolDepth.set(n,_+1),r.visitedTypes.set(i,!0);var d=O(t);return r.visitedTypes.delete(i),r.symbolDepth.set(n,_),d}return O(t)}function O(t){if(bo(t))return function(t){e.Debug.assert(!!(524288&t.flags));var n,i=t.declaration.readonlyToken?e.createToken(t.declaration.readonlyToken.kind):void 0,a=t.declaration.questionToken?e.createToken(t.declaration.questionToken.kind):void 0;n=mo(t)?e.createTypeOperatorNode(o(go(t),r)):o(_o(t),r);var s=f(lo(t),r,n),c=o(po(t),r),u=e.createMappedTypeNode(i,s,a,c);return r.approximateLength+=10,e.setEmitFlags(u,1)}(t);var n=Do(t);if(!n.properties.length&&!n.stringIndexInfo&&!n.numberIndexInfo){if(!n.callSignatures.length&&!n.constructSignatures.length)return r.approximateLength+=2,e.setEmitFlags(e.createTypeLiteralNode(void 0),1);if(1===n.callSignatures.length&&!n.constructSignatures.length){var i=n.callSignatures[0],u=d(i,165,r);return u}if(1===n.constructSignatures.length&&!n.callSignatures.length){var i=n.constructSignatures[0],u=d(i,166,r);return u}}var l=r.flags;r.flags|=4194304;var p=function(t){if(a(r))return[e.createPropertySignature(void 0,"...",void 0,void 0,void 0)];for(var n=[],i=0,o=t.callSignatures;i<o.length;i++){var u=o[i];n.push(d(u,160,r))}for(var l=0,p=t.constructSignatures;l<p.length;l++){var u=p[l];n.push(d(u,161,r))}if(t.stringIndexInfo){var f=void 0;2048&t.objectFlags?(f=_(Es(ce,t.stringIndexInfo.isReadonly,t.stringIndexInfo.declaration),0,r)).type=s(r):f=_(t.stringIndexInfo,0,r),n.push(f)}t.numberIndexInfo&&n.push(_(t.numberIndexInfo,1,r));var m=t.properties;if(!m)return n;for(var g=0,y=0,h=m;y<h.length;y++){var v=h[y];if(g++,2048&r.flags){if(4194304&v.flags)continue;24&e.getDeclarationModifierFlagsFromSymbol(v)&&r.tracker.reportPrivateInBaseOfClassExpression&&r.tracker.reportPrivateInBaseOfClassExpression(e.unescapeLeadingUnderscores(v.escapedName))}if(a(r)&&g+2<m.length-1){n.push(e.createPropertySignature(void 0,"... "+(m.length-g)+" more ...",void 0,void 0,void 0)),c(m[m.length-1],r,n);break}c(v,r,n)}return n.length?n:void 0}(n);r.flags=l;var m=e.createTypeLiteralNode(p);return r.approximateLength+=2,e.setEmitFlags(m,1024&r.flags?0:1)}function M(t,r){if(e.isImportTypeNode(t)){var n=t.typeArguments;t.qualifier&&((e.isIdentifier(t.qualifier)?t.qualifier:t.qualifier.right).typeArguments=n),t.typeArguments=r.typeArguments;for(var i=L(r),a=0,o=i;a<o.length;a++){var s=o[a];t.qualifier=t.qualifier?e.createQualifiedName(t.qualifier,s):s}return t}var n=t.typeArguments;(e.isIdentifier(t.typeName)?t.typeName:t.typeName.right).typeArguments=n,t.typeArguments=r.typeArguments;for(var i=L(r),c=0,u=i;c<u.length;c++){var s=u[c];t.typeName=e.createQualifiedName(t.typeName,s)}return t}function L(t){for(var r=t.typeName,n=[];!e.isIdentifier(r);)n.unshift(r.right),r=r.left;return n.unshift(r),n}}function s(t){return t.approximateLength+=3,1&t.flags?e.createKeywordTypeNode(120):e.createTypeReferenceNode(e.createIdentifier("..."),void 0)}function c(t,r,n){var i=!!(4096&e.getCheckFlags(t)),a=i&&33554432&r.flags?ce:aa(t),c=r.enclosingDeclaration;if(r.enclosingDeclaration=void 0,r.tracker.trackSymbol&&2048&e.getCheckFlags(t)){var u=e.first(t.declarations);Ja(u)&&h(u.name,c,r)}var l=T(t,r,67220415,!0);r.approximateLength+=e.symbolName(t).length+1,r.enclosingDeclaration=c;var _=16777216&t.flags?e.createToken(56):void 0;if(8208&t.flags&&!xo(a).length&&!Gm(t))for(var p=Vo(a,0),f=0,m=p;f<m.length;f++){var g=m[f],y=d(g,155,r);y.name=l,y.questionToken=_,t.valueDeclaration&&e.setCommentRange(y,t.valueDeclaration),n.push(y)}else{var v=r.flags;r.flags|=i?33554432:0;var b=void 0;b=i&&33554432&v?s(r):a?o(a,r):e.createKeywordTypeNode(120),r.flags=v;var D=Gm(t)?[e.createToken(133)]:void 0;D&&(r.approximateLength+=9);var x=e.createPropertySignature(D,l,_,b,void 0);t.valueDeclaration&&e.setCommentRange(x,t.valueDeclaration),n.push(x)}}function u(t,r,n){if(e.some(t)){if(a(r)){if(!n)return[e.createTypeReferenceNode("...",void 0)];if(t.length>2)return[o(t[0],r),e.createTypeReferenceNode("... "+(t.length-2)+" more ...",void 0),o(t[t.length-1],r)]}for(var i=[],s=0,c=0,u=t;c<u.length;c++){var l=u[c];if(s++,a(r)&&s+2<t.length-1){i.push(e.createTypeReferenceNode("... "+(t.length-s)+" more ...",void 0));var _=o(t[t.length-1],r);_&&i.push(_);break}r.approximateLength+=2;var d=o(l,r);d&&i.push(d)}return i}}function _(t,r,n){var i=e.getNameFromIndexInfo(t)||"x",a=e.createKeywordTypeNode(0===r?138:135),s=e.createParameter(void 0,void 0,void 0,i,void 0,a,void 0),c=o(t.type||ce,n);return t.type||2097152&n.flags||(n.encounteredError=!0),n.approximateLength+=i.length+4,e.createIndexSignature(void 0,t.isReadonly?[e.createToken(133)]:void 0,[s],c)}function d(t,r,n){var i,a;32&n.flags&&t.target&&t.mapper&&t.target.typeParameters?a=t.target.typeParameters.map(function(e){return o(Ku(e,t.mapper),n)}):i=t.typeParameters&&t.typeParameters.map(function(e){return g(e,n)});var s,c=$a(t).map(function(e){return y(e,n,157===r)});if(t.thisParameter){var u=y(t.thisParameter,n);c.unshift(u)}var l=ds(t);if(l){var _=1===l.kind?e.setEmitFlags(e.createIdentifier(l.parameterName),16777216):e.createThisTypeNode(),d=o(l.type,n);s=e.createTypePredicateNode(_,d)}else{var p=ps(t);s=p&&o(p,n)}return 256&n.flags?s&&120===s.kind&&(s=void 0):s||(s=e.createKeywordTypeNode(120)),n.approximateLength+=3,e.createSignatureDeclaration(r,i,c,s,a)}function p(e,t){return!!Gr(t.enclosingDeclaration,e.symbol.escapedName,67897832,void 0,e.symbol.escapedName,!1)}function f(t,r,n){var i=r.flags;r.flags&=-513;var a=4&r.flags&&t.symbol.declarations&&t.symbol.declarations[0]&&e.isTypeParameterDeclaration(t.symbol.declarations[0])&&p(t,r),s=a?e.getGeneratedNameForNode(t.symbol.declarations[0].name,24):T(t.symbol,r,67897832,!0),c=Lo(t),u=c&&o(c,r);return r.flags=i,e.createTypeParameterDeclaration(s,n,u)}function g(e,t,r){void 0===r&&(r=ko(e));var n=r&&o(r,t);return f(e,t,n)}function y(t,r,n){var i=e.getDeclarationOfKind(t,151);i||Or(t)||(i=e.getDeclarationOfKind(t,304));var a=aa(t);i&&Gh(i)&&(a=u_(a));var s=o(a,r),c=!(8192&r.flags)&&n&&i&&i.modifiers?i.modifiers.map(e.getSynthesizedClone):void 0,u=i&&e.isRestParameter(i)||16384&e.getCheckFlags(t),l=u?e.createToken(25):void 0,_=i&&i.name?72===i.name.kind?e.setEmitFlags(e.getSynthesizedClone(i.name),16777216):148===i.name.kind?e.setEmitFlags(e.getSynthesizedClone(i.name.right),16777216):function t(n){r.tracker.trackSymbol&&e.isComputedPropertyName(n)&&Ba(n)&&h(n,r.enclosingDeclaration,r);var i=e.visitEachChild(n,t,e.nullTransformationContext,void 0,t),a=e.nodeIsSynthesized(i)?i:e.getSynthesizedClone(i);return 186===a.kind&&(a.initializer=void 0),e.setEmitFlags(a,16777217)}(i.name):e.symbolName(t),d=i&&es(i)||8192&e.getCheckFlags(t),p=d?e.createToken(56):void 0,f=e.createParameter(void 0,c,l,_,p,s,void 0);return r.approximateLength+=e.symbolName(t).length+3,f}function h(e,t,r){if(r.tracker.trackSymbol){var n=ch(e.expression),i=Gr(n,n.escapedText,68268991,void 0,void 0,!0);i&&r.tracker.trackSymbol(i,t,67220415)}}function v(t,r,n,i){var a;r.tracker.trackSymbol(t,r.enclosingDeclaration,n);var o=262144&t.flags;return o||!(r.enclosingDeclaration||64&r.flags)||134217728&r.flags?a=[t]:(a=e.Debug.assertDefined(function t(n,a,o){var s,c=$n(n,r.enclosingDeclaration,a,!!(128&r.flags));if(!c||Zn(c[0],r.enclosingDeclaration,1===c.length?a:Qn(a))){var u=Mn(c?c[0]:n,r.enclosingDeclaration);if(e.length(u)){s=u.map(function(t){return e.some(t.declarations,ai)?x(t,r):void 0});var l=u.map(function(e,t){return t});l.sort(function(t,r){var n=s[t],i=s[r];if(n&&i){var a=e.pathIsRelative(i);return e.pathIsRelative(n)===a?e.moduleSpecifiers.countPathComponents(n)-e.moduleSpecifiers.countPathComponents(i):a?-1:1}return 0});for(var _=l.map(function(e){return u[e]}),d=0,p=_;d<p.length;d++){var f=p[d],m=t(f,Qn(a),!1);if(m){c=m.concat(c||[Ln(f,n)||n]);break}}}}if(c)return c;if(o||!(6144&n.flags)){if(!o&&!i&&e.forEach(n.declarations,ai))return;return[n]}}(t,n,!0)),e.Debug.assert(a&&a.length>0)),a}function b(t,r){var n,i=eh(t);return 524384&i.flags&&(n=e.createNodeArray(e.map(da(t),function(e){return g(e,r)}))),n}function D(t,r,n){e.Debug.assert(t&&0<=r&&r<t.length);var i,a=t[r];if(512&n.flags&&r<t.length-1){var o=a,s=t[r+1];if(1&e.getCheckFlags(s)){var c=function(t){return e.concatenate(_a(t),da(t))}(2097152&o.flags?dn(o):o);i=u(e.map(c,s.mapper),n)}else i=b(a,n)}return i}function x(t,a){var o=e.getDeclarationOfKind(t,284);if(o&&void 0!==o.moduleName)return o.moduleName;if(!o){if(a.tracker.trackReferencedAmbientModule){var s=e.filter(t.declarations,e.isAmbientModule);if(e.length(s))for(var c=0,u=s;c<u.length;c++){var l=u[c];a.tracker.trackReferencedAmbientModule(l,t)}}if(r.test(t.escapedName))return t.escapedName.substring(1,t.escapedName.length-1)}if(!a.enclosingDeclaration||!a.tracker.moduleResolverHost)return r.test(t.escapedName)?t.escapedName.substring(1,t.escapedName.length-1):e.getSourceFileOfNode(e.getNonAugmentationDeclaration(t)).fileName;var _=e.getSourceFileOfNode(e.getOriginalNode(a.enclosingDeclaration)),d=Ur(t),p=d.specifierCache&&d.specifierCache.get(_.path);if(!p){var f=F.out||F.outFile,m=a.tracker.moduleResolverHost,g=f?i({},F,{baseUrl:m.getCommonSourceDirectory()}):F;p=e.first(e.moduleSpecifiers.getModuleSpecifiers(t,g,_,m,n.getSourceFiles(),{importModuleSpecifierPreference:f?"non-relative":"relative"},n.redirectTargetsMap)),d.specifierCache=d.specifierCache||e.createMap(),d.specifierCache.set(_.path,p)}return p}function S(t,r,n,i){var a=v(t,r,n,!(16384&r.flags)),o=67220415===n;if(e.some(a[0].declarations,ai)){var s=a.length>1?g(a,a.length-1,1):void 0,c=i||D(a,0,r),u=x(a[0],r);!(67108864&r.flags)&&e.getEmitModuleResolutionKind(F)===e.ModuleResolutionKind.NodeJs&&u.indexOf("/node_modules/")>=0&&(r.encounteredError=!0,r.tracker.reportLikelyUnsafeImportRequiredError&&r.tracker.reportLikelyUnsafeImportRequiredError(u));var l=e.createLiteralTypeNode(e.createLiteral(u));if(r.tracker.trackExternalModuleSymbolOfImportTypeNode&&r.tracker.trackExternalModuleSymbolOfImportTypeNode(a[0]),r.approximateLength+=u.length+10,!s||e.isEntityName(s)){if(s){var _=e.isIdentifier(s)?s:s.right;_.typeArguments=void 0}return e.createImportTypeNode(l,s,c,o)}var d=function t(r){return e.isIndexedAccessTypeNode(r.objectType)?t(r.objectType):r}(s),p=d.objectType.typeName;return e.createIndexedAccessTypeNode(e.createImportTypeNode(l,p,c,o),d.indexType)}var f=g(a,a.length-1,0);if(e.isIndexedAccessTypeNode(f))return f;if(o)return e.createTypeQueryNode(f);var _=e.isIdentifier(f)?f:f.right,m=_.typeArguments;return _.typeArguments=void 0,e.createTypeReferenceNode(f,m);function g(t,n,a){var o=n===t.length-1?i:D(t,n,r),s=t[n];0===n&&(r.flags|=16777216);var c=yi(s,r);r.approximateLength+=c.length+1,0===n&&(r.flags^=16777216);var u=t[n-1];if(!(16&r.flags)&&u&&qa(u)&&qa(u).get(s.escapedName)===s){var l=g(t,n-1,a);return e.isIndexedAccessTypeNode(l)?e.createIndexedAccessTypeNode(l,e.createLiteralTypeNode(e.createLiteral(c))):e.createIndexedAccessTypeNode(e.createTypeReferenceNode(l,o),e.createLiteralTypeNode(e.createLiteral(c)))}var _=e.setEmitFlags(e.createIdentifier(c,o),16777216);if(_.symbol=s,n>a){var l=g(t,n-1,a);return e.isEntityName(l)?e.createQualifiedName(l,_):e.Debug.fail("Impossible construct - an export of an indexed access cannot be reachable")}return _}}function T(t,r,n,i){var a=v(t,r,n);return!i||1===a.length||r.encounteredError||65536&r.flags||(r.encounteredError=!0),function t(n,i){var a=D(n,i,r),o=n[i];0===i&&(r.flags|=16777216);var s=yi(o,r);0===i&&(r.flags^=16777216);var c=e.setEmitFlags(e.createIdentifier(s,a),16777216);return c.symbol=o,i>0?e.createQualifiedName(t(n,i-1),c):c}(a,a.length-1)}}(),V=e.createSymbolTable(),q=Ir(4,"undefined");q.declarations=[];var W=Ir(1536,"globalThis",8);W.exports=V,W.valueDeclaration=e.createNode(72),W.valueDeclaration.escapedText="globalThis",V.set(W.escapedName,W);var H,G=Ir(4,"arguments"),Y=Ir(4,"require"),X={getNodeCount:function(){return e.sum(n.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(n.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(n.getSourceFiles(),"symbolCount")+T},getTypeCount:function(){return S},isUndefinedSymbol:function(e){return e===q},isArgumentsSymbol:function(e){return e===G},isUnknownSymbol:function(e){return e===oe},getMergedSymbol:wn,getDiagnostics:Sh,getGlobalDiagnostics:function(){return Th(),cr.getGlobalDiagnostics()},getTypeOfSymbolAtLocation:function(t,r){return(r=e.getParseTreeNode(r))?function(t,r){if(t=t.exportSymbol||t,72===r.kind&&(e.isRightSideOfQualifiedNameOrPropertyAccess(r)&&(r=r.parent),e.isExpressionNode(r)&&!e.isAssignmentTarget(r))){var n=Cg(r);if(Rn(Vr(r).resolvedSymbol)===t)return n}return aa(t)}(t,r):_e},getSymbolsOfParameterPropertyDeclaration:function(t,r){var n=e.getParseTreeNode(t,e.isParameter);return void 0===n?e.Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):function(t,r){var n=t.parent,i=t.parent.parent,a=Wr(n.locals,r,67220415),o=Wr(qa(i.symbol),r,67220415);return a&&o?[a,o]:e.Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,e.escapeLeadingUnderscores(r))},getDeclaredTypeOfSymbol:Na,getPropertiesOfType:Co,getPropertyOfType:function(t,r){return Ko(t,e.escapeLeadingUnderscores(r))},getTypeOfPropertyOfType:function(t,r){return Ci(t,e.escapeLeadingUnderscores(r))},getIndexInfoOfType:Ho,getSignaturesOfType:Vo,getIndexTypeOfType:Go,getBaseTypes:va,getBaseTypeOfLiteralType:Xl,getWidenedType:h_,getTypeFromTypeNode:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r?Du(r):_e},getParameterType:Sm,getPromisedTypeOfPromise:Yg,getReturnTypeOfSignature:ps,getNullableType:c_,getNonNullableType:l_,typeToTypeNode:U.typeToTypeNode,indexInfoToIndexSignatureDeclaration:U.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:U.signatureToSignatureDeclaration,symbolToEntityName:U.symbolToEntityName,symbolToExpression:U.symbolToExpression,symbolToTypeParameterDeclarations:U.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:U.symbolToParameterDeclaration,typeParameterToDeclaration:U.typeParameterToDeclaration,getSymbolsInScope:function(t,r){return(t=e.getParseTreeNode(t))?function(t,r){if(8388608&t.flags)return[];var n=e.createSymbolTable(),i=!1;return function(){for(;t;){switch(t.locals&&!qr(t)&&o(t.locals,r),t.kind){case 284:if(!e.isExternalOrCommonJsModule(t))break;case 244:o(In(t).exports,2623475&r);break;case 243:o(In(t).exports,8&r);break;case 209:var n=t.name;n&&a(t.symbol,r);case 240:case 241:i||o(qa(In(t)),67897832&r);break;case 196:var s=t.name;s&&a(t.symbol,r)}e.introducesArgumentsExoticObject(t)&&a(G,r),i=e.hasModifier(t,32),t=t.parent}o(V,r)}(),n.delete("this"),Qo(n);function a(t,r){if(e.getCombinedLocalAndExportSymbolFlags(t)&r){var i=t.escapedName;n.has(i)||n.set(i,t)}}function o(e,t){t&&e.forEach(function(e){a(e,t)})}}(t,r):[]},getSymbolAtLocation:function(t){return(t=e.getParseTreeNode(t))?Ph(t):void 0},getShorthandAssignmentValueSymbol:function(t){return(t=e.getParseTreeNode(t))?function(e){if(e&&276===e.kind)return yn(e.name,69317567)}(t):void 0},getExportSpecifierLocalTargetSymbol:function(t){var r=e.getParseTreeNode(t,e.isExportSpecifier);return r?function(e){return e.parent.parent.moduleSpecifier?sn(e.parent.parent,e):yn(e.propertyName||e.name,70107135)}(r):void 0},getExportSymbolOfSymbol:function(e){return wn(e.exportSymbol||e)},getTypeAtLocation:function(t){return(t=e.getParseTreeNode(t))?wh(t):_e},getPropertySymbolOfDestructuringAssignment:function(t){var r=e.getParseTreeNode(t,e.isIdentifier);return r?function(t){var r=function t(r){if(e.Debug.assert(188===r.kind||187===r.kind),227===r.parent.kind){var n=Ry(r.parent.expression,r.parent.awaitModifier);return og(r,n||_e)}if(204===r.parent.kind){var n=Cg(r.parent.right);return og(r,n||_e)}if(275===r.parent.kind){var i=t(r.parent.parent);return ig(i||_e,r.parent)}e.Debug.assert(187===r.parent.kind);var a=t(r.parent),o=By(a||_e,r.parent,!1,!1)||_e;return ag(r.parent,a,r.parent.elements.indexOf(r),o||_e)}(t.parent.parent);return r&&Ko(r,t.escapedText)}(r):void 0},signatureToString:function(t,r,n,i){return ui(t,e.getParseTreeNode(r),n,i)},typeToString:function(t,r,n){return li(t,e.getParseTreeNode(r),n)},symbolToString:function(t,r,n,i){return ci(t,e.getParseTreeNode(r),n,i)},typePredicateToString:function(t,r,n){return di(t,e.getParseTreeNode(r),n)},writeSignature:function(t,r,n,i,a){return ui(t,e.getParseTreeNode(r),n,i,a)},writeType:function(t,r,n,i){return li(t,e.getParseTreeNode(r),n,i)},writeSymbol:function(t,r,n,i,a){return ci(t,e.getParseTreeNode(r),n,i,a)},writeTypePredicate:function(t,r,n,i){return di(t,e.getParseTreeNode(r),n,i)},getAugmentedPropertiesOfType:Oh,getRootSymbols:function t(r){var n=function(t){if(6&e.getCheckFlags(t))return e.mapDefined(Ur(t).containingType.types,function(e){return Ko(e,t.escapedName)});if(33554432&t.flags){var r=t,n=r.leftSpread,i=r.rightSpread,a=r.syntheticOrigin;return n?[n,i]:a?[a]:e.singleElementArray(function(e){for(var t,r=e;r=Ur(r).target;)t=r;return t}(t))}}(r);return n?e.flatMap(n,t):[r]},getContextualType:function(t){var r=e.getParseTreeNode(t,e.isExpression);return r?xp(r):void 0},getContextualTypeForObjectLiteralElement:function(t){var r=e.getParseTreeNode(t,e.isObjectLiteralElementLike);return r?mp(r):void 0},getContextualTypeForArgumentAtIndex:function(t,r){var n=e.getParseTreeNode(t,e.isCallLikeExpression);return n&&_p(n,r)},getContextualTypeForJsxAttribute:function(t){var r=e.getParseTreeNode(t,e.isJsxAttributeLike);return r&&hp(r)},isContextSensitive:Wu,getFullyQualifiedName:gn,getResolvedSignature:function(e,t,r){return Q(e,t,r,0)},getResolvedSignatureForSignatureHelp:function(e,t,r){return Q(e,t,r,16)},getExpandedParameters:$a,hasEffectiveRestParameter:Nm,getConstantValue:function(t){var r=e.getParseTreeNode(t,ev);return r?tv(r):void 0},isValidPropertyAccess:function(t,r){var n=e.getParseTreeNode(t,e.isPropertyAccessOrQualifiedNameOrImportTypeNode);return!!n&&function(e,t){switch(e.kind){case 189:return Cf(e,98===e.expression.kind,t,h_(kg(e.expression)));case 148:return Cf(e,!1,t,h_(kg(e.left)));case 183:return Cf(e,!1,t,Du(e))}}(n,e.escapeLeadingUnderscores(r))},isValidPropertyAccessForCompletions:function(t,r,n){var i=e.getParseTreeNode(t,e.isPropertyAccessExpression);return!!i&&function(t,r,n){return Cf(t,189===t.kind&&98===t.expression.kind,n.escapedName,r)&&(!(8192&n.flags)||(a=Vo(l_(Ci(i=r,n.escapedName)),0),e.Debug.assert(0!==a.length),a.some(function(e){var t=ls(e);return!t||rl(i,function(e,t,r){if(!e.typeParameters)return t;var n=T_(e.typeParameters,e,0);return B_(n.inferences,r,t),Ku(t,vs(e,W_(n)))}(e,t,i))})));var i,a}(i,r,n)},getSignatureFromDeclaration:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?os(r):void 0},isImplementationOfOverload:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?Hh(r):void 0},getImmediateAliasedSymbol:jp,getAliasedSymbol:dn,getEmitResolver:function(e,t){return Sh(e,t),K},getExportsOfModule:En,getExportsAndPropertiesOfModule:function(t){var r=En(t),n=Sn(t);return n!==t&&e.addRange(r,Co(aa(n))),r},getSymbolWalker:e.createGetSymbolWalker(function(e){return ms(e)||ce},ds,ps,va,Do,aa,G_,Wo,ko,ch),getAmbientModules:function(){return We||(We=[],V.forEach(function(e,t){r.test(t)&&We.push(e)})),We},getJsxIntrinsicTagNamesAt:function(r){var n=Hp(t.IntrinsicElements,r);return n?Co(n):e.emptyArray},isOptionalParameter:function(t){var r=e.getParseTreeNode(t,e.isParameter);return!!r&&es(r)},tryGetMemberInModuleExports:function(t,r){return kn(e.escapeLeadingUnderscores(t),r)},tryGetMemberInModuleExportsAndProperties:function(t,r){return function(e,t){var r=kn(e,t);if(r)return r;var n=Sn(t);if(n!==t){var i=aa(n);return 131068&i.flags?void 0:Ko(i,e)}}(e.escapeLeadingUnderscores(t),r)},tryFindAmbientModuleWithoutAugmentations:function(e){return Zo(e,!1)},getApparentType:Bo,getUnionType:Ac,createAnonymousType:Yn,createSignature:Ya,createSymbol:Ir,createIndexInfo:Es,getAnyType:function(){return ce},getStringType:function(){return ye},getNumberType:function(){return he},createPromiseType:Mm,createArrayType:hc,getElementTypeOfArrayType:Kl,getBooleanType:function(){return Te},getFalseType:function(e){return e?be:De},getTrueType:function(e){return e?xe:Se},getVoidType:function(){return Ee},getUndefinedType:function(){return pe},getNullType:function(){return me},getESSymbolType:function(){return Ce},getNeverType:function(){return ke},isSymbolAccessible:ri,getObjectFlags:e.getObjectFlags,isArrayType:Jl,isTupleType:e_,isArrayLikeType:Ul,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some(function(t){var r=t.name&&Rc(t.name),n=r&&Ra(r)?Ka(r):void 0,i=void 0===n?void 0:Ci(e,n);return!!i&&Yl(i)&&!rl(wh(t),i)})},getAllPossiblePropertiesOfTypes:function(t){var r=Ac(t);if(!(1048576&r.flags))return Oh(r);for(var n=e.createSymbolTable(),i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,c=Oh(o);s<c.length;s++){var u=c[s].escapedName;if(!n.has(u)){var l=jo(r,u);l&&n.set(u,l)}}return e.arrayFrom(n.values())},getSuggestionForNonexistentProperty:function(e,t){return bf(e,t)},getSuggestionForNonexistentSymbol:function(t,r,n){return function(t,r,n){var i=Df(t,r,n);return i&&e.symbolName(i)}(t,e.escapeLeadingUnderscores(r),n)},getSuggestionForNonexistentExport:function(t,r){return(n=xf(t,r))&&e.symbolName(n);var n},getBaseConstraintOfType:Po,getDefaultFromTypeParameter:function(e){return e&&262144&e.flags?Lo(e):void 0},resolveName:function(t,r,n,i){return Gr(r,e.escapeLeadingUnderscores(t),n,void 0,void 0,!1,i)},getJsxNamespace:function(t){return e.unescapeLeadingUnderscores(Fr(t))},getAccessibleSymbolChain:$n,getTypePredicateOfSignature:ds,resolveExternalModuleSymbol:Sn,tryGetThisTypeAt:function(t,r){return(t=e.getParseTreeNode(t))&&ep(t,r)},getTypeArgumentConstraint:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r&&function(t){var r=e.tryCast(t.parent,e.isTypeReferenceType);if(r){var n=Jg(r),i=ko(n[r.typeArguments.indexOf(t)]);return i&&Ku(i,Eu(n,Bg(r,n)))}}(r)},getSuggestionDiagnostics:function(t,r){if(e.skipTypeChecking(t,F))return e.emptyArray;var n;try{return m=r,bh(t),e.Debug.assert(!!(1&Vr(t).flags)),n=e.addRange(n,ur.get(t.fileName)),t.isDeclarationFile||Dh(0)&&Dh(1)||cy(xh(t),function(t,r,a){e.containsParseError(t)||Dh(r)||(n||(n=[])).push(i({},a,{category:e.DiagnosticCategory.Suggestion}))}),n||e.emptyArray}finally{m=void 0}},runWithCancellationToken:function(e,t){try{return m=e,t(X)}finally{m=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:da};function Q(t,r,n,i){var a=e.getParseTreeNode(t,e.isCallLikeExpression);H=n;var o=a?um(a,r,i):void 0;return H=void 0,o}var $=e.createMap(),Z=e.createMap(),ee=e.createMap(),te=e.createMap(),re=e.createMap(),ne=e.createMap(),ie=[],ae=e.createMap(),oe=Ir(4,"unknown"),se=Ir(0,"__resolving__"),ce=zn(1,"any"),ue=zn(1,"any"),le=zn(1,"any"),_e=zn(1,"error"),de=zn(2,"unknown"),pe=Kn(32768,"undefined",0),fe=O?pe:Kn(32768,"undefined",131072),me=Kn(65536,"null",0),ge=O?me:Kn(65536,"null",131072),ye=zn(4,"string"),he=zn(8,"number"),ve=zn(64,"bigint"),be=zn(512,"false"),De=zn(512,"false"),xe=zn(512,"true"),Se=zn(512,"true");xe.regularType=Se,xe.freshType=xe,Se.regularType=Se,Se.freshType=xe,be.regularType=De,be.freshType=be,De.regularType=De,De.freshType=be;var Te=Un([De,Se]);Un([De,xe]),Un([be,Se]),Un([be,xe]);var Ce=zn(4096,"symbol"),Ee=zn(16384,"void"),ke=zn(131072,"never"),Ne=zn(131072,"never"),Ae=zn(131072,"never"),Fe=zn(67108864,"object"),Pe=Ac([ye,he,Ce]),we=J?ye:Pe,Ie=Ac([he,ve]),Oe=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0),Me=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0);Me.objectFlags|=4096;var Le=Ir(2048,"__type");Le.members=e.createSymbolTable();var Re=Yn(Le,N,e.emptyArray,e.emptyArray,void 0,void 0),Be=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0);Be.instantiations=e.createMap();var je=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0);je.objectFlags|=524288;var Je=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0),ze=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0),Ke=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0),Ue=qn(),Ve=qn();Ve.constraint=Ue;var qe,We,He,Ge,Ye,Xe,Qe,$e,Ze,et,tt,rt,nt,it,at,ot,st,ct,ut,lt,_t,dt,pt,ft,mt,gt,yt,ht,vt,bt,Dt,xt,St,Tt,Ct,Et,kt,Nt,At=qn(),Ft=rs("<<unresolved>>",0,ce),Pt=Ya(void 0,void 0,void 0,e.emptyArray,ce,void 0,0,!1,!1),wt=Ya(void 0,void 0,void 0,e.emptyArray,_e,void 0,0,!1,!1),It=Ya(void 0,void 0,void 0,e.emptyArray,ce,void 0,0,!1,!1),Ot=Ya(void 0,void 0,void 0,e.emptyArray,Ne,void 0,0,!1,!1),Mt=Es(ye,!0),Lt=e.createMap(),Rt=e.createMap(),Bt=0,jt=0,Jt=0,zt=!1,Kt=hu(""),Ut=hu(0),Vt=hu({negative:!1,base10Value:"0"}),qt=[],Wt=[],Ht=[],Gt=0,Yt=10,Xt=[],Qt=[],$t=[],Zt=[],er=[],tr=[],rr=[],nr=[],ir=[],ar=[],or=[],sr=[],cr=e.createDiagnosticCollection(),ur=e.createMultiMap();!function(e){e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.All=16777215]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.UndefinedFacts=9830144]="UndefinedFacts",e[e.NullFacts=9363232]="NullFacts",e[e.EmptyObjectStrictFacts=16318463]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=16777215]="EmptyObjectFacts"}(Nt||(Nt={}));var lr,_r,dr,pr,fr,mr,gr,yr,hr,vr=e.createMapFromTemplate({string:1,number:2,bigint:4,boolean:8,symbol:16,undefined:65536,object:32,function:64}),br=e.createMapFromTemplate({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384}),Dr=e.createMapFromTemplate({string:ye,number:he,bigint:ve,boolean:Te,symbol:Ce,undefined:pe}),xr=Ac(e.arrayFrom(vr.keys(),hu)),Sr=e.createMap(),Tr=e.createMap(),Cr=e.createMap(),Er=e.createMap(),kr=e.createMap();!function(e){e[e.Type=0]="Type",e[e.ResolvedBaseConstructorType=1]="ResolvedBaseConstructorType",e[e.DeclaredType=2]="DeclaredType",e[e.ResolvedReturnType=3]="ResolvedReturnType",e[e.ImmediateBaseConstraint=4]="ImmediateBaseConstraint",e[e.EnumTagType=5]="EnumTagType",e[e.JSDocTypeReference=6]="JSDocTypeReference"}(dr||(dr={})),function(e){e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp"}(pr||(pr={})),function(e){e[e.None=0]="None",e[e.Bivariant=1]="Bivariant",e[e.Strict=2]="Strict"}(fr||(fr={})),function(e){e[e.IncludeReadonly=1]="IncludeReadonly",e[e.ExcludeReadonly=2]="ExcludeReadonly",e[e.IncludeOptional=4]="IncludeOptional",e[e.ExcludeOptional=8]="ExcludeOptional"}(mr||(mr={})),function(e){e[e.None=0]="None",e[e.Source=1]="Source",e[e.Target=2]="Target",e[e.Both=3]="Both"}(gr||(gr={})),function(e){e.resolvedExports="resolvedExports",e.resolvedMembers="resolvedMembers"}(yr||(yr={})),function(e){e[e.Local=0]="Local",e[e.Parameter=1]="Parameter"}(hr||(hr={}));var Nr=e.createSymbolTable();Nr.set(q.escapedName,q);var Ar=e.and(mh,function(t){return!e.isAccessor(t)});return function(){for(var t=0,r=n.getSourceFiles();t<r.length;t++){var i=r[t];e.bindSourceFile(i,F)}var a;qe=e.createMap();for(var o=0,s=n.getSourceFiles();o<s.length;o++){var i=s[o];if(!i.redirectInfo&&(e.isExternalOrCommonJsModule(i)||zr(V,i.locals),i.jsGlobalAugmentations&&zr(V,i.jsGlobalAugmentations),i.patternAmbientModules&&i.patternAmbientModules.length&&(He=e.concatenate(He,i.patternAmbientModules)),i.moduleAugmentations.length&&(a||(a=[])).push(i.moduleAugmentations),i.symbol&&i.symbol.globalExports)){var c=i.symbol.globalExports;c.forEach(function(e,t){V.has(t)||V.set(t,e)})}}if(a)for(var u=0,l=a;u<l.length;u++)for(var _=l[u],d=0,p=_;d<p.length;d++){var f=p[d];e.isGlobalScopeAugmentation(f.parent)&&Kr(f)}if(function(t,r,n){r.forEach(function(r,i){var a=t.get(i);a?e.forEach(a.declarations,function(t,r){return function(n){return cr.add(e.createDiagnosticForNode(n,r,t))}}(e.unescapeLeadingUnderscores(i),n)):t.set(i,r)})}(V,Nr,e.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0),Ur(q).type=fe,Ur(G).type=tc("IArguments",0,!0),Ur(oe).type=_e,$e=tc("Array",1,!0),Ge=tc("Object",0,!0),Ye=tc("Function",0,!0),Xe=L&&tc("CallableFunction",0,!0)||Ye,Qe=L&&tc("NewableFunction",0,!0)||Ye,et=tc("String",0,!0),tt=tc("Number",0,!0),rt=tc("Boolean",0,!0),nt=tc("RegExp",0,!0),at=hc(ce),(ot=hc(ue))===Oe&&(ot=Yn(void 0,N,e.emptyArray,e.emptyArray,void 0,void 0)),Ze=dc("ReadonlyArray",1),st=Ze?pc(Ze,[ce]):at,it=dc("ThisType",1),a)for(var m=0,g=a;m<g.length;m++)for(var _=g[m],y=0,h=_;y<h.length;y++){var f=h[y];e.isGlobalScopeAugmentation(f.parent)||Kr(f)}qe.forEach(function(t){var r=t.firstFile,n=t.secondFile,i=t.conflictingSymbols;if(i.size<8)i.forEach(function(t,r){for(var n=t.isBlockScoped,i=t.firstFileLocations,a=t.secondFileLocations,o=n?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,s=0,c=i;s<c.length;s++){var u=c[s];Jr(u,o,r,a)}for(var l=0,_=a;l<_.length;l++){var u=_[l];Jr(u,o,r,i)}});else{var a=e.arrayFrom(i.keys()).join(", ");cr.add(e.addRelatedInfo(e.createDiagnosticForNode(r,e.Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,a),e.createDiagnosticForNode(n,e.Diagnostics.Conflicts_are_in_this_file))),cr.add(e.addRelatedInfo(e.createDiagnosticForNode(n,e.Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,a),e.createDiagnosticForNode(r,e.Diagnostics.Conflicts_are_in_this_file)))}}),qe=void 0}(),X;function Fr(t){if(t){var r=e.getSourceFileOfNode(t);if(r){if(r.localJsxNamespace)return r.localJsxNamespace;var n=r.pragmas.get("jsx");if(n){var i=e.isArray(n)?n[0]:n;if(r.localJsxFactory=e.parseIsolatedEntityName(i.arguments.factory,P),r.localJsxFactory)return r.localJsxNamespace=ch(r.localJsxFactory).escapedText}}}return lr||(lr="React",F.jsxFactory?(_r=e.parseIsolatedEntityName(F.jsxFactory,P))&&(lr=ch(_r).escapedText):F.reactNamespace&&(lr=e.escapeLeadingUnderscores(F.reactNamespace))),lr}function Pr(t,r,n,i,a,o){var s=t?e.createDiagnosticForNode(t,r,n,i,a,o):e.createCompilerDiagnostic(r,n,i,a,o);return cr.add(s),s}function wr(t,r,n,a,o,s,c){!function(t,r){t?cr.add(r):ur.add(r.file.fileName,i({},r,{category:e.DiagnosticCategory.Suggestion}))}(t,"message"in n?e.createDiagnosticForNode(r,n,a,o,s,c):e.createDiagnosticForNodeFromMessageChain(r,n))}function Ir(e,t,r){T++;var n=new b(33554432|e,t);return n.checkFlags=r||0,n}function Or(e){return 0!=(33554432&e.flags)}function Mr(e){var t=0;return 2&e&&(t|=67220415),1&e&&(t|=67220414),4&e&&(t|=0),8&e&&(t|=68008959),16&e&&(t|=67219887),32&e&&(t|=68008383),64&e&&(t|=67897736),256&e&&(t|=68008191),128&e&&(t|=68008831),512&e&&(t|=110735),8192&e&&(t|=67212223),32768&e&&(t|=67154879),65536&e&&(t|=67187647),262144&e&&(t|=67635688),524288&e&&(t|=67897832),2097152&e&&(t|=2097152),t}function Lr(e,t){t.mergeId||(t.mergeId=s,s++),Xt[t.mergeId]=e}function Rr(t){var r=Ir(t.flags,t.escapedName);return r.declarations=t.declarations?t.declarations.slice():[],r.parent=t.parent,t.valueDeclaration&&(r.valueDeclaration=t.valueDeclaration),t.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),t.members&&(r.members=e.cloneMap(t.members)),t.exports&&(r.exports=e.cloneMap(t.exports)),Lr(r,t),r}function Br(t,r){if(!(t.flags&Mr(r.flags))||67108864&(r.flags|t.flags)){if(e.Debug.assert(r!==t),!(33554432&t.flags)){var n=_n(t);if(n===oe)return r;t=Rr(n)}512&r.flags&&512&t.flags&&t.constEnumOnlyModule&&!r.constEnumOnlyModule&&(t.constEnumOnlyModule=!1),t.flags|=r.flags,r.valueDeclaration&&(!t.valueDeclaration||e.isAssignmentDeclaration(t.valueDeclaration)&&!e.isAssignmentDeclaration(r.valueDeclaration)||e.isEffectiveModuleDeclaration(t.valueDeclaration)&&!e.isEffectiveModuleDeclaration(r.valueDeclaration))&&(t.valueDeclaration=r.valueDeclaration),e.addRange(t.declarations,r.declarations),r.members&&(t.members||(t.members=e.createSymbolTable()),zr(t.members,r.members)),r.exports&&(t.exports||(t.exports=e.createSymbolTable()),zr(t.exports,r.exports)),Lr(t,r)}else if(1024&t.flags)Pr(e.getNameOfDeclaration(r.declarations[0]),e.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,ci(t));else{var i=!!(384&t.flags||384&r.flags),a=!!(2&t.flags||2&r.flags),o=i?e.Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:a?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,s=r.declarations&&e.getSourceFileOfNode(r.declarations[0]),c=t.declarations&&e.getSourceFileOfNode(t.declarations[0]),u=ci(r);if(s&&c&&qe&&!i&&s!==c){var l=-1===e.comparePaths(s.path,c.path)?s:c,_=l===s?c:s,d=e.getOrUpdate(qe,l.path+"|"+_.path,function(){return{firstFile:l,secondFile:_,conflictingSymbols:e.createMap()}}),p=e.getOrUpdate(d.conflictingSymbols,u,function(){return{isBlockScoped:a,firstFileLocations:[],secondFileLocations:[]}});f(p.firstFileLocations,r),f(p.secondFileLocations,t)}else jr(r,o,u,t),jr(t,o,u,r)}return t;function f(t,r){for(var n=0,i=r.declarations;n<i.length;n++){var a=i[n];e.pushIfUnique(t,(e.getExpandoInitializer(a,!1)?e.getNameOfExpando(a):e.getNameOfDeclaration(a))||a)}}}function jr(t,r,n,i){e.forEach(t.declarations,function(t){Jr((e.getExpandoInitializer(t,!1)?e.getNameOfExpando(t):e.getNameOfDeclaration(t))||t,r,n,i.declarations)})}function Jr(t,r,n,i){for(var a=function(t,r,n,i,a,o){var s=t?e.createDiagnosticForNode(t,r,n,i,a,o):e.createCompilerDiagnostic(r,n,i,a,o),c=cr.lookup(s);return c||(cr.add(s),s)}(t,r,n),o=0,s=i||e.emptyArray;o<s.length;o++){var c=s[o];a.relatedInformation=a.relatedInformation||[],e.length(a.relatedInformation)>=5||e.addRelatedInfo(a,e.length(a.relatedInformation)?e.createDiagnosticForNode(c,e.Diagnostics.and_here):e.createDiagnosticForNode(c,e.Diagnostics._0_was_also_declared_here,n))}}function zr(e,t){t.forEach(function(t,r){var n=e.get(r);e.set(r,n?Br(n,t):t)})}function Kr(t){var r=t.parent;if(r.symbol.declarations[0]===r)if(e.isGlobalScopeAugmentation(r))zr(V,r.symbol.exports);else{var n=bn(t,t,4194304&t.parent.parent.flags?void 0:e.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!n)return;1920&(n=Sn(n)).flags?n=Br(n,r.symbol):Pr(t,e.Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,t.text)}else e.Debug.assert(r.symbol.declarations.length>1)}function Ur(e){if(33554432&e.flags)return e;var t=l(e);return Qt[t]||(Qt[t]={})}function Vr(e){var t=u(e);return $t[t]||($t[t]={flags:0})}function qr(t){return 284===t.kind&&!e.isExternalOrCommonJsModule(t)}function Wr(t,r,n){if(n){var i=t.get(r);if(i){if(e.Debug.assert(0==(1&e.getCheckFlags(i)),"Should never get an instantiated symbol here."),i.flags&n)return i;if(2097152&i.flags){var a=dn(i);if(a===oe||a.flags&n)return i}}}}function Hr(t,r){var i=e.getSourceFileOfNode(t),a=e.getSourceFileOfNode(r);if(i!==a){if(w&&(i.externalModuleIndicator||a.externalModuleIndicator)||!F.outFile&&!F.out||Y_(r)||4194304&t.flags)return!0;if(u(r,t))return!0;var o=n.getSourceFiles();return o.indexOf(i)<=o.indexOf(a)}if(t.pos<=r.pos){if(186===t.kind){var s=e.getAncestor(r,186);return s?e.findAncestor(s,e.isBindingElement)!==e.findAncestor(t,e.isBindingElement)||t.pos<s.pos:Hr(e.getAncestor(t,237),r)}return 237===t.kind?!function(t,r){var n=e.getEnclosingBlockScopeContainer(t);switch(t.parent.parent.kind){case 219:case 225:case 227:if(en(r,t,n))return!0}var i=t.parent.parent;return e.isForInOrOfStatement(i)&&en(r,i.expression,n)}(t,r):!e.isClassDeclaration(t)||!e.findAncestor(r,function(r){return e.isComputedPropertyName(r)&&r.parent.parent===t})}if(257===r.parent.kind||254===r.parent.kind&&r.parent.isExportEquals)return!0;if(254===r.kind&&r.isExportEquals)return!0;var c=e.getEnclosingBlockScopeContainer(t);return!!(2097152&r.flags)||Y_(r)||u(r,t,c);function u(t,r,n){return!!e.findAncestor(t,function(i){if(i===n)return"quit";if(e.isFunctionLike(i))return!0;if(i.parent&&154===i.parent.kind&&i.parent.initializer===i)if(e.hasModifier(i.parent,32)){if(156===r.kind)return!0}else if(154!==r.kind||e.hasModifier(r,32)||e.getContainingClass(t)!==e.getContainingClass(r))return!0;return!1})}}function Gr(e,t,r,n,i,a,o,s){return void 0===o&&(o=!1),Yr(e,t,r,n,i,a,o,Wr,s)}function Yr(t,r,n,i,a,o,s,c,u){var l,_,d,p,f,m=t,g=t,y=!1;e:for(;t;){if(t.locals&&!qr(t)&&(l=c(t.locals,r,n))){var h=!0;if(e.isFunctionLike(t)&&_&&_!==t.body){if(n&l.flags&67897832&&296!==_.kind&&(h=!!(262144&l.flags)&&(_===t.type||151===_.kind||150===_.kind)),n&l.flags&3){var v=t;F.target&&F.target>=2&&e.isParameter(_)&&v.body&&l.valueDeclaration.pos>=v.body.pos&&l.valueDeclaration.end<=v.body.end?h=!1:1&l.flags&&(h=151===_.kind||_===t.type&&!!e.findAncestor(l.valueDeclaration,e.isParameter))}}else 175===t.kind&&(h=_===t.trueType);if(h)break e;l=void 0}switch(t.kind){case 284:if(!e.isExternalOrCommonJsModule(t))break;y=!0;case 244:var b=In(t).exports;if(284===t.kind||e.isAmbientModule(t)){if(l=b.get("default")){var D=e.getLocalSymbolForExportDefault(l);if(D&&l.flags&n&&D.escapedName===r)break e;l=void 0}var x=b.get(r);if(x&&2097152===x.flags&&e.getDeclarationOfKind(x,257))break}if("default"!==r&&(l=c(b,r,2623475&n))){if(!e.isSourceFile(t)||!t.commonJsModuleIndicator||l.declarations.some(e.isJSDocTypeAlias))break e;l=void 0}break;case 243:if(l=c(In(t).exports,r,8&n))break e;break;case 154:case 153:if(e.isClassLike(t.parent)&&!e.hasModifier(t,32)){var S=jn(t.parent);S&&S.locals&&c(S.locals,r,67220415&n)&&(p=t)}break;case 240:case 209:case 241:if(l=c(In(t).members||N,r,67897832&n)){if(!$r(l,t)){l=void 0;break}if(_&&e.hasModifier(_,32))return void Pr(g,e.Diagnostics.Static_members_cannot_reference_class_type_parameters);break e}if(209===t.kind&&32&n){var T=t.name;if(T&&r===T.escapedText){l=t.symbol;break e}}break;case 211:if(_===t.expression&&86===t.parent.token){var C=t.parent.parent;if(e.isClassLike(C)&&(l=c(In(C).members,r,67897832&n)))return void(i&&Pr(g,e.Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters))}break;case 149:if(f=t.parent.parent,(e.isClassLike(f)||241===f.kind)&&(l=c(In(f).members,r,67897832&n)))return void Pr(g,e.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);break;case 197:if(F.target>=2)break;case 156:case 157:case 158:case 159:case 239:if(3&n&&"arguments"===r){l=G;break e}break;case 196:if(3&n&&"arguments"===r){l=G;break e}if(16&n){var E=t.name;if(E&&r===E.escapedText){l=t.symbol;break e}}break;case 152:t.parent&&151===t.parent.kind&&(t=t.parent),t.parent&&(e.isClassElement(t.parent)||240===t.parent.kind)&&(t=t.parent);break;case 309:case 302:t=e.getJSDocHost(t)}Xr(t)&&(d=t),_=t,t=t.parent}if(!o||!l||d&&l===d.symbol||(l.isReferenced|=n),!l){if(_&&(e.Debug.assert(284===_.kind),_.commonJsModuleIndicator&&"exports"===r&&n&_.symbol.flags))return _.symbol;s||(l=c(V,r,n))}if(!l&&m&&e.isInJSFile(m)&&m.parent&&e.isRequireCall(m.parent,!1))return Y;if(l){if(i){if(p){var k=p.name;return void Pr(g,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(k),Qr(a))}if(g&&(2&n||(32&n||384&n)&&67220415==(67220415&n))){var A=Rn(l);(2&A.flags||32&A.flags||384&A.flags)&&function(t,r){e.Debug.assert(!!(2&t.flags||32&t.flags||384&t.flags));var n=e.find(t.declarations,function(t){return e.isBlockOrCatchScoped(t)||e.isClassLike(t)||243===t.kind||e.isInJSFile(t)&&!!e.getJSDocEnumTag(t)});if(void 0===n)return e.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");if(!(4194304&n.flags||Hr(n,r))){var i=void 0,a=e.declarationNameToString(e.getNameOfDeclaration(n));2&t.flags?i=Pr(r,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,a):32&t.flags?i=Pr(r,e.Diagnostics.Class_0_used_before_its_declaration,a):256&t.flags?i=Pr(r,e.Diagnostics.Enum_0_used_before_its_declaration,a):(e.Debug.assert(!!(128&t.flags)),F.preserveConstEnums&&(i=Pr(r,e.Diagnostics.Class_0_used_before_its_declaration,a))),i&&e.addRelatedInfo(i,e.createDiagnosticForNode(n,e.Diagnostics._0_is_declared_here,a))}}(A,g)}if(l&&y&&67220415==(67220415&n)&&!(2097152&m.flags)){var P=wn(l);e.length(P.declarations)&&e.every(P.declarations,function(t){return e.isNamespaceExportDeclaration(t)||e.isSourceFile(t)&&!!t.symbol.globalExports})&&Pr(g,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,e.unescapeLeadingUnderscores(r))}}return l}if(i&&(!g||!(function(t,r,n){if(!e.isIdentifier(t)||t.escapedText!==r||Eh(t)||Y_(t))return!1;for(var i=e.getThisContainer(t,!1),a=i;a;){if(e.isClassLike(a.parent)){var o=In(a.parent);if(!o)break;var s=aa(o);if(Ko(s,r))return Pr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,Qr(n),ci(o)),!0;if(a===i&&!e.hasModifier(a,32)){var c=Na(o).thisType;if(Ko(c,r))return Pr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,Qr(n)),!0}}a=a.parent}return!1}(g,r,a)||Zr(g)||function(t,r,n){var i=1920|(e.isInJSFile(t)?67220415:0);if(n===i){var a=_n(Gr(t,r,67897832&~i,void 0,void 0,!1)),o=t.parent;if(a){if(e.isQualifiedName(o)){e.Debug.assert(o.left===t,"Should only be resolving left side of qualified name as a namespace");var s=o.right.escapedText,c=Ko(Na(a),s);if(c)return Pr(o,e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,e.unescapeLeadingUnderscores(r),e.unescapeLeadingUnderscores(s)),!0}return Pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,e.unescapeLeadingUnderscores(r)),!0}}return!1}(g,r,n)||function(t,r,n){if(67220415&n){if("any"===r||"string"===r||"number"===r||"boolean"===r||"never"===r)return Pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,e.unescapeLeadingUnderscores(r)),!0;var i=_n(Gr(t,r,788544,void 0,void 0,!1));if(i&&!(1024&i.flags)){var a=function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(r)?e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here;return Pr(t,a,e.unescapeLeadingUnderscores(r)),!0}}return!1}(g,r,n)||function(t,r,n){if(111127&n){var i=_n(Gr(t,r,1024,void 0,void 0,!1));if(i)return Pr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_value,e.unescapeLeadingUnderscores(r)),!0}else if(788544&n){var i=_n(Gr(t,r,1536,void 0,void 0,!1));if(i)return Pr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_type,e.unescapeLeadingUnderscores(r)),!0}return!1}(g,r,n)||function(t,r,n){if(67897448&n){var i=_n(Gr(t,r,111127,void 0,void 0,!1));if(i&&!(1920&i.flags))return Pr(t,e.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here,e.unescapeLeadingUnderscores(r)),!0}return!1}(g,r,n)))){var w=void 0;if(u&&Gt<Yt&&(w=Df(m,r,n))){var I=ci(w),O=Pr(g,u,Qr(a),I);w.valueDeclaration&&e.addRelatedInfo(O,e.createDiagnosticForNode(w.valueDeclaration,e.Diagnostics._0_is_declared_here,I))}w||Pr(g,i,Qr(a)),Gt++}}function Xr(e){switch(e.kind){case 239:case 240:case 241:case 243:case 242:case 244:return!0;default:return!1}}function Qr(t){return e.isString(t)?e.unescapeLeadingUnderscores(t):e.declarationNameToString(t)}function $r(t,r){for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(150===a.kind&&(e.isJSDocTemplateTag(a.parent)?e.getJSDocHost(a.parent):a.parent)===r)return!(e.isJSDocTemplateTag(a.parent)&&e.find(a.parent.parent.tags,e.isJSDocTypeAlias))}return!1}function Zr(t){var r=function t(r){switch(r.kind){case 72:case 189:return r.parent?t(r.parent):void 0;case 211:if(e.isEntityNameExpression(r.expression))return r.expression;default:return}}(t);return!(!r||!yn(r,64,!0)||(Pr(t,e.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements,e.getTextOfNode(r)),0))}function en(t,r,n){return!!r&&!!e.findAncestor(t,function(t){return t===n||e.isFunctionLike(t)?"quit":t===r})}function tn(e){switch(e.kind){case 248:return e;case 250:return e.parent;case 251:return e.parent.parent;case 253:return e.parent.parent.parent;default:return}}function rn(t){return e.find(t.declarations,e.isAliasSymbolDeclaration)}function nn(e,t,r){var n=e.exports.get("export=");return n?Ko(aa(n),t):_n(e.exports.get(t),r)}function an(t){return e.isExportAssignment(t)&&!t.isExportEquals||e.hasModifier(t,512)||e.isExportSpecifier(t)}function on(t,r,n){if(!I)return!1;if(!t||t.isDeclarationFile){var i=nn(r,"default",!0);return!(i&&e.some(i.declarations,an)||nn(r,e.escapeLeadingUnderscores("__esModule"),n))}return e.isSourceFileJS(t)?!t.externalModuleIndicator&&!nn(r,e.escapeLeadingUnderscores("__esModule"),n):Cn(r)}function sn(t,r,n){void 0===n&&(n=!1);var i=vn(t,t.moduleSpecifier),a=Tn(i,t.moduleSpecifier,n);if(a){var o=r.propertyName||r.name;if(o.escapedText){if(e.isShorthandAmbientModuleSymbol(i))return i;var s=void 0;s=_n(s=i&&i.exports&&i.exports.get("export=")?Ko(aa(a),o.escapedText):function(e,t){if(3&e.flags){var r=e.valueDeclaration.type;if(r)return _n(Ko(Du(r),t))}}(a,o.escapedText),n);var c=function(e,t,r){if(1536&e.flags)return _n(Nn(e).get(t),r)}(a,o.escapedText,n);!c&&I&&"default"===o.escapedText&&(c=Sn(i,n)||_n(i,n));var u=c&&s&&c!==s?function(t,r){if(t===oe&&r===oe)return oe;if(67899368&t.flags)return t;var n=Ir(t.flags|r.flags,t.escapedName);return n.declarations=e.deduplicate(e.concatenate(t.declarations,r.declarations),e.equateValues),n.parent=t.parent||r.parent,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),r.members&&(n.members=r.members),t.exports&&(n.exports=t.exports),n}(s,c):c||s;if(!u){var l=gn(i,t),_=e.declarationNameToString(o),d=xf(o,a);if(void 0!==d){var p=ci(d),f=Pr(o,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2,l,_,p);d.valueDeclaration&&e.addRelatedInfo(f,e.createDiagnosticForNode(d.valueDeclaration,e.Diagnostics._0_is_declared_here,p))}else Pr(o,e.Diagnostics.Module_0_has_no_exported_member_1,l,_)}return u}}}function cn(e,t,r){return e.parent.parent.moduleSpecifier?sn(e.parent.parent,e,r):yn(e.propertyName||e.name,t,!1,r)}function un(t,r){switch(void 0===r&&(r=!1),t.kind){case 248:return function(t,r){return 259===t.moduleReference.kind?Sn(vn(t,e.getExternalModuleImportEqualsDeclarationExpression(t))):mn(t.moduleReference,r)}(t,r);case 250:return function(t,r){var n=vn(t,t.parent.moduleSpecifier);if(n){var i=void 0;i=e.isShorthandAmbientModuleSymbol(n)?n:nn(n,"default",r);var a=on(e.find(n.declarations,e.isSourceFile),n,r);if(i||a){if(a)return Sn(n,r)||_n(n,r)}else Pr(t.name,e.Diagnostics.Module_0_has_no_default_export,ci(n));return i}}(t,r);case 251:return function(e,t){var r=e.parent.parent.moduleSpecifier;return Tn(vn(e,r),r,t)}(t,r);case 253:return function(e,t){return sn(e.parent.parent.parent,e,t)}(t,r);case 257:return cn(t,68009983,r);case 254:case 204:return function(t,r){var n=e.isExportAssignment(t)?t.expression:t.right;if(e.isClassExpression(n))return kg(n).symbol;var i=yn(n,68009983,!0,r);return i||(kg(n),Vr(n).resolvedSymbol)}(t,r);case 247:return function(e,t){return Sn(e.parent.symbol,t)}(t,r);default:return e.Debug.fail()}}function ln(e,t){return void 0===t&&(t=68009983),!(!e||2097152!=(e.flags&(2097152|t))&&!(2097152&e.flags&&67108864&e.flags))}function _n(e,t){return!t&&ln(e)?dn(e):e}function dn(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=Ur(t);if(r.target)r.target===se&&(r.target=oe);else{r.target=se;var n=rn(t);if(!n)return e.Debug.fail();var i=un(n);r.target===se?r.target=i||oe:Pr(n,e.Diagnostics.Circular_definition_of_import_alias_0,ci(t))}return r.target}function pn(e){var t=In(e),r=dn(t);r&&(r===oe||67220415&r.flags&&!Wh(r))&&fn(t)}function fn(t){var r=Ur(t);if(!r.referenced){r.referenced=!0;var n=rn(t);if(!n)return e.Debug.fail();254===n.kind?dg(n.expression):257===n.kind?dg(n.propertyName||n.name):e.isInternalModuleImportEqualsDeclaration(n)&&dg(n.moduleReference)}}function mn(t,r){return 72===t.kind&&e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),72===t.kind||148===t.parent.kind?yn(t,1920,!1,r):(e.Debug.assert(248===t.parent.kind),yn(t,68009983,!1,r))}function gn(e,t){return e.parent?gn(e.parent,t)+"."+ci(e):ci(e,t,void 0,20)}function yn(t,r,n,i,a){if(!e.nodeIsMissing(t)){var o,s=1920|(e.isInJSFile(t)?67220415&r:0);if(72===t.kind){var c=r===s?e.Diagnostics.Cannot_find_namespace_0:H_(ch(t).escapedText),u=e.isInJSFile(t)?function(t,r){if(Hs(t.parent)){var n=function(t){if(!e.findAncestor(t,function(t){return e.isJSDocNode(t)||2097152&t.flags?e.isJSDocTypeAlias(t):"quit"})){var r=e.getJSDocHost(t);if(e.isExpressionStatement(r)&&e.isBinaryExpression(r.expression)&&3===e.getAssignmentDeclarationKind(r.expression)){var n=In(r.expression.left);if(n)return hn(n)}if((e.isObjectLiteralMethod(r)||e.isPropertyAssignment(r))&&e.isBinaryExpression(r.parent.parent)&&6===e.getAssignmentDeclarationKind(r.parent.parent)){var n=In(r.parent.parent.left);if(n)return hn(n)}var i=e.getHostSignatureFromJSDocHost(r);if(i){var n=In(i);return n&&n.valueDeclaration}}}(t.parent);if(n)return Gr(n,t.escapedText,r,void 0,t,!0)}}(t,r):void 0;if(!(o=Gr(a||t,t.escapedText,r,n||u?void 0:c,t,!0)))return u}else{if(148!==t.kind&&189!==t.kind)throw e.Debug.assertNever(t,"Unknown entity name kind.");var l=148===t.kind?t.left:t.expression,_=148===t.kind?t.right:t.name,d=yn(l,s,n,!1,a);if(!d||e.nodeIsMissing(_))return;if(d===oe)return d;if(e.isInJSFile(t)&&d.valueDeclaration&&e.isVariableDeclaration(d.valueDeclaration)&&d.valueDeclaration.initializer&&hm(d.valueDeclaration.initializer)){var p=d.valueDeclaration.initializer.arguments[0],f=vn(p,p);if(f){var m=Sn(f);m&&(d=m)}}if(!(o=Wr(Nn(d),_.escapedText,r)))return void(n||Pr(_,e.Diagnostics.Namespace_0_has_no_exported_member_1,gn(d),e.declarationNameToString(_)))}return e.Debug.assert(0==(1&e.getCheckFlags(o)),"Should never get an instantiated symbol here."),o.flags&r||i?o:dn(o)}}function hn(t){var r=t.parent.valueDeclaration;if(r)return(e.isAssignmentDeclaration(r)?e.getAssignedExpandoInitializer(r):e.hasOnlyExpressionInitializer(r)?e.getDeclaredExpandoInitializer(r):void 0)||r}function vn(t,r,n){return bn(t,r,n?void 0:e.Diagnostics.Cannot_find_module_0)}function bn(t,r,n,i){return void 0===i&&(i=!1),e.isStringLiteralLike(r)?Dn(t,r.text,n,r,i):void 0}function Dn(t,r,i,a,o){if(void 0===o&&(o=!1),void 0!==r){e.startsWith(r,"@types/")&&Pr(a,e.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,e.removePrefix(r,"@types/"),r);var s=Zo(r,!0);if(s)return s;var c=e.getSourceFileOfNode(t),u=e.getResolvedModule(c,r),l=u&&e.getResolutionDiagnostic(F,u),_=u&&!l&&n.getSourceFile(u.resolvedFileName);if(_)return _.symbol?(u.isExternalLibraryImport&&!e.resolutionExtensionIsTSOrJson(u.extension)&&xn(!1,a,u,r),wn(_.symbol)):void(i&&Pr(a,e.Diagnostics.File_0_is_not_a_module,_.fileName));if(He){var d=e.findBestPatternMatch(He,function(e){return e.pattern},r);if(d)return wn(d.symbol)}if(u&&!e.resolutionExtensionIsTSOrJson(u.extension)&&void 0===l||l===e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type)o?Pr(a,e.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,r,u.resolvedFileName):xn(B&&!!i,a,u,r);else if(i){if(u){var p=n.getProjectReferenceRedirect(u.resolvedFileName);if(p)return void Pr(a,e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,p,u.resolvedFileName)}if(l)Pr(a,l,r,u.resolvedFileName);else{var f=e.tryExtractTSExtension(r);f?Pr(a,e.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead,f,e.removeExtension(r,f)):!F.resolveJsonModule&&e.fileExtensionIs(r,".json")&&e.getEmitModuleResolutionKind(F)===e.ModuleResolutionKind.NodeJs&&e.hasJsonModuleEmitEnabled(F)?Pr(a,e.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,r):Pr(a,i,r)}}}}function xn(t,r,n,i){var a,o=n.packageId,s=n.resolvedFileName,c=!e.isExternalModuleNameRelative(i)&&o?(a=o.name,v().has(e.getTypesPackageName(a))?e.chainDiagnosticMessages(void 0,e.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,o.name,e.mangleScopedPackageName(o.name)):e.chainDiagnosticMessages(void 0,e.Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,i,e.mangleScopedPackageName(o.name))):void 0;wr(t,r,e.chainDiagnosticMessages(c,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,i,s))}function Sn(t,r){if(t)return wn(function(t,r){if(!t||t===oe||t===r||1===r.exports.size||2097152&t.flags)return t;var n=Rr(t);return void 0===n.exports&&(n.flags=512|n.flags,n.exports=e.createSymbolTable()),r.exports.forEach(function(e,t){"export="!==t&&n.exports.set(t,n.exports.has(t)?Br(n.exports.get(t),e):e)}),n}(_n(t.exports.get("export="),r),t))||t}function Tn(t,r,n){var i=Sn(t,n);if(!n&&i){if(!(1539&i.flags||e.getDeclarationOfKind(i,284))){var a=w>=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop";return Pr(r,e.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,a),i}if(F.esModuleInterop){var o=r.parent;if(e.isImportDeclaration(o)&&e.getNamespaceDeclarationNode(o)||e.isImportCall(o)){var s=aa(i),c=Uo(s,0);if(c&&c.length||(c=Uo(s,1)),c&&c.length){var u=ym(s,i,t),l=Ir(i.flags,i.escapedName);l.declarations=i.declarations?i.declarations.slice():[],l.parent=i.parent,l.target=i,l.originatingImport=o,i.valueDeclaration&&(l.valueDeclaration=i.valueDeclaration),i.constEnumOnlyModule&&(l.constEnumOnlyModule=!0),i.members&&(l.members=e.cloneMap(i.members)),i.exports&&(l.exports=e.cloneMap(i.exports));var _=Do(u);return l.type=Yn(l,_.members,e.emptyArray,e.emptyArray,_.stringIndexInfo,_.numberIndexInfo),l}}}}return i}function Cn(e){return void 0!==e.exports.get("export=")}function En(e){return Qo(An(e))}function kn(e,t){var r=An(t);if(r)return r.get(e)}function Nn(e){return 32&e.flags?Va(e,"resolvedExports"):1536&e.flags?An(e):e.exports||N}function An(e){var t=Ur(e);return t.resolvedExports||(t.resolvedExports=Pn(e))}function Fn(t,r,n,i){r&&r.forEach(function(r,a){if("default"!==a){var o=t.get(a);if(o){if(n&&i&&o&&_n(o)!==_n(r)){var s=n.get(a);s.exportsWithDuplicate?s.exportsWithDuplicate.push(i):s.exportsWithDuplicate=[i]}}else t.set(a,r),n&&i&&n.set(a,{specifierText:e.getTextOfNode(i.moduleSpecifier)})}})}function Pn(t){var r=[];return function t(n){if(n&&n.exports&&e.pushIfUnique(r,n)){var i=e.cloneMap(n.exports),a=n.exports.get("__export");if(a){for(var o=e.createSymbolTable(),s=e.createMap(),c=0,u=a.declarations;c<u.length;c++){var l=u[c],_=vn(l,l.moduleSpecifier),d=t(_);Fn(o,d,s,l)}s.forEach(function(t,r){var n=t.exportsWithDuplicate;if("export="!==r&&n&&n.length&&!i.has(r))for(var a=0,o=n;a<o.length;a++){var c=o[a];cr.add(e.createDiagnosticForNode(c,e.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,s.get(r).specifierText,e.unescapeLeadingUnderscores(r)))}}),Fn(i,o)}return i}}(t=Sn(t))||N}function wn(e){var t;return e&&e.mergeId&&(t=Xt[e.mergeId])?t:e}function In(e){return wn(e.symbol&&Wa(e.symbol))}function On(e){return wn(e.parent&&Wa(e.parent))}function Mn(t,r){var i=On(t);if(i){var a=e.mapDefined(i.declarations,function(e){var t=ni(e);return _n(t&&t.exports&&t.exports.get("export="))===_n(i)?t:void 0}),o=r&&function(t,r){var i,a=e.getSourceFileOfNode(r),o=""+u(a),s=Ur(t);if(s.extendedContainersByFile&&(i=s.extendedContainersByFile.get(o)))return i;if(a&&a.imports){for(var c=0,l=a.imports;c<l.length;c++){var _=l[c];if(!e.nodeIsSynthesized(_)){var d=vn(r,_,!0);d&&Ln(d,t)&&(i=e.append(i,d))}}if(e.length(i))return(s.extendedContainersByFile||(s.extendedContainersByFile=e.createMap())).set(o,i),i}if(s.extendedContainers)return s.extendedContainers;for(var p=0,f=n.getSourceFiles();p<f.length;p++){var m=f[p];if(e.isExternalModule(m)){var g=In(m);Ln(g,t)&&(i=e.append(i,g))}}return s.extendedContainers=i||e.emptyArray}(t,r);if(r&&$n(i,r,1920,!1))return e.concatenate(e.concatenate([i],a),o);var s=e.append(a,i);return e.concatenate(s,o)}var c=e.mapDefined(t.declarations,function(t){return!e.isAmbientModule(t)&&t.parent&&ai(t.parent)?In(t.parent):void 0});if(e.length(c))return e.mapDefined(c,function(e){return Ln(e,t)?e:void 0})}function Ln(t,r){if(t===On(r))return r;var n=Nn(t),i=n.get(r.escapedName);return i&&a(i)?i:e.forEachEntry(n,function(e){if(a(e))return e});function a(e){if(e===r||_n(e)===r||_n(e)===_n(r))return e}}function Rn(e){return wn(e&&0!=(1048576&e.flags)?e.exportSymbol:e)}function Bn(e){return!!(67220415&e.flags||2097152&e.flags&&67220415&dn(e).flags)}function jn(t){for(var r=0,n=t.members;r<n.length;r++){var i=n[r];if(157===i.kind&&e.nodeIsPresent(i.body))return i}}function Jn(e){var t=new D(X,e);return S++,t.id=S,t}function zn(e,t){var r=Jn(e);return r.intrinsicName=t,r}function Kn(e,t,r){var n=zn(e,t);return n.objectFlags=r,n}function Un(e){var t=Ac(e);return t.flags|=16,t.intrinsicName="boolean",t}function Vn(e,t){var r=Jn(524288);return r.objectFlags=e,r.symbol=t,r.members=void 0,r.properties=void 0,r.callSignatures=void 0,r.constructSignatures=void 0,r.stringIndexInfo=void 0,r.numberIndexInfo=void 0,r}function qn(e){var t=Jn(262144);return e&&(t.symbol=e),t}function Wn(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)}function Hn(t){var r;return t.forEach(function(e,t){!Wn(t)&&Bn(e)&&(r||(r=[])).push(e)}),r||e.emptyArray}function Gn(t,r,n,i,a,o){return t.members=r,t.properties=r===N?e.emptyArray:Hn(r),t.callSignatures=n,t.constructSignatures=i,t.stringIndexInfo=a,t.numberIndexInfo=o,t}function Yn(e,t,r,n,i,a){return Gn(Vn(16,e),t,r,n,i,a)}function Xn(t,r){for(var n,i=t;i;i=i.parent){if(i.locals&&!qr(i)&&(n=r(i.locals)))return n;switch(i.kind){case 284:if(!e.isExternalOrCommonJsModule(i))break;case 244:if(n=r(In(i).exports))return n}}return r(V)}function Qn(e){return 67220415===e?67220415:1920}function $n(t,r,n,i,a){if(void 0===a&&(a=e.createMap()),t&&!function(e){if(e.declarations&&e.declarations.length){for(var t=0,r=e.declarations;t<r.length;t++){var n=r[t];switch(n.kind){case 154:case 156:case 158:case 159:continue;default:return!1}}return!0}return!1}(t)){var o=""+l(t),s=a.get(o);return s||a.set(o,s=[]),Xn(r,c)}function c(a,o){if(e.pushIfUnique(s,a)){var l=function(a,o){return _(a.get(t.escapedName),void 0,o)?[t]:e.forEachEntry(a,function(a){if(2097152&a.flags&&"export="!==a.escapedName&&"default"!==a.escapedName&&!(e.isUMDExportSymbol(a)&&r&&e.isExternalModule(e.getSourceFileOfNode(r)))&&(!i||e.some(a.declarations,e.isExternalModuleImportEqualsDeclaration))&&(o||!e.getDeclarationOfKind(a,257))){var s=dn(a);if(_(a,s,o))return[a];var l=Nn(s),d=l&&c(l,!0);if(d&&u(a,Qn(n)))return[a].concat(d)}if(a.escapedName===t.escapedName&&a.exportSymbol&&_(wn(a.exportSymbol),void 0,o))return[t]})}(a,o);return s.pop(),l}}function u(e,t){return!Zn(e,r,t)||!!$n(e.parent,r,Qn(t),i,a)}function _(r,i,a){return t===(i||r)&&!e.some(r.declarations,ai)&&(a||u(r,n))}}function Zn(t,r,n){var i=!1;return Xn(r,function(r){var a=wn(r.get(t.escapedName));return!!a&&(a===t||!!((a=2097152&a.flags&&!e.getDeclarationOfKind(a,257)?dn(a):a).flags&n)&&(i=!0,!0))}),i}function ei(e,t){return 0===ri(e,t,67897832,!1).accessibility}function ti(e,t){return 0===ri(e,t,67220415,!1).accessibility}function ri(t,r,n,i){if(t&&r){var a=function t(r,n,i,a,o){if(e.length(r)){for(var s,c=0,u=r;c<u.length;c++){var l=u[c],_=$n(l,n,a,!1);if(_){s=l;var d=oi(_[0],o);if(d)return d}else if(e.some(l.declarations,ai))return{accessibility:0};var p=Mn(l,n),f=e.first(l.declarations);!e.length(p)&&67220415&a&&f&&e.isObjectLiteralExpression(f)&&f.parent&&e.isVariableDeclaration(f.parent)&&f===f.parent.initializer&&(p=[In(f.parent)]);var m=t(p,n,i,i===l?Qn(a):a,o);if(m)return m}return s?{accessibility:1,errorSymbolName:ci(i,n,a),errorModuleName:s!==i?ci(s,n,1920):void 0}:void 0}}([t],r,t,n,i);if(a)return a;var o=e.forEach(t.declarations,ni);return o&&o!==ni(r)?{accessibility:2,errorSymbolName:ci(t,r,n),errorModuleName:ci(o)}:{accessibility:1,errorSymbolName:ci(t,r,n)}}return{accessibility:0}}function ni(t){var r=e.findAncestor(t,ii);return r&&In(r)}function ii(t){return e.isAmbientModule(t)||284===t.kind&&e.isExternalOrCommonJsModule(t)}function ai(t){return e.isModuleWithStringLiteralName(t)||284===t.kind&&e.isExternalOrCommonJsModule(t)}function oi(t,r){var n;if(e.every(t.declarations,function(t){if(!hi(t)){var r=tn(t);return r&&!e.hasModifier(r,1)&&hi(r.parent)?i(t,r):e.isVariableDeclaration(t)&&e.isVariableStatement(t.parent.parent)&&!e.hasModifier(t.parent.parent,1)&&hi(t.parent.parent.parent)?i(t,t.parent.parent):!(!e.isLateVisibilityPaintedStatement(t)||e.hasModifier(t,1)||!hi(t.parent))&&i(t,t)}return!0}))return{accessibility:0,aliasesToMakeVisible:n};function i(t,i){return r&&(Vr(t).isVisible=!0,n=e.appendIfUnique(n,i)),!0}}function si(t,r){var n;n=167===t.parent.kind||e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)||149===t.parent.kind?68268991:148===t.kind||189===t.kind||248===t.parent.kind?1920:67897832;var i=ch(t),a=Gr(r,i.escapedText,n,void 0,void 0,!1);return a&&oi(a,!0)||{accessibility:1,errorSymbolName:e.getTextOfNode(i),errorNode:i}}function ci(t,r,n,i,a){void 0===i&&(i=4);var o=70221824;2&i&&(o|=128),1&i&&(o|=512),8&i&&(o|=16384),16&i&&(o|=134217728);var s=4&i?U.symbolToExpression:U.symbolToEntityName;return a?c(a).getText():e.usingSingleLineStringWriter(c);function c(i){var a=s(t,n,r,o),c=e.createPrinter({removeComments:!0}),u=r&&e.getSourceFileOfNode(r);return c.writeNode(4,a,u,i),i}}function ui(t,r,n,i,a){return void 0===n&&(n=0),a?o(a).getText():e.usingSingleLineStringWriter(o);function o(a){var o;o=262144&n?1===i?166:165:1===i?161:160;var s=U.signatureToSignatureDeclaration(t,o,r,70222336|_i(n)),c=e.createPrinter({removeComments:!0,omitTrailingSemicolon:!0}),u=r&&e.getSourceFileOfNode(r);return c.writeNode(4,s,u,e.getTrailingSemicolonOmittingWriter(a)),a}}function li(t,r,n,i){void 0===n&&(n=1064960),void 0===i&&(i=e.createTextWriter(""));var a=F.noErrorTruncation||1&n,o=U.typeToTypeNode(t,r,70221824|_i(n)|(a?1:0),i);if(void 0===o)return e.Debug.fail("should always get typenode");var s=e.createPrinter({removeComments:!0}),c=r&&e.getSourceFileOfNode(r);s.writeNode(4,o,c,i);var u=i.getText(),l=a?void 0:2*e.defaultMaximumTruncationLength;return l&&u&&u.length>=l?u.substr(0,l-"...".length)+"...":u}function _i(e){return void 0===e&&(e=0),9469291&e}function di(t,r,n,i){return void 0===n&&(n=16384),i?a(i).getText():e.usingSingleLineStringWriter(a);function a(i){var a=e.createTypePredicateNode(1===t.kind?e.createIdentifier(t.parameterName):e.createThisTypeNode(),U.typeToTypeNode(t.type,r,70222336|_i(n))),o=e.createPrinter({removeComments:!0}),s=r&&e.getSourceFileOfNode(r);return o.writeNode(4,a,s,i),i}}function pi(e){return 8===e?"private":16===e?"protected":"public"}function fi(t){return t&&t.parent&&245===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function mi(t){return 284===t.kind||e.isAmbientModule(t)}function gi(t,r){var n=t.nameType;if(n){if(384&n.flags){var i=""+n.value;return e.isIdentifierText(i,F.target)||Lp(i)?i:'"'+e.escapeString(i,34)+'"'}if(8192&n.flags)return"["+yi(n.symbol,r)+"]"}}function yi(t,r){if(r&&"default"===t.escapedName&&!(16384&r.flags)&&(!(16777216&r.flags)||!t.declarations||r.enclosingDeclaration&&e.findAncestor(t.declarations[0],mi)!==e.findAncestor(r.enclosingDeclaration,mi)))return"default";if(t.declarations&&t.declarations.length){var n=t.declarations[0],i=e.getNameOfDeclaration(n);if(i){if(e.isCallExpression(n)&&e.isBindableObjectDefinePropertyCall(n))return e.symbolName(t);if(e.isComputedPropertyName(i)&&!(2048&e.getCheckFlags(t))&&t.nameType&&384&t.nameType.flags){var a=gi(t,r);if(void 0!==a)return a}return e.declarationNameToString(i)}if(n.parent&&237===n.parent.kind)return e.declarationNameToString(n.parent.name);switch(n.kind){case 209:case 196:case 197:return!r||r.encounteredError||131072&r.flags||(r.encounteredError=!0),209===n.kind?"(Anonymous class)":"(Anonymous function)"}}var o=gi(t,r);return void 0!==o?o:e.symbolName(t)}function hi(t){if(t){var r=Vr(t);return void 0===r.isVisible&&(r.isVisible=!!function(){switch(t.kind){case 302:case 309:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&e.isSourceFile(t.parent.parent.parent));case 186:return hi(t.parent.parent);case 237:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 244:case 240:case 241:case 242:case 239:case 243:case 248:if(e.isExternalModuleAugmentation(t))return!0;var r=Ti(t);return 1&e.getCombinedModifierFlags(t)||248!==t.kind&&284!==r.kind&&4194304&r.flags?hi(r):qr(r);case 154:case 153:case 158:case 159:case 156:case 155:if(e.hasModifier(t,24))return!1;case 157:case 161:case 160:case 162:case 151:case 245:case 165:case 166:case 168:case 164:case 169:case 170:case 173:case 174:case 177:return hi(t.parent);case 250:case 251:case 253:return!1;case 150:case 284:case 247:return!0;case 254:default:return!1}}()),r.isVisible}return!1}function vi(t,r){var n,i;return t.parent&&254===t.parent.kind?n=Gr(t,t.escapedText,70107135,void 0,t,!1):257===t.parent.kind&&(n=cn(t.parent,70107135)),n&&function t(n){e.forEach(n,function(n){var a=tn(n)||n;if(r?Vr(n).isVisible=!0:(i=i||[],e.pushIfUnique(i,a)),e.isInternalModuleImportEqualsDeclaration(n)){var o=n.moduleReference,s=ch(o),c=Gr(n,s.escapedText,68009983,void 0,void 0,!1);c&&t(c.declarations)}})}(n.declarations),i}function bi(e,t){var r=Di(e,t);if(r>=0){for(var n=qt.length,i=r;i<n;i++)Wt[i]=!1;return!1}return qt.push(e),Wt.push(!0),Ht.push(t),!0}function Di(e,t){for(var r=qt.length-1;r>=0;r--){if(xi(qt[r],Ht[r]))return-1;if(qt[r]===e&&Ht[r]===t)return r}return-1}function xi(t,r){switch(r){case 0:return!!Ur(t).type;case 5:return!!Vr(t).resolvedEnumType;case 2:return!!Ur(t).declaredType;case 1:return!!t.resolvedBaseConstructorType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint;case 6:return!!Ur(t).resolvedJSDocType}return e.Debug.assertNever(r)}function Si(){return qt.pop(),Ht.pop(),Wt.pop()}function Ti(t){return e.findAncestor(e.getRootDeclaration(t),function(e){switch(e.kind){case 237:case 238:case 253:case 252:case 251:case 250:return!1;default:return!0}}).parent}function Ci(e,t){var r=Ko(e,t);return r?aa(r):void 0}function Ei(e){return e&&0!=(1&e.flags)}function ki(e){var t=In(e);return t&&Ur(t).type||Bi(e,!1)}function Ni(t){return 149===t.kind&&!e.isStringOrNumericLiteralLike(t.expression)}function Ai(t,r,n){if(131072&(t=Sd(t,function(e){return!(98304&e.flags)})).flags)return Oe;if(1048576&t.flags)return Td(t,function(e){return Ai(e,r,n)});var i=Ac(e.map(r,Rc));if(qc(t)||Wc(i)){if(131072&i.flags)return t;var a=Et||(Et=ec("Pick",524288,e.Diagnostics.Cannot_find_global_type_0)),o=Ct||(Ct=ec("Exclude",524288,e.Diagnostics.Cannot_find_global_type_0));return a&&o?Rs(a,[t,Rs(o,[Jc(t),i])]):_e}for(var s=e.createSymbolTable(),c=0,u=Co(t);c<u.length;c++){var l=u[c];rl(Bc(l,8576),i)||24&e.getDeclarationModifierFlagsFromSymbol(l)||!_u(l)||s.set(l.escapedName,du(l,!1))}var _=Ho(t,0),d=Ho(t,1);return Yn(n,s,e.emptyArray,e.emptyArray,_,d)}function Fi(e,t){var r=Pi(e);return r?Bd(r,t):t}function Pi(t){var r=function(e){var t=e.parent.parent;switch(t.kind){case 186:case 275:return Pi(t);case 187:return Pi(e.parent);case 237:return t.initializer;case 204:return t.right}}(t);if(r&&r.flowNode){var n=function(e){var t=e.parent;return 186===e.kind&&184===t.kind?wi(e.propertyName||e.name):275===e.kind||276===e.kind?wi(e.name):""+t.elements.indexOf(e)}(t);if(n){var i=e.createNode(190,t.pos,t.end);i.parent=t,i.expression=r;var a=e.createNode(10,t.pos,t.end);return a.parent=i,a.text=n,i.argumentExpression=a,i.flowNode=r.flowNode,i}}}function wi(e){var t=Rc(e);return 384&t.flags?""+t.value:void 0}function Ii(t){var r,n=t.parent,i=ki(n.parent);if(!i||Ei(i))return i;if(O&&4194304&t.flags&&e.isParameterDeclaration(t)&&(i=l_(i)),184===n.kind)if(t.dotDotDotToken){if(2&i.flags||!zp(i))return Pr(t,e.Diagnostics.Rest_types_may_only_be_created_from_object_types),_e;for(var a=[],o=0,s=n.elements;o<s.length;o++){var c=s[o];c.dotDotDotToken||a.push(c.propertyName||c.name)}r=Ai(i,a,t.symbol)}else{var u=t.propertyName||t.name;r=Fi(t,qd(Xc(i,Rc(u),u),t.name))}else{var l=By(i,n,!1,!1),_=n.elements.indexOf(t);r=t.dotDotDotToken?xd(i,e_)?Td(i,function(e){return xc(e,_)}):hc(l):Ul(i)?Fi(t,qd(Xc(i,hu(_),t.name),t.name)):l}return!O||!t.initializer||32768&a_(fg(t))||(r=ad(r,524288)),t.initializer&&!e.getEffectiveTypeAnnotationNode(e.walkUpBindingElementsAndPatterns(t))?Ac([r,fg(t)],2):r}function Oi(t){var r=e.getJSDocType(t);if(r)return Du(r)}function Mi(t){var r=e.skipParentheses(t);return 187===r.kind&&0===r.elements.length}function Li(e,t){return void 0===t&&(t=!0),O&&t?u_(e):e}function Ri(e){return 151===e.kind&&(196===e.parent.kind||197===e.parent.kind)&&!!xp(e.parent)}function Bi(t,r){if(e.isVariableDeclaration(t)&&226===t.parent.parent.kind){var n=Jc(df(kg(t.parent.parent.expression)));return 4456448&n.flags?zc(n):ye}if(e.isVariableDeclaration(t)&&227===t.parent.parent.kind){var i=t.parent.parent;return Ry(i.expression,i.awaitModifier)||ce}if(e.isBindingPattern(t.parent))return Ii(t);var a,o,s=r&&(e.isParameter(t)&&$o(t)||!e.isBindingElement(t)&&!e.isVariableDeclaration(t)&&!!t.questionToken),c=Yi(t);if(c)return Li(c,s);if((B||e.isInJSFile(t))&&237===t.kind&&!e.isBindingPattern(t.name)&&!(1&e.getCombinedModifierFlags(t))&&!(4194304&t.flags)){if(!(2&e.getCombinedNodeFlags(t)||t.initializer&&(a=t.initializer,o=e.skipParentheses(a),96!==o.kind&&(72!==o.kind||G_(o)!==q))))return ue;if(t.initializer&&Mi(t.initializer))return ot}if(151===t.kind){var u,l=t.parent;if(159===l.kind&&!za(l)){var _=e.getDeclarationOfKind(In(t.parent),158);if(_){var d=os(_),p=Fv(l);return p&&t===p?(e.Debug.assert(!p.type),aa(d.thisParameter)):ps(d)}}if(e.isInJSFile(t)){var f=e.getJSDocType(l);if(f&&e.isFunctionTypeNode(f))return Sm(os(f),l.parameters.indexOf(t))}if(u="this"===t.symbol.escapedName?ap(l):op(t))return Li(u,s)}else if(e.isInJSFile(t)){var m=Ji(t,In(t),e.getDeclaredExpandoInitializer(t));if(m)return m}return t.initializer&&!Ri(t)?Li(u=fg(t),s):e.isJsxAttribute(t)?xe:e.isBindingPattern(t.name)&&!Ri(t)?qi(t.name,!1,!0):void 0}function ji(t,r){var n=e.getAssignedExpandoInitializer(t.valueDeclaration);if(n){var i=e.getJSDocTypeTag(n);return i&&i.typeExpression?Du(i.typeExpression):Ji(t.valueDeclaration,t,n)||Ql(dg(n))}for(var a,o,s=!1,c=!1,u=0,l=t.declarations;u<l.length;u++){var _=l[u],d=e.isBinaryExpression(_)||e.isCallExpression(_)?_:e.isPropertyAccessExpression(_)?e.isBinaryExpression(_.parent)?_.parent:_:void 0;if(!d)return _e;var p=e.isPropertyAccessExpression(d)?e.getAssignmentDeclarationPropertyAccessKind(d):e.getAssignmentDeclarationKind(d);4===p&&(Ui(d)?s=!0:c=!0),e.isCallExpression(d)||(a=zi(a,d,0,_)),a||(o||(o=[])).push(e.isBinaryExpression(d)||e.isCallExpression(d)?Ki(t,r,d,p):ke)}var f=a;if(!f){var m=s?function(t,r){return e.Debug.assert(t.length===r.length),t.filter(function(t,n){var i=r[n],a=e.isBinaryExpression(i)?i:e.isBinaryExpression(i.parent)?i.parent:void 0;return a&&Ui(a)})}(o,t.declarations):void 0;if(c){var g=function(t){var r=e.forEach(t.declarations,function(t){var r=e.getThisContainer(t,!1).parent;return e.isClassLike(r)&&r});if(r){var n=Na(In(r)),i=n&&va(n)[0];if(i)return Ci(i,t.escapedName)}}(t);g&&((m||(m=[])).push(g),s=!0)}f=Ac(e.some(m,function(e){return!!(-98305&e.flags)})?m:o,2)}var y=h_(Li(f,c&&!s));return Sd(y,function(e){return!!(-98305&e.flags)})===ke?(b_(t.valueDeclaration,ce),ce):y}function Ji(t,r,n){if(e.isInJSFile(t)&&n&&e.isObjectLiteralExpression(n)&&!n.properties.length){for(var i=e.createSymbolTable();e.isBinaryExpression(t)||e.isPropertyAccessExpression(t);){var a=In(t);a&&e.hasEntries(a.exports)&&zr(i,a.exports),t=e.isBinaryExpression(t)?t.parent:t.parent.parent}var o=In(t);o&&e.hasEntries(o.exports)&&zr(i,o.exports);var s=Yn(r,i,e.emptyArray,e.emptyArray,void 0,void 0);return s.objectFlags|=16384,s}}function zi(t,r,n,i){var a=e.getJSDocType(r.parent);if(a){var o=h_(Du(a));if(!t)return o;t===_e||o===_e||Qu(t,o)||Ay(t,i,o)}return t}function Ki(t,r,n,i){if(e.isCallExpression(n)){if(r)return aa(r);var a=dg(n.arguments[2]),o=Ci(a,"value");if(o)return o;var s=Ci(a,"get");if(s){var c=Rf(s);if(c)return ps(c)}var u=Ci(a,"set");if(u){var l=Rf(u);if(l)return Pm(l)}return ce}var _=r?aa(r):Ql(dg(n.right));if(524288&_.flags&&2===i&&"export="===t.escapedName){var d=Do(_),p=e.createSymbolTable();e.copyEntries(d.members,p),r&&!r.exports&&(r.exports=e.createSymbolTable()),(r||t).exports.forEach(function(e,t){if(p.has(t)){var r=d.members.get(t),n=Ir(e.flags|r.flags,t);n.type=Ac([aa(e),aa(r)]),p.set(t,n)}else p.set(t,e)});var f=Yn(d.symbol,p,d.callSignatures,d.constructSignatures,d.stringIndexInfo,d.numberIndexInfo);return f.objectFlags|=16384&e.getObjectFlags(_),f}return Vl(_)?(b_(n,at),at):_}function Ui(t){var r=e.getThisContainer(t,!1);return 157===r.kind||239===r.kind||196===r.kind&&!e.isPrototypePropertyAssignment(r.parent)}function Vi(t,r,n){return t.initializer?Li(fg(t)):e.isBindingPattern(t.name)?qi(t.name,r,n):(n&&!Gi(t)&&b_(t,ce),ce)}function qi(t,r,n){return void 0===r&&(r=!1),void 0===n&&(n=!1),184===t.kind?function(t,r,n){var i,a=e.createSymbolTable(),o=262272;e.forEach(t.elements,function(e){var t=e.propertyName||e.name;if(e.dotDotDotToken)i=Es(ce,!1);else{var s=Rc(t);if(Ra(s)){var c=Ka(s),u=Ir(4|(e.initializer?16777216:0),c);u.type=Vi(e,r,n),u.bindingElement=e,a.set(u.escapedName,u)}else o|=512}});var s=Yn(void 0,a,e.emptyArray,e.emptyArray,i,void 0);return s.objectFlags|=o,r&&(s.pattern=t),s}(t,r,n):function(t,r,n){var i=t.elements,a=e.lastOrUndefined(i),o=!(!a||186!==a.kind||!a.dotDotDotToken);if(0===i.length||1===i.length&&o)return P>=2?gc(ce):at;var s=Dc(e.map(i,function(t){return e.isOmittedExpression(t)?ce:Vi(t,r,n)}),e.findLastIndex(i,function(t){return!e.isOmittedExpression(t)&&!Pp(t)},i.length-(o?2:1))+1,o);return r&&((s=Os(s)).pattern=t),s}(t,r,n)}function Wi(e,t){return Hi(Bi(e,!0),e,t)}function Hi(t,r,n){return t?(n&&D_(r,t),8192&t.flags&&(e.isBindingElement(r)||!r.type)&&t.symbol!==In(r)&&(t=Ce),h_(t)):(t=e.isParameter(r)&&r.dotDotDotToken?at:ce,n&&(Gi(r)||b_(r,t)),t)}function Gi(t){var r=e.getRootDeclaration(t);return Vg(151===r.kind?r.parent:r)}function Yi(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Du(r)}function Xi(t){var r=Ur(t);if(!r.type){var n=function(t){if(4194304&t.flags)return(r=Na(On(t))).typeParameters?Is(r,e.map(r.typeParameters,function(e){return ce})):r;var r;if(t===Y)return ce;if(134217728&t.flags){var n=In(e.getSourceFileOfNode(t.valueDeclaration)),i=e.createSymbolTable();return i.set("exports",n),Yn(t,i,e.emptyArray,e.emptyArray,void 0,void 0)}var a,o=t.valueDeclaration;if(e.isCatchClauseVariableDeclarationOrBindingElement(o))return ce;if(e.isSourceFile(o)&&e.isJsonSourceFile(o)){if(!o.statements.length)return Oe;var s=Ql(kg(o.statements[0].expression));return 524288&s.flags?p_(s):s}if(!bi(t,0))return 512&t.flags?ra(t):ia(t);if(254===o.kind)a=Hi(dg(o.expression),o);else if(e.isInJSFile(o)&&(e.isCallExpression(o)||e.isBinaryExpression(o)||e.isPropertyAccessExpression(o)&&e.isBinaryExpression(o.parent)))a=ji(t);else if(e.isJSDocPropertyLikeTag(o)||e.isPropertyAccessExpression(o)||e.isIdentifier(o)||e.isClassDeclaration(o)||e.isFunctionDeclaration(o)||e.isMethodDeclaration(o)&&!e.isObjectLiteralMethod(o)||e.isMethodSignature(o)||e.isSourceFile(o)){if(9136&t.flags)return ra(t);a=e.isBinaryExpression(o.parent)?ji(t):Yi(o)||ce}else if(e.isPropertyAssignment(o))a=Yi(o)||hg(o);else if(e.isJsxAttribute(o))a=Yi(o)||Vp(o);else if(e.isShorthandPropertyAssignment(o))a=Yi(o)||yg(o.name,0);else if(e.isObjectLiteralMethod(o))a=Yi(o)||vg(o,0);else if(e.isParameter(o)||e.isPropertyDeclaration(o)||e.isPropertySignature(o)||e.isVariableDeclaration(o)||e.isBindingElement(o))a=Wi(o,!0);else if(e.isEnumDeclaration(o))a=ra(t);else{if(!e.isEnumMember(o))return e.Debug.fail("Unhandled declaration kind! "+e.Debug.showSyntaxKind(o)+" for "+e.Debug.showSymbol(t));a=na(t)}return Si()?a:512&t.flags?ra(t):ia(t)}(t);r.type||(r.type=n)}return r.type}function Qi(t){if(t)return 158===t.kind?e.getEffectiveReturnTypeNode(t):e.getEffectiveSetAccessorTypeAnnotationNode(t)}function $i(e){var t=Qi(e);return t&&Du(t)}function Zi(e){return ls(os(e))}function ea(t){var r=Ur(t);return r.type||(r.type=function(t){var r,n=e.getDeclarationOfKind(t,158),i=e.getDeclarationOfKind(t,159);if(n&&e.isInJSFile(n)){var a=Oi(n);if(a)return a}if(!bi(t,0))return _e;var o=$i(n);if(o)r=o;else{var s=$i(i);s?r=s:n&&n.body?r=Bm(n):(i?wr(B,i,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,ci(t)):(e.Debug.assert(!!n,"there must existed getter as we are current checking either setter or getter in this function"),wr(B,n,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,ci(t))),r=ce)}if(!Si()&&(r=ce,B)){var c=e.getDeclarationOfKind(t,158);Pr(c,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,ci(t))}return r}(t))}function ta(e){var t=ha(Da(e));return 8650752&t.flags?t:void 0}function ra(t){var r=Ur(t),n=r;if(!r.type){var i=e.getDeclarationOfExpando(t.valueDeclaration);if(i){var a=In(i);a&&(e.hasEntries(a.exports)||e.hasEntries(a.members))&&(r=t=Rr(t),e.hasEntries(a.exports)&&(t.exports=t.exports||e.createSymbolTable(),zr(t.exports,a.exports)),e.hasEntries(a.members)&&(t.members=t.members||e.createSymbolTable(),zr(t.members,a.members)))}n.type=r.type=function(t){var r=t.valueDeclaration;if(1536&t.flags&&e.isShorthandAmbientModuleSymbol(t))return ce;if(204===r.kind||189===r.kind&&204===r.parent.kind)return ji(t);if(512&t.flags&&r&&e.isSourceFile(r)&&r.commonJsModuleIndicator){var n=Sn(t);if(n!==t){if(!bi(t,0))return _e;var i=wn(t.exports.get("export=")),a=ji(i,i===n?void 0:n);return Si()?a:ia(t)}}var o=Vn(16,t);if(32&t.flags){var s=ta(t);return s?Mc([o,s]):o}return O&&16777216&t.flags?u_(o):o}(t)}return r.type}function na(e){var t=Ur(e);return t.type||(t.type=Ea(e))}function ia(t){var r=t.valueDeclaration;return e.getEffectiveTypeAnnotationNode(r)?(Pr(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,ci(t)),_e):(B&&(151!==r.kind||r.initializer)&&Pr(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,ci(t)),ce)}function aa(t){return 1&e.getCheckFlags(t)?function(e){var t=Ur(e);if(!t.type){if(!bi(e,0))return t.type=_e;var r=Ku(aa(t.target),t.mapper);Si()||(r=ia(e)),t.type=r}return t.type}(t):4096&e.getCheckFlags(t)?function(e){return I_(e.propertyType,e.mappedType,e.constraintType)}(t):7&t.flags?Xi(t):9136&t.flags?ra(t):8&t.flags?na(t):98304&t.flags?ea(t):2097152&t.flags?function(e){var t=Ur(e);if(!t.type){var r=dn(e);t.type=67220415&r.flags?aa(r):_e}return t.type}(t):_e}function oa(t,r){return void 0!==t&&void 0!==r&&0!=(4&e.getObjectFlags(t))&&t.target===r}function sa(t){return 4&e.getObjectFlags(t)?t.target:t}function ca(t,r){return function t(n){if(7&e.getObjectFlags(n)){var i=sa(n);return i===r||e.some(va(i),t)}return!!(2097152&n.flags)&&e.some(n.types,t)}(t)}function ua(t,r){for(var n=0,i=r;n<i.length;n++){var a=i[n];t=e.appendIfUnique(t,ka(In(a)))}return t}function la(t,r){for(;;){if(!(t=t.parent))return;switch(t.kind){case 240:case 209:case 241:case 160:case 161:case 155:case 165:case 166:case 294:case 239:case 156:case 196:case 197:case 242:case 308:case 309:case 302:case 181:case 175:var n=la(t,r);if(181===t.kind)return e.append(n,ka(In(t.typeParameter)));if(175===t.kind)return e.concatenate(n,ru(t));var i=ua(n,e.getEffectiveTypeParameterDeclarations(t)),a=r&&(240===t.kind||209===t.kind||241===t.kind)&&Da(In(t)).thisType;return a?e.append(i,a):i}}}function _a(t){return la(32&t.flags?t.valueDeclaration:e.getDeclarationOfKind(t,241))}function da(t){for(var r,n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(241===a.kind||240===a.kind||209===a.kind||e.isTypeAlias(a)){var o=a;r=ua(r,e.getEffectiveTypeParameterDeclarations(o))}}return r}function pa(e){var t=Vo(e,1);if(1===t.length){var r=t[0];return!r.typeParameters&&1===r.parameters.length&&r.hasRestParameter&&Dm(r.parameters[0])===at}return!1}function fa(e){if(ba(e)&&Vo(e,1).length>0)return!0;if(8650752&e.flags){var t=Po(e);return!!t&&ba(t)&&pa(t)}return _m(e)}function ma(t){return e.getEffectiveBaseTypeNode(t.symbol.valueDeclaration)}function ga(t,r,n){var i=e.length(r),a=e.isInJSFile(n);return e.filter(Vo(t,1),function(t){return(a||i>=is(t.typeParameters))&&i<=e.length(t.typeParameters)})}function ya(t,r,n){var i=ga(t,r,n),a=e.map(r,Du);return e.sameMap(i,function(t){return e.some(t.typeParameters)?gs(t,a,e.isInJSFile(n)):t})}function ha(t){if(!t.resolvedBaseConstructorType){var r=t.symbol.valueDeclaration,n=e.getEffectiveBaseTypeNode(r),i=ma(t);if(!i)return t.resolvedBaseConstructorType=pe;if(!bi(t,1))return _e;var a=kg(i.expression);if(n&&i!==n&&(e.Debug.assert(!n.typeArguments),kg(n.expression)),2621440&a.flags&&Do(a),!Si())return Pr(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,ci(t.symbol)),t.resolvedBaseConstructorType=_e;if(!(1&a.flags||a===ge||fa(a))){var o=Pr(i.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,li(a));if(262144&a.flags){var s=As(a),c=de;if(s){var u=Vo(s,1);u[0]&&(c=ps(u[0]))}e.addRelatedInfo(o,e.createDiagnosticForNode(a.symbol.declarations[0],e.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,ci(a.symbol),li(c)))}return t.resolvedBaseConstructorType=_e}t.resolvedBaseConstructorType=a}return t.resolvedBaseConstructorType}function va(t){return t.resolvedBaseTypes||(8&t.objectFlags?t.resolvedBaseTypes=[hc(Ac(t.typeParameters||e.emptyArray),t.readonly)]:96&t.symbol.flags?(32&t.symbol.flags&&function(t){t.resolvedBaseTypes=e.resolvingEmptyArray;var r=Bo(ha(t));if(!(2621441&r.flags))return t.resolvedBaseTypes=e.emptyArray;var n,i=ma(t),a=Xs(i),o=_m(r)?r:r.symbol?Na(r.symbol):void 0;if(r.symbol&&32&r.symbol.flags&&function(e){var t=e.outerTypeParameters;if(t){var r=t.length-1,n=e.typeArguments;return t[r].symbol!==n[r].symbol}return!0}(o))n=Ls(i,r.symbol,a);else if(1&r.flags)n=r;else if(_m(r))n=!i.typeArguments&&dm(r.symbol)||ce;else{var s=ya(r,i.typeArguments,i);if(!s.length)return Pr(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments),t.resolvedBaseTypes=e.emptyArray;n=ps(s[0])}n===_e?t.resolvedBaseTypes=e.emptyArray:ba(n)?t===n||ca(n,t)?(Pr(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,li(t,void 0,2)),t.resolvedBaseTypes=e.emptyArray):(t.resolvedBaseTypes===e.resolvingEmptyArray&&(t.members=void 0),t.resolvedBaseTypes=[n]):(Pr(i.expression,e.Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,li(n)),t.resolvedBaseTypes=e.emptyArray)}(t),64&t.symbol.flags&&function(t){t.resolvedBaseTypes=t.resolvedBaseTypes||e.emptyArray;for(var r=0,n=t.symbol.declarations;r<n.length;r++){var i=n[r];if(241===i.kind&&e.getInterfaceBaseTypeNodes(i))for(var a=0,o=e.getInterfaceBaseTypeNodes(i);a<o.length;a++){var s=o[a],c=Du(s);c!==_e&&(ba(c)?t===c||ca(c,t)?Pr(i,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,li(t,void 0,2)):t.resolvedBaseTypes===e.emptyArray?t.resolvedBaseTypes=[c]:t.resolvedBaseTypes.push(c):Pr(s,e.Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}}(t)):e.Debug.fail("type must be class or interface")),t.resolvedBaseTypes}function ba(t){return!!(67633153&t.flags)&&!bo(t)||!!(2097152&t.flags)&&e.every(t.types,ba)}function Da(t){var r=Ur(t);if(!r.declaredType){var n=32&t.flags?1:2,i=r.declaredType=Vn(n,t),a=_a(t),o=da(t);(a||o||1===n||!function(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r];if(241===i.kind){if(64&i.flags)return!1;var a=e.getInterfaceBaseTypeNodes(i);if(a)for(var o=0,s=a;o<s.length;o++){var c=s[o];if(e.isEntityNameExpression(c.expression)){var u=yn(c.expression,67897832,!0);if(!u||!(64&u.flags)||Da(u).thisType)return!1}}}}return!0}(t))&&(i.objectFlags|=4,i.typeParameters=e.concatenate(a,o),i.outerTypeParameters=a,i.localTypeParameters=o,i.instantiations=e.createMap(),i.instantiations.set(Ps(i.typeParameters),i),i.target=i,i.typeArguments=i.typeParameters,i.thisType=qn(t),i.thisType.isThisType=!0,i.thisType.constraint=i)}return r.declaredType}function xa(t){var r=t.initializer;if(!r)return!(4194304&t.flags);switch(r.kind){case 10:case 8:return!0;case 202:return 39===r.operator&&8===r.operand.kind;case 72:return e.nodeIsMissing(r)||!!In(t.parent).exports.get(r.escapedText);case 204:return function e(t){return 10===t.kind||204===t.kind&&e(t.left)&&e(t.right)}(r);default:return!1}}function Sa(e){var t=Ur(e);if(void 0!==t.enumKind)return t.enumKind;for(var r=!1,n=0,i=e.declarations;n<i.length;n++){var a=i[n];if(243===a.kind)for(var o=0,s=a.members;o<s.length;o++){var c=s[o];if(c.initializer&&10===c.initializer.kind)return t.enumKind=1;xa(c)||(r=!0)}}return t.enumKind=r?0:1}function Ta(e){return 1024&e.flags&&!(1048576&e.flags)?Na(On(e.symbol)):e}function Ca(e){var t=Ur(e);if(t.declaredType)return t.declaredType;if(1===Sa(e)){C++;for(var r=[],n=0,i=e.declarations;n<i.length;n++){var a=i[n];if(243===a.kind)for(var o=0,s=a.members;o<s.length;o++){var c=s[o],u=mu(hu(Zh(c),C,In(c)));Ur(In(c)).declaredType=u,r.push(gu(u))}}if(r.length){var l=Ac(r,1,e,void 0);return 1048576&l.flags&&(l.flags|=1024,l.symbol=e),t.declaredType=l}}var _=Jn(32);return _.symbol=e,t.declaredType=_}function Ea(e){var t=Ur(e);if(!t.declaredType){var r=Ca(On(e));t.declaredType||(t.declaredType=r)}return t.declaredType}function ka(e){var t=Ur(e);return t.declaredType||(t.declaredType=qn(e))}function Na(e){return Aa(e)||_e}function Aa(t){return 96&t.flags?Da(t):524288&t.flags?function(t){var r=Ur(t);if(!r.declaredType){if(!bi(t,2))return _e;var n=e.find(t.declarations,function(t){return e.isJSDocTypeAlias(t)||242===t.kind}),i=e.isJSDocTypeAlias(n)?n.typeExpression:n.type,a=i?Du(i):_e;if(Si()){var o=da(t);o&&(r.typeParameters=o,r.instantiations=e.createMap(),r.instantiations.set(Ps(o),a))}else a=_e,Pr(n.name,e.Diagnostics.Type_alias_0_circularly_references_itself,ci(t));r.declaredType=a}return r.declaredType}(t):262144&t.flags?ka(t):384&t.flags?Ca(t):8&t.flags?Ea(t):2097152&t.flags?function(e){var t=Ur(e);return t.declaredType||(t.declaredType=Na(dn(e)))}(t):void 0}function Fa(e){switch(e.kind){case 120:case 143:case 138:case 135:case 146:case 123:case 139:case 136:case 106:case 141:case 96:case 132:case 182:return!0;case 169:return Fa(e.elementType);case 164:return!e.typeArguments||e.typeArguments.every(Fa)}return!1}function Pa(t){var r=e.getEffectiveConstraintOfTypeParameter(t);return!r||Fa(r)}function wa(t){var r=e.getEffectiveTypeAnnotationNode(t);return r?Fa(r):!e.hasInitializer(t)}function Ia(t){if(t.declarations&&1===t.declarations.length){var r=t.declarations[0];if(r)switch(r.kind){case 154:case 153:return wa(r);case 156:case 155:case 157:case 158:case 159:return n=r,i=e.getEffectiveReturnTypeNode(n),a=e.getEffectiveTypeParameterDeclarations(n),(157===n.kind||!!i&&Fa(i))&&n.parameters.every(wa)&&a.every(Pa)}}var n,i,a;return!1}function Oa(t,r,n){for(var i=e.createSymbolTable(),a=0,o=t;a<o.length;a++){var s=o[a];i.set(s.escapedName,n&&Ia(s)?s:Ou(s,r))}return i}function Ma(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];e.has(i.escapedName)||e.set(i.escapedName,i)}}function La(t){if(!t.declaredProperties){var r=t.symbol,n=qa(r);t.declaredProperties=Hn(n),t.declaredCallSignatures=e.emptyArray,t.declaredConstructSignatures=e.emptyArray,t.declaredCallSignatures=us(n.get("__call")),t.declaredConstructSignatures=us(n.get("__new")),t.declaredStringIndexInfo=ks(r,0),t.declaredNumberIndexInfo=ks(r,1)}return t}function Ra(e){return!!(8576&e.flags)}function Ba(t){return e.isComputedPropertyName(t)&&e.isEntityNameExpression(t.expression)&&Ra(Rp(t))}function ja(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function Ja(t){var r=e.getNameOfDeclaration(t);return!!r&&Ba(r)}function za(t){return e.hasDynamicName(t)&&!Ja(t)}function Ka(t){return 8192&t.flags?t.escapedName:384&t.flags?e.escapeLeadingUnderscores(""+t.value):e.Debug.fail()}function Ua(t,r,n,i){e.Debug.assert(!!i.symbol,"The member is expected to have a symbol.");var a=Vr(i);if(!a.resolvedSymbol){a.resolvedSymbol=i.symbol;var o=Rp(i.name);if(Ra(o)){var s=Ka(o),c=i.symbol.flags,u=n.get(s);u||n.set(s,u=Ir(0,s,2048));var l=r&&r.get(s);if(u.flags&Mr(c)||l){var _=l?e.concatenate(l.declarations,u.declarations):u.declarations,d=!(8192&o.flags)&&e.unescapeLeadingUnderscores(s)||e.declarationNameToString(i.name);e.forEach(_,function(t){return Pr(e.getNameOfDeclaration(t)||t,e.Diagnostics.Property_0_was_also_declared_here,d)}),Pr(i.name||i,e.Diagnostics.Duplicate_property_0,d),u=Ir(0,s,2048)}return u.nameType=o,function(t,r,n){e.Debug.assert(!!(2048&e.getCheckFlags(t)),"Expected a late-bound symbol."),t.flags|=n,Ur(r.symbol).lateSymbol=t,t.declarations?t.declarations.push(r):t.declarations=[r],67220415&n&&(t.valueDeclaration&&t.valueDeclaration.kind===r.kind||(t.valueDeclaration=r))}(u,i,c),u.parent?e.Debug.assert(u.parent===t,"Existing symbol parent should match new one"):u.parent=t,a.resolvedSymbol=u}}return a.resolvedSymbol}function Va(t,r){var n=Ur(t);if(!n[r]){var i="resolvedExports"===r,a=i?1536&t.flags?Pn(t):t.exports:t.members;n[r]=a||N;for(var o=e.createSymbolTable(),s=0,c=t.declarations;s<c.length;s++){var u=c[s],l=e.getMembersOfDeclaration(u);if(l)for(var _=0,d=l;_<d.length;_++){var p=d[_];i===e.hasStaticModifier(p)&&Ja(p)&&Ua(t,a,o,p)}}n[r]=function(t,r){if(!e.hasEntries(t))return r;if(!e.hasEntries(r))return t;var n=e.createSymbolTable();return zr(n,t),zr(n,r),n}(a,o)||N}return n[r]}function qa(e){return 6240&e.flags?Va(e,"resolvedMembers"):e.members||N}function Wa(t){if(106500&t.flags&&"__computed"===t.escapedName){var r=Ur(t);return!r.lateSymbol&&e.some(t.declarations,Ja)&&(e.some(t.declarations,e.hasStaticModifier)?Nn(t.parent):qa(t.parent)),r.lateSymbol||(r.lateSymbol=t)}return t}function Ha(t,r,n){if(4&e.getObjectFlags(t)){var i=t.target,a=t.typeArguments;if(e.length(i.typeParameters)===e.length(a)){var o=Is(i,e.concatenate(a,[r||i.thisType]));return n?Bo(o):o}}else if(2097152&t.flags)return Mc(e.map(t.types,function(e){return Ha(e,r,n)}));return n?Bo(t):t}function Ga(t,r,n,i){var a,o,s,c,u,l;e.rangeEquals(n,i,0,n.length)?(a=A,o=r.symbol?qa(r.symbol):e.createSymbolTable(r.declaredProperties),s=r.declaredCallSignatures,c=r.declaredConstructSignatures,u=r.declaredStringIndexInfo,l=r.declaredNumberIndexInfo):(a=Eu(n,i),o=Oa(r.declaredProperties,a,1===n.length),s=Tu(r.declaredCallSignatures,a),c=Tu(r.declaredConstructSignatures,a),u=qu(r.declaredStringIndexInfo,a),l=qu(r.declaredNumberIndexInfo,a));var _=va(r);if(_.length){r.symbol&&o===qa(r.symbol)&&(o=e.createSymbolTable(r.declaredProperties)),Gn(t,o,s,c,u,l);for(var d=e.lastOrUndefined(i),p=0,f=_;p<f.length;p++){var m=f[p],g=d?Ha(Ku(m,a),d):m;Ma(o,Co(g)),s=e.concatenate(s,Vo(g,0)),c=e.concatenate(c,Vo(g,1)),u||(u=g===ce?Es(ce,!1):Ho(g,0)),l=l||Ho(g,1)}}Gn(t,o,s,c,u,l)}function Ya(e,t,r,n,i,a,o,s,c){var u=new x(X);return u.declaration=e,u.typeParameters=t,u.parameters=n,u.thisParameter=r,u.resolvedReturnType=i,u.resolvedTypePredicate=a,u.minArgumentCount=o,u.hasRestParameter=s,u.hasLiteralTypes=c,u.target=void 0,u.mapper=void 0,u}function Xa(e){var t=Ya(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,e.hasRestParameter,e.hasLiteralTypes);return t.target=e.target,t.mapper=e.mapper,t}function Qa(e,t){var r=Xa(e);return r.unionSignatures=t,r.target=void 0,r.mapper=void 0,r}function $a(t){if(t.hasRestParameter){var r=t.parameters.length-1,n=aa(t.parameters[r]);if(e_(n)){var i=n.typeArguments||e.emptyArray,a=n.target.minLength,o=n.target.hasRestElement?i.length-1:-1,s=e.map(i,function(e,n){var i=Ir(1,xm(t,r+n),n===o?16384:n>=a?8192:0);return i.type=n===o?hc(e):e,i});return e.concatenate(t.parameters.slice(0,r),s)}}return t.parameters}function Za(e,t,r,n,i){for(var a=0,o=e;a<o.length;a++){var s=o[a];if(Bl(s,t,r,n,i,r?el:$u))return s}}function eo(t,r,n){if(r.typeParameters){if(n>0)return;for(var i=1;i<t.length;i++)if(!Za(t[i],r,!1,!1,!1))return;return[r]}var a;for(i=0;i<t.length;i++){var o=i===n?r:Za(t[i],r,!0,!0,!0);if(!o)return;a=e.appendIfUnique(a,o)}return a}function to(t){for(var r,n,i=0;i<t.length;i++){if(0===t[i].length)return e.emptyArray;t[i].length>1&&(n=void 0===n?i:-1);for(var a=0,o=t[i];a<o.length;a++){var s=o[a];if(!r||!Za(r,s,!1,!0,!0)){var c=eo(t,s,i);if(c){var u=s;if(c.length>1){var l=s.thisParameter;if(e.forEach(c,function(e){return e.thisParameter})){var _=Ac(e.map(c,function(e){return e.thisParameter?aa(e.thisParameter):ce}),2);l=d_(s.thisParameter,_)}(u=Qa(s,c)).thisParameter=l}(r||(r=[])).push(u)}}}}if(!e.length(r)&&-1!==n){for(var d=t[void 0!==n?n:0],p=d.slice(),f=function(t){if(t!==d){var r=t[0];if(e.Debug.assert(!!r,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),!(p=r.typeParameters&&e.some(p,function(e){return!!e.typeParameters})?void 0:e.map(p,function(t){return i=r,a=(n=t).declaration,o=function(e,t){for(var r=Em(e)>=Em(t)?e:t,n=r===e?t:e,i=Em(r),a=Nm(e)||Nm(t),o=a&&!Nm(r),s=new Array(i+(o?1:0)),c=0;c<i;c++){var u=Tm(r,c),l=Tm(n,c)||de,_=Mc([u,l]),d=a&&!o&&c===i-1,p=c>=km(r)&&c>=km(n),f=xm(e,c),m=xm(t,c),g=Ir(1|(p&&!d?16777216:0),f===m?f:"arg"+c);g.type=d?hc(_):_,s[c]=g}if(o){var y=Ir(1,"args");y.type=hc(Sm(n,i)),s[i]=y}return s}(n,i),s=function(e,t){if(!e||!t)return e||t;var r=Ac([aa(e),aa(t)],2);return d_(e,r)}(n.thisParameter,i.thisParameter),c=Math.max(n.minArgumentCount,i.minArgumentCount),u=n.hasRestParameter||i.hasRestParameter,l=n.hasLiteralTypes||i.hasLiteralTypes,(_=Ya(a,n.typeParameters||i.typeParameters,s,o,void 0,void 0,c,u,l)).unionSignatures=e.concatenate(n.unionSignatures||[n],[i]),_;var n,i,a,o,s,c,u,l,_})))return"break"}},m=0,g=t;m<g.length&&"break"!==f(g[m]);m++);r=p}return r||e.emptyArray}function ro(e,t){for(var r=[],n=!1,i=0,a=e;i<a.length;i++){var o=Ho(a[i],t);if(!o)return;r.push(o.type),n=n||o.isReadonly}return Es(Ac(r,2),n)}function no(e,t){return e?t?Mc([e,t]):e:t}function io(e,t){return e?t?Es(Mc([e.type,t.type]),e.isReadonly&&t.isReadonly):e:t}function ao(e,t){return e&&t&&Es(Ac([e.type,t.type]),e.isReadonly||t.isReadonly)}function oo(t){var r=e.countWhere(t,function(e){return Vo(e,1).length>0}),n=e.map(t,pa);return r>0&&r===e.countWhere(n,function(e){return e})&&(n[n.indexOf(!0)]=!1),n}function so(t){for(var r,n,i=e.emptyArray,a=e.emptyArray,o=t.types,s=oo(o),c=e.countWhere(s,function(e){return e}),u=function(u){var l=t.types[u];if(!s[u]){var _=Vo(l,1);_.length&&c>0&&(_=e.map(_,function(e){var t=Xa(e);return t.resolvedReturnType=function(e,t,r,n){for(var i=[],a=0;a<t.length;a++)a===n?i.push(e):r[a]&&i.push(ps(Vo(t[a],1)[0]));return Mc(i)}(ps(e),o,s,u),t})),a=e.concatenate(a,_)}i=e.concatenate(i,Vo(l,0)),r=io(r,Ho(l,0)),n=io(n,Ho(l,1))},l=0;l<o.length;l++)u(l);Gn(t,N,i,a,r,n)}function co(t){var r=t.symbol;if(t.target)Gn(t,N,e.emptyArray,e.emptyArray,void 0,void 0),Gn(t,n=Oa(xo(t.target),t.mapper,!1),Tu(Vo(t.target,0),t.mapper),c=Tu(Vo(t.target,1),t.mapper),i=qu(Ho(t.target,0),t.mapper),s=qu(Ho(t.target,1),t.mapper));else if(2048&r.flags)Gn(t,N,e.emptyArray,e.emptyArray,void 0,void 0),Gn(t,n=qa(r),us(n.get("__call")),c=us(n.get("__new")),i=ks(r,0),s=ks(r,1));else{var n=N,i=void 0;if(r.exports&&(n=Nn(r),r===W)){var a=e.createMap();n.forEach(function(e){418&e.flags||a.set(e.escapedName,e)}),n=a}if(Gn(t,n,e.emptyArray,e.emptyArray,void 0,void 0),32&r.flags){var o=ha(u=Da(r));11272192&o.flags?Ma(n=e.createSymbolTable(Hn(n)),Co(o)):o===ce&&(i=Es(ce,!1))}var s=384&r.flags?Mt:void 0;if(Gn(t,n,e.emptyArray,e.emptyArray,i,s),8208&r.flags&&(t.callSignatures=us(r),t.constructSignatures=e.filter(t.callSignatures,function(e){return lm(e.declaration)})),32&r.flags){var c,u=Da(r);(c=us(r.members.get("__constructor"))).length||(c=function(t){var r=Vo(ha(t),1);if(0===r.length)return[Ya(void 0,t.localTypeParameters,void 0,e.emptyArray,t,void 0,0,!1,!1)];for(var n=ma(t),i=e.isInJSFile(n),a=Xs(n),o=e.length(a),s=[],c=0,u=r;c<u.length;c++){var l=u[c],_=is(l.typeParameters),d=e.length(l.typeParameters);if(i||o>=_&&o<=d){var p=d?hs(l,as(a,l.typeParameters,_,i)):Xa(l);p.typeParameters=t.localTypeParameters,p.resolvedReturnType=t,s.push(p)}}return s}(u)),t.constructSignatures=c}}}function uo(t){return 131069&t.flags?t:4194304&t.flags?Jc(Bo(t.type)):16777216&t.flags?function(e){if(e.root.isDistributive){var t=uo(e.checkType);if(t!==e.checkType){var r=Cu(e.root.checkType,t);return zu(e,Nu(r,e.mapper))}}return e}(t):1048576&t.flags?Ac(e.sameMap(t.types,uo)):2097152&t.flags?Mc(e.sameMap(t.types,uo)):ke}function lo(e){return e.typeParameter||(e.typeParameter=ka(In(e.declaration.typeParameter)))}function _o(e){return e.constraintType||(e.constraintType=ko(lo(e))||_e)}function po(e){return e.templateType||(e.templateType=e.declaration.type?Ku(Li(Du(e.declaration.type),!!(4&yo(e))),e.mapper||A):_e)}function fo(t){return e.getEffectiveConstraintOfTypeParameter(t.declaration.typeParameter)}function mo(e){var t=fo(e);return 179===t.kind&&129===t.operator}function go(e){if(!e.modifiersType)if(mo(e))e.modifiersType=Ku(Du(fo(e).type),e.mapper||A);else{var t=_o($c(e.declaration)),r=t&&262144&t.flags?ko(t):t;e.modifiersType=r&&4194304&r.flags?Ku(r.type,e.mapper||A):Oe}return e.modifiersType}function yo(e){var t=e.declaration;return(t.readonlyToken?39===t.readonlyToken.kind?2:1:0)|(t.questionToken?39===t.questionToken.kind?8:4:0)}function ho(e){var t=yo(e);return 8&t?-1:4&t?1:0}function vo(e){var t=ho(e),r=go(e);return t||(bo(r)?ho(r):0)}function bo(t){return!!(32&e.getObjectFlags(t))&&Wc(_o(t))}function Do(t){return t.members||(524288&t.flags?4&t.objectFlags?function(t){var r=La(t.target),n=e.concatenate(r.typeParameters,[r.thisType]);Ga(t,r,n,t.typeArguments&&t.typeArguments.length===n.length?t.typeArguments:e.concatenate(t.typeArguments,[t]))}(t):3&t.objectFlags?function(t){Ga(t,La(t),e.emptyArray,e.emptyArray)}(t):2048&t.objectFlags?function(t){for(var r=Ho(t.source,0),n=yo(t.mappedType),i=!(1&n),a=4&n?0:16777216,o=r&&Es(I_(r.type,t.mappedType,t.constraintType),i&&r.isReadonly),s=e.createSymbolTable(),c=0,u=Co(t.source);c<u.length;c++){var l=u[c],_=4096|(i&&Gm(l)?8:0),d=Ir(4|l.flags&a,l.escapedName,_);d.declarations=l.declarations,d.nameType=l.nameType,d.propertyType=aa(l),d.mappedType=t.mappedType,d.constraintType=t.constraintType,s.set(l.escapedName,d)}Gn(t,s,e.emptyArray,e.emptyArray,o,void 0)}(t):16&t.objectFlags?co(t):32&t.objectFlags&&function(t){var r,n,i=e.createSymbolTable();Gn(t,N,e.emptyArray,e.emptyArray,void 0,void 0);var a=lo(t),o=_o(t),s=po(t.target||t),c=Bo(go(t)),u=yo(t),l=J?128:8576;if(mo(t)){for(var _=0,d=Co(c);_<d.length;_++)p(Bc(d[_],l));(1&c.flags||Ho(c,0))&&p(ye),!J&&Ho(c,1)&&p(he)}else Dd(uo(o),p);function p(e){var o=Nu(t.mapper,Eu([a],[e])),l=Ku(s,o);if(Ra(e)){var _=Ka(e),d=Ko(c,_),p=!!(4&u||!(8&u)&&d&&16777216&d.flags),f=!!(1&u||!(2&u)&&d&&Gm(d)),m=Ir(4|(p?16777216:0),_,f?8:0);m.type=O&&p&&!rl(pe,l)?u_(l):O&&!p&&d&&16777216&d.flags?ad(l,524288):l,d&&(m.syntheticOrigin=d,m.declarations=d.declarations),m.nameType=e,i.set(_,m)}else 5&e.flags?r=Es(l,!!(1&u)):8&e.flags&&(n=Es(l,!!(1&u)))}Gn(t,i,e.emptyArray,e.emptyArray,r,n)}(t):1048576&t.flags?function(t){var r=to(e.map(t.types,function(e){return e===Ye?[wt]:Vo(e,0)})),n=to(e.map(t.types,function(e){return Vo(e,1)})),i=ro(t.types,0),a=ro(t.types,1);Gn(t,N,r,n,i,a)}(t):2097152&t.flags&&so(t)),t}function xo(t){return 524288&t.flags?Do(t).properties:e.emptyArray}function So(e,t){if(524288&e.flags){var r=Do(e).members.get(t);if(r&&Bn(r))return r}}function To(t){if(!t.resolvedProperties){for(var r=e.createSymbolTable(),n=0,i=t.types;n<i.length;n++){for(var a=0,o=Co(i[n]);a<o.length;a++){var s=o[a];if(!r.has(s.escapedName)){var c=zo(t,s.escapedName);c&&r.set(s.escapedName,c)}}if(1048576&t.flags)break}t.resolvedProperties=Hn(r)}return t.resolvedProperties}function Co(e){return 3145728&(e=Bo(e)).flags?To(e):xo(e)}function Eo(e){return 262144&e.flags?ko(e):8388608&e.flags?function(e){return Io(e)?function(e){var t=Eo(e.objectType)||e.objectType;if(t!==e.objectType){var r=Xc(t,e.indexType,void 0,_e);if(r&&r!==_e)return r}var n=Po(e);return n&&n!==e?n:void 0}(e):void 0}(e):16777216&e.flags?function(e){return Io(e)?Fo(e):void 0}(e):Po(e)}function ko(e){return Io(e)?As(e):void 0}function No(e){if(!e.resolvedDefaultConstraint){var t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=Ku(e.root.trueType,e.combinedMapper||e.mapper))}(e),r=e.falseType;e.resolvedDefaultConstraint=Ei(t)?r:Ei(r)?t:Ac([t,r])}return e.resolvedDefaultConstraint}function Ao(e){if(e.root.isDistributive&&e.restrictiveInstantiation!==e){var t=Hc(e.checkType),r=t===e.checkType?Eo(t):t;if(r&&r!==e.checkType){var n=zu(e,Nu(Cu(e.root.checkType,r),e.mapper));if(!(131072&n.flags))return n}}}function Fo(e){return Ao(e)||No(e)}function Po(e){if(62128128&e.flags){var t=Oo(e);return t!==Je&&t!==ze?t:void 0}return 4194304&e.flags?we:void 0}function wo(e){return Po(e)||e}function Io(e){return Oo(e)!==ze}function Oo(t){var r=!1;return t.resolvedBaseConstraint||(t.resolvedBaseConstraint=Ha(n(t),t));function n(t){if(!t.immediateBaseConstraint){if(!bi(t,4))return ze;if(k>=50)return Pr(h,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),r=!0,t.immediateBaseConstraint=Je;k++;var n=function(e){if(262144&e.flags){var t=As(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){for(var r=e.types,n=[],a=0,o=r;a<o.length;a++){var s=o[a],c=i(s);c&&n.push(c)}return 1048576&e.flags&&n.length===r.length?Ac(n):2097152&e.flags&&n.length?Mc(n):void 0}if(4194304&e.flags)return we;if(8388608&e.flags){var u=i(e.objectType),l=i(e.indexType),_=u&&l?Xc(u,l,void 0,_e):void 0;return _&&_!==_e?i(_):void 0}if(16777216&e.flags){var t=Fo(e);k++;var d=t&&i(t);return k--,d}return 33554432&e.flags?i(e.substitute):e}(Hc(t));if(k--,!Si()){if(262144&t.flags){var a=Ns(t);if(a){var o=Pr(a,e.Diagnostics.Type_parameter_0_has_a_circular_constraint,li(t));!h||e.isNodeDescendantOf(a,h)||e.isNodeDescendantOf(h,a)||e.addRelatedInfo(o,e.createDiagnosticForNode(h,e.Diagnostics.Circularity_originates_in_type_at_this_location))}}n=ze}r&&(n=ze),t.immediateBaseConstraint=n||Je}return t.immediateBaseConstraint}function i(e){var t=n(e);return t!==Je&&t!==ze?t:void 0}}function Mo(t){if(t.default)t.default===Ke&&(t.default=ze);else if(t.target){var r=Mo(t.target);t.default=r?Ku(r,t.mapper):Je}else{t.default=Ke;var n=t.symbol&&e.forEach(t.symbol.declarations,function(t){return e.isTypeParameterDeclaration(t)&&t.default}),i=n?Du(n):Je;t.default===Ke&&(t.default=i)}return t.default}function Lo(e){var t=Mo(e);return t!==Je&&t!==ze?t:void 0}function Ro(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){var t=Ru(e);if(t){var r=ko(t);if(r&&(Jl(r)||e_(r))){var n=Cu(t,r);return Ku(e,Nu(n,e.mapper))}}return e}(e))}function Bo(t){var r=63176704&t.flags?Po(t)||Oe:t;return 32&e.getObjectFlags(r)?Ro(r):2097152&r.flags?function(e){return e.resolvedApparentType||(e.resolvedApparentType=Ha(e,e,!0))}(r):132&r.flags?et:296&r.flags?tt:2112&r.flags?kt||(kt=tc("BigInt",0,P>=7))||Oe:528&r.flags?rt:12288&r.flags?nc(P>=2):67108864&r.flags?Oe:4194304&r.flags?we:r}function jo(t,r){for(var n,i=e.createMap(),a=1048576&t.flags,o=a?24:0,s=a?0:16777216,c=4,u=0,_=0,d=t.types;_<d.length;_++)if((E=Bo(d[_]))!==_e){var p=(C=Ko(E,r))?e.getDeclarationModifierFlagsFromSymbol(C):0;if(!C||p&o){if(a){var f=!ja(r)&&(Lp(r)&&Ho(E,1)||Ho(E,0));f?(u|=f.isReadonly?8:0,n=e.append(n,e_(E)?t_(E)||pe:f.type)):u|=16}}else{s&=C.flags;var m=""+l(C);i.has(m)||i.set(m,C),u|=(Gm(C)?8:0)|(24&p?0:128)|(16&p?256:0)|(8&p?512:0)|(32&p?1024:0),cf(C)||(c=2)}}if(i.size){var g,y,h,v=e.arrayFrom(i.values());if(!(1!==v.length||16&u||n))return v[0];for(var b,D=[],x=!1,S=0,T=v;S<T.length;S++){var C=T[S];b?C.valueDeclaration!==b&&(x=!0):b=C.valueDeclaration,g=e.addRange(g,C.declarations);var E=aa(C);y?E!==y&&(u|=32):(y=E,h=C.nameType),Yl(E)&&(u|=64),D.push(E)}e.addRange(D,n);var k=Ir(4|s,r,c|u);return k.containingType=t,!x&&b&&(k.valueDeclaration=b,b.symbol.parent&&(k.parent=b.symbol.parent)),k.declarations=g,k.nameType=h,k.type=a?Ac(D):Mc(D),k}}function Jo(t,r){var n=t.propertyCache||(t.propertyCache=e.createSymbolTable()),i=n.get(r);return i||(i=jo(t,r))&&n.set(r,i),i}function zo(t,r){var n=Jo(t,r);return!n||16&e.getCheckFlags(n)?void 0:n}function Ko(e,t){if(524288&(e=Bo(e)).flags){var r=Do(e),n=r.members.get(t);if(n&&Bn(n))return n;var i=r===je?Ye:r.callSignatures.length?Xe:r.constructSignatures.length?Qe:void 0;if(i){var a=So(i,t);if(a)return a}return So(Ge,t)}if(3145728&e.flags)return zo(e,t)}function Uo(t,r){if(3670016&t.flags){var n=Do(t);return 0===r?n.callSignatures:n.constructSignatures}return e.emptyArray}function Vo(e,t){return Uo(Bo(e),t)}function qo(e,t){if(3670016&e.flags){var r=Do(e);return 0===t?r.stringIndexInfo:r.numberIndexInfo}}function Wo(e,t){var r=qo(e,t);return r&&r.type}function Ho(e,t){return qo(Bo(e),t)}function Go(e,t){return Wo(Bo(e),t)}function Yo(e,t){if(__(e)){for(var r=[],n=0,i=Co(e);n<i.length;n++){var a=i[n];(0===t||Lp(a.escapedName))&&r.push(aa(a))}if(r.length)return Ac(r,2)}}function Xo(t){for(var r,n=0,i=e.getEffectiveTypeParameterDeclarations(t);n<i.length;n++){var a=i[n];r=e.appendIfUnique(r,ka(a.symbol))}return r}function Qo(e){var t=[];return e.forEach(function(e,r){Wn(r)||t.push(e)}),t}function $o(t){return e.isInJSFile(t)&&(t.type&&293===t.type.kind||e.getJSDocParameterTags(t).some(function(e){var t=e.isBracketed,r=e.typeExpression;return t||!!r&&293===r.type.kind}))}function Zo(t,r){if(!e.isExternalModuleNameRelative(t)){var n=Wr(V,'"'+t+'"',512);return n&&r?wn(n):n}}function es(t){if(e.hasQuestionToken(t)||ts(t)||$o(t))return!0;if(t.initializer){var r=os(t.parent),n=t.parent.parameters.indexOf(t);return e.Debug.assert(n>=0),n>=km(r)}var i=e.getImmediatelyInvokedFunctionExpression(t.parent);return!!i&&!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=i.arguments.length}function ts(t){if(!e.isJSDocParameterTag(t))return!1;var r=t.isBracketed,n=t.typeExpression;return r||!!n&&293===n.type.kind}function rs(e,t,r){return{kind:1,parameterName:e,parameterIndex:t,type:r}}function ns(e){return{kind:0,type:e}}function is(t){var r,n=0;if(t)for(var i=0;i<t.length;i++)(r=t[i]).symbol&&e.forEach(r.symbol.declarations,function(t){return e.isTypeParameterDeclaration(t)&&t.default})||(n=i+1);return n}function as(t,r,n,i){var a=e.length(r);if(!a)return[];var o=e.length(t);if(i||o>=n&&o<=a){for(var s=t?t.slice():[],c=o;c<a;c++)s[c]=_e;var u=q_(i);for(c=o;c<a;c++){var l=Lo(r[c]);i&&l&&Qu(l,Oe)&&(l=ce),s[c]=l?Ku(l,Eu(r,s)):u}return s.length=r.length,s}return t&&t.slice()}function os(t){var r,n=Vr(t);if(!n.resolvedSignature){for(var i=[],a=!1,o=0,s=void 0,c=!1,u=e.getImmediatelyInvokedFunctionExpression(t),l=e.isJSDocConstructSignature(t),_=!u&&e.isInJSFile(t)&&e.isValueSignatureDeclaration(t)&&!e.hasJSDocParameterTags(t)&&!e.getJSDocType(t),d=l?1:0;d<t.parameters.length;d++){var p=t.parameters[d],f=p.symbol,m=e.isJSDocParameterTag(p)?p.typeExpression&&p.typeExpression.type:p.type;f&&4&f.flags&&!e.isBindingPattern(p.name)&&(f=Gr(p,f.escapedName,67220415,void 0,void 0,!1)),0===d&&"this"===f.escapedName?(c=!0,s=p.symbol):i.push(f),m&&182===m.kind&&(a=!0),ts(p)||p.initializer||p.questionToken||p.dotDotDotToken||u&&i.length>u.arguments.length&&!m||_||$o(p)||(o=i.length)}if(!(158!==t.kind&&159!==t.kind||za(t)||c&&s)){var g=158===t.kind?159:158,y=e.getDeclarationOfKind(In(t),g);y&&(s=(r=Fv(y))&&r.symbol)}var h=157===t.kind?Da(wn(t.parent.symbol)):void 0,v=h?h.localTypeParameters:Xo(t),b=e.hasRestParameter(t)||e.isInJSFile(t)&&function(t,r){if(e.isJSDocSignature(t)||!cs(t))return!1;var n=e.lastOrUndefined(t.parameters),i=n?e.getJSDocParameterTags(n):e.getJSDocTags(t).filter(e.isJSDocParameterTag),a=e.firstDefined(i,function(t){return t.typeExpression&&e.isJSDocVariadicType(t.typeExpression.type)?t.typeExpression.type:void 0}),o=Ir(3,"args",16384);return o.type=a?hc(Du(a.type)):at,a&&r.pop(),r.push(o),!0}(t,i);n.resolvedSignature=Ya(t,v,s,i,void 0,void 0,o,b,a)}return n.resolvedSignature}function ss(t){var r=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0,n=r&&r.typeExpression&&Rf(Du(r.typeExpression));return n&&bs(n)}function cs(t){var r=Vr(t);return void 0===r.containsArgumentsReference&&(8192&r.flags?r.containsArgumentsReference=!0:r.containsArgumentsReference=function t(r){if(!r)return!1;switch(r.kind){case 72:return"arguments"===r.escapedText&&e.isExpressionNode(r);case 154:case 156:case 158:case 159:return 149===r.name.kind&&t(r.name);default:return!e.nodeStartsNewLexicalEnvironment(r)&&!e.isPartOfTypeNode(r)&&!!e.forEachChild(r,t)}}(t.body)),r.containsArgumentsReference}function us(t){if(!t)return e.emptyArray;for(var r=[],n=0;n<t.declarations.length;n++){var i=t.declarations[n];if(e.isFunctionLike(i)){if(n>0&&i.body){var a=t.declarations[n-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)continue}r.push(os(i))}}return r}function ls(e){if(e.thisParameter)return aa(e.thisParameter)}function _s(e){return void 0!==ds(e)}function ds(t){if(!t.resolvedTypePredicate){if(t.target){var r=ds(t.target);t.resolvedTypePredicate=r?(o=r,s=t.mapper,e.isIdentifierTypePredicate(o)?{kind:1,parameterName:o.parameterName,parameterIndex:o.parameterIndex,type:Ku(o.type,s)}:{kind:0,type:Ku(o.type,s)}):Ft}else if(t.unionSignatures)t.resolvedTypePredicate=function(t){for(var r,n=[],i=0,a=t;i<a.length;i++){var o=a[i],s=ds(o);if(s){if(r){if(!Fc(r,s))return}else r=s;n.push(s.type)}}if(r){var c=Ac(n);return e.isIdentifierTypePredicate(r)?rs(r.parameterName,r.parameterIndex,c):ns(c)}}(t.unionSignatures)||Ft;else{var n=t.declaration&&e.getEffectiveReturnTypeNode(t.declaration),i=void 0;if(!n&&e.isInJSFile(t.declaration)){var a=ss(t.declaration);a&&t!==a&&(i=ds(a))}t.resolvedTypePredicate=n&&e.isTypePredicateNode(n)?function(t,r){var n=t.parameterName,i=Du(t.type);return 72===n.kind?rs(n.escapedText,e.findIndex(r.parameters,function(e){return e.escapedName===n.escapedText}),i):ns(i)}(n,t):i||Ft}e.Debug.assert(!!t.resolvedTypePredicate)}var o,s;return t.resolvedTypePredicate===Ft?void 0:t.resolvedTypePredicate}function ps(t){if(!t.resolvedReturnType){if(!bi(t,3))return _e;var r=t.target?Ku(ps(t.target),t.mapper):t.unionSignatures?Ac(e.map(t.unionSignatures,ps),2):fs(t.declaration)||lm(t.declaration)&&dm(In(t.declaration))||(e.nodeIsMissing(t.declaration.body)?ce:Bm(t.declaration));if(!Si()){if(t.declaration){var n=e.getEffectiveReturnTypeNode(t.declaration);if(n)Pr(n,e.Diagnostics.Return_type_annotation_circularly_references_itself);else if(B){var i=t.declaration,a=e.getNameOfDeclaration(i);a?Pr(a,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,e.declarationNameToString(a)):Pr(i,e.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}r=ce}t.resolvedReturnType=r}return t.resolvedReturnType}function fs(t){if(157===t.kind)return Da(wn(t.parent.symbol));if(e.isJSDocConstructSignature(t))return Du(t.parameters[0].type);var r,n=e.getEffectiveReturnTypeNode(t);if(n)return Du(n);if(158===t.kind&&!za(t)){var i=e.isInJSFile(t)&&Oi(t);if(i)return i;var a=$i(e.getDeclarationOfKind(In(t),159));if(a)return a}return(r=ss(t))&&ps(r)}function ms(e){if(e.hasRestParameter){var t=aa(e.parameters[e.parameters.length-1]),r=e_(t)?t_(t):t;return r&&Go(r,1)}}function gs(e,t,r,n){var i=ys(e,as(t,e.typeParameters,is(e.typeParameters),r));if(n){var a=Rf(ps(i));if(a){var o=Xa(a);o.typeParameters=n;var s=Xa(i);return s.resolvedReturnType=Ss(o),s}}return i}function ys(t,r){var n=t.instantiations||(t.instantiations=e.createMap()),i=Ps(r),a=n.get(i);return a||n.set(i,a=hs(t,r)),a}function hs(e,t){return Iu(e,vs(e,t),!0)}function vs(e,t){return Eu(e.typeParameters,t)}function bs(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return Iu(e,ku(e.typeParameters),!0)}(e)):e}function Ds(t){return t.typeParameters?t.canonicalSignatureCache||(t.canonicalSignatureCache=function(t){return gs(t,e.map(t.typeParameters,function(e){return e.target&&!ko(e.target)?e.target:e}),e.isInJSFile(t.declaration))}(t)):t}function xs(t){var r=t.typeParameters;if(r){var n=ku(r);return Iu(t,Eu(r,e.map(r,function(e){return Ku(Po(e),n)||Oe})),!0)}return t}function Ss(t){if(!t.isolatedSignatureType){var r=157===t.declaration.kind||161===t.declaration.kind,n=Vn(16);n.members=N,n.properties=e.emptyArray,n.callSignatures=r?e.emptyArray:[t],n.constructSignatures=r?[t]:e.emptyArray,t.isolatedSignatureType=n}return t.isolatedSignatureType}function Ts(e){return e.members.get("__index")}function Cs(t,r){var n=1===r?135:138,i=Ts(t);if(i)for(var a=0,o=i.declarations;a<o.length;a++){var s=o[a],c=e.cast(s,e.isIndexSignatureDeclaration);if(1===c.parameters.length){var u=c.parameters[0];if(u.type&&u.type.kind===n)return c}}}function Es(e,t,r){return{type:e,isReadonly:t,declaration:r}}function ks(t,r){var n=Cs(t,r);if(n)return Es(n.type?Du(n.type):ce,e.hasModifier(n,64),n)}function Ns(t){var r=t.symbol&&e.getDeclarationOfKind(t.symbol,150);return r&&e.getEffectiveConstraintOfTypeParameter(r)}function As(t){if(!t.constraint)if(t.target){var r=ko(t.target);t.constraint=r?Ku(r,t.mapper):Je}else{var n=Ns(t);t.constraint=n?Du(n):function(t){var r;if(t.symbol)for(var n=0,i=t.symbol.declarations;n<i.length;n++){var a=i[n];if(176===a.parent.kind){var o=a.parent.parent;if(164===o.kind){var s=o,c=Jg(s);if(c){var u=s.typeArguments.indexOf(a.parent);if(u<c.length){var l=ko(c[u]);if(l){var _=Ku(l,Eu(c,Bg(s,c)));_!==t&&(r=e.append(r,_))}}}}else 151===o.kind&&o.dotDotDotToken&&(r=e.append(r,hc(de)))}}return r&&Mc(r)}(t)||Je}return t.constraint===Je?void 0:t.constraint}function Fs(t){var r=e.getDeclarationOfKind(t.symbol,150),n=e.isJSDocTemplateTag(r.parent)?e.getHostSignatureFromJSDoc(r.parent):r.parent;return n&&In(n)}function Ps(e){var t="";if(e)for(var r=e.length,n=0;n<r;){for(var i=e[n].id,a=1;n+a<r&&e[n+a].id===i+a;)a++;t.length&&(t+=","),t+=i,a>1&&(t+=":"+a),n+=a}return t}function ws(t,r){for(var n=0,i=0,a=t;i<a.length;i++){var o=a[i];o.flags&r||(n|=e.getObjectFlags(o))}return 917504&n}function Is(e,t){var r=Ps(t),n=e.instantiations.get(r);return n||(n=Vn(4,e.symbol),e.instantiations.set(r,n),n.objectFlags|=t?ws(t,0):0,n.target=e,n.typeArguments=t),n}function Os(e){var t=Jn(e.flags);return t.symbol=e.symbol,t.objectFlags=e.objectFlags,t.target=e.target,t.typeArguments=e.typeArguments,t}function Ms(t){return e.length(t.target.typeParameters)}function Ls(t,r,n){var i=Na(wn(r)),a=i.localTypeParameters;if(a){var o=e.length(t.typeArguments),s=is(a),c=e.isInJSFile(t);if((B||!c)&&(o<s||o>a.length)){var u=c&&e.isExpressionWithTypeArguments(t)&&!e.isJSDocAugmentsTag(t.parent);if(Pr(t,s===a.length?u?e.Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_1_type_argument_s:u?e.Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,li(i,void 0,2),s,a.length),!c)return _e}return Is(i,e.concatenate(i.outerTypeParameters,as(n,a,s,c)))}return Gs(t,r)?i:_e}function Rs(t,r){var n=Na(t),i=Ur(t),a=i.typeParameters,o=Ps(r),s=i.instantiations.get(o);return s||i.instantiations.set(o,s=Ku(n,Eu(a,as(r,a,is(a),e.isInJSFile(t.valueDeclaration))))),s}function Bs(t){switch(t.kind){case 164:return t.typeName;case 211:var r=t.expression;if(e.isEntityNameExpression(r))return r}}function js(e,t){return e&&yn(e,t)||oe}function Js(t,r){var n=Xs(t);if(r===oe)return _e;var i=Ks(t,r,n);if(i)return i;var a=e.isInJSFile(t)&&r.valueDeclaration&&e.getJSDocEnumTag(r.valueDeclaration);if(a){var o=Vr(a);if(!bi(a,5))return _e;var s=a.typeExpression?Du(a.typeExpression):_e;return Si()||(s=_e,Pr(t,e.Diagnostics.Enum_type_0_circularly_references_itself,ci(r))),o.resolvedEnumType=s}var c=Aa(r);if(c)return Gs(t,r)?262144&c.flags?Ws(c,t):gu(c):_e;if(!(67220415&r.flags&&Hs(t)))return _e;var u=zs(t,r,n);return u||(js(Bs(t),67897832),aa(r))}function zs(e,t,r){var n=aa(t),i=n.symbol&&n.symbol!==t&&Ks(e,n.symbol,r);if(i)return Ur(t).resolvedJSDocType=i}function Ks(t,r,n){if(96&r.flags){if(r.valueDeclaration&&r.valueDeclaration.parent&&e.isBinaryExpression(r.valueDeclaration.parent)){var i=zs(t,r,n);if(i)return i}return Ls(t,r,n)}if(524288&r.flags)return function(t,r,n){var i=Na(r),a=Ur(r).typeParameters;if(a){var o=e.length(t.typeArguments),s=is(a);return o<s||o>a.length?(Pr(t,s===a.length?e.Diagnostics.Generic_type_0_requires_1_type_argument_s:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,ci(r),s,a.length),_e):Rs(r,n)}return Gs(t,r)?i:_e}(t,r,n);if(16&r.flags&&Hs(t)&&lm(r.valueDeclaration)){var a=Do(aa(r));if(1===a.callSignatures.length)return ps(a.callSignatures[0])}}function Us(e,t){if(3&t.flags)return e;var r=Jn(33554432);return r.typeVariable=e,r.substitute=t,r}function Vs(e){return 170===e.kind&&1===e.elementTypes.length}function qs(e,t,r){return Vs(t)&&Vs(r)?qs(e,t.elementTypes[0],r.elementTypes[0]):Zc(Du(t))===e?Du(r):void 0}function Ws(t,r){for(var n;r&&!e.isStatement(r)&&296!==r.kind;){var i=r.parent;if(175===i.kind&&r===i.trueType){var a=qs(t,i.checkType,i.extendsType);a&&(n=e.append(n,a))}r=i}return n?Us(t,Mc(e.append(n,t))):t}function Hs(e){return!!(2097152&e.flags)&&(164===e.kind||183===e.kind)}function Gs(t,r){return!t.typeArguments||(Pr(t,e.Diagnostics.Type_0_is_not_generic,r?ci(r):t.typeName?e.declarationNameToString(t.typeName):"(anonymous)"),!1)}function Ys(t){var r=Vr(t);if(!r.resolvedType){var n=void 0,i=void 0,a=67897832;Hs(t)&&(i=function(t){if(e.isIdentifier(t.typeName)){var r=t.typeArguments;switch(t.typeName.escapedText){case"String":return Gs(t),ye;case"Number":return Gs(t),he;case"Boolean":return Gs(t),Te;case"Void":return Gs(t),Ee;case"Undefined":return Gs(t),pe;case"Null":return Gs(t),me;case"Function":case"function":return Gs(t),Ye;case"Array":case"array":return r&&r.length?void 0:at;case"Promise":case"promise":return r&&r.length?void 0:Mm(ce);case"Object":if(r&&2===r.length){if(e.isJSDocIndexSignature(t)){var n=Du(r[0]),i=Es(Du(r[1]),!1);return Yn(void 0,N,e.emptyArray,e.emptyArray,n===ye?i:void 0,n===he?i:void 0)}return ce}return Gs(t),ce}}}(t),a|=67220415),i||(i=Js(t,n=js(Bs(t),a))),r.resolvedSymbol=n,r.resolvedType=i}return r.resolvedType}function Xs(t){return e.map(t.typeArguments,Du)}function Qs(e){var t=Vr(e);return t.resolvedType||(t.resolvedType=gu(h_(kg(e.exprName)))),t.resolvedType}function $s(t,r){function n(e){for(var t=0,r=e.declarations;t<r.length;t++){var n=r[t];switch(n.kind){case 240:case 241:case 243:return n}}}if(!t)return r?Be:Oe;var i=Na(t);return 524288&i.flags?e.length(i.typeParameters)!==r?(Pr(n(t),e.Diagnostics.Global_type_0_must_have_1_type_parameter_s,e.symbolName(t),r),r?Be:Oe):i:(Pr(n(t),e.Diagnostics.Global_type_0_must_be_a_class_or_interface_type,e.symbolName(t)),r?Be:Oe)}function Zs(t,r){return ec(t,67220415,r?e.Diagnostics.Cannot_find_global_value_0:void 0)}function ec(e,t,r){return Gr(void 0,e,t,r,e,!1)}function tc(t,r,n){var i=function(t,r){return ec(t,67897832,r?e.Diagnostics.Cannot_find_global_type_0:void 0)}(t,n);return i||n?$s(i,r):void 0}function rc(e){return ut||(ut=Zs("Symbol",e))}function nc(e){return lt||(lt=tc("Symbol",0,e))||Oe}function ic(e){return dt||(dt=tc("Promise",1,e))||Be}function ac(e){return ft||(ft=Zs("Promise",e))}function oc(e){return vt||(vt=tc("AsyncIterable",1,e))||Be}function sc(e){return bt||(bt=tc("AsyncIterator",1,e))||Be}function cc(e){return Dt||(Dt=tc("AsyncIterableIterator",1,e))||Be}function uc(e){return gt||(gt=tc("Iterable",1,e))||Be}function lc(e){return yt||(yt=tc("Iterator",1,e))||Be}function _c(e){return ht||(ht=tc("IterableIterator",1,e))||Be}function dc(e,t){void 0===t&&(t=0);var r=ec(e,67897832,void 0);return r&&$s(r,t)}function pc(e,t){return e!==Be?Is(e,t):Oe}function fc(e){return pc(_t||(_t=tc("TypedPropertyDescriptor",1,!0))||Be,[e])}function mc(e){return pc(cc(!0),[e])}function gc(e){return pc(uc(!0),[e])}function yc(e){return pc(_c(!0),[e])}function hc(e,t){return pc(t?Ze:$e,[e])}function vc(t){return e.isTypeOperatorNode(t)&&133===t.operator}function bc(t,r,n,i,a){var o=t+(n?"+":",")+r+(i?"R":"")+(a&&a.length?","+a.join(","):""),s=$.get(o);return s||$.set(o,s=function(t,r,n,i,a){var o,s=[],c=n?t-1:t;if(t){o=new Array(t);for(var u=0;u<t;u++){var l=o[u]=qn();if(u<c){var _=Ir(4|(u>=r?16777216:0),""+u,i?8:0);_.type=l,s.push(_)}}}var d=[];for(u=r;u<=c;u++)d.push(hu(u));var p=Ir(4,"length");p.type=n?he:Ac(d),s.push(p);var f=Vn(12);return f.typeParameters=o,f.outerTypeParameters=void 0,f.localTypeParameters=o,f.instantiations=e.createMap(),f.instantiations.set(Ps(f.typeParameters),f),f.target=f,f.typeArguments=f.typeParameters,f.thisType=qn(),f.thisType.isThisType=!0,f.thisType.constraint=f,f.declaredProperties=s,f.declaredCallSignatures=e.emptyArray,f.declaredConstructSignatures=e.emptyArray,f.declaredStringIndexInfo=void 0,f.declaredNumberIndexInfo=void 0,f.minLength=r,f.hasRestElement=n,f.readonly=i,f.associatedNames=a,f}(t,r,n,i,a)),s}function Dc(e,t,r,n,i){void 0===t&&(t=e.length),void 0===r&&(r=!1),void 0===n&&(n=!1);var a=e.length;if(1===a&&r)return hc(e[0],n);var o=bc(a,t,a>0&&r,n,i);return e.length?Is(o,e):o}function xc(t,r){var n=t.target;return n.hasRestElement&&(r=Math.min(r,Ms(t)-1)),Dc((t.typeArguments||e.emptyArray).slice(r),Math.max(0,n.minLength-r),n.hasRestElement,n.readonly,n.associatedNames&&n.associatedNames.slice(r))}function Sc(e){return e.id}function Tc(t,r){return e.binarySearch(t,r,Sc,e.compareValues)>=0}function Cc(t,r){var n=e.binarySearch(t,r,Sc,e.compareValues);return n<0&&(t.splice(~n,0,r),!0)}function Ec(t,r,n){var i=n.flags;if(1048576&i)return kc(t,r,n.types);if(!(131072&i||2097152&i&&function(e){for(var t=0,r=0,n=e.types;r<n.length;r++){var i=n[r];if(109440&i.flags&&109440&t)return!0;if(98304&(t|=i.flags)&&67633152&t||67108864&t&&130044&t||132&t&&67238776&t||296&t&&67238612&t||2112&t&&67236796&t||12288&t&&67226620&t||49152&t&&67189756&t)return!0}return!1}(n)))if(r|=1835007&i,66846720&i&&(r|=262144),n===le&&(r|=4194304),!O&&98304&i)131072&e.getObjectFlags(n)||(r|=2097152);else{var a=t.length,o=a&&n.id>t[a-1].id?~a:e.binarySearch(t,n,Sc,e.compareValues);o<0&&t.splice(~o,0,n)}return r}function kc(e,t,r){for(var n=0,i=r;n<i.length;n++)t=Ec(e,t,i[n]);return t}function Nc(t,r){var n=t.length;if(0===n||function(e){var t=e[0];if(1024&t.flags){for(var r=On(t.symbol),n=1;n<e.length;n++){var i=e[n];if(!(1024&i.flags)||r!==On(i.symbol))return!1}return!0}return!1}(t))return!0;for(var i=n,a=0;i>0;)for(var o=t[--i],s=0,c=t;s<c.length;s++){var u=c[s];if(o!==u){if(1e5===a&&a/(n-i)*n>(r?25e6:1e6))return Pr(h,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1;if(a++,tl(o,u)&&(!(1&e.getObjectFlags(sa(o)))||!(1&e.getObjectFlags(sa(u)))||nl(o,u))){e.orderedRemoveItemAt(t,i);break}}}return!0}function Ac(t,r,n,i){if(void 0===r&&(r=1),0===t.length)return ke;if(1===t.length)return t[0];var a=[],o=kc(a,0,t);if(0!==r){if(3&o)return 1&o?4194304&o?le:ce:de;switch(r){case 1:11136&o&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(128&i.flags&&4&r||256&i.flags&&8&r||2048&i.flags&&64&r||8192&i.flags&&4096&r||yu(i)&&Tc(t,i.regularType))&&e.orderedRemoveItemAt(t,n)}}(a,o);break;case 2:if(!Nc(a,!(262144&o)))return _e}if(0===a.length)return 65536&o?2097152&o?me:ge:32768&o?2097152&o?pe:fe:ke}return Pc(a,66994211&o?0:65536,n,i)}function Fc(t,r){return e.isIdentifierTypePredicate(t)?e.isIdentifierTypePredicate(r)&&t.parameterIndex===r.parameterIndex:!e.isIdentifierTypePredicate(r)}function Pc(e,t,r,n){if(0===e.length)return ke;if(1===e.length)return e[0];var i=Ps(e),a=Z.get(i);return a||(a=Jn(1048576),Z.set(i,a),a.objectFlags=t|ws(e,98304),a.types=e,a.aliasSymbol=r,a.aliasTypeArguments=n),a}function wc(t,r,n){var i=n.flags;return 2097152&i?Ic(t,r,n.types):(hl(n)?8388608&r||(r|=8388608,t.push(n)):(r|=1835007&i,3&i?n===le&&(r|=4194304):!O&&98304&i||e.contains(t,n)||t.push(n)),r)}function Ic(e,t,r){for(var n=0,i=r;n<i.length;n++)t=wc(e,t,gu(i[n]));return t}function Oc(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!Tc(i.types,t)){var a=128&t.flags?ye:256&t.flags?he:2048&t.flags?ve:8192&t.flags?Ce:void 0;if(!a||!Tc(i.types,a))return!1}}return!0}function Mc(t,r,n){var i=[],a=Ic(i,0,t);if(131072&a)return ke;if(1&a)return 4194304&a?le:ce;if(!O&&98304&a)return 32768&a?pe:me;if((4&a&&128&a||8&a&&256&a||64&a&&2048&a||4096&a&&8192&a)&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(4&i.flags&&128&r||8&i.flags&&256&r||64&i.flags&&2048&r||4096&i.flags&&8192&r)&&e.orderedRemoveItemAt(t,n)}}(i,a),8388608&a&&524288&a&&e.orderedRemoveItemAt(i,e.findIndex(i,hl)),0===i.length)return de;if(1===i.length)return i[0];if(1048576&a){if(function(t){var r,n=e.findIndex(t,function(t){return!!(65536&e.getObjectFlags(t))});if(n<0)return!1;for(var i=n+1;i<t.length;){var a=t[i];65536&e.getObjectFlags(a)?((r||(r=[t[n]])).push(a),e.orderedRemoveItemAt(t,i)):i++}if(!r)return!1;for(var o=[],s=[],c=0,u=r;c<u.length;c++)for(var l=0,_=u[c].types;l<_.length;l++)Cc(o,a=_[l])&&Oc(r,a)&&Cc(s,a);return t[n]=Pc(s,65536),!0}(i))return Mc(i,r,n);var o=e.findIndex(i,function(e){return 0!=(1048576&e.flags)}),s=i[o];return Ac(e.map(s.types,function(t){return Mc(e.replaceElement(i,o,t))}),1,r,n)}var c=Ps(i),u=ee.get(c);return u||(u=Jn(2097152),ee.set(c,u),u.objectFlags=ws(i,98304),u.types=i,u.aliasSymbol=r,u.aliasTypeArguments=n),u}function Lc(e,t){var r=Jn(4194304);return r.type=e,r.stringsOnly=t,r}function Rc(t){return e.isIdentifier(t)?hu(e.unescapeLeadingUnderscores(t.escapedText)):gu(e.isComputedPropertyName(t)?Rp(t):kg(t))}function Bc(t,r){if(!(24&e.getDeclarationModifierFlagsFromSymbol(t))){var n=Wa(t).nameType;if(!n&&!e.isKnownSymbol(t))if("default"===t.escapedName)n=hu("default");else{var i=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);n=i&&Rc(i)||hu(e.symbolName(t))}if(n&&n.flags&r)return n}return ke}function jc(t,r){return Ac(e.map(Co(t),function(e){return Bc(e,r)}))}function Jc(t,r){return void 0===r&&(r=J),1048576&t.flags?Mc(e.map(t.types,function(e){return Jc(e,r)})):2097152&t.flags?Ac(e.map(t.types,function(e){return Jc(e,r)})):Zm(t,58982400)?function(e,t){return t?e.resolvedStringIndexType||(e.resolvedStringIndexType=Lc(e,!0)):e.resolvedIndexType||(e.resolvedIndexType=Lc(e,!1))}(t,r):32&e.getObjectFlags(t)?_o(t):t===le?le:1&t.flags?we:r?Ho(t,0)?ye:jc(t,128):Ho(t,0)?Ac([ye,he,jc(t,8192)]):function(e){var t=Ho(e,1);return t!==Mt?t:void 0}(t)?Ac([he,jc(t,8320)]):jc(t,8576)}function zc(t){if(J)return t;var r=Tt||(Tt=ec("Extract",524288,e.Diagnostics.Cannot_find_global_type_0));return r?Rs(r,[t,ye]):ye}function Kc(t){return!B&&(!!(16384&e.getObjectFlags(t))||(1048576&t.flags?e.every(t.types,Kc):2097152&t.flags?e.some(t.types,Kc):!!(63176704&t.flags)&&Kc(Oo(t))))}function Uc(t,r,n,i,a){var o=n&&190===n.kind?n:void 0,s=Ra(r)?Ka(r):o&&Nf(o.argumentExpression,r,!1)?e.getPropertyNameForKnownSymbolName(e.idText(o.argumentExpression.name)):n&&e.isPropertyName(n)?e.getPropertyNameForPropertyNameNode(n):void 0;if(void 0!==s){var c=Ko(t,s);if(c){if(o){if(Tf(c,o,100===o.expression.kind),e.isAssignmentTarget(o)&&(Ym(o,c)||Xm(o)))return Pr(o.argumentExpression,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,ci(c)),a;i&&(Vr(n).resolvedSymbol=c)}var u=aa(c);return o&&1!==e.getAssignmentTargetKind(o)?Bd(o,u):u}if(xd(t,e_)&&Lp(s)&&+s>=0){if(n&&xd(t,function(e){return!e.target.hasRestElement})){var l=Vc(n);e_(t)?Pr(l,e.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2,li(t),Ms(t),e.unescapeLeadingUnderscores(s)):Pr(l,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(s),li(t))}return Td(t,function(e){return t_(e)||pe})}}if(!(98304&r.flags)&&eg(r,12716)){if(131073&t.flags)return t;var _=eg(r,296)&&Ho(t,1)||Ho(t,0)||void 0;if(_)return n&&!eg(r,12)?Pr(l=Vc(n),e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,li(r)):o&&_.isReadonly&&(e.isAssignmentTarget(o)||e.isDeleteTarget(o))&&Pr(o,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,li(t)),_.type;if(131072&r.flags)return ke;if(Kc(t))return ce;if(o&&!rg(t)){if(t.symbol===W&&void 0!==s&&W.exports.has(s)&&418&W.exports.get(s).flags)Pr(o,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(s),li(t));else if(B&&!F.suppressImplicitAnyIndexErrors)if(void 0!==s&&hf(s,t))Pr(o,e.Diagnostics.Property_0_is_a_static_member_of_type_1,s,li(t));else if(Go(t,1))Pr(o.argumentExpression,e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{var d=void 0;void 0!==s&&(d=bf(s,t))?void 0!==d&&Pr(o.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,s,li(t),d):Pr(o,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,li(t))}return a}}return Kc(t)?ce:(n&&(l=Vc(n),384&r.flags?Pr(l,e.Diagnostics.Property_0_does_not_exist_on_type_1,""+r.value,li(t)):12&r.flags?Pr(l,e.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1,li(t),li(r)):Pr(l,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,li(r))),Ei(r)?r:a)}function Vc(e){return 190===e.kind?e.argumentExpression:180===e.kind?e.indexType:149===e.kind?e.expression:e}function qc(e){return Zm(e,59113472)}function Wc(e){return Zm(e,63176704)}function Hc(e){return 8388608&e.flags?function(e){if(e.simplified)return e.simplified===ze?e:e.simplified;e.simplified=ze;var t=Hc(e.objectType),r=Hc(e.indexType);if(1048576&r.flags)return e.simplified=Td(r,function(e){return Hc(Xc(t,e))});if(!(63176704&r.flags)){var n=Gc(t,r);if(n)return e.simplified=n}return bo(t)?e.simplified=Td(Yc(t,e.indexType),Hc):e.simplified=e}(e):e}function Gc(t,r){return 1048576&t.flags?Td(t,function(e){return Hc(Xc(e,r))}):2097152&t.flags?Mc(e.map(t.types,function(e){return Hc(Xc(e,r))})):void 0}function Yc(e,t){var r=Eu([lo(e)],[t]),n=Nu(e.mapper,r);return Ku(po(e),n)}function Xc(e,t,r,n){if(void 0===n&&(n=r?_e:de),e===le||t===le)return le;if(Wc(t)||(!r||180===r.kind)&&qc(e)){if(3&e.flags)return e;var i=e.id+","+t.id,a=re.get(i);return a||re.set(i,a=function(e,t){var r=Jn(8388608);return r.objectType=e,r.indexType=t,r}(e,t)),a}var o=Bo(e);if(1048576&t.flags&&!(16&t.flags)){for(var s=[],c=!1,u=0,l=t.types;u<l.length;u++){var _=Uc(o,l[u],r,!1,n);if(_===n){if(!r)return n;c=!0}s.push(_)}return c?n:Ac(s)}return Uc(o,t,r,!0,n)}function Qc(e){var t=Vr(e);if(!t.resolvedType){var r=Du(e.objectType),n=Du(e.indexType),i=Xc(r,n,e);t.resolvedType=8388608&i.flags&&i.objectType===r&&i.indexType===n?Ws(i,e):i}return t.resolvedType}function $c(e){var t=Vr(e);if(!t.resolvedType){var r=Vn(32,e.symbol);r.declaration=e,r.aliasSymbol=su(e),r.aliasTypeArguments=cu(r.aliasSymbol),t.resolvedType=r,_o(r)}return t.resolvedType}function Zc(e){return 33554432&e.flags?e.typeVariable:e}function eu(e,t){return!!(131072&Ac([no(e,t),ke]).flags)}function tu(e,t){var r=Ku(e.checkType,t),n=Ku(e.extendsType,t);if(r===le||n===le)return le;var i=Ku(e.trueType,t),a=Ku(e.falseType,t),o=(e.isDistributive?"d":"")+Sc(r)+">"+Sc(n)+"?"+Sc(i)+":"+Sc(a),s=ne.get(o);if(s)return s;var c=function(e,t,r,n,i,a){if(131072&a.flags&&Qu(Zc(i),Zc(r))){if(1&r.flags||rl(Vu(r),Vu(n)))return i;if(eu(r,n))return ke}else if(131072&i.flags&&Qu(Zc(a),Zc(r))){if(!(1&r.flags)&&rl(Vu(r),Vu(n)))return ke;if(1&r.flags||eu(r,n))return a}var o,s=Zm(r,63307776);if(e.inferTypeParameters){var c=T_(e.inferTypeParameters,void 0,0);s||B_(c.inferences,r,n,96),o=Nu(t,c.mapper)}var u=o?Ku(e.extendsType,o):n;if(!s&&!Zm(u,63307776)){if(3&u.flags)return i;if(1&r.flags)return Ac([Ku(e.trueType,o||t),a]);if(!rl(Uu(r),Uu(u)))return a;if(rl(Vu(r),Vu(u)))return Ku(e.trueType,o||t)}return function(e,t,r,n,i,a,o){var s=Zc(n),c=Jn(16777216);return c.root=e,c.checkType=s,c.extendsType=i,c.mapper=t,c.combinedMapper=r,c.trueType=a,c.falseType=o,c.aliasSymbol=e.aliasSymbol,c.aliasTypeArguments=Su(e.aliasTypeArguments,t),c}(e,t,o,r,n,i,a)}(e,t,r,n,i,a);return ne.set(o,c),c}function ru(t){var r;return t.locals&&t.locals.forEach(function(t){262144&t.flags&&(r=e.append(r,Na(t)))}),r}function nu(t){var r=Vr(t);if(!r.resolvedType){var n=Du(t.checkType),i=su(t),a=cu(i),o=la(t,!0),s=a?o:e.filter(o,function(e){return function(e,t){if(Lu(e,t))return!0;for(;t;){if(175===t.kind&&Lu(e,t.extendsType))return!0;t=t.parent}return!1}(e,t)}),c={node:t,checkType:n,extendsType:Du(t.extendsType),trueType:Du(t.trueType),falseType:Du(t.falseType),isDistributive:!!(262144&n.flags),inferTypeParameters:ru(t),outerTypeParameters:s,instantiations:void 0,aliasSymbol:i,aliasTypeArguments:a};r.resolvedType=tu(c,void 0),s&&(c.instantiations=e.createMap(),c.instantiations.set(Ps(s),r.resolvedType))}return r.resolvedType}function iu(t){var r=Vr(t);if(!r.resolvedType){if(t.isTypeOf&&t.typeArguments)return Pr(t,e.Diagnostics.Type_arguments_cannot_be_used_here),r.resolvedSymbol=oe,r.resolvedType=_e;if(!e.isLiteralImportTypeNode(t))return Pr(t.argument,e.Diagnostics.String_literal_expected),r.resolvedSymbol=oe,r.resolvedType=_e;var n=t.isTypeOf?67220415:2097152&t.flags?68008959:67897832,i=vn(t,t.argument.literal);if(!i)return r.resolvedSymbol=oe,r.resolvedType=_e;var a=Sn(i,!1);if(e.nodeIsMissing(t.qualifier))a.flags&n?au(t,r,a,n):(Pr(t,67220415===n?e.Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,t.argument.literal.text),r.resolvedSymbol=oe,r.resolvedType=_e);else{for(var o=function t(r){return e.isIdentifier(r)?[r]:e.append(t(r.left),r.right)}(t.qualifier),s=a,c=void 0;c=o.shift();){var u=o.length?1920:n,l=Wr(Nn(wn(_n(s))),c.escapedText,u);if(!l)return Pr(c,e.Diagnostics.Namespace_0_has_no_exported_member_1,gn(s),e.declarationNameToString(c)),r.resolvedType=_e;Vr(c).resolvedSymbol=l,Vr(c.parent).resolvedSymbol=l,s=l}au(t,r,s,n)}}return r.resolvedType}function au(e,t,r,n){var i=_n(r);return t.resolvedSymbol=i,t.resolvedType=67220415===n?aa(r):Js(e,i)}function ou(t){var r=Vr(t);if(!r.resolvedType){var n=su(t);if(0!==qa(t.symbol).size||n){var i=Vn(16,t.symbol);i.aliasSymbol=n,i.aliasTypeArguments=cu(n),e.isJSDocTypeLiteral(t)&&t.isArrayType&&(i=hc(i)),r.resolvedType=i}else r.resolvedType=Re}return r.resolvedType}function su(t){return e.isTypeAlias(t.parent)?In(t.parent):void 0}function cu(e){return e?da(e):void 0}function uu(e){return!!(524288&e.flags)&&!bo(e)}function lu(t,r,n,i,a){if(1&t.flags||1&r.flags)return ce;if(2&t.flags||2&r.flags)return de;if(131072&t.flags)return r;if(131072&r.flags)return t;if(1048576&t.flags)return Td(t,function(e){return lu(e,r,n,i,a)});if(1048576&r.flags)return Td(r,function(e){return lu(t,e,n,i,a)});if(71307260&r.flags)return t;if(qc(t)||qc(r)){if(yl(t))return r;if(2097152&t.flags){var o=t.types,s=o[o.length-1];if(uu(s)&&uu(r))return Mc(e.concatenate(o.slice(0,o.length-1),[lu(s,r,n,i,a)]))}return Mc([t,r])}var c,u,l=e.createSymbolTable(),_=e.createUnderscoreEscapedMap();t===Oe?(c=Ho(r,0),u=Ho(r,1)):(c=ao(Ho(t,0),Ho(r,0)),u=ao(Ho(t,1),Ho(r,1)));for(var d=0,p=Co(r);d<p.length;d++){var f=p[d];24&e.getDeclarationModifierFlagsFromSymbol(f)?_.set(f.escapedName,!0):_u(f)&&l.set(f.escapedName,du(f,a))}for(var m=0,g=Co(t);m<g.length;m++){var y=g[m];if(!_.has(y.escapedName)&&_u(y))if(l.has(y.escapedName)){var h=aa(f=l.get(y.escapedName));if(16777216&f.flags){var v=e.concatenate(y.declarations,f.declarations),b=Ir(4|16777216&y.flags,y.escapedName);b.type=Ac([aa(y),ad(h,524288)]),b.leftSpread=y,b.rightSpread=f,b.declarations=v,b.nameType=y.nameType,l.set(y.escapedName,b)}}else l.set(y.escapedName,du(y,a))}var D=Yn(n,l,e.emptyArray,e.emptyArray,pu(c,a),pu(u,a));return D.objectFlags|=263296|i,D}function _u(t){return!(106496&t.flags&&t.declarations.some(function(t){return e.isClassLike(t.parent)}))}function du(e,t){var r=65536&e.flags&&!(32768&e.flags);if(!r&&t===Gm(e))return e;var n=Ir(4|16777216&e.flags,e.escapedName,t?8:0);return n.type=r?pe:aa(e),n.declarations=e.declarations,n.nameType=e.nameType,n.syntheticOrigin=e,n}function pu(e,t){return e&&e.isReadonly!==t?Es(e.type,t,e.declaration):e}function fu(e,t,r){var n=Jn(e);return n.symbol=r,n.value=t,n}function mu(e){if(2944&e.flags){if(!e.freshType){var t=fu(e.flags,e.value,e.symbol);t.regularType=e,t.freshType=t,e.freshType=t}return e.freshType}return e}function gu(t){return 2944&t.flags?t.regularType:1048576&t.flags?Ac(e.sameMap(t.types,gu)):t}function yu(e){return!!(2944&e.flags)&&e.freshType===e}function hu(t,r,n){var i=(r||"")+("number"==typeof t?"#":"string"==typeof t?"@":"n")+("object"===f(t)?e.pseudoBigIntToString(t):t),a=te.get(i);if(!a){var o=("number"==typeof t?256:"string"==typeof t?128:2048)|(r?1024:0);te.set(i,a=fu(o,t,n)),a.regularType=a}return a}function vu(t){if(e.isValidESSymbolDeclaration(t)){var r=In(t),n=Ur(r);return n.uniqueESSymbolType||(n.uniqueESSymbolType=function(e){var t=Jn(8192);return t.symbol=e,t.escapedName="__@"+t.symbol.escapedName+"@"+l(t.symbol),t}(r))}return Ce}function bu(t){var r=Vr(t);return r.resolvedType||(r.resolvedType=function(t){var r=e.getThisContainer(t,!1),n=r&&r.parent;return!n||!e.isClassLike(n)&&241!==n.kind||e.hasModifier(r,32)||157===r.kind&&!e.isNodeDescendantOf(t,r.body)?(Pr(t,e.Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),_e):Da(In(n)).thisType}(t)),r.resolvedType}function Du(t){switch(t.kind){case 120:case 289:case 290:return ce;case 143:return de;case 138:return ye;case 135:return he;case 146:return ve;case 123:return Te;case 139:return Ce;case 106:return Ee;case 141:return pe;case 96:return me;case 132:return ke;case 136:return 65536&t.flags?ce:Fe;case 178:case 100:return bu(t);case 182:return function(e){var t=Vr(e);return t.resolvedType||(t.resolvedType=gu(kg(e.literal))),t.resolvedType}(t);case 164:return Ys(t);case 163:return Te;case 211:return Ys(t);case 167:return Qs(t);case 169:return function(e){var t=Vr(e);return t.resolvedType||(t.resolvedType=hc(Du(e.elementType),vc(e.parent))),t.resolvedType}(t);case 170:return function(t){var r=Vr(t);if(!r.resolvedType){var n=e.lastOrUndefined(t.elementTypes),i=n&&172===n.kind?n:void 0,a=e.findLastIndex(t.elementTypes,function(e){return 171!==e.kind&&e!==i})+1,o=e.map(t.elementTypes,function(e){var t=Du(e);return e===i&&Go(t,1)||t});r.resolvedType=Dc(o,a,!!i,vc(t.parent))}return r.resolvedType}(t);case 171:return function(e){var t=Du(e.type);return O?u_(t):t}(t);case 173:return function(t){var r=Vr(t);if(!r.resolvedType){var n=su(t);r.resolvedType=Ac(e.map(t.types,Du),1,n,cu(n))}return r.resolvedType}(t);case 174:return function(t){var r=Vr(t);if(!r.resolvedType){var n=su(t);r.resolvedType=Mc(e.map(t.types,Du),n,cu(n))}return r.resolvedType}(t);case 291:return function(e){var t=Du(e.type);return O?c_(t,65536):t}(t);case 293:return Li(Du(t.type));case 177:case 172:case 292:case 288:return Du(t.type);case 295:return function(t){var r=Du(t.type),n=t.parent,i=t.parent.parent;if(e.isJSDocTypeExpression(t.parent)&&e.isJSDocParameterTag(i)){var a=e.getHostSignatureFromJSDoc(i);if(a){var o=e.lastOrUndefined(a.parameters),s=e.getParameterSymbolFromJSDoc(i);if(!o||s&&o.symbol===s&&e.isRestParameter(o))return hc(r)}}return e.isParameter(n)&&e.isJSDocFunctionType(n.parent)?hc(r):Li(r)}(t);case 165:case 166:case 168:case 297:case 294:case 298:return ou(t);case 179:return function(t){var r=Vr(t);if(!r.resolvedType)switch(t.operator){case 129:r.resolvedType=Jc(Du(t.type));break;case 142:r.resolvedType=139===t.type.kind?vu(e.walkUpParenthesizedTypes(t.parent)):_e;break;case 133:r.resolvedType=Du(t.type)}return r.resolvedType}(t);case 180:return Qc(t);case 181:return $c(t);case 175:return nu(t);case 176:return function(e){var t=Vr(e);return t.resolvedType||(t.resolvedType=ka(In(e.typeParameter))),t.resolvedType}(t);case 183:return iu(t);case 72:case 148:var r=Ph(t);return r?Na(r):_e;default:return _e}}function xu(e,t,r){if(e&&e.length)for(var n=0;n<e.length;n++){var i=e[n],a=r(i,t);if(i!==a){var o=0===n?[]:e.slice(0,n);for(o.push(a),n++;n<e.length;n++)o.push(r(e[n],t));return o}}return e}function Su(e,t){return xu(e,t,Ku)}function Tu(e,t){return xu(e,t,Iu)}function Cu(e,t){return function(r){return r===e?t:r}}function Eu(t,r){return e.Debug.assert(void 0===r||t.length===r.length),1===t.length?Cu(t[0],r?r[0]:ce):2===t.length?(n=t[0],i=r?r[0]:ce,a=t[1],o=r?r[1]:ce,function(e){return e===n?i:e===a?o:e}):function(e,t){return function(r){for(var n=0;n<e.length;n++)if(r===e[n])return t?t[n]:ce;return r}}(t,r);var n,i,a,o}function ku(e){return Eu(e,void 0)}function Nu(e,t){return e?t?function(r){return Ku(e(r),t)}:e:t}function Au(e,t,r){return function(n){return n===e?t:r(n)}}function Fu(e){return 262144&e.flags?le:e}function Pu(e){return 262144&e.flags?(t=e).constraint===de?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=qn(t.symbol),t.restrictiveInstantiation.constraint=de,t.restrictiveInstantiation):e;var t}function wu(e){var t=qn(e.symbol);return t.target=e,t}function Iu(t,r,n){var i;if(t.typeParameters&&!n){i=e.map(t.typeParameters,wu),r=Nu(Eu(t.typeParameters,i),r);for(var a=0,o=i;a<o.length;a++)o[a].mapper=r}var s=Ya(t.declaration,i,t.thisParameter&&Ou(t.thisParameter,r),xu(t.parameters,r,Ou),void 0,void 0,t.minArgumentCount,t.hasRestParameter,t.hasLiteralTypes);return s.target=t,s.mapper=r,s}function Ou(t,r){var n=Ur(t);if(n.type&&!Zm(n.type,63700992))return t;1&e.getCheckFlags(t)&&(t=n.target,r=Nu(n.mapper,r));var i=Ir(t.flags,t.escapedName,1|26632&e.getCheckFlags(t));return i.declarations=t.declarations,i.parent=t.parent,i.target=t,i.mapper=r,t.valueDeclaration&&(i.valueDeclaration=t.valueDeclaration),t.nameType&&(i.nameType=t.nameType),i}function Mu(t,r){var n=64&t.objectFlags?t.target:t,i=n.symbol,a=Ur(i),o=a.outerTypeParameters;if(!o){var s=i.declarations[0];if(e.isInJSFile(s)){var c=e.findAncestor(s,e.isJSDocParameterTag);if(c){var u=e.getParameterSymbolFromJSDoc(c);u&&(s=u.valueDeclaration)}}var l=la(s,!0);if(lm(s)){var _=Xo(s);l=e.addRange(l,_)}o=l||e.emptyArray,o=2048&i.flags&&!n.aliasTypeArguments?e.filter(o,function(e){return Lu(e,s)}):o,a.outerTypeParameters=o,o.length&&(a.instantiations=e.createMap(),a.instantiations.set(Ps(o),n))}if(o.length){var d=64&t.objectFlags?Nu(t.mapper,r):r,p=e.map(o,d),f=Ps(p),m=a.instantiations.get(f);if(!m){var g=Eu(o,p);m=32&n.objectFlags?function(t,r){var n=Ru(t);if(n){var i=Ku(n,r);if(n!==i)return Td(i,function(i){if(61603843&i.flags&&i!==le&&i!==_e){var a=Au(n,i,r);return Jl(i)?function(e,t,r){var n=ju(t,he,!0,r);return n===_e?_e:hc(n,Bu(zl(e),yo(t)))}(i,t,a):e_(i)?function(t,r,n){var i=t.target.minLength,a=e.map(t.typeArguments||e.emptyArray,function(e,t){return ju(r,hu(""+t),t>=i,n)}),o=yo(r),s=4&o?0:8&o?Ms(t)-(t.target.hasRestElement?1:0):i,c=Bu(t.target.readonly,o);return e.contains(a,_e)?_e:Dc(a,s,t.target.hasRestElement,c,t.target.associatedNames)}(i,t,a):Ju(t,a)}return i})}return Ju(t,r)}(n,g):Ju(n,g),a.instantiations.set(f,m)}return m}return t}function Lu(t,r){if(t.symbol&&t.symbol.declarations&&1===t.symbol.declarations.length){var n=t.symbol.declarations[0].parent;if(e.findAncestor(r,function(e){return 218===e.kind?"quit":e===n}))return!!e.forEachChild(r,function r(n){switch(n.kind){case 178:return!!t.isThisType;case 72:return!t.isThisType&&e.isPartOfTypeNode(n)&&function(e){return!(148===e.kind||164===e.parent.kind&&e.parent.typeArguments&&e===e.parent.typeName)}(n)&&Du(n)===t;case 167:return!0}return!!e.forEachChild(n,r)})}return!0}function Ru(e){var t=_o(e);if(4194304&t.flags){var r=Zc(t.type);if(262144&r.flags)return r}}function Bu(e,t){return!!(1&t)||!(2&t)&&e}function ju(e,t,r,n){var i=Nu(n,Eu([lo(e)],[t])),a=Ku(po(e.target||e),i),o=yo(e);return O&&4&o&&!rl(pe,a)?u_(a):O&&8&o&&r?ad(a,524288):a}function Ju(e,t){var r=Vn(64|e.objectFlags,e.symbol);if(32&e.objectFlags){r.declaration=e.declaration;var n=lo(e),i=wu(n);r.typeParameter=i,t=Nu(Cu(n,i),t),i.mapper=t}return r.target=e,r.mapper=t,r.aliasSymbol=e.aliasSymbol,r.aliasTypeArguments=Su(e.aliasTypeArguments,t),r}function zu(t,r){var n=t.root;if(n.outerTypeParameters){var i=e.map(n.outerTypeParameters,r),a=Ps(i),o=n.instantiations.get(a);return o||(o=function(e,t){if(e.isDistributive){var r=e.checkType,n=t(r);if(r!==n&&1179648&n.flags)return Td(n,function(n){return tu(e,Au(r,n,t))})}return tu(e,t)}(n,Eu(n.outerTypeParameters,i)),n.instantiations.set(a,o)),o}return t}function Ku(t,r){if(!t||!r||r===A)return t;if(50===E)return Pr(h,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),_e;E++;var n=function(e,t){var r=e.flags;if(262144&r)return t(e);if(524288&r){var n=e.objectFlags;if(16&n)return e.symbol&&14384&e.symbol.flags&&e.symbol.declarations?Mu(e,t):e;if(32&n)return Mu(e,t);if(4&n){var i=e.typeArguments,a=Su(i,t);return a!==i?Is(e.target,a):e}return e}if(1048576&r&&!(131068&r)){var o=e.types,s=Su(o,t);return s!==o?Ac(s,1,e.aliasSymbol,Su(e.aliasTypeArguments,t)):e}if(2097152&r){var o=e.types,s=Su(o,t);return s!==o?Mc(s,e.aliasSymbol,Su(e.aliasTypeArguments,t)):e}if(4194304&r)return Jc(Ku(e.type,t));if(8388608&r)return Xc(Ku(e.objectType,t),Ku(e.indexType,t));if(16777216&r)return zu(e,Nu(e.mapper,t));if(33554432&r){var c=Ku(e.typeVariable,t);if(8650752&c.flags)return Us(c,Ku(e.substitute,t));var u=Ku(e.substitute,t);return 3&u.flags||tl(Vu(c),Vu(u))?c:u}return e}(t,r);return E--,n}function Uu(e){return 262143&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=Ku(e,Fu))}function Vu(e){return 262143&e.flags?e:e.restrictiveInstantiation?e.restrictiveInstantiation:(e.restrictiveInstantiation=Ku(e,Pu),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation,e.restrictiveInstantiation)}function qu(e,t){return e&&Es(Ku(e.type,t),e.isReadonly,e.declaration)}function Wu(t){switch(e.Debug.assert(156!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 196:case 197:case 156:return Hu(t);case 188:return e.some(t.properties,Wu);case 187:return e.some(t.elements,Wu);case 205:return Wu(t.whenTrue)||Wu(t.whenFalse);case 204:return 55===t.operatorToken.kind&&(Wu(t.left)||Wu(t.right));case 275:return Wu(t.initializer);case 195:return Wu(t.expression);case 268:return e.some(t.properties,Wu)||e.isJsxOpeningElement(t.parent)&&e.some(t.parent.parent.children,Wu);case 267:var r=t.initializer;return!!r&&Wu(r);case 270:var n=t.expression;return!!n&&Wu(n)}return!1}function Hu(t){if(t.typeParameters)return!1;if(e.some(t.parameters,function(t){return!e.getEffectiveTypeAnnotationNode(t)}))return!0;if(197!==t.kind){var r=e.firstOrUndefined(t.parameters);if(!r||!e.parameterIsThisKeyword(r))return!0}return Gu(t)}function Gu(e){return!!e.body&&218!==e.body.kind&&Wu(e.body)}function Yu(t){return(e.isInJSFile(t)&&e.isFunctionDeclaration(t)||kp(t)||e.isObjectLiteralMethod(t))&&Hu(t)}function Xu(t){if(524288&t.flags){var r=Do(t);if(r.constructSignatures.length||r.callSignatures.length){var n=Vn(16,t.symbol);return n.members=r.members,n.properties=r.properties,n.callSignatures=e.emptyArray,n.constructSignatures=e.emptyArray,n}}else if(2097152&t.flags)return Mc(e.map(t.types,Xu));return t}function Qu(e,t){return Dl(e,t,Er)}function $u(e,t){return Dl(e,t,Er)?-1:0}function Zu(e,t){return Dl(e,t,Tr)?-1:0}function el(e,t){return Dl(e,t,Sr)?-1:0}function tl(e,t){return Dl(e,t,Sr)}function rl(e,t){return Dl(e,t,Tr)}function nl(t,r){return 1048576&t.flags?e.every(t.types,function(e){return nl(e,r)}):1048576&r.flags?e.some(r.types,function(e){return nl(t,e)}):58982400&t.flags?nl(Po(t)||Oe,r):r===Ge?!!(67633152&t.flags):r===Ye?!!(524288&t.flags)&&nd(t):ca(t,sa(r))}function il(e,t){return Dl(e,t,Cr)}function al(e,t){return il(e,t)||il(t,e)}function ol(e,t,r,n,i,a){return Sl(e,t,Tr,r,n,i,a)}function sl(e,t,r,n,i,a){return cl(e,t,Tr,r,n,i,a)}function cl(e,t,r,n,i,a,o){return!!Dl(e,t,r)||(!n||!ll(i,e,t,r,a))&&Sl(e,t,r,n,a,o)}function ul(t){return!!(16777216&t.flags||2097152&t.flags&&e.some(t.types,ul))}function ll(t,r,n,o,s){if(!t||ul(n))return!1;if(!Sl(r,n,o,void 0)&&function(t,r,n,i,a){for(var o=Vo(r,0),s=Vo(r,1),c=0,u=[s,o];c<u.length;c++){var l=u[c];if(e.some(l,function(e){var t=ps(e);return!(131073&t.flags)&&Sl(t,n,i,void 0)})){var _={};ol(r,n,t,a,void 0,_);var d=_.error;return e.addRelatedInfo(d,e.createDiagnosticForNode(t,l===s?e.Diagnostics.Did_you_mean_to_use_new_with_this_expression:e.Diagnostics.Did_you_mean_to_call_this_expression)),!0}}return!1}(t,r,n,o,s))return!0;switch(t.kind){case 270:case 195:return ll(t.expression,r,n,o,s);case 204:switch(t.operatorToken.kind){case 59:case 27:return ll(t.right,r,n,o,s)}break;case 188:return function(t,r,n,i){return _l(function(t){var r,n,i,o;return a(this,function(a){switch(a.label){case 0:if(!e.length(t.properties))return[2];r=0,n=t.properties,a.label=1;case 1:if(!(r<n.length))return[3,8];if(i=n[r],e.isSpreadAssignment(i))return[3,7];if(!(o=Bc(In(i),8576))||131072&o.flags)return[3,7];switch(i.kind){case 159:case 158:case 156:case 276:return[3,2];case 275:return[3,4]}return[3,6];case 2:return[4,{errorNode:i.name,innerExpression:void 0,nameType:o}];case 3:return a.sent(),[3,7];case 4:return[4,{errorNode:i.name,innerExpression:i.initializer,nameType:o,errorMessage:Ni(i.name)?e.Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0}];case 5:return a.sent(),[3,7];case 6:e.Debug.assertNever(i),a.label=7;case 7:return r++,[3,1];case 8:return[2]}})}(t),r,n,i)}(t,r,n,o);case 187:return function(e,t,r,n){if(ql(t))return _l(pl(e,r),t,r,n);var i=wp(e,1,!0);return!!ql(i)&&_l(pl(e,r),i,r,n)}(t,r,n,o);case 268:return function(t,r,n,o){var s,c=_l(function(t){var r,n,i;return a(this,function(a){switch(a.label){case 0:if(!e.length(t.properties))return[2];r=0,n=t.properties,a.label=1;case 1:return r<n.length?(i=n[r],e.isJsxSpreadAttribute(i)?[3,3]:[4,{errorNode:i.name,innerExpression:i.initializer,nameType:hu(e.idText(i.name))}]):[3,4];case 2:a.sent(),a.label=3;case 3:return r++,[3,1];case 4:return[2]}})}(t),r,n,o);if(e.isJsxOpeningElement(t.parent)&&e.isJsxElement(t.parent.parent)){var u=t.parent.parent,l=Qp(Yp(t)),_=void 0===l?"children":e.unescapeLeadingUnderscores(l),d=hu(_),p=Xc(n,d),f=e.filter(u.children,function(t){return!e.isJsxText(t)||!t.containsOnlyTriviaWhiteSpaces});if(!e.length(f))return c;var m=e.length(f)>1,g=Sd(p,Wl),y=Sd(p,function(e){return!Wl(e)});if(m)if(g!==ke){var h=Dc(qp(u,0));c=_l(function(t,r){var n,i,o,s,c;return a(this,function(a){switch(a.label){case 0:if(!e.length(t.children))return[2];n=0,i=0,a.label=1;case 1:return i<t.children.length?(o=t.children[i],s=hu(i-n),(c=dl(o,s,r))?[4,c]:[3,3]):[3,5];case 2:return a.sent(),[3,4];case 3:n++,a.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(u,D),h,g,o)||c}else Dl(Xc(r,d),p,o)||(c=!0,Pr(u.openingElement.tagName,e.Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,_,li(p)));else if(y!==ke){var v=f[0],b=dl(v,d,D);b&&(c=_l(function(){return a(this,function(e){switch(e.label){case 0:return[4,b];case 1:return e.sent(),[2]}})}(),r,n,o)||c)}else Dl(Xc(r,d),p,o)||(c=!0,Pr(u.openingElement.tagName,e.Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,_,li(p)))}return c;function D(){if(!s){var r=e.getTextOfNode(t.parent.tagName),a=Qp(Yp(t)),o=void 0===a?"children":e.unescapeLeadingUnderscores(a),c=Xc(n,hu(o)),u=e.Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;s=i({},u,{key:"!!ALREADY FORMATTED!!",message:e.formatMessage(void 0,u,r,o,li(c))})}return s}}(t,r,n,o);case 197:return function(t,r,n,i){if(e.isBlock(t.body))return!1;if(e.some(t.parameters,e.hasType))return!1;var a=Rf(r);if(!a)return!1;var o=Vo(n,0);if(!e.length(o))return!1;var s=t.body,c=ps(a),u=Ac(e.map(o,ps));if(!Sl(c,u,i,void 0)){var l=s&&ll(s,c,u,i,void 0);if(l)return l;var _={};if(Sl(c,u,i,s,void 0,void 0,_),_.error)return n.symbol&&e.length(n.symbol.declarations)&&e.addRelatedInfo(_.error,e.createDiagnosticForNode(n.symbol.declarations[0],e.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)),!0}return!1}(t,r,n,o)}return!1}function _l(t,r,n,i){for(var a=!1,o=t.next();!o.done;o=t.next()){var s=o.value,c=s.errorNode,u=s.innerExpression,l=s.nameType,_=s.errorMessage,d=Xc(n,l,void 0,_e);if(!(d===_e||8388608&d.flags)){var p=Xc(r,l,void 0,_e);if(p!==_e&&d!==_e&&!Sl(p,d,i,void 0))if(u&&ll(u,p,d,i,void 0))a=!0;else{var f={},m=u?yg(u,0,p):p;if(Sl(m,d,i,c,_,void 0,f)&&m!==p&&Sl(p,d,i,c,_,void 0,f),f.error){var g=f.error,y=Ra(l)?Ka(l):void 0,h=void 0!==y?Ko(n,y):void 0,v=!1;if(!h){var b=eg(l,296)&&Ho(n,1)||Ho(n,0)||void 0;b&&b.declaration&&!e.getSourceFileOfNode(b.declaration).hasNoDefaultLib&&(v=!0,e.addRelatedInfo(g,e.createDiagnosticForNode(b.declaration,e.Diagnostics.The_expected_type_comes_from_this_index_signature)))}if(!v&&(h&&e.length(h.declarations)||n.symbol&&e.length(n.symbol.declarations))){var D=h&&e.length(h.declarations)?h.declarations[0]:n.symbol.declarations[0];e.getSourceFileOfNode(D).hasNoDefaultLib||e.addRelatedInfo(g,e.createDiagnosticForNode(D,e.Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!y||8192&l.flags?li(l):e.unescapeLeadingUnderscores(y),li(n)))}}a=!0}}}return a}function dl(t,r,n){switch(t.kind){case 270:return{errorNode:t,innerExpression:t.expression,nameType:r};case 11:if(t.containsOnlyTriviaWhiteSpaces)break;return{errorNode:t,innerExpression:void 0,nameType:r,errorMessage:n()};case 260:case 261:case 264:return{errorNode:t,innerExpression:t,nameType:r};default:return e.Debug.assertNever(t,"Found invalid jsx child")}}function pl(t,r){var n,i,o,s;return a(this,function(a){switch(a.label){case 0:if(!(n=e.length(t.elements)))return[2];i=0,a.label=1;case 1:return i<n?ql(r)&&!Ko(r,""+i)?[3,3]:(o=t.elements[i],e.isOmittedExpression(o)?[3,3]:(s=hu(i),[4,{errorNode:o,innerExpression:o,nameType:s}])):[3,4];case 2:a.sent(),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})}function fl(e,t,r,n,i){return Sl(e,t,Cr,r,n,i)}function ml(t,r,n,i,a,o,s){if(t===r)return-1;if(!(c=r).typeParameters&&(!c.thisParameter||Ei(Dm(c.thisParameter)))&&1===c.parameters.length&&c.hasRestParameter&&(Dm(c.parameters[0])===at||Ei(Dm(c.parameters[0])))&&Ei(ps(c)))return-1;var c,u=Em(r);if(!Nm(r)&&km(t)>u)return 0;t.typeParameters&&t.typeParameters!==r.typeParameters&&(t=Bf(t,r=Ds(r),void 0,s));var l=Em(t),_=Fm(t),d=Fm(r);if(_&&d&&l!==u)return 0;var p=r.declaration?r.declaration.kind:0,f=!n&&M&&156!==p&&155!==p&&157!==p,m=-1,g=ls(t);if(g&&g!==Ee){var y=ls(r);if(y){if(!(D=!f&&s(g,y,!1)||s(y,g,a)))return a&&o(e.Diagnostics.The_this_types_of_each_signature_are_incompatible),0;m&=D}}for(var h=_||d?Math.min(l,u):Math.max(l,u),v=_||d?h-1:-1,b=0;b<h;b++){var D,x=b===v?Cm(t,b):Sm(t,b),S=b===v?Cm(r,b):Sm(r,b),T=n?void 0:Rf(l_(x)),C=n?void 0:Rf(l_(S));if(!(D=T&&C&&!_s(T)&&!_s(C)&&(98304&a_(x))==(98304&a_(S))?ml(C,T,f?2:1,!1,a,o,s):!n&&!f&&s(x,S,!1)||s(S,x,a)))return a&&o(e.Diagnostics.Types_of_parameters_0_and_1_are_incompatible,e.unescapeLeadingUnderscores(xm(t,b)),e.unescapeLeadingUnderscores(xm(r,b))),0;m&=D}if(!i){var E=r.declaration&&lm(r.declaration)?dm(r.declaration.symbol):ps(r);if(E===Ee)return m;var k=t.declaration&&lm(t.declaration)?dm(t.declaration.symbol):ps(t),N=ds(r);if(N){var A=ds(t);if(A)m&=function(t,r,n,i,a){if(t.kind!==r.kind)return n&&(i(e.Diagnostics.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,di(t),di(r))),0;if(1===t.kind&&t.parameterIndex!==r.parameterIndex)return n&&(i(e.Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1,t.parameterName,r.parameterName),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,di(t),di(r))),0;var o=a(t.type,r.type,n);return 0===o&&n&&i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,di(t),di(r)),o}(A,N,a,o,s);else if(e.isIdentifierTypePredicate(N))return a&&o(e.Diagnostics.Signature_0_must_be_a_type_predicate,ui(t)),0}else m&=1===n&&s(E,k,!1)||s(k,E,a)}return m}function gl(e,t){var r=bs(e),n=bs(t),i=ps(r),a=ps(n);return!(a!==Ee&&!Dl(a,i,Tr)&&!Dl(i,a,Tr))&&0!==ml(r,n,0,!0,!1,void 0,Zu)}function yl(t){return 524288&t.flags?!bo(t)&&0===(r=Do(t)).properties.length&&0===r.callSignatures.length&&0===r.constructSignatures.length&&!r.stringIndexInfo&&!r.numberIndexInfo:!!(67108864&t.flags)||(1048576&t.flags?e.some(t.types,yl):!!(2097152&t.flags)&&e.every(t.types,yl));var r}function hl(t){return!!(16&e.getObjectFlags(t))&&yl(t)}function vl(t,r,n){if(t===r)return!0;var i=l(t)+","+l(r),a=kr.get(i);if(void 0!==a&&(2!==a||!n))return 1===a;if(!(t.escapedName===r.escapedName&&256&t.flags&&256&r.flags))return kr.set(i,3),!1;for(var o=aa(r),s=0,c=Co(aa(t));s<c.length;s++){var u=c[s];if(8&u.flags){var _=Ko(o,u.escapedName);if(!(_&&8&_.flags))return n?(n(e.Diagnostics.Property_0_is_missing_in_type_1,e.symbolName(u),li(Na(r),void 0,64)),kr.set(i,3)):kr.set(i,2),!1}}return kr.set(i,1),!0}function bl(e,t,r,n){var i=e.flags,a=t.flags;if(3&a||131072&i||e===le)return!0;if(131072&a)return!1;if(132&i&&4&a)return!0;if(128&i&&1024&i&&128&a&&!(1024&a)&&e.value===t.value)return!0;if(296&i&&8&a)return!0;if(256&i&&1024&i&&256&a&&!(1024&a)&&e.value===t.value)return!0;if(2112&i&&64&a)return!0;if(528&i&&16&a)return!0;if(12288&i&&4096&a)return!0;if(32&i&&32&a&&vl(e.symbol,t.symbol,n))return!0;if(1024&i&&1024&a){if(1048576&i&&1048576&a&&vl(e.symbol,t.symbol,n))return!0;if(2944&i&&2944&a&&e.value===t.value&&vl(On(e.symbol),On(t.symbol),n))return!0}if(32768&i&&(!O||49152&a))return!0;if(65536&i&&(!O||65536&a))return!0;if(524288&i&&67108864&a)return!0;if(r===Tr||r===Cr){if(1&i)return!0;if(264&i&&!(1024&i)&&(32&a||256&a&&1024&a))return!0}return!1}function Dl(e,t,r){if(yu(e)&&(e=e.regularType),yu(t)&&(t=t.regularType),e===t||r===Cr&&!(131072&t.flags)&&bl(t,e,r)||r!==Er&&bl(e,t,r))return!0;if(524288&e.flags&&524288&t.flags){var n=r.get(wl(e,t,r));if(void 0!==n)return 1===n}return!!(66846720&e.flags||66846720&t.flags)&&Sl(e,t,r,void 0)}function xl(t,r,n){return 4096&e.getObjectFlags(t)&&!(Kp(r.escapedName)||n)}function Sl(r,n,i,a,o,s,c){var u,l,_,d,p,m=0,g=0,y=0,h=!1,v=!1;e.Debug.assert(i!==Er||!a,"no error reporting in identity checking");var b=N(r,n,!!a,o);if(h)Pr(a,e.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1,li(r),li(n));else if(u){if(s){var D=s();D&&(u=e.concatenateDiagnosticMessageChains(D,u))}var x=void 0;if(o&&a&&!b&&r.symbol){var S=Ur(r.symbol);if(S.originatingImport&&!e.isImportCall(S.originatingImport)&&Sl(aa(S.target),n,i,void 0)){var T=e.createDiagnosticForNode(S.originatingImport,e.Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead);x=e.append(x,T)}}var C=e.createDiagnosticForNodeFromMessageChain(a,u,x);l&&e.addRelatedInfo.apply(void 0,[C].concat(l)),c&&(c.error=C),cr.add(C)}return 0!==b;function E(t,r,n,i,o){e.Debug.assert(!!a),u=e.chainDiagnosticMessages(u,t,r,n,i,o)}function k(t,r,n){var a=li(r),o=li(n);a===o&&(a=li(r,void 0,64),o=li(n,void 0,64)),t||(t=i===Cr?e.Diagnostics.Type_0_is_not_comparable_to_type_1:a===o?e.Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:e.Diagnostics.Type_0_is_not_assignable_to_type_1),E(t,a,o)}function N(r,n,o,s,c){if(void 0===o&&(o=!1),yu(r)&&(r=r.regularType),yu(n)&&(n=n.regularType),33554432&r.flags&&(r=r.substitute),33554432&n.flags&&(n=n.typeVariable),8388608&r.flags&&(r=Hc(r)),8388608&n.flags&&(n=Hc(n)),1048576&n.flags&&524288&r.flags&&n.types.length<=3&&Zm(n,98304)){var l=Cd(n,-98305);1179648&l.flags||(n=l)}if(r===n)return-1;if(i===Er)return function(e,t){var r,n=e.flags&t.flags;return 524288&n||8388608&n||16777216&n||4194304&n||33554432&n?O(e,t,!1,!1):3145728&n&&(r=A(e,t))&&(r&=A(t,e))?r:0}(r,n);if(i===Cr&&!(131072&n.flags)&&bl(n,r,i)||bl(r,n,i,o?E:void 0))return-1;var _=!!(4096&e.getObjectFlags(r));if(z_(r)&&32768&e.getObjectFlags(r)){var d=1048576&n.flags?w(r,n):void 0;if(function t(r,n,o,s){if(!B&&16384&e.getObjectFlags(n))return!1;if(of(n)){var c=!!(4096&e.getObjectFlags(r));if((i===Tr||i===Cr)&&(bd(Ge,n)||!c&&yl(n)))return!1;if(o)return t(r,o,void 0,s);for(var u=function(t){if(function(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}(t,r.symbol)&&!af(n,t.escapedName,c)){if(s){var i=Sd(n,of);if(!a)return{value:e.Debug.fail()};if(e.isJsxAttributes(a)||e.isJsxOpeningLikeElement(a)||e.isJsxOpeningLikeElement(a.parent))E(e.Diagnostics.Property_0_does_not_exist_on_type_1,ci(t),li(i));else{var o=r.symbol&&e.firstOrUndefined(r.symbol.declarations),u=void 0;if(t.valueDeclaration&&e.findAncestor(t.valueDeclaration,function(e){return e===o})){var l=t.valueDeclaration;e.Debug.assertNode(l,e.isObjectLiteralElementLike),a=l;var _=l.name;e.isIdentifier(_)&&(u=bf(_,i))}void 0!==u?E(e.Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,ci(t),li(i),u):E(e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,ci(t),li(i))}}return{value:!0}}},l=0,_=xo(r);l<_.length;l++){var d=_[l],p=u(d);if("object"===f(p))return p.value}}return!1}(r,n,d,o))return o&&k(s,r,n),0;(function(e){if(!(3145728&e.flags))return!1;for(var t=!1,r=0,n=e.types;r<n.length;r++)if(!(98304&n[r].flags)){if(t)return!0;t=!0}return!1})(n)&&!d&&(r=p_(r))}if(i!==Cr&&!c&&2752508&r.flags&&r!==Ge&&2621440&n.flags&&Cl(n)&&(Co(r).length>0||Mh(r))&&!function(e,t,r){for(var n=0,i=Co(e);n<i.length;n++){var a=i[n];if(af(t,a.escapedName,r))return!0}return!1}(r,n,_)){if(o){var p=Vo(r,0),m=Vo(r,1);p.length>0&&N(ps(p[0]),n,!1)||m.length>0&&N(ps(m[0]),n,!1)?E(e.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,li(r),li(n)):E(e.Diagnostics.Type_0_has_no_properties_in_common_with_type_1,li(r),li(n))}return 0}var g=0,y=u,h=!!c;if(1048576&r.flags?g=i===Cr?I(r,n,o&&!(131068&r.flags)):function(e,t,r){for(var n=-1,i=0,a=e.types;i<a.length;i++){var o=a[i],s=N(o,t,r);if(!s)return 0;n&=s}return n}(r,n,o&&!(131068&r.flags)):(1048576&n.flags?g=P(r,n,o&&!(131068&r.flags)&&!(131068&n.flags)):2097152&n.flags?(h=!0,g=function(e,t,r){for(var n=-1,i=0,a=t.types;i<a.length;i++){var o=a[i],s=N(e,o,r,void 0,!0);if(!s)return 0;n&=s}return n}(r,n,o)):2097152&r.flags&&(g=I(r,n,!1)),!g&&(66846720&r.flags||66846720&n.flags)&&(g=O(r,n,o,h))&&(u=y)),!g&&2097152&r.flags){var b=function(t,r){for(var n,i=!1,a=0,o=t.types;a<o.length;a++)if(63176704&(l=o[a]).flags){for(var s=Eo(l);s&&21233664&s.flags;)s=Eo(s);if(s){if(!(1048576&s.flags))return;n=e.append(n,s)}}else 67238908&l.flags&&(i=!0);if(n&&(r||i)){if(i)for(var c=0,u=t.types;c<u.length;c++){var l;67238908&(l=u[c]).flags&&(n=e.append(n,l))}return Mc(n)}}(r,!!(1048576&n.flags));b&&(g=N(b,n,o,void 0,h))&&(u=y)}if(!g&&o){var D=v;if(v=!1,524288&r.flags&&131068&n.flags)!function(t,r){var n=li(t),i=li(r);(et===t&&ye===r||tt===t&&he===r||rt===t&&Te===r||nc(!1)===t&&Ce===r)&&E(e.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,i,n)}(r,n);else if(r.symbol&&524288&r.flags&&Ge===r)E(e.Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(_&&2097152&n.flags){var x=n.types,S=Hp(t.IntrinsicAttributes,a),T=Hp(t.IntrinsicClassAttributes,a);if(S!==_e&&T!==_e&&(e.contains(x,S)||e.contains(x,T)))return g}if(!s&&D)return g;k(s,r,n)}return g}function A(e,t){for(var r=-1,n=0,i=e.types;n<i.length;n++){var a=P(i[n],t,!1);if(!a)return 0;r&=a}return r}function P(t,r,n){var i=r.types;if(1048576&r.flags&&Tc(i,t))return-1;for(var a=0,o=i;a<o.length;a++){var s=N(t,o[a],!1);if(s)return s}return n&&N(t,w(t,r)||function(t,r){var n=e.getObjectFlags(t);if(20&n&&1048576&r.flags)return e.find(r.types,function(r){if(524288&r.flags){var i=n&e.getObjectFlags(r);if(4&i)return t.target===r.target;if(16&i)return!!t.aliasSymbol&&t.aliasSymbol===r.aliasSymbol}return!1})}(t,r)||function(t,r){if(128&e.getObjectFlags(t)&&Dd(r,Ul))return e.find(r.types,function(e){return!Ul(e)})}(t,r)||function(t,r){var n=0;if(Vo(t,n).length>0||Vo(t,n=1).length>0)return e.find(r.types,function(e){return Vo(e,n).length>0})}(t,r)||function(t,r){for(var n,i=0,a=0,o=r.types;a<o.length;a++){var s=o[a],c=Mc([Jc(t),Jc(s)]);if(4194304&c.flags)n=s,i=1/0;else if(1048576&c.flags){var u=e.length(e.filter(c.types,Gl));u>=i&&(n=s,i=u)}else Gl(c)&&1>=i&&(n=s,i=1)}return n}(t,r)||i[i.length-1],!0),0}function w(t,r){if(1048576&r.flags){var n=xo(t);if(n){var i=function(e,t){for(var r,n=0,i=e;n<i.length;n++){var a=i[n];if(ed(t,a.escapedName)){if(r){r.push(a);continue}r=[a]}}return r}(n,r);if(i)return Tl(r,e.map(i,function(e){return[function(){return aa(e)},e.escapedName]}),N)}}}function I(e,t,r){var n=e.types;if(1048576&e.flags&&Tc(n,t))return-1;for(var i=n.length,a=0;a<i;a++){var o=N(n[a],t,r&&a===i-1);if(o)return o}return 0}function O(t,r,n,a){if(h)return 0;var s=wl(t,r,i),c=i.get(s);if(void 0!==c&&(!n||2!==c))return 1===c?-1:0;if(_){for(var f=0;f<m;f++)if(s===_[f])return 1;if(100===g)return h=!0,0}else _=[],d=[],p=[];var b=m;_[m]=s,m++,d[g]=t,p[g]=r,g++;var D=y;1&y||!Ll(t,d,g)||(y|=1),2&y||!Ll(r,p,g)||(y|=2);var x=3!==y?function(t,r,n,a){var s,c,_=t.flags&r.flags;if(i===Er&&!(524288&_)){if(4194304&_)return N(t.type,r.type,!1);var d=0;return 8388608&_&&(d=N(t.objectType,r.objectType,!1))&&(d&=N(t.indexType,r.indexType,!1))?d:16777216&_&&t.root.isDistributive===r.root.isDistributive&&(d=N(t.checkType,r.checkType,!1))&&(d&=N(t.extendsType,r.extendsType,!1))&&(d&=N(t.trueType,r.trueType,!1))&&(d&=N(t.falseType,r.falseType,!1))?d:33554432&_?N(t.substitute,r.substitute,!1):0}var p,f,m,g=!1,y=u;if(17301504&t.flags&&t.aliasSymbol&&t.aliasTypeArguments&&t.aliasSymbol===r.aliasSymbol&&!t.aliasTypeArgumentsContainsMarker&&!r.aliasTypeArgumentsContainsMarker){var h=(p=t.aliasSymbol,kl((f=Ur(p)).typeParameters,f,function(e,t,r){var n=Rs(p,Su(f.typeParameters,Cu(t,r)));return n.aliasTypeArgumentsContainsMarker=!0,n})),b=z(t.aliasTypeArguments,r.aliasTypeArguments,h);if(void 0!==b)return b}if(262144&r.flags){if(32&e.getObjectFlags(t)&&N(Jc(r),_o(t))&&!(4&yo(t))){var D=po(t),x=Xc(r,lo(t));if(s=N(D,x,n))return s}}else if(4194304&r.flags){if(4194304&t.flags&&(s=N(r.type,t.type,!1)))return s;var S=Hc(r.type),T=S!==r.type?S:Eo(r.type);if(T&&-1===N(t,Jc(T,r.stringsOnly),n))return-1}else if(8388608&r.flags){if(!(i===Er||qc(r.objectType)&&Wc(r.indexType))){var T=Po(r);if(T&&T!==r&&(s=N(t,T,n)))return s}}else if(bo(r)){var C=po(r),k=yo(r);if(!(8&k)){if(8388608&C.flags&&C.objectType===t&&C.indexType===lo(r))return-1;if(!bo(t)){var A=_o(r),F=Jc(t),P=4&k&&1048576&A.flags,w=P?Sd(A,function(e){return!!N(e,F)}):void 0;if(P?!(131072&w.flags):N(A,F)){var I=P?w:lo(r),x=Xc(t,I),D=po(r);if(s=N(x,D,n))return s}c=u,u=y}}}if(8650752&t.flags){if(8388608&t.flags&&8388608&r.flags&&((s=N(t.objectType,r.objectType,n))&&(s&=N(t.indexType,r.indexType,n)),s))return u=y,s;var T=Eo(t);if(!T||262144&t.flags&&1&T.flags){if(s=N(Oe,Cd(r,-67108865)))return u=y,s}else{if(s=N(T,r,!1,void 0,a))return u=y,s;if(s=N(Ha(T,t),r,n,void 0,a))return u=y,s}}else if(4194304&t.flags){if(s=N(we,r,n))return u=y,s}else if(16777216&t.flags)if(16777216&r.flags){if(Qu(t.extendsType,r.extendsType)&&(N(t.checkType,r.checkType)||N(r.checkType,t.checkType))&&((s=N(t.trueType,r.trueType,n))&&(s&=N(t.falseType,r.falseType,n)),s))return u=y,s}else{var O=Ao(t);if(O&&(s=N(O,r,n)))return u=y,s;var L=No(t);if(L&&(s=N(L,r,n)))return u=y,s}else{if(i!==Sr&&(m=r,32&e.getObjectFlags(m)&&4&yo(m))&&yl(t))return-1;if(bo(r))return bo(t)&&(s=function(e,t,r){var n;if((i===Cr||(i===Er?yo(e)===yo(t):vo(e)<=vo(t)))&&(n=N(_o(t),_o(e),r))){var a=Eu([lo(e)],[lo(t)]);return n&N(Ku(po(e),a),po(t),r)}return 0}(t,r,n))?(u=y,s):0;var R=!!(131068&t.flags);if(i!==Er&&(t=Bo(t)),4&e.getObjectFlags(t)&&4&e.getObjectFlags(r)&&t.target===r.target&&!(8192&e.getObjectFlags(t)||8192&e.getObjectFlags(r))){var h=Nl(t.target),b=z(t.typeArguments,r.typeArguments,h);if(void 0!==b)return b}else{if(zl(r)?Jl(t)||e_(t):Jl(r)&&e_(t)&&!t.target.readonly)return N(Go(t,1)||ce,Go(r,1)||ce,n);if(i===Sr&&yl(r)&&32768&e.getObjectFlags(r)&&!yl(t))return 0}if(2621440&t.flags&&524288&r.flags){var B=n&&u===y&&!R;if((s=function(t,r,n){if(i===Er)return function(e,t){if(!(524288&e.flags&&524288&t.flags))return 0;var r=xo(e),n=xo(t);if(r.length!==n.length)return 0;for(var i=-1,a=0,o=r;a<o.length;a++){var s=o[a],c=So(t,s.escapedName);if(!c)return 0;var u=Rl(s,c,N);if(!u)return 0;i&=u}return i}(t,r);var a,s=i===Sr&&!z_(t)&&!Vl(t)&&!e_(t),c=M_(t,r,s,!1);if(c){if(n){var _=e.arrayFrom(O_(t,r,s,!1));if((!o||o.code!==e.Diagnostics.Class_0_incorrectly_implements_interface_1.code&&o.code!==e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(v=!0),1===_.length){var d=ci(c);E(e.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2,d,li(t),li(r)),e.length(c.declarations)&&(a=e.createDiagnosticForNode(c.declarations[0],e.Diagnostics._0_is_declared_here,d),e.Debug.assert(!!u),l?l.push(a):l=[a])}else _.length>5?E(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,li(t),li(r),e.map(_.slice(0,4),function(e){return ci(e)}).join(", "),_.length-4):E(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,li(t),li(r),e.map(_,function(e){return ci(e)}).join(", "))}return 0}if(z_(r))for(var p=0,f=Co(t);p<f.length;p++){var m=f[p];if(!So(r,m.escapedName)){var g=aa(m);if(g!==pe&&g!==fe)return n&&E(e.Diagnostics.Property_0_does_not_exist_on_type_1,ci(m),li(r)),0}}var y=-1;if(e_(r)){var h=t_(r);if(h){if(!e_(t))return 0;var b=t_(t);if(b&&!N(b,h,n))return n&&E(e.Diagnostics.Rest_signatures_are_incompatible),0;for(var D=Ms(r)-1,x=Ms(t)-(b?1:0),S=D;S<x;S++){var T=N(t.typeArguments[S],h,n);if(!T)return n&&E(e.Diagnostics.Property_0_is_incompatible_with_rest_element_type,""+S),0;y&=T}}}for(var C=0,k=xo(r);C<k.length;C++){var A=k[C];if(!(4194304&A.flags)){var m=Ko(t,A.escapedName);if(m&&m!==A){if(xl(t,m,aa(A)))continue;var F=e.getDeclarationModifierFlagsFromSymbol(m),P=e.getDeclarationModifierFlagsFromSymbol(A);if(8&F||8&P){var w=m.valueDeclaration!==A.valueDeclaration;if(512&e.getCheckFlags(m)&&w)return n&&E(e.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1,ci(m),li(t)),0;if(w)return n&&(8&F&&8&P?E(e.Diagnostics.Types_have_separate_declarations_of_a_private_property_0,ci(A)):E(e.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2,ci(A),li(8&F?t:r),li(8&F?r:t))),0}else if(16&P){if(!Ml(m,A))return n&&E(e.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,ci(A),li(Ol(m)||t),li(Ol(A)||r)),0}else if(16&F)return n&&E(e.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2,ci(A),li(t),li(r)),0;var T=N(aa(m),aa(A),n);if(!T)return n&&E(e.Diagnostics.Types_of_property_0_are_incompatible,ci(A)),0;if(y&=T,i!==Cr&&16777216&m.flags&&!(16777216&A.flags))return n&&E(e.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2,ci(A),li(t),li(r)),0}}}return y}(t,r,B))&&(s&=M(t,r,0,B))&&(s&=M(t,r,1,B))&&(s&=j(t,r,0,R,B))&&(s&=j(t,r,1,R,B)),g&&s)u=c||u||y;else if(s)return s}}return 0;function J(e){return i===Er?-1===N(e,Uu(e)):Qu(e,Uu(e))}function z(a,o,l){if(s=function(t,r,n,a){if(void 0===t&&(t=e.emptyArray),void 0===r&&(r=e.emptyArray),void 0===n&&(n=e.emptyArray),t.length!==r.length&&i===Er)return 0;for(var o=t.length<=r.length?t.length:r.length,s=-1,c=0;c<o;c++){var u=c<n.length?n[c]:1;if(4!==u){var l=t[c],_=r[c],d=-1;if(1===u?d=N(l,_,a):2===u?d=N(_,l,a):3===u?(d=N(_,l,!1))||(d=N(l,_,a)):(d=N(l,_,a))&&(d&=N(_,l,a)),!d)return 0;s&=d}}return s}(a,o,l,n))return s;var _=o&&function(e,t){for(var r=0;r<t.length;r++)if(1===t[r]&&16384&e[r].flags)return!0;return!1}(o,l)||J(t)||J(r);if(g=!_,l!==e.emptyArray&&!_){if(g&&(!n||!e.some(l,function(e){return 0===e})))return 0;c=u,u=y}}}(t,r,n,a):1;if(y=D,g--,x){if(-1===x||0===g){for(f=b;f<m;f++)i.set(_[f],1);m=b}}else i.set(s,n?3:2),m=b;return x}function M(t,r,n,a){if(i===Er)return function(e,t,r){var n=Vo(e,r),i=Vo(t,r);if(n.length!==i.length)return 0;for(var a=-1,o=0;o<n.length;o++){var s=Bl(n[o],i[o],!1,!1,!1,N);if(!s)return 0;a&=s}return a}(t,r,n);if(r===je||t===je)return-1;var o=t.symbol&&lm(t.symbol.valueDeclaration),s=r.symbol&&lm(r.symbol.valueDeclaration),c=Vo(t,o&&1===n?0:n),l=Vo(r,s&&1===n?0:n);if(1===n&&c.length&&l.length){if(e.isAbstractConstructorType(t)&&!e.isAbstractConstructorType(r))return a&&E(e.Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type),0;if(!function(t,r,n){if(!t.declaration||!r.declaration)return!0;var i=e.getSelectedModifierFlags(t.declaration,24),a=e.getSelectedModifierFlags(r.declaration,24);return 8===a||(16===a&&8!==i||(16!==a&&!i||(n&&E(e.Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type,pi(i),pi(a)),!1)))}(c[0],l[0],a))return 0}var _=-1,d=u;if(64&e.getObjectFlags(t)&&64&e.getObjectFlags(r)&&t.symbol===r.symbol)for(var p=0;p<l.length;p++){if(!(D=L(c[p],l[p],!0,a)))return 0;_&=D}else if(1===c.length&&1===l.length){var f=i===Cr||!!F.noStrictGenericChecks;_=L(c[0],l[0],f,a)}else e:for(var m=0,g=l;m<g.length;m++){for(var y=g[m],h=a,v=0,b=c;v<b.length;v++){var D;if(D=L(b[v],y,!0,h)){_&=D,u=d;continue e}h=!1}return h&&E(e.Diagnostics.Type_0_provides_no_match_for_the_signature_1,li(t),ui(y,void 0,void 0,n)),0}return _}function L(e,t,r,n){return ml(r?bs(e):e,r?bs(t):t,0,!1,n,E,N)}function R(t,r,n){var i=N(t.type,r.type,n);return!i&&n&&E(e.Diagnostics.Index_signatures_are_incompatible),i}function j(t,r,n,a,o){if(i===Er)return function(e,t,r){var n=Ho(t,r),i=Ho(e,r);return i||n?i&&n&&i.isReadonly===n.isReadonly?N(i.type,n.type):0:-1}(t,r,n);var s=Ho(r,n);if(!s||3&s.type.flags&&!a)return-1;var c=Ho(t,n)||1===n&&Ho(t,0);if(c)return R(c,s,o);if(bo(t))return 0===n&&N(po(t),s.type,o);if(__(t)){var u=-1;if(0===n){var l=Ho(t,1);l&&(u=R(l,s,o))}return u&&(u&=function(t,r,n,i){for(var a=-1,o=0,s=xo(t);o<s.length;o++){var c=s[o];if(!xl(t,c,void 0)&&!(c.nameType&&8192&c.nameType.flags)&&(0===n||Lp(c.escapedName))){var u=N(aa(c),r,i);if(!u)return i&&E(e.Diagnostics.Property_0_is_incompatible_with_index_signature,ci(c)),0;a&=u}}return a}(t,s.type,n,o)),u}return o&&E(e.Diagnostics.Index_signature_is_missing_in_type_0,li(t)),0}}function Tl(e,t,r,n){for(var i,a=0,o=t;a<o.length;a++)for(var s=o[a],c=s[0],u=s[1],l=0,_=e.types;l<_.length;l++){var d=_[l],p=Ci(d,u);if(p&&r(c(),p)){if(i){if(d===i)continue;return n}i=d}}return i||n}function Cl(t){if(524288&t.flags){var r=Do(t);return 0===r.callSignatures.length&&0===r.constructSignatures.length&&!r.stringIndexInfo&&!r.numberIndexInfo&&r.properties.length>0&&e.every(r.properties,function(e){return!!(16777216&e.flags)})}return!!(2097152&t.flags)&&e.every(t.types,Cl)}function El(t,r,n){var i=Is(t,e.map(t.typeParameters,function(e){return e===r?n:e}));return i.objectFlags|=8192,i}function kl(t,r,n){void 0===t&&(t=e.emptyArray);var i=r.variances;if(!i){r.variances=e.emptyArray,i=[];for(var a=0,o=t;a<o.length;a++){var s=o[a],c=n(r,s,Ue),u=n(r,s,Ve),l=(rl(u,c)?1:0)|(rl(c,u)?2:0);3===l&&rl(n(r,s,At),c)&&(l=4),i.push(l)}r.variances=i}return i}function Nl(t){return t===$e||t===Ze||8&t.objectFlags?e.emptyArray:kl(t.typeParameters,t,El)}function Al(e){return 262144&e.flags&&!ko(e)}function Fl(t){return!!(4&e.getObjectFlags(t))&&e.some(t.typeArguments,function(e){return Al(e)||Fl(e)})}function Pl(e,t,r){void 0===r&&(r=0);for(var n=""+e.target.id,i=0,a=e.typeArguments;i<a.length;i++){var o=a[i];if(Al(o)){var s=t.indexOf(o);s<0&&(s=t.length,t.push(o)),n+="="+s}else r<4&&Fl(o)?n+="<"+Pl(o,t,r+1)+">":n+="-"+o.id}return n}function wl(e,t,r){if(r===Er&&e.id>t.id){var n=e;e=t,t=n}if(Fl(e)&&Fl(t)){var i=[];return Pl(e,i)+","+Pl(t,i)}return e.id+","+t.id}function Il(t,r){if(!(6&e.getCheckFlags(t)))return r(t);for(var n=0,i=t.containingType.types;n<i.length;n++){var a=Ko(i[n],t.escapedName),o=a&&Il(a,r);if(o)return o}}function Ol(e){return e.parent&&32&e.parent.flags?Na(On(e)):void 0}function Ml(t,r){return!Il(r,function(r){return!!(16&e.getDeclarationModifierFlagsFromSymbol(r))&&(n=t,i=Ol(r),!Il(n,function(e){var t=Ol(e);return!!t&&ca(t,i)}));var n,i})}function Ll(e,t,r){if(r>=5&&524288&e.flags){var n=e.symbol;if(n)for(var i=0,a=0;a<r;a++){var o=t[a];if(524288&o.flags&&o.symbol===n&&++i>=5)return!0}}return!1}function Rl(t,r,n){if(t===r)return-1;var i=24&e.getDeclarationModifierFlagsFromSymbol(t);if(i!==(24&e.getDeclarationModifierFlagsFromSymbol(r)))return 0;if(i){if(eh(t)!==eh(r))return 0}else if((16777216&t.flags)!=(16777216&r.flags))return 0;return Gm(t)!==Gm(r)?0:n(aa(t),aa(r))}function Bl(t,r,n,i,a,o){if(t===r)return-1;if(!function(e,t,r){var n=Em(e),i=Em(t),a=km(e),o=km(t),s=Nm(e),c=Nm(t);return n===i&&a===o&&s===c||!!(r&&a<=o)}(t,r,n))return 0;if(e.length(t.typeParameters)!==e.length(r.typeParameters))return 0;t=bs(t),r=bs(r);var s=-1;if(!i){var c=ls(t);if(c){var u=ls(r);if(u){if(!(d=o(c,u)))return 0;s&=d}}}for(var l=Em(r),_=0;_<l;_++){var d,p=Sm(t,_);if(!(d=o(Sm(r,_),p)))return 0;s&=d}if(!a){var f=ds(t),m=ds(r);s&=void 0!==f||void 0!==m?function(e,t,r){return void 0!==e&&void 0!==t&&Fc(e,t)?r(e.type,t.type):0}(f,m,o):o(ps(t),ps(r))}return s}function jl(t){return function(e){for(var t,r=0,n=e;r<n.length;r++){var i=n[r],a=Xl(i);if(t||(t=a),a===i||a!==t)return!1}return!0}(t)?Ac(t):e.reduceLeft(t,function(e,t){return tl(e,t)?t:e})}function Jl(t){return!!(4&e.getObjectFlags(t))&&(t.target===$e||t.target===Ze)}function zl(t){return!!(4&e.getObjectFlags(t))&&t.target===Ze}function Kl(e){return Jl(e)&&e.typeArguments?e.typeArguments[0]:void 0}function Ul(e){return Jl(e)||!(98304&e.flags)&&rl(e,st)}function Vl(e){var t=Jl(e)?e.typeArguments[0]:void 0;return t===fe||t===Ae}function ql(e){return e_(e)||!!Ko(e,"0")}function Wl(e){return Ul(e)||ql(e)}function Hl(e){return!(240512&e.flags)}function Gl(e){return!!(109440&e.flags)}function Yl(t){return!!(16&t.flags)||(1048576&t.flags?!!(1024&t.flags)||e.every(t.types,Gl):Gl(t))}function Xl(t){return 1024&t.flags?Ta(t):128&t.flags?ye:256&t.flags?he:2048&t.flags?ve:512&t.flags?Te:1048576&t.flags?Ac(e.sameMap(t.types,Xl)):t}function Ql(t){return 1024&t.flags&&yu(t)?Ta(t):128&t.flags&&yu(t)?ye:256&t.flags&&yu(t)?he:2048&t.flags&&yu(t)?ve:512&t.flags&&yu(t)?Te:1048576&t.flags?Ac(e.sameMap(t.types,Ql)):t}function $l(t){return 8192&t.flags?Ce:1048576&t.flags?Ac(e.sameMap(t.types,$l)):t}function Zl(e,t){return mg(e,t)||(e=$l(Ql(e))),e}function e_(t){return!!(4&e.getObjectFlags(t)&&8&t.target.objectFlags)}function t_(e){return e.target.hasRestElement?e.typeArguments[e.target.typeParameters.length-1]:void 0}function r_(e){return Ms(e)-(e.target.hasRestElement?1:0)}function n_(e){return"0"===e.value.base10Value}function i_(e){for(var t=0,r=0,n=e;r<n.length;r++)t|=a_(n[r]);return t}function a_(e){return 1048576&e.flags?i_(e.types):128&e.flags?""===e.value?128:0:256&e.flags?0===e.value?256:0:2048&e.flags?n_(e)?2048:0:512&e.flags?e===be||e===De?512:0:117724&e.flags}function o_(e){return 117632&a_(e)?Sd(e,function(e){return!(117632&a_(e))}):e}function s_(e){return 4&e.flags?Kt:8&e.flags?Ut:64&e.flags?Vt:e===De||e===be||114688&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&n_(e)?e:ke}function c_(e,t){var r=t&~e.flags&98304;return 0===r?e:Ac(32768===r?[e,pe]:65536===r?[e,me]:[e,pe,me])}function u_(t){return e.Debug.assert(O),32768&t.flags?t:Ac([t,pe])}function l_(e){return O?function(e){return ct||(ct=ec("NonNullable",524288,void 0)||oe),ct!==oe?Rs(ct,[e]):ad(e,2097152)}(e):e}function __(e){return e.symbol&&0!=(6656&e.symbol.flags)&&!Mh(e)}function d_(e,t){var r=Ir(e.flags,e.escapedName);return r.declarations=e.declarations,r.parent=e.parent,r.type=t,r.target=e,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),e.nameType&&(r.nameType=e.nameType),r}function p_(t){if(!(z_(t)&&32768&e.getObjectFlags(t)))return t;var r=t.regularType;if(r)return r;var n=t,i=function(t,r){for(var n=e.createSymbolTable(),i=0,a=xo(t);i<a.length;i++){var o=a[i],s=aa(o),c=r(s);n.set(o.escapedName,c===s?o:d_(o,c))}return n}(t,p_),a=Yn(n.symbol,i,n.callSignatures,n.constructSignatures,n.stringIndexInfo,n.numberIndexInfo);return a.flags=n.flags,a.objectFlags|=-32769&n.objectFlags,t.regularType=a,a}function f_(e,t,r){return{parent:e,propertyName:t,siblings:r,resolvedProperties:void 0}}function m_(t){if(!t.resolvedProperties){for(var r=e.createMap(),n=0,i=function e(t){if(!t.siblings){for(var r=[],n=0,i=e(t.parent);n<i.length;n++){var a=i[n];if(z_(a)){var o=So(a,t.propertyName);o&&Dd(aa(o),function(e){r.push(e)})}}t.siblings=r}return t.siblings}(t);n<i.length;n++){var a=i[n];if(z_(a)&&!(1024&e.getObjectFlags(a)))for(var o=0,s=Co(a);o<s.length;o++){var c=s[o];r.set(c.escapedName,c)}}t.resolvedProperties=e.arrayFrom(r.values())}return t.resolvedProperties}function g_(e,t){if(!(4&e.flags))return e;var r=aa(e),n=v_(r,t&&f_(t,e.escapedName,void 0));return n===r?e:d_(e,n)}function y_(e){var t=ae.get(e.escapedName);if(t)return t;var r=d_(e,pe);return r.flags|=16777216,ae.set(e.escapedName,r),r}function h_(e){return v_(e,void 0)}function v_(t,r){if(393216&e.getObjectFlags(t)){if(98304&t.flags)return ce;if(z_(t))return function(t,r){for(var n=e.createSymbolTable(),i=0,a=xo(t);i<a.length;i++){var o=a[i];n.set(o.escapedName,g_(o,r))}if(r)for(var s=0,c=m_(r);s<c.length;s++)o=c[s],n.has(o.escapedName)||n.set(o.escapedName,y_(o));var u=Ho(t,0),l=Ho(t,1),_=Yn(t.symbol,n,e.emptyArray,e.emptyArray,u&&Es(h_(u.type),u.isReadonly),l&&Es(h_(l.type),l.isReadonly));return _.objectFlags|=16384&e.getObjectFlags(t),_}(t,r);if(1048576&t.flags){var n=r||f_(void 0,void 0,t.types),i=e.sameMap(t.types,function(e){return 98304&e.flags?e:v_(e,n)});return Ac(i,e.some(i,yl)?2:1)}if(2097152&t.flags)return Mc(e.sameMap(t.types,h_));if(Jl(t)||e_(t))return Is(t.target,e.sameMap(t.typeArguments,h_))}return t}function b_(t,r){var n=li(h_(r));if(!e.isInJSFile(t)||e.isCheckJsEnabledForFile(e.getSourceFileOfNode(t),F)){var i;switch(t.kind){case 204:case 154:case 153:i=B?e.Diagnostics.Member_0_implicitly_has_an_1_type:e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 151:var a=t;if(e.isIdentifier(a.name)&&(e.isCallSignatureDeclaration(a.parent)||e.isMethodSignature(a.parent)||e.isFunctionTypeNode(a.parent))&&a.parent.parameters.indexOf(a)>-1&&(Gr(a,a.name.escapedText,67897832,void 0,a.name.escapedText,!0)||a.name.originalKeywordKind&&e.isTypeNodeKind(a.name.originalKeywordKind))){var o="arg"+a.parent.parameters.indexOf(a);return void wr(B,t,e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,o,e.declarationNameToString(a.name))}i=t.dotDotDotToken?B?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:B?e.Diagnostics.Parameter_0_implicitly_has_an_1_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 186:if(i=e.Diagnostics.Binding_element_0_implicitly_has_an_1_type,!B)return;break;case 294:return void Pr(t,e.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,n);case 239:case 156:case 155:case 158:case 159:case 196:case 197:if(B&&!t.name)return void Pr(t,e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,n);i=B?e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 181:return void(B&&Pr(t,e.Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type));default:i=B?e.Diagnostics.Variable_0_implicitly_has_an_1_type:e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}wr(B,t,i,e.declarationNameToString(e.getNameOfDeclaration(t)),n)}}function D_(t,r){o&&B&&131072&e.getObjectFlags(r)&&(function t(r){var n=!1;if(131072&e.getObjectFlags(r)){if(1048576&r.flags)if(e.some(r.types,yl))n=!0;else for(var i=0,a=r.types;i<a.length;i++)t(_=a[i])&&(n=!0);if(Jl(r)||e_(r))for(var o=0,s=r.typeArguments;o<s.length;o++)t(_=s[o])&&(n=!0);if(z_(r))for(var c=0,u=xo(r);c<u.length;c++){var l=u[c],_=aa(l);131072&e.getObjectFlags(_)&&(t(_)||Pr(l.valueDeclaration,e.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type,ci(l),li(h_(_))),n=!0)}}return n}(r)||b_(t,r))}function x_(e,t,r){var n=Em(e),i=Em(t),a=Am(e),o=Am(t),s=o?i-1:i,c=a?s:Math.min(n,s),u=ls(e);if(u){var l=ls(t);l&&r(u,l)}for(var _=0;_<c;_++)r(Sm(e,_),Sm(t,_));o&&r(Cm(e,c),o)}function S_(e,t,r){var n=ds(e),i=ds(t);n&&i&&n.kind===i.kind&&(0===n.kind||n.parameterIndex===i.parameterIndex)?r(n.type,i.type):r(ps(e),ps(t))}function T_(e,t,r,n){return C_(e.map(k_),t,r,n||Zu)}function C_(e,t,r,n){var i={inferences:e,signature:t,flags:r,compareTypes:n,mapper:function(e){return E_(i,e,!0)},nonFixingMapper:function(e){return E_(i,e,!1)}};return i}function E_(e,t,r){for(var n=e.inferences,i=0;i<n.length;i++){var a=n[i];if(t===a.typeParameter)return r&&!a.isFixed&&(a.isFixed=!0,a.inferredType=void 0),V_(e,i)}return t}function k_(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1}}function N_(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed}}function A_(e){return e&&e.mapper}function F_(t){var r=e.getObjectFlags(t);return!!(63176704&t.flags||4&r&&e.forEach(t.typeArguments,F_)||16&r&&t.symbol&&10288&t.symbol.flags||32&r||3145728&t.flags&&function(t){return void 0===t.couldContainTypeVariables&&(t.couldContainTypeVariables=e.some(t.types,F_)),t.couldContainTypeVariables}(t))}function P_(t,r){return t===r||!!(3145728&t.flags)&&e.some(t.types,function(e){return P_(e,r)})}function w_(t,r,n){var i=t.id+","+r.id+","+n.id;if(Lt.has(i))return Lt.get(i);Lt.set(i,void 0);var a=function(t,r,n){var i=Co(t);if(0!==i.length||Ho(t,0)){for(var a=0,o=i;a<o.length;a++){var s=o[a];if(524288&e.getObjectFlags(aa(s)))return}if(Jl(t))return hc(I_(t.typeArguments[0],r,n),zl(t));if(e_(t)){var c=e.map(t.typeArguments||e.emptyArray,function(e){return I_(e,r,n)}),u=4&yo(r)?Ms(t)-(t.target.hasRestElement?1:0):t.target.minLength;return Dc(c,u,t.target.hasRestElement,t.target.readonly,t.target.associatedNames)}var l=Vn(2064,void 0);return l.source=t,l.mappedType=r,l.constraintType=n,l}}(t,r,n);return Lt.set(i,a),a}function I_(e,t,r){var n=Xc(r.type,lo(t)),i=po(t),a=k_(n);return B_([a],e,i),R_(a)}function O_(e,t,r,n){var i,o,s,c,u,l,_;return a(this,function(a){switch(a.label){case 0:i=2097152&t.flags?To(t):xo(t),o=0,s=i,a.label=1;case 1:return o<s.length?(c=s[o],!r&&16777216&c.flags?[3,5]:(u=Ko(e,c.escapedName))?[3,3]:[4,c]):[3,6];case 2:return a.sent(),[3,5];case 3:return n&&109440&(l=aa(c)).flags?1&(_=aa(u)).flags||gu(_)===gu(l)?[3,5]:[4,c]:[3,5];case 4:a.sent(),a.label=5;case 5:return o++,[3,1];case 6:return[2]}})}function M_(e,t,r,n){return O_(e,t,r,n).next().value}function L_(e,t){return e_(e)&&e_(t)&&function(e,t){return t.target.minLength>e.target.minLength||!t_(t)&&(!!t_(e)||r_(t)<r_(e))}(e,t)||!!M_(e,t,!1,!0)&&!!M_(t,e,!1,!0)}function R_(e){return e.candidates?Ac(e.candidates,2):e.contraCandidates?Mc(e.contraCandidates):Oe}function B_(t,r,n,i,a){var o,s;void 0===i&&(i=0),void 0===a&&(a=!1);var c,u=!1,l=!0;function _(t,r){if(F_(r)){if(t===le){var m=c;return c=t,_(r,r),void(c=m)}if(t.aliasSymbol&&t.aliasTypeArguments&&t.aliasSymbol===r.aliasSymbol)for(var g=t.aliasTypeArguments,y=r.aliasTypeArguments,h=0;h<g.length;h++)_(g[h],y[h]);else{if(1048576&t.flags&&1048576&r.flags&&!(1024&t.flags&&1024&r.flags)||2097152&t.flags&&2097152&r.flags){if(t===r){for(var v=0,b=t.types;v<b.length;v++)_(L=b[v],L);return}for(var D=void 0,x=0,S=t.types;x<S.length;x++)if(j_(L=S[x],r.types))(D||(D=[])).push(L),_(L,L);else if(384&L.flags){var T=Xl(L);j_(T,r.types)&&(D||(D=[])).push(L,T)}D&&(t=J_(t,D),r=J_(r,D))}if(8650752&r.flags){if(524288&e.getObjectFlags(t)||t===Ne||8&i&&(t===ue||t===ot))return;var C=p(r);if(C){if(!C.isFixed){if((void 0===C.priority||i<C.priority)&&(C.candidates=void 0,C.contraCandidates=void 0,C.topLevel=!0,C.priority=i),i===C.priority){var E=c||t;a&&!u?e.contains(C.contraCandidates,E)||(C.contraCandidates=e.append(C.contraCandidates,E),C.inferredType=void 0):e.contains(C.candidates,E)||(C.candidates=e.append(C.candidates,E),C.inferredType=void 0)}!(8&i)&&262144&r.flags&&C.topLevel&&!P_(n,r)&&(C.topLevel=!1,C.inferredType=void 0)}return}var k=Hc(r);if(k!==r)K(t,k);else if(8388608&r.flags){var N=Hc(r.indexType);if(63176704&N.flags){var A=Gc(Hc(r.objectType),N);A&&A!==r&&K(t,A)}}}else 33554432&r.flags&&_(t,r.typeVariable);if(4&e.getObjectFlags(t)&&4&e.getObjectFlags(r)&&t.target===r.target){g=t.typeArguments||e.emptyArray,y=r.typeArguments||e.emptyArray;var F=g.length<y.length?g.length:y.length,P=Nl(t.target);for(h=0;h<F;h++)h<P.length&&2===P[h]?d(g[h],y[h]):_(g[h],y[h])}else if(4194304&t.flags&&4194304&r.flags)a=!a,_(t.type,r.type),a=!a;else if((Yl(t)||4&t.flags)&&4194304&r.flags){var w=function(t){var r=e.createSymbolTable();Dd(t,function(t){if(128&t.flags){var n=e.escapeLeadingUnderscores(t.value),i=Ir(4,n);i.type=ce,t.symbol&&(i.declarations=t.symbol.declarations,i.valueDeclaration=t.symbol.valueDeclaration),r.set(n,i)}});var n=4&t.flags?Es(Oe,!1):void 0;return Yn(void 0,r,e.emptyArray,e.emptyArray,n,void 0)}(t);a=!a;var I=i;i|=16,_(w,r.type),i=I,a=!a}else if(8388608&t.flags&&8388608&r.flags)_(t.objectType,r.objectType),_(t.indexType,r.indexType);else if(16777216&t.flags&&16777216&r.flags)_(t.checkType,r.checkType),_(t.extendsType,r.extendsType),_(t.trueType,r.trueType),_(t.falseType,r.falseType);else if(16777216&r.flags&&!a)_(t,r.trueType),_(t,r.falseType);else if(3145728&r.flags)for(var O=0,M=r.types;O<M.length;O++){var L=M[O];I=i,p(L)&&(i|=1),_(t,L),i=I}else if(1048576&t.flags)for(var R=0,B=g=t.types;R<B.length;R++)_(B[R],r);else{if(!(32&i&&65273856&t.flags)){var j=Bo(t);if(j!==t&&l&&!(2621440&j.flags))return l=!1,_(j,r);t=j}if(2621440&t.flags){var J=t.id+","+r.id;if(s&&s.get(J))return;(s||(s=e.createMap())).set(J,!0);var z=524288&r.flags&&!(16&e.getObjectFlags(r)&&r.symbol&&32&r.symbol.flags)?r.symbol:void 0;if(z){if(e.contains(o,z))return;(o||(o=[])).push(z),f(t,r),o.pop()}else f(t,r)}}}}function K(t,r){var n=t.id+","+r.id;s&&s.get(n)||((s||(s=e.createMap())).set(n,!0),_(t,r))}}function d(e,t){M||64&i?(a=!a,_(e,t),a=!a):_(e,t)}function p(e){if(8650752&e.flags)for(var r=0,n=t;r<n.length;r++){var i=n[r];if(e===i.typeParameter)return i}}function f(t,r){bo(t)&&bo(r)&&(_(_o(t),_o(r)),_(po(t),po(r))),32&e.getObjectFlags(r)&&function t(r,n,a){if(1048576&a.flags){for(var o=!1,s=0,c=a.types;s<c.length;s++)o=t(r,n,c[s])||o;return o}if(4194304&a.flags){var u=p(a.type);if(u&&!u.isFixed){var l=w_(r,n,a);if(l){var d=i;i|=2,_(l,u.typeParameter),i=d}}return!0}if(262144&a.flags){d=i,i|=4,_(Jc(r),a),i=d;var f=Eo(a);return!(!f||!t(r,n,f))||(_(Ac(e.compact([Go(r,0),Go(r,1)].concat(e.map(Co(r),aa)))),po(n)),!0)}return!1}(t,r,_o(r))||L_(t,r)||(function(e,t){if(Jl(e)||e_(e)){if(e_(t)){for(var r=e_(e)?r_(e):0,n=r_(t),i=e_(e)?t_(e):Kl(e),a=t_(t),o=n<r||i?n:r,s=0;s<o;s++)_(s<r?e.typeArguments[s]:i,t.typeArguments[s]);if(a){var c=o<r?e.typeArguments.slice(o,r):[];i&&c.push(i),c.length&&_(Ac(c),a)}return}if(Jl(t))return void y(e,t)}for(var u=0,l=xo(t);u<l.length;u++){var d=l[u],p=Ko(e,d.escapedName);p&&_(aa(p),aa(d))}}(t,r),m(t,r,0),m(t,r,1),y(t,r))}function m(t,r,n){for(var i=Vo(t,n),a=Vo(r,n),o=i.length,s=a.length,c=o<s?o:s,u=!!(524288&e.getObjectFlags(t)),l=0;l<c;l++)g(xs(i[o-c+l]),xs(a[s-c+l]),u)}function g(e,t,r){if(!r){var n=u,i=t.declaration?t.declaration.kind:0;u=u||156===i||155===i||157===i,x_(e,t,d),u=n}S_(e,t,_)}function y(e,t){var r=Go(t,0);r&&(n=Go(e,0)||Yo(e,0))&&_(n,r);var n,i=Go(t,1);i&&(n=Go(e,1)||Go(e,0)||Yo(e,1))&&_(n,i)}_(r,n)}function j_(e,t){for(var r=0,n=t;r<n.length;r++)if(Qu(n[r],e))return!0;return!1}function J_(e,t){for(var r=[],n=0,i=e.types;n<i.length;n++){var a=i[n];j_(a,t)||r.push(a)}return 1048576&e.flags?Ac(r):Mc(r)}function z_(t){return!!(128&e.getObjectFlags(t))}function K_(t){return 28&t.priority?Mc(t.contraCandidates):(r=t.contraCandidates,e.reduceLeft(r,function(e,t){return tl(t,e)?t:e}));var r}function U_(t,r){var n,i,a=function(t){if(t.length>1){var r=e.filter(t,z_);if(r.length){var n=h_(Ac(r,2));return e.concatenate(e.filter(t,function(e){return!z_(e)}),[n])}}return t}(t.candidates),o=(n=t.typeParameter,!!(i=ko(n))&&Zm(16777216&i.flags?No(i):i,4325372)),s=!o&&t.topLevel&&(t.isFixed||!P_(ps(r),t.typeParameter)),c=o?e.sameMap(a,gu):s?e.sameMap(a,Ql):a;return h_(28&t.priority?Ac(c,2):function(t){if(!O)return jl(t);var r=e.filter(t,function(e){return!(98304&e.flags)});return r.length?c_(jl(r),98304&i_(t)):Ac(t,2)}(c))}function V_(t,r){var n=t.inferences[r],i=n.inferredType;if(!i){var a=t.signature;if(a){var o=n.candidates?U_(n,a):void 0;if(n.contraCandidates){var s=K_(n);i=!o||131072&o.flags||!tl(o,s)?s:o}else if(o)i=o;else if(1&t.flags)i=Ne;else{var c=Lo(n.typeParameter);i=c?Ku(c,Nu(function(t,r){return function(n){return e.findIndex(t.inferences,function(e){return e.typeParameter===n})>=r?Oe:n}}(t,r),t.nonFixingMapper)):q_(!!(2&t.flags))}}else i=R_(n);n.inferredType=i;var u=ko(n.typeParameter);if(u){var l=Ku(u,t.nonFixingMapper);t.compareTypes(i,Ha(l,i))||(n.inferredType=i=l)}}return i}function q_(e){return e?ce:Oe}function W_(e){for(var t=[],r=0;r<e.inferences.length;r++)t.push(V_(e,r));return t}function H_(t){switch(t){case"document":case"console":return e.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;case"$":return F.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery;case"describe":case"suite":case"it":case"test":return F.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha;case"process":case"require":case"Buffer":case"module":return F.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode;case"Map":case"Set":case"Promise":case"Symbol":case"WeakMap":case"WeakSet":case"Iterator":case"AsyncIterator":return e.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later;default:return e.Diagnostics.Cannot_find_name_0}}function G_(t){var r=Vr(t);return r.resolvedSymbol||(r.resolvedSymbol=!e.nodeIsMissing(t)&&Gr(t,t.escapedText,68268991,H_(t.escapedText),t,!e.isWriteOnlyAccess(t),!1,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1)||oe),r.resolvedSymbol}function Y_(t){return!!e.findAncestor(t,function(e){return 167===e.kind||72!==e.kind&&148!==e.kind&&"quit"})}function X_(t,r){switch(r.kind){case 195:case 213:return X_(t,r.expression)}switch(t.kind){case 72:return 72===r.kind&&G_(t)===G_(r)||(237===r.kind||186===r.kind)&&Rn(G_(t))===In(r);case 100:return 100===r.kind;case 98:return 98===r.kind;case 213:case 195:return X_(t.expression,r);case 189:case 190:return e.isAccessExpression(r)&&Q_(t)===Q_(r)&&X_(t.expression,r.expression)}return!1}function Q_(t){return 189===t.kind?t.name.escapedText:e.isStringLiteral(t.argumentExpression)||e.isNumericLiteral(t.argumentExpression)?e.escapeLeadingUnderscores(t.argumentExpression.text):void 0}function $_(t,r){for(;e.isAccessExpression(t);)if(X_(t=t.expression,r))return!0;return!1}function Z_(t,r){var n;return e.isAccessExpression(r)&&$_(t,r.expression)&&void 0!==(n=Q_(r))&&ed(function t(r){if(72===r.kind)return aa(G_(r));if(e.isAccessExpression(r)){var n=t(r.expression);if(n){var i=Q_(r);return void 0!==i?Ci(n,i):void 0}}}(r.expression),n)}function ed(t,r){if(t&&1048576&t.flags){var n=Jo(t,r);if(n&&2&e.getCheckFlags(n))return void 0===n.isDiscriminantProperty&&(n.isDiscriminantProperty=96==(96&n.checkFlags)&&function(e){return!!(1048576&e.flags&&(1040&e.flags||!Wc(e)))}(aa(n))),!!n.isDiscriminantProperty}return!1}function td(e,t){return X_(e,t)||$_(e,t)}function rd(e,t){if(e!==t){if(131072&t.flags)return t;var r=Sd(e,function(e){return function(e,t){if(!(1048576&e.flags))return rl(e,t);for(var r=0,n=e.types;r<n.length;r++)if(rl(n[r],t))return!0;return!1}(t,e)});if(512&t.flags&&yu(t)&&(r=Td(r,mu)),rl(t,r))return r}return e}function nd(e){var t=Do(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&tl(e,Ye))}function id(t){var r=t.flags;if(4&r)return O?16317953:16776705;if(128&r){var n=""===t.value;return O?n?12123649:7929345:n?12582401:16776705}if(40&r)return O?16317698:16776450;if(256&r){var i=0===t.value;return O?i?12123394:7929090:i?12582146:16776450}return 64&r?O?16317188:16775940:2048&r?(i=n_(t),O?i?12122884:7928580:i?12581636:16775940):16&r?O?16316168:16774920:528&r?O?t===be||t===De?12121864:7927560:t===be||t===De?12580616:16774920:524288&r?16&e.getObjectFlags(t)&&yl(t)?O?16318463:16777215:nd(t)?O?7880640:16728e3:O?7888800:16736160:49152&r?9830144:65536&r?9363232:12288&r?O?7925520:16772880:67108864&r?O?7888800:16736160:63176704&r?id(Po(t)||Oe):3145728&r?function(e){for(var t=0,r=0,n=e;r<n.length;r++)t|=id(n[r]);return t}(t.types):16777215}function ad(e,t){return Sd(e,function(e){return 0!=(id(e)&t)})}function od(e,t){if(t){var r=Cg(t);return Ac([ad(e,524288),r])}return e}function sd(e,t){var r=Rc(t);if(!Ra(r))return _e;var n=Ka(r);return qd(Ci(e,n),t)||Lp(n)&&Go(e,1)||Go(e,0)||_e}function cd(e,t){return xd(e,ql)&&function(e,t){var r=Ci(e,""+t);return r||(xd(e,e_)&&!xd(e,function(e){return!e.target.hasRestElement})?Td(e,function(e){return t_(e)||pe}):void 0)}(e,t)||By(e,void 0,!1,!1)||_e}function ud(e){return hc(By(e,void 0,!1,!1)||_e)}function ld(e){return 204===e.parent.kind&&e.parent.left===e||227===e.parent.kind&&e.parent.initializer===e}function _d(e){return sd(dd(e.parent),e.name)}function dd(e){var t=e.parent;switch(t.kind){case 226:return ye;case 227:return Ry(t.expression,t.awaitModifier)||_e;case 204:return function(e){return 187===e.parent.kind&&ld(e.parent)||275===e.parent.kind&&ld(e.parent.parent)?od(dd(e),e.right):Cg(e.right)}(t);case 198:return pe;case 187:return function(e,t){return cd(dd(e),e.elements.indexOf(t))}(t,e);case 208:return function(e){return ud(dd(e.parent))}(t);case 275:return _d(t);case 276:return function(e){return od(_d(e),e.objectAssignmentInitializer)}(t)}return _e}function pd(e){return e.initializer?function(e){return Vr(e).resolvedType||Cg(e)}(e.initializer):226===e.parent.parent.kind?ye:227===e.parent.parent.kind&&Ry(e.parent.parent.expression,e.parent.parent.awaitModifier)||_e}function fd(e){return 237===e.kind?pd(e):function(e){var t=e.parent,r=fd(t.parent);return od(184===t.kind?sd(r,e.propertyName||e.name):e.dotDotDotToken?ud(r):cd(r,t.elements.indexOf(e)),e.initializer)}(e)}function md(e,t){return qd(237===e.kind||186===e.kind?fd(e):dd(e),t)}function gd(e){switch(e.kind){case 195:return gd(e.expression);case 204:switch(e.operatorToken.kind){case 59:return gd(e.left);case 27:return gd(e.right)}}return e}function yd(e){return 271===e.kind?gu(Cg(e.expression)):ke}function hd(e){var t=Vr(e);if(!t.switchTypes){t.switchTypes=[];for(var r=0,n=e.caseBlock.clauses;r<n.length;r++){var i=n[r];t.switchTypes.push(yd(i))}}return t.switchTypes}function vd(t){for(var r=[],n=0,i=t.caseBlock.clauses;n<i.length;n++){var a=i[n];if(271===a.kind){if(10===a.expression.kind){r.push(a.expression.text);continue}return e.emptyArray}r.push(void 0)}return r}function bd(e,t){return e===t||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(var r=0,n=e.types;r<n.length;r++){var i=n[r];if(!Tc(t.types,i))return!1}return!0}return!!(1024&e.flags&&Ta(e)===t)||Tc(t.types,e)}(e,t)}function Dd(t,r){return 1048576&t.flags?e.forEach(t.types,r):r(t)}function xd(t,r){return 1048576&t.flags?e.every(t.types,r):r(t)}function Sd(t,r){if(1048576&t.flags){var n=t.types,i=e.filter(n,r);return i===n?t:Pc(i,t.objectFlags)}return r(t)?t:ke}function Td(e,t,r){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);for(var n,i,a=0,o=e.types;a<o.length;a++){var s=t(o[a]);s&&(n?i?i.push(s):i=[n,s]:n=s)}return i?Ac(i,r?0:1):n}function Cd(e,t){return Sd(e,function(e){return 0!=(e.flags&t)})}function Ed(e,t){return bd(ye,e)&&Zm(t,128)||bd(he,e)&&Zm(t,256)||bd(ve,e)&&Zm(t,2048)?Td(e,function(e){return 4&e.flags?Cd(t,132):8&e.flags?Cd(t,264):64&e.flags?Cd(t,2112):e}):e}function kd(e){return 0===e.flags}function Nd(e){return 0===e.flags?e.type:e}function Ad(e,t){return t?{flags:0,type:e}:e}function Fd(e){return ie[e.id]||(ie[e.id]=function(e){var t=Vn(256);return t.elementType=e,t}(e))}function Pd(e,t){var r=Xl(Eg(t));return bd(r,e.elementType)?e:Fd(Ac([e.elementType,r]))}function wd(e){return e.finalArrayType||(e.finalArrayType=131072&(t=e.elementType).flags?ot:hc(1048576&t.flags?Ac(t.types,2):t));var t}function Id(t){return 256&e.getObjectFlags(t)?wd(t):t}function Od(t){return 256&e.getObjectFlags(t)?t.elementType:ke}function Md(t,r){return function(t){for(var r=!1,n=0,i=t;n<i.length;n++){var a=i[n];if(!(131072&a.flags)){if(!(256&e.getObjectFlags(a)))return!1;r=!0}}return r}(t)?Fd(Ac(e.map(t,Od))):Ac(e.sameMap(t,Id),r)}function Ld(t){var r=function e(t){var r=t.parent;return 195===r.kind||204===r.kind&&59===r.operatorToken.kind&&r.left===t||204===r.kind&&27===r.operatorToken.kind&&r.right===t?e(r):t}(t),n=r.parent,i=189===n.kind&&("length"===n.name.escapedText||191===n.parent.kind&&e.isPushOrUnshiftIdentifier(n.name)),a=190===n.kind&&n.expression===r&&204===n.parent.kind&&59===n.parent.operatorToken.kind&&n.parent.left===n&&!e.isAssignmentTarget(n.parent)&&eg(Cg(n.argumentExpression),296);return i||a}function Rd(t){var r=Vr(t);return void 0===r.maybeTypePredicate&&(r.maybeTypePredicate=function(t){if(98!==t.expression.kind){var r=_f(t.expression);if(r!==Ne){var n=Bo(r);return n!==_e&&e.some(Vo(n,0),_s)}}return!1}(t)),r.maybeTypePredicate}function Bd(t,r,n,i,a){var o;void 0===n&&(n=r);var s=0;if(zt)return _e;if(!t.flowNode||!a&&!(133970943&r.flags))return r;var u=Jt,_=Nd(p(t.flowNode));Jt=u;var d=256&e.getObjectFlags(_)&&Ld(t)?ot:Id(_);return t.parent&&213===t.parent.kind&&131072&ad(d,2097152).flags?r:d;function p(a){if(2e3===s)return zt=!0,o=t,c=e.findAncestor(o,e.isFunctionOrModuleBlock),l=e.getSourceFileOfNode(o),_=e.getSpanOfTokenAtPosition(l,c.statements.pos),cr.add(e.createFileDiagnostic(l,_.start,_.length,e.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)),_e;var o,c,l,_;for(s++;;){var d=a.flags;if(1024&d)for(var b=u;b<Jt;b++)if(nr[b]===a)return s--,ir[b];var D=void 0;if(4096&d)a.locked=!0,D=p(a.antecedent),a.locked=!1;else{if(2048&d){a=a.antecedent;continue}if(16&d){if(!(D=f(a))){a=a.antecedent;continue}}else if(96&d)D=g(a);else if(128&d)D=y(a);else if(12&d){if(1===a.antecedents.length){a=a.antecedents[0];continue}D=4&d?h(a):v(a)}else if(256&d){if(!(D=m(a))){a=a.antecedent;continue}}else if(2&d){var x=a.container;if(x&&x!==i&&189!==t.kind&&190!==t.kind&&100!==t.kind){a=x.flowNode;continue}D=n}else D=ky(r)}return 1024&d&&(nr[Jt]=a,ir[Jt]=D,Jt++),s--,D}}function f(n){var i=n.node;if(X_(t,i)){if(2===e.getAssignmentTargetKind(i)){var a=p(n.antecedent);return Ad(Xl(Nd(a)),kd(a))}if(r===ue||r===ot){if(function(e){return 237===e.kind&&e.initializer&&Mi(e.initializer)||186!==e.kind&&204===e.parent.kind&&Mi(e.parent.right)}(i))return Fd(ke);var o=Xl(md(i,t));return rl(o,r)?o:at}return 1048576&r.flags?rd(r,md(i,t)):r}if($_(t,i)){if(e.isVariableDeclaration(i)&&(e.isInJSFile(i)||e.isVarConst(i))){var s=e.getDeclaredExpandoInitializer(i);if(s&&(196===s.kind||197===s.kind))return p(n.antecedent)}return r}if(e.isVariableDeclaration(i)&&226===i.parent.parent.kind&&X_(t,i.parent.parent.expression))return df(Nd(p(n.antecedent)))}function m(n){if(r===ue||r===ot){var i=n.node,a=191===i.kind?i.expression.expression:i.left.expression;if(X_(t,gd(a))){var o=p(n.antecedent),s=Nd(o);if(256&e.getObjectFlags(s)){var c=s;if(191===i.kind)for(var u=0,l=i.arguments;u<l.length;u++)c=Pd(c,l[u]);else eg(Eg(i.left.argumentExpression),296)&&(c=Pd(c,i.right));return c===s?o:Ad(c,kd(o))}return o}}}function g(e){var t=p(e.antecedent),r=Nd(t);if(131072&r.flags)return t;var n=0!=(32&e.flags),i=Id(r),a=F(i,e.expression,n);if(a===i)return t;var o=kd(t);return Ad(o&&131072&a.flags?Ne:a,o)}function y(n){var i=n.switchStatement.expression,a=p(n.antecedent),o=Nd(a);return X_(t,i)?o=k(o,n.switchStatement,n.clauseStart,n.clauseEnd):b(i,o)?o=D(o,i,function(e){return k(e,n.switchStatement,n.clauseStart,n.clauseEnd)}):199===i.kind&&X_(t,i.expression)?o=function(t,r,n,i){var a=vd(r);if(!a.length)return t;var o,s,c=e.findIndex(a,function(e){return void 0===e}),u=n===i||c>=n&&c<i;if(c>-1){var l=a.filter(function(e){return void 0!==e}),_=c<n?n-1:n,d=c<i?i-1:i;o=l.slice(_,d),s=Jm(_,d,l,u)}else o=a.slice(n,i),s=Jm(n,i,a,u);if(u)return Sd(t,function(e){return(id(e)&s)===s});var p,f=ad(Ac(o.map(function(e){return function(e,t){switch(t){case"function":return 1&e.flags?e:Ye;case"object":return 2&e.flags?Ac([Fe,me]):e;default:return Dr.get(t)||e}}(t,e)})),s);return 1048576&f.flags&&(f=rd(f,wo(t))),ad(Td(t,(p=f,function(e){if(tl(p,e))return p;if(63176704&e.flags){var t=Po(e)||ce;if(tl(p,t))return Mc([e,p])}return e})),s)}(o,n.switchStatement,n.clauseStart,n.clauseEnd):Z_(t,i)&&(o=r),Ad(o,kd(a))}function h(t){for(var i=[],a=!1,o=!1,s=0,c=t.antecedents;s<c.length;s++){var u=c[s];if(!(2048&u.flags&&u.lock.locked)){var l=p(u),_=Nd(l);if(_===r&&r===n)return _;e.pushIfUnique(i,_),bd(_,r)||(a=!0),kd(l)&&(o=!0)}}return Ad(Md(i,a?2:1),o)}function v(n){var i=function(e){return e.id||(e.id=c,c++),e.id}(n),a=Zt[i]||(Zt[i]=e.createMap());if(!o&&!(o=function e(t){switch(t.kind){case 72:var r=G_(t);return r!==oe?(Ud(t)?"@":"")+l(r):void 0;case 100:return"0";case 213:case 195:return e(t.expression);case 189:case 190:var n=Q_(t);if(void 0!==n){var i=e(t.expression);return i&&i+"."+n}}}(t)))return r;var s=a.get(o);if(s)return s;for(var u=Bt;u<jt;u++)if(er[u]===n&&tr[u]===o&&rr[u].length)return Ad(Md(rr[u],1),!0);var _,d=[],f=!1;er[jt]=n,tr[jt]=o,rr[jt]=d;for(var m=0,g=n.antecedents;m<g.length;m++){var y=g[m];jt++;var h=p(y);jt--,_||(_=h);var v=Nd(h),b=a.get(o);if(b)return b;if(e.pushIfUnique(d,v),bd(v,r)||(f=!0),v===r)break}var D=Md(d,f?2:1);return kd(_)?Ad(D,!0):(a.set(o,D),D)}function b(r,n){if(!(1048576&n.flags&&e.isAccessExpression(r)))return!1;var i=Q_(r);return void 0!==i&&X_(t,r.expression)&&ed(n,i)}function D(e,t,r){var n=Q_(t);if(void 0===n)return e;var i=Ci(e,n),a=i&&r(i);return i===a?e:Sd(e,function(e){return il(Ci(t=e,r=n)||Lp(r)&&Go(t,1)||Go(t,0)||de,a);var t,r})}function x(e,n,i){return X_(t,n)?ad(e,i?4194304:8388608):b(n,r)?D(e,n,function(e){return ad(e,i?4194304:8388608)}):Z_(t,n)?r:e}function S(t,r,n){if(1572864&t.flags||262144&t.flags&&t.isThisType){var i=e.escapeLeadingUnderscores(r.text);return Sd(t,function(e){return function(e,t,r){if(Ho(e,0))return!0;var n=Ko(e,t);return n?!!(16777216&n.flags)||r:!r}(e,i,n)})}return t}function T(n,i,a){switch(i.operatorToken.kind){case 59:return x(n,i.left,a);case 33:case 34:case 35:case 36:var o=i.operatorToken.kind,s=gd(i.left),c=gd(i.right);if(199===s.kind&&e.isStringLiteralLike(c))return E(n,s,o,c,a);if(199===c.kind&&e.isStringLiteralLike(s))return E(n,c,o,s,a);if(X_(t,s))return C(n,o,c,a);if(X_(t,c))return C(n,o,s,a);if(b(s,r))return D(n,s,function(e){return C(e,o,c,a)});if(b(c,r))return D(n,c,function(e){return C(e,o,s,a)});if(Z_(t,s)||Z_(t,c))return r;break;case 94:return function(n,i,a){var o=gd(i.left);if(!X_(t,o))return $_(t,o)&&!function(t){return e.isAccessExpression(t)&&100===t.expression.kind&&!!(8&t.expression.flags)}(t)?r:n;var s,c=Cg(i.right);if(!nl(c,Ye))return n;var u=Ko(c,"prototype");if(u){var l=aa(u);Ei(l)||(s=l)}if(Ei(n)&&(s===Ge||s===Ye))return n;if(!s){var _=Vo(c,1);s=_.length?Ac(e.map(_,function(e){return ps(bs(e))})):Oe}return N(n,s,a,nl)}(n,i,a);case 93:var u=gd(i.right);if(e.isStringLiteralLike(i.left)&&X_(t,u))return S(n,i.left,a);break;case 27:return F(n,i.right,a)}return n}function C(e,t,r,n){if(1&e.flags)return e;34!==t&&36!==t||(n=!n);var i=Cg(r);if(2&e.flags&&35===t&&n)return 67239932&i.flags?i:524288&i.flags?Fe:e;if(98304&i.flags)return O?ad(e,33===t||34===t?n?262144:2097152:65536&i.flags?n?131072:1048576:n?65536:524288):e;if(67637251&e.flags)return e;if(n){var a=Sd(e,function(e){return al(e,i)});return 131072&a.flags?e:Ed(a,i)}if(Gl(i)){var o=gu(i);return Sd(e,function(e){return gu(e)!==o})}return e}function E(e,n,i,a,o){var s=gd(n.expression);if(!X_(t,s))return $_(t,s)?r:e;if(34!==i&&36!==i||(o=!o),1&e.flags&&"function"===a.text)return e;var c=o?vr.get(a.text)||128:br.get(a.text)||32768;return ad(o?Td(e,function(e){if(2&e.flags&&"object"===a.text)return Ac([Fe,me]);var t="function"===a.text?Ye:Dr.get(a.text);if(t){if(tl(e,t))return e;if(tl(t,e))return t;if(63176704&e.flags){var r=Po(e)||ce;if(tl(t,r))return Mc([e,t])}}return e}):e,c)}function k(t,r,n,i){var a=hd(r);if(!a.length)return t;var o=a.slice(n,i),s=n===i||e.contains(o,ke);if(2&t.flags&&!s){for(var c=void 0,u=0;u<o.length;u+=1){var l=o[u];if(67239932&l.flags)void 0!==c&&c.push(l);else{if(!(524288&l.flags))return t;void 0===c&&(c=o.slice(0,u)),c.push(Fe)}}return Ac(void 0===c?o:c)}var _=Ac(o),d=131072&_.flags?ke:Ed(Sd(t,function(e){return al(_,e)}),_);if(!s)return d;var p=Sd(t,function(t){return!(Gl(t)&&e.contains(a,gu(t)))});return 131072&d.flags?p:Ac([d,p])}function N(e,t,r,n){if(!r)return Sd(e,function(e){return!n(e,t)});if(1048576&e.flags){var i=Sd(e,function(e){return n(e,t)});if(!(131072&i.flags))return i}return tl(t,e)?t:rl(e,t)?e:rl(t,e)?t:Mc([e,t])}function A(n,i,a){if(!function(e,t){if(e.arguments)for(var r=0,n=e.arguments;r<n.length;r++)if(td(t,n[r]))return!0;return!(189!==e.expression.kind||!td(t,e.expression.expression))}(i,t)||!Rd(i))return n;var o=ds(um(i));if(!o)return n;if(Ei(n)&&(o.type===Ge||o.type===Ye))return n;if(e.isIdentifierTypePredicate(o)){var s=i.arguments[o.parameterIndex];if(s){if(X_(t,s))return N(n,o.type,a,tl);if($_(t,s))return r}}else{var c=e.skipParentheses(i.expression);if(e.isAccessExpression(c)){var u=e.skipParentheses(c.expression);if(X_(t,u))return N(n,o.type,a,tl);if($_(t,u))return r}}return n}function F(e,t,r){switch(t.kind){case 72:case 100:case 98:case 189:case 190:return x(e,t,r);case 191:return A(e,t,r);case 195:return F(e,t.expression,r);case 204:return T(e,t,r);case 202:if(52===t.operator)return F(e,t.operand,!r)}return e}}function jd(t){return e.findAncestor(t.parent,function(t){return e.isFunctionLike(t)&&!e.getImmediatelyInvokedFunctionExpression(t)||245===t.kind||284===t.kind||154===t.kind})}function Jd(t){var r,n=e.getRootDeclaration(t.valueDeclaration).parent,i=Vr(n);return 8388608&i.flags||(i.flags|=8388608,r=n,e.findAncestor(r.parent,function(t){return e.isFunctionLike(t)&&!!(8388608&Vr(t).flags)})||zd(n)),t.isAssigned||!1}function zd(t){if(72===t.kind){if(e.isAssignmentTarget(t)){var r=G_(t);r.valueDeclaration&&151===e.getRootDeclaration(r.valueDeclaration).kind&&(r.isAssigned=!0)}}else e.forEachChild(t,zd)}function Kd(e){return 3&e.flags&&0!=(2&sf(e))&&aa(e)!==ot}function Ud(e){var t=e.parent;return 189===t.kind||191===t.kind&&t.expression===e||190===t.kind&&t.expression===e||186===t.kind&&t.name===e&&!!t.initializer}function Vd(e){return 58982400&e.flags&&Zm(Po(e)||Oe,98304)}function qd(e,t){return e&&Ud(t)&&Dd(e,Vd)?Td(h_(e),wo):e}function Wd(e,t){!ln(e,67220415)||Y_(t)||Wh(dn(e))||fn(e)}function Hd(t){var r=G_(t);if(r===oe)return _e;if(r===G){var n=e.getContainingFunction(t);return P<2&&(197===n.kind?Pr(t,e.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression):e.hasModifier(n,256)&&Pr(t,e.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method)),Vr(n).flags|=8192,aa(r)}t.parent&&e.isPropertyAccessExpression(t.parent)&&t.parent.expression===t||Wd(r,t);var i=Rn(r),a=i.valueDeclaration;if(32&i.flags)if(240===a.kind&&e.nodeIsDecorated(a))for(n=e.getContainingClass(t);void 0!==n;){if(n===a&&n.name!==t){Vr(a).flags|=16777216,Vr(t).flags|=33554432;break}n=e.getContainingClass(n)}else if(209===a.kind)for(n=e.getThisContainer(t,!1);284!==n.kind;){if(n.parent===a){154===n.kind&&e.hasModifier(n,32)&&(Vr(a).flags|=16777216,Vr(t).flags|=33554432);break}n=e.getThisContainer(n,!1)}!function(t,r){if(!(P>=2||0==(34&r.flags)||e.isSourceFile(r.valueDeclaration)||274===r.valueDeclaration.parent.kind)){for(var n=e.getEnclosingBlockScopeContainer(r.valueDeclaration),i=function(t,r){return!!e.findAncestor(t,function(t){return t===r?"quit":e.isFunctionLike(t)})}(t.parent,n),a=n,o=!1;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}if(o){if(i){var s=!0;if(e.isForStatement(n)&&e.getAncestor(r.valueDeclaration,238).parent===n){var c=function(t,r){return e.findAncestor(t,function(e){return e===r?"quit":e===r.initializer||e===r.condition||e===r.incrementor||e===r.statement})}(t.parent,n);if(c){var u=Vr(c);u.flags|=131072;var l=u.capturedBlockScopeBindings||(u.capturedBlockScopeBindings=[]);e.pushIfUnique(l,r),c===n.initializer&&(s=!1)}}s&&(Vr(a).flags|=65536)}225===n.kind&&e.getAncestor(r.valueDeclaration,238).parent===n&&function(t,r){for(var n=t;195===n.parent.kind;)n=n.parent;var i=!1;if(e.isAssignmentTarget(n))i=!0;else if(202===n.parent.kind||203===n.parent.kind){var a=n.parent;i=44===a.operator||45===a.operator}return!!i&&!!e.findAncestor(n,function(e){return e===r?"quit":e===r.statement})}(t,n)&&(Vr(r.valueDeclaration).flags|=4194304),Vr(r.valueDeclaration).flags|=524288}i&&(Vr(r.valueDeclaration).flags|=262144)}}(t,r);var o=qd(aa(i),t),s=e.getAssignmentTargetKind(t);if(s){if(!(3&i.flags||e.isInJSFile(t)&&512&i.flags))return Pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,ci(r)),_e;if(Gm(i))return 3&i.flags?Pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant,ci(r)):Pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,ci(r)),_e}var c=2097152&i.flags;if(3&i.flags){if(1===s)return o}else{if(!c)return o;a=e.find(r.declarations,p)}if(!a)return o;for(var u=151===e.getRootDeclaration(a).kind,l=jd(a),_=jd(t),d=_!==l,f=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&ld(t.parent.parent),m=134217728&r.flags;_!==l&&(196===_.kind||197===_.kind||e.isObjectLiteralOrClassExpressionMethod(_))&&(Kd(i)||u&&!Jd(i));)_=jd(_);var g=u||c||d||f||m||o!==ue&&o!==ot&&(!O||0!=(3&o.flags)||Y_(t)||257===t.parent.kind)||213===t.parent.kind||237===a.kind&&a.exclamationToken||4194304&a.flags,y=Bd(t,o,g?u?function(e,t){return O&&151===t.kind&&t.initializer&&32768&a_(e)&&!(32768&a_(kg(t.initializer)))?ad(e,524288):e}(o,a):o:o===ue||o===ot?pe:u_(o),_,!g);if(Ld(t)||o!==ue&&o!==ot){if(!g&&!(32768&a_(o))&&32768&a_(y))return Pr(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,ci(r)),o}else if(y===ue||y===ot)return B&&(Pr(e.getNameOfDeclaration(a),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,ci(r),li(y)),Pr(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,ci(r),li(y))),ky(y);return s?Xl(y):y}function Gd(e,t){Vr(e).flags|=2,154===t.kind||157===t.kind?Vr(t.parent).flags|=4:Vr(t).flags|=4}function Yd(t){return e.isSuperCall(t)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,Yd)}function Xd(e){var t=Vr(e);return void 0===t.hasSuperCall&&(t.superCall=Yd(e.body),t.hasSuperCall=!!t.superCall),t.superCall}function Qd(e){return ha(Na(In(e)))===ge}function $d(t,r,n){var i=r.parent;if(e.getClassExtendsHeritageElement(i)&&!Qd(i)){var a=Xd(r);(!a||a.end>t.pos)&&Pr(t,n)}}function Zd(t){var r=e.getThisContainer(t,!0),n=!1;switch(157===r.kind&&$d(t,r,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class),197===r.kind&&(r=e.getThisContainer(r,!1),n=!0),r.kind){case 244:Pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 243:Pr(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 157:tp(t,r)&&Pr(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 154:case 153:e.hasModifier(r,32)&&Pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 149:Pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}n&&P<2&&Gd(t,r);var i=ep(t,!0,r);if(j){var a=aa(W);if(i===a&&n)Pr(t,e.Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this);else if(!i){var o=Pr(t,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!e.isSourceFile(r)){var s=ep(r);s&&s!==a&&e.addRelatedInfo(o,e.createDiagnosticForNode(r,e.Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container))}}}return i||ce}function ep(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=e.getThisContainer(t,!1));var i=e.isInJSFile(t);if(e.isFunctionLike(n)&&(!cp(t)||e.getThisParameter(n))){var a=function(t){return 196===t.kind&&e.isBinaryExpression(t.parent)&&3===e.getAssignmentDeclarationKind(t.parent)?t.parent.left.expression.expression:156===t.kind&&188===t.parent.kind&&e.isBinaryExpression(t.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent)?t.parent.parent.left.expression:196===t.kind&&275===t.parent.kind&&188===t.parent.parent.kind&&e.isBinaryExpression(t.parent.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent.parent)?t.parent.parent.parent.left.expression:196===t.kind&&e.isPropertyAssignment(t.parent)&&e.isIdentifier(t.parent.name)&&("value"===t.parent.name.escapedText||"get"===t.parent.name.escapedText||"set"===t.parent.name.escapedText)&&e.isObjectLiteralExpression(t.parent.parent)&&e.isCallExpression(t.parent.parent.parent)&&t.parent.parent.parent.arguments[2]===t.parent.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent.parent)?t.parent.parent.parent.arguments[0].expression:e.isMethodDeclaration(t)&&e.isIdentifier(t.name)&&("value"===t.name.escapedText||"get"===t.name.escapedText||"set"===t.name.escapedText)&&e.isObjectLiteralExpression(t.parent)&&e.isCallExpression(t.parent.parent)&&t.parent.parent.arguments[2]===t.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent)?t.parent.parent.arguments[0].expression:void 0}(n);if(i&&a){var o=kg(a).symbol;if(o&&o.members&&16&o.flags&&(s=dm(o)))return Bd(t,s)}else if(i&&(196===n.kind||239===n.kind)&&e.getJSDocClassTag(n)){var s;if(s=dm(wn(n.symbol)))return Bd(t,s)}var c=Zi(n)||ap(n);if(c)return Bd(t,c)}if(e.isClassLike(n.parent)){var u,l=In(n.parent);return Bd(t,u=e.hasModifier(n,32)?aa(l):Na(l).thisType)}if(i&&(u=function(t){var r=e.getJSDocType(t);if(r&&294===r.kind){var n=r;if(n.parameters.length>0&&n.parameters[0].name&&"this"===n.parameters[0].name.escapedText)return Du(n.parameters[0].type)}var i=e.getJSDocThisTag(t);if(i&&i.typeExpression)return Du(i.typeExpression)}(n))&&u!==_e)return Bd(t,u);if(e.isSourceFile(n)){if(n.commonJsModuleIndicator){var _=In(n);return _&&aa(_)}if(r)return aa(W)}}function tp(t,r){return!!e.findAncestor(t,function(t){return e.isFunctionLikeDeclaration(t)?"quit":151===t.kind&&t.parent===r})}function rp(t){var r=191===t.parent.kind&&t.parent.expression===t,n=e.getSuperContainer(t,!0),i=!1;if(!r)for(;n&&197===n.kind;)n=e.getSuperContainer(n,!0),i=P<2;var a=0;if(!function(t){return!!t&&(r?157===t.kind:!(!e.isClassLike(t.parent)&&188!==t.parent.kind)&&(e.hasModifier(t,32)?156===t.kind||155===t.kind||158===t.kind||159===t.kind:156===t.kind||155===t.kind||158===t.kind||159===t.kind||154===t.kind||153===t.kind||157===t.kind))}(n)){var o=e.findAncestor(t,function(e){return e===n?"quit":149===e.kind});return o&&149===o.kind?Pr(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):r?Pr(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):n&&n.parent&&(e.isClassLike(n.parent)||188===n.parent.kind)?Pr(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):Pr(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),_e}if(r||157!==n.kind||$d(t,n,e.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),a=e.hasModifier(n,32)||r?512:256,Vr(t).flags|=a,156===n.kind&&e.hasModifier(n,256)&&(e.isSuperProperty(t.parent)&&e.isAssignmentTarget(t.parent)?Vr(n).flags|=4096:Vr(n).flags|=2048),i&&Gd(t.parent,n),188===n.parent.kind)return P<2?(Pr(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),_e):ce;var s=n.parent;if(!e.getClassExtendsHeritageElement(s))return Pr(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),_e;var c=Na(In(s)),u=c&&va(c)[0];return u?157===n.kind&&tp(t,n)?(Pr(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),_e):512===a?ha(c):Ha(u,c.thisType):_e}function np(t){return 4&e.getObjectFlags(t)&&t.target===it?t.typeArguments[0]:void 0}function ip(t){return Td(t,function(t){return 2097152&t.flags?e.forEach(t.types,np):np(t)})}function ap(t){if(197!==t.kind){if(Yu(t)){var r=Fp(t);if(r){var n=r.thisParameter;if(n)return aa(n)}}var i=e.isInJSFile(t);if(j||i){var a=function(e){return 156!==e.kind&&158!==e.kind&&159!==e.kind||188!==e.parent.kind?196===e.kind&&275===e.parent.kind?e.parent.parent:void 0:e.parent}(t);if(a){for(var o=bp(a),s=a,c=o;c;){var u=ip(c);if(u)return Ku(u,A_(Sp(a)));if(275!==s.parent.kind)break;c=bp(s=s.parent.parent)}return o?l_(o):dg(a)}var l=t.parent;if(204===l.kind&&59===l.operatorToken.kind){var _=l.left;if(189===_.kind||190===_.kind){var d=_.expression;if(i&&e.isIdentifier(d)){var p=e.getSourceFileOfNode(l);if(p.commonJsModuleIndicator&&G_(d)===p.symbol)return}return dg(d)}}}}}function op(t){var r=t.parent;if(Yu(r)){var n=e.getImmediatelyInvokedFunctionExpression(r);if(n&&n.arguments){var i=Wf(n),a=r.parameters.indexOf(t);if(t.dotDotDotToken)return Jf(i,a,i.length,ce,void 0);var o=Vr(n),s=o.resolvedSignature;o.resolvedSignature=Pt;var c=a<i.length?Ql(kg(i[a])):t.initializer?void 0:fe;return o.resolvedSignature=s,c}var u=Fp(r);if(u){var l=r.parameters.indexOf(t)-(e.getThisParameter(r)?1:0);return t.dotDotDotToken&&e.lastOrUndefined(r.parameters)===t?Cm(u,l):Tm(u,l)}}}function sp(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Du(r);switch(t.kind){case 151:return op(t);case 186:return function(t){var r=t.parent.parent,n=t.propertyName||t.name,i=sp(r);if(i&&!e.isBindingPattern(n)&&!Ni(n)){var a=Rc(n);if(Ra(a)){var o=Ka(a);return Ci(i,o)}}}(t)}}function cp(t){for(var r=!1;t.parent&&!e.isFunctionLike(t.parent);){if(e.isParameter(t.parent)&&(r||t.parent.initializer===t))return!0;e.isBindingElement(t.parent)&&t.parent.initializer===t&&(r=!0),t=t.parent}return!1}function up(e){var t=fs(e);if(t)return t;var r=Np(e);return r&&!function(e){return!e.resolvedReturnType&&Di(e,3)>=0}(r)?ps(r):void 0}function lp(e,t){var r=Wf(e).indexOf(t);return-1===r?void 0:_p(e,r)}function _p(t,r){var n=Vr(t).resolvedSignature===It?It:um(t);return e.isJsxOpeningLikeElement(t)&&0===r?Tp(n,t):Sm(n,r)}function dp(t){var r=t.parent,n=r.left,i=r.operatorToken,a=r.right;switch(i.kind){case 59:if(t!==a)return;var o=function(t){var r=e.getAssignmentDeclarationKind(t);switch(r){case 0:return!0;case 5:case 1:case 6:case 3:if(t.left.symbol){var n=t.left.symbol.valueDeclaration;if(!n)return!1;var i=t.left,a=e.getEffectiveTypeAnnotationNode(n);if(a)return Du(a);if(e.isIdentifier(i.expression)){var o=i.expression,s=Gr(o,o.escapedText,67220415,void 0,o.escapedText,!0);if(s){var c=e.getEffectiveTypeAnnotationNode(s.valueDeclaration);if(c){var u=pp(Du(c),i.name.escapedText);return u||!1}return!1}}return!e.isInJSFile(n)}return!0;case 2:case 4:if(!t.symbol)return!0;if(t.symbol.valueDeclaration){var c=e.getEffectiveTypeAnnotationNode(t.symbol.valueDeclaration);if(c){var u=Du(c);if(u)return u}}if(2===r)return!1;var l=t.left;if(!e.isObjectLiteralMethod(e.getThisContainer(l.expression,!1)))return!1;var _=Zd(l.expression);return _&&pp(_,l.name.escapedText)||!1;case 7:case 8:case 9:return e.Debug.fail("Does not apply");default:return e.Debug.assertNever(r)}}(r);if(!o)return;return!0===o?Cg(n):o;case 55:var s=xp(r);return s||t!==a||e.isDefaultedExpandoInitializer(r)?s:Cg(n);case 54:case 27:return t===a?xp(r):void 0;default:return}}function pp(t,r){return Td(t,function(t){if(bo(t)){var n=_o(t),i=Po(n)||n,a=hu(e.unescapeLeadingUnderscores(r));if(rl(a,i))return Yc(t,a)}else if(3670016&t.flags){var o=Ko(t,r);if(o)return aa(o);if(e_(t)){var s=t_(t);if(s&&Lp(r)&&+r>=0)return s}return Lp(r)&&fp(t,1)||fp(t,0)}},!0)}function fp(e,t){return Td(e,function(e){return Wo(e,t)},!0)}function mp(e){var t=bp(e.parent);if(t){if(!za(e)){var r=pp(t,In(e).escapedName);if(r)return r}return Op(e.name)&&fp(t,1)||fp(t,0)}}function gp(e,t){return e&&(pp(e,""+t)||jy(e,void 0,!1,!1,!1))}function yp(t){var r=t.parent;return e.isJsxAttributeLike(r)?xp(t):e.isJsxElement(r)?function(e,t){var r=bp(e.openingElement.tagName),n=Qp(Yp(e));if(r&&!Ei(r)&&n&&""!==n){var i=e.children.indexOf(t),a=pp(r,n);return a&&Td(a,function(e){return Ul(e)?Xc(e,hu(i)):e},!0)}}(r,t):void 0}function hp(t){if(e.isJsxAttribute(t)){var r=bp(t.parent);if(!r||Ei(r))return;return pp(r,t.name.escapedText)}return xp(t.parent)}function vp(e){switch(e.kind){case 10:case 8:case 9:case 14:case 102:case 87:case 96:case 72:case 141:return!0;case 189:case 195:return vp(e.expression);case 270:return!e.expression||vp(e.expression)}return!1}function bp(t){var r=Dp(xp(t),t);if(r){var n=Td(r,Bo,!0);if(1048576&n.flags){if(e.isObjectLiteralExpression(t))return function(t,r){return Tl(r,e.map(e.filter(t.properties,function(e){return!!e.symbol&&275===e.kind&&vp(e.initializer)&&ed(r,e.symbol.escapedName)}),function(e){return[function(){return kg(e.initializer)},e.symbol.escapedName]}),rl,r)}(t,n);if(e.isJsxAttributes(t))return function(t,r){return Tl(r,e.map(e.filter(t.properties,function(e){return!!e.symbol&&267===e.kind&&ed(r,e.symbol.escapedName)&&(!e.initializer||vp(e.initializer))}),function(e){return[e.initializer?function(){return kg(e.initializer)}:function(){return xe},e.symbol.escapedName]}),rl,r)}(t,n)}return n}}function Dp(t,r){if(t&&Zm(t,63176704)){var n=Sp(r);if(n&&n.returnMapper)return function t(r,n){return 63176704&r.flags?Ku(r,n):1048576&r.flags?Ac(e.map(r.types,function(e){return t(e,n)}),0):2097152&r.flags?Mc(e.map(r.types,function(e){return t(e,n)})):r}(t,n.returnMapper)}return t}function xp(t){if(!(8388608&t.flags)){if(t.contextualType)return t.contextualType;var r=t.parent;switch(r.kind){case 237:case 151:case 154:case 153:case 186:return function(t){var r=t.parent;if(e.hasInitializer(r)&&t===r.initializer){var n=sp(r);if(n)return n;if(e.isBindingPattern(r.name))return qi(r.name,!0,!1)}}(t);case 197:case 230:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r);if(1&n)return;var i=up(r);if(i){if(2&n){var a=Gg(i);return a&&Ac([a,Lm(a)])}return i}}}(t);case 207:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r),i=up(r);if(i)return t.asteriskToken?i:Uy(i,0!=(2&n))}}(r);case 201:return function(e){var t=xp(e);if(t){var r=Qg(t);return r&&Ac([r,Lm(r)])}}(r);case 191:case 192:return lp(r,t);case 194:case 212:return e.isConstTypeReference(r.type)?void 0:Du(r.type);case 204:return dp(t);case 275:case 276:return mp(r);case 277:return bp(r.parent);case 187:var n=r;return gp(bp(n),e.indexOfNode(n.elements,t));case 205:return function(e){var t=e.parent;return e===t.whenTrue||e===t.whenFalse?xp(t):void 0}(t);case 216:return e.Debug.assert(206===r.parent.kind),function(e,t){if(193===e.parent.kind)return lp(e.parent,t)}(r.parent,t);case 195:var i=e.isInJSFile(r)?e.getJSDocTypeTag(r):void 0;return i?Du(i.typeExpression.type):xp(r);case 270:return yp(r);case 267:case 269:return hp(r);case 262:case 261:return function(t){return e.isJsxOpeningElement(t)&&t.parent.contextualType?t.parent.contextualType:_p(t,0)}(r)}}}function Sp(t){var r=e.findAncestor(t,function(e){return!!e.inferenceContext});return r&&r.inferenceContext}function Tp(r,n){return 0!==Kf(n)?function(e,r){var n=wm(e,Oe);n=Cp(r,Yp(r),n);var i=Hp(t.IntrinsicAttributes,r);return i!==_e&&(n=no(i,n)),n}(r,n):function(r,n){var i,a=Yp(n),o=(i=a,Xp(t.ElementAttributesPropertyNameContainer,i)),s=void 0===o?wm(r,Oe):""===o?ps(r):function(e,t){if(e.unionSignatures){for(var r=[],n=0,i=e.unionSignatures;n<i.length;n++){var a=i[n],o=ps(a);if(Ei(o))return o;var s=Ci(o,t);if(!s)return;r.push(s)}return Mc(r)}var c=ps(e);return Ei(c)?c:Ci(c,t)}(r,o);if(!s)return o&&e.length(n.attributes.properties)&&Pr(n,e.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,e.unescapeLeadingUnderscores(o)),Oe;if(Ei(s=Cp(n,a,s)))return s;var c=s,u=Hp(t.IntrinsicClassAttributes,n);if(u!==_e){var l=da(u.symbol),_=ps(r);c=no(l?Is(u,as([_],l,is(l),e.isInJSFile(n))):u,c)}var d=Hp(t.IntrinsicAttributes,n);return d!==_e&&(c=no(d,c)),c}(r,n)}function Cp(r,n,i){var a,o=(a=n)&&Wr(a.exports,t.LibraryManagedAttributes,67897832);if(o){var s=Na(o),c=function(e){if(Up(e.tagName))return Ss(om(e,t=Zp(e)));var t,r=dg(e.tagName);return 128&r.flags?(t=$p(r,e))?Ss(om(e,t)):_e:r}(r);if(e.length(s.typeParameters)>=2)return Is(s,u=as([c,i],s.typeParameters,2,e.isInJSFile(r)));if(e.length(s.aliasTypeArguments)>=2){var u=as([c,i],s.aliasTypeArguments,2,e.isInJSFile(r));return Rs(s.aliasSymbol,u)}}return i}function Ep(t,r){var n=Vo(t,0);if(1===n.length){var i=n[0];if(!function(t,r){for(var n=0;n<r.parameters.length;n++){var i=r.parameters[n];if(i.initializer||i.questionToken||i.dotDotDotToken||$o(i))break}return r.parameters.length&&e.parameterIsThisKeyword(r.parameters[0])&&n--,!Nm(t)&&Em(t)<n}(i,r))return i}}function kp(e){return 196===e.kind||197===e.kind}function Np(t){return kp(t)||e.isObjectLiteralMethod(t)?Fp(t):void 0}function Ap(t){return e.isObjectLiteralMethod(t)?function(t){if(e.Debug.assert(e.isObjectLiteralMethod(t)),!(8388608&t.flags))return mp(t)}(t):bp(t)}function Fp(t){e.Debug.assert(156!==t.kind||e.isObjectLiteralMethod(t));var r=ss(t);if(r)return r;var n=Ap(t);if(n){if(!(1048576&n.flags))return Ep(n,t);for(var i,a=0,o=n.types;a<o.length;a++){var s=Ep(o[a],t);if(s)if(i){if(!Bl(i[0],s,!1,!0,!0,$u))return;i.push(s)}else i=[s]}return i&&Qa(i[0],i)}}function Pp(e){return 186===e.kind&&!!e.initializer||204===e.kind&&59===e.operatorToken.kind}function wp(t,r,n){for(var i=t.elements,a=i.length,o=!1,s=[],c=e.isAssignmentTarget(t),u=bp(t),l=gg(t),_=0;_<a;_++){var d=i[_];if(c&&208===d.kind){var p=kg(d.expression,r,n),f=Go(p,1)||jy(p,void 0,!1,!1,!1);f&&s.push(f)}else{var m=yg(d,r,gp(u,_),n);s.push(m)}_<a-1&&208===d.kind&&(o=!0)}if(!o){var g=a>0&&208===i[a-1].kind,y=a-(g?1:0),h=void 0;if(c&&y>0)return(m=Os(Dc(s,y,g))).pattern=t,m;if(h=Ip(s,u,g,a,l))return h;if(n)return Dc(s,y,g)}return hc(s.length?Ac(s,2):O?Ae:fe,l)}function Ip(t,r,n,i,a){if(void 0===i&&(i=t.length),void 0===a&&(a=!1),a||r&&Dd(r,ql)){var o=i-(n?1:0),s=r&&r.pattern;if(!n&&s&&(185===s.kind||187===s.kind))for(var c=s.elements,u=i;u<c.length;u++){var l=c[u];Pp(l)?t.push(r.typeArguments[u]):(u<c.length-1||!(186===l.kind&&l.dotDotDotToken||208===l.kind))&&(210!==l.kind&&Pr(l,e.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),t.push(O?Ae:fe))}return Dc(t,o,n,a)}}function Op(e){switch(e.kind){case 149:return function(e){return eg(Rp(e),296)}(e);case 72:return Lp(e.escapedText);case 8:case 10:return Lp(e.text);default:return!1}}function Mp(e){return"Infinity"===e||"-Infinity"===e||"NaN"===e}function Lp(e){return(+e).toString()===e}function Rp(t){var r=Vr(t.expression);return r.resolvedType||(r.resolvedType=kg(t.expression),98304&r.resolvedType.flags||!eg(r.resolvedType,12716)&&!rl(r.resolvedType,Pe)?Pr(t,e.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any):Nf(t.expression,r.resolvedType,!0)),r.resolvedType}function Bp(e,t,r,n){for(var i=[],a=0;a<r.length;a++)(0===n||Op(e.properties[a+t].name))&&i.push(aa(r[a]));return Es(i.length?Ac(i,2):pe,gg(e))}function jp(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=Ur(t);if(!r.immediateTarget){var n=rn(t);if(!n)return e.Debug.fail();r.immediateTarget=un(n,!0)}return r.immediateTarget}function Jp(t,r){var n,i=e.isAssignmentTarget(t);!function(t,r){var n;!function(e){e[e.Property=1]="Property",e[e.GetAccessor=2]="GetAccessor",e[e.SetAccessor=4]="SetAccessor",e[e.GetOrSetAccessor=6]="GetOrSetAccessor"}(n||(n={}));for(var i=e.createUnderscoreEscapedMap(),a=0,o=t.properties;a<o.length;a++){var s=o[a];if(277!==s.kind){var c=s.name;if(149===c.kind&&Cv(c),276===s.kind&&!r&&s.objectAssignmentInitializer)return jv(s.equalsToken,e.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);if(s.modifiers)for(var u=0,l=s.modifiers;u<l.length;u++){var _=l[u];121===_.kind&&156===s.kind||jv(_,e.Diagnostics._0_modifier_cannot_be_used_here,e.getTextOfNode(_))}var d=void 0;switch(s.kind){case 276:Nv(s.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);case 275:kv(s.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional),8===c.kind&&zv(c);case 156:d=1;break;case 158:d=2;break;case 159:d=4;break;default:throw e.Debug.assertNever(s,"Unexpected syntax kind:"+s.kind)}var p=e.getPropertyNameForPropertyNameNode(c);if(void 0!==p){var f=i.get(p);if(f)if(1===d&&1===f)jv(c,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(c));else{if(!(6&d&&6&f))return jv(c,e.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);if(6===f||d===f)return jv(c,e.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);i.set(p,d|f)}else i.set(p,d)}}}}(t,i);var a=[],o=Oe,s=bp(t),c=s&&s.pattern&&(184===s.pattern.kind||188===s.pattern.kind),u=gg(t),l=u?8:0,_=e.isInJSFile(t)&&!e.isInJsonFile(t),d=e.getJSDocEnumTag(t),p=!s&&_&&!d,f=z,m=!1,g=!1,y=!1;n=e.createSymbolTable();for(var h=0,v=0;v<t.properties.length;v++){var b=t.properties[v],D=In(b),x=b.name&&149===b.name.kind&&!e.isWellKnownSymbolSyntactically(b.name.expression)?Rp(b.name):void 0;if(275===b.kind||276===b.kind||e.isObjectLiteralMethod(b)){var S=275===b.kind?hg(b,r):276===b.kind?yg(b.name,r):vg(b,r);if(_){var T=Oi(b);T?(ol(S,T,b),S=T):d&&d.typeExpression&&ol(S,Du(d.typeExpression),b)}f|=917504&e.getObjectFlags(S);var C=x&&Ra(x)?x:void 0,E=C?Ir(4|D.flags,Ka(C),2048|l):Ir(4|D.flags,D.escapedName,l);if(C&&(E.nameType=C),i)(275===b.kind&&Pp(b.initializer)||276===b.kind&&b.objectAssignmentInitializer)&&(E.flags|=16777216);else if(c&&!(512&e.getObjectFlags(s))){var k=Ko(s,D.escapedName);k?E.flags|=16777216&k.flags:F.suppressExcessPropertyErrors||Ho(s,0)||Pr(b.name,e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,ci(D),li(s))}E.declarations=D.declarations,E.parent=D.parent,D.valueDeclaration&&(E.valueDeclaration=D.valueDeclaration),E.type=S,E.target=D,D=E}else{if(277===b.kind){if(P<2&&pv(b,2),a.length>0&&(o=lu(o,w(),t.symbol,f,u),a=[],n=e.createSymbolTable(),g=!1,y=!1),!zp(S=kg(b.expression)))return Pr(b,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),_e;o=lu(o,S,t.symbol,f,u),h=v+1;continue}e.Debug.assert(158===b.kind||159===b.kind),hh(b)}!x||8576&x.flags?n.set(D.escapedName,D):rl(x,Pe)&&(rl(x,he)?y=!0:g=!0,i&&(m=!0)),a.push(D)}if(c)for(var N=0,A=Co(s);N<A.length;N++)E=A[N],n.get(E.escapedName)||o&&Ko(o,E.escapedName)||(16777216&E.flags||Pr(E.valueDeclaration||E.bindingElement,e.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),n.set(E.escapedName,E),a.push(E));return o!==Oe?(a.length>0&&(o=lu(o,w(),t.symbol,f,u)),o):w();function w(){var r=g?Bp(t,h,a,0):void 0,o=y?Bp(t,h,a,1):void 0,s=Yn(t.symbol,n,e.emptyArray,e.emptyArray,r,o);return s.objectFlags|=262272|f,p&&(s.objectFlags|=16384),m&&(s.objectFlags|=512),i&&(s.pattern=t),s}}function zp(t){return!!(126615555&t.flags||117632&a_(t)&&zp(o_(t))||3145728&t.flags&&e.every(t.types,zp))}function Kp(t){return!e.stringContains(t,"-")}function Up(t){return 72===t.kind&&e.isIntrinsicJsxName(t.escapedText)}function Vp(e,t){return e.initializer?yg(e.initializer,t):xe}function qp(e,t){for(var r=[],n=0,i=e.children;n<i.length;n++){var a=i[n];11===a.kind?a.containsOnlyTriviaWhiteSpaces||r.push(ye):r.push(yg(a,t))}return r}function Wp(t,r){return function(t,r){for(var n,i=t.attributes,a=e.createSymbolTable(),o=Me,s=!1,c=!1,u=4096,l=Qp(Yp(t)),_=0,d=i.properties;_<d.length;_++){var p=d[_],f=p.symbol;if(e.isJsxAttribute(p)){var m=Vp(p,r);u|=917504&e.getObjectFlags(m);var g=Ir(33554436|f.flags,f.escapedName);g.declarations=f.declarations,g.parent=f.parent,f.valueDeclaration&&(g.valueDeclaration=f.valueDeclaration),g.type=m,g.target=f,a.set(g.escapedName,g),p.name.escapedText===l&&(c=!0)}else e.Debug.assert(269===p.kind),a.size>0&&(o=lu(o,S(),i.symbol,u,!1),a=e.createSymbolTable()),Ei(m=dg(p.expression,r))&&(s=!0),zp(m)?o=lu(o,m,i.symbol,u,!1):n=n?Mc([n,m]):m}s||a.size>0&&(o=lu(o,S(),i.symbol,u,!1));var y=260===t.parent.kind?t.parent:void 0;if(y&&y.openingElement===t&&y.children.length>0){var h=qp(y,r);if(!s&&l&&""!==l){c&&Pr(i,e.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,e.unescapeLeadingUnderscores(l));var v=bp(t.attributes),b=v&&pp(v,l),D=Ir(33554436,l);D.type=1===h.length?h[0]:Ip(h,b,!1)||hc(Ac(h)),D.valueDeclaration=e.createPropertySignature(void 0,e.unescapeLeadingUnderscores(l),void 0,void 0,void 0),D.valueDeclaration.parent=i,D.valueDeclaration.symbol=D;var x=e.createSymbolTable();x.set(l,D),o=lu(o,Yn(i.symbol,x,e.emptyArray,e.emptyArray,void 0,void 0),i.symbol,u,!1)}}return s?ce:n&&o!==Me?Mc([n,o]):n||(o===Me?S():o);function S(){u|=z;var t=Yn(i.symbol,a,e.emptyArray,e.emptyArray,void 0,void 0);return t.objectFlags|=262272|u,t}}(t.parent,r)}function Hp(e,t){var r=Yp(t),n=r&&Nn(r),i=n&&Wr(n,e,67897832);return i?Na(i):_e}function Gp(r){var n=Vr(r);if(!n.resolvedSymbol){var i=Hp(t.IntrinsicElements,r);if(i!==_e){if(!e.isIdentifier(r.tagName))return e.Debug.fail();var a=Ko(i,r.tagName.escapedText);return a?(n.jsxFlags|=1,n.resolvedSymbol=a):Go(i,0)?(n.jsxFlags|=2,n.resolvedSymbol=i.symbol):(Pr(r,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.idText(r.tagName),"JSX."+t.IntrinsicElements),n.resolvedSymbol=oe)}return B&&Pr(r,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,e.unescapeLeadingUnderscores(t.IntrinsicElements)),n.resolvedSymbol=oe}return n.resolvedSymbol}function Yp(e){var r=e&&Vr(e);if(r&&r.jsxNamespace)return r.jsxNamespace;if(!r||!1!==r.jsxNamespace){var n=Fr(e),i=Gr(e,n,1920,void 0,n,!1);if(i){var a=_n(Wr(Nn(_n(i)),t.JSX,1920));if(a)return r&&(r.jsxNamespace=a),a;r&&(r.jsxNamespace=!1)}}return ec(t.JSX,1920,void 0)}function Xp(t,r){var n=r&&Wr(r.exports,t,67897832),i=n&&Na(n),a=i&&Co(i);if(a){if(0===a.length)return"";if(1===a.length)return a[0].escapedName;a.length>1&&Pr(n.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,e.unescapeLeadingUnderscores(t))}}function Qp(e){return Xp(t.ElementChildrenAttributeNameContainer,e)}function $p(r,n){var i=Hp(t.IntrinsicElements,n);if(i!==_e){var a=r.value,o=Ko(i,e.escapeLeadingUnderscores(a));if(o)return aa(o);var s=Go(i,0);return s||void 0}return ce}function Zp(t){e.Debug.assert(Up(t.tagName));var r=Vr(t);if(!r.resolvedJsxElementAttributesType){var n=Gp(t);return 1&r.jsxFlags?r.resolvedJsxElementAttributesType=aa(n):2&r.jsxFlags?r.resolvedJsxElementAttributesType=ks(n,0).type:r.resolvedJsxElementAttributesType=_e}return r.resolvedJsxElementAttributesType}function ef(e){var r=Hp(t.ElementClass,e);if(r!==_e)return r}function tf(e){return Hp(t.Element,e)}function rf(e){var t=tf(e);if(t)return Ac([t,me])}function nf(t){var r,n=e.isJsxOpeningLikeElement(t);n&&function(t){Dv(t,t.typeArguments);for(var r=e.createUnderscoreEscapedMap(),n=0,i=t.attributes.properties;n<i.length;n++){var a=i[n];if(269!==a.kind){var o=a.name,s=a.initializer;if(r.get(o.escapedText))return jv(o,e.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(r.set(o.escapedText,!0),s&&270===s.kind&&!s.expression)return jv(s,e.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}}(t),r=t,0===(F.jsx||0)&&Pr(r,e.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===tf(r)&&B&&Pr(r,e.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);var i=cr&&2===F.jsx?e.Diagnostics.Cannot_find_name_0:void 0,a=Fr(t),o=Gr(n?t.tagName:t,a,67220415,i,a,!0);if(o&&(o.isReferenced=67108863,2097152&o.flags&&!Wh(dn(o))&&fn(o)),n){var s=um(t);!function(t,r,n){if(1===t)(i=rf(n))&&Sl(r,i,Tr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);else if(0===t)(a=ef(n))&&Sl(r,a,Tr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);else{var i=rf(n),a=ef(n);if(!i||!a)return;Sl(r,Ac([i,a]),Tr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements)}}(Kf(t),ps(s),t)}}function af(e,t,r){if(524288&e.flags){var n=Do(e);if(n.stringIndexInfo||n.numberIndexInfo&&Lp(t)||So(e,t)||r&&!Kp(t))return!0}else if(3145728&e.flags&&of(e))for(var i=0,a=e.types;i<a.length;i++)if(af(a[i],t,r))return!0;return!1}function of(t){return!!(524288&t.flags&&!(512&e.getObjectFlags(t))||67108864&t.flags||1048576&t.flags&&e.some(t.types,of)||2097152&t.flags&&e.every(t.types,of))}function sf(t){return t.valueDeclaration?e.getCombinedNodeFlags(t.valueDeclaration):0}function cf(t){if(8192&t.flags||4&e.getCheckFlags(t))return!0;if(e.isInJSFile(t.valueDeclaration)){var r=t.valueDeclaration.parent;return r&&e.isBinaryExpression(r)&&3===e.getAssignmentDeclarationKind(r)}}function uf(t,r,n,i){var a,o=e.getDeclarationModifierFlagsFromSymbol(i),s=148===t.kind?t.right:183===t.kind?t:t.name;if(512&e.getCheckFlags(i))return Pr(s,e.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1,ci(i),li(n)),!1;if(r){if(P<2&&lf(i))return Pr(s,e.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(128&o)return Pr(s,e.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,ci(i),li(Ol(i))),!1}if(128&o&&e.isThisProperty(t)&&lf(i)&&(a=e.getClassLikeDeclarationOfSymbol(On(i)))&&function(t){return!!e.findAncestor(t,function(t){return!!(e.isConstructorDeclaration(t)&&e.nodeIsPresent(t.body)||e.isPropertyDeclaration(t))||!(!e.isClassLike(t)&&!e.isFunctionLikeDeclaration(t))&&"quit"})}(t))return Pr(s,e.Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,ci(i),e.getTextOfIdentifierOrLiteral(a.name)),!1;if(!(24&o))return!0;if(8&o)return!!Nh(t,a=e.getClassLikeDeclarationOfSymbol(On(i)))||(Pr(s,e.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1,ci(i),li(Ol(i))),!1);if(r)return!0;var c=kh(t,function(t){var r=Na(In(t));return function(t,r){return Il(r,function(r){return!!(16&e.getDeclarationModifierFlagsFromSymbol(r))&&!ca(t,Ol(r))})?void 0:t}(r,i)?r:void 0});if(!c){var u=void 0;if(32&o||!(u=function(t){var r=e.getThisContainer(t,!1);return r&&e.isFunctionLike(r)?e.getThisParameter(r):void 0}(t))||!u.type)return Pr(s,e.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,ci(i),li(Ol(i)||n)),!1;var l=Du(u.type);c=262144&l.flags?ko(l):l}return!!(32&o)||(262144&n.flags&&(n=n.isThisType?ko(n):Po(n)),!(!n||!ca(n,c))||(Pr(s,e.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1,ci(i),li(c)),!1))}function lf(e){return!!Il(e,function(e){return!(8192&e.flags)})}function _f(e,t,r,n){return pf(kg(e),e,t,r,n)}function df(e){return 98304&(O?a_(e):e.flags)?l_(e):e}function pf(t,r,n,i,a){if(2&t.flags)return Pr(r,e.Diagnostics.Object_is_of_type_unknown),_e;var o=98304&(O?a_(t):t.flags);if(o){Pr(r,32768&o?65536&o?a||e.Diagnostics.Object_is_possibly_null_or_undefined:i||e.Diagnostics.Object_is_possibly_undefined:n||e.Diagnostics.Object_is_possibly_null);var s=l_(t);return 229376&s.flags?_e:s}return t}function ff(e){return gf(e,e.expression,e.name)}function mf(e){return gf(e,e.left,e.right)}function gf(t,r,n){var i,a=_f(r),o=Vr(r).resolvedSymbol,s=Bo(h_(a));if(Ei(s)||s===Ne)return e.isIdentifier(r)&&o&&Wd(o,t),s;var c=e.getAssignmentTargetKind(t),u=Ko(s,n.escapedText);if(!e.isIdentifier(r)||!o||u&&Wh(u)||Wd(o,t),u){if(function(t,r,n){var i,a=t.valueDeclaration;if(a){var o=e.idText(n);!function(t){return!!e.findAncestor(t,function(t){switch(t.kind){case 154:return!0;case 275:case 156:case 158:case 159:case 277:case 149:case 216:case 270:case 267:case 268:case 269:case 262:case 211:case 273:return!1;default:return!e.isExpressionNode(t)&&"quit"}})}(r)||Hr(a,n)||function(e){if(!(32&e.parent.flags))return!1;for(var t=aa(e.parent);;){if(!(t=t.symbol&&yf(t)))return!1;var r=Ko(t,e.escapedName);if(r&&r.valueDeclaration)return!0}}(t)?240!==a.kind||164===r.parent.kind||4194304&a.flags||Hr(a,n)||(i=Pr(n,e.Diagnostics.Class_0_used_before_its_declaration,o)):i=Pr(n,e.Diagnostics.Property_0_is_used_before_its_initialization,o),i&&e.addRelatedInfo(i,e.createDiagnosticForNode(a,e.Diagnostics._0_is_declared_here,o))}}(u,t,n),Tf(u,t,100===r.kind),Vr(t).resolvedSymbol=u,uf(t,98===r.kind,s,u),c&&(Ym(t,u)||Xm(t)))return Pr(n,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,e.idText(n)),_e;i=qd(aa(u),t)}else{var l=Ho(s,0);if(!l||!l.type)return Kc(a)?ce:a.symbol===W?(W.exports.has(n.escapedText)&&418&W.exports.get(n.escapedText).flags?Pr(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(n.escapedText),li(a)):B&&Pr(n,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,li(a)),ce):(n.escapedText&&!Zr(t)&&function(t,r){var n,i;if(1048576&r.flags&&!(131068&r.flags))for(var a=0,o=r.types;a<o.length;a++){var s=o[a];if(!Ko(s,t.escapedText)){n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(t),li(s));break}}if(hf(t.escapedText,r))n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_is_a_static_member_of_type_1,e.declarationNameToString(t),li(r));else{var c=Yg(r);if(c&&Ko(c,t.escapedText))n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await,e.declarationNameToString(t),li(r));else{var u=vf(t,r);if(void 0!==u){var l=e.symbolName(u);n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e.declarationNameToString(t),li(r),l),i=u.valueDeclaration&&e.createDiagnosticForNode(u.valueDeclaration,e.Diagnostics._0_is_declared_here,l)}else n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(t),li(r))}}var _=e.createDiagnosticForNodeFromMessageChain(t,n);i&&e.addRelatedInfo(_,i),cr.add(_)}(n,262144&a.flags&&a.isThisType?s:a),_e);l.isReadonly&&(e.isAssignmentTarget(t)||e.isDeleteTarget(t))&&Pr(t,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,li(s)),i=l.type}if(189!==t.kind||1===c||u&&!(98311&u.flags)&&!(8192&u.flags&&1048576&i.flags))return i;var _=!1;if(O&&R&&100===r.kind){var d=u&&u.valueDeclaration;if(d&&th(d)){var p=jd(t);157===p.kind&&p.parent===d.parent&&(_=!0)}}else O&&u&&u.valueDeclaration&&e.isPropertyAccessExpression(u.valueDeclaration)&&e.getAssignmentDeclarationPropertyAccessKind(u.valueDeclaration)&&jd(t)===jd(u.valueDeclaration)&&(_=!0);var f=Bd(t,i,_?u_(i):i);return _&&!(32768&a_(i))&&32768&a_(f)?(Pr(n,e.Diagnostics.Property_0_is_used_before_being_assigned,ci(u)),i):c?Xl(f):f}function yf(e){var t=va(e);if(0!==t.length)return Mc(t)}function hf(t,r){var n=r.symbol&&Ko(aa(r.symbol),t);return void 0!==n&&n.valueDeclaration&&e.hasModifier(n.valueDeclaration,32)}function vf(t,r){return Sf(e.isString(t)?t:e.idText(t),Co(r),67220415)}function bf(t,r){var n=vf(t,r);return n&&e.symbolName(n)}function Df(t,r,n){return e.Debug.assert(void 0!==r,"outername should always be defined"),Yr(t,r,n,void 0,r,!1,!1,function(t,n,i){return e.Debug.assertEqual(r,n,"name should equal outerName"),Wr(t,n,i)||Sf(e.unescapeLeadingUnderscores(n),e.arrayFrom(t.values()),i)})}function xf(t,r){return r.exports&&Sf(e.idText(t),En(r),2623475)}function Sf(t,r,n){return e.getSpellingSuggestion(t,r,function(t){var r=e.symbolName(t);return!e.startsWith(r,'"')&&t.flags&n?r:void 0})}function Tf(t,r,n){if(t&&106500&t.flags&&t.valueDeclaration&&e.hasModifier(t.valueDeclaration,8)&&(!r||!e.isWriteOnlyAccess(r)||65536&t.flags&&!(32768&t.flags))){if(n){var i=e.findAncestor(r,e.isFunctionLikeDeclaration);if(i&&i.symbol===t)return}(1&e.getCheckFlags(t)?Ur(t).target:t).isReferenced=67108863}}function Cf(t,r,n,i){if(i===_e||Ei(i))return!0;var a=Ko(i,n);return a?uf(t,r,i,a):e.isInJSFile(t)&&0!=(1048576&i.flags)&&i.types.some(function(e){return Cf(t,r,n,e)})}function Ef(t){var r=t.initializer;if(238===r.kind){var n=r.declarations[0];if(n&&!e.isBindingPattern(n.name))return In(n)}else if(72===r.kind)return G_(r)}function kf(t){var r=_f(t.expression),n=t.argumentExpression;if(!n){var i,a=e.getSourceFileOfNode(t);return 192===t.parent.kind&&t.parent.expression===t?Bv(a,i=e.skipTrivia(a.text,t.expression.end),t.end-i,e.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead):Bv(a,i=t.end-"]".length,t.end-i,e.Diagnostics.Expression_expected),_e}var o=kg(n);return r===_e||r===Ne?r:rg(r)&&10!==n.kind?(Pr(n,e.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal),_e):Kg(Xc(r,function(t){var r,n=e.skipParentheses(t);if(72===n.kind){var i=G_(n);if(3&i.flags)for(var a=t,o=t.parent;o;){if(226===o.kind&&a===o.statement&&Ef(o)===i&&Go(r=Cg(o.expression),1)&&!Go(r,0))return!0;a=o,o=o.parent}}return!1}(n)?he:o,t),t)}function Nf(t,r,n){if(r===_e)return!1;if(!e.isWellKnownSymbolSyntactically(t))return!1;if(0==(12288&r.flags))return n&&Pr(t,e.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol,e.getTextOfNode(t)),!1;var i=t.expression,a=G_(i);if(!a)return!1;var o=rc(!0);return!(!o||a!==o&&(n&&Pr(i,e.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object),1))}function Af(t){return e.isCallOrNewExpression(t)||e.isTaggedTemplateExpression(t)||e.isJsxOpeningLikeElement(t)}function Ff(t){return Af(t)&&e.forEach(t.typeArguments,gh),193===t.kind?kg(t.template):e.isJsxOpeningLikeElement(t)?kg(t.attributes):152!==t.kind&&e.forEach(t.arguments,function(e){kg(e)}),Pt}function Pf(e){return Ff(e),wt}function wf(e){return!!e&&(208===e.kind||215===e.kind&&e.isSpread)}function If(t){return e.findIndex(t,wf)}function Of(e){return!!(16384&e.flags)}function Mf(t,r,n,i){var a;void 0===i&&(i=!1);var o=!1,s=Em(n),c=km(n);if(193===t.kind)if(a=r.length,206===t.template.kind){var u=e.last(t.template.templateSpans);o=e.nodeIsMissing(u.literal)||!!u.literal.isUnterminated}else{var l=t.template;e.Debug.assert(14===l.kind),o=!!l.isUnterminated}else if(152===t.kind)a=Hf(t,n);else if(e.isJsxOpeningLikeElement(t)){if(o=t.attributes.end===t.end)return!0;a=0===c?r.length:1,s=0===r.length?s:1,c=Math.min(c,1)}else{if(!t.arguments)return e.Debug.assert(192===t.kind),0===km(n);a=i?r.length+1:r.length,o=t.arguments.end===t.end;var _=If(r);if(_>=0)return _>=km(n)&&(Nm(n)||_<Em(n))}if(!Nm(n)&&a>s)return!1;if(o||a>=c)return!0;for(var d=a;d<c;d++)if(131072&Sd(Sm(n,d),Of).flags)return!1;return!0}function Lf(t,r){var n=e.length(t.typeParameters),i=is(t.typeParameters);return!r||r.length>=i&&r.length<=n}function Rf(e){if(524288&e.flags){var t=Do(e);if(1===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.properties.length&&!t.stringIndexInfo&&!t.numberIndexInfo)return t.callSignatures[0]}}function Bf(t,r,n,i){var a=T_(t.typeParameters,t,0,i),o=Am(r),s=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return x_(s?Iu(r,s):r,t,function(e,t){B_(a.inferences,e,t)}),n||S_(r,t,function(e,t){B_(a.inferences,e,t,8)}),gs(t,W_(a),e.isInJSFile(r.declaration))}function jf(t,r,n,i,a){if(e.isJsxOpeningLikeElement(t))return function(e,t,r,n){var i=Tp(t,e),a=_g(e.attributes,i,n,r);return B_(n.inferences,a,i),W_(n)}(t,r,i,a);if(152!==t.kind){var o=xp(t);if(o){var s=Ku(o,A_(function(t,r){return void 0===r&&(r=0),t&&C_(e.map(t.inferences,N_),t.signature,t.flags|r,t.compareTypes)}(Sp(t),1))),c=Rf(s),u=c&&c.typeParameters?Ss(ys(c,c.typeParameters)):s,l=ps(r);B_(a.inferences,u,l,8),a.returnMapper=A_(function(t){var r=e.filter(t.inferences,xg);return r.length?C_(e.map(r,N_),t.signature,t.flags,t.compareTypes):void 0}(a))}}var _=ls(r);if(_){var d=Vf(t),p=d?kg(d):Ee;B_(a.inferences,p,_)}for(var f=Fm(r),m=f?Math.min(Em(r)-1,n.length):n.length,g=0;g<m;g++){var y=n[g];if(210!==y.kind){var h=Sm(r,g),v=_g(y,h,a,i);B_(a.inferences,v,h)}}if(f){var b=Jf(n,m,n.length,f,a);B_(a.inferences,b,f)}return W_(a)}function Jf(t,r,n,i,a){if(r>=n-1){var o=t[n-1];if(wf(o))return 215===o.kind?hc(o.type):Dd(s=_g(o.expression,i,a,0),function(e){return!(63176705&e.flags||Jl(e)||e_(e))})?hc(Go(s,1)||_e):s}for(var s,c=Go(i,1)||ce,u=Zm(c,4325372),l=[],_=-1,d=r;d<n;d++){var p=_g(t[d],c,a,0);_<0&&wf(t[d])&&(_=d-r),l.push(u?gu(p):Ql(p))}return _<0?Dc(l):Dc(e.append(l.slice(0,_),Ac(l.slice(_))),_,!0)}function zf(t,r,n,i){for(var a,o=e.isInJSFile(t.declaration),s=t.typeParameters,c=as(e.map(r,Du),s,is(s),o),u=0;u<r.length;u++){e.Debug.assert(void 0!==s[u],"Should not call checkTypeArguments with too many type arguments");var l=ko(s[u]);if(l){var _=n&&i?function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1)}:void 0,d=i||e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1;a||(a=Eu(s,c));var p=c[u];if(!ol(p,Ha(Ku(l,a),p),n?r[u]:void 0,d,_))return}}return c}function Kf(t){if(Up(t.tagName))return 2;var r=Bo(kg(t.tagName));return e.length(Vo(r,1))?0:e.length(Vo(r,0))?1:2}function Uf(t,r,n,i,a,o){if(e.isJsxOpeningLikeElement(t))return function(e,t,r,n,i){var a=Tp(t,e);return cl(_g(e.attributes,a,void 0,n),a,r,i?e.tagName:void 0,e.attributes)}(t,n,i,a,o);var s=ls(n);if(s&&s!==Ee&&192!==t.kind){var c=Vf(t);if(!Sl(c?kg(c):Ee,s,i,o?c||t:void 0,e.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1))return!1}for(var u=e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,l=Fm(n),_=l?Math.min(Em(n)-1,r.length):r.length,d=0;d<_;d++){var p=r[d];if(210!==p.kind){var f=Sm(n,d),m=_g(p,f,void 0,a);if(!cl(4&a?p_(m):m,f,i,o?p:void 0,p,u))return!1}}return!l||Sl(Jf(r,_,r.length,l,void 0),l,i,o?_<r.length?r[_]:t:void 0,u)}function Vf(t){if(191===t.kind){var r=e.skipOuterExpressions(t.expression);if(189===r.kind||190===r.kind)return r.expression}}function qf(t,r,n){var i=e.createNode(215,t.pos,t.end);return i.parent=t,i.type=r,i.isSpread=n||!1,i}function Wf(t){if(193===t.kind){var r=t.template,n=[qf(r,xt||(xt=tc("TemplateStringsArray",0,!0))||Oe)];return 206===r.kind&&e.forEach(r.templateSpans,function(e){n.push(e.expression)}),n}if(152===t.kind)return function(t){var r=t.parent,n=t.expression;switch(r.kind){case 240:case 209:return[qf(n,aa(In(r)))];case 151:var i=r.parent;return[qf(n,157===r.parent.kind?aa(In(i)):_e),qf(n,ce),qf(n,he)];case 154:case 156:case 158:case 159:var a=154!==r.kind&&0!==P;return[qf(n,function(t){var r=In(t.parent);return e.hasModifier(t,32)?aa(r):Na(r)}(r)),qf(n,function(t){var r=t.name;switch(r.kind){case 72:return hu(e.idText(r));case 8:case 10:return hu(r.text);case 149:var n=Rp(r);return eg(n,12288)?n:ye;default:return e.Debug.fail("Unsupported property name."),_e}}(r)),qf(n,a?fc(wh(r)):ce)]}return e.Debug.fail()}(t);if(e.isJsxOpeningLikeElement(t))return t.attributes.properties.length>0||e.isJsxOpeningElement(t)&&t.parent.children.length>0?[t.attributes]:e.emptyArray;var i=t.arguments||e.emptyArray,a=i.length;if(a&&wf(i[a-1])&&If(i)===a-1){var o=i[a-1],s=dg(o.expression);if(e_(s)){var c=s.typeArguments||e.emptyArray,u=s.target.hasRestElement?c.length-1:-1,l=e.map(c,function(e,t){return qf(o,e,t===u)});return e.concatenate(i.slice(0,a-1),l)}}return i}function Hf(t,r){switch(t.parent.kind){case 240:case 209:return 1;case 154:return 2;case 156:case 158:case 159:return 0===P||r.parameters.length<=2?2:3;case 151:return 3;default:return e.Debug.fail()}}function Gf(t,r,n){for(var i,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=n.length,l=0,_=r;l<_.length;l++){var d=_[l],p=km(d),f=Em(d);p<u&&p>s&&(s=p),u<f&&f<c&&(c=f),p<a&&(a=p,i=d),o=Math.max(o,f)}var m,g,y=e.some(r,Nm),h=y?a:a<o?a+"-"+o:a,v=If(n)>-1;u<=o&&v&&u--;var b=y||v?y&&v?e.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more:y?e.Diagnostics.Expected_at_least_0_arguments_but_got_1:e.Diagnostics.Expected_0_arguments_but_got_1_or_more:e.Diagnostics.Expected_0_arguments_but_got_1;if(i&&km(i)>u&&i.declaration){var D=i.declaration.parameters[i.thisParameter?u+1:u];D&&(g=e.createDiagnosticForNode(D,e.isBindingPattern(D.name)?e.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided:e.Diagnostics.An_argument_for_0_was_not_provided,D.name?e.isBindingPattern(D.name)?void 0:e.idText(ch(D.name)):u))}if(a<u&&u<o)return e.createDiagnosticForNode(t,e.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,u,s,c);if(!v&&u<a){var x=e.createDiagnosticForNode(t,b,h,u);return g?e.addRelatedInfo(x,g):x}if(y||v){if(m=e.createNodeArray(n),v&&u){var S=e.elementAt(n,If(n)+1)||void 0;m=e.createNodeArray(n.slice(o>u&&S?n.indexOf(S):o))}}else m=e.createNodeArray(n.slice(o));m.pos=e.first(m).pos,m.end=e.last(m).end,m.end===m.pos&&m.end++;var T=e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),m,b,h,u);return g?e.addRelatedInfo(T,g):T}function Yf(t,r,n,i,a){var s,c=193===t.kind,u=152===t.kind,l=e.isJsxOpeningLikeElement(t),_=!n;u||(s=t.typeArguments,(c||l||98!==t.expression.kind)&&e.forEach(s,gh));var d=n||[];if(function(t,r){var n,i,a,o,s=0,c=-1;e.Debug.assert(!r.length);for(var u=0,l=t;u<l.length;u++){var _=l[u],d=_.declaration&&In(_.declaration),p=_.declaration&&_.declaration.parent;i&&d!==i?(a=s=r.length,n=p):n&&p===n?a+=1:(n=p,a=s),i=d,_.hasLiteralTypes?(o=++c,s++):o=a,r.splice(o,0,_)}}(r,d),!d.length)return _&&cr.add(e.createDiagnosticForNode(t,e.Diagnostics.Call_target_does_not_contain_any_signatures)),Pf(t);var p,f,m,g,y=Wf(t),h=1===d.length&&!d[0].typeParameters,v=u||h||!e.some(y,Wu)?0:4,b=!!(16&i)&&191===t.kind&&t.arguments.hasTrailingComma;if(d.length>1&&(g=x(d,Sr,b)),g||(g=x(d,Tr,b)),g)return g;if(_)if(p)Uf(t,y,p,Tr,0,!0);else if(f)cr.add(Gf(t,[f],y));else if(m)zf(m,t.typeArguments,!0,a);else{var D=e.filter(r,function(e){return Lf(e,s)});0===D.length?cr.add(function(t,r,n){var i=n.length;if(1===r.length){var a=is((_=r[0]).typeParameters),o=e.length(_.typeParameters);return e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.Expected_0_type_arguments_but_got_1,a<o?a+"-"+o:a,i)}for(var s=-1/0,c=1/0,u=0,l=r;u<l.length;u++){var _,d=is((_=l[u]).typeParameters);o=e.length(_.typeParameters),d>i?c=Math.min(c,d):o<i&&(s=Math.max(s,o))}return s!==-1/0&&c!==1/0?e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,i,s,c):e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.Expected_0_type_arguments_but_got_1,s===-1/0?c:s,i)}(t,r,s)):u?a&&cr.add(e.createDiagnosticForNode(t,a)):cr.add(Gf(t,D,y))}return o||!y?Pf(t):function(t,r,n,i){return e.Debug.assert(r.length>0),i||1===r.length||r.some(function(e){return!!e.typeParameters})?function(t,r,n){var i=function(e,t){for(var r=-1,n=-1,i=0;i<e.length;i++){var a=e[i],o=Em(a);if(Nm(a)||o>=t)return i;o>n&&(n=o,r=i)}return r}(r,void 0===H?n.length:H),a=r[i],o=a.typeParameters;if(!o)return a;var s=Af(t)?t.typeArguments:void 0,c=s?hs(a,function(e,t,r){for(var n=e.map(wh);n.length>t.length;)n.pop();for(;n.length<t.length;)n.push(ko(t[n.length])||q_(r));return n}(s,o,e.isInJSFile(t))):function(t,r,n,i){var a=T_(r,n,e.isInJSFile(t)?2:0),o=jf(t,n,i,12,a);return hs(n,o)}(t,o,a,n);return r[i]=c,c}(t,r,n):function(t){var r,n=e.mapDefined(t,function(e){return e.thisParameter});n.length&&(r=Qf(n,n.map(Dm)));for(var i=e.minAndMax(t,Xf),a=i.min,o=i.max,s=[],c=function(r){var n=e.mapDefined(t,function(t){var n=t.parameters,i=t.hasRestParameter;return i?r<n.length-1?n[r]:e.last(n):r<n.length?n[r]:void 0});e.Debug.assert(0!==n.length),s.push(Qf(n,e.mapDefined(t,function(e){return Tm(e,r)})))},u=0;u<o;u++)c(u);var l=e.mapDefined(t,function(t){return t.hasRestParameter?e.last(t.parameters):void 0}),_=0!==l.length;if(_){var d=hc(Ac(e.mapDefined(t,ms),2));s.push($f(l,d))}return Ya(t[0].declaration,void 0,r,s,Mc(t.map(ps)),void 0,a,_,t.some(function(e){return e.hasLiteralTypes}))}(r)}(t,d,y,!!n);function x(r,n,i){if(void 0===i&&(i=!1),p=void 0,f=void 0,m=void 0,h){var a=r[0];if(s||!Mf(t,y,a,i))return;return Uf(t,y,a,n,0,!1)?a:void(p=a)}for(var o=0;o<r.length;o++)if(Lf(a=r[o],s)&&Mf(t,y,a,i)){var c=void 0,u=void 0;if(a.typeParameters){var l=void 0;if(s){if(!(l=zf(a,s,!1))){m=a;continue}}else u=T_(a.typeParameters,a,e.isInJSFile(t)?2:0),l=jf(t,a,y,8|v,u),v|=4&u.flags?8:0;if(c=gs(a,l,e.isInJSFile(a.declaration),u&&u.inferredTypeParameters),Fm(a)&&!Mf(t,y,c,i)){f=c;continue}}else c=a;if(Uf(t,y,c,n,v,!1)){if(v){if(v=0,u&&(c=gs(a,l=jf(t,a,y,v,u),e.isInJSFile(a.declaration),u&&u.inferredTypeParameters),Fm(a)&&!Mf(t,y,c,i))){f=c;continue}if(!Uf(t,y,c,n,v,!1)){p&&!Am(p)&&Am(c)||(p=c);continue}}return r[o]=c,c}p&&!Am(p)&&Am(c)||(p=c)}}}function Xf(e){var t=e.parameters.length;return e.hasRestParameter?t-1:t}function Qf(e,t){return $f(e,Ac(t,2))}function $f(t,r){return d_(e.first(t),r)}function Zf(e){return!(!e.typeParameters||!rv(ps(e)))}function em(e,t,r,n){return Ei(e)||Ei(t)&&!!(262144&e.flags)||!r&&!n&&!(1179648&t.flags)&&rl(e,Ye)}function tm(t,r,n){if(t.arguments&&P<1){var i=If(t.arguments);i>=0&&Pr(t.arguments[i],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var a=_f(t.expression);if(a===Ne)return Ot;if((a=Bo(a))===_e)return Pf(t);if(Ei(a))return t.typeArguments&&Pr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Ff(t);var o=Vo(a,1);if(o.length){if(!function(t,r){if(!r||!r.declaration)return!0;var n=r.declaration,i=e.getSelectedModifierFlags(n,24);if(!i)return!0;var a=e.getClassLikeDeclarationOfSymbol(n.parent.symbol),o=Na(n.parent.symbol);if(!Nh(t,a)){var s=e.getContainingClass(t);if(s&&16&i){var c=wh(s);if(function t(r,n){var i=va(n);if(!e.length(i))return!1;var a=i[0];if(2097152&a.flags){for(var o=a.types,s=oo(o),c=0,u=0,l=a.types;u<l.length;u++){var _=l[u];if(!s[c]&&3&e.getObjectFlags(_)){if(_.symbol===r)return!0;if(t(r,_))return!0}c++}return!1}return a.symbol===r||t(r,a)}(n.parent.symbol,c))return!0}return 8&i&&Pr(t,e.Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,li(o)),16&i&&Pr(t,e.Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,li(o)),!1}return!0}(t,o[0]))return Pf(t);var s=a.symbol&&e.getClassLikeDeclarationOfSymbol(a.symbol);return s&&e.hasModifier(s,128)?(Pr(t,e.Diagnostics.Cannot_create_an_instance_of_an_abstract_class),Pf(t)):Yf(t,o,r,n)}var c=Vo(a,0);if(c.length){var u=Yf(t,c,r,n);return B||(u.declaration&&!lm(u.declaration)&&ps(u)!==Ee&&Pr(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),ls(u)===Ee&&Pr(t,e.Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),u}return rm(t,a,1),Pf(t)}function rm(t,r,n,i){var a=Pr(t,0===n?e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures:e.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature,li(r));nm(r,n,i?e.addRelatedInfo(a,i):a)}function nm(t,r,n){if(t.symbol){var i=Ur(t.symbol).originatingImport;if(i&&!e.isImportCall(i)){var a=Vo(aa(Ur(t.symbol).target),r);if(!a||!a.length)return;e.addRelatedInfo(n,e.createDiagnosticForNode(i,e.Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}}function im(t){switch(t.parent.kind){case 240:case 209:return e.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;case 151:return e.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;case 154:return e.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;case 156:case 158:case 159:return e.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;default:return e.Debug.fail()}}function am(t,r,n){var i=kg(t.expression),a=Bo(i);if(a===_e)return Pf(t);var o,s,c=Vo(a,0),u=Vo(a,1).length;if(em(i,a,c.length,u))return Ff(t);if(o=t,(s=c).length&&e.every(s,function(e){return 0===e.minArgumentCount&&!e.hasRestParameter&&e.parameters.length<Hf(o,e)})){var l=e.getTextOfNode(t.expression,!1);return Pr(t,e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0,l),Pf(t)}var _=im(t);if(!c.length){var d=e.chainDiagnosticMessages(void 0,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures,li(a));d=e.chainDiagnosticMessages(d,_);var p=e.createDiagnosticForNodeFromMessageChain(t,d);return cr.add(p),nm(a,0,p),Pf(t)}return Yf(t,c,r,n,_)}function om(r,n){var i=Yp(r),a=i&&Nn(i),o=a&&Wr(a,t.Element,67897832),s=o&&U.symbolToEntityName(o,67897832,r),c=e.createFunctionTypeNode(void 0,[e.createParameter(void 0,void 0,void 0,"props",void 0,U.typeToTypeNode(n,r))],s?e.createTypeReferenceNode(s,void 0):e.createKeywordTypeNode(120)),u=Ir(1,"props");return u.type=n,Ya(c,void 0,void 0,[u],o?Na(o):_e,void 0,1,!1,!1)}function sm(r,n,i){if(Up(r.tagName)){var a=Zp(r),o=om(r,a);return sl(_g(r.attributes,Tp(o,r),void 0,0),a,r.tagName,r.attributes),o}var s=kg(r.tagName),c=Bo(s);if(c===_e)return Pf(r);var u=function r(n,i){if(4&n.flags)return[Pt];if(128&n.flags){var a=$p(n,i);return a?[om(i,a)]:(Pr(i,e.Diagnostics.Property_0_does_not_exist_on_type_1,n.value,"JSX."+t.IntrinsicElements),e.emptyArray)}var o=Bo(n),s=Vo(o,1);return 0===s.length&&(s=Vo(o,0)),0===s.length&&1048576&o.flags&&(s=to(e.map(o.types,function(e){return r(e,i)}))),s}(s,r);return em(s,c,u.length,0)?Ff(r):0===u.length?(Pr(r.tagName,e.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,e.getTextOfNode(r.tagName)),Pf(r)):Yf(r,u,n,i)}function cm(t,r,n){switch(t.kind){case 191:return function(t,r,n){if(98===t.expression.kind){var i=rp(t.expression);if(Ei(i)){for(var a=0,o=t.arguments;a<o.length;a++)kg(o[a]);return Pt}if(i!==_e){var s=e.getEffectiveBaseTypeNode(e.getContainingClass(t));if(s)return Yf(t,ya(i,s.typeArguments,s),r,n)}return Ff(t)}var c=_f(t.expression,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined,e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined);if(c===Ne)return Ot;var u=Bo(c);if(u===_e)return Pf(t);var l=Vo(u,0),_=Vo(u,1).length;if(em(c,u,l.length,_))return c!==_e&&t.typeArguments&&Pr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Ff(t);if(!l.length){if(_)Pr(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,li(c));else{var d=void 0;if(1===t.arguments.length){var p=e.getSourceFileOfNode(t).text;e.isLineBreak(p.charCodeAt(e.skipTrivia(p,t.expression.end,!0)-1))&&(d=e.createDiagnosticForNode(t.expression,e.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon))}rm(t,u,0,d)}return Pf(t)}return 8&n&&!t.typeArguments&&l.some(Zf)?(Dg(t,n),It):l.some(function(t){return e.isInJSFile(t.declaration)&&!!e.getJSDocClassTag(t.declaration)})?(Pr(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,li(c)),Pf(t)):Yf(t,l,r,n)}(t,r,n);case 192:return tm(t,r,n);case 193:return function(e,t,r){var n=kg(e.tag),i=Bo(n);if(i===_e)return Pf(e);var a=Vo(i,0),o=Vo(i,1).length;return em(n,i,a.length,o)?Ff(e):a.length?Yf(e,a,t,r):(rm(e,i,0),Pf(e))}(t,r,n);case 152:return am(t,r,n);case 262:case 261:return sm(t,r,n)}throw e.Debug.assertNever(t,"Branch in 'resolveSignature' should be unreachable.")}function um(e,t,r){var n=Vr(e),i=n.resolvedSignature;if(i&&i!==It&&!t)return i;n.resolvedSignature=It;var a=cm(e,t,r||0);return a!==It&&(n.resolvedSignature=Bt===jt?a:i),a}function lm(t){if(!t||!e.isInJSFile(t))return!1;var r=e.isFunctionDeclaration(t)||e.isFunctionExpression(t)?t:e.isVariableDeclaration(t)&&t.initializer&&e.isFunctionExpression(t.initializer)?t.initializer:void 0;if(r){if(e.getJSDocClassTag(t))return!0;var n=In(r);return!!n&&(void 0!==n.members||void 0!==n.exports&&void 0!==n.exports.get("prototype"))}return!1}function _m(e){if(524288&e.flags){var t=Do(e);return 1===t.callSignatures.length&&lm(t.callSignatures[0].declaration)}return!1}function dm(t){var r;lm(t.valueDeclaration)&&(r=pm(t));var n=function(t){var r=t.valueDeclaration,n=r&&r.parent&&(e.isFunctionDeclaration(r)&&In(r)||e.isBinaryExpression(r.parent)&&In(r.parent.left)||e.isVariableDeclaration(r.parent)&&In(r.parent)),i=n&&n.exports&&n.exports.get("prototype"),a=i&&i.valueDeclaration&&function(t){if(!t.parent)return!1;for(var r=t.parent;r&&189===r.kind;)r=r.parent;if(r&&e.isBinaryExpression(r)&&e.isPrototypeAccess(r.left)&&59===r.operatorToken.kind){var n=e.getInitializerOfBinaryExpression(r);return e.isObjectLiteralExpression(n)&&n}}(i.valueDeclaration);return a?kg(a):void 0}(t);return n&&r?Mc([r,n]):n||r}function pm(t){var r=Ur(t);return r.inferredClassType||(r.inferredClassType=Yn(t,qa(t)||N,e.emptyArray,e.emptyArray,void 0,void 0)),r.inferredClassType}function fm(t,r){Dv(t,t.typeArguments)||xv(t.arguments);var n=um(t,void 0,r);if(n===It)return Ne;if(98===t.expression.kind)return Ee;if(192===t.kind){var i=n.declaration;if(i&&157!==i.kind&&161!==i.kind&&166!==i.kind&&!e.isJSDocConstructSignature(i)&&!lm(i))return B&&Pr(t,e.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),ce}if(e.isInJSFile(t)&&hm(t))return function(e){var t=vn(e,e);if(t){var r=Sn(t);if(r)return aa(r)}return ce}(t.arguments[0]);var a,o=ps(n);if(12288&o.flags&&mm(t))return vu(e.walkUpParenthesizedExpressions(t.parent));if(e.isInJSFile(t)){var s=e.getDeclarationOfExpando(t);if(s){var c=In(s);c&&e.hasEntries(c.exports)&&((a=Yn(c,c.exports,e.emptyArray,e.emptyArray,void 0,void 0)).objectFlags|=16384)}}return a?Mc([o,a]):o}function mm(t){if(!e.isCallExpression(t))return!1;var r=t.expression;if(e.isPropertyAccessExpression(r)&&"for"===r.name.escapedText&&(r=r.expression),!e.isIdentifier(r)||"Symbol"!==r.escapedText)return!1;var n=rc(!1);return!!n&&n===Gr(r,"Symbol",67220415,void 0,void 0,!1)}function gm(t){if(xv(t.arguments)||function(t){if(w===e.ModuleKind.ES2015)return jv(t,e.Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext);if(t.typeArguments)return jv(t,e.Diagnostics.Dynamic_import_cannot_have_type_arguments);var r=t.arguments;1!==r.length?jv(t,e.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument):(yv(r),e.isSpreadElement(r[0])&&jv(r[0],e.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element))}(t),0===t.arguments.length)return Rm(t,ce);for(var r=t.arguments[0],n=dg(r),i=1;i<t.arguments.length;++i)dg(t.arguments[i]);(32768&n.flags||65536&n.flags||!rl(n,ye))&&Pr(r,e.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0,li(n));var a=vn(t,r);if(a){var o=Tn(a,r,!0);if(o)return Rm(t,ym(aa(o),o,a))}return Rm(t,ce)}function ym(t,r,n){if(I&&t&&t!==_e){var i=t;if(!i.syntheticType)if(on(e.find(n.declarations,e.isSourceFile),n,!1)){var a=e.createSymbolTable(),o=Ir(2097152,"default");o.nameType=hu("default"),o.target=_n(r),a.set("default",o);var s=Ir(2048,"__type"),c=Yn(s,a,e.emptyArray,e.emptyArray,void 0,void 0);s.type=c,i.syntheticType=zp(t)?lu(t,c,s,0,!1):c}else i.syntheticType=t;return i.syntheticType}return t}function hm(t){if(!e.isRequireCall(t,!0))return!1;if(!e.isIdentifier(t.expression))return e.Debug.fail();var r=Gr(t.expression,t.expression.escapedText,67220415,void 0,void 0,!0);if(r===Y)return!0;if(2097152&r.flags)return!1;var n=16&r.flags?239:3&r.flags?237:0;if(0!==n){var i=e.getDeclarationOfKind(r,n);return!!i&&!!(4194304&i.flags)}return!1}function vm(t,r,n,i){var a=kg(n,i);if(e.isConstTypeReference(r))return function e(t){switch(t.kind){case 10:case 14:case 8:case 9:case 102:case 87:case 187:case 188:return!0;case 195:return e(t.expression);case 202:var r=t.operator,n=t.operand;return 39===r&&(8===n.kind||9===n.kind)||38===r&&8===n.kind}return!1}(n)||Pr(n,e.Diagnostics.A_const_assertion_can_only_be_applied_to_a_string_number_boolean_array_or_object_literal),gu(a);gh(r),a=p_(Xl(a));var s=Du(r);return o&&s!==_e&&(il(s,h_(a))||fl(a,s,t,e.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)),s}function bm(t){return function(t){var r=t.name.escapedText;switch(t.keywordToken){case 95:if("target"!==r)return jv(t.name,e.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,t.name.escapedText,e.tokenToString(t.keywordToken),"target");break;case 92:"meta"!==r&&jv(t.name,e.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,t.name.escapedText,e.tokenToString(t.keywordToken),"meta")}}(t),95===t.keywordToken?function(t){var r=e.getNewTargetContainer(t);if(r){if(157===r.kind){var n=In(r.parent);return aa(n)}var n=In(r);return aa(n)}return Pr(t,e.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),_e}(t):92===t.keywordToken?function(t){(P<7||w<e.ModuleKind.ESNext)&&Pr(t,e.Diagnostics.The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options);var r=e.getSourceFileOfNode(t);return e.Debug.assert(!!(1048576&r.flags),"Containing file is missing import meta node flag."),e.Debug.assert(!!r.externalModuleIndicator,"Containing file should be a module."),"meta"===t.name.escapedText?St||(St=tc("ImportMeta",0,!0))||Oe:_e}(t):e.Debug.assertNever(t.keywordToken)}function Dm(t){var r=aa(t);if(O){var n=t.valueDeclaration;if(n&&e.hasInitializer(n))return u_(r)}return r}function xm(e,t){var r=e.parameters.length-(e.hasRestParameter?1:0);if(t<r)return e.parameters[t].escapedName;var n=e.parameters[r]||oe,i=aa(n);if(e_(i)){var a=i.target.associatedNames,o=t-r;return a&&a[o]||n.escapedName+"_"+o}return n.escapedName}function Sm(e,t){return Tm(e,t)||ce}function Tm(t,r){var n=t.parameters.length-(t.hasRestParameter?1:0);if(r<n)return Dm(t.parameters[r]);if(t.hasRestParameter){var i=aa(t.parameters[n]),a=r-n;if(!e_(i)||i.target.hasRestElement||a<(i.typeArguments||e.emptyArray).length)return Xc(i,hu(a))}}function Cm(e,t){var r=Em(e),n=Am(e),i=r-(n?1:0);if(n&&t===i)return n;for(var a=[],o=[],s=t;s<i;s++)a.push(Sm(e,s)),o.push(xm(e,s));n&&(a.push(Xc(n,he)),o.push(xm(e,i)));var c=km(e);return Dc(a,c<t?0:c-t,!!n,!1,o)}function Em(t){var r=t.parameters.length;if(t.hasRestParameter){var n=aa(t.parameters[r-1]);if(e_(n))return r+(n.typeArguments||e.emptyArray).length-1}return r}function km(e){if(e.hasRestParameter){var t=aa(e.parameters[e.parameters.length-1]);if(e_(t)){var r=t.target.minLength;if(r>0)return e.parameters.length-1+r}}return e.minArgumentCount}function Nm(e){if(e.hasRestParameter){var t=aa(e.parameters[e.parameters.length-1]);return!e_(t)||t.target.hasRestElement}return!1}function Am(e){if(e.hasRestParameter){var t=aa(e.parameters[e.parameters.length-1]);return e_(t)?function(e){var t=t_(e);return t&&hc(t)}(t):t}}function Fm(e){var t=Am(e);return!t||Jl(t)||Ei(t)?void 0:t}function Pm(e){return wm(e,ke)}function wm(e,t){return e.parameters.length>0?Sm(e,0):t}function Im(t,r){t.typeParameters=r.typeParameters,r.thisParameter&&(!(a=t.thisParameter)||a.valueDeclaration&&!a.valueDeclaration.type)&&(a||(t.thisParameter=d_(r.thisParameter,void 0)),Om(t.thisParameter,aa(r.thisParameter)));for(var n=t.parameters.length-(t.hasRestParameter?1:0),i=0;i<n;i++){var a=t.parameters[i];e.getEffectiveTypeAnnotationNode(a.valueDeclaration)||Om(a,Sm(r,i))}t.hasRestParameter&&(!Or(a=e.last(t.parameters))&&e.getEffectiveTypeAnnotationNode(a.valueDeclaration)||Om(a,Cm(r,n)))}function Om(t,r){var n=Ur(t);if(!n.type){n.type=r;var i=t.valueDeclaration;72!==i.name.kind&&(n.type===Oe&&(n.type=qi(i.name)),function t(r){for(var n=0,i=r.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||(72===a.name.kind?Ur(In(a)).type=Ii(a):t(a.name))}}(i.name))}}function Mm(e){var t=ic(!0);return t!==Be?Is(t,[e=Qg(e)||Oe]):Oe}function Lm(e){var t=pt||(pt=tc("PromiseLike",1,!0))||Be;return t!==Be?Is(t,[e=Qg(e)||Oe]):Oe}function Rm(t,r){var n=Mm(r);return n===Oe?(Pr(t,e.isImportCall(t)?e.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:e.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),_e):(ac(!0)||Pr(t,e.isImportCall(t)?e.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function Bm(t,r){if(!t.body)return _e;var n,i=e.getFunctionFlags(t);if(218!==t.body.kind)n=dg(t.body,r&&-9&r),2&i&&(n=Xg(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member));else{var a=function(t,r){var n=e.getFunctionFlags(t),i=[],a=Km(t),o=!1;if(e.forEachReturnStatement(t.body,function(s){var c=s.expression;if(c){var u=dg(c,r&&-9&r);2&n&&(u=Xg(u,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)),131072&u.flags&&(o=!0),e.pushIfUnique(i,u)}else a=!0}),0!==i.length||a||!o&&!function(e){switch(e.kind){case 196:case 197:return!0;case 156:return 188===e.parent.kind;default:return!1}}(t))return!(O&&i.length&&a)||lm(t)&&i.some(function(e){return e.symbol===t.symbol})||e.pushIfUnique(i,pe),i}(t,r);if(1&i){if(!(a=e.concatenate(function(t,r){var n=[],i=0!=(2&e.getFunctionFlags(t));return e.forEachYieldExpression(t.body,function(t){e.pushIfUnique(n,jm(t,i,r))}),n}(t,r),a))||0===a.length){var o=2&i?mc(ce):yc(ce);return B&&Pr(t.asteriskToken,e.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type,li(o)),o}}else{if(!a)return 2&i?Rm(t,ke):ke;if(0===a.length)return 2&i?Rm(t,Ee):Ee}n=Ac(a,2)}var s=Np(t);if(s||D_(t,n),Gl(n)){var c=s?s===os(t)?n:ps(s):void 0;if(c)switch(3&i){case 3:c=Uy(c,!0);break;case 1:c=Uy(c,!1);break;case 2:c=Yg(c)}n=Zl(n,c)}var u=h_(n);switch(3&i){case 3:return mc(u);case 1:return yc(u);case 2:return Mm(u);default:return u}}function jm(t,r,n){var i=t.expression||t,a=t.expression?kg(t.expression,n):fe,o=t.asteriskToken?By(a,i,!1,r):a;return r?Qg(o,i,t.asteriskToken?e.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:e.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function Jm(e,t,r,n){var i=0;if(n){for(var a=t;a<r.length;a++)i|=br.get(r[a])||32768;for(a=e;a<t;a++)i&=~(br.get(r[a])||0);for(a=0;a<e;a++)i|=br.get(r[a])||32768}else{for(a=e;a<t;a++)i|=vr.get(r[a])||128;for(a=0;a<e;a++)i&=~(vr.get(r[a])||0)}return i}function zm(t){if(!t.possiblyExhaustive)return!1;if(199===t.expression.kind){var r=Cg(t.expression.expression),n=Jm(0,0,vd(t),!0);return!!(131072&Sd(Po(r)||r,function(e){return(id(e)&n)===n}).flags)}var i=Cg(t.expression);if(!Yl(i))return!1;var a,o,s=hd(t);return!(!s.length||e.some(s,Hl))&&(a=Td(i,gu),o=s,1048576&a.flags?!e.forEach(a.types,function(t){return!e.contains(o,t)}):e.contains(o,a))}function Km(t){return!!(128&t.flags)&&!e.some(t.body.statements,function(e){return 232===e.kind&&zm(e)})}function Um(t,r){if(o&&(!r||!Zm(r,16385))&&155!==t.kind&&!e.nodeIsMissing(t.body)&&218===t.body.kind&&Km(t)){var n=256&t.flags;if(r&&131072&r.flags)Pr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);else if(r&&!n)Pr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);else if(r&&O&&!rl(pe,r))Pr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(F.noImplicitReturns){if(!r){if(!n)return;if(qy(t,ps(os(t))))return}Pr(e.getEffectiveReturnTypeNode(t)||t,e.Diagnostics.Not_all_code_paths_return_a_value)}}}function Vm(t,r){if(e.Debug.assert(156!==t.kind||e.isObjectLiteralMethod(t)),hh(t),r&&4&r&&Wu(t)){if(!e.getEffectiveReturnTypeNode(t)&&Gu(t)){var n=Vr(t);if(n.contextFreeType)return n.contextFreeType;var i=Bm(t,r),a=Ya(void 0,void 0,void 0,e.emptyArray,i,void 0,0,!1,!1),o=Yn(t.symbol,N,[a],e.emptyArray,void 0,void 0);return o.objectFlags|=524288,n.contextFreeType=o}return je}bv(t)||196!==t.kind||Ev(t);var s=Vr(t),c=aa(wn(t.symbol));if(Ei(c))return c;if(!(1024&s.flags)){var u=Fp(t);if(!(1024&s.flags)){if(s.flags|=1024,u){var l=Vo(c,0)[0];if(Wu(t)){var _=Sp(t);r&&2&r&&function(t,r,n){for(var i=t.parameters.length-(t.hasRestParameter?1:0),a=0;a<i;a++){var o=t.parameters[a].valueDeclaration;if(o.type){var s=e.getEffectiveTypeAnnotationNode(o);s&&B_(n.inferences,Du(s),Sm(r,a))}}var c=Am(r);if(c&&262144&c.flags){Im(t,Iu(r,n.nonFixingMapper));var u=Em(r)-1;B_(n.inferences,Cm(t,u),c)}}(l,u,_),Im(l,_?Iu(u,_.mapper):u)}fs(t)||l.resolvedReturnType||(i=Bm(t,r),l.resolvedReturnType||(l.resolvedReturnType=i))}Pg(t)}}return c}function qm(e,t){var r=fs(e);return r&&2==(3&t)?Qg(r)||_e:r}function Wm(e,t,r){return!!rl(t,Ie)||(Pr(e,r),!1)}function Hm(t){if(!e.isCallExpression(t))return!1;if(!e.isBindableObjectDefinePropertyCall(t))return!1;var r=dg(t.arguments[2]);if(Ci(r,"value")){var n=Ko(r,"writable"),i=n&&aa(n);if(!i||i===be||i===De)return!0;if(n&&n.valueDeclaration&&e.isPropertyAssignment(n.valueDeclaration)){var a=kg(n.valueDeclaration.initializer);if(a===be||a===De)return!0}return!1}return!Ko(r,"set")}function Gm(t){return!!(8&e.getCheckFlags(t)||4&t.flags&&64&e.getDeclarationModifierFlagsFromSymbol(t)||3&t.flags&&2&sf(t)||98304&t.flags&&!(65536&t.flags)||8&t.flags||e.some(t.declarations,Hm))}function Ym(t,r){if(Gm(r)){if(4&r.flags&&(189===t.kind||190===t.kind)&&100===t.expression.kind){var n=e.getContainingFunction(t);return!n||157!==n.kind||!r.valueDeclaration||!(n.parent===r.valueDeclaration.parent||n===r.valueDeclaration.parent)}return!0}return!1}function Xm(t){if(189===t.kind||190===t.kind){var r=e.skipParentheses(t.expression);if(72===r.kind){var n=Vr(r).resolvedSymbol;if(2097152&n.flags){var i=rn(n);return!!i&&251===i.kind}}}return!1}function Qm(t,r){var n=e.skipOuterExpressions(t,3);return 72===n.kind||189===n.kind||190===n.kind||(Pr(t,r),!1)}function $m(e){return Zm(e,2112)?eg(e,3)||Zm(e,296)?Ie:ve:he}function Zm(e,t){if(e.flags&t&-131073||131072&t&&bo(e))return!0;if(3145728&e.flags)for(var r=0,n=e.types;r<n.length;r++)if(Zm(n[r],t))return!0;return!1}function eg(e,t,r){return!!(e.flags&t)||!(r&&114691&e.flags)&&(!!(296&t)&&rl(e,he)||!!(2112&t)&&rl(e,ve)||!!(132&t)&&rl(e,ye)||!!(528&t)&&rl(e,Te)||!!(16384&t)&&rl(e,Ee)||!!(131072&t)&&rl(e,ke)||!!(65536&t)&&rl(e,me)||!!(32768&t)&&rl(e,pe)||!!(4096&t)&&rl(e,Ce)||!!(67108864&t)&&rl(e,Fe))}function tg(t,r,n){return 1048576&t.flags?e.every(t.types,function(e){return tg(e,r,n)}):eg(t,r,n)}function rg(t){return!!(16&e.getObjectFlags(t))&&!!t.symbol&&ng(t.symbol)}function ng(e){return 0!=(128&e.flags)}function ig(t,r,n,i){if(void 0===i&&(i=!1),275===r.kind||276===r.kind){var a=r.name,o=Rc(a);if(Ra(o)){var s=Ko(t,Ka(o));s&&(Tf(s,r,i),uf(r,!1,t,s))}var c=Fi(r,Xc(t,o,a));return og(276===r.kind?r:r.initializer,c)}if(277===r.kind){P<7&&pv(r,4);var u=[];if(n)for(var l=0;l<n.length-1;l++)u.push(n[l].name);return c=Ai(t,u,t.symbol),yv(n,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),og(r.expression,c)}Pr(r,e.Diagnostics.Property_assignment_expected)}function ag(t,r,n,i,a){var o=t.elements,s=o[n];if(210!==s.kind){if(208!==s.kind){var c=hu(n);return Ul(r)?og(s,Fi(s,Xc(r,c,qf(s,c))),a):og(s,i,a)}if(n<o.length-1)Pr(s,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);else{var u=s.expression;if(204!==u.kind||59!==u.operatorToken.kind)return yv(t.elements,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),og(u,xd(r,e_)?Td(r,function(e){return xc(e,n)}):hc(i),a);Pr(u.operatorToken,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}}function og(t,r,n,i){var a;if(276===t.kind){var o=t;o.objectAssignmentInitializer&&(!O||32768&a_(kg(o.objectAssignmentInitializer))||(r=ad(r,524288)),ug(o.name,o.equalsToken,o.objectAssignmentInitializer,n)),a=t.name}else a=t;return 204===a.kind&&59===a.operatorToken.kind&&(cg(a,n),a=a.left),188===a.kind?function(e,t,r){var n=e.properties;if(O&&0===n.length)return pf(t,e);for(var i=0,a=n;i<a.length;i++)ig(t,a[i],n,r);return t}(a,r,i):187===a.kind?function(e,t,r){var n=e.elements;P<2&&F.downlevelIteration&&pv(e,512);for(var i=By(t,e,!1,!1)||_e,a=0;a<n.length;a++)ag(e,t,a,i,r);return t}(a,r,n):function(t,r,n){var i=kg(t,n),a=277===t.parent.kind?e.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:e.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;return Qm(t,a)&&sl(r,i,t,t),r}(a,r,n)}function sg(e,t){return 0!=(98304&t.flags)||il(e,t)}function cg(t,r){return e.isInJSFile(t)&&e.getAssignedExpandoInitializer(t)?kg(t.right,r):ug(t.left,t.operatorToken,t.right,r,t)}function ug(t,r,n,i,a){var s,c=r.kind;if(59===c&&(188===t.kind||187===t.kind))return og(t,kg(n,i),i,100===n.kind);s=54===c||55===c?Oy(t,i):kg(t,i);var u,l,_=kg(n,i);switch(c){case 40:case 41:case 62:case 63:case 42:case 64:case 43:case 65:case 39:case 61:case 46:case 66:case 47:case 67:case 48:case 68:case 50:case 70:case 51:case 71:case 49:case 69:if(s===Ne||_===Ne)return Ne;s=pf(s,t),_=pf(_,n);var d=void 0;if(528&s.flags&&528&_.flags&&void 0!==(d=function(e){switch(e){case 50:case 70:return 55;case 51:case 71:return 36;case 49:case 69:return 54;default:return}}(r.kind)))return Pr(a||r,e.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,e.tokenToString(r.kind),e.tokenToString(d)),he;var p,f=Wm(t,s,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type),m=Wm(n,_,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type);if(eg(s,3)&&eg(_,3)||!Zm(s,2112)&&!Zm(_,2112))p=he;else if(eg(s,2112)&&eg(_,2112)){switch(c){case 48:case 68:x()}p=ve}else x(),p=_e;return f&&m&&D(p),p;case 38:case 60:if(s===Ne||_===Ne)return Ne;eg(s,132)||eg(_,132)||(s=pf(s,t),_=pf(_,n));var g=void 0;return eg(s,296,!0)&&eg(_,296,!0)?g=he:eg(s,2112,!0)&&eg(_,2112,!0)?g=ve:eg(s,132,!0)||eg(_,132,!0)?g=ye:(Ei(s)||Ei(_))&&(g=s===_e||_===_e?_e:ce),g&&!b(c)?g:g?(60===c&&D(g),g):(x(),ce);case 28:case 30:case 31:case 32:return b(c)&&(s=Xl(pf(s,t)),_=Xl(pf(_,n)),il(s,_)||il(_,s)||rl(s,Ie)&&rl(_,Ie)||x()),Te;case 33:case 34:case 35:case 36:var y=Yl(s),h=Yl(_);return y&&h||(s=y?Xl(s):s,_=h?Xl(_):_),sg(s,_)||sg(_,s)||x(),Te;case 94:return function(t,r,n,i){return n===Ne||i===Ne?Ne:(!Ei(n)&&tg(n,131068)&&Pr(t,e.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Ei(i)||Mh(i)||tl(i,Ye)||Pr(r,e.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type),Te)}(t,n,s,_);case 93:return function(t,r,n,i){return n===Ne||i===Ne?Ne:(n=pf(n,t),i=pf(i,r),il(n,ye)||eg(n,12584)||Pr(t,e.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol),tg(i,126091264)||Pr(r,e.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Te)}(t,n,s,_);case 54:return 4194304&id(s)?Ac([(l=O?s:Xl(_),Td(l,s_)),_]):s;case 55:return 8388608&id(s)?Ac([o_(s),_],2):s;case 59:var v=e.isBinaryExpression(t.parent)?e.getAssignmentDeclarationKind(t.parent):0;return function(t,r){if(2===t)for(var n=0,i=xo(r);n<i.length;n++){var a=i[n],o=aa(a);if(o.symbol&&32&o.symbol.flags){var s=a.escapedName,c=Gr(a.valueDeclaration,s,67897832,void 0,s,!1);if(c&&c.declarations.some(e.isJSDocTypedefTag))return jv(c.declarations[0],e.Diagnostics.Duplicate_identifier_0,e.unescapeLeadingUnderscores(s)),jv(a.valueDeclaration,e.Diagnostics.Duplicate_identifier_0,e.unescapeLeadingUnderscores(s))}}}(v,_),function(r){switch(r){case 2:return!0;case 1:case 5:case 6:case 3:case 4:var i=In(t),a=e.getAssignedExpandoInitializer(n);return a&&e.isObjectLiteralExpression(a)&&i&&e.hasEntries(i.exports);default:return!1}}(v)?(524288&_.flags&&(2===v||6===v||yl(_)||nd(_)||1&e.getObjectFlags(_))||D(_),s):(D(_),p_(_));case 27:return!F.allowUnreachableCode&&function t(r){switch((r=e.skipParentheses(r)).kind){case 72:case 10:case 13:case 193:case 206:case 14:case 8:case 9:case 102:case 87:case 96:case 141:case 196:case 209:case 197:case 187:case 188:case 199:case 213:case 261:case 260:return!0;case 205:return t(r.whenTrue)&&t(r.whenFalse);case 204:return!e.isAssignmentOperator(r.operatorToken.kind)&&t(r.left)&&t(r.right);case 202:case 203:switch(r.operator){case 52:case 38:case 39:case 53:return!0}return!1;case 200:case 194:case 212:default:return!1}}(t)&&(72!==(u=n).kind||"eval"!==u.escapedText)&&Pr(t,e.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects),_;default:return e.Debug.fail()}function b(r){var i=Zm(s,12288)?t:Zm(_,12288)?n:void 0;return!i||(Pr(i,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(r)),!1)}function D(r){o&&e.isAssignmentOperator(c)&&(!Qm(t,e.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)||e.isIdentifier(t)&&"exports"===e.unescapeLeadingUnderscores(t.escapedText)||sl(r,s,t,n))}function x(){var t=li(s),n=li(_),i=a||r;(function(t,n,i){switch(r.kind){case 35:case 33:return Pr(t,e.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap,"false",n,i);case 36:case 34:return Pr(t,e.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap,"true",n,i)}})(i,t,n)||Pr(i,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2,e.tokenToString(r.kind),t,n)}}function lg(t){o&&(4096&t.flags&&!function(t){for(var r=t,n=t.parent;n;){if(e.isFunctionLike(n)&&r===n.body)return!1;if(e.isClassLike(r))return!0;r=n,n=n.parent}return!1}(t)||Rv(t,e.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body),cp(t)&&Pr(t,e.Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer));var r=e.getContainingFunction(t);if(!r)return ce;var n=e.getFunctionFlags(r);if(!(1&n))return ce;t.asteriskToken&&(3==(3&n)&&P<7&&pv(t,26624),1==(3&n)&&P<2&&F.downlevelIteration&&pv(t,256));var i=0!=(2&n),a=jm(t,i),s=fs(r);return s&&sl(a,Uy(s,i)||ce,t.expression||t,t.expression),ce}function _g(t,r,n,i){var a=function(t){return 268!==t.kind||e.isJsxSelfClosingElement(t.parent)?t:t.parent.parent}(t),o=a.contextualType,s=a.inferenceContext;a.contextualType=r,a.inferenceContext=n;var c=kg(t,1|i|(n?2:0)),u=Zm(c,2944)&&mg(c,Dp(r,t))?gu(c):c;return a.contextualType=o,a.inferenceContext=s,u}function dg(e,t){var r=Vr(e);if(!r.resolvedType){if(t&&0!==t)return kg(e,t);var n=Bt;Bt=jt,r.resolvedType=kg(e,t),Bt=n}return r.resolvedType}function pg(t){return 194===(t=e.skipParentheses(t)).kind||212===t.kind}function fg(t){var r=e.getEffectiveInitializer(t),n=Cg(r,!0),i=2&e.getCombinedNodeFlags(t)||e.isDeclarationReadonly(t)||pg(r)||mg(n,xp(r))?n:Ql(n);if(e.isInJSFile(t)){if(98304&i.flags)return b_(t,ce),ce;if(Vl(i))return b_(t,at),at}return i}function mg(t,r){if(r){if(3145728&r.flags){var n=r.types;return e.some(n,function(e){return mg(t,e)})}if(58982400&r.flags){var i=Po(r)||Oe;return Zm(i,4)&&Zm(t,128)||Zm(i,8)&&Zm(t,256)||Zm(i,64)&&Zm(t,2048)||Zm(i,4096)&&Zm(t,8192)||mg(t,i)}return!!(4194432&r.flags&&Zm(t,128)||256&r.flags&&Zm(t,256)||2048&r.flags&&Zm(t,2048)||512&r.flags&&Zm(t,512)||8192&r.flags&&Zm(t,8192))}return!1}function gg(t){var r=t.parent;return e.isAssertionExpression(r)&&e.isConstTypeReference(r.type)||(e.isParenthesizedExpression(r)||e.isArrayLiteralExpression(r)||e.isSpreadElement(r))&&gg(r)||(e.isPropertyAssignment(r)||e.isShorthandPropertyAssignment(r))&&gg(r.parent)}function yg(e,t,r,n){var i=kg(e,t,n);return gg(e)?gu(i):pg(e)?i:Zl(i,Dp(2===arguments.length?xp(e):r,e))}function hg(e,t){return 149===e.name.kind&&Rp(e.name),yg(e.initializer,t)}function vg(e,t){return wv(e),149===e.name.kind&&Rp(e.name),bg(e,Vm(e,t),t)}function bg(t,r,n){if(n&&10&n){var i=Rf(r);if(i&&i.typeParameters){if(8&n)return Dg(t,n),je;var a=bp(t);if(a){var o=Rf(l_(a));if(o&&!o.typeParameters){var s=Sp(t),c=s.signature&&Rf(ps(s.signature));if(c&&!c.typeParameters&&!e.every(s.inferences,xg)){var u=function(t,r){for(var n,i,a=[],o=0,s=r;o<s.length;o++){var c=s[o],u=c.symbol.escapedName;if(Sg(t.inferredTypeParameters,u)||Sg(a,u)){var l=Tg(e.concatenate(t.inferredTypeParameters,a),u),_=Ir(262144,l),d=qn(_);d.target=c,n=e.append(n,c),i=e.append(i,d),a.push(d)}else a.push(c)}if(i)for(var p=Eu(n,i),f=0,m=i;f<m.length;f++){var c=m[f];c.mapper=p}return a}(s,i.typeParameters),l=ys(i,u),_=e.map(s.inferences,function(e){return k_(e.typeParameter)});if(x_(l,o,function(e,t){B_(_,e,t,0,!0)}),e.some(_,xg)&&(S_(l,o,function(e,t){B_(_,e,t)}),!function(e,t){for(var r=0;r<e.length;r++)if(xg(e[r])&&xg(t[r]))return!0;return!1}(s.inferences,_)))return function(e,t){for(var r=0;r<e.length;r++)!xg(e[r])&&xg(t[r])&&(e[r]=t[r])}(s.inferences,_),s.inferredTypeParameters=e.concatenate(s.inferredTypeParameters,u),Ss(l)}return Ss(Bf(i,o,s))}}}}return r}function Dg(e,t){2&t&&(Sp(e).flags|=4)}function xg(e){return!(!e.candidates&&!e.contraCandidates)}function Sg(t,r){return e.some(t,function(e){return e.symbol.escapedName===r})}function Tg(e,t){for(var r=t.length;r>1&&t.charCodeAt(r-1)>=48&&t.charCodeAt(r-1)<=57;)r--;for(var n=t.slice(0,r),i=1;;i++){var a=n+i;if(!Sg(e,a))return a}}function Cg(t,r){var n=e.skipParentheses(t);if(191!==n.kind||98===n.expression.kind||e.isRequireCall(n,!0)||mm(n)){if(e.isAssertionExpression(n)&&!e.isConstTypeReference(n.type))return Du(n.type)}else{var i=Rf(_f(n.expression));if(i&&!i.typeParameters)return ps(i)}return r?dg(t):kg(t)}function Eg(e){var t=Vr(e);if(t.contextFreeType)return t.contextFreeType;var r=e.contextualType;e.contextualType=ce;var n=t.contextFreeType=kg(e,4);return e.contextualType=r,n}function kg(t,r,n){var i=h;h=t;var a=bg(t,function(t,r,n){switch(t.kind){case 72:return Hd(t);case 100:return Zd(t);case 98:return rp(t);case 96:return ge;case 14:case 10:return mu(hu(t.text));case 8:return zv(t),mu(hu(+t.text));case 9:return function(t){if(!(e.isLiteralTypeNode(t.parent)||e.isPrefixUnaryExpression(t.parent)&&e.isLiteralTypeNode(t.parent.parent))&&P<7&&jv(t,e.Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ESNext));}(t),mu(function(t){return hu({negative:!1,base10Value:e.parsePseudoBigInt(t.text)})}(t));case 102:return xe;case 87:return be;case 206:return function(t){return e.forEach(t.templateSpans,function(t){Zm(kg(t.expression),12288)&&Pr(t.expression,e.Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String)}),ye}(t);case 13:return nt;case 187:return wp(t,r,n);case 188:return Jp(t,r);case 189:return ff(t);case 148:return mf(t);case 190:return kf(t);case 191:if(92===t.expression.kind)return gm(t);case 192:return fm(t,r);case 193:return function(e){return Dv(e,e.typeArguments),P<2&&pv(e,65536),ps(um(e))}(t);case 195:return function(t,r){var n=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0;return n?vm(n,n.typeExpression.type,t.expression,r):kg(t.expression,r)}(t,r);case 209:return function(e){return $y(e),hh(e),aa(In(e))}(t);case 196:case 197:return Vm(t,r);case 199:return function(e){return kg(e.expression),xr}(t);case 194:case 212:return function(e){return vm(e,e.type,e.expression)}(t);case 213:return function(e){return l_(kg(e.expression))}(t);case 214:return bm(t);case 198:return function(t){kg(t.expression);var r=e.skipParentheses(t.expression);if(189!==r.kind&&190!==r.kind)return Pr(r,e.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference),Te;var n=Rn(Vr(r).resolvedSymbol);return n&&Gm(n)&&Pr(r,e.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property),Te}(t);case 200:return function(e){return kg(e.expression),fe}(t);case 201:return function(t){return o&&(16384&t.flags||Rv(t,e.Diagnostics.await_expression_is_only_allowed_within_an_async_function),cp(t)&&Pr(t,e.Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer)),Xg(kg(t.expression),t,e.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(t);case 202:return function(t){var r=kg(t.operand);if(r===Ne)return Ne;switch(t.operand.kind){case 8:switch(t.operator){case 39:return mu(hu(-t.operand.text));case 38:return mu(hu(+t.operand.text))}break;case 9:if(39===t.operator)return mu(hu({negative:!0,base10Value:e.parsePseudoBigInt(t.operand.text)}))}switch(t.operator){case 38:case 39:case 53:return pf(r,t.operand),Zm(r,12288)&&Pr(t.operand,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(t.operator)),38===t.operator?(Zm(r,2112)&&Pr(t.operand,e.Diagnostics.Operator_0_cannot_be_applied_to_type_1,e.tokenToString(t.operator),li(r)),he):$m(r);case 52:Oy(t.operand);var n=12582912&id(r);return 4194304===n?be:8388608===n?xe:Te;case 44:case 45:return Wm(t.operand,pf(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&Qm(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access),$m(r)}return _e}(t);case 203:return function(t){var r=kg(t.operand);return r===Ne?Ne:(Wm(t.operand,pf(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&Qm(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access),$m(r))}(t);case 204:return cg(t,r);case 205:return function(e,t){return Oy(e.condition),Ac([kg(e.whenTrue,t),kg(e.whenFalse,t)],2)}(t,r);case 208:return function(e,t){return P<2&&F.downlevelIteration&&pv(e,1536),By(kg(e.expression,t),e.expression,!1,!1)}(t,r);case 210:return fe;case 207:return lg(t);case 215:return t.type;case 270:return function(t,r){if(t.expression){var n=kg(t.expression,r);return t.dotDotDotToken&&n!==ce&&!Jl(n)&&Pr(t,e.Diagnostics.JSX_spread_child_must_be_an_array_type),n}return _e}(t,r);case 260:case 261:return function(e,t){return hh(e),tf(e)||ce}(t);case 264:return function(t){return nf(t.openingFragment),2===F.jsx&&(F.jsxFactory||e.getSourceFileOfNode(t).pragmas.has("jsx"))&&Pr(t,F.jsxFactory?e.Diagnostics.JSX_fragment_is_not_supported_when_using_jsxFactory:e.Diagnostics.JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma),qp(t),tf(t)||ce}(t);case 268:return Wp(t,r);case 262:e.Debug.fail("Shouldn't ever directly check a JsxOpeningElement")}return _e}(t,r,n),r);return rg(a)&&function(t,r){if(189===t.parent.kind&&t.parent.expression===t||190===t.parent.kind&&t.parent.expression===t||(72===t.kind||148===t.kind)&&Ah(t)||167===t.parent.kind&&t.parent.exprName===t||Pr(t,e.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query),F.isolatedModules){e.Debug.assert(!!(128&r.symbol.flags));var n=r.symbol.valueDeclaration;4194304&n.flags&&Pr(t,e.Diagnostics.Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided)}}(t,a),h=i,a}function Ng(t){t.expression&&Rv(t.expression,e.Diagnostics.Type_expected),gh(t.constraint),gh(t.default);var r=ka(In(t));Po(r),function(e){return Mo(e)!==ze}(r)||Pr(t.default,e.Diagnostics.Type_parameter_0_has_a_circular_default,li(r));var n=ko(r),i=Lo(r);n&&i&&ol(i,Ha(n,i),t.default,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1),o&&Gy(t.name,e.Diagnostics.Type_parameter_name_cannot_be_0)}function Ag(t){mv(t),Ny(t);var r=e.getContainingFunction(t);e.hasModifier(t,92)&&(157===r.kind&&e.nodeIsPresent(r.body)||Pr(t,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation)),t.questionToken&&e.isBindingPattern(t.name)&&r.body&&Pr(t,e.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),t.name&&e.isIdentifier(t.name)&&("this"===t.name.escapedText||"new"===t.name.escapedText)&&(0!==r.parameters.indexOf(t)&&Pr(t,e.Diagnostics.A_0_parameter_must_be_the_first_parameter,t.name.escapedText),157!==r.kind&&161!==r.kind&&166!==r.kind||Pr(t,e.Diagnostics.A_constructor_cannot_have_a_this_parameter),197===r.kind&&Pr(t,e.Diagnostics.An_arrow_function_cannot_have_a_this_parameter)),!t.dotDotDotToken||e.isBindingPattern(t.name)||rl(aa(t.symbol),st)||Pr(t,e.Diagnostics.A_rest_parameter_must_be_of_an_array_type)}function Fg(t,r,n){for(var i=0,a=t.elements;i<a.length;i++){var o=a[i];if(!e.isOmittedExpression(o)){var s=o.name;if(72===s.kind&&s.escapedText===n)return Pr(r,e.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((185===s.kind||184===s.kind)&&Fg(s,r,n))return!0}}}function Pg(t){162===t.kind?function(t){mv(t)||function(t){var r=t.parameters[0];if(1!==t.parameters.length)return jv(r?r.name:t,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter);if(r.dotDotDotToken)return jv(r.dotDotDotToken,e.Diagnostics.An_index_signature_cannot_have_a_rest_parameter);if(e.hasModifiers(r))return jv(r.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(r.questionToken)return jv(r.questionToken,e.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark);if(r.initializer)return jv(r.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer);if(!r.type)return jv(r.name,e.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);if(138!==r.type.kind&&135!==r.type.kind){var n=Du(r.type);return 4&n.flags||8&n.flags?jv(r.name,e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead,e.getTextOfNode(r.name),li(n),li(Du(t.type))):1048576&n.flags&&tg(n,128,!0)?jv(r.name,e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead):jv(r.name,e.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number)}t.type||jv(t,e.Diagnostics.An_index_signature_must_have_a_type_annotation)}(t)}(t):165!==t.kind&&239!==t.kind&&166!==t.kind&&160!==t.kind&&157!==t.kind&&161!==t.kind||bv(t);var r=e.getFunctionFlags(t);if(4&r||(3==(3&r)&&P<7&&pv(t,6144),2==(3&r)&&P<4&&pv(t,64),0!=(3&r)&&P<2&&pv(t,128)),Yy(t.typeParameters),e.forEach(t.parameters,Ag),t.type&&gh(t.type),o){!function(t){P>=2||F.noEmit||!e.hasRestParameter(t)||4194304&t.flags||e.nodeIsMissing(t.body)||e.forEach(t.parameters,function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.escapedText===G.escapedName&&Pr(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}(t);var n=e.getEffectiveReturnTypeNode(t);if(B&&!n)switch(t.kind){case 161:Pr(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 160:Pr(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(n){var i=e.getFunctionFlags(t);if(1==(5&i)){var a=Du(n);if(a===Ee)Pr(n,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var s=Uy(a,0!=(2&i))||ce;ol(2&i?mc(s):yc(s),a,n)}}else 2==(3&i)&&function(t,r){var n=Du(r);if(P>=2){if(n===_e)return;var i=ic(!0);if(i!==Be&&!oa(n,i))return void Pr(r,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)}else{if(function(t){Zg(t&&e.getEntityNameFromTypeNode(t))}(r),n===_e)return;var a=e.getEntityNameFromTypeNode(r);if(void 0===a)return void Pr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,li(n));var o=yn(a,67220415,!0),s=o?aa(o):_e;if(s===_e)return void(72===a.kind&&"Promise"===a.escapedText&&sa(n)===ic(!1)?Pr(r,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):Pr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)));var c=mt||(mt=tc("PromiseConstructorLike",0,!0))||Oe;if(c===Oe)return void Pr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a));if(!ol(s,c,r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return;var u=a&&ch(a),l=Wr(t.locals,u.escapedText,67220415);if(l)return void Pr(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(u),e.entityNameToString(a))}Xg(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(t,n)}162!==t.kind&&294!==t.kind&&sy(t)}}function wg(t){for(var r=e.createMap(),n=0,i=t.members;n<i.length;n++){var a=i[n];if(153===a.kind){var o=void 0,s=a.name;switch(s.kind){case 10:case 8:o=s.text;break;case 72:o=e.idText(s);break;default:continue}r.get(o)?(Pr(e.getNameOfDeclaration(a.symbol.valueDeclaration),e.Diagnostics.Duplicate_identifier_0,o),Pr(a.name,e.Diagnostics.Duplicate_identifier_0,o)):r.set(o,!0)}}}function Ig(t){if(241===t.kind){var r=In(t);if(r.declarations.length>0&&r.declarations[0]!==t)return}var n=Ts(In(t));if(n)for(var i=!1,a=!1,o=0,s=n.declarations;o<s.length;o++){var c=s[o];if(1===c.parameters.length&&c.parameters[0].type)switch(c.parameters[0].type.kind){case 138:a?Pr(c,e.Diagnostics.Duplicate_string_index_signature):a=!0;break;case 135:i?Pr(c,e.Diagnostics.Duplicate_number_index_signature):i=!0}}}function Og(t){mv(t)||function(t){if(e.isClassLike(t.parent)){if(Pv(t.name,e.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0}else if(241===t.parent.kind){if(Pv(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(t.initializer)return jv(t.initializer,e.Diagnostics.An_interface_property_cannot_have_an_initializer)}else if(168===t.parent.kind){if(Pv(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(t.initializer)return jv(t.initializer,e.Diagnostics.A_type_literal_property_cannot_have_an_initializer)}if(4194304&t.flags&&Ov(t),e.isPropertyDeclaration(t)&&t.exclamationToken&&(!e.isClassLike(t.parent)||!t.type||t.initializer||4194304&t.flags||e.hasModifier(t,160)))return jv(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context)}(t)||Cv(t.name),Ny(t)}function Mg(t){Pg(t),function(t){var r=e.isInJSFile(t)?e.getJSDocTypeParameterDeclarations(t):void 0,n=t.typeParameters||r&&e.firstOrUndefined(r);if(n){var i=n.pos===n.end?n.pos:e.skipTrivia(e.getSourceFileOfNode(t).text,n.pos);return Bv(t,i,n.end-i,e.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration)}}(t)||function(t){var r=e.getEffectiveReturnTypeNode(t);r&&jv(r,e.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration)}(t),gh(t.body);var r=In(t);if(t===e.getDeclarationOfKind(r,t.kind)&&Wg(r),!e.nodeIsMissing(t.body)&&o){var n=t.parent;if(e.getClassExtendsHeritageElement(n)){Gd(t.parent,n);var i=Qd(n),a=Xd(t);if(a){if(i&&Pr(a,e.Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),e.some(t.parent.members,function(t){return 154===t.kind&&!e.hasModifier(t,32)&&!!t.initializer})||e.some(t.parameters,function(t){return e.hasModifier(t,92)})){for(var s=void 0,c=0,u=t.body.statements;c<u.length;c++){var l=u[c];if(221===l.kind&&e.isSuperCall(l.expression)){s=l;break}if(!e.isPrologueDirective(l))break}s||Pr(t,e.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties)}}else i||Pr(t,e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call)}}}function Lg(t){if(o){if(bv(t)||function(t){var r=t.kind;if(P<1)return jv(t.name,e.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);if(4194304&t.flags)return jv(t.name,e.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context);if(void 0===t.body&&!e.hasModifier(t,128))return Bv(t,t.end-1,";".length,e.Diagnostics._0_expected,"{");if(t.body&&e.hasModifier(t,128))return jv(t,e.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);if(t.typeParameters)return jv(t.name,e.Diagnostics.An_accessor_cannot_have_type_parameters);if(!function(e){return Fv(e)||e.parameters.length===(158===e.kind?0:1)}(t))return jv(t.name,158===r?e.Diagnostics.A_get_accessor_cannot_have_parameters:e.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);if(159===r){if(t.type)return jv(t.name,e.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);var n=t.parameters[0];if(n.dotDotDotToken)return jv(n.dotDotDotToken,e.Diagnostics.A_set_accessor_cannot_have_rest_parameter);if(n.questionToken)return jv(n.questionToken,e.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);if(n.initializer)return jv(t.name,e.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(t)||Cv(t.name),iy(t),Pg(t),158===t.kind&&!(4194304&t.flags)&&e.nodeIsPresent(t.body)&&128&t.flags&&(256&t.flags||Pr(t.name,e.Diagnostics.A_get_accessor_must_return_a_value)),149===t.name.kind&&Rp(t.name),!za(t)){var r=158===t.kind?159:158,n=e.getDeclarationOfKind(In(t),r);if(n){var i=e.getModifierFlags(t),a=e.getModifierFlags(n);(28&i)!=(28&a)&&Pr(t.name,e.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility),(128&i)!=(128&a)&&Pr(t.name,e.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract),Rg(t,n,$i,e.Diagnostics.get_and_set_accessor_must_have_the_same_type),Rg(t,n,Zi,e.Diagnostics.get_and_set_accessor_must_have_the_same_this_type)}}var s=ea(In(t));158===t.kind&&Um(t,s)}gh(t.body)}function Rg(e,t,r,n){var i=r(e),a=r(t);i&&a&&!Qu(i,a)&&Pr(e,n)}function Bg(t,r){return as(e.map(t.typeArguments,Du),r,is(r),e.isInJSFile(t))}function jg(t,r){for(var n,i,a=!0,o=0;o<r.length;o++){var s=ko(r[o]);s&&(n||(i=Eu(r,n=Bg(t,r))),a=a&&ol(n[o],Ku(s,i),t.typeArguments[o],e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1))}return a}function Jg(t){var r=Ys(t);if(r!==_e){var n=Vr(t).resolvedSymbol;if(n)return 524288&n.flags&&Ur(n).typeParameters||(4&e.getObjectFlags(r)?r.target.localTypeParameters:void 0)}}function zg(t){Dv(t,t.typeArguments),164!==t.kind||void 0===t.typeName.jsdocDotPos||e.isInJSFile(t)||e.isInJSDoc(t)||Bv(t,t.typeName.jsdocDotPos,1,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);var r=Ys(t);if(r!==_e){if(t.typeArguments&&(e.forEach(t.typeArguments,gh),o)){var n=Jg(t);n&&jg(t,n)}32&r.flags&&8&Vr(t).resolvedSymbol.flags&&Pr(t,e.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals,li(r))}}function Kg(t,r){if(!(8388608&t.flags))return t;var n=t.objectType,i=t.indexType;return rl(i,Jc(n,!1))?(190===r.kind&&e.isAssignmentTarget(r)&&32&e.getObjectFlags(n)&&1&yo(n)&&Pr(r,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,li(n)),t):Ho(Bo(n),1)&&eg(i,296)?t:(Pr(r,e.Diagnostics.Type_0_cannot_be_used_to_index_type_1,li(i),li(n)),t)}function Ug(t){!function(t){if(142===t.operator){if(139!==t.type.kind)return jv(t.type,e.Diagnostics._0_expected,e.tokenToString(139));var r=e.walkUpParenthesizedTypes(t.parent);switch(r.kind){case 237:var n=r;if(72!==n.name.kind)return jv(t,e.Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!e.isVariableDeclarationInVariableStatement(n))return jv(t,e.Diagnostics.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return jv(r.name,e.Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 154:if(!e.hasModifier(r,32)||!e.hasModifier(r,64))return jv(r.name,e.Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 153:if(!e.hasModifier(r,64))return jv(r.name,e.Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:jv(t,e.Diagnostics.unique_symbol_types_are_not_allowed_here)}}else 133===t.operator&&169!==t.type.kind&&170!==t.type.kind&&Rv(t,e.Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,e.tokenToString(139))}(t),gh(t.type)}function Vg(t){return e.hasModifier(t,8)&&!!(4194304&t.flags)}function qg(t,r){var n=e.getCombinedModifierFlags(t);return 241!==t.parent.kind&&240!==t.parent.kind&&209!==t.parent.kind&&4194304&t.flags&&(2&n||e.isModuleBlock(t.parent)&&e.isModuleDeclaration(t.parent.parent)&&e.isGlobalScopeAugmentation(t.parent.parent)||(n|=1),n|=2),n&r}function Wg(t){if(o){for(var r,n,i,a=0,s=155,c=!1,u=!0,l=!1,_=t.declarations,d=0!=(16384&t.flags),p=!1,f=!1,m=0,g=_;m<g.length;m++){var y=g[m],h=4194304&y.flags,v=241===y.parent.kind||168===y.parent.kind||h;if(v&&(i=void 0),239===y.kind||156===y.kind||155===y.kind||157===y.kind){var b=qg(y,155);a|=b,s&=b,c=c||e.hasQuestionToken(y),u=u&&e.hasQuestionToken(y),e.nodeIsPresent(y.body)&&r?d?f=!0:p=!0:i&&i.parent===y.parent&&i.end!==y.pos&&k(i),e.nodeIsPresent(y.body)?r||(r=y):l=!0,i=y,v||(n=y)}}if(f&&e.forEach(_,function(t){Pr(t,e.Diagnostics.Multiple_constructor_implementations_are_not_allowed)}),p&&e.forEach(_,function(t){Pr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_function_implementation)}),!n||n.body||e.hasModifier(n,128)||n.questionToken||k(n),l&&(function(t,r,n,i,a){if(0!=(i^a)){var o=qg(E(t,r),n);e.forEach(t,function(t){var r=qg(t,n)^o;1&r?Pr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported):2&r?Pr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient):24&r?Pr(e.getNameOfDeclaration(t)||t,e.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected):128&r&&Pr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract)})}}(_,r,155,a,s),function(t,r,n,i){if(n!==i){var a=e.hasQuestionToken(E(t,r));e.forEach(t,function(t){e.hasQuestionToken(t)!==a&&Pr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_optional_or_required)})}}(_,r,c,u),r))for(var D=us(t),x=os(r),S=0,T=D;S<T.length;S++){var C=T[S];if(!gl(x,C)){e.addRelatedInfo(Pr(C.declaration,e.Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),e.createDiagnosticForNode(r,e.Diagnostics.The_implementation_signature_is_declared_here));break}}}function E(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}function k(t){if(!t.name||!e.nodeIsMissing(t.name)){var r=!1,n=e.forEachChild(t.parent,function(e){if(r)return e;r=e===t});if(n&&n.pos===t.end&&n.kind===t.kind){var i=n.name||n,a=n.name;if(t.name&&a&&(e.isComputedPropertyName(t.name)&&e.isComputedPropertyName(a)||!e.isComputedPropertyName(t.name)&&!e.isComputedPropertyName(a)&&e.getEscapedTextOfIdentifierOrLiteral(t.name)===e.getEscapedTextOfIdentifierOrLiteral(a)))return void(156!==t.kind&&155!==t.kind||e.hasModifier(t,32)===e.hasModifier(n,32)||Pr(i,e.hasModifier(t,32)?e.Diagnostics.Function_overload_must_be_static:e.Diagnostics.Function_overload_must_not_be_static));if(e.nodeIsPresent(n.body))return void Pr(i,e.Diagnostics.Function_implementation_name_must_be_0,e.declarationNameToString(t.name))}var o=t.name||t;d?Pr(o,e.Diagnostics.Constructor_implementation_is_missing):e.hasModifier(t,128)?Pr(o,e.Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive):Pr(o,e.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}}}function Hg(t){if(o){var r=t.localSymbol;if((r||(r=In(t)).exportSymbol)&&e.getDeclarationOfKind(r,t.kind)===t){for(var n=0,i=0,a=0,s=0,c=r.declarations;s<c.length;s++){var u=y(m=c[s]),l=qg(m,513);1&l?512&l?a|=u:n|=u:i|=u}var _=n&i,d=a&(n|i);if(_||d)for(var p=0,f=r.declarations;p<f.length;p++){u=y(m=f[p]);var m,g=e.getNameOfDeclaration(m);u&d?Pr(g,e.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,e.declarationNameToString(g)):u&_&&Pr(g,e.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,e.declarationNameToString(g))}}}function y(t){var r=t;switch(r.kind){case 241:case 242:case 309:case 302:return 2;case 244:return e.isAmbientModule(r)||0!==e.getModuleInstanceState(r)?5:4;case 240:case 243:return 3;case 284:return 7;case 254:if(!e.isEntityNameExpression(r.expression))return 1;r=r.expression;case 248:case 251:case 250:var n=0,i=dn(In(r));return e.forEach(i.declarations,function(e){n|=y(e)}),n;case 237:case 186:case 239:case 253:return 1;default:return e.Debug.fail(e.Debug.showSyntaxKind(r))}}}function Gg(e,t,r){var n=Yg(e,t);return n&&Qg(n,t,r)}function Yg(t,r){if(!Ei(t)){var n=t;if(n.promisedTypeOfPromise)return n.promisedTypeOfPromise;if(oa(t,ic(!1)))return n.promisedTypeOfPromise=t.typeArguments[0];var i=Ci(t,"then");if(!Ei(i)){var a=i?Vo(i,0):e.emptyArray;if(0!==a.length){var o=ad(Ac(e.map(a,Pm)),2097152);if(!Ei(o)){var s=Vo(o,0);if(0!==s.length)return n.promisedTypeOfPromise=Ac(e.map(s,Pm),2);r&&Pr(r,e.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}}else r&&Pr(r,e.Diagnostics.A_promise_must_have_a_then_method)}}}function Xg(e,t,r){return Qg(e,t,r)||_e}function Qg(t,r,n){var i=t;if(i.awaitedTypeOfType)return i.awaitedTypeOfType;if(Ei(t))return i.awaitedTypeOfType=t;if(1048576&t.flags){for(var a=void 0,o=0,s=t.types;o<s.length;o++){var c=s[o];a=e.append(a,Qg(c,r,n))}if(!a)return;return i.awaitedTypeOfType=Ac(a)}var u=Yg(t);if(u){if(t.id===u.id||sr.indexOf(u.id)>=0)return void(r&&Pr(r,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));sr.push(t.id);var l=Qg(u,r,n);if(sr.pop(),!l)return;return i.awaitedTypeOfType=l}var _=Ci(t,"then");if(!(_&&Vo(_,0).length>0))return i.awaitedTypeOfType=t;if(r){if(!n)return e.Debug.fail();Pr(r,n)}}function $g(t){var r=ps(um(t));if(!(1&r.flags)){var n,i,a=im(t);switch(t.parent.kind){case 240:n=Ac([aa(In(t.parent)),Ee]);break;case 151:n=Ee,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 154:n=Ee,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 156:case 158:case 159:n=Ac([fc(wh(t.parent)),Ee]);break;default:return e.Debug.fail()}ol(r,n,t,a,function(){return i})}}function Zg(e){if(e){var t=ch(e),r=2097152|(72===e.kind?67897832:1920),n=Gr(t,t.escapedText,r,void 0,void 0,!0);n&&2097152&n.flags&&Bn(n)&&!Wh(dn(n))&&fn(n)}}function ey(t){var r=ty(t);r&&e.isEntityName(r)&&Zg(r)}function ty(e){if(e)switch(e.kind){case 174:case 173:return ry(e.types);case 175:return ry([e.trueType,e.falseType]);case 177:return ty(e.type);case 164:return e.typeName}}function ry(t){for(var r,n=0,i=t;n<i.length;n++){for(var a=i[n];177===a.kind;)a=a.type;if(132!==a.kind&&(O||96!==a.kind&&141!==a.kind)){var o=ty(a);if(!o)return;if(r){if(!e.isIdentifier(r)||!e.isIdentifier(o)||r.escapedText!==o.escapedText)return}else r=o}}return r}function ny(t){var r=e.getEffectiveTypeAnnotationNode(t);return e.isRestParameter(t)?e.getRestParameterElementType(r):r}function iy(t){if(t.decorators&&e.nodeCanBeDecorated(t,t.parent,t.parent.parent)){F.experimentalDecorators||Pr(t,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);var r=t.decorators[0];if(pv(r,8),151===t.kind&&pv(r,32),F.emitDecoratorMetadata)switch(pv(r,16),t.kind){case 240:var n=e.getFirstConstructorWithBody(t);if(n)for(var i=0,a=n.parameters;i<a.length;i++)ey(ny(a[i]));break;case 158:case 159:var o=158===t.kind?159:158,s=e.getDeclarationOfKind(In(t),o);ey(Qi(t)||s&&Qi(s));break;case 156:for(var c=0,u=t.parameters;c<u.length;c++)ey(ny(u[c]));ey(e.getEffectiveReturnTypeNode(t));break;case 154:ey(e.getEffectiveTypeAnnotationNode(t));break;case 151:ey(ny(t));for(var l=0,_=t.parent.parameters;l<_.length;l++)ey(ny(_[l]))}e.forEach(t.decorators,$g)}}function ay(e){switch(e.kind){case 72:return e;case 189:return e.name;default:return}}function oy(t){iy(t),Pg(t);var r=e.getFunctionFlags(t);if(t.name&&149===t.name.kind&&Rp(t.name),!za(t)){var n=In(t),i=t.localSymbol||n,a=e.find(i.declarations,function(e){return e.kind===t.kind&&!(65536&e.flags)});t===a&&Wg(i),n.parent&&e.getDeclarationOfKind(n,t.kind)===t&&Wg(n)}var s=155===t.kind?void 0:t.body;if(gh(s),0==(1&r)){var c=qm(t,r);Um(t,c)}if(o&&!e.getEffectiveReturnTypeNode(t)&&(e.nodeIsMissing(s)&&!Vg(t)&&b_(t,ce),1&r&&e.nodeIsPresent(s)&&ps(os(t))),e.isInJSFile(t)){var u=e.getJSDocTypeTag(t);u&&u.typeExpression&&!Ep(Du(u.typeExpression),t)&&Pr(u,e.Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function sy(t){if(o&&!(4194304&t.flags)){var r=e.getSourceFileOfNode(t),n=Rt.get(r.path);n||(n=[],Rt.set(r.path,n)),n.push(t)}}function cy(t,r){for(var n=0,i=t;n<i.length;n++){var a=i[n];switch(a.kind){case 240:case 209:_y(a,r),py(a,r);break;case 284:case 244:case 218:case 246:case 225:case 226:case 227:yy(a,r);break;case 157:case 196:case 239:case 197:case 156:case 158:case 159:a.body&&yy(a,r),py(a,r);break;case 155:case 160:case 161:case 165:case 166:case 242:case 241:py(a,r);break;case 176:dy(a,r);break;default:e.Debug.assertNever(a,"Node should not have been registered for unused identifiers check")}}}function uy(t,r,n){var i=e.getNameOfDeclaration(t)||t,a=Ch(t)?e.Diagnostics._0_is_declared_but_never_used:e.Diagnostics._0_is_declared_but_its_value_is_never_read;n(t,0,e.createDiagnosticForNode(i,a,r))}function ly(t){return e.isIdentifier(t)&&95===e.idText(t).charCodeAt(0)}function _y(t,r){for(var n=0,i=t.members;n<i.length;n++){var a=i[n];switch(a.kind){case 156:case 154:case 158:case 159:if(159===a.kind&&32768&a.symbol.flags)break;var o=In(a);!o.isReferenced&&e.hasModifier(a,8)&&r(a,0,e.createDiagnosticForNode(a.name,e.Diagnostics._0_is_declared_but_its_value_is_never_read,ci(o)));break;case 157:for(var s=0,c=a.parameters;s<c.length;s++){var u=c[s];!u.symbol.isReferenced&&e.hasModifier(u,8)&&r(u,0,e.createDiagnosticForNode(u.name,e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read,e.symbolName(u.symbol)))}break;case 162:case 217:break;default:e.Debug.fail()}}}function dy(t,r){var n=t.typeParameter;fy(n)&&r(t,1,e.createDiagnosticForNode(t,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.idText(n.name)))}function py(t,r){if(e.last(In(t).declarations)===t)for(var n=e.getEffectiveTypeParameterDeclarations(t),i=new e.NodeSet,a=0,o=n;a<o.length;a++){var s=o[a];if(fy(s)){var c=e.idText(s.name),u=s.parent;if(176!==u.kind&&u.typeParameters.every(fy)){if(i.tryAdd(u)){var l=e.isJSDocTemplateTag(u)?e.rangeOfNode(u):e.rangeOfTypeParameters(u.typeParameters),_=1===n.length,d=_?e.Diagnostics._0_is_declared_but_its_value_is_never_read:e.Diagnostics.All_type_parameters_are_unused,p=_?c:void 0;r(s,1,e.createFileDiagnostic(e.getSourceFileOfNode(u),l.pos,l.end-l.pos,d,p))}}else r(s,1,e.createDiagnosticForNode(s,e.Diagnostics._0_is_declared_but_its_value_is_never_read,c))}}}function fy(e){return!(262144&wn(e.symbol).isReferenced||ly(e.name))}function my(e,t,r,n){var i=String(n(t)),a=e.get(i);a?a[1].push(r):e.set(i,[t,[r]])}function gy(t){return e.tryCast(e.getRootDeclaration(t),e.isParameter)}function yy(t,r){if(!(4194304&t.flags)){var n=e.createMap(),i=e.createMap(),a=e.createMap();t.locals.forEach(function(t){var o;if(262144&t.flags?3&t.flags&&!(3&t.isReferenced):!t.isReferenced&&!t.exportSymbol)for(var s=0,c=t.declarations;s<c.length;s++){var l=c[s];if(!(e.isAmbientModule(l)||(e.isVariableDeclaration(l)&&e.isForInOrOfStatement(l.parent.parent)||vy(l))&&ly(l.name)))if(vy(l))my(n,250===(o=l).kind?o:251===o.kind?o.parent:o.parent.parent,l,u);else if(e.isBindingElement(l)&&e.isObjectBindingPattern(l.parent))l!==e.last(l.parent.elements)&&e.last(l.parent.elements).dotDotDotToken||my(i,l.parent,l,u);else if(e.isVariableDeclaration(l))my(a,l.parent,l,u);else{var _=t.valueDeclaration&&gy(t.valueDeclaration),d=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);_&&d?e.isParameterPropertyDeclaration(_)||e.parameterIsThisKeyword(_)||ly(d)||r(_,1,e.createDiagnosticForNode(d,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.symbolName(t))):uy(l,e.symbolName(t),r)}}}),n.forEach(function(t){var n=t[0],i=t[1],a=n.parent;if((n.name?1:0)+(n.namedBindings?251===n.namedBindings.kind?1:n.namedBindings.elements.length:0)===i.length)r(a,0,1===i.length?e.createDiagnosticForNode(a,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.idText(e.first(i).name)):e.createDiagnosticForNode(a,e.Diagnostics.All_imports_in_import_declaration_are_unused));else for(var o=0,s=i;o<s.length;o++){var c=s[o];uy(c,e.idText(c.name),r)}}),i.forEach(function(t){var n=t[0],i=t[1],o=gy(n.parent)?1:0;if(n.elements.length===i.length)1===i.length&&237===n.parent.kind&&238===n.parent.parent.kind?my(a,n.parent.parent,n.parent,u):r(n,o,1===i.length?e.createDiagnosticForNode(n,e.Diagnostics._0_is_declared_but_its_value_is_never_read,hy(e.first(i).name)):e.createDiagnosticForNode(n,e.Diagnostics.All_destructured_elements_are_unused));else for(var s=0,c=i;s<c.length;s++){var l=c[s];r(l,o,e.createDiagnosticForNode(l,e.Diagnostics._0_is_declared_but_its_value_is_never_read,hy(l.name)))}}),a.forEach(function(t){var n=t[0],i=t[1];if(n.declarations.length===i.length)r(n,0,1===i.length?e.createDiagnosticForNode(e.first(i).name,e.Diagnostics._0_is_declared_but_its_value_is_never_read,hy(e.first(i).name)):e.createDiagnosticForNode(219===n.parent.kind?n.parent:n,e.Diagnostics.All_variables_are_unused));else for(var a=0,o=i;a<o.length;a++){var s=o[a];r(s,0,e.createDiagnosticForNode(s,e.Diagnostics._0_is_declared_but_its_value_is_never_read,hy(s.name)))}})}}function hy(t){switch(t.kind){case 72:return e.idText(t);case 185:case 184:return hy(e.cast(e.first(t.elements),e.isBindingElement).name);default:return e.Debug.assertNever(t)}}function vy(e){return 250===e.kind||253===e.kind||251===e.kind}function by(t){if(218===t.kind&&Jv(t),e.isFunctionOrModuleBlock(t)){var r=zt;e.forEach(t.statements,gh),zt=r}else e.forEach(t.statements,gh);t.locals&&sy(t)}function Dy(t,r,n){if(!r||r.escapedText!==n)return!1;if(154===t.kind||153===t.kind||156===t.kind||155===t.kind||158===t.kind||159===t.kind)return!1;if(4194304&t.flags)return!1;var i=e.getRootDeclaration(t);return 151!==i.kind||!e.nodeIsMissing(i.parent.body)}function xy(t){e.findAncestor(t,function(r){return!!(4&$h(r))&&(72!==t.kind?Pr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):Pr(t,e.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0)})}function Sy(t){e.findAncestor(t,function(r){return!!(8&$h(r))&&(72!==t.kind?Pr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):Pr(t,e.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0)})}function Ty(t,r){if(!(w>=e.ModuleKind.ES2015||F.noEmit)&&(Dy(t,r,"require")||Dy(t,r,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Ti(t);284===n.kind&&e.isExternalOrCommonJsModule(n)&&Pr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(r),e.declarationNameToString(r))}}function Cy(t,r){if(!(P>=4||F.noEmit)&&Dy(t,r,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Ti(t);284===n.kind&&e.isExternalOrCommonJsModule(n)&&1024&n.flags&&Pr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(r),e.declarationNameToString(r))}}function Ey(t){if(151===e.getRootDeclaration(t).kind){var r=e.getContainingFunction(t);!function n(i){if(!e.isTypeNode(i)&&!e.isDeclarationName(i)){if(189===i.kind)return n(i.expression);if(72!==i.kind)return e.forEachChild(i,n);var a=Gr(i,i.escapedText,69317567,void 0,void 0,!1);if(a&&a!==oe&&a.valueDeclaration)if(a.valueDeclaration!==t){var o=e.getEnclosingBlockScopeContainer(a.valueDeclaration);if(o===r){if(151===a.valueDeclaration.kind||186===a.valueDeclaration.kind){if(a.valueDeclaration.pos<t.pos)return;if(e.findAncestor(i,function(r){return r===t.initializer?"quit":e.isFunctionLike(r.parent)||154===r.parent.kind&&!e.hasModifier(r.parent,32)&&e.isClassLike(r.parent.parent)}))return}Pr(i,e.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(t.name),e.declarationNameToString(i))}}else Pr(i,e.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer,e.declarationNameToString(t.name))}}(t.initializer)}}function ky(e){return e===ue?ce:e===ot?at:e}function Ny(t){if(iy(t),e.isBindingElement(t)||gh(t.type),t.name){if(149===t.name.kind&&(Rp(t.name),t.initializer&&dg(t.initializer)),186===t.kind){184===t.parent.kind&&P<7&&pv(t,4),t.propertyName&&149===t.propertyName.kind&&Rp(t.propertyName);var r=t.parent.parent,n=ki(r),i=t.propertyName||t.name;if(n&&!e.isBindingPattern(i)){var a=Rc(i);if(Ra(a)){var o=Ko(n,Ka(a));o&&(Tf(o,void 0,!1),uf(r,!!r.initializer&&98===r.initializer.kind,n,o))}}}if(e.isBindingPattern(t.name)&&(185===t.name.kind&&P<2&&F.downlevelIteration&&pv(t,512),e.forEach(t.name.elements,gh)),t.initializer&&151===e.getRootDeclaration(t).kind&&e.nodeIsMissing(e.getContainingFunction(t).body))Pr(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);else if(e.isBindingPattern(t.name)){if(t.initializer&&226!==t.parent.parent.kind){var s=dg(t.initializer);O&&0===t.name.elements.length?pf(s,t):sl(s,Wi(t),t,t.initializer),Ey(t)}}else{var c=In(t),u=ky(aa(c));if(t===c.valueDeclaration){var l=e.getEffectiveInitializer(t);l&&(e.isInJSFile(t)&&e.isObjectLiteralExpression(l)&&(0===l.properties.length||e.isPrototypeAccess(t.name))&&e.hasEntries(c.exports)||226===t.parent.parent.kind||(sl(dg(l),u,t,l,void 0),Ey(t))),c.declarations.length>1&&e.some(c.declarations,function(r){return r!==t&&e.isVariableLike(r)&&!Fy(r,t)})&&Pr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}else{var _=ky(Wi(t));u===_e||_===_e||Qu(u,_)||67108864&c.flags||Ay(u,t,_),t.initializer&&sl(dg(t.initializer),_,t,t.initializer,void 0),Fy(t,c.valueDeclaration)||Pr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}154!==t.kind&&153!==t.kind&&(Hg(t),237!==t.kind&&186!==t.kind||function(t){if(0==(3&e.getCombinedNodeFlags(t))&&!e.isParameterDeclaration(t)&&(237!==t.kind||t.initializer)){var r=In(t);if(1&r.flags){if(!e.isIdentifier(t.name))return e.Debug.fail();var n=Gr(t,t.name.escapedText,3,void 0,void 0,!1);if(n&&n!==r&&2&n.flags&&3&sf(n)){var i=e.getAncestor(n.valueDeclaration,238),a=219===i.parent.kind&&i.parent.parent?i.parent.parent:void 0;if(!a||!(218===a.kind&&e.isFunctionLike(a.parent)||245===a.kind||244===a.kind||284===a.kind)){var o=ci(n);Pr(t,e.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,o,o)}}}}}(t),Ty(t,t.name),Cy(t,t.name))}}}function Ay(t,r,n){var i=e.getNameOfDeclaration(r);Pr(i,154===r.kind||153===r.kind?e.Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,e.declarationNameToString(i),li(t),li(n))}function Fy(t,r){return 151===t.kind&&237===r.kind||237===t.kind&&151===r.kind||e.hasQuestionToken(t)===e.hasQuestionToken(r)&&e.getSelectedModifierFlags(t,504)===e.getSelectedModifierFlags(r,504)}function Py(t){return function(t){if(226!==t.parent.parent.kind&&227!==t.parent.parent.kind)if(4194304&t.flags)Ov(t);else if(!t.initializer){if(e.isBindingPattern(t.name)&&!e.isBindingPattern(t.parent))return jv(t,e.Diagnostics.A_destructuring_declaration_must_have_an_initializer);if(e.isVarConst(t))return jv(t,e.Diagnostics.const_declarations_must_be_initialized)}if(t.exclamationToken&&(219!==t.parent.parent.kind||!t.type||t.initializer||4194304&t.flags))return jv(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);F.module===e.ModuleKind.ES2015||F.module===e.ModuleKind.ESNext||F.module===e.ModuleKind.System||F.noEmit||4194304&t.parent.parent.flags||!e.hasModifier(t.parent.parent,1)||function t(r){if(72===r.kind){if("__esModule"===e.idText(r))return jv(r,e.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else for(var n=r.elements,i=0,a=n;i<a.length;i++){var o=a[i];if(!e.isOmittedExpression(o))return t(o.name)}return!1}(t.name),(e.isLet(t)||e.isVarConst(t))&&function t(r){if(72===r.kind){if(111===r.originalKeywordKind)return jv(r,e.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else for(var n=r.elements,i=0,a=n;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||t(o.name)}return!1}(t.name)}(t),Ny(t)}function wy(t){return function(t){if(t.dotDotDotToken){var r=t.parent.elements;if(t!==e.last(r))return jv(t,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);if(yv(r,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),t.propertyName)return jv(t.name,e.Diagnostics.A_rest_element_cannot_have_a_property_name);t.initializer&&Bv(t,t.initializer.pos-1,1,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}(t),Ny(t)}function Iy(t){mv(t)||Mv(t.declarationList)||function(t){if(!function e(t){switch(t.kind){case 222:case 223:case 224:case 231:case 225:case 226:case 227:return!1;case 233:return e(t.parent)}return!0}(t.parent)){if(e.isLet(t.declarationList))return jv(t,e.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);e.isVarConst(t.declarationList)&&jv(t,e.Diagnostics.const_declarations_can_only_be_declared_inside_a_block)}}(t),e.forEach(t.declarationList.declarations,gh)}function Oy(t,r){var n=kg(t,r);return 16384&n.flags&&Pr(t,e.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness),n}function My(t){Av(t);var r,n=df(kg(t.expression));if(238===t.initializer.kind){var i=t.initializer.declarations[0];i&&e.isBindingPattern(i.name)&&Pr(i.name,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),Ly(t)}else{var a=t.initializer,o=kg(a);187===a.kind||188===a.kind?Pr(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):rl(131072&(r=zc(Jc(n))).flags?ye:r,o)?Qm(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access):Pr(a,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}n!==ke&&eg(n,126091264)||Pr(t.expression,e.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,li(n)),gh(t.statement),t.locals&&sy(t)}function Ly(e){var t=e.initializer;t.declarations.length>=1&&Py(t.declarations[0])}function Ry(e,t){return By(_f(e),e,!0,void 0!==t)}function By(e,t,r,n){return Ei(e)?e:jy(e,t,r,n,!0)||ce}function jy(t,r,n,i,a){if(t!==ke){var o=P>=2,s=!o&&F.downlevelIteration;if(o||s||i){var c=Jy(t,o?r:void 0,i,!0,a);if(c||o)return c}var u=t,l=!1,_=!1;if(n){if(1048576&u.flags){var d=t.types,p=e.filter(d,function(e){return!(132&e.flags)});p!==d&&(u=Ac(p,2))}else 132&u.flags&&(u=ke);if((_=u!==t)&&(P<1&&r&&(Pr(r,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),l=!0),131072&u.flags))return ye}if(!Ul(u)){if(r&&!l){var f=!!Jy(t,void 0,i,!0,a);Pr(r,!n||_?s?e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:f?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:e.Diagnostics.Type_0_is_not_an_array_type:s?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:f?e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,li(u))}return _?ye:void 0}var m=Go(u,1);return _&&m?132&m.flags?ye:Ac([m,ye],2):m}zy(r,t,i)}function Jy(t,r,n,i,a){if(!Ei(t))return Td(t,function(t){var o=t;if(n){if(o.iteratedTypeOfAsyncIterable)return o.iteratedTypeOfAsyncIterable;if(oa(t,oc(!1))||oa(t,cc(!1)))return o.iteratedTypeOfAsyncIterable=t.typeArguments[0]}if(i){if(o.iteratedTypeOfIterable)return n?o.iteratedTypeOfAsyncIterable=Qg(o.iteratedTypeOfIterable):o.iteratedTypeOfIterable;if(oa(t,uc(!1))||oa(t,_c(!1)))return n?o.iteratedTypeOfAsyncIterable=Qg(t.typeArguments[0]):o.iteratedTypeOfIterable=t.typeArguments[0]}var s=n&&Ci(t,e.getPropertyNameForKnownSymbolName("asyncIterator")),c=s||(i?Ci(t,e.getPropertyNameForKnownSymbolName("iterator")):void 0);if(!Ei(c)){var u=c?Vo(c,0):void 0;if(e.some(u)){var l=Ky(Ac(e.map(u,ps),2),r,!!s);return a&&r&&l&&ol(t,s?function(e){return pc(oc(!0),[e])}(l):gc(l),r),l?n?o.iteratedTypeOfAsyncIterable=s?l:Qg(l):o.iteratedTypeOfIterable=l:void 0}r&&(zy(r,t,n),r=void 0)}})}function zy(t,r,n){Pr(t,n?e.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:e.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator,li(r))}function Ky(t,r,n){if(!Ei(t)){var i=t;if(n?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator)return n?i.iteratedTypeOfAsyncIterator:i.iteratedTypeOfIterator;if(oa(t,(n?sc:lc)(!1)))return n?i.iteratedTypeOfAsyncIterator=t.typeArguments[0]:i.iteratedTypeOfIterator=t.typeArguments[0];var a=Ci(t,"next");if(!Ei(a)){var o=a?Vo(a,0):e.emptyArray;if(0!==o.length){var s=Ac(e.map(o,ps),2);if(!(Ei(s)||n&&Ei(s=Gg(s,r,e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property)))){var c=s&&Ci(s,"value");if(c)return n?i.iteratedTypeOfAsyncIterator=c:i.iteratedTypeOfIterator=c;r&&Pr(r,n?e.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:e.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property)}}else r&&Pr(r,n?e.Diagnostics.An_async_iterator_must_have_a_next_method:e.Diagnostics.An_iterator_must_have_a_next_method)}}}function Uy(e,t){if(!Ei(e))return Jy(e,void 0,t,!t,!1)||Ky(e,void 0,t)}function Vy(t){Jv(t)||function(t){for(var r=t;r;){if(e.isFunctionLike(r))return jv(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(r.kind){case 233:if(t.label&&r.label.escapedText===t.label.escapedText){var n=228===t.kind&&!e.isIterationStatement(r.statement,!0);return!!n&&jv(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}break;case 232:if(229===t.kind&&!t.label)return!1;break;default:if(e.isIterationStatement(r,!1)&&!t.label)return!1}r=r.parent}if(t.label){var i=229===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return jv(t,i)}var i=229===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;jv(t,i)}(t)}function qy(t,r){var n=2==(3&e.getFunctionFlags(t))?Yg(r):r;return!!n&&Zm(n,16387)}function Wy(t){Jv(t)||void 0===t.expression&&function(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!Lv(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);cr.add(e.createFileDiagnostic(o,e.textSpanEnd(s),0,r,n,i,a))}}(t,e.Diagnostics.Line_break_not_permitted_here),t.expression&&kg(t.expression)}function Hy(t){var r,n=Cs(t.symbol,1),i=Cs(t.symbol,0),a=Go(t,0),o=Go(t,1);if(a||o){e.forEach(xo(t),function(e){var r=aa(e);p(e,r,t,i,a,0),p(e,r,t,n,o,1)});var s=t.symbol.valueDeclaration;if(1&e.getObjectFlags(t)&&e.isClassLike(s))for(var c=0,u=s.members;c<u.length;c++){var l=u[c];if(!e.hasModifier(l,32)&&za(l)){var _=In(l),d=aa(_);p(_,d,t,i,a,0),p(_,d,t,n,o,1)}}}function p(t,r,n,i,a,o){if(a&&!e.isKnownSymbol(t)){var s,c=t.valueDeclaration,u=c&&e.getNameOfDeclaration(c);if(1!==o||(u?Op(u):Lp(t.escapedName)))c&&u&&(204===c.kind||149===u.kind||t.parent===n.symbol)?s=c:i?s=i:2&e.getObjectFlags(n)&&(s=e.forEach(va(n),function(e){return So(e,t.escapedName)&&Go(e,o)})?void 0:n.symbol.declarations[0]),s&&!rl(r,a)&&Pr(s,0===o?e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2:e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2,ci(t),li(r),li(a))}}a&&o&&!(r=n||i)&&2&e.getObjectFlags(t)&&(r=e.forEach(va(t),function(e){return Go(e,0)&&Go(e,1)})?void 0:t.symbol.declarations[0]),r&&!rl(o,a)&&Pr(r,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1,li(o),li(a))}function Gy(e,t){switch(e.escapedText){case"any":case"unknown":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":Pr(e,t,e.escapedText)}}function Yy(t){if(t)for(var r=!1,n=0;n<t.length;n++){var i=t[n];if(Ng(i),o){i.default?(r=!0,Xy(i.default,t,n)):r&&Pr(i,e.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);for(var a=0;a<n;a++)t[a].symbol===i.symbol&&Pr(i.name,e.Diagnostics.Duplicate_identifier_0,e.declarationNameToString(i.name))}}}function Xy(t,r,n){!function t(i){if(164===i.kind){var a=Ys(i);if(262144&a.flags)for(var o=n;o<r.length;o++)a.symbol===In(r[o])&&Pr(i,e.Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters)}e.forEachChild(i,t)}(t)}function Qy(t){if(1!==t.declarations.length){var r=Ur(t);if(!r.typeParametersChecked){r.typeParametersChecked=!0;var n=function(t){return e.filter(t.declarations,function(e){return 240===e.kind||241===e.kind})}(t);if(n.length<=1)return;if(!function(t,r){for(var n=e.length(r),i=is(r),a=0,o=t;a<o.length;a++){var s=o[a],c=e.getEffectiveTypeParameterDeclarations(s),u=c.length;if(u<i||u>n)return!1;for(var l=0;l<u;l++){var _=c[l],d=r[l];if(_.name.escapedText!==d.symbol.escapedName)return!1;var p=e.getEffectiveConstraintOfTypeParameter(_),f=p&&Du(p),m=ko(d);if(f&&(!m||!Qu(f,m)))return!1;var g=_.default&&Du(_.default),y=Lo(d);if(g&&y&&!Qu(g,y))return!1}}return!0}(n,Na(t).localTypeParameters))for(var i=ci(t),a=0,o=n;a<o.length;a++)Pr(o[a].name,e.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters,i)}}}function $y(t){var r;!function(t){var r=e.getSourceFileOfNode(t);(function(t){var r=!1,n=!1;if(!mv(t)&&t.heritageClauses)for(var i=0,a=t.heritageClauses;i<a.length;i++){var o=a[i];if(86===o.token){if(r)return Rv(o,e.Diagnostics.extends_clause_already_seen);if(n)return Rv(o,e.Diagnostics.extends_clause_must_precede_implements_clause);if(o.types.length>1)return Rv(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);r=!0}else{if(e.Debug.assert(109===o.token),n)return Rv(o,e.Diagnostics.implements_clause_already_seen);n=!0}Sv(o)}})(t)||hv(t.typeParameters,r)}(t),iy(t),t.name&&(Gy(t.name,e.Diagnostics.Class_name_cannot_be_0),Ty(t,t.name),Cy(t,t.name),4194304&t.flags||(r=t.name,1===P&&"Object"===r.escapedText&&w!==e.ModuleKind.ES2015&&w!==e.ModuleKind.ESNext&&Pr(r,e.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,e.ModuleKind[w]))),Yy(e.getEffectiveTypeParameterDeclarations(t)),Hg(t);var n=In(t),i=Na(n),a=Ha(i),s=aa(n);Qy(n),function(t){var r;!function(e){e[e.Getter=1]="Getter",e[e.Setter=2]="Setter",e[e.Method=4]="Method",e[e.Property=3]="Property"}(r||(r={}));for(var n=e.createUnderscoreEscapedMap(),i=e.createUnderscoreEscapedMap(),a=0,o=t.members;a<o.length;a++){var s=o[a];if(157===s.kind)for(var c=0,u=s.parameters;c<u.length;c++){var l=u[c];e.isParameterPropertyDeclaration(l)&&!e.isBindingPattern(l.name)&&f(n,l.name,l.name.escapedText,3)}else{var _=e.hasModifier(s,32)?i:n,d=s.name,p=d&&e.getPropertyNameForPropertyNameNode(d);if(d&&p)switch(s.kind){case 158:f(_,d,p,1);break;case 159:f(_,d,p,2);break;case 154:f(_,d,p,3);break;case 156:f(_,d,p,4)}}}function f(t,r,n,i){var a=t.get(n);a?4&a?4!==i&&Pr(r,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(r)):a&i?Pr(r,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(r)):t.set(n,a|i):t.set(n,i)}}(t),4194304&t.flags||function(t){for(var r=0,n=t.members;r<n.length;r++){var i=n[r],a=i.name;if(e.hasModifier(i,32)&&a){var o=e.getPropertyNameForPropertyNameNode(a);switch(o){case"name":case"length":case"caller":case"arguments":case"prototype":Pr(a,e.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,o,yi(In(t)))}}}}(t);var c=e.getEffectiveBaseTypeNode(t);if(c){P<2&&pv(c.parent,1);var u=va(i);if(u.length&&o){var l=u[0],_=ha(i),d=Bo(_);!function(t,r){var n=Vo(t,1);if(n.length){var i=n[0].declaration;if(i&&e.hasModifier(i,8)){var a=e.getClassLikeDeclarationOfSymbol(t.symbol);Nh(r,a)||Pr(r,e.Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,gn(t.symbol))}}}(d,c),gh(c.expression);var p=e.getClassExtendsHeritageElement(t);if(p&&p!==c&&kg(p.expression),e.some(c.typeArguments)){e.forEach(c.typeArguments,gh);for(var f=0,m=ga(d,c.typeArguments,c);f<m.length&&jg(c,m[f].typeParameters);f++);}if(ol(a,x=Ha(l,i.thisType),void 0)?ol(s,Xu(d),t.name||t,e.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1):Zy(t,a,x,e.Diagnostics.Class_0_incorrectly_extends_base_class_1),8650752&_.flags&&!pa(s)&&Pr(t.name||t,e.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any),!(d.symbol&&32&d.symbol.flags||8650752&_.flags)){var g=ya(d,c.typeArguments,c);e.forEach(g,function(e){return!lm(e.declaration)&&ps(e)!==l})&&Pr(c.expression,e.Diagnostics.Base_constructors_must_all_have_the_same_return_type)}!function(t,r){for(var n=0,i=Co(r);n<i.length;n++){var a=i[n],o=eh(a);if(!(4194304&o.flags)){var s=eh(So(t,o.escapedName)),c=e.getDeclarationModifierFlagsFromSymbol(o);if(e.Debug.assert(!!s,"derived should point to something, even if it is the base class' declaration."),s)if(s===o){var u=e.getClassLikeDeclarationOfSymbol(t.symbol);!(128&c)||u&&e.hasModifier(u,128)||(209===u.kind?Pr(u,e.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,ci(a),li(r)):Pr(u,e.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,li(t),ci(a),li(r)))}else{var l=e.getDeclarationModifierFlagsFromSymbol(s);if(8&c||8&l)continue;if(cf(o)||98308&o.flags&&98308&s.flags)continue;var _=void 0;_=cf(o)?98304&s.flags?e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property:98304&o.flags?e.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:e.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function,Pr(e.getNameOfDeclaration(s.valueDeclaration)||s.valueDeclaration,_,li(r),ci(o),li(t))}}}}(i,l)}}var y=e.getClassImplementsHeritageClauseElements(t);if(y)for(var h=0,v=y;h<v.length;h++){var b=v[h];if(e.isEntityNameExpression(b.expression)||Pr(b.expression,e.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),zg(b),o){var D=Du(b);if(D!==_e)if(ba(D)){var x,S=D.symbol&&32&D.symbol.flags?e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:e.Diagnostics.Class_0_incorrectly_implements_interface_1;ol(a,x=Ha(D,i.thisType),void 0)||Zy(t,a,x,S)}else Pr(b,e.Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}o&&(Hy(i),Ig(t),function(t){if(O&&R&&!(4194304&t.flags))for(var r=jn(t),n=0,i=t.members;n<i.length;n++){var a=i[n];if(th(a)){var o=a.name;if(e.isIdentifier(o)){var s=aa(In(a));3&s.flags||32768&a_(s)||r&&rh(o,s,r)||Pr(a.name,e.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,e.declarationNameToString(o))}}}}(t))}function Zy(t,r,n,i){for(var a=!1,o=function(t){if(e.hasStaticModifier(t))return"continue";var i=t.name&&Ph(t.name)||Ph(t);if(i){var o=Ko(r,i.escapedName),s=Ko(n,i.escapedName);o&&s&&(ol(aa(o),aa(s),t.name||t,void 0,function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,ci(i),li(r),li(n))})||(a=!0))}},s=0,c=t.members;s<c.length;s++)o(c[s]);a||ol(r,n,t.name||t,i)}function eh(t){return 1&e.getCheckFlags(t)?t.target:t}function th(t){return 154===t.kind&&!e.hasModifier(t,160)&&!t.exclamationToken&&!t.initializer}function rh(t,r,n){var i=e.createPropertyAccess(e.createThis(),t);return i.expression.parent=i,i.parent=n,i.flowNode=n.returnFlowNode,!(32768&a_(Bd(i,r,u_(r))))}function nh(t){if(mv(t)||function(t){var r=!1;if(t.heritageClauses)for(var n=0,i=t.heritageClauses;n<i.length;n++){var a=i[n];if(86!==a.token)return e.Debug.assert(109===a.token),Rv(a,e.Diagnostics.Interface_declaration_cannot_have_implements_clause);if(r)return Rv(a,e.Diagnostics.extends_clause_already_seen);r=!0,Sv(a)}}(t),Yy(t.typeParameters),o){Gy(t.name,e.Diagnostics.Interface_name_cannot_be_0),Hg(t);var r=In(t);if(Qy(r),t===e.getDeclarationOfKind(r,241)){var n=Na(r),i=Ha(n);if(function(t,r){var n=va(t);if(n.length<2)return!0;var i=e.createUnderscoreEscapedMap();e.forEach(La(t).declaredProperties,function(e){i.set(e.escapedName,{prop:e,containingType:t})});for(var a=!0,o=0,s=n;o<s.length;o++)for(var c=s[o],u=0,l=Co(Ha(c,t.thisType));u<l.length;u++){var _=l[u],d=i.get(_.escapedName);if(d){if(d.containingType!==t&&0===Rl(d.prop,_,$u)){a=!1;var p=li(d.containingType),f=li(c),m=e.chainDiagnosticMessages(void 0,e.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical,ci(_),p,f);m=e.chainDiagnosticMessages(m,e.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2,li(t),p,f),cr.add(e.createDiagnosticForNodeFromMessageChain(r,m))}}else i.set(_.escapedName,{prop:_,containingType:c})}return a}(n,t.name)){for(var a=0,s=va(n);a<s.length;a++)ol(i,Ha(s[a],n.thisType),t.name,e.Diagnostics.Interface_0_incorrectly_extends_interface_1);Hy(n)}}wg(t)}e.forEach(e.getInterfaceBaseTypeNodes(t),function(t){e.isEntityNameExpression(t.expression)||Pr(t.expression,e.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),zg(t)}),e.forEach(t.members,gh),o&&(Ig(t),sy(t))}function ih(e){var t=Vr(e);if(!(16384&t.flags)){t.flags|=16384;for(var r=0,n=0,i=e.members;n<i.length;n++){var a=i[n],o=ah(a,r);Vr(a).enumMemberValue=o,r="number"==typeof o?o+1:void 0}}}function ah(t,r){if(Ni(t.name))Pr(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_enums);else{var n=e.getTextOfPropertyName(t.name);Lp(n)&&!Mp(n)&&Pr(t.name,e.Diagnostics.An_enum_member_cannot_have_a_numeric_name)}return t.initializer?function(t){var r=Sa(In(t.parent)),n=e.isEnumConst(t.parent),i=t.initializer,a=1!==r||xa(t)?function r(n){switch(n.kind){case 202:var i=r(n.operand);if("number"==typeof i)switch(n.operator){case 38:return i;case 39:return-i;case 53:return~i}break;case 204:var a=r(n.left),s=r(n.right);if("number"==typeof a&&"number"==typeof s)switch(n.operatorToken.kind){case 50:return a|s;case 49:return a&s;case 47:return a>>s;case 48:return a>>>s;case 46:return a<<s;case 51:return a^s;case 40:return a*s;case 42:return a/s;case 38:return a+s;case 39:return a-s;case 43:return a%s;case 41:return Math.pow(a,s)}else if("string"==typeof a&&"string"==typeof s&&38===n.operatorToken.kind)return a+s;break;case 10:return n.text;case 8:return zv(n),+n.text;case 195:return r(n.expression);case 72:var c=n;return Mp(c.escapedText)?+c.escapedText:e.nodeIsMissing(n)?0:o(n,In(t.parent),c.escapedText);case 190:case 189:var u=n;if(function e(t){return 72===t.kind||189===t.kind&&e(t.expression)||190===t.kind&&e(t.expression)&&10===t.argumentExpression.kind}(u)){var l=Cg(u.expression);if(l.symbol&&384&l.symbol.flags){var _=void 0;if(189===u.kind)_=u.name.escapedText;else{var d=u.argumentExpression;e.Debug.assert(e.isLiteralExpression(d)),_=e.escapeLeadingUnderscores(d.text)}return o(n,l.symbol,_)}}}}(i):void 0;if(void 0!==a)n&&"number"==typeof a&&!isFinite(a)&&Pr(i,isNaN(a)?e.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:e.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);else{if(1===r)return Pr(i,e.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members),0;n?Pr(i,e.Diagnostics.const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values):4194304&t.parent.flags?Pr(i,e.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):ol(kg(i),Na(In(t.parent)),i,void 0)}return a;function o(r,n,i){var a=n.exports.get(i);if(a){var o=a.valueDeclaration;if(o!==t)return Hr(o,t)?Zh(o):(Pr(r,e.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),0)}}}(t):4194304&t.parent.flags&&!e.isEnumConst(t.parent)?void 0:void 0!==r?r:void Pr(t.name,e.Diagnostics.Enum_member_must_have_initializer)}function oh(t){if(o){var r=e.isGlobalScopeAugmentation(t),n=4194304&t.flags;r&&!n&&Pr(t.name,e.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);var i=e.isAmbientModule(t);if(dh(t,i?e.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:e.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module))return;mv(t)||n||10!==t.name.kind||jv(t.name,e.Diagnostics.Only_ambient_modules_can_use_quoted_names),e.isIdentifier(t.name)&&(Ty(t,t.name),Cy(t,t.name)),Hg(t);var a=In(t);if(512&a.flags&&!n&&a.declarations.length>1&&_(t,!!F.preserveConstEnums||!!F.isolatedModules)){var s=function(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r];if((240===i.kind||239===i.kind&&e.nodeIsPresent(i.body))&&!(4194304&i.flags))return i}}(a);s&&(e.getSourceFileOfNode(t)!==e.getSourceFileOfNode(s)?Pr(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):t.pos<s.pos&&Pr(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged));var c=e.getDeclarationOfKind(a,240);c&&(d=t,p=c,f=e.getEnclosingBlockScopeContainer(d),m=e.getEnclosingBlockScopeContainer(p),qr(f)?qr(m):!qr(m)&&f===m)&&(Vr(t).flags|=32768)}if(i)if(e.isExternalModuleAugmentation(t)){if((r||33554432&In(t).flags)&&t.body)for(var u=0,l=t.body.statements;u<l.length;u++)sh(l[u],r)}else qr(t.parent)?r?Pr(t.name,e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):e.isExternalModuleNameRelative(e.getTextOfIdentifierOrLiteral(t.name))&&Pr(t.name,e.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name):Pr(t.name,r?e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:e.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}var d,p,f,m;t.body&&(gh(t.body),e.isGlobalScopeAugmentation(t)||sy(t))}function sh(t,r){switch(t.kind){case 219:for(var n=0,i=t.declarationList.declarations;n<i.length;n++)sh(i[n],r);break;case 254:case 255:Rv(t,e.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 248:case 249:Rv(t,e.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 186:case 237:var a=t.name;if(e.isBindingPattern(a)){for(var o=0,s=a.elements;o<s.length;o++)sh(s[o],r);break}case 240:case 243:case 239:case 241:case 244:case 242:if(r)return;var c=In(t);if(c){var u=!(33554432&c.flags);u||(u=!!c.parent&&e.isExternalModuleAugmentation(c.parent.declarations[0]))}}}function ch(e){switch(e.kind){case 72:return e;case 148:do{e=e.left}while(72!==e.kind);return e;case 189:do{e=e.expression}while(72!==e.kind);return e}}function uh(t){var r=e.getExternalModuleName(t);if(!r||e.nodeIsMissing(r))return!1;if(!e.isStringLiteral(r))return Pr(r,e.Diagnostics.String_literal_expected),!1;var n=245===t.parent.kind&&e.isAmbientModule(t.parent.parent);return 284===t.parent.kind||n?!(n&&e.isExternalModuleNameRelative(r.text)&&!fi(t)&&(Pr(t,e.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),1)):(Pr(r,255===t.kind?e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace:e.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module),!1)}function lh(t){var r=In(t),n=dn(r);if(n!==oe){var i=(68268991&r.flags?67220415:0)|(67897832&r.flags?67897832:0)|(1920&r.flags?1920:0);n.flags&i&&Pr(t,257===t.kind?e.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0:e.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0,ci(r)),!F.isolatedModules||257!==t.kind||67220415&n.flags||4194304&t.flags||Pr(t,e.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided)}}function _h(e){Ty(e,e.name),Cy(e,e.name),lh(e)}function dh(e,t){var r=284===e.parent.kind||245===e.parent.kind||244===e.parent.kind;return r||Rv(e,t),!r}function ph(t){if(lh(t),e.getEmitDeclarations(F)&&vi(t.propertyName||t.name,!0),!t.parent.parent.moduleSpecifier){var r=t.propertyName||t.name,n=Gr(r,r.escapedText,70107135,void 0,void 0,!0);n&&(n===q||qr(Ti(n.declarations[0])))?Pr(r,e.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,e.idText(r)):pn(t)}}function fh(t){var r=In(t),n=Ur(r);if(!n.exportsChecked){var i=r.exports.get("export=");if(i&&function(t){return e.forEachEntry(t.exports,function(e,t){return"export="!==t})}(r)){var a=rn(i)||i.valueDeclaration;fi(a)||e.isInJSFile(a)||Pr(a,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}var o=An(r);o&&o.forEach(function(t,r){var n=t.declarations,i=t.flags;if("__export"!==r&&!(1984&i)){var a=e.countWhere(n,Ar);if(!(524288&i&&a<=2)&&a>1)for(var o=0,s=n;o<s.length;o++){var c=s[o];mh(c)&&cr.add(e.createDiagnosticForNode(c,e.Diagnostics.Cannot_redeclare_exported_variable_0,e.unescapeLeadingUnderscores(r)))}}}),n.exportsChecked=!0}}function mh(e){return 239!==e.kind&&156!==e.kind||!!e.body}function gh(t){if(t){var r=h;h=t,function(t){e.isInJSFile(t)&&e.forEach(t.jsDoc,function(t){var r=t.tags;return e.forEach(r,gh)});var r=t.kind;if(m)switch(r){case 244:case 240:case 241:case 239:m.throwIfCancellationRequested()}switch(r){case 150:return Ng(t);case 151:return Ag(t);case 154:case 153:return Og(t);case 165:case 166:case 160:case 161:case 162:return Pg(t);case 156:case 155:return function(t){wv(t)||Cv(t.name),oy(t),e.hasModifier(t,128)&&156===t.kind&&t.body&&Pr(t,e.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,e.declarationNameToString(t.name))}(t);case 157:return Mg(t);case 158:case 159:return Lg(t);case 164:return zg(t);case 163:return function(t){var r=function(e){switch(e.parent.kind){case 197:case 160:case 239:case 196:case 165:case 156:case 155:var t=e.parent;if(e===t.type)return t}}(t);if(r){var n=os(r),i=ds(n);if(i){gh(t.type);var a=t.parameterName;if(e.isThisTypePredicate(i))bu(a);else if(i.parameterIndex>=0)n.hasRestParameter&&i.parameterIndex===n.parameters.length-1?Pr(a,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter):ol(i.type,aa(n.parameters[i.parameterIndex]),t.type,void 0,function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)});else if(a){for(var o=!1,s=0,c=r.parameters;s<c.length;s++){var u=c[s].name;if(e.isBindingPattern(u)&&Fg(u,a,i.parameterName)){o=!0;break}}o||Pr(t.parameterName,e.Diagnostics.Cannot_find_parameter_0,i.parameterName)}}}else Pr(t,e.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods)}(t);case 167:return function(e){Qs(e)}(t);case 168:return function(t){e.forEach(t.members,gh),o&&(Hy(ou(t)),Ig(t),wg(t))}(t);case 169:return function(e){gh(e.elementType)}(t);case 170:return function(t){for(var r=t.elementTypes,n=!1,i=0;i<r.length;i++){var a=r[i];if(172===a.kind){if(i!==r.length-1){jv(a,e.Diagnostics.A_rest_element_must_be_last_in_a_tuple_type);break}Jl(Du(a))||Pr(a,e.Diagnostics.A_rest_element_type_must_be_an_array_type)}else if(171===a.kind)n=!0;else if(n){jv(a,e.Diagnostics.A_required_element_cannot_follow_an_optional_element);break}}e.forEach(t.elementTypes,gh)}(t);case 173:case 174:return function(t){e.forEach(t.types,gh)}(t);case 177:case 171:case 172:return gh(t.type);case 178:return function(e){bu(e)}(t);case 179:return Ug(t);case 175:return function(t){e.forEachChild(t,gh)}(t);case 176:return function(t){e.findAncestor(t,function(e){return e.parent&&175===e.parent.kind&&e.parent.extendsType===e})||jv(t,e.Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),gh(t.typeParameter),sy(t)}(t);case 183:return function(e){gh(e.argument),Du(e)}(t);case 300:return function(t){var r=e.getJSDocHost(t);if(e.isClassDeclaration(r)||e.isClassExpression(r)){var n=e.getJSDocTags(r).filter(e.isJSDocAugmentsTag);e.Debug.assert(n.length>0),n.length>1&&Pr(n[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=ay(t.class.expression),a=e.getClassExtendsHeritageElement(r);if(a){var o=ay(a.expression);o&&i.escapedText!==o.escapedText&&Pr(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else Pr(r,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 309:case 302:return function(t){t.typeExpression||Pr(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&Gy(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),gh(t.typeExpression)}(t);case 308:return function(e){gh(e.constraint);for(var t=0,r=e.typeParameters;t<r.length;t++)gh(r[t])}(t);case 307:return function(e){gh(e.typeExpression)}(t);case 304:return function(t){if(gh(t.typeExpression),!e.getParameterSymbolFromJSDoc(t)){var r=e.getHostSignatureFromJSDoc(t);if(r){var n=e.getJSDocTags(r).filter(e.isJSDocParameterTag).indexOf(t);if(n>-1&&n<r.parameters.length&&e.isBindingPattern(r.parameters[n].name))return;cs(r)?e.findLast(e.getJSDocTags(r),e.isJSDocParameterTag)===t&&t.typeExpression&&t.typeExpression.type&&!Jl(Du(t.typeExpression.type))&&Pr(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,e.idText(148===t.name.kind?t.name.right:t.name)):e.isQualifiedName(t.name)?Pr(t.name,e.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,e.entityNameToString(t.name),e.entityNameToString(t.name.left)):Pr(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,e.idText(t.name))}}}(t);case 294:!function(t){!o||t.type||e.isJSDocConstructSignature(t)||b_(t,ce),Pg(t)}(t);case 292:case 291:case 289:case 290:case 297:return yh(t),void e.forEachChild(t,gh);case 295:return void function(t){yh(t),gh(t.type);var r=t.parent;if(e.isParameter(r)&&e.isJSDocFunctionType(r.parent))e.last(r.parent.parameters)!==r&&Pr(t,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);else{e.isJSDocTypeExpression(r)||Pr(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);var n=t.parent.parent;if(e.isJSDocParameterTag(n)){var i=e.getParameterSymbolFromJSDoc(n);if(i){var a=e.getHostSignatureFromJSDoc(n);a&&e.last(a.parameters).symbol===i||Pr(t,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list)}}else Pr(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature)}}(t);case 288:return gh(t.type);case 180:return function(e){gh(e.objectType),gh(e.indexType),Kg(Qc(e),e)}(t);case 181:return function(t){gh(t.typeParameter),gh(t.type),t.type||b_(t,ce),ol(_o($c(t)),we,e.getEffectiveConstraintOfTypeParameter(t.typeParameter))}(t);case 239:return function(e){o&&(oy(e),Ev(e),Ty(e,e.name),Cy(e,e.name))}(t);case 218:case 245:return by(t);case 219:return Iy(t);case 221:return function(e){Jv(e),kg(e.expression)}(t);case 222:return function(t){Jv(t),Oy(t.expression),gh(t.thenStatement),220===t.thenStatement.kind&&Pr(t.thenStatement,e.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement),gh(t.elseStatement)}(t);case 223:return function(e){Jv(e),gh(e.statement),Oy(e.expression)}(t);case 224:return function(e){Jv(e),Oy(e.expression),gh(e.statement)}(t);case 225:return function(t){Jv(t)||t.initializer&&238===t.initializer.kind&&Mv(t.initializer),t.initializer&&(238===t.initializer.kind?e.forEach(t.initializer.declarations,Py):kg(t.initializer)),t.condition&&Oy(t.condition),t.incrementor&&kg(t.incrementor),gh(t.statement),t.locals&&sy(t)}(t);case 226:return My(t);case 227:return function(t){if(Av(t),t.awaitModifier?2==(6&e.getFunctionFlags(e.getContainingFunction(t)))&&P<7&&pv(t,16384):F.downlevelIteration&&P<2&&pv(t,256),238===t.initializer.kind)Ly(t);else{var r=t.initializer,n=Ry(t.expression,t.awaitModifier);if(187===r.kind||188===r.kind)og(r,n||_e);else{var i=kg(r);Qm(r,e.Diagnostics.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access),n&&sl(n,i,r,t.expression)}}gh(t.statement),t.locals&&sy(t)}(t);case 228:case 229:return Vy(t);case 230:return function(t){if(!Jv(t)){var r=e.getContainingFunction(t);if(r){var n=ps(os(r)),i=e.getFunctionFlags(r),a=1&i;if(O||t.expression||131072&n.flags){var o=t.expression?dg(t.expression):pe;if(a)return;if(159===r.kind)t.expression&&Pr(t,e.Diagnostics.Setters_cannot_return_a_value);else if(157===r.kind)t.expression&&!sl(o,n,t,t.expression)&&Pr(t,e.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(fs(r))if(2&i){var s=Yg(n),c=Xg(o,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);s&&sl(c,s,t,t.expression)}else sl(o,n,t,t.expression)}else 157===r.kind||!F.noImplicitReturns||qy(r,n)||a||Pr(t,e.Diagnostics.Not_all_code_paths_return_a_value)}else Rv(t,e.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body)}}(t);case 231:return function(t){Jv(t)||16384&t.flags&&Rv(t,e.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block),kg(t.expression);var r=e.getSourceFileOfNode(t);if(!Lv(r)){var n=e.getSpanOfTokenAtPosition(r,t.pos).start;Bv(r,n,t.statement.pos-n,e.Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any)}}(t);case 232:return function(t){var r;Jv(t);var n=!1,i=kg(t.expression),a=Yl(i);e.forEach(t.caseBlock.clauses,function(s){if(272===s.kind&&!n)if(void 0===r)r=s;else{var c=e.getSourceFileOfNode(t),u=e.skipTrivia(c.text,s.pos);Bv(c,u,(s.statements.length>0?s.statements[0].pos:s.end)-u,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0}if(o&&271===s.kind){var l=kg(s.expression),_=Yl(l),d=i;_&&a||(l=_?Xl(l):l,d=Xl(i)),sg(d,l)||fl(l,d,s.expression,void 0)}e.forEach(s.statements,gh)}),t.caseBlock.locals&&sy(t.caseBlock)}(t);case 233:return function(t){Jv(t)||e.findAncestor(t.parent,function(r){return e.isFunctionLike(r)?"quit":233===r.kind&&r.label.escapedText===t.label.escapedText&&(jv(t.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNode(t.label)),!0)}),gh(t.statement)}(t);case 234:return Wy(t);case 235:return function(t){Jv(t),by(t.tryBlock);var r=t.catchClause;if(r){if(r.variableDeclaration)if(r.variableDeclaration.type)Rv(r.variableDeclaration.type,e.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);else if(r.variableDeclaration.initializer)Rv(r.variableDeclaration.initializer,e.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);else{var n=r.block.locals;n&&e.forEachKey(r.locals,function(t){var r=n.get(t);r&&0!=(2&r.flags)&&jv(r.valueDeclaration,e.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause,t)})}by(r.block)}t.finallyBlock&&by(t.finallyBlock)}(t);case 237:return Py(t);case 186:return wy(t);case 240:return function(t){t.name||e.hasModifier(t,512)||Rv(t,e.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name),$y(t),e.forEach(t.members,gh),sy(t)}(t);case 241:return nh(t);case 242:return function(t){mv(t),Gy(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),Yy(t.typeParameters),gh(t.type),sy(t)}(t);case 243:return function(t){if(o){mv(t),Gy(t.name,e.Diagnostics.Enum_name_cannot_be_0),Ty(t,t.name),Cy(t,t.name),Hg(t),ih(t);var r=In(t);if(t===e.getDeclarationOfKind(r,t.kind)){if(r.declarations.length>1){var n=e.isEnumConst(t);e.forEach(r.declarations,function(t){e.isEnumDeclaration(t)&&e.isEnumConst(t)!==n&&Pr(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)})}var i=!1;e.forEach(r.declarations,function(t){if(243!==t.kind)return!1;var r=t;if(!r.members.length)return!1;var n=r.members[0];n.initializer||(i?Pr(n.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):i=!0)})}}}(t);case 244:return oh(t);case 249:return function(t){if(!dh(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(!mv(t)&&e.hasModifiers(t)&&Rv(t,e.Diagnostics.An_import_declaration_cannot_have_modifiers),uh(t))){var r=t.importClause;r&&(r.name&&_h(r),r.namedBindings&&(251===r.namedBindings.kind?_h(r.namedBindings):vn(t,t.moduleSpecifier)&&e.forEach(r.namedBindings.elements,_h)))}}(t);case 248:return function(t){if(!dh(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(mv(t),e.isInternalModuleImportEqualsDeclaration(t)||uh(t)))if(_h(t),e.hasModifier(t,1)&&pn(t),259!==t.moduleReference.kind){var r=dn(In(t));if(r!==oe){if(67220415&r.flags){var n=ch(t.moduleReference);1920&yn(n,67221439).flags||Pr(n,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(n))}67897832&r.flags&&Gy(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else w>=e.ModuleKind.ES2015&&!(4194304&t.flags)&&jv(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 255:return function(t){if(!dh(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!mv(t)&&e.hasModifiers(t)&&Rv(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||uh(t)))if(t.exportClause){e.forEach(t.exportClause.elements,ph);var r=245===t.parent.kind&&e.isAmbientModule(t.parent.parent),n=!r&&245===t.parent.kind&&!t.moduleSpecifier&&4194304&t.flags;284===t.parent.kind||r||n||Pr(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var i=vn(t,t.moduleSpecifier);i&&Cn(i)&&Pr(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,ci(i)),w!==e.ModuleKind.System&&w!==e.ModuleKind.ES2015&&w!==e.ModuleKind.ESNext&&pv(t,32768)}}(t);case 254:return function(t){if(!dh(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var r=284===t.parent.kind?t.parent:t.parent.parent;244!==r.kind||e.isAmbientModule(r)?(!mv(t)&&e.hasModifiers(t)&&Rv(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),72===t.expression.kind?(pn(t),e.getEmitDeclarations(F)&&vi(t.expression,!0)):dg(t.expression),fh(r),4194304&t.flags&&!e.isEntityNameExpression(t.expression)&&jv(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||4194304&t.flags||(w>=e.ModuleKind.ES2015?jv(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):w===e.ModuleKind.System&&jv(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))):t.isExportEquals?Pr(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace):Pr(t,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 220:case 236:return void Jv(t);case 258:!function(e){iy(e)}(t)}}(t),h=r}}function yh(t){e.isInJSFile(t)||jv(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function hh(t){var r=Vr(e.getSourceFileOfNode(t));if(!(1&r.flags)){r.deferredNodes=r.deferredNodes||e.createMap();var n=""+u(t);r.deferredNodes.set(n,t)}}function vh(t){var r=h;switch(h=t,t.kind){case 196:case 197:case 156:case 155:!function(t){e.Debug.assert(156!==t.kind||e.isObjectLiteralMethod(t));var r=e.getFunctionFlags(t),n=qm(t,r);if(0==(1&r)&&Um(t,n),t.body)if(e.getEffectiveReturnTypeNode(t)||ps(os(t)),218===t.body.kind)gh(t.body);else{var i=kg(t.body);n&&sl(2==(3&r)?Xg(i,t.body,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):i,n,t.body,t.body)}}(t);break;case 158:case 159:Lg(t);break;case 209:!function(t){e.forEach(t.members,gh),sy(t)}(t);break;case 261:!function(e){nf(e)}(t);break;case 260:!function(e){nf(e.openingElement),Up(e.closingElement.tagName)?Gp(e.closingElement):kg(e.closingElement.tagName),qp(e)}(t)}h=r}function bh(t){e.performance.mark("beforeCheck"),function(t){var r=Vr(t);if(!(1&r.flags)){if(e.skipTypeChecking(t,F))return;!function(t){4194304&t.flags&&function(t){for(var r=0,n=t.statements;r<n.length;r++){var i=n[r];if((e.isDeclaration(i)||219===i.kind)&&(241!==(a=i).kind&&242!==a.kind&&249!==a.kind&&248!==a.kind&&255!==a.kind&&254!==a.kind&&247!==a.kind&&!e.hasModifier(a,515)&&Rv(a,e.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file)))return!0}var a}(t)}(t),e.clear(ar),e.clear(or),e.forEach(t.statements,gh),gh(t.endOfFileToken),function(e){var t=Vr(e);t.deferredNodes&&t.deferredNodes.forEach(vh)}(t),e.isExternalOrCommonJsModule(t)&&sy(t),t.isDeclarationFile||!F.noUnusedLocals&&!F.noUnusedParameters||cy(xh(t),function(t,r,n){!e.containsParseError(t)&&Dh(r)&&cr.add(n)}),e.isExternalOrCommonJsModule(t)&&fh(t),ar.length&&(e.forEach(ar,xy),e.clear(ar)),or.length&&(e.forEach(or,Sy),e.clear(or)),r.flags|=1}}(t),e.performance.mark("afterCheck"),e.performance.measure("Check","beforeCheck","afterCheck")}function Dh(t){switch(t){case 0:return!!F.noUnusedLocals;case 1:return!!F.noUnusedParameters;default:return e.Debug.assertNever(t)}}function xh(t){return Rt.get(t.path)||e.emptyArray}function Sh(t,r){try{return m=r,function(t){if(Th(),t){var r=cr.getGlobalDiagnostics(),i=r.length;bh(t);var a=cr.getDiagnostics(t.fileName),o=cr.getGlobalDiagnostics();if(o!==r){var s=e.relativeComplement(r,o,e.compareDiagnostics);return e.concatenate(s,a)}return 0===i&&o.length>0?e.concatenate(o,a):a}return e.forEach(n.getSourceFiles(),bh),cr.getDiagnostics()}(t)}finally{m=void 0}}function Th(){if(!o)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function Ch(e){switch(e.kind){case 150:case 240:case 241:case 242:case 243:return!0;default:return!1}}function Eh(e){for(;148===e.parent.kind;)e=e.parent;return 164===e.parent.kind}function kh(t,r){for(var n;(t=e.getContainingClass(t))&&!(n=r(t)););return n}function Nh(e,t){return!!kh(e,function(e){return e===t})}function Ah(e){return void 0!==function(e){for(;148===e.parent.kind;)e=e.parent;return 248===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:254===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function Fh(t){if(e.isDeclarationName(t))return In(t.parent);if(e.isInJSFile(t)&&189===t.parent.kind&&t.parent===t.parent.parent.left){var r=function(t){switch(e.getAssignmentDeclarationKind(t.parent.parent)){case 1:case 3:return In(t.parent);case 4:case 2:case 5:return In(t.parent.parent)}}(t);if(r)return r}if(254===t.parent.kind&&e.isEntityNameExpression(t)){var n=yn(t,70107135,!0);if(n&&n!==oe)return n}else if(!e.isPropertyAccessExpression(t)&&Ah(t)){var i=e.getAncestor(t,248);return e.Debug.assert(void 0!==i),mn(t,!0)}if(!e.isPropertyAccessExpression(t)){var a=function(t){for(var r=t.parent;e.isQualifiedName(r);)t=r,r=r.parent;if(r&&183===r.kind&&r.qualifier===t)return r}(t);if(a){Du(a);var o=Vr(t).resolvedSymbol;return o===oe?void 0:o}}for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;if(function(e){for(;189===e.parent.kind;)e=e.parent;return 211===e.parent.kind}(t)){var s=0;211===t.parent.kind?(s=67897832,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(s|=67220415)):s=1920,s|=2097152;var c=e.isEntityNameExpression(t)?yn(t,s):void 0;if(c)return c}if(304===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(150===t.parent.kind&&308===t.parent.parent.kind){e.Debug.assert(!e.isInJSFile(t));var u=e.getTypeParameterFromJsDoc(t.parent);return u&&u.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(72===t.kind){if(e.isJSXTagName(t)&&Up(t)){var l=Gp(t.parent);return l===oe?void 0:l}return yn(t,67220415,!1,!0)}if(189===t.kind||148===t.kind){var _=Vr(t);return _.resolvedSymbol?_.resolvedSymbol:(189===t.kind?ff(t):mf(t),_.resolvedSymbol)}}else if(Eh(t))return yn(t,s=164===t.parent.kind?67897832:1920,!1,!0);return 163===t.parent.kind?yn(t,1):void 0}function Ph(t){if(284===t.kind)return e.isExternalModule(t)?wn(t.symbol):void 0;var r=t.parent,n=r.parent;if(!(8388608&t.flags)){if(d(t)){var i=In(r);return e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t?jp(i):i}if(e.isLiteralComputedPropertyDeclarationName(t))return In(r.parent);if(72===t.kind){if(Ah(t))return Fh(t);if(186===r.kind&&184===n.kind&&t===r.propertyName){var a=Ko(wh(n),t.escapedText);if(a)return a}}switch(t.kind){case 72:case 189:case 148:return Fh(t);case 100:var o=e.getThisContainer(t,!1);if(e.isFunctionLike(o)){var s=os(o);if(s.thisParameter)return s.thisParameter}if(e.isInExpressionContext(t))return kg(t).symbol;case 178:return bu(t).symbol;case 98:return kg(t).symbol;case 124:var c=t.parent;return c&&157===c.kind?c.parent.symbol:void 0;case 10:case 14:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(249===t.parent.kind||255===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJSFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent)||e.isLiteralTypeNode(t.parent)&&e.isLiteralImportTypeNode(t.parent.parent)&&t.parent.parent.argument===t.parent)return vn(t,t);if(e.isCallExpression(r)&&e.isBindableObjectDefinePropertyCall(r)&&r.arguments[1]===t)return In(r);case 8:var u=e.isElementAccessExpression(r)?r.argumentExpression===t?Cg(r.expression):void 0:e.isLiteralTypeNode(r)&&e.isIndexedAccessTypeNode(n)?Du(n.objectType):void 0;return u&&Ko(u,e.escapeLeadingUnderscores(t.text));case 80:case 90:case 37:case 76:return In(t.parent);case 183:return e.isLiteralImportTypeNode(t)?Ph(t.argument.literal):void 0;case 85:return e.isExportAssignment(t.parent)?e.Debug.assertDefined(t.parent.symbol):void 0;default:return}}}function wh(t){if(8388608&t.flags)return _e;var r,n,i=e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments(t),a=i&&Da(In(i.class));if(e.isPartOfTypeNode(t)){var o=Du(t);return a?Ha(o,a.thisType):o}if(e.isExpressionNode(t))return Ih(t);if(a&&!i.isImplements){var s=e.firstOrUndefined(va(a));return s?Ha(s,a.thisType):_e}if(Ch(t))return Na(n=In(t));if(72===(r=t).kind&&Ch(r.parent)&&r.parent.name===r)return(n=Ph(t))?Na(n):_e;if(e.isDeclaration(t))return aa(n=In(t));if(d(t))return(n=Ph(t))?aa(n):_e;if(e.isBindingPattern(t))return Bi(t.parent,!0)||_e;if(Ah(t)&&(n=Ph(t))){var c=Na(n);return c!==_e?c:aa(n)}return _e}function Ih(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),gu(Cg(t))}function Oh(t){t=Bo(t);var r=e.createSymbolTable(Co(t)),n=Vo(t,0).length?Xe:Vo(t,1).length?Qe:void 0;return n&&e.forEach(Co(n),function(e){r.has(e.escapedName)||r.set(e.escapedName,e)}),Hn(r)}function Mh(t){return e.typeHasCallOrConstructSignatures(t,X)}function Lh(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r)return!(189===r.parent.kind&&r.parent.name===r)&&cv(r)===G}return!1}function Rh(t){var r=vn(t.parent,t);if(!r||e.isShorthandAmbientModuleSymbol(r))return!0;var n=Cn(r),i=Ur(r=Sn(r));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=n?!!(67220415&r.flags):e.forEachEntry(An(r),function(e){return(e=_n(e))&&!!(67220415&e.flags)})),i.exportsSomeValue}function Bh(t,r){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var i=cv(n,function(t){return e.isModuleOrEnumDeclaration(t.parent)&&t===t.parent.name}(n));if(i){if(1048576&i.flags){var a=wn(i.exportSymbol);if(!r&&944&a.flags&&!(3&a.flags))return;i=a}var o=On(i);if(o){if(512&o.flags&&284===o.valueDeclaration.kind){var s=o.valueDeclaration;return s!==e.getSourceFileOfNode(n)?void 0:s}return e.findAncestor(n.parent,function(t){return e.isModuleOrEnumDeclaration(t)&&In(t)===o})}}}}function jh(t){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=cv(r);if(ln(n,67220415))return rn(n)}}function Jh(t){if(418&t.flags&&!e.isSourceFile(t.valueDeclaration)){var r=Ur(t);if(void 0===r.isDeclarationWithCollidingName){var n=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(n)){var i=Vr(t.valueDeclaration);if(Gr(n.parent,t.escapedName,67220415,void 0,void 0,!1))r.isDeclarationWithCollidingName=!0;else if(262144&i.flags){var a=524288&i.flags,o=e.isIterationStatement(n,!1),s=218===n.kind&&e.isIterationStatement(n.parent,!1);r.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(n)||a&&(o||s))}else r.isDeclarationWithCollidingName=!1}}return r.isDeclarationWithCollidingName}return!1}function zh(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=cv(r);if(n&&Jh(n))return n.valueDeclaration}}}function Kh(t){var r=e.getParseTreeNode(t,e.isDeclaration);if(r){var n=In(r);if(n)return Jh(n)}return!1}function Uh(t){switch(t.kind){case 248:case 250:case 251:case 253:case 257:return qh(In(t)||oe);case 255:var r=t.exportClause;return!!r&&e.some(r.elements,Uh);case 254:return!t.expression||72!==t.expression.kind||qh(In(t)||oe)}return!1}function Vh(t){var r=e.getParseTreeNode(t,e.isImportEqualsDeclaration);return!(void 0===r||284!==r.parent.kind||!e.isInternalModuleImportEqualsDeclaration(r))&&qh(In(r))&&r.moduleReference&&!e.nodeIsMissing(r.moduleReference)}function qh(e){var t=dn(e);return t===oe||!!(67220415&t.flags)&&(F.preserveConstEnums||!Wh(t))}function Wh(e){return ng(e)||!!e.constEnumOnlyModule}function Hh(t){if(e.nodeIsPresent(t.body)){if(e.isGetAccessor(t)||e.isSetAccessor(t))return!1;var r=us(In(t));return r.length>1||1===r.length&&r[0].declaration!==t}return!1}function Gh(t){return!(!O||es(t)||e.isJSDocParameterTag(t)||!t.initializer||e.hasModifier(t,92))}function Yh(t){return O&&es(t)&&!t.initializer&&e.hasModifier(t,92)}function Xh(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return!1;var n=In(r);return!!(n&&16&n.flags)&&!!e.forEachEntry(Nn(n),function(t){return 67220415&t.flags&&e.isPropertyAccessExpression(t.valueDeclaration)})}function Qh(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return e.emptyArray;var n=In(r);return n&&Co(aa(n))||e.emptyArray}function $h(e){return Vr(e).flags||0}function Zh(e){return ih(e.parent),Vr(e).enumMemberValue}function ev(e){switch(e.kind){case 278:case 189:case 190:return!0}return!1}function tv(t){if(278===t.kind)return Zh(t);var r=Vr(t).resolvedSymbol;if(r&&8&r.flags){var n=r.valueDeclaration;if(e.isEnumConst(n.parent))return Zh(n)}}function rv(e){return!!(524288&e.flags)&&Vo(e,0).length>0}function nv(t,r){var n=e.getParseTreeNode(t,e.isEntityName);if(!n)return e.TypeReferenceSerializationKind.Unknown;if(r&&!(r=e.getParseTreeNode(r)))return e.TypeReferenceSerializationKind.Unknown;var i=yn(n,67220415,!0,!1,r),a=yn(n,67897832,!0,!1,r);if(i&&i===a){var o=ac(!1);if(o&&i===o)return e.TypeReferenceSerializationKind.Promise;var s=aa(i);if(s&&fa(s))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!a)return e.TypeReferenceSerializationKind.Unknown;var c=Na(a);return c===_e?e.TypeReferenceSerializationKind.Unknown:3&c.flags?e.TypeReferenceSerializationKind.ObjectType:eg(c,245760)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:eg(c,528)?e.TypeReferenceSerializationKind.BooleanType:eg(c,296)?e.TypeReferenceSerializationKind.NumberLikeType:eg(c,2112)?e.TypeReferenceSerializationKind.BigIntLikeType:eg(c,132)?e.TypeReferenceSerializationKind.StringLikeType:e_(c)?e.TypeReferenceSerializationKind.ArrayLikeType:eg(c,12288)?e.TypeReferenceSerializationKind.ESSymbolType:rv(c)?e.TypeReferenceSerializationKind.TypeWithCallSignature:Jl(c)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function iv(t,r,n,i,a){var o=e.getParseTreeNode(t,e.isVariableLikeOrAccessor);if(!o)return e.createToken(120);var s=In(o),c=!s||133120&s.flags?_e:Ql(aa(s));return 8192&c.flags&&c.symbol===s&&(n|=1048576),a&&(c=u_(c)),U.typeToTypeNode(c,r,1024|n,i)}function av(t,r,n,i){var a=e.getParseTreeNode(t,e.isFunctionLike);if(!a)return e.createToken(120);var o=os(a);return U.typeToTypeNode(ps(o),r,1024|n,i)}function ov(t,r,n,i){var a=e.getParseTreeNode(t,e.isExpression);if(!a)return e.createToken(120);var o=h_(Ih(a));return U.typeToTypeNode(o,r,1024|n,i)}function sv(t){return V.has(e.escapeLeadingUnderscores(t))}function cv(t,r){var n=Vr(t).resolvedSymbol;if(n)return n;var i=t;if(r){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=Ti(a))}return Gr(i,t.escapedText,70366143,void 0,void 0,!0)}function uv(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=cv(r);if(n)return Rn(n).valueDeclaration}}}function lv(t){return!!(e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t))&&yu(aa(In(t)))}function _v(t,r){return function(t,r,n){return(1024&t.flags?U.symbolToExpression(t.symbol,67220415,r,void 0,n):t===xe?e.createTrue():t===be&&e.createFalse())||e.createLiteral(t.value)}(aa(In(t)),t,r)}function dv(t){var r=244===t.kind?e.tryCast(t.name,e.isStringLiteral):e.getExternalModuleName(t),n=bn(r,r,void 0);if(n)return e.getDeclarationOfKind(n,284)}function pv(t,r){if((g&r)!==r&&F.importHelpers){var n=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(n,F)&&!(4194304&t.flags)){var i=(c=t,y||(y=Dn(n,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,c)||oe),y);if(i!==oe)for(var a=r&~g,o=1;o<=65536;o<<=1)if(a&o){var s=fv(o);Wr(i.exports,e.escapeLeadingUnderscores(s),67220415)||Pr(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1,e.externalHelpersModuleNameText,s)}g|=r}}var c}function fv(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__await";case 4096:return"__asyncGenerator";case 8192:return"__asyncDelegator";case 16384:return"__asyncValues";case 32768:return"__exportStar";case 65536:return"__makeTemplateObject";default:return e.Debug.fail("Unrecognized helper")}}function mv(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 156!==t.kind||e.nodeIsPresent(t.body)?Rv(t,e.Diagnostics.Decorators_are_not_valid_here):Rv(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(158===t.kind||159===t.kind){var r=e.getAllAccessorDeclarations(t.parent.members,t);if(r.firstAccessor.decorators&&t===r.secondAccessor)return Rv(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var r,n,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 158:case 159:case 157:case 154:case 153:case 156:case 155:case 162:case 244:case 249:case 248:case 255:case 254:case 196:case 197:case 151:return!1;default:if(245===t.parent.kind||284===t.parent.kind)return!1;switch(t.kind){case 239:return gv(t,121);case 240:return gv(t,118);case 241:case 219:case 242:return!0;case 243:return gv(t,77);default:return e.Debug.fail(),!1}}}(t)?Rv(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,c=0,u=t.modifiers;c<u.length;c++){var l=u[c];if(133!==l.kind){if(153===t.kind||155===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_type_member,e.tokenToString(l.kind));if(162===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_an_index_signature,e.tokenToString(l.kind))}switch(l.kind){case 77:if(243!==t.kind)return jv(t,e.Diagnostics.A_class_member_cannot_have_the_0_keyword,e.tokenToString(77));break;case 115:case 114:case 113:var _=pi(e.modifierToFlag(l.kind));if(28&s)return jv(l,e.Diagnostics.Accessibility_modifier_already_seen);if(32&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"static");if(64&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"readonly");if(256&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"async");if(245===t.parent.kind||284===t.parent.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element,_);if(128&s)return 113===l.kind?jv(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,_,"abstract"):jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"abstract");s|=e.modifierToFlag(l.kind);break;case 116:if(32&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"static");if(64&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"static","readonly");if(256&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"static","async");if(245===t.parent.kind||284===t.parent.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(151===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"static");if(128&s)return jv(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");s|=32,r=l;break;case 133:if(64&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"readonly");if(154!==t.kind&&153!==t.kind&&162!==t.kind&&151!==t.kind)return jv(l,e.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);s|=64,a=l;break;case 85:if(1&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"export");if(2&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","declare");if(128&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","abstract");if(256&s)return jv(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","async");if(240===t.parent.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"export");if(151===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"export");s|=1;break;case 80:var d=284===t.parent.kind?t.parent:t.parent.parent;if(244===d.kind&&!e.isAmbientModule(d))return jv(l,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);s|=512;break;case 125:if(2&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"declare");if(256&s)return jv(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(240===t.parent.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"declare");if(151===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"declare");if(4194304&t.parent.flags&&245===t.parent.kind)return jv(l,e.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);s|=2,n=l;break;case 118:if(128&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"abstract");if(240!==t.kind){if(156!==t.kind&&154!==t.kind&&158!==t.kind&&159!==t.kind)return jv(l,e.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(240!==t.parent.kind||!e.hasModifier(t.parent,128))return jv(l,e.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);if(32&s)return jv(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(8&s)return jv(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"private","abstract")}s|=128;break;case 121:if(256&s)return jv(l,e.Diagnostics._0_modifier_already_seen,"async");if(2&s||4194304&t.parent.flags)return jv(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(151===t.kind)return jv(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"async");s|=256,i=l}}return 157===t.kind?32&s?jv(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):128&s?jv(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"abstract"):256&s?jv(i,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):!!(64&s)&&jv(a,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"readonly"):(249===t.kind||248===t.kind)&&2&s?jv(n,e.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):151===t.kind&&92&s&&e.isBindingPattern(t.name)?jv(t,e.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern):151===t.kind&&92&s&&t.dotDotDotToken?jv(t,e.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!!(256&s)&&function(t,r){switch(t.kind){case 156:case 239:case 196:case 197:return!1}return jv(r,e.Diagnostics._0_modifier_cannot_be_used_here,"async")}(t,i)}(t)}function gv(e,t){return e.modifiers.length>1||e.modifiers[0].kind!==t}function yv(t,r){return void 0===r&&(r=e.Diagnostics.Trailing_comma_not_allowed),!(!t||!t.hasTrailingComma)&&Bv(t[0],t.end-",".length,",".length,r)}function hv(t,r){if(t&&0===t.length){var n=t.pos-"<".length;return Bv(r,n,e.skipTrivia(r.text,t.end)+">".length-n,e.Diagnostics.Type_parameter_list_cannot_be_empty)}return!1}function vv(t){if(P>=3){var r=t.body&&e.isBlock(t.body)&&e.findUseStrictPrologue(t.body.statements);if(r){var n=(a=t.parameters,e.filter(a,function(t){return!!t.initializer||e.isBindingPattern(t.name)||e.isRestParameter(t)}));if(e.length(n)){e.forEach(n,function(t){e.addRelatedInfo(Pr(t,e.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive),e.createDiagnosticForNode(r,e.Diagnostics.use_strict_directive_used_here))});var i=n.map(function(t,r){return 0===r?e.createDiagnosticForNode(t,e.Diagnostics.Non_simple_parameter_declared_here):e.createDiagnosticForNode(t,e.Diagnostics.and_here)});return e.addRelatedInfo.apply(void 0,[Pr(r,e.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)].concat(i)),!0}}}var a;return!1}function bv(t){var r=e.getSourceFileOfNode(t);return mv(t)||hv(t.typeParameters,r)||function(t){for(var r=!1,n=t.length,i=0;i<n;i++){var a=t[i];if(a.dotDotDotToken){if(i!==n-1)return jv(a.dotDotDotToken,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);if(4194304&a.flags||yv(t,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),a.questionToken)return jv(a.questionToken,e.Diagnostics.A_rest_parameter_cannot_be_optional);if(a.initializer)return jv(a.name,e.Diagnostics.A_rest_parameter_cannot_have_an_initializer)}else if(a.questionToken){if(r=!0,a.initializer)return jv(a.name,e.Diagnostics.Parameter_cannot_have_question_mark_and_initializer)}else if(r&&!a.initializer)return jv(a.name,e.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter)}}(t.parameters)||function(t,r){if(!e.isArrowFunction(t))return!1;var n=t.equalsGreaterThanToken,i=e.getLineAndCharacterOfPosition(r,n.pos).line,a=e.getLineAndCharacterOfPosition(r,n.end).line;return i!==a&&jv(n,e.Diagnostics.Line_terminator_not_permitted_before_arrow)}(t,r)||e.isFunctionLikeDeclaration(t)&&vv(t)}function Dv(t,r){return yv(r)||function(t,r){if(r&&0===r.length){var n=e.getSourceFileOfNode(t),i=r.pos-"<".length;return Bv(n,i,e.skipTrivia(n.text,r.end)+">".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}return!1}(t,r)}function xv(t){return function(t){if(t)for(var r=0,n=t;r<n.length;r++){var i=n[r];if(210===i.kind)return Bv(i,i.pos,0,e.Diagnostics.Argument_expression_expected)}return!1}(t)}function Sv(t){var r=t.types;if(yv(r))return!0;if(r&&0===r.length){var n=e.tokenToString(t.token);return Bv(t,r.pos,0,e.Diagnostics._0_list_cannot_be_empty,n)}return e.some(r,Tv)}function Tv(e){return Dv(e,e.typeArguments)}function Cv(t){if(149!==t.kind)return!1;var r=t;return 204===r.expression.kind&&27===r.expression.operatorToken.kind&&jv(r.expression,e.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function Ev(t){if(t.asteriskToken){if(e.Debug.assert(239===t.kind||196===t.kind||156===t.kind),4194304&t.flags)return jv(t.asteriskToken,e.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);if(!t.body)return jv(t.asteriskToken,e.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator)}}function kv(e,t){return!!e&&jv(e,t)}function Nv(e,t){return!!e&&jv(e,t)}function Av(t){if(Jv(t))return!0;if(227===t.kind&&t.awaitModifier&&0==(16384&t.flags))return jv(t.awaitModifier,e.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator);if(238===t.initializer.kind){var r=t.initializer;if(!Mv(r)){var n=r.declarations;if(!n.length)return!1;if(n.length>1){var i=226===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return Rv(r.declarations[1],i)}var a=n[0];if(a.initializer){var i=226===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return jv(a.name,i)}if(a.type)return jv(a,i=226===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function Fv(t){if(t.parameters.length===(158===t.kind?1:2))return e.getThisParameter(t)}function Pv(t,r){if(function(t){return e.isDynamicName(t)&&!Ba(t)}(t))return jv(t,r)}function wv(t){if(bv(t))return!0;if(156===t.kind){if(188===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||121!==e.first(t.modifiers).kind))return Rv(t,e.Diagnostics.Modifiers_cannot_appear_here);if(kv(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(Nv(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===t.body)return Bv(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(Ev(t))return!0}if(e.isClassLike(t.parent)){if(4194304&t.flags)return Pv(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(156===t.kind&&!t.body)return Pv(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(241===t.parent.kind)return Pv(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(168===t.parent.kind)return Pv(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function Iv(e){return 10===e.kind||8===e.kind||202===e.kind&&39===e.operator&&8===e.operand.kind}function Ov(t){var r,n=t.initializer;if(n){var i=!(Iv(n)||function(t){if((e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)&&Iv(t.argumentExpression))&&e.isEntityNameExpression(t.expression))return!!(1024&dg(t).flags)}(n)||102===n.kind||87===n.kind||(r=n,9===r.kind||202===r.kind&&39===r.operator&&9===r.operand.kind)),a=e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t);if(!a||t.type)return jv(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);if(i)return jv(n,e.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference);if(!a||i)return jv(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}}function Mv(t){var r=t.declarations;return!!yv(t.declarations)||!t.declarations.length&&Bv(t,r.pos,r.end-r.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty)}function Lv(e){return e.parseDiagnostics.length>0}function Rv(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!Lv(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return cr.add(e.createFileDiagnostic(o,s.start,s.length,r,n,i,a)),!0}return!1}function Bv(t,r,n,i,a,o,s){var c=e.getSourceFileOfNode(t);return!Lv(c)&&(cr.add(e.createFileDiagnostic(c,r,n,i,a,o,s)),!0)}function jv(t,r,n,i,a){return!Lv(e.getSourceFileOfNode(t))&&(cr.add(e.createDiagnosticForNode(t,r,n,i,a)),!0)}function Jv(t){if(4194304&t.flags){if(e.isAccessor(t.parent))return Vr(t).hasReportedStatementInAmbientContext=!0;if(!Vr(t).hasReportedStatementInAmbientContext&&e.isFunctionLike(t.parent))return Vr(t).hasReportedStatementInAmbientContext=Rv(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(218===t.parent.kind||245===t.parent.kind||284===t.parent.kind){var r=Vr(t.parent);if(!r.hasReportedStatementInAmbientContext)return r.hasReportedStatementInAmbientContext=Rv(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function zv(t){if(32&t.numericLiteralFlags){var r=void 0;if(P>=1?r=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,182)?r=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,278)&&(r=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),r){var n=e.isPrefixUnaryExpression(t.parent)&&39===t.parent.operator,i=(n?"-":"")+"0o"+t.text;return jv(n?t.parent:t,r,i)}}return!1}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes",e.LibraryManagedAttributes="LibraryManagedAttributes"}(t||(t={}))}(c||(c={})),function(e){function t(t){var r=e.createNode(t,-1,-1);return r.flags|=8,r}function r(t,r){return t!==r&&(Xt(t,r),Vt(t,r),e.aggregateTransformFlags(t)),t}function n(t,r){if(t&&t!==e.emptyArray){if(e.isNodeArray(t))return t}else t=[];var n=t;return n.pos=-1,n.end=-1,n.hasTrailingComma=r,n}function i(e){if(void 0===e)return e;var r=t(e.kind);for(var n in r.flags|=e.flags,Xt(r,e),e)!r.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(r[n]=e[n]);return r}function a(t,r){if("number"==typeof t)return o(t+"");if("object"===f(t)&&"base10Value"in t)return s(e.pseudoBigIntToString(t)+"n");if("boolean"==typeof t)return t?g():y();if(e.isString(t)){var n=c(t);return r&&(n.singleQuote=!0),n}return i=t,(a=c(e.getTextOfIdentifierOrLiteral(i))).textSourceNode=i,a;var i,a}function o(e,r){void 0===r&&(r=0);var n=t(8);return n.text=e,n.numericLiteralFlags=r,n}function s(e){var r=t(9);return r.text=e,r}function c(e){var r=t(10);return r.text=e,r}function u(r,i){var a=t(72);return a.escapedText=e.escapeLeadingUnderscores(r),a.originalKeywordKind=r?e.stringToToken(r):0,a.autoGenerateFlags=0,a.autoGenerateId=0,i&&(a.typeArguments=n(i)),a}e.updateNode=r,e.createNodeArray=n,e.getSynthesizedClone=i,e.createLiteral=a,e.createNumericLiteral=o,e.createBigIntLiteral=s,e.createStringLiteral=c,e.createRegularExpressionLiteral=function(e){var r=t(13);return r.text=e,r},e.createIdentifier=u,e.updateIdentifier=function(t,n){return t.typeArguments!==n?r(u(e.idText(t),n),t):t};var l,_,d=0;function p(e){var t=u(e);return t.autoGenerateFlags=19,t.autoGenerateId=d,d++,t}function m(e){return t(e)}function g(){return t(102)}function y(){return t(87)}function h(e){return m(e)}function v(e,r){var n=t(148);return n.left=e,n.right=zt(r),n}function b(r){var n=t(149);return n.expression=function(t){return e.isCommaSequence(t)?ue(t):t}(r),n}function D(e,r,n){var i=t(150);return i.name=zt(e),i.constraint=r,i.default=n,i}function x(r,n,i,a,o,s,c){var u=t(151);return u.decorators=Kt(r),u.modifiers=Kt(n),u.dotDotDotToken=i,u.name=zt(a),u.questionToken=o,u.type=s,u.initializer=c?e.parenthesizeExpressionForList(c):void 0,u}function S(r){var n=t(152);return n.expression=e.parenthesizeForAccess(r),n}function T(e,r,n,i,a){var o=t(153);return o.modifiers=Kt(e),o.name=zt(r),o.questionToken=n,o.type=i,o.initializer=a,o}function C(e,r,n,i,a,o){var s=t(154);return s.decorators=Kt(e),s.modifiers=Kt(r),s.name=zt(n),s.questionToken=void 0!==i&&56===i.kind?i:void 0,s.exclamationToken=void 0!==i&&52===i.kind?i:void 0,s.type=a,s.initializer=o,s}function E(e,t,r,n,i){var a=w(155,e,t,r);return a.name=zt(n),a.questionToken=i,a}function k(e,r,i,a,o,s,c,u,l){var _=t(156);return _.decorators=Kt(e),_.modifiers=Kt(r),_.asteriskToken=i,_.name=zt(a),_.questionToken=o,_.typeParameters=Kt(s),_.parameters=n(c),_.type=u,_.body=l,_}function N(e,r,i,a){var o=t(157);return o.decorators=Kt(e),o.modifiers=Kt(r),o.typeParameters=void 0,o.parameters=n(i),o.type=void 0,o.body=a,o}function A(e,r,i,a,o,s){var c=t(158);return c.decorators=Kt(e),c.modifiers=Kt(r),c.name=zt(i),c.typeParameters=void 0,c.parameters=n(a),c.type=o,c.body=s,c}function F(e,r,i,a,o){var s=t(159);return s.decorators=Kt(e),s.modifiers=Kt(r),s.name=zt(i),s.typeParameters=void 0,s.parameters=n(a),s.body=o,s}function P(e,r,i,a){var o=t(162);return o.decorators=Kt(e),o.modifiers=Kt(r),o.parameters=n(i),o.type=a,o}function w(e,r,n,i,a){var o=t(e);return o.typeParameters=Kt(r),o.parameters=Kt(n),o.type=i,o.typeArguments=Kt(a),o}function I(e,t,n,i){return e.typeParameters!==t||e.parameters!==n||e.type!==i?r(w(e.kind,t,n,i),e):e}function O(e,r){var n=t(163);return n.parameterName=zt(e),n.type=r,n}function M(r,n){var i=t(164);return i.typeName=zt(r),i.typeArguments=n&&e.parenthesizeTypeParameters(n),i}function L(e){var r=t(167);return r.exprName=e,r}function R(e){var r=t(168);return r.members=n(e),r}function B(r){var n=t(169);return n.elementType=e.parenthesizeArrayTypeMember(r),n}function j(e){var r=t(170);return r.elementTypes=n(e),r}function J(r){var n=t(171);return n.type=e.parenthesizeArrayTypeMember(r),n}function z(e){var r=t(172);return r.type=e,r}function K(r,n){var i=t(r);return i.types=e.parenthesizeElementTypeMembers(n),i}function U(e,t){return e.types!==t?r(K(e.kind,t),e):e}function V(r,n,i,a){var o=t(175);return o.checkType=e.parenthesizeConditionalTypeMember(r),o.extendsType=e.parenthesizeConditionalTypeMember(n),o.trueType=i,o.falseType=a,o}function q(e){var r=t(176);return r.typeParameter=e,r}function W(e,r,n,i){var a=t(183);return a.argument=e,a.qualifier=r,a.typeArguments=Kt(n),a.isTypeOf=i,a}function H(e){var r=t(177);return r.type=e,r}function G(r,n){var i=t(179);return i.operator="number"==typeof r?r:129,i.type=e.parenthesizeElementTypeMember("number"==typeof r?n:r),i}function Y(r,n){var i=t(180);return i.objectType=e.parenthesizeElementTypeMember(r),i.indexType=n,i}function X(e,r,n,i){var a=t(181);return a.readonlyToken=e,a.typeParameter=r,a.questionToken=n,a.type=i,a}function Q(e){var r=t(182);return r.literal=e,r}function $(e){var r=t(184);return r.elements=n(e),r}function Z(e){var r=t(185);return r.elements=n(e),r}function ee(e,r,n,i){var a=t(186);return a.dotDotDotToken=e,a.propertyName=zt(r),a.name=zt(n),a.initializer=i,a}function te(r,i){var a=t(187);return a.elements=e.parenthesizeListElements(n(r)),i&&(a.multiLine=!0),a}function re(e,r){var i=t(188);return i.properties=n(e),r&&(i.multiLine=!0),i}function ne(r,n){var i=t(189);return i.expression=e.parenthesizeForAccess(r),i.name=zt(n),qt(i,131072),i}function ie(r,n){var i,o=t(190);return o.expression=e.parenthesizeForAccess(r),o.argumentExpression=(i=n,e.isString(i)||"number"==typeof i?a(i):i),o}function ae(r,i,a){var o=t(191);return o.expression=e.parenthesizeForAccess(r),o.typeArguments=Kt(i),o.arguments=e.parenthesizeListElements(n(a)),o}function oe(r,i,a){var o=t(192);return o.expression=e.parenthesizeForNew(r),o.typeArguments=Kt(i),o.arguments=a?e.parenthesizeListElements(n(a)):void 0,o}function se(r,n,i){var a=t(193);return a.tag=e.parenthesizeForAccess(r),i?(a.typeArguments=Kt(n),a.template=i):(a.typeArguments=void 0,a.template=n),a}function ce(r,n){var i=t(194);return i.type=r,i.expression=e.parenthesizePrefixOperand(n),i}function ue(e){var r=t(195);return r.expression=e,r}function le(e,r,i,a,o,s,c){var u=t(196);return u.modifiers=Kt(e),u.asteriskToken=r,u.name=zt(i),u.typeParameters=Kt(a),u.parameters=n(o),u.type=s,u.body=c,u}function _e(r,i,a,o,s,c){var u=t(197);return u.modifiers=Kt(r),u.typeParameters=Kt(i),u.parameters=n(a),u.type=o,u.equalsGreaterThanToken=s||m(37),u.body=e.parenthesizeConciseBody(c),u}function de(r){var n=t(198);return n.expression=e.parenthesizePrefixOperand(r),n}function pe(r){var n=t(199);return n.expression=e.parenthesizePrefixOperand(r),n}function fe(r){var n=t(200);return n.expression=e.parenthesizePrefixOperand(r),n}function me(r){var n=t(201);return n.expression=e.parenthesizePrefixOperand(r),n}function ge(r,n){var i=t(202);return i.operator=r,i.operand=e.parenthesizePrefixOperand(n),i}function ye(r,n){var i=t(203);return i.operand=e.parenthesizePostfixOperand(r),i.operator=n,i}function he(r,n,i){var a,o=t(204),s="number"==typeof(a=n)?m(a):a,c=s.kind;return o.left=e.parenthesizeBinaryOperand(c,r,!0,void 0),o.operatorToken=s,o.right=e.parenthesizeBinaryOperand(c,i,!1,o.left),o}function ve(r,n,i,a,o){var s=t(205);return s.condition=e.parenthesizeForConditionalHead(r),s.questionToken=o?n:m(56),s.whenTrue=e.parenthesizeSubexpressionOfConditionalExpression(o?i:n),s.colonToken=o?a:m(57),s.whenFalse=e.parenthesizeSubexpressionOfConditionalExpression(o||i),s}function be(e,r){var i=t(206);return i.head=e,i.templateSpans=n(r),i}function De(e,r){var n=t(207);return n.asteriskToken=e&&40===e.kind?e:void 0,n.expression=e&&40!==e.kind?e:r,n}function xe(r){var n=t(208);return n.expression=e.parenthesizeExpressionForList(r),n}function Se(e,r,i,a,o){var s=t(209);return s.decorators=void 0,s.modifiers=Kt(e),s.name=zt(r),s.typeParameters=Kt(i),s.heritageClauses=Kt(a),s.members=n(o),s}function Te(r,n){var i=t(211);return i.expression=e.parenthesizeForAccess(n),i.typeArguments=Kt(r),i}function Ce(e,r){var n=t(212);return n.expression=e,n.type=r,n}function Ee(r){var n=t(213);return n.expression=e.parenthesizeForAccess(r),n}function ke(e,r){var n=t(214);return n.keywordToken=e,n.name=r,n}function Ne(e,r){var n=t(216);return n.expression=e,n.literal=r,n}function Ae(e,r){var i=t(218);return i.statements=n(e),r&&(i.multiLine=r),i}function Fe(r,n){var i=t(219);return i.decorators=void 0,i.modifiers=Kt(r),i.declarationList=e.isArray(n)?Ge(n):n,i}function Pe(r){var n=t(221);return n.expression=e.parenthesizeExpressionForExpressionStatement(r),n}function we(e,t){return e.expression!==t?r(Pe(t),e):e}function Ie(e,r,n){var i=t(222);return i.expression=e,i.thenStatement=r,i.elseStatement=n,i}function Oe(e,r){var n=t(223);return n.statement=e,n.expression=r,n}function Me(e,r){var n=t(224);return n.expression=e,n.statement=r,n}function Le(e,r,n,i){var a=t(225);return a.initializer=e,a.condition=r,a.incrementor=n,a.statement=i,a}function Re(e,r,n){var i=t(226);return i.initializer=e,i.expression=r,i.statement=n,i}function Be(e,r,n,i){var a=t(227);return a.awaitModifier=e,a.initializer=r,a.expression=n,a.statement=i,a}function je(e){var r=t(228);return r.label=zt(e),r}function Je(e){var r=t(229);return r.label=zt(e),r}function ze(e){var r=t(230);return r.expression=e,r}function Ke(e,r){var n=t(231);return n.expression=e,n.statement=r,n}function Ue(r,n){var i=t(232);return i.expression=e.parenthesizeExpressionForList(r),i.caseBlock=n,i}function Ve(e,r){var n=t(233);return n.label=zt(e),n.statement=r,n}function qe(e){var r=t(234);return r.expression=e,r}function We(e,r,n){var i=t(235);return i.tryBlock=e,i.catchClause=r,i.finallyBlock=n,i}function He(r,n,i){var a=t(237);return a.name=zt(r),a.type=n,a.initializer=void 0!==i?e.parenthesizeExpressionForList(i):void 0,a}function Ge(e,r){void 0===r&&(r=0);var i=t(238);return i.flags|=3&r,i.declarations=n(e),i}function Ye(e,r,i,a,o,s,c,u){var l=t(239);return l.decorators=Kt(e),l.modifiers=Kt(r),l.asteriskToken=i,l.name=zt(a),l.typeParameters=Kt(o),l.parameters=n(s),l.type=c,l.body=u,l}function Xe(e,r,i,a,o,s){var c=t(240);return c.decorators=Kt(e),c.modifiers=Kt(r),c.name=zt(i),c.typeParameters=Kt(a),c.heritageClauses=Kt(o),c.members=n(s),c}function Qe(e,r,i,a,o,s){var c=t(241);return c.decorators=Kt(e),c.modifiers=Kt(r),c.name=zt(i),c.typeParameters=Kt(a),c.heritageClauses=Kt(o),c.members=n(s),c}function $e(e,r,n,i,a){var o=t(242);return o.decorators=Kt(e),o.modifiers=Kt(r),o.name=zt(n),o.typeParameters=Kt(i),o.type=a,o}function Ze(e,r,i,a){var o=t(243);return o.decorators=Kt(e),o.modifiers=Kt(r),o.name=zt(i),o.members=n(a),o}function et(e,r,n,i,a){void 0===a&&(a=0);var o=t(244);return o.flags|=532&a,o.decorators=Kt(e),o.modifiers=Kt(r),o.name=n,o.body=i,o}function tt(e){var r=t(245);return r.statements=n(e),r}function rt(e){var r=t(246);return r.clauses=n(e),r}function nt(e){var r=t(247);return r.name=zt(e),r}function it(e,r,n,i){var a=t(248);return a.decorators=Kt(e),a.modifiers=Kt(r),a.name=zt(n),a.moduleReference=i,a}function at(e,r,n,i){var a=t(249);return a.decorators=Kt(e),a.modifiers=Kt(r),a.importClause=n,a.moduleSpecifier=i,a}function ot(e,r){var n=t(250);return n.name=e,n.namedBindings=r,n}function st(e){var r=t(251);return r.name=e,r}function ct(e){var r=t(252);return r.elements=n(e),r}function ut(e,r){var n=t(253);return n.propertyName=e,n.name=r,n}function lt(r,n,i,a){var o=t(254);return o.decorators=Kt(r),o.modifiers=Kt(n),o.isExportEquals=i,o.expression=i?e.parenthesizeBinaryOperand(59,a,!1,void 0):e.parenthesizeDefaultExpression(a),o}function _t(e,r,n,i){var a=t(255);return a.decorators=Kt(e),a.modifiers=Kt(r),a.exportClause=n,a.moduleSpecifier=i,a}function dt(e){var r=t(256);return r.elements=n(e),r}function pt(e,r){var n=t(257);return n.propertyName=zt(e),n.name=zt(r),n}function ft(e){var r=t(259);return r.expression=e,r}function mt(e,r){var n=t(e);return n.tagName=u(r),n}function gt(e,r,i){var a=t(260);return a.openingElement=e,a.children=n(r),a.closingElement=i,a}function yt(e,r,n){var i=t(261);return i.tagName=e,i.typeArguments=Kt(r),i.attributes=n,i}function ht(e,r,n){var i=t(262);return i.tagName=e,i.typeArguments=Kt(r),i.attributes=n,i}function vt(e){var r=t(263);return r.tagName=e,r}function bt(e,r,i){var a=t(264);return a.openingFragment=e,a.children=n(r),a.closingFragment=i,a}function Dt(e,r){var n=t(11);return n.text=e,n.containsOnlyTriviaWhiteSpaces=!!r,n}function xt(e,r){var n=t(267);return n.name=e,n.initializer=r,n}function St(e){var r=t(268);return r.properties=n(e),r}function Tt(e){var r=t(269);return r.expression=e,r}function Ct(e,r){var n=t(270);return n.dotDotDotToken=e,n.expression=r,n}function Et(r,i){var a=t(271);return a.expression=e.parenthesizeExpressionForList(r),a.statements=n(i),a}function kt(e){var r=t(272);return r.statements=n(e),r}function Nt(e,r){var i=t(273);return i.token=e,i.types=n(r),i}function At(r,n){var i=t(274);return i.variableDeclaration=e.isString(r)?He(r):r,i.block=n,i}function Ft(r,n){var i=t(275);return i.name=zt(r),i.questionToken=void 0,i.initializer=e.parenthesizeExpressionForList(n),i}function Pt(r,n){var i=t(276);return i.name=zt(r),i.objectAssignmentInitializer=void 0!==n?e.parenthesizeExpressionForList(n):void 0,i}function wt(r){var n=t(277);return n.expression=void 0!==r?e.parenthesizeExpressionForList(r):void 0,n}function It(r,n){var i=t(278);return i.name=zt(r),i.initializer=n&&e.parenthesizeExpressionForList(n),i}function Ot(e,r){var n=t(313);return n.expression=e,n.original=r,Vt(n,r),n}function Mt(t){if(e.nodeIsSynthesized(t)&&!e.isParseTreeNode(t)&&!t.original&&!t.emitNode&&!t.id){if(314===t.kind)return t.elements;if(e.isBinaryExpression(t)&&27===t.operatorToken.kind)return[t.left,t.right]}return t}function Lt(r){var i=t(314);return i.elements=n(e.sameFlatMap(r,Mt)),i}function Rt(t,r){void 0===r&&(r=e.emptyArray);var n=e.createNode(285);return n.prepends=r,n.sourceFiles=t,n}function Bt(){return l||(l=e.arrayToMap([e.valuesHelper,e.readHelper,e.spreadHelper,e.restHelper,e.decorateHelper,e.metadataHelper,e.paramHelper,e.awaiterHelper,e.assignHelper,e.awaitHelper,e.asyncGeneratorHelper,e.asyncDelegator,e.asyncValues,e.extendsHelper,e.templateObjectHelper,e.generatorHelper,e.importStarHelper,e.importDefaultHelper],function(e){return e.name}))}function jt(t,r){var n=e.createNode(function(t){switch(t){case"prologue":return 279;case"prepend":return 280;case"internal":return 282;case"text":return 281;case"emitHelpers":case"no-default-lib":case"reference":case"type":case"lib":return e.Debug.fail("BundleFileSectionKind: "+t+" not yet mapped to SyntaxKind");default:return e.Debug.assertNever(t)}}(t.kind),t.pos,t.end);return n.parent=r,n.data=t.data,n}function Jt(t,r){var n=e.createNode(283,t.pos,t.end);return n.parent=r,n.data=t.data,n.section=t,n}function zt(t){return e.isString(t)?u(t):t}function Kt(e){return e?n(e):void 0}function Ut(t){if(!t.emitNode){if(e.isParseTreeNode(t)){if(284===t.kind)return t.emitNode={annotatedNodes:[t]};Ut(e.getSourceFileOfNode(e.getParseTreeNode(e.getSourceFileOfNode(t)))).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function Vt(e,t){return t&&(e.pos=t.pos,e.end=t.end),e}function qt(e,t){return Ut(e).flags=t,e}function Wt(e){var t=e.emitNode;return t&&t.leadingComments}function Ht(e,t){return Ut(e).leadingComments=t,e}function Gt(e){var t=e.emitNode;return t&&t.trailingComments}function Yt(e,t){return Ut(e).trailingComments=t,e}function Xt(t,r){if(t.original=r,r){var n=r.emitNode;n&&(t.emitNode=function(t,r){var n=t.flags,i=t.leadingComments,a=t.trailingComments,o=t.commentRange,s=t.sourceMapRange,c=t.tokenSourceMapRanges,u=t.constantValue,l=t.helpers,_=t.startsOnNewLine;r||(r={});i&&(r.leadingComments=e.addRange(i.slice(),r.leadingComments));a&&(r.trailingComments=e.addRange(a.slice(),r.trailingComments));n&&(r.flags=n);o&&(r.commentRange=o);s&&(r.sourceMapRange=s);c&&(r.tokenSourceMapRanges=function(e,t){t||(t=[]);for(var r in e)t[r]=e[r];return t}(c,r.tokenSourceMapRanges));void 0!==u&&(r.constantValue=u);l&&(r.helpers=e.addRange(r.helpers,l));void 0!==_&&(r.startsOnNewLine=_);return r}(n,t.emitNode))}return t}e.createTempVariable=function(e,t){var r=u("");return r.autoGenerateFlags=1,r.autoGenerateId=d,d++,e&&e(r),t&&(r.autoGenerateFlags|=8),r},e.createLoopVariable=function(){var e=u("");return e.autoGenerateFlags=2,e.autoGenerateId=d,d++,e},e.createUniqueName=function(e){var t=u(e);return t.autoGenerateFlags=3,t.autoGenerateId=d,d++,t},e.createOptimisticUniqueName=p,e.createFileLevelUniqueName=function(e){var t=p(e);return t.autoGenerateFlags|=32,t},e.getGeneratedNameForNode=function(t,r){var n=u(t&&e.isIdentifier(t)?e.idText(t):"");return n.autoGenerateFlags=4|r,n.autoGenerateId=d,n.original=t,d++,n},e.createToken=m,e.createSuper=function(){return t(98)},e.createThis=function(){return t(100)},e.createNull=function(){return t(96)},e.createTrue=g,e.createFalse=y,e.createModifier=h,e.createModifiersFromModifierFlags=function(e){var t=[];return 1&e&&t.push(h(85)),2&e&&t.push(h(125)),512&e&&t.push(h(80)),2048&e&&t.push(h(77)),4&e&&t.push(h(115)),8&e&&t.push(h(113)),16&e&&t.push(h(114)),128&e&&t.push(h(118)),32&e&&t.push(h(116)),64&e&&t.push(h(133)),256&e&&t.push(h(121)),t},e.createQualifiedName=v,e.updateQualifiedName=function(e,t,n){return e.left!==t||e.right!==n?r(v(t,n),e):e},e.createComputedPropertyName=b,e.updateComputedPropertyName=function(e,t){return e.expression!==t?r(b(t),e):e},e.createTypeParameterDeclaration=D,e.updateTypeParameterDeclaration=function(e,t,n,i){return e.name!==t||e.constraint!==n||e.default!==i?r(D(t,n,i),e):e},e.createParameter=x,e.updateParameter=function(e,t,n,i,a,o,s,c){return e.decorators!==t||e.modifiers!==n||e.dotDotDotToken!==i||e.name!==a||e.questionToken!==o||e.type!==s||e.initializer!==c?r(x(t,n,i,a,o,s,c),e):e},e.createDecorator=S,e.updateDecorator=function(e,t){return e.expression!==t?r(S(t),e):e},e.createPropertySignature=T,e.updatePropertySignature=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.questionToken!==i||e.type!==a||e.initializer!==o?r(T(t,n,i,a,o),e):e},e.createProperty=C,e.updateProperty=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.questionToken!==(void 0!==a&&56===a.kind?a:void 0)||e.exclamationToken!==(void 0!==a&&52===a.kind?a:void 0)||e.type!==o||e.initializer!==s?r(C(t,n,i,a,o,s),e):e},e.createMethodSignature=E,e.updateMethodSignature=function(e,t,n,i,a,o){return e.typeParameters!==t||e.parameters!==n||e.type!==i||e.name!==a||e.questionToken!==o?r(E(t,n,i,a,o),e):e},e.createMethod=k,e.updateMethod=function(e,t,n,i,a,o,s,c,u,l){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.questionToken!==o||e.typeParameters!==s||e.parameters!==c||e.type!==u||e.body!==l?r(k(t,n,i,a,o,s,c,u,l),e):e},e.createConstructor=N,e.updateConstructor=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.parameters!==i||e.body!==a?r(N(t,n,i,a),e):e},e.createGetAccessor=A,e.updateGetAccessor=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.type!==o||e.body!==s?r(A(t,n,i,a,o,s),e):e},e.createSetAccessor=F,e.updateSetAccessor=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.body!==o?r(F(t,n,i,a,o),e):e},e.createCallSignature=function(e,t,r){return w(160,e,t,r)},e.updateCallSignature=function(e,t,r,n){return I(e,t,r,n)},e.createConstructSignature=function(e,t,r){return w(161,e,t,r)},e.updateConstructSignature=function(e,t,r,n){return I(e,t,r,n)},e.createIndexSignature=P,e.updateIndexSignature=function(e,t,n,i,a){return e.parameters!==i||e.type!==a||e.decorators!==t||e.modifiers!==n?r(P(t,n,i,a),e):e},e.createSignatureDeclaration=w,e.createKeywordTypeNode=function(e){return t(e)},e.createTypePredicateNode=O,e.updateTypePredicateNode=function(e,t,n){return e.parameterName!==t||e.type!==n?r(O(t,n),e):e},e.createTypeReferenceNode=M,e.updateTypeReferenceNode=function(e,t,n){return e.typeName!==t||e.typeArguments!==n?r(M(t,n),e):e},e.createFunctionTypeNode=function(e,t,r){return w(165,e,t,r)},e.updateFunctionTypeNode=function(e,t,r,n){return I(e,t,r,n)},e.createConstructorTypeNode=function(e,t,r){return w(166,e,t,r)},e.updateConstructorTypeNode=function(e,t,r,n){return I(e,t,r,n)},e.createTypeQueryNode=L,e.updateTypeQueryNode=function(e,t){return e.exprName!==t?r(L(t),e):e},e.createTypeLiteralNode=R,e.updateTypeLiteralNode=function(e,t){return e.members!==t?r(R(t),e):e},e.createArrayTypeNode=B,e.updateArrayTypeNode=function(e,t){return e.elementType!==t?r(B(t),e):e},e.createTupleTypeNode=j,e.updateTupleTypeNode=function(e,t){return e.elementTypes!==t?r(j(t),e):e},e.createOptionalTypeNode=J,e.updateOptionalTypeNode=function(e,t){return e.type!==t?r(J(t),e):e},e.createRestTypeNode=z,e.updateRestTypeNode=function(e,t){return e.type!==t?r(z(t),e):e},e.createUnionTypeNode=function(e){return K(173,e)},e.updateUnionTypeNode=function(e,t){return U(e,t)},e.createIntersectionTypeNode=function(e){return K(174,e)},e.updateIntersectionTypeNode=function(e,t){return U(e,t)},e.createUnionOrIntersectionTypeNode=K,e.createConditionalTypeNode=V,e.updateConditionalTypeNode=function(e,t,n,i,a){return e.checkType!==t||e.extendsType!==n||e.trueType!==i||e.falseType!==a?r(V(t,n,i,a),e):e},e.createInferTypeNode=q,e.updateInferTypeNode=function(e,t){return e.typeParameter!==t?r(q(t),e):e},e.createImportTypeNode=W,e.updateImportTypeNode=function(e,t,n,i,a){return e.argument!==t||e.qualifier!==n||e.typeArguments!==i||e.isTypeOf!==a?r(W(t,n,i,a),e):e},e.createParenthesizedType=H,e.updateParenthesizedType=function(e,t){return e.type!==t?r(H(t),e):e},e.createThisTypeNode=function(){return t(178)},e.createTypeOperatorNode=G,e.updateTypeOperatorNode=function(e,t){return e.type!==t?r(G(e.operator,t),e):e},e.createIndexedAccessTypeNode=Y,e.updateIndexedAccessTypeNode=function(e,t,n){return e.objectType!==t||e.indexType!==n?r(Y(t,n),e):e},e.createMappedTypeNode=X,e.updateMappedTypeNode=function(e,t,n,i,a){return e.readonlyToken!==t||e.typeParameter!==n||e.questionToken!==i||e.type!==a?r(X(t,n,i,a),e):e},e.createLiteralTypeNode=Q,e.updateLiteralTypeNode=function(e,t){return e.literal!==t?r(Q(t),e):e},e.createObjectBindingPattern=$,e.updateObjectBindingPattern=function(e,t){return e.elements!==t?r($(t),e):e},e.createArrayBindingPattern=Z,e.updateArrayBindingPattern=function(e,t){return e.elements!==t?r(Z(t),e):e},e.createBindingElement=ee,e.updateBindingElement=function(e,t,n,i,a){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==i||e.initializer!==a?r(ee(t,n,i,a),e):e},e.createArrayLiteral=te,e.updateArrayLiteral=function(e,t){return e.elements!==t?r(te(t,e.multiLine),e):e},e.createObjectLiteral=re,e.updateObjectLiteral=function(e,t){return e.properties!==t?r(re(t,e.multiLine),e):e},e.createPropertyAccess=ne,e.updatePropertyAccess=function(t,n,i){return t.expression!==n||t.name!==i?r(qt(ne(n,i),e.getEmitFlags(t)),t):t},e.createElementAccess=ie,e.updateElementAccess=function(e,t,n){return e.expression!==t||e.argumentExpression!==n?r(ie(t,n),e):e},e.createCall=ae,e.updateCall=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(ae(t,n,i),e):e},e.createNew=oe,e.updateNew=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(oe(t,n,i),e):e},e.createTaggedTemplate=se,e.updateTaggedTemplate=function(e,t,n,i){return e.tag!==t||(i?e.typeArguments!==n||e.template!==i:void 0!==e.typeArguments||e.template!==n)?r(se(t,n,i),e):e},e.createTypeAssertion=ce,e.updateTypeAssertion=function(e,t,n){return e.type!==t||e.expression!==n?r(ce(t,n),e):e},e.createParen=ue,e.updateParen=function(e,t){return e.expression!==t?r(ue(t),e):e},e.createFunctionExpression=le,e.updateFunctionExpression=function(e,t,n,i,a,o,s,c){return e.name!==i||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==a||e.parameters!==o||e.type!==s||e.body!==c?r(le(t,n,i,a,o,s,c),e):e},e.createArrowFunction=_e,e.updateArrowFunction=function(e,t,n,i,a,o,s){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==i||e.type!==a||e.equalsGreaterThanToken!==o||e.body!==s?r(_e(t,n,i,a,o,s),e):e},e.createDelete=de,e.updateDelete=function(e,t){return e.expression!==t?r(de(t),e):e},e.createTypeOf=pe,e.updateTypeOf=function(e,t){return e.expression!==t?r(pe(t),e):e},e.createVoid=fe,e.updateVoid=function(e,t){return e.expression!==t?r(fe(t),e):e},e.createAwait=me,e.updateAwait=function(e,t){return e.expression!==t?r(me(t),e):e},e.createPrefix=ge,e.updatePrefix=function(e,t){return e.operand!==t?r(ge(e.operator,t),e):e},e.createPostfix=ye,e.updatePostfix=function(e,t){return e.operand!==t?r(ye(t,e.operator),e):e},e.createBinary=he,e.updateBinary=function(e,t,n,i){return e.left!==t||e.right!==n?r(he(t,i||e.operatorToken,n),e):e},e.createConditional=ve,e.updateConditional=function(e,t,n,i,a,o){return e.condition!==t||e.questionToken!==n||e.whenTrue!==i||e.colonToken!==a||e.whenFalse!==o?r(ve(t,n,i,a,o),e):e},e.createTemplateExpression=be,e.updateTemplateExpression=function(e,t,n){return e.head!==t||e.templateSpans!==n?r(be(t,n),e):e},e.createTemplateHead=function(e){var r=t(15);return r.text=e,r},e.createTemplateMiddle=function(e){var r=t(16);return r.text=e,r},e.createTemplateTail=function(e){var r=t(17);return r.text=e,r},e.createNoSubstitutionTemplateLiteral=function(e){var r=t(14);return r.text=e,r},e.createYield=De,e.updateYield=function(e,t,n){return e.expression!==n||e.asteriskToken!==t?r(De(t,n),e):e},e.createSpread=xe,e.updateSpread=function(e,t){return e.expression!==t?r(xe(t),e):e},e.createClassExpression=Se,e.updateClassExpression=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==i||e.heritageClauses!==a||e.members!==o?r(Se(t,n,i,a,o),e):e},e.createOmittedExpression=function(){return t(210)},e.createExpressionWithTypeArguments=Te,e.updateExpressionWithTypeArguments=function(e,t,n){return e.typeArguments!==t||e.expression!==n?r(Te(t,n),e):e},e.createAsExpression=Ce,e.updateAsExpression=function(e,t,n){return e.expression!==t||e.type!==n?r(Ce(t,n),e):e},e.createNonNullExpression=Ee,e.updateNonNullExpression=function(e,t){return e.expression!==t?r(Ee(t),e):e},e.createMetaProperty=ke,e.updateMetaProperty=function(e,t){return e.name!==t?r(ke(e.keywordToken,t),e):e},e.createTemplateSpan=Ne,e.updateTemplateSpan=function(e,t,n){return e.expression!==t||e.literal!==n?r(Ne(t,n),e):e},e.createSemicolonClassElement=function(){return t(217)},e.createBlock=Ae,e.updateBlock=function(e,t){return e.statements!==t?r(Ae(t,e.multiLine),e):e},e.createVariableStatement=Fe,e.updateVariableStatement=function(e,t,n){return e.modifiers!==t||e.declarationList!==n?r(Fe(t,n),e):e},e.createEmptyStatement=function(){return t(220)},e.createExpressionStatement=Pe,e.updateExpressionStatement=we,e.createStatement=Pe,e.updateStatement=we,e.createIf=Ie,e.updateIf=function(e,t,n,i){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==i?r(Ie(t,n,i),e):e},e.createDo=Oe,e.updateDo=function(e,t,n){return e.statement!==t||e.expression!==n?r(Oe(t,n),e):e},e.createWhile=Me,e.updateWhile=function(e,t,n){return e.expression!==t||e.statement!==n?r(Me(t,n),e):e},e.createFor=Le,e.updateFor=function(e,t,n,i,a){return e.initializer!==t||e.condition!==n||e.incrementor!==i||e.statement!==a?r(Le(t,n,i,a),e):e},e.createForIn=Re,e.updateForIn=function(e,t,n,i){return e.initializer!==t||e.expression!==n||e.statement!==i?r(Re(t,n,i),e):e},e.createForOf=Be,e.updateForOf=function(e,t,n,i,a){return e.awaitModifier!==t||e.initializer!==n||e.expression!==i||e.statement!==a?r(Be(t,n,i,a),e):e},e.createContinue=je,e.updateContinue=function(e,t){return e.label!==t?r(je(t),e):e},e.createBreak=Je,e.updateBreak=function(e,t){return e.label!==t?r(Je(t),e):e},e.createReturn=ze,e.updateReturn=function(e,t){return e.expression!==t?r(ze(t),e):e},e.createWith=Ke,e.updateWith=function(e,t,n){return e.expression!==t||e.statement!==n?r(Ke(t,n),e):e},e.createSwitch=Ue,e.updateSwitch=function(e,t,n){return e.expression!==t||e.caseBlock!==n?r(Ue(t,n),e):e},e.createLabel=Ve,e.updateLabel=function(e,t,n){return e.label!==t||e.statement!==n?r(Ve(t,n),e):e},e.createThrow=qe,e.updateThrow=function(e,t){return e.expression!==t?r(qe(t),e):e},e.createTry=We,e.updateTry=function(e,t,n,i){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==i?r(We(t,n,i),e):e},e.createDebuggerStatement=function(){return t(236)},e.createVariableDeclaration=He,e.updateVariableDeclaration=function(e,t,n,i){return e.name!==t||e.type!==n||e.initializer!==i?r(He(t,n,i),e):e},e.createVariableDeclarationList=Ge,e.updateVariableDeclarationList=function(e,t){return e.declarations!==t?r(Ge(t,e.flags),e):e},e.createFunctionDeclaration=Ye,e.updateFunctionDeclaration=function(e,t,n,i,a,o,s,c,u){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.typeParameters!==o||e.parameters!==s||e.type!==c||e.body!==u?r(Ye(t,n,i,a,o,s,c,u),e):e},e.createClassDeclaration=Xe,e.updateClassDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(Xe(t,n,i,a,o,s),e):e},e.createInterfaceDeclaration=Qe,e.updateInterfaceDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(Qe(t,n,i,a,o,s),e):e},e.createTypeAliasDeclaration=$e,e.updateTypeAliasDeclaration=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.type!==o?r($e(t,n,i,a,o),e):e},e.createEnumDeclaration=Ze,e.updateEnumDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.members!==a?r(Ze(t,n,i,a),e):e},e.createModuleDeclaration=et,e.updateModuleDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.body!==a?r(et(t,n,i,a,e.flags),e):e},e.createModuleBlock=tt,e.updateModuleBlock=function(e,t){return e.statements!==t?r(tt(t),e):e},e.createCaseBlock=rt,e.updateCaseBlock=function(e,t){return e.clauses!==t?r(rt(t),e):e},e.createNamespaceExportDeclaration=nt,e.updateNamespaceExportDeclaration=function(e,t){return e.name!==t?r(nt(t),e):e},e.createImportEqualsDeclaration=it,e.updateImportEqualsDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.moduleReference!==a?r(it(t,n,i,a),e):e},e.createImportDeclaration=at,e.updateImportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.importClause!==i||e.moduleSpecifier!==a?r(at(t,n,i,a),e):e},e.createImportClause=ot,e.updateImportClause=function(e,t,n){return e.name!==t||e.namedBindings!==n?r(ot(t,n),e):e},e.createNamespaceImport=st,e.updateNamespaceImport=function(e,t){return e.name!==t?r(st(t),e):e},e.createNamedImports=ct,e.updateNamedImports=function(e,t){return e.elements!==t?r(ct(t),e):e},e.createImportSpecifier=ut,e.updateImportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(ut(t,n),e):e},e.createExportAssignment=lt,e.updateExportAssignment=function(e,t,n,i){return e.decorators!==t||e.modifiers!==n||e.expression!==i?r(lt(t,n,e.isExportEquals,i),e):e},e.createExportDeclaration=_t,e.updateExportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.exportClause!==i||e.moduleSpecifier!==a?r(_t(t,n,i,a),e):e},e.createNamedExports=dt,e.updateNamedExports=function(e,t){return e.elements!==t?r(dt(t),e):e},e.createExportSpecifier=pt,e.updateExportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(pt(t,n),e):e},e.createExternalModuleReference=ft,e.updateExternalModuleReference=function(e,t){return e.expression!==t?r(ft(t),e):e},e.createJSDocTypeExpression=function(e){var r=t(288);return r.type=e,r},e.createJSDocTypeTag=function(e,t){var r=mt(307,"type");return r.typeExpression=e,r.comment=t,r},e.createJSDocReturnTag=function(e,t){var r=mt(305,"returns");return r.typeExpression=e,r.comment=t,r},e.createJSDocParamTag=function(e,t,r,n){var i=mt(304,"param");return i.typeExpression=r,i.name=e,i.isBracketed=t,i.comment=n,i},e.createJSDocComment=function(e,r){var n=t(296);return n.comment=e,n.tags=r,n},e.createJsxElement=gt,e.updateJsxElement=function(e,t,n,i){return e.openingElement!==t||e.children!==n||e.closingElement!==i?r(gt(t,n,i),e):e},e.createJsxSelfClosingElement=yt,e.updateJsxSelfClosingElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(yt(t,n,i),e):e},e.createJsxOpeningElement=ht,e.updateJsxOpeningElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(ht(t,n,i),e):e},e.createJsxClosingElement=vt,e.updateJsxClosingElement=function(e,t){return e.tagName!==t?r(vt(t),e):e},e.createJsxFragment=bt,e.createJsxText=Dt,e.updateJsxText=function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?r(Dt(t,n),e):e},e.createJsxOpeningFragment=function(){return t(265)},e.createJsxJsxClosingFragment=function(){return t(266)},e.updateJsxFragment=function(e,t,n,i){return e.openingFragment!==t||e.children!==n||e.closingFragment!==i?r(bt(t,n,i),e):e},e.createJsxAttribute=xt,e.updateJsxAttribute=function(e,t,n){return e.name!==t||e.initializer!==n?r(xt(t,n),e):e},e.createJsxAttributes=St,e.updateJsxAttributes=function(e,t){return e.properties!==t?r(St(t),e):e},e.createJsxSpreadAttribute=Tt,e.updateJsxSpreadAttribute=function(e,t){return e.expression!==t?r(Tt(t),e):e},e.createJsxExpression=Ct,e.updateJsxExpression=function(e,t){return e.expression!==t?r(Ct(e.dotDotDotToken,t),e):e},e.createCaseClause=Et,e.updateCaseClause=function(e,t,n){return e.expression!==t||e.statements!==n?r(Et(t,n),e):e},e.createDefaultClause=kt,e.updateDefaultClause=function(e,t){return e.statements!==t?r(kt(t),e):e},e.createHeritageClause=Nt,e.updateHeritageClause=function(e,t){return e.types!==t?r(Nt(e.token,t),e):e},e.createCatchClause=At,e.updateCatchClause=function(e,t,n){return e.variableDeclaration!==t||e.block!==n?r(At(t,n),e):e},e.createPropertyAssignment=Ft,e.updatePropertyAssignment=function(e,t,n){return e.name!==t||e.initializer!==n?r(Ft(t,n),e):e},e.createShorthandPropertyAssignment=Pt,e.updateShorthandPropertyAssignment=function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?r(Pt(t,n),e):e},e.createSpreadAssignment=wt,e.updateSpreadAssignment=function(e,t){return e.expression!==t?r(wt(t),e):e},e.createEnumMember=It,e.updateEnumMember=function(e,t,n){return e.name!==t||e.initializer!==n?r(It(t,n),e):e},e.updateSourceFileNode=function(e,i,a,o,s,c,u){if(e.statements!==i||void 0!==a&&e.isDeclarationFile!==a||void 0!==o&&e.referencedFiles!==o||void 0!==s&&e.typeReferenceDirectives!==s||void 0!==u&&e.libReferenceDirectives!==u||void 0!==c&&e.hasNoDefaultLib!==c){var l=t(284);return l.flags|=e.flags,l.statements=n(i),l.endOfFileToken=e.endOfFileToken,l.fileName=e.fileName,l.path=e.path,l.text=e.text,l.isDeclarationFile=void 0===a?e.isDeclarationFile:a,l.referencedFiles=void 0===o?e.referencedFiles:o,l.typeReferenceDirectives=void 0===s?e.typeReferenceDirectives:s,l.hasNoDefaultLib=void 0===c?e.hasNoDefaultLib:c,l.libReferenceDirectives=void 0===u?e.libReferenceDirectives:u,void 0!==e.amdDependencies&&(l.amdDependencies=e.amdDependencies),void 0!==e.moduleName&&(l.moduleName=e.moduleName),void 0!==e.languageVariant&&(l.languageVariant=e.languageVariant),void 0!==e.renamedDependencies&&(l.renamedDependencies=e.renamedDependencies),void 0!==e.languageVersion&&(l.languageVersion=e.languageVersion),void 0!==e.scriptKind&&(l.scriptKind=e.scriptKind),void 0!==e.externalModuleIndicator&&(l.externalModuleIndicator=e.externalModuleIndicator),void 0!==e.commonJsModuleIndicator&&(l.commonJsModuleIndicator=e.commonJsModuleIndicator),void 0!==e.identifiers&&(l.identifiers=e.identifiers),void 0!==e.nodeCount&&(l.nodeCount=e.nodeCount),void 0!==e.identifierCount&&(l.identifierCount=e.identifierCount),void 0!==e.symbolCount&&(l.symbolCount=e.symbolCount),void 0!==e.parseDiagnostics&&(l.parseDiagnostics=e.parseDiagnostics),void 0!==e.bindDiagnostics&&(l.bindDiagnostics=e.bindDiagnostics),void 0!==e.bindSuggestionDiagnostics&&(l.bindSuggestionDiagnostics=e.bindSuggestionDiagnostics),void 0!==e.lineMap&&(l.lineMap=e.lineMap),void 0!==e.classifiableNames&&(l.classifiableNames=e.classifiableNames),void 0!==e.resolvedModules&&(l.resolvedModules=e.resolvedModules),void 0!==e.resolvedTypeReferenceDirectiveNames&&(l.resolvedTypeReferenceDirectiveNames=e.resolvedTypeReferenceDirectiveNames),void 0!==e.imports&&(l.imports=e.imports),void 0!==e.moduleAugmentations&&(l.moduleAugmentations=e.moduleAugmentations),void 0!==e.pragmas&&(l.pragmas=e.pragmas),void 0!==e.localJsxFactory&&(l.localJsxFactory=e.localJsxFactory),void 0!==e.localJsxNamespace&&(l.localJsxNamespace=e.localJsxNamespace),r(l,e)}return e},e.getMutableClone=function(e){var t=i(e);return t.pos=e.pos,t.end=e.end,t.parent=e.parent,t},e.createNotEmittedStatement=function(e){var r=t(312);return r.original=e,Vt(r,e),r},e.createEndOfDeclarationMarker=function(e){var r=t(316);return r.emitNode={},r.original=e,r},e.createMergeDeclarationMarker=function(e){var r=t(315);return r.emitNode={},r.original=e,r},e.createPartiallyEmittedExpression=Ot,e.updatePartiallyEmittedExpression=function(e,t){return e.expression!==t?r(Ot(t,e.original),e):e},e.createCommaList=Lt,e.updateCommaList=function(e,t){return e.elements!==t?r(Lt(t),e):e},e.createBundle=Rt,e.createUnparsedSourceFile=function(t,r,n){var i,a,o=function(){var t=e.createNode(286);return t.prologues=e.emptyArray,t.referencedFiles=e.emptyArray,t.libReferenceDirectives=e.emptyArray,t.getLineAndCharacterOfPosition=function(r){return e.getLineAndCharacterOfPosition(t,r)},t}();if(e.isString(t))o.fileName="",o.text=t,o.sourceMapPath=r,o.sourceMapText=n;else if(e.Debug.assert("js"===r||"dts"===r),o.fileName=("js"===r?t.javascriptPath:t.declarationPath)||"",o.sourceMapPath="js"===r?t.javascriptMapPath:t.declarationMapPath,Object.defineProperties(o,{text:{get:function(){return"js"===r?t.javascriptText:t.declarationText}},sourceMapText:{get:function(){return"js"===r?t.javascriptMapText:t.declarationMapText}}}),t.buildInfo&&t.buildInfo.bundle&&(o.oldFileOfCurrentEmit=t.oldFileOfCurrentEmit,e.Debug.assert(void 0===n||"boolean"==typeof n),i=n,a="js"===r?t.buildInfo.bundle.js:t.buildInfo.bundle.dts,o.oldFileOfCurrentEmit))return function(t,r){var n,i;e.Debug.assert(!!t.oldFileOfCurrentEmit);for(var a=0,o=r.sections;a<o.length;a++){var s=o[a];switch(s.kind){case"internal":case"text":(n||(n=[])).push(jt(s,t));break;case"no-default-lib":case"reference":case"type":case"lib":(i||(i=[])).push(Jt(s,t));break;case"prologue":case"emitHelpers":case"prepend":break;default:e.Debug.assertNever(s)}}t.texts=n||e.emptyArray,t.helpers=e.map(r.sources&&r.sources.helpers,function(e){return Bt().get(e)}),t.syntheticReferences=i}(o,e.Debug.assertDefined(a)),o;return e.Debug.assert(!o.oldFileOfCurrentEmit),function(t,r,n){for(var i,a,o,s,c,u,l=0,_=r?r.sections:e.emptyArray;l<_.length;l++){var d=_[l];switch(d.kind){case"prologue":(i||(i=[])).push(jt(d,t));break;case"emitHelpers":(a||(a=[])).push(Bt().get(d.data));break;case"no-default-lib":t.hasNoDefaultLib=!0;break;case"reference":(o||(o=[])).push({pos:-1,end:-1,fileName:d.data});break;case"type":(s||(s=[])).push(d.data);break;case"lib":(c||(c=[])).push({pos:-1,end:-1,fileName:d.data});break;case"prepend":for(var p=jt(d,t),f=void 0,m=0,g=d.texts;m<g.length;m++){var y=g[m];n&&"internal"===y.kind||(f||(f=[])).push(jt(y,t))}p.texts=f||e.emptyArray,(u||(u=[])).push(p);break;case"internal":if(n)break;case"text":(u||(u=[])).push(jt(d,t));break;default:e.Debug.assertNever(d)}}t.prologues=i||e.emptyArray,t.helpers=a,t.referencedFiles=o||e.emptyArray,t.typeReferenceDirectives=s,t.libReferenceDirectives=c||e.emptyArray,t.texts=u||[jt({kind:"text",pos:0,end:t.text.length},t)]}(o,a,i),o},e.createInputFiles=function(t,r,n,i,a,o,s,c,u,l,_){var d=e.createNode(287);if(e.isString(t))d.javascriptText=t,d.javascriptMapPath=n,d.javascriptMapText=i,d.declarationText=r,d.declarationMapPath=a,d.declarationMapText=o,d.javascriptPath=s,d.declarationPath=c,d.buildInfoPath=u,d.buildInfo=l,d.oldFileOfCurrentEmit=_;else{var p,f=e.createMap(),m=function(e){if(void 0!==e){var r=f.get(e);return void 0===r&&(r=t(e),f.set(e,void 0!==r&&r)),!1!==r?r:void 0}},g=function(e){var t=m(e);return void 0!==t?t:"/* Input file "+e+" was missing */\r\n"};d.javascriptPath=r,d.javascriptMapPath=n,d.declarationPath=e.Debug.assertDefined(i),d.declarationMapPath=a,d.buildInfoPath=o,Object.defineProperties(d,{javascriptText:{get:function(){return g(r)}},javascriptMapText:{get:function(){return m(n)}},declarationText:{get:function(){return g(e.Debug.assertDefined(i))}},declarationMapText:{get:function(){return m(a)}},buildInfo:{get:function(){return function(t){if(void 0===p){var r=t();p=void 0!==r&&e.getBuildInfo(r)}return p||void 0}(function(){return m(o)})}}})}return d},e.updateBundle=function(t,r,n){return void 0===n&&(n=e.emptyArray),t.sourceFiles!==r||t.prepends!==n?Rt(r,n):t},e.createImmediatelyInvokedFunctionExpression=function(e,t,r){return ae(le(void 0,void 0,void 0,void 0,t?[t]:[],void 0,Ae(e,!0)),void 0,r?[r]:[])},e.createImmediatelyInvokedArrowFunction=function(e,t,r){return ae(_e(void 0,void 0,t?[t]:[],void 0,void 0,Ae(e,!0)),void 0,r?[r]:[])},e.createComma=function(e,t){return he(e,27,t)},e.createLessThan=function(e,t){return he(e,28,t)},e.createAssignment=function(e,t){return he(e,59,t)},e.createStrictEquality=function(e,t){return he(e,35,t)},e.createStrictInequality=function(e,t){return he(e,36,t)},e.createAdd=function(e,t){return he(e,38,t)},e.createSubtract=function(e,t){return he(e,39,t)},e.createPostfixIncrement=function(e){return ye(e,44)},e.createLogicalAnd=function(e,t){return he(e,54,t)},e.createLogicalOr=function(e,t){return he(e,55,t)},e.createLogicalNot=function(e){return ge(52,e)},e.createVoidZero=function(){return fe(a(0))},e.createExportDefault=function(e){return lt(void 0,void 0,!1,e)},e.createExternalModuleExport=function(e){return _t(void 0,void 0,dt([pt(void 0,e)]))},e.disposeEmitNodes=function(t){var r=(t=e.getSourceFileOfNode(e.getParseTreeNode(t)))&&t.emitNode,n=r&&r.annotatedNodes;if(n)for(var i=0,a=n;i<a.length;i++)a[i].emitNode=void 0},e.getOrCreateEmitNode=Ut,e.setTextRange=Vt,e.setEmitFlags=qt,e.addEmitFlags=function(e,t){var r=Ut(e);return r.flags=r.flags|t,e},e.getSourceMapRange=function(e){var t=e.emitNode;return t&&t.sourceMapRange||e},e.setSourceMapRange=function(e,t){return Ut(e).sourceMapRange=t,e},e.createSourceMapSource=function(t,r,n){return new(_||(_=e.objectAllocator.getSourceMapSourceConstructor()))(t,r,n)},e.getTokenSourceMapRange=function(e,t){var r=e.emitNode,n=r&&r.tokenSourceMapRanges;return n&&n[t]},e.setTokenSourceMapRange=function(e,t,r){var n=Ut(e);return(n.tokenSourceMapRanges||(n.tokenSourceMapRanges=[]))[t]=r,e},e.getStartsOnNewLine=function(e){var t=e.emitNode;return t&&t.startsOnNewLine},e.setStartsOnNewLine=function(e,t){return Ut(e).startsOnNewLine=t,e},e.getCommentRange=function(e){var t=e.emitNode;return t&&t.commentRange||e},e.setCommentRange=function(e,t){return Ut(e).commentRange=t,e},e.getSyntheticLeadingComments=Wt,e.setSyntheticLeadingComments=Ht,e.addSyntheticLeadingComment=function(t,r,n,i){return Ht(t,e.append(Wt(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:i,text:n}))},e.getSyntheticTrailingComments=Gt,e.setSyntheticTrailingComments=Yt,e.addSyntheticTrailingComment=function(t,r,n,i){return Yt(t,e.append(Gt(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:i,text:n}))},e.moveSyntheticComments=function(e,t){Ht(e,Wt(t)),Yt(e,Gt(t));var r=Ut(t);return r.leadingComments=void 0,r.trailingComments=void 0,e},e.getConstantValue=function(e){var t=e.emitNode;return t&&t.constantValue},e.setConstantValue=function(e,t){return Ut(e).constantValue=t,e},e.addEmitHelper=function(t,r){var n=Ut(t);return n.helpers=e.append(n.helpers,r),t},e.addEmitHelpers=function(t,r){if(e.some(r))for(var n=Ut(t),i=0,a=r;i<a.length;i++){var o=a[i];n.helpers=e.appendIfUnique(n.helpers,o)}return t},e.removeEmitHelper=function(t,r){var n=t.emitNode;if(n){var i=n.helpers;if(i)return e.orderedRemoveItem(i,r)}return!1},e.getEmitHelpers=function(e){var t=e.emitNode;return t&&t.helpers},e.moveEmitHelpers=function(t,r,n){var i=t.emitNode,a=i&&i.helpers;if(e.some(a)){for(var o=Ut(r),s=0,c=0;c<a.length;c++){var u=a[c];n(u)?(s++,o.helpers=e.appendIfUnique(o.helpers,u)):s>0&&(a[c-s]=u)}s>0&&(a.length-=s)}},e.compareEmitHelpers=function(t,r){return t===r?0:t.priority===r.priority?0:void 0===t.priority?1:void 0===r.priority?-1:e.compareValues(t.priority,r.priority)},e.setOriginalNode=Xt}(c||(c={})),function(e){function t(t,r,n){if(e.isComputedPropertyName(r))return e.setTextRange(e.createElementAccess(t,r.expression),n);var i=e.setTextRange(e.isIdentifier(r)?e.createPropertyAccess(t,r):e.createElementAccess(t,r),r);return e.getOrCreateEmitNode(i).flags|=64,i}function r(t,r){var n=e.createIdentifier(t||"React");return n.flags&=-9,n.parent=e.getParseTreeNode(r),n}function n(t,n,i){return t?function t(n,i){if(e.isQualifiedName(n)){var a=t(n.left,i),o=e.createIdentifier(e.idText(n.right));return o.escapedText=n.right.escapedText,e.createPropertyAccess(a,o)}return r(e.idText(n),i)}(t,i):e.createPropertyAccess(r(n,i),"createElement")}function i(t){return e.setEmitFlags(e.createIdentifier(t),4098)}function a(t,r){var n=e.skipParentheses(t);switch(n.kind){case 72:return r;case 100:case 8:case 9:case 10:return!1;case 187:return 0!==n.elements.length;case 188:return n.properties.length>0;default:return!0}}function o(t){return e.isIdentifier(t)?e.createLiteral(t):e.isComputedPropertyName(t)?e.getMutableClone(t.expression):e.getMutableClone(t)}function s(e,t,r){return c(e,t,r,8192)}function c(t,r,n,i){void 0===i&&(i=0);var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.getMutableClone(a);return i|=e.getEmitFlags(a),n||(i|=48),r||(i|=1536),i&&e.setEmitFlags(o,i),o}return e.getGeneratedNameForNode(t)}function u(t,r,n,i){var a=e.createPropertyAccess(t,e.nodeIsSynthesized(r)?r:e.getSynthesizedClone(r));e.setTextRange(a,r);var o=0;return i||(o|=48),n||(o|=1536),o&&e.setEmitFlags(a,o),a}function l(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function _(t,r,n){e.Debug.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=r.length;a<o;){var s=r[a];if(!e.isPrologueDirective(s))break;l(s)&&(i=!0),t.push(s),a++}return n&&!i&&t.push(C(e.createStatement(e.createLiteral("use strict")))),a}function d(t,r,n,i){for(var a=r.length;void 0!==n&&n<a;){var o=r[n];if(!(1048576&e.getEmitFlags(o)))break;e.append(t,i?e.visitNode(o,i,e.isStatement):o),n++}return n}function p(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!e.isPrologueDirective(i))break;if(l(i))return i}}function f(t){if(t=e.skipPartiallyEmittedExpressions(t),e.isLiteralKind(t.kind))return t.kind;if(204===t.kind&&38===t.operatorToken.kind){if(void 0!==t.cachedLiteralKind)return t.cachedLiteralKind;var r=f(t.left),n=e.isLiteralKind(r)&&r===f(t.right)?r:0;return t.cachedLiteralKind=n,n}return 0}function m(t){var r=e.skipPartiallyEmittedExpressions(t);return e.isLeftHandSideExpression(r)&&(192!==r.kind||r.arguments)?t:e.setTextRange(e.createParen(t),t)}function g(t){var r=e.skipPartiallyEmittedExpressions(t);return e.getExpressionPrecedence(r)>e.getOperatorPrecedence(204,27)?t:e.setTextRange(e.createParen(t),t)}function y(t){return 175===t.kind?e.createParenthesizedType(t):t}function h(t){switch(t.kind){case 173:case 174:case 165:case 166:return e.createParenthesizedType(t)}return y(t)}function v(e,t){for(;;){switch(e.kind){case 203:e=e.operand;continue;case 204:e=e.left;continue;case 205:e=e.condition;continue;case 193:e=e.tag;continue;case 191:if(t)return e;case 212:case 190:case 189:case 213:case 313:e=e.expression;continue}return e}}function b(e){return 204===e.kind&&27===e.operatorToken.kind||314===e.kind}function D(e,t){switch(void 0===t&&(t=7),e.kind){case 195:return 0!=(1&t);case 194:case 212:case 213:return 0!=(2&t);case 313:return 0!=(4&t)}return!1}function x(t,r){var n;void 0===r&&(r=7);do{n=t,1&r&&(t=e.skipParentheses(t)),2&r&&(t=S(t)),4&r&&(t=e.skipPartiallyEmittedExpressions(t))}while(n!==t);return t}function S(t){for(;e.isAssertionExpression(t)||213===t.kind;)t=t.expression;return t}function T(t,r,n){return void 0===n&&(n=7),t&&D(t,n)&&(!(195===(i=t).kind&&e.nodeIsSynthesized(i)&&e.nodeIsSynthesized(e.getSourceMapRange(i))&&e.nodeIsSynthesized(e.getCommentRange(i)))||e.some(e.getSyntheticLeadingComments(i))||e.some(e.getSyntheticTrailingComments(i)))?function(t,r){switch(t.kind){case 195:return e.updateParen(t,r);case 194:return e.updateTypeAssertion(t,t.type,r);case 212:return e.updateAsExpression(t,r,t.type);case 213:return e.updateNonNullExpression(t,r);case 313:return e.updatePartiallyEmittedExpression(t,r)}}(t,T(t.expression,r)):r;var i}function C(t){return e.setStartsOnNewLine(t,!0)}function E(t){var r=e.getOriginalNode(t,e.isSourceFile),n=r&&r.emitNode;return n&&n.externalHelpersModuleName}function k(t,r,n){if(t)return t.moduleName?e.createLiteral(t.moduleName):t.isDeclarationFile||!n.out&&!n.outFile?void 0:e.createLiteral(e.getExternalModuleNameFromPath(r,t.fileName))}function N(t){if(e.isDeclarationBindingElement(t))return t.name;if(!e.isObjectLiteralElementLike(t))return e.isAssignmentExpression(t,!0)?N(t.left):e.isSpreadElement(t)?N(t.expression):t;switch(t.kind){case 275:return N(t.initializer);case 276:return t.name;case 277:return N(t.expression)}}function A(e){var t=e.kind;return 10===t||8===t}function F(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpread(t.name),t),t);var r=M(t.name);return t.initializer?e.setOriginalNode(e.setTextRange(e.createAssignment(r,t.initializer),t),t):r}return e.Debug.assertNode(t,e.isExpression),t}function P(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){var r=M(t.name);return e.setOriginalNode(e.setTextRange(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(r,t.initializer):r),t),t)}return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return e.Debug.assertNode(t,e.isObjectLiteralElementLike),t}function w(e){switch(e.kind){case 185:case 187:return O(e);case 184:case 188:return I(e)}}function I(t){return e.isObjectBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createObjectLiteral(e.map(t.elements,P)),t),t):(e.Debug.assertNode(t,e.isObjectLiteralExpression),t)}function O(t){return e.isArrayBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createArrayLiteral(e.map(t.elements,F)),t),t):(e.Debug.assertNode(t,e.isArrayLiteralExpression),t)}function M(t){return e.isBindingPattern(t)?w(t):(e.Debug.assertNode(t,e.isExpression),t)}e.nullTransformationContext={enableEmitNotification:e.noop,enableSubstitution:e.noop,endLexicalEnvironment:e.returnUndefined,getCompilerOptions:e.notImplemented,getEmitHost:e.notImplemented,getEmitResolver:e.notImplemented,hoistFunctionDeclaration:e.noop,hoistVariableDeclaration:e.noop,isEmitNotificationEnabled:e.notImplemented,isSubstitutionEnabled:e.notImplemented,onEmitNode:e.noop,onSubstituteNode:e.notImplemented,readEmitHelpers:e.notImplemented,requestEmitHelper:e.noop,resumeLexicalEnvironment:e.noop,startLexicalEnvironment:e.noop,suspendLexicalEnvironment:e.noop,addDiagnostic:e.noop},e.createTypeCheck=function(t,r){return"undefined"===r?e.createStrictEquality(t,e.createVoidZero()):e.createStrictEquality(e.createTypeOf(t),e.createLiteral(r))},e.createMemberAccessForPropertyName=t,e.createFunctionCall=function(t,r,n,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"call"),void 0,[r].concat(n)),i)},e.createFunctionApply=function(t,r,n,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"apply"),void 0,[r,n]),i)},e.createArraySlice=function(t,r){var n=[];return void 0!==r&&n.push("number"==typeof r?e.createLiteral(r):r),e.createCall(e.createPropertyAccess(t,"slice"),void 0,n)},e.createArrayConcat=function(t,r){return e.createCall(e.createPropertyAccess(t,"concat"),void 0,r)},e.createMathPow=function(t,r,n){return e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Math"),"pow"),void 0,[t,r]),n)},e.createExpressionForJsxElement=function(t,r,i,a,o,s,c){var u=[i];if(a&&u.push(a),o&&o.length>0)if(a||u.push(e.createNull()),o.length>1)for(var l=0,_=o;l<_.length;l++){var d=_[l];C(d),u.push(d)}else u.push(o[0]);return e.setTextRange(e.createCall(n(t,r,s),void 0,u),c)},e.createExpressionForJsxFragment=function(t,i,a,o,s){var c=[e.createPropertyAccess(r(i,o),"Fragment")];if(c.push(e.createNull()),a&&a.length>0)if(a.length>1)for(var u=0,l=a;u<l.length;u++){var _=l[u];C(_),c.push(_)}else c.push(a[0]);return e.setTextRange(e.createCall(n(t,i,o),void 0,c),s)},e.getHelperName=i,e.valuesHelper={name:"typescript:values",scoped:!1,text:'\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };'},e.createValuesHelper=function(t,r,n){return t.requestEmitHelper(e.valuesHelper),e.setTextRange(e.createCall(i("__values"),void 0,[r]),n)},e.readHelper={name:"typescript:read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},e.createReadHelper=function(t,r,n,a){return t.requestEmitHelper(e.readHelper),e.setTextRange(e.createCall(i("__read"),void 0,void 0!==n?[r,e.createLiteral(n)]:[r]),a)},e.spreadHelper={name:"typescript:spread",scoped:!1,text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"},e.createSpreadHelper=function(t,r,n){return t.requestEmitHelper(e.readHelper),t.requestEmitHelper(e.spreadHelper),e.setTextRange(e.createCall(i("__spread"),void 0,r),n)},e.createForOfBindingStatement=function(t,r){if(e.isVariableDeclarationList(t)){var n=e.first(t.declarations),i=e.updateVariableDeclaration(n,n.name,void 0,r);return e.setTextRange(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}var a=e.setTextRange(e.createAssignment(t,r),t);return e.setTextRange(e.createStatement(a),t)},e.insertLeadingStatement=function(t,r){return e.isBlock(t)?e.updateBlock(t,e.setTextRange(e.createNodeArray([r].concat(t.statements)),t.statements)):e.createBlock(e.createNodeArray([t,r]),!0)},e.restoreEnclosingLabel=function t(r,n,i){if(!n)return r;var a=e.updateLabel(n,n.label,233===n.statement.kind?t(r,n.statement):r);return i&&i(n),a},e.createCallBinding=function(t,r,n,i){void 0===i&&(i=!1);var o,s,c=x(t,7);if(e.isSuperProperty(c))o=e.createThis(),s=c;else if(98===c.kind)o=e.createThis(),s=n<2?e.setTextRange(e.createIdentifier("_super"),c):c;else if(4096&e.getEmitFlags(c))o=e.createVoidZero(),s=m(c);else switch(c.kind){case 189:a(c.expression,i)?(o=e.createTempVariable(r),s=e.createPropertyAccess(e.setTextRange(e.createAssignment(o,c.expression),c.expression),c.name),e.setTextRange(s,c)):(o=c.expression,s=c);break;case 190:a(c.expression,i)?(o=e.createTempVariable(r),s=e.createElementAccess(e.setTextRange(e.createAssignment(o,c.expression),c.expression),c.argumentExpression),e.setTextRange(s,c)):(o=c.expression,s=c);break;default:o=e.createVoidZero(),s=m(t)}return{target:s,thisArg:o}},e.inlineExpressions=function(t){return t.length>10?e.createCommaList(t):e.reduceLeft(t,e.createComma)},e.createExpressionFromEntityName=function t(r){if(e.isQualifiedName(r)){var n=t(r.left),i=e.getMutableClone(r.right);return e.setTextRange(e.createPropertyAccess(n,i),r)}return e.getMutableClone(r)},e.createExpressionForPropertyName=o,e.createExpressionForObjectLiteralElementLike=function(r,n,i){switch(n.kind){case 158:case 159:return function(t,r,n,i){var a=e.getAllAccessorDeclarations(t,r),s=a.firstAccessor,c=a.getAccessor,u=a.setAccessor;if(r===s){var l=[];if(c){var _=e.createFunctionExpression(c.modifiers,void 0,void 0,void 0,c.parameters,void 0,c.body);e.setTextRange(_,c),e.setOriginalNode(_,c);var d=e.createPropertyAssignment("get",_);l.push(d)}if(u){var p=e.createFunctionExpression(u.modifiers,void 0,void 0,void 0,u.parameters,void 0,u.body);e.setTextRange(p,u),e.setOriginalNode(p,u);var f=e.createPropertyAssignment("set",p);l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue())),l.push(e.createPropertyAssignment("configurable",e.createTrue()));var m=e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[n,o(r.name),e.createObjectLiteral(l,i)]),s);return e.aggregateTransformFlags(m)}}(r.properties,n,i,!!r.multiLine);case 275:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),r.initializer),r),r))}(n,i);case 276:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),e.getSynthesizedClone(r.name)),r),r))}(n,i);case 156:return function(r,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(t(n,r.name,r.name),e.setOriginalNode(e.setTextRange(e.createFunctionExpression(r.modifiers,r.asteriskToken,void 0,void 0,r.parameters,void 0,r.body),r),r)),r),r))}(n,i)}},e.getInternalName=function(e,t,r){return c(e,t,r,49152)},e.isInternalName=function(t){return 0!=(32768&e.getEmitFlags(t))},e.getLocalName=function(e,t,r){return c(e,t,r,16384)},e.isLocalName=function(t){return 0!=(16384&e.getEmitFlags(t))},e.getExportName=s,e.isExportName=function(t){return 0!=(8192&e.getEmitFlags(t))},e.getDeclarationName=function(e,t,r){return c(e,t,r)},e.getExternalModuleOrNamespaceExportName=function(t,r,n,i){return t&&e.hasModifier(r,1)?u(t,c(r),n,i):s(r,n,i)},e.getNamespaceMemberName=u,e.convertToFunctionBody=function(t,r){return e.isBlock(t)?t:e.setTextRange(e.createBlock([e.setTextRange(e.createReturn(t),t)],r),t)},e.convertFunctionDeclarationToExpression=function(t){if(!t.body)return e.Debug.fail();var r=e.createFunctionExpression(t.modifiers,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);return e.setOriginalNode(r,t),e.setTextRange(r,t),e.getStartsOnNewLine(t)&&e.setStartsOnNewLine(r,!0),e.aggregateTransformFlags(r),r},e.addPrologue=function(e,t,r,n){return d(e,t,_(e,t,r),n)},e.addStandardPrologue=_,e.addCustomPrologue=d,e.findUseStrictPrologue=p,e.startsWithUseStrict=function(t){var r=e.firstOrUndefined(t);return void 0!==r&&e.isPrologueDirective(r)&&l(r)},e.ensureUseStrict=function(t){return p(t)?t:e.setTextRange(e.createNodeArray([C(e.createStatement(e.createLiteral("use strict")))].concat(t)),t)},e.parenthesizeBinaryOperand=function(t,r,n,i){return 195===e.skipPartiallyEmittedExpressions(r).kind?r:function(t,r,n,i){var a=e.getOperatorPrecedence(204,t),o=e.getOperatorAssociativity(204,t),s=e.skipPartiallyEmittedExpressions(r);if(!n&&197===r.kind&&a>4)return!0;var c=e.getExpressionPrecedence(s);switch(e.compareValues(c,a)){case-1:return!(!n&&1===o&&207===r.kind);case 1:return!1;case 0:if(n)return 1===o;if(e.isBinaryExpression(s)&&s.operatorToken.kind===t){if(function(e){return 40===e||50===e||49===e||51===e}(t))return!1;if(38===t){var u=i?f(i):0;if(e.isLiteralKind(u)&&u===f(s))return!1}}var l=e.getExpressionAssociativity(s);return 0===l}}(t,r,n,i)?e.createParen(r):r},e.parenthesizeForConditionalHead=function(t){var r=e.getOperatorPrecedence(205,56),n=e.skipPartiallyEmittedExpressions(t),i=e.getExpressionPrecedence(n);return-1===e.compareValues(i,r)?e.createParen(t):t},e.parenthesizeSubexpressionOfConditionalExpression=function(t){return b(e.skipPartiallyEmittedExpressions(t))?e.createParen(t):t},e.parenthesizeDefaultExpression=function(t){var r=e.skipPartiallyEmittedExpressions(t),n=b(r);if(!n)switch(v(r,!1).kind){case 209:case 196:n=!0}return n?e.createParen(t):t},e.parenthesizeForNew=function(t){var r=v(t,!0);switch(r.kind){case 191:return e.createParen(t);case 192:return r.arguments?t:e.createParen(t)}return m(t)},e.parenthesizeForAccess=m,e.parenthesizePostfixOperand=function(t){return e.isLeftHandSideExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizePrefixOperand=function(t){return e.isUnaryExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizeListElements=function(t){for(var r,n=0;n<t.length;n++){var i=g(t[n]);void 0===r&&i===t[n]||(void 0===r&&(r=t.slice(0,n)),r.push(i))}return void 0!==r?e.setTextRange(e.createNodeArray(r,t.hasTrailingComma),t):t},e.parenthesizeExpressionForList=g,e.parenthesizeExpressionForExpressionStatement=function(t){var r=e.skipPartiallyEmittedExpressions(t);if(e.isCallExpression(r)){var n=r.expression,i=e.skipPartiallyEmittedExpressions(n).kind;if(196===i||197===i){var a=e.getMutableClone(r);return a.expression=e.setTextRange(e.createParen(n),n),T(t,a,4)}}var o=v(r,!1).kind;return 188===o||196===o?e.setTextRange(e.createParen(t),t):t},e.parenthesizeConditionalTypeMember=y,e.parenthesizeElementTypeMember=h,e.parenthesizeArrayTypeMember=function(t){switch(t.kind){case 167:case 179:case 176:return e.createParenthesizedType(t)}return h(t)},e.parenthesizeElementTypeMembers=function(t){return e.createNodeArray(e.sameMap(t,h))},e.parenthesizeTypeParameters=function(t){if(e.some(t)){for(var r=[],n=0;n<t.length;++n){var i=t[n];r.push(0===n&&e.isFunctionOrConstructorTypeNode(i)&&i.typeParameters?e.createParenthesizedType(i):i)}return e.createNodeArray(r)}},e.parenthesizeConciseBody=function(t){return e.isBlock(t)||!b(t)&&188!==v(t,!1).kind?t:e.setTextRange(e.createParen(t),t)},e.isCommaSequence=b,function(e){e[e.Parentheses=1]="Parentheses",e[e.Assertions=2]="Assertions",e[e.PartiallyEmittedExpressions=4]="PartiallyEmittedExpressions",e[e.All=7]="All"}(e.OuterExpressionKinds||(e.OuterExpressionKinds={})),e.isOuterExpression=D,e.skipOuterExpressions=x,e.skipAssertions=S,e.recreateOuterExpressions=T,e.startOnNewLine=C,e.getExternalHelpersModuleName=E,e.getOrCreateExternalHelpersModuleNameIfNeeded=function(t,r,n,i){if(r.importHelpers&&e.isEffectiveExternalModule(t,r)){var a=E(t);if(a)return a;var o=e.getEmitModuleKind(r),s=(n||r.esModuleInterop&&i)&&o!==e.ModuleKind.System&&o!==e.ModuleKind.ES2015&&o!==e.ModuleKind.ESNext;if(!s){var c=e.getEmitHelpers(t);if(c)for(var u=0,l=c;u<l.length;u++)if(!l[u].scoped){s=!0;break}}if(s){var _=e.getOriginalNode(t,e.isSourceFile),d=e.getOrCreateEmitNode(_);return d.externalHelpersModuleName||(d.externalHelpersModuleName=e.createUniqueName(e.externalHelpersModuleNameText))}}},e.getLocalNameForExternalImport=function(t,r){var n=e.getNamespaceDeclarationNode(t);if(n&&!e.isDefaultImport(t)){var i=n.name;return e.isGeneratedIdentifier(i)?i:e.createIdentifier(e.getSourceTextOfNodeFromSourceFile(r,i)||e.idText(i))}return 249===t.kind&&t.importClause?e.getGeneratedNameForNode(t):255===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0},e.getExternalModuleNameLiteral=function(t,r,n,i,a){var o=e.getExternalModuleName(t);if(10===o.kind)return function(e,t,r,n){return k(r.getExternalModuleFileFromDeclaration(e),t,n)}(t,n,i,a)||function(t,r){var n=r.renamedDependencies&&r.renamedDependencies.get(t.text);return n&&e.createLiteral(n)}(o,r)||e.getSynthesizedClone(o)},e.tryGetModuleNameFromFile=k,e.getInitializerOfBindingOrAssignmentElement=function t(r){if(e.isDeclarationBindingElement(r))return r.initializer;if(e.isPropertyAssignment(r)){var n=r.initializer;return e.isAssignmentExpression(n,!0)?n.right:void 0}return e.isShorthandPropertyAssignment(r)?r.objectAssignmentInitializer:e.isAssignmentExpression(r,!0)?r.right:e.isSpreadElement(r)?t(r.expression):void 0},e.getTargetOfBindingOrAssignmentElement=N,e.getRestIndicatorOfBindingOrAssignmentElement=function(e){switch(e.kind){case 151:case 186:return e.dotDotDotToken;case 208:case 277:return e}},e.getPropertyNameOfBindingOrAssignmentElement=function(t){switch(t.kind){case 186:if(t.propertyName){var r=t.propertyName;return e.isComputedPropertyName(r)&&A(r.expression)?r.expression:r}break;case 275:if(t.name)return r=t.name,e.isComputedPropertyName(r)&&A(r.expression)?r.expression:r;break;case 277:return t.name}var n=N(t);if(n&&e.isPropertyName(n))return e.isComputedPropertyName(n)&&A(n.expression)?n.expression:n;e.Debug.fail("Invalid property name for binding element.")},e.getElementsOfBindingOrAssignmentPattern=function(e){switch(e.kind){case 184:case 185:case 187:return e.elements;case 188:return e.properties}},e.convertToArrayAssignmentElement=F,e.convertToObjectAssignmentElement=P,e.convertToAssignmentPattern=w,e.convertToObjectAssignmentPattern=I,e.convertToArrayAssignmentPattern=O,e.convertToAssignmentElementTarget=M}(c||(c={})),function(e){var t=e.or(e.isTypeNode,e.isTypeParameterDeclaration);function r(t,r,n,i){if(void 0===t||void 0===r)return t;e.aggregateTransformFlags(t);var a,o=r(t);return o===t?t:void 0!==o?(a=e.isArray(o)?(i||function(t){return e.Debug.assert(t.length<=1,"Too many nodes written to output."),e.singleOrUndefined(t)})(o):o,e.Debug.assertNode(a,n),e.aggregateTransformFlags(a),a):void 0}function n(t,r,n,i,a){if(void 0===t||void 0===r)return t;var o,s=t.length;(void 0===i||i<0)&&(i=0),(void 0===a||a>s-i)&&(a=s-i),(i>0||a<s)&&(o=e.createNodeArray([],t.hasTrailingComma&&i+a===s));for(var c=0;c<a;c++){var u=t[c+i];e.aggregateTransformFlags(u);var l=void 0!==u?r(u):void 0;if((void 0!==o||void 0===l||l!==u)&&(void 0===o&&(o=e.createNodeArray(t.slice(0,c),t.hasTrailingComma),e.setTextRange(o,t)),l))if(e.isArray(l))for(var _=0,d=l;_<d.length;_++){var p=d[_];e.Debug.assertNode(p,n),e.aggregateTransformFlags(p),o.push(p)}else e.Debug.assertNode(l,n),e.aggregateTransformFlags(l),o.push(l)}return o||t}function i(t,r,i,a,o){i.startLexicalEnvironment(),t=n(t,r,e.isStatement,a),o&&!e.startsWithUseStrict(t)&&(t=e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createLiteral("use strict"))].concat(t)),t));var s=i.endLexicalEnvironment();return e.setTextRange(e.createNodeArray(e.concatenate(s,t)),t)}function a(t,r,i,a){void 0===a&&(a=n),i.startLexicalEnvironment();var o=a(t,r,e.isParameterDeclaration);return i.suspendLexicalEnvironment(),o}function o(t,n,i){i.resumeLexicalEnvironment();var a=r(t,n,e.isConciseBody),o=i.endLexicalEnvironment();if(e.some(o)){var s=e.convertToFunctionBody(a),c=e.mergeLexicalEnvironment(s.statements,o);return e.updateBlock(s,c)}return a}e.visitNode=r,e.visitNodes=n,e.visitLexicalEnvironment=i,e.visitParameterList=a,e.visitFunctionBody=o,e.visitEachChild=function(s,c,u,l,_){if(void 0===l&&(l=n),void 0!==s){var d=s.kind;if(d>0&&d<=147||178===d)return s;switch(d){case 72:return e.updateIdentifier(s,l(s.typeArguments,c,t));case 148:return e.updateQualifiedName(s,r(s.left,c,e.isEntityName),r(s.right,c,e.isIdentifier));case 149:return e.updateComputedPropertyName(s,r(s.expression,c,e.isExpression));case 150:return e.updateTypeParameterDeclaration(s,r(s.name,c,e.isIdentifier),r(s.constraint,c,e.isTypeNode),r(s.default,c,e.isTypeNode));case 151:return e.updateParameter(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.dotDotDotToken,_,e.isToken),r(s.name,c,e.isBindingName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 152:return e.updateDecorator(s,r(s.expression,c,e.isExpression));case 153:return e.updatePropertySignature(s,l(s.modifiers,c,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 154:return e.updateProperty(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 155:return e.updateMethodSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken));case 156:return e.updateMethod(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 157:return e.updateConstructor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),a(s.parameters,c,u,l),o(s.body,c,u));case 158:return e.updateGetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 159:return e.updateSetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),o(s.body,c,u));case 160:return e.updateCallSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 161:return e.updateConstructSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 162:return e.updateIndexSignature(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 163:return e.updateTypePredicateNode(s,r(s.parameterName,c),r(s.type,c,e.isTypeNode));case 164:return e.updateTypeReferenceNode(s,r(s.typeName,c,e.isEntityName),l(s.typeArguments,c,e.isTypeNode));case 165:return e.updateFunctionTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 166:return e.updateConstructorTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 167:return e.updateTypeQueryNode(s,r(s.exprName,c,e.isEntityName));case 168:return e.updateTypeLiteralNode(s,l(s.members,c,e.isTypeElement));case 169:return e.updateArrayTypeNode(s,r(s.elementType,c,e.isTypeNode));case 170:return e.updateTupleTypeNode(s,l(s.elementTypes,c,e.isTypeNode));case 171:return e.updateOptionalTypeNode(s,r(s.type,c,e.isTypeNode));case 172:return e.updateRestTypeNode(s,r(s.type,c,e.isTypeNode));case 173:return e.updateUnionTypeNode(s,l(s.types,c,e.isTypeNode));case 174:return e.updateIntersectionTypeNode(s,l(s.types,c,e.isTypeNode));case 175:return e.updateConditionalTypeNode(s,r(s.checkType,c,e.isTypeNode),r(s.extendsType,c,e.isTypeNode),r(s.trueType,c,e.isTypeNode),r(s.falseType,c,e.isTypeNode));case 176:return e.updateInferTypeNode(s,r(s.typeParameter,c,e.isTypeParameterDeclaration));case 183:return e.updateImportTypeNode(s,r(s.argument,c,e.isTypeNode),r(s.qualifier,c,e.isEntityName),n(s.typeArguments,c,e.isTypeNode),s.isTypeOf);case 177:return e.updateParenthesizedType(s,r(s.type,c,e.isTypeNode));case 179:return e.updateTypeOperatorNode(s,r(s.type,c,e.isTypeNode));case 180:return e.updateIndexedAccessTypeNode(s,r(s.objectType,c,e.isTypeNode),r(s.indexType,c,e.isTypeNode));case 181:return e.updateMappedTypeNode(s,r(s.readonlyToken,_,e.isToken),r(s.typeParameter,c,e.isTypeParameterDeclaration),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode));case 182:return e.updateLiteralTypeNode(s,r(s.literal,c,e.isExpression));case 184:return e.updateObjectBindingPattern(s,l(s.elements,c,e.isBindingElement));case 185:return e.updateArrayBindingPattern(s,l(s.elements,c,e.isArrayBindingElement));case 186:return e.updateBindingElement(s,r(s.dotDotDotToken,_,e.isToken),r(s.propertyName,c,e.isPropertyName),r(s.name,c,e.isBindingName),r(s.initializer,c,e.isExpression));case 187:return e.updateArrayLiteral(s,l(s.elements,c,e.isExpression));case 188:return e.updateObjectLiteral(s,l(s.properties,c,e.isObjectLiteralElementLike));case 189:return e.updatePropertyAccess(s,r(s.expression,c,e.isExpression),r(s.name,c,e.isIdentifier));case 190:return e.updateElementAccess(s,r(s.expression,c,e.isExpression),r(s.argumentExpression,c,e.isExpression));case 191:return e.updateCall(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 192:return e.updateNew(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 193:return e.updateTaggedTemplate(s,r(s.tag,c,e.isExpression),n(s.typeArguments,c,e.isExpression),r(s.template,c,e.isTemplateLiteral));case 194:return e.updateTypeAssertion(s,r(s.type,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 195:return e.updateParen(s,r(s.expression,c,e.isExpression));case 196:return e.updateFunctionExpression(s,l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 197:return e.updateArrowFunction(s,l(s.modifiers,c,e.isModifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),r(s.equalsGreaterThanToken,c,e.isToken),o(s.body,c,u));case 198:return e.updateDelete(s,r(s.expression,c,e.isExpression));case 199:return e.updateTypeOf(s,r(s.expression,c,e.isExpression));case 200:return e.updateVoid(s,r(s.expression,c,e.isExpression));case 201:return e.updateAwait(s,r(s.expression,c,e.isExpression));case 202:return e.updatePrefix(s,r(s.operand,c,e.isExpression));case 203:return e.updatePostfix(s,r(s.operand,c,e.isExpression));case 204:return e.updateBinary(s,r(s.left,c,e.isExpression),r(s.right,c,e.isExpression),r(s.operatorToken,c,e.isToken));case 205:return e.updateConditional(s,r(s.condition,c,e.isExpression),r(s.questionToken,c,e.isToken),r(s.whenTrue,c,e.isExpression),r(s.colonToken,c,e.isToken),r(s.whenFalse,c,e.isExpression));case 206:return e.updateTemplateExpression(s,r(s.head,c,e.isTemplateHead),l(s.templateSpans,c,e.isTemplateSpan));case 207:return e.updateYield(s,r(s.asteriskToken,_,e.isToken),r(s.expression,c,e.isExpression));case 208:return e.updateSpread(s,r(s.expression,c,e.isExpression));case 209:return e.updateClassExpression(s,l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 211:return e.updateExpressionWithTypeArguments(s,l(s.typeArguments,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 212:return e.updateAsExpression(s,r(s.expression,c,e.isExpression),r(s.type,c,e.isTypeNode));case 213:return e.updateNonNullExpression(s,r(s.expression,c,e.isExpression));case 214:return e.updateMetaProperty(s,r(s.name,c,e.isIdentifier));case 216:return e.updateTemplateSpan(s,r(s.expression,c,e.isExpression),r(s.literal,c,e.isTemplateMiddleOrTemplateTail));case 218:return e.updateBlock(s,l(s.statements,c,e.isStatement));case 219:return e.updateVariableStatement(s,l(s.modifiers,c,e.isModifier),r(s.declarationList,c,e.isVariableDeclarationList));case 221:return e.updateExpressionStatement(s,r(s.expression,c,e.isExpression));case 222:return e.updateIf(s,r(s.expression,c,e.isExpression),r(s.thenStatement,c,e.isStatement,e.liftToBlock),r(s.elseStatement,c,e.isStatement,e.liftToBlock));case 223:return e.updateDo(s,r(s.statement,c,e.isStatement,e.liftToBlock),r(s.expression,c,e.isExpression));case 224:return e.updateWhile(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 225:return e.updateFor(s,r(s.initializer,c,e.isForInitializer),r(s.condition,c,e.isExpression),r(s.incrementor,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 226:return e.updateForIn(s,r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 227:return e.updateForOf(s,r(s.awaitModifier,c,e.isToken),r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 228:return e.updateContinue(s,r(s.label,c,e.isIdentifier));case 229:return e.updateBreak(s,r(s.label,c,e.isIdentifier));case 230:return e.updateReturn(s,r(s.expression,c,e.isExpression));case 231:return e.updateWith(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 232:return e.updateSwitch(s,r(s.expression,c,e.isExpression),r(s.caseBlock,c,e.isCaseBlock));case 233:return e.updateLabel(s,r(s.label,c,e.isIdentifier),r(s.statement,c,e.isStatement,e.liftToBlock));case 234:return e.updateThrow(s,r(s.expression,c,e.isExpression));case 235:return e.updateTry(s,r(s.tryBlock,c,e.isBlock),r(s.catchClause,c,e.isCatchClause),r(s.finallyBlock,c,e.isBlock));case 237:return e.updateVariableDeclaration(s,r(s.name,c,e.isBindingName),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 238:return e.updateVariableDeclarationList(s,l(s.declarations,c,e.isVariableDeclaration));case 239:return e.updateFunctionDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 240:return e.updateClassDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 241:return e.updateInterfaceDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isTypeElement));case 242:return e.updateTypeAliasDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),r(s.type,c,e.isTypeNode));case 243:return e.updateEnumDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.members,c,e.isEnumMember));case 244:return e.updateModuleDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.body,c,e.isModuleBody));case 245:return e.updateModuleBlock(s,l(s.statements,c,e.isStatement));case 246:return e.updateCaseBlock(s,l(s.clauses,c,e.isCaseOrDefaultClause));case 247:return e.updateNamespaceExportDeclaration(s,r(s.name,c,e.isIdentifier));case 248:return e.updateImportEqualsDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.moduleReference,c,e.isModuleReference));case 249:return e.updateImportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.importClause,c,e.isImportClause),r(s.moduleSpecifier,c,e.isExpression));case 250:return e.updateImportClause(s,r(s.name,c,e.isIdentifier),r(s.namedBindings,c,e.isNamedImportBindings));case 251:return e.updateNamespaceImport(s,r(s.name,c,e.isIdentifier));case 252:return e.updateNamedImports(s,l(s.elements,c,e.isImportSpecifier));case 253:return e.updateImportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 254:return e.updateExportAssignment(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.expression,c,e.isExpression));case 255:return e.updateExportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.exportClause,c,e.isNamedExports),r(s.moduleSpecifier,c,e.isExpression));case 256:return e.updateNamedExports(s,l(s.elements,c,e.isExportSpecifier));case 257:return e.updateExportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 259:return e.updateExternalModuleReference(s,r(s.expression,c,e.isExpression));case 260:return e.updateJsxElement(s,r(s.openingElement,c,e.isJsxOpeningElement),l(s.children,c,e.isJsxChild),r(s.closingElement,c,e.isJsxClosingElement));case 261:return e.updateJsxSelfClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 262:return e.updateJsxOpeningElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 263:return e.updateJsxClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression));case 264:return e.updateJsxFragment(s,r(s.openingFragment,c,e.isJsxOpeningFragment),l(s.children,c,e.isJsxChild),r(s.closingFragment,c,e.isJsxClosingFragment));case 267:return e.updateJsxAttribute(s,r(s.name,c,e.isIdentifier),r(s.initializer,c,e.isStringLiteralOrJsxExpression));case 268:return e.updateJsxAttributes(s,l(s.properties,c,e.isJsxAttributeLike));case 269:return e.updateJsxSpreadAttribute(s,r(s.expression,c,e.isExpression));case 270:return e.updateJsxExpression(s,r(s.expression,c,e.isExpression));case 271:return e.updateCaseClause(s,r(s.expression,c,e.isExpression),l(s.statements,c,e.isStatement));case 272:return e.updateDefaultClause(s,l(s.statements,c,e.isStatement));case 273:return e.updateHeritageClause(s,l(s.types,c,e.isExpressionWithTypeArguments));case 274:return e.updateCatchClause(s,r(s.variableDeclaration,c,e.isVariableDeclaration),r(s.block,c,e.isBlock));case 275:return e.updatePropertyAssignment(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 276:return e.updateShorthandPropertyAssignment(s,r(s.name,c,e.isIdentifier),r(s.objectAssignmentInitializer,c,e.isExpression));case 277:return e.updateSpreadAssignment(s,r(s.expression,c,e.isExpression));case 278:return e.updateEnumMember(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 284:return e.updateSourceFileNode(s,i(s.statements,c,u));case 313:return e.updatePartiallyEmittedExpression(s,r(s.expression,c,e.isExpression));case 314:return e.updateCommaList(s,l(s.elements,c,e.isExpression));default:return s}}}}(c||(c={})),function(e){function t(e,t,r){return e?t(r,e):r}function r(e,t,r){return e?t(r,e):r}function n(n,i,a,o){if(void 0===n)return i;var s=o?r:e.reduceLeft,c=o||a,u=n.kind;if(u>0&&u<=147)return i;if(u>=163&&u<=182)return i;var l=i;switch(n.kind){case 217:case 220:case 210:case 236:case 312:break;case 148:l=t(n.left,a,l),l=t(n.right,a,l);break;case 149:l=t(n.expression,a,l);break;case 151:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 152:l=t(n.expression,a,l);break;case 153:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.questionToken,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 154:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 156:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 157:l=s(n.modifiers,c,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 158:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 159:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 184:case 185:l=s(n.elements,c,l);break;case 186:l=t(n.propertyName,a,l),l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 187:l=s(n.elements,c,l);break;case 188:l=s(n.properties,c,l);break;case 189:l=t(n.expression,a,l),l=t(n.name,a,l);break;case 190:l=t(n.expression,a,l),l=t(n.argumentExpression,a,l);break;case 191:case 192:l=t(n.expression,a,l),l=s(n.typeArguments,c,l),l=s(n.arguments,c,l);break;case 193:l=t(n.tag,a,l),l=s(n.typeArguments,c,l),l=t(n.template,a,l);break;case 194:l=t(n.type,a,l),l=t(n.expression,a,l);break;case 196:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 197:l=s(n.modifiers,c,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 195:case 198:case 199:case 200:case 201:case 207:case 208:case 213:l=t(n.expression,a,l);break;case 202:case 203:l=t(n.operand,a,l);break;case 204:l=t(n.left,a,l),l=t(n.right,a,l);break;case 205:l=t(n.condition,a,l),l=t(n.whenTrue,a,l),l=t(n.whenFalse,a,l);break;case 206:l=t(n.head,a,l),l=s(n.templateSpans,c,l);break;case 209:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 211:l=t(n.expression,a,l),l=s(n.typeArguments,c,l);break;case 212:l=t(n.expression,a,l),l=t(n.type,a,l);break;case 216:l=t(n.expression,a,l),l=t(n.literal,a,l);break;case 218:l=s(n.statements,c,l);break;case 219:l=s(n.modifiers,c,l),l=t(n.declarationList,a,l);break;case 221:l=t(n.expression,a,l);break;case 222:l=t(n.expression,a,l),l=t(n.thenStatement,a,l),l=t(n.elseStatement,a,l);break;case 223:l=t(n.statement,a,l),l=t(n.expression,a,l);break;case 224:case 231:l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 225:l=t(n.initializer,a,l),l=t(n.condition,a,l),l=t(n.incrementor,a,l),l=t(n.statement,a,l);break;case 226:case 227:l=t(n.initializer,a,l),l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 230:case 234:l=t(n.expression,a,l);break;case 232:l=t(n.expression,a,l),l=t(n.caseBlock,a,l);break;case 233:l=t(n.label,a,l),l=t(n.statement,a,l);break;case 235:l=t(n.tryBlock,a,l),l=t(n.catchClause,a,l),l=t(n.finallyBlock,a,l);break;case 237:l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 238:l=s(n.declarations,c,l);break;case 239:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 240:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 243:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.members,c,l);break;case 244:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.body,a,l);break;case 245:l=s(n.statements,c,l);break;case 246:l=s(n.clauses,c,l);break;case 248:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.moduleReference,a,l);break;case 249:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.importClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 250:l=t(n.name,a,l),l=t(n.namedBindings,a,l);break;case 251:l=t(n.name,a,l);break;case 252:case 256:l=s(n.elements,c,l);break;case 253:case 257:l=t(n.propertyName,a,l),l=t(n.name,a,l);break;case 254:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.expression,a,l);break;case 255:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.exportClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 259:l=t(n.expression,a,l);break;case 260:l=t(n.openingElement,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingElement,a,l);break;case 264:l=t(n.openingFragment,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingFragment,a,l);break;case 261:case 262:l=t(n.tagName,a,l),l=s(n.typeArguments,a,l),l=t(n.attributes,a,l);break;case 268:l=s(n.properties,c,l);break;case 263:l=t(n.tagName,a,l);break;case 267:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 269:case 270:l=t(n.expression,a,l);break;case 271:l=t(n.expression,a,l);case 272:l=s(n.statements,c,l);break;case 273:l=s(n.types,c,l);break;case 274:l=t(n.variableDeclaration,a,l),l=t(n.block,a,l);break;case 275:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 276:l=t(n.name,a,l),l=t(n.objectAssignmentInitializer,a,l);break;case 277:l=t(n.expression,a,l);break;case 278:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 284:l=s(n.statements,c,l);break;case 313:l=t(n.expression,a,l);break;case 314:l=s(n.elements,c,l)}return l}function i(t){if(void 0===t)return 0;if(536870912&t.transformFlags)return t.transformFlags&~e.getTransformFlagsSubtreeExclusions(t.kind);var r=function(t){if(e.hasModifier(t,2)||e.isTypeNode(t)&&211!==t.kind)return 0;return n(t,0,a,o)}(t);return e.computeTransformFlagsForNode(t,r)}function a(e,t){return e|i(t)}function o(e,t){return e|function(e){if(void 0===e)return 0;for(var t=0,r=0,n=0,a=e;n<a.length;n++){var o=a[n];t|=i(o),r|=-536870913&o.transformFlags}return e.transformFlags=536870912|r,t}(t)}var s;e.reduceEachChild=n,e.mergeLexicalEnvironment=function(t,r){return e.some(r)?e.isNodeArray(t)?e.setTextRange(e.createNodeArray(e.insertStatementsAfterStandardPrologue(t.slice(),r)),t):e.insertStatementsAfterStandardPrologue(t,r):t},e.liftToBlock=function(t){return s.assert(e.every(t,e.isStatement),"Cannot lift nodes to a Block."),e.singleOrUndefined(t)||e.createBlock(t)},e.aggregateTransformFlags=function(e){return i(e),e},function(t){var r=!1;t.failBadSyntaxKind=function r(n,i){return t.fail((i||"Unexpected node.")+"\r\nNode "+e.formatSyntaxKind(n.kind)+" was unexpected.",r)},t.assertEachNode=t.shouldAssert(1)?function(r,n,i){return t.assert(void 0===n||e.every(r,n),i||"Unexpected node.",function(){return"Node array did not pass test '"+t.getFunctionName(n)+"'."},t.assertEachNode)}:e.noop,t.assertNode=t.shouldAssert(1)?function(r,n,i){return t.assert(void 0===n||n(r),i||"Unexpected node.",function(){return"Node "+e.formatSyntaxKind(r.kind)+" did not pass test '"+t.getFunctionName(n)+"'."},t.assertNode)}:e.noop,t.assertOptionalNode=t.shouldAssert(1)?function(r,n,i){return t.assert(void 0===n||void 0===r||n(r),i||"Unexpected node.",function(){return"Node "+e.formatSyntaxKind(r.kind)+" did not pass test '"+t.getFunctionName(n)+"'."},t.assertOptionalNode)}:e.noop,t.assertOptionalToken=t.shouldAssert(1)?function(r,n,i){return t.assert(void 0===n||void 0===r||r.kind===n,i||"Unexpected node.",function(){return"Node "+e.formatSyntaxKind(r.kind)+" was not a '"+e.formatSyntaxKind(n)+"' token."},t.assertOptionalToken)}:e.noop,t.assertMissingNode=t.shouldAssert(1)?function(r,n){return t.assert(void 0===r,n||"Unexpected node.",function(){return"Node "+e.formatSyntaxKind(r.kind)+" was unexpected'."},t.assertMissingNode)}:e.noop,t.enableDebugInfo=function(){if(!r){Object.defineProperties(e.objectAllocator.getSymbolConstructor().prototype,{__debugFlags:{get:function(){return e.formatSymbolFlags(this.flags)}}}),Object.defineProperties(e.objectAllocator.getTypeConstructor().prototype,{__debugFlags:{get:function(){return e.formatTypeFlags(this.flags)}},__debugObjectFlags:{get:function(){return 524288&this.flags?e.formatObjectFlags(this.objectFlags):""}},__debugTypeToString:{value:function(){return this.checker.typeToString(this)}}});for(var t=0,n=[e.objectAllocator.getNodeConstructor(),e.objectAllocator.getIdentifierConstructor(),e.objectAllocator.getTokenConstructor(),e.objectAllocator.getSourceFileConstructor()];t<n.length;t++){var i=n[t];i.prototype.hasOwnProperty("__debugKind")||Object.defineProperties(i.prototype,{__debugKind:{get:function(){return e.formatSyntaxKind(this.kind)}},__debugModifierFlags:{get:function(){return e.formatModifierFlags(e.getModifierFlagsNoCache(this))}},__debugTransformFlags:{get:function(){return e.formatTransformFlags(this.transformFlags)}},__debugEmitFlags:{get:function(){return e.formatEmitFlags(e.getEmitFlags(this))}},__debugGetText:{value:function(t){if(e.nodeIsSynthesized(this))return"";var r=e.getParseTreeNode(this),n=r&&e.getSourceFileOfNode(r);return n?e.getSourceTextOfNodeFromSourceFile(n,r,t):""}}})}r=!0}}}(s=e.Debug||(e.Debug={}))}(c||(c={})),function(e){e.createSourceMapGenerator=function(t,r,n,i,o){var c,u,l=o.extendedDiagnostics?e.performance.createTimer("Source Map","beforeSourcemap","afterSourcemap"):e.performance.nullTimer,_=l.enter,d=l.exit,p=[],f=[],m=e.createMap(),g=[],y="",h=0,v=0,b=0,D=0,x=0,S=0,T=!1,C=0,E=0,k=0,N=0,A=0,F=0,P=!1,w=!1,I=!1;return{getSources:function(){return p},addSource:O,setSourceContent:M,addName:L,addMapping:R,appendSourceMap:function(t,r,n,i,o,s){var c;e.Debug.assert(t>=C,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),_();for(var u,l=[],p=a(n.mappings),f=p.next(),m=f.value,g=f.done;!(g||s&&(m.generatedLine>s.line||m.generatedLine===s.line&&m.generatedCharacter>s.character));c=p.next(),m=c.value,g=c.done,c)if(!o||!(m.generatedLine<o.line||o.line===m.generatedLine&&m.generatedCharacter<o.character)){var y=void 0,h=void 0,v=void 0,b=void 0;if(void 0!==m.sourceIndex){if(void 0===(y=l[m.sourceIndex])){var D=n.sources[m.sourceIndex],x=n.sourceRoot?e.combinePaths(n.sourceRoot,D):D,S=e.combinePaths(e.getDirectoryPath(i),x);l[m.sourceIndex]=y=O(S),n.sourcesContent&&"string"==typeof n.sourcesContent[m.sourceIndex]&&M(y,n.sourcesContent[m.sourceIndex])}h=m.sourceLine,v=m.sourceCharacter,n.names&&void 0!==m.nameIndex&&(u||(u=[]),void 0===(b=u[m.nameIndex])&&(u[m.nameIndex]=b=L(n.names[m.nameIndex])))}var T=m.generatedLine-(o?o.line:0),E=T+t,k=o&&o.line===m.generatedLine?m.generatedCharacter-o.character:m.generatedCharacter,N=0===T?k+r:k;R(E,N,y,h,v,b)}d()},toJSON:j,toString:function(){return JSON.stringify(j())}};function O(r){_();var n=e.getRelativePathToDirectoryOrUrl(i,r,t.getCurrentDirectory(),t.getCanonicalFileName,!0),a=m.get(n);return void 0===a&&(a=f.length,f.push(n),p.push(r),m.set(n,a)),d(),a}function M(e,t){if(_(),null!==t){for(c||(c=[]);c.length<e;)c.push(null);c[e]=t}d()}function L(t){_(),u||(u=e.createMap());var r=u.get(t);return void 0===r&&(r=g.length,g.push(t),u.set(t,r)),d(),r}function R(t,r,n,i,a,o){e.Debug.assert(t>=C,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),e.Debug.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),e.Debug.assert(void 0===i||i>=0,"sourceLine cannot be negative"),e.Debug.assert(void 0===a||a>=0,"sourceCharacter cannot be negative"),_(),(function(e,t){return!P||C!==e||E!==t}(t,r)||function(e,t,r){return void 0!==e&&void 0!==t&&void 0!==r&&k===e&&(N>t||N===t&&A>r)}(n,i,a))&&(B(),C=t,E=r,w=!1,I=!1,P=!0),void 0!==n&&void 0!==i&&void 0!==a&&(k=n,N=i,A=a,w=!0,void 0!==o&&(F=o,I=!0)),d()}function B(){if(P&&(!T||h!==C||v!==E||b!==k||D!==N||x!==A||S!==F)){if(_(),h<C)do{y+=";",h++,v=0}while(h<C);else e.Debug.assertEqual(h,C,"generatedLine cannot backtrack"),T&&(y+=",");y+=s(E-v),v=E,w&&(y+=s(k-b),b=k,y+=s(N-D),D=N,y+=s(A-x),x=A,I&&(y+=s(F-S),S=F)),T=!0,d()}}function j(){return B(),{version:3,file:r,sourceRoot:n,sources:f,names:g,mappings:y,sourcesContent:c}}};var t=/^\/\/[@#] source[M]appingURL=(.+)\s*$/,r=/^\s*(\/\/[@#] .*)?$/;function n(e){return"string"==typeof e||null===e}function i(t){return null!==t&&"object"===f(t)&&3===t.version&&"string"==typeof t.file&&"string"==typeof t.mappings&&e.isArray(t.sources)&&e.every(t.sources,e.isString)&&(void 0===t.sourceRoot||null===t.sourceRoot||"string"==typeof t.sourceRoot)&&(void 0===t.sourcesContent||null===t.sourcesContent||e.isArray(t.sourcesContent)&&e.every(t.sourcesContent,n))&&(void 0===t.names||null===t.names||e.isArray(t.names)&&e.every(t.names,e.isString))}function a(e){var t,r=!1,n=0,i=0,a=0,o=0,s=0,c=0,u=0;return{get pos(){return n},get error(){return t},get state(){return l(!0,!0)},next:function(){for(;!r&&n<e.length;){var t=e.charCodeAt(n);if(59!==t){if(44!==t){var d=!1,y=!1;if(a+=g(),f())return _();if(a<0)return p("Invalid generatedCharacter found");if(!m()){if(d=!0,o+=g(),f())return _();if(o<0)return p("Invalid sourceIndex found");if(m())return p("Unsupported Format: No entries after sourceIndex");if(s+=g(),f())return _();if(s<0)return p("Invalid sourceLine found");if(m())return p("Unsupported Format: No entries after sourceLine");if(c+=g(),f())return _();if(c<0)return p("Invalid sourceCharacter found");if(!m()){if(y=!0,u+=g(),f())return _();if(u<0)return p("Invalid nameIndex found");if(!m())return p("Unsupported Error Format: Entries after nameIndex")}}return{value:l(d,y),done:r}}n++}else i++,a=0,n++}return _()}};function l(e,t){return{generatedLine:i,generatedCharacter:a,sourceIndex:e?o:void 0,sourceLine:e?s:void 0,sourceCharacter:e?c:void 0,nameIndex:t?u:void 0}}function _(){return r=!0,{value:void 0,done:!0}}function d(e){void 0===t&&(t=e)}function p(e){return d(e),_()}function f(){return void 0!==t}function m(){return n===e.length||44===e.charCodeAt(n)||59===e.charCodeAt(n)}function g(){for(var t,r=!0,i=0,a=0;r;n++){if(n>=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;var o=(t=e.charCodeAt(n))>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:43===t?62:47===t?63:-1;if(-1===o)return d("Invalid character in VLQ"),-1;r=0!=(32&o),a|=(31&o)<<i,i+=5}return 0==(1&a)?a>>=1:a=-(a>>=1),a}}function o(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function s(t){t<0?t=1+(-t<<1):t<<=1;var r,n="";do{var i=31&t;(t>>=5)>0&&(i|=32),n+=String.fromCharCode((r=i)>=0&&r<26?65+r:r>=26&&r<52?97+r-26:r>=52&&r<62?48+r-52:62===r?43:63===r?47:e.Debug.fail(r+": not a base64 value"))}while(t>0);return n}function c(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function u(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function l(t,r){return e.Debug.assert(t.sourceIndex===r.sourceIndex),e.compareValues(t.sourcePosition,r.sourcePosition)}function _(t,r){return e.compareValues(t.generatedPosition,r.generatedPosition)}function d(e){return e.sourcePosition}function p(e){return e.generatedPosition}e.getLineInfo=function(e,t){return{getLineCount:function(){return t.length},getLineText:function(r){return e.substring(t[r],t[r+1])}}},e.tryGetSourceMappingURL=function(e){for(var n=e.getLineCount()-1;n>=0;n--){var i=e.getLineText(n),a=t.exec(i);if(a)return a[1];if(!i.match(r))break}},e.isRawSourceMap=i,e.tryParseRawSourceMap=function(e){try{var t=JSON.parse(e);if(i(t))return t}catch(e){}},e.decodeMappings=a,e.sameMapping=function(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex},e.isSourceMapping=o,e.createDocumentPositionMapper=function(t,r,n){var i,s,f,m=e.getDirectoryPath(n),g=r.sourceRoot?e.getNormalizedAbsolutePath(r.sourceRoot,m):m,y=e.getNormalizedAbsolutePath(r.file,m),h=t.getSourceFileLike(y),v=r.sources.map(function(t){return e.getNormalizedAbsolutePath(t,g)}),b=e.createMapFromEntries(v.map(function(e,r){return[t.getCanonicalFileName(e),r]}));return{getSourcePosition:function(t){var r=T();if(!e.some(r))return t;var n=e.binarySearchKey(r,t.pos,p,e.compareValues);n<0&&(n=~n);var i=r[n];return void 0!==i&&c(i)?{fileName:v[i.sourceIndex],pos:i.sourcePosition}:t},getGeneratedPosition:function(r){var n=b.get(t.getCanonicalFileName(r.fileName));if(void 0===n)return r;var i=S(n);if(!e.some(i))return r;var a=e.binarySearchKey(i,r.pos,d,e.compareValues);a<0&&(a=~a);var o=i[a];return void 0===o||o.sourceIndex!==n?r:{fileName:y,pos:o.generatedPosition}}};function D(n){var i,a,s=void 0!==h?e.getPositionOfLineAndCharacter(h,n.generatedLine,n.generatedCharacter,!0):-1;if(o(n)){var c=t.getSourceFileLike(v[n.sourceIndex]);i=r.sources[n.sourceIndex],a=void 0!==c?e.getPositionOfLineAndCharacter(c,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:s,source:i,sourceIndex:n.sourceIndex,sourcePosition:a,nameIndex:n.nameIndex}}function x(){if(void 0===i){var n=a(r.mappings),o=e.arrayFrom(n,D);void 0!==n.error?(t.log&&t.log("Encountered error while decoding sourcemap: "+n.error),i=e.emptyArray):i=o}return i}function S(t){if(void 0===f){for(var r=[],n=0,i=x();n<i.length;n++){var a=i[n];if(c(a)){var o=r[a.sourceIndex];o||(r[a.sourceIndex]=o=[]),o.push(a)}}f=r.map(function(t){return e.sortAndDeduplicate(t,l,u)})}return f[t]}function T(){if(void 0===s){for(var t=[],r=0,n=x();r<n.length;r++){var i=n[r];t.push(i)}s=e.sortAndDeduplicate(t,_,u)}return s}},e.identitySourceMapConsumer={getSourcePosition:e.identity,getGeneratedPosition:e.identity}}(c||(c={})),function(e){function t(t){return(t=e.getOriginalNode(t))?e.getNodeId(t):0}function r(e){return void 0!==e.propertyName&&"default"===e.propertyName.escapedText}function n(t){if(e.getNamespaceDeclarationNode(t))return!0;var n=t.importClause&&t.importClause.namedBindings;if(!n)return!1;if(!e.isNamedImports(n))return!1;for(var i=0,a=0,o=n.elements;a<o.length;a++){r(o[a])&&i++}return i>0&&i!==n.elements.length||!!(n.elements.length-i)&&e.isDefaultImport(t)}function i(t){return!n(t)&&(e.isDefaultImport(t)||!!t.importClause&&e.isNamedImports(t.importClause.namedBindings)&&function(t){return!!t&&!!e.isNamedImports(t)&&e.some(t.elements,r)}(t.importClause.namedBindings))}function a(t,r,n){if(e.isBindingPattern(t.name))for(var i=0,o=t.name.elements;i<o.length;i++){var s=o[i];e.isOmittedExpression(s)||(n=a(s,r,n))}else if(!e.isGeneratedIdentifier(t.name)){var c=e.idText(t.name);r.get(c)||(r.set(c,!0),n=e.append(n,t.name))}return n}function o(e,t,r){var n=e[t];return n?n.push(r):e[t]=n=[r],n}e.getOriginalNodeId=t,e.chainBundle=function(t){return function(r){return 284===r.kind?t(r):function(r){return e.createBundle(e.map(r.sourceFiles,t),r.prepends)}(r)}},e.getImportNeedsImportStarHelper=n,e.getImportNeedsImportDefaultHelper=i,e.collectExternalModuleInfo=function(r,s,c){for(var u,l,_=[],d=e.createMultiMap(),p=[],f=e.createMap(),m=!1,g=!1,y=!1,h=0,v=r.statements;h<v.length;h++){var b=v[h];switch(b.kind){case 249:_.push(b),y=y||n(b)||i(b);break;case 248:259===b.moduleReference.kind&&_.push(b);break;case 255:if(b.moduleSpecifier)b.exportClause?_.push(b):(_.push(b),g=!0);else for(var D=0,x=b.exportClause.elements;D<x.length;D++){var S=x[D];if(!f.get(e.idText(S.name))){var T=S.propertyName||S.name;d.add(e.idText(T),S),(k=s.getReferencedImportDeclaration(T)||s.getReferencedValueDeclaration(T))&&o(p,t(k),S.name),f.set(e.idText(S.name),!0),u=e.append(u,S.name)}}break;case 254:b.isExportEquals&&!l&&(l=b);break;case 219:if(e.hasModifier(b,1))for(var C=0,E=b.declarationList.declarations;C<E.length;C++){var k;u=a(k=E[C],f,u)}break;case 239:e.hasModifier(b,1)&&(e.hasModifier(b,512)?m||(o(p,t(b),e.getDeclarationName(b)),m=!0):(T=b.name,f.get(e.idText(T))||(o(p,t(b),T),f.set(e.idText(T),!0),u=e.append(u,T))));break;case 240:e.hasModifier(b,1)&&(e.hasModifier(b,512)?m||(o(p,t(b),e.getDeclarationName(b)),m=!0):(T=b.name)&&!f.get(e.idText(T))&&(o(p,t(b),T),f.set(e.idText(T),!0),u=e.append(u,T)))}}var N=e.getOrCreateExternalHelpersModuleNameIfNeeded(r,c,g,y),A=N&&e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(N)),e.createLiteral(e.externalHelpersModuleNameText));return A&&(e.addEmitFlags(A,67108864),_.unshift(A)),{externalImports:_,exportSpecifiers:d,exportEquals:l,hasExportStarsToExportValues:g,exportedBindings:p,exportedNames:u,externalHelpersImportDeclaration:A}},e.isSimpleCopiableExpression=function(t){return e.isStringLiteralLike(t)||8===t.kind||e.isKeyword(t.kind)||e.isIdentifier(t)},e.helperString=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(r){for(var n="",i=0;i<t.length;i++)n+=e[i],n+=r(t[i]);return n+=e[e.length-1]}}}(c||(c={})),function(e){function t(r,n){var i=e.getTargetOfBindingOrAssignmentElement(r);return e.isBindingOrAssignmentPattern(i)?function(r,n){for(var i=0,a=e.getElementsOfBindingOrAssignmentPattern(r);i<a.length;i++){var o=a[i];if(t(o,n))return!0}return!1}(i,n):!!e.isIdentifier(i)&&i.escapedText===n}function r(t,a,o,s,c){if(!c){var u=e.visitNode(e.getInitializerOfBindingOrAssignmentElement(a),t.visitor,e.isExpression);u?o=o?function(t,r,n,a){return r=i(t,r,!0,a),e.createConditional(e.createTypeCheck(r,"undefined"),n,r)}(t,o,u,s):u:o||(o=e.createVoidZero())}var l=e.getTargetOfBindingOrAssignmentElement(a);e.isObjectBindingOrAssignmentPattern(l)?function(t,a,o,s,c){var u,l,d=e.getElementsOfBindingOrAssignmentPattern(o),p=d.length;if(1!==p){var f=!e.isDeclarationBindingElement(a)||0!==p;s=i(t,s,f,c)}for(var m=0;m<p;m++){var g=d[m];if(e.getRestIndicatorOfBindingOrAssignmentElement(g)){if(m===p-1){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var y=_(t.context,s,d,l,o);r(t,g,y,g)}}else{var h=e.getPropertyNameOfBindingOrAssignmentElement(g);if(!(t.level>=1)||12288&g.transformFlags||12288&e.getTargetOfBindingOrAssignmentElement(g).transformFlags||e.isComputedPropertyName(h)){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var y=n(t,s,h);e.isComputedPropertyName(h)&&(l=e.append(l,y.argumentExpression)),r(t,g,y,g)}else u=e.append(u,g)}}u&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o)}(t,a,l,o,s):e.isArrayBindingOrAssignmentPattern(l)?function(t,n,a,o,s){var c,u,l=e.getElementsOfBindingOrAssignmentPattern(a),_=l.length;if(t.level<1&&t.downlevelIteration)o=i(t,e.createReadHelper(t.context,o,_>0&&e.getRestIndicatorOfBindingOrAssignmentElement(l[_-1])?void 0:_,s),!1,s);else if(1!==_&&(t.level<1||0===_)||e.every(l,e.isOmittedExpression)){var d=!e.isDeclarationBindingElement(n)||0!==_;o=i(t,o,d,s)}for(var p=0;p<_;p++){var f=l[p];if(t.level>=1)if(8192&f.transformFlags){var m=e.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(m),u=e.append(u,[m,f]),c=e.append(c,t.createArrayBindingOrAssignmentElement(m))}else c=e.append(c,f);else{if(e.isOmittedExpression(f))continue;if(e.getRestIndicatorOfBindingOrAssignmentElement(f)){if(p===_-1){var g=e.createArraySlice(o,p);r(t,f,g,f)}}else{var g=e.createElementAccess(o,p);r(t,f,g,f)}}}c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),o,s,a);if(u)for(var y=0,h=u;y<h.length;y++){var v=h[y],b=v[0],f=v[1];r(t,f,b,f)}}(t,a,l,o,s):t.emitBindingOrAssignment(l,o,s,a)}function n(t,r,n){if(e.isComputedPropertyName(n)){var a=i(t,e.visitNode(n.expression,t.visitor),!1,n);return e.createElementAccess(r,a)}if(e.isStringOrNumericLiteralLike(n))return(a=e.getSynthesizedClone(n)).text=a.text,e.createElementAccess(r,a);var o=e.createIdentifier(e.idText(n));return e.createPropertyAccess(r,o)}function i(t,r,n,i){if(e.isIdentifier(r)&&n)return r;var a=e.createTempVariable(void 0);return t.hoistTempVariables?(t.context.hoistVariableDeclaration(a),t.emitExpression(e.setTextRange(e.createAssignment(a,r),i))):t.emitBindingOrAssignment(a,r,i,void 0),a}function a(t){return e.Debug.assertEachNode(t,e.isArrayBindingElement),e.createArrayBindingPattern(t)}function o(t){return e.createArrayLiteral(e.map(t,e.convertToArrayAssignmentElement))}function s(t){return e.Debug.assertEachNode(t,e.isBindingElement),e.createObjectBindingPattern(t)}function c(t){return e.createObjectLiteral(e.map(t,e.convertToObjectAssignmentElement))}function u(t){return e.createBindingElement(void 0,void 0,t)}function l(e){return e}function _(t,r,n,i,a){t.requestEmitHelper(e.restHelper);for(var o=[],s=0,c=0;c<n.length-1;c++){var u=e.getPropertyNameOfBindingOrAssignmentElement(n[c]);if(u)if(e.isComputedPropertyName(u)){var l=i[s];s++,o.push(e.createConditional(e.createTypeCheck(l,"symbol"),l,e.createAdd(l,e.createLiteral(""))))}else o.push(e.createLiteral(u))}return e.createCall(e.getHelperName("__rest"),void 0,[r,e.setTextRange(e.createArrayLiteral(o),a)])}!function(e){e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest"}(e.FlattenLevel||(e.FlattenLevel={})),e.flattenDestructuringAssignment=function(n,a,s,u,_,d){var p,f,m=n;if(e.isDestructuringAssignment(n))for(p=n.right;e.isEmptyArrayLiteral(n.left)||e.isEmptyObjectLiteral(n.left);){if(!e.isDestructuringAssignment(p))return e.visitNode(p,a,e.isExpression);m=n=p,p=n.right}var g={context:s,level:u,downlevelIteration:!!s.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:y,emitBindingOrAssignment:function(t,r,n,i){e.Debug.assertNode(t,d?e.isIdentifier:e.isExpression);var o=d?d(t,r,n):e.setTextRange(e.createAssignment(e.visitNode(t,a,e.isExpression),r),n);o.original=i,y(o)},createArrayBindingOrAssignmentPattern:o,createObjectBindingOrAssignmentPattern:c,createArrayBindingOrAssignmentElement:l,visitor:a};if(p&&(p=e.visitNode(p,a,e.isExpression),e.isIdentifier(p)&&t(n,p.escapedText)?p=i(g,p,!1,m):_?p=i(g,p,!0,m):e.nodeIsSynthesized(n)&&(m=p)),r(g,n,p,m,e.isDestructuringAssignment(n)),p&&_){if(!e.some(f))return p;f.push(p)}return e.aggregateTransformFlags(e.inlineExpressions(f))||e.createOmittedExpression();function y(t){e.setEmitFlags(t,64),e.aggregateTransformFlags(t),f=e.append(f,t)}},e.flattenDestructuringBinding=function(n,o,c,l,_,d,p){var f;void 0===d&&(d=!1);var m=[],g=[],y={context:c,level:l,downlevelIteration:!!c.getCompilerOptions().downlevelIteration,hoistTempVariables:d,emitExpression:function(t){f=e.append(f,t)},emitBindingOrAssignment:F,createArrayBindingOrAssignmentPattern:a,createObjectBindingOrAssignmentPattern:s,createArrayBindingOrAssignmentElement:u,visitor:o};if(e.isVariableDeclaration(n)){var h=e.getInitializerOfBindingOrAssignmentElement(n);h&&e.isIdentifier(h)&&t(n,h.escapedText)&&(h=i(y,h,!1,h),n=e.updateVariableDeclaration(n,n.name,n.type,h))}if(r(y,n,_,n,p),f){var v=e.createTempVariable(void 0);if(d){var b=e.inlineExpressions(f);f=void 0,F(v,b,void 0,void 0)}else{c.hoistVariableDeclaration(v);var D=e.last(m);D.pendingExpressions=e.append(D.pendingExpressions,e.createAssignment(v,D.value)),e.addRange(D.pendingExpressions,f),D.value=v}}for(var x=0,S=m;x<S.length;x++){var T=S[x],C=T.pendingExpressions,E=T.name,k=(b=T.value,T.location),N=T.original,A=e.createVariableDeclaration(E,void 0,C?e.inlineExpressions(e.append(C,b)):b);A.original=N,e.setTextRange(A,k),e.isIdentifier(E)&&e.setEmitFlags(A,64),e.aggregateTransformFlags(A),g.push(A)}return g;function F(t,r,n,i){e.Debug.assertNode(t,e.isBindingName),f&&(r=e.inlineExpressions(e.append(f,r)),f=void 0),m.push({pendingExpressions:f,name:t,value:r,location:n,original:i})}},e.restHelper={name:"typescript:rest",scoped:!1,text:'\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n };'}}(c||(c={})),function(e){var t,r,n=!1;function i(t,r,n,i,a,o){var s=[];return s.push(e.createArrayLiteral(r,!0)),s.push(n),i&&(s.push(i),a&&s.push(a)),t.requestEmitHelper(e.decorateHelper),e.setTextRange(e.createCall(e.getHelperName("__decorate"),void 0,s),o)}function a(t,r,n){return t.requestEmitHelper(e.metadataHelper),e.createCall(e.getHelperName("__metadata"),void 0,[e.createLiteral(r),n])}function o(t,r,n,i){return t.requestEmitHelper(e.paramHelper),e.setTextRange(e.createCall(e.getHelperName("__param"),void 0,[e.createLiteral(n),r]),i)}!function(e){e[e.ClassAliases=1]="ClassAliases",e[e.NamespaceExports=2]="NamespaceExports",e[e.NonQualifiedEnumMembers=8]="NonQualifiedEnumMembers"}(t||(t={})),function(e){e[e.None=0]="None",e[e.HasStaticInitializedProperties=1]="HasStaticInitializedProperties",e[e.HasConstructorDecorators=2]="HasConstructorDecorators",e[e.HasMemberDecorators=4]="HasMemberDecorators",e[e.IsExportOfNamespace=8]="IsExportOfNamespace",e[e.IsNamedExternalExport=16]="IsNamedExternalExport",e[e.IsDefaultExternalExport=32]="IsDefaultExternalExport",e[e.IsDerivedClass=64]="IsDerivedClass",e[e.UseImmediatelyInvokedFunctionExpression=128]="UseImmediatelyInvokedFunctionExpression",e[e.HasAnyDecorators=6]="HasAnyDecorators",e[e.NeedsName=5]="NeedsName",e[e.MayNeedImmediatelyInvokedFunctionExpression=7]="MayNeedImmediatelyInvokedFunctionExpression",e[e.IsExported=56]="IsExported"}(r||(r={})),e.transformTypeScript=function(t){var r,s,c,u,l,_,d,p,f,m,g=t.startLexicalEnvironment,y=t.resumeLexicalEnvironment,h=t.endLexicalEnvironment,v=t.hoistVariableDeclaration,b=t.getEmitResolver(),D=t.getCompilerOptions(),x=e.getStrictOptionValue(D,"strictNullChecks"),S=e.getEmitScriptTarget(D),T=e.getEmitModuleKind(D),C=t.onEmitNode,E=t.onSubstituteNode;return t.onEmitNode=function(t,n,i){var a=f,o=r;e.isSourceFile(n)&&(r=n),2&d&&function(t){return 244===e.getOriginalNode(t).kind}(n)&&(f|=2),8&d&&function(t){return 243===e.getOriginalNode(t).kind}(n)&&(f|=8),C(t,n,i),f=a,r=o},t.onSubstituteNode=function(t,r){return r=E(t,r),1===t?function(t){switch(t.kind){case 72:return function(t){return function(t){if(1&d&&33554432&b.getNodeCheckFlags(t)){var r=b.getReferencedValueDeclaration(t);if(r){var n=p[r.id];if(n){var i=e.getSynthesizedClone(n);return e.setSourceMapRange(i,t),e.setCommentRange(i,t),i}}}}(t)||Ge(t)||t}(t);case 189:case 190:return function(e){return Ye(e)}(t)}return t}(r):e.isShorthandPropertyAssignment(r)?function(t){if(2&d){var r=t.name,n=Ge(r);if(n){if(t.objectAssignmentInitializer){var i=e.createAssignment(n,t.objectAssignmentInitializer);return e.setTextRange(e.createPropertyAssignment(r,i),t)}return e.setTextRange(e.createPropertyAssignment(r,n),t)}}return t}(r):r},t.enableSubstitution(189),t.enableSubstitution(190),function(t){return 285===t.kind?function(t){return e.createBundle(t.sourceFiles.map(k),e.mapDefined(t.prepends,function(t){return 287===t.kind?e.createUnparsedSourceFile(t,"js"):t}))}(t):k(t)};function k(n){if(n.isDeclarationFile)return n;r=n;var i=N(n,j);return e.addEmitHelpers(i,t.readEmitHelpers()),r=void 0,i}function N(t,r){var n=u,i=l,a=_;!function(t){switch(t.kind){case 284:case 246:case 245:case 218:u=t,l=void 0,_=void 0;break;case 240:case 239:if(e.hasModifier(t,2))break;t.name?Ne(t):e.Debug.assert(240===t.kind||e.hasModifier(t,512)),e.isClassDeclaration(t)&&(l=t)}}(t);var o=r(t);return u!==n&&(_=a),u=n,l=i,o}function A(e){return N(e,F)}function F(e){return 1&e.transformFlags?B(e):e}function P(e){return N(e,w)}function w(r){switch(r.kind){case 249:case 248:case 254:case 255:return function(r){if(e.getParseTreeNode(r)!==r)return 1&r.transformFlags?e.visitEachChild(r,A,t):r;switch(r.kind){case 249:return function(t){if(!t.importClause)return t;var r=e.visitNode(t.importClause,we,e.isImportClause);return r?e.updateImportDeclaration(t,void 0,void 0,r,t.moduleSpecifier):void 0}(r);case 248:return Re(r);case 254:return function(r){return b.isValueAliasDeclaration(r)?e.visitEachChild(r,A,t):void 0}(r);case 255:return function(t){if(!t.exportClause)return D.isolatedModules||b.moduleExportsSomeValue(t.moduleSpecifier)?t:void 0;if(b.isValueAliasDeclaration(t)){var r=e.visitNode(t.exportClause,Me,e.isNamedExports);return r?e.updateExportDeclaration(t,void 0,void 0,r,t.moduleSpecifier):void 0}}(r);default:e.Debug.fail("Unhandled ellided statement")}}(r);default:return F(r)}}function I(e){return N(e,O)}function O(t){if(255!==t.kind&&249!==t.kind&&250!==t.kind&&(248!==t.kind||259!==t.moduleReference.kind))return 1&t.transformFlags||e.hasModifier(t,1)?B(t):t}function M(e){return N(e,L)}function L(t){switch(t.kind){case 157:return;case 154:case 162:case 158:case 159:case 156:return F(t);case 217:return t;default:return e.Debug.failBadSyntaxKind(t)}}function R(t){if(!(2270&e.modifierToFlag(t.kind)||s&&85===t.kind))return t}function B(n){if(e.isStatement(n)&&e.hasModifier(n,2))return e.createNotEmittedStatement(n);switch(n.kind){case 85:case 80:return s?void 0:n;case 115:case 113:case 114:case 118:case 77:case 125:case 133:case 169:case 170:case 171:case 172:case 168:case 163:case 150:case 120:case 143:case 123:case 138:case 135:case 132:case 106:case 139:case 166:case 165:case 167:case 164:case 173:case 174:case 175:case 177:case 178:case 179:case 180:case 181:case 182:case 162:case 152:case 242:return;case 154:return function(t){var r=De(t.name,e.some(t.decorators)||!!t.initializer,!0);r&&!ve(r)&&(m||(m=[])).push(r)}(n);case 247:return;case 157:return function(r){if(Se(r))return e.updateConstructor(r,e.visitNodes(r.decorators,A,e.isDecorator),e.visitNodes(r.modifiers,A,e.isModifier),e.visitParameterList(r.parameters,A,t),e.visitFunctionBody(r.body,A,t))}(n);case 241:return e.createNotEmittedStatement(n);case 240:return function(n){if(!(K(n)||s&&e.hasModifier(n,1)))return e.visitEachChild(n,A,t);var a=m;m=void 0;var o=W(n,!0),c=function(t,r){var n=0;e.some(r)&&(n|=1);var i=e.getEffectiveBaseTypeNode(t);return i&&96!==e.skipOuterExpressions(i.expression).kind&&(n|=64),function(t){if(t.decorators&&t.decorators.length>0)return!0;var r=e.getFirstConstructorWithBody(t);return!!r&&e.forEach(r.parameters,J)}(t)&&(n|=2),e.childIsDecorated(t)&&(n|=4),Be(t)?n|=8:function(t){return je(t)&&e.hasModifier(t,512)}(t)?n|=32:Je(t)&&(n|=16),S<=1&&7&n&&(n|=128),n}(n,o);128&c&&t.startLexicalEnvironment();var u=n.name||(5&c?e.getGeneratedNameForNode(n):void 0),l=2&c?function(t,r,n){var i=e.moveRangePastDecorators(t),a=function(t){if(16777216&b.getNodeCheckFlags(t)){He();var r=e.createUniqueName(t.name&&!e.isGeneratedIdentifier(t.name)?e.idText(t.name):"default");return p[e.getOriginalNodeId(t)]=r,v(r),r}}(t),o=e.getLocalName(t,!1,!0),s=e.visitNodes(t.heritageClauses,A,e.isHeritageClause),c=U(t,0!=(64&n)),u=e.createClassExpression(void 0,r,void 0,s,c);e.setOriginalNode(u,t),e.setTextRange(u,i);var l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(o,void 0,a?e.createAssignment(a,u):u)],1));return e.setOriginalNode(l,t),e.setTextRange(l,i),e.setCommentRange(l,t),l}(n,u,c):function(t,r,n){var i=128&n?void 0:e.visitNodes(t.modifiers,R,e.isModifier),a=e.createClassDeclaration(void 0,i,r,void 0,e.visitNodes(t.heritageClauses,A,e.isHeritageClause),U(t,0!=(64&n))),o=e.getEmitFlags(t);return 1&n&&(o|=32),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(n,u,c),_=[l];if(e.some(m)&&_.push(e.createExpressionStatement(e.inlineExpressions(m))),m=a,1&c&&X(_,o,128&c?e.getInternalName(n):e.getLocalName(n)),ne(_,n,!1),ne(_,n,!0),function(r,n){var a=function(r){var n=function(t){var r=t.decorators,n=ee(e.getFirstConstructorWithBody(t));if(r||n)return{decorators:r,parameters:n}}(r),a=re(r,r,n);if(a){var o=p&&p[e.getOriginalNodeId(r)],s=e.getLocalName(r,!1,!0),c=i(t,a,s),u=e.createAssignment(s,o?e.createAssignment(o,c):c);return e.setEmitFlags(u,1536),e.setSourceMapRange(u,e.moveRangePastDecorators(r)),u}}(n);a&&r.push(e.setOriginalNode(e.createExpressionStatement(a),n))}(_,n),128&c){var d=e.createTokenRange(e.skipTrivia(r.text,n.members.end),19),f=e.getInternalName(n),g=e.createPartiallyEmittedExpression(f);g.end=d.end,e.setEmitFlags(g,1536);var y=e.createReturn(g);y.pos=d.pos,e.setEmitFlags(y,1920),_.push(y),e.insertStatementsAfterStandardPrologue(_,t.endLexicalEnvironment());var h=e.createImmediatelyInvokedArrowFunction(_);e.setEmitFlags(h,33554432);var D=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(n,!1,!1),void 0,h)]));e.setOriginalNode(D,n),e.setCommentRange(D,n),e.setSourceMapRange(D,e.moveRangePastDecorators(n)),e.startOnNewLine(D),_=[D]}return 8&c?Ke(_,n):(128&c||2&c)&&(32&c?_.push(e.createExportDefault(e.getLocalName(n,!1,!0))):16&c&&_.push(e.createExternalModuleExport(e.getLocalName(n,!1,!0)))),_.length>1&&(_.push(e.createEndOfDeclarationMarker(n)),e.setEmitFlags(l,4194304|e.getEmitFlags(l))),e.singleOrMany(_)}(n);case 209:return function(r){if(!K(r))return e.visitEachChild(r,A,t);var n=m;m=void 0;var i=W(r,!0),a=e.visitNodes(r.heritageClauses,A,e.isHeritageClause),o=U(r,e.some(a,function(e){return 86===e.token})),s=e.createClassExpression(void 0,r.name,void 0,a,o);if(e.setOriginalNode(s,r),e.setTextRange(s,r),e.some(i)||e.some(m)){var c=[],u=16777216&b.getNodeCheckFlags(r),l=e.createTempVariable(v,!!u);if(u){He();var _=e.getSynthesizedClone(l);_.autoGenerateFlags&=-9,p[e.getOriginalNodeId(r)]=_}return e.setEmitFlags(s,65536|e.getEmitFlags(s)),c.push(e.startOnNewLine(e.createAssignment(l,s))),e.addRange(c,e.map(m,e.startOnNewLine)),m=n,e.addRange(c,function(t,r){for(var n=[],i=0,a=t;i<a.length;i++){var o=a[i],s=Q(o,r);e.startOnNewLine(s),e.setSourceMapRange(s,e.moveRangePastModifiers(o)),e.setCommentRange(s,o),e.setOriginalNode(s,o),n.push(s)}return n}(i,l)),c.push(e.startOnNewLine(l)),e.inlineExpressions(c)}return m=n,s}(n);case 273:return function(r){if(109!==r.token)return e.visitEachChild(r,A,t)}(n);case 211:return function(t){return e.updateExpressionWithTypeArguments(t,void 0,e.visitNode(t.expression,A,e.isLeftHandSideExpression))}(n);case 156:return function(r){if(Se(r)){var n=e.updateMethod(r,void 0,e.visitNodes(r.modifiers,R,e.isModifier),r.asteriskToken,xe(r),void 0,void 0,e.visitParameterList(r.parameters,A,t),void 0,e.visitFunctionBody(r.body,A,t));return n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r))),n}}(n);case 158:return function(r){if(Te(r)){var n=e.updateGetAccessor(r,void 0,e.visitNodes(r.modifiers,R,e.isModifier),xe(r),e.visitParameterList(r.parameters,A,t),void 0,e.visitFunctionBody(r.body,A,t)||e.createBlock([]));return n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r))),n}}(n);case 159:return function(r){if(Te(r)){var n=e.updateSetAccessor(r,void 0,e.visitNodes(r.modifiers,R,e.isModifier),xe(r),e.visitParameterList(r.parameters,A,t),e.visitFunctionBody(r.body,A,t)||e.createBlock([]));return n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r))),n}}(n);case 239:return function(r){if(!Se(r))return e.createNotEmittedStatement(r);var n=e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,R,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,A,t),void 0,e.visitFunctionBody(r.body,A,t)||e.createBlock([]));if(Be(r)){var i=[n];return Ke(i,r),i}return n}(n);case 196:return function(r){return Se(r)?e.updateFunctionExpression(r,e.visitNodes(r.modifiers,R,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,A,t),void 0,e.visitFunctionBody(r.body,A,t)||e.createBlock([])):e.createOmittedExpression()}(n);case 197:return function(r){return e.updateArrowFunction(r,e.visitNodes(r.modifiers,R,e.isModifier),void 0,e.visitParameterList(r.parameters,A,t),void 0,r.equalsGreaterThanToken,e.visitFunctionBody(r.body,A,t))}(n);case 151:return function(t){if(!e.parameterIsThisKeyword(t)){var r=e.updateParameter(t,void 0,void 0,t.dotDotDotToken,e.visitNode(t.name,A,e.isBindingName),void 0,void 0,e.visitNode(t.initializer,A,e.isExpression));return r!==t&&(e.setCommentRange(r,t),e.setTextRange(r,e.moveRangePastModifiers(t)),e.setSourceMapRange(r,e.moveRangePastModifiers(t)),e.setEmitFlags(r.name,32)),r}}(n);case 195:return function(n){var i=e.skipOuterExpressions(n.expression,-3);if(e.isAssertionExpression(i)){var a=e.visitNode(n.expression,A,e.isExpression);return e.length(e.getLeadingCommentRangesOfNode(a,r))?e.updateParen(n,a):e.createPartiallyEmittedExpression(a,n)}return e.visitEachChild(n,A,t)}(n);case 194:case 212:return function(t){var r=e.visitNode(t.expression,A,e.isExpression);return e.createPartiallyEmittedExpression(r,t)}(n);case 191:return function(t){return e.updateCall(t,e.visitNode(t.expression,A,e.isExpression),void 0,e.visitNodes(t.arguments,A,e.isExpression))}(n);case 192:return function(t){return e.updateNew(t,e.visitNode(t.expression,A,e.isExpression),void 0,e.visitNodes(t.arguments,A,e.isExpression))}(n);case 193:return function(t){return e.updateTaggedTemplate(t,e.visitNode(t.tag,A,e.isExpression),void 0,e.visitNode(t.template,A,e.isExpression))}(n);case 213:return function(t){var r=e.visitNode(t.expression,A,e.isLeftHandSideExpression);return e.createPartiallyEmittedExpression(r,t)}(n);case 243:return function(t){if(function(t){return!e.isEnumConst(t)||D.preserveConstEnums||D.isolatedModules}(t)){var n=[],i=2,a=Fe(n,t);a&&(T===e.ModuleKind.System&&u===r||(i|=512));var o=qe(t),s=We(t),l=e.hasModifier(t,1)?e.getExternalModuleOrNamespaceExportName(c,t,!1,!0):e.getLocalName(t,!1,!0),_=e.createLogicalOr(l,e.createAssignment(l,e.createObjectLiteral()));if(ke(t)){var d=e.getLocalName(t,!1,!0);_=e.createAssignment(d,_)}var p=e.createExpressionStatement(e.createCall(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,o)],void 0,function(t,r){var n=c;c=r;var i=[];g();var a=e.map(t.members,Ee);return e.insertStatementsAfterStandardPrologue(i,h()),e.addRange(i,a),c=n,e.createBlock(e.setTextRange(e.createNodeArray(i),t.members),!0)}(t,s)),void 0,[_]));return e.setOriginalNode(p,t),a&&(e.setSyntheticLeadingComments(p,void 0),e.setSyntheticTrailingComments(p,void 0)),e.setTextRange(p,t),e.addEmitFlags(p,i),n.push(p),n.push(e.createEndOfDeclarationMarker(t)),n}}(n);case 219:return function(r){if(Be(r)){var n=e.getInitializedVariables(r.declarationList);if(0===n.length)return;return e.setTextRange(e.createExpressionStatement(e.inlineExpressions(e.map(n,Ce))),r)}return e.visitEachChild(r,A,t)}(n);case 237:return function(t){return e.updateVariableDeclaration(t,e.visitNode(t.name,A,e.isBindingName),void 0,e.visitNode(t.initializer,A,e.isExpression))}(n);case 244:return Pe(n);case 248:return Re(n);default:return e.visitEachChild(n,A,t)}}function j(r){var n=e.getStrictOptionValue(D,"alwaysStrict")&&!(e.isExternalModule(r)&&T>=e.ModuleKind.ES2015)&&!e.isJsonSourceFile(r);return e.updateSourceFileNode(r,e.visitLexicalEnvironment(r.statements,P,t,0,n))}function J(e){return void 0!==e.decorators&&e.decorators.length>0}function z(e){return!!(1024&e.transformFlags)}function K(t){return e.some(t.decorators)||e.some(t.typeParameters)||e.some(t.heritageClauses,z)||e.some(t.members,z)}function U(r,n){var i=[],a=function(r,n){var i=e.getFirstConstructorWithBody(r),a=e.forEach(r.members,G),o=i&&1024&i.transformFlags&&e.forEach(i.parameters,V);if(!a&&!o)return e.visitEachChild(i,A,t);var s=function(r){return e.visitParameterList(r&&r.parameters,A,t)||[]}(i),c=function(t,r,n){var i=[],a=0;if(y(),r){a=function(t,r){if(t.body){var n=t.body.statements,i=e.addPrologue(r,n,!1,A);if(i===n.length)return i;var a=n[i];return 221===a.kind&&e.isSuperCall(a.expression)?(r.push(e.visitNode(a,A,e.isStatement)),i+1):i}return 0}(r,i);var o=function(t){return e.filter(t.parameters,V)}(r);e.addRange(i,e.map(o,q))}else n&&i.push(e.createExpressionStatement(e.createCall(e.createSuper(),void 0,[e.createSpread(e.createIdentifier("arguments"))])));var s=W(t,!1);return X(i,s,e.createThis()),r&&e.addRange(i,e.visitNodes(r.body.statements,A,e.isStatement,a)),i=e.mergeLexicalEnvironment(i,h()),e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(i),r?r.body.statements:t.members),!0),r?r.body:void 0)}(r,i,n);return e.startOnNewLine(e.setOriginalNode(e.setTextRange(e.createConstructor(void 0,void 0,s,c),i||r),i))}(r,n);return a&&i.push(a),e.addRange(i,e.visitNodes(r.members,M,e.isClassElement)),e.setTextRange(e.createNodeArray(i),r.members)}function V(t){return e.hasModifier(t,92)&&e.isIdentifier(t.name)}function q(t){e.Debug.assert(e.isIdentifier(t.name));var r=t.name,n=e.getMutableClone(r);e.setEmitFlags(n,1584);var i=e.getMutableClone(r);return e.setEmitFlags(i,1536),e.startOnNewLine(e.setEmitFlags(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createThis(),n),t.name),i)),e.moveRangePos(t,-1)),1536))}function W(t,r){return e.filter(t.members,r?H:G)}function H(e){return Y(e,!0)}function G(e){return Y(e,!1)}function Y(t,r){return 154===t.kind&&r===e.hasModifier(t,32)&&void 0!==t.initializer}function X(t,r,n){for(var i=0,a=r;i<a.length;i++){var o=a[i],s=e.createExpressionStatement(Q(o,n));e.setSourceMapRange(s,e.moveRangePastModifiers(o)),e.setCommentRange(s,o),e.setOriginalNode(s,o),t.push(s)}}function Q(t,r){var n=e.isComputedPropertyName(t.name)&&!ve(t.name.expression)?e.updateComputedPropertyName(t.name,e.getGeneratedNameForNode(t.name)):t.name,i=e.visitNode(t.initializer,A,e.isExpression),a=e.createMemberAccessForPropertyName(r,n,n);return e.createAssignment(a,i)}function $(t,r){return e.filter(t.members,r?function(e){return Z(e,!0,t)}:function(e){return Z(e,!1,t)})}function Z(t,r,n){return e.nodeOrChildIsDecorated(t,n)&&r===e.hasModifier(t,32)}function ee(t){var r;if(t)for(var n=t.parameters,i=n.length>0&&e.parameterIsThisKeyword(n[0]),a=i?1:0,o=i?n.length-1:n.length,s=0;s<o;s++){var c=n[s+a];(r||c.decorators)&&(r||(r=new Array(o)),r[s]=c.decorators)}return r}function te(t,r){switch(r.kind){case 158:case 159:return function(t,r){if(r.body){var n=e.getAllAccessorDeclarations(t.members,r),i=n.firstAccessor,a=n.secondAccessor,o=n.setAccessor,s=i.decorators?i:a&&a.decorators?a:void 0;if(s&&r===s){var c=s.decorators,u=ee(o);if(c||u)return{decorators:c,parameters:u}}}}(t,r);case 156:return function(e){if(e.body){var t=e.decorators,r=ee(e);if(t||r)return{decorators:t,parameters:r}}}(r);case 154:return function(e){var t=e.decorators;if(t)return{decorators:t}}(r);default:return}}function re(r,i,o){if(o){var s=[];return e.addRange(s,e.map(o.decorators,ae)),e.addRange(s,e.flatMap(o.parameters,oe)),function(r,i,o){n?function(r,n,i){if(D.emitDecoratorMetadata){var o=void 0;se(r)&&(o||(o=[])).push(e.createPropertyAssignment("type",e.createArrowFunction(void 0,void 0,[],void 0,e.createToken(37),le(r)))),ue(r)&&(o||(o=[])).push(e.createPropertyAssignment("paramTypes",e.createArrowFunction(void 0,void 0,[],void 0,e.createToken(37),_e(r,n)))),ce(r)&&(o||(o=[])).push(e.createPropertyAssignment("returnType",e.createArrowFunction(void 0,void 0,[],void 0,e.createToken(37),de(r)))),o&&i.push(a(t,"design:typeinfo",e.createObjectLiteral(o,!0)))}}(r,i,o):function(e,r,n){D.emitDecoratorMetadata&&(se(e)&&n.push(a(t,"design:type",le(e))),ue(e)&&n.push(a(t,"design:paramtypes",_e(e,r))),ce(e)&&n.push(a(t,"design:returntype",de(e))))}(r,i,o)}(r,i,s),s}}function ne(t,r,n){e.addRange(t,e.map(function(e,t){for(var r,n=0,i=$(e,t);n<i.length;n++){var a=i[n],o=ie(e,a);o&&(r?r.push(o):r=[o])}return r}(r,n),ze))}function ie(r,n){var a=re(n,r,te(r,n));if(a){var o=function(t,r){return e.hasModifier(r,32)?e.getDeclarationName(t):function(t){return e.createPropertyAccess(e.getDeclarationName(t),"prototype")}(t)}(r,n),s=be(n,!0),c=S>0?154===n.kind?e.createVoidZero():e.createNull():void 0,u=i(t,a,o,s,c,e.moveRangePastDecorators(n));return e.setEmitFlags(u,1536),u}}function ae(t){return e.visitNode(t.expression,A,e.isExpression)}function oe(r,n){var i;if(r){i=[];for(var a=0,s=r;a<s.length;a++){var c=s[a],u=o(t,ae(c),n,c.expression);e.setEmitFlags(u,1536),i.push(u)}}return i}function se(e){var t=e.kind;return 156===t||158===t||159===t||154===t}function ce(e){return 156===e.kind}function ue(t){switch(t.kind){case 240:case 209:return void 0!==e.getFirstConstructorWithBody(t);case 156:case 158:case 159:return!0}return!1}function le(t){switch(t.kind){case 154:case 151:return pe(t.type);case 159:case 158:return pe(function(t){var r=b.getAllAccessorDeclarations(t);return r.setAccessor&&e.getSetAccessorTypeAnnotationNode(r.setAccessor)||r.getAccessor&&e.getEffectiveReturnTypeNode(r.getAccessor)}(t));case 240:case 209:case 156:return e.createIdentifier("Function");default:return e.createVoidZero()}}function _e(t,r){var n=e.isClassLike(t)?e.getFirstConstructorWithBody(t):e.isFunctionLike(t)&&e.nodeIsPresent(t.body)?t:void 0,i=[];if(n)for(var a=function(t,r){if(r&&158===t.kind){var n=e.getAllAccessorDeclarations(r.members,t).setAccessor;if(n)return n.parameters}return t.parameters}(n,r),o=a.length,s=0;s<o;s++){var c=a[s];0===s&&e.isIdentifier(c.name)&&"this"===c.name.escapedText||(c.dotDotDotToken?i.push(pe(e.getRestParameterElementType(c.type))):i.push(le(c)))}return e.createArrayLiteral(i)}function de(t){return e.isFunctionLike(t)&&t.type?pe(t.type):e.isAsyncFunction(t)?e.createIdentifier("Promise"):e.createVoidZero()}function pe(t){if(void 0===t)return e.createIdentifier("Object");switch(t.kind){case 106:case 141:case 96:case 132:return e.createVoidZero();case 177:return pe(t.type);case 165:case 166:return e.createIdentifier("Function");case 169:case 170:return e.createIdentifier("Array");case 163:case 123:return e.createIdentifier("Boolean");case 138:return e.createIdentifier("String");case 136:return e.createIdentifier("Object");case 182:switch(t.literal.kind){case 10:return e.createIdentifier("String");case 202:case 8:return e.createIdentifier("Number");case 9:return he();case 102:case 87:return e.createIdentifier("Boolean");default:return e.Debug.failBadSyntaxKind(t.literal)}case 135:return e.createIdentifier("Number");case 146:return he();case 139:return S<2?ye():e.createIdentifier("Symbol");case 164:return function(t){var r=b.getTypeReferenceSerializationKind(t.typeName,l||u);switch(r){case e.TypeReferenceSerializationKind.Unknown:if(e.findAncestor(t,function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&(t.parent.trueType===t||t.parent.falseType===t)}))return e.createIdentifier("Object");var n=function t(r){if(72===r.kind){var n=ge(r);return me(n,n)}if(72===r.left.kind)return me(ge(r.left),ge(r));var i=t(r.left),a=e.createTempVariable(v);return e.createLogicalAnd(e.createLogicalAnd(i.left,e.createStrictInequality(e.createAssignment(a,i.right),e.createVoidZero())),e.createPropertyAccess(a,r.right))}(t.typeName),i=e.createTempVariable(v);return e.createConditional(e.createTypeCheck(e.createAssignment(i,n),"function"),i,e.createIdentifier("Object"));case e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue:return ge(t.typeName);case e.TypeReferenceSerializationKind.VoidNullableOrNeverType:return e.createVoidZero();case e.TypeReferenceSerializationKind.BigIntLikeType:return he();case e.TypeReferenceSerializationKind.BooleanType:return e.createIdentifier("Boolean");case e.TypeReferenceSerializationKind.NumberLikeType:return e.createIdentifier("Number");case e.TypeReferenceSerializationKind.StringLikeType:return e.createIdentifier("String");case e.TypeReferenceSerializationKind.ArrayLikeType:return e.createIdentifier("Array");case e.TypeReferenceSerializationKind.ESSymbolType:return S<2?ye():e.createIdentifier("Symbol");case e.TypeReferenceSerializationKind.TypeWithCallSignature:return e.createIdentifier("Function");case e.TypeReferenceSerializationKind.Promise:return e.createIdentifier("Promise");case e.TypeReferenceSerializationKind.ObjectType:return e.createIdentifier("Object");default:return e.Debug.assertNever(r)}}(t);case 174:case 173:return fe(t.types);case 175:return fe([t.trueType,t.falseType]);case 179:if(133===t.operator)return pe(t.type);break;case 167:case 180:case 181:case 168:case 120:case 143:case 178:case 183:break;default:return e.Debug.failBadSyntaxKind(t)}return e.createIdentifier("Object")}function fe(t){for(var r,n=0,i=t;n<i.length;n++){for(var a=i[n];177===a.kind;)a=a.type;if(132!==a.kind&&(x||96!==a.kind&&141!==a.kind)){var o=pe(a);if(e.isIdentifier(o)&&"Object"===o.escapedText)return o;if(r){if(!e.isIdentifier(r)||!e.isIdentifier(o)||r.escapedText!==o.escapedText)return e.createIdentifier("Object")}else r=o}}return r||e.createVoidZero()}function me(t,r){return e.createLogicalAnd(e.createStrictInequality(e.createTypeOf(t),e.createLiteral("undefined")),r)}function ge(t){switch(t.kind){case 72:var r=e.getMutableClone(t);return r.flags&=-9,r.original=void 0,r.parent=e.getParseTreeNode(u),r;case 148:return function(t){return e.createPropertyAccess(ge(t.left),t.right)}(t)}}function ye(){return e.createConditional(e.createTypeCheck(e.createIdentifier("Symbol"),"function"),e.createIdentifier("Symbol"),e.createIdentifier("Object"))}function he(){return S<7?e.createConditional(e.createTypeCheck(e.createIdentifier("BigInt"),"function"),e.createIdentifier("BigInt"),e.createIdentifier("Object")):e.createIdentifier("BigInt")}function ve(t){return!e.isIdentifier(t)&&e.isSimpleCopiableExpression(t)||e.isWellKnownSymbolSyntactically(t)}function be(t,r){var n=t.name;return e.isComputedPropertyName(n)?r&&!ve(n.expression)?e.getGeneratedNameForNode(n):n.expression:e.isIdentifier(n)?e.createLiteral(e.idText(n)):e.getSynthesizedClone(n)}function De(t,r,n){if(e.isComputedPropertyName(t)){var i=e.visitNode(t.expression,A,e.isExpression),a=e.skipPartiallyEmittedExpressions(i),o=ve(a);if(!o&&r){var s=e.getGeneratedNameForNode(t);return v(s),e.createAssignment(s,i)}return n&&(o||e.isIdentifier(a))?void 0:i}}function xe(t){var r=t.name,n=De(r,e.some(t.decorators),!1);return n?(e.some(m)&&(n=e.inlineExpressions(m.concat([n])),m.length=0),e.updateComputedPropertyName(r,n)):r}function Se(t){return!e.nodeIsMissing(t.body)}function Te(t){return!(e.nodeIsMissing(t.body)&&e.hasModifier(t,128))}function Ce(r){var n=r.name;return e.isBindingPattern(n)?e.flattenDestructuringAssignment(r,A,t,0,!1,Ue):e.setTextRange(e.createAssignment(Ve(n),e.visitNode(r.initializer,A,e.isExpression)),r)}function Ee(r){var n=be(r,!1),i=function(r){var n=b.getConstantValue(r);return void 0!==n?e.createLiteral(n):(0==(8&d)&&(d|=8,t.enableSubstitution(72)),r.initializer?e.visitNode(r.initializer,A,e.isExpression):e.createVoidZero())}(r),a=e.createAssignment(e.createElementAccess(c,n),i),o=10===i.kind?a:e.createAssignment(e.createElementAccess(c,a),n);return e.setTextRange(e.createExpressionStatement(e.setTextRange(o,r)),r)}function ke(t){return Be(t)||je(t)&&T!==e.ModuleKind.ES2015&&T!==e.ModuleKind.ESNext&&T!==e.ModuleKind.System}function Ne(t){_||(_=e.createUnderscoreEscapedMap());var r=Ae(t);_.has(r)||_.set(r,t)}function Ae(t){return e.Debug.assertNode(t.name,e.isIdentifier),t.name.escapedText}function Fe(t,r){var n=e.createVariableStatement(e.visitNodes(r.modifiers,R,e.isModifier),e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(r,!1,!0))],284===u.kind?0:1));if(e.setOriginalNode(n,r),Ne(r),function(e){if(_){var t=Ae(e);return _.get(t)===e}return!0}(r))return 243===r.kind?e.setSourceMapRange(n.declarationList,r):e.setSourceMapRange(n,r),e.setCommentRange(n,r),e.addEmitFlags(n,4195328),t.push(n),!0;var i=e.createMergeDeclarationMarker(n);return e.setEmitFlags(i,4195840),t.push(i),!1}function Pe(n){if(!function(t){return e.isInstantiatedModule(t,!!D.preserveConstEnums||!!D.isolatedModules)}(n))return e.createNotEmittedStatement(n);e.Debug.assertNode(n.name,e.isIdentifier,"A TypeScript namespace should have an Identifier name."),0==(2&d)&&(d|=2,t.enableSubstitution(72),t.enableSubstitution(276),t.enableEmitNotification(244));var i=[],a=2,o=Fe(i,n);o&&(T===e.ModuleKind.System&&u===r||(a|=512));var l=qe(n),p=We(n),f=e.hasModifier(n,1)?e.getExternalModuleOrNamespaceExportName(c,n,!1,!0):e.getLocalName(n,!1,!0),m=e.createLogicalOr(f,e.createAssignment(f,e.createObjectLiteral()));if(ke(n)){var y=e.getLocalName(n,!1,!0);m=e.createAssignment(y,m)}var v=e.createExpressionStatement(e.createCall(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,l)],void 0,function(t,r){var n=c,i=s,a=_;c=r,s=t,_=void 0;var o,u,l=[];g();var d=t.body;if(245===d.kind)N(d,function(t){return e.addRange(l,e.visitNodes(t.statements,I,e.isStatement))}),o=d.statements,u=d;else{var p=Pe(d);p&&(e.isArray(p)?e.addRange(l,p):l.push(p));var f=function e(t){if(244===t.body.kind){var r=e(t.body);return r||t.body}}(t).body;o=e.moveRangePos(f.statements,-1)}e.insertStatementsAfterStandardPrologue(l,h()),c=n,s=i,_=a;var m=e.createBlock(e.setTextRange(e.createNodeArray(l),o),!0);return e.setTextRange(m,u),245!==d.kind&&e.setEmitFlags(m,1536|e.getEmitFlags(m)),m}(n,p)),void 0,[m]));return e.setOriginalNode(v,n),o&&(e.setSyntheticLeadingComments(v,void 0),e.setSyntheticTrailingComments(v,void 0)),e.setTextRange(v,n),e.addEmitFlags(v,a),i.push(v),i.push(e.createEndOfDeclarationMarker(n)),i}function we(t){var r=b.isReferencedAliasDeclaration(t)?t.name:void 0,n=e.visitNode(t.namedBindings,Ie,e.isNamedImportBindings);return r||n?e.updateImportClause(t,r,n):void 0}function Ie(t){if(251===t.kind)return b.isReferencedAliasDeclaration(t)?t:void 0;var r=e.visitNodes(t.elements,Oe,e.isImportSpecifier);return e.some(r)?e.updateNamedImports(t,r):void 0}function Oe(e){return b.isReferencedAliasDeclaration(e)?e:void 0}function Me(t){var r=e.visitNodes(t.elements,Le,e.isExportSpecifier);return e.some(r)?e.updateNamedExports(t,r):void 0}function Le(e){return b.isValueAliasDeclaration(e)?e:void 0}function Re(n){if(e.isExternalModuleImportEqualsDeclaration(n))return b.isReferencedAliasDeclaration(n)?e.visitEachChild(n,A,t):void 0;if(function(t){return b.isReferencedAliasDeclaration(t)||!e.isExternalModule(r)&&b.isTopLevelValueImportEqualsWithEntityName(t)}(n)){var i,a,o,s=e.createExpressionFromEntityName(n.moduleReference);return e.setEmitFlags(s,3584),Je(n)||!Be(n)?e.setOriginalNode(e.setTextRange(e.createVariableStatement(e.visitNodes(n.modifiers,R,e.isModifier),e.createVariableDeclarationList([e.setOriginalNode(e.createVariableDeclaration(n.name,void 0,s),n)])),n),n):e.setOriginalNode((i=n.name,a=s,o=n,e.setTextRange(e.createExpressionStatement(e.createAssignment(e.getNamespaceMemberName(c,i,!1,!0),a)),o)),n)}}function Be(t){return void 0!==s&&e.hasModifier(t,1)}function je(t){return void 0===s&&e.hasModifier(t,1)}function Je(t){return je(t)&&!e.hasModifier(t,512)}function ze(t){return e.createExpressionStatement(t)}function Ke(t,r){var n=e.createAssignment(e.getExternalModuleOrNamespaceExportName(c,r,!1,!0),e.getLocalName(r));e.setSourceMapRange(n,e.createRange(r.name?r.name.pos:r.pos,r.end));var i=e.createExpressionStatement(n);e.setSourceMapRange(i,e.createRange(-1,r.end)),t.push(i)}function Ue(t,r,n){return e.setTextRange(e.createAssignment(Ve(t),r),n)}function Ve(t){return e.getNamespaceMemberName(c,t,!1,!0)}function qe(t){var r=e.getGeneratedNameForNode(t);return e.setSourceMapRange(r,t.name),r}function We(t){return e.getGeneratedNameForNode(t)}function He(){0==(1&d)&&(d|=1,t.enableSubstitution(72),p=[])}function Ge(t){if(d&f&&!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var r=b.getReferencedExportContainer(t,!1);if(r&&284!==r.kind&&(2&f&&244===r.kind||8&f&&243===r.kind))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(r),t),t)}}function Ye(t){var r=function(t){if(!D.isolatedModules)return e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)?b.getConstantValue(t):void 0}(t);if(void 0!==r){e.setConstantValue(t,r);var n=e.createLiteral(r);if(!D.removeComments){var i=e.isPropertyAccessExpression(t)?e.declarationNameToString(t.name):e.getTextOfNode(t.argumentExpression);e.addSyntheticTrailingComment(n,3," "+i+" ")}return n}return t}},e.decorateHelper={name:"typescript:decorate",scoped:!1,priority:2,text:'\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},e.metadataHelper={name:"typescript:metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},e.paramHelper={name:"typescript:param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"}}(c||(c={})),function(e){var t;function r(t,r,n){var i=0!=(4096&t.getNodeCheckFlags(r)),a=[];return n.forEach(function(t,r){var n=e.unescapeLeadingUnderscores(r),o=[];o.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,e.setEmitFlags(e.createPropertyAccess(e.setEmitFlags(e.createSuper(),4),n),4)))),i&&o.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameter(void 0,void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(e.setEmitFlags(e.createPropertyAccess(e.setEmitFlags(e.createSuper(),4),n),4),e.createIdentifier("v"))))),a.push(e.createPropertyAssignment(n,e.createObjectLiteral(o)))}),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_super"),void 0,e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteral(a,!0)]))],2))}function n(t,r,n,i){t.requestEmitHelper(e.awaiterHelper);var a=e.createFunctionExpression(void 0,e.createToken(40),void 0,void 0,[],void 0,i);return(a.emitNode||(a.emitNode={})).flags|=786432,e.createCall(e.getHelperName("__awaiter"),void 0,[e.createThis(),r?e.createIdentifier("arguments"):e.createVoidZero(),n?e.createExpressionFromEntityName(n):e.createVoidZero(),a])}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformES2017=function(t){var i,a,o,s,c=t.resumeLexicalEnvironment,u=t.endLexicalEnvironment,l=t.hoistVariableDeclaration,_=t.getEmitResolver(),d=t.getCompilerOptions(),p=e.getEmitScriptTarget(d),f=0,m=[],g=t.onEmitNode,y=t.onSubstituteNode;return t.onEmitNode=function(t,r,n){if(1&i&&function(e){var t=e.kind;return 240===t||157===t||156===t||158===t||159===t}(r)){var a=6144&_.getNodeCheckFlags(r);if(a!==f){var o=f;return f=a,g(t,r,n),void(f=o)}}else if(i&&m[e.getNodeId(r)]){var o=f;return f=0,g(t,r,n),void(f=o)}g(t,r,n)},t.onSubstituteNode=function(t,r){return r=y(t,r),1===t&&f?function(t){switch(t.kind){case 189:return N(t);case 190:return A(t);case 191:return function(t){var r=t.expression;if(e.isSuperProperty(r)){var n=e.isPropertyAccessExpression(r)?N(r):A(r);return e.createCall(e.createPropertyAccess(n,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(r):r},e.chainBundle(function(r){if(r.isDeclarationFile)return r;var n=e.visitEachChild(r,h,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function h(r){if(0==(32&r.transformFlags))return r;switch(r.kind){case 121:return;case 201:return function(t){return e.setOriginalNode(e.setTextRange(e.createYield(void 0,e.visitNode(t.expression,h,e.isExpression)),t),t)}(r);case 156:return function(r){return e.updateMethod(r,void 0,e.visitNodes(r.modifiers,h,e.isModifier),r.asteriskToken,r.name,void 0,void 0,e.visitParameterList(r.parameters,h,t),void 0,2&e.getFunctionFlags(r)?E(r):e.visitFunctionBody(r.body,h,t))}(r);case 239:return function(r){return e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,h,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,h,t),void 0,2&e.getFunctionFlags(r)?E(r):e.visitFunctionBody(r.body,h,t))}(r);case 196:return function(r){return e.updateFunctionExpression(r,e.visitNodes(r.modifiers,h,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,h,t),void 0,2&e.getFunctionFlags(r)?E(r):e.visitFunctionBody(r.body,h,t))}(r);case 197:return function(r){return e.updateArrowFunction(r,e.visitNodes(r.modifiers,h,e.isModifier),void 0,e.visitParameterList(r.parameters,h,t),void 0,r.equalsGreaterThanToken,2&e.getFunctionFlags(r)?E(r):e.visitFunctionBody(r.body,h,t))}(r);case 189:return o&&e.isPropertyAccessExpression(r)&&98===r.expression.kind&&o.set(r.name.escapedText,!0),e.visitEachChild(r,h,t);case 190:return o&&98===r.expression.kind&&(s=!0),e.visitEachChild(r,h,t);default:return e.visitEachChild(r,h,t)}}function v(r){if(e.isNodeWithPossibleHoistedDeclaration(r))switch(r.kind){case 219:return function(r){if(D(r.declarationList)){var n=x(r.declarationList,!1);return n?e.createExpressionStatement(n):void 0}return e.visitEachChild(r,h,t)}(r);case 225:return function(t){var r=t.initializer;return e.updateFor(t,D(r)?x(r,!1):e.visitNode(t.initializer,h,e.isForInitializer),e.visitNode(t.condition,h,e.isExpression),e.visitNode(t.incrementor,h,e.isExpression),e.visitNode(t.statement,v,e.isStatement,e.liftToBlock))}(r);case 226:return function(t){return e.updateForIn(t,D(t.initializer)?x(t.initializer,!0):e.visitNode(t.initializer,h,e.isForInitializer),e.visitNode(t.expression,h,e.isExpression),e.visitNode(t.statement,v,e.isStatement,e.liftToBlock))}(r);case 227:return function(t){return e.updateForOf(t,e.visitNode(t.awaitModifier,h,e.isToken),D(t.initializer)?x(t.initializer,!0):e.visitNode(t.initializer,h,e.isForInitializer),e.visitNode(t.expression,h,e.isExpression),e.visitNode(t.statement,v,e.isStatement,e.liftToBlock))}(r);case 274:return function(r){var n,i=e.createUnderscoreEscapedMap();if(b(r.variableDeclaration,i),i.forEach(function(t,r){a.has(r)&&(n||(n=e.cloneMap(a)),n.delete(r))}),n){var o=a;a=n;var s=e.visitEachChild(r,v,t);return a=o,s}return e.visitEachChild(r,v,t)}(r);case 218:case 232:case 246:case 271:case 272:case 235:case 223:case 224:case 222:case 231:case 233:return e.visitEachChild(r,v,t);default:return e.Debug.assertNever(r,"Unhandled node.")}return h(r)}function b(t,r){var n=t.name;if(e.isIdentifier(n))r.set(n.escapedText,!0);else for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||b(o,r)}}function D(t){return!!t&&e.isVariableDeclarationList(t)&&!(3&t.flags)&&t.declarations.some(C)}function x(t,r){!function(t){e.forEach(t.declarations,S)}(t);var n=e.getInitializedVariables(t);return 0===n.length?r?e.visitNode(e.convertToAssignmentElementTarget(t.declarations[0].name),h,e.isExpression):void 0:e.inlineExpressions(e.map(n,T))}function S(t){var r=t.name;if(e.isIdentifier(r))l(r);else for(var n=0,i=r.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||S(a)}}function T(t){var r=e.setSourceMapRange(e.createAssignment(e.convertToAssignmentElementTarget(t.name),t.initializer),t);return e.visitNode(r,h,e.isExpression)}function C(t){var r=t.name;if(e.isIdentifier(r))return a.has(r.escapedText);for(var n=0,i=r.elements;n<i.length;n++){var o=i[n];if(!e.isOmittedExpression(o)&&C(o))return!0}return!1}function E(l){c();var d=e.getOriginalNode(l,e.isFunctionLike).type,f=p<2?function(t){var r=t&&e.getEntityNameFromTypeNode(t);if(r&&e.isEntityName(r)){var n=_.getTypeReferenceSerializationKind(r);if(n===e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue||n===e.TypeReferenceSerializationKind.Unknown)return r}}(d):void 0,g=197===l.kind,y=0!=(8192&_.getNodeCheckFlags(l)),v=a;a=e.createUnderscoreEscapedMap();for(var D=0,x=l.parameters;D<x.length;D++)b(x[D],a);var S,T=o,C=s;if(g||(o=e.createUnderscoreEscapedMap(),s=!1),g){var E=n(t,y,f,k(l.body)),N=u();e.some(N)?(I=e.convertToFunctionBody(E),S=e.updateBlock(I,e.setTextRange(e.createNodeArray(e.concatenate(N,I.statements)),I.statements))):S=E}else{var A=[],F=e.addPrologue(A,l.body.statements,!1,h);A.push(e.createReturn(n(t,y,f,k(l.body,F)))),e.insertStatementsAfterStandardPrologue(A,u());var P=p>=2&&6144&_.getNodeCheckFlags(l);if(P&&(0==(1&i)&&(i|=1,t.enableSubstitution(191),t.enableSubstitution(189),t.enableSubstitution(190),t.enableEmitNotification(240),t.enableEmitNotification(156),t.enableEmitNotification(158),t.enableEmitNotification(159),t.enableEmitNotification(157),t.enableEmitNotification(219)),e.hasEntries(o))){var w=r(_,l,o);m[e.getNodeId(w)]=!0,e.insertStatementsAfterStandardPrologue(A,[w])}var I=e.createBlock(A,!0);e.setTextRange(I,l.body),P&&s&&(4096&_.getNodeCheckFlags(l)?e.addEmitHelper(I,e.advancedAsyncSuperHelper):2048&_.getNodeCheckFlags(l)&&e.addEmitHelper(I,e.asyncSuperHelper)),S=I}return a=v,g||(o=T,s=C),S}function k(t,r){return e.isBlock(t)?e.updateBlock(t,e.visitNodes(t.statements,v,e.isStatement,r)):e.convertToFunctionBody(e.visitNode(t,v,e.isConciseBody))}function N(t){return 98===t.expression.kind?e.setTextRange(e.createPropertyAccess(e.createFileLevelUniqueName("_super"),t.name),t):t}function A(t){return 98===t.expression.kind?(r=t.argumentExpression,n=t,4096&f?e.setTextRange(e.createPropertyAccess(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),"value"),n):e.setTextRange(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),n)):t;var r,n}},e.createSuperAccessVariableStatement=r,e.awaiterHelper={name:"typescript:awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:e.helperString(o(["\n const "," = name => super[name];"],["\n const "," = name => super[name];"]),"_superIndex")},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:e.helperString(o(["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"],["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"]),"_superIndex")}}(c||(c={})),function(e){var t;function r(t,r){return t.getCompilerOptions().target>=2?e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"assign"),void 0,r):(t.requestEmitHelper(e.assignHelper),e.createCall(e.getHelperName("__assign"),void 0,r))}function n(t,r){return t.requestEmitHelper(e.awaitHelper),e.createCall(e.getHelperName("__await"),void 0,[r])}function i(t,r,n){return t.requestEmitHelper(e.asyncValues),e.setTextRange(e.createCall(e.getHelperName("__asyncValues"),void 0,[r]),n)}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(t||(t={})),e.transformES2018=function(t){var a=t.resumeLexicalEnvironment,o=t.endLexicalEnvironment,s=t.hoistVariableDeclaration,c=t.getEmitResolver(),u=t.getCompilerOptions(),l=e.getEmitScriptTarget(u),_=t.onEmitNode;t.onEmitNode=function(t,r,n){if(1&d&&function(e){var t=e.kind;return 240===t||157===t||156===t||158===t||159===t}(r)){var i=6144&c.getNodeCheckFlags(r);if(i!==y){var a=y;return y=i,_(t,r,n),void(y=a)}}else if(d&&h[e.getNodeId(r)]){var a=y;return y=0,_(t,r,n),void(y=a)}_(t,r,n)};var d,p,f=t.onSubstituteNode;t.onSubstituteNode=function(t,r){return r=f(t,r),1===t&&y?function(t){switch(t.kind){case 189:return N(t);case 190:return A(t);case 191:return function(t){var r=t.expression;if(e.isSuperProperty(r)){var n=e.isPropertyAccessExpression(r)?N(r):A(r);return e.createCall(e.createPropertyAccess(n,"call"),void 0,[e.createThis()].concat(t.arguments))}return t}(t)}return t}(r):r};var m,g,y=0,h=[];return e.chainBundle(function(r){if(r.isDeclarationFile)return r;var n=e.visitEachChild(r,v,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function v(e){return x(e,!1)}function b(e){return x(e,!0)}function D(e){if(121!==e.kind)return e}function x(a,o){if(0==(16&a.transformFlags))return a;switch(a.kind){case 201:return function(r){return 2&p&&1&p?e.setOriginalNode(e.setTextRange(e.createYield(n(t,e.visitNode(r.expression,v,e.isExpression))),r),r):e.visitEachChild(r,v,t)}(a);case 207:return function(r){if(2&p&&1&p){if(r.asteriskToken){var a=e.visitNode(r.expression,v,e.isExpression);return e.setOriginalNode(e.setTextRange(e.createYield(n(t,e.updateYield(r,r.asteriskToken,function(t,r,n){return t.requestEmitHelper(e.awaitHelper),t.requestEmitHelper(e.asyncDelegator),e.setTextRange(e.createCall(e.getHelperName("__asyncDelegator"),void 0,[r]),n)}(t,i(t,a,a),a)))),r),r)}return e.setOriginalNode(e.setTextRange(e.createYield(T(r.expression?e.visitNode(r.expression,v,e.isExpression):e.createVoidZero())),r),r)}return e.visitEachChild(r,v,t)}(a);case 230:return function(r){return 2&p&&1&p?e.updateReturn(r,T(r.expression?e.visitNode(r.expression,v,e.isExpression):e.createVoidZero())):e.visitEachChild(r,v,t)}(a);case 233:return function(r){if(2&p){var n=e.unwrapInnermostStatementOfLabel(r);return 227===n.kind&&n.awaitModifier?S(n,r):e.restoreEnclosingLabel(e.visitEachChild(n,v,t),r)}return e.visitEachChild(r,v,t)}(a);case 188:return function(n){if(8192&n.transformFlags){var i=function(t){for(var r,n=[],i=0,a=t;i<a.length;i++){var o=a[i];if(277===o.kind){r&&(n.push(e.createObjectLiteral(r)),r=void 0);var s=o.expression;n.push(e.visitNode(s,v,e.isExpression))}else r=e.append(r,275===o.kind?e.createPropertyAssignment(o.name,e.visitNode(o.initializer,v,e.isExpression)):e.visitNode(o,v,e.isObjectLiteralElementLike))}return r&&n.push(e.createObjectLiteral(r)),n}(n.properties);return i.length&&188!==i[0].kind&&i.unshift(e.createObjectLiteral()),r(t,i)}return e.visitEachChild(n,v,t)}(a);case 204:return function(r,n){return e.isDestructuringAssignment(r)&&8192&r.left.transformFlags?e.flattenDestructuringAssignment(r,v,t,1,!n):27===r.operatorToken.kind?e.updateBinary(r,e.visitNode(r.left,b,e.isExpression),e.visitNode(r.right,n?b:v,e.isExpression)):e.visitEachChild(r,v,t)}(a,o);case 237:return function(r){return e.isBindingPattern(r.name)&&8192&r.name.transformFlags?e.flattenDestructuringBinding(r,v,t,1):e.visitEachChild(r,v,t)}(a);case 227:return S(a,void 0);case 225:return function(t){return e.updateFor(t,e.visitNode(t.initializer,b,e.isForInitializer),e.visitNode(t.condition,v,e.isExpression),e.visitNode(t.incrementor,v,e.isExpression),e.visitNode(t.statement,v,e.isStatement))}(a);case 200:return function(r){return e.visitEachChild(r,b,t)}(a);case 157:return function(r){var n=p;p=0;var i=e.updateConstructor(r,void 0,r.modifiers,e.visitParameterList(r.parameters,v,t),E(r));return p=n,i}(a);case 156:return function(r){var n=p;p=e.getFunctionFlags(r);var i=e.updateMethod(r,void 0,1&p?e.visitNodes(r.modifiers,D,e.isModifier):r.modifiers,2&p?void 0:r.asteriskToken,e.visitNode(r.name,v,e.isPropertyName),e.visitNode(void 0,v,e.isToken),void 0,e.visitParameterList(r.parameters,v,t),void 0,2&p&&1&p?C(r):E(r));return p=n,i}(a);case 158:return function(r){var n=p;p=0;var i=e.updateGetAccessor(r,void 0,r.modifiers,e.visitNode(r.name,v,e.isPropertyName),e.visitParameterList(r.parameters,v,t),void 0,E(r));return p=n,i}(a);case 159:return function(r){var n=p;p=0;var i=e.updateSetAccessor(r,void 0,r.modifiers,e.visitNode(r.name,v,e.isPropertyName),e.visitParameterList(r.parameters,v,t),E(r));return p=n,i}(a);case 239:return function(r){var n=p;p=e.getFunctionFlags(r);var i=e.updateFunctionDeclaration(r,void 0,1&p?e.visitNodes(r.modifiers,D,e.isModifier):r.modifiers,2&p?void 0:r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,v,t),void 0,2&p&&1&p?C(r):E(r));return p=n,i}(a);case 196:return function(r){var n=p;p=e.getFunctionFlags(r);var i=e.updateFunctionExpression(r,1&p?e.visitNodes(r.modifiers,D,e.isModifier):r.modifiers,2&p?void 0:r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,v,t),void 0,2&p&&1&p?C(r):E(r));return p=n,i}(a);case 197:return function(r){var n=p;p=e.getFunctionFlags(r);var i=e.updateArrowFunction(r,r.modifiers,void 0,e.visitParameterList(r.parameters,v,t),void 0,r.equalsGreaterThanToken,E(r));return p=n,i}(a);case 151:return function(r){return 8192&r.transformFlags?e.updateParameter(r,void 0,void 0,r.dotDotDotToken,e.getGeneratedNameForNode(r),void 0,void 0,e.visitNode(r.initializer,v,e.isExpression)):e.visitEachChild(r,v,t)}(a);case 221:return function(r){return e.visitEachChild(r,b,t)}(a);case 195:return function(r,n){return e.visitEachChild(r,n?b:v,t)}(a,o);case 189:return m&&e.isPropertyAccessExpression(a)&&98===a.expression.kind&&m.set(a.name.escapedText,!0),e.visitEachChild(a,v,t);case 190:return m&&98===a.expression.kind&&(g=!0),e.visitEachChild(a,v,t);default:return e.visitEachChild(a,v,t)}}function S(r,n){return 8192&r.initializer.transformFlags&&(r=function(t){var r=e.skipParentheses(t.initializer);if(e.isVariableDeclarationList(r)||e.isAssignmentPattern(r)){var n=void 0,i=void 0,a=e.createTempVariable(void 0),o=[e.createForOfBindingStatement(r,a)];return e.isBlock(t.statement)?(e.addRange(o,t.statement.statements),n=t.statement,i=t.statement.statements):t.statement&&(e.append(o,t.statement),n=t.statement,i=t.statement),e.updateForOf(t,t.awaitModifier,e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(a),t.initializer)],1),t.initializer),t.expression,e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(o),i),!0),n))}return t}(r)),r.awaitModifier?function(r,n){var a=e.visitNode(r.expression,v,e.isExpression),o=e.isIdentifier(a)?e.getGeneratedNameForNode(a):e.createTempVariable(void 0),c=e.isIdentifier(a)?e.getGeneratedNameForNode(o):e.createTempVariable(void 0),u=e.createUniqueName("e"),l=e.getGeneratedNameForNode(u),_=e.createTempVariable(void 0),d=i(t,a,r.expression),p=e.createCall(e.createPropertyAccess(o,"next"),void 0,[]),f=e.createPropertyAccess(c,"done"),m=e.createPropertyAccess(c,"value"),g=e.createFunctionCall(_,o,[]);s(u),s(_);var y=e.setEmitFlags(e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(o,void 0,d),r.expression),e.createVariableDeclaration(c)]),r.expression),2097152),e.createComma(e.createAssignment(c,T(p)),e.createLogicalNot(f)),void 0,function(t,r){var n,i,a=e.createForOfBindingStatement(t.initializer,r),o=[e.visitNode(a,v,e.isStatement)],s=e.visitNode(t.statement,v,e.isStatement);return e.isBlock(s)?(e.addRange(o,s.statements),n=s,i=s.statements):o.push(s),e.setEmitFlags(e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(o),i),!0),n),432)}(r,m)),r),256);return e.createTry(e.createBlock([e.restoreEnclosingLabel(y,n)]),e.createCatchClause(e.createVariableDeclaration(l),e.setEmitFlags(e.createBlock([e.createExpressionStatement(e.createAssignment(u,e.createObjectLiteral([e.createPropertyAssignment("error",l)])))]),1)),e.createBlock([e.createTry(e.createBlock([e.setEmitFlags(e.createIf(e.createLogicalAnd(e.createLogicalAnd(c,e.createLogicalNot(f)),e.createAssignment(_,e.createPropertyAccess(o,"return"))),e.createExpressionStatement(T(g))),1)]),void 0,e.setEmitFlags(e.createBlock([e.setEmitFlags(e.createIf(u,e.createThrow(e.createPropertyAccess(u,"error"))),1)]),1))]))}(r,n):e.restoreEnclosingLabel(e.visitEachChild(r,v,t),n)}function T(r){return 1&p?e.createYield(void 0,n(t,r)):e.createAwait(r)}function C(r){a();var n=[],i=e.addPrologue(n,r.body.statements,!1,v);k(n,r);var s=m,u=g;m=e.createUnderscoreEscapedMap(),g=!1;var _=e.createReturn(function(t,r){return t.requestEmitHelper(e.awaitHelper),t.requestEmitHelper(e.asyncGeneratorHelper),(r.emitNode||(r.emitNode={})).flags|=262144,e.createCall(e.getHelperName("__asyncGenerator"),void 0,[e.createThis(),e.createIdentifier("arguments"),r])}(t,e.createFunctionExpression(void 0,e.createToken(40),r.name&&e.getGeneratedNameForNode(r.name),void 0,[],void 0,e.updateBlock(r.body,e.visitLexicalEnvironment(r.body.statements,v,t,i))))),p=l>=2&&6144&c.getNodeCheckFlags(r);if(p){0==(1&d)&&(d|=1,t.enableSubstitution(191),t.enableSubstitution(189),t.enableSubstitution(190),t.enableEmitNotification(240),t.enableEmitNotification(156),t.enableEmitNotification(158),t.enableEmitNotification(159),t.enableEmitNotification(157),t.enableEmitNotification(219));var f=e.createSuperAccessVariableStatement(c,r,m);h[e.getNodeId(f)]=!0,e.insertStatementsAfterStandardPrologue(n,[f])}n.push(_),e.insertStatementsAfterStandardPrologue(n,o());var y=e.updateBlock(r.body,n);return p&&g&&(4096&c.getNodeCheckFlags(r)?e.addEmitHelper(y,e.advancedAsyncSuperHelper):2048&c.getNodeCheckFlags(r)&&e.addEmitHelper(y,e.asyncSuperHelper)),m=s,g=u,y}function E(t){a();var r=0,n=[],i=e.visitNode(t.body,v,e.isConciseBody);e.isBlock(i)&&(r=e.addPrologue(n,i.statements,!1,v)),e.addRange(n,k(void 0,t));var s=o();if(r>0||e.some(n)||e.some(s)){var c=e.convertToFunctionBody(i,!0);return e.insertStatementsAfterStandardPrologue(n,s),e.addRange(n,c.statements.slice(r)),e.updateBlock(c,e.setTextRange(e.createNodeArray(n),c.statements))}return i}function k(r,n){for(var i=0,a=n.parameters;i<a.length;i++){var o=a[i];if(8192&o.transformFlags){var s=e.getGeneratedNameForNode(o),c=e.flattenDestructuringBinding(o,v,t,1,s,!1,!0);if(e.some(c)){var u=e.createVariableStatement(void 0,e.createVariableDeclarationList(c));e.setEmitFlags(u,1048576),r=e.append(r,u)}}}return r}function N(t){return 98===t.expression.kind?e.setTextRange(e.createPropertyAccess(e.createFileLevelUniqueName("_super"),t.name),t):t}function A(t){return 98===t.expression.kind?(r=t.argumentExpression,n=t,4096&y?e.setTextRange(e.createPropertyAccess(e.createCall(e.createIdentifier("_superIndex"),void 0,[r]),"value"),n):e.setTextRange(e.createCall(e.createIdentifier("_superIndex"),void 0,[r]),n)):t;var r,n}},e.assignHelper={name:"typescript:assign",scoped:!1,priority:1,text:"\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"},e.createAssignHelper=r,e.awaitHelper={name:"typescript:await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"},e.asyncGeneratorHelper={name:"typescript:asyncGenerator",scoped:!1,text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},e.asyncDelegator={name:"typescript:asyncDelegator",scoped:!1,text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }\n };'},e.asyncValues={name:"typescript:asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'}}(c||(c={})),function(e){e.transformES2019=function(t){return e.chainBundle(function(n){return n.isDeclarationFile?n:e.visitEachChild(n,r,t)});function r(n){if(0==(8&n.transformFlags))return n;switch(n.kind){case 274:return function(n){return n.variableDeclaration?e.visitEachChild(n,r,t):e.updateCatchClause(n,e.createVariableDeclaration(e.createTempVariable(void 0)),e.visitNode(n.block,r,e.isBlock))}(n);default:return e.visitEachChild(n,r,t)}}}}(c||(c={})),function(e){e.transformESNext=function(t){return e.chainBundle(function(n){return n.isDeclarationFile?n:e.visitEachChild(n,r,t)});function r(n){return 0==(4&n.transformFlags)?n:(n.kind,e.visitEachChild(n,r,t))}}}(c||(c={})),function(e){e.transformJsx=function(r){var n,i=r.getCompilerOptions();return e.chainBundle(function(t){if(t.isDeclarationFile)return t;n=t;var i=e.visitEachChild(t,a,r);return e.addEmitHelpers(i,r.readEmitHelpers()),i});function a(t){return 2&t.transformFlags?function(t){switch(t.kind){case 260:return s(t,!1);case 261:return c(t,!1);case 264:return u(t,!1);case 270:return m(t);default:return e.visitEachChild(t,a,r)}}(t):t}function o(t){switch(t.kind){case 11:return function(t){var r=function(t){for(var r,n=0,i=-1,a=0;a<t.length;a++){var o=t.charCodeAt(a);e.isLineBreak(o)?(-1!==n&&-1!==i&&(r=p(r,t.substr(n,i-n+1))),n=-1):e.isWhiteSpaceSingleLine(o)||(i=a,-1===n&&(n=a))}return-1!==n?p(r,t.substr(n)):r}(t.text);return void 0===r?void 0:e.createLiteral(r)}(t);case 270:return m(t);case 260:return s(t,!0);case 261:return c(t,!0);case 264:return u(t,!0);default:return e.Debug.failBadSyntaxKind(t)}}function s(e,t){return l(e.openingElement,e.children,t,e)}function c(e,t){return l(e,void 0,t,e)}function u(t,a){return function(t,a,s,c){var u=e.createExpressionForJsxFragment(r.getEmitResolver().getJsxFactoryEntity(n),i.reactNamespace,e.mapDefined(a,o),t,c);return s&&e.startOnNewLine(u),u}(t.openingFragment,t.children,a,t)}function l(t,a,s,c){var u,l=function t(r){if(260===r.kind)return t(r.openingElement);var n=r.tagName;return e.isIdentifier(n)&&e.isIntrinsicJsxName(n.escapedText)?e.createLiteral(e.idText(n)):e.createExpressionFromEntityName(n)}(t),p=t.attributes.properties;if(0===p.length)u=e.createNull();else{var f=e.flatten(e.spanMap(p,e.isJsxSpreadAttribute,function(t,r){return r?e.map(t,_):e.createObjectLiteral(e.map(t,d))}));e.isJsxSpreadAttribute(p[0])&&f.unshift(e.createObjectLiteral()),(u=e.singleOrUndefined(f))||(u=e.createAssignHelper(r,f))}var m=e.createExpressionForJsxElement(r.getEmitResolver().getJsxFactoryEntity(n),i.reactNamespace,l,u,e.mapDefined(a,o),t,c);return s&&e.startOnNewLine(m),m}function _(t){return e.visitNode(t.expression,a,e.isExpression)}function d(t){var r=function(t){var r=t.name,n=e.idText(r);return/^[A-Za-z_]\w*$/.test(n)?r:e.createLiteral(n)}(t),i=function(t){if(void 0===t)return e.createTrue();if(10===t.kind){var r=e.createLiteral((i=t.text,((a=f(i))===i?void 0:a)||t.text));return r.singleQuote=void 0!==t.singleQuote?t.singleQuote:!e.isStringDoubleQuoted(t,n),e.setTextRange(r,t)}return 270===t.kind?void 0===t.expression?e.createTrue():m(t):e.Debug.failBadSyntaxKind(t);var i,a}(t.initializer);return e.createPropertyAssignment(r,i)}function p(e,t){var r=f(t);return void 0===e?r:e+" "+r}function f(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,function(e,r,n,i,a,o,s){if(a)return String.fromCharCode(parseInt(a,10));if(o)return String.fromCharCode(parseInt(o,16));var c=t.get(s);return c?String.fromCharCode(c):e})}function m(t){return e.visitNode(t.expression,a,e.isExpression)}};var t=e.createMapFromTemplate({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830})}(c||(c={})),function(e){e.transformES2016=function(t){var r=t.hoistVariableDeclaration;return e.chainBundle(function(r){return r.isDeclarationFile?r:e.visitEachChild(r,n,t)});function n(i){if(0==(64&i.transformFlags))return i;switch(i.kind){case 204:return function(i){switch(i.operatorToken.kind){case 63:return function(t){var i,a,o=e.visitNode(t.left,n,e.isExpression),s=e.visitNode(t.right,n,e.isExpression);if(e.isElementAccessExpression(o)){var c=e.createTempVariable(r),u=e.createTempVariable(r);i=e.setTextRange(e.createElementAccess(e.setTextRange(e.createAssignment(c,o.expression),o.expression),e.setTextRange(e.createAssignment(u,o.argumentExpression),o.argumentExpression)),o),a=e.setTextRange(e.createElementAccess(c,u),o)}else if(e.isPropertyAccessExpression(o)){var c=e.createTempVariable(r);i=e.setTextRange(e.createPropertyAccess(e.setTextRange(e.createAssignment(c,o.expression),o.expression),o.name),o),a=e.setTextRange(e.createPropertyAccess(c,o.name),o)}else i=o,a=o;return e.setTextRange(e.createAssignment(i,e.createMathPow(a,s,t)),t)}(i);case 41:return function(t){var r=e.visitNode(t.left,n,e.isExpression),i=e.visitNode(t.right,n,e.isExpression);return e.createMathPow(r,i,t)}(i);default:return e.visitEachChild(i,n,t)}}(i);default:return e.visitEachChild(i,n,t)}}}}(c||(c={})),function(e){var t,r,n,i,a;!function(e){e[e.CapturedThis=1]="CapturedThis",e[e.BlockScopedBindings=2]="BlockScopedBindings"}(t||(t={})),function(e){e[e.Body=1]="Body",e[e.Initializer=2]="Initializer"}(r||(r={})),function(e){e[e.ToOriginal=0]="ToOriginal",e[e.ToOutParameter=1]="ToOutParameter"}(n||(n={})),function(e){e[e.Break=2]="Break",e[e.Continue=4]="Continue",e[e.Return=8]="Return"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.ArrowFunction=2]="ArrowFunction",e[e.AsyncFunctionBody=4]="AsyncFunctionBody",e[e.NonStaticClassElement=8]="NonStaticClassElement",e[e.CapturesThis=16]="CapturesThis",e[e.ExportedVariableStatement=32]="ExportedVariableStatement",e[e.TopLevel=64]="TopLevel",e[e.Block=128]="Block",e[e.IterationStatement=256]="IterationStatement",e[e.IterationStatementBlock=512]="IterationStatementBlock",e[e.ForStatement=1024]="ForStatement",e[e.ForInOrForOfStatement=2048]="ForInOrForOfStatement",e[e.ConstructorWithCapturedSuper=4096]="ConstructorWithCapturedSuper",e[e.AncestorFactsMask=8191]="AncestorFactsMask",e[e.BlockScopeIncludes=0]="BlockScopeIncludes",e[e.BlockScopeExcludes=4032]="BlockScopeExcludes",e[e.SourceFileIncludes=64]="SourceFileIncludes",e[e.SourceFileExcludes=3968]="SourceFileExcludes",e[e.FunctionIncludes=65]="FunctionIncludes",e[e.FunctionExcludes=8094]="FunctionExcludes",e[e.AsyncFunctionBodyIncludes=69]="AsyncFunctionBodyIncludes",e[e.AsyncFunctionBodyExcludes=8086]="AsyncFunctionBodyExcludes",e[e.ArrowFunctionIncludes=66]="ArrowFunctionIncludes",e[e.ArrowFunctionExcludes=8064]="ArrowFunctionExcludes",e[e.ConstructorIncludes=73]="ConstructorIncludes",e[e.ConstructorExcludes=8086]="ConstructorExcludes",e[e.DoOrWhileStatementIncludes=256]="DoOrWhileStatementIncludes",e[e.DoOrWhileStatementExcludes=0]="DoOrWhileStatementExcludes",e[e.ForStatementIncludes=1280]="ForStatementIncludes",e[e.ForStatementExcludes=3008]="ForStatementExcludes",e[e.ForInOrForOfStatementIncludes=2304]="ForInOrForOfStatementIncludes",e[e.ForInOrForOfStatementExcludes=1984]="ForInOrForOfStatementExcludes",e[e.BlockIncludes=128]="BlockIncludes",e[e.BlockExcludes=3904]="BlockExcludes",e[e.IterationStatementBlockIncludes=512]="IterationStatementBlockIncludes",e[e.IterationStatementBlockExcludes=4032]="IterationStatementBlockExcludes",e[e.NewTarget=8192]="NewTarget",e[e.CapturedLexicalThis=16384]="CapturedLexicalThis",e[e.SubtreeFactsMask=-8192]="SubtreeFactsMask",e[e.ArrowFunctionSubtreeExcludes=0]="ArrowFunctionSubtreeExcludes",e[e.FunctionSubtreeExcludes=24576]="FunctionSubtreeExcludes"}(a||(a={})),e.transformES2015=function(t){var r,n,i,a,o,s,c=t.startLexicalEnvironment,u=t.resumeLexicalEnvironment,l=t.endLexicalEnvironment,_=t.hoistVariableDeclaration,d=t.getCompilerOptions(),p=t.getEmitResolver(),f=t.onSubstituteNode,m=t.onEmitNode;return t.onEmitNode=function(t,r,n){if(1&s&&e.isFunctionLike(r)){var i=g(8094,8&e.getEmitFlags(r)?81:65);return m(t,r,n),void y(i,0,0)}m(t,r,n)},t.onSubstituteNode=function(t,r){return r=f(t,r),1===t?function(t){switch(t.kind){case 72:return function(t){if(2&s&&!e.isInternalName(t)){var r=p.getReferencedDeclarationWithCollidingName(t);if(r&&(!e.isClassLike(r)||!function(t,r){var n=e.getParseTreeNode(r);if(!n||n===t||n.end<=t.pos||n.pos>=t.end)return!1;for(var i=e.getEnclosingBlockScopeContainer(t);n;){if(n===i||n===t)return!1;if(e.isClassElement(n)&&n.parent===t)return!0;n=n.parent}return!1}(r,t)))return e.setTextRange(e.getGeneratedNameForNode(e.getNameOfDeclaration(r)),t)}return t}(t);case 100:return function(t){return 1&s&&16&i?e.setTextRange(e.createFileLevelUniqueName("_this"),t):t}(t)}return t}(r):e.isIdentifier(r)?function(t){if(2&s&&!e.isInternalName(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r&&function(e){switch(e.parent.kind){case 186:case 240:case 243:case 237:return e.parent.name===e&&p.isDeclarationWithCollidingName(e.parent)}return!1}(r))return e.setTextRange(e.getGeneratedNameForNode(r),t)}return t}(r):r},e.chainBundle(function(o){if(o.isDeclarationFile)return o;r=o,n=o.text;var s=function(t){var r=g(3968,64),n=[],i=[];c();var o=e.addStandardPrologue(n,t.statements,!1);return o=e.addCustomPrologue(n,t.statements,o,v),e.addRange(i,e.visitNodes(t.statements,v,e.isStatement,o)),a&&i.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(a))),e.mergeLexicalEnvironment(n,l()),F(n,t),y(r,0,0),e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(e.concatenate(n,i)),t.statements))}(o);return e.addEmitHelpers(s,t.readEmitHelpers()),r=void 0,n=void 0,a=void 0,i=0,s});function g(e,t){var r=i;return i=8191&(i&~e|t),r}function y(e,t,r){i=-8192&(i&~t|r)|e}function h(e){return 0!=(4096&i)&&230===e.kind&&!e.expression}function v(n){return function(t){return 0!=(128&t.transformFlags)||void 0!==o||4096&i&&(e.isStatement(t)||218===t.kind)||e.isIterationStatement(t,!1)&&ne(t)||0!=(33554432&e.getEmitFlags(t))}(n)?function(n){switch(n.kind){case 116:return;case 240:return function(t){var r=e.createVariableDeclaration(e.getLocalName(t,!0),void 0,x(t));e.setOriginalNode(r,t);var n=[],i=e.createVariableStatement(void 0,e.createVariableDeclarationList([r]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),n.push(i),e.hasModifier(t,1)){var a=e.hasModifier(t,512)?e.createExportDefault(e.getLocalName(t)):e.createExternalModuleExport(e.getLocalName(t));e.setOriginalNode(a,i),n.push(a)}var o=e.getEmitFlags(t);return 0==(4194304&o)&&(n.push(e.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o)),e.singleOrMany(n)}(n);case 209:return function(e){return x(e)}(n);case 151:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,e.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(n);case 239:return function(r){var n=o;o=void 0;var a=g(8094,65),s=e.visitParameterList(r.parameters,v,t),c=B(r),u=8192&i?e.getLocalName(r):r.name;return y(a,24576,0),o=n,e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,v,e.isModifier),r.asteriskToken,u,void 0,s,void 0,c)}(n);case 197:return function(r){2048&r.transformFlags&&(i|=16384);var n=o;o=void 0;var a=g(8064,66),s=e.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(r.parameters,v,t),void 0,B(r));return e.setTextRange(s,r),e.setOriginalNode(s,r),e.setEmitFlags(s,8),16384&i&&Ce(),y(a,0,0),o=n,s}(n);case 196:return function(r){var n=262144&e.getEmitFlags(r)?g(8086,69):g(8094,65),a=o;o=void 0;var s=e.visitParameterList(r.parameters,v,t),c=B(r),u=8192&i?e.getLocalName(r):r.name;return y(n,24576,0),o=a,e.updateFunctionExpression(r,void 0,r.asteriskToken,u,void 0,s,void 0,c)}(n);case 237:return K(n);case 72:return function(t){return o?e.isGeneratedIdentifier(t)?t:"arguments"===t.escapedText&&p.isArgumentsLocalBinding(t)?o.argumentsName||(o.argumentsName=e.createUniqueName("arguments")):t:t}(n);case 238:return function(r){if(3&r.flags||65536&r.transformFlags){3&r.flags&&Te();var n=e.flatMap(r.declarations,1&r.flags?z:K),i=e.createVariableDeclarationList(n);return e.setOriginalNode(i,r),e.setTextRange(i,r),e.setCommentRange(i,r),65536&r.transformFlags&&(e.isBindingPattern(r.declarations[0].name)||e.isBindingPattern(e.last(r.declarations).name))&&e.setSourceMapRange(i,function(t){for(var r=-1,n=-1,i=0,a=t;i<a.length;i++){var o=a[i];r=-1===r?o.pos:-1===o.pos?r:Math.min(r,o.pos),n=Math.max(n,o.end)}return e.createRange(r,n)}(n)),i}return e.visitEachChild(r,v,t)}(n);case 232:return function(r){if(void 0!==o){var n=o.allowedNonLabeledJumps;o.allowedNonLabeledJumps|=2;var i=e.visitEachChild(r,v,t);return o.allowedNonLabeledJumps=n,i}return e.visitEachChild(r,v,t)}(n);case 246:return function(r){var n=g(4032,0),i=e.visitEachChild(r,v,t);return y(n,0,0),i}(n);case 218:return function(r,n){if(n)return e.visitEachChild(r,v,t);var a=256&i?g(4032,512):g(3904,128),o=e.visitEachChild(r,v,t);return y(a,0,0),o}(n,!1);case 229:case 228:return function(r){if(o){var n=229===r.kind?2:4,i=r.label&&o.labels&&o.labels.get(e.idText(r.label))||!r.label&&o.allowedNonLabeledJumps&n;if(!i){var a=void 0,s=r.label;s?229===r.kind?(a="break-"+s.escapedText,le(o,!0,e.idText(s),a)):(a="continue-"+s.escapedText,le(o,!1,e.idText(s),a)):229===r.kind?(o.nonLocalJumps|=2,a="break"):(o.nonLocalJumps|=4,a="continue");var c=e.createLiteral(a);if(o.loopOutParameters.length){for(var u=o.loopOutParameters,l=void 0,_=0;_<u.length;_++){var d=ce(u[_],1);l=0===_?d:e.createBinary(l,27,d)}c=e.createBinary(l,27,c)}return e.createReturn(c)}}return e.visitEachChild(r,v,t)}(n);case 233:return function(t){o&&!o.labels&&(o.labels=e.createMap());var r=e.unwrapInnermostStatementOfLabel(t,o&&U);return e.isIterationStatement(r,!1)?function(e,t){switch(e.kind){case 223:case 224:return W(e,t);case 225:return H(e,t);case 226:return G(e,t);case 227:return Y(e,t)}}(r,t):e.restoreEnclosingLabel(e.visitNode(r,v,e.isStatement,e.liftToBlock),t,o&&V)}(n);case 223:case 224:return W(n,void 0);case 225:return H(n,void 0);case 226:return G(n,void 0);case 227:return Y(n,void 0);case 221:return function(r){switch(r.expression.kind){case 195:return e.updateExpressionStatement(r,j(r.expression,!1));case 204:return e.updateExpressionStatement(r,J(r.expression,!1))}return e.visitEachChild(r,v,t)}(n);case 188:return function(r){for(var n=r.properties,a=n.length,o=a,s=a,c=0;c<a;c++){var u=n[c];if(131072&u.transformFlags&&4&i&&c<s&&(s=c),149===u.name.kind){o=c;break}}if(o!==a){s<o&&(o=s);var l=e.createTempVariable(_),d=[],p=e.createAssignment(l,e.setEmitFlags(e.createObjectLiteral(e.visitNodes(n,v,e.isObjectLiteralElementLike,0,o),r.multiLine),65536));return r.multiLine&&e.startOnNewLine(p),d.push(p),function(t,r,n,i){for(var a=r.properties,o=a.length,s=i;s<o;s++){var c=a[s];switch(c.kind){case 158:case 159:var u=e.getAllAccessorDeclarations(r.properties,c);c===u.firstAccessor&&t.push(L(n,u,r,!!r.multiLine));break;case 156:t.push(me(c,n,r,r.multiLine));break;case 275:t.push(pe(c,n,r.multiLine));break;case 276:t.push(fe(c,n,r.multiLine));break;default:e.Debug.failBadSyntaxKind(r)}}}(d,r,l,o),d.push(r.multiLine?e.startOnNewLine(e.getMutableClone(l)):l),e.inlineExpressions(d)}return e.visitEachChild(r,v,t)}(n);case 274:return function(r){var n,i,a,o,s=g(4032,0);if(e.Debug.assert(!!r.variableDeclaration,"Catch clause variable should always be present when downleveling ES2015."),e.isBindingPattern(r.variableDeclaration.name)){var c=e.createTempVariable(void 0),u=e.createVariableDeclaration(c);e.setTextRange(u,r.variableDeclaration);var l=e.flattenDestructuringBinding(r.variableDeclaration,v,t,0,c),_=e.createVariableDeclarationList(l);e.setTextRange(_,r.variableDeclaration);var d=e.createVariableStatement(void 0,_);n=e.updateCatchClause(r,u,(i=r.block,a=d,o=e.visitNodes(i.statements,v,e.isStatement),e.updateBlock(i,[a].concat(o))))}else n=e.visitEachChild(r,v,t);return y(s,0,0),n}(n);case 276:return function(t){return e.setTextRange(e.createPropertyAssignment(t.name,e.getSynthesizedClone(t.name)),t)}(n);case 149:return function(r){return e.visitEachChild(r,v,t)}(n);case 187:return function(r){return e.some(r.elements,e.isSpreadElement)?ye(r.elements,!0,!!r.multiLine,!!r.elements.hasTrailingComma):e.visitEachChild(r,v,t)}(n);case 191:return function(t){if(33554432&e.getEmitFlags(t))return function(t){var r=e.cast(e.cast(e.skipOuterExpressions(t.expression),e.isArrowFunction).body,e.isBlock),n=function(t){return e.isVariableStatement(t)&&!!e.first(t.declarationList.declarations).initializer},i=e.visitNodes(r.statements,v,e.isStatement),a=e.filter(i,n),o=e.filter(i,function(e){return!n(e)}),s=e.cast(e.first(a),e.isVariableStatement).declarationList.declarations[0],c=e.skipOuterExpressions(s.initializer),u=e.tryCast(c,e.isAssignmentExpression),l=e.cast(u?e.skipOuterExpressions(u.right):c,e.isCallExpression),_=e.cast(e.skipOuterExpressions(l.expression),e.isFunctionExpression),d=_.body.statements,p=0,f=-1,m=[];if(u){var g=e.tryCast(d[p],e.isExpressionStatement);g&&(m.push(g),p++),m.push(d[p]),p++,m.push(e.createExpressionStatement(e.createAssignment(u.left,e.cast(s.name,e.isIdentifier))))}for(;!e.isReturnStatement(e.elementAt(d,f));)f--;return e.addRange(m,d,p,f),f<-1&&e.addRange(m,d,f+1),e.addRange(m,o),e.addRange(m,a,1),e.recreateOuterExpressions(t.expression,e.recreateOuterExpressions(s.initializer,e.recreateOuterExpressions(u&&u.right,e.updateCall(l,e.recreateOuterExpressions(l.expression,e.updateFunctionExpression(_,void 0,void 0,void 0,void 0,_.parameters,void 0,e.updateBlock(_.body,m))),void 0,l.arguments))))}(t);var r=e.skipOuterExpressions(t.expression);return 98===r.kind||e.isSuperProperty(r)||e.some(t.arguments,e.isSpreadElement)?ge(t,!0):e.updateCall(t,e.visitNode(t.expression,b,e.isExpression),void 0,e.visitNodes(t.arguments,v,e.isExpression))}(n);case 192:return function(r){if(e.some(r.arguments,e.isSpreadElement)){var n=e.createCallBinding(e.createPropertyAccess(r.expression,"bind"),_),i=n.target,a=n.thisArg;return e.createNew(e.createFunctionApply(e.visitNode(i,v,e.isExpression),a,ye(e.createNodeArray([e.createVoidZero()].concat(r.arguments)),!1,!1,!1)),void 0,[])}return e.visitEachChild(r,v,t)}(n);case 195:return j(n,!0);case 204:return J(n,!0);case 14:case 15:case 16:case 17:return function(t){return e.setTextRange(e.createLiteral(t.text),t)}(n);case 10:return function(t){return t.hasExtendedUnicodeEscape?e.setTextRange(e.createLiteral(t.text),t):t}(n);case 8:return function(t){return 384&t.numericLiteralFlags?e.setTextRange(e.createNumericLiteral(t.text),t):t}(n);case 193:return function(n){var i=e.visitNode(n.tag,v,e.isExpression),o=[void 0],s=[],c=[],u=n.template;if(e.isNoSubstitutionTemplateLiteral(u))s.push(e.createLiteral(u.text)),c.push(xe(u));else{s.push(e.createLiteral(u.head.text)),c.push(xe(u.head));for(var l=0,_=u.templateSpans;l<_.length;l++){var d=_[l];s.push(e.createLiteral(d.literal.text)),c.push(xe(d.literal)),o.push(e.visitNode(d.expression,v,e.isExpression))}}var p,f=function(t,r,n){return t.requestEmitHelper(e.templateObjectHelper),e.createCall(e.getHelperName("__makeTemplateObject"),void 0,[r,n])}(t,e.createArrayLiteral(s),e.createArrayLiteral(c));if(e.isExternalModule(r)){var m=e.createUniqueName("templateObject");p=m,a=e.append(a,e.createVariableDeclaration(p)),o[0]=e.createLogicalOr(m,e.createAssignment(m,f))}else o[0]=f;return e.createCall(i,void 0,o)}(n);case 206:return function(t){var r=[];(function(t,r){(function(t){return e.Debug.assert(0!==t.templateSpans.length),0!==t.head.text.length||0===t.templateSpans[0].literal.text.length})(r)&&t.push(e.createLiteral(r.head.text))})(r,t),function(t,r){for(var n=0,i=r.templateSpans;n<i.length;n++){var a=i[n];t.push(e.visitNode(a.expression,v,e.isExpression)),0!==a.literal.text.length&&t.push(e.createLiteral(a.literal.text))}}(r,t);var n=e.reduceLeft(r,e.createAdd);return e.nodeIsSynthesized(n)&&(n.pos=t.pos,n.end=t.end),n}(n);case 207:return function(r){return e.visitEachChild(r,v,t)}(n);case 208:return function(t){return e.visitNode(t.expression,v,e.isExpression)}(n);case 98:return Se(!1);case 100:return function(t){return 2&i&&(i|=16384),o?2&i?(o.containsLexicalThis=!0,t):o.thisName||(o.thisName=e.createUniqueName("this")):t}(n);case 214:return function(t){return 95===t.keywordToken&&"target"===t.name.escapedText?(i|=8192,e.createFileLevelUniqueName("_newTarget")):t}(n);case 156:return function(t){e.Debug.assert(!e.isComputedPropertyName(t.name));var r=R(t,e.moveRangePos(t,-1),void 0,void 0);return e.setEmitFlags(r,512|e.getEmitFlags(r)),e.setTextRange(e.createPropertyAssignment(t.name,r),t)}(n);case 158:case 159:return function(r){e.Debug.assert(!e.isComputedPropertyName(r.name));var n=o;o=void 0;var i,a=g(8094,65),s=e.visitParameterList(r.parameters,v,t),c=B(r);return i=158===r.kind?e.updateGetAccessor(r,r.decorators,r.modifiers,r.name,s,r.type,c):e.updateSetAccessor(r,r.decorators,r.modifiers,r.name,s,c),y(a,24576,0),o=n,i}(n);case 219:return function(r){var n,i=g(0,e.hasModifier(r,1)?32:0);if(o&&0==(3&r.declarationList.flags)){for(var a=void 0,s=0,c=r.declarationList.declarations;s<c.length;s++){var u=c[s];if(ae(o,u),u.initializer){var l=void 0;e.isBindingPattern(u.name)?l=e.flattenDestructuringAssignment(u,v,t,0):(l=e.createBinary(u.name,59,e.visitNode(u.initializer,v,e.isExpression)),e.setTextRange(l,u)),a=e.append(a,l)}}n=a?e.setTextRange(e.createExpressionStatement(e.inlineExpressions(a)),r):void 0}else n=e.visitEachChild(r,v,t);return y(i,0,0),n}(n);case 230:return function(r){return o?(o.nonLocalJumps|=8,h(r)&&(r=D(r)),e.createReturn(e.createObjectLiteral([e.createPropertyAssignment(e.createIdentifier("value"),r.expression?e.visitNode(r.expression,v,e.isExpression):e.createVoidZero())]))):h(r)?D(r):e.visitEachChild(r,v,t)}(n);default:return e.visitEachChild(n,v,t)}}(n):n}function b(e){return 98===e.kind?Se(!0):v(e)}function D(t){return e.setOriginalNode(e.createReturn(e.createFileLevelUniqueName("_this")),t)}function x(r){r.name&&Te();var a=e.getClassExtendsHeritageElement(r),s=e.createFunctionExpression(void 0,void 0,void 0,void 0,a?[e.createParameter(void 0,void 0,void 0,e.createFileLevelUniqueName("_super"))]:[],void 0,function(r,a){var s=[];c(),function(r,n,i){i&&r.push(e.setTextRange(e.createExpressionStatement(function(t,r){return t.requestEmitHelper(e.extendsHelper),e.createCall(e.getHelperName("__extends"),void 0,[r,e.createFileLevelUniqueName("_super")])}(t,e.getInternalName(n))),i))}(s,r,a),function(r,n,a){var s=o;o=void 0;var c=g(8086,73),_=e.getFirstConstructorWithBody(n),d=function(t,r){if(!t||!r)return!1;if(e.some(t.parameters))return!1;var n=e.firstOrUndefined(t.body.statements);if(!n||!e.nodeIsSynthesized(n)||221!==n.kind)return!1;var i=n.expression;if(!e.nodeIsSynthesized(i)||191!==i.kind)return!1;var a=i.expression;if(!e.nodeIsSynthesized(a)||98!==a.kind)return!1;var o=e.singleOrUndefined(i.arguments);if(!o||!e.nodeIsSynthesized(o)||208!==o.kind)return!1;var s=o.expression;return e.isIdentifier(s)&&"arguments"===s.escapedText}(_,void 0!==a),p=e.createFunctionDeclaration(void 0,void 0,void 0,e.getInternalName(n),void 0,function(r,n){return e.visitParameterList(r&&!n?r.parameters:void 0,v,t)||[]}(_,d),void 0,function(t,r,n,a){var o=!!n&&96!==e.skipOuterExpressions(n.expression).kind;if(!t)return function(t,r){var n=[];u(),e.mergeLexicalEnvironment(n,l()),r&&n.push(e.createReturn(T()));var i=e.createNodeArray(n);e.setTextRange(i,t.members);var a=e.createBlock(i,!0);return e.setTextRange(a,t),e.setEmitFlags(a,1536),a}(r,o);var s=[],c=[];u();var _,d=0;if(a||(d=e.addStandardPrologue(s,t.body.statements,!1)),E(c,t),A(c,t,a),a||(d=e.addCustomPrologue(c,t.body.statements,d,v)),a)_=T();else if(o&&d<t.body.statements.length){var p=t.body.statements[d];e.isExpressionStatement(p)&&e.isSuperCall(p.expression)&&(_=function(e){return ge(e,!1)}(p.expression))}if(_&&(i|=4096,d++),e.addRange(c,e.visitNodes(t.body.statements,v,e.isStatement,d)),e.mergeLexicalEnvironment(s,l()),w(s,t,!1),o)if(!_||d!==t.body.statements.length||2048&t.body.transformFlags)P(c,t,_||S()),function t(r){if(230===r.kind)return!0;if(222===r.kind){var n=r;if(n.elseStatement)return t(n.thenStatement)&&t(n.elseStatement)}else if(218===r.kind){var i=e.lastOrUndefined(r.statements);if(i&&t(i))return!0}return!1}(t.body)||c.push(e.createReturn(e.createFileLevelUniqueName("_this")));else{var f=e.cast(e.cast(_,e.isBinaryExpression).left,e.isCallExpression),m=e.createReturn(_);e.setCommentRange(m,e.getCommentRange(f)),e.setEmitFlags(f,1536),c.push(m)}else F(s,t);var g=e.createBlock(e.setTextRange(e.createNodeArray(e.concatenate(s,c)),t.body.statements),!0);return e.setTextRange(g,t.body),g}(_,n,a,d));e.setTextRange(p,_||n),a&&e.setEmitFlags(p,8),r.push(p),y(c,24576,0),o=s}(s,r,a),function(t,r){for(var n=0,i=r.members;n<i.length;n++){var a=i[n];switch(a.kind){case 217:t.push(I(a));break;case 156:t.push(O(Ee(r,a),a,r));break;case 158:case 159:var o=e.getAllAccessorDeclarations(r.members,a);a===o.firstAccessor&&t.push(M(Ee(r,a),o,r));break;case 157:break;default:e.Debug.failBadSyntaxKind(r)}}}(s,r);var _=e.createTokenRange(e.skipTrivia(n,r.members.end),19),d=e.getInternalName(r),p=e.createPartiallyEmittedExpression(d);p.end=_.end,e.setEmitFlags(p,1536);var f=e.createReturn(p);f.pos=_.pos,e.setEmitFlags(f,1920),s.push(f),e.insertStatementsAfterStandardPrologue(s,l());var m=e.createBlock(e.setTextRange(e.createNodeArray(s),r.members),!0);return e.setEmitFlags(m,1536),m}(r,a));e.setEmitFlags(s,65536&e.getEmitFlags(r)|524288);var _=e.createPartiallyEmittedExpression(s);_.end=r.end,e.setEmitFlags(_,1536);var d=e.createPartiallyEmittedExpression(_);d.end=e.skipTrivia(n,r.pos),e.setEmitFlags(d,1536);var p=e.createParen(e.createCall(d,void 0,a?[e.visitNode(a.expression,v,e.isExpression)]:[]));return e.addSyntheticLeadingComment(p,3,"* @class "),p}function S(){return e.setEmitFlags(e.createThis(),4)}function T(){return e.createLogicalOr(e.createLogicalAnd(e.createStrictInequality(e.createFileLevelUniqueName("_super"),e.createNull()),e.createFunctionApply(e.createFileLevelUniqueName("_super"),S(),e.createIdentifier("arguments"))),S())}function C(t){return void 0!==t.initializer||e.isBindingPattern(t.name)}function E(t,r){if(!e.some(r.parameters,C))return!1;for(var n=!1,i=0,a=r.parameters;i<a.length;i++){var o=a[i],s=o.name,c=o.initializer;o.dotDotDotToken||(e.isBindingPattern(s)?n=k(t,o,s,c)||n:c&&(N(t,o,s,c),n=!0))}return n}function k(r,n,i,a){return i.elements.length>0?(e.insertStatementAfterCustomPrologue(r,e.setEmitFlags(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(n,v,t,0,e.getGeneratedNameForNode(n)))),1048576)),!0):!!a&&(e.insertStatementAfterCustomPrologue(r,e.setEmitFlags(e.createExpressionStatement(e.createAssignment(e.getGeneratedNameForNode(n),e.visitNode(a,v,e.isExpression))),1048576)),!0)}function N(t,r,n,i){i=e.visitNode(i,v,e.isExpression);var a=e.createIf(e.createTypeCheck(e.getSynthesizedClone(n),"undefined"),e.setEmitFlags(e.setTextRange(e.createBlock([e.createExpressionStatement(e.setEmitFlags(e.setTextRange(e.createAssignment(e.setEmitFlags(e.getMutableClone(n),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),r),1536))]),r),1953));e.startOnNewLine(a),e.setTextRange(a,r),e.setEmitFlags(a,1050528),e.insertStatementAfterCustomPrologue(t,a)}function A(r,n,i){var a=[],o=e.lastOrUndefined(n.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(o,i))return!1;var s=72===o.name.kind?e.getMutableClone(o.name):e.createTempVariable(void 0);e.setEmitFlags(s,48);var c=72===o.name.kind?e.getSynthesizedClone(o.name):s,u=n.parameters.length-1,l=e.createLoopVariable();a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(s,void 0,e.createArrayLiteral([]))])),o),1048576));var _=e.createFor(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(l,void 0,e.createLiteral(u))]),o),e.setTextRange(e.createLessThan(l,e.createPropertyAccess(e.createIdentifier("arguments"),"length")),o),e.setTextRange(e.createPostfixIncrement(l),o),e.createBlock([e.startOnNewLine(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.createElementAccess(c,0===u?l:e.createSubtract(l,e.createLiteral(u))),e.createElementAccess(e.createIdentifier("arguments"),l))),o))]));return e.setEmitFlags(_,1048576),e.startOnNewLine(_),a.push(_),72!==o.name.kind&&a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(o,v,t,0,c))),o),1048576)),e.insertStatementsAfterCustomPrologue(r,a),!0}function F(t,r){return!!(16384&i&&197!==r.kind)&&(P(t,r,e.createThis()),!0)}function P(t,r,n){Ce();var i=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_this"),void 0,n)]));e.setEmitFlags(i,1050112),e.setSourceMapRange(i,r),e.insertStatementAfterCustomPrologue(t,i)}function w(t,r,n){if(8192&i){var a=void 0;switch(r.kind){case 197:return t;case 156:case 158:case 159:a=e.createVoidZero();break;case 157:a=e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor");break;case 239:case 196:a=e.createConditional(e.createLogicalAnd(e.setEmitFlags(e.createThis(),4),e.createBinary(e.setEmitFlags(e.createThis(),4),94,e.getLocalName(r))),e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor"),e.createVoidZero());break;default:return e.Debug.failBadSyntaxKind(r)}var o=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_newTarget"),void 0,a)]));e.setEmitFlags(o,1050112),n&&(t=t.slice()),e.insertStatementAfterCustomPrologue(t,o)}return t}function I(t){return e.setTextRange(e.createEmptyStatement(),t)}function O(t,r,n){var i=e.getCommentRange(r),a=e.getSourceMapRange(r),o=e.createMemberAccessForPropertyName(t,e.visitNode(r.name,v,e.isPropertyName),r.name),s=R(r,r,void 0,n);e.setEmitFlags(s,1536),e.setSourceMapRange(s,a);var c=e.setTextRange(e.createExpressionStatement(e.createAssignment(o,s)),r);return e.setOriginalNode(c,r),e.setCommentRange(c,i),e.setEmitFlags(c,48),c}function M(t,r,n){var i=e.createExpressionStatement(L(t,r,n,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(r.firstAccessor)),i}function L(t,r,n,i){var a=r.firstAccessor,o=r.getAccessor,s=r.setAccessor,c=e.getMutableClone(t);e.setEmitFlags(c,1568),e.setSourceMapRange(c,a.name);var u=e.createExpressionForPropertyName(e.visitNode(a.name,v,e.isPropertyName));e.setEmitFlags(u,1552),e.setSourceMapRange(u,a.name);var l=[];if(o){var _=R(o,void 0,void 0,n);e.setSourceMapRange(_,e.getSourceMapRange(o)),e.setEmitFlags(_,512);var d=e.createPropertyAssignment("get",_);e.setCommentRange(d,e.getCommentRange(o)),l.push(d)}if(s){var p=R(s,void 0,void 0,n);e.setSourceMapRange(p,e.getSourceMapRange(s)),e.setEmitFlags(p,512);var f=e.createPropertyAssignment("set",p);e.setCommentRange(f,e.getCommentRange(s)),l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue()),e.createPropertyAssignment("configurable",e.createTrue()));var m=e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[c,u,e.createObjectLiteral(l,!0)]);return i&&e.startOnNewLine(m),m}function R(r,n,a,s){var c=o;o=void 0;var u=s&&e.isClassLike(s)&&!e.hasModifier(r,32)?g(8094,73):g(8094,65),l=e.visitParameterList(r.parameters,v,t),_=B(r);return 8192&i&&!a&&(239===r.kind||196===r.kind)&&(a=e.getGeneratedNameForNode(r)),y(u,24576,0),o=c,e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,r.asteriskToken,a,void 0,l,void 0,_),n),r)}function B(t){var n,i,a,o=!1,s=!1,c=[],_=[],d=t.body;if(u(),e.isBlock(d)&&(a=e.addStandardPrologue(c,d.statements,!1)),o=E(_,t)||o,o=A(_,t,!1)||o,e.isBlock(d))a=e.addCustomPrologue(_,d.statements,a,v),n=d.statements,e.addRange(_,e.visitNodes(d.statements,v,e.isStatement,a)),!o&&d.multiLine&&(o=!0);else{e.Debug.assert(197===t.kind),n=e.moveRangeEnd(d,-1);var p=t.equalsGreaterThanToken;e.nodeIsSynthesized(p)||e.nodeIsSynthesized(d)||(e.rangeEndIsOnSameLineAsRangeStart(p,d,r)?s=!0:o=!0);var f=e.visitNode(d,v,e.isExpression),m=e.createReturn(f);e.setTextRange(m,d),e.moveSyntheticComments(m,d),e.setEmitFlags(m,1440),_.push(m),i=d}if(e.mergeLexicalEnvironment(c,l()),w(c,t,!1),F(c,t),e.some(c)&&(o=!0),_.unshift.apply(_,c),e.isBlock(d)&&e.arrayIsEqualTo(_,d.statements))return d;var g=e.createBlock(e.setTextRange(e.createNodeArray(_),n),o);return e.setTextRange(g,t.body),!o&&s&&e.setEmitFlags(g,1),i&&e.setTokenSourceMapRange(g,19,i),e.setOriginalNode(g,t.body),g}function j(r,n){if(!n)switch(r.expression.kind){case 195:return e.updateParen(r,j(r.expression,!1));case 204:return e.updateParen(r,J(r.expression,!1))}return e.visitEachChild(r,v,t)}function J(r,n){return e.isDestructuringAssignment(r)?e.flattenDestructuringAssignment(r,v,t,0,n):e.visitEachChild(r,v,t)}function z(r){var n=r.name;if(e.isBindingPattern(n))return K(r);if(!r.initializer&&function(e){var t=p.getNodeCheckFlags(e),r=262144&t,n=524288&t;return!(0!=(64&i)||r&&n&&0!=(512&i))&&0==(2048&i)&&(!p.isDeclarationWithCollidingName(e)||n&&!r&&0==(3072&i))}(r)){var a=e.getMutableClone(r);return a.initializer=e.createVoidZero(),a}return e.visitEachChild(r,v,t)}function K(r){var n,i=g(32,0);return n=e.isBindingPattern(r.name)?e.flattenDestructuringBinding(r,v,t,0,void 0,0!=(32&i)):e.visitEachChild(r,v,t),y(i,0,0),n}function U(t){o.labels.set(e.idText(t.label),!0)}function V(t){o.labels.set(e.idText(t.label),!1)}function q(r,n,a,s,u){var _=g(r,n),d=function(r,n,a){if(!ne(r)){var s=void 0;o&&(s=o.allowedNonLabeledJumps,o.allowedNonLabeledJumps=6);var u=a?a(r,n,void 0):e.restoreEnclosingLabel(e.visitEachChild(r,v,t),n,o&&V);return o&&(o.allowedNonLabeledJumps=s),u}var _=function(t){var r;switch(t.kind){case 225:case 226:case 227:var n=t.initializer;n&&238===n.kind&&(r=n)}var i=[],a=[];if(r&&3&e.getCombinedNodeFlags(r))for(var s=te(t),c=0,u=r.declarations;c<u.length;c++){var l=u[c];de(t,l,i,a,s)}var _={loopParameters:i,loopOutParameters:a};return o&&(o.argumentsName&&(_.argumentsName=o.argumentsName),o.thisName&&(_.thisName=o.thisName),o.hoistedLocalVariables&&(_.hoistedLocalVariables=o.hoistedLocalVariables)),_}(r),d=[],p=o;o=_;var f,m,g,y,h,b=te(r)?function(t,r){var n=e.createUniqueName("_loop_init"),a=0!=(131072&t.initializer.transformFlags),o=0;r.containsLexicalThis&&(o|=8),a&&4&i&&(o|=262144);var s=[];s.push(e.createVariableStatement(void 0,t.initializer)),ue(r.loopOutParameters,2,1,s);var c=e.createVariableStatement(void 0,e.setEmitFlags(e.createVariableDeclarationList([e.createVariableDeclaration(n,void 0,e.setEmitFlags(e.createFunctionExpression(void 0,a?e.createToken(40):void 0,void 0,void 0,void 0,void 0,e.visitNode(e.createBlock(s,!0),v,e.isBlock)),o))]),2097152)),u=e.createVariableDeclarationList(e.map(r.loopOutParameters,se));return{functionName:n,containsYield:a,functionDeclaration:c,part:u}}(r,_):void 0,D=ie(r)?function(t,r,n){var a=e.createUniqueName("_loop");c();var o=e.visitNode(t.statement,v,e.isStatement,e.liftToBlock),s=l(),u=[];(re(t)||function(t){return e.isForStatement(t)&&!!t.incrementor&&ee(t.incrementor)}(t))&&(r.conditionVariable=e.createUniqueName("inc"),u.push(e.createIf(r.conditionVariable,e.createStatement(e.visitNode(t.incrementor,v,e.isExpression)),e.createStatement(e.createAssignment(r.conditionVariable,e.createTrue())))),re(t)&&u.push(e.createIf(e.createPrefix(52,e.visitNode(t.condition,v,e.isExpression)),e.visitNode(e.createBreak(),v,e.isStatement)))),e.isBlock(o)?e.addRange(u,o.statements):u.push(o),ue(r.loopOutParameters,1,1,u),e.insertStatementsAfterStandardPrologue(u,s);var _=e.createBlock(u,!0);e.isBlock(o)&&e.setOriginalNode(_,o);var d=0!=(131072&t.statement.transformFlags),p=0;r.containsLexicalThis&&(p|=8),d&&0!=(4&i)&&(p|=262144);var f=e.createVariableStatement(void 0,e.setEmitFlags(e.createVariableDeclarationList([e.createVariableDeclaration(a,void 0,e.setEmitFlags(e.createFunctionExpression(void 0,d?e.createToken(40):void 0,void 0,void 0,r.loopParameters,void 0,_),p))]),2097152)),m=function(t,r,n,i){var a=[],o=!(-5&r.nonLocalJumps||r.labeledNonLocalBreaks||r.labeledNonLocalContinues),s=e.createCall(t,void 0,e.map(r.loopParameters,function(e){return e.name})),c=i?e.createYield(e.createToken(40),e.setEmitFlags(s,8388608)):s;if(o)a.push(e.createExpressionStatement(c)),ue(r.loopOutParameters,1,0,a);else{var u=e.createUniqueName("state"),l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(u,void 0,c)]));if(a.push(l),ue(r.loopOutParameters,1,0,a),8&r.nonLocalJumps){var _=void 0;n?(n.nonLocalJumps|=8,_=e.createReturn(u)):_=e.createReturn(e.createPropertyAccess(u,"value")),a.push(e.createIf(e.createBinary(e.createTypeOf(u),35,e.createLiteral("object")),_))}if(2&r.nonLocalJumps&&a.push(e.createIf(e.createBinary(u,35,e.createLiteral("break")),e.createBreak())),r.labeledNonLocalBreaks||r.labeledNonLocalContinues){var d=[];_e(r.labeledNonLocalBreaks,!0,u,n,d),_e(r.labeledNonLocalContinues,!1,u,n,d),a.push(e.createSwitch(u,e.createCaseBlock(d)))}}return a}(a,r,n,d);return{functionName:a,containsYield:d,functionDeclaration:f,part:m}}(r,_,p):void 0;if(o=p,b&&d.push(b.functionDeclaration),D&&d.push(D.functionDeclaration),function(t,r,n){var i;if(r.argumentsName&&(n?n.argumentsName=r.argumentsName:(i||(i=[])).push(e.createVariableDeclaration(r.argumentsName,void 0,e.createIdentifier("arguments")))),r.thisName&&(n?n.thisName=r.thisName:(i||(i=[])).push(e.createVariableDeclaration(r.thisName,void 0,e.createIdentifier("this")))),r.hoistedLocalVariables)if(n)n.hoistedLocalVariables=r.hoistedLocalVariables;else{i||(i=[]);for(var a=0,o=r.hoistedLocalVariables;a<o.length;a++){var s=o[a];i.push(e.createVariableDeclaration(s))}}if(r.loopOutParameters.length){i||(i=[]);for(var c=0,u=r.loopOutParameters;c<u.length;c++){var l=u[c];i.push(e.createVariableDeclaration(l.outParamName))}}r.conditionVariable&&(i||(i=[]),i.push(e.createVariableDeclaration(r.conditionVariable,void 0,e.createFalse()))),i&&t.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(i)))}(d,_,p),b&&d.push((m=b.functionName,g=b.containsYield,y=e.createCall(m,void 0,[]),h=g?e.createYield(e.createToken(40),e.setEmitFlags(y,8388608)):y,e.createStatement(h))),D)if(a)f=a(r,n,D.part);else{var x=oe(r,b,e.createBlock(D.part,!0));e.aggregateTransformFlags(x),f=e.restoreEnclosingLabel(x,n,o&&V)}else{var S=oe(r,b,e.visitNode(r.statement,v,e.isStatement,e.liftToBlock));e.aggregateTransformFlags(S),f=e.restoreEnclosingLabel(S,n,o&&V)}return d.push(f),d}(a,s,u);return y(_,0,0),d}function W(e,t){return q(0,256,e,t)}function H(e,t){return q(3008,1280,e,t)}function G(e,t){return q(1984,2304,e,t)}function Y(e,t){return q(1984,2304,e,t,d.downlevelIteration?Z:$)}function X(r,n,i){var a=[],o=r.initializer;if(e.isVariableDeclarationList(o)){3&r.initializer.flags&&Te();var s=e.firstOrUndefined(o.declarations);if(s&&e.isBindingPattern(s.name)){var c=e.flattenDestructuringBinding(s,v,t,0,n),u=e.setTextRange(e.createVariableDeclarationList(c),r.initializer);e.setOriginalNode(u,r.initializer),e.setSourceMapRange(u,e.createRange(c[0].pos,e.last(c).end)),a.push(e.createVariableStatement(void 0,u))}else a.push(e.setTextRange(e.createVariableStatement(void 0,e.setOriginalNode(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(s?s.name:e.createTempVariable(void 0),void 0,n)]),e.moveRangePos(o,-1)),o)),e.moveRangeEnd(o,-1)))}else{var l=e.createAssignment(o,n);e.isDestructuringAssignment(l)?(e.aggregateTransformFlags(l),a.push(e.createExpressionStatement(J(l,!1)))):(l.end=o.end,a.push(e.setTextRange(e.createExpressionStatement(e.visitNode(l,v,e.isExpression)),e.moveRangeEnd(o,-1))))}if(i)return Q(e.addRange(a,i));var _=e.visitNode(r.statement,v,e.isStatement,e.liftToBlock);return e.isBlock(_)?e.updateBlock(_,e.setTextRange(e.createNodeArray(e.concatenate(a,_.statements)),_.statements)):(a.push(_),Q(a))}function Q(t){return e.setEmitFlags(e.createBlock(e.createNodeArray(t),!0),432)}function $(t,r,n){var i=e.visitNode(t.expression,v,e.isExpression),a=e.createLoopVariable(),s=e.isIdentifier(i)?e.getGeneratedNameForNode(i):e.createTempVariable(void 0);e.setEmitFlags(i,48|e.getEmitFlags(i));var c=e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(a,void 0,e.createLiteral(0)),e.moveRangePos(t.expression,-1)),e.setTextRange(e.createVariableDeclaration(s,void 0,i),t.expression)]),t.expression),2097152),e.setTextRange(e.createLessThan(a,e.createPropertyAccess(s,"length")),t.expression),e.setTextRange(e.createPostfixIncrement(a),t.expression),X(t,e.createElementAccess(s,a),n)),t);return e.setEmitFlags(c,256),e.setTextRange(c,t),e.restoreEnclosingLabel(c,r,o&&V)}function Z(r,n,i){var a=e.visitNode(r.expression,v,e.isExpression),s=e.isIdentifier(a)?e.getGeneratedNameForNode(a):e.createTempVariable(void 0),c=e.isIdentifier(a)?e.getGeneratedNameForNode(s):e.createTempVariable(void 0),u=e.createUniqueName("e"),l=e.getGeneratedNameForNode(u),d=e.createTempVariable(void 0),p=e.createValuesHelper(t,a,r.expression),f=e.createCall(e.createPropertyAccess(s,"next"),void 0,[]);_(u),_(d);var m=e.setEmitFlags(e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(s,void 0,p),r.expression),e.createVariableDeclaration(c,void 0,f)]),r.expression),2097152),e.createLogicalNot(e.createPropertyAccess(c,"done")),e.createAssignment(c,f),X(r,e.createPropertyAccess(c,"value"),i)),r),256);return e.createTry(e.createBlock([e.restoreEnclosingLabel(m,n,o&&V)]),e.createCatchClause(e.createVariableDeclaration(l),e.setEmitFlags(e.createBlock([e.createExpressionStatement(e.createAssignment(u,e.createObjectLiteral([e.createPropertyAssignment("error",l)])))]),1)),e.createBlock([e.createTry(e.createBlock([e.setEmitFlags(e.createIf(e.createLogicalAnd(e.createLogicalAnd(c,e.createLogicalNot(e.createPropertyAccess(c,"done"))),e.createAssignment(d,e.createPropertyAccess(s,"return"))),e.createExpressionStatement(e.createFunctionCall(d,s,[]))),1)]),void 0,e.setEmitFlags(e.createBlock([e.setEmitFlags(e.createIf(u,e.createThrow(e.createPropertyAccess(u,"error"))),1)]),1))]))}function ee(e){return 0!=(131072&p.getNodeCheckFlags(e))}function te(t){return e.isForStatement(t)&&!!t.initializer&&ee(t.initializer)}function re(t){return e.isForStatement(t)&&!!t.condition&&ee(t.condition)}function ne(e){return ie(e)||te(e)}function ie(e){return 0!=(65536&p.getNodeCheckFlags(e))}function ae(t,r){t.hoistedLocalVariables||(t.hoistedLocalVariables=[]),function r(n){if(72===n.kind)t.hoistedLocalVariables.push(n);else for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||r(o.name)}}(r.name)}function oe(t,r,n){switch(t.kind){case 225:return function(t,r,n){var i=t.condition&&ee(t.condition),a=i||t.incrementor&&ee(t.incrementor);return e.updateFor(t,e.visitNode(r?r.part:t.initializer,v,e.isForInitializer),e.visitNode(i?void 0:t.condition,v,e.isExpression),e.visitNode(a?void 0:t.incrementor,v,e.isExpression),n)}(t,r,n);case 226:return function(t,r){return e.updateForIn(t,e.visitNode(t.initializer,v,e.isForInitializer),e.visitNode(t.expression,v,e.isExpression),r)}(t,n);case 227:return function(t,r){return e.updateForOf(t,void 0,e.visitNode(t.initializer,v,e.isForInitializer),e.visitNode(t.expression,v,e.isExpression),r)}(t,n);case 223:return function(t,r){return e.updateDo(t,r,e.visitNode(t.expression,v,e.isExpression))}(t,n);case 224:return function(t,r){return e.updateWhile(t,e.visitNode(t.expression,v,e.isExpression),r)}(t,n);default:return e.Debug.failBadSyntaxKind(t,"IterationStatement expected")}}function se(t){return e.createVariableDeclaration(t.originalName,void 0,t.outParamName)}function ce(t,r){var n=0===r?t.outParamName:t.originalName,i=0===r?t.originalName:t.outParamName;return e.createBinary(i,59,n)}function ue(t,r,n,i){for(var a=0,o=t;a<o.length;a++){var s=o[a];s.flags&r&&i.push(e.createExpressionStatement(ce(s,n)))}}function le(t,r,n,i){r?(t.labeledNonLocalBreaks||(t.labeledNonLocalBreaks=e.createMap()),t.labeledNonLocalBreaks.set(n,i)):(t.labeledNonLocalContinues||(t.labeledNonLocalContinues=e.createMap()),t.labeledNonLocalContinues.set(n,i))}function _e(t,r,n,i,a){t&&t.forEach(function(t,o){var s=[];if(!i||i.labels&&i.labels.get(o)){var c=e.createIdentifier(o);s.push(r?e.createBreak(c):e.createContinue(c))}else le(i,r,o,t),s.push(e.createReturn(n));a.push(e.createCaseClause(e.createLiteral(t),s))})}function de(t,r,n,i,a){var o=r.name;if(e.isBindingPattern(o))for(var s=0,c=o.elements;s<c.length;s++){var u=c[s];e.isOmittedExpression(u)||de(t,u,n,i,a)}else{n.push(e.createParameter(void 0,void 0,void 0,o));var l=p.getNodeCheckFlags(r);if(4194304&l||a){var _=e.createUniqueName("out_"+e.idText(o)),d=0;4194304&l&&(d|=1),e.isForStatement(t)&&t.initializer&&p.isBindingCapturedByNode(t.initializer,r)&&(d|=2),i.push({flags:d,originalName:o,outParamName:_})}}}function pe(t,r,n){var i=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,v,e.isPropertyName)),e.visitNode(t.initializer,v,e.isExpression));return e.setTextRange(i,t),n&&e.startOnNewLine(i),i}function fe(t,r,n){var i=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,v,e.isPropertyName)),e.getSynthesizedClone(t.name));return e.setTextRange(i,t),n&&e.startOnNewLine(i),i}function me(t,r,n,i){var a=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,v,e.isPropertyName)),R(t,t,void 0,n));return e.setTextRange(a,t),i&&e.startOnNewLine(a),a}function ge(r,n){if(4096&r.transformFlags||98===r.expression.kind||e.isSuperProperty(e.skipOuterExpressions(r.expression))){var i=e.createCallBinding(r.expression,_),a=i.target,o=i.thisArg;98===r.expression.kind&&e.setEmitFlags(o,4);var s=void 0;if(s=4096&r.transformFlags?e.createFunctionApply(e.visitNode(a,b,e.isExpression),98===r.expression.kind?o:e.visitNode(o,v,e.isExpression),ye(r.arguments,!1,!1,!1)):e.createFunctionCall(e.visitNode(a,b,e.isExpression),98===r.expression.kind?o:e.visitNode(o,v,e.isExpression),e.visitNodes(r.arguments,v,e.isExpression),r),98===r.expression.kind){var c=e.createLogicalOr(s,S());s=n?e.createAssignment(e.createFileLevelUniqueName("_this"),c):c}return e.setOriginalNode(s,r)}return e.visitEachChild(r,v,t)}function ye(r,n,i,a){var o=r.length,s=e.flatten(e.spanMap(r,he,function(e,t,r,n){return t(e,i,a&&n===o)}));if(d.downlevelIteration){if(1===s.length){var c=s[0];if(e.isCallExpression(c)&&e.isIdentifier(c.expression)&&4096&e.getEmitFlags(c.expression)&&"___spread"===c.expression.escapedText)return s[0]}return e.createSpreadHelper(t,s)}if(1===s.length){var u=r[0];return n&&e.isSpreadElement(u)&&187!==u.expression.kind?e.createArraySlice(s[0]):s[0]}return e.createArrayConcat(s.shift(),s)}function he(t){return e.isSpreadElement(t)?ve:be}function ve(t){return e.map(t,De)}function be(t,r,n){return e.createArrayLiteral(e.visitNodes(e.createNodeArray(t,n),v,e.isExpression),r)}function De(t){return e.visitNode(t.expression,v,e.isExpression)}function xe(t){var n=e.getSourceTextOfNodeFromSourceFile(r,t),i=14===t.kind||17===t.kind;return n=(n=n.substring(1,n.length-(i?1:2))).replace(/\r\n?/g,"\n"),e.setTextRange(e.createLiteral(n),t)}function Se(t){return 8&i&&!t?e.createPropertyAccess(e.createFileLevelUniqueName("_super"),"prototype"):e.createFileLevelUniqueName("_super")}function Te(){0==(2&s)&&(s|=2,t.enableSubstitution(72))}function Ce(){0==(1&s)&&(s|=1,t.enableSubstitution(100),t.enableEmitNotification(157),t.enableEmitNotification(156),t.enableEmitNotification(158),t.enableEmitNotification(159),t.enableEmitNotification(197),t.enableEmitNotification(196),t.enableEmitNotification(239))}function Ee(t,r){return e.hasModifier(r,32)?e.getInternalName(t):e.createPropertyAccess(e.getInternalName(t),"prototype")}},e.extendsHelper={name:"typescript:extends",scoped:!1,priority:0,text:"\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"},e.templateObjectHelper={name:"typescript:makeTemplateObject",scoped:!1,priority:0,text:'\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };'}}(c||(c={})),function(e){e.transformES5=function(t){var r,n,i=t.getCompilerOptions();1!==i.jsx&&3!==i.jsx||(r=t.onEmitNode,t.onEmitNode=function(t,i,a){switch(i.kind){case 262:case 263:case 261:var o=i.tagName;n[e.getOriginalNodeId(o)]=!0}r(t,i,a)},t.enableEmitNotification(262),t.enableEmitNotification(263),t.enableEmitNotification(261),n=[]);var a=t.onSubstituteNode;return t.onSubstituteNode=function(t,r){return r.id&&n&&n[r.id]?a(t,r):(r=a(t,r),e.isPropertyAccessExpression(r)?function(t){var r=o(t.name);return r?e.setTextRange(e.createElementAccess(t.expression,r),t):t}(r):e.isPropertyAssignment(r)?function(t){var r=e.isIdentifier(t.name)&&o(t.name);return r?e.updatePropertyAssignment(t,r,t.initializer):t}(r):r)},t.enableSubstitution(189),t.enableSubstitution(275),e.chainBundle(function(e){return e});function o(t){var r=t.originalKeywordKind||(e.nodeIsSynthesized(t)?e.stringToToken(e.idText(t)):void 0);if(void 0!==r&&r>=73&&r<=108)return e.setTextRange(e.createLiteral(t),t)}}}(c||(c={})),function(e){var t,r,n,i,a;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(t||(t={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(r||(r={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(n||(n={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(i||(i={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(a||(a={})),e.transformGenerators=function(t){var r,n,i,a,o,s,c,u,l,_,d=t.resumeLexicalEnvironment,p=t.endLexicalEnvironment,f=t.hoistFunctionDeclaration,m=t.hoistVariableDeclaration,g=t.getCompilerOptions(),y=e.getEmitScriptTarget(g),h=t.getEmitResolver(),v=t.onSubstituteNode;t.onSubstituteNode=function(t,i){return i=v(t,i),1===t?function(t){return e.isIdentifier(t)?function(t){if(!e.isGeneratedIdentifier(t)&&r&&r.has(e.idText(t))){var i=e.getOriginalNode(t);if(e.isIdentifier(i)&&i.parent){var a=h.getReferencedValueDeclaration(i);if(a){var o=n[e.getOriginalNodeId(a)];if(o){var s=e.getMutableClone(o);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t):t}(i):i};var b,D,x,S,T,C,E,k,N,A,F,P,w=1,I=0,O=0;return e.chainBundle(function(r){if(r.isDeclarationFile||0==(256&r.transformFlags))return r;var n=e.visitEachChild(r,M,t);return e.addEmitHelpers(n,t.readEmitHelpers()),n});function M(r){var n=r.transformFlags;return a?function(r){switch(r.kind){case 223:case 224:return function(r){return a?(re(),r=e.visitEachChild(r,M,t),ie(),r):e.visitEachChild(r,M,t)}(r);case 232:return function(r){return a&&$({kind:2,isScript:!0,breakLabel:-1}),r=e.visitEachChild(r,M,t),a&&ae(),r}(r);case 233:return function(r){return a&&$({kind:4,isScript:!0,labelText:e.idText(r.label),breakLabel:-1}),r=e.visitEachChild(r,M,t),a&&oe(),r}(r);default:return L(r)}}(r):i?L(r):e.isFunctionLikeDeclaration(r)&&r.asteriskToken?function(t){switch(t.kind){case 239:return R(t);case 196:return B(t);default:return e.Debug.failBadSyntaxKind(t)}}(r):256&n?e.visitEachChild(r,M,t):r}function L(r){switch(r.kind){case 239:return R(r);case 196:return B(r);case 158:case 159:return function(r){var n=i,o=a;return i=!1,a=!1,r=e.visitEachChild(r,M,t),i=n,a=o,r}(r);case 219:return function(t){if(131072&t.transformFlags)V(t.declarationList);else{if(1048576&e.getEmitFlags(t))return t;for(var r=0,n=t.declarationList.declarations;r<n.length;r++){var i=n[r];m(i.name)}var a=e.getInitializedVariables(t.declarationList);if(0!==a.length)return e.setSourceMapRange(e.createExpressionStatement(e.inlineExpressions(e.map(a,q))),t)}}(r);case 225:return function(r){a&&re();var n=r.initializer;if(n&&e.isVariableDeclarationList(n)){for(var i=0,o=n.declarations;i<o.length;i++){var s=o[i];m(s.name)}var c=e.getInitializedVariables(n);r=e.updateFor(r,c.length>0?e.inlineExpressions(e.map(c,q)):void 0,e.visitNode(r.condition,M,e.isExpression),e.visitNode(r.incrementor,M,e.isExpression),e.visitNode(r.statement,M,e.isStatement,e.liftToBlock))}else r=e.visitEachChild(r,M,t);return a&&ie(),r}(r);case 226:return function(r){a&&re();var n=r.initializer;if(e.isVariableDeclarationList(n)){for(var i=0,o=n.declarations;i<o.length;i++){var s=o[i];m(s.name)}r=e.updateForIn(r,n.declarations[0].name,e.visitNode(r.expression,M,e.isExpression),e.visitNode(r.statement,M,e.isStatement,e.liftToBlock))}else r=e.visitEachChild(r,M,t);return a&&ie(),r}(r);case 229:return function(r){if(a){var n=_e(r.label&&e.idText(r.label));if(n>0)return me(n,r)}return e.visitEachChild(r,M,t)}(r);case 228:return function(r){if(a){var n=de(r.label&&e.idText(r.label));if(n>0)return me(n,r)}return e.visitEachChild(r,M,t)}(r);case 230:return function(t){return r=e.visitNode(t.expression,M,e.isExpression),n=t,e.setTextRange(e.createReturn(e.createArrayLiteral(r?[fe(2),r]:[fe(2)])),n);var r,n}(r);default:return 131072&r.transformFlags?function(r){switch(r.kind){case 204:return function(r){var n=e.getExpressionAssociativity(r);switch(n){case 0:return function(r){if(W(r.right)){if(e.isLogicalOperator(r.operatorToken.kind))return function(t){var r=X(),n=Y();return he(n,e.visitNode(t.left,M,e.isExpression),t.left),54===t.operatorToken.kind?De(r,n,t.left):be(r,n,t.left),he(n,e.visitNode(t.right,M,e.isExpression),t.right),Q(r),n}(r);if(27===r.operatorToken.kind)return function(t){var r=[];return n(t.left),n(t.right),e.inlineExpressions(r);function n(t){e.isBinaryExpression(t)&&27===t.operatorToken.kind?(n(t.left),n(t.right)):(W(t)&&r.length>0&&(xe(1,[e.createExpressionStatement(e.inlineExpressions(r))]),r=[]),r.push(e.visitNode(t,M,e.isExpression)))}}(r);var n=e.getMutableClone(r);return n.left=G(e.visitNode(r.left,M,e.isExpression)),n.right=e.visitNode(r.right,M,e.isExpression),n}return e.visitEachChild(r,M,t)}(r);case 1:return function(r){var n,i=r.left,a=r.right;if(W(a)){var o=void 0;switch(i.kind){case 189:o=e.updatePropertyAccess(i,G(e.visitNode(i.expression,M,e.isLeftHandSideExpression)),i.name);break;case 190:o=e.updateElementAccess(i,G(e.visitNode(i.expression,M,e.isLeftHandSideExpression)),G(e.visitNode(i.argumentExpression,M,e.isExpression)));break;default:o=e.visitNode(i,M,e.isExpression)}var s=r.operatorToken.kind;return(n=s)>=60&&n<=71?e.setTextRange(e.createAssignment(o,e.setTextRange(e.createBinary(G(o),function(e){switch(e){case 60:return 38;case 61:return 39;case 62:return 40;case 63:return 41;case 64:return 42;case 65:return 43;case 66:return 46;case 67:return 47;case 68:return 48;case 69:return 49;case 70:return 50;case 71:return 51}}(s),e.visitNode(a,M,e.isExpression)),r)),r):e.updateBinary(r,o,e.visitNode(a,M,e.isExpression))}return e.visitEachChild(r,M,t)}(r);default:return e.Debug.assertNever(n)}}(r);case 205:return function(r){if(W(r.whenTrue)||W(r.whenFalse)){var n=X(),i=X(),a=Y();return De(n,e.visitNode(r.condition,M,e.isExpression),r.condition),he(a,e.visitNode(r.whenTrue,M,e.isExpression),r.whenTrue),ve(i),Q(n),he(a,e.visitNode(r.whenFalse,M,e.isExpression),r.whenFalse),Q(i),a}return e.visitEachChild(r,M,t)}(r);case 207:return function(r){var n,i=X(),a=e.visitNode(r.expression,M,e.isExpression);if(r.asteriskToken){var o=0==(8388608&e.getEmitFlags(r.expression))?e.createValuesHelper(t,a,r):a;!function(e,t){xe(7,[e],t)}(o,r)}else!function(e,t){xe(6,[e],t)}(a,r);return Q(i),n=r,e.setTextRange(e.createCall(e.createPropertyAccess(S,"sent"),void 0,[]),n)}(r);case 187:return function(e){return J(e.elements,void 0,void 0,e.multiLine)}(r);case 188:return function(t){var r=t.properties,n=t.multiLine,i=H(r),a=Y();he(a,e.createObjectLiteral(e.visitNodes(r,M,e.isObjectLiteralElementLike,0,i),n));var o=e.reduceLeft(r,function(r,i){W(i)&&r.length>0&&(ye(e.createExpressionStatement(e.inlineExpressions(r))),r=[]);var o=e.createExpressionForObjectLiteralElementLike(t,i,a),s=e.visitNode(o,M,e.isExpression);return s&&(n&&e.startOnNewLine(s),r.push(s)),r},[],i);return o.push(n?e.startOnNewLine(e.getMutableClone(a)):a),e.inlineExpressions(o)}(r);case 190:return function(r){if(W(r.argumentExpression)){var n=e.getMutableClone(r);return n.expression=G(e.visitNode(r.expression,M,e.isLeftHandSideExpression)),n.argumentExpression=e.visitNode(r.argumentExpression,M,e.isExpression),n}return e.visitEachChild(r,M,t)}(r);case 191:return function(r){if(!e.isImportCall(r)&&e.forEach(r.arguments,W)){var n=e.createCallBinding(r.expression,m,y,!0),i=n.target,a=n.thisArg;return e.setOriginalNode(e.createFunctionApply(G(e.visitNode(i,M,e.isLeftHandSideExpression)),a,J(r.arguments),r),r)}return e.visitEachChild(r,M,t)}(r);case 192:return function(r){if(e.forEach(r.arguments,W)){var n=e.createCallBinding(e.createPropertyAccess(r.expression,"bind"),m),i=n.target,a=n.thisArg;return e.setOriginalNode(e.setTextRange(e.createNew(e.createFunctionApply(G(e.visitNode(i,M,e.isExpression)),a,J(r.arguments,e.createVoidZero())),void 0,[]),r),r)}return e.visitEachChild(r,M,t)}(r);default:return e.visitEachChild(r,M,t)}}(r):262400&r.transformFlags?e.visitEachChild(r,M,t):r}}function R(r){if(r.asteriskToken)r=e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,r.modifiers,void 0,r.name,void 0,e.visitParameterList(r.parameters,M,t),void 0,j(r.body)),r),r);else{var n=i,o=a;i=!1,a=!1,r=e.visitEachChild(r,M,t),i=n,a=o}return i?void f(r):r}function B(r){if(r.asteriskToken)r=e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,void 0,r.name,void 0,e.visitParameterList(r.parameters,M,t),void 0,j(r.body)),r),r);else{var n=i,o=a;i=!1,a=!1,r=e.visitEachChild(r,M,t),i=n,a=o}return r}function j(t){var r=[],n=i,f=a,m=o,g=s,y=c,h=u,v=l,T=_,C=w,E=b,k=D,N=x,A=S;i=!0,a=!1,o=void 0,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,w=1,b=void 0,D=void 0,x=void 0,S=e.createTempVariable(void 0),d();var F=e.addPrologue(r,t.statements,!1,M);z(t.statements,F);var P=Se();return e.insertStatementsAfterStandardPrologue(r,p()),r.push(e.createReturn(P)),i=n,a=f,o=m,s=g,c=y,u=h,l=v,_=T,w=C,b=E,D=k,x=N,S=A,e.setTextRange(e.createBlock(r,t.multiLine),t)}function J(t,r,n,i){var a,o=H(t);if(o>0){a=Y();var s=e.visitNodes(t,M,e.isExpression,0,o);he(a,e.createArrayLiteral(r?[r].concat(s):s)),r=void 0}var c=e.reduceLeft(t,function(t,n){if(W(n)&&t.length>0){var o=void 0!==a;a||(a=Y()),he(a,o?e.createArrayConcat(a,[e.createArrayLiteral(t,i)]):e.createArrayLiteral(r?[r].concat(t):t,i)),r=void 0,t=[]}return t.push(e.visitNode(n,M,e.isExpression)),t},[],o);return a?e.createArrayConcat(a,[e.createArrayLiteral(c,i)]):e.setTextRange(e.createArrayLiteral(r?[r].concat(c):c,i),n)}function z(e,t){void 0===t&&(t=0);for(var r=e.length,n=t;n<r;n++)U(e[n])}function K(t){e.isBlock(t)?z(t.statements):U(t)}function U(i){var o=a;a||(a=W(i)),function(i){switch(i.kind){case 218:return function(t){W(t)?z(t.statements):ye(e.visitNode(t,M,e.isStatement))}(i);case 221:return function(t){ye(e.visitNode(t,M,e.isStatement))}(i);case 222:return function(t){if(W(t))if(W(t.thenStatement)||W(t.elseStatement)){var r=X(),n=t.elseStatement?X():void 0;De(t.elseStatement?n:r,e.visitNode(t.expression,M,e.isExpression),t.expression),K(t.thenStatement),t.elseStatement&&(ve(r),Q(n),K(t.elseStatement)),Q(r)}else ye(e.visitNode(t,M,e.isStatement));else ye(e.visitNode(t,M,e.isStatement))}(i);case 223:return function(t){if(W(t)){var r=X(),n=X();ne(r),Q(n),K(t.statement),Q(r),be(n,e.visitNode(t.expression,M,e.isExpression)),ie()}else ye(e.visitNode(t,M,e.isStatement))}(i);case 224:return function(t){if(W(t)){var r=X(),n=ne(r);Q(r),De(n,e.visitNode(t.expression,M,e.isExpression)),K(t.statement),ve(r),ie()}else ye(e.visitNode(t,M,e.isStatement))}(i);case 225:return function(t){if(W(t)){var r=X(),n=X(),i=ne(n);if(t.initializer){var a=t.initializer;e.isVariableDeclarationList(a)?V(a):ye(e.setTextRange(e.createExpressionStatement(e.visitNode(a,M,e.isExpression)),a))}Q(r),t.condition&&De(i,e.visitNode(t.condition,M,e.isExpression)),K(t.statement),Q(n),t.incrementor&&ye(e.setTextRange(e.createExpressionStatement(e.visitNode(t.incrementor,M,e.isExpression)),t.incrementor)),ve(r),ie()}else ye(e.visitNode(t,M,e.isStatement))}(i);case 226:return function(t){if(W(t)){var r=Y(),n=Y(),i=e.createLoopVariable(),a=t.initializer;m(i),he(r,e.createArrayLiteral()),ye(e.createForIn(n,e.visitNode(t.expression,M,e.isExpression),e.createExpressionStatement(e.createCall(e.createPropertyAccess(r,"push"),void 0,[n])))),he(i,e.createLiteral(0));var o=X(),s=X(),c=ne(s);Q(o),De(c,e.createLessThan(i,e.createPropertyAccess(r,"length")));var u=void 0;if(e.isVariableDeclarationList(a)){for(var l=0,_=a.declarations;l<_.length;l++){var d=_[l];m(d.name)}u=e.getSynthesizedClone(a.declarations[0].name)}else u=e.visitNode(a,M,e.isExpression),e.Debug.assert(e.isLeftHandSideExpression(u));he(u,e.createElementAccess(r,i)),K(t.statement),Q(s),ye(e.createExpressionStatement(e.createPostfixIncrement(i))),ve(o),ie()}else ye(e.visitNode(t,M,e.isStatement))}(i);case 228:return function(t){var r=de(t.label?e.idText(t.label):void 0);r>0?ve(r,t):ye(t)}(i);case 229:return function(t){var r=_e(t.label?e.idText(t.label):void 0);r>0?ve(r,t):ye(t)}(i);case 230:return function(t){xe(8,[e.visitNode(t.expression,M,e.isExpression)],t)}(i);case 231:return function(t){var r,n,i;W(t)?(r=G(e.visitNode(t.expression,M,e.isExpression)),n=X(),i=X(),Q(n),$({kind:1,expression:r,startLabel:n,endLabel:i}),K(t.statement),e.Debug.assert(1===te()),Q(Z().endLabel)):ye(e.visitNode(t,M,e.isStatement))}(i);case 232:return function(t){if(W(t.caseBlock)){for(var r=t.caseBlock,n=r.clauses.length,i=($({kind:2,isScript:!1,breakLabel:p=X()}),p),a=G(e.visitNode(t.expression,M,e.isExpression)),o=[],s=-1,c=0;c<n;c++){var u=r.clauses[c];o.push(X()),272===u.kind&&-1===s&&(s=c)}for(var l=0,_=[];l<n;){for(var d=0,c=l;c<n;c++){var u=r.clauses[c];if(271===u.kind){if(W(u.expression)&&_.length>0)break;_.push(e.createCaseClause(e.visitNode(u.expression,M,e.isExpression),[me(o[c],u.expression)]))}else d++}_.length&&(ye(e.createSwitch(a,e.createCaseBlock(_))),l+=_.length,_=[]),d>0&&(l+=d,d=0)}ve(s>=0?o[s]:i);for(var c=0;c<n;c++)Q(o[c]),z(r.clauses[c].statements);ae()}else ye(e.visitNode(t,M,e.isStatement));var p}(i);case 233:return function(t){var r,n;W(t)?(r=e.idText(t.label),n=X(),$({kind:4,isScript:!1,labelText:r,breakLabel:n}),K(t.statement),oe()):ye(e.visitNode(t,M,e.isStatement))}(i);case 234:return function(t){xe(9,[e.visitNode(t.expression,M,e.isExpression)],t)}(i);case 235:return function(i){var a,o;W(i)?(a=X(),o=X(),Q(a),$({kind:0,state:0,startLabel:a,endLabel:o}),ge(),K(i.tryBlock),i.catchClause&&(function(i){var a;if(e.Debug.assert(0===te()),e.isGeneratedIdentifier(i.name))a=i.name,m(i.name);else{var o=e.idText(i.name);a=Y(o),r||(r=e.createMap(),n=[],t.enableSubstitution(72)),r.set(o,!0),n[e.getOriginalNodeId(i)]=a}var s=ee();e.Debug.assert(s.state<1),ve(s.endLabel);var c=X();Q(c),s.state=1,s.catchVariable=a,s.catchLabel=c,he(a,e.createCall(e.createPropertyAccess(S,"sent"),void 0,[])),ge()}(i.catchClause.variableDeclaration),K(i.catchClause.block)),i.finallyBlock&&(function(){e.Debug.assert(0===te());var t=ee();e.Debug.assert(t.state<2),ve(t.endLabel);var r=X();Q(r),t.state=2,t.finallyLabel=r}(),K(i.finallyBlock)),function(){e.Debug.assert(0===te());var t=Z();t.state<2?ve(t.endLabel):xe(10),Q(t.endLabel),ge(),t.state=3}()):ye(e.visitEachChild(i,M,t))}(i);default:ye(e.visitNode(i,M,e.isStatement))}}(i),a=o}function V(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r],a=e.getSynthesizedClone(i.name);e.setCommentRange(a,i.name),m(a)}for(var o=e.getInitializedVariables(t),s=o.length,c=0,u=[];c<s;){for(var l=c;l<s&&!(W((i=o[l]).initializer)&&u.length>0);l++)u.push(q(i));u.length&&(ye(e.createExpressionStatement(e.inlineExpressions(u))),c+=u.length,u=[])}}function q(t){return e.setSourceMapRange(e.createAssignment(e.setSourceMapRange(e.getSynthesizedClone(t.name),t.name),e.visitNode(t.initializer,M,e.isExpression)),t)}function W(e){return!!e&&0!=(131072&e.transformFlags)}function H(e){for(var t=e.length,r=0;r<t;r++)if(W(e[r]))return r;return-1}function G(t){var r;return e.isGeneratedIdentifier(t)||4096&e.getEmitFlags(t)?t:(he(r=e.createTempVariable(m),t,t),r)}function Y(t){var r=t?e.createUniqueName(t):e.createTempVariable(void 0);return m(r),r}function X(){l||(l=[]);var e=w;return w++,l[e]=-1,e}function Q(t){e.Debug.assert(void 0!==l,"No labels were defined."),l[t]=b?b.length:0}function $(e){o||(o=[],c=[],s=[],u=[]);var t=c.length;return c[t]=0,s[t]=b?b.length:0,o[t]=e,u.push(e),t}function Z(){var t=ee();if(void 0===t)return e.Debug.fail("beginBlock was never called.");var r=c.length;return c[r]=1,s[r]=b?b.length:0,o[r]=t,u.pop(),t}function ee(){return e.lastOrUndefined(u)}function te(){var e=ee();return e&&e.kind}function re(){$({kind:3,isScript:!0,breakLabel:-1,continueLabel:-1})}function ne(e){var t=X();return $({kind:3,isScript:!1,breakLabel:t,continueLabel:e}),t}function ie(){e.Debug.assert(3===te());var t=Z(),r=t.breakLabel;t.isScript||Q(r)}function ae(){e.Debug.assert(2===te());var t=Z(),r=t.breakLabel;t.isScript||Q(r)}function oe(){e.Debug.assert(4===te());var t=Z();t.isScript||Q(t.breakLabel)}function se(e){return 2===e.kind||3===e.kind}function ce(e){return 4===e.kind}function ue(e){return 3===e.kind}function le(e,t){for(var r=t;r>=0;r--){var n=u[r];if(!ce(n))break;if(n.labelText===e)return!0}return!1}function _e(e){if(u)if(e)for(var t=u.length-1;t>=0;t--){if(ce(r=u[t])&&r.labelText===e)return r.breakLabel;if(se(r)&&le(e,t-1))return r.breakLabel}else for(t=u.length-1;t>=0;t--){var r;if(se(r=u[t]))return r.breakLabel}return 0}function de(e){if(u)if(e){for(var t=u.length-1;t>=0;t--)if(ue(r=u[t])&&le(e,t-1))return r.continueLabel}else for(t=u.length-1;t>=0;t--){var r;if(ue(r=u[t]))return r.continueLabel}return 0}function pe(t){if(void 0!==t&&t>0){void 0===_&&(_=[]);var r=e.createLiteral(-1);return void 0===_[t]?_[t]=[r]:_[t].push(r),r}return e.createOmittedExpression()}function fe(t){var r=e.createLiteral(t);return e.addSyntheticTrailingComment(r,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(t)),r}function me(t,r){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(e.createReturn(e.createArrayLiteral([fe(3),pe(t)])),r)}function ge(){xe(0)}function ye(e){e?xe(1,[e]):ge()}function he(e,t,r){xe(2,[e,t],r)}function ve(e,t){xe(3,[e],t)}function be(e,t,r){xe(4,[e,t],r)}function De(e,t,r){xe(5,[e,t],r)}function xe(e,t,r){void 0===b&&(b=[],D=[],x=[]),void 0===l&&Q(X());var n=b.length;b[n]=e,D[n]=t,x[n]=r}function Se(){I=0,O=0,T=void 0,C=!1,E=!1,k=void 0,N=void 0,A=void 0,F=void 0,P=void 0;var r=function(){if(b){for(var t=0;t<b.length;t++)ke(t);Te(b.length)}else Te(0);if(k){var r=e.createPropertyAccess(S,"label"),n=e.createSwitch(r,e.createCaseBlock(k));return[e.startOnNewLine(n)]}return N||[]}();return function(t,r){return t.requestEmitHelper(e.generatorHelper),e.createCall(e.getHelperName("__generator"),void 0,[e.createThis(),r])}(t,e.setEmitFlags(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,S)],void 0,e.createBlock(r,r.length>0)),524288))}function Te(e){(function(e){if(!E)return!0;if(!l||!_)return!1;for(var t=0;t<l.length;t++)if(l[t]===e&&_[t])return!0;return!1})(e)&&(Ee(e),P=void 0,Ae(void 0,void 0)),N&&k&&Ce(!1),function(){if(void 0!==_&&void 0!==T)for(var e=0;e<T.length;e++){var t=T[e];if(void 0!==t)for(var r=0,n=t;r<n.length;r++){var i=n[r],a=_[i];if(void 0!==a)for(var o=0,s=a;o<s.length;o++){var c=s[o];c.text=String(e)}}}}()}function Ce(t){if(k||(k=[]),N){if(P)for(var r=P.length-1;r>=0;r--){var n=P[r];N=[e.createWith(n.expression,e.createBlock(N))]}if(F){var i=F.startLabel,a=F.catchLabel,o=F.finallyLabel,s=F.endLabel;N.unshift(e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createPropertyAccess(S,"trys"),"push"),void 0,[e.createArrayLiteral([pe(i),pe(a),pe(o),pe(s)])]))),F=void 0}t&&N.push(e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(S,"label"),e.createLiteral(O+1))))}k.push(e.createCaseClause(e.createLiteral(O),N||[])),N=void 0}function Ee(e){if(l)for(var t=0;t<l.length;t++)l[t]===e&&(N&&(Ce(!C),C=!1,E=!1,O++),void 0===T&&(T=[]),void 0===T[O]?T[O]=[t]:T[O].push(t))}function ke(t){if(Ee(t),function(e){if(o)for(;I<c.length&&s[I]<=e;I++){var t=o[I],r=c[I];switch(t.kind){case 0:0===r?(A||(A=[]),N||(N=[]),A.push(F),F=t):1===r&&(F=A.pop());break;case 1:0===r?(P||(P=[]),P.push(t)):1===r&&P.pop()}}}(t),!C){C=!1,E=!1;var r=b[t];if(0!==r){if(10===r)return C=!0,void Ne(e.createReturn(e.createArrayLiteral([fe(7)])));var n=D[t];if(1===r)return Ne(n[0]);var i,a,u,l=x[t];switch(r){case 2:return i=n[0],a=n[1],u=l,void Ne(e.setTextRange(e.createExpressionStatement(e.createAssignment(i,a)),u));case 3:return function(t,r){C=!0,Ne(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([fe(3),pe(t)])),r),384))}(n[0],l);case 4:return function(t,r,n){Ne(e.setEmitFlags(e.createIf(r,e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([fe(3),pe(t)])),n),384)),1))}(n[0],n[1],l);case 5:return function(t,r,n){Ne(e.setEmitFlags(e.createIf(e.createLogicalNot(r),e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([fe(3),pe(t)])),n),384)),1))}(n[0],n[1],l);case 6:return function(t,r){C=!0,Ne(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral(t?[fe(4),t]:[fe(4)])),r),384))}(n[0],l);case 7:return function(t,r){C=!0,Ne(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([fe(5),t])),r),384))}(n[0],l);case 8:return Ae(n[0],l);case 9:return function(t,r){C=!0,E=!0,Ne(e.setTextRange(e.createThrow(t),r))}(n[0],l)}}}}function Ne(e){e&&(N?N.push(e):N=[e])}function Ae(t,r){C=!0,E=!0,Ne(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral(t?[fe(2),t]:[fe(2)])),r),384))}},e.generatorHelper={name:"typescript:generator",scoped:!1,priority:6,text:'\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'}}(c||(c={})),function(e){e.transformModule=function(n){var i=n.startLexicalEnvironment,a=n.endLexicalEnvironment,o=n.hoistVariableDeclaration,s=n.getCompilerOptions(),c=n.getEmitResolver(),u=n.getEmitHost(),l=e.getEmitScriptTarget(s),_=e.getEmitModuleKind(s),d=n.onSubstituteNode,p=n.onEmitNode;n.onSubstituteNode=function(t,r){return(r=d(t,r)).id&&g[r.id]?r:1===t?function(t){switch(t.kind){case 72:return H(t);case 204:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=G(t.left);if(r){for(var n=t,i=0,a=r;i<a.length;i++){var o=a[i];g[e.getNodeId(n)]=!0,n=q(o,n,t)}return n}}return t}(t);case 203:case 202:return function(t){if((44===t.operator||45===t.operator)&&e.isIdentifier(t.operand)&&!e.isGeneratedIdentifier(t.operand)&&!e.isLocalName(t.operand)&&!e.isDeclarationNameOfEnumOrNamespace(t.operand)){var r=G(t.operand);if(r){for(var n=203===t.kind?e.setTextRange(e.createBinary(t.operand,e.createToken(44===t.operator?60:61),e.createLiteral(1)),t):t,i=0,a=r;i<a.length;i++){var o=a[i];g[e.getNodeId(n)]=!0,n=q(o,n)}return n}}return t}(t)}return t}(r):e.isShorthandPropertyAssignment(r)?function(t){var r=t.name,n=H(r);if(n!==r){if(t.objectAssignmentInitializer){var i=e.createAssignment(n,t.objectAssignmentInitializer);return e.setTextRange(e.createPropertyAssignment(r,i),t)}return e.setTextRange(e.createPropertyAssignment(r,n),t)}return t}(r):r},n.onEmitNode=function(t,r,n){284===r.kind?(f=r,m=h[e.getOriginalNodeId(f)],g=[],p(t,r,n),f=void 0,m=void 0,g=void 0):p(t,r,n)},n.enableSubstitution(72),n.enableSubstitution(204),n.enableSubstitution(202),n.enableSubstitution(203),n.enableSubstitution(276),n.enableEmitNotification(284);var f,m,g,y,h=[],v=[];return e.chainBundle(function(t){if(t.isDeclarationFile||!(e.isEffectiveExternalModule(t,s)||524288&t.transformFlags||e.isJsonSourceFile(t)&&e.hasJsonModuleEmitEnabled(s)&&(s.out||s.outFile)))return t;f=t,m=e.collectExternalModuleInfo(t,c,s),h[e.getOriginalNodeId(t)]=m;var r=function(t){switch(t){case e.ModuleKind.AMD:return x;case e.ModuleKind.UMD:return S;default:return D}}(_)(t);return f=void 0,m=void 0,y=!1,e.aggregateTransformFlags(r)});function b(){return!(m.exportEquals||!e.isExternalModule(f))}function D(r){i();var o=[],c=e.getStrictOptionValue(s,"alwaysStrict")||!s.noImplicitUseStrict&&e.isExternalModule(f),u=e.addPrologue(o,r.statements,c,N);b()&&e.append(o,V()),e.append(o,e.visitNode(m.externalHelpersImportDeclaration,N,e.isStatement)),e.addRange(o,e.visitNodes(r.statements,N,e.isStatement,u)),k(o,!1),e.insertStatementsAfterStandardPrologue(o,a());var l=e.updateSourceFileNode(r,e.setTextRange(e.createNodeArray(o),r.statements));return m.hasExportStarsToExportValues&&!s.importHelpers&&e.addEmitHelper(l,t),e.addEmitHelpers(l,n.readEmitHelpers()),l}function x(t){var r=e.createIdentifier("define"),i=e.tryGetModuleNameFromFile(t,u,s),a=e.isJsonSourceFile(t)&&t,o=T(t,!0),c=o.aliasedModuleNames,l=o.unaliasedModuleNames,_=o.importAliasNames,d=e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(r,void 0,(i?[i]:[]).concat([e.createArrayLiteral(a?e.emptyArray:[e.createLiteral("require"),e.createLiteral("exports")].concat(c,l)),a?a.statements.length?a.statements[0].expression:e.createObjectLiteral():e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,"require"),e.createParameter(void 0,void 0,void 0,"exports")].concat(_),void 0,E(t))])))]),t.statements));return e.addEmitHelpers(d,n.readEmitHelpers()),d}function S(t){var r=T(t,!1),i=r.aliasedModuleNames,a=r.unaliasedModuleNames,o=r.importAliasNames,c=e.tryGetModuleNameFromFile(t,u,s),l=e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,"factory")],void 0,e.setTextRange(e.createBlock([e.createIf(e.createLogicalAnd(e.createTypeCheck(e.createIdentifier("module"),"object"),e.createTypeCheck(e.createPropertyAccess(e.createIdentifier("module"),"exports"),"object")),e.createBlock([e.createVariableStatement(void 0,[e.createVariableDeclaration("v",void 0,e.createCall(e.createIdentifier("factory"),void 0,[e.createIdentifier("require"),e.createIdentifier("exports")]))]),e.setEmitFlags(e.createIf(e.createStrictInequality(e.createIdentifier("v"),e.createIdentifier("undefined")),e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(e.createIdentifier("module"),"exports"),e.createIdentifier("v")))),1)]),e.createIf(e.createLogicalAnd(e.createTypeCheck(e.createIdentifier("define"),"function"),e.createPropertyAccess(e.createIdentifier("define"),"amd")),e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("define"),void 0,(c?[c]:[]).concat([e.createArrayLiteral([e.createLiteral("require"),e.createLiteral("exports")].concat(i,a)),e.createIdentifier("factory")])))])))],!0),void 0)),_=e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(l,void 0,[e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,"require"),e.createParameter(void 0,void 0,void 0,"exports")].concat(o),void 0,E(t))]))]),t.statements));return e.addEmitHelpers(_,n.readEmitHelpers()),_}function T(t,r){for(var n=[],i=[],a=[],o=0,l=t.amdDependencies;o<l.length;o++){var _=l[o];_.name?(n.push(e.createLiteral(_.path)),a.push(e.createParameter(void 0,void 0,void 0,_.name))):i.push(e.createLiteral(_.path))}for(var d=0,p=m.externalImports;d<p.length;d++){var g=p[d],y=e.getExternalModuleNameLiteral(g,f,u,c,s),h=e.getLocalNameForExternalImport(g,f);y&&(r&&h?(e.setEmitFlags(h,4),n.push(y),a.push(e.createParameter(void 0,void 0,void 0,h))):i.push(y))}return{aliasedModuleNames:n,unaliasedModuleNames:i,importAliasNames:a}}function C(t){if(!e.isImportEqualsDeclaration(t)&&!e.isExportDeclaration(t)&&e.getExternalModuleNameLiteral(t,f,u,c,s)){var r=e.getLocalNameForExternalImport(t,f),n=w(t,r);if(n!==r)return e.createExpressionStatement(e.createAssignment(r,n))}}function E(n){i();var o=[],c=e.addPrologue(o,n.statements,!s.noImplicitUseStrict,N);b()&&e.append(o,V()),e.append(o,e.visitNode(m.externalHelpersImportDeclaration,N,e.isStatement)),_===e.ModuleKind.AMD&&e.addRange(o,e.mapDefined(m.externalImports,C)),e.addRange(o,e.visitNodes(n.statements,N,e.isStatement,c)),k(o,!0),e.insertStatementsAfterStandardPrologue(o,a());var u=e.createBlock(o,!0);return m.hasExportStarsToExportValues&&!s.importHelpers&&e.addEmitHelper(u,t),y&&e.addEmitHelper(u,r),u}function k(t,r){if(m.exportEquals){var n=e.visitNode(m.exportEquals.expression,A);if(n)if(r){var i=e.createReturn(n);e.setTextRange(i,m.exportEquals),e.setEmitFlags(i,1920),t.push(i)}else i=e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(e.createIdentifier("module"),"exports"),n)),e.setTextRange(i,m.exportEquals),e.setEmitFlags(i,1536),t.push(i)}}function N(t){switch(t.kind){case 249:return function(t){var r,n=e.getNamespaceDeclarationNode(t);if(_!==e.ModuleKind.AMD){if(!t.importClause)return e.setOriginalNode(e.setTextRange(e.createExpressionStatement(I(t)),t),t);var i=[];n&&!e.isDefaultImport(t)?i.push(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,w(t,I(t)))):(i.push(e.createVariableDeclaration(e.getGeneratedNameForNode(t),void 0,w(t,I(t)))),n&&e.isDefaultImport(t)&&i.push(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)))),r=e.append(r,e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList(i,l>=2?2:0)),t),t))}else n&&e.isDefaultImport(t)&&(r=e.append(r,e.createVariableStatement(void 0,e.createVariableDeclarationList([e.setOriginalNode(e.setTextRange(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)),t),t)],l>=2?2:0))));if(L(t)){var a=e.getOriginalNodeId(t);v[a]=R(v[a],t)}else r=R(r,t);return e.singleOrMany(r)}(t);case 248:return function(t){var r;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),_!==e.ModuleKind.AMD?r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(q(t.name,I(t))),t),t)):e.append(r,e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedClone(t.name),void 0,I(t))],l>=2?2:0)),t),t)):e.hasModifier(t,1)&&(r=e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(q(e.getExportName(t),e.getLocalName(t))),t),t))),L(t)){var n=e.getOriginalNodeId(t);v[n]=B(v[n],t)}else r=B(r,t);return e.singleOrMany(r)}(t);case 255:return function(t){if(t.moduleSpecifier){var r=e.getGeneratedNameForNode(t);if(t.exportClause){var i=[];_!==e.ModuleKind.AMD&&i.push(e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,I(t))])),t),t));for(var a=0,o=t.exportClause.elements;a<o.length;a++){var s=o[a],c=e.createPropertyAccess(r,s.propertyName||s.name);i.push(e.setOriginalNode(e.setTextRange(e.createExpressionStatement(q(e.getExportName(s),c)),s),s))}return e.singleOrMany(i)}return e.setOriginalNode(e.setTextRange(e.createExpressionStatement(function(t,r){return t.getCompilerOptions().importHelpers?e.createCall(e.getHelperName("__exportStar"),void 0,[r,e.createIdentifier("exports")]):e.createCall(e.createIdentifier("__export"),void 0,[r])}(n,_!==e.ModuleKind.AMD?I(t):r)),t),t)}}(t);case 254:return function(t){if(!t.isExportEquals){var r,n=t.original;if(n&&L(n)){var i=e.getOriginalNodeId(t);v[i]=U(v[i],e.createIdentifier("default"),e.visitNode(t.expression,A),t,!0)}else r=U(r,e.createIdentifier("default"),e.visitNode(t.expression,A),t,!0);return e.singleOrMany(r)}}(t);case 219:return function(t){var r,i,a;if(e.hasModifier(t,1)){for(var o=void 0,s=0,c=t.declarationList.declarations;s<c.length;s++){var u=c[s];e.isIdentifier(u.name)&&e.isLocalName(u.name)?(o||(o=e.visitNodes(t.modifiers,W,e.isModifier)),i=e.append(i,u)):u.initializer&&(a=e.append(a,M(u)))}i&&(r=e.append(r,e.updateVariableStatement(t,o,e.updateVariableDeclarationList(t.declarationList,i)))),a&&(r=e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(e.inlineExpressions(a)),t),t)))}else r=e.append(r,e.visitEachChild(t,A,n));if(L(t)){var l=e.getOriginalNodeId(t);v[l]=j(v[l],t)}else r=j(r,t);return e.singleOrMany(r)}(t);case 239:return function(t){var r;if(r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,e.visitNodes(t.modifiers,W,e.isModifier),t.asteriskToken,e.getDeclarationName(t,!0,!0),void 0,e.visitNodes(t.parameters,A),void 0,e.visitEachChild(t.body,A,n)),t),t)):e.append(r,e.visitEachChild(t,A,n)),L(t)){var i=e.getOriginalNodeId(t);v[i]=z(v[i],t)}else r=z(r,t);return e.singleOrMany(r)}(t);case 240:return function(t){var r;if(r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createClassDeclaration(void 0,e.visitNodes(t.modifiers,W,e.isModifier),e.getDeclarationName(t,!0,!0),void 0,e.visitNodes(t.heritageClauses,A),e.visitNodes(t.members,A)),t),t)):e.append(r,e.visitEachChild(t,A,n)),L(t)){var i=e.getOriginalNodeId(t);v[i]=z(v[i],t)}else r=z(r,t);return e.singleOrMany(r)}(t);case 315:return function(t){if(L(t)&&219===t.original.kind){var r=e.getOriginalNodeId(t);v[r]=j(v[r],t.original)}return t}(t);case 316:return function(t){var r=e.getOriginalNodeId(t),n=v[r];return n?(delete v[r],e.append(n,t)):t}(t);default:return e.visitEachChild(t,A,n)}}function A(t){return 524288&t.transformFlags||512&t.transformFlags?e.isImportCall(t)?function(t){var r=e.visitNode(e.firstOrUndefined(t.arguments),A),n=!!(2048&t.transformFlags);switch(s.module){case e.ModuleKind.AMD:return F(r,n);case e.ModuleKind.UMD:return function(t,r){if(y=!0,e.isSimpleCopiableExpression(t)){var n=e.isGeneratedIdentifier(t)?t:e.isStringLiteral(t)?e.createLiteral(t):e.setEmitFlags(e.setTextRange(e.getSynthesizedClone(t),t),1536);return e.createConditional(e.createIdentifier("__syncRequire"),P(t,r),F(n,r))}var i=e.createTempVariable(o);return e.createComma(e.createAssignment(i,t),e.createConditional(e.createIdentifier("__syncRequire"),P(i,r),F(i,r)))}(r,n);case e.ModuleKind.CommonJS:default:return P(r,n)}}(t):e.isDestructuringAssignment(t)?function(t){return function t(r){if(e.isObjectLiteralExpression(r))for(var n=0,i=r.properties;n<i.length;n++){var a=i[n];switch(a.kind){case 275:if(t(a.initializer))return!0;break;case 276:if(t(a.name))return!0;break;case 277:if(t(a.expression))return!0;break;case 156:case 158:case 159:return!1;default:e.Debug.assertNever(a,"Unhandled object member kind")}}else if(e.isArrayLiteralExpression(r))for(var o=0,s=r.elements;o<s.length;o++){var a=s[o];if(e.isSpreadElement(a)){if(t(a.expression))return!0}else if(t(a))return!0}else if(e.isIdentifier(r))return e.length(G(r))>(e.isExportName(r)?1:0);return!1}(t.left)?e.flattenDestructuringAssignment(t,A,n,0,!1,O):e.visitEachChild(t,A,n)}(t):e.visitEachChild(t,A,n):t}function F(t,r){var i,a=e.createUniqueName("resolve"),o=e.createUniqueName("reject"),c=[e.createParameter(void 0,void 0,void 0,a),e.createParameter(void 0,void 0,void 0,o)],u=e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("require"),void 0,[e.createArrayLiteral([t||e.createOmittedExpression()]),a,o]))]);l>=2?i=e.createArrowFunction(void 0,void 0,c,void 0,void 0,u):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,u),r&&e.setEmitFlags(i,8));var _=e.createNew(e.createIdentifier("Promise"),void 0,[i]);return s.esModuleInterop?(n.requestEmitHelper(e.importStarHelper),e.createCall(e.createPropertyAccess(_,e.createIdentifier("then")),void 0,[e.getHelperName("__importStar")])):_}function P(t,r){var i,a=e.createCall(e.createPropertyAccess(e.createIdentifier("Promise"),"resolve"),void 0,[]),o=e.createCall(e.createIdentifier("require"),void 0,t?[t]:[]);return s.esModuleInterop&&(n.requestEmitHelper(e.importStarHelper),o=e.createCall(e.getHelperName("__importStar"),void 0,[o])),l>=2?i=e.createArrowFunction(void 0,void 0,[],void 0,void 0,o):(i=e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock([e.createReturn(o)])),r&&e.setEmitFlags(i,8)),e.createCall(e.createPropertyAccess(a,"then"),void 0,[i])}function w(t,r){return!s.esModuleInterop||67108864&e.getEmitFlags(t)?r:e.getImportNeedsImportStarHelper(t)?(n.requestEmitHelper(e.importStarHelper),e.createCall(e.getHelperName("__importStar"),void 0,[r])):e.getImportNeedsImportDefaultHelper(t)?(n.requestEmitHelper(e.importDefaultHelper),e.createCall(e.getHelperName("__importDefault"),void 0,[r])):r}function I(t){var r=e.getExternalModuleNameLiteral(t,f,u,c,s),n=[];return r&&n.push(r),e.createCall(e.createIdentifier("require"),void 0,n)}function O(t,r,n){var i=G(t);if(i){for(var a=e.isExportName(t)?r:e.createAssignment(t,r),o=0,s=i;o<s.length;o++){var c=s[o];e.setEmitFlags(a,4),a=q(c,a,n)}return a}return e.createAssignment(t,r)}function M(t){return e.isBindingPattern(t.name)?e.flattenDestructuringAssignment(e.visitNode(t,A),void 0,n,0,!1,O):e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createIdentifier("exports"),t.name),t.name),e.visitNode(t.initializer,A))}function L(t){return 0!=(4194304&e.getEmitFlags(t))}function R(e,t){if(m.exportEquals)return e;var r=t.importClause;if(!r)return e;r.name&&(e=K(e,r));var n=r.namedBindings;if(n)switch(n.kind){case 251:e=K(e,n);break;case 252:for(var i=0,a=n.elements;i<a.length;i++)e=K(e,a[i])}return e}function B(e,t){return m.exportEquals?e:K(e,t)}function j(e,t){if(m.exportEquals)return e;for(var r=0,n=t.declarationList.declarations;r<n.length;r++)e=J(e,n[r]);return e}function J(t,r){if(m.exportEquals)return t;if(e.isBindingPattern(r.name))for(var n=0,i=r.name.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||(t=J(t,a))}else e.isGeneratedIdentifier(r.name)||(t=K(t,r));return t}function z(t,r){return m.exportEquals?t:(e.hasModifier(r,1)&&(t=U(t,e.hasModifier(r,512)?e.createIdentifier("default"):e.getDeclarationName(r),e.getLocalName(r),r)),r.name&&(t=K(t,r)),t)}function K(t,r){var n=e.getDeclarationName(r),i=m.exportSpecifiers.get(e.idText(n));if(i)for(var a=0,o=i;a<o.length;a++){var s=o[a];t=U(t,s.name,n,s.name)}return t}function U(t,r,n,i,a){return t=e.append(t,function(t,r,n,i){var a=e.setTextRange(e.createExpressionStatement(q(t,r)),n);return e.startOnNewLine(a),i||e.setEmitFlags(a,1536),a}(r,n,i,a))}function V(){var t;return t=0===l?e.createExpressionStatement(q(e.createIdentifier("__esModule"),e.createLiteral(!0))):e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[e.createIdentifier("exports"),e.createLiteral("__esModule"),e.createObjectLiteral([e.createPropertyAssignment("value",e.createLiteral(!0))])])),e.setEmitFlags(t,1048576),t}function q(t,r,n){return e.setTextRange(e.createAssignment(e.createPropertyAccess(e.createIdentifier("exports"),e.getSynthesizedClone(t)),r),n)}function W(e){switch(e.kind){case 85:case 80:return}return e}function H(t){if(4096&e.getEmitFlags(t)){var r=e.getExternalHelpersModuleName(f);return r?e.createPropertyAccess(r,t):t}if(!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var n=c.getReferencedExportContainer(t,e.isExportName(t));if(n&&284===n.kind)return e.setTextRange(e.createPropertyAccess(e.createIdentifier("exports"),e.getSynthesizedClone(t)),t);var i=c.getReferencedImportDeclaration(t);if(i){if(e.isImportClause(i))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(i.parent),e.createIdentifier("default")),t);if(e.isImportSpecifier(i)){var a=i.propertyName||i.name;return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(i.parent.parent.parent),e.getSynthesizedClone(a)),t)}}}return t}function G(t){if(!e.isGeneratedIdentifier(t)){var r=c.getReferencedImportDeclaration(t)||c.getReferencedValueDeclaration(t);if(r)return m&&m.exportedBindings[e.getOriginalNodeId(r)]}}};var t={name:"typescript:export-star",scoped:!0,text:"\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"};var r={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};e.importStarHelper={name:"typescript:commonjsimportstar",scoped:!1,text:'\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result["default"] = mod;\n return result;\n};'},e.importDefaultHelper={name:"typescript:commonjsimportdefault",scoped:!1,text:'\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};'}}(c||(c={})),function(e){e.transformSystemModule=function(t){var r=t.startLexicalEnvironment,n=t.endLexicalEnvironment,i=t.hoistVariableDeclaration,a=t.getCompilerOptions(),o=t.getEmitResolver(),s=t.getEmitHost(),c=t.onSubstituteNode,u=t.onEmitNode;t.onSubstituteNode=function(t,r){return function(e){return g&&e.id&&g[e.id]}(r=c(t,r))?r:1===t?function(t){switch(t.kind){case 72:return function(t){if(4096&e.getEmitFlags(t)){var r=e.getExternalHelpersModuleName(l);return r?e.createPropertyAccess(r,t):t}if(!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var n=o.getReferencedImportDeclaration(t);if(n){if(e.isImportClause(n))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(n.parent),e.createIdentifier("default")),t);if(e.isImportSpecifier(n))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(n.parent.parent.parent),e.getSynthesizedClone(n.propertyName||n.name)),t)}}return t}(t);case 204:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=V(t.left);if(r){for(var n=t,i=0,a=r;i<a.length;i++){var o=a[i];n=B(o,q(n))}return n}}return t}(t);case 202:case 203:return function(t){if((44===t.operator||45===t.operator)&&e.isIdentifier(t.operand)&&!e.isGeneratedIdentifier(t.operand)&&!e.isLocalName(t.operand)&&!e.isDeclarationNameOfEnumOrNamespace(t.operand)){var r=V(t.operand);if(r){for(var n=203===t.kind?e.setTextRange(e.createPrefix(t.operator,t.operand),t):t,i=0,a=r;i<a.length;i++){var o=a[i];n=B(o,q(n))}return 203===t.kind&&(n=44===t.operator?e.createSubtract(q(n),e.createLiteral(1)):e.createAdd(q(n),e.createLiteral(1))),n}}return t}(t)}return t}(r):4===t?function(t){switch(t.kind){case 276:return function(t){var r=t.name;if(!e.isGeneratedIdentifier(r)&&!e.isLocalName(r)){var n=o.getReferencedImportDeclaration(r);if(n){if(e.isImportClause(n))return e.setTextRange(e.createPropertyAssignment(e.getSynthesizedClone(r),e.createPropertyAccess(e.getGeneratedNameForNode(n.parent),e.createIdentifier("default"))),t);if(e.isImportSpecifier(n))return e.setTextRange(e.createPropertyAssignment(e.getSynthesizedClone(r),e.createPropertyAccess(e.getGeneratedNameForNode(n.parent.parent.parent),e.getSynthesizedClone(n.propertyName||n.name))),t)}}return t}(t)}return t}(r):r},t.onEmitNode=function(t,r,n){if(284===r.kind){var i=e.getOriginalNodeId(r);l=r,_=y[i],d=v[i],(g=b[i])&&delete b[i],u(t,r,n),l=void 0,_=void 0,d=void 0,g=void 0}else u(t,r,n)},t.enableSubstitution(72),t.enableSubstitution(276),t.enableSubstitution(204),t.enableSubstitution(202),t.enableSubstitution(203),t.enableEmitNotification(284);var l,_,d,p,f,m,g,y=[],h=[],v=[],b=[];return e.chainBundle(function(t){if(t.isDeclarationFile||!(e.isEffectiveExternalModule(t,a)||524288&t.transformFlags))return t;var i=e.getOriginalNodeId(t);l=t,m=t,_=y[i]=e.collectExternalModuleInfo(t,o,a),d=e.createUniqueName("exports"),v[i]=d,p=e.createUniqueName("context");var c=function(t){for(var r=e.createMap(),n=[],i=0,c=t;i<c.length;i++){var u=c[i],_=e.getExternalModuleNameLiteral(u,l,s,o,a);if(_){var d=_.text,p=r.get(d);void 0!==p?n[p].externalImports.push(u):(r.set(d,n.length),n.push({name:_,externalImports:[u]}))}}return n}(_.externalImports),u=function(t,i){var o=[];r();var s=e.getStrictOptionValue(a,"alwaysStrict")||!a.noImplicitUseStrict&&e.isExternalModule(l),c=e.addPrologue(o,t.statements,s,x);o.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration("__moduleName",void 0,e.createLogicalAnd(p,e.createPropertyAccess(p,"id")))]))),e.visitNode(_.externalHelpersImportDeclaration,x,e.isStatement);var u=e.visitNodes(t.statements,x,e.isStatement,c);e.addRange(o,f),e.insertStatementsAfterStandardPrologue(o,n());var m=function(t){if(_.hasExportStarsToExportValues){if(!_.exportedNames&&0===_.exportSpecifiers.size){for(var r=!1,n=0,i=_.externalImports;n<i.length;n++){var a=i[n];if(255===a.kind&&a.exportClause){r=!0;break}}if(!r){var o=D(void 0);return t.push(o),o.name}}var s=[];if(_.exportedNames)for(var c=0,u=_.exportedNames;c<u.length;c++){var l=u[c];"default"!==l.escapedText&&s.push(e.createPropertyAssignment(e.createLiteral(l),e.createTrue()))}for(var d=0,p=_.externalImports;d<p.length;d++){var a=p[d];if(255===a.kind&&a.exportClause)for(var f=0,m=a.exportClause.elements;f<m.length;f++){var g=m[f];s.push(e.createPropertyAssignment(e.createLiteral(e.idText(g.name||g.propertyName)),e.createTrue()))}}var y=e.createUniqueName("exportedNames");t.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(y,void 0,e.createObjectLiteral(s,!0))])));var h=D(y);return t.push(h),h.name}}(o),g=e.createObjectLiteral([e.createPropertyAssignment("setters",function(t,r){for(var n=[],i=0,a=r;i<a.length;i++){for(var o=a[i],s=e.forEach(o.externalImports,function(t){return e.getLocalNameForExternalImport(t,l)}),c=s?e.getGeneratedNameForNode(s):e.createUniqueName(""),u=[],_=0,p=o.externalImports;_<p.length;_++){var f=p[_],m=e.getLocalNameForExternalImport(f,l);switch(f.kind){case 249:if(!f.importClause)break;case 248:e.Debug.assert(void 0!==m),u.push(e.createExpressionStatement(e.createAssignment(m,c)));break;case 255:if(e.Debug.assert(void 0!==m),f.exportClause){for(var g=[],y=0,h=f.exportClause.elements;y<h.length;y++){var v=h[y];g.push(e.createPropertyAssignment(e.createLiteral(e.idText(v.name)),e.createElementAccess(c,e.createLiteral(e.idText(v.propertyName||v.name)))))}u.push(e.createExpressionStatement(e.createCall(d,void 0,[e.createObjectLiteral(g,!0)])))}else u.push(e.createExpressionStatement(e.createCall(t,void 0,[c])))}}n.push(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,c)],void 0,e.createBlock(u,!0)))}return e.createArrayLiteral(n,!0)}(m,i)),e.createPropertyAssignment("execute",e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock(u,!0)))]);return g.multiLine=!0,o.push(e.createReturn(g)),e.createBlock(o,!0)}(t,c),h=e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,d),e.createParameter(void 0,void 0,void 0,p)],void 0,u),S=e.tryGetModuleNameFromFile(t,s,a),T=e.createArrayLiteral(e.map(c,function(e){return e.name})),C=e.setEmitFlags(e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createIdentifier("System"),"register"),void 0,S?[S,T,h]:[T,h]))]),t.statements)),1024);return a.outFile||a.out||e.moveEmitHelpers(C,u,function(e){return!e.scoped}),g&&(b[i]=g,g=void 0),l=void 0,_=void 0,d=void 0,p=void 0,f=void 0,m=void 0,e.aggregateTransformFlags(C)});function D(t){var r=e.createUniqueName("exportStar"),n=e.createIdentifier("m"),i=e.createIdentifier("n"),a=e.createIdentifier("exports"),o=e.createStrictInequality(i,e.createLiteral("default"));return t&&(o=e.createLogicalAnd(o,e.createLogicalNot(e.createCall(e.createPropertyAccess(t,"hasOwnProperty"),void 0,[i])))),e.createFunctionDeclaration(void 0,void 0,void 0,r,void 0,[e.createParameter(void 0,void 0,void 0,n)],void 0,e.createBlock([e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(a,void 0,e.createObjectLiteral([]))])),e.createForIn(e.createVariableDeclarationList([e.createVariableDeclaration(i,void 0)]),n,e.createBlock([e.setEmitFlags(e.createIf(o,e.createExpressionStatement(e.createAssignment(e.createElementAccess(a,i),e.createElementAccess(n,i)))),1)])),e.createExpressionStatement(e.createCall(d,void 0,[a]))],!0))}function x(t){switch(t.kind){case 249:return function(t){var r;if(t.importClause&&i(e.getLocalNameForExternalImport(t,l)),A(t)){var n=e.getOriginalNodeId(t);h[n]=F(h[n],t)}else r=F(r,t);return e.singleOrMany(r)}(t);case 248:return function(t){var r;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),i(e.getLocalNameForExternalImport(t,l)),A(t)){var n=e.getOriginalNodeId(t);h[n]=P(h[n],t)}else r=P(r,t);return e.singleOrMany(r)}(t);case 255:return;case 254:return function(t){if(!t.isExportEquals){var r=e.visitNode(t.expression,z,e.isExpression),n=t.original;if(!n||!A(n))return R(e.createIdentifier("default"),r,!0);var i=e.getOriginalNodeId(t);h[i]=L(h[i],e.createIdentifier("default"),r,!0)}}(t);default:return j(t)}}function S(t){if(e.isBindingPattern(t.name))for(var r=0,n=t.name.elements;r<n.length;r++){var a=n[r];e.isOmittedExpression(a)||S(a)}else i(e.getSynthesizedClone(t.name))}function T(t){return 0==(2097152&e.getEmitFlags(t))&&(284===m.kind||0==(3&e.getOriginalNode(t).flags))}function C(r,n){var i=n?E:k;return e.isBindingPattern(r.name)?e.flattenDestructuringAssignment(r,z,t,0,!1,i):r.initializer?i(r.name,e.visitNode(r.initializer,z,e.isExpression)):r.name}function E(e,t,r){return N(e,t,r,!0)}function k(e,t,r){return N(e,t,r,!1)}function N(t,r,n,a){return i(e.getSynthesizedClone(t)),a?B(t,q(e.setTextRange(e.createAssignment(t,r),n))):q(e.setTextRange(e.createAssignment(t,r),n))}function A(t){return 0!=(4194304&e.getEmitFlags(t))}function F(e,t){if(_.exportEquals)return e;var r=t.importClause;if(!r)return e;r.name&&(e=M(e,r));var n=r.namedBindings;if(n)switch(n.kind){case 251:e=M(e,n);break;case 252:for(var i=0,a=n.elements;i<a.length;i++)e=M(e,a[i])}return e}function P(e,t){return _.exportEquals?e:M(e,t)}function w(e,t,r){if(_.exportEquals)return e;for(var n=0,i=t.declarationList.declarations;n<i.length;n++){var a=i[n];(a.initializer||r)&&(e=I(e,a,r))}return e}function I(t,r,n){if(_.exportEquals)return t;if(e.isBindingPattern(r.name))for(var i=0,a=r.name.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||(t=I(t,o,n))}else if(!e.isGeneratedIdentifier(r.name)){var s=void 0;n&&(t=L(t,r.name,e.getLocalName(r)),s=e.idText(r.name)),t=M(t,r,s)}return t}function O(t,r){if(_.exportEquals)return t;var n;if(e.hasModifier(r,1)){var i=e.hasModifier(r,512)?e.createLiteral("default"):r.name;t=L(t,i,e.getLocalName(r)),n=e.getTextOfIdentifierOrLiteral(i)}return r.name&&(t=M(t,r,n)),t}function M(t,r,n){if(_.exportEquals)return t;var i=e.getDeclarationName(r),a=_.exportSpecifiers.get(e.idText(i));if(a)for(var o=0,s=a;o<s.length;o++){var c=s[o];c.name.escapedText!==n&&(t=L(t,c.name,i))}return t}function L(t,r,n,i){return t=e.append(t,R(r,n,i))}function R(t,r,n){var i=e.createExpressionStatement(B(t,r));return e.startOnNewLine(i),n||e.setEmitFlags(i,1536),i}function B(t,r){var n=e.isIdentifier(t)?e.createLiteral(t):t;return e.setEmitFlags(r,1536|e.getEmitFlags(r)),e.setCommentRange(e.createCall(d,void 0,[n,r]),r)}function j(r){switch(r.kind){case 219:return function(t){if(!T(t.declarationList))return e.visitNode(t,z,e.isStatement);for(var r,n,i=e.hasModifier(t,1),a=A(t),o=0,s=t.declarationList.declarations;o<s.length;o++){var c=s[o];c.initializer?r=e.append(r,C(c,i&&!a)):S(c)}if(r&&(n=e.append(n,e.setTextRange(e.createExpressionStatement(e.inlineExpressions(r)),t))),a){var u=e.getOriginalNodeId(t);h[u]=w(h[u],t,i)}else n=w(n,t,!1);return e.singleOrMany(n)}(r);case 239:return function(r){if(f=e.hasModifier(r,1)?e.append(f,e.updateFunctionDeclaration(r,r.decorators,e.visitNodes(r.modifiers,U,e.isModifier),r.asteriskToken,e.getDeclarationName(r,!0,!0),void 0,e.visitNodes(r.parameters,z,e.isParameterDeclaration),void 0,e.visitNode(r.body,z,e.isBlock))):e.append(f,e.visitEachChild(r,z,t)),A(r)){var n=e.getOriginalNodeId(r);h[n]=O(h[n],r)}else f=O(f,r)}(r);case 240:return function(t){var r,n=e.getLocalName(t);if(i(n),r=e.append(r,e.setTextRange(e.createExpressionStatement(e.createAssignment(n,e.setTextRange(e.createClassExpression(void 0,t.name,void 0,e.visitNodes(t.heritageClauses,z,e.isHeritageClause),e.visitNodes(t.members,z,e.isClassElement)),t))),t)),A(t)){var a=e.getOriginalNodeId(t);h[a]=O(h[a],t)}else r=O(r,t);return e.singleOrMany(r)}(r);case 225:return function(t){var r=m;return m=t,t=e.updateFor(t,t.initializer&&J(t.initializer),e.visitNode(t.condition,z,e.isExpression),e.visitNode(t.incrementor,z,e.isExpression),e.visitNode(t.statement,j,e.isStatement)),m=r,t}(r);case 226:return function(t){var r=m;return m=t,t=e.updateForIn(t,J(t.initializer),e.visitNode(t.expression,z,e.isExpression),e.visitNode(t.statement,j,e.isStatement,e.liftToBlock)),m=r,t}(r);case 227:return function(t){var r=m;return m=t,t=e.updateForOf(t,t.awaitModifier,J(t.initializer),e.visitNode(t.expression,z,e.isExpression),e.visitNode(t.statement,j,e.isStatement,e.liftToBlock)),m=r,t}(r);case 223:return function(t){return e.updateDo(t,e.visitNode(t.statement,j,e.isStatement,e.liftToBlock),e.visitNode(t.expression,z,e.isExpression))}(r);case 224:return function(t){return e.updateWhile(t,e.visitNode(t.expression,z,e.isExpression),e.visitNode(t.statement,j,e.isStatement,e.liftToBlock))}(r);case 233:return function(t){return e.updateLabel(t,t.label,e.visitNode(t.statement,j,e.isStatement,e.liftToBlock))}(r);case 231:return function(t){return e.updateWith(t,e.visitNode(t.expression,z,e.isExpression),e.visitNode(t.statement,j,e.isStatement,e.liftToBlock))}(r);case 232:return function(t){return e.updateSwitch(t,e.visitNode(t.expression,z,e.isExpression),e.visitNode(t.caseBlock,j,e.isCaseBlock))}(r);case 246:return function(t){var r=m;return m=t,t=e.updateCaseBlock(t,e.visitNodes(t.clauses,j,e.isCaseOrDefaultClause)),m=r,t}(r);case 271:return function(t){return e.updateCaseClause(t,e.visitNode(t.expression,z,e.isExpression),e.visitNodes(t.statements,j,e.isStatement))}(r);case 272:case 235:return function(r){return e.visitEachChild(r,j,t)}(r);case 274:return function(t){var r=m;return m=t,t=e.updateCatchClause(t,t.variableDeclaration,e.visitNode(t.block,j,e.isBlock)),m=r,t}(r);case 218:return function(r){var n=m;return m=r,r=e.visitEachChild(r,j,t),m=n,r}(r);case 315:return function(t){if(A(t)&&219===t.original.kind){var r=e.getOriginalNodeId(t),n=e.hasModifier(t.original,1);h[r]=w(h[r],t.original,n)}return t}(r);case 316:return function(t){var r=e.getOriginalNodeId(t),n=h[r];if(n)return delete h[r],e.append(n,t);var i=e.getOriginalNode(t);return e.isModuleOrEnumDeclaration(i)?e.append(M(n,i),t):t}(r);default:return z(r)}}function J(r){if(function(t){return e.isVariableDeclarationList(t)&&T(t)}(r)){for(var n=void 0,i=0,a=r.declarations;i<a.length;i++){var o=a[i];n=e.append(n,C(o,!1)),o.initializer||S(o)}return n?e.inlineExpressions(n):e.createOmittedExpression()}return e.visitEachChild(r,j,t)}function z(r){return e.isDestructuringAssignment(r)?function(r){return K(r.left)?e.flattenDestructuringAssignment(r,z,t,0,!0):e.visitEachChild(r,z,t)}(r):e.isImportCall(r)?function(t){return e.createCall(e.createPropertyAccess(p,e.createIdentifier("import")),void 0,e.some(t.arguments)?[e.visitNode(t.arguments[0],z)]:[])}(r):512&r.transformFlags||524288&r.transformFlags?e.visitEachChild(r,z,t):r}function K(t){if(e.isAssignmentExpression(t,!0))return K(t.left);if(e.isSpreadElement(t))return K(t.expression);if(e.isObjectLiteralExpression(t))return e.some(t.properties,K);if(e.isArrayLiteralExpression(t))return e.some(t.elements,K);if(e.isShorthandPropertyAssignment(t))return K(t.name);if(e.isPropertyAssignment(t))return K(t.initializer);if(e.isIdentifier(t)){var r=o.getReferencedExportContainer(t);return void 0!==r&&284===r.kind}return!1}function U(e){switch(e.kind){case 85:case 80:return}return e}function V(t){var r;if(!e.isGeneratedIdentifier(t)){var n=o.getReferencedImportDeclaration(t)||o.getReferencedValueDeclaration(t);if(n){var i=o.getReferencedExportContainer(t,!1);i&&284===i.kind&&(r=e.append(r,e.getDeclarationName(n))),r=e.addRange(r,_&&_.exportedBindings[e.getOriginalNodeId(n)])}}return r}function q(t){return void 0===g&&(g=[]),g[e.getNodeId(t)]=!0,t}}}(c||(c={})),function(e){e.transformES2015Module=function(t){var r,n=t.getCompilerOptions(),i=t.onEmitNode,a=t.onSubstituteNode;return t.onEmitNode=function(t,n,a){e.isSourceFile(n)?(r=n,i(t,n,a),r=void 0):i(t,n,a)},t.onSubstituteNode=function(t,n){return n=a(t,n),e.isIdentifier(n)&&1===t?function(t){if(4096&e.getEmitFlags(t)){var n=e.getExternalHelpersModuleName(r);if(n)return e.createPropertyAccess(n,t)}return t}(n):n},t.enableEmitNotification(284),t.enableSubstitution(72),e.chainBundle(function(r){if(r.isDeclarationFile)return r;if(e.isExternalModule(r)||n.isolatedModules){var i=e.getOrCreateExternalHelpersModuleNameIfNeeded(r,n);if(i){var a=[],s=e.addPrologue(a,r.statements),c=e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(i)),e.createLiteral(e.externalHelpersModuleNameText));return e.addEmitFlags(c,67108864),e.append(a,c),e.addRange(a,e.visitNodes(r.statements,o,e.isStatement,s)),e.updateSourceFileNode(r,e.setTextRange(e.createNodeArray(a),r.statements))}return e.visitEachChild(r,o,t)}return r});function o(e){switch(e.kind){case 248:return;case 254:return function(e){return e.isExportEquals?void 0:e}(e)}return e}}}(c||(c={})),function(e){function t(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isPropertyAccessExpression(t)||e.isBindingElement(t)||e.isConstructorDeclaration(t)?r:e.isSetAccessor(t)||e.isGetAccessor(t)?function(r){var n;n=159===t.kind?e.hasModifier(t,32)?r.errorModuleName?e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1;return{diagnosticMessage:n,errorNode:t.name,typeName:t.name}}:e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isIndexSignatureDeclaration(t)?function(r){var n;switch(t.kind){case 161:n=r.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 160:n=r.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 162:n=r.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 156:case 155:n=e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:240===t.parent.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:r.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 239:n=r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return e.Debug.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:n,errorNode:t.name||t}}:e.isParameter(t)?e.isParameterPropertyDeclaration(t)&&e.hasModifier(t.parent,8)?r:function(r){var n=function(r){switch(t.parent.kind){case 157:return r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 161:case 166:return r.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 160:return r.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 162:return r.errorModuleName?e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 156:case 155:return e.hasModifier(t.parent,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:240===t.parent.parent.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 239:case 165:return r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;default:return e.Debug.fail("Unknown parent for parameter: "+e.SyntaxKind[t.parent.kind])}}(r);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}:e.isTypeParameterDeclaration(t)?function(){var r;switch(t.parent.kind){case 240:r=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 241:r=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 181:r=e.Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 166:case 161:r=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 160:r=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 156:case 155:r=e.hasModifier(t.parent,32)?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:240===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 165:case 239:r=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 242:r=e.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return e.Debug.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:r,errorNode:t,typeName:t.name}}:e.isExpressionWithTypeArguments(t)?function(){var r;r=240===t.parent.parent.kind?e.isHeritageClause(t.parent)&&109===t.parent.token?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;return{diagnosticMessage:r,errorNode:t,typeName:e.getNameOfDeclaration(t.parent.parent)}}:e.isImportEqualsDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}:e.isTypeAliasDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}:e.Debug.assertNever(t,"Attempted to set a declaration diagnostic context for unhandled node kind: "+e.SyntaxKind[t.kind]);function r(r){var n=function(r){return 237===t.kind||186===t.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:154===t.kind||189===t.kind||153===t.kind||151===t.kind&&e.hasModifier(t.parent,8)?e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:240===t.parent.kind||151===t.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(r);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}}e.canProduceDiagnostics=function(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isBindingElement(t)||e.isSetAccessor(t)||e.isGetAccessor(t)||e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isParameter(t)||e.isTypeParameterDeclaration(t)||e.isExpressionWithTypeArguments(t)||e.isImportEqualsDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isConstructorDeclaration(t)||e.isIndexSignatureDeclaration(t)||e.isPropertyAccessExpression(t)},e.createGetSymbolAccessibilityDiagnosticForNodeName=function(r){return e.isSetAccessor(r)||e.isGetAccessor(r)?function(t){var n=function(t){return e.hasModifier(r,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:240===r.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:r,typeName:r.name}:void 0}:e.isMethodSignature(r)||e.isMethodDeclaration(r)?function(t){var n=function(t){return e.hasModifier(r,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:240===r.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:r,typeName:r.name}:void 0}:t(r)},e.createGetSymbolAccessibilityDiagnosticForNode=t}(c||(c={})),function(e){function t(t,r){var n=r.text.substring(t.pos,t.end);return e.stringContains(n,"@internal")}function r(r,n){var i=e.getParseTreeNode(r);if(i&&151===i.kind){var a=i.parent.parameters.indexOf(i),o=a>0?i.parent.parameters[a-1]:void 0,s=n.text,c=o?e.concatenate(e.getTrailingCommentRanges(s,e.skipTrivia(s,o.end+1,!1,!0)),e.getLeadingCommentRanges(s,r.pos)):e.getTrailingCommentRanges(s,e.skipTrivia(s,r.pos,!1,!0));return c&&c.length&&t(e.last(c),n)}var u=i&&e.getLeadingCommentRangesOfNode(i,n);return!!e.forEach(u,function(e){return t(e,n)})}e.getDeclarationDiagnostics=function(t,r,n){if(n&&e.isSourceFileJS(n))return[];var a=t.getCompilerOptions();return e.transformNodes(r,t,a,n?[n]:e.filter(t.getSourceFiles(),e.isSourceFileNotJS),[i],!1).diagnostics},e.isInternalDeclaration=r;var n=531469;function i(t){var i,c,u,l,_,d,p,f,m,g,y=function(){return e.Debug.fail("Diagnostic emitted without context")},h=y,v=!0,b=!1,D=!1,x=!1,S=!1,T=t.getEmitHost(),C={trackSymbol:function(e,t,r){if(262144&e.flags)return;w(E.isSymbolAccessible(e,t,r,!0)),P(E.getTypeReferenceDirectivesForSymbol(e,r))},reportInaccessibleThisError:function(){p&&t.addDiagnostic(e.createDiagnosticForNode(p,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(p),"this"))},reportInaccessibleUniqueSymbolError:function(){p&&t.addDiagnostic(e.createDiagnosticForNode(p,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(p),"unique symbol"))},reportPrivateInBaseOfClassExpression:function(r){p&&t.addDiagnostic(e.createDiagnosticForNode(p,e.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected,r))},reportLikelyUnsafeImportRequiredError:function(r){p&&t.addDiagnostic(e.createDiagnosticForNode(p,e.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,e.declarationNameToString(p),r))},moduleResolverHost:T,trackReferencedAmbientModule:function(t,r){var n=E.getTypeReferenceDirectivesForSymbol(r,67108863);if(e.length(n))return P(n);var i=e.getSourceFileOfNode(t);m.set(""+e.getOriginalNodeId(i),i)},trackExternalModuleSymbolOfImportTypeNode:function(e){b||(d||(d=[])).push(e)}},E=t.getEmitResolver(),k=t.getCompilerOptions(),N=e.getNewLineCharacter(k),A=k.noResolve,F=k.stripInternal;return function(r){if(284===r.kind&&(r.isDeclarationFile||e.isSourceFileJS(r)))return r;if(285===r.kind){b=!0,m=e.createMap(),g=e.createMap();var n=!1,a=e.createBundle(e.map(r.sourceFiles,function(r){if(!r.isDeclarationFile&&!e.isSourceFileJS(r)){if(n=n||r.hasNoDefaultLib,f=r,i=r,u=void 0,_=!1,l=e.createMap(),h=y,x=!1,S=!1,I(r,m),O(r,g),e.isExternalModule(r)){D=!1,v=!1;var a=e.visitNodes(r.statements,Q),o=e.updateSourceFileNode(r,[e.createModuleDeclaration([],[e.createModifier(125)],e.createLiteral(e.getResolvedExternalModuleName(t.getEmitHost(),r)),e.createModuleBlock(e.setTextRange(e.createNodeArray(H(a)),r.statements)))],!0,[],[],!1,[]);return o}v=!0;var s=e.visitNodes(r.statements,Q);return e.updateSourceFileNode(r,H(s),!0,[],[],!1,[])}}),e.mapDefined(r.prepends,function(t){if(287===t.kind){var r=e.createUnparsedSourceFile(t,"dts",F);return n=n||!!r.hasNoDefaultLib,I(r,m),P(r.typeReferenceDirectives),O(r,g),r}return t}));a.syntheticFileReferences=[],a.syntheticTypeReferences=L(),a.syntheticLibReferences=M(),a.hasNoDefaultLib=n;var o=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(r,T,!0).declarationFilePath)),s=B(a.syntheticFileReferences,o);return m.forEach(s),a}v=!0,x=!1,S=!1,i=r,f=r,h=y,b=!1,D=!1,_=!1,u=void 0,l=e.createMap(),c=void 0,m=I(f,e.createMap()),g=O(f,e.createMap());var p=[],C=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(r,T,!0).declarationFilePath)),E=B(p,C),k=e.visitNodes(r.statements,Q),N=e.setTextRange(e.createNodeArray(H(k)),r.statements);m.forEach(E);var A=e.filter(N,e.isAnyImportSyntax);e.isExternalModule(r)&&(!D||x&&!S)&&(N=e.setTextRange(e.createNodeArray(N.concat([e.createExportDeclaration(void 0,void 0,e.createNamedExports([]),void 0)])),N));var w=e.updateSourceFileNode(r,N,!0,p,L(),r.hasNoDefaultLib,M());return w.exportedModulesFromDeclarationEmit=d,w;function M(){return e.map(e.arrayFrom(g.keys()),function(e){return{fileName:e,pos:-1,end:-1}})}function L(){return c?e.mapDefined(e.arrayFrom(c.keys()),R):[]}function R(t){if(A)for(var r=0,n=A;r<n.length;r++){var i=n[r];if(e.isImportEqualsDeclaration(i)&&e.isExternalModuleReference(i.moduleReference)){var a=i.moduleReference.expression;if(e.isStringLiteralLike(a)&&a.text===t)return}else if(e.isImportDeclaration(i)&&e.isStringLiteral(i.moduleSpecifier)&&i.moduleSpecifier.text===t)return}return{fileName:t,pos:-1,end:-1}}function B(t,n){return function(i){var a;if(i.isDeclarationFile)a=i.fileName;else{if(b&&e.contains(r.sourceFiles,i))return;var o=e.getOutputPathsFor(i,T,!0);a=o.declarationFilePath||o.jsFilePath||i.fileName}if(a){var s=e.getRelativePathToDirectoryOrUrl(n,a,T.getCurrentDirectory(),T.getCanonicalFileName,!1);if(e.startsWith(s,"./")&&e.hasExtension(s)&&(s=s.substring(2)),e.startsWith(s,"node_modules/")||-1!==s.indexOf("/node_modules/"))return;t.push({pos:-1,end:-1,fileName:s})}}}};function P(t){if(t){c=c||e.createMap();for(var r=0,n=t;r<n.length;r++){var i=n[r];c.set(i,!0)}}}function w(r){if(0===r.accessibility){if(r&&r.aliasesToMakeVisible)if(u)for(var n=0,i=r.aliasesToMakeVisible;n<i.length;n++){var a=i[n];e.pushIfUnique(u,a)}else u=r.aliasesToMakeVisible}else{var o=h(r);o&&(o.typeName?t.addDiagnostic(e.createDiagnosticForNode(r.errorNode||o.errorNode,o.diagnosticMessage,e.getTextOfNode(o.typeName),r.errorSymbolName,r.errorModuleName)):t.addDiagnostic(e.createDiagnosticForNode(r.errorNode||o.errorNode,o.diagnosticMessage,r.errorSymbolName,r.errorModuleName)))}}function I(t,r){return A||!e.isUnparsedSource(t)&&e.isSourceFileJS(t)?r:(e.forEach(t.referencedFiles,function(n){var i=e.tryResolveScriptReference(T,t,n);i&&r.set(""+e.getOriginalNodeId(i),i)}),r)}function O(t,r){return e.forEach(t.libReferenceDirectives,function(e){T.getLibFileFromReference(e)&&r.set(e.fileName.toLocaleLowerCase(),!0)}),r}function M(t,r){var n;_||(n=h,h=e.createGetSymbolAccessibilityDiagnosticForNode(t));var i=e.updateParameter(t,void 0,a(t,r),t.dotDotDotToken,function t(r){return 72===r.kind?r:185===r.kind?e.updateArrayBindingPattern(r,e.visitNodes(r.elements,n)):e.updateObjectBindingPattern(r,e.visitNodes(r.elements,n));function n(r){return 210===r.kind?r:e.updateBindingElement(r,r.dotDotDotToken,r.propertyName,t(r.name),L(r)?r.initializer:void 0)}}(t.name),E.isOptionalParameter(t)?t.questionToken||e.createToken(56):void 0,B(t,t.type,!0),R(t));return _||(h=n),i}function L(t){return function(t){switch(t.kind){case 154:case 153:return!e.hasModifier(t,8);case 151:case 237:return!0}return!1}(t)&&E.isLiteralConstDeclaration(e.getParseTreeNode(t))}function R(t){if(L(t))return E.createLiteralConstValue(e.getParseTreeNode(t),C)}function B(t,r,a){if((a||!e.hasModifier(t,8))&&!L(t)){var o,s=151===t.kind&&(E.isRequiredInitializedParameter(t)||E.isOptionalUninitializedParameterProperty(t));return r&&!s?e.visitNode(r,X):e.getParseTreeNode(t)?159===t.kind?e.createKeywordTypeNode(120):(p=t.name,_||(o=h,h=e.createGetSymbolAccessibilityDiagnosticForNode(t)),237===t.kind||186===t.kind?c(E.createTypeOfDeclaration(t,i,n,C)):151===t.kind||154===t.kind||153===t.kind?t.initializer?c(E.createTypeOfDeclaration(t,i,n,C,s)||E.createTypeOfExpression(t.initializer,i,n,C)):c(E.createTypeOfDeclaration(t,i,n,C,s)):c(E.createReturnTypeOfSignatureDeclaration(t,i,n,C))):r?e.visitNode(r,X):e.createKeywordTypeNode(120)}function c(t){return p=void 0,_||(h=o),t||e.createKeywordTypeNode(120)}}function j(t){switch((t=e.getParseTreeNode(t)).kind){case 239:case 244:case 241:case 240:case 242:case 243:return!E.isDeclarationVisible(t);case 237:return!J(t);case 248:case 249:case 255:case 254:return!1}return!1}function J(t){return!e.isOmittedExpression(t)&&(e.isBindingPattern(t.name)?e.some(t.name.elements,J):E.isDeclarationVisible(t))}function z(t,r,n){if(!e.hasModifier(t,8)){var i=e.map(r,function(e){return M(e,n)});if(i)return e.createNodeArray(i,r.hasTrailingComma)}}function K(t,r){return e.hasModifier(t,8)?void 0:e.visitNodes(r,X)}function U(t){return e.isSourceFile(t)||e.isTypeAliasDeclaration(t)||e.isModuleDeclaration(t)||e.isClassDeclaration(t)||e.isInterfaceDeclaration(t)||e.isFunctionLike(t)||e.isIndexSignatureDeclaration(t)||e.isMappedTypeNode(t)}function V(e,t){w(E.isEntityNameVisible(e,t)),P(E.getTypeReferenceDirectivesForEntityName(e))}function q(t,r){return e.hasJSDocNodes(t)&&e.hasJSDocNodes(r)&&(t.jsDoc=r.jsDoc),e.setCommentRange(t,e.getCommentRange(r))}function W(r,n){if(n){if(D=D||244!==r.kind&&183!==r.kind,e.isStringLiteralLike(n))if(b){var i=e.getExternalModuleNameFromDeclaration(t.getEmitHost(),E,r);if(i)return e.createLiteral(i)}else{var a=E.getSymbolOfExternalModuleSpecifier(n);a&&(d||(d=[])).push(a)}return n}}function H(t){for(;e.length(u);){var r=u.shift();if(!e.isLateVisibilityPaintedStatement(r))return e.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "+(e.SyntaxKind?e.SyntaxKind[r.kind]:r.kind));var n=v;v=r.parent&&e.isSourceFile(r.parent)&&!(e.isExternalModule(r.parent)&&b);var i=$(r,!0);v=n,l.set(""+e.getOriginalNodeId(r),i)}return e.visitNodes(t,function(t){if(e.isLateVisibilityPaintedStatement(t)){var r=""+e.getOriginalNodeId(t);if(l.has(r)){var n=l.get(r);return l.delete(r),n&&e.isSourceFile(t.parent)&&((e.isArray(n)?e.some(n,Y):Y(n))&&(x=!0),(e.isArray(n)?e.some(n,G):G(n))&&(D=!0)),n}}return t})}function G(t){return e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)}function Y(t){return!(e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)||e.isAmbientModule(t))}function X(r){if(!ee(r)){if(e.isDeclaration(r)){if(j(r))return;if(e.hasDynamicName(r)&&!E.isLateBound(e.getParseTreeNode(r)))return}if(!(e.isFunctionLike(r)&&E.isImplementationOfOverload(r)||e.isSemicolonClassElement(r))){var n;U(r)&&(n=i,i=r);var a=h;if((e.isMethodDeclaration(r)||e.isMethodSignature(r))&&e.hasModifier(r,8)){if(r.symbol&&r.symbol.declarations&&r.symbol.declarations[0]!==r)return;return D(e.createProperty(void 0,re(r),r.name,void 0,void 0,void 0))}var o=e.canProduceDiagnostics(r);o&&!_&&(h=e.createGetSymbolAccessibilityDiagnosticForNode(r)),e.isTypeQueryNode(r)&&V(r.exprName,i);var s=_,c=(168===r.kind||181===r.kind)&&242!==r.parent.kind;if(c&&(_=!0),function(e){switch(e.kind){case 161:case 157:case 156:case 158:case 159:case 154:case 153:case 155:case 160:case 162:case 237:case 150:case 211:case 164:case 175:case 165:case 166:case 183:return!0}return!1}(r))switch(r.kind){case 211:(e.isEntityName(r.expression)||e.isEntityNameExpression(r.expression))&&V(r.expression,i);var u=e.visitEachChild(r,X,t);return D(e.updateExpressionWithTypeArguments(u,e.parenthesizeTypeParameters(u.typeArguments),u.expression));case 164:V(r.typeName,i);u=e.visitEachChild(r,X,t);return D(e.updateTypeReferenceNode(u,u.typeName,e.parenthesizeTypeParameters(u.typeArguments)));case 161:return D(e.updateConstructSignature(r,K(r,r.typeParameters),z(r,r.parameters),B(r,r.type)));case 157:var l=e.hasModifier(r,8),d=e.createSignatureDeclaration(157,l?void 0:K(r,r.typeParameters),l?void 0:z(r,r.parameters,0),void 0);return d.modifiers=e.createNodeArray(re(r)),D(d);case 156:var f=e.createSignatureDeclaration(155,K(r,r.typeParameters),z(r,r.parameters),B(r,r.type));return f.name=r.name,f.modifiers=e.createNodeArray(re(r)),f.questionToken=r.questionToken,D(f);case 158:case 159:return D(ne(r));case 154:return D(e.updateProperty(r,void 0,re(r),r.name,r.questionToken,e.hasModifier(r,8)?void 0:B(r,r.type),R(r)));case 153:return D(e.updatePropertySignature(r,re(r),r.name,r.questionToken,e.hasModifier(r,8)?void 0:B(r,r.type),R(r)));case 155:return D(e.updateMethodSignature(r,K(r,r.typeParameters),z(r,r.parameters),B(r,r.type),r.name,r.questionToken));case 160:return D(e.updateCallSignature(r,K(r,r.typeParameters),z(r,r.parameters),B(r,r.type)));case 162:return D(e.updateIndexSignature(r,void 0,re(r),z(r,r.parameters),e.visitNode(r.type,X)||e.createKeywordTypeNode(120)));case 237:return e.isBindingPattern(r.name)?Z(r.name):(c=!0,_=!0,D(e.updateVariableDeclaration(r,r.name,B(r,r.type),R(r))));case 150:return function(t){return 156===t.parent.kind&&e.hasModifier(t.parent,8)}(r)&&(r.default||r.constraint)?D(e.updateTypeParameterDeclaration(r,r.name,void 0,void 0)):D(e.visitEachChild(r,X,t));case 175:var m=e.visitNode(r.checkType,X),g=e.visitNode(r.extendsType,X),y=i;i=r.trueType;var v=e.visitNode(r.trueType,X);i=y;var b=e.visitNode(r.falseType,X);return D(e.updateConditionalTypeNode(r,m,g,v,b));case 165:return D(e.updateFunctionTypeNode(r,e.visitNodes(r.typeParameters,X),z(r,r.parameters),e.visitNode(r.type,X)));case 166:return D(e.updateConstructorTypeNode(r,e.visitNodes(r.typeParameters,X),z(r,r.parameters),e.visitNode(r.type,X)));case 183:return e.isLiteralImportTypeNode(r)?D(e.updateImportTypeNode(r,e.updateLiteralTypeNode(r.argument,W(r,r.argument.literal)),r.qualifier,e.visitNodes(r.typeArguments,X,e.isTypeNode),r.isTypeOf)):D(r);default:e.Debug.assertNever(r,"Attempted to process unhandled node kind: "+e.SyntaxKind[r.kind])}return D(e.visitEachChild(r,X,t))}}function D(t){return t&&o&&e.hasDynamicName(r)&&function(t){var r;_||(r=h,h=e.createGetSymbolAccessibilityDiagnosticForNodeName(t));p=t.name,e.Debug.assert(E.isLateBound(e.getParseTreeNode(t))),V(t.name.expression,i),_||(h=r);p=void 0}(r),U(r)&&(i=n),o&&!_&&(h=a),c&&(_=s),t===r?t:t&&e.setOriginalNode(q(t,r),r)}}function Q(t){if(function(e){switch(e.kind){case 239:case 244:case 248:case 241:case 240:case 242:case 243:case 219:case 249:case 255:case 254:return!0}return!1}(t)&&!ee(t)){switch(t.kind){case 255:return e.isSourceFile(t.parent)&&(D=!0,S=!0),e.updateExportDeclaration(t,void 0,t.modifiers,t.exportClause,W(t,t.moduleSpecifier));case 254:if(e.isSourceFile(t.parent)&&(D=!0,S=!0),72===t.expression.kind)return t;var r=e.createOptimisticUniqueName("_default");h=function(){return{diagnosticMessage:e.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:t}};var i=e.createVariableDeclaration(r,E.createTypeOfExpression(t.expression,t,n,C),void 0);return[e.createVariableStatement(v?[e.createModifier(125)]:[],e.createVariableDeclarationList([i],2)),e.updateExportAssignment(t,t.decorators,t.modifiers,r)]}var a=$(t);return l.set(""+e.getOriginalNodeId(t),a),t}}function $(t,r){if(!ee(t)){switch(t.kind){case 248:return function(t){if(E.isDeclarationVisible(t)){if(259===t.moduleReference.kind){var r=e.getExternalModuleImportEqualsDeclarationExpression(t);return e.updateImportEqualsDeclaration(t,void 0,t.modifiers,t.name,e.updateExternalModuleReference(t.moduleReference,W(t,r)))}var n=h;return h=e.createGetSymbolAccessibilityDiagnosticForNode(t),V(t.moduleReference,i),h=n,t}}(t);case 249:return function(t){if(!t.importClause)return e.updateImportDeclaration(t,void 0,t.modifiers,t.importClause,W(t,t.moduleSpecifier));var r=t.importClause&&t.importClause.name&&E.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return r&&e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,void 0),W(t,t.moduleSpecifier));if(251===t.importClause.namedBindings.kind){var n=E.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return r||n?e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,n),W(t,t.moduleSpecifier)):void 0}var i=e.mapDefined(t.importClause.namedBindings.elements,function(e){return E.isDeclarationVisible(e)?e:void 0});return i&&i.length||r?e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,i&&i.length?e.updateNamedImports(t.importClause.namedBindings,i):void 0),W(t,t.moduleSpecifier)):void 0}(t)}if(!(e.isDeclaration(t)&&j(t)||e.isFunctionLike(t)&&E.isImplementationOfOverload(t))){var a;U(t)&&(a=i,i=t);var o=e.canProduceDiagnostics(t),s=h;o&&(h=e.createGetSymbolAccessibilityDiagnosticForNode(t));var c=v;switch(t.kind){case 242:return I(e.updateTypeAliasDeclaration(t,void 0,re(t,r),t.name,e.visitNodes(t.typeParameters,X,e.isTypeParameterDeclaration),e.visitNode(t.type,X,e.isTypeNode)));case 241:return I(e.updateInterfaceDeclaration(t,void 0,re(t,r),t.name,K(t,t.typeParameters),ie(t.heritageClauses),e.visitNodes(t.members,X)));case 239:var u=I(e.updateFunctionDeclaration(t,void 0,re(t,r),void 0,t.name,K(t,t.typeParameters),z(t,t.parameters),B(t,t.type),void 0));if(u&&E.isExpandoFunctionDeclaration(t)){var _=e.mapDefined(E.getPropertiesOfContainerFunction(t),function(t){if(e.isPropertyAccessExpression(t.valueDeclaration)){h=e.createGetSymbolAccessibilityDiagnosticForNode(t.valueDeclaration);var r=E.createTypeOfDeclaration(t.valueDeclaration,i,n,C);h=s;var a=e.createVariableDeclaration(e.unescapeLeadingUnderscores(t.escapedName),r,void 0);return e.createVariableStatement(void 0,e.createVariableDeclarationList([a]))}});return[u,e.createModuleDeclaration(void 0,re(t,r),t.name,e.createModuleBlock(_),16)]}return u;case 244:v=!1;var d=t.body;if(d&&245===d.kind){var p=e.visitNodes(d.statements,Q),f=e.updateModuleBlock(d,H(p));v=c;var m=re(t,r);return I(e.updateModuleDeclaration(t,void 0,m,e.isExternalModuleAugmentation(t)?W(t,t.name):t.name,f))}v=c;m=re(t,r);v=!1,e.visitNode(d,Q);var g=""+e.getOriginalNodeId(d);f=l.get(g);return l.delete(g),I(e.updateModuleDeclaration(t,void 0,m,t.name,f));case 240:var y=e.createNodeArray(re(t,r)),b=K(t,t.typeParameters),D=e.getFirstConstructorWithBody(t),x=void 0;if(D){var S=h;x=e.compact(e.flatMap(D.parameters,function(t){if(e.hasModifier(t,92)&&!ee(t))return h=e.createGetSymbolAccessibilityDiagnosticForNode(t),72===t.name.kind?q(e.createProperty(void 0,re(t),t.name,t.questionToken,B(t,t.type),R(t)),t):function r(n){var i;for(var a=0,o=n.elements;a<o.length;a++){var s=o[a];e.isOmittedExpression(s)||(e.isBindingPattern(s.name)&&(i=e.concatenate(i,r(s.name))),(i=i||[]).push(e.createProperty(void 0,re(t),s.name,void 0,B(s,void 0),void 0)))}return i}(t.name)})),h=S}var T=e.createNodeArray(e.concatenate(x,e.visitNodes(t.members,X))),k=e.getEffectiveBaseTypeNode(t);if(k&&!e.isEntityNameExpression(k.expression)&&96!==k.expression.kind){var N=t.name?e.unescapeLeadingUnderscores(t.name.escapedText):"default",A=e.createOptimisticUniqueName(N+"_base");h=function(){return{diagnosticMessage:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:k,typeName:t.name}};var F=e.createVariableDeclaration(A,E.createTypeOfExpression(k.expression,t,n,C),void 0),P=e.createVariableStatement(v?[e.createModifier(125)]:[],e.createVariableDeclarationList([F],2)),w=e.createNodeArray(e.map(t.heritageClauses,function(t){if(86===t.token){var r=h;h=e.createGetSymbolAccessibilityDiagnosticForNode(t.types[0]);var n=e.updateHeritageClause(t,e.map(t.types,function(t){return e.updateExpressionWithTypeArguments(t,e.visitNodes(t.typeArguments,X),A)}));return h=r,n}return e.updateHeritageClause(t,e.visitNodes(e.createNodeArray(e.filter(t.types,function(t){return e.isEntityNameExpression(t.expression)||96===t.expression.kind})),X))}));return[P,I(e.updateClassDeclaration(t,void 0,y,t.name,b,w,T))]}w=ie(t.heritageClauses);return I(e.updateClassDeclaration(t,void 0,y,t.name,b,w,T));case 219:return I(function(t,r){if(!e.forEach(t.declarationList.declarations,J))return;var n=e.visitNodes(t.declarationList.declarations,X);if(!e.length(n))return;return e.updateVariableStatement(t,e.createNodeArray(re(t,r)),e.updateVariableDeclarationList(t.declarationList,n))}(t,r));case 243:return I(e.updateEnumDeclaration(t,void 0,e.createNodeArray(re(t,r)),t.name,e.createNodeArray(e.mapDefined(t.members,function(t){if(!ee(t)){var r=E.getConstantValue(t);return q(e.updateEnumMember(t,t.name,void 0!==r?e.createLiteral(r):void 0),t)}}))))}return e.Debug.assertNever(t,"Unhandled top-level node in declaration emit: "+e.SyntaxKind[t.kind])}}function I(r){return U(t)&&(i=a),o&&(h=s),244===t.kind&&(v=c),r===t?r:r&&e.setOriginalNode(q(r,t),t)}}function Z(t){return e.flatten(e.mapDefined(t.elements,function(t){return function(t){if(210===t.kind)return;if(t.name){if(!J(t))return;return e.isBindingPattern(t.name)?Z(t.name):e.createVariableDeclaration(t.name,B(t,void 0),void 0)}}(t)}))}function ee(e){return!!F&&!!e&&r(e,f)}function te(t){return e.isExportAssignment(t)||e.isExportDeclaration(t)}function re(t,r){var n=e.getModifierFlags(t),i=function(t,r){var n=2811,i=v&&!function(e){if(241===e.kind)return!0;return!1}(t)?2:0,a=284===t.parent.kind;(!a||b&&a&&e.isExternalModule(t.parent))&&(n^=2|(r||b&&a||function(t){return!!e.isModuleBlock(t)&&e.some(t.statements,te)}(t.parent)?0:1),i=0);return o(t,n,i)}(t,r);return n===i?t.modifiers:e.createModifiersFromModifierFlags(i)}function ne(t){var r=E.getAllAccessorDeclarations(t);if(t.kind===r.firstAccessor.kind){var n=s(t);!n&&r.secondAccessor&&(n=s(r.secondAccessor),h=e.createGetSymbolAccessibilityDiagnosticForNode(r.secondAccessor));var i=e.createProperty(void 0,a(t,void 0,r.setAccessor?0:64),t.name,t.questionToken,B(t,n),void 0),o=r.secondAccessor&&e.getLeadingCommentRangesOfNode(r.secondAccessor,f);if(o)for(var c=function(t){if(3===t.kind){var r=f.text.slice(t.pos+2,t.end-2),n=r.split(/\r\n?|\n/g);if(n.length>1){var a=n.slice(1),o=e.guessIndentation(a);r=[n[0]].concat(e.map(a,function(e){return e.slice(o)})).join(N)}e.addSyntheticLeadingComment(i,t.kind,r,t.hasTrailingNewLine)}},u=0,l=o;u<l.length;u++){c(l[u])}return i}}function ie(t){return e.createNodeArray(e.filter(e.map(t,function(t){return e.updateHeritageClause(t,e.visitNodes(e.createNodeArray(e.filter(t.types,function(r){return e.isEntityNameExpression(r.expression)||86===t.token&&96===r.expression.kind})),X))}),function(e){return e.types&&!!e.types.length}))}}function a(t,r,n){return e.createModifiersFromModifierFlags(o(t,r,n))}function o(t,r,n){void 0===r&&(r=3067),void 0===n&&(n=0);var i=e.getModifierFlags(t)&r|n;return 512&i&&!(1&i)&&(i^=1),512&i&&2&i&&(i^=2),i}function s(e){if(e)return 158===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}e.transformDeclarations=i}(c||(c={})),function(e){var t,r;function n(e,t){return t}function i(e,t,r){r(e,t)}!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Completed=2]="Completed",e[e.Disposed=3]="Disposed"}(t||(t={})),function(e){e[e.Substitution=1]="Substitution",e[e.EmitNotifications=2]="EmitNotifications"}(r||(r={})),e.getTransformers=function(t,r){var n=t.jsx,i=e.getEmitScriptTarget(t),a=e.getEmitModuleKind(t),o=[];return e.addRange(o,r&&r.before),o.push(e.transformTypeScript),2===n&&o.push(e.transformJsx),i<7&&o.push(e.transformESNext),i<6&&o.push(e.transformES2019),i<5&&o.push(e.transformES2018),i<4&&o.push(e.transformES2017),i<3&&o.push(e.transformES2016),i<2&&(o.push(e.transformES2015),o.push(e.transformGenerators)),o.push(function(t){switch(t){case e.ModuleKind.ESNext:case e.ModuleKind.ES2015:return e.transformES2015Module;case e.ModuleKind.System:return e.transformSystemModule;default:return e.transformModule}}(a)),i<1&&o.push(e.transformES5),e.addRange(o,r&&r.after),o},e.noEmitSubstitution=n,e.noEmitNotification=i,e.transformNodes=function(t,r,a,o,s,c){for(var u,l,_,d=new Array(317),p=[],f=[],m=0,g=!1,y=n,h=i,v=0,b=[],D={getCompilerOptions:function(){return a},getEmitResolver:function(){return t},getEmitHost:function(){return r},startLexicalEnvironment:function(){e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!g,"Lexical environment is suspended."),p[m]=u,f[m]=l,m++,u=void 0,l=void 0},suspendLexicalEnvironment:function(){e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!g,"Lexical environment is already suspended."),g=!0},resumeLexicalEnvironment:function(){e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(g,"Lexical environment is not suspended."),g=!1},endLexicalEnvironment:function(){var t;if(e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!g,"Lexical environment is suspended."),(u||l)&&(l&&(t=l.slice()),u)){var r=e.createVariableStatement(void 0,e.createVariableDeclarationList(u));t?t.push(r):t=[r]}return u=p[--m],l=f[m],0===m&&(p=[],f=[]),t},hoistVariableDeclaration:function(t){e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed.");var r=e.setEmitFlags(e.createVariableDeclaration(t),64);u?u.push(r):u=[r]},hoistFunctionDeclaration:function(t){e.Debug.assert(v>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(v<2,"Cannot modify the lexical environment after transformation has completed."),l?l.push(t):l=[t]},requestEmitHelper:function(t){e.Debug.assert(v>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(v<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!t.scoped,"Cannot request a scoped emit helper."),_=e.append(_,t)},readEmitHelpers:function(){e.Debug.assert(v>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(v<2,"Cannot modify the transformation context after transformation has completed.");var t=_;return _=void 0,t},enableSubstitution:function(t){e.Debug.assert(v<2,"Cannot modify the transformation context after transformation has completed."),d[t]|=1},enableEmitNotification:function(t){e.Debug.assert(v<2,"Cannot modify the transformation context after transformation has completed."),d[t]|=2},isSubstitutionEnabled:k,isEmitNotificationEnabled:N,get onSubstituteNode(){return y},set onSubstituteNode(t){e.Debug.assert(v<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),y=t},get onEmitNode(){return h},set onEmitNode(t){e.Debug.assert(v<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),h=t},addDiagnostic:function(e){b.push(e)}},x=0,S=o;x<S.length;x++){var T=S[x];e.disposeEmitNodes(e.getSourceFileOfNode(e.getParseTreeNode(T)))}e.performance.mark("beforeTransform");var C=e.chain.apply(void 0,s)(D);v=1;var E=e.map(o,c?C:function(t){return!t||e.isSourceFile(t)&&t.isDeclarationFile?t:C(t)});return v=2,e.performance.mark("afterTransform"),e.performance.measure("transformTime","beforeTransform","afterTransform"),{transformed:E,substituteNode:function(t,r){return e.Debug.assert(v<3,"Cannot substitute a node after the result is disposed."),r&&k(r)&&y(t,r)||r},emitNodeWithNotification:function(t,r,n){e.Debug.assert(v<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),r&&(N(r)?h(t,r,n):n(t,r))},dispose:function(){if(v<3){for(var t=0,r=o;t<r.length;t++){var n=r[t];e.disposeEmitNodes(e.getSourceFileOfNode(e.getParseTreeNode(n)))}u=void 0,p=void 0,l=void 0,f=void 0,y=void 0,h=void 0,_=void 0,v=3}},diagnostics:b};function k(t){return 0!=(1&d[t.kind])&&0==(4&e.getEmitFlags(t))}function N(t){return 0!=(2&d[t.kind])||0!=(2&e.getEmitFlags(t))}}}(c||(c={})),function(e){var t,r,n=function(){var e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}(),i={pos:-1,end:-1};function a(t,r,n,i,a,s){void 0===i&&(i=!1);var u=e.isArray(n)?n:e.getSourceFilesToEmit(t,n),l=t.getCompilerOptions();if(l.outFile||l.out){var _=t.getPrependNodes();if(u.length||_.length){var d=e.createBundle(u,_);if(m=r(c(d,t,i),d))return m}}else{if(!a)for(var p=0,f=u;p<f.length;p++){var m,g=f[p];if(m=r(c(g,t,i),g))return m}if(s){var y=o(t.getCompilerOptions());if(y)return r({buildInfoPath:y},void 0)}}}function o(t){var r=t.configFilePath;if(r&&e.isIncrementalCompilation(t)){if(t.tsBuildInfoFile)return t.tsBuildInfoFile;var n,i=t.outFile||t.out;if(i)n=e.removeFileExtension(i);else{var a=e.removeFileExtension(r);n=t.outDir?t.rootDir?e.resolvePath(t.outDir,e.getRelativePathFromDirectory(t.rootDir,a,!0)):e.combinePaths(t.outDir,e.getBaseFileName(a)):a}return n+".tsbuildinfo"}}function s(t,r){var n=t.outFile||t.out,i=t.emitDeclarationOnly?void 0:n,a=i&&u(i,t),s=r||e.getEmitDeclarations(t)?e.removeFileExtension(n)+".d.ts":void 0;return{jsFilePath:i,sourceMapFilePath:a,declarationFilePath:s,declarationMapPath:s&&e.getAreDeclarationMapsEnabled(t)?s+".map":void 0,buildInfoPath:o(t)}}function c(t,r,n){var i=r.getCompilerOptions();if(285===t.kind)return s(i,n);var a=e.getOwnEmitOutputFilePath(t.fileName,r,l(t,i)),o=e.isJsonSourceFile(t)&&0===e.comparePaths(t.fileName,a,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames()),c=i.emitDeclarationOnly||o?void 0:a,_=!c||e.isJsonSourceFile(t)?void 0:u(c,i),d=e.isSourceFileJS(t),p=!n&&!e.getEmitDeclarations(i)||d?void 0:e.getDeclarationEmitOutputFilePath(t.fileName,r);return{jsFilePath:c,sourceMapFilePath:_,declarationFilePath:p,declarationMapPath:p&&e.getAreDeclarationMapsEnabled(i)?p+".map":void 0,buildInfoPath:void 0}}function u(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function l(t,r){if(e.isJsonSourceFile(t))return".json";if(1===r.jsx)if(e.isSourceFileJS(t)){if(e.fileExtensionIs(t.fileName,".jsx"))return".jsx"}else if(1===t.languageVariant)return".jsx";return".js"}function _(t,r,n,i){return i?e.resolvePath(i,e.getRelativePathFromDirectory(function(t){return t.options.rootDir||e.getDirectoryPath(e.Debug.assertDefined(t.options.configFilePath))}(r),t,n)):t}function d(t,r,n){return e.Debug.assert(!e.fileExtensionIs(t,".d.ts")&&e.hasTSFileExtension(t)),e.changeExtension(_(t,r,n,r.options.declarationDir||r.options.outDir),".d.ts")}function p(t,r,n){var i=e.fileExtensionIs(t,".json"),a=e.changeExtension(_(t,r,n,r.options.outDir),i?".json":e.fileExtensionIs(t,".tsx")&&1===r.options.jsx?".jsx":".js");return i&&0===e.comparePaths(t,a,e.Debug.assertDefined(r.options.configFilePath),n)?void 0:a}function f(t,r,n,i,o,s,c){var u,l,_=r.getCompilerOptions(),d=_.sourceMap||_.inlineSourceMap||e.getAreDeclarationMapsEnabled(_)?[]:void 0,p=_.listEmittedFiles?[]:void 0,f=e.createDiagnosticCollection(),g=e.getNewLineCharacter(_,function(){return r.getNewLine()}),h=e.createTextWriter(g),v=e.performance.createTimer("printTime","beforePrint","afterPrint"),b=v.enter,D=v.exit,x=!1;return b(),a(r,function(a,c){var d=a.jsFilePath,g=a.sourceMapFilePath,h=a.declarationFilePath,v=a.declarationMapPath,b=a.buildInfoPath;b&&c&&e.isBundle(c)&&(u={commonSourceDirectory:r.getCommonSourceDirectory(),sourceFiles:c.sourceFiles.map(function(e){return e.fileName})});(function(n,a,s){if(n&&!i&&a)if(a&&r.isEmitBlocked(a)||_.noEmit)x=!0;else{var c=e.transformNodes(t,r,_,[n],o,!1),l=y({removeComments:_.removeComments,newLine:_.newLine,noEmitHelpers:_.noEmitHelpers,module:_.module,target:_.target,sourceMap:_.sourceMap,inlineSourceMap:_.inlineSourceMap,inlineSources:_.inlineSources,extendedDiagnostics:_.extendedDiagnostics,writeBundleFileInfo:!!u},{hasGlobalName:t.hasGlobalName,onEmitNode:c.emitNodeWithNotification,substituteNode:c.substituteNode});e.Debug.assert(1===c.transformed.length,"Should only see one output from the transform"),T(a,s,c.transformed[0],l,_),c.dispose(),u&&(u.js=l.bundleFileInfo)}})(c,d,g),function(n,a,o){if(n&&a&&!e.isInJSFile(n)){var c=e.isSourceFile(n)?[n]:n.sourceFiles,d=e.filter(c,e.isSourceFileNotJS),p=_.outFile||_.out?[e.createBundle(d,e.isSourceFile(n)?void 0:n.prepends)]:d;i&&!e.getEmitDeclarations(_)&&d.forEach(S);var m=e.transformNodes(t,r,_,p,e.concatenate([e.transformDeclarations],s),!1);if(e.length(m.diagnostics))for(var g=0,h=m.diagnostics;g<h.length;g++){var v=h[g];f.add(v)}var b=y({removeComments:_.removeComments,newLine:_.newLine,noEmitHelpers:!0,module:_.module,target:_.target,sourceMap:_.sourceMap,inlineSourceMap:_.inlineSourceMap,extendedDiagnostics:_.extendedDiagnostics,onlyPrintJsDocStyle:!0,writeBundleFileInfo:!!u,recordInternalSection:!!u},{hasGlobalName:t.hasGlobalName,onEmitNode:m.emitNodeWithNotification,substituteNode:m.substituteNode}),D=!!m.diagnostics&&!!m.diagnostics.length||!!r.isEmitBlocked(a)||!!_.noEmit;if(x=x||D,(!D||i)&&(e.Debug.assert(1===m.transformed.length,"Should only see one output from the decl transform"),T(a,o,m.transformed[0],b,{sourceMap:_.declarationMap,sourceRoot:_.sourceRoot,mapRoot:_.mapRoot,extendedDiagnostics:_.extendedDiagnostics}),i&&284===m.transformed[0].kind)){var C=m.transformed[0];l=C.exportedModulesFromDeclarationEmit}m.dispose(),u&&(u.dts=b.bundleFileInfo)}}(c,h,v),function(t,i){if(i&&!n&&!x){var a=r.getProgramBuildInfo();(t||a)&&(r.isEmitBlocked(i)||_.noEmit?x=!0:e.writeFile(r,f,i,m({bundle:t,program:a,version:e.version}),!1))}}(u,b),!x&&p&&(i||(d&&p.push(d),g&&p.push(g),b&&p.push(b)),h&&p.push(h),v&&p.push(v))},e.getSourceFilesToEmit(r,n),i,c,!n),D(),{emitSkipped:x,diagnostics:f.getDiagnostics(),emittedFiles:p,sourceMaps:d,exportedModulesFromDeclarationEmit:l};function S(r){e.isExportAssignment(r)?72===r.expression.kind&&t.collectLinkedAliases(r.expression,!0):e.isExportSpecifier(r)?t.collectLinkedAliases(r.propertyName||r.name,!0):e.forEachChild(r,S)}function T(t,n,i,a,o){var s,c=285===i.kind?i:void 0,u=284===i.kind?i:void 0,l=c?c.sourceFiles:[u];if(function(t,r){return(t.sourceMap||t.inlineSourceMap)&&(284!==r.kind||!e.fileExtensionIs(r.fileName,".json"))}(o,i)&&(s=e.createSourceMapGenerator(r,e.getBaseFileName(e.normalizeSlashes(t)),function(t){var r=e.normalizeSlashes(t.sourceRoot||"");return r?e.ensureTrailingDirectorySeparator(r):r}(o),function(t,n,i){if(t.sourceRoot)return r.getCommonSourceDirectory();if(t.mapRoot){var a=e.normalizeSlashes(t.mapRoot);return i&&(a=e.getDirectoryPath(e.getSourceFilePathInNewDir(i.fileName,r,a))),0===e.getRootLength(a)&&(a=e.combinePaths(r.getCommonSourceDirectory(),a)),a}return e.getDirectoryPath(e.normalizePath(n))}(o,t,u),o)),c?a.writeBundle(c,h,s):a.writeFile(u,h,s),s){d&&d.push({inputSourceFileNames:s.getSources(),sourceMap:s.toJSON()});var p=function(t,n,i,a,o){if(t.inlineSourceMap){var s=n.toString(),c=e.base64encode(e.sys,s);return"data:application/json;base64,"+c}var u=e.getBaseFileName(e.normalizeSlashes(e.Debug.assertDefined(a)));if(t.mapRoot){var l=e.normalizeSlashes(t.mapRoot);return o&&(l=e.getDirectoryPath(e.getSourceFilePathInNewDir(o.fileName,r,l))),0===e.getRootLength(l)?(l=e.combinePaths(r.getCommonSourceDirectory(),l),e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizePath(i)),e.combinePaths(l,u),r.getCurrentDirectory(),r.getCanonicalFileName,!0)):e.combinePaths(l,u)}return u}(o,s,t,n,u);if(p&&(h.isAtStartOfLine()||h.rawWrite(g),h.writeComment("//# sourceMappingURL="+p)),n){var m=s.toString();e.writeFile(r,f,n,m,!1,l)}}else h.writeLine();e.writeFile(r,f,t,h.getText(),!!_.emitBOM,l),h.clear()}}function m(e){return JSON.stringify(e,void 0,2)}function g(e){return JSON.parse(e)}function y(t,r){void 0===t&&(t={}),void 0===r&&(r={});var a,o,s,c,u,l,_,d,p,f,m,g,y,h,v,b=r.hasGlobalName,D=r.onEmitNode,x=void 0===D?e.noEmitNotification:D,S=r.substituteNode,T=void 0===S?e.noEmitSubstitution:S,C=r.onBeforeEmitNodeArray,E=r.onAfterEmitNodeArray,k=r.onBeforeEmitToken,N=r.onAfterEmitToken,A=!!t.extendedDiagnostics,F=e.getNewLineCharacter(t),P=e.getEmitModuleKind(t),w=e.createMap(),I=function(e){p.write(e)},O=t.writeBundleFileInfo?{sections:[]}:void 0,M=t.recordInternalSection,L=0,R="text",B=!0,j=-1,J=-1,z=-1,K=-1,U=!1,V=!!t.removeComments,q=e.performance.createTimerIf(A,"commentTime","beforeComment","afterComment"),W=q.enter,H=q.exit;return le(),{printNode:function(t,r,n){switch(t){case 0:e.Debug.assert(e.isSourceFile(r),"Expected a SourceFile node.");break;case 2:e.Debug.assert(e.isIdentifier(r),"Expected an Identifier node.");break;case 1:e.Debug.assert(e.isExpression(r),"Expected an Expression node.")}switch(r.kind){case 284:return Y(r);case 285:return G(r);case 286:return function(e,t){var r=p;ue(t,void 0),se(4,e,void 0),le(),p=r}(r,ae()),oe()}return X(t,r,n,ae()),oe()},printList:function(e,t,r){return Q(e,t,r,ae()),oe()},printFile:Y,printBundle:G,writeNode:X,writeList:Q,writeFile:ie,writeBundle:ne,bundleFileInfo:O};function G(e){return ne(e,ae(),void 0),oe()}function Y(e){return ie(e,ae(),void 0),oe()}function X(e,t,r,n){var i=p;ue(n,void 0),se(e,t,r),le(),p=i}function Q(e,t,r,n){var a=p;ue(n,void 0),r&&ce(r),dt(i,t,e),le(),p=a}function $(){return p.getTextPosWithWriteLine?p.getTextPosWithWriteLine():p.getTextPos()}function Z(t,r,n){var i=e.lastOrUndefined(O.sections);i&&i.kind===n?i.end=r:O.sections.push({pos:t,end:r,kind:n})}function ee(t){if(M&&O&&a&&(e.isDeclaration(t)||e.isVariableStatement(t))&&e.isInternalDeclaration(t,a)&&"internal"!==R){var r=R;return re(p.getTextPos()),L=$(),R="internal",r}}function te(e){e&&(re(p.getTextPos()),L=$(),R=e)}function re(e){return L<e&&(Z(L,e,R),!0)}function ne(r,n,i){var a;m=!1;var o=p;ue(n,i),Ze(r),$e(r),be(r),function(t){Ge(!!t.hasNoDefaultLib,t.syntheticFileReferences||[],t.syntheticTypeReferences||[],t.syntheticLibReferences||[]);for(var r=0,n=t.prepends;r<n.length;r++){var i=n[r];if(e.isUnparsedSource(i)&&i.syntheticReferences)for(var a=0,o=i.syntheticReferences;a<o.length;a++){var s=o[a];de(s),Ct()}}}(r);for(var s=0,c=r.prepends;s<c.length;s++){var u=c[s];Ct();var l=p.getTextPos(),_=O&&O.sections;if(_&&(O.sections=[]),se(4,u,void 0),O){var d=O.sections;O.sections=_,u.oldFileOfCurrentEmit?(a=O.sections).push.apply(a,d):(d.forEach(function(t){return e.Debug.assert(e.isBundleFileTextLike(t))}),O.sections.push({pos:l,end:p.getTextPos(),kind:"prepend",data:u.fileName,texts:d}))}}L=$();for(var f=0,g=r.sourceFiles;f<g.length;f++){var y=g[f];se(0,y,y)}if(O&&r.sourceFiles.length&&re(p.getTextPos())){var h=function(t){for(var r,n=e.createMap(),i=0;i<t.sourceFiles.length;i++){for(var a=t.sourceFiles[i],o=void 0,s=0,c=0,u=a.statements;c<u.length;c++){var l=u[c];if(!e.isPrologueDirective(l))break;n.has(l.expression.text)||(n.set(l.expression.text,!0),(o||(o=[])).push({pos:l.pos,end:l.end,expression:{pos:l.expression.pos,end:l.expression.end,text:l.expression.text}}),s=s<l.end?l.end:s)}o&&(r||(r=[])).push({file:i,text:a.text.substring(0,s),directives:o})}return r}(r);h&&(O.sources||(O.sources={}),O.sources.prologues=h);var v=function(r){var n;if(P===e.ModuleKind.None||t.noEmitHelpers)return;for(var i=e.createMap(),a=0,o=r.sourceFiles;a<o.length;a++){var s=o[a],c=void 0!==e.getExternalHelpersModuleName(s),u=De(s);if(u)for(var l=0,_=u;l<_.length;l++){var d=_[l];d.scoped||c||i.get(d.name)||(i.set(d.name,!0),(n||(n=[])).push(d.name))}}return n}(r);v&&(O.sources||(O.sources={}),O.sources.helpers=v)}le(),p=o}function ie(e,t,r){m=!0;var n=p;ue(t,r),Ze(e),$e(e),se(0,e,e),le(),p=n}function ae(){return f||(f=e.createTextWriter(F))}function oe(){var e=f.getText();return f.clear(),e}function se(e,t,r){r&&ce(r),me(0,t)(e,t)}function ce(e){a=e,h=void 0,v=void 0,e&&Sr(e)}function ue(r,n){r&&t.omitTrailingSemicolon&&(r=e.getTrailingSemicolonOmittingWriter(r)),g=n,B=!(p=r)||!g}function le(){o=[],s=[],c=e.createMap(),u=[],l=0,_=[],a=void 0,h=void 0,v=void 0,ue(void 0,void 0)}function _e(){return h||(h=e.getLineStarts(a))}function de(e){if(void 0!==e){var t=ee(e);me(0,e)(4,e),te(t)}}function pe(e){void 0!==e&&me(0,e)(2,e)}function fe(e){void 0!==e&&me(0,e)(1,e)}function me(t,r){switch(t){case 0:if(x!==e.noEmitNotification)return ye;case 1:if(T!==e.noEmitSubstitution)return ve;case 2:if(!V&&284!==r.kind)return nr;case 3:if(!B&&284!==r.kind&&!e.isInJsonFile(r))return vr;case 4:return he;default:return e.Debug.assertNever(t)}}function ge(e,t){return me(e+1,t)}function ye(e,t){var r=ge(0,t);x(e,t,r)}function he(r,n){if(0===r)return function(t){Ct();var r=t.statements;if(sr){var n=0===r.length||!e.isPrologueDirective(r[0])||e.nodeIsSynthesized(r[0]);if(n)return void sr(t,r,Ye)}Ye(t)}(e.cast(n,e.isSourceFile));if(2===r)return Te(e.cast(n,e.isIdentifier));if(3===r)return function(e){de(e.name),St(),vt("in"),St(),de(e.constraint)}(e.cast(n,e.isTypeParameterDeclaration));if(5===r)return e.Debug.assertNode(n,e.isEmptyStatement),ke(!0);if(4===r){if(e.isKeyword(n.kind))return At(n,vt);switch(n.kind){case 15:case 16:case 17:return xe(n);case 286:case 280:return function(e){for(var t=0,r=e.texts;t<r.length;t++){var n=r[t];Ct(),de(n)}}(n);case 279:return Se(n);case 281:case 282:return s=n,c=$(),Se(s),void(O&&Z(c,p.getTextPos(),281===s.kind?"text":"internal"));case 283:return function(t){var r=$();if(Se(t),O){var n=e.clone(t.section);n.pos=r,n.end=p.getTextPos(),O.sections.push(n)}}(n);case 72:return Te(n);case 148:return function(e){(function(e){72===e.kind?fe(e):de(e)})(e.left),yt("."),de(e.right)}(n);case 149:return function(e){yt("["),fe(e.expression),yt("]")}(n);case 150:return function(e){de(e.name),e.constraint&&(St(),vt("extends"),St(),de(e.constraint));e.default&&(St(),bt("="),St(),de(e.default))}(n);case 151:return function(e){st(e,e.decorators),tt(e,e.modifiers),de(e.dotDotDotToken),et(e.name,Dt),de(e.questionToken),e.parent&&294===e.parent.kind&&!e.name?de(e.type):rt(e.type);nt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.decorators?e.decorators.end:e.pos,e)}(n);case 152:return o=n,yt("@"),void fe(o.expression);case 153:return function(e){st(e,e.decorators),tt(e,e.modifiers),et(e.name,Tt),de(e.questionToken),rt(e.type),ht()}(n);case 154:return function(e){st(e,e.decorators),tt(e,e.modifiers),de(e.name),de(e.questionToken),de(e.exclamationToken),rt(e.type),nt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),ht()}(n);case 155:return function(e){Vt(e),st(e,e.decorators),tt(e,e.modifiers),de(e.name),de(e.questionToken),ut(e,e.typeParameters),lt(e,e.parameters),rt(e.type),ht(),qt(e)}(n);case 156:return function(e){st(e,e.decorators),tt(e,e.modifiers),de(e.asteriskToken),de(e.name),de(e.questionToken),Ie(e,Oe)}(n);case 157:return function(e){tt(e,e.modifiers),vt("constructor"),Ie(e,Oe)}(n);case 158:case 159:return function(e){st(e,e.decorators),tt(e,e.modifiers),vt(158===e.kind?"get":"set"),St(),de(e.name),Ie(e,Oe)}(n);case 160:return function(e){Vt(e),st(e,e.decorators),tt(e,e.modifiers),ut(e,e.typeParameters),lt(e,e.parameters),rt(e.type),ht(),qt(e)}(n);case 161:return function(e){Vt(e),st(e,e.decorators),tt(e,e.modifiers),vt("new"),St(),ut(e,e.typeParameters),lt(e,e.parameters),rt(e.type),ht(),qt(e)}(n);case 162:return function(e){st(e,e.decorators),tt(e,e.modifiers),t=e,r=e.parameters,dt(t,r,8848),rt(e.type),ht();var t,r}(n);case 163:return function(e){de(e.parameterName),St(),vt("is"),St(),de(e.type)}(n);case 164:return function(e){de(e.typeName),ct(e,e.typeArguments)}(n);case 165:return function(e){Vt(e),ut(e,e.typeParameters),_t(e,e.parameters),St(),yt("=>"),St(),de(e.type),qt(e)}(n);case 294:return function(e){vt("function"),lt(e,e.parameters),yt(":"),de(e.type)}(n);case 166:return function(e){Vt(e),vt("new"),St(),ut(e,e.typeParameters),lt(e,e.parameters),St(),yt("=>"),St(),de(e.type),qt(e)}(n);case 167:return function(e){vt("typeof"),St(),de(e.exprName)}(n);case 168:return function(t){yt("{");var r=1&e.getEmitFlags(t)?768:32897;dt(t,t.members,524288|r),yt("}")}(n);case 169:return function(e){de(e.elementType),yt("["),yt("]")}(n);case 170:return function(e){yt("["),dt(e,e.elementTypes,528),yt("]")}(n);case 171:return function(e){de(e.type),yt("?")}(n);case 173:return function(e){dt(e,e.types,516)}(n);case 174:return function(e){dt(e,e.types,520)}(n);case 175:return function(e){de(e.checkType),St(),vt("extends"),St(),de(e.extendsType),St(),yt("?"),St(),de(e.trueType),St(),yt(":"),St(),de(e.falseType)}(n);case 176:return function(e){vt("infer"),St(),de(e.typeParameter)}(n);case 177:return function(e){yt("("),de(e.type),yt(")")}(n);case 211:return function(e){fe(e.expression),ct(e,e.typeArguments)}(n);case 178:return void vt("this");case 179:return function(e){Ft(e.operator,vt),St(),de(e.type)}(n);case 180:return function(e){de(e.objectType),yt("["),de(e.indexType),yt("]")}(n);case 181:return function(t){var r=e.getEmitFlags(t);yt("{"),1&r?St():(Ct(),Et());t.readonlyToken&&(de(t.readonlyToken),133!==t.readonlyToken.kind&&vt("readonly"),St());yt("["),me(0,t.typeParameter)(3,t.typeParameter),yt("]"),t.questionToken&&(de(t.questionToken),56!==t.questionToken.kind&&yt("?"));yt(":"),St(),de(t.type),ht(),1&r?St():(Ct(),kt());yt("}")}(n);case 182:return function(e){fe(e.literal)}(n);case 183:return function(e){e.isTypeOf&&(vt("typeof"),St());vt("import"),yt("("),de(e.argument),yt(")"),e.qualifier&&(yt("."),de(e.qualifier));ct(e,e.typeArguments)}(n);case 289:return void yt("*");case 290:return void yt("?");case 291:return function(e){yt("?"),de(e.type)}(n);case 292:return function(e){yt("!"),de(e.type)}(n);case 293:return function(e){de(e.type),yt("=")}(n);case 172:case 295:return function(e){yt("..."),de(e.type)}(n);case 184:return function(e){yt("{"),dt(e,e.elements,525136),yt("}")}(n);case 185:return function(e){yt("["),dt(e,e.elements,524880),yt("]")}(n);case 186:return function(e){de(e.dotDotDotToken),e.propertyName&&(de(e.propertyName),yt(":"),St());de(e.name),nt(e.initializer,e.name.end,e)}(n);case 216:return function(e){fe(e.expression),de(e.literal)}(n);case 217:return void ht();case 218:return function(e){Ee(e,!e.multiLine&&Jt(e))}(n);case 219:return function(e){tt(e,e.modifiers),de(e.declarationList),ht()}(n);case 220:return ke(!1);case 221:return function(t){fe(t.expression),(!e.isJsonSourceFile(a)||e.nodeIsSynthesized(t.expression))&&ht()}(n);case 222:return function(e){var t=Fe(91,e.pos,vt,e);St(),Fe(20,t,yt,e),fe(e.expression),Fe(21,e.expression.end,yt,e),ot(e,e.thenStatement),e.elseStatement&&(Pt(e),Fe(83,e.thenStatement.end,vt,e),222===e.elseStatement.kind?(St(),de(e.elseStatement)):ot(e,e.elseStatement))}(n);case 223:return function(t){Fe(82,t.pos,vt,t),ot(t,t.statement),e.isBlock(t.statement)?St():Pt(t);Ne(t,t.statement.end),yt(";")}(n);case 224:return function(e){Ne(e,e.pos),ot(e,e.statement)}(n);case 225:return function(e){var t=Fe(89,e.pos,vt,e);St();var r=Fe(20,t,yt,e);Ae(e.initializer),r=Fe(26,e.initializer?e.initializer.end:r,yt,e),at(e.condition),r=Fe(26,e.condition?e.condition.end:r,yt,e),at(e.incrementor),Fe(21,e.incrementor?e.incrementor.end:r,yt,e),ot(e,e.statement)}(n);case 226:return function(e){var t=Fe(89,e.pos,vt,e);St(),Fe(20,t,yt,e),Ae(e.initializer),St(),Fe(93,e.initializer.end,vt,e),St(),fe(e.expression),Fe(21,e.expression.end,yt,e),ot(e,e.statement)}(n);case 227:return function(e){var t=Fe(89,e.pos,vt,e);St(),function(e){e&&(de(e),St())}(e.awaitModifier),Fe(20,t,yt,e),Ae(e.initializer),St(),Fe(147,e.initializer.end,vt,e),St(),fe(e.expression),Fe(21,e.expression.end,yt,e),ot(e,e.statement)}(n);case 228:return function(e){Fe(78,e.pos,vt,e),it(e.label),ht()}(n);case 229:return function(e){Fe(73,e.pos,vt,e),it(e.label),ht()}(n);case 230:return function(e){Fe(97,e.pos,vt,e),at(e.expression),ht()}(n);case 231:return function(e){var t=Fe(108,e.pos,vt,e);St(),Fe(20,t,yt,e),fe(e.expression),Fe(21,e.expression.end,yt,e),ot(e,e.statement)}(n);case 232:return function(e){var t=Fe(99,e.pos,vt,e);St(),Fe(20,t,yt,e),fe(e.expression),Fe(21,e.expression.end,yt,e),St(),de(e.caseBlock)}(n);case 233:return function(e){de(e.label),Fe(57,e.label.end,yt,e),St(),de(e.statement)}(n);case 234:return function(e){Fe(101,e.pos,vt,e),at(e.expression),ht()}(n);case 235:return function(e){Fe(103,e.pos,vt,e),St(),de(e.tryBlock),e.catchClause&&(Pt(e),de(e.catchClause));e.finallyBlock&&(Pt(e),Fe(88,(e.catchClause||e.tryBlock).end,vt,e),St(),de(e.finallyBlock))}(n);case 236:return function(e){Nt(79,e.pos,vt),ht()}(n);case 237:return function(e){de(e.name),rt(e.type),nt(e.initializer,e.type?e.type.end:e.name.end,e)}(n);case 238:return function(t){vt(e.isLet(t)?"let":e.isVarConst(t)?"const":"var"),St(),dt(t,t.declarations,528)}(n);case 239:return function(e){Pe(e)}(n);case 240:return function(e){Be(e)}(n);case 241:return function(e){st(e,e.decorators),tt(e,e.modifiers),vt("interface"),St(),de(e.name),ut(e,e.typeParameters),dt(e,e.heritageClauses,512),St(),yt("{"),dt(e,e.members,129),yt("}")}(n);case 242:return function(e){st(e,e.decorators),tt(e,e.modifiers),vt("type"),St(),de(e.name),ut(e,e.typeParameters),St(),yt("="),St(),de(e.type),ht()}(n);case 243:return function(e){tt(e,e.modifiers),vt("enum"),St(),de(e.name),St(),yt("{"),dt(e,e.members,145),yt("}")}(n);case 244:return function(e){tt(e,e.modifiers),512&~e.flags&&(vt(16&e.flags?"namespace":"module"),St());de(e.name);var t=e.body;if(!t)return ht();for(;244===t.kind;)yt("."),de(t.name),t=t.body;St(),de(t)}(n);case 245:return function(t){Vt(t),e.forEach(t.statements,Ht),Ee(t,Jt(t)),qt(t)}(n);case 246:return function(e){Fe(18,e.pos,yt,e),dt(e,e.clauses,129),Fe(19,e.clauses.end,yt,e,!0)}(n);case 247:return function(e){var t=Fe(85,e.pos,vt,e);St(),t=Fe(119,t,vt,e),St(),t=Fe(131,t,vt,e),St(),de(e.name),ht()}(n);case 248:return function(e){tt(e,e.modifiers),Fe(92,e.modifiers?e.modifiers.end:e.pos,vt,e),St(),de(e.name),St(),Fe(59,e.name.end,yt,e),St(),function(e){72===e.kind?fe(e):de(e)}(e.moduleReference),ht()}(n);case 249:return function(e){tt(e,e.modifiers),Fe(92,e.modifiers?e.modifiers.end:e.pos,vt,e),St(),e.importClause&&(de(e.importClause),St(),Fe(144,e.importClause.end,vt,e),St());fe(e.moduleSpecifier),ht()}(n);case 250:return function(e){de(e.name),e.name&&e.namedBindings&&(Fe(27,e.name.end,yt,e),St());de(e.namedBindings)}(n);case 251:return function(e){var t=Fe(40,e.pos,yt,e);St(),Fe(119,t,vt,e),St(),de(e.name)}(n);case 252:return function(e){je(e)}(n);case 253:return function(e){Je(e)}(n);case 254:return function(e){var t=Fe(85,e.pos,vt,e);St(),e.isExportEquals?Fe(59,t,bt,e):Fe(80,t,vt,e);St(),fe(e.expression),ht()}(n);case 255:return function(e){var t=Fe(85,e.pos,vt,e);St(),e.exportClause?de(e.exportClause):t=Fe(40,t,yt,e);if(e.moduleSpecifier){St();var r=e.exportClause?e.exportClause.end:t;Fe(144,r,vt,e),St(),fe(e.moduleSpecifier)}ht()}(n);case 256:return function(e){je(e)}(n);case 257:return function(e){Je(e)}(n);case 258:return;case 259:return function(e){vt("require"),yt("("),fe(e.expression),yt(")")}(n);case 11:return function(e){p.writeLiteral(e.text)}(n);case 262:case 265:return function(t){yt("<"),e.isJsxOpeningElement(t)&&(ze(t.tagName),ct(t,t.typeArguments),t.attributes.properties&&t.attributes.properties.length>0&&St(),de(t.attributes));yt(">")}(n);case 263:case 266:return function(t){yt("</"),e.isJsxClosingElement(t)&&ze(t.tagName);yt(">")}(n);case 267:return function(e){de(e.name),function(e,t,r,n){r&&(t(e),n(r))}("=",yt,e.initializer,de)}(n);case 268:return function(e){dt(e,e.properties,262656)}(n);case 269:return function(e){yt("{..."),fe(e.expression),yt("}")}(n);case 270:return function(e){e.expression&&(yt("{"),de(e.dotDotDotToken),fe(e.expression),yt("}"))}(n);case 271:return function(e){Fe(74,e.pos,vt,e),St(),fe(e.expression),Ke(e,e.statements,e.expression.end)}(n);case 272:return function(e){var t=Fe(80,e.pos,vt,e);Ke(e,e.statements,t)}(n);case 273:return function(e){St(),Ft(e.token,vt),St(),dt(e,e.types,528)}(n);case 274:return function(e){var t=Fe(75,e.pos,vt,e);St(),e.variableDeclaration&&(Fe(20,t,yt,e),de(e.variableDeclaration),Fe(21,e.variableDeclaration.end,yt,e),St());de(e.block)}(n);case 275:return function(t){de(t.name),yt(":"),St();var r=t.initializer;if(fr&&0==(512&e.getEmitFlags(r))){var n=e.getCommentRange(r);fr(n.pos)}fe(r)}(n);case 276:return function(e){de(e.name),e.objectAssignmentInitializer&&(St(),yt("="),St(),fe(e.objectAssignmentInitializer))}(n);case 277:return function(e){e.expression&&(Fe(25,e.pos,yt,e),fe(e.expression))}(n);case 278:return function(e){de(e.name),nt(e.initializer,e.name.end,e)}(n);case 304:case 310:return function(e){qe(e.tagName),He(e.typeExpression),St(),e.isBracketed&&yt("[");de(e.name),e.isBracketed&&yt("]");We(e.comment)}(n);case 305:case 307:case 306:case 303:return qe((i=n).tagName),He(i.typeExpression),void We(i.comment);case 300:return function(e){qe(e.tagName),St(),yt("{"),de(e.class),yt("}"),We(e.comment)}(n);case 308:return function(e){qe(e.tagName),He(e.constraint),St(),dt(e,e.typeParameters,528),We(e.comment)}(n);case 309:return function(e){qe(e.tagName),e.typeExpression&&(288===e.typeExpression.kind?He(e.typeExpression):(St(),yt("{"),I("Object"),e.typeExpression.isArrayType&&(yt("["),yt("]")),yt("}")));e.fullName&&(St(),de(e.fullName));We(e.comment),e.typeExpression&&297===e.typeExpression.kind&&Ue(e.typeExpression)}(n);case 302:return function(e){qe(e.tagName),e.name&&(St(),de(e.name));We(e.comment),Ve(e.typeExpression)}(n);case 298:return Ve(n);case 297:return Ue(n);case 301:case 299:return function(e){qe(e.tagName),We(e.comment)}(n);case 296:return function(e){if(I("/**"),e.comment)for(var t=e.comment.split(/\r\n?|\n/g),r=0,n=t;r<n.length;r++){var i=n[r];Ct(),St(),yt("*"),St(),I(i)}e.tags&&(1!==e.tags.length||307!==e.tags[0].kind||e.comment?dt(e,e.tags,33):(St(),de(e.tags[0])));St(),I("*/")}(n)}if(e.isExpression(n))r=1,T!==e.noEmitSubstitution&&(n=T(r,n));else if(e.isToken(n))return At(n,yt)}var i,o,s,c;if(1===r)switch(n.kind){case 8:case 9:return function(e){xe(e)}(n);case 10:case 13:case 14:return xe(n);case 72:return Te(n);case 87:case 96:case 98:case 102:case 100:case 92:return void At(n,vt);case 187:return function(e){var t=e.elements,r=e.multiLine?65536:0;pt(e,t,8914|r)}(n);case 188:return function(t){e.forEach(t.properties,Gt);var r=65536&e.getEmitFlags(t);r&&Et();var n=t.multiLine?65536:0,i=a.languageVersion>=1&&!e.isJsonSourceFile(a)?64:0;dt(t,t.properties,526226|i|n),r&&kt()}(n);case 189:return function(r){var n=!1,i=!1,o=e.skipTrivia(a.text,r.expression.end,!1,!0),s=e.skipTrivia(a.text,o),c=s+1;if(!(131072&e.getEmitFlags(r))){var u=e.createToken(24);u.pos=r.expression.end,u.end=c,n=jt(r,r.expression,u),i=jt(r,u,r.name)}fe(r.expression),It(n,!1);var l=o!==s;!n&&function(r,n){if(r=e.skipPartiallyEmittedExpressions(r),e.isNumericLiteral(r)){var i=Ut(r,!0);return!r.numericLiteralFlags&&!e.stringContains(i,e.tokenToString(24))&&(!n||t.removeComments)}if(e.isPropertyAccessExpression(r)||e.isElementAccessExpression(r)){var a=e.getConstantValue(r);return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a&&t.removeComments}}(r.expression,l)&&yt(".");Fe(24,r.expression.end,yt,r),It(i,!1),de(r.name),Ot(n,i)}(n);case 190:return function(e){fe(e.expression),Fe(22,e.expression.end,yt,e),fe(e.argumentExpression),Fe(23,e.argumentExpression.end,yt,e)}(n);case 191:return function(e){fe(e.expression),ct(e,e.typeArguments),pt(e,e.arguments,2576)}(n);case 192:return function(e){Fe(95,e.pos,vt,e),St(),fe(e.expression),ct(e,e.typeArguments),pt(e,e.arguments,18960)}(n);case 193:return function(e){fe(e.tag),ct(e,e.typeArguments),St(),fe(e.template)}(n);case 194:return function(e){yt("<"),de(e.type),yt(">"),fe(e.expression)}(n);case 195:return function(e){var t=Fe(20,e.pos,yt,e);fe(e.expression),Fe(21,e.expression?e.expression.end:t,yt,e)}(n);case 196:return function(e){Yt(e.name),Pe(e)}(n);case 197:return function(e){st(e,e.decorators),tt(e,e.modifiers),Ie(e,Ce)}(n);case 198:return function(e){Fe(81,e.pos,vt,e),St(),fe(e.expression)}(n);case 199:return function(e){Fe(104,e.pos,vt,e),St(),fe(e.expression)}(n);case 200:return function(e){Fe(106,e.pos,vt,e),St(),fe(e.expression)}(n);case 201:return function(e){Fe(122,e.pos,vt,e),St(),fe(e.expression)}(n);case 202:return function(e){Ft(e.operator,bt),function(e){var t=e.operand;return 202===t.kind&&(38===e.operator&&(38===t.operator||44===t.operator)||39===e.operator&&(39===t.operator||45===t.operator))}(e)&&St();fe(e.operand)}(n);case 203:return function(e){fe(e.operand),Ft(e.operator,bt)}(n);case 204:return function(e){var t=27!==e.operatorToken.kind,r=jt(e,e.left,e.operatorToken),n=jt(e,e.operatorToken,e.right);fe(e.left),It(r,t),dr(e.operatorToken.pos),At(e.operatorToken,93===e.operatorToken.kind?vt:bt),fr(e.operatorToken.end,!0),It(n,!0),fe(e.right),Ot(r,n)}(n);case 205:return function(e){var t=jt(e,e.condition,e.questionToken),r=jt(e,e.questionToken,e.whenTrue),n=jt(e,e.whenTrue,e.colonToken),i=jt(e,e.colonToken,e.whenFalse);fe(e.condition),It(t,!0),de(e.questionToken),It(r,!0),fe(e.whenTrue),Ot(t,r),It(n,!0),de(e.colonToken),It(i,!0),fe(e.whenFalse),Ot(n,i)}(n);case 206:return function(e){de(e.head),dt(e,e.templateSpans,262144)}(n);case 207:return function(e){Fe(117,e.pos,vt,e),de(e.asteriskToken),at(e.expression)}(n);case 208:return function(e){Fe(25,e.pos,yt,e),fe(e.expression)}(n);case 209:return function(e){Yt(e.name),Be(e)}(n);case 210:return;case 212:return function(e){fe(e.expression),e.type&&(St(),vt("as"),St(),de(e.type))}(n);case 213:return function(e){fe(e.expression),bt("!")}(n);case 214:return function(e){Nt(e.keywordToken,e.pos,yt),yt("."),de(e.name)}(n);case 260:return function(e){de(e.openingElement),dt(e,e.children,262144),de(e.closingElement)}(n);case 261:return function(e){yt("<"),ze(e.tagName),ct(e,e.typeArguments),St(),de(e.attributes),yt("/>")}(n);case 264:return function(e){de(e.openingFragment),dt(e,e.children,262144),de(e.closingFragment)}(n);case 313:return function(e){fe(e.expression)}(n);case 314:return function(e){pt(e,e.elements,528)}(n)}}function ve(e,t){ge(1,t)(e,T(e,t))}function be(r){var n=!1,i=285===r.kind?r:void 0;if(!i||P!==e.ModuleKind.None){for(var o=i?i.prepends.length:0,s=i?i.sourceFiles.length+o:1,c=0;c<s;c++){var u=i?c<o?i.prepends[c]:i.sourceFiles[c-o]:r,l=e.isSourceFile(u)?u:e.isUnparsedSource(u)?void 0:a,_=t.noEmitHelpers||!!l&&void 0!==e.getExternalHelpersModuleName(l),d=(e.isSourceFile(u)||e.isUnparsedSource(u))&&!m,f=e.isUnparsedSource(u)?u.helpers:De(u);if(f)for(var g=0,y=f;g<y.length;g++){var h=y[g];if(h.scoped){if(i)continue}else{if(_)continue;if(d){if(w.get(h.name))continue;w.set(h.name,!0)}}var v=$();"string"==typeof h.text?wt(h.text):wt(h.text(rr)),O&&O.sections.push({pos:v,end:p.getTextPos(),kind:"emitHelpers",data:h.name}),n=!0}}return n}}function De(t){var r=e.getEmitHelpers(t);return r&&e.stableSort(r,e.compareEmitHelpers)}function xe(r){var n,i=Ut(r,t.neverAsciiEscape);!t.sourceMap&&!t.inlineSourceMap||10!==r.kind&&!e.isTemplateLiteralKind(r.kind)?function(e){p.writeStringLiteral(e)}(i):(n=i,p.writeLiteral(n))}function Se(e){p.rawWrite(e.parent.text.substring(e.pos,e.end))}function Te(e){(e.symbol?gt:I)(Kt(e,!1),e.symbol),dt(e,e.typeArguments,53776)}function Ce(e){ut(e,e.typeParameters),_t(e,e.parameters),rt(e.type),St(),de(e.equalsGreaterThanToken)}function Ee(t,r){Fe(18,t.pos,yt,t);var n=r||1&e.getEmitFlags(t)?768:129;dt(t,t.statements,n),Fe(19,t.statements.end,yt,t,!!(1&n))}function ke(e){e?yt(";"):ht()}function Ne(e,t){var r=Fe(107,t,vt,e);St(),Fe(20,r,yt,e),fe(e.expression),Fe(21,e.expression.end,yt,e)}function Ae(e){void 0!==e&&(238===e.kind?de(e):fe(e))}function Fe(t,r,n,i,o){var s=e.getParseTreeNode(i),c=s&&s.kind===i.kind,u=r;if(c&&(r=e.skipTrivia(a.text,r)),dr&&c&&i.pos!==u){var l=o&&!e.positionsAreOnSameLine(u,r,a);l&&Et(),dr(u),l&&kt()}return r=Ft(t,n,r),fr&&c&&i.end!==r&&fr(r,!0),r}function Pe(e){st(e,e.decorators),tt(e,e.modifiers),vt("function"),de(e.asteriskToken),St(),pe(e.name),Ie(e,Oe)}function we(e,t){Me(t)}function Ie(t,r){var n=t.body;if(n)if(e.isBlock(n)){var i=65536&e.getEmitFlags(t);i&&Et(),Vt(t),e.forEach(t.parameters,Ht),Ht(t.body),r(t),x?x(4,n,we):Me(n),qt(t),i&&kt()}else r(t),St(),fe(n);else r(t),ht()}function Oe(e){ut(e,e.typeParameters),lt(e,e.parameters),rt(e.type)}function Me(t){St(),yt("{"),Et();var r=function(t){if(1&e.getEmitFlags(t))return!0;if(t.multiLine)return!1;if(!e.nodeIsSynthesized(t)&&!e.rangeIsOnSingleLine(t,a))return!1;if(Mt(t,t.statements,2)||Rt(t,t.statements,2))return!1;for(var r,n=0,i=t.statements;n<i.length;n++){var o=i[n];if(Lt(r,o,2))return!1;r=o}return!0}(t)?Le:Re;sr?sr(t,t.statements,r):r(t),kt(),Nt(19,t.statements.end,yt,t)}function Le(e){Re(e,!0)}function Re(e,t){var r=Xe(e.statements),n=p.getTextPos();be(e),0===r&&n===p.getTextPos()&&t?(kt(),dt(e,e.statements,768),Et()):dt(e,e.statements,1,r)}function Be(t){e.forEach(t.members,Gt),st(t,t.decorators),tt(t,t.modifiers),vt("class"),t.name&&(St(),pe(t.name));var r=65536&e.getEmitFlags(t);r&&Et(),ut(t,t.typeParameters),dt(t,t.heritageClauses,0),St(),yt("{"),dt(t,t.members,129),yt("}"),r&&kt()}function je(e){yt("{"),dt(e,e.elements,525136),yt("}")}function Je(e){e.propertyName&&(de(e.propertyName),St(),Fe(119,e.propertyName.end,vt,e),St()),de(e.name)}function ze(e){72===e.kind?fe(e):de(e)}function Ke(t,r,n){var i=163969;1===r.length&&(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r[0])||e.rangeStartPositionsAreOnSameLine(t,r[0],a))?(Nt(57,n,yt,t),St(),i&=-130):Fe(57,n,yt,t),dt(t,r,i)}function Ue(t){dt(t,e.createNodeArray(t.jsDocPropertyTags),33)}function Ve(t){t.typeParameters&&dt(t,e.createNodeArray(t.typeParameters),33),t.parameters&&dt(t,e.createNodeArray(t.parameters),33),t.type&&(Ct(),St(),yt("*"),St(),de(t.type))}function qe(e){yt("@"),de(e)}function We(e){e&&(St(),I(e))}function He(e){e&&(St(),yt("{"),de(e.type),yt("}"))}function Ge(e,t,r,n){if(e){var i=p.getTextPos();xt('/// <reference no-default-lib="true"/>'),O&&O.sections.push({pos:i,end:p.getTextPos(),kind:"no-default-lib"}),Ct()}if(a&&a.moduleName&&(xt('/// <amd-module name="'+a.moduleName+'" />'),Ct()),a&&a.amdDependencies)for(var o=0,s=a.amdDependencies;o<s.length;o++){var c=s[o];c.name?xt('/// <amd-dependency name="'+c.name+'" path="'+c.path+'" />'):xt('/// <amd-dependency path="'+c.path+'" />'),Ct()}for(var u=0,l=t;u<l.length;u++){var _=l[u];i=p.getTextPos();xt('/// <reference path="'+_.fileName+'" />'),O&&O.sections.push({pos:i,end:p.getTextPos(),kind:"reference",data:_.fileName}),Ct()}for(var d=0,f=r;d<f.length;d++){_=f[d],i=p.getTextPos();xt('/// <reference types="'+_.fileName+'" />'),O&&O.sections.push({pos:i,end:p.getTextPos(),kind:"type",data:_.fileName}),Ct()}for(var m=0,g=n;m<g.length;m++){_=g[m],i=p.getTextPos();xt('/// <reference lib="'+_.fileName+'" />'),O&&O.sections.push({pos:i,end:p.getTextPos(),kind:"lib",data:_.fileName}),Ct()}}function Ye(t){var r=t.statements;Vt(t),e.forEach(t.statements,Ht),be(t);var n=e.findIndex(r,function(t){return!e.isPrologueDirective(t)});!function(e){e.isDeclarationFile&&Ge(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(t),dt(t,r,1,-1===n?r.length:n),qt(t)}function Xe(t,r,n,i){for(var a=!!r,o=0;o<t.length;o++){var s=t[o];if(!e.isPrologueDirective(s))return o;if(!n||!n.has(s.expression.text)){a&&(a=!1,ce(r)),Ct();var c=p.getTextPos();de(s),i&&O&&O.sections.push({pos:c,end:p.getTextPos(),kind:"prologue",data:s.expression.text}),n&&n.set(s.expression.text,!0)}}return t.length}function Qe(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!t.has(i.data)){Ct();var a=p.getTextPos();de(i),O&&O.sections.push({pos:a,end:p.getTextPos(),kind:"prologue",data:i.data}),t&&t.set(i.data,!0)}}}function $e(t){if(e.isSourceFile(t))Xe(t.statements,t);else{for(var r=e.createMap(),n=0,i=t.prepends;n<i.length;n++){Qe(i[n].prologues,r)}for(var a=0,o=t.sourceFiles;a<o.length;a++){var s=o[a];Xe(s.statements,s,r,!0)}ce(void 0)}}function Ze(t){if(e.isSourceFile(t)||e.isUnparsedSource(t)){var r=e.getShebang(t.text);if(r)return xt(r),Ct(),!0}else{for(var n=0,i=t.prepends;n<i.length;n++){var a=i[n];if(e.Debug.assertNode(a,e.isUnparsedSource),Ze(a))return!0}for(var o=0,s=t.sourceFiles;o<s.length;o++){if(Ze(s[o]))return!0}}}function et(e,t){if(e){var r=I;I=t,de(e),I=r}}function tt(e,t){t&&t.length&&(dt(e,t,262656),St())}function rt(e){e&&(yt(":"),St(),de(e))}function nt(e,t,r){e&&(St(),Fe(59,t,bt,r),St(),fe(e))}function it(e){e&&(St(),de(e))}function at(e){e&&(St(),fe(e))}function ot(t,r){if(e.isBlock(r)||1&e.getEmitFlags(t))St(),de(r);else{if(Ct(),Et(),e.isEmptyStatement(r))me(0,r)(5,r);else de(r);kt()}}function st(e,t){dt(e,t,49153)}function ct(e,t){dt(e,t,53776)}function ut(t,r){if(e.isFunctionLike(t)&&t.typeArguments)return ct(t,t.typeArguments);dt(t,r,53776)}function lt(e,t){dt(e,t,2576)}function _t(t,r){!function(t,r){var n=e.singleOrUndefined(r);return n&&n.pos===t.pos&&e.isArrowFunction(t)&&!t.type&&!e.some(t.decorators)&&!e.some(t.modifiers)&&!e.some(t.typeParameters)&&!e.some(n.decorators)&&!e.some(n.modifiers)&&!n.dotDotDotToken&&!n.questionToken&&!n.type&&!n.initializer&&e.isIdentifier(n.name)}(t,r)?lt(t,r):dt(t,r,528)}function dt(e,t,r,n,i){mt(de,e,t,r,n,i)}function pt(e,t,r,n,i){mt(fe,e,t,r,n,i)}function ft(e){switch(60&e){case 0:break;case 16:yt(",");break;case 4:St(),yt("|");break;case 32:St(),yt("*"),St();break;case 8:St(),yt("&")}}function mt(t,r,i,a,o,s){void 0===o&&(o=0),void 0===s&&(s=i?i.length-o:0);var c=void 0===i;if(!(c&&16384&a)){var u=void 0===i||o>=i.length||0===s;if(u&&32768&a)return C&&C(i),void(E&&E(i));if(15360&a&&(yt(function(e){return n[15360&e][0]}(a)),u&&!c&&fr(i.pos,!0)),C&&C(i),u)1&a?Ct():256&a&&!(524288&a)&&St();else{var l=0==(262144&a),_=l;Mt(r,i,a)?(Ct(),_=!1):256&a&&St(),128&a&&Et();for(var d=void 0,p=void 0,f=!1,m=0;m<s;m++){var g=i[o+m];if(32&a?(Ct(),ft(a)):d&&(60&a&&d.end!==r.end&&dr(d.end),ft(a),te(p),Lt(d,g,a)?(0==(131&a)&&(Et(),f=!0),Ct(),_=!1):d&&512&a&&St()),p=ee(g),_){if(fr)fr(e.getCommentRange(g).pos)}else _=l;t(g),f&&(kt(),f=!1),d=g}var y=64&a&&i.hasTrailingComma;16&a&&y&&yt(","),d&&60&a&&d.end!==r.end&&!(1024&e.getEmitFlags(d))&&dr(d.end),128&a&&kt(),te(p),Rt(r,i,a)?Ct():256&a&&St()}E&&E(i),15360&a&&(u&&!c&&dr(i.end),yt(function(e){return n[15360&e][1]}(a)))}}function gt(e,t){p.writeSymbol(e,t)}function yt(e){p.writePunctuation(e)}function ht(){p.writeTrailingSemicolon(";")}function vt(e){p.writeKeyword(e)}function bt(e){p.writeOperator(e)}function Dt(e){p.writeParameter(e)}function xt(e){p.writeComment(e)}function St(){p.writeSpace(" ")}function Tt(e){p.writeProperty(e)}function Ct(){p.writeLine()}function Et(){p.increaseIndent()}function kt(){p.decreaseIndent()}function Nt(t,r,n,i){return B?Ft(t,n,r):function(t,r,n,i,a){if(B||t&&e.isInJsonFile(t))return a(r,n,i);var o=t&&t.emitNode,s=o&&o.flags||0,c=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[r],u=c&&c.source||y;i=br(u,c?c.pos:i),0==(128&s)&&i>=0&&xr(u,i);i=a(r,n,i),c&&(i=c.end);0==(256&s)&&i>=0&&xr(u,i);return i}(i,t,n,r,Ft)}function At(t,r){k&&k(t),r(e.tokenToString(t.kind)),N&&N(t)}function Ft(t,r,n){var i=e.tokenToString(t);return r(i),n<0?n:n+i.length}function Pt(t){1&e.getEmitFlags(t)?St():Ct()}function wt(t){for(var r=t.split(/\r\n?|\n/g),n=e.guessIndentation(r),i=0,a=r;i<a.length;i++){var o=a[i],s=n?o.slice(n):o;s.length&&(Ct(),I(s))}}function It(e,t){e?(Et(),Ct()):t&&St()}function Ot(e,t){e&&kt(),t&&kt()}function Mt(t,r,n){if(1&n)return!0;if(2&n){if(65536&n)return!0;var i=r[0];return void 0===i?!e.rangeIsOnSingleLine(t,a):e.positionIsSynthesized(t.pos)||e.nodeIsSynthesized(i)?Bt(i,n):!e.rangeStartPositionsAreOnSameLine(t,i,a)}return!1}function Lt(t,r,n){return!!(1&n)||(2&n?void 0!==t&&void 0!==r&&(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r)?Bt(t,n)||Bt(r,n):!e.rangeEndIsOnSameLineAsRangeStart(t,r,a)):e.getStartsOnNewLine(r))}function Rt(t,r,n){if(1&n)return 0==(131072&n);if(2&n){if(65536&n)return!0;var i=e.lastOrUndefined(r);return void 0===i?!e.rangeIsOnSingleLine(t,a):e.positionIsSynthesized(t.pos)||e.nodeIsSynthesized(i)?Bt(i,n):!e.rangeEndPositionsAreOnSameLine(t,i,a)}return!1}function Bt(t,r){if(e.nodeIsSynthesized(t)){var n=e.getStartsOnNewLine(t);return void 0===n?0!=(65536&r):n}return 0!=(65536&r)}function jt(t,r,n){return t=zt(t),r=zt(r),n=zt(n),!!e.getStartsOnNewLine(n)||!(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r)||e.nodeIsSynthesized(n)||e.rangeEndIsOnSameLineAsRangeStart(r,n,a))}function Jt(t){return 0===t.statements.length&&e.rangeEndIsOnSameLineAsRangeStart(t,t,a)}function zt(t){for(;195===t.kind&&e.nodeIsSynthesized(t);)t=t.expression;return t}function Kt(t,r){return e.isGeneratedIdentifier(t)?Xt(t):e.isIdentifier(t)&&(e.nodeIsSynthesized(t)||!t.parent||!a||t.parent&&a&&e.getSourceFileOfNode(t)!==e.getOriginalNode(a))?e.idText(t):10===t.kind&&t.textSourceNode?Kt(t.textSourceNode,r):!e.isLiteralExpression(t)||!e.nodeIsSynthesized(t)&&t.parent?e.getSourceTextOfNodeFromSourceFile(a,t,r):t.text}function Ut(t,r){if(10===t.kind&&t.textSourceNode){var n=t.textSourceNode;return e.isIdentifier(n)?r||16777216&e.getEmitFlags(t)?'"'+e.escapeString(Kt(n))+'"':'"'+e.escapeNonAsciiString(Kt(n))+'"':Ut(n,r)}return e.getLiteralText(t,a,r)}function Vt(t){t&&524288&e.getEmitFlags(t)||(u.push(l),l=0,_.push(d))}function qt(t){t&&524288&e.getEmitFlags(t)||(l=u.pop(),d=_.pop())}function Wt(t){d&&d!==e.lastOrUndefined(_)||(d=e.createMap()),d.set(t,!0)}function Ht(t){if(t)switch(t.kind){case 218:e.forEach(t.statements,Ht);break;case 233:case 231:case 223:case 224:Ht(t.statement);break;case 222:Ht(t.thenStatement),Ht(t.elseStatement);break;case 225:case 227:case 226:Ht(t.initializer),Ht(t.statement);break;case 232:Ht(t.caseBlock);break;case 246:e.forEach(t.clauses,Ht);break;case 271:case 272:e.forEach(t.statements,Ht);break;case 235:Ht(t.tryBlock),Ht(t.catchClause),Ht(t.finallyBlock);break;case 274:Ht(t.variableDeclaration),Ht(t.block);break;case 219:Ht(t.declarationList);break;case 238:e.forEach(t.declarations,Ht);break;case 237:case 151:case 186:case 240:Yt(t.name);break;case 239:Yt(t.name),524288&e.getEmitFlags(t)&&(e.forEach(t.parameters,Ht),Ht(t.body));break;case 184:case 185:e.forEach(t.elements,Ht);break;case 249:Ht(t.importClause);break;case 250:Yt(t.name),Ht(t.namedBindings);break;case 251:Yt(t.name);break;case 252:e.forEach(t.elements,Ht);break;case 253:Yt(t.propertyName||t.name)}}function Gt(e){if(e)switch(e.kind){case 275:case 276:case 154:case 156:case 158:case 159:Yt(e.name)}}function Yt(t){t&&(e.isGeneratedIdentifier(t)?Xt(t):e.isBindingPattern(t)&&Ht(t))}function Xt(t){if(4==(7&t.autoGenerateFlags))return Qt(function(t){var r=t.autoGenerateId,n=t,i=n.original;for(;i&&(n=i,!(e.isIdentifier(n)&&4&n.autoGenerateFlags&&n.autoGenerateId!==r));)i=n.original;return n}(t),t.autoGenerateFlags);var r=t.autoGenerateId;return s[r]||(s[r]=function(t){switch(7&t.autoGenerateFlags){case 1:return er(0,!!(8&t.autoGenerateFlags));case 2:return er(268435456,!!(8&t.autoGenerateFlags));case 3:return tr(e.idText(t),32&t.autoGenerateFlags?Zt:$t,!!(16&t.autoGenerateFlags),!!(8&t.autoGenerateFlags))}return e.Debug.fail("Unsupported GeneratedIdentifierKind.")}(t))}function Qt(t,r){var n=e.getNodeId(t);return o[n]||(o[n]=function(t,r){switch(t.kind){case 72:return tr(Kt(t),$t,!!(16&r),!!(8&r));case 244:case 243:return function(t){var r=Kt(t.name);return function(t,r){for(var n=r;e.isNodeDescendantOf(n,r);n=n.nextContainer)if(n.locals){var i=n.locals.get(e.escapeLeadingUnderscores(t));if(i&&70366143&i.flags)return!1}return!0}(r,t)?r:tr(r)}(t);case 249:case 255:return function(t){var r=e.getExternalModuleName(t);return tr(e.isStringLiteral(r)?e.makeIdentifierFromModuleName(r.text):"module")}(t);case 239:case 240:case 254:return tr("default");case 209:return tr("class");case 156:case 158:case 159:return function(t){if(e.isIdentifier(t.name))return Qt(t.name);return er(0)}(t);default:return er(0)}}(t,r))}function $t(e){return Zt(e)&&!c.has(e)&&!(d&&d.has(e))}function Zt(t){return!a||e.isFileLevelUniqueName(a,t,b)}function er(e,t){if(e&&!(l&e)&&$t(r=268435456===e?"_i":"_n"))return l|=e,t&&Wt(r),r;for(;;){var r,n=268435455&l;if(l++,8!==n&&13!==n)if($t(r=n<26?"_"+String.fromCharCode(97+n):"_"+(n-26)))return t&&Wt(r),r}}function tr(e,t,r,n){if(void 0===t&&(t=$t),r&&t(e))return n?Wt(e):c.set(e,!0),e;95!==e.charCodeAt(e.length-1)&&(e+="_");for(var i=1;;){var a=e+i;if(t(a))return n?Wt(a):c.set(a,!0),a;i++}}function rr(e){return tr(e,Zt,!0)}function nr(t,r){W(),U=!1;var n=e.getEmitFlags(r),i=e.getCommentRange(r),a=i.pos,o=i.end,s=312!==r.kind,c=a<0||0!=(512&n)||11===r.kind,u=o<0||0!=(1024&n)||11===r.kind,l=J,_=z,d=K;(a>0||o>0)&&a!==o&&(c||cr(a,s),(!c||a>=0&&0!=(512&n))&&(J=a),(!u||o>=0&&0!=(1024&n))&&(z=o,238===r.kind&&(K=o))),e.forEach(e.getSyntheticLeadingComments(r),ir),H();var p=ge(2,r);2048&n?(V=!0,p(t,r),V=!1):p(t,r),W(),e.forEach(e.getSyntheticTrailingComments(r),ar),(a>0||o>0)&&a!==o&&(J=l,z=_,K=d,!u&&s&&function(e){yr(e,pr)}(o)),H()}function ir(e){2===e.kind&&p.writeLine(),or(e),e.hasTrailingNewLine||2===e.kind?p.writeLine():p.writeSpace(" ")}function ar(e){p.isAtStartOfLine()||p.writeSpace(" "),or(e),e.hasTrailingNewLine&&p.writeLine()}function or(t){var r=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),n=3===t.kind?e.computeLineStarts(r):void 0;e.writeCommentRange(r,n,p,0,r.length,F)}function sr(t,r,n){W();var i,o,s=r.pos,c=r.end,u=e.getEmitFlags(t),l=V||c<0||0!=(1024&u);s<0||0!=(512&u)||(i=r,(o=e.emitDetachedComments(a.text,_e(),p,hr,i,F,V))&&(v?v.push(o):v=[o])),H(),2048&u&&!V?(V=!0,n(t),V=!1):n(t),W(),l||(cr(r.end,!0),U&&!p.isAtStartOfLine()&&p.writeLine()),H()}function cr(e,t){U=!1,t?gr(e,_r):0===e&&gr(e,ur)}function ur(t,r,n,i,o){(function(t,r){return e.isRecognizedTripleSlashComment(a.text,t,r)})(t,r)&&_r(t,r,n,i,o)}function lr(r,n){return!t.onlyPrintJsDocStyle||(e.isJSDocLikeText(r,n)||e.isPinnedComment(r,n))}function _r(t,r,n,i,o){lr(a.text,t)&&(U||(e.emitNewLineBeforeLeadingCommentOfPosition(_e(),p,o,t),U=!0),Dr(t),e.writeCommentRange(a.text,_e(),p,t,r,F),Dr(r),i?p.writeLine():3===n&&p.writeSpace(" "))}function dr(e){V||-1===e||cr(e,!0)}function pr(t,r,n,i){lr(a.text,t)&&(p.isAtStartOfLine()||p.writeSpace(" "),Dr(t),e.writeCommentRange(a.text,_e(),p,t,r,F),Dr(r),i&&p.writeLine())}function fr(e,t){V||(W(),yr(e,t?pr:mr),H())}function mr(t,r,n,i){Dr(t),e.writeCommentRange(a.text,_e(),p,t,r,F),Dr(r),i?p.writeLine():p.writeSpace(" ")}function gr(t,r){!a||-1!==J&&t===J||(function(t){return void 0!==v&&e.last(v).nodePos===t}(t)?function(t){var r=e.last(v).detachedCommentEndPos;v.length-1?v.pop():v=void 0;e.forEachLeadingCommentRange(a.text,r,t,r)}(r):e.forEachLeadingCommentRange(a.text,t,r,t))}function yr(t,r){a&&(-1===z||t!==z&&t!==K)&&e.forEachTrailingCommentRange(a.text,t,r)}function hr(t,r,n,i,o,s){lr(a.text,i)&&(Dr(i),e.writeCommentRange(t,r,n,i,o,s),Dr(o))}function vr(t,r){var n=ge(3,r);if(e.isUnparsedSource(r)||e.isUnparsedPrepend(r))n(t,r);else if(e.isUnparsedNode(r)){var i=function(t){return void 0===t.parsedSourceMap&&void 0!==t.sourceMapText&&(t.parsedSourceMap=e.tryParseRawSourceMap(t.sourceMapText)||!1),t.parsedSourceMap||void 0}(r.parent);i&&g&&g.appendSourceMap(p.getLine(),p.getColumn(),i,r.parent.sourceMapPath,r.parent.getLineAndCharacterOfPosition(r.pos),r.parent.getLineAndCharacterOfPosition(r.end)),n(t,r)}else{var a=e.getSourceMapRange(r),o=a.pos,s=a.end,c=a.source,u=void 0===c?y:c,l=e.getEmitFlags(r);312!==r.kind&&0==(16&l)&&o>=0&&xr(u,br(u,o)),64&l?(B=!0,n(t,r),B=!1):n(t,r),312!==r.kind&&0==(32&l)&&s>=0&&xr(u,s)}}function br(t,r){return t.skipTrivia?t.skipTrivia(r):e.skipTrivia(t.text,r)}function Dr(t){if(!(B||e.positionIsSynthesized(t)||Tr(y))){var r=e.getLineAndCharacterOfPosition(y,t),n=r.line,i=r.character;g.addMapping(p.getLine(),p.getColumn(),j,n,i,void 0)}}function xr(e,t){if(e!==y){var r=y;Sr(e),Dr(t),Sr(r)}else Dr(t)}function Sr(e){B||(y=e,Tr(e)||(j=g.addSource(e.fileName),t.inlineSources&&g.setSourceContent(j,e.text)))}function Tr(t){return e.fileExtensionIs(t.fileName,".json")}}e.isBuildInfoFile=function(t){return e.fileExtensionIs(t,".tsbuildinfo")},e.forEachEmittedFile=a,e.getOutputPathForBuildInfo=o,e.getOutputPathsForBundle=s,e.getOutputPathsFor=c,e.getOutputExtension=l,e.getOutputDeclarationFileName=d,e.getAllProjectOutputs=function(t,r){var n,i=function(e){return e&&(n||(n=[])).push(e)};if(t.options.outFile||t.options.out){var a=s(t.options,!1),c=a.jsFilePath,u=a.sourceMapFilePath,l=a.declarationFilePath,_=a.declarationMapPath,f=a.buildInfoPath;i(c),i(u),i(l),i(_),i(f)}else{for(var m=0,g=t.fileNames;m<g.length;m++){var y=g[m];if(!e.fileExtensionIs(y,".d.ts")){var h=p(y,t,r);if(i(h),!e.fileExtensionIs(y,".json")&&(t.options.sourceMap&&i(h+".map"),e.getEmitDeclarations(t.options)&&e.hasTSFileExtension(y))){var v=d(y,t,r);i(v),t.options.declarationMap&&i(v+".map")}}}i(o(t.options))}return n||e.emptyArray},e.getFirstProjectOutput=function(t,r){if(t.options.outFile||t.options.out){var n=s(t.options,!1).jsFilePath;return e.Debug.assertDefined(n,"project "+t.options.configFilePath+" expected to have at least one output")}for(var i=0,a=t.fileNames;i<a.length;i++){var c=a[i];if(!e.fileExtensionIs(c,".d.ts")&&(n=p(c,t,r)))return n}var u=o(t.options);return u||e.Debug.fail("project "+t.options.configFilePath+" expected to have at least one output")},e.emitFiles=f,e.getBuildInfoText=m,e.getBuildInfo=g,e.notImplementedResolver={hasGlobalName:e.notImplemented,getReferencedExportContainer:e.notImplemented,getReferencedImportDeclaration:e.notImplemented,getReferencedDeclarationWithCollidingName:e.notImplemented,isDeclarationWithCollidingName:e.notImplemented,isValueAliasDeclaration:e.notImplemented,isReferencedAliasDeclaration:e.notImplemented,isTopLevelValueImportEqualsWithEntityName:e.notImplemented,getNodeCheckFlags:e.notImplemented,isDeclarationVisible:e.notImplemented,isLateBound:function(e){return!1},collectLinkedAliases:e.notImplemented,isImplementationOfOverload:e.notImplemented,isRequiredInitializedParameter:e.notImplemented,isOptionalUninitializedParameterProperty:e.notImplemented,isExpandoFunctionDeclaration:e.notImplemented,getPropertiesOfContainerFunction:e.notImplemented,createTypeOfDeclaration:e.notImplemented,createReturnTypeOfSignatureDeclaration:e.notImplemented,createTypeOfExpression:e.notImplemented,createLiteralConstValue:e.notImplemented,isSymbolAccessible:e.notImplemented,isEntityNameVisible:e.notImplemented,getConstantValue:e.notImplemented,getReferencedValueDeclaration:e.notImplemented,getTypeReferenceSerializationKind:e.notImplemented,isOptionalParameter:e.notImplemented,moduleExportsSomeValue:e.notImplemented,isArgumentsLocalBinding:e.notImplemented,getExternalModuleFileFromDeclaration:e.notImplemented,getTypeReferenceDirectivesForEntityName:e.notImplemented,getTypeReferenceDirectivesForSymbol:e.notImplemented,isLiteralConstDeclaration:e.notImplemented,getJsxFactoryEntity:e.notImplemented,getAllAccessorDeclarations:e.notImplemented,getSymbolOfExternalModuleSpecifier:e.notImplemented,isBindingCapturedByNode:e.notImplemented},e.emitUsingBuildInfo=function(t,r,n){var i=s(t.options,!1),a=i.buildInfoPath,o=i.jsFilePath,c=i.sourceMapFilePath,u=i.declarationFilePath,l=i.declarationMapPath,_=r.readFile(e.Debug.assertDefined(a));if(!_)return a;var d=r.readFile(e.Debug.assertDefined(o));if(!d)return o;var p=c&&r.readFile(c);if(c&&!p||t.options.inlineSourceMap)return c||"inline sourcemap decoding";var y=u&&r.readFile(u);if(u&&!y)return u;var h=l&&r.readFile(l);if(l&&!h||t.options.inlineSourceMap)return l||"inline sourcemap decoding";var v=g(_);if(!v.bundle||!v.bundle.js||y&&!v.bundle.dts)return a;var b,D,x,S=e.createInputFiles(d,y,c,p,l,h,o,u,a,v,!0),T=[],C=e.createPrependNodes(t.projectReferences,n,function(e){return r.readFile(e)}),E=(b=v.bundle,D=b.sourceFiles.map(function(t){var r=e.createNode(284,0,0);return r.fileName=t,r.text="",r.statements=e.createNodeArray(),r}),x=e.Debug.assertDefined(b.js),e.forEach(x.sources&&x.sources.prologues,function(t){var r=D[t.file];r.text=t.text,r.end=t.text.length,r.statements=e.createNodeArray(t.directives.map(function(t){var r=e.createNode(221,t.pos,t.end);return r.expression=e.createNode(10,t.expression.pos,t.expression.end),r.expression.text=t.expression.text,r}))}),D),k={getPrependNodes:e.memoize(function(){return C.concat([S])}),getCanonicalFileName:r.getCanonicalFileName,getCommonSourceDirectory:function(){return v.bundle.commonSourceDirectory},getCompilerOptions:function(){return t.options},getCurrentDirectory:function(){return r.getCurrentDirectory()},getNewLine:function(){return r.getNewLine()},getSourceFile:e.returnUndefined,getSourceFileByPath:e.returnUndefined,getSourceFiles:function(){return E},getLibFileFromReference:e.notImplemented,isSourceFileFromExternalLibrary:e.returnFalse,getResolvedProjectReferenceToRedirect:e.returnUndefined,writeFile:function(t,r,n){switch(t){case o:if(d===r)return;break;case c:if(p===r)return;break;case a:var i=g(r);i.program=v.program;var s=v.bundle,_=s.js,f=s.dts,b=s.sourceFiles;return i.bundle.js.sources=_.sources,f&&(i.bundle.dts.sources=f.sources),i.bundle.sourceFiles=b,void T.push({name:t,text:m(i),writeByteOrderMark:n});case u:if(y===r)return;break;case l:if(h===r)return;break;default:e.Debug.fail("Unexpected path: "+t)}T.push({name:t,text:r,writeByteOrderMark:n})},isEmitBlocked:e.returnFalse,readFile:function(e){return r.readFile(e)},fileExists:function(e){return r.fileExists(e)},directoryExists:r.directoryExists&&function(e){return r.directoryExists(e)},useCaseSensitiveFileNames:function(){return r.useCaseSensitiveFileNames()},getProgramBuildInfo:e.returnUndefined};return f(e.notImplementedResolver,k,void 0,!1,e.getTransformers(t.options)),T},function(e){e[e.Notification=0]="Notification",e[e.Substitution=1]="Substitution",e[e.Comments=2]="Comments",e[e.SourceMaps=3]="SourceMaps",e[e.Emit=4]="Emit"}(t||(t={})),e.createPrinter=y,function(e){e[e.Auto=0]="Auto",e[e.CountMask=268435455]="CountMask",e[e._i=268435456]="_i"}(r||(r={}))}(c||(c={})),function(e){var t;function r(e,t,r,n){return e.watchFile(t,r,n)}function n(e,t,r,n){return e.watchDirectory(t,r,0!=(1&n))}function i(e,r){switch(e){case t.None:return r;case t.TriggerOnly:return s;case t.Verbose:return r===n?o:a}}function a(e,t,r,n,i,a,o,u,l,_,d){l(_+":: Added:: "+c(t,n,a,o,d));var p=s(e,t,r,n,i,a,o,u,l,_,d);return{close:function(){l(_+":: Close:: "+c(t,n,a,o,d)),p.close()}}}function o(t,r,n,i,a,o,u,l,_,d,p){var f=d+":: Added:: "+c(r,i,o,u,p);_(f);var m=e.timestamp(),g=s(t,r,n,i,a,o,u,l,_,d,p),y=e.timestamp()-m;return _("Elapsed:: "+y+"ms "+f),{close:function(){var t=d+":: Close:: "+c(r,i,o,u,p);_(t);var n=e.timestamp();g.close();var a=e.timestamp()-n;_("Elapsed:: "+a+"ms "+t)}}}function s(t,r,n,i,a,o,s,u,l,_,d){return u(t,r,function(t,u){var p=_+":: Triggered with "+t+" "+(void 0!==u?u:"")+":: "+c(r,i,o,s,d);l(p);var f=e.timestamp();n(t,u,a);var m=e.timestamp()-f;l("Elapsed:: "+m+"ms "+p)},i)}function c(e,t,r,n,i){return"WatchInfo: "+e+" "+t+" "+(i?i(r,n):void 0===n?r:r+" "+n)}function u(e){e.watcher.close()}e.createCachedDirectoryStructureHost=function(t,r,n){if(t.getDirectories&&t.readDirectory){var i=e.createMap(),a=e.createGetCanonicalFileName(n);return{useCaseSensitiveFileNames:n,fileExists:function(e){var r=c(o(e));return r&&d(r.files,u(e))||t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:t.directoryExists&&function(r){var n=o(r);return i.has(e.ensureTrailingDirectorySeparator(n))||t.directoryExists(r)},getDirectories:function(e){var r=o(e),n=l(e,r);return n?n.directories.slice():t.getDirectories(e)},readDirectory:function(i,a,s,c,u){var _=o(i),d=l(i,_);return d?e.matchFiles(i,a,s,c,n,r,u,function(t){var r=o(t);return r===_?d:l(t,r)||e.emptyFileSystemEntries},f):t.readDirectory(i,a,s,c,u)},createDirectory:t.createDirectory&&function(e){var r=c(o(e)),n=u(e);r&&p(r.directories,n,!0),t.createDirectory(e)},writeFile:t.writeFile&&function(e,r,n){var i=c(o(e));return i&&m(i,u(e),!0),t.writeFile(e,r,n)},addOrDeleteFileOrDirectory:function(e,r){if(s(r))g();else{var n=c(r);if(n){if(t.directoryExists){var i=u(e),a={fileExists:t.fileExists(r),directoryExists:t.directoryExists(r)};return a.directoryExists||d(n.directories,i)?g():m(n,i,a.fileExists),a}g()}}},addOrDeleteFile:function(t,r,n){if(n!==e.FileWatcherEventKind.Changed){var i=c(r);i&&m(i,u(t),n===e.FileWatcherEventKind.Created)}},clearCache:g,realpath:t.realpath&&f}}function o(t){return e.toPath(t,r,a)}function s(t){return i.get(e.ensureTrailingDirectorySeparator(t))}function c(t){return s(e.getDirectoryPath(t))}function u(t){return e.getBaseFileName(e.normalizePath(t))}function l(r,n){var a=s(n=e.ensureTrailingDirectorySeparator(n));if(a)return a;try{return function(r,n){var a={files:e.map(t.readDirectory(r,void 0,void 0,["*.*"]),u)||[],directories:t.getDirectories(r)||[]};return i.set(e.ensureTrailingDirectorySeparator(n),a),a}(r,n)}catch(t){return void e.Debug.assert(!i.has(e.ensureTrailingDirectorySeparator(n)))}}function _(e,t){return a(e)===a(t)}function d(t,r){return e.some(t,function(e){return _(e,r)})}function p(t,r,n){if(d(t,r)){if(!n)return e.filterMutate(t,function(e){return!_(e,r)})}else if(n)return t.push(r)}function f(e){return t.realpath?t.realpath(e):e}function m(e,t,r){p(e.files,t,r)}function g(){i.clear()}},function(e){e[e.None=0]="None",e[e.Partial=1]="Partial",e[e.Full=2]="Full"}(e.ConfigFileProgramReloadLevel||(e.ConfigFileProgramReloadLevel={})),e.updateMissingFilePathsWatch=function(t,r,n){var i=t.getMissingFilePaths(),a=e.arrayToSet(i);e.mutateMap(r,a,{createNewValue:n,onDeleteValue:e.closeFileWatcher})},e.updateWatchingWildcardDirectories=function(t,r,n){function i(e,t){return{watcher:n(e,t),flags:t}}e.mutateMap(t,r,{createNewValue:i,onDeleteValue:u,onExistingValue:function(e,r,n){e.flags!==r&&(e.watcher.close(),t.set(n,i(n,r)))}})},e.isEmittedFileOfProgram=function(e,t){return!!e&&e.isEmittedFile(t)},function(e){e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose"}(t=e.WatchLogLevel||(e.WatchLogLevel={})),e.getWatchFactory=function(e,a,o){return function(e,r,n,a,o){var s=i(e,a),c=e===t.None?function(e,t,r,n,i){return a(e,t,function(e,t){return r(e,t,i)},n)}:s,u=i(e,o);return{watchFile:function(e,t,i,o,c,u){return s(e,t,i,o,void 0,c,u,a,r,"FileWatcher",n)},watchFilePath:function(e,t,i,o,s,u,l){return c(e,t,i,o,s,u,l,a,r,"FileWatcher",n)},watchDirectory:function(e,t,i,a,s,c){return u(e,t,i,a,void 0,s,c,o,r,"DirectoryWatcher",n)}}}(e,a,o,r,n)},e.closeFileWatcherOf=u}(c||(c={})),function(e){var t,r=/(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;function n(t,r){var n=e.getDirectoryPath(r),i=e.isRootedDiskPath(t)?t:e.combinePaths(n,t);return e.normalizePath(i)}function a(t,r,n){var i;return e.forEach(t,function(t){var a=e.getNormalizedPathComponents(t,r);if(a.pop(),i){for(var o=Math.min(i.length,a.length),s=0;s<o;s++)if(n(i[s])!==n(a[s])){if(0===s)return!0;i.length=s;break}a.length<i.length&&(i.length=a.length)}else i=a})?"":i?e.getPathFromPathComponents(i):r}function o(e,t){return s(e,t)}function s(t,r,n){void 0===n&&(n=e.sys);var i,a=e.createMap(),o=e.createGetCanonicalFileName(n.useCaseSensitiveFileNames);function s(t){t.length>e.getRootLength(t)&&!function(e){return!!a.has(e)||!!n.directoryExists(e)&&(a.set(e,!0),!0)}(t)&&(s(e.getDirectoryPath(t)),_.createDirectory?_.createDirectory(t):n.createDirectory(t))}function c(){return e.getDirectoryPath(e.normalizePath(n.getExecutingFilePath()))}var u=e.getNewLineCharacter(t,function(){return n.newLine}),l=n.realpath&&function(e){return n.realpath(e)},_={getSourceFile:function(t,n,i){var a;try{e.performance.mark("beforeIORead"),a=_.readFile(t),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),a=""}return void 0!==a?e.createSourceFile(t,a,n,r):void 0},getDefaultLibLocation:c,getDefaultLibFileName:function(t){return e.combinePaths(c(),e.getDefaultLibFileName(t))},writeFile:function(r,a,o,c){try{e.performance.mark("beforeIOWrite"),s(e.getDirectoryPath(e.normalizePath(r))),e.isWatchSet(t)&&n.createHash&&n.getModifiedTime?function(t,r,a){i||(i=e.createMap());var o=n.createHash(r),s=n.getModifiedTime(t);if(s){var c=i.get(t);if(c&&c.byteOrderMark===a&&c.hash===o&&c.mtime.getTime()===s.getTime())return}n.writeFile(t,r,a);var u=n.getModifiedTime(t)||e.missingFileModifiedTime;i.set(t,{hash:o,byteOrderMark:a,mtime:u})}(r,a,o):n.writeFile(r,a,o),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){c&&c(e.message)}},getCurrentDirectory:e.memoize(function(){return n.getCurrentDirectory()}),useCaseSensitiveFileNames:function(){return n.useCaseSensitiveFileNames},getCanonicalFileName:o,getNewLine:function(){return u},fileExists:function(e){return n.fileExists(e)},readFile:function(e){return n.readFile(e)},trace:function(e){return n.write(e+u)},directoryExists:function(e){return n.directoryExists(e)},getEnvironmentVariable:function(e){return n.getEnvironmentVariable?n.getEnvironmentVariable(e):""},getDirectories:function(e){return n.getDirectories(e)},realpath:l,readDirectory:function(e,t,r,i,a){return n.readDirectory(e,t,r,i,a)},createDirectory:function(e){return n.createDirectory(e)}};return _}function c(t,r){var n=e.diagnosticCategoryName(t)+" TS"+t.code+": "+D(t.messageText,r.getNewLine())+r.getNewLine();if(t.file){var i=e.getLineAndCharacterOfPosition(t.file,t.start),a=i.line,o=i.character,s=t.file.fileName;return e.convertToRelativePath(s,r.getCurrentDirectory(),function(e){return r.getCanonicalFileName(e)})+"("+(a+1)+","+(o+1)+"): "+n}return n}e.findConfigFile=function(t,r,n){return void 0===n&&(n="tsconfig.json"),e.forEachAncestorDirectory(t,function(t){var i=e.combinePaths(t,n);return r(i)?i:void 0})},e.resolveTripleslashReference=n,e.computeCommonSourceDirectoryOfFilenames=a,e.createCompilerHost=o,e.createCompilerHostWorker=s,e.changeCompilerHostLikeToUseCache=function(t,r,n){var i=t.readFile,a=t.fileExists,o=t.directoryExists,s=t.createDirectory,c=t.writeFile,u=e.createMap(),l=e.createMap(),_=e.createMap(),d=e.createMap(),p=function(e,r){var n=i.call(t,r);return u.set(e,void 0!==n&&n),n};t.readFile=function(n){var a=r(n),o=u.get(a);return void 0!==o?!1!==o?o:void 0:e.fileExtensionIs(n,".json")||e.isBuildInfoFile(n)?p(a,n):i.call(t,n)};var f=n?function(t,i,a,o){var s=r(t),c=d.get(s);if(c)return c;var u=n(t,i,a,o);return u&&(e.isDeclarationFileName(t)||e.fileExtensionIs(t,".json"))&&d.set(s,u),u}:void 0;return t.fileExists=function(e){var n=r(e),i=l.get(n);if(void 0!==i)return i;var o=a.call(t,e);return l.set(n,!!o),o},c&&(t.writeFile=function(e,n,i,a,o){var s=r(e);l.delete(s);var _=u.get(s);if(void 0!==_&&_!==n)u.delete(s),d.delete(s);else if(f){var p=d.get(s);p&&p.text!==n&&d.delete(s)}c.call(t,e,n,i,a,o)}),o&&s&&(t.directoryExists=function(e){var n=r(e),i=_.get(n);if(void 0!==i)return i;var a=o.call(t,e);return _.set(n,!!a),a},t.createDirectory=function(e){var n=r(e);_.delete(n),s.call(t,e)}),{originalReadFile:i,originalFileExists:a,originalDirectoryExists:o,originalCreateDirectory:s,originalWriteFile:c,getSourceFileWithCache:f,readFileWithCache:function(e){var t=r(e),n=u.get(t);return void 0!==n?!1!==n?n:void 0:p(t,e)}}},e.getPreEmitDiagnostics=function(t,r,n){var i=t.getConfigFileParsingDiagnostics().concat(t.getOptionsDiagnostics(n),t.getSyntacticDiagnostics(r,n),t.getGlobalDiagnostics(n),t.getSemanticDiagnostics(r,n));return e.getEmitDeclarations(t.getCompilerOptions())&&e.addRange(i,t.getDeclarationDiagnostics(r,n)),e.sortAndDeduplicateDiagnostics(i)},e.formatDiagnostics=function(e,t){for(var r="",n=0,i=e;n<i.length;n++)r+=c(i[n],t);return r},e.formatDiagnostic=c,function(e){e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan=""}(t=e.ForegroundColorEscapeSequences||(e.ForegroundColorEscapeSequences={}));var u="",l=" ",_="",d="...",p=" ",m=" ";function g(r){switch(r){case e.DiagnosticCategory.Error:return t.Red;case e.DiagnosticCategory.Warning:return t.Yellow;case e.DiagnosticCategory.Suggestion:return e.Debug.fail("Should never get an Info diagnostic on the command line.");case e.DiagnosticCategory.Message:return t.Blue}}function y(e,t){return t+e+_}function h(e,t){for(;e.length<t;)e=" "+e;return e}function v(t,r,n,i,a,o){var s=e.getLineAndCharacterOfPosition(t,r),c=s.line,p=s.character,f=e.getLineAndCharacterOfPosition(t,r+n),m=f.line,g=f.character,v=e.getLineAndCharacterOfPosition(t,t.text.length).line,b=m-c>=4,D=(m+1+"").length;b&&(D=Math.max(d.length,D));for(var x="",S=c;S<=m;S++){x+=o.getNewLine(),b&&c+1<S&&S<m-1&&(x+=i+y(h(d,D),u)+l+o.getNewLine(),S=m-1);var T=e.getPositionOfLineAndCharacter(t,S,0),C=S<v?e.getPositionOfLineAndCharacter(t,S+1,0):t.text.length,E=t.text.slice(T,C);if(E=(E=E.replace(/\s+$/g,"")).replace("\t"," "),x+=i+y(h(S+1+"",D),u)+l,x+=E+o.getNewLine(),x+=i+y(h("",D),u)+l,x+=a,S===c){var k=S===m?g:void 0;x+=E.slice(0,p).replace(/\S/g," "),x+=E.slice(p,k).replace(/./g,"~")}else x+=S===m?E.slice(0,g).replace(/./g,"~"):E.replace(/./g,"~");x+=_}return x}function b(r,n,i,a){void 0===a&&(a=y);var o=e.getLineAndCharacterOfPosition(r,n),s=o.line,c=o.character,u="";return u+=a(i?e.convertToRelativePath(r.fileName,i.getCurrentDirectory(),function(e){return i.getCanonicalFileName(e)}):r.fileName,t.Cyan),u+=":",u+=a(""+(s+1),t.Yellow),u+=":",u+=a(""+(c+1),t.Yellow)}function D(t,r){if(e.isString(t))return t;for(var n=t,i="",a=0;n;){if(a){i+=r;for(var o=0;o<a;o++)i+=" "}i+=n.messageText,a++,n=n.next}return i}function x(t,r,n,i){if(0===t.length)return[];for(var a=[],o=e.createMap(),s=0,c=t;s<c.length;s++){var u=c[s],l=void 0;o.has(u)?l=o.get(u):o.set(u,l=i(u,r,n)),a.push(l)}return a}function S(t,r){return void 0===r&&(r=t),{fileExists:function(e){return r.fileExists(e)},readDirectory:function(t,n,i,a,o){return e.Debug.assertDefined(r.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),r.readDirectory(t,n,i,a,o)},readFile:function(e){return r.readFile(e)},useCaseSensitiveFileNames:t.useCaseSensitiveFileNames(),getCurrentDirectory:function(){return t.getCurrentDirectory()},onUnRecoverableConfigFileDiagnostic:t.onUnRecoverableConfigFileDiagnostic||e.returnUndefined,trace:t.trace?function(e){return t.trace(e)}:void 0}}function T(t,r,n){if(!t)return e.emptyArray;for(var i,a=0;a<t.length;a++){var o=t[a],s=r(o,a);if(o.prepend&&s&&s.options){if(!(s.options.outFile||s.options.out))continue;var c=e.getOutputPathsForBundle(s.options,!0),u=c.jsFilePath,l=c.sourceMapFilePath,_=c.declarationFilePath,d=c.declarationMapPath,p=c.buildInfoPath,f=e.createInputFiles(n,u,l,_,d,p);(i||(i=[])).push(f)}}return i||e.emptyArray}function C(t,r){var n=r||t;return e.resolveConfigFileProjectName(n.path)}function E(e){return e.declaration?"declaration":"composite"}function k(t,r){switch(r.extension){case".ts":case".d.ts":return;case".tsx":return n();case".jsx":return n()||i();case".js":return i();case".json":return t.resolveJsonModule?void 0:e.Diagnostics.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used}function n(){return t.jsx?void 0:e.Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return t.allowJs||!e.getStrictOptionValue(t,"noImplicitAny")?void 0:e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function N(e){for(var t=e.imports,r=e.moduleAugmentations,n=t.map(function(e){return e.text}),i=0,a=r;i<a.length;i++){var o=a[i];10===o.kind&&n.push(o.text)}return n}e.formatColorAndReset=y,e.formatLocation=b,e.formatDiagnosticsWithColorAndContext=function(r,n){for(var i="",a=0,o=r;a<o.length;a++){var s=o[a];if(s.file&&(i+=b(_=s.file,d=s.start,n),i+=" - "),i+=y(e.diagnosticCategoryName(s),g(s.category)),i+=y(" TS"+s.code+": ",t.Grey),i+=D(s.messageText,n.getNewLine()),s.file&&(i+=n.getNewLine(),i+=v(s.file,s.start,s.length,"",g(s.category),n),s.relatedInformation)){i+=n.getNewLine();for(var c=0,u=s.relatedInformation;c<u.length;c++){var l=u[c],_=l.file,d=l.start,f=l.length,h=l.messageText;_&&(i+=n.getNewLine(),i+=p+b(_,d,n),i+=v(_,d,f,m,t.Cyan,n)),i+=n.getNewLine(),i+=m+D(h,n.getNewLine())}}i+=n.getNewLine()}return i},e.flattenDiagnosticMessageText=D,e.isProgramUptoDate=function(t,r,n,i,a,o,s,c){if(!t||s)return!1;if(t.getRootFileNames().length!==r.length)return!1;var u;if(!e.arrayIsEqualTo(t.getProjectReferences(),c,function(r,n,i){return!!e.projectReferenceIsEqualTo(r,n)&&function t(r,n){return r?!!e.contains(u,r)||!!_(r.sourceFile)&&((u||(u=[])).push(r),!e.forEach(r.references,function(e,n){return!t(e,r.commandLine.projectReferences[n])})):!a(C(n))}(t.getResolvedProjectReferences()[i],r)}))return!1;if(t.getSourceFiles().some(function(e){return!_(e)||o(e.path)}))return!1;if(t.getMissingFilePaths().some(a))return!1;var l=t.getCompilerOptions();return!(!e.compareDataObjects(l,n)||l.configFile&&n.configFile&&l.configFile.text!==n.configFile.text);function _(e){return e.version===i(e.resolvedPath)}},e.getConfigFileParsingDiagnostics=function(e){return e.options.configFile?e.options.configFile.parseDiagnostics.concat(e.errors):e.errors},e.createProgram=function(t,s,c,u,l){var _,d,p,m,g,y,h,v,b=e.isArray(t)?function(e,t,r,n,i){return{rootNames:e,options:t,host:r,oldProgram:n,configFileParsingDiagnostics:i}}(t,s,c,u,l):t,D=b.rootNames,A=b.options,F=b.configFileParsingDiagnostics,P=b.projectReferences,w=b.oldProgram,I=e.createMap(),O={},M={},L=e.createMap(),R=e.createDiagnosticCollection(),B="number"==typeof A.maxNodeModuleJsDepth?A.maxNodeModuleJsDepth:0,j=0,J=e.createMap(),z=e.createMap();e.performance.mark("beforeProgram");var K,U,V,q,W=b.host||o(A),H=S(W),G=A.noLib,Y=e.memoize(function(){return W.getDefaultLibFileName(A)}),X=W.getDefaultLibLocation?W.getDefaultLibLocation():e.getDirectoryPath(Y()),Q=e.createDiagnosticCollection(),$=W.getCurrentDirectory(),Z=e.getSupportedExtensions(A),ee=e.getSuppoertedExtensionsWithJsonIfResolveJsonModule(A,Z),te=e.createMap(),re=W.hasInvalidatedResolution||e.returnFalse;if(W.resolveModuleNames)V=function(t,r,n,i){return W.resolveModuleNames(e.Debug.assertEachDefined(t),r,n,i).map(function(t){if(!t||void 0!==t.extension)return t;var r=e.clone(t);return r.extension=e.extensionFromPath(t.resolvedFileName),r})};else{U=e.createModuleResolutionCache($,function(e){return W.getCanonicalFileName(e)});var ne=function(t,r,n){return e.resolveModuleName(t,r,A,W,U,n).resolvedModule};V=function(t,r,n,i){return x(e.Debug.assertEachDefined(t),r,i,ne)}}if(W.resolveTypeReferenceDirectives)q=function(t,r,n){return W.resolveTypeReferenceDirectives(e.Debug.assertEachDefined(t),r,n)};else{var ie=function(t,r,n){return e.resolveTypeReferenceDirective(t,r,A,W,n).resolvedTypeReferenceDirective};q=function(t,r,n){return x(e.Debug.assertEachDefined(t),r,n,ie)}}var ae,oe,se,ce,ue=e.createMap(),le=e.createMap(),_e=e.createMultiMap(),de=e.createMap(),pe=W.useCaseSensitiveFileNames()?e.createMap():void 0,fe=function(t,r){if(!t)return!1;var n=t.getCompilerOptions();return!!e.sourceFileAffectingCompilerOptions.some(function(t){return!e.isJsonEqual(e.getCompilerOptionValue(n,t),e.getCompilerOptionValue(r,t))})}(w,A),me=function(){if(!w)return 0;var t=w.getCompilerOptions();if(e.changesAffectModuleResolution(t,A))return w.structureIsReused=0;e.Debug.assert(!(3&w.structureIsReused));var r=w.getRootFileNames();if(!e.arrayIsEqualTo(r,D))return w.structureIsReused=0;if(!e.arrayIsEqualTo(A.types,t.types))return w.structureIsReused=0;if(pt(w.getProjectReferences(),w.getResolvedProjectReferences(),function(e,t,r){var n=(r?r.commandLine.projectReferences:P)[t],i=St(n);return e?!i||i.sourceFile!==e.sourceFile:void 0!==i},function(t,r){var n=r?ft(r.sourceFile.path).commandLine.projectReferences:P;return!e.arrayIsEqualTo(t,n,e.projectReferenceIsEqualTo)}))return w.structureIsReused=0;P&&(oe=P.map(St));var n=[],i=[];if(w.structureIsReused=2,w.getMissingFilePaths().some(function(e){return W.fileExists(e)}))return w.structureIsReused=0;var a,o=w.getSourceFiles();!function(e){e[e.Exists=0]="Exists",e[e.Modified=1]="Modified"}(a||(a={}));for(var s=e.createMap(),c=0,u=o;c<u.length;c++){var l=u[c],_=W.getSourceFileByPath?W.getSourceFileByPath(l.fileName,l.resolvedPath,A.target,void 0,fe):W.getSourceFile(l.fileName,A.target,void 0,fe);if(!_)return w.structureIsReused=0;e.Debug.assert(!_.redirectInfo,"Host should not return a redirect source file from `getSourceFile`");var d=void 0;if(l.redirectInfo){if(_!==l.redirectInfo.unredirected)return w.structureIsReused=0;d=!1,_=l}else if(w.redirectTargetsMap.has(l.path)){if(_!==l)return w.structureIsReused=0;d=!1}else d=_!==l;_.path=l.path,_.originalFileName=l.originalFileName,_.resolvedPath=l.resolvedPath,_.fileName=l.fileName;var p=w.sourceFileToPackageName.get(l.path);if(void 0!==p){var f=s.get(p),g=d?1:0;if(void 0!==f&&1===g||1===f)return w.structureIsReused=0;s.set(p,g)}if(d){if(!e.arrayIsEqualTo(l.libReferenceDirectives,_.libReferenceDirectives,rt))return w.structureIsReused=0;l.hasNoDefaultLib!==_.hasNoDefaultLib&&(w.structureIsReused=1),e.arrayIsEqualTo(l.referencedFiles,_.referencedFiles,rt)||(w.structureIsReused=1),it(_),e.arrayIsEqualTo(l.imports,_.imports,nt)||(w.structureIsReused=1),e.arrayIsEqualTo(l.moduleAugmentations,_.moduleAugmentations,nt)||(w.structureIsReused=1),(1572864&l.flags)!=(1572864&_.flags)&&(w.structureIsReused=1),e.arrayIsEqualTo(l.typeReferenceDirectives,_.typeReferenceDirectives,rt)||(w.structureIsReused=1),i.push({oldFile:l,newFile:_})}else re(l.path)&&(w.structureIsReused=1,i.push({oldFile:l,newFile:_}));n.push(_)}if(2!==w.structureIsReused)return w.structureIsReused;for(var y=i.map(function(e){return e.oldFile}),h=0,v=o;h<v.length;h++){var b=v[h];if(!e.contains(y,b))for(var x=0,S=b.ambientModuleNames;x<S.length;x++){var T=S[x];I.set(T,b.fileName)}}for(var C=0,E=i;C<E.length;C++){var k=E[C],l=k.oldFile,_=k.newFile,F=e.getNormalizedAbsolutePath(_.originalFileName,$);if(V){var O=N(_),M=Le(O,F,_),B=e.hasChangesInResolutions(O,M,l.resolvedModules,e.moduleResolutionIsEqualTo);B?(w.structureIsReused=1,_.resolvedModules=e.zipToMap(O,M)):_.resolvedModules=l.resolvedModules}if(q){var j=e.map(_.typeReferenceDirectives,function(e){return e.fileName.toLocaleLowerCase()}),M=q(j,F,_t(_.originalFileName)),B=e.hasChangesInResolutions(j,M,l.resolvedTypeReferenceDirectiveNames,e.typeDirectiveIsEqualTo);B?(w.structureIsReused=1,_.resolvedTypeReferenceDirectiveNames=e.zipToMap(j,M)):_.resolvedTypeReferenceDirectiveNames=l.resolvedTypeReferenceDirectiveNames}}if(2!==w.structureIsReused)return w.structureIsReused;if(W.hasChangedAutomaticTypeDirectiveNames)return w.structureIsReused=1;ae=w.getMissingFilePaths();for(var J=0,K=n;J<K.length;J++){var _=K[J],U=_.path;ut(_,U,_.resolvedPath),w.isSourceFileFromExternalLibrary(w.getSourceFileByPath(U))&&z.set(U,!0)}m=n,R=w.getFileProcessingDiagnostics();for(var H=0,G=i;H<G.length;H++){var Y=G[H];R.reattachFileDiagnostics(Y.newFile)}return L=w.getResolvedTypeReferenceDirectives(),le=w.sourceFileToPackageName,_e=w.redirectTargetsMap,w.structureIsReused=2}();if(2!==me){if(d=[],p=[],P&&(oe||(oe=P.map(St)),D.length))for(var ge=0,ye=oe;ge<ye.length;ge++){var he=ye[ge];if(he){var ve=he.commandLine.options.outFile||he.commandLine.options.out;if(ve)ot(e.changeExtension(ve,".d.ts"),!1,!1,void 0);else if(e.getEmitModuleKind(he.commandLine.options)===e.ModuleKind.None)for(var be=0,De=he.commandLine.fileNames;be<De.length;be++){var xe=De[be];!e.fileExtensionIs(xe,".d.ts")&&e.hasTSFileExtension(xe)&&ot(e.getOutputDeclarationFileName(xe,he.commandLine,!W.useCaseSensitiveFileNames()),!1,!1,void 0)}}}e.forEach(D,function(e){return tt(e,!1,!1)});var Se=D.length?e.getAutomaticTypeDirectiveNames(A,W):e.emptyArray;if(Se.length)for(var Te=A.configFilePath?e.getDirectoryPath(A.configFilePath):W.getCurrentDirectory(),Ce=e.combinePaths(Te,"__inferred type names__.ts"),Ee=q(Se,Ce),ke=0;ke<Se.length;ke++)yt(Se[ke],Ee[ke]);if(D.length&&!G){var Ne=Y();!A.lib&&Ne?tt(Ne,!0,!1):e.forEach(A.lib,function(t){tt(e.combinePaths(X,t),!0,!1)})}ae=e.arrayFrom(e.mapDefinedIterator(de.entries(),function(e){var t=e[0];return void 0===e[1]?t:void 0})),m=e.stableSort(d,function(t,r){return e.compareValues(Ie(t),Ie(r))}).concat(p),d=void 0,p=void 0}if(e.Debug.assert(!!ae),w&&W.onReleaseOldSourceFile){for(var Ae=0,Fe=w.getSourceFiles();Ae<Fe.length;Ae++){var Pe=Fe[Ae],we=Ve(Pe.resolvedPath);(fe||!we||Pe.resolvedPath===Pe.path&&we.resolvedPath!==Pe.path)&&W.onReleaseOldSourceFile(Pe,w.getCompilerOptions(),!!Ve(Pe.path))}w.forEachResolvedProjectReference(function(e,t){e&&!ft(t)&&W.onReleaseOldSourceFile(e.sourceFile,w.getCompilerOptions(),!1)})}return w=void 0,_={getRootFileNames:function(){return D},getSourceFile:Ue,getSourceFileByPath:Ve,getSourceFiles:function(){return m},getMissingFilePaths:function(){return ae},getCompilerOptions:function(){return A},getSyntacticDiagnostics:function(e,t){return qe(e,We,t)},getOptionsDiagnostics:function(){return e.sortAndDeduplicateDiagnostics(e.concatenate(R.getGlobalDiagnostics(),e.concatenate(Q.getGlobalDiagnostics(),function(){if(!A.configFile)return e.emptyArray;var t=Q.getDiagnostics(A.configFile.fileName);return dt(function(r){r&&(t=e.concatenate(t,Q.getDiagnostics(r.sourceFile.fileName)))}),t}())))},getGlobalDiagnostics:function(){return D.length?e.sortAndDeduplicateDiagnostics(Je().getGlobalDiagnostics().slice()):e.emptyArray},getSemanticDiagnostics:function(e,t){return qe(e,Ge,t)},getSuggestionDiagnostics:function(e,t){return He(function(){return Je().getSuggestionDiagnostics(e,t)})},getDeclarationDiagnostics:function(e,t){var r=_.getCompilerOptions();return!e||r.out||r.outFile?Qe(e,t):qe(e,et,t)},getTypeChecker:ze,getClassifiableNames:function(){if(!v){ze(),v=e.createUnderscoreEscapedMap();for(var t=0,r=m;t<r.length;t++){var n=r[t];e.copyEntries(n.classifiableNames,v)}}return v},getDiagnosticsProducingTypeChecker:Je,getCommonSourceDirectory:Me,emit:function(t,r,n,i,a){return He(function(){return function(t,r,n,i,a,o){var s=[];if(!a){if(A.noEmit)return{diagnostics:s,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};if(A.noEmitOnError){var c=t.getOptionsDiagnostics(i).concat(t.getSyntacticDiagnostics(r,i),t.getGlobalDiagnostics(i),t.getSemanticDiagnostics(r,i));if(0===c.length&&e.getEmitDeclarations(t.getCompilerOptions())&&(s=t.getDeclarationDiagnostics(void 0,i)),c.length>0||s.length>0)return{diagnostics:e.concatenate(c,s),sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0}}}var u=Je().getEmitResolver(A.outFile||A.out?void 0:r,i);e.performance.mark("beforeEmit");var l=a?[]:e.getTransformers(A,o),_=e.emitFiles(u,Re(n),r,a,l,o&&o.afterDeclarations);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),_}(_,t,r,n,i,a)})},getCurrentDirectory:function(){return $},getNodeCount:function(){return Je().getNodeCount()},getIdentifierCount:function(){return Je().getIdentifierCount()},getSymbolCount:function(){return Je().getSymbolCount()},getTypeCount:function(){return Je().getTypeCount()},getFileProcessingDiagnostics:function(){return R},getResolvedTypeReferenceDirectives:function(){return L},isSourceFileFromExternalLibrary:je,isSourceFileDefaultLibrary:function(t){if(t.hasNoDefaultLib)return!0;if(!A.noLib)return!1;var r=W.useCaseSensitiveFileNames()?e.equateStringsCaseSensitive:e.equateStringsCaseInsensitive;return A.lib?e.some(A.lib,function(n){return r(t.fileName,e.combinePaths(X,n))}):r(t.fileName,Y())},dropDiagnosticsProducingTypeChecker:function(){y=void 0},getSourceFileFromReference:function(e,t){return at(n(t.fileName,e.fileName),function(e){return de.get(Oe(e))||void 0})},getLibFileFromReference:function(t){var r=t.fileName.toLocaleLowerCase(),n=e.libMap.get(r);if(n)return Ue(e.combinePaths(X,n))},sourceFileToPackageName:le,redirectTargetsMap:_e,isEmittedFile:function(t){if(A.noEmit)return!1;var r=Oe(t);if(Ve(r))return!1;var n=A.outFile||A.out;if(n)return Ot(r,n)||Ot(r,e.removeFileExtension(n)+".d.ts");if(A.declarationDir&&e.containsPath(A.declarationDir,r,$,!W.useCaseSensitiveFileNames()))return!0;if(A.outDir)return e.containsPath(A.outDir,r,$,!W.useCaseSensitiveFileNames());if(e.fileExtensionIsOneOf(r,e.supportedJSExtensions)||e.fileExtensionIs(r,".d.ts")){var i=e.removeFileExtension(r);return!!Ve(i+".ts")||!!Ve(i+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return F||e.emptyArray},getResolvedModuleWithFailedLookupLocationsFromCache:function(t,r){return U&&e.resolveModuleNameFromCache(t,r,U)},getProjectReferences:function(){return P},getResolvedProjectReferences:function(){return oe},getProjectReferenceRedirect:lt,getResolvedProjectReferenceToRedirect:_t,getResolvedProjectReferenceByPath:ft,forEachResolvedProjectReference:dt,emitBuildInfo:function(t){e.Debug.assert(!A.out&&!A.outFile),e.performance.mark("beforeEmit");var r=e.emitFiles(e.notImplementedResolver,Re(t),void 0,!1,void 0,void 0,!0);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),r}},function(){if(A.strictPropertyInitialization&&!e.getStrictOptionValue(A,"strictNullChecks")&&kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks"),A.isolatedModules&&(e.getEmitDeclarations(A)&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,E(A),"isolatedModules"),A.noEmitOnError&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"noEmitOnError","isolatedModules"),A.out&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","isolatedModules"),A.outFile&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"outFile","isolatedModules")),A.inlineSourceMap&&(A.sourceMap&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),A.mapRoot&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),A.paths&&void 0===A.baseUrl&&kt(e.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option,"paths"),A.composite&&(!1===A.declaration&&kt(e.Diagnostics.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===A.incremental&&kt(e.Diagnostics.Composite_projects_may_not_disable_incremental_compilation,"declaration")),A.tsBuildInfoFile&&(e.isIncrementalCompilation(A)||kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite")),a=A.noEmit||A.suppressOutputPathCheck?void 0:e.getOutputPathForBuildInfo(A),pt(P,oe,function(t,r,n){var i=(n?n.commandLine.projectReferences:P)[r],o=n&&n.sourceFile;if(t){var s=t.commandLine.options;if(!s.composite){var c=n?n.commandLine.fileNames:D;c.length&&At(o,r,e.Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true,i.path)}if(i.prepend){var u=s.outFile||s.out;u?W.fileExists(u)||At(o,r,e.Diagnostics.Output_file_0_from_project_1_does_not_exist,u,i.path):At(o,r,e.Diagnostics.Cannot_prepend_project_0_because_it_does_not_have_outFile_set,i.path)}!n&&a&&a===e.getOutputPathForBuildInfo(s)&&(At(o,r,e.Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,a,i.path),te.set(Oe(a),!0))}else At(o,r,e.Diagnostics.File_0_not_found,i.path)}),A.composite)for(var t=D.map(Oe),r=0,n=m;r<n.length;r++){var i=n[r];i.isDeclarationFile||e.isJsonSourceFile(i)&&_t(i.fileName)||-1===t.indexOf(i.path)&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern,i.fileName))}var a;if(A.paths)for(var o in A.paths)if(e.hasProperty(A.paths,o))if(e.hasZeroOrOneAsteriskCharacter(o)||Ct(!0,o,e.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,o),e.isArray(A.paths[o])){var s=A.paths[o].length;0===s&&Ct(!1,o,e.Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,o);for(var c=0;c<s;c++){var u=A.paths[o][c],l=f(u);"string"===l?e.hasZeroOrOneAsteriskCharacter(u)||Tt(o,c,e.Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character,u,o):Tt(o,c,e.Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2,u,o,l)}}else Ct(!1,o,e.Diagnostics.Substitutions_for_pattern_0_should_be_an_array,o);A.sourceMap||A.inlineSourceMap||(A.inlineSources&&kt(e.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"inlineSources"),A.sourceRoot&&kt(e.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"sourceRoot")),A.out&&A.outFile&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","outFile"),!A.mapRoot||A.sourceMap||A.declarationMap||kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"mapRoot","sourceMap","declarationMap"),A.declarationDir&&(e.getEmitDeclarations(A)||kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationDir","declaration","composite"),(A.out||A.outFile)&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"declarationDir",A.out?"out":"outFile")),A.declarationMap&&!e.getEmitDeclarations(A)&&kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationMap","declaration","composite"),A.lib&&A.noLib&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"lib","noLib"),A.noImplicitUseStrict&&e.getStrictOptionValue(A,"alwaysStrict")&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"noImplicitUseStrict","alwaysStrict");var _=A.target||0,d=A.outFile||A.out,p=e.find(m,function(t){return e.isExternalModule(t)&&!t.isDeclarationFile});if(A.isolatedModules){A.module===e.ModuleKind.None&&_<2&&kt(e.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target");var g=e.find(m,function(t){return!e.isExternalModule(t)&&!t.isDeclarationFile&&6!==t.scriptKind});if(g){var y=e.getErrorSpanForNode(g,g);Q.add(e.createFileDiagnostic(g,y.start,y.length,e.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided))}}else if(p&&_<2&&A.module===e.ModuleKind.None){var y=e.getErrorSpanForNode(p,p.externalModuleIndicator);Q.add(e.createFileDiagnostic(p,y.start,y.length,e.Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(d&&!A.emitDeclarationOnly)if(A.module&&A.module!==e.ModuleKind.AMD&&A.module!==e.ModuleKind.System)kt(e.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0,A.out?"out":"outFile","module");else if(void 0===A.module&&p){var y=e.getErrorSpanForNode(p,p.externalModuleIndicator);Q.add(e.createFileDiagnostic(p,y.start,y.length,e.Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,A.out?"out":"outFile"))}if(A.resolveJsonModule&&(e.getEmitModuleResolutionKind(A)!==e.ModuleResolutionKind.NodeJs?kt(e.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy,"resolveJsonModule"):e.hasJsonModuleEmitEnabled(A)||kt(e.Diagnostics.Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext,"resolveJsonModule","module")),A.outDir||A.sourceRoot||A.mapRoot){var h=Me();A.outDir&&""===h&&m.some(function(t){return e.getRootLength(t.fileName)>1})&&kt(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}if(!A.noEmit&&A.allowJs&&e.getEmitDeclarations(A)&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"allowJs",E(A)),A.checkJs&&!A.allowJs&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs")),A.emitDeclarationOnly&&(e.getEmitDeclarations(A)||kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),A.noEmit&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),A.emitDecoratorMetadata&&!A.experimentalDecorators&&kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),A.jsxFactory?(A.reactNamespace&&kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),e.parseIsolatedEntityName(A.jsxFactory,_)||Nt("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,A.jsxFactory)):A.reactNamespace&&!e.isIdentifierText(A.reactNamespace,_)&&Nt("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,A.reactNamespace),!A.noEmit&&!A.suppressOutputPathCheck){var v=Re(),b=e.createMap();e.forEachEmittedFile(v,function(e){A.emitDeclarationOnly||x(e.jsFilePath,b),x(e.declarationFilePath,b)})}function x(t,r){if(t){var n,i=Oe(t);de.has(i)&&(A.configFilePath||(n=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),n=e.chainDiagnosticMessages(n,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),It(t,e.createCompilerDiagnosticFromMessageChain(n)));var a=W.useCaseSensitiveFileNames()?i:i.toLocaleLowerCase();r.has(a)?It(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):r.set(a,!0)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),_;function Ie(t){if(e.containsPath(X,t.fileName,!1)){var r=e.getBaseFileName(t.fileName);if("lib.d.ts"===r||"lib.es6.d.ts"===r)return 0;var n=e.removeSuffix(e.removePrefix(r,"lib."),".d.ts"),i=e.libs.indexOf(n);if(-1!==i)return i+1}return e.libs.length+2}function Oe(t){return e.toPath(t,$,bt)}function Me(){if(void 0===g){var t=e.filter(m,function(t){return e.sourceFileMayBeEmitted(t,A,je,_t)});A.rootDir&&xt(t,A.rootDir)?g=e.getNormalizedAbsolutePath(A.rootDir,$):A.composite&&A.configFilePath?xt(t,g=e.getDirectoryPath(e.normalizeSlashes(A.configFilePath))):(r=t,g=a(e.mapDefined(r,function(e){return e.isDeclarationFile?void 0:e.fileName}),$,bt)),g&&g[g.length-1]!==e.directorySeparator&&(g+=e.directorySeparator)}var r;return g}function Le(t,r,n){if(0===me&&!n.ambientModuleNames.length)return V(t,r,void 0,_t(n.originalFileName));var i,a,o,s=w&&w.getSourceFile(r);if(s!==n&&n.resolvedModules){for(var c=[],u=0,l=t;u<l.length;u++){var _=l[u],d=n.resolvedModules.get(_);c.push(d)}return c}for(var p={},f=0;f<t.length;f++){if(_=t[f],n===s&&!re(s.path)){var m=s&&s.resolvedModules.get(_);if(m){e.isTraceEnabled(A,W)&&e.trace(W,e.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program,_,r),(a||(a=new Array(t.length)))[f]=m,(o||(o=[])).push(_);continue}}var g=!1;e.contains(n.ambientModuleNames,_)?(g=!0,e.isTraceEnabled(A,W)&&e.trace(W,e.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1,_,r)):g=v(_),g?(a||(a=new Array(t.length)))[f]=p:(i||(i=[])).push(_)}var y=i&&i.length?V(i,r,o,_t(n.originalFileName)):e.emptyArray;if(!a)return e.Debug.assert(y.length===t.length),y;var h=0;for(f=0;f<a.length;f++)a[f]?a[f]===p&&(a[f]=void 0):(a[f]=y[h],h++);return e.Debug.assert(h===y.length),a;function v(t){var r=e.getResolvedModule(s,t),n=r&&w.getSourceFile(r.resolvedFileName);if(r&&n&&!n.externalModuleIndicator)return!1;var i=I.get(t);return!!i&&(e.isTraceEnabled(A,W)&&e.trace(W,e.Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified,t,i),!0)}}function Re(t){return i({getPrependNodes:Be,getCanonicalFileName:bt,getCommonSourceDirectory:_.getCommonSourceDirectory,getCompilerOptions:_.getCompilerOptions,getCurrentDirectory:function(){return $},getNewLine:function(){return W.getNewLine()},getSourceFile:_.getSourceFile,getSourceFileByPath:_.getSourceFileByPath,getSourceFiles:_.getSourceFiles,getLibFileFromReference:_.getLibFileFromReference,isSourceFileFromExternalLibrary:je,getResolvedProjectReferenceToRedirect:_t,writeFile:t||function(e,t,r,n,i){return W.writeFile(e,t,r,n,i)},isEmitBlocked:Ke,readFile:function(e){return W.readFile(e)},fileExists:function(t){var r=Oe(t);return!!Ve(r)||!e.contains(ae,r)&&W.fileExists(t)}},W.directoryExists?{directoryExists:function(e){return W.directoryExists(e)}}:{},{useCaseSensitiveFileNames:function(){return W.useCaseSensitiveFileNames()},getProgramBuildInfo:function(){return _.getProgramBuildInfo&&_.getProgramBuildInfo()}})}function Be(){return T(P,function(e,t){return oe[t].commandLine},function(e){var t=Oe(e),r=Ve(t);return r?r.text:de.has(t)?void 0:W.readFile(t)})}function je(e){return!!z.get(e.path)}function Je(){return y||(y=e.createTypeChecker(_,!0))}function ze(){return h||(h=e.createTypeChecker(_,!1))}function Ke(e){return te.has(Oe(e))}function Ue(e){return Ve(Oe(e))}function Ve(e){return de.get(e)||void 0}function qe(t,r,n){return t?r(t,n):e.sortAndDeduplicateDiagnostics(e.flatMap(_.getSourceFiles(),function(e){return n&&n.throwIfCancellationRequested(),r(e,n)}))}function We(t){return e.isSourceFileJS(t)?(t.additionalSyntacticDiagnostics||(t.additionalSyntacticDiagnostics=function(t){return He(function(){var r=[],n=t;return i(t),r;function i(t){switch(n.kind){case 151:case 154:if(n.questionToken===t)return void r.push(s(t,e.Diagnostics._0_can_only_be_used_in_a_ts_file,"?"));case 156:case 155:case 157:case 158:case 159:case 196:case 239:case 197:case 237:if(n.type===t)return void r.push(s(t,e.Diagnostics.types_can_only_be_used_in_a_ts_file))}switch(t.kind){case 248:return void r.push(s(t,e.Diagnostics.import_can_only_be_used_in_a_ts_file));case 254:if(t.isExportEquals)return void r.push(s(t,e.Diagnostics.export_can_only_be_used_in_a_ts_file));break;case 273:var o=t;if(109===o.token)return void r.push(s(t,e.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));break;case 241:return void r.push(s(t,e.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));case 244:return void r.push(s(t,e.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));case 242:return void r.push(s(t,e.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));case 243:return void r.push(s(t,e.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));case 213:return void r.push(s(t,e.Diagnostics.non_null_assertions_can_only_be_used_in_a_ts_file));case 212:return void r.push(s(t.type,e.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));case 194:e.Debug.fail()}var c=n;n=t,e.forEachChild(t,i,a),n=c}function a(t){switch(n.decorators!==t||A.experimentalDecorators||r.push(s(n,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)),n.kind){case 240:case 156:case 155:case 157:case 158:case 159:case 196:case 239:case 197:if(t===n.typeParameters)return void r.push(o(t,e.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));case 219:if(t===n.modifiers)return function(t,n){for(var i=0,a=t;i<a.length;i++){var o=a[i];switch(o.kind){case 77:if(n)continue;case 115:case 113:case 114:case 133:case 125:case 118:r.push(s(o,e.Diagnostics._0_can_only_be_used_in_a_ts_file,e.tokenToString(o.kind)))}}}(t,219===n.kind);break;case 154:if(t===n.modifiers){for(var a=0,c=t;a<c.length;a++){var u=c[a];116!==u.kind&&r.push(s(u,e.Diagnostics._0_can_only_be_used_in_a_ts_file,e.tokenToString(u.kind)))}return}break;case 151:if(t===n.modifiers)return void r.push(o(t,e.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));break;case 191:case 192:case 211:case 261:case 262:if(t===n.typeArguments)return void r.push(o(t,e.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file))}for(var l=0,_=t;l<_.length;l++){var d=_[l];i(d)}}function o(r,n,i,a,o){var s=r.pos;return e.createFileDiagnostic(t,s,r.end-s,n,i,a,o)}function s(r,n,i,a,o){return e.createDiagnosticForNodeInSourceFile(t,r,n,i,a,o)}})}(t)),e.concatenate(t.additionalSyntacticDiagnostics,t.parseDiagnostics)):t.parseDiagnostics}function He(t){try{return t()}catch(t){throw t instanceof e.OperationCanceledException&&(h=void 0,y=void 0),t}}function Ge(e,t){return Ze(e,t,O,Ye)}function Ye(t,r){return He(function(){if(e.skipTypeChecking(t,A))return e.emptyArray;var n=Je();e.Debug.assert(!!t.bindDiagnostics);for(var i,a=e.isCheckJsEnabledForFile(t,A),o=3===t.scriptKind||4===t.scriptKind||5===t.scriptKind||a||7===t.scriptKind,s=0,c=[o?t.bindDiagnostics:e.emptyArray,o?n.getDiagnostics(t,r):e.emptyArray,R.getDiagnostics(t.fileName),Q.getDiagnostics(t.fileName),a?t.jsDocDiagnostics:void 0];s<c.length;s++){var u=c[s];if(u)for(var l=0,_=u;l<_.length;l++){var d=_[l];Xe(d)&&(i=e.append(i,d))}}return i})}function Xe(t){var n=t.file,i=t.start;if(n)for(var a=e.getLineStarts(n),o=e.computeLineAndCharacterOfPosition(a,i).line;o>0;){var s=n.text.slice(a[o-1],a[o]),c=r.exec(s);if(!c)return!0;if(c[3])return!1;o--}return!0}function Qe(e,t){return Ze(e,t,M,$e)}function $e(t,r){return He(function(){var n=Je().getEmitResolver(t,r);return e.getDeclarationDiagnostics(Re(e.noop),n,t)})}function Ze(t,r,n,i){var a=t?n.perFile&&n.perFile.get(t.path):n.allDiagnostics;if(a)return a;var o=i(t,r)||e.emptyArray;return t?(n.perFile||(n.perFile=e.createMap()),n.perFile.set(t.path,o)):n.allDiagnostics=o,o}function et(e,t){return e.isDeclarationFile?[]:Qe(e,t)}function tt(t,r,n){ot(e.normalizePath(t),r,n,void 0)}function rt(e,t){return e.fileName===t.fileName}function nt(e,t){return 72===e.kind?72===t.kind&&e.escapedText===t.escapedText:10===t.kind&&e.text===t.text}function it(t){if(!t.imports){var r,n,i,a=e.isSourceFileJS(t),o=e.isExternalModule(t);if(A.importHelpers&&(A.isolatedModules||o)&&!t.isDeclarationFile){var s=e.createLiteral(e.externalHelpersModuleNameText),c=e.createImportDeclaration(void 0,void 0,void 0,s);e.addEmitFlags(c,67108864),s.parent=c,c.parent=t,r=[s]}for(var u=0,l=t.statements;u<l.length;u++)_(l[u],!1);return(524288&t.flags||a)&&function(t){for(var n=/import|require/g;null!==n.exec(t.text);){var i=d(t,n.lastIndex);e.isRequireCall(i,!0)?r=e.append(r,i.arguments[0]):e.isImportCall(i)&&1===i.arguments.length&&e.isStringLiteralLike(i.arguments[0])?r=e.append(r,i.arguments[0]):e.isLiteralImportTypeNode(i)&&(r=e.append(r,i.argument.literal))}}(t),t.imports=r||e.emptyArray,t.moduleAugmentations=n||e.emptyArray,void(t.ambientModuleNames=i||e.emptyArray)}function _(a,s){if(e.isAnyImportOrReExport(a)){var c=e.getExternalModuleName(a);!(c&&e.isStringLiteral(c)&&c.text)||s&&e.isExternalModuleNameRelative(c.text)||(r=e.append(r,c))}else if(e.isModuleDeclaration(a)&&e.isAmbientModule(a)&&(s||e.hasModifier(a,2)||t.isDeclarationFile)){var u=e.getTextOfIdentifierOrLiteral(a.name);if(o||s&&!e.isExternalModuleNameRelative(u))(n||(n=[])).push(a.name);else if(!s){t.isDeclarationFile&&(i||(i=[])).push(u);var l=a.body;if(l)for(var d=0,p=l.statements;d<p.length;d++)_(p[d],!0)}}}function d(t,r){for(var n=t,i=function(e){if(e.pos<=r&&(r<e.end||r===e.end&&1===e.kind))return e};;){var o=a&&e.hasJSDocNodes(n)&&e.forEach(n.jsDoc,i)||e.forEachChild(n,i);if(!o)return n;n=o}}}function at(t,r,n,i){if(e.hasExtension(t)){if(!A.allowNonTsExtensions&&!e.forEach(ee,function(r){return e.fileExtensionIs(W.getCanonicalFileName(t),r)}))return void(n&&n(e.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1,t,"'"+Z.join("', '")+"'"));var a=r(t);if(n)if(a)i&&W.getCanonicalFileName(t)===W.getCanonicalFileName(i.fileName)&&n(e.Diagnostics.A_file_cannot_have_a_reference_to_itself);else{var o=lt(t);o?n(e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,o,t):n(e.Diagnostics.File_0_not_found,t)}return a}var s=A.allowNonTsExtensions&&r(t);if(s)return s;if(!n||!A.allowNonTsExtensions){var c=e.forEach(Z,function(e){return r(t+e)});return n&&!c&&n(e.Diagnostics.File_0_not_found,t+".ts"),c}n(e.Diagnostics.File_0_not_found,t)}function ot(t,r,n,i,a,o,s){at(t,function(e){return ct(e,Oe(e),r,n,a,o,s,i)},function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];R.add(void 0!==a&&void 0!==s&&void 0!==o?e.createFileDiagnostic.apply(void 0,[a,o,s-o,t].concat(r)):e.createCompilerDiagnostic.apply(void 0,[t].concat(r)))},a)}function st(t,r,n,i,a){void 0!==n&&void 0!==i&&void 0!==a?R.add(e.createFileDiagnostic(n,i,a-i,e.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing,t,r)):R.add(e.createCompilerDiagnostic(e.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing,t,r))}function ct(t,r,n,i,a,o,s,c){var u,l=t;if(de.has(r)){var _=de.get(r);if(_&&A.forceConsistentCasingInFileNames){var f=t,m=_.fileName;Oe(m)!==Oe(f)&&(f=lt(t)||t),e.getNormalizedAbsolutePath(m,$)!==e.getNormalizedAbsolutePath(f,$)&&st(f,m,a,o,s)}return _&&z.get(_.path)&&0===j?(z.set(_.path,!1),A.noResolve||(mt(_,n),gt(_)),A.noLib||ht(_),J.set(_.path,!1),Dt(_)):_&&J.get(_.path)&&j<B&&(J.set(_.path,!1),Dt(_)),_||void 0}if(a){var g=lt(t);g&&(t=g,u=Oe(g))}var y=W.getSourceFile(t,A.target,function(r){void 0!==a&&void 0!==o&&void 0!==s?R.add(e.createFileDiagnostic(a,o,s-o,e.Diagnostics.Cannot_read_file_0_Colon_1,t,r)):R.add(e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r))},fe);if(c){var h=e.packageIdToString(c),v=ue.get(h);if(v){var b=function(e,t,r,n,i,a){var o=Object.create(e);return o.fileName=r,o.path=n,o.resolvedPath=i,o.originalFileName=a,o.redirectInfo={redirectTarget:e,unredirected:t},z.set(n,j>0),Object.defineProperties(o,{id:{get:function(){return this.redirectInfo.redirectTarget.id},set:function(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get:function(){return this.redirectInfo.redirectTarget.symbol},set:function(e){this.redirectInfo.redirectTarget.symbol=e}}}),o}(v,y,t,r,Oe(t),l);return _e.add(v.path,t),ut(b,r,u),le.set(r,c.name),p.push(b),b}y&&(ue.set(h,y),le.set(r,c.name))}if(ut(y,r,u),y){if(z.set(r,j>0),y.path=r,y.resolvedPath=Oe(t),y.originalFileName=l,W.useCaseSensitiveFileNames()){var D=r.toLowerCase(),x=pe.get(D);x?st(t,x.fileName,a,o,s):pe.set(D,y)}G=G||y.hasNoDefaultLib&&!i,A.noResolve||(mt(y,n),gt(y)),A.noLib||ht(y),Dt(y),n?d.push(y):p.push(y)}return y}function ut(e,t,r){r?(de.set(r,e),de.set(t,e||!1)):de.set(t,e)}function lt(t){if(oe&&oe.length&&!e.fileExtensionIs(t,".d.ts")&&e.fileExtensionIsOneOf(t,e.supportedTSExtensions)){var r=_t(t);if(r){var n=r.commandLine.options.outFile||r.commandLine.options.out;return n?e.changeExtension(n,".d.ts"):e.getOutputDeclarationFileName(t,r.commandLine,!W.useCaseSensitiveFileNames())}}}function _t(t){void 0===ce&&(ce=e.createMap(),dt(function(e,t){e&&Oe(A.configFilePath)!==t&&e.commandLine.fileNames.forEach(function(e){return ce.set(Oe(e),t)})}));var r=ce.get(Oe(t));return r&&ft(r)}function dt(e){return pt(P,oe,function(t,r,n){var i=Oe(C((n?n.commandLine.projectReferences:P)[r]));return e(t,i)})}function pt(t,r,n,i){var a;return function t(r,n,i,o,s){if(s){var c=s(r,i);if(c)return c}return e.forEach(n,function(r,n){if(!e.contains(a,r)){var c=o(r,n,i);if(c)return c;if(r)return(a||(a=[])).push(r),t(r.commandLine.projectReferences,r.references,r,o,s)}})}(t,r,void 0,n,i)}function ft(e){if(se)return se.get(e)||void 0}function mt(t,r){e.forEach(t.referencedFiles,function(e){ot(n(e.fileName,t.originalFileName),r,!1,void 0,t,e.pos,e.end)})}function gt(t){var r=e.map(t.typeReferenceDirectives,function(e){return e.fileName.toLocaleLowerCase()});if(r)for(var n=q(r,t.originalFileName,_t(t.originalFileName)),i=0;i<r.length;i++){var a=t.typeReferenceDirectives[i],o=n[i],s=a.fileName.toLocaleLowerCase();e.setResolvedTypeReferenceDirective(t,s,o),yt(s,o,t,a.pos,a.end)}}function yt(t,r,n,i,a){var o=L.get(t);if(!o||!o.primary){var s=!0;r?(r.isExternalLibraryImport&&j++,r.primary?ot(r.resolvedFileName,!1,!1,r.packageId,n,i,a):o?(r.resolvedFileName!==o.resolvedFileName&&W.readFile(r.resolvedFileName)!==Ue(o.resolvedFileName).text&&R.add(vt(n,i,a,e.Diagnostics.Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict,t,r.resolvedFileName,o.resolvedFileName)),s=!1):ot(r.resolvedFileName,!1,!1,r.packageId,n,i,a),r.isExternalLibraryImport&&j--):R.add(vt(n,i,a,e.Diagnostics.Cannot_find_type_definition_file_for_0,t)),s&&L.set(t,r)}}function ht(t){e.forEach(t.libReferenceDirectives,function(r){var n=r.fileName.toLocaleLowerCase(),i=e.libMap.get(n);if(i)tt(e.combinePaths(X,i),!0,!0);else{var a=e.removeSuffix(e.removePrefix(n,"lib."),".d.ts"),o=e.getSpellingSuggestion(a,e.libs,e.identity),s=o?e.Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1:e.Diagnostics.Cannot_find_lib_definition_for_0;R.add(vt(t,r.pos,r.end,s,n,o))}})}function vt(t,r,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];return void 0===t||void 0===r||void 0===n?e.createCompilerDiagnostic.apply(void 0,[i].concat(a)):e.createFileDiagnostic.apply(void 0,[t,r,n-r,i].concat(a))}function bt(e){return W.getCanonicalFileName(e)}function Dt(t){if(it(t),t.imports.length||t.moduleAugmentations.length){var r=N(t),n=Le(r,e.getNormalizedAbsolutePath(t.originalFileName,$),t);e.Debug.assert(n.length===r.length);for(var i=0;i<r.length;i++){var a=n[i];if(e.setResolvedModule(t,r[i],a),a){var o=a.isExternalLibraryImport,s=!e.resolutionExtensionIsTSOrJson(a.extension),c=o&&s,u=a.resolvedFileName;o&&j++;var l=c&&j>B,_=u&&!k(A,a)&&!A.noResolve&&i<t.imports.length&&!l&&!(s&&!A.allowJs)&&(e.isInJSFile(t.imports[i])||!(2097152&t.imports[i].flags));l?J.set(t.path,!0):_&&ct(u,Oe(u),!1,!1,t,e.skipTrivia(t.text,t.imports[i].pos),t.imports[i].end,a.packageId),o&&j--}}}else t.resolvedModules=void 0}function xt(t,r){for(var n=!0,i=W.getCanonicalFileName(e.getNormalizedAbsolutePath(r,$)),a=0,o=t;a<o.length;a++){var s=o[a];s.isDeclarationFile||0!==W.getCanonicalFileName(e.getNormalizedAbsolutePath(s.fileName,$)).indexOf(i)&&(Q.add(e.createCompilerDiagnostic(e.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,s.fileName,r)),n=!1)}return n}function St(t){se||(se=e.createMap());var r=C(t),n=Oe(r),i=se.get(n);if(void 0!==i)return i||void 0;var a=e.getNormalizedAbsolutePath(e.getDirectoryPath(r),W.getCurrentDirectory()),o=W.getSourceFile(r,100);if(ut(o,n,void 0),void 0!==o){o.path=n,o.resolvedPath=n,o.originalFileName=r;var s=e.parseJsonSourceFileConfigFileContent(o,H,a,void 0,r),c={commandLine:s,sourceFile:o};return se.set(n,c),s.projectReferences&&(c.references=s.projectReferences.map(St)),c}se.set(n,!1)}function Tt(t,r,n,i,a,o){for(var s=!0,c=0,u=Et();c<u.length;c++){var l=u[c];if(e.isObjectLiteralExpression(l.initializer))for(var _=0,d=e.getPropertyAssignment(l.initializer,t);_<d.length;_++){var p=d[_].initializer;e.isArrayLiteralExpression(p)&&p.elements.length>r&&(Q.add(e.createDiagnosticForNodeInSourceFile(A.configFile,p.elements[r],n,i,a,o)),s=!1)}}s&&Q.add(e.createCompilerDiagnostic(n,i,a,o))}function Ct(t,r,n,i){for(var a=!0,o=0,s=Et();o<s.length;o++){var c=s[o];e.isObjectLiteralExpression(c.initializer)&&wt(c.initializer,t,r,void 0,n,i)&&(a=!1)}a&&Q.add(e.createCompilerDiagnostic(n,i))}function Et(){return function(t){var r=Pt();if(r)return e.getPropertyAssignment(r,t)}("paths")||e.emptyArray}function kt(e,t,r,n){Ft(!0,t,r,e,t,r,n)}function Nt(e,t,r){Ft(!1,e,void 0,t,r)}function At(t,r,n,i,a){var o=e.firstDefined(e.getTsConfigPropArray(t||A.configFile,"references"),function(t){return e.isArrayLiteralExpression(t.initializer)?t.initializer:void 0});o&&o.elements.length>r?Q.add(e.createDiagnosticForNodeInSourceFile(t||A.configFile,o.elements[r],n,i,a)):Q.add(e.createCompilerDiagnostic(n,i,a))}function Ft(t,r,n,i,a,o,s){var c=Pt();(!c||!wt(c,t,r,n,i,a,o,s))&&Q.add(e.createCompilerDiagnostic(i,a,o,s))}function Pt(){if(void 0===K){K=null;var t=e.getTsConfigObjectLiteralExpression(A.configFile);if(t)for(var r=0,n=e.getPropertyAssignment(t,"compilerOptions");r<n.length;r++){var i=n[r];if(e.isObjectLiteralExpression(i.initializer)){K=i.initializer;break}}}return K}function wt(t,r,n,i,a,o,s,c){for(var u=e.getPropertyAssignment(t,n,i),l=0,_=u;l<_.length;l++){var d=_[l];Q.add(e.createDiagnosticForNodeInSourceFile(A.configFile,r?d.name:d.initializer,a,o,s,c))}return!!u.length}function It(e,t){te.set(Oe(e),!0),Q.add(t)}function Ot(t,r){return 0===e.comparePaths(t,r,$,!W.useCaseSensitiveFileNames())}},e.parseConfigHostFromCompilerHostLike=S,e.createPrependNodes=T,e.resolveProjectReferencePath=C,e.getResolutionDiagnostic=k}(c||(c={})),function(e){e.getFileEmitOutput=function(e,t,r,n,i){var a=[],o=e.emit(t,function(e,t,r){a.push({name:e,writeByteOrderMark:r,text:t})},n,r,i);return{outputFiles:a,emitSkipped:o.emitSkipped,exportedModulesFromDeclarationEmit:o.exportedModulesFromDeclarationEmit}},e.cloneMapOrUndefined=function(t){return t?e.cloneMap(t):void 0}}(c||(c={})),function(e){!function(t){function r(t){if(t.declarations&&t.declarations[0]){var r=e.getSourceFileOfNode(t.declarations[0]);return r&&r.resolvedPath}}function n(e,t){var n=e.getSymbolAtLocation(t);return n&&r(n)}function a(t,r,n,i){return e.toPath(t.getProjectReferenceRedirect(r)||r,n,i)}function o(t,r,i){var o;if(r.imports&&r.imports.length>0)for(var s=t.getTypeChecker(),c=0,u=r.imports;c<u.length;c++){var l=n(s,u[c]);l&&S(l)}var _=e.getDirectoryPath(r.path);if(r.referencedFiles&&r.referencedFiles.length>0)for(var d=0,p=r.referencedFiles;d<p.length;d++){var f=p[d];S(a(t,f.fileName,_,i))}if(r.resolvedTypeReferenceDirectiveNames&&r.resolvedTypeReferenceDirectiveNames.forEach(function(e){if(e){var r=e.resolvedFileName;S(a(t,r,_,i))}}),r.moduleAugmentations.length){s=t.getTypeChecker();for(var m=0,g=r.moduleAugmentations;m<g.length;m++){var y=g[m];if(e.isStringLiteral(y)){var h=s.getSymbolAtLocation(y);h&&x(h)}}}for(var v=0,b=t.getTypeChecker().getAmbientModules();v<b.length;v++){var D=b[v];D.declarations.length>1&&x(D)}return o;function x(t){for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n],o=e.getSourceFileOfNode(a);o&&o!==r&&S(o.resolvedPath)}}function S(t){o||(o=e.createMap()),o.set(t,!0)}}function s(e,t){return t&&!t.referencedMap==!e}function c(e,t){t.forEach(function(t,r){e.fileInfos.get(r).signature=t,e.hasCalledUpdateShapeSignature.set(r,!0)})}function u(t,n,i,a,o,s,c){if(e.Debug.assert(!!i),e.Debug.assert(!c||!!t.exportedModulesMap,"Compute visible to outside map only if visibleToOutsideReferencedMap present in the state"),t.hasCalledUpdateShapeSignature.has(i.path)||a.has(i.path))return!1;var u=t.fileInfos.get(i.path);if(!u)return e.Debug.fail();var l,_=u.signature;if(i.isDeclarationFile){if(l=i.version,c&&l!==_){var d=t.referencedMap?t.referencedMap.get(i.path):void 0;c.set(i.path,d||!1)}}else{var p=e.getFileEmitOutput(n,i,!0,o);p.outputFiles&&p.outputFiles.length>0?(l=s(p.outputFiles[0].text),c&&l!==_&&function(t,n,i){if(!n)return void i.set(t.path,!1);var a;n.forEach(function(t){var n;(n=r(t))&&(a||(a=e.createMap()),a.set(n,!0))}),i.set(t.path,a||!1)}(i,p.exportedModulesFromDeclarationEmit,c)):l=_}return a.set(i.path,l),!_||l!==_}function l(t,r){if(!t.allFileNames){var n=r.getSourceFiles();t.allFileNames=n===e.emptyArray?e.emptyArray:n.map(function(e){return e.fileName})}return t.allFileNames}function _(t,r){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),function(e){var t=e[0];return e[1].has(r)?t:void 0}))}function d(t){return function(t){return e.some(t.moduleAugmentations,function(t){return e.isGlobalScopeAugmentation(t.parent)})}(t)||!e.isExternalModule(t)&&!function(t){for(var r=0,n=t.statements;r<n.length;r++){var i=n[r];if(!e.isModuleWithStringLiteralName(i))return!1}return!0}(t)}function p(t,r,n){if(t.allFilesExcludingDefaultLibraryFile)return t.allFilesExcludingDefaultLibraryFile;var i;c(n);for(var a=0,o=r.getSourceFiles();a<o.length;a++){var s=o[a];s!==n&&c(s)}return t.allFilesExcludingDefaultLibraryFile=i||e.emptyArray,t.allFilesExcludingDefaultLibraryFile;function c(e){r.isSourceFileDefaultLibrary(e)||(i||(i=[])).push(e)}}t.canReuseOldState=s,t.create=function(t,r,n){for(var i=e.createMap(),a=t.getCompilerOptions().module!==e.ModuleKind.None?e.createMap():void 0,c=a?e.createMap():void 0,u=e.createMap(),l=s(a,n),_=0,d=t.getSourceFiles();_<d.length;_++){var p=d[_],f=e.Debug.assertDefined(p.version,"Program intended to be used with Builder should have source files with versions set"),m=l?n.fileInfos.get(p.path):void 0;if(a){var g=o(t,p,r);if(g&&a.set(p.path,g),l){var y=n.exportedModulesMap.get(p.path);y&&c.set(p.path,y)}}i.set(p.path,{version:f,signature:m&&m.signature})}return{fileInfos:i,referencedMap:a,exportedModulesMap:c,hasCalledUpdateShapeSignature:u}},t.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},t.clone=function(t){var r=e.createMap();return t.fileInfos.forEach(function(e,t){r.set(t,i({},e))}),{fileInfos:r,referencedMap:e.cloneMapOrUndefined(t.referencedMap),exportedModulesMap:e.cloneMapOrUndefined(t.exportedModulesMap),hasCalledUpdateShapeSignature:e.cloneMap(t.hasCalledUpdateShapeSignature)}},t.getFilesAffectedBy=function(t,r,n,i,a,o,s){var l=o||e.createMap(),f=r.getSourceFileByPath(n);if(!f)return e.emptyArray;if(!u(t,r,f,l,i,a,s))return[f];var m=(t.referencedMap?function(t,r,n,i,a,o,s){if(d(n))return p(t,r,n);var c=r.getCompilerOptions();if(c&&(c.isolatedModules||c.out||c.outFile))return[n];var l=e.createMap();l.set(n.path,n);for(var f=_(t,n.resolvedPath);f.length>0;){var m=f.pop();if(!l.has(m)){var g=r.getSourceFileByPath(m);l.set(m,g),g&&u(t,r,g,i,a,o,s)&&f.push.apply(f,_(t,g.resolvedPath))}}return e.arrayFrom(e.mapDefinedIterator(l.values(),function(e){return e}))}:function(e,t,r){var n=t.getCompilerOptions();return n&&(n.out||n.outFile)?[r]:p(e,t,r)})(t,r,f,l,i,a,s);return o||c(t,l),m},t.updateSignaturesFromCache=c,t.updateExportedFilesMapFromCache=function(t,r){r&&(e.Debug.assert(!!t.exportedModulesMap),r.forEach(function(e,r){e?t.exportedModulesMap.set(r,e):t.exportedModulesMap.delete(r)}))},t.getAllDependencies=function(t,r,n){var i,a=r.getCompilerOptions();if(a.outFile||a.out)return l(t,r);if(!t.referencedMap||d(n))return l(t,r);for(var o=e.createMap(),s=[n.path];s.length;){var c=s.pop();if(!o.has(c)){o.set(c,!0);var u=t.referencedMap.get(c);if(u)for(var _=u.keys(),p=_.next(),f=p.value,m=p.done;!m;f=(i=_.next()).value,m=i.done,i)s.push(f)}}return e.arrayFrom(e.mapDefinedIterator(o.keys(),function(e){var t=r.getSourceFileByPath(e);return t?t.fileName:e}))}}(e.BuilderState||(e.BuilderState={}))}(c||(c={})),function(e){function t(t,n,i){var a=e.BuilderState.create(t,n,i);a.program=t;var o=t.getCompilerOptions();a.compilerOptions=o,o.outFile||o.out||o.isolatedModules||(a.semanticDiagnosticsPerFile=e.createMap()),a.changedFilesSet=e.createMap();var s=e.BuilderState.canReuseOldState(a.referencedMap,i),c=s?i.compilerOptions:void 0,u=s&&i.semanticDiagnosticsPerFile&&!!a.semanticDiagnosticsPerFile&&!e.compilerOptionsAffectSemanticDiagnostics(o,c);if(s){if(!i.currentChangedFilePath){var l=i.currentAffectedFilesSignatures;e.Debug.assert(!(i.affectedFiles||l&&l.size),"Cannot reuse if only few affected files of currentChangedFile were iterated")}var _=i.changedFilesSet;u&&e.Debug.assert(!_||!e.forEachKey(_,function(e){return i.semanticDiagnosticsPerFile.has(e)}),"Semantic diagnostics shouldnt be available for changed files"),_&&e.copyEntries(_,a.changedFilesSet),o.outFile||o.out||!i.affectedFilesPendingEmit||(a.affectedFilesPendingEmit=i.affectedFilesPendingEmit,a.affectedFilesPendingEmitIndex=i.affectedFilesPendingEmitIndex)}var d=a.referencedMap,p=s?i.referencedMap:void 0,f=u&&!o.skipLibCheck==!c.skipLibCheck,m=f&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;return a.fileInfos.forEach(function(n,o){var c,l,_,g;if(!s||!(c=i.fileInfos.get(o))||c.version!==n.version||(_=l=d&&d.get(o),g=p&&p.get(o),_!==g&&(void 0===_||void 0===g||_.size!==g.size||e.forEachKey(_,function(e){return!g.has(e)})))||l&&e.forEachKey(l,function(e){return!a.fileInfos.has(e)&&i.fileInfos.has(e)}))a.changedFilesSet.set(o,!0);else if(u){var y=t.getSourceFileByPath(o);if(y.isDeclarationFile&&!f)return;if(y.hasNoDefaultLib&&!m)return;var h=i.semanticDiagnosticsPerFile.get(o);h&&(a.semanticDiagnosticsPerFile.set(o,i.hasReusableDiagnostic?function(t,n){return t.length?t.map(function(t){var i=r(t,n);i.reportsUnnecessary=t.reportsUnnecessary,i.source=t.source;var a=t.relatedInformation;return i.relatedInformation=a?a.length?a.map(function(e){return r(e,n)}):e.emptyArray:void 0,i}):e.emptyArray}(h,t):h),a.semanticDiagnosticsFromOldState||(a.semanticDiagnosticsFromOldState=e.createMap()),a.semanticDiagnosticsFromOldState.set(o,!0))}}),!c||c.outDir===o.outDir&&c.declarationDir===o.declarationDir&&(c.outFile||c.out)===(o.outFile||o.out)||(a.affectedFilesPendingEmit=e.concatenate(a.affectedFilesPendingEmit,t.getSourceFiles().map(function(e){return e.path})),void 0===a.affectedFilesPendingEmitIndex&&(a.affectedFilesPendingEmitIndex=0),e.Debug.assert(void 0===a.seenAffectedFiles),a.seenAffectedFiles=e.createMap()),a}function r(t,r){var n=t.file,a=t.messageText;return i({},t,{file:n&&r.getSourceFileByPath(n),messageText:void 0===a||e.isString(a)?a:function e(t,r){return i({},t,{next:t.next&&e(t.next,r)})}(a,r)})}function n(t,r){e.Debug.assert(!r||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==r||!t.semanticDiagnosticsPerFile.has(r.path))}function a(t,r,n){for(;;){var i=t.affectedFiles;if(i){for(var a=t.seenAffectedFiles,s=t.affectedFilesIndex;s<i.length;){var c=i[s];if(!a.has(c.path))return t.affectedFilesIndex=s,o(t,c),c;a.set(c.path,!0),s++}t.changedFilesSet.delete(t.currentChangedFilePath),t.currentChangedFilePath=void 0,e.BuilderState.updateSignaturesFromCache(t,t.currentAffectedFilesSignatures),t.currentAffectedFilesSignatures.clear(),e.BuilderState.updateExportedFilesMapFromCache(t,t.currentAffectedFilesExportedModulesMap),t.affectedFiles=void 0}var u=t.changedFilesSet.keys().next();if(u.done)return;var l=e.Debug.assertDefined(t.program),_=l.getCompilerOptions();if(_.outFile||_.out)return e.Debug.assert(!t.semanticDiagnosticsPerFile),l;t.currentAffectedFilesSignatures=t.currentAffectedFilesSignatures||e.createMap(),t.exportedModulesMap&&(t.currentAffectedFilesExportedModulesMap=t.currentAffectedFilesExportedModulesMap||e.createMap()),t.affectedFiles=e.BuilderState.getFilesAffectedBy(t,l,u.value,r,n,t.currentAffectedFilesSignatures,t.currentAffectedFilesExportedModulesMap),t.currentChangedFilePath=u.value,t.affectedFilesIndex=0,t.seenAffectedFiles=t.seenAffectedFiles||e.createMap()}}function o(t,r){if(!c(t,r.path)){if(t.allFilesExcludingDefaultLibraryFile===t.affectedFiles&&!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;var n=e.Debug.assertDefined(t.program),i=n.getCompilerOptions();if(e.forEach(n.getSourceFiles(),function(r){return n.isSourceFileDefaultLibrary(r)&&!e.skipTypeChecking(r,i)&&c(t,r.path)}))return}if(t.exportedModulesMap&&1!==t.affectedFiles.length&&t.changedFilesSet.has(r.path)){e.Debug.assert(!!t.currentAffectedFilesExportedModulesMap);var a=e.createMap();e.forEachEntry(t.currentAffectedFilesExportedModulesMap,function(e,n){return e&&e.has(r.path)&&s(t,n,a)})||e.forEachEntry(t.exportedModulesMap,function(e,n){return!t.currentAffectedFilesExportedModulesMap.has(n)&&e.has(r.path)&&s(t,n,a)})}}}function s(t,r,n){return e.forEachEntry(t.referencedMap,function(i,a){return i.has(r)&&function t(r,n,i){if(!e.addToSeen(i,n))return!1;if(c(r,n))return!0;e.Debug.assert(!!r.currentAffectedFilesExportedModulesMap);if(e.forEachEntry(r.currentAffectedFilesExportedModulesMap,function(e,a){return e&&e.has(n)&&t(r,a,i)}))return!0;if(e.forEachEntry(r.exportedModulesMap,function(e,a){return!r.currentAffectedFilesExportedModulesMap.has(a)&&e.has(n)&&t(r,a,i)}))return!0;return!!e.forEachEntry(r.referencedMap,function(e,t){return e.has(n)&&!i.has(t)&&c(r,t)})}(t,a,n)})}function c(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function u(e,t,r,n){n?e.emittedBuildInfo=!0:t===e.program?(e.changedFilesSet.clear(),e.programEmitComplete=!0):(e.seenAffectedFiles.set(t.path,!0),r?e.affectedFilesPendingEmitIndex++:e.affectedFilesIndex++)}function l(e,t,r,n,i){return u(e,r,n,i),{result:t,affected:r}}function _(t,r,n){var i=r.path;if(t.semanticDiagnosticsPerFile){var a=t.semanticDiagnosticsPerFile.get(i);if(a)return a}var o=e.Debug.assertDefined(t.program).getSemanticDiagnostics(r,n);return t.semanticDiagnosticsPerFile&&t.semanticDiagnosticsPerFile.set(i,o),o}function d(t){if(!t.compilerOptions.outFile&&!t.compilerOptions.out){var r={};t.fileInfos.forEach(function(e,n){var i=t.currentAffectedFilesSignatures&&t.currentAffectedFilesSignatures.get(n);r[n]=void 0===i?e:{version:e.version,signature:i}});var n={fileInfos:r,options:t.compilerOptions};if(t.referencedMap){var i={};t.referencedMap.forEach(function(t,r){i[r]=e.arrayFrom(t.keys())}),n.referencedMap=i}if(t.exportedModulesMap){var a={};t.exportedModulesMap.forEach(function(r,n){var i=t.currentAffectedFilesExportedModulesMap&&t.currentAffectedFilesExportedModulesMap.get(n);void 0===i?a[n]=e.arrayFrom(r.keys()):i&&(a[n]=e.arrayFrom(i.keys()))}),n.exportedModulesMap=a}if(t.semanticDiagnosticsPerFile){var o=[];t.semanticDiagnosticsPerFile.forEach(function(r,n){return o.push(r.length?[n,t.hasReusableDiagnostic?r:(i=r,e.Debug.assert(!!i.length),i.map(function(t){var r=p(t);r.reportsUnnecessary=t.reportsUnnecessary,r.source=t.source;var n=t.relatedInformation;return r.relatedInformation=n?n.length?n.map(function(e){return p(e)}):e.emptyArray:void 0,r}))]:n);var i}),n.semanticDiagnosticsPerFile=o}return n}}function p(t){var r=t.file,n=t.messageText;return i({},t,{file:r&&r.path,messageText:void 0===n||e.isString(n)?n:function e(t){return i({},t,{next:t.next&&e(t.next)})}(n)})}var f;function m(t){if(t){var r=e.createMap();for(var n in t)e.hasProperty(t,n)&&r.set(n,e.arrayToSet(t[n]));return r}}function g(t,r){return{getState:e.notImplemented,backupState:e.noop,restoreState:e.noop,getProgram:n,getProgramOrUndefined:function(){return t.program},releaseProgram:function(){return t.program=void 0},getCompilerOptions:function(){return t.compilerOptions},getSourceFile:function(e){return n().getSourceFile(e)},getSourceFiles:function(){return n().getSourceFiles()},getOptionsDiagnostics:function(e){return n().getOptionsDiagnostics(e)},getGlobalDiagnostics:function(e){return n().getGlobalDiagnostics(e)},getConfigFileParsingDiagnostics:function(){return r},getSyntacticDiagnostics:function(e,t){return n().getSyntacticDiagnostics(e,t)},getDeclarationDiagnostics:function(e,t){return n().getDeclarationDiagnostics(e,t)},getSemanticDiagnostics:function(e,t){return n().getSemanticDiagnostics(e,t)},emit:function(e,t,r,i,a){return n().emit(e,t,r,i,a)},getAllDependencies:e.notImplemented,getCurrentDirectory:function(){return n().getCurrentDirectory()}};function n(){return e.Debug.assertDefined(t.program)}}!function(e){e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram"}(f=e.BuilderProgramKind||(e.BuilderProgramKind={})),e.getBuilderCreationParameters=function(t,r,n,i,a,o){var s,c,u;return void 0===t?(e.Debug.assert(void 0===r),s=n,u=i,e.Debug.assert(!!u),c=u.getProgram()):e.isArray(t)?(u=i,c=e.createProgram({rootNames:t,options:r,host:n,oldProgram:u&&u.getProgramOrUndefined(),configFileParsingDiagnostics:a,projectReferences:o}),s=n):(c=t,s=r,u=n,a=i),{host:s,newProgram:c,oldProgram:u,configFileParsingDiagnostics:a||e.emptyArray}},e.createBuilderProgram=function(r,i){var o=i.newProgram,s=i.host,c=i.oldProgram,p=i.configFileParsingDiagnostics,m=c&&c.getState();if(m&&o===m.program&&p===o.getConfigFileParsingDiagnostics())return o=void 0,m=void 0,c;var y,h=e.createGetCanonicalFileName(s.useCaseSensitiveFileNames()),v=s.createHash||e.generateDjb2Hash,b=t(o,h,m);o.getProgramBuildInfo=function(){return d(b)},o=void 0,c=void 0,m=void 0;var D=g(b,p);return D.getState=function(){return b},D.backupState=function(){e.Debug.assert(void 0===y),y=function(t){var r=e.BuilderState.clone(t);return r.semanticDiagnosticsPerFile=e.cloneMapOrUndefined(t.semanticDiagnosticsPerFile),r.changedFilesSet=e.cloneMap(t.changedFilesSet),r.affectedFiles=t.affectedFiles,r.affectedFilesIndex=t.affectedFilesIndex,r.currentChangedFilePath=t.currentChangedFilePath,r.currentAffectedFilesSignatures=e.cloneMapOrUndefined(t.currentAffectedFilesSignatures),r.currentAffectedFilesExportedModulesMap=e.cloneMapOrUndefined(t.currentAffectedFilesExportedModulesMap),r.seenAffectedFiles=e.cloneMapOrUndefined(t.seenAffectedFiles),r.cleanedDiagnosticsOfLibFiles=t.cleanedDiagnosticsOfLibFiles,r.semanticDiagnosticsFromOldState=e.cloneMapOrUndefined(t.semanticDiagnosticsFromOldState),r.program=t.program,r.compilerOptions=t.compilerOptions,r.affectedFilesPendingEmit=t.affectedFilesPendingEmit,r.affectedFilesPendingEmitIndex=t.affectedFilesPendingEmitIndex,r.seenEmittedFiles=e.cloneMapOrUndefined(t.seenEmittedFiles),r.programEmitComplete=t.programEmitComplete,r}(b)},D.restoreState=function(){b=e.Debug.assertDefined(y),y=void 0},D.getAllDependencies=function(t){return e.BuilderState.getAllDependencies(b,e.Debug.assertDefined(b.program),t)},D.getSemanticDiagnostics=function(t,i){n(b,t);var o,s,c,l=e.Debug.assertDefined(b.program).getCompilerOptions();if(l.outFile||l.out)return e.Debug.assert(!b.semanticDiagnosticsPerFile),e.Debug.assertDefined(b.program).getSemanticDiagnostics(t,i);if(t)return _(b,t,i);for(;o=a(b,i,v);)o!==b.program&&r===f.EmitAndSemanticDiagnosticsBuilderProgram&&(s||(s=[])).push(o.path),u(b,o);s&&(b.affectedFilesPendingEmit=e.concatenate(b.affectedFilesPendingEmit,s),void 0===b.affectedFilesPendingEmitIndex&&(b.affectedFilesPendingEmitIndex=0));for(var d=0,p=e.Debug.assertDefined(b.program).getSourceFiles();d<p.length;d++){var m=p[d];c=e.addRange(c,_(b,m,i))}return c||e.emptyArray},D.emit=function(t,i,a,o,c){if(r===f.EmitAndSemanticDiagnosticsBuilderProgram&&(n(b,t),!t)){for(var u=[],l=!1,_=void 0,d=[],p=void 0;p=x(i,a,o,c);)l=l||p.result.emitSkipped,_=e.addRange(_,p.result.diagnostics),d=e.addRange(d,p.result.emittedFiles),u=e.addRange(u,p.result.sourceMaps);return{emitSkipped:l,diagnostics:_||e.emptyArray,emittedFiles:d,sourceMaps:u}}return e.Debug.assertDefined(b.program).emit(t,i||s.writeFile,a,o,c)},D.releaseProgram=function(){!function(t){e.BuilderState.releaseCache(t),t.program=void 0}(b),y=void 0},r===f.SemanticDiagnosticsBuilderProgram?D.getSemanticDiagnosticsOfNextAffectedFile=function(e,t){for(;;){var r=a(b,e,v);if(!r)return;if(r===b.program)return l(b,b.program.getSemanticDiagnostics(void 0,e),r);if(!t||!t(r))return l(b,_(b,r,e),r);u(b,r)}}:r===f.EmitAndSemanticDiagnosticsBuilderProgram?D.emitNextAffectedFile=x:e.notImplemented(),D;function x(t,r,n,i){var o=a(b,r,v),c=!1;if(!o)if(b.compilerOptions.out||b.compilerOptions.outFile){var u=e.Debug.assertDefined(b.program);if(b.programEmitComplete||!e.some(u.getProjectReferences(),function(e){return!!e.prepend}))return void(b.programEmitComplete=!0);o=u}else{if(!(o=function(t){var r=t.affectedFilesPendingEmit;if(r){for(var n=t.seenEmittedFiles||(t.seenEmittedFiles=e.createMap()),i=t.affectedFilesPendingEmitIndex;i<r.length;i++){var a=e.Debug.assertDefined(t.program).getSourceFileByPath(r[i]);if(a&&!n.has(a.path))return t.affectedFilesPendingEmitIndex=i,a}t.affectedFilesPendingEmit=void 0,t.affectedFilesPendingEmitIndex=void 0}}(b))){if(b.emittedBuildInfo)return;var _=e.Debug.assertDefined(b.program);return l(b,_.emitBuildInfo(t||s.writeFile,r),_,!1,!0)}c=!0}return b.affectedFilesPendingEmit&&b.program!==o&&(b.seenEmittedFiles||(b.seenEmittedFiles=e.createMap())).set(o.path,!0),l(b,e.Debug.assertDefined(b.program).emit(o===b.program?void 0:o,t||s.writeFile,r,n,i),o,c)}},e.createBuildProgramUsingProgramBuildInfo=function(t){var r={fileInfos:e.createMapFromTemplate(t.fileInfos),compilerOptions:t.options,referencedMap:m(t.referencedMap),exportedModulesMap:m(t.exportedModulesMap),semanticDiagnosticsPerFile:t.semanticDiagnosticsPerFile&&e.arrayToMap(t.semanticDiagnosticsPerFile,function(t){return e.isString(t)?t:t[0]},function(t){return e.isString(t)?e.emptyArray:t[1]}),hasReusableDiagnostic:!0};return{getState:function(){return r},backupState:e.noop,restoreState:e.noop,getProgram:e.notImplemented,getProgramOrUndefined:e.returnUndefined,releaseProgram:e.noop,getCompilerOptions:function(){return r.compilerOptions},getSourceFile:e.notImplemented,getSourceFiles:e.notImplemented,getOptionsDiagnostics:e.notImplemented,getGlobalDiagnostics:e.notImplemented,getConfigFileParsingDiagnostics:e.notImplemented,getSyntacticDiagnostics:e.notImplemented,getDeclarationDiagnostics:e.notImplemented,getSemanticDiagnostics:e.notImplemented,emit:e.notImplemented,getAllDependencies:e.notImplemented,getCurrentDirectory:e.notImplemented,emitNextAffectedFile:e.notImplemented,getSemanticDiagnosticsOfNextAffectedFile:e.notImplemented}},e.createRedirectedBuilderProgram=g}(c||(c={})),function(e){e.createSemanticDiagnosticsBuilderProgram=function(t,r,n,i,a,o){return e.createBuilderProgram(e.BuilderProgramKind.SemanticDiagnosticsBuilderProgram,e.getBuilderCreationParameters(t,r,n,i,a,o))},e.createEmitAndSemanticDiagnosticsBuilderProgram=function(t,r,n,i,a,o){return e.createBuilderProgram(e.BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram,e.getBuilderCreationParameters(t,r,n,i,a,o))},e.createAbstractBuilder=function(t,r,n,i,a,o){var s=e.getBuilderCreationParameters(t,r,n,i,a,o),c=s.newProgram,u=s.configFileParsingDiagnostics;return e.createRedirectedBuilderProgram({program:c,compilerOptions:c.getCompilerOptions()},u)}}(c||(c={})),function(e){function t(t){return e.some(e.ignoredPaths,function(r){return e.stringContains(t,r)})}e.isPathIgnored=t,e.maxNumberOfFilesToIterateForInvalidation=256,e.createResolutionCache=function(r,n,i){var a,o,s,c=!1,u=e.createMultiMap(),l=e.memoize(function(){return r.getCurrentDirectory()}),_=r.getCachedDirectoryStructureHost(),d=e.createMap(),p=e.createCacheWithRedirects(),f=e.createCacheWithRedirects(),m=e.createModuleResolutionCacheWithMaps(p,f,l(),r.getCanonicalFileName),g=e.createMap(),y=e.createCacheWithRedirects(),h=[".ts",".tsx",".js",".jsx",".json"],v=e.createMap(),b=e.createMap(),D=n&&e.removeTrailingDirectorySeparator(e.getNormalizedAbsolutePath(n,l())),x=D&&r.toPath(D),S=e.createMap();return{startRecordingFilesWithChangedResolutions:function(){a=[]},finishRecordingFilesWithChangedResolutions:function(){var e=a;return a=void 0,e},startCachingPerDirectoryResolution:N,finishCachingPerDirectoryResolution:function(){c=!1,s=void 0,N(),b.forEach(function(e,t){0===e.refCount&&(b.delete(t),e.watcher.close())})},resolveModuleNames:function(t,r,n,a){return F(t,r,a,d,p,A,T,function(t){return!t.resolvedModule||!e.resolutionExtensionIsTSOrJson(t.resolvedModule.extension)},n,i)},getResolvedModuleWithFailedLookupLocationsFromCache:function(e,t){var n=d.get(r.toPath(t));return n&&n.get(e)},resolveTypeReferenceDirectives:function(t,r,n){return F(t,r,n,g,y,e.resolveTypeReferenceDirective,C,function(e){return void 0===e.resolvedTypeReferenceDirective},void 0,!1)},removeResolutionsFromProjectReferenceRedirects:function(t){if(e.fileExtensionIs(t,".json")){var n=r.getCurrentProgram();if(n){var i=n.getResolvedProjectReferenceByPath(t);i&&i.commandLine.fileNames.forEach(function(e){return q(r.toPath(e))})}}},removeResolutionsOfFile:q,invalidateResolutionOfFile:function(e){q(e),H(function(t,n){var i=n(t);return!!i&&r.toPath(i.resolvedFileName)===e})},setFilesWithInvalidatedNonRelativeUnresolvedImports:function(t){e.Debug.assert(s===t||void 0===s),s=t},createHasInvalidatedResolution:function(t){if(c||t)return o=void 0,e.returnTrue;var r=o;return o=void 0,function(e){return!!r&&r.has(e)||k(e)}},updateTypeRootsWatch:function(){var t=r.getCompilationSettings();if(t.types)Y();else{var n=e.getEffectiveTypeRoots(t,{directoryExists:Q,getCurrentDirectory:l});n?e.mutateMap(S,e.arrayToMap(n,function(e){return r.toPath(e)}),{createNewValue:X,onDeleteValue:e.closeFileWatcher}):Y()}},closeTypeRootsWatch:Y,clear:function(){e.clearMap(b,e.closeFileWatcherOf),v.clear(),u.clear(),Y(),d.clear(),g.clear(),c=!1,N()}};function T(e){return e.resolvedModule}function C(e){return e.resolvedTypeReferenceDirective}function E(t,r){return!(void 0===t||r.length<=t.length)&&e.startsWith(r,t)&&r[t.length]===e.directorySeparator}function k(e){if(!s)return!1;var t=s.get(e);return!!t&&!!t.length}function N(){p.clear(),f.clear(),y.clear(),u.forEach(J),u.clear()}function A(t,n,i,a,o){var s=e.resolveModuleName(t,n,i,a,m,o);if(!r.getGlobalCache)return s;var c=r.getGlobalCache();if(!(void 0===c||e.isExternalModuleNameRelative(t)||s.resolvedModule&&e.extensionIsTS(s.resolvedModule.extension))){var u=e.loadModuleFromGlobalCache(t,r.projectName,i,a,c),l=u.resolvedModule,_=u.failedLookupLocations;if(l)return{resolvedModule:l,failedLookupLocations:e.addRange(s.failedLookupLocations,_)}}return s}function F(t,n,i,o,s,u,l,_,d,p){var f=r.toPath(n),m=o.get(f)||o.set(f,e.createMap()).get(f),g=e.getDirectoryPath(f),y=s.getOrCreateMapOfCacheRedirects(i),h=y.get(g);h||(h=e.createMap(),y.set(g,h));for(var v=[],b=r.getCompilationSettings(),D=p&&k(f),x=r.getCurrentProgram(),S=x&&x.getResolvedProjectReferenceToRedirect(n),T=S?!i||i.sourceFile.path!==S.sourceFile.path:!!i,C=e.createMap(),E=0,N=t;E<N.length;E++){var A=N[E],F=m.get(A);if(!C.has(A)&&c||T||!F||F.isInvalidated||D&&!e.isExternalModuleNameRelative(A)&&_(F)){var P=F,w=h.get(A);w?F=w:(F=u(A,n,b,r,i),h.set(A,F)),m.set(A,F),R(A,F),P&&K(P),p&&a&&!I(P,F)&&(a.push(f),p=!1)}e.Debug.assert(void 0!==F&&!F.isInvalidated),C.set(A,!0),v.push(l(F))}return m.forEach(function(t,r){C.has(r)||e.contains(d,r)||(K(t),m.delete(r))}),v;function I(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=l(e),n=l(t);return r===n||!(!r||!n)&&r.resolvedFileName===n.resolvedFileName}}function P(t){return e.endsWith(t,"/node_modules")}function w(t){return e.endsWith(t,"/node_modules/@types")}function I(t){var r=e.getRootLength(t);if(t.length===r)return!1;var n=t.indexOf(e.directorySeparator,r);if(-1===n)return!1;if(47!==t.charCodeAt(0)&&-1===t.substr(r,n).search(/users/i))return!0;for(var i=n+1,a=2;a>0;a--)if(0===(i=t.indexOf(e.directorySeparator,i)+1))return!1;return!0}function O(t,r){if(E(x,r)){t=e.isRootedDiskPath(t)?e.normalizePath(t):e.getNormalizedAbsolutePath(t,l()),e.Debug.assert(t.length===r.length,"FailedLookup: "+t+" failedLookupLocationPath: "+r);var n=r.indexOf(e.directorySeparator,x.length+1);return-1!==n?{dir:t.substr(0,n),dirPath:r.substr(0,n)}:{dir:D,dirPath:x,nonRecursive:!1}}return M(e.getDirectoryPath(e.getNormalizedAbsolutePath(t,l())),e.getDirectoryPath(r))}function M(t,r){for(;e.pathContainsNodeModules(r);)t=e.getDirectoryPath(t),r=e.getDirectoryPath(r);if(P(r))return I(e.getDirectoryPath(r))?{dir:t,dirPath:r}:void 0;var n,i,a=!0;if(void 0!==x)for(;!E(r,x);){var o=e.getDirectoryPath(r);if(o===r)break;a=!1,n=r,i=t,r=o,t=e.getDirectoryPath(t)}return I(r)?{dir:i||t,dirPath:n||r,nonRecursive:a}:void 0}function L(t){return e.fileExtensionIsOneOf(t,h)}function R(t,r){r.failedLookupLocations&&r.failedLookupLocations.length&&(r.refCount?r.refCount++:(r.refCount=1,e.isExternalModuleNameRelative(t)?B(r):u.add(t,r)))}function B(t){e.Debug.assert(!!t.refCount);for(var n=!1,i=0,a=t.failedLookupLocations;i<a.length;i++){var o=a[i],s=r.toPath(o),c=O(o,s);if(c){var u=c.dir,l=c.dirPath,_=c.nonRecursive;if(!L(s)){var d=v.get(s)||0;v.set(s,d+1)}l===x?(e.Debug.assert(!_),n=!0):z(u,l,_)}}n&&z(D,x,!0)}function j(e){e.refCount=void 0}function J(e,t){var n=r.getCurrentProgram(),i=n&&n.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(t)?j:B;e.forEach(i)}function z(t,n,i){var a=b.get(n);a?(e.Debug.assert(!!i==!!a.nonRecursive),a.refCount++):b.set(n,{watcher:function(e,t,n){return r.watchDirectoryOfFailedLookupLocation(e,function(e){var n=r.toPath(e);_&&_.addOrDeleteFileOrDirectory(e,n),!c&&G(n,t===n)&&r.onInvalidatedResolution()},n?0:1)}(t,n,i),refCount:1,nonRecursive:i})}function K(t){if(t.refCount&&(t.refCount--,!t.refCount)){for(var n=!1,i=0,a=t.failedLookupLocations;i<a.length;i++){var o=a[i],s=r.toPath(o),c=O(o,s);if(c){var u=c.dirPath,l=v.get(s);l&&(1===l?v.delete(s):(e.Debug.assert(l>1),v.set(s,l-1))),u===x?n=!0:U(u)}}n&&U(x)}}function U(e){b.get(e).refCount--}function V(e,t){var r=e.get(t);r&&(r.forEach(K),e.delete(t))}function q(e){V(d,e),V(g,e)}function W(t,r,n){var i=e.createMap();t.forEach(function(t,a){var s=e.getDirectoryPath(a),c=i.get(s);c||(c=e.createMap(),i.set(s,c)),t.forEach(function(t,i){c.has(i)||(c.set(i,!0),!t.isInvalidated&&r(t,n)&&(t.isInvalidated=!0,(o||(o=e.createMap())).set(a,!0)))})})}function H(t){var n;n=r.maxNumberOfFilesToIterateForInvalidation||e.maxNumberOfFilesToIterateForInvalidation,d.size>n||g.size>n?c=!0:(W(d,t,T),W(g,t,C))}function G(n,i){var a;if(i)a=function(e){return E(n,r.toPath(e))};else{if(t(n))return!1;var s=e.getDirectoryPath(n);if(w(n)||P(n)||w(s)||P(s))a=function(t){return r.toPath(t)===n||e.startsWith(r.toPath(t),n)};else{if(!L(n)&&!v.has(n))return!1;if(e.isEmittedFileOfProgram(r.getCurrentProgram(),n))return!1;a=function(e){return r.toPath(e)===n}}}var u=o&&o.size;return H(function(t){return e.some(t.failedLookupLocations,a)}),c||o&&o.size!==u}function Y(){e.clearMap(S,e.closeFileWatcher)}function X(e,t){return r.watchTypeRootsDirectory(t,function(n){var i=r.toPath(n);_&&_.addOrDeleteFileOrDirectory(n,i),r.onChangedAutomaticTypeDirectiveNames();var a=function(e,t){if(!c){if(E(x,t))return x;var r=M(e,t);return r&&b.has(r.dirPath)?r.dirPath:void 0}}(t,e);a&&G(i,a===i)&&r.onInvalidatedResolution()},1)}function Q(t){var n=e.getDirectoryPath(e.getDirectoryPath(t)),i=r.toPath(n);return i===x||I(i)}}}(c||(c={})),function(e){!function(t){var r,n;function i(t,r,n){var i=t.importModuleSpecifierPreference,a=t.importModuleSpecifierEnding;return{relativePreference:"relative"===i?0:"non-relative"===i?1:2,ending:function(){switch(a){case"minimal":return 0;case"index":return 1;case"js":return 2;default:return t=n.imports,e.firstDefined(t,function(t){var r=t.text;return e.pathIsRelative(r)?e.hasJSOrJsonFileExtension(r):void 0})?2:e.getEmitModuleResolutionKind(r)!==e.ModuleResolutionKind.NodeJs?1:0}var t}()}}function a(t,r,n,i,a,c,u){var l=o(r,i),_=d(a,r,n,l.getCanonicalFileName,i,c);return e.firstDefined(_,function(e){return f(e,l,i,t)})||s(n,l,t,u)}function o(t,r){return{getCanonicalFileName:e.createGetCanonicalFileName(!r.useCaseSensitiveFileNames||r.useCaseSensitiveFileNames()),sourceDirectory:e.getDirectoryPath(t)}}function s(t,r,n,i){var a=r.getCanonicalFileName,o=r.sourceDirectory,s=i.ending,u=i.relativePreference,l=n.baseUrl,_=n.paths,d=n.rootDirs,f=d&&function(t,r,n,i){var a=m(r,t,i);if(void 0===a)return;var o=m(n,t,i),s=void 0!==o?e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(o,a,i)):a;return e.removeFileExtension(s)}(d,t,o,a)||g(e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(o,t,a)),s,n);if(!l||0===u)return f;var v=y(t,l,a);if(!v)return f;var b=g(v,s,n),D=_&&p(e.removeFileExtension(v),b,_),x=void 0===D?b:D;return 1===u?x:(2!==u&&e.Debug.assertNever(u),h(x)||c(f)<c(x)?f:x)}function c(t){for(var r=0,n=e.startsWith(t,"./")?2:0;n<t.length;n++)47===t.charCodeAt(n)&&r++;return r}function u(e,t,r){return r(e)===r(t)}function l(t,r){return"node_modules"===r(t)||e.startsWith(t,"@")}function _(t,r,n,i){for(var a=e.getPathComponents(e.toPath(t,n,i)),o=e.getPathComponents(e.toPath(r,n,i));!l(a[a.length-2],i)&&!l(o[o.length-2],i)&&u(a[a.length-1],o[o.length-1],i);)a.pop(),o.pop();return[e.getPathFromPathComponents(a),e.getPathFromPathComponents(o)]}function d(t,r,n,i,a,o){var s=o.get(n),c=s?s.concat([n]):[n],u=a.getCurrentDirectory?a.getCurrentDirectory():"",l=c.map(function(t){return e.getNormalizedAbsolutePath(t,u)}),d=function(t,r,n){for(var i=e.createMap(),a=0,o=e.mapDefined(t,function(t){return t.resolvedModules&&e.firstDefinedIterator(t.resolvedModules.values(),function(e){return e&&e.originalPath&&e.resolvedFileName!==e.originalPath?[e.resolvedFileName,e.originalPath]:void 0})});a<o.length;a++){var s=o[a],c=_(s[0],s[1],n,r),u=c[0],l=c[1];i.set(l,u)}return i}(t,i,u),p=[],f=!a.useCaseSensitiveFileNames||a.useCaseSensitiveFileNames()?e.compareStringsCaseSensitive:e.compareStringsCaseInsensitive;return d.forEach(function(t,n){if(!e.startsWithDirectory(r,t,i)){var o=e.find(l,function(e){return 0===f(e.slice(0,t.length+1),t+"/")});if(void 0!==o){var s=e.getRelativePathFromDirectory(t,o,i),c=e.resolvePath(n,s);a.fileExists&&!a.fileExists(c)||p.push(c)}}}),p.push.apply(p,l),p}function p(t,r,n){for(var i in n)for(var a=0,o=n[i];a<o.length;a++){var s=o[a],c=e.removeFileExtension(e.normalizePath(s)),u=c.indexOf("*");if(-1!==u){var l=c.substr(0,u),_=c.substr(u+1);if(r.length>=l.length+_.length&&e.startsWith(r,l)&&e.endsWith(r,_)||!_&&r===e.removeTrailingDirectorySeparator(l)){var d=r.substr(l.length,r.length-_.length);return i.replace("*",d)}}else if(c===r||c===t)return i}}function f(t,r,n,i){var a=r.getCanonicalFileName,o=r.sourceDirectory;if(n.fileExists&&n.readFile){var s=function(t){var r,n=0,i=0,a=0;!function(e){e[e.BeforeNodeModules=0]="BeforeNodeModules",e[e.NodeModules=1]="NodeModules",e[e.Scope=2]="Scope",e[e.PackageContent=3]="PackageContent"}(r||(r={}));var o=0,s=0,c=0;for(;s>=0;)switch(o=s,s=t.indexOf("/",o+1),c){case 0:t.indexOf(e.nodeModulesPathPart,o)===o&&(n=o,i=s,c=1);break;case 1:case 2:1===c&&"@"===t.charAt(o+1)?c=2:(a=s,c=3);break;case 3:c=t.indexOf(e.nodeModulesPathPart,o)===o?1:3}return c>1?{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:i,packageRootIndex:a,fileNameIndex:o}:void 0}(t);if(s){var c=t.substring(0,s.packageRootIndex),u=e.combinePaths(c,"package.json"),l=n.fileExists(u)?JSON.parse(n.readFile(u)):void 0,_=l&&l.typesVersions?e.getPackageJsonTypesVersionsPaths(l.typesVersions):void 0;if(_){var d=t.slice(s.packageRootIndex+1),f=p(e.removeFileExtension(d),g(d,0,i),_.paths);void 0!==f&&(t=e.combinePaths(t.slice(0,s.packageRootIndex),f))}var m=function(t){if(l){var r=l.typings||l.types||l.main;if(r){var i=e.toPath(r,c,a);if(e.removeFileExtension(i)===e.removeFileExtension(a(t)))return c}}var o=e.removeFileExtension(t);if("/index"===a(o.substring(s.fileNameIndex))&&!function(t,r){if(!t.fileExists)return;for(var n=0,i=e.getSupportedExtensions({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]);n<i.length;n++){var a=i[n],o=r+a;if(t.fileExists(o))return o}}(n,o.substring(0,s.fileNameIndex)))return o.substring(0,s.fileNameIndex);return o}(t);if(e.startsWith(o,a(m.substring(0,s.topLevelNodeModulesIndex)))){var y=m.substring(s.topLevelPackageNameIndex+1),h=e.getPackageNameFromTypesPackageName(y);return e.getEmitModuleResolutionKind(i)!==e.ModuleResolutionKind.NodeJs&&h===y?void 0:h}}}}function m(t,r,n){return e.firstDefined(r,function(e){var r=y(t,e,n);return h(r)?void 0:r})}function g(t,r,n){if(e.fileExtensionIs(t,".json"))return t;var i=e.removeFileExtension(t);switch(r){case 0:return e.removeSuffix(i,"/index");case 1:return i;case 2:return i+function(t,r){var n=e.extensionFromPath(t);switch(n){case".ts":case".d.ts":return".js";case".tsx":return 1===r.jsx?".jsx":".js";case".js":case".jsx":case".json":return n;case".tsbuildinfo":return e.Debug.fail("Extension .tsbuildinfo is unsupported:: FileName:: "+t);default:return e.Debug.assertNever(n)}}(t,n);default:return e.Debug.assertNever(r)}}function y(t,r,n){var i=e.getRelativePathToDirectoryOrUrl(r,t,r,n,!1);return e.isRootedDiskPath(i)?void 0:i}function h(t){return e.startsWith(t,"..")}!function(e){e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Auto=2]="Auto"}(r||(r={})),function(e){e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension"}(n||(n={})),t.updateModuleSpecifier=function(t,r,n,i,o,s,c){var u=a(t,r,n,i,o,s,function(t,r){return{relativePreference:e.isExternalModuleNameRelative(r)?0:1,ending:e.hasJSOrJsonFileExtension(r)?2:e.getEmitModuleResolutionKind(t)!==e.ModuleResolutionKind.NodeJs||e.endsWith(r,"index")?1:0}}(t,c));if(u!==c)return u},t.getModuleSpecifier=function(e,t,r,n,o,s,c,u){return void 0===c&&(c={}),a(e,r,n,o,s,u,i(c,e,t))},t.getModuleSpecifiers=function(t,r,n,a,c,u,l){var _=function(t){var r=e.find(t.declarations,function(t){return e.isNonGlobalAmbientModule(t)&&(!e.isExternalModuleAugmentation(t)||!e.isExternalModuleNameRelative(e.getTextOfIdentifierOrLiteral(t.name)))});if(r)return r.name.text}(t);if(_)return[_];var p=o(n.path,a),m=e.getSourceFileOfNode(t.valueDeclaration||e.getNonAugmentationDeclaration(t)),g=d(c,n.path,m.fileName,p.getCanonicalFileName,a,l),y=i(u,r,n),h=e.mapDefined(g,function(e){return f(e,p,a,r)});return h.length?h:g.map(function(e){return s(e,p,r,y)})},t.countPathComponents=c}(e.moduleSpecifiers||(e.moduleSpecifiers={}))}(c||(c={})),function(e){var t=e.sys?{getCurrentDirectory:function(){return e.sys.getCurrentDirectory()},getNewLine:function(){return e.sys.newLine},getCanonicalFileName:e.createGetCanonicalFileName(e.sys.useCaseSensitiveFileNames)}:void 0;function r(r,n){var i=r===e.sys?t:{getCurrentDirectory:function(){return r.getCurrentDirectory()},getNewLine:function(){return r.newLine},getCanonicalFileName:e.createGetCanonicalFileName(r.useCaseSensitiveFileNames)};if(!n)return function(t){return r.write(e.formatDiagnostic(t,i))};var a=new Array(1);return function(t){a[0]=t,r.write(e.formatDiagnosticsWithColorAndContext(a,i)+i.getNewLine()),a[0]=void 0}}function n(t,r,n){return!(!t.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!e.contains(e.screenStartingMessageCodes,r.code))&&(t.clearScreen(),!0)}function i(t,r){return r?function(r,i,a){n(t,r,a);var o="["+e.formatColorAndReset((new Date).toLocaleTimeString(),e.ForegroundColorEscapeSequences.Grey)+"] ";o+=""+e.flattenDiagnosticMessageText(r.messageText,t.newLine)+(i+i),t.write(o)}:function(r,i,a){var o="";n(t,r,a)||(o+=i),o+=(new Date).toLocaleTimeString()+" - ",o+=""+e.flattenDiagnosticMessageText(r.messageText,t.newLine)+function(t,r){return e.contains(e.screenStartingMessageCodes,t.code)?r+r:r}(r,i),t.write(o)}}function a(t){return e.countWhere(t,function(t){return t.category===e.DiagnosticCategory.Error})}function o(t){return 1===t?e.Diagnostics.Found_1_error_Watching_for_file_changes:e.Diagnostics.Found_0_errors_Watching_for_file_changes}function s(t,r){if(0===t)return"";var n=e.createCompilerDiagnostic(1===t?e.Diagnostics.Found_1_error:e.Diagnostics.Found_0_errors,t);return""+r+e.flattenDiagnosticMessageText(n.messageText,r)+r+r}function c(t,r,n,i,o){var s=t.getConfigFileParsingDiagnostics().slice(),c=s.length;e.addRange(s,t.getSyntacticDiagnostics()),s.length===c&&(e.addRange(s,t.getOptionsDiagnostics()),e.addRange(s,t.getGlobalDiagnostics()),s.length===c&&e.addRange(s,t.getSemanticDiagnostics()));var u=t.emit(void 0,o),l=u.emittedFiles,_=u.emitSkipped,d=u.diagnostics;if(e.addRange(s,d),e.sortAndDeduplicateDiagnostics(s).forEach(r),n){var p=t.getCurrentDirectory();e.forEach(l,function(t){var r=e.getNormalizedAbsolutePath(t,p);n("TSFILE: "+r)}),t.getCompilerOptions().listFiles&&e.forEach(t.getSourceFiles(),function(e){n(e.fileName)})}return i&&i(a(s)),_&&s.length>0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:s.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}e.createDiagnosticReporter=r,e.screenStartingMessageCodes=[e.Diagnostics.Starting_compilation_in_watch_mode.code,e.Diagnostics.File_change_detected_Starting_incremental_compilation.code],e.createWatchStatusReporter=i,e.parseConfigFileWithSystem=function(t,r,n,i){var a=n;a.onUnRecoverableConfigFileDiagnostic=function(t){return f(e.sys,i,t)};var o=e.getParsedCommandLineOfConfigFile(t,r,a);return a.onUnRecoverableConfigFileDiagnostic=void 0,o},e.getErrorCountForSummary=a,e.getWatchErrorSummaryDiagnosticMessage=o,e.getErrorSummaryText=s,e.emitFilesAndReportErrors=c;var u={close:e.noop};function l(t,r){return void 0===t&&(t=e.sys),{onWatchStatusChange:r||i(t),watchFile:e.maybeBind(t,t.watchFile)||function(){return u},watchDirectory:e.maybeBind(t,t.watchDirectory)||function(){return u},setTimeout:e.maybeBind(t,t.setTimeout)||e.noop,clearTimeout:e.maybeBind(t,t.clearTimeout)||e.noop}}function _(t,r){var n=t.getSourceFile,i=r.createHash||e.generateDjb2Hash;t.getSourceFile=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var o=n.call.apply(n,[t].concat(e));return o&&(o.version=i.call(r,o.text)),o}}function d(t,r){var n=e.memoize(function(){return e.getDirectoryPath(e.normalizePath(t.getExecutingFilePath()))});return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:e.memoize(function(){return t.getCurrentDirectory()}),getDefaultLibLocation:n,getDefaultLibFileName:function(t){return e.combinePaths(n(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,r,n,i,a){return t.readDirectory(e,r,n,i,a)},realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable),trace:function(e){return t.write(e+t.newLine)},createDirectory:function(e){return t.createDirectory(e)},writeFile:function(e,r,n){return t.writeFile(e,r,n)},onCachedDirectoryStructureHostCreate:function(e){return e||t},createHash:e.maybeBind(t,t.createHash),createProgram:r||e.createEmitAndSemanticDiagnosticsBuilderProgram}}function p(t,r,n,i){void 0===t&&(t=e.sys);var a=function(e){return t.write(e+t.newLine)},s=d(t,r);return e.copyProperties(s,l(t,i)),s.afterProgramCreate=function(r){var i=r.getCompilerOptions(),u=e.getNewLineCharacter(i,function(){return t.newLine});c(r,n,a,function(t){return s.onWatchStatusChange(e.createCompilerDiagnostic(o(t),t),u,i)})},s}function f(t,r,n){r(n),t.exit(e.ExitStatus.DiagnosticsPresent_OutputsSkipped)}function m(t,r){if(!t.out&&!t.outFile){var n=e.getOutputPathForBuildInfo(t);if(n){var i=r(n);if(i){var a=e.getBuildInfo(i);if(a.version===e.version&&a.program)return e.createBuildProgramUsingProgramBuildInfo(a.program)}}}}function g(t,r){void 0===r&&(r=e.sys);var n=e.createCompilerHostWorker(t,void 0,r);return n.createHash=e.maybeBind(r,r.createHash),_(n,r),e.changeCompilerHostLikeToUseCache(n,function(t){return e.toPath(t,n.getCurrentDirectory(),n.getCanonicalFileName)}),n}e.createWatchHost=l,function(e){e.ConfigFile="Config file",e.SourceFile="Source file",e.MissingFile="Missing file",e.WildcardDirectory="Wild card directory",e.FailedLookupLocations="Failed Lookup Locations",e.TypeRoots="Type roots"}(e.WatchType||(e.WatchType={})),e.createWatchFactory=function(t,r){var n=t.trace?r.extendedDiagnostics?e.WatchLogLevel.Verbose:r.diagnostics?e.WatchLogLevel.TriggerOnly:e.WatchLogLevel.None:e.WatchLogLevel.None,i=n!==e.WatchLogLevel.None?function(e){return t.trace(e)}:e.noop,a=e.getWatchFactory(n,i);return a.writeLog=i,a},e.createCompilerHostFromProgramHost=function(t,r,n){void 0===n&&(n=t);var i=t.useCaseSensitiveFileNames(),a=e.memoize(function(){return t.getNewLine()});return{getSourceFile:function(n,i,a){var o;try{e.performance.mark("beforeIORead"),o=t.readFile(n,r().charset),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){a&&a(e.message),o=""}return void 0!==o?e.createSourceFile(n,o,i):void 0},getDefaultLibLocation:e.maybeBind(t,t.getDefaultLibLocation),getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:function(r,n,i,a){try{e.performance.mark("beforeIOWrite"),function r(n){if(n.length>e.getRootLength(n)&&!t.directoryExists(n)){var i=e.getDirectoryPath(n);r(i),t.createDirectory&&t.createDirectory(n)}}(e.getDirectoryPath(e.normalizePath(r))),t.writeFile(r,n,i),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:e.memoize(function(){return t.getCurrentDirectory()}),useCaseSensitiveFileNames:function(){return i},getCanonicalFileName:e.createGetCanonicalFileName(i),getNewLine:function(){return e.getNewLineCharacter(r(),a)},fileExists:function(e){return t.fileExists(e)},readFile:function(e){return t.readFile(e)},trace:e.maybeBind(t,t.trace),directoryExists:e.maybeBind(n,n.directoryExists),getDirectories:e.maybeBind(n,n.getDirectories),realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable)||function(){return""},createHash:e.maybeBind(t,t.createHash),readDirectory:e.maybeBind(t,t.readDirectory)}},e.setGetSourceFileAsHashVersioned=_,e.createProgramHost=d,e.createWatchCompilerHostOfConfigFile=function(e,t,n,i,a,o){var s=a||r(n),c=p(n,i,s,o);return c.onUnRecoverableConfigFileDiagnostic=function(e){return f(n,s,e)},c.configFileName=e,c.optionsToExtend=t,c},e.createWatchCompilerHostOfFilesAndCompilerOptions=function(e,t,n,i,a,o,s){var c=p(n,i,a||r(n),o);return c.rootFiles=e,c.options=t,c.projectReferences=s,c},e.readBuilderProgram=m,e.createIncrementalCompilerHost=g,e.performIncrementalCompilation=function(t){var n=t.system||e.sys,i=t.host||(t.host=g(t.options,n)),a=function(t){var r=t.rootNames,n=t.options,i=t.configFileParsingDiagnostics,a=t.projectReferences,o=t.host,s=t.createProgram;o=o||g(n),s=s||e.createEmitAndSemanticDiagnosticsBuilderProgram;var c=m(n,function(e){return o.readFile(e)});return s(r,n,o,c,i,a)}(t),o=c(a,t.reportDiagnostic||r(n),function(e){return i.trace&&i.trace(e)},t.reportErrorSummary||t.options.pretty?function(e){return n.write(s(e,n.newLine))}:void 0);return t.afterProgramEmitAndDiagnostics&&t.afterProgramEmitAndDiagnostics(a),o}}(c||(c={})),function(e){e.createWatchCompilerHost=function(t,r,n,i,a,o,s){return e.isArray(t)?e.createWatchCompilerHostOfFilesAndCompilerOptions(t,r,n,i,a,o,s):e.createWatchCompilerHostOfConfigFile(t,r,n,i,a,o)},e.createWatchProgram=function(t){var r,n,i,a,o,s,c,u,l=e.createMap(),_=!1,d=!1,p=t.useCaseSensitiveFileNames(),f=t.getCurrentDirectory(),m=t.configFileName,g=t.optionsToExtend,y=void 0===g?{}:g,h=t.createProgram,v=t.rootFiles,b=t.options,D=t.projectReferences,x=!1,S=!1,T=void 0===m?void 0:e.createCachedDirectoryStructureHost(t,f,p);T&&t.onCachedDirectoryStructureHostCreate&&t.onCachedDirectoryStructureHostCreate(T);var C=T||t,E=e.parseConfigHostFromCompilerHostLike(t,C),k=U();m&&t.configFileParsingResult&&(ee(t.configFileParsingResult),k=U()),X(e.Diagnostics.Starting_compilation_in_watch_mode),m&&!t.configFileParsingResult&&(k=e.getNewLineCharacter(y,function(){return t.getNewLine()}),e.Debug.assert(!v),Z(),k=U());var N,A=e.createWatchFactory(t,b),F=A.watchFile,P=A.watchFilePath,w=A.watchDirectory,I=A.writeLog,O=e.createGetCanonicalFileName(p);I("Current directory: "+f+" CaseSensitiveFileNames: "+p),m&&(N=F(t,m,function(){e.Debug.assert(!!m),n=e.ConfigFileProgramReloadLevel.Full,Q()},e.PollingInterval.High,"Config file"));var M=e.createCompilerHostFromProgramHost(t,function(){return b},C);e.setGetSourceFileAsHashVersioned(M,t);var L=M.getSourceFile;M.getSourceFile=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return H.apply(void 0,[e,V(e)].concat(t))},M.getSourceFileByPath=H,M.getNewLine=function(){return k},M.fileExists=W,M.onReleaseOldSourceFile=function(e,t,r){var n=l.get(e.resolvedPath);void 0!==n&&(q(n)?(s||(s=[])).push(e.path):n.sourceFile===e&&(n.fileWatcher&&n.fileWatcher.close(),l.delete(e.resolvedPath),r||R.removeResolutionsOfFile(e.path)))},M.toPath=V,M.getCompilationSettings=function(){return b},M.watchDirectoryOfFailedLookupLocation=function(e,r,n){return w(t,e,r,n,"Failed Lookup Locations")},M.watchTypeRootsDirectory=function(e,r,n){return w(t,e,r,n,"Type roots")},M.getCachedDirectoryStructureHost=function(){return T},M.onInvalidatedResolution=Q,M.onChangedAutomaticTypeDirectiveNames=function(){d=!0,Q()},M.maxNumberOfFilesToIterateForInvalidation=t.maxNumberOfFilesToIterateForInvalidation,M.getCurrentProgram=z,M.writeLog=I;var R=e.createResolutionCache(M,m?e.getDirectoryPath(e.getNormalizedAbsolutePath(m,f)):f,!1);M.resolveModuleNames=t.resolveModuleNames?function(e,r,n,i){return t.resolveModuleNames(e,r,n,i)}:function(e,t,r,n){return R.resolveModuleNames(e,t,r,n)},M.resolveTypeReferenceDirectives=t.resolveTypeReferenceDirectives?function(e,r,n){return t.resolveTypeReferenceDirectives(e,r,n)}:function(e,t,r){return R.resolveTypeReferenceDirectives(e,t,r)};var B=!!t.resolveModuleNames||!!t.resolveTypeReferenceDirectives;return r=e.readBuilderProgram(b,function(e){return M.readFile(e)}),K(),ae(),m?{getCurrentProgram:J,getProgram:K,close:j}:{getCurrentProgram:J,getProgram:K,updateRootFileNames:function(t){e.Debug.assert(!m,"Cannot update root file names with config file watch mode"),v=t,Q()},close:j};function j(){R.clear(),e.clearMap(l,function(e){e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}),N&&(N.close(),N=void 0),a&&(e.clearMap(a,e.closeFileWatcherOf),a=void 0),i&&(e.clearMap(i,e.closeFileWatcher),i=void 0)}function J(){return r}function z(){return r&&r.getProgramOrUndefined()}function K(){I("Synchronizing program");var n=J();_&&(k=U(),n&&e.changesAffectModuleResolution(n.getCompilerOptions(),b)&&R.clear());var a=R.createHasInvalidatedResolution(B);return e.isProgramUptoDate(z(),v,b,Y,W,a,d,D)?S&&(r=h(void 0,void 0,M,r,u,D),S=!1):function(t){I("CreatingProgramWith::"),I(" roots: "+JSON.stringify(v)),I(" options: "+JSON.stringify(b));var n=_||!z();if(_=!1,S=!1,R.startCachingPerDirectoryResolution(),M.hasInvalidatedResolution=t,M.hasChangedAutomaticTypeDirectiveNames=d,r=h(v,b,M,r,u,D),R.finishCachingPerDirectoryResolution(),e.updateMissingFilePathsWatch(r.getProgram(),i||(i=e.createMap()),ne),n&&R.updateTypeRootsWatch(),s){for(var a=0,o=s;a<o.length;a++){var c=o[a];i.has(c)||l.delete(c)}s=void 0}}(a),t.afterProgramCreate&&t.afterProgramCreate(r),r}function U(){return e.getNewLineCharacter(b||y,function(){return t.getNewLine()})}function V(t){return e.toPath(t,f,O)}function q(e){return"boolean"==typeof e}function W(e){var t=V(e);return!!q(l.get(t))||C.fileExists(e)}function H(r,n,i,a,o){var s=l.get(n);if(!q(s)){if(void 0===s||o||function(e){return"boolean"==typeof e.version}(s)){var c=L(r,i,a);if(s)c?(s.sourceFile=c,s.version=c.version,s.fileWatcher||(s.fileWatcher=P(t,r,te,e.PollingInterval.Low,n,"Source file"))):(s.fileWatcher&&s.fileWatcher.close(),l.set(n,!1));else if(c){var u=P(t,r,te,e.PollingInterval.Low,n,"Source file");l.set(n,{sourceFile:c,version:c.version,fileWatcher:u})}else l.set(n,!1);return c}return s.sourceFile}}function G(e){var t=l.get(e);void 0!==t&&(q(t)?l.set(e,{version:!1}):t.version=!1)}function Y(e){var t=l.get(e);return t&&t.version?t.version:void 0}function X(r){t.onWatchStatusChange&&t.onWatchStatusChange(e.createCompilerDiagnostic(r),k,b||y)}function Q(){t.setTimeout&&t.clearTimeout&&(o&&t.clearTimeout(o),I("Scheduling update"),o=t.setTimeout($,250))}function $(){switch(o=void 0,X(e.Diagnostics.File_change_detected_Starting_incremental_compilation),n){case e.ConfigFileProgramReloadLevel.Partial:return function(){I("Reloading new file names and options");var t=e.getFileNamesFromConfigSpecs(c,e.getDirectoryPath(m),b,E);e.updateErrorForNoInputFiles(t,m,c,u,x)&&(S=!0),v=t.fileNames,K()}();case e.ConfigFileProgramReloadLevel.Full:return I("Reloading config file: "+m),n=e.ConfigFileProgramReloadLevel.None,T&&T.clearCache(),Z(),_=!0,K(),void ae();default:return void K()}}function Z(){ee(e.getParsedCommandLineOfConfigFile(m,y,E))}function ee(t){v=t.fileNames,b=t.options,c=t.configFileSpecs,D=t.projectReferences,u=e.getConfigFileParsingDiagnostics(t).slice(),x=e.canJsonReportNoInutFiles(t.raw),S=!0}function te(t,r,n){re(t,n,r),r===e.FileWatcherEventKind.Deleted&&l.has(n)&&R.invalidateResolutionOfFile(n),R.removeResolutionsFromProjectReferenceRedirects(n),G(n),Q()}function re(e,t,r){T&&T.addOrDeleteFile(e,t,r)}function ne(r){return P(t,r,ie,e.PollingInterval.Medium,r,"Missing file")}function ie(t,r,n){re(t,n,r),r===e.FileWatcherEventKind.Created&&i.has(n)&&(i.get(n).close(),i.delete(n),G(n),Q())}function ae(){c?e.updateWatchingWildcardDirectories(a||(a=e.createMap()),e.createMapFromTemplate(c.wildcardDirectories),oe):a&&e.clearMap(a,e.closeFileWatcherOf)}function oe(r,i){return w(t,r,function(t){e.Debug.assert(!!m);var i=V(t);T&&T.addOrDeleteFileOrDirectory(t,i),G(i),e.isPathIgnored(i)||(i===r||!e.hasExtension(i)||e.isSupportedSourceFileName(t,b)?n!==e.ConfigFileProgramReloadLevel.Full&&(n=e.ConfigFileProgramReloadLevel.Partial,Q()):I("Project: "+m+" Detected file add/remove of non supported extension: "+t))},i,"Wild card directory")}}}(c||(c={})),function(e){var t,r,n=new Date(-864e13),i=new Date(864e13);function a(t){var r=e.createMap();return{setValue:function(e,n){r.set(t(e),n)},getValue:function(e){return r.get(t(e))},removeKey:function(e){r.delete(t(e))},forEach:function(e){r.forEach(e)},hasKey:function(e){return r.has(t(e))},getSize:function(){return r.size},clear:function(){r.clear()}}}function o(e,t,r){var n,i=e.getValue(t);return i||(n=r(),e.setValue(t,n)),i||n}function s(t,r){return o(t,r,e.createMap)}function c(e,t){return t>e?t:e}function u(t){return e.fileExtensionIs(t,".d.ts")}function l(t,r){return function(n){var i=r?"["+e.formatColorAndReset((new Date).toLocaleTimeString(),e.ForegroundColorEscapeSequences.Grey)+"] ":(new Date).toLocaleTimeString()+" - ";i+=""+e.flattenDiagnosticMessageText(n.messageText,t.newLine)+(t.newLine+t.newLine),t.write(i)}}function _(t,r,n,i){var a=e.createProgramHost(t,r);return a.getModifiedTime=t.getModifiedTime?function(e){return t.getModifiedTime(e)}:e.returnUndefined,a.setModifiedTime=t.setModifiedTime?function(e,r){return t.setModifiedTime(e,r)}:e.noop,a.deleteFile=t.deleteFile?function(e){return t.deleteFile(e)}:e.noop,a.reportDiagnostic=n||e.createDiagnosticReporter(t),a.reportSolutionBuilderStatus=i||l(t),a}function d(t){var r={};return e.commonOptionsWithBuild.forEach(function(e){r[e.name]=t[e.name]}),r}function p(t){return e.fileExtensionIs(t,".json")?t:e.combinePaths(t,"tsconfig.json")}function f(t,n,i,a){switch(n.type){case r.OutOfDateWithSelf:return a(e.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2,i(t),i(n.outOfDateOutputFileName),i(n.newerInputFileName));case r.OutOfDateWithUpstream:return a(e.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2,i(t),i(n.outOfDateOutputFileName),i(n.newerProjectName));case r.OutputMissing:return a(e.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist,i(t),i(n.missingOutputFileName));case r.UpToDate:if(void 0!==n.newestInputFileTime)return a(e.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2,i(t),i(n.newestInputFileName||""),i(n.oldestOutputFileName||""));break;case r.OutOfDateWithPrepend:return a(e.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed,i(t),i(n.newerProjectName));case r.UpToDateWithUpstreamTypes:return a(e.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,i(t));case r.UpstreamOutOfDate:return a(e.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,i(t),i(n.upstreamProjectName));case r.UpstreamBlocked:return a(e.Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,i(t),i(n.upstreamProjectName));case r.Unbuildable:return a(e.Diagnostics.Failed_to_parse_file_0_Colon_1,i(t),n.reason);case r.TsVersionOutputOfDate:return a(e.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,i(t),n.version,e.version);case r.ContainerOnly:case r.ComputingUpstream:break;default:e.assertType(n)}}!function(e){e[e.None=0]="None",e[e.Success=1]="Success",e[e.DeclarationOutputUnchanged=2]="DeclarationOutputUnchanged",e[e.ConfigFileErrors=4]="ConfigFileErrors",e[e.SyntaxErrors=8]="SyntaxErrors",e[e.TypeErrors=16]="TypeErrors",e[e.DeclarationEmitErrors=32]="DeclarationEmitErrors",e[e.EmitErrors=64]="EmitErrors",e[e.AnyErrors=124]="AnyErrors"}(t||(t={})),function(e){e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutOfDateWithPrepend=3]="OutOfDateWithPrepend",e[e.OutputMissing=4]="OutputMissing",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.UpstreamOutOfDate=7]="UpstreamOutOfDate",e[e.UpstreamBlocked=8]="UpstreamBlocked",e[e.ComputingUpstream=9]="ComputingUpstream",e[e.TsVersionOutputOfDate=10]="TsVersionOutputOfDate",e[e.ContainerOnly=11]="ContainerOnly"}(r=e.UpToDateStatusType||(e.UpToDateStatusType={})),e.createBuilderStatusReporter=l,e.createSolutionBuilderHost=function(t,r,n,i,a){void 0===t&&(t=e.sys);var o=_(t,r,n,i);return o.reportErrorSummary=a,o},e.createSolutionBuilderWithWatchHost=function(t,r,n,i,a){void 0===t&&(t=e.sys);var o=_(t,r,n,i),s=e.createWatchHost(t,a);return e.copyProperties(o,s),o},e.createSolutionBuilder=function(l,_,m){var g,y=l,h=l.getCurrentDirectory(),v=e.createGetCanonicalFileName(l.useCaseSensitiveFileNames()),b=e.parseConfigHostFromCompilerHostLike(l),D=m,x=d(D),S=a(G),T=a(G),C=a(G),E=e.createMap(),k=function(e){return l.trace&&l.trace(e)},N=function(e){return l.readFile(e)},A=x,F=e.createCompilerHostFromProgramHost(l,function(){return A});e.setGetSourceFileAsHashVersioned(F,l);var P,w=a(G),I=a(G),O=a(G),M=a(G),L=a(G),R=[],B=0,j=!1,J=e.createWatchFactory(l,D),z=J.watchFile,K=J.watchFilePath,U=J.watchDirectory,V=J.writeLog,q=a(G),W=a(G),H=a(G);return{buildAllProjects:function(){D.watch&&Q(e.Diagnostics.Starting_compilation_in_watch_mode);var n=N,i=F.getSourceFile,a=e.changeCompilerHostLikeToUseCache(l,G,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.call.apply(i,[F].concat(e))}),o=a.originalReadFile,s=a.originalFileExists,c=a.originalDirectoryExists,u=a.originalCreateDirectory,_=a.originalWriteFile,d=a.getSourceFileWithCache,p=a.readFileWithCache;N=p,F.getSourceFile=d;var f=ie();!function(t){D.verbose&&X(e.Diagnostics.Projects_in_this_build_Colon_0,t.buildQueue.map(function(e){return"\r\n * "+xe(e)}).join(""))}(f);for(var g=!1,y=0,h=f.buildQueue;y<h.length;y++){var v=h[y],b=Y(v);if(void 0===b){ve(v),g=!0;break}var x=b.errors,S=ae(b);Se(v,S);var T=b.options.configFilePath;if(S.type!==r.UpToDate||D.force)if(S.type!==r.UpToDateWithUpstreamTypes||D.force)if(S.type!==r.UpstreamBlocked)if(S.type!==r.ContainerOnly){var C=he(S,v)?de(v):fe(v);g=g||!!(C&t.AnyErrors)}else be(v,x);else be(v,x),D.verbose&&X(e.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,T,S.upstreamProjectName);else be(v,x),me(b);else be(v,x),m.dry&&X(e.Diagnostics.Project_0_is_up_to_date,T)}return _e(),l.readFile=o,l.fileExists=s,l.directoryExists=c,l.createDirectory=u,l.writeFile=_,F.getSourceFile=i,N=n,g?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:e.ExitStatus.Success},getUpToDateStatusOfFile:function(e){return ae(Y(e))},cleanAllProjects:function(){var t=function(){for(var t=[],r=0,n=ie().buildQueue;r<n.length;r++){var i=n[r],a=Y(i);if(void 0!==a)for(var o=e.getAllProjectOutputs(a,!l.useCaseSensitiveFileNames()),s=0,c=o;s<c.length;s++){var u=c[s];l.fileExists(u)&&t.push(u)}else ve(i)}return t}();if(D.dry)return X(e.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0,t.map(function(e){return"\r\n * "+e}).join("")),e.ExitStatus.Success;for(var r=0,n=t;r<n.length;r++){var i=n[r];l.deleteFile(i)}return e.ExitStatus.Success},resetBuildContext:function(t){void 0===t&&(t=m),x=d(D=t),S.clear(),T.clear(),C.clear(),E.clear(),g=void 0,w.clear(),O.clear(),M.clear(),L.clear(),R.length=0,B=0,P&&(clearTimeout(P),P=void 0),j=!1,e.clearMap(q,function(t){return e.clearMap(t,e.closeFileWatcherOf)}),e.clearMap(W,function(t){return e.clearMap(t,e.closeFileWatcher)}),e.clearMap(H,e.closeFileWatcher),I.clear()},getBuildGraph:ne,invalidateProject:function(e,t){se(ye(e),t)},buildInvalidatedProject:le,resolveProjectName:ye,startWatching:function(){for(var e=0,t=ie().buildQueue;e<t.length;e++){var r=t[e];$(r);var n=Y(r);n&&(Z(r,n),ee(r,n))}}};function G(t){return e.toPath(t,h,v)}function Y(t){var r,n=S.getValue(t);if(n)return n.options?n:void 0;b.onUnRecoverableConfigFileDiagnostic=function(e){return r=e};var i=e.getParsedCommandLineOfConfigFile(t,x,b);return b.onUnRecoverableConfigFileDiagnostic=e.noop,S.setValue(t,i||r),i}function X(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];l.reportSolutionBuilderStatus(e.createCompilerDiagnostic.apply(void 0,[t].concat(r)))}function Q(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];y.onWatchStatusChange&&y.onWatchStatusChange(e.createCompilerDiagnostic.apply(void 0,[t].concat(r)),l.getNewLine(),x)}function $(t){D.watch&&!H.hasKey(t)&&H.setValue(t,z(y,t,function(){re(t,e.ConfigFileProgramReloadLevel.Full)},e.PollingInterval.High,"Config file",t))}function Z(t,r){D.watch&&e.updateWatchingWildcardDirectories(s(q,t),e.createMapFromTemplate(r.configFileSpecs.wildcardDirectories),function(n,i){return U(y,n,function(i){var a=G(i);a===G(n)||!e.hasExtension(a)||e.isSupportedSourceFileName(i,r.options)?function(t,r){if(r.options.noEmit)return!1;if(!e.fileExtensionIs(t,".d.ts")&&(e.fileExtensionIs(t,".ts")||e.fileExtensionIs(t,".tsx")))return!1;var n=r.options.outFile||r.options.out;return!(!n||!te(t,n)&&!te(t,e.removeFileExtension(n)+".d.ts"))||(!(!r.options.declarationDir||!e.containsPath(r.options.declarationDir,t,h,!l.useCaseSensitiveFileNames()))||(!(!r.options.outDir||!e.containsPath(r.options.outDir,t,h,!l.useCaseSensitiveFileNames()))||!e.forEach(r.fileNames,function(e){return te(t,e)})))}(i,r)?V(i+" is output file"):re(t,e.ConfigFileProgramReloadLevel.Partial):V("Project: "+t+" Detected file add/remove of non supported extension: "+i)},i,"Wild card directory",t)})}function ee(t,r){D.watch&&e.mutateMap(s(W,t),e.arrayToMap(r.fileNames,G),{createNewValue:function(r,n){return K(y,n,function(){return re(t,e.ConfigFileProgramReloadLevel.None)},e.PollingInterval.Low,r,"Source file",t)},onDeleteValue:e.closeFileWatcher})}function te(t,r){return 0===e.comparePaths(t,r,h,!l.useCaseSensitiveFileNames())}function re(e,t){j=!0,se(e,t),ue()}function ne(t){return function(t){for(var r=a(G),n=a(G),i=[],s=[],c=a(G),u=0,l=t;u<l.length;u++){var _=l[u];d(_)}return{buildQueue:s,referencingProjectsMap:c};function d(t,u){if(!n.hasKey(t))if(r.hasKey(t))u||X(e.Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,i.join("\r\n"));else{r.setValue(t,!0),i.push(t);var l=Y(t);if(l&&l.projectReferences)for(var _=0,p=l.projectReferences;_<p.length;_++){var f=p[_],m=ye(f.path);d(m,u||f.circular);var g=o(c,m,function(){return a(G)});g.setValue(t,!!f.prepend)}i.pop(),n.setValue(t,!0),s.push(t)}}}(function(e){return e.map(ye)}(t))}function ie(){return g||(g=ne(_))}function ae(t){if(void 0===t)return{type:r.Unbuildable,reason:"File deleted mid-build"};var a=C.getValue(t.options.configFilePath);if(void 0!==a)return a;var o=function(t){for(var a=void 0,o=n,s=0,_=t.fileNames;s<_.length;s++){var d=_[s];if(!l.fileExists(d))return{type:r.Unbuildable,reason:d+" does not exist"};var p=l.getModifiedTime(d)||e.missingFileModifiedTime;p>o&&(a=d,o=p)}if(!t.fileNames.length&&!e.canJsonReportNoInutFiles(t.raw))return{type:r.ContainerOnly};for(var f,m=e.getAllProjectOutputs(t,!l.useCaseSensitiveFileNames()),g="(none)",y=i,h="(none)",v=n,b=n,D=!1,x=0,S=m;x<S.length;x++){var E=S[x];if(!l.fileExists(E)){f=E;break}var k=l.getModifiedTime(E)||e.missingFileModifiedTime;if(k<y&&(y=k,g=E),k<o){D=!0;break}if(k>v&&(v=k,h=E),u(E)){var A=T.getValue(E);if(void 0!==A)b=c(A,b);else{var F=l.getModifiedTime(E)||e.missingFileModifiedTime;b=c(b,F)}}}var P,I=!1,O=!1;if(t.projectReferences){C.setValue(t.options.configFilePath,{type:r.ComputingUpstream});for(var M=0,L=t.projectReferences;M<L.length;M++){var R=L[M];O=O||!!R.prepend;var B=e.resolveProjectReferencePath(R),j=ae(Y(B));if(j.type!==r.ComputingUpstream){if(j.type===r.Unbuildable)return{type:r.UpstreamBlocked,upstreamProjectName:R.path};if(j.type!==r.UpToDate)return{type:r.UpstreamOutOfDate,upstreamProjectName:R.path};if(!f){if(j.newestInputFileTime&&j.newestInputFileTime<=y)continue;if(j.newestDeclarationFileContentChangedTime&&j.newestDeclarationFileContentChangedTime<=y){I=!0,P=R.path;continue}return e.Debug.assert(void 0!==g,"Should have an oldest output filename here"),{type:r.OutOfDateWithUpstream,outOfDateOutputFileName:g,newerProjectName:R.path}}}}}if(void 0!==f)return{type:r.OutputMissing,missingOutputFileName:f};if(D)return{type:r.OutOfDateWithSelf,outOfDateOutputFileName:g,newerInputFileName:a};var J=oe(t.options.configFilePath,y,g);if(J)return J;var z=e.forEach(t.options.configFile.extendedSourceFiles||e.emptyArray,function(e){return oe(e,y,g)});if(z)return z;if(!w.hasKey(t.options.configFilePath)){w.setValue(t.options.configFilePath,!0);var K=e.getOutputPathForBuildInfo(t.options);if(K){var U=N(K),V=U&&e.getBuildInfo(U);if(V&&V.version!==e.version)return{type:r.TsVersionOutputOfDate,version:V.version}}}return O&&I?{type:r.OutOfDateWithPrepend,outOfDateOutputFileName:g,newerProjectName:P}:{type:I?r.UpToDateWithUpstreamTypes:r.UpToDate,newestDeclarationFileContentChangedTime:b,newestInputFileTime:o,newestOutputFileTime:v,newestInputFileName:a,newestOutputFileName:h,oldestOutputFileName:g}}(t);return C.setValue(t.options.configFilePath,o),o}function oe(t,n,i){if(n<(l.getModifiedTime(t)||e.missingFileModifiedTime))return{type:r.OutOfDateWithSelf,outOfDateOutputFileName:i,newerInputFileName:t}}function se(t,r){r===e.ConfigFileProgramReloadLevel.Full&&(S.removeKey(t),g=void 0),C.removeKey(t),O.removeKey(t),ce(t,r)}function ce(t,r){var n=M.getValue(t);void 0===n?(M.setValue(t,r||e.ConfigFileProgramReloadLevel.None),R.push(t)):n<(r||e.ConfigFileProgramReloadLevel.None)&&M.setValue(t,r||e.ConfigFileProgramReloadLevel.None)}function ue(){y.setTimeout&&y.clearTimeout&&(P&&y.clearTimeout(P),P=y.setTimeout(le,250))}function le(){P=void 0,j&&(j=!1,L.clear(),Q(e.Diagnostics.File_change_detected_Starting_incremental_compilation));var n=function(){if(B<R.length){var e=R[B];B++;var t=M.getValue(e);return M.removeKey(e),M.getSize()||(R.length=0,B=0),{project:e,reloadLevel:t}}}();n&&(function(n,i){var a=Y(n);if(a){if(i===e.ConfigFileProgramReloadLevel.Full)$(n),Z(n,a),ee(n,a);else if(i===e.ConfigFileProgramReloadLevel.Partial){var o=e.getFileNamesFromConfigSpecs(a.configFileSpecs,e.getDirectoryPath(n),a.options,b);e.updateErrorForNoInputFiles(o,n,a.configFileSpecs,a.errors,e.canJsonReportNoInutFiles(a.raw)),a.fileNames=o.fileNames,ee(n,a)}var s=ae(a);if(Se(n,s),s.type!==r.UpstreamBlocked)if(s.type!==r.UpToDateWithUpstreamTypes){var c=he(s,n)?de(n):fe(n);if(!(c&t.AnyErrors)){var u=ie(),l=u.referencingProjectsMap,_=u.buildQueue,d=l.getValue(n);if(d)for(var p=_.indexOf(n)+1;p<_.length;p++){var f=_[p],m=d.getValue(f);if(void 0!==m){var g=C.getValue(f);c&t.DeclarationOutputUnchanged?g&&g.type===r.UpToDate&&(m?C.setValue(f,{type:r.OutOfDateWithPrepend,outOfDateOutputFileName:g.oldestOutputFileName,newerProjectName:n}):g.type=r.UpToDateWithUpstreamTypes):!g||g.type!==r.UpToDate&&g.type!==r.UpToDateWithUpstreamTypes&&g.type!==r.OutOfDateWithPrepend||C.setValue(f,{type:r.OutOfDateWithUpstream,outOfDateOutputFileName:g.type===r.OutOfDateWithPrepend?g.outOfDateOutputFileName:g.oldestOutputFileName,newerProjectName:n}),ce(f)}}}}else me(a);else D.verbose&&X(e.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,n,s.upstreamProjectName)}else ve(n)}(n.project,n.reloadLevel),M.getSize()?D.watch&&!P&&ue():_e())}function _e(){if(D.watch||l.reportErrorSummary){ie().buildQueue.forEach(function(t){L.hasKey(t)||De(O.getValue(t)||e.emptyArray)});var t=0;O.forEach(function(r){return t+=e.getErrorCountForSummary(r)}),D.watch?Q(e.getWatchErrorSummaryDiagnosticMessage(t),t):l.reportErrorSummary(t)}}function de(o){if(D.dry)return X(e.Diagnostics.A_non_dry_build_would_build_project_0,o),t.Success;D.verbose&&X(e.Diagnostics.Building_project_0,o);var s=t.DeclarationOutputUnchanged,_=Y(o);if(!_)return s|=t.ConfigFileErrors,ve(o),C.setValue(o,{type:r.Unbuildable,reason:"Config file errors"}),s;if(0===_.fileNames.length)return be(o,_.errors),t.None;A=_.options;var d=l.createProgram(_.fileNames,_.options,F,function(t,r){if(!D.force){var n=I.getValue(t);return n||e.readBuilderProgram(r.options,N)}}(o,_),_.errors,_.projectReferences),p=d.getConfigFileParsingDiagnostics().concat(d.getOptionsDiagnostics(),d.getGlobalDiagnostics(),d.getSyntacticDiagnostics());if(p.length)return P(p,t.SyntaxErrors,"Syntactic");var f=d.getSemanticDiagnostics();if(f.length)return P(f,t.TypeErrors,"Semantic");d.backupState();var m,g=n,y=!1,h=[];if(e.emitFilesAndReportErrors(d,function(e){return(m||(m=[])).push(e)},k,void 0,function(e,t,r){return h.push({name:e,text:t,writeByteOrderMark:r})}),m)return d.restoreState(),P(m,t.DeclarationEmitErrors,"Declaration file");var v=e.createDiagnosticCollection(),b=a(G);h.forEach(function(r){var n,i=r.name,a=r.text,o=r.writeByteOrderMark;!y&&u(i)&&(l.fileExists(i)&&N(i)===a?n=l.getModifiedTime(i):(s&=~t.DeclarationOutputUnchanged,y=!0)),b.setValue(i,!0),e.writeFile(F,v,i,a,o),void 0!==n&&(g=c(n,g),T.setValue(i,n))});var S=v.getDiagnostics();if(S.length)return P(S,t.EmitErrors,"Emit");g=ge(_,g,e.Diagnostics.Updating_unchanged_output_timestamps_of_project_0,b);var E={type:r.UpToDate,newestDeclarationFileContentChangedTime:y?i:g,oldestOutputFileName:h.length?h[0].name:e.getFirstProjectOutput(_,!l.useCaseSensitiveFileNames())};return O.removeKey(o),C.setValue(o,E),pe(o,d),A=x,s;function P(e,t,n){return s|=t,be(o,e),C.setValue(o,{type:r.Unbuildable,reason:n+" errors"}),pe(o,d),A=x,s}}function pe(e,t){l.afterProgramEmitAndDiagnostics&&l.afterProgramEmitAndDiagnostics(t),D.watch&&(t.releaseProgram(),I.setValue(e,t))}function fe(i){if(D.dry)return X(e.Diagnostics.A_non_dry_build_would_update_output_of_project_0,i),t.Success;D.verbose&&X(e.Diagnostics.Updating_output_of_project_0,i);var o=e.Debug.assertDefined(Y(i));A=o.options;var s=e.emitUsingBuildInfo(o,F,function(e){return Y(ye(e.path))});if(e.isString(s))return X(e.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1,i,xe(s)),de(i);e.Debug.assert(!!s.length);var c=e.createDiagnosticCollection(),u=a(G);s.forEach(function(t){var r=t.name,n=t.text,i=t.writeByteOrderMark;u.setValue(r,!0),e.writeFile(F,c,r,n,i)});var l=c.getDiagnostics();if(l.length)return be(i,l),C.setValue(i,{type:r.Unbuildable,reason:"Emit errors"}),A=x,t.DeclarationOutputUnchanged|t.EmitErrors;var _=ge(o,n,e.Diagnostics.Updating_unchanged_output_timestamps_of_project_0,u),d={type:r.UpToDate,newestDeclarationFileContentChangedTime:_,oldestOutputFileName:s[0].name};return O.removeKey(i),C.setValue(i,d),A=x,t.DeclarationOutputUnchanged}function me(t){if(D.dry)return X(e.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0,t.options.configFilePath);var i=ge(t,n,e.Diagnostics.Updating_output_timestamps_of_project_0),a={type:r.UpToDate,newestDeclarationFileContentChangedTime:i,oldestOutputFileName:e.getFirstProjectOutput(t,!l.useCaseSensitiveFileNames())};C.setValue(t.options.configFilePath,a)}function ge(t,r,n,i){var a=e.getAllProjectOutputs(t,!l.useCaseSensitiveFileNames());if(!i||a.length!==i.getSize()){D.verbose&&X(n,t.options.configFilePath);for(var o=l.now?l.now():new Date,s=0,_=a;s<_.length;s++){var d=_[s];i&&i.hasKey(d)||(u(d)&&(r=c(r,l.getModifiedTime(d)||e.missingFileModifiedTime)),l.setModifiedTime(d,o),t.options.listEmittedFiles&&k("TSFILE: "+d))}}return r}function ye(t){return p(e.resolvePath(l.getCurrentDirectory(),t))}function he(t,n){if(t.type!==r.OutOfDateWithPrepend||D.force)return!0;var i=Y(n);return!i||0===i.fileNames.length||!!i.errors.length||!e.isIncrementalCompilation(i.options)}function ve(e){be(e,[S.getValue(e)])}function be(e,t){De(t),L.setValue(e,!0),O.setValue(e,t)}function De(e){e.forEach(function(e){return l.reportDiagnostic(e)})}function xe(t){return e.convertToRelativePath(t,l.getCurrentDirectory(),function(e){return F.getCanonicalFileName(e)})}function Se(e,t){if(D.verbose)return f(e,t,xe,X)}},e.resolveConfigFileProjectName=p,e.formatUpToDateStatus=f}(c||(c={})),function(e){function t(e,t){return i(e,t,(r=[],n=[],function(e,t,i,a){if(-1!==r.indexOf(e)||n.length>4)return a(-1!==r.indexOf(e),n);r.push(e),n.push(t);var o=i();return n.pop(),r.pop(),o}));var r,n}function i(t,r,n){return n(r,t,function(){if("function"==typeof r)return function(t,r,n){var a=function(t,r){var n=t.prototype;return"object"!==f(n)||null===n?e.emptyArray:e.mapDefined(c(n),function(e){var t=e.key,n=e.value;return"constructor"===t?void 0:i(t,n,r)})}(t,n),o=e.flatMap(c(t),function(e){var t=e.key,r=e.value;return i(t,r,n)}),s=e.cast(Function.prototype.toString.call(t),e.isString),l=e.stringContains(s,"{ [native code] }")?function(t){return e.tryCast(u(t,"length"),e.isNumber)||0}(t):s;return{kind:2,name:r,source:l,namespaceMembers:o,prototypeMembers:a}}(r,t,n);if("object"===f(r)){var o=function(t,r,n){return e.isArray(r)?{name:t,kind:1,inner:r.length&&i("element",e.first(r),n)||_(t)}:e.forEachEntry(a(),function(e,n){return r instanceof e?{kind:0,name:t,typeName:n}:void 0})}(t,r,n);if(void 0!==o)return o;var s=c(r),d=Object.getPrototypeOf(r)!==Object.prototype,p=e.flatMap(s,function(e){return i(e.key,e.value,n)});return{kind:3,name:t,hasNontrivialPrototype:d,members:p}}return{kind:0,name:t,typeName:l(r)?"any":f(r)}},function(e,r){return _(t," "+(e?"Circular reference":"Too-deep object hierarchy")+" from "+r.join("."))})}!function(e){e[e.Const=0]="Const",e[e.Array=1]="Array",e[e.FunctionOrClass=2]="FunctionOrClass",e[e.Object=3]="Object"}(e.ValueKind||(e.ValueKind={})),e.inspectModule=function(r){return t(e.removeFileExtension(e.getBaseFileName(r)),function(e){try{return n()}catch(e){return}}())},e.inspectValue=t;var a=e.memoize(function(){for(var t=e.createMap(),n=0,i=c(r);n<i.length;n++){var a=i[n],o=a.key,s=a.value;"function"==typeof s&&"object"===f(s.prototype)&&s!==Object&&t.set(o,s)}return t});var o=["arguments","caller","constructor","eval","super_"],s=Object.getOwnPropertyNames(e.noop);function c(t){for(var r=e.createMap(),n=[],i=t;!l(i)&&i!==Object.prototype&&i!==Function.prototype;){for(var a=0,c=Object.getOwnPropertyNames(i);a<c.length;a++){var _=c[a];if(!d(_)&&-1===o.indexOf(_)&&("function"!=typeof t||-1===s.indexOf(_))&&e.addToSeen(r,_)){var p=u(i,_);"toString"===_&&"function"==typeof p&&0===p.length||n.push({key:_,value:p})}}i=Object.getPrototypeOf(i)}return n.sort(function(t,r){return e.compareStringsCaseSensitive(t.key,r.key)})}function u(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return r&&r.value}function l(e){return null==e}function _(e,t){return{kind:0,name:e,typeName:"any",comment:t}}function d(t){return e.startsWith(t,"_")}e.isJsPrivate=d}(c||(c={})),function(e){!function(t){t.ActionSet="action::set",t.ActionInvalidate="action::invalidate",t.ActionPackageInstalled="action::packageInstalled",t.ActionValueInspected="action::valueInspected",t.EventTypesRegistry="event::typesRegistry",t.EventBeginInstallTypes="event::beginInstallTypes",t.EventEndInstallTypes="event::endInstallTypes",t.EventInitializationFailed="event::initializationFailed",function(e){e.GlobalCacheLocation="--globalTypingsCacheLocation",e.LogFile="--logFile",e.EnableTelemetry="--enableTelemetry",e.TypingSafeListLocation="--typingSafeListLocation",e.TypesMapLocation="--typesMapLocation",e.NpmLocation="--npmLocation"}(t.Arguments||(t.Arguments={})),t.hasArgument=function(t){return e.sys.args.indexOf(t)>=0},t.findArgument=function(t){var r=e.sys.args.indexOf(t);return r>=0&&r<e.sys.args.length-1?e.sys.args[r+1]:void 0},t.nowString=function(){var e=new Date;return e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()+"."+e.getMilliseconds()}}(e.server||(e.server={}))}(c||(c={})),function(e){!function(t){function r(t,r){return new e.Version(e.getProperty(r,"ts"+e.versionMajorMinor)||e.getProperty(r,"latest")).compareTo(t.version)<=0}t.isTypingUpToDate=r,t.nodeCoreModuleList=["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","http2","inspector","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"],t.nodeCoreModules=e.arrayToSet(t.nodeCoreModuleList),t.loadSafeList=function(t,r){var n=e.readConfigFile(r,function(e){return t.readFile(e)});return e.createMapFromTemplate(n.config)},t.loadTypesMap=function(t,r){var n=e.readConfigFile(r,function(e){return t.readFile(e)});if(n.config)return e.createMapFromTemplate(n.config.simpleMap)},t.discoverTypings=function(n,i,a,o,s,c,u,l,_){if(!u||!u.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};var d=e.createMap();a=e.mapDefined(a,function(t){var r=e.normalizePath(t);if(e.hasJSFileExtension(r))return r});var p=[];u.include&&S(u.include,"Explicitly included types");var f=u.exclude||[],m=e.arrayToSet(a,e.getDirectoryPath);m.set(o,!0),m.forEach(function(t,r){T(e.combinePaths(r,"package.json"),p),T(e.combinePaths(r,"bower.json"),p),C(e.combinePaths(r,"bower_components"),p),C(e.combinePaths(r,"node_modules"),p)}),function(t){var r=e.mapDefined(t,function(t){if(e.hasJSFileExtension(t)){var r=e.removeFileExtension(e.getBaseFileName(t.toLowerCase())),n=e.removeMinAndVersionNumbers(r);return s.get(n)}});r.length&&S(r,"Inferred typings from file names"),e.some(t,function(t){return e.fileExtensionIs(t,".jsx")})&&(i&&i("Inferred 'react' typings due to presence of '.jsx' extension"),x("react"))}(a),l&&S(e.deduplicate(l.map(function(e){return t.nodeCoreModules.has(e)?"node":e}),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive),"Inferred typings from unresolved imports"),c.forEach(function(e,t){var n=_.get(t);d.has(t)&&void 0===d.get(t)&&void 0!==n&&r(e,n)&&d.set(t,e.typingLocation)});for(var g=0,y=f;g<y.length;g++){var h=y[g];d.delete(h)&&i&&i("Typing for "+h+" is in exclude list, will be ignored.")}var v=[],b=[];d.forEach(function(e,t){void 0!==e?b.push(e):v.push(t)});var D={cachedTypingPaths:b,newTypingNames:v,filesToWatch:p};return i&&i("Result: "+JSON.stringify(D)),D;function x(e){d.has(e)||d.set(e,void 0)}function S(t,r){i&&i(r+": "+JSON.stringify(t)),e.forEach(t,x)}function T(t,r){if(n.fileExists(t)){r.push(t);var i=e.readConfigFile(t,function(e){return n.readFile(e)}).config;S(e.flatMap([i.dependencies,i.devDependencies,i.optionalDependencies,i.peerDependencies],e.getOwnKeys),"Typing names in '"+t+"' dependencies")}}function C(t,r){if(r.push(t),n.directoryExists(t)){var a=n.readDirectory(t,[".json"],void 0,void 0,2);i&&i("Searching for typing names in "+t+"; all files: "+JSON.stringify(a));for(var o=[],s=0,c=a;s<c.length;s++){var u=c[s],l=e.normalizePath(u),_=e.getBaseFileName(l);if("package.json"===_||"bower.json"===_){var p=e.readConfigFile(l,function(e){return n.readFile(e)}).config;if(("package.json"!==_||!p._requiredBy||0!==e.filter(p._requiredBy,function(e){return"#"===e[0]||"/"===e}).length)&&p.name){var f=p.types||p.typings;if(f){var m=e.getNormalizedAbsolutePath(f,e.getDirectoryPath(l));i&&i(" Package '"+p.name+"' provides its own types."),d.set(p.name,m)}else o.push(p.name)}}}S(o," Found package names")}}},function(e){e[e.Ok=0]="Ok",e[e.ScopedPackagesNotSupported=1]="ScopedPackagesNotSupported",e[e.EmptyName=2]="EmptyName",e[e.NameTooLong=3]="NameTooLong",e[e.NameStartsWithDot=4]="NameStartsWithDot",e[e.NameStartsWithUnderscore=5]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=6]="NameContainsNonURISafeCharacters"}(t.PackageNameValidationResult||(t.PackageNameValidationResult={}));var n=214;t.validatePackageName=function(e){return e?e.length>n?3:46===e.charCodeAt(0)?4:95===e.charCodeAt(0)?5:/^@[^/]+\/[^/]+$/.test(e)?1:encodeURIComponent(e)!==e?6:0:2},t.renderPackageNameValidationFailure=function(t,r){switch(t){case 2:return"Package name '"+r+"' cannot be empty";case 3:return"Package name '"+r+"' should be less than "+n+" characters";case 4:return"Package name '"+r+"' cannot start with '.'";case 5:return"Package name '"+r+"' cannot start with '_'";case 1:return"Package '"+r+"' is scoped and currently is not supported";case 6:return"Package name '"+r+"' contains non URI safe characters";case 0:return e.Debug.fail();default:throw e.Debug.assertNever(t)}}}(e.JsTyping||(e.JsTyping={}))}(c||(c={})),function(e){var t;function r(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:t.Smart,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1}}!function(e){var t=function(){function e(e){this.text=e}return e.prototype.getText=function(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)},e.prototype.getLength=function(){return this.text.length},e.prototype.getChangeRange=function(){},e}();e.fromString=function(e){return new t(e)}}(e.ScriptSnapshot||(e.ScriptSnapshot={})),e.emptyOptions={},function(e){e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference"}(e.HighlightSpanKind||(e.HighlightSpanKind={})),function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(t=e.IndentStyle||(e.IndentStyle={})),e.getDefaultFormatCodeSettings=r,e.testFormatSettings=r("\n"),function(e){e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={})),function(e){e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports"}(e.OutliningSpanKind||(e.OutliningSpanKind={})),function(e){e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration"}(e.OutputFileType||(e.OutputFileType={})),function(e){e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition"}(e.EndOfLineState||(e.EndOfLineState={})),function(e){e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral"}(e.TokenClass||(e.TokenClass={})),function(e){e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string"}(e.ScriptElementKind||(e.ScriptElementKind={})),function(e){e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json"}(e.ScriptElementKindModifier||(e.ScriptElementKindModifier={})),function(e){e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value"}(e.ClassificationTypeNames||(e.ClassificationTypeNames={})),function(e){e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral"}(e.ClassificationType||(e.ClassificationType={}))}(c||(c={})),function(e){function t(t){switch(t.kind){case 237:return e.isInJSFile(t)&&e.getJSDocEnumTag(t)?7:1;case 151:case 186:case 154:case 153:case 275:case 276:case 156:case 155:case 157:case 158:case 159:case 239:case 196:case 197:case 274:case 267:return 1;case 150:case 241:case 242:case 168:return 2;case 309:return void 0===t.name?3:2;case 278:case 240:return 3;case 244:return e.isAmbientModule(t)?5:1===e.getModuleInstanceState(t)?5:4;case 243:case 252:case 253:case 248:case 249:case 254:case 255:return 7;case 284:return 5}return 7}function r(t){for(;148===t.parent.kind;)t=t.parent;return e.isInternalModuleImportEqualsDeclaration(t.parent)&&t.parent.moduleReference===t}function n(e,t){var r=i(e);return!!r&&!!r.parent&&t(r.parent)&&r.parent.expression===r}function i(e){return s(e)?e.parent:e}function a(t){return 72===t.kind&&e.isBreakOrContinueStatement(t.parent)&&t.parent.label===t}function o(t){return 72===t.kind&&e.isLabeledStatement(t.parent)&&t.parent.label===t}function s(e){return e&&e.parent&&189===e.parent.kind&&e.parent.name===e}e.scanner=e.createScanner(7,!0),function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All"}(e.SemanticMeaning||(e.SemanticMeaning={})),e.getMeaningFromDeclaration=t,e.getMeaningFromLocation=function(n){return 284===n.kind?1:254===n.parent.kind||259===n.parent.kind?7:r(n)?function(t){var r=148===t.kind?t:e.isQualifiedName(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&248===r.parent.kind?7:4}(n):e.isDeclarationName(n)?t(n.parent):function(t){switch(e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),t.kind){case 100:return!e.isExpressionNode(t);case 178:return!0}switch(t.parent.kind){case 164:return!0;case 183:return!t.parent.isTypeOf;case 211:return!e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)}return!1}(n)?2:function(e){return function(e){var t=e,r=!0;if(148===t.parent.kind){for(;t.parent&&148===t.parent.kind;)t=t.parent;r=t.right===e}return 164===t.parent.kind&&!r}(e)||function(e){var t=e,r=!0;if(189===t.parent.kind){for(;t.parent&&189===t.parent.kind;)t=t.parent;r=t.name===e}if(!r&&211===t.parent.kind&&273===t.parent.parent.kind){var n=t.parent.parent.parent;return 240===n.kind&&109===t.parent.parent.token||241===n.kind&&86===t.parent.parent.token}return!1}(e)}(n)?4:e.isTypeParameterDeclaration(n.parent)?(e.Debug.assert(e.isJSDocTemplateTag(n.parent.parent)),2):e.isLiteralTypeNode(n.parent)?3:1},e.isInRightSideOfInternalImportEqualsDeclaration=r,e.isCallExpressionTarget=function(t){return n(t,e.isCallExpression)},e.isNewExpressionTarget=function(t){return n(t,e.isNewExpression)},e.isCallOrNewExpressionTarget=function(t){return n(t,e.isCallOrNewExpression)},e.climbPastPropertyAccess=i,e.getTargetLabel=function(e,t){for(;e;){if(233===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}},e.hasPropertyAccessExpressionWithName=function(t,r){return!!e.isPropertyAccessExpression(t.expression)&&t.expression.name.text===r},e.isJumpStatementTarget=a,e.isLabelOfLabeledStatement=o,e.isLabelName=function(e){return o(e)||a(e)},e.isTagName=function(t){return e.isJSDocTag(t.parent)&&t.parent.tagName===t},e.isRightSideOfQualifiedName=function(e){return 148===e.parent.kind&&e.parent.right===e},e.isRightSideOfPropertyAccess=s,e.isNameOfModuleDeclaration=function(e){return 244===e.parent.kind&&e.parent.name===e},e.isNameOfFunctionDeclaration=function(t){return 72===t.kind&&e.isFunctionLike(t.parent)&&t.parent.name===t},e.isLiteralNameOfPropertyDeclarationOrIndexAccess=function(t){switch(t.parent.kind){case 154:case 153:case 275:case 278:case 156:case 155:case 158:case 159:case 244:return e.getNameOfDeclaration(t.parent)===t;case 190:return t.parent.argumentExpression===t;case 149:return!0;case 182:return 180===t.parent.parent.kind;default:return!1}},e.isExpressionOfExternalModuleImportEqualsDeclaration=function(t){return e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t},e.getContainerNode=function(t){for(e.isJSDocTypeAlias(t)&&(t=t.parent.parent);;){if(!(t=t.parent))return;switch(t.kind){case 284:case 156:case 155:case 239:case 196:case 158:case 159:case 240:case 241:case 243:case 244:return t}}},e.getNodeKind=function t(r){switch(r.kind){case 284:return e.isExternalModule(r)?"module":"script";case 244:return"module";case 240:case 209:return"class";case 241:return"interface";case 242:case 302:case 309:return"type";case 243:return"enum";case 237:return o(r);case 186:return o(e.getRootDeclaration(r));case 197:case 239:case 196:return"function";case 158:return"getter";case 159:return"setter";case 156:case 155:return"method";case 154:case 153:return"property";case 162:return"index";case 161:return"construct";case 160:return"call";case 157:return"constructor";case 150:return"type parameter";case 278:return"enum member";case 151:return e.hasModifier(r,92)?"property":"parameter";case 248:case 253:case 257:case 251:return"alias";case 204:var n=e.getAssignmentDeclarationKind(r),i=r.right;switch(n){case 7:case 8:case 9:case 0:return"";case 1:case 2:var a=t(i);return""===a?"const":a;case 3:return e.isFunctionExpression(i)?"method":"property";case 4:return"property";case 5:return e.isFunctionExpression(i)?"method":"property";case 6:return"local class";default:return e.assertType(n),""}case 72:return e.isImportClause(r.parent)?"alias":"";default:return""}function o(t){return e.isVarConst(t)?"const":e.isLet(t)?"let":"var"}},e.isThis=function(t){switch(t.kind){case 100:return!0;case 72:return e.identifierIsThisKeyword(t)&&151===t.parent.kind;default:return!1}};var c=/^\/\/\/\s*</;function u(e,t){return _(e.pos,e.end,t)}function l(e,t){return e.pos<t&&t<e.end}function _(e,t,r){return e<=r.pos&&t>=r.end}function d(e,t,r,n){return Math.max(e,r)<Math.min(t,n)}function p(t,r,n){var i=t.getChildren(n);if(i.length){var a=e.last(i);if(a.kind===r)return!0;if(26===a.kind&&1!==i.length)return i[i.length-2].kind===r}return!1}function f(e,t,r){return!!m(e,t,r)}function m(t,r,n){return e.find(t.getChildren(n),function(e){return e.kind===r})}function g(t){var r=e.find(t.parent.getChildren(),function(r){return e.isSyntaxList(r)&&u(r,t)});return e.Debug.assert(!r||e.contains(r.getChildren(),t)),r}function y(e,t,r){return v(e,t,!1,r,!1)}function h(e,t){return v(e,t,!0,void 0,!1)}function v(e,t,r,n,i){var a=e;e:for(;;){for(var o=0,s=a.getChildren(e);o<s.length;o++){var c=s[o];if((r?c.getFullStart():c.getStart(e,!0))>t)break;var u=c.getEnd();if(t<u||t===u&&(1===c.kind||i)){a=c;continue e}if(n&&u===t){var l=b(t,e,c);if(l&&n(l))return l}}return a}}function b(t,r,n,i){var a=function a(o){if(D(o)&&1!==o.kind)return o;var s=o.getChildren(r);for(var c=0;c<s.length;c++){var u=s[c];if(t<u.end){var l=u.getStart(r,!i),_=l>=t||!A(u,r)||T(u);if(_){var d=S(s,c,r);return d&&x(d,r)}return a(u)}}e.Debug.assert(void 0!==n||284===o.kind||1===o.kind||e.isJSDocCommentContainingNode(o));var p=S(s,s.length,r);return p&&x(p,r)}(n||r);return e.Debug.assert(!(a&&T(a))),a}function D(t){return e.isToken(t)&&!T(t)}function x(e,t){if(D(e))return e;var r=e.getChildren(t),n=S(r,r.length,t);return n&&x(n,t)}function S(t,r,n){for(var i=r-1;i>=0;i--){if(T(t[i]))e.Debug.assert(i>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(A(t[i],n))return t[i]}}function T(t){return e.isJsxText(t)&&t.containsOnlyTriviaWhiteSpaces}function C(e,t,r){for(var n=e.kind,i=0;;){var a=b(e.getFullStart(),r);if(!a)return;if((e=a).kind===t){if(0===i)return e;i--}else e.kind===n&&i++}}function E(t,r,n){var i=n.getTypeAtLocation(t);return(e.isNewExpression(t.parent)?i.getConstructSignatures():i.getCallSignatures()).filter(function(e){return!!e.typeParameters&&e.typeParameters.length>=r})}function k(t,r){for(var n=t,i=0,a=0;n;){switch(n.kind){case 28:if(!(n=b(n.getFullStart(),r))||!e.isIdentifier(n))return;if(!i)return e.isDeclarationName(n)?void 0:{called:n,nTypeArguments:a};i--;break;case 48:i=3;break;case 47:i=2;break;case 30:i++;break;case 19:if(!(n=C(n,18,r)))return;break;case 21:if(!(n=C(n,20,r)))return;break;case 23:if(!(n=C(n,22,r)))return;break;case 27:a++;break;case 37:case 72:case 10:case 8:case 9:case 102:case 87:case 104:case 86:case 129:case 24:case 50:case 56:case 57:break;default:if(e.isTypeNode(n))break;return}n=b(n.getFullStart(),r)}}function N(t,r,n){return e.formatting.getRangeOfEnclosingComment(t,r,void 0,n)}function A(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function F(e,t,r){var n=N(e,t,void 0);return!!n&&r===c.test(e.text.substring(n.pos,n.end))}function P(e,t){return{span:e,newText:t}}function w(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function I(t,r,n,i){return e.createImportDeclaration(void 0,void 0,t||r?e.createImportClause(t,r&&r.length?e.createNamedImports(r):void 0):void 0,"string"==typeof n?O(n,i):n)}function O(t,r){return e.createLiteral(t,0===r)}function M(t,r){return e.isStringDoubleQuoted(t,r)?1:0}function L(t){return"default"!==t.escapedName?t.escapedName:e.firstDefined(t.declarations,function(t){var r=e.getNameOfDeclaration(t);return r&&72===r.kind?r.escapedText:void 0})}function R(t,r,n,i){var a=e.createMap();return function t(o){if(!(96&o.flags&&e.addToSeen(a,e.getSymbolId(o))))return;return e.firstDefined(o.declarations,function(a){return e.firstDefined(e.getAllSuperTypeNodes(a),function(a){var o=n.getTypeAtLocation(a),s=o&&o.symbol&&n.getPropertyOfType(o,r);return o&&s&&(e.firstDefined(n.getRootSymbols(s),i)||t(o.symbol))})})}(t)}function B(t,r,n){return e.textSpanContainsPosition(t,r.getStart(n))&&r.getEnd()<=e.textSpanEnd(t)}function j(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}e.getLineStartPositionForPosition=function(t,r){return e.getLineStarts(r)[r.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=u,e.rangeContainsRangeExclusive=function(e,t){return l(e,t.pos)&&l(e,t.end)},e.rangeContainsPosition=function(e,t){return e.pos<=t&&t<=e.end},e.rangeContainsPositionExclusive=l,e.startEndContainsRange=_,e.rangeContainsStartEnd=function(e,t,r){return e.pos<=t&&e.end>=r},e.rangeOverlapsWithStartEnd=function(e,t,r){return d(e.pos,e.end,t,r)},e.nodeOverlapsWithStartEnd=function(e,t,r,n){return d(e.getStart(t),e.end,r,n)},e.startEndOverlapsWithStartEnd=d,e.positionBelongsToNode=function(t,r,n){return e.Debug.assert(t.pos<=r),r<t.end||!function t(r,n){if(void 0===r||e.nodeIsMissing(r))return!1;switch(r.kind){case 240:case 241:case 243:case 188:case 184:case 168:case 218:case 245:case 246:case 252:case 256:return p(r,19,n);case 274:return t(r.block,n);case 192:if(!r.arguments)return!0;case 191:case 195:case 177:return p(r,21,n);case 165:case 166:return t(r.type,n);case 157:case 158:case 159:case 239:case 196:case 156:case 155:case 161:case 160:case 197:return r.body?t(r.body,n):r.type?t(r.type,n):f(r,21,n);case 244:return!!r.body&&t(r.body,n);case 222:return r.elseStatement?t(r.elseStatement,n):t(r.thenStatement,n);case 221:return t(r.expression,n)||f(r,26,n);case 187:case 185:case 190:case 149:case 170:return p(r,23,n);case 162:return r.type?t(r.type,n):f(r,23,n);case 271:case 272:return!1;case 225:case 226:case 227:case 224:return t(r.statement,n);case 223:return f(r,107,n)?p(r,21,n):t(r.statement,n);case 167:return t(r.exprName,n);case 199:case 198:case 200:case 207:case 208:var i=r;return t(i.expression,n);case 193:return t(r.template,n);case 206:var a=e.lastOrUndefined(r.templateSpans);return t(a,n);case 216:return e.nodeIsPresent(r.literal);case 255:case 249:return e.nodeIsPresent(r.moduleSpecifier);case 202:return t(r.operand,n);case 204:return t(r.right,n);case 205:return t(r.whenFalse,n);default:return!0}}(t,n)},e.findListItemInfo=function(t){var r=g(t);if(r){var n=r.getChildren();return{listItemIndex:e.indexOfNode(n,t),list:r}}},e.hasChildOfKind=f,e.findChildOfKind=m,e.findContainingList=g,e.getTouchingPropertyName=function(t,r){return y(t,r,function(t){return e.isPropertyNameLiteral(t)||e.isKeyword(t.kind)})},e.getTouchingToken=y,e.getTokenAtPosition=h,e.findTokenOnLeftOfPosition=function(t,r){var n=h(t,r);return e.isToken(n)&&r>n.getStart(t)&&r<n.getEnd()?n:b(r,t)},e.findNextToken=function(t,r,n){return function r(i){return e.isToken(i)&&i.pos===t.end?i:e.firstDefined(i.getChildren(),function(e){var i=e.pos<=t.pos&&e.end>t.end||e.pos===t.end;return i&&A(e,n)?r(e):void 0})}(r)},e.findPrecedingToken=b,e.isInString=function(t,r,n){if(void 0===n&&(n=b(r,t)),n&&e.isStringTextContainingNode(n)){var i=n.getStart(t),a=n.getEnd();if(i<r&&r<a)return!0;if(r===a)return!!n.isUnterminated}return!1},e.isInsideJsxElementOrAttribute=function(e,t){var r=h(e,t);return!!r&&(11===r.kind||28===r.kind&&11===r.parent.kind||28===r.kind&&270===r.parent.kind||!(!r||19!==r.kind||270!==r.parent.kind)||28===r.kind&&263===r.parent.kind)},e.isInTemplateString=function(t,r){var n=h(t,r);return e.isTemplateLiteralKind(n.kind)&&r>n.getStart(t)},e.isInJSXText=function(t,r){var n=h(t,r);return!!e.isJsxText(n)||!(18!==n.kind||!e.isJsxExpression(n.parent)||!e.isJsxElement(n.parent.parent))||!(28!==n.kind||!e.isJsxOpeningLikeElement(n.parent)||!e.isJsxElement(n.parent.parent))},e.findPrecedingMatchingToken=C,e.isPossiblyTypeArgumentPosition=function t(r,n,i){var a=k(r,n);return void 0!==a&&(e.isPartOfTypeNode(a.called)||0!==E(a.called,a.nTypeArguments,i).length||t(a.called,n,i))},e.getPossibleGenericSignatures=E,e.getPossibleTypeArgumentsInfo=k,e.isInComment=N,e.hasDocComment=function(t,r){var n=h(t,r);return!!e.findAncestor(n,e.isJSDoc)},e.getNodeModifiers=function(t){var r=e.isDeclaration(t)?e.getCombinedModifierFlags(t):0,n=[];return 8&r&&n.push("private"),16&r&&n.push("protected"),4&r&&n.push("public"),32&r&&n.push("static"),128&r&&n.push("abstract"),1&r&&n.push("export"),4194304&t.flags&&n.push("declare"),n.length>0?n.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 164===t.kind||191===t.kind?t.typeArguments:e.isFunctionLike(t)||240===t.kind||241===t.kind?t.typeParameters:void 0},e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(10!==t&&13!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 18<=e&&e<=71},e.isInsideTemplateLiteral=function(t,r,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart(n)<r&&r<t.end||!!t.isUnterminated&&r===t.end},e.isAccessibilityModifier=function(e){switch(e){case 115:case 113:case 114:return!0}return!1},e.cloneCompilerOptions=function(t){var r=e.clone(t);return e.setConfigFileInOptions(r,t&&t.configFile),r},e.isArrayLiteralOrObjectLiteralDestructuringPattern=function e(t){if(187===t.kind||188===t.kind){if(204===t.parent.kind&&t.parent.left===t&&59===t.parent.operatorToken.kind)return!0;if(227===t.parent.kind&&t.parent.initializer===t)return!0;if(e(275===t.parent.kind?t.parent.parent:t.parent))return!0}return!1},e.isInReferenceComment=function(e,t){return F(e,t,!0)},e.isInNonReferenceComment=function(e,t){return F(e,t,!1)},e.createTextSpanFromNode=function(t,r){return e.createTextSpanFromBounds(t.getStart(r),t.getEnd())},e.createTextRangeFromNode=function(t,r){return e.createRange(t.getStart(r),t.end)},e.createTextSpanFromRange=function(t){return e.createTextSpanFromBounds(t.pos,t.end)},e.createTextRangeFromSpan=function(t){return e.createRange(t.start,t.start+t.length)},e.createTextChangeFromStartLength=function(t,r,n){return P(e.createTextSpan(t,r),n)},e.createTextChange=P,e.typeKeywords=[120,146,123,87,129,132,96,135,136,138,139,102,106,141,142,143],e.isTypeKeyword=function(t){return e.contains(e.typeKeywords,t)},e.isExternalModuleSymbol=function(e){return!!(1536&e.flags)&&34===e.name.charCodeAt(0)},e.nodeSeenTracker=function(){var t=[];return function(r){var n=e.getNodeId(r);return!t[n]&&(t[n]=!0)}},e.getSnapshotText=function(e){return e.getText(0,e.getLength())},e.repeatString=function(e,t){for(var r="",n=0;n<t;n++)r+=e;return r},e.skipConstraint=function(e){return e.isTypeParameter()&&e.getConstraint()||e},e.getNameFromPropertyName=function(t){return 149===t.kind?e.isStringOrNumericLiteralLike(t.expression)?t.expression.text:void 0:e.getTextOfIdentifierOrLiteral(t)},e.programContainsEs6Modules=function(e){return e.getSourceFiles().some(function(t){return!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator})},e.compilerOptionsIndicateEs6Modules=function(e){return!!e.module||e.target>=2||!!e.noEmit},e.hostUsesCaseSensitiveFileNames=w,e.hostGetCanonicalFileName=function(t){return e.createGetCanonicalFileName(w(t))},e.makeImportIfNecessary=function(e,t,r,n){return e||t&&t.length?I(e,t,r,n):void 0},e.makeImport=I,e.makeStringLiteral=O,function(e){e[e.Single=0]="Single",e[e.Double=1]="Double"}(e.QuotePreference||(e.QuotePreference={})),e.quotePreferenceFromString=M,e.getQuotePreference=function(t,r){if(r.quotePreference&&"auto"!==r.quotePreference)return"single"===r.quotePreference?0:1;var n=t.imports&&e.find(t.imports,e.isStringLiteral);return n?M(n,t):1},e.getQuoteFromPreference=function(t){switch(t){case 0:return"'";case 1:return'"';default:return e.Debug.assertNever(t)}},e.symbolNameNoDefault=function(t){var r=L(t);return void 0===r?void 0:e.unescapeLeadingUnderscores(r)},e.symbolEscapedNameNoDefault=L,e.isObjectBindingElementWithoutPropertyName=function(t){return e.isBindingElement(t)&&e.isObjectBindingPattern(t.parent)&&e.isIdentifier(t.name)&&!t.propertyName},e.getPropertySymbolFromBindingElement=function(e,t){var r=e.getTypeAtLocation(t.parent);return r&&e.getPropertyOfType(r,t.name.text)},e.getPropertySymbolsFromBaseTypes=R,e.isMemberSymbolInBaseType=function(e,t){return R(e.parent,e.name,t,function(e){return!0})||!1},e.getParentNodeInSpan=function(t,r,n){if(t)for(;t.parent;){if(e.isSourceFile(t.parent)||!B(n,t.parent,r))return t;t=t.parent}},e.findModifier=function(t,r){return t.modifiers&&e.find(t.modifiers,function(e){return e.kind===r})},e.insertImport=function(t,r,n){var i=e.findLast(r.statements,e.isAnyImportSyntax);i?t.insertNodeAfter(r,i,n):t.insertNodeAtTopOfFile(r,n,!0)},e.textSpansEqual=j,e.documentSpansEqual=function(e,t){return e.fileName===t.fileName&&j(e.textSpan,t.textSpan)}}(c||(c={})),function(e){function t(e){return e.declarations&&e.declarations.length>0&&151===e.declarations[0].kind}e.isFirstDeclarationOfSymbolParameter=t;var r=function(){var t,r,a,o,s=10*e.defaultMaximumTruncationLength;d();var u=function(t){return _(t,e.SymbolDisplayPartKind.text)};return{displayParts:function(){var r=t.length&&t[t.length-1].text;return o>s&&r&&"..."!==r&&(e.isWhiteSpaceLike(r.charCodeAt(r.length-1))||t.push(i(" ",e.SymbolDisplayPartKind.space)),t.push(i("...",e.SymbolDisplayPartKind.punctuation))),t},writeKeyword:function(t){return _(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return _(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeTrailingSemicolon:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return _(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return _(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return _(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,r){if(o>s)return;l(),o+=e.length,t.push(n(e,r))},writeLine:function(){if(o>s)return;o+=1,t.push(c()),r=!0},write:u,writeComment:u,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return a},increaseIndent:function(){a++},decreaseIndent:function(){a--},clear:d,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function l(){if(!(o>s)&&r){var n=e.getIndentString(a);n&&(o+=n.length,t.push(i(n,e.SymbolDisplayPartKind.space))),r=!1}}function _(e,r){o>s||(l(),o+=e.length,t.push(i(e,r)))}function d(){t=[],r=!0,a=0,o=0}}();function n(r,n){return i(r,function(r){var n=r.flags;if(3&n)return t(r)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName;if(4&n)return e.SymbolDisplayPartKind.propertyName;if(32768&n)return e.SymbolDisplayPartKind.propertyName;if(65536&n)return e.SymbolDisplayPartKind.propertyName;if(8&n)return e.SymbolDisplayPartKind.enumMemberName;if(16&n)return e.SymbolDisplayPartKind.functionName;if(32&n)return e.SymbolDisplayPartKind.className;if(64&n)return e.SymbolDisplayPartKind.interfaceName;if(384&n)return e.SymbolDisplayPartKind.enumName;if(1536&n)return e.SymbolDisplayPartKind.moduleName;if(8192&n)return e.SymbolDisplayPartKind.methodName;if(262144&n)return e.SymbolDisplayPartKind.typeParameterName;if(524288&n)return e.SymbolDisplayPartKind.aliasName;if(2097152&n)return e.SymbolDisplayPartKind.aliasName;return e.SymbolDisplayPartKind.text}(n))}function i(t,r){return{text:t,kind:e.SymbolDisplayPartKind[r]}}function a(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function o(t){return i(t,e.SymbolDisplayPartKind.text)}e.symbolPart=n,e.displayPart=i,e.spacePart=function(){return i(" ",e.SymbolDisplayPartKind.space)},e.keywordPart=a,e.punctuationPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)},e.operatorPart=function(t){return i(e.tokenToString(t),e.SymbolDisplayPartKind.operator)},e.textOrKeywordPart=function(t){var r=e.stringToToken(t);return void 0===r?o(t):a(r)},e.textPart=o;var s="\r\n";function c(){return i("\n",e.SymbolDisplayPartKind.lineBreak)}function u(e){try{return e(r),r.displayParts()}finally{r.clear()}}function l(e){var t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&_(e)?e.substring(1,t-1):e}function _(t){return e.isSingleOrDoubleQuote(t.charCodeAt(0))}function d(t,r){return e.ensureScriptKind(t,r&&r.getScriptKind&&r.getScriptKind(t))}function p(e){return 0!=(33554432&e.flags)}function f(e,t){void 0===t&&(t=!0);var r=e&&g(e);return r&&!t&&y(r),r}function m(t,r,n,i,a){var o;if(void 0===r&&(r=!0),e.isIdentifier(t)&&n&&i){var s=i.getSymbolAtLocation(t),c=s&&n.get(String(e.getSymbolId(s)));c&&(o=e.createIdentifier(c.text))}return o||(o=g(t,n,i,a)),o&&!r&&y(o),a&&o&&a(t,o),o}function g(t,r,n,i){var a=r||n||i?e.visitEachChild(t,function(e){return m(e,!0,r,n,i)},e.nullTransformationContext):e.visitEachChild(t,f,e.nullTransformationContext);if(a===t){var o=e.getSynthesizedClone(t);return e.isStringLiteral(o)?o.textSourceNode=t:e.isNumericLiteral(o)&&(o.numericLiteralFlags=t.numericLiteralFlags),e.setTextRange(o,t)}return a.parent=void 0,a}function y(e){h(e),v(e)}function h(e){b(e,512,D)}function v(t){b(t,1024,e.getLastChild)}function b(t,r,n){e.addEmitFlags(t,r);var i=n(t);i&&b(i,r,n)}function D(e){return e.forEachChild(function(e){return e})}function x(e,t,r,n,i){return function(a,o,s,c){3===s?(a+=2,o-=2):a+=2,i(e,r||s,t.text.slice(a,o),void 0!==n?n:c)}}function S(t,r){if(e.startsWith(t,r))return 0;var n=t.indexOf(" "+r);return-1===n&&(n=t.indexOf("."+r)),-1===n&&(n=t.indexOf('"'+r)),-1===n?-1:n+1}function T(e){switch(e){case 35:case 33:case 36:case 34:return!0;default:return!1}}function C(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}e.getNewLineOrDefaultFromHost=function(e,t){return t&&t.newLineCharacter||e.getNewLine&&e.getNewLine()||s},e.lineBreakPart=c,e.mapToDisplayParts=u,e.typeToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),u(function(i){e.writeType(t,r,17408|n,i)})},e.symbolToDisplayParts=function(e,t,r,n,i){return void 0===i&&(i=0),u(function(a){e.writeSymbol(t,r,n,8|i,a)})},e.signatureToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),n|=25632,u(function(i){e.writeSignature(t,r,n,void 0,i)})},e.isImportOrExportSpecifierName=function(t){return!!t.parent&&e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t},e.stripQuotes=l,e.startsWithQuote=_,e.scriptKindIs=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=d(t,r);return e.some(n,function(e){return e===a})},e.getScriptKind=d,e.getSymbolTarget=function(e){for(var t=e;p(t)&&t.target;)t=t.target;return t},e.getUniqueSymbolId=function(t,r){return e.getSymbolId(e.skipAlias(t,r))},e.getFirstNonSpaceCharacterPosition=function(t,r){for(;e.isWhiteSpaceLike(t.charCodeAt(r));)r+=1;return r},e.getPrecedingNonSpaceCharacterPosition=function(t,r){for(;r>-1&&e.isWhiteSpaceSingleLine(t.charCodeAt(r));)r-=1;return r+1},e.getSynthesizedDeepClone=f,e.getSynthesizedDeepCloneWithRenames=m,e.getSynthesizedDeepClones=function(t,r){return void 0===r&&(r=!0),t&&e.createNodeArray(t.map(function(e){return f(e,r)}),t.hasTrailingComma)},e.suppressLeadingAndTrailingTrivia=y,e.suppressLeadingTrivia=h,e.suppressTrailingTrivia=v,e.getUniqueName=function(t,r){for(var n=t,i=1;!e.isFileLevelUniqueName(r,n);i++)n=t+"_"+i;return n},e.getRenameLocation=function(t,r,n,i){for(var a=0,o=-1,s=0,c=t;s<c.length;s++){var u=c[s],l=u.fileName,_=u.textChanges;e.Debug.assert(l===r);for(var d=0,p=_;d<p.length;d++){var f=p[d],m=f.span,g=f.newText,y=S(g,n);if(-1!==y&&(o=m.start+a+y,!i))return o;a+=g.length-m.length}}return e.Debug.assert(i),e.Debug.assert(o>=0),o},e.copyLeadingComments=function(t,r,n,i,a){e.forEachLeadingCommentRange(n.text,t.pos,x(r,n,i,a,e.addSyntheticLeadingComment))},e.copyTrailingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.end,x(r,n,i,a,e.addSyntheticTrailingComment))},e.copyTrailingAsLeadingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.pos,x(r,n,i,a,e.addSyntheticLeadingComment))},e.getContextualTypeFromParent=function(e,t){var r=e.parent;switch(r.kind){case 192:return t.getContextualType(r);case 204:var n=r,i=n.left,a=n.operatorToken,o=n.right;return T(a.kind)?t.getTypeAtLocation(e===o?i:o):t.getContextualType(e);case 271:return r.expression===e?C(r,t):void 0;default:return t.getContextualType(e)}},e.quote=function(t,r){if(/^\d+$/.test(t))return t;var n=r.quotePreference||"auto",i=JSON.stringify(t);switch(n){case"auto":case"double":return i;case"single":return"'"+l(i).replace("'","\\'").replace('\\"','"')+"'";default:return e.Debug.assertNever(n)}},e.isEqualityOperatorKind=T,e.isStringLiteralOrTemplate=function(e){switch(e.kind){case 10:case 14:case 206:case 193:return!0;default:return!1}},e.hasIndexSignature=function(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()},e.getSwitchedType=C,e.getTypeNodeIfAccessible=function(e,t,r,n){var i=r.getTypeChecker(),a=!0,o=function(){a=!1},s=i.typeToTypeNode(e,t,void 0,{trackSymbol:function(e,t,r){a=a&&0===i.isSymbolAccessible(e,t,r,!1).accessibility},reportInaccessibleThisError:o,reportPrivateInBaseOfClassExpression:o,reportInaccessibleUniqueSymbolError:o,moduleResolverHost:{readFile:n.readFile,fileExists:n.fileExists,directoryExists:n.directoryExists,getSourceFiles:r.getSourceFiles,getCurrentDirectory:r.getCurrentDirectory,getCommonSourceDirectory:r.getCommonSourceDirectory}});return a?s:void 0}}(c||(c={})),function(e){e.createClassifier=function(){var o=e.createScanner(7,!1);function s(i,s,c){var u=0,l=0,_=[],d=function(t){switch(t){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return e.Debug.assertNever(t)}}(s),p=d.prefix,f=d.pushTemplate;i=p+i;var m=p.length;f&&_.push(15),o.setText(i);var g=0,y=[],h=0;do{u=o.scan(),e.isTrivia(u)||(D(),l=u);var v=o.getTextPos();if(n(o.getTokenPos(),v,m,a(u),y),v>=i.length){var b=r(o,u,e.lastOrUndefined(_));void 0!==b&&(g=b)}}while(1!==u);function D(){switch(u){case 42:case 64:t[l]||13!==o.reScanSlashToken()||(u=13);break;case 28:72===l&&h++;break;case 30:h>0&&h--;break;case 120:case 138:case 135:case 123:case 139:h>0&&!c&&(u=72);break;case 15:_.push(u);break;case 18:_.length>0&&_.push(u);break;case 19:if(_.length>0){var r=e.lastOrUndefined(_);15===r?17===(u=o.reScanTemplateToken())?_.pop():e.Debug.assertEqual(u,16,"Should have been a template middle."):(e.Debug.assertEqual(r,18,"Should have been an open brace"),_.pop())}break;default:if(!e.isKeyword(u))break;24===l?u=72:e.isKeyword(l)&&e.isKeyword(u)&&!function(t,r){if(!e.isAccessibilityModifier(t))return!0;switch(r){case 126:case 137:case 124:case 116:return!0;default:return!1}}(l,u)&&(u=72)}}return{endOfLineState:g,spans:y}}return{getClassificationsForLine:function(t,r,n){return function(t,r){for(var n=[],a=t.spans,o=0,s=0;s<a.length;s+=3){var c=a[s],u=a[s+1],l=a[s+2];if(o>=0){var _=c-o;_>0&&n.push({length:_,classification:e.TokenClass.Whitespace})}n.push({length:u,classification:i(l)}),o=c+u}var d=r.length-o;return d>0&&n.push({length:d,classification:e.TokenClass.Whitespace}),{entries:n,finalLexState:t.endOfLineState}}(s(t,r,n),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([72,10,8,9,13,100,44,45,21,23,19,102,87],function(e){return e},function(){return!0});function r(t,r,n){switch(r){case 10:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(r)){if(!t.isUnterminated())return;switch(r){case 17:return 5;case 14:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return 15===n?6:void 0}}function n(e,t,r,n,i){if(8!==n){0===e&&r>0&&(e+=r);var a=t-e;a>0&&i.push(e-r,a,n)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 25:return e.TokenClass.BigIntLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier;default:return}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 40:case 42:case 43:case 38:case 39:case 46:case 47:case 48:case 28:case 30:case 31:case 32:case 94:case 93:case 119:case 33:case 34:case 35:case 36:case 49:case 51:case 50:case 54:case 55:case 70:case 69:case 71:case 66:case 67:case 68:case 60:case 61:case 62:case 64:case 65:case 59:case 27:return!0;default:return!1}}(t)||function(e){switch(e){case 38:case 39:case 53:case 52:case 44:case 45:return!0;default:return!1}}(t))return 5;if(t>=18&&t<=71)return 10;switch(t){case 8:return 4;case 9:return 25;case 10:return 6;case 13:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 72:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 244:case 240:case 241:case 239:e.throwIfCancellationRequested()}}function s(t,r,n,i,a){var s=[];return n.forEachChild(function c(u){if(u&&e.textSpanIntersectsWith(a,u.pos,u.getFullWidth())){if(o(r,u.kind),e.isIdentifier(u)&&!e.nodeIsMissing(u)&&i.has(u.escapedText)){var l=t.getSymbolAtLocation(u),_=l&&function t(r,n,i){var a=r.getFlags();return 0==(2885600&a)?void 0:32&a?11:384&a?12:524288&a?16:1536&a?4&n||1&n&&function(t){return e.some(t.declarations,function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)})}(r)?14:void 0:2097152&a?t(i.getAliasedSymbol(r),n,i):2&n?64&a?13:262144&a?15:void 0:void 0}(l,e.getMeaningFromLocation(u),t);_&&function(e,t,r){s.push(e),s.push(t-e),s.push(r)}(u.getStart(n),u.getEnd(),_)}u.forEachChild(c)}}),{spans:s,endOfLineState:0}}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function u(t){e.Debug.assert(t.spans.length%3==0);for(var r=t.spans,n=[],i=0;i<r.length;i+=3)n.push({textSpan:e.createTextSpan(r[i],r[i+1]),classificationType:c(r[i+2])});return n}function l(t,r,n){var i=n.start,a=n.length,s=e.createScanner(7,!1,r.languageVariant,r.text),c=e.createScanner(7,!1,r.languageVariant,r.text),u=[];return h(r),{spans:u,endOfLineState:0};function l(e,t,r){u.push(e),u.push(t),u.push(r)}function _(t,n,i,a){if(3===n){var o=e.parseIsolatedJSDocComment(r.text,i,a);if(o&&o.jsDoc)return o.jsDoc.parent=t,void function(e){var t=e.pos;if(e.tags)for(var r=0,n=e.tags;r<n.length;r++){var i=n[r];switch(i.pos!==t&&d(t,i.pos-t),l(i.pos,1,10),l(i.tagName.pos,i.tagName.end-i.tagName.pos,18),t=i.tagName.end,i.kind){case 304:a(i);break;case 308:p(i),t=i.end;break;case 307:case 305:h(i.typeExpression),t=i.end}}t!==e.end&&d(t,e.end-t);return;function a(e){e.isNameFirst&&(d(t,e.name.pos-t),l(e.name.pos,e.name.end-e.name.pos,17),t=e.name.end),e.typeExpression&&(d(t,e.typeExpression.pos-t),h(e.typeExpression),t=e.typeExpression.end),e.isNameFirst||(d(t,e.name.pos-t),l(e.name.pos,e.name.end-e.name.pos,17),t=e.name.end)}}(o.jsDoc)}d(i,a)}function d(e,t){l(e,t,1)}function p(e){for(var t=0,r=e.getChildren();t<r.length;t++){h(r[t])}}function f(t,r,n){var i;for(i=r;i<n&&!e.isLineBreak(t.charCodeAt(i));i++);for(l(r,i-r,1),c.setTextPos(i);c.getTextPos()<n;)m()}function m(){var e=c.getTextPos(),t=c.scan(),r=c.getTextPos(),n=y(t);n&&l(e,r-e,n)}function g(t){if(e.isJSDoc(t))return!0;if(e.nodeIsMissing(t))return!0;var n=function(e){switch(e.parent&&e.parent.kind){case 262:if(e.parent.tagName===e)return 19;break;case 263:if(e.parent.tagName===e)return 20;break;case 261:if(e.parent.tagName===e)return 21;break;case 267:if(e.parent.name===e)return 22}return}(t);if(!e.isToken(t)&&11!==t.kind&&void 0===n)return!1;var i=11===t.kind?t.pos:function(t){for(s.setTextPos(t.pos);;){var n=s.getTextPos();if(!e.couldStartTrivia(r.text,n))return n;var i=s.scan(),a=s.getTextPos(),o=a-n;if(!e.isTrivia(i))return n;switch(i){case 4:case 5:continue;case 2:case 3:_(t,i,n,o),s.setTextPos(a);continue;case 7:var c=r.text,u=c.charCodeAt(n);if(60===u||62===u){l(n,o,1);continue}e.Debug.assert(124===u||61===u),f(c,n,a);break;case 6:break;default:e.Debug.assertNever(i)}}}(t),a=t.end-i;if(e.Debug.assert(a>=0),a>0){var o=n||y(t.kind,t);o&&l(i,a,o)}return!0}function y(t,r){if(e.isKeyword(t))return 3;if((28===t||30===t)&&r&&e.getTypeArgumentOrTypeParameterList(r.parent))return 10;if(e.isPunctuation(t)){if(r){var n=r.parent;if(59===t&&(237===n.kind||154===n.kind||151===n.kind||267===n.kind))return 5;if(204===n.kind||202===n.kind||203===n.kind||205===n.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 25;if(10===t)return 267===r.parent.kind?24:6;if(13===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(11===t)return 23;if(72===t){if(r)switch(r.parent.kind){case 240:return r.parent.name===r?11:void 0;case 150:return r.parent.name===r?15:void 0;case 241:return r.parent.name===r?13:void 0;case 243:return r.parent.name===r?12:void 0;case 244:return r.parent.name===r?14:void 0;case 151:return r.parent.name===r?e.isThisIdentifier(r)?3:17:void 0}return 2}}function h(n){if(n&&e.decodedTextSpanIntersectsWith(i,a,n.pos,n.getFullWidth())){o(t,n.kind);for(var s=0,c=n.getChildren(r);s<c.length;s++){var u=c[s];g(u)||h(u)}}}}e.getSemanticClassifications=function(e,t,r,n,i){return u(s(e,t,r,n,i))},e.getEncodedSemanticClassifications=s,e.getSyntacticClassifications=function(e,t,r){return u(l(e,t,r))},e.getEncodedSyntacticClassifications=l}(c||(c={})),function(e){!function(t){!function(r){function n(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map(function(e){var t=e.name,r=e.kind,n=e.span;return{name:t,kind:r,kindModifiers:i(e.extension),sortText:"0",replacementSpan:n}})}}function i(t){switch(t){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".tsbuildinfo":return e.Debug.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return e.Debug.assertNever(t)}}var a;function o(t,r,n,i,a,o){var u,l,_=r.parent;switch(_.kind){case 182:switch(_.parent.kind){case 164:return{kind:2,types:c(i.getTypeArgumentConstraint(_)),isNewIdentifier:!1};case 180:return s(i.getTypeFromTypeNode(_.parent.objectType));case 183:return{kind:0,paths:d(t,r,a,o,i)};case 173:if(!e.isTypeReferenceNode(_.parent.parent))return;var p=(u=_.parent,l=_,e.mapDefined(u.types,function(t){return t!==l&&e.isLiteralTypeNode(t)&&e.isStringLiteral(t.literal)?t.literal.text:void 0}));return{kind:2,types:c(i.getTypeArgumentConstraint(_.parent)).filter(function(t){return!e.contains(p,t.value)}),isNewIdentifier:!1};default:return}case 275:return e.isObjectLiteralExpression(_.parent)&&_.name===r?s(i.getContextualType(_.parent)):h();case 190:var f=_,m=f.expression,g=f.argumentExpression;return r===g?s(i.getTypeAtLocation(m)):void 0;case 191:case 192:if(!e.isRequireCall(_,!1)&&!e.isImportCall(_)){var y=e.SignatureHelp.getArgumentInfoForCompletions(r,n,t);return y?function(t,r){var n=!1,i=e.createMap(),a=[];return r.getResolvedSignature(t.invocation,a,t.argumentCount),{kind:2,types:e.flatMap(a,function(e){if(e.hasRestParameter||!(t.argumentCount>e.parameters.length)){var a=r.getParameterType(e,t.argumentIndex);return n=n||!!(4&a.flags),c(a,i)}}),isNewIdentifier:n}}(y,i):h()}case 249:case 255:case 259:return{kind:0,paths:d(t,r,a,o,i)};default:return h()}function h(){return{kind:2,types:c(e.getContextualTypeFromParent(r,i)),isNewIdentifier:!1}}}function s(t){return t&&{kind:1,symbols:t.getApparentProperties(),hasIndexSignature:e.hasIndexSignature(t)}}function c(t,r){return void 0===r&&(r=e.createMap()),t?(t=e.skipConstraint(t)).isUnion()?e.flatMap(t.types,function(e){return c(e,r)}):!t.isStringLiteral()||1024&t.flags||!e.addToSeen(r,t.value)?e.emptyArray:[t]:e.emptyArray}function u(e,t,r){return{name:e,kind:t,extension:r}}function l(e){return u(e,"directory",void 0)}function _(t,r,n){var i=function(t,r){var n=Math.max(t.lastIndexOf(e.directorySeparator),t.lastIndexOf("\\")),i=-1!==n?n+1:0,a=t.length-i;return 0===a||e.isIdentifierText(t.substr(i,a),7)?void 0:e.createTextSpan(r+i,a)}(t,r);return n.map(function(e){return{name:e.name,kind:e.kind,extension:e.extension,span:i}})}function d(t,r,n,i,a){return _(r.text,r.getStart(t)+1,function(t,r,n,i,a){var o=e.normalizeSlashes(r.text),s=t.path,c=e.getDirectoryPath(s);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,r=e.charCodeAt(t);return 47===r||92===r}return!1}(o)||!n.baseUrl&&(e.isRootedDiskPath(o)||e.isUrl(o))?function(t,r,n,i,a){var o=p(n);return n.rootDirs?function(t,r,n,i,a,o,s){var c=a.project||o.getCurrentDirectory(),u=!(o.useCaseSensitiveFileNames&&o.useCaseSensitiveFileNames()),l=function(t,r,n,i){t=t.map(function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(r,t))});var a=e.firstDefined(t,function(t){return e.containsPath(t,n,r,i)?n.substr(t.length):void 0});return e.deduplicate(t.map(function(t){return e.combinePaths(t,a)}).concat([n]),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(t,c,n,u);return e.flatMap(l,function(e){return m(r,e,i,o,s)})}(n.rootDirs,t,r,o,n,i,a):m(t,r,o,i,a)}(o,c,n,i,s):function(t,r,n,i,a){var o=n.baseUrl,s=n.paths,c=[],l=p(n);if(o){var _=n.project||i.getCurrentDirectory(),d=e.normalizePath(e.combinePaths(_,o));m(t,d,l,i,void 0,c),s&&g(c,t,d,l.extensions,s,i)}for(var f=y(t),h=0,D=function(t,r,n){var i=n.getAmbientModules().map(function(t){return e.stripQuotes(t.name)}).filter(function(r){return e.startsWith(r,t)});if(void 0!==r){var a=e.ensureTrailingDirectorySeparator(r);return i.map(function(t){return e.removePrefix(t,a)})}return i}(t,f,a);h<D.length;h++){var S=D[h];c.push(u(S,"external module name",void 0))}if(v(i,n,r,f,l,c),e.getEmitModuleResolutionKind(n)===e.ModuleResolutionKind.NodeJs){var T=!1;if(void 0===f)for(var C=function(e){c.some(function(t){return t.name===e})||(T=!0,c.push(u(e,"external module name",void 0)))},k=0,N=function(t,r){if(!t.readFile||!t.fileExists)return e.emptyArray;for(var n=[],i=0,a=b(r,t);i<a.length;i++)for(var o=a[i],s=e.readJson(o,t),c=0,u=x;c<u.length;c++){var l=u[c],_=s[l];if(_)for(var d in _)_.hasOwnProperty(d)&&!e.startsWith(d,"@types/")&&n.push(d)}return n}(i,r);k<N.length;k++){var A=N[k];C(A)}T||e.forEachAncestorDirectory(r,function(r){var n=e.combinePaths(r,"node_modules");E(i,n)&&m(t,n,l,i,void 0,c)})}return c}(o,c,n,i,a)}(t,r,n,i,a))}function p(t,r){return void 0===r&&(r=!1),{extensions:function(t){var r=e.getSupportedExtensions(t);return t.resolveJsonModule&&e.getEmitModuleResolutionKind(t)===e.ModuleResolutionKind.NodeJs?r.concat(".json"):r}(t),includeExtensions:r}}function m(t,r,n,i,a,o){var s=n.extensions,c=n.includeExtensions;void 0===o&&(o=[]),void 0===t&&(t=""),t=e.normalizeSlashes(t),e.hasTrailingDirectorySeparator(t)||(t=e.getDirectoryPath(t)),""===t&&(t="."+e.directorySeparator),t=e.ensureTrailingDirectorySeparator(t);var _=e.resolvePath(r,t),d=e.hasTrailingDirectorySeparator(_)?_:e.getDirectoryPath(_),p=!(i.useCaseSensitiveFileNames&&i.useCaseSensitiveFileNames());if(!E(i,d))return o;var m=T(i,d,s,void 0,["./*"]);if(m){for(var y=e.createMap(),h=0,v=m;h<v.length;h++){var b=v[h];if(b=e.normalizePath(b),!a||0!==e.comparePaths(b,a,r,p)){var D=c||e.fileExtensionIs(b,".json")?e.getBaseFileName(b):e.removeFileExtension(e.getBaseFileName(b));y.set(D,e.tryGetExtensionFromPath(b))}}y.forEach(function(e,t){o.push(u(t,"script",e))})}var x=S(i,d);if(x)for(var k=0,N=x;k<N.length;k++){var A=N[k],F=e.getBaseFileName(e.normalizePath(A));"@types"!==F&&o.push(l(F))}var P=function(t,r){var n;return e.forEachAncestorDirectory(t,function(t){return"node_modules"===t||!!(n=e.findConfigFile(t,function(e){return C(r,e)},"package.json"))||void 0}),n}(d,i);if(P){var w=e.readJson(P,i).typesVersions;if("object"===f(w)){var I=e.getPackageJsonTypesVersionsPaths(w),O=I&&I.paths,M=_.slice(e.ensureTrailingDirectorySeparator(d).length);O&&g(o,M,d,s,O,i)}}return o}function g(t,r,n,i,a,o){for(var s in a)if(e.hasProperty(a,s)){var c=a[s];if(c)for(var l=function(e,r,n){t.some(function(t){return t.name===e})||t.push(u(e,r,n))},_=0,d=h(s,c,r,n,i,o);_<d.length;_++){var p=d[_];l(p.name,p.kind,p.extension)}}}function y(t){return A(t)?e.hasTrailingDirectorySeparator(t)?t:e.getDirectoryPath(t):void 0}function h(t,r,n,i,a,o){if(!e.endsWith(t,"*"))return e.stringContains(t,"*")?e.emptyArray:_(t);var s=t.slice(0,t.length-1),c=e.tryRemovePrefix(n,s);return void 0===c?_(s):e.flatMap(r,function(t){return function(t,r,n,i,a){if(!a.readDirectory)return;var o=e.hasZeroOrOneAsteriskCharacter(n)?e.tryParsePattern(n):void 0;if(!o)return;var s=e.resolvePath(o.prefix),c=e.hasTrailingDirectorySeparator(o.prefix)?s:e.getDirectoryPath(s),_=e.hasTrailingDirectorySeparator(o.prefix)?"":e.getBaseFileName(s),d=A(t),p=d?e.hasTrailingDirectorySeparator(t)?t:e.getDirectoryPath(t):void 0,f=d?e.combinePaths(c,_+p):c,m=e.normalizePath(o.suffix),g=e.normalizePath(e.combinePaths(r,f)),y=d?g:e.ensureTrailingDirectorySeparator(g)+_,h=m?"**/*":"./*",v=e.mapDefined(T(a,g,i,void 0,[h]),function(t){var r=e.tryGetExtensionFromPath(t),n=D(t);return void 0===n?void 0:u(e.removeFileExtension(n),"script",r)}),b=e.mapDefined(S(a,g).map(function(t){return e.combinePaths(g,t)}),function(e){var t=D(e);return void 0===t?void 0:l(t)});return v.concat(b);function D(t){var r,n,i,a=(r=e.normalizePath(t),n=y,i=m,e.startsWith(r,n)&&e.endsWith(r,i)?r.slice(n.length,r.length-i.length):void 0);return void 0===a?void 0:function(t){return t[0]===e.directorySeparator?t.slice(1):t}(a)}}(c,i,t,a,o)});function _(t){return e.startsWith(t,n)?[l(t)]:e.emptyArray}}function v(t,r,n,i,a,o){void 0===o&&(o=[]);for(var s=e.createMap(),c=0,l=N(function(){return e.getEffectiveTypeRoots(r,t)})||e.emptyArray;c<l.length;c++){f(l[c])}for(var _=0,d=b(n,t);_<d.length;_++){var p=d[_];f(e.combinePaths(e.getDirectoryPath(p),"node_modules/@types"))}return o;function f(n){if(E(t,n))for(var c=0,l=S(t,n);c<l.length;c++){var _=l[c],d=e.unmangleScopedPackageName(_);if(!r.types||e.contains(r.types,d))if(void 0===i)s.has(d)||(o.push(u(d,"external module name",void 0)),s.set(d,!0));else{var p=e.combinePaths(n,_),f=e.tryRemoveDirectoryPrefix(i,d,e.hostGetCanonicalFileName(t));void 0!==f&&m(f,p,a,t,void 0,o)}}}}function b(t,r){var n=[];return e.forEachAncestorDirectory(t,function(t){var i=e.findConfigFile(t,function(e){return C(r,e)},"package.json");if(!i)return!0;n.push(i)}),n}r.getStringLiteralCompletions=function(r,i,a,s,c,u,l,d){if(e.isInReferenceComment(r,i)){var f=function(t,r,n,i){var a=e.getTokenAtPosition(t,r),o=e.getLeadingCommentRanges(t.text,a.pos),s=o&&e.find(o,function(e){return r>=e.pos&&r<=e.end});if(s){var c=t.text.slice(s.pos,r),u=D.exec(c);if(u){var l=u[1],d=u[2],f=u[3],g=e.getDirectoryPath(t.path),h="path"===d?m(f,g,p(n,!0),i,t.path):"types"===d?v(i,n,g,y(f),p(n)):e.Debug.fail();return _(f,s.pos+l.length,h)}}}(r,i,c,u);return f&&n(f)}if(e.isInString(r,i,a))return a&&e.isStringLiteralLike(a)?function(r,i,a,o,s){if(void 0!==r)switch(r.kind){case 0:return n(r.paths);case 1:var c=[];return t.getCompletionEntriesFromSymbols(r.symbols,c,i,i,a,7,o,4,s),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:r.hasIndexSignature,entries:c};case 2:var c=r.types.map(function(e){return{name:e.value,kindModifiers:"",kind:"string",sortText:"0"}});return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:r.isNewIdentifier,entries:c};default:return e.Debug.assertNever(r)}}(o(r,a,i,s,c,u),r,s,l,d):void 0},r.getStringLiteralCompletionDetails=function(r,n,a,s,c,u,l,_){if(s&&e.isStringLiteralLike(s)){var d=o(n,s,a,c,u,l);return d&&function(r,n,a,o,s,c){switch(a.kind){case 0:var u=e.find(a.paths,function(e){return e.name===r});return u&&t.createCompletionDetails(r,i(u.extension),u.kind,[e.textPart(r)]);case 1:var u=e.find(a.symbols,function(e){return e.name===r});return u&&t.createCompletionDetailsForSymbol(u,s,o,n,c);case 2:return e.find(a.types,function(e){return e.value===r})?t.createCompletionDetails(r,"","type",[e.textPart(r)]):void 0;default:return e.Debug.assertNever(a)}}(r,s,d,n,c,_)}},function(e){e[e.Paths=0]="Paths",e[e.Properties=1]="Properties",e[e.Types=2]="Types"}(a||(a={}));var D=/^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/,x=["dependencies","devDependencies","peerDependencies","optionalDependencies"];function S(e,t){return k(e,e.getDirectories,t)||[]}function T(t,r,n,i,a){return k(t,t.readDirectory,r,n,i,a)||e.emptyArray}function C(e,t){return k(e,e.fileExists,t)}function E(t,r){return N(function(){return e.directoryProbablyExists(r,t)})||!1}function k(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return N(function(){return t&&t.apply(e,r)})}function N(e){try{return e()}catch(e){return}}function A(t){return e.stringContains(t,e.directorySeparator)}}(t.StringCompletions||(t.StringCompletions={}))}(e.Completions||(e.Completions={}))}(c||(c={})),function(e){!function(t){var r,n,i;function a(e){return 2===e.kind||3===e.kind}function o(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function s(t,r){return e.isSourceFileJS(t)&&!e.isCheckJsEnabledForFile(t,r)}!function(e){e[e.ThisType=0]="ThisType",e[e.SymbolMemberNoExport=1]="SymbolMemberNoExport",e[e.SymbolMemberExport=2]="SymbolMemberExport",e[e.Export=3]="Export"}(r||(r={})),function(e){e[e.None=0]="None",e[e.All=1]="All",e[e.ClassElementKeywords=2]="ClassElementKeywords",e[e.InterfaceElementKeywords=3]="InterfaceElementKeywords",e[e.ConstructorParameterKeywords=4]="ConstructorParameterKeywords",e[e.FunctionLikeBodyKeywords=5]="FunctionLikeBodyKeywords",e[e.TypeKeywords=6]="TypeKeywords",e[e.Last=6]="Last"}(n||(n={})),function(e){e[e.Continue=0]="Continue",e[e.Success=1]="Success",e[e.Fail=2]="Fail"}(i||(i={})),t.getCompletionsAtPosition=function(r,n,i,a,c,u,_){var d=n.getTypeChecker(),p=n.getCompilerOptions(),f=e.findPrecedingToken(c,a);if(!_||function(t,r,n,i){switch(r){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&e.isStringLiteralOrTemplate(n)&&i===n.getStart(t)+1;case"<":return!!n&&28===n.kind&&(!e.isBinaryExpression(n.parent)||I(n.parent));case"/":return!!n&&(e.isStringLiteralLike(n)?!!e.tryGetImportFromModuleSpecifier(n):42===n.kind&&e.isJsxClosingElement(n.parent));default:return e.Debug.assertNever(r)}}(a,_,f,c)){var g=t.StringCompletions.getStringLiteralCompletions(a,c,f,d,p,r,i,u);if(g)return g;if(f&&e.isBreakOrContinueStatement(f.parent)&&(73===f.kind||78===f.kind||72===f.kind))return function(t){var r=function(t){for(var r=[],n=e.createMap(),i=t;i&&!e.isFunctionLike(i);){if(e.isLabeledStatement(i)){var a=i.label.text;n.has(a)||(n.set(a,!0),r.push({name:a,kindModifiers:"",kind:"label",sortText:"0"}))}i=i.parent}return r}(t);if(r.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:r}}(f.parent);var y=x(n,i,a,s(a,p),c,u,void 0);if(y)switch(y.kind){case 0:return function(t,r,n,i,a,o){var c=a.symbols,u=a.completionKind,_=a.isInSnippetScope,d=a.isNewIdentifierLocation,p=a.location,f=a.propertyAccessToConvert,g=a.keywordFilters,y=a.literals,h=a.symbolToOriginInfoMap,v=a.recommendedCompletion,b=a.isJsxInitializer,D=a.insideJsDocTagTypeExpression;if(p&&p.parent&&e.isJsxClosingElement(p.parent)){var x=p.parent.parent.openingElement.tagName,S=!!e.findChildOfKind(p.parent,30,t),C={name:x.getFullText(t)+(S?"":">"),kind:"class",kindModifiers:void 0,sortText:"0"};return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,entries:[C]}}var k=[];if(s(t,n)){var N=m(c,k,p,t,r,n.target,i,u,o,f,b,v,h);!function(t,r,n,i,a){e.getNameTable(t).forEach(function(t,o){if(t!==r){var s=e.unescapeLeadingUnderscores(o);e.addToSeen(n,s)&&e.isIdentifierText(s,i)&&a.push({name:s,kind:"warning",kindModifiers:"",sortText:"1"})}})}(t,p.pos,N,n.target,k)}else{if(!(d||c&&0!==c.length||0!==g))return;m(c,k,p,t,r,n.target,i,u,o,f,b,v,h)}if(0!==g)for(var A=e.arrayToSet(k,function(e){return e.name}),F=0,P=function(t,r){if(!r)return E(t);var n=t+6+1;return T[n]||(T[n]=E(t).filter(function(t){return!function(e){switch(e){case 118:case 120:case 146:case 123:case 125:case 84:case 145:case 109:case 127:case 110:case 128:case 129:case 130:case 131:case 132:case 135:case 136:case 113:case 114:case 115:case 133:case 138:case 139:case 140:case 142:case 143:return!0;default:return!1}}(e.stringToToken(t.name))}))}(g,!D&&e.isSourceFileJS(t));F<P.length;F++){var w=P[F];A.has(w.name)||k.push(w)}for(var I=0,O=y;I<O.length;I++){var M=O[I];k.push(l(M))}return{isGlobalCompletion:_,isMemberCompletion:function(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}(u),isNewIdentifierLocation:d,entries:k}}(a,d,p,i,y,u);case 1:return o(e.JsDoc.getJSDocTagNameCompletions());case 2:return o(e.JsDoc.getJSDocTagCompletions());case 3:return o(e.JsDoc.getJSDocParameterNameCompletions(y.tag));default:return e.Debug.assertNever(y)}}};var c,u=function(t){return"object"===f(t)?e.pseudoBigIntToString(t)+"n":JSON.stringify(t)};function l(e){return{name:u(e),kind:"string",kindModifiers:"",sortText:"0"}}function _(t,r,n,i,o,s,c,u,l,_,f){var m=S(t,o,c,s);if(m){var g,y,h=m.name,v=m.needsConvertPropertyAccess;if(c&&0===c.kind)g=v?"this["+e.quote(h,f)+"]":"this."+h;else if((c&&function(e){return 2===e.kind||1===e.kind}(c)||v)&&l){g=v?"["+e.quote(h,f)+"]":"["+h+"]";var b=e.findChildOfKind(l,24,n),D=e.startsWith(h,l.name.text)?l.name.end:b.end;y=e.createTextSpanFromBounds(b.getStart(n),D)}if(_&&(void 0===g&&(g=h),g="{"+g+"}","boolean"!=typeof _&&(y=e.createTextSpanFromNode(_,n))),void 0===g||f.includeCompletionsWithInsertText)return{name:h,kind:e.SymbolDisplay.getSymbolKind(i,t,r),kindModifiers:e.SymbolDisplay.getSymbolModifiers(t),sortText:"0",source:p(c),hasAction:d(!!c&&a(c)),isRecommended:d(function(e,t,r){return e===t||!!(1048576&e.flags)&&r.getExportSymbolOfSymbol(e)===t}(t,u,i)),insertText:g,replacementSpan:y}}}function d(e){return!!e||void 0}function p(t){return t&&a(t)?e.stripQuotes(t.moduleSymbol.name):void 0}function m(t,r,n,i,a,o,s,c,u,l,d,p,f){for(var m=e.timestamp(),g=e.createMap(),y=0,h=t;y<h.length;y++){var v=h[y],b=f?f[e.getSymbolId(v)]:void 0,D=_(v,n,i,a,o,c,b,p,l,d,u);if(D){var x=D.name;g.has(x)||(b||void 0===v.parent&&!e.some(v.declarations,function(e){return e.getSourceFile()===n.getSourceFile()})||g.set(x,!0),r.push(D))}}return s("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(e.timestamp()-m)),g}function g(t,r,n,i,a){var o=t.getCompilerOptions(),c=x(t,r,n,s(n,o),i,{includeCompletionsForModuleExports:!0,includeCompletionsWithInsertText:!0},a);if(!c)return{type:"none"};if(0!==c.kind)return{type:"request",request:c};var l=c.symbols,_=c.literals,d=c.location,f=c.completionKind,m=c.symbolToOriginInfoMap,g=c.previousToken,y=c.isJsxInitializer,h=e.find(_,function(e){return u(e)===a.name});return void 0!==h?{type:"literal",literal:h}:e.firstDefined(l,function(t){var r=m[e.getSymbolId(t)],n=S(t,o.target,r,f);return n&&n.name===a.name&&p(r)===a.source?{type:"symbol",symbol:t,location:d,symbolToOriginInfoMap:m,previousToken:g,isJsxInitializer:y}:void 0})||{type:"none"}}function y(t,r,n){return r&&a(r)&&(r.isDefaultExport&&"default"===t.escapedName||"export="===t.escapedName)?e.firstDefined(t.declarations,function(t){return e.isExportAssignment(t)&&e.isIdentifier(t.expression)?t.expression.text:void 0})||e.codefix.moduleSymbolToValidIdentifier(r.moduleSymbol,n):t.name}function h(t,r,n){return b(t,"",r,[e.displayPart(t,n)])}function v(t,r,n,i,a,o,s){var c=r.runWithCancellationToken(a,function(r){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(r,t,n,i,i,7)}),u=c.displayParts,l=c.documentation,_=c.symbolKind,d=c.tags;return b(t.name,e.SymbolDisplay.getSymbolModifiers(t),_,u,l,d,o,s)}function b(e,t,r,n,i,a,o,s){return{name:e,kindModifiers:t,kind:r,displayParts:n,documentation:i,tags:a,codeActions:o,source:s}}function D(t,r,n){var i=n.getAccessibleSymbolChain(t,r,67108863,!1);return i?e.first(i):t.parent&&(function(e){return e.declarations.some(function(e){return 284===e.kind})}(t.parent)?t:D(t.parent,r,n))}function x(t,r,n,i,a,o,s){var c=t.getTypeChecker(),u=e.timestamp(),l=e.getTokenAtPosition(n,a);r("getCompletionData: Get current token: "+(e.timestamp()-u)),u=e.timestamp();var _=e.isInComment(n,a,l);r("getCompletionData: Is inside comment: "+(e.timestamp()-u));var d=!1,p=!1;if(_){if(e.hasDocComment(n,a)){if(64===n.text.charCodeAt(a-1))return{kind:1};var f=e.getLineStartPositionForPosition(a,n);if(!n.text.substring(f,a).match(/[^\*|\s|(/\*\*)]/))return{kind:2}}var m=function(t,r){var n=e.findAncestor(t,e.isJSDoc);return n&&n.tags&&(e.rangeContainsPosition(n,r)?e.findLast(n.tags,function(e){return e.pos<r}):void 0)}(l,a);if(m){if(m.tagName.pos<=a&&a<=m.tagName.end)return{kind:1};if(function(e){switch(e.kind){case 304:case 310:case 305:case 307:case 309:return!0;default:return!1}}(m)&&m.typeExpression&&288===m.typeExpression.kind&&((l=e.getTokenAtPosition(n,a))&&(e.isDeclarationName(l)||310===l.parent.kind&&l.parent.name===l)||(d=ne(m.typeExpression))),e.isJSDocParameterTag(m)&&(e.nodeIsMissing(m.name)||m.name.pos<=a&&a<=m.name.end))return{kind:3,tag:m}}if(!d)return void r("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}u=e.timestamp();var g=e.findPrecedingToken(a,n,void 0);r("getCompletionData: Get previous token 1: "+(e.timestamp()-u));var h=g;if(h&&a<=h.end&&(e.isIdentifier(h)||e.isKeyword(h.kind))){var v=e.timestamp();h=e.findPrecedingToken(h.getFullStart(),n,void 0),r("getCompletionData: Get previous token 2: "+(e.timestamp()-v))}var b,x=l,S=!1,T=!1,C=!1,E=!1,O=e.getTouchingPropertyName(n,a);if(h){if(function(t){var n=e.timestamp(),i=function(t){return(e.isRegularExpressionLiteral(t)||e.isStringTextContainingNode(t))&&(e.rangeContainsPositionExclusive(e.createTextRangeFromSpan(e.createTextSpanFromNode(t)),a)||a===t.end&&(!!t.isUnterminated||e.isRegularExpressionLiteral(t)))}(t)||function(t){var r=t.parent,n=r.kind;switch(t.kind){case 27:return 237===n||238===n||219===n||243===n||re(n)||241===n||185===n||242===n||e.isClassLike(r)&&!!r.typeParameters&&r.typeParameters.end>=t.pos;case 24:return 185===n;case 57:return 186===n;case 22:return 185===n;case 20:return 274===n||re(n);case 18:return 243===n;case 28:return 240===n||209===n||241===n||242===n||e.isFunctionLikeKind(n);case 116:return 154===n&&!e.isClassLike(r.parent);case 25:return 151===n||!!r.parent&&185===r.parent.kind;case 115:case 113:case 114:return 151===n&&!e.isConstructorDeclaration(r.parent);case 119:return 253===n||257===n||251===n;case 126:case 137:return!w(t);case 76:case 84:case 110:case 90:case 105:case 92:case 111:case 77:case 117:case 140:return!0;case 40:return e.isFunctionLike(t.parent)&&!e.isMethodDeclaration(t.parent)}if(N(A(t))&&w(t))return!1;if(te(t)&&(!e.isIdentifier(t)||e.isParameterPropertyModifier(A(t))||ne(t)))return!1;switch(A(t)){case 118:case 76:case 77:case 125:case 84:case 90:case 110:case 111:case 113:case 114:case 115:case 116:case 105:case 117:return!0;case 121:return e.isPropertyDeclaration(t.parent)}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==g||a>g.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(11===e.kind)return!0;if(30===e.kind&&e.parent){if(262===e.parent.kind)return!0;if(263===e.parent.kind||261===e.parent.kind)return!!e.parent.parent&&260===e.parent.parent.kind}return!1}(t);return r("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-n)),i}(h))return void r("Returning an empty list because completion was requested in an invalid position.");var M=h.parent;if(24===h.kind)switch(S=!0,M.kind){case 189:if((x=(b=M).expression).end===h.pos&&e.isCallExpression(x)&&x.getChildCount(n)&&21!==e.last(x.getChildren(n)).kind)return;break;case 148:x=M.left;break;case 244:x=M.name;break;case 183:case 214:x=M;break;default:return}else if(1===n.languageVariant){if(M&&189===M.kind&&(h=M,M=M.parent),l.parent===O)switch(l.kind){case 30:260!==l.parent.kind&&262!==l.parent.kind||(O=l);break;case 42:261===l.parent.kind&&(O=l)}switch(M.kind){case 263:42===h.kind&&(C=!0,O=h);break;case 204:if(!I(M))break;case 261:case 260:case 262:28===h.kind&&(T=!0,O=h);break;case 267:switch(g.kind){case 59:E=!0;break;case 72:M!==g.parent&&!M.initializer&&e.findChildOfKind(M,59,n)&&(E=g)}}}}var L=e.timestamp(),R=5,B=!1,j=0,J=[],z=[];if(S)!function(){R=2;var t=e.isLiteralImportTypeNode(x),r=d||t&&!x.isTypeOf||e.isPartOfTypeNode(x.parent),i=e.isInRightSideOfInternalImportEqualsDeclaration(x)||!r&&e.isPossiblyTypeArgumentPosition(h,n,c);if(e.isEntityName(x)||t){var a=e.isModuleDeclaration(x.parent);a&&(B=!0);var o=c.getSymbolAtLocation(x);if(o&&1920&(o=e.skipAlias(o,c)).flags){for(var s=e.Debug.assertEachDefined(c.getExportsOfModule(o),"getExportsOfModule() should all be defined"),u=function(e){return c.isValidPropertyAccess(t?x:x.parent,e.name)},l=function(e){return Z(e)},_=a?function(e){return!!(1920&e.flags)&&!e.declarations.every(function(e){return e.parent===x.parent})}:i?function(e){return l(e)||u(e)}:r?l:u,p=0,f=s;p<f.length;p++){var m=f[p];_(m)&&J.push(m)}return void(!r&&o.declarations&&o.declarations.some(function(e){return 284!==e.kind&&244!==e.kind&&243!==e.kind})&&G(c.getTypeOfSymbolAtLocation(o,x)))}}if(e.isMetaProperty(x)&&(95===x.keywordToken||92===x.keywordToken)){var g=95===x.keywordToken?"target":"meta";return void J.push(c.createSymbol(4,e.escapeLeadingUnderscores(g)))}r||G(c.getTypeAtLocation(x))}();else if(T){var K=e.Debug.assertEachDefined(c.getJsxIntrinsicTagNamesAt(O),"getJsxIntrinsicTagNames() should all be defined");X(),J=K.concat(J),R=3,j=0}else if(C){var U=h.parent.parent.openingElement.tagName,V=c.getSymbolAtLocation(U);V&&(J=[V]),R=3,j=0}else if(!X())return;r("getCompletionData: Semantic work: "+(e.timestamp()-L));var q=g&&function(t,r,n,i){var a=t.parent;switch(t.kind){case 72:return e.getContextualTypeFromParent(t,i);case 59:switch(a.kind){case 237:return i.getContextualType(a.initializer);case 204:return i.getTypeAtLocation(a.left);case 267:return i.getContextualTypeForJsxAttribute(a);default:return}case 95:return i.getContextualType(a);case 74:return e.getSwitchedType(e.cast(a,e.isCaseClause),i);case 18:return e.isJsxExpression(a)&&260!==a.parent.kind?i.getContextualTypeForJsxAttribute(a.parent):void 0;default:var o=e.SignatureHelp.getArgumentInfoForCompletions(t,r,n);return o?i.getContextualTypeForArgumentAtIndex(o.invocation,o.argumentIndex+(27===t.kind?1:0)):e.isEqualityOperatorKind(t.kind)&&e.isBinaryExpression(a)&&e.isEqualityOperatorKind(a.operatorToken.kind)?i.getTypeAtLocation(a.left):i.getContextualType(t)}}(g,a,n,c),W=e.mapDefined(q&&(q.isUnion()?q.types:[q]),function(e){return e.isLiteral()?e.value:void 0}),H=g&&q&&function(t,r,n){return e.firstDefined(r&&(r.isUnion()?r.types:[r]),function(r){var i=r&&r.symbol;return i&&424&i.flags&&!e.isAbstractConstructorSymbol(i)?D(i,t,n):void 0})}(g,q,c);return{kind:0,symbols:J,completionKind:R,isInSnippetScope:p,propertyAccessToConvert:b,isNewIdentifierLocation:B,location:O,keywordFilters:j,literals:W,symbolToOriginInfoMap:z,recommendedCompletion:H,previousToken:g,isJsxInitializer:E,insideJsDocTagTypeExpression:d};function G(e){if(B=!!e.getStringIndexType(),i)J.push.apply(J,P(e,c));else for(var t=0,r=e.getApparentProperties();t<r.length;t++){var n=r[t];c.isValidPropertyAccessForCompletions(183===x.kind?x:x.parent,e,n)&&Y(n)}}function Y(t){var r=e.firstDefined(t.declarations,function(t){return e.tryCast(e.getNameOfDeclaration(t),e.isComputedPropertyName)});if(r){var n=function t(r){return e.isIdentifier(r)?r:e.isPropertyAccessExpression(r)?t(r.expression):void 0}(r.expression),i=n&&c.getSymbolAtLocation(n),a=i&&D(i,h,c);if(a&&!z[e.getSymbolId(a)]){J.push(a);var o=a.parent;z[e.getSymbolId(a)]=o&&e.isExternalModuleSymbol(o)?{kind:2,moduleSymbol:o,isDefaultExport:!1}:{kind:1}}}else J.push(t)}function X(){var r,i;return 1===(function(){var t,r,n=function(t){if(t){var r=t.parent;switch(t.kind){case 18:case 27:if(e.isObjectLiteralExpression(r)||e.isObjectBindingPattern(r))return r;break;case 40:return e.isMethodDeclaration(r)?e.tryCast(r.parent,e.isObjectLiteralExpression):void 0;case 72:return"async"===t.text&&e.isShorthandPropertyAssignment(t.parent)?t.parent.parent:void 0}}return}(h);if(!n)return 0;if(R=0,188===n.kind){var i=c.getContextualType(n);if(!i)return 2;B=e.hasIndexSignature(i),t=F(i,n,c),r=n.properties}else{e.Debug.assert(184===n.kind),B=!1;var a=e.getRootDeclaration(n.parent);if(!e.isVariableLike(a))return e.Debug.fail("Root declaration is not variable-like.");var o=e.hasInitializer(a)||e.hasType(a)||227===a.parent.parent.kind;if(o||151!==a.kind||(e.isExpression(a.parent)?o=!!c.getContextualType(a.parent):156!==a.parent.kind&&159!==a.parent.kind||(o=e.isExpression(a.parent.parent)&&!!c.getContextualType(a.parent.parent))),o){var i=c.getTypeAtLocation(n);if(!i)return 2;t=c.getPropertiesOfType(i).filter(function(t){return!(24&e.getDeclarationModifierFlagsFromSymbol(t))}),r=n.elements}}t&&t.length>0&&(J=function(t,r){if(0===r.length)return t;for(var n=e.createUnderscoreEscapedMap(),i=0,a=r;i<a.length;i++){var o=a[i];if((275===o.kind||276===o.kind||186===o.kind||156===o.kind||158===o.kind||159===o.kind)&&!ne(o)){var s=void 0;if(e.isBindingElement(o)&&o.propertyName)72===o.propertyName.kind&&(s=o.propertyName.escapedText);else{var c=e.getNameOfDeclaration(o);s=c&&e.isPropertyNameLiteral(c)?e.getEscapedTextOfIdentifierOrLiteral(c):void 0}n.set(s,!0)}}return t.filter(function(e){return!n.get(e.escapedName)})}(t,e.Debug.assertDefined(r)));return 1}()||function(){var t=!h||18!==h.kind&&27!==h.kind?void 0:e.tryCast(h.parent,e.isNamedImportsOrExports);if(!t)return 0;var r=(252===t.kind?t.parent.parent:t.parent).moduleSpecifier,n=c.getSymbolAtLocation(r);if(!n)return 2;R=3,B=!1;var i=c.getExportsAndPropertiesOfModule(n),a=e.arrayToSet(t.elements,function(e){return ne(e)?void 0:(e.propertyName||e.name).escapedText});return J=i.filter(function(e){return"default"!==e.escapedName&&!a.get(e.escapedName)}),1}()||(function(t){if(t){var r=t.parent;switch(t.kind){case 20:case 27:return e.isConstructorDeclaration(t.parent)?t.parent:void 0;default:if(te(t))return r.parent}}}(h)?(R=5,B=!0,j=4,1):0)||function(){var t=function(t,r,n){switch(n.kind){case 311:return e.tryCast(n.parent,e.isObjectTypeDeclaration);case 1:var i=e.tryCast(e.lastOrUndefined(e.cast(n.parent,e.isSourceFile).statements),e.isObjectTypeDeclaration);if(i&&!e.findChildOfKind(i,19,t))return i}if(!r)return;switch(r.kind){case 26:case 19:return w(n)&&n.parent.name===n?n.parent.parent:e.tryCast(n,e.isObjectTypeDeclaration);case 18:case 27:return e.tryCast(r.parent,e.isObjectTypeDeclaration);default:if(!w(r))return;var a=e.isClassLike(r.parent.parent)?N:k;return a(r.kind)||40===r.kind||e.isIdentifier(r)&&a(e.stringToToken(r.text))?r.parent.parent:void 0}}(n,h,O);if(!t)return 0;if(R=3,B=!0,j=40===h.kind?0:e.isClassLike(t)?2:3,!e.isClassLike(t))return 1;var r=h.parent,i=e.isClassElement(r)?e.getModifierFlags(r):0;if(72===h.kind&&!ne(h))switch(h.getText()){case"private":i|=8;break;case"static":i|=32}if(!(8&i)){var a=e.flatMap(e.getAllSuperTypeNodes(t),function(e){var r=c.getTypeAtLocation(e);return r&&c.getPropertiesOfType(32&i?c.getTypeOfSymbolAtLocation(r.symbol,t):r)});J=function(t,r,n){for(var i=e.createUnderscoreEscapedMap(),a=0,o=r;a<o.length;a++){var s=o[a];if((154===s.kind||156===s.kind||158===s.kind||159===s.kind)&&(!ne(s)&&!e.hasModifier(s,8)&&e.hasModifier(s,32)===!!(32&n))){var c=e.getPropertyNameForPropertyNameNode(s.name);c&&i.set(c,!0)}}return t.filter(function(t){return!(i.has(t.escapedName)||!t.declarations||8&e.getDeclarationModifierFlagsFromSymbol(t))})}(a,t.members,i)}return 1}()||(r=function(t){if(t){var r=t.parent;switch(t.kind){case 30:case 29:case 42:case 72:case 189:case 268:case 267:case 269:if(r&&(261===r.kind||262===r.kind)){if(30===t.kind){var i=e.findPrecedingToken(t.pos,n,void 0);if(!r.typeArguments||i&&42===i.kind)break}return r}if(267===r.kind)return r.parent.parent;break;case 10:if(r&&(267===r.kind||269===r.kind))return r.parent.parent;break;case 19:if(r&&270===r.kind&&r.parent&&267===r.parent.kind)return r.parent.parent.parent;if(r&&269===r.kind)return r.parent.parent}}return}(h),(i=r&&c.getContextualType(r.attributes))?(J=function(t,r){for(var n=e.createUnderscoreEscapedMap(),i=0,a=r;i<a.length;i++){var o=a[i];ne(o)||267===o.kind&&n.set(o.name.escapedText,!0)}return t.filter(function(e){return!n.get(e.escapedName)})}(F(i,r.attributes,c),r.attributes.properties),R=3,B=!1,1):0)||(function(){j=function(t){if(t){var r,n=e.findAncestor(t.parent,function(t){return e.isClassLike(t)?"quit":!(!e.isFunctionLikeDeclaration(t)||r!==t.body)||(r=t,!1)});return n&&n}}(h)?5:1,R=1,B=function(e){if(e){var t=e.parent.kind;switch(A(e)){case 27:return 191===t||157===t||192===t||187===t||204===t||165===t;case 20:return 191===t||157===t||192===t||195===t||177===t;case 22:return 187===t||162===t||149===t;case 130:case 131:return!0;case 24:return 244===t;case 18:return 240===t;case 59:return 237===t||204===t;case 15:return 206===t;case 16:return 216===t;case 115:case 113:case 114:return 154===t}}return!1}(h),g!==h&&e.Debug.assert(!!g,"Expected 'contextToken' to be defined when different from 'previousToken'.");var r=g!==h?g.getStart():a,i=function(t,r,n){var i=t;for(;i&&!e.positionBelongsToNode(i,r,n);)i=i.parent;return i}(h,r,n)||n;p=function(t){switch(t.kind){case 284:case 206:case 270:case 218:return!0;default:return e.isStatement(t)}}(i);var u=69996520|(Q()?0:67220415);if(J=e.Debug.assertEachDefined(c.getSymbolsInScope(i,u),"getSymbolsInScope() should all be defined"),o.includeCompletionsWithInsertText&&284!==i.kind){var l=c.tryGetThisTypeAt(i,!1);if(l)for(var _=0,d=P(l,c);_<d.length;_++){var f=d[_];z[e.getSymbolId(f)]={kind:0},J.push(f)}}o.includeCompletionsForModuleExports&&(n.externalModuleIndicator||!n.commonJsModuleIndicator&&(e.compilerOptionsIndicateEs6Modules(t.getCompilerOptions())||e.programContainsEs6Modules(t)))&&function(r,i,a){var o=i.toLowerCase(),u=e.createMap();e.codefix.forEachExternalModuleToImportFrom(c,n,t.getSourceFiles(),function(t){if(!s||!s.source||e.stripQuotes(t.name)===s.source){var n=c.resolveExternalModuleSymbol(t);if(e.addToSeen(u,e.getSymbolId(n))){n!==t&&e.some(n.declarations,function(e){return!!e.getSourceFile().externalModuleIndicator})&&(r.push(n),z[e.getSymbolId(n)]={kind:3,moduleSymbol:t,isDefaultExport:!1});for(var i=0,l=c.getExportsOfModule(t);i<l.length;i++){var _=l[i];if(c.getMergedSymbol(_.parent)===n&&!e.some(_.declarations,function(t){return e.isExportSpecifier(t)&&(t.propertyName?e.isIdentifierANonContextualKeyword(t.name):!!t.parent.parent.moduleSpecifier)})){var d="default"===_.escapedName;d&&(_=e.getLocalSymbolForExportDefault(_)||_);var p={kind:3,moduleSymbol:t,isDefaultExport:d};(s||ee(y(_,p,a).toLowerCase(),o))&&(r.push(_),z[e.getSymbolId(_)]=p)}}}}})}(J,g&&e.isIdentifier(g)?g.text:"",t.getCompilerOptions().target);!function(t){var r=Q(),i=r||!$(h)&&e.isPossiblyTypeArgumentPosition(h,n,c);r&&(j=6);e.filterMutate(t,function(t){if(!e.isSourceFile(O)){if(e.isExportAssignment(O.parent))return!0;if(t=e.skipAlias(t,c),e.isInRightSideOfInternalImportEqualsDeclaration(O))return!!(1920&t.flags);if(i){var n=Z(t);if(n||r)return n}}return!!(67220415&e.getCombinedLocalAndExportSymbolFlags(t))})}(J)}(),1))}function Q(){return d||!$(h)&&(e.isPartOfTypeNode(O)||function(t){if(t){var r=t.parent.kind;switch(t.kind){case 57:return 154===r||153===r||151===r||237===r||e.isFunctionLikeKind(r);case 59:return 242===r;case 119:return 212===r;case 86:return 150===r}}return!1}(h))}function $(t){return t&&104===t.kind&&(167===t.parent.kind||e.isTypeOfExpression(t.parent))}function Z(t,r){void 0===r&&(r=e.createMap());var n=e.skipAlias(t.exportSymbol||t,c);return!!(67897832&n.flags)||!!(1536&n.flags)&&e.addToSeen(r,e.getSymbolId(n))&&c.getExportsOfModule(n).some(function(e){return Z(e,r)})}function ee(e,t){if(0===t.length)return!0;for(var r=0,n=0;n<e.length;n++)if(e.charCodeAt(n)===t.charCodeAt(r)&&++r===t.length)return!0;return!1}function te(t){return!!t.parent&&e.isParameter(t.parent)&&e.isConstructorDeclaration(t.parent.parent)&&(e.isParameterPropertyModifier(t.kind)||e.isDeclarationName(t))}function re(t){return e.isFunctionLikeKind(t)&&157!==t}function ne(e){return e.getStart(n)<=a&&a<=e.getEnd()}}function S(t,r,n,i){var a=y(t,n,r);if(!(void 0===a||1536&t.flags&&e.startsWithQuote(a)||e.isKnownSymbol(t))){var o={name:a,needsConvertPropertyAccess:!1};if(e.isIdentifierText(a,r))return o;switch(i){case 3:return;case 0:return{name:JSON.stringify(a),needsConvertPropertyAccess:!1};case 2:case 1:return 32===a.charCodeAt(0)?void 0:{name:a,needsConvertPropertyAccess:!0};case 5:case 4:return o;default:e.Debug.assertNever(i)}}}t.getCompletionEntriesFromSymbols=m,t.getCompletionEntryDetails=function(r,n,i,o,s,c,l,_,d){var p=r.getTypeChecker(),f=r.getCompilerOptions(),m=s.name,b=e.findPrecedingToken(o,i);if(e.isInString(i,o,b))return t.StringCompletions.getStringLiteralCompletionDetails(m,i,o,b,p,f,c,d);var D=g(r,n,i,o,s);switch(D.type){case"request":var x=D.request;switch(x.kind){case 1:return e.JsDoc.getJSDocTagNameCompletionDetails(m);case 2:return e.JsDoc.getJSDocTagCompletionDetails(m);case 3:return e.JsDoc.getJSDocParameterNameCompletionDetails(m);default:return e.Debug.assertNever(x)}case"symbol":var S=D.symbol,T=D.location,E=function(t,r,n,i,o,s,c,u,l,_,d){var p=t[e.getSymbolId(r)];if(!p||!a(p))return{codeActions:void 0,sourceDisplay:void 0};var f=p.moduleSymbol,m=i.getMergedSymbol(e.skipAlias(r.exportSymbol||r,i)),g=e.codefix.getImportCompletionAction(m,f,c,y(r,p,s.target),o,n,_,l&&e.isIdentifier(l)?l.getStart(c):u,d),h=g.moduleSpecifier,v=g.codeAction;return{sourceDisplay:[e.textPart(h)],codeActions:[v]}}(D.symbolToOriginInfoMap,S,r,p,c,f,i,o,D.previousToken,l,_);return v(S,p,i,T,d,E.codeActions,E.sourceDisplay);case"literal":var k=D.literal;return h(u(k),"string","string"==typeof k?e.SymbolDisplayPartKind.stringLiteral:e.SymbolDisplayPartKind.numericLiteral);case"none":return C().some(function(e){return e.name===m})?h(m,"keyword",e.SymbolDisplayPartKind.keyword):void 0;default:e.Debug.assertNever(D)}},t.createCompletionDetailsForSymbol=v,t.createCompletionDetails=b,t.getCompletionEntrySymbol=function(e,t,r,n,i){var a=g(e,t,r,n,i);return"symbol"===a.type?a.symbol:void 0},function(e){e[e.Data=0]="Data",e[e.JsDocTagName=1]="JsDocTagName",e[e.JsDocTag=2]="JsDocTag",e[e.JsDocParameterName=3]="JsDocParameterName"}(c||(c={})),function(e){e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None"}(t.CompletionKind||(t.CompletionKind={}));var T=[],C=e.memoize(function(){for(var t=[],r=73;r<=147;r++)t.push({name:e.tokenToString(r),kind:"keyword",kindModifiers:"",sortText:"0"});return t});function E(t){return T[t]||(T[t]=C().filter(function(r){var n=e.stringToToken(r.name);switch(t){case 0:return!1;case 1:return 121===n||122;case 2:return N(n);case 3:return k(n);case 4:return e.isParameterPropertyModifier(n);case 5:return function(t){return 121===t||122===t||!e.isContextualKeyword(t)&&!N(t)}(n);case 6:return e.isTypeKeyword(n);default:return e.Debug.assertNever(t)}}))}function k(e){return 133===e}function N(t){switch(t){case 118:case 124:case 126:case 137:case 121:return!0;default:return e.isClassMemberModifier(t)}}function A(t){return e.isIdentifier(t)?t.originalKeywordKind||0:t.kind}function F(t,r,n){return t.isUnion()?n.getAllPossiblePropertiesOfTypes(t.types.filter(function(t){return!(131068&t.flags||n.isArrayLikeType(t)||e.typeHasCallOrConstructSignatures(t,n)||n.isTypeInvalidDueToUnionDiscriminant(t,r))})):t.getApparentProperties()}function P(t,r){return t.isUnion()?e.Debug.assertEachDefined(r.getAllPossiblePropertiesOfTypes(t.types),"getAllPossiblePropertiesOfTypes() should all be defined"):e.Debug.assertEachDefined(t.getApparentProperties(),"getApparentProperties() should all be defined")}function w(t){return t.parent&&e.isClassOrTypeElement(t.parent)&&e.isObjectTypeDeclaration(t.parent.parent)}function I(t){var r=t.left;return e.nodeIsMissing(r)}}(e.Completions||(e.Completions={}))}(c||(c={})),function(e){!function(t){function r(t,r){return{fileName:r.fileName,textSpan:e.createTextSpanFromNode(t,r),kind:"none"}}function n(t){return e.isThrowStatement(t)?[t]:e.isTryStatement(t)?e.concatenate(t.catchClause?n(t.catchClause):t.tryBlock&&n(t.tryBlock),t.finallyBlock&&n(t.finallyBlock)):e.isFunctionLike(t)?void 0:a(t,n)}function i(t){return e.isBreakOrContinueStatement(t)?[t]:e.isFunctionLike(t)?void 0:a(t,i)}function a(t,r){var n=[];return t.forEachChild(function(t){var i=r(t);void 0!==i&&n.push.apply(n,e.toArray(i))}),n}function o(e,t){var r=s(t);return!!r&&r===e}function s(t){return e.findAncestor(t,function(r){switch(r.kind){case 232:if(228===t.kind)return!1;case 225:case 226:case 227:case 224:case 223:return!t.label||function(t,r){return!!e.findAncestor(t.parent,function(t){return e.isLabeledStatement(t)?t.label.escapedText===r:"quit"})}(r,t.label.escapedText);default:return e.isFunctionLike(r)&&"quit"}})}function c(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return!(!r||!e.contains(n,r.kind))&&(t.push(r),!0)}function u(t){var r=[];if(c(r,t.getFirstToken(),89,107,82)&&223===t.kind)for(var n=t.getChildren(),a=n.length-1;a>=0&&!c(r,n[a],107);a--);return e.forEach(i(t.statement),function(e){o(t,e)&&c(r,e.getFirstToken(),73,78)}),r}function l(e){var t=s(e);if(t)switch(t.kind){case 225:case 226:case 227:case 223:case 224:return u(t);case 232:return _(t)}}function _(t){var r=[];return c(r,t.getFirstToken(),99),e.forEach(t.caseBlock.clauses,function(n){c(r,n.getFirstToken(),74,80),e.forEach(i(n),function(e){o(t,e)&&c(r,e.getFirstToken(),73)})}),r}function d(t,r){var n=[];(c(n,t.getFirstToken(),103),t.catchClause&&c(n,t.catchClause.getFirstToken(),75),t.finallyBlock)&&c(n,e.findChildOfKind(t,88,r),88);return n}function p(t,r){var i=function(t){for(var r=t;r.parent;){var n=r.parent;if(e.isFunctionBlock(n)||284===n.kind)return n;if(e.isTryStatement(n)&&n.tryBlock===r&&n.catchClause)return r;r=n}}(t);if(i){var a=[];return e.forEach(n(i),function(t){a.push(e.findChildOfKind(t,101,r))}),e.isFunctionBlock(i)&&e.forEachReturnStatement(i,function(t){a.push(e.findChildOfKind(t,97,r))}),a}}function f(t,r){var i=e.getContainingFunction(t);if(i){var a=[];return e.forEachReturnStatement(e.cast(i.body,e.isBlock),function(t){a.push(e.findChildOfKind(t,97,r))}),e.forEach(n(i.body),function(t){a.push(e.findChildOfKind(t,101,r))}),a}}function m(t){var r=e.getContainingFunction(t);if(r){var n=[];return r.modifiers&&r.modifiers.forEach(function(e){c(n,e,121)}),e.forEachChild(r,function(t){g(t,function(t){e.isAwaitExpression(t)&&c(n,t.getFirstToken(),122)})}),n}}function g(t,r){r(t),e.isFunctionLike(t)||e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isModuleDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isTypeNode(t)||e.forEachChild(t,function(e){return g(e,r)})}t.getDocumentHighlights=function(t,n,i,a,o){var s=e.getTouchingPropertyName(i,a);if(s.parent&&(e.isJsxOpeningElement(s.parent)&&s.parent.tagName===s||e.isJsxClosingElement(s.parent))){var y=s.parent.parent,h=[y.openingElement,y.closingElement].map(function(e){return r(e.tagName,i)});return[{fileName:i.fileName,highlightSpans:h}]}return function(t,r,n,i,a){var o=e.arrayToSet(a,function(e){return e.fileName}),s=e.FindAllReferences.getReferenceEntriesForNode(t,r,n,a,i,void 0,o);if(s){var c=e.arrayToMultiMap(s.map(e.FindAllReferences.toHighlightSpan),function(e){return e.fileName},function(e){return e.span});return e.arrayFrom(c.entries(),function(t){var r=t[0],i=t[1];if(!o.has(r)){e.Debug.assert(n.redirectTargetsMap.has(r));var s=n.getSourceFile(r),c=e.find(a,function(e){return!!e.redirectInfo&&e.redirectInfo.redirectTarget===s});r=c.fileName,e.Debug.assert(o.has(r))}return{fileName:r,highlightSpans:i}})}}(a,s,t,n,o)||function(t,n){var i=function(t,n){switch(t.kind){case 91:case 83:return e.isIfStatement(t.parent)?function(t,n){for(var i=function(t,r){for(var n=[];e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(r);c(n,i[0],91);for(var a=i.length-1;a>=0&&!c(n,i[a],83);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return n}(t,n),a=[],o=0;o<i.length;o++){if(83===i[o].kind&&o<i.length-1){for(var s=i[o],u=i[o+1],l=!0,_=u.getStart(n)-1;_>=s.end;_--)if(!e.isWhiteSpaceSingleLine(n.text.charCodeAt(_))){l=!1;break}if(l){a.push({fileName:n.fileName,textSpan:e.createTextSpanFromBounds(s.getStart(),u.end),kind:"reference"}),o++;continue}}a.push(r(i[o],n))}return a}(t.parent,n):void 0;case 97:return y(t.parent,e.isReturnStatement,f);case 101:return y(t.parent,e.isThrowStatement,p);case 103:case 75:case 88:var i=75===t.kind?t.parent.parent:t.parent;return y(i,e.isTryStatement,d);case 99:return y(t.parent,e.isSwitchStatement,_);case 74:case 80:return y(t.parent.parent.parent,e.isSwitchStatement,_);case 73:case 78:return y(t.parent,e.isBreakOrContinueStatement,l);case 89:case 107:case 82:return y(t.parent,function(t){return e.isIterationStatement(t,!0)},u);case 124:return s(e.isConstructorDeclaration,[124]);case 126:case 137:return s(e.isAccessor,[126,137]);case 122:return y(t.parent,e.isAwaitExpression,m);case 121:return h(m(t));case 117:return h(function(t){var r=e.getContainingFunction(t);if(r){var n=[];return e.forEachChild(r,function(t){g(t,function(t){e.isYieldExpression(t)&&c(n,t.getFirstToken(),117)})}),n}}(t));default:return e.isModifierKind(t.kind)&&(e.isDeclaration(t.parent)||e.isVariableStatement(t.parent))?h((a=t.kind,o=t.parent,e.mapDefined(function(t,r){var n=t.parent;switch(n.kind){case 245:case 284:case 218:case 271:case 272:return 128&r&&e.isClassDeclaration(t)?t.members.concat([t]):n.statements;case 157:case 156:case 239:return n.parameters.concat(e.isClassLike(n.parent)?n.parent.members:[]);case 240:case 209:var i=n.members;if(28&r){var a=e.find(n.members,e.isConstructorDeclaration);if(a)return i.concat(a.parameters)}else if(128&r)return i.concat([n]);return i;default:e.Debug.assertNever(n,"Invalid container kind.")}}(o,e.modifierToFlag(a)),function(t){return e.findModifier(t,a)}))):void 0}var a,o;function s(r,i){return y(t.parent,r,function(t){return e.mapDefined(t.symbol.declarations,function(t){return r(t)?e.find(t.getChildren(n),function(t){return e.contains(i,t.kind)}):void 0})})}function y(e,t,r){return t(e)?h(r(e,n)):void 0}function h(e){return e&&e.map(function(e){return r(e,n)})}}(t,n);return i&&[{fileName:n.fileName,highlightSpans:i}]}(s,i)}}(e.DocumentHighlights||(e.DocumentHighlights={}))}(c||(c={})),function(e){function t(t,n,i){void 0===n&&(n="");var a=e.createMap(),o=e.createGetCanonicalFileName(!!t);function s(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!0,o)}function c(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!1,o)}function u(t,r,n,o,s,c,u,l){var _=e.getOrUpdate(a,o,e.createMap),d=_.get(r),p=6===l?100:n.target||1;!d&&i&&((f=i.getDocument(o,r))&&(e.Debug.assert(u),d={sourceFile:f,languageServiceRefCount:0},_.set(r,d)));if(d)d.sourceFile.version!==c&&(d.sourceFile=e.updateLanguageServiceSourceFile(d.sourceFile,s,c,s.getChangeRange(d.sourceFile.scriptSnapshot)),i&&i.setDocument(o,r,d.sourceFile)),u&&d.languageServiceRefCount++;else{var f=e.createLanguageServiceSourceFile(t,s,p,c,!1,l);i&&i.setDocument(o,r,f),d={sourceFile:f,languageServiceRefCount:1},_.set(r,d)}return e.Debug.assert(0!==d.languageServiceRefCount),d.sourceFile}function l(t,r){var n=e.Debug.assertDefined(a.get(r)),i=n.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&n.delete(t)}return{acquireDocument:function(t,i,a,c,u){return s(t,e.toPath(t,n,o),i,r(i),a,c,u)},acquireDocumentWithKey:s,updateDocument:function(t,i,a,s,u){return c(t,e.toPath(t,n,o),i,r(i),a,s,u)},updateDocumentWithKey:c,releaseDocument:function(t,i){return l(e.toPath(t,n,o),r(i))},releaseDocumentWithKey:l,getLanguageServiceRefCounts:function(t){return e.arrayFrom(a.entries(),function(e){var r=e[0],n=e[1].get(t);return[r,n&&n.languageServiceRefCount]})},reportStats:function(){var t=e.arrayFrom(a.keys()).filter(function(e){return e&&"_"===e.charAt(0)}).map(function(e){var t=[];return a.get(e).forEach(function(e,r){t.push({name:r,refCount:e.languageServiceRefCount})}),t.sort(function(e,t){return t.refCount-e.refCount}),{bucket:e,sourceFiles:t}});return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:r}}function r(t){return e.sourceFileAffectingCompilerOptions.map(function(r){return e.getCompilerOptionValue(t,r)}).join("|")}e.createDocumentRegistry=function(e,r){return t(e,r)},e.createDocumentRegistryInternal=t}(c||(c={})),function(e){!function(t){function r(t,r){return e.forEach(284===t.kind?t.statements:t.body.statements,function(t){return r(t)||c(t)&&e.forEach(t.body&&t.body.statements,r)})}function n(t,n){if(t.externalModuleIndicator||void 0!==t.imports)for(var i=0,a=t.imports;i<a.length;i++){var o=a[i];n(e.importFromModuleSpecifier(o),o)}else r(t,function(t){switch(t.kind){case 255:case 249:(r=t).moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier)&&n(r,r.moduleSpecifier);break;case 248:var r;u(r=t)&&n(r,r.moduleReference.expression)}})}function a(t,r,n){var i=t.parent;if(i){var a=n.getMergedSymbol(i);return e.isExternalModuleSymbol(a)?{exportingModuleSymbol:a,exportKind:r}:void 0}}function o(e,t){return t.getMergedSymbol(s(e).symbol)}function s(t){if(191===t.kind)return t.getSourceFile();var r=t.parent;return 284===r.kind?r:(e.Debug.assert(245===r.kind),e.cast(r.parent,c))}function c(e){return 244===e.kind&&10===e.name.kind}function u(e){return 259===e.moduleReference.kind&&10===e.moduleReference.expression.kind}t.createImportTracker=function(t,a,c,l){var _=function(t,r,i){for(var a=e.createMap(),o=0,s=t;o<s.length;o++){var c=s[o];i&&i.throwIfCancellationRequested(),n(c,function(t,n){var i=r.getSymbolAtLocation(n);if(i){var o=e.getSymbolId(i).toString(),s=a.get(o);s||a.set(o,s=[]),s.push(t)}})}return a}(t,c,l);return function(n,d,p){var f=function(t,n,i,a,c,u){var l=a.exportingModuleSymbol,_=a.exportKind,d=e.nodeSeenTracker(),p=e.nodeSeenTracker(),f=[],m=!!l.globalExports,g=m?void 0:[];return function t(r){var n=v(r);if(n)for(var i=0,a=n;i<a.length;i++){var l=a[i];if(d(l))switch(u&&u.throwIfCancellationRequested(),l.kind){case 191:if(!m){var p=l.parent;if(2===_&&237===p.kind){var g=p.name;if(72===g.kind){f.push(g);break}}h(l.getSourceFile())}break;case 72:break;case 248:y(l,l.name,e.hasModifier(l,1),!1);break;case 249:f.push(l);var b=l.importClause&&l.importClause.namedBindings;b&&251===b.kind?y(l,b.name,!1,!0):!m&&e.isDefaultImport(l)&&h(s(l));break;case 255:l.exportClause?f.push(l):t(o(l,c));break;case 183:f.push(l);break;default:e.Debug.assertNever(l,"Unexpected import kind: "+e.Debug.showSyntaxKind(l))}}}(l),{directImports:f,indirectUsers:function(){if(m)return t;for(var r=0,i=l.declarations;r<i.length;r++){var a=i[r];e.isExternalModuleAugmentation(a)&&n.has(a.getSourceFile().fileName)&&h(a)}return g.map(e.getSourceFileOfNode)}()};function y(t,n,i,a){if(2===_)a||f.push(t);else if(!m){var o=s(t);e.Debug.assert(284===o.kind||244===o.kind),i||function(t,n,i){var a=i.getSymbolAtLocation(n);return!!r(t,function(t){if(e.isExportDeclaration(t)){var r=t.exportClause,n=t.moduleSpecifier;return!n&&r&&r.elements.some(function(e){return i.getExportSpecifierLocalTargetSymbol(e)===a})}})}(o,n,c)?function t(r){if(h(r)){var n=c.getMergedSymbol(r.symbol);e.Debug.assert(!!(1536&n.flags));var i=v(n);if(i)for(var a=0,o=i;a<o.length;a++){var u=o[a];t(s(u))}}}(o):h(o)}}function h(t){e.Debug.assert(!m);var r=p(t);return r&&g.push(t),r}function v(t){return i.get(e.getSymbolId(t).toString())}}(t,a,_,d,c,l),m=f.directImports,g=f.indirectUsers;return i({indirectUsers:g},function(t,r,n,i,a){var o=[],s=[];function c(e,t){o.push([e,t])}if(t)for(var l=0,_=t;l<_.length;l++){var d=_[l];p(d)}return{importSearches:o,singleReferences:s};function p(t){if(248!==t.kind)if(72!==t.kind)if(183!==t.kind){if(10===t.moduleSpecifier.kind)if(255!==t.kind){var o=t.importClause||{name:void 0,namedBindings:void 0},l=o.name,_=o.namedBindings;if(_)switch(_.kind){case 251:f(_.name);break;case 252:0!==n&&1!==n||m(_);break;default:e.Debug.assertNever(_)}if(l&&(1===n||2===n)&&(!a||l.escapedText===e.symbolEscapedNameNoDefault(r))){var d=i.getSymbolAtLocation(l);c(l,d)}}else m(t.exportClause)}else t.qualifier?e.isIdentifier(t.qualifier)&&t.qualifier.escapedText===e.symbolName(r)&&s.push(t.qualifier):2===n&&s.push(t.argument.literal);else f(t);else u(t)&&f(t.name)}function f(e){2!==n||a&&!g(e.escapedText)||c(e,i.getSymbolAtLocation(e))}function m(e){if(e)for(var t=0,n=e.elements;t<n.length;t++){var o=n[t],u=o.name,l=o.propertyName;if(g((l||u).escapedText))if(l)s.push(l),a&&u.escapedText!==r.escapedName||c(u,i.getSymbolAtLocation(u));else{var _=257===o.kind&&o.propertyName?i.getExportSpecifierLocalTargetSymbol(o):i.getSymbolAtLocation(u);c(u,_)}}}function g(e){return e===r.escapedName||0!==n&&"default"===e}}(m,n,d.exportKind,c,p))}},function(e){e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals"}(t.ExportKind||(t.ExportKind={})),function(e){e[e.Import=0]="Import",e[e.Export=1]="Export"}(t.ImportExport||(t.ImportExport={})),t.findModuleReferences=function(e,t,r){for(var i=[],a=e.getTypeChecker(),o=0,s=t;o<s.length;o++){var c=s[o],u=r.valueDeclaration;if(284===u.kind){for(var l=0,_=c.referencedFiles;l<_.length;l++){var d=_[l];e.getSourceFileFromReference(c,d)===u&&i.push({kind:"reference",referencingFile:c,ref:d})}for(var p=0,f=c.typeReferenceDirectives;p<f.length;p++){d=f[p];var m=e.getResolvedTypeReferenceDirectives().get(d.fileName);void 0!==m&&m.resolvedFileName===u.fileName&&i.push({kind:"reference",referencingFile:c,ref:d})}}n(c,function(e,t){a.getSymbolAtLocation(t)===r&&i.push({kind:"import",literal:t})})}return i},t.getImportOrExportSymbol=function(t,r,n,i){return i?o():o()||function(){if(function(t){var r=t.parent;switch(r.kind){case 248:return r.name===t&&u(r);case 253:return!r.propertyName;case 250:case 251:return e.Debug.assert(r.name===t),!0;default:return!1}}(t)){var i=n.getImmediateAliasedSymbol(r);if(i){"export="===(i=function(t,r){if(t.declarations)for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(e.isExportSpecifier(a)&&!a.propertyName&&!a.parent.parent.moduleSpecifier)return r.getExportSpecifierLocalTargetSymbol(a)}return t}(i,n)).escapedName&&(i=function(t,r){if(2097152&t.flags)return e.Debug.assertDefined(r.getImmediateAliasedSymbol(t));var n=t.valueDeclaration;return e.isExportAssignment(n)?e.Debug.assertDefined(n.expression.symbol):e.isBinaryExpression(n)?e.Debug.assertDefined(n.right.symbol):e.isSourceFile(n)?e.Debug.assertDefined(n.symbol):e.Debug.fail()}(i,n));var a=e.symbolEscapedNameNoDefault(i);return void 0===a||"default"===a||a===r.escapedName?{kind:0,symbol:i}:void 0}}}();function o(){var a=t.parent,o=a.parent;if(r.exportSymbol)return 189===a.kind?r.declarations.some(function(e){return e===a})&&e.isBinaryExpression(o)?_(o,!1):void 0:s(r.exportSymbol,c(a));var u=function(e,t){if(237===e.kind){var r=e;return r.name!==t?void 0:274===r.parent.kind?void 0:219===r.parent.parent.kind?r.parent.parent:void 0}return e}(a,t);if(u&&e.hasModifier(u,1)){if(e.isImportEqualsDeclaration(u)&&u.moduleReference===t){if(i)return;return{kind:0,symbol:n.getSymbolAtLocation(u.name)}}return s(r,c(u))}if(e.isExportAssignment(a))return l(a);if(e.isExportAssignment(o))return l(o);if(e.isBinaryExpression(a))return _(a,!0);if(e.isBinaryExpression(o))return _(o,!0);if(e.isJSDocTypedefTag(a))return s(r,0);function l(t){var n=e.Debug.assertDefined(t.symbol.parent,"Expected export symbol to have a parent"),i=t.isExportEquals?2:1;return{kind:1,symbol:r,exportInfo:{exportingModuleSymbol:n,exportKind:i}}}function _(t,i){var a;switch(e.getAssignmentDeclarationKind(t)){case 1:a=0;break;case 2:a=2;break;default:return}var o=i?n.getSymbolAtLocation(e.cast(t.left,e.isPropertyAccessExpression).name):r;return!o||1536&n.getMergedSymbol(o.parent).flags||e.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is "+e.Debug.showSymbol(o)+", parent is "+e.Debug.showSymbol(o.parent)),o&&s(o,a)}}function s(e,t){var r=a(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function c(t){return e.hasModifier(t,512)?1:0}},t.getExportInfo=a}(e.FindAllReferences||(e.FindAllReferences={}))}(c||(c={})),function(e){!function(t){function r(e,t){return void 0===t&&(t=1),{kind:t,node:e.name||e}}function n(r,n,i,o,s,c,u){return void 0===c&&(c={}),void 0===u&&(u=e.arrayToSet(o,function(e){return e.fileName})),a(t.Core.getReferencedSymbolsForNode(r,n,i,o,s,c,u))}function a(t){return t&&e.flatMap(t,function(e){return e.references})}function o(r,n,i){var a=t.Core.getIntersectingMeaningFromDeclarations(i,r),o=r.declarations&&e.firstOrUndefined(r.declarations)||i,s=e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(n,r,o.getSourceFile(),o,o,a);return{displayParts:s.displayParts,kind:s.symbolKind}}function s(t){var r=c(t),n=r.textSpan,i=r.fileName;if(0===t.kind)return{textSpan:n,fileName:i,isWriteAccess:!1,isDefinition:!1};var a=t.kind,o=t.node;return{textSpan:n,fileName:i,isWriteAccess:l(o),isDefinition:80===o.kind||!!e.getDeclarationFromName(o)||e.isLiteralComputedPropertyDeclarationName(o),isInString:2===a||void 0}}function c(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};var t=e.node.getSourceFile();return{textSpan:u(e.node,t),fileName:t.fileName}}function u(t,r){var n=t.getStart(r),i=t.getEnd();return 10===t.kind&&(n+=1,i-=1),e.createTextSpanFromBounds(n,i)}function l(t){var r=e.getDeclarationFromName(t);return!!r&&function(t){if(4194304&t.flags)return!0;switch(t.kind){case 204:case 186:case 240:case 209:case 80:case 243:case 278:case 257:case 250:case 248:case 253:case 241:case 302:case 309:case 267:case 244:case 247:case 251:case 151:case 276:case 242:case 150:return!0;case 275:return!e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent);case 239:case 196:case 157:case 156:case 158:case 159:return!!t.body;case 237:case 154:return!!t.initializer||e.isCatchClause(t.parent);case 155:case 153:case 310:case 304:return!1;default:return e.Debug.failBadSyntaxKind(t)}}(r)||80===t.kind||e.isWriteAccess(t)}!function(e){e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String"}(t.DefinitionKind||(t.DefinitionKind={})),function(e){e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal"}(t.EntryKind||(t.EntryKind={})),t.nodeEntry=r,t.findReferencedSymbols=function(r,n,i,a,c){var l=e.getTouchingPropertyName(a,c),_=t.Core.getReferencedSymbolsForNode(c,l,r,i,n),d=r.getTypeChecker();return _&&_.length?e.mapDefined(_,function(t){var r=t.definition,i=t.references;return r&&{definition:d.runWithCancellationToken(n,function(t){return function(t,r,n){var i=function(){switch(t.type){case 0:var i=t.symbol,a=o(i,r,n),s=a.displayParts,c=a.kind,u=s.map(function(e){return e.text}).join("");return{node:i.declarations?e.getNameOfDeclaration(e.first(i.declarations))||e.first(i.declarations):n,name:u,kind:c,displayParts:s};case 1:var l=t.node;return{node:l,name:l.text,kind:"label",displayParts:[e.displayPart(l.text,e.SymbolDisplayPartKind.text)]};case 2:var _=t.node,d=e.tokenToString(_.kind);return{node:_,name:d,kind:"keyword",displayParts:[{text:d,kind:"keyword"}]};case 3:var p=t.node,i=r.getSymbolAtLocation(p),f=i&&e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(r,i,p.getSourceFile(),e.getContainerNode(p),p).displayParts||[e.textPart("this")];return{node:p,name:"this",kind:"var",displayParts:f};case 4:var m=t.node;return{node:m,name:m.text,kind:"var",displayParts:[e.displayPart(e.getTextOfNode(m),e.SymbolDisplayPartKind.stringLiteral)]};default:return e.Debug.assertNever(t)}}(),a=i.node,s=i.name,c=i.kind,l=i.displayParts,_=a.getSourceFile();return{containerKind:"",containerName:"",fileName:_.fileName,kind:c,name:s,textSpan:u(e.isComputedPropertyName(a)?a.expression:a,_),displayParts:l}}(r,t,l)}),references:i.map(s)}}):void 0},t.getImplementationsAtPosition=function(a,s,c,l,_){var d=function(i,a,o,s,c){if(284!==s.kind){var u=i.getTypeChecker();if(276===s.parent.kind){var l=[];return t.Core.getReferenceEntriesForShorthandPropertyAssignment(s,u,function(e){return l.push(r(e))}),l}if(98===s.kind||e.isSuperProperty(s.parent)){var _=u.getSymbolAtLocation(s);return _.valueDeclaration&&[r(_.valueDeclaration)]}return n(c,s,i,o,a,{implementations:!0})}}(a,s,c,e.getTouchingPropertyName(l,_),_),p=a.getTypeChecker();return e.map(d,function(t){return function(t,r){if(0!==t.kind){var n=t.node,a=n.getSourceFile();return i({textSpan:u(n,a),fileName:a.fileName},function(t,r){var n=r.getSymbolAtLocation(e.isDeclaration(t)&&t.name?t.name:t);return n?o(n,r,t):188===t.kind?{kind:"interface",displayParts:[e.punctuationPart(20),e.textPart("object literal"),e.punctuationPart(21)]}:209===t.kind?{kind:"local class",displayParts:[e.punctuationPart(20),e.textPart("anonymous local class"),e.punctuationPart(21)]}:{kind:e.getNodeKind(t),displayParts:[]}}(n,r))}var s=t.textSpan,c=t.fileName;return{textSpan:s,fileName:c,kind:"",displayParts:[]}}(t,p)})},t.findReferenceOrRenameEntries=function(r,n,i,o,s,c,u){return e.map(a(t.Core.getReferencedSymbolsForNode(s,o,r,i,n,c)),function(e){return u(e,o,r.getTypeChecker())})},t.getReferenceEntriesForNode=n,t.toRenameLocation=function(t,r,n,a){return i({},c(t),a&&function(t,r,n){if(0!==t.kind&&e.isIdentifier(r)){var i=t.node,a=t.kind,o=r.text,s=e.isShorthandPropertyAssignment(i.parent);if(s||e.isObjectBindingElementWithoutPropertyName(i.parent)){var c={prefixText:o+": "},u={suffixText:": "+o};return 3===a?c:4===a?u:s?u:c}if(e.isImportSpecifier(t.node.parent)&&!t.node.parent.propertyName){var l=e.isExportSpecifier(r.parent)?n.getExportSpecifierLocalTargetSymbol(r.parent):n.getSymbolAtLocation(r);return e.contains(l.declarations,t.node.parent)?{prefixText:o+" as "}:e.emptyOptions}if(e.isExportSpecifier(t.node.parent)&&!t.node.parent.propertyName)return r===t.node?{prefixText:o+" as "}:{suffixText:" as "+o}}return e.emptyOptions}(t,r,n))},t.toReferenceEntry=s,t.toHighlightSpan=function(e){if(0===e.kind)return{fileName:e.fileName,span:{textSpan:e.textSpan,kind:"reference"}};var t=e.node,r=e.kind,n=t.getSourceFile(),i=l(t),a={textSpan:u(t,n),kind:i?"writtenReference":"reference",isInString:2===r||void 0};return{fileName:n.fileName,span:a}},t.getTextSpanOfEntry=function(e){return 0===e.kind?e.textSpan:u(e.node,e.node.getSourceFile())}}(e.FindAllReferences||(e.FindAllReferences={}))}(c||(c={})),function(e){!function(t){!function(r){function n(t,r,n){if(t.parent&&e.isNamespaceExportDeclaration(t.parent)){var i=n.getAliasedSymbol(r),a=n.getMergedSymbol(i);if(i!==a)return a}}function i(t,r,n,i,o,u){var l=1536&t.flags?e.find(t.declarations,e.isSourceFile):void 0;if(l){var _=t.exports.get("export="),d=s(r,t,!!_,n,u);if(!_||!u.has(l.fileName))return d;var p=r.getTypeChecker();return a(r,d,c(t=e.skipAlias(_,p),void 0,n,u,p,i,o))}}function a(r){for(var n,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];for(var s=0,c=i;s<c.length;s++){var u=c[s];if(u&&u.length)if(n)for(var l=function(i){if(!i.definition||0!==i.definition.type)return n.push(i),"continue";var a=i.definition.symbol,s=e.findIndex(n,function(e){return!!e.definition&&0===e.definition.type&&e.definition.symbol===a});if(-1===s)return n.push(i),"continue";var c=n[s];n[s]={definition:c.definition,references:c.references.concat(i.references).sort(function(n,i){var a=o(r,n),s=o(r,i);if(a!==s)return e.compareValues(a,s);var c=t.getTextSpanOfEntry(n),u=t.getTextSpanOfEntry(i);return c.start!==u.start?e.compareValues(c.start,u.start):e.compareValues(c.length,u.length)})}},_=0,d=u;_<d.length;_++){l(d[_])}else n=u}return n}function o(e,t){var r=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(r)}function s(r,n,i,a,o){e.Debug.assert(!!n.valueDeclaration);for(var s=e.mapDefined(t.findModuleReferences(r,a,n),function(r){if("import"===r.kind){var n=r.literal.parent;if(e.isLiteralTypeNode(n)){var a=e.cast(n.parent,e.isImportTypeNode);if(i&&!a.qualifier)return}return t.nodeEntry(r.literal)}return{kind:0,fileName:r.referencingFile.fileName,textSpan:e.createTextSpanFromRange(r.ref)}}),c=0,u=n.declarations;c<u.length;c++){switch((p=u[c]).kind){case 284:break;case 244:o.has(p.getSourceFile().fileName)&&s.push(t.nodeEntry(p.name));break;default:e.Debug.assert(!!(33554432&n.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}}var l=n.exports.get("export=");if(l)for(var _=0,d=l.declarations;_<d.length;_++){var p,f=(p=d[_]).getSourceFile();if(o.has(f.fileName)){var m=e.isBinaryExpression(p)&&e.isPropertyAccessExpression(p.left)?p.left.expression:e.isExportAssignment(p)?e.Debug.assertDefined(e.findChildOfKind(p,85,f)):e.getNameOfDeclaration(p)||p;s.push(t.nodeEntry(m))}}return s.length?[{definition:{type:0,symbol:n},references:s}]:e.emptyArray}function c(t,r,n,i,a,o,s){var c=r&&function(t,r,n,i){var a=r.parent;if(e.isExportSpecifier(a)&&i)return C(r,t,a,n);return e.firstDefined(t.declarations,function(i){if(!i.parent){if(33554432&t.flags)return;e.Debug.fail("Unexpected symbol at "+e.Debug.showSyntaxKind(r)+": "+e.Debug.showSymbol(t))}return e.isTypeLiteralNode(i.parent)&&e.isUnionTypeNode(i.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(i.parent.parent),t.name):void 0})}(t,r,a,!I(s))||t,l=r?F(r,c):7,p=[],f=new _(n,i,r?function(t){switch(t.kind){case 124:return 1;case 72:if(e.isClassLike(t.parent))return e.Debug.assert(t.parent.name===t),2;default:return 0}}(r):0,a,o,l,s,p),m=I(s)?e.find(c.declarations,e.isExportSpecifier):void 0;if(m)T(m.name,c,m,f.createSearch(r,t,void 0),f,!0,!0);else if(r&&80===r.kind)E(r,c,f),d(r,c,{exportingModuleSymbol:e.Debug.assertDefined(c.parent,"Expected export symbol to have a parent"),exportKind:1},f);else{u(c,f,f.createSearch(r,c,void 0,{allSearchSymbols:r?function(e,t,r,n,i,a){var o=[];return A(e,t,r,n,!(n&&i),function(e,t,r){o.push(r||t||e)},function(){return!a}),o}(c,r,a,!!s.isForRename,!!s.providePrefixAndSuffixTextForRename,!!s.implementations):[c]}))}return p}function u(t,r,n){var i=function(t){var r=t.declarations,n=t.flags,i=t.parent,a=t.valueDeclaration;if(a&&(196===a.kind||209===a.kind))return a;if(!r)return;if(8196&n){var o=e.find(r,function(t){return e.hasModifier(t,8)});return o?e.getAncestor(o,240):void 0}if(r.some(e.isObjectBindingElementWithoutPropertyName))return;var s,c=i&&!(262144&t.flags);if(c&&(!e.isExternalModuleSymbol(i)||i.globalExports))return;for(var u=0,l=r;u<l.length;u++){var _=l[u],d=e.getContainerNode(_);if(s&&s!==d)return;if(!d||284===d.kind&&!e.isExternalOrCommonJsModule(d))return;s=d}return c?s.getSourceFile():s}(t);if(i)D(i,i.getSourceFile(),n,r,!(e.isSourceFile(i)&&!e.contains(r.sourceFiles,i)));else for(var a=0,o=r.sourceFiles;a<o.length;a++){var s=o[a];r.cancellationToken.throwIfCancellationRequested(),m(s,n,r)}}var l;r.getReferencedSymbolsForNode=function(r,o,u,l,_,d,p){if(void 0===d&&(d={}),void 0===p&&(p=e.arrayToSet(l,function(e){return e.fileName})),e.isSourceFile(o)){var f=e.GoToDefinition.getReferenceAtPosition(o,r,u),m=f&&u.getTypeChecker().getMergedSymbol(f.file.symbol);return m&&s(u,m,!1,l,p)}if(!d.implementations){var g=function(r,n,i){if(e.isTypeKeyword(r.kind))return function(r,n,i){var a=e.flatMap(r,function(r){return i.throwIfCancellationRequested(),e.mapDefined(y(r,e.tokenToString(n),r),function(e){return e.kind===n?t.nodeEntry(e):void 0})});return a.length?[{definition:{type:2,node:a[0].node},references:a}]:void 0}(n,r.kind,i);if(e.isJumpStatementTarget(r)){var a=e.getTargetLabel(r.parent,r.text);return a&&v(a.parent,a)}return e.isLabelOfLabeledStatement(r)?v(r.parent,r):e.isThis(r)?function(r,n,i){var a=e.getThisContainer(r,!1),o=32;switch(a.kind){case 156:case 155:if(e.isObjectLiteralMethod(a))break;case 154:case 153:case 157:case 158:case 159:o&=e.getModifierFlags(a),a=a.parent;break;case 284:if(e.isExternalModule(a)||N(r))return;case 239:case 196:break;default:return}var s=e.flatMap(284===a.kind?n:[a.getSourceFile()],function(t){return i.throwIfCancellationRequested(),y(t,"this",e.isSourceFile(a)?t:a).filter(function(t){if(!e.isThis(t))return!1;var r=e.getThisContainer(t,!1);switch(a.kind){case 196:case 239:return a.symbol===r.symbol;case 156:case 155:return e.isObjectLiteralMethod(a)&&a.symbol===r.symbol;case 209:case 240:return r.parent&&a.symbol===r.parent.symbol&&(32&e.getModifierFlags(r))===o;case 284:return 284===r.kind&&!e.isExternalModule(r)&&!N(t)}})}).map(function(e){return t.nodeEntry(e)});return[{definition:{type:3,node:e.firstDefined(s,function(t){return e.isParameter(t.node.parent)?t.node:void 0})||r},references:s}]}(r,n,i):98===r.kind?function(r){var n=e.getSuperContainer(r,!1);if(n){var i=32;switch(n.kind){case 154:case 153:case 156:case 155:case 157:case 158:case 159:i&=e.getModifierFlags(n),n=n.parent;break;default:return}var a=n.getSourceFile(),o=e.mapDefined(y(a,"super",n),function(r){if(98===r.kind){var a=e.getSuperContainer(r,!1);return a&&(32&e.getModifierFlags(a))===i&&a.parent.symbol===n.symbol?t.nodeEntry(r):void 0}});return[{definition:{type:0,symbol:n.symbol},references:o}]}}(r):void 0}(o,l,_);if(g)return g}var h=u.getTypeChecker(),b=h.getSymbolAtLocation(o);if(!b)return!d.implementations&&e.isStringLiteral(o)?function(r,n,i){var a=e.flatMap(n,function(n){return i.throwIfCancellationRequested(),e.mapDefined(y(n,r.text),function(n){return e.isStringLiteral(n)&&n.text===r.text?t.nodeEntry(n,2):void 0})});return[{definition:{type:4,node:r},references:a}]}(o,l,_):void 0;if("export="===b.escapedName)return s(u,b.parent,!1,l,p);var D=i(b,u,l,_,d,p);if(D&&!(33554432&b.flags))return D;var x=n(o,b,h),S=x&&i(x,u,l,_,d,p);return a(u,D,c(b,o,l,p,h,_,d),S)},function(e){e[e.None=0]="None",e[e.Constructor=1]="Constructor",e[e.Class=2]="Class"}(l||(l={}));var _=function(){function r(t,r,n,i,a,o,s,c){this.sourceFiles=t,this.sourceFilesSet=r,this.specialSearchKind=n,this.checker=i,this.cancellationToken=a,this.searchMeaning=o,this.options=s,this.result=c,this.inheritsFromCache=e.createMap(),this.markSeenContainingTypeReference=e.nodeSeenTracker(),this.markSeenReExportRHS=e.nodeSeenTracker(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}return r.prototype.includesSourceFile=function(e){return this.sourceFilesSet.has(e.fileName)},r.prototype.getImportSearches=function(e,r){return this.importTracker||(this.importTracker=t.createImportTracker(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,r,!!this.options.isForRename)},r.prototype.createSearch=function(t,r,n,i){void 0===i&&(i={});var a=i.text,o=void 0===a?e.stripQuotes(e.unescapeLeadingUnderscores((e.getLocalSymbolForExportDefault(r)||function(t){if(33555968&t.flags){var r=t.declarations&&e.find(t.declarations,function(t){return!e.isSourceFile(t)&&!e.isModuleDeclaration(t)});return r&&r.symbol}}(r)||r).escapedName)):a,s=i.allSearchSymbols,c=void 0===s?[r]:s;return{symbol:r,comingFrom:n,text:o,escapedText:e.escapeLeadingUnderscores(o),parents:this.options.implementations&&t?function(t,r,n){var i=e.isRightSideOfPropertyAccess(t)?t.parent:void 0,a=i&&n.getTypeAtLocation(i.expression),o=e.mapDefined(a&&(a.isUnionOrIntersection()?a.types:a.symbol===r.parent?void 0:[a]),function(e){return e.symbol&&96&e.symbol.flags?e.symbol:void 0});return 0===o.length?void 0:o}(t,r,this.checker):void 0,allSearchSymbols:c,includes:function(t){return e.contains(c,t)}}},r.prototype.referenceAdder=function(r){var n=e.getSymbolId(r),i=this.symbolIdToReferences[n];return i||(i=this.symbolIdToReferences[n]=[],this.result.push({definition:{type:0,symbol:r},references:i})),function(e,r){return i.push(t.nodeEntry(e,r))}},r.prototype.addStringOrCommentReference=function(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})},r.prototype.markSearchedSymbols=function(t,r){for(var n=e.getNodeId(t),i=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=e.createMap()),a=!1,o=0,s=r;o<s.length;o++){var c=s[o];a=e.addToSeen(i,e.getSymbolId(c))||a}return a},r}();function d(e,t,r,n){var i=n.getImportSearches(t,r),a=i.importSearches,o=i.singleReferences,s=i.indirectUsers;if(o.length)for(var c=n.referenceAdder(t),u=0,l=o;u<l.length;u++){var _=l[u];p(_,n)&&c(_)}for(var d=0,f=a;d<f.length;d++){var g=f[d],y=g[0],h=g[1];b(y.getSourceFile(),n.createSearch(y,h,1),n)}if(s.length){var v=void 0;switch(r.exportKind){case 0:v=n.createSearch(e,t,1);break;case 1:v=n.options.isForRename?void 0:n.createSearch(e,t,1,{text:"default"})}if(v)for(var D=0,x=s;D<x.length;D++){m(x[D],v,n)}}}function p(t,r){return!!x(t,r)&&(!r.options.isForRename||!!e.isIdentifier(t)&&!(e.isImportOrExportSpecifier(t.parent)&&"default"===t.escapedText))}function f(e,t){for(var r=0,n=e.declarations;r<n.length;r++){var i=n[r],a=i.getSourceFile();b(a,t.createSearch(i,e,0),t,t.includesSourceFile(a))}}function m(t,r,n){void 0!==e.getNameTable(t).get(r.escapedText)&&b(t,r,n)}function g(t,r,n,i){var a=e.isParameterPropertyDeclaration(t.parent)?e.first(r.getSymbolsOfParameterPropertyDeclaration(t.parent,t.text)):r.getSymbolAtLocation(t);if(a)for(var o=0,s=y(n,a.name);o<s.length;o++){var c=s[o];if(e.isIdentifier(c)&&c!==t&&c.escapedText===t.escapedText){var u=r.getSymbolAtLocation(c);if(u===a||r.getShorthandAssignmentValueSymbol(c.parent)===a||e.isExportSpecifier(c.parent)&&C(c,u,c.parent,r)===a){var l=i(c);if(l)return l}}}}function y(t,r,n){return void 0===n&&(n=t),h(t,r,n).map(function(r){return e.getTouchingPropertyName(t,r)})}function h(t,r,n){void 0===n&&(n=t);var i=[];if(!r||!r.length)return i;for(var a=t.text,o=a.length,s=r.length,c=a.indexOf(r,n.pos);c>=0&&!(c>n.end);){var u=c+s;0!==c&&e.isIdentifierPart(a.charCodeAt(c-1),7)||u!==o&&e.isIdentifierPart(a.charCodeAt(u),7)||i.push(c),c=a.indexOf(r,c+s+1)}return i}function v(r,n){var i=r.getSourceFile(),a=n.text,o=e.mapDefined(y(i,a,r),function(r){return r===n||e.isJumpStatementTarget(r)&&e.getTargetLabel(r,a)===n?t.nodeEntry(r):void 0});return[{definition:{type:1,node:n},references:o}]}function b(e,t,r,n){return void 0===n&&(n=!0),r.cancellationToken.throwIfCancellationRequested(),D(e,e,t,r,n)}function D(e,t,r,n,i){if(n.markSearchedSymbols(t,r.allSearchSymbols))for(var a=0,o=h(t,r.text,e);a<o.length;a++){S(t,o[a],r,n,i)}}function x(t,r){return!!(e.getMeaningFromLocation(t)&r.searchMeaning)}function S(r,n,i,a,o){var s=e.getTouchingPropertyName(r,n);if(function(t,r){switch(t.kind){case 72:return t.text.length===r.length;case 10:var n=t;return(e.isLiteralNameOfPropertyDeclarationOrIndexAccess(n)||e.isNameOfModuleDeclaration(t)||e.isExpressionOfExternalModuleImportEqualsDeclaration(t)||e.isCallExpression(t.parent)&&e.isBindableObjectDefinePropertyCall(t.parent)&&t.parent.arguments[1]===t)&&n.text.length===r.length;case 8:return e.isLiteralNameOfPropertyDeclarationOrIndexAccess(t)&&t.text.length===r.length;case 80:return"default".length===r.length;default:return!1}}(s,i.text)){if(x(s,a)){var c=a.checker.getSymbolAtLocation(s);if(c){var l=s.parent;if(!e.isImportSpecifier(l)||l.propertyName!==s){if(e.isExportSpecifier(l))return e.Debug.assert(72===s.kind),void T(s,c,l,i,a,o);var _=function(t,r,n,i){var a=i.checker;return A(r,n,a,!1,!i.options.isForRename||!!i.options.providePrefixAndSuffixTextForRename,function(r,n,i,a){return t.includes(i||n||r)?{symbol:!n||6&e.getCheckFlags(r)?r:n,kind:a}:void 0},function(r){return!(t.parents&&!t.parents.some(function(t){return function t(r,n,i,a){if(r===n)return!0;var o=e.getSymbolId(r)+","+e.getSymbolId(n);var s=i.get(o);if(void 0!==s)return s;i.set(o,!1);var c=r.declarations.some(function(r){return e.getAllSuperTypeNodes(r).some(function(e){var r=a.getTypeAtLocation(e);return!!r&&!!r.symbol&&t(r.symbol,n,i,a)})});i.set(o,c);return c}(r.parent,t,i.inheritsFromCache,a)}))})}(i,c,s,a);if(_){switch(a.specialSearchKind){case 0:o&&E(s,_,a);break;case 1:!function(t,r,n,i){e.isNewExpressionTarget(t)&&E(t,n.symbol,i);var a=function(){return i.referenceAdder(n.symbol)};if(e.isClassLike(t.parent))e.Debug.assert(80===t.kind||t.parent.name===t),function(t,r,n){var i=k(t);if(i)for(var a=0,o=i.declarations;a<o.length;a++){var s=o[a],c=e.findChildOfKind(s,124,r);e.Debug.assert(157===s.kind&&!!c),n(c)}t.exports&&t.exports.forEach(function(t){var r=t.valueDeclaration;if(r&&156===r.kind){var i=r.body;i&&w(i,100,function(t){e.isNewExpressionTarget(t)&&n(t)})}})}(n.symbol,r,a());else{var o=(s=t,e.tryGetClassExtendingExpressionWithTypeArguments(e.climbPastPropertyAccess(s).parent));o&&(function(t,r){var n=k(t.symbol);if(!n)return;for(var i=0,a=n.declarations;i<a.length;i++){var o=a[i];e.Debug.assert(157===o.kind);var s=o.body;s&&w(s,98,function(t){e.isCallExpressionTarget(t)&&r(t)})}}(o,a()),function(e,t){if(function(e){return!!k(e.symbol)}(e))return;var r=e.symbol,n=t.createSearch(void 0,r,void 0);u(r,t,n)}(o,i))}var s}(s,r,i,a);break;case 2:!function(t,r,n){E(t,r.symbol,n);var i=t.parent;if(n.options.isForRename||!e.isClassLike(i))return;e.Debug.assert(i.name===t);for(var a=n.referenceAdder(r.symbol),o=0,s=i.members;o<s.length;o++){var c=s[o];e.isMethodOrAccessor(c)&&e.hasModifier(c,32)&&(c.body&&c.body.forEachChild(function t(r){100===r.kind?a(r):e.isFunctionLike(r)||e.isClassLike(r)||r.forEachChild(t)}))}}(s,i,a);break;default:e.Debug.assertNever(a.specialSearchKind)}!function(e,r,n,i){var a=t.getImportOrExportSymbol(e,r,i.checker,1===n.comingFrom);if(!a)return;var o=a.symbol;0===a.kind?I(i.options)||f(o,i):d(e,o,a.exportInfo,i)}(s,c,i,a)}else!function(t,r,n){var i=t.flags,a=t.valueDeclaration,o=n.checker.getShorthandAssignmentValueSymbol(a),s=a&&e.getNameOfDeclaration(a);33554432&i||!s||!r.includes(o)||E(s,o,n)}(c,i,a)}}}}else!a.options.implementations&&(a.options.findInStrings&&e.isInString(r,n)||a.options.findInComments&&e.isInNonReferenceComment(r,n))&&a.addStringOrCommentReference(r.fileName,e.createTextSpan(n,i.text.length))}function T(r,n,i,a,o,s,c){e.Debug.assert(!c||!!o.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");var u=i.parent,l=i.propertyName,_=i.name,p=u.parent,m=C(r,n,i,o.checker);if(c||a.includes(m)){if(l?r===l?(p.moduleSpecifier||b(),s&&!o.options.isForRename&&o.markSeenReExportRHS(_)&&E(_,e.Debug.assertDefined(i.symbol),o)):o.markSeenReExportRHS(r)&&b():o.options.isForRename&&"default"===_.escapedText||b(),!I(o.options)||c){var g=80===r.originalKeywordKind||80===i.name.originalKeywordKind?1:0,y=e.Debug.assertDefined(i.symbol),h=e.Debug.assertDefined(t.getExportInfo(y,g,o.checker));d(r,y,h,o)}if(1!==a.comingFrom&&p.moduleSpecifier&&!l&&!I(o.options)){var v=o.checker.getExportSpecifierLocalTargetSymbol(i);v&&f(v,o)}}function b(){s&&E(r,m,o)}}function C(t,r,n,i){return function(t,r){var n=r.parent,i=r.propertyName,a=r.name;return e.Debug.assert(i===t||a===t),i?i===t:!n.parent.moduleSpecifier}(t,n)&&i.getExportSpecifierLocalTargetSymbol(n)||r}function E(t,r,n){var i="kind"in r?r:{kind:void 0,symbol:r},a=i.kind,o=i.symbol,s=n.referenceAdder(o);n.options.implementations?function(t,r,n){if(e.isDeclarationName(t)&&(i=t.parent,4194304&i.flags?!e.isInterfaceDeclaration(i)&&!e.isTypeAliasDeclaration(i):e.isVariableLike(i)?e.hasInitializer(i):e.isFunctionLikeDeclaration(i)?i.body:e.isClassLike(i)||e.isModuleOrEnumDeclaration(i)))return void r(t);var i;if(72!==t.kind)return;276===t.parent.kind&&P(t,n.checker,r);var a=function t(r){return e.isIdentifier(r)||e.isPropertyAccessExpression(r)?t(r.parent):e.isExpressionWithTypeArguments(r)?e.tryCast(r.parent.parent,e.isClassLike):void 0}(t);if(a)return void r(a);var o=e.findAncestor(t,function(t){return!e.isQualifiedName(t.parent)&&!e.isTypeNode(t.parent)&&!e.isTypeElement(t.parent)}),s=o.parent;if(e.hasType(s)&&s.type===o&&n.markSeenContainingTypeReference(s))if(e.hasInitializer(s))u(s.initializer);else if(e.isFunctionLike(s)&&s.body){var c=s.body;218===c.kind?e.forEachReturnStatement(c,function(e){e.expression&&u(e.expression)}):u(c)}else e.isAssertionExpression(s)&&u(s.expression);function u(e){(function e(t){switch(t.kind){case 195:return e(t.expression);case 197:case 196:case 188:case 209:case 187:return!0;default:return!1}})(e)&&r(e)}}(t,s,n):s(t,a)}function k(e){return e.members&&e.members.get("__constructor")}function N(e){return 72===e.kind&&151===e.parent.kind&&e.parent.name===e}function A(t,r,i,a,o,s,c){var u=e.getContainingObjectLiteralElement(r);if(u){var l=i.getShorthandAssignmentValueSymbol(r.parent);if(l&&a)return s(l,void 0,void 0,3);var _=i.getContextualType(u.parent),d=_&&e.firstDefined(e.getPropertySymbolsFromContextualType(u,i,_,!0),function(e){return D(e,4)});if(d)return d;var p=function(t,r){return e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent.parent)?r.getPropertySymbolOfDestructuringAssignment(t):void 0}(r,i),f=p&&s(p,void 0,void 0,4);if(f)return f;var m=l&&s(l,void 0,void 0,3);if(m)return m}var g=n(r,t,i);if(g){var y=s(g,void 0,void 0,1);if(y)return y}var h=D(t);if(h)return h;if(t.valueDeclaration&&e.isParameterPropertyDeclaration(t.valueDeclaration)){var v=i.getSymbolsOfParameterPropertyDeclaration(e.cast(t.valueDeclaration,e.isParameter),t.name);return e.Debug.assert(2===v.length&&!!(1&v[0].flags)&&!!(4&v[1].flags)),D(1&t.flags?v[1]:v[0])}if(!a){var b=void 0;return(b=o?e.isObjectBindingElementWithoutPropertyName(r.parent)?e.getPropertySymbolFromBindingElement(i,r.parent):void 0:x(t,i))&&D(b,4)}if(e.Debug.assert(a),o)return(b=x(t,i))&&D(b,4);function D(t,r){return e.firstDefined(i.getRootSymbols(t),function(n){return s(t,n,void 0,r)||(n.parent&&96&n.parent.flags&&c(n)?e.getPropertySymbolsFromBaseTypes(n.parent,n.name,i,function(e){return s(t,n,e,r)}):void 0)})}function x(t,r){var n=e.getDeclarationOfKind(t,186);if(n&&e.isObjectBindingElementWithoutPropertyName(n))return e.getPropertySymbolFromBindingElement(r,n)}}function F(t,r){var n=e.getMeaningFromLocation(t),i=r.declarations;if(i){var a=void 0;do{a=n;for(var o=0,s=i;o<s.length;o++){var c=s[o],u=e.getMeaningFromDeclaration(c);u&n&&(n|=u)}}while(n!==a)}return n}function P(t,r,n){var i=r.getSymbolAtLocation(t),a=r.getShorthandAssignmentValueSymbol(i.valueDeclaration);if(a)for(var o=0,s=a.getDeclarations();o<s.length;o++){var c=s[o];1&e.getMeaningFromDeclaration(c)&&n(c)}}function w(t,r,n){e.forEachChild(t,function(e){e.kind===r&&n(e),w(e,r,n)})}function I(e){return e.isForRename&&e.providePrefixAndSuffixTextForRename}r.eachExportReference=function(r,n,i,a,o,s,c,u){for(var l=t.createImportTracker(r,e.arrayToSet(r,function(e){return e.fileName}),n,i)(a,{exportKind:c?1:0,exportingModuleSymbol:o},!1),_=l.importSearches,d=l.indirectUsers,p=0,f=_;p<f.length;p++)u(f[p][0]);for(var m=0,g=d;m<g.length;m++)for(var h=0,v=y(g[m],c?"default":s);h<v.length;h++){var b=v[h];e.isIdentifier(b)&&!e.isImportOrExportSpecifier(b.parent)&&n.getSymbolAtLocation(b)===a&&u(b)}},r.isSymbolReferencedInFile=function(e,t,r){return g(e,t,r,function(){return!0})||!1},r.eachSymbolReferenceInFile=g,r.eachSignatureCall=function(t,r,n,i){if(t.name&&e.isIdentifier(t.name))for(var a=e.Debug.assertDefined(n.getSymbolAtLocation(t.name)),o=0,s=r;o<s.length;o++)for(var c=0,u=y(s[o],a.name);c<u.length;c++){var l=u[c];if(e.isIdentifier(l)&&l!==t.name&&l.escapedText===t.name.escapedText){var _=e.climbPastPropertyAccess(l),d=_.parent;if(e.isCallExpression(d)&&d.expression===_){var p=n.getSymbolAtLocation(l);p&&n.getRootSymbols(p).some(function(e){return e===a})&&i(d)}}}},r.getIntersectingMeaningFromDeclarations=F,r.getReferenceEntriesForShorthandPropertyAssignment=P}(t.Core||(t.Core={}))}(e.FindAllReferences||(e.FindAllReferences={}))}(c||(c={})),function(e){function t(t,n,i,a){var o=i(t);return function(t){var s=a&&a.tryGetSourcePosition({fileName:t,pos:0}),c=function(t){if(i(t)===o)return n;var r=e.tryRemoveDirectoryPrefix(t,o,i);return void 0===r?void 0:n+"/"+r}(s?s.fileName:t);return s?void 0===c?void 0:function(t,n,i,a){var o=e.getRelativePathFromFile(t,n,a);return r(e.getDirectoryPath(i),o)}(s.fileName,c,t,i):c}}function r(t,r){return e.ensurePathIsNonModuleName(function(t,r){return e.normalizePath(e.combinePaths(t,r))}(t,r))}function n(t,r){if(t){if(t.resolvedModule){var n=a(t.resolvedModule.resolvedFileName);if(n)return n}var i=e.forEach(t.failedLookupLocations,function(t){return e.endsWith(t,"/package.json")?void 0:a(t)});return i||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1}}function a(e){var t=r(e);return t&&{newFileName:t,updated:!0}}}function i(t,r){return e.createRange(t.getStart(r)+1,t.end-1)}function a(t,r){if(e.isObjectLiteralExpression(t))for(var n=0,i=t.properties;n<i.length;n++){var a=i[n];e.isPropertyAssignment(a)&&e.isStringLiteral(a.name)&&r(a,a.name.text)}}e.getEditsForFileRename=function(o,s,c,u,l,_,d){var p=e.hostUsesCaseSensitiveFileNames(u),f=e.createGetCanonicalFileName(p),m=t(s,c,f,d),g=t(c,s,f,d);return e.textChanges.ChangeTracker.with({host:u,formatContext:l},function(t){!function(t,n,o,s,c,u,l){var _=t.getCompilerOptions().configFile;if(_){var d=e.getDirectoryPath(_.fileName),p=e.getTsConfigObjectLiteralExpression(_);p&&a(p,function(t,r){switch(r){case"files":case"include":case"exclude":var i=f(t);if(!i&&"include"===r&&e.isArrayLiteralExpression(t.initializer)){var o=e.mapDefined(t.initializer.elements,function(t){return e.isStringLiteral(t)?t.text:void 0}),p=e.getFileMatcherPatterns(d,[],o,l,u);e.getRegexFromPattern(e.Debug.assertDefined(p.includeFilePattern),l).test(s)&&!e.getRegexFromPattern(e.Debug.assertDefined(p.includeFilePattern),l).test(c)&&n.insertNodeAfter(_,e.last(t.initializer.elements),e.createStringLiteral(g(c)))}break;case"compilerOptions":a(t.initializer,function(t,r){var n=e.getOptionFromName(r);n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?f(t):"paths"===r&&a(t.initializer,function(t){if(e.isArrayLiteralExpression(t.initializer))for(var r=0,n=t.initializer.elements;r<n.length;r++){var i=n[r];m(i)}})})}})}function f(t){for(var r=e.isArrayLiteralExpression(t.initializer)?t.initializer.elements:[t.initializer],n=!1,i=0,a=r;i<a.length;i++){var o=a[i];n=m(o)||n}return n}function m(t){if(!e.isStringLiteral(t))return!1;var a=r(d,t.text),s=o(a);return void 0!==s&&(n.replaceRangeWithText(_,i(t,_),g(s)),!0)}function g(t){return e.getRelativePathFromDirectory(d,t,!l)}}(o,t,m,s,c,u.getCurrentDirectory(),p),function(t,a,o,s,c,u){for(var l=t.getSourceFiles(),_=function(_){var d=o(_.path),p=void 0!==d?d:_.path,f=e.getDirectoryPath(p),m=s(_.fileName),g=m||_.fileName,y=e.getDirectoryPath(g),h=void 0!==d||void 0!==m;!function(t,r,n,a){for(var o=0,s=t.referencedFiles||e.emptyArray;o<s.length;o++){var c=s[o],u=n(c.fileName);void 0!==u&&u!==t.text.slice(c.pos,c.end)&&r.replaceRangeWithText(t,c,u)}for(var l=0,_=t.imports;l<_.length;l++){var d=_[l],u=a(d);void 0!==u&&u!==d.text&&r.replaceRangeWithText(t,i(d,t),u)}}(_,a,function(t){if(e.pathIsRelative(t)){var n=r(y,t),i=o(n);return void 0===i?void 0:e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(f,i,u))}},function(r){var i=t.getTypeChecker().getSymbolAtLocation(r);if(!i||!i.declarations.some(function(t){return e.isAmbientModule(t)})){var a=void 0!==m?n(e.resolveModuleName(r.text,g,t.getCompilerOptions(),c),o):function(t,r,i,a,o,s){if(t){var c=e.find(t.declarations,e.isSourceFile).fileName,u=s(c);return void 0===u?{newFileName:c,updated:!1}:{newFileName:u,updated:!0}}var l=o.resolveModuleNames?o.getResolvedModuleWithFailedLookupLocationsFromCache&&o.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,i.fileName):a.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,i.fileName);return n(l,s)}(i,r,_,t,c,o);return void 0!==a&&(a.updated||h&&e.pathIsRelative(r.text))?e.moduleSpecifiers.updateModuleSpecifier(t.getCompilerOptions(),p,a.newFileName,c,l,t.redirectTargetsMap,r.text):void 0}})},d=0,p=l;d<p.length;d++){var f=p[d];_(f)}}(o,t,m,g,u,f)})},e.getPathUpdater=t}(c||(c={})),function(e){!function(t){function r(t,r,i){var u,l,_=n(r,i,t);if(_)return[(u=_.fileName,l=_.file.fileName,{fileName:l,textSpan:e.createTextSpanFromBounds(0,0),kind:"script",name:u,containerName:void 0,containerKind:void 0})];var d=e.getTouchingPropertyName(r,i);if(d!==r){var p=d.parent;if(e.isJumpStatementTarget(d)){var f=e.getTargetLabel(d.parent,d.text);return f?[s(f,"label",d.text,void 0)]:void 0}var m=t.getTypeChecker(),g=function(e,t){var r=t.getSymbolAtLocation(e);if(r&&2097152&r.flags&&function(e,t){if(72!==e.kind)return!1;if(e.parent===t)return!0;switch(t.kind){case 250:case 248:return!0;case 253:return 252===t.parent.kind;default:return!1}}(e,r.declarations[0])){var n=t.getAliasedSymbol(r);if(n.declarations)return n}return r}(d,m);if(!g)return function(t,r){if(!e.isPropertyAccessExpression(t.parent)||t.parent.name!==t)return;var n=r.getTypeAtLocation(t.parent.expression);return e.mapDefined(n.isUnionOrIntersection()?n.types:[n],function(e){var t=r.getIndexInfoOfType(e,0);return t&&t.declaration&&c(r,t.declaration)})}(d,m);var y=function(t,r){var n=function(t){var r=function t(r){return e.isRightSideOfPropertyAccess(r)?t(r.parent):r}(t),n=r.parent;return n&&e.isCallLikeExpression(n)&&e.getInvokedExpression(n)===r?n:void 0}(r),i=n&&t.getResolvedSignature(n);return e.tryCast(i&&i.declaration,function(t){return e.isFunctionLike(t)&&!e.isFunctionTypeNode(t)})}(m,d);if(y&&(!e.isJsxOpeningLikeElement(d.parent)||!function(e){switch(e.kind){case 157:case 166:case 161:return!0;default:return!1}}(y))){var h=c(m,y);if(m.getRootSymbols(g).some(function(t){return function(t,r){return t===r.symbol||t===r.symbol.parent||!e.isCallLikeExpression(r.parent)&&t===r.parent.symbol}(t,y)})||g.declarations&&g.declarations.some(function(t){return e.isVariableDeclaration(t)&&!!t.initializer&&e.isRequireCall(t.initializer,!1)}))return[h];var v=a(m,g,d)||e.emptyArray;return 98===d.kind?[h].concat(v):v.concat([h])}if(276===d.parent.kind){var b=m.getShorthandAssignmentValueSymbol(g.valueDeclaration);return b?b.declarations.map(function(e){return o(e,m,b,d)}):[]}if(e.isPropertyName(d)&&e.isBindingElement(p)&&e.isObjectBindingPattern(p.parent)&&d===(p.propertyName||p.name)){var D=e.getNameFromPropertyName(d),x=m.getTypeAtLocation(p.parent);return void 0===D?e.emptyArray:e.flatMap(x.isUnion()?x.types:[x],function(e){var t=e.getProperty(D);return t&&a(m,t,d)})}var S=e.getContainingObjectLiteralElement(d);if(S){var T=S&&m.getContextualType(S.parent);if(T)return e.flatMap(e.getPropertySymbolsFromContextualType(S,m,T,!1),function(e){return a(m,e,d)})}return a(m,g,d)}}function n(t,r,n){var i=u(t.referencedFiles,r);if(i)return(s=e.tryResolveScriptReference(n,t,i))&&{fileName:i.fileName,file:s};var a=u(t.typeReferenceDirectives,r);if(a){var o=n.getResolvedTypeReferenceDirectives().get(a.fileName);return(s=o&&n.getSourceFile(o.resolvedFileName))&&{fileName:a.fileName,file:s}}var s,c=u(t.libReferenceDirectives,r);return c?(s=n.getLibFileFromReference(c))&&{fileName:c.fileName,file:s}:void 0}function i(t,r,n){return e.flatMap(!t.isUnion()||32&t.flags?[t]:t.types,function(e){return e.symbol&&a(r,e.symbol,n)})}function a(t,r,n){return function(){if(32&r.flags&&(e.isNewExpressionTarget(n)||124===n.kind)){var t=e.find(r.declarations,e.isClassLike)||e.Debug.fail("Expected declaration to have at least one class-like declaration");return i(t.members,!0)}}()||(e.isCallOrNewExpressionTarget(n)||e.isNameOfFunctionDeclaration(n)?i(r.declarations,!1):void 0)||e.map(r.declarations,function(e){return o(e,t,r,n)});function i(i,a){if(i){var s=i.filter(a?e.isConstructorDeclaration:e.isFunctionLike);return s.length?[o(e.find(s,function(e){return!!e.body})||e.last(s),t,r,n)]:void 0}}}function o(t,r,n,i){var a=r.symbolToString(n);return s(t,e.SymbolDisplay.getSymbolKind(r,n,i),a,n.parent?r.symbolToString(n.parent,i):"")}function s(t,r,n,i){var a=e.getNameOfDeclaration(t)||t,o=a.getSourceFile();return{fileName:o.fileName,textSpan:e.createTextSpanFromNode(a,o),kind:r,name:n,containerKind:void 0,containerName:i}}function c(e,t){return o(t,e,t.symbol,t)}function u(t,r){return e.find(t,function(t){return e.textRangeContainsPositionInclusive(t,r)})}t.getDefinitionAtPosition=r,t.getReferenceAtPosition=n,t.getTypeDefinitionAtPosition=function(t,r,n){var a=e.getTouchingPropertyName(r,n);if(a!==r){var o=t.getSymbolAtLocation(a);if(o){var s=t.getTypeOfSymbolAtLocation(o,a),c=function(t,r,n){if(r.symbol===t||t.valueDeclaration&&r.symbol&&e.isVariableDeclaration(t.valueDeclaration)&&t.valueDeclaration.initializer===r.symbol.valueDeclaration){var i=r.getCallSignatures();if(1===i.length)return n.getReturnTypeOfSignature(e.first(i))}}(o,s,t),u=c&&i(c,t,a);return u&&0!==u.length?u:i(s,t,a)}}},t.getDefinitionAndBoundSpan=function(t,n,i){var a=r(t,n,i);if(a&&0!==a.length){var o=u(n.referencedFiles,i)||u(n.typeReferenceDirectives,i)||u(n.libReferenceDirectives,i);if(o)return{definitions:a,textSpan:e.createTextSpanFromRange(o)};var s=e.getTouchingPropertyName(n,i);return{definitions:a,textSpan:e.createTextSpan(s.getStart(),s.getWidth())}}},t.findReferenceInPosition=u}(e.GoToDefinition||(e.GoToDefinition={}))}(c||(c={})),function(e){!function(t){var r,n,i=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","inheritdoc","inner","instance","interface","kind","lends","license","listens","member","memberof","method","mixes","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function a(e){var t=e.comment;switch(e.kind){case 300:return n(e.class);case 308:return i(e.typeParameters.map(function(e){return e.getText()}).join(", "));case 307:return n(e.typeExpression);case 309:case 302:case 310:case 304:var r=e.name;return r?n(r):t;default:return t}function n(e){return i(e.getText())}function i(e){return void 0===t?e:e+" "+t}}function o(e,t){if(e)for(var r=0;r<e.length;r++)if(e.indexOf(e[r])===r){var n=t(e[r],r);if(n)return n}}function s(t){return{name:t,kind:"",kindModifiers:"",displayParts:[e.textPart(t)],documentation:e.emptyArray,tags:void 0,codeActions:void 0}}function c(t){switch(t.kind){case 239:case 196:case 156:case 157:case 155:return{commentOwner:t,parameters:t.parameters};case 275:return c(t.initializer);case 240:case 241:case 153:case 243:case 278:case 242:return{commentOwner:t};case 219:var r=t.declarationList.declarations;return{commentOwner:t,parameters:1===r.length&&r[0].initializer?function(t){for(;195===t.kind;)t=t.expression;switch(t.kind){case 196:case 197:return t.parameters;case 209:var r=e.find(t.members,e.isConstructorDeclaration);return r?r.parameters:e.emptyArray}return e.emptyArray}(r[0].initializer):void 0};case 284:return"quit";case 244:return 244===t.parent.kind?void 0:{commentOwner:t};case 204:var n=t;return 0===e.getAssignmentDeclarationKind(n)?"quit":{commentOwner:t,parameters:e.isFunctionLike(n.right)?n.right.parameters:e.emptyArray}}}t.getJsDocCommentsFromDeclarations=function(t){var r=[];return o(t,function(t){for(var n=0,i=function(t){switch(t.kind){case 304:case 310:return[t];case 302:case 309:return[t,t.parent];default:return e.getJSDocCommentsAndTags(t)}}(t);n<i.length;n++){var a=i[n].comment;void 0!==a&&(r.length&&r.push(e.lineBreakPart()),r.push(e.textPart(a)))}}),r},t.getJsDocTagsFromDeclarations=function(t){var r=[];return o(t,function(t){for(var n=0,i=e.getJSDocTags(t);n<i.length;n++){var o=i[n];r.push({name:o.tagName.text,text:a(o)})}}),r},t.getJSDocTagNameCompletions=function(){return r||(r=e.map(i,function(e){return{name:e,kind:"keyword",kindModifiers:"",sortText:"0"}}))},t.getJSDocTagNameCompletionDetails=s,t.getJSDocTagCompletions=function(){return n||(n=e.map(i,function(e){return{name:"@"+e,kind:"keyword",kindModifiers:"",sortText:"0"}}))},t.getJSDocTagCompletionDetails=s,t.getJSDocParameterNameCompletions=function(t){if(!e.isIdentifier(t.name))return e.emptyArray;var r=t.name.text,n=t.parent,i=n.parent;return e.isFunctionLike(i)?e.mapDefined(i.parameters,function(i){if(e.isIdentifier(i.name)){var a=i.name.text;if(!n.tags.some(function(r){return r!==t&&e.isJSDocParameterTag(r)&&e.isIdentifier(r.name)&&r.name.escapedText===a})&&(void 0===r||e.startsWith(a,r)))return{name:a,kind:"parameter",kindModifiers:"",sortText:"0"}}}):[]},t.getJSDocParameterNameCompletionDetails=function(t){return{name:t,kind:"parameter",kindModifiers:"",displayParts:[e.textPart(t)],documentation:e.emptyArray,tags:void 0,codeActions:void 0}},t.getDocCommentTemplateAtPosition=function(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.findAncestor(i,e.isJSDoc);if(!a||void 0===a.comment&&!e.length(a.tags)){var o=i.getStart(r);if(a||!(o<n)){var s=function(t){return e.forEachAncestor(t,c)}(i);if(s){var u=s.commentOwner,l=s.parameters;if(!(u.getStart(r)<n)){if(!l||0===l.length)return{newText:"/** */",caretOffset:3};var _=function(t,r){for(var n=t.text,i=e.getLineStartPositionForPosition(r,t),a=i;a<=r&&e.isWhiteSpaceSingleLine(n.charCodeAt(a));a++);return n.slice(i,a)}(r,n),d="/**"+t+_+" * ";return{newText:d+t+function(e,t,r,n){return e.map(function(e,i){var a=e.name,o=e.dotDotDotToken,s=72===a.kind?a.text:"param"+i,c=t?o?"{...any} ":"{any} ":"";return r+" * @param "+c+s+n}).join("")}(l,e.hasJSFileExtension(r.fileName),_,t)+_+" */"+(o===n?t+_:""),caretOffset:d.length}}}}}}}(e.JsDoc||(e.JsDoc={}))}(c||(c={})),function(e){!function(t){function r(e,t){switch(e.kind){case 250:case 253:case 248:var r=t.getSymbolAtLocation(e.name),n=t.getAliasedSymbol(r);return r.escapedName!==n.escapedName;default:return!0}}function n(t,r){var n=e.getNameOfDeclaration(t);return!!n&&(a(n,r)||149===n.kind&&i(n.expression,r))}function i(t,r){return a(t,r)||e.isPropertyAccessExpression(t)&&(r.push(t.name.text),!0)&&i(t.expression,r)}function a(t,r){return e.isPropertyNameLiteral(t)&&(r.push(e.getTextOfIdentifierOrLiteral(t)),!0)}function o(t){var r=[],a=e.getNameOfDeclaration(t);if(a&&149===a.kind&&!i(a.expression,r))return e.emptyArray;r.shift();for(var o=e.getContainerNode(t);o;){if(!n(o,r))return e.emptyArray;o=e.getContainerNode(o)}return r.reverse()}function s(t,r){return e.compareValues(t.matchKind,r.matchKind)||e.compareStringsCaseSensitiveUI(t.name,r.name)}function c(t){var r=t.declaration,n=e.getContainerNode(r),i=n&&e.getNameOfDeclaration(n);return{name:t.name,kind:e.getNodeKind(r),kindModifiers:e.getNodeModifiers(r),matchKind:e.PatternMatchKind[t.matchKind],isCaseSensitive:t.isCaseSensitive,fileName:t.fileName,textSpan:e.createTextSpanFromNode(r),containerName:i?i.text:"",containerKind:i?e.getNodeKind(n):""}}t.getNavigateToItems=function(t,n,i,a,u,l){var _=e.createPatternMatcher(a);if(!_)return e.emptyArray;for(var d=[],p=function(e){if(i.throwIfCancellationRequested(),l&&e.isDeclarationFile)return"continue";e.getNamedDeclarations().forEach(function(t,i){!function(e,t,n,i,a,s){var c=e.getMatchForLastSegmentOfPattern(t);if(c)for(var u=0,l=n;u<l.length;u++){var _=l[u];if(r(_,i))if(e.patternContainsDots){var d=e.getFullMatch(o(_),t);d&&s.push({name:t,fileName:a,matchKind:d.kind,isCaseSensitive:d.isCaseSensitive,declaration:_})}else s.push({name:t,fileName:a,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:_})}}(_,i,t,n,e.fileName,d)})},f=0,m=t;f<m.length;f++)p(m[f]);return d.sort(s),(void 0===u?d:d.slice(0,u)).map(c)}}(e.NavigateTo||(e.NavigateTo={}))}(c||(c={})),function(e){!function(t){var r,n,i,a=/\s+/g,o=[],s=[];function c(){n=void 0,r=void 0,o=[],i=void 0,s=[]}function u(e){return e.getText(n)}function l(e){return e.node.kind}function _(e,t){e.children?e.children.push(t):e.children=[t]}function d(t){e.Debug.assert(!o.length);var r={node:t,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};i=r;for(var n=0,a=t.statements;n<a.length;n++){h(a[n])}return g(),e.Debug.assert(!i&&!o.length),r}function p(e){_(i,f(e))}function f(t){return{node:t,name:e.isDeclaration(t)||e.isExpression(t)?e.getNameOfDeclaration(t):void 0,additionalNodes:void 0,parent:i,children:void 0,indent:i.indent+1}}function m(e){var t=f(e);_(i,t),o.push(i),i=t}function g(){i.children&&(v(i.children,i),x(i.children)),i=o.pop()}function y(e,t){m(e),h(t),g()}function h(t){if(r.throwIfCancellationRequested(),t&&!e.isToken(t))switch(t.kind){case 157:var n=t;y(n,n.body);for(var i=0,a=n.parameters;i<a.length;i++){var o=a[i];e.isParameterPropertyDeclaration(o)&&p(o)}break;case 156:case 158:case 159:case 155:e.hasDynamicName(t)||y(t,t.body);break;case 154:case 153:e.hasDynamicName(t)||p(t);break;case 250:var s=t;s.name&&p(s.name);var c=s.namedBindings;if(c)if(251===c.kind)p(c);else for(var u=0,l=c.elements;u<l.length;u++){p(l[u])}break;case 186:case 237:var _=t,d=_.name,f=_.initializer;e.isBindingPattern(d)?h(d):f&&function(e){switch(e.kind){case 197:case 196:case 209:return!0;default:return!1}}(f)?f.name?h(f):(m(t),e.forEachChild(f,h),g()):y(t,f);break;case 197:case 239:case 196:y(t,t.body);break;case 243:m(t);for(var v=0,b=t.members;v<b.length;v++){F(S=b[v])||p(S)}g();break;case 240:case 209:case 241:m(t);for(var D=0,x=t.members;D<x.length;D++){var S;h(S=x[D])}g();break;case 244:y(t,function t(r){return r.body&&e.isModuleDeclaration(r.body)?t(r.body):r}(t).body);break;case 257:case 248:case 162:case 160:case 161:case 242:p(t);break;case 204:var T=e.getAssignmentDeclarationKind(t);switch(T){case 1:case 2:case 3:case 6:return void y(t,t.right);case 4:case 5:case 0:case 7:case 8:case 9:break;default:e.Debug.assertNever(T)}default:e.hasJSDocNodes(t)&&e.forEach(t.jsDoc,function(t){e.forEach(t.tags,function(t){e.isJSDocTypeAlias(t)&&p(t)})}),e.forEachChild(t,h)}}function v(t,r){var n=e.createMap();e.filterMutate(t,function(t){var i=e.getNameOfDeclaration(t.node),a=i&&u(i);if(!a)return!0;var o=n.get(a);if(!o)return n.set(a,t),!0;if(o instanceof Array){for(var s=0,c=o;s<c.length;s++){var l;if(b(l=c[s],t,r))return!1}return o.push(t),!0}return!b(l=o,t,r)&&(n.set(a,[l,t]),!0)})}function b(t,r,n){return!!function(t,r,n){if(t.kind!==r.kind||t.parent!==r.parent&&(!D(t,n)||!D(r,n)))return!1;switch(t.kind){case 154:case 156:case 158:case 159:return e.hasModifier(t,32)===e.hasModifier(r,32);case 244:return function e(t,r){return t.body.kind===r.body.kind&&(244!==t.body.kind||e(t.body,r.body))}(t,r);default:return!0}}(t.node,r.node,n)&&(function(t,r){var n;t.additionalNodes=t.additionalNodes||[],t.additionalNodes.push(r.node),r.additionalNodes&&(n=t.additionalNodes).push.apply(n,r.additionalNodes);t.children=e.concatenate(t.children,r.children),t.children&&(v(t.children,t),x(t.children))}(t,r),!0)}function D(t,r){var n=e.isModuleBlock(t.parent)?t.parent.parent:t.parent;return n===r.node||e.contains(r.additionalNodes,n)}function x(e){e.sort(S)}function S(t,r){return e.compareStringsCaseSensitiveUI(T(t.node),T(r.node))||e.compareValues(l(t),l(r))}function T(t){if(244===t.kind)return A(t);var r=e.getNameOfDeclaration(t);if(r&&e.isPropertyName(r))return e.unescapeLeadingUnderscores(e.getPropertyNameForPropertyNameNode(r));switch(t.kind){case 196:case 197:case 209:return I(t);default:return}}function C(t,r){if(244===t.kind)return A(t);if(r){var n=u(r);if(n.length>0)return n}switch(t.kind){case 284:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"<global>";case 197:case 239:case 196:case 240:case 209:return 512&e.getModifierFlags(t)?"default":I(t);case 157:return"constructor";case 161:return"new()";case 160:return"()";case 162:return"[]";default:return"<unknown>"}}function E(t){return{text:C(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:w(t.node),spans:N(t),nameSpan:t.name&&P(t.name),childItems:e.map(t.children,E)}}function k(t){return{text:C(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:w(t.node),spans:N(t),childItems:e.map(t.children,function(t){return{text:C(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:N(t),childItems:s,indent:0,bolded:!1,grayed:!1}})||s,indent:t.indent,bolded:!1,grayed:!1}}function N(e){var t=[P(e.node)];if(e.additionalNodes)for(var r=0,n=e.additionalNodes;r<n.length;r++){var i=n[r];t.push(P(i))}return t}function A(t){if(e.isAmbientModule(t))return e.getTextOfNode(t.name);var r=[];for(r.push(e.getTextOfIdentifierOrLiteral(t.name));t.body&&244===t.body.kind;)t=t.body,r.push(e.getTextOfIdentifierOrLiteral(t.name));return r.join(".")}function F(e){return!e.name||149===e.name.kind}function P(t){return 284===t.kind?e.createTextSpanFromRange(t):e.createTextSpanFromNode(t,n)}function w(t){return t.parent&&237===t.parent.kind&&(t=t.parent),e.getNodeModifiers(t)}function I(t){var r=t.parent;if(t.name&&e.getFullWidth(t.name)>0)return e.declarationNameToString(t.name);if(e.isVariableDeclaration(r))return e.declarationNameToString(r.name);if(e.isBinaryExpression(r)&&59===r.operatorToken.kind)return u(r.left).replace(a,"");if(e.isPropertyAssignment(r))return u(r.name);if(512&e.getModifierFlags(t))return"default";if(e.isClassLike(t))return"<class>";if(e.isCallExpression(r)){var i=function t(r){if(e.isIdentifier(r))return r.text;if(e.isPropertyAccessExpression(r)){var n=t(r.expression),i=r.name.text;return void 0===n?i:n+"."+i}return}(r.expression);if(void 0!==i)return i+"("+e.mapDefined(r.arguments,function(t){return e.isStringLiteralLike(t)?t.getText(n):void 0}).join(", ")+") callback"}return"<function>"}t.getNavigationBarItems=function(t,i){r=i,n=t;try{return e.map((a=d(t),o=[],function t(r){if(function(t){switch(l(t)){case 240:case 209:case 243:case 241:case 244:case 284:case 242:case 309:case 302:return!0;case 157:case 156:case 158:case 159:case 237:return r(t);case 197:case 239:case 196:return function(e){if(!e.node.body)return!1;switch(l(e.parent)){case 245:case 284:case 156:case 157:return!0;default:return r(e)}}(t);default:return!1}function r(t){return e.some(t.children,function(e){var t=l(e);return 237!==t&&186!==t})}}(r)&&(o.push(r),r.children))for(var n=0,i=r.children;n<i.length;n++){var a=i[n];t(a)}}(a),o),k)}finally{c()}var a,o},t.getNavigationTree=function(e,t){r=t,n=e;try{return E(d(e))}finally{c()}}}(e.NavigationBar||(e.NavigationBar={}))}(c||(c={})),function(e){!function(t){function r(t){return void 0!==t&&e.isStringLiteralLike(t)?t.text:void 0}function n(t){if(0===t.length)return t;var r=function(t){for(var r,n=[],i=[],a=[],o=0,s=t;o<s.length;o++){var c=s[o];if(void 0!==c.importClause){var u=c.importClause,l=u.name,_=u.namedBindings;l&&n.push(c),_&&(e.isNamespaceImport(_)?i.push(c):a.push(c))}else r=r||c}return{importWithoutClause:r,defaultImports:n,namespaceImports:i,namedImports:a}}(t),n=r.importWithoutClause,i=r.defaultImports,s=r.namespaceImports,u=r.namedImports,l=[];if(n&&l.push(n),1===i.length&&1===s.length&&0===u.length){var _=i[0];return l.push(a(_,_.importClause.name,s[0].importClause.namedBindings)),l}for(var d,p=0,f=e.stableSort(s,function(e,t){return c(e.importClause.namedBindings.name,t.importClause.namedBindings.name)});p<f.length;p++){var m=f[p];l.push(a(m,void 0,m.importClause.namedBindings))}if(0===i.length&&0===u.length)return l;var g=[];if(1===i.length)d=i[0].importClause.name;else for(var y=0,h=i;y<h.length;y++){_=h[y];g.push(e.createImportSpecifier(e.createIdentifier("default"),_.importClause.name))}g.push.apply(g,e.flatMap(u,function(e){return e.importClause.namedBindings.elements}));var v=o(g),b=i.length>0?i[0]:u[0],D=0===v.length?d?void 0:e.createNamedImports(e.emptyArray):0===u.length?e.createNamedImports(v):e.updateNamedImports(u[0].importClause.namedBindings,v);return l.push(a(b,d,D)),l}function i(t){if(0===t.length)return t;var r=function(e){for(var t,r=[],n=0,i=e;n<i.length;n++){var a=i[n];void 0===a.exportClause?t=t||a:r.push(a)}return{exportWithoutClause:t,namedExports:r}}(t),n=r.exportWithoutClause,i=r.namedExports,a=[];if(n&&a.push(n),0===i.length)return a;var s=[];s.push.apply(s,e.flatMap(i,function(e){return e.exportClause.elements}));var c=o(s),u=i[0];return a.push(e.updateExportDeclaration(u,u.decorators,u.modifiers,e.updateNamedExports(u.exportClause,c),u.moduleSpecifier)),a}function a(t,r,n){return e.updateImportDeclaration(t,t.decorators,t.modifiers,e.updateImportClause(t.importClause,r,n),t.moduleSpecifier)}function o(t){return e.stableSort(t,function(e,t){return c(e.propertyName||e.name,t.propertyName||t.name)||c(e.name,t.name)})}function s(t,n){var i=r(t),a=r(n);return e.compareBooleans(void 0===i,void 0===a)||e.compareBooleans(e.isExternalModuleNameRelative(i),e.isExternalModuleNameRelative(a))||e.compareStringsCaseInsensitive(i,a)}function c(t,r){return e.compareStringsCaseInsensitive(t.text,r.text)}t.organizeImports=function(t,o,c,u,l){var _=e.textChanges.ChangeTracker.fromContext({host:c,formatContext:o}),d=function(r){return n(function(t,r,n){for(var i=n.getTypeChecker(),o=i.getJsxNamespace(r),s=!!(2&r.transformFlags),c=[],u=0,l=t;u<l.length;u++){var _=l[u],d=_.importClause;if(d){var p=d.name,f=d.namedBindings;if(p&&!g(p)&&(p=void 0),f)if(e.isNamespaceImport(f))g(f.name)||(f=void 0);else{var m=f.elements.filter(function(e){return g(e.name)});m.length<f.elements.length&&(f=m.length?e.updateNamedImports(f,m):void 0)}(p||f)&&c.push(a(_,p,f))}else c.push(_)}return c;function g(t){return s&&t.text===o||e.FindAllReferences.Core.isSymbolReferencedInFile(t,i,r)}}(r,t,u))};g(t.statements.filter(e.isImportDeclaration),d),g(t.statements.filter(e.isExportDeclaration),i);for(var p=0,f=t.statements.filter(e.isAmbientModule);p<f.length;p++){var m=f[p];m.body&&(g(m.body.statements.filter(e.isImportDeclaration),d),g(m.body.statements.filter(e.isExportDeclaration),i))}return _.getChanges();function g(n,i){if(0!==e.length(n)){e.suppressLeadingTrivia(n[0]);var a=e.group(n,function(e){return r(e.moduleSpecifier)}),u=e.stableSort(a,function(e,t){return s(e[0].moduleSpecifier,t[0].moduleSpecifier)}),l=e.flatMap(u,function(e){return r(e[0].moduleSpecifier)?i(e):e});0===l.length?_.delete(t,n[0]):_.replaceNodeWithNodes(t,n[0],l,{leadingTriviaOption:e.textChanges.LeadingTriviaOption.Exclude,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include,suffix:e.getNewLineOrDefaultFromHost(c,o.options)});for(var d=1;d<n.length;d++)_.delete(t,n[d])}}},t.coalesceImports=n,t.coalesceExports=i,t.compareModuleSpecifiers=s}(e.OrganizeImports||(e.OrganizeImports={}))}(c||(c={})),function(e){!function(t){t.collectElements=function(t,r){var s=[];return function(t,r,n){for(var s=40,c=0,u=t.statements,l=u.length;c<l;){for(;c<l&&!e.isAnyImportSyntax(u[c]);)p(u[c]),c++;if(c===l)break;for(var _=c;c<l&&e.isAnyImportSyntax(u[c]);)i(u[c],t,r,n),c++;var d=c-1;d!==_&&n.push(a(e.findChildOfKind(u[_],92,t).getStart(t),u[d].getEnd(),"imports"))}function p(c){if(0!==s){r.throwIfCancellationRequested(),e.isDeclaration(c)&&i(c,t,r,n),function(t){if(!e.isFunctionExpression(t)&&!e.isArrowFunction(t))return!1;var r=e.findAncestor(t,e.isVariableStatement);return!!r&&e.getSingleInitializerOfVariableStatementOrPropertyDeclaration(r)===t}(c)&&i(c.parent.parent.parent,t,r,n);var u=function(t,r){switch(t.kind){case 218:if(e.isFunctionBlock(t))return l(t.parent,197!==t.parent.kind);switch(t.parent.kind){case 223:case 226:case 227:case 225:case 222:case 224:case 231:case 274:return l(t.parent);case 235:var n=t.parent;if(n.tryBlock===t)return l(t.parent);if(n.finallyBlock===t)return l(e.findChildOfKind(n,88,r));default:return o(e.createTextSpanFromNode(t,r),"code")}case 245:return l(t.parent);case 240:case 209:case 241:case 243:case 246:return l(t);case 188:return u(t);case 187:return u(t,22);case 260:return i=t,s=e.createTextSpanFromBounds(i.openingElement.getStart(r),i.closingElement.getEnd()),c=i.openingElement.tagName.getText(r),o(s,"code",s,!1,"<"+c+">...</"+c+">");case 261:case 262:return function(e){if(0!==e.properties.length)return a(e.getStart(r),e.getEnd(),"code")}(t.attributes)}var i,s,c;function u(t,r){return void 0===r&&(r=18),l(t,!1,!e.isArrayLiteralExpression(t.parent)&&!e.isCallExpression(t.parent),r)}function l(n,i,a,s){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===s&&(s=18);var c=e.findChildOfKind(t,s,r),u=18===s?19:23,l=e.findChildOfKind(t,u,r);if(c&&l){var _=e.createTextSpanFromBounds(a?c.getFullStart():c.getStart(r),l.getEnd());return o(_,"code",e.createTextSpanFromNode(n,r),i)}}}(c,t);u&&n.push(u),s--,e.isIfStatement(c)&&c.elseStatement&&e.isIfStatement(c.elseStatement)?(p(c.expression),p(c.thenStatement),s++,p(c.elseStatement),s--):c.forEachChild(p),s++}}}(t,r,s),function(t,r){for(var i=[],a=t.getLineStarts(),s=0;s<a.length;s++){var c=a[s],u=s+1===a.length?t.getEnd():a[s+1]-1,l=t.text.substring(c,u),_=n(l);if(_&&!e.isInComment(t,c))if(_[1]){var d=i.pop();d&&(d.textSpan.length=u-d.textSpan.start,d.hintSpan.length=u-d.textSpan.start,r.push(d))}else{var p=e.createTextSpanFromBounds(t.text.indexOf("//",c),u);i.push(o(p,"region",p,!1,_[2]||"#region"))}}}(t,s),s.sort(function(e,t){return e.textSpan.start-t.textSpan.start})};var r=/^\s*\/\/\s*#(end)?region(?:\s+(.*))?(?:\r)?$/;function n(e){return r.exec(e)}function i(t,r,i,o){var s=e.getLeadingCommentRangesOfNode(t,r);if(s){for(var c=-1,u=-1,l=0,_=r.getFullText(),d=0,p=s;d<p.length;d++){var f=p[d],m=f.kind,g=f.pos,y=f.end;switch(i.throwIfCancellationRequested(),m){case 2:if(n(_.slice(g,y))){h(),l=0;break}0===l&&(c=g),u=y,l++;break;case 3:h(),o.push(a(g,y,"comment")),l=0;break;default:e.Debug.assertNever(m)}}h()}function h(){l>1&&o.push(a(c,u,"comment"))}}function a(t,r,n){return o(e.createTextSpanFromBounds(t,r),n)}function o(e,t,r,n,i){return void 0===r&&(r=e),void 0===n&&(n=!1),void 0===i&&(i="..."),{textSpan:e,kind:t,hintSpan:r,bannerText:i,autoCollapse:n}}}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(c||(c={})),function(e){var t;function r(e,t){return{kind:e,isCaseSensitive:t}}function n(e,t){var r=t.get(e);return r||t.set(e,r=h(e)),r}function i(i,a,o){var s=function(e,t){for(var r=e.length-t.length,n=function(r){if(C(t,function(t,n){return d(e.charCodeAt(n+r))===t}))return{value:r}},i=0;i<=r;i++){var a=n(i);if("object"===f(a))return a.value}return-1}(i,a.textLowerCase);if(0===s)return r(a.text.length===i.length?t.exact:t.prefix,e.startsWith(i,a.text));if(a.isLowerCase){if(-1===s)return;for(var _=0,p=n(i,o);_<p.length;_++){var m=p[_];if(c(i,m,a.text,!0))return r(t.substring,c(i,m,a.text,!1))}if(a.text.length<i.length&&l(i.charCodeAt(s)))return r(t.substring,!1)}else{if(i.indexOf(a.text)>0)return r(t.substring,!0);if(a.characterSpans.length>0){var g=n(i,o),y=!!u(i,g,a,!1)||!u(i,g,a,!0)&&void 0;if(void 0!==y)return r(t.camelCase,y)}}}function a(e,t,r){if(C(t.totalTextChunk.text,function(e){return 32!==e&&42!==e})){var n=i(e,t.totalTextChunk,r);if(n)return n}for(var a,s=0,c=t.subWordTextChunks;s<c.length;s++){a=o(a,i(e,c[s],r))}return a}function o(t,r){return e.min(t,r,s)}function s(t,r){return void 0===t?1:void 0===r?-1:e.compareValues(t.kind,r.kind)||e.compareBooleans(!t.isCaseSensitive,!r.isCaseSensitive)}function c(e,t,r,n,i){return void 0===i&&(i={start:0,length:r.length}),i.length<=t.length&&T(0,i.length,function(a){return function(e,t,r){return r?d(e)===d(t):e===t}(r.charCodeAt(i.start+a),e.charCodeAt(t.start+a),n)})}function u(t,r,n,i){for(var a,o,s=n.characterSpans,u=0,_=0;;){if(_===s.length)return!0;if(u===r.length)return!1;for(var d=r[u],p=!1;_<s.length;_++){var f=s[_];if(p&&(!l(n.text.charCodeAt(s[_-1].start))||!l(n.text.charCodeAt(s[_].start))))break;if(!c(t,d,n.text,i,f))break;p=!0,a=void 0===a?u:a,o=void 0===o||o,d=e.createTextSpan(d.start+f.length,d.length-f.length)}p||void 0===o||(o=!1),u++}}function l(t){if(t>=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,7))return!1;var r=String.fromCharCode(t);return r===r.toUpperCase()}function _(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,7))return!1;var r=String.fromCharCode(t);return r===r.toLowerCase()}function d(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function p(e){return e>=48&&e<=57}function m(e){return l(e)||_(e)||p(e)||95===e||36===e}function g(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:y(e)}}function y(e){return v(e,!1)}function h(e){return v(e,!0)}function v(t,r){for(var n=[],i=0,a=1;a<t.length;a++){var o=p(t.charCodeAt(a-1)),s=p(t.charCodeAt(a)),c=S(t,r,a),u=r&&x(t,a,i);(b(t.charCodeAt(a-1))||b(t.charCodeAt(a))||o!==s||c||u)&&(D(t,i,a)||n.push(e.createTextSpan(i,a-i)),i=a)}return D(t,i,t.length)||n.push(e.createTextSpan(i,t.length-i)),n}function b(e){switch(e){case 33:case 34:case 35:case 37:case 38:case 39:case 40:case 41:case 42:case 44:case 45:case 46:case 47:case 58:case 59:case 63:case 64:case 91:case 92:case 93:case 95:case 123:case 125:return!0}return!1}function D(e,t,r){return C(e,function(e){return b(e)&&95!==e},t,r)}function x(e,t,r){return t!==r&&t+1<e.length&&l(e.charCodeAt(t))&&_(e.charCodeAt(t+1))&&C(e,l,r,t)}function S(e,t,r){var n=l(e.charCodeAt(r-1));return l(e.charCodeAt(r))&&(!t||!n)}function T(e,t,r){for(var n=e;n<t;n++)if(!r(n))return!1;return!0}function C(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=e.length),T(r,n,function(r){return t(e.charCodeAt(r),r)})}!function(e){e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase"}(t=e.PatternMatchKind||(e.PatternMatchKind={})),e.createPatternMatcher=function(t){var r=e.createMap(),n=t.trim().split(".").map(function(e){return{totalTextChunk:g(t=e.trim()),subWordTextChunks:function(e){for(var t=[],r=0,n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);m(a)?(0===n&&(r=i),n++):n>0&&(t.push(g(e.substr(r,n))),n=0)}return n>0&&t.push(g(e.substr(r,n))),t}(t)};var t});if(!n.some(function(e){return!e.subWordTextChunks.length}))return{getFullMatch:function(t,i){return function(t,r,n,i){var s;if(a(r,e.last(n),i)&&!(n.length-1>t.length)){for(var c=n.length-2,u=t.length-1;c>=0;c-=1,u-=1)s=o(s,a(t[u],n[c],i));return s}}(t,i,n,r)},getMatchForLastSegmentOfPattern:function(t){return a(t,e.last(n),r)},patternContainsDots:n.length>1}},e.breakIntoCharacterSpans=y,e.breakIntoWordSpans=h}(c||(c={})),function(e){e.preProcessFile=function(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var i,a,o,s={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},c=[],u=0,l=!1;function _(){return a=o,18===(o=e.scanner.scan())?u++:19===o&&u--,o}function d(){var t=e.scanner.getTokenValue(),r=e.scanner.getTokenPos();return{fileName:t,pos:r,end:r+t.length}}function p(){c.push(d()),f()}function f(){0===u&&(l=!0)}function m(){var t=e.scanner.getToken();return 125===t&&(130===(t=_())&&10===(t=_())&&(i||(i=[]),i.push({ref:d(),depth:u})),!0)}function g(){if(24===a)return!1;var t=e.scanner.getToken();if(92===t){if(20===(t=_())){if(10===(t=_()))return p(),!0}else{if(10===t)return p(),!0;if(72===t||e.isKeyword(t))if(144===(t=_())){if(10===(t=_()))return p(),!0}else if(59===t){if(h(!0))return!0}else{if(27!==t)return!0;t=_()}if(18===t){for(t=_();19!==t&&1!==t;)t=_();19===t&&144===(t=_())&&10===(t=_())&&p()}else 40===t&&119===(t=_())&&(72===(t=_())||e.isKeyword(t))&&144===(t=_())&&10===(t=_())&&p()}return!0}return!1}function y(){var t=e.scanner.getToken();if(85===t){if(f(),18===(t=_())){for(t=_();19!==t&&1!==t;)t=_();19===t&&144===(t=_())&&10===(t=_())&&p()}else if(40===t)144===(t=_())&&10===(t=_())&&p();else if(92===t&&(72===(t=_())||e.isKeyword(t))&&59===(t=_())&&h(!0))return!0;return!0}return!1}function h(t){var r=t?_():e.scanner.getToken();return 134===r&&(20===(r=_())&&10===(r=_())&&p(),!0)}function v(){var t=e.scanner.getToken();if(72===t&&"define"===e.scanner.getTokenValue()){if(20!==(t=_()))return!0;if(10===(t=_())){if(27!==(t=_()))return!0;t=_()}if(22!==t)return!0;for(t=_();23!==t&&1!==t;)10===t&&p(),t=_();return!0}return!1}if(r&&function(){for(e.scanner.setText(t),_();1!==e.scanner.getToken();)m()||g()||y()||n&&(h(!1)||v())||_();e.scanner.setText(void 0)}(),e.processCommentPragmas(s,t),e.processPragmasIntoFields(s,e.noop),l){if(i)for(var b=0,D=i;b<D.length;b++){var x=D[b];c.push(x.ref)}return{referencedFiles:s.referencedFiles,typeReferenceDirectives:s.typeReferenceDirectives,libReferenceDirectives:s.libReferenceDirectives,importedFiles:c,isLibFile:!!s.hasNoDefaultLib,ambientExternalModules:void 0}}var S=void 0;if(i)for(var T=0,C=i;T<C.length;T++)0===(x=C[T]).depth?(S||(S=[]),S.push(x.ref.fileName)):c.push(x.ref);return{referencedFiles:s.referencedFiles,typeReferenceDirectives:s.typeReferenceDirectives,libReferenceDirectives:s.libReferenceDirectives,importedFiles:c,isLibFile:!!s.hasNoDefaultLib,ambientExternalModules:S}}}(c||(c={})),function(e){!function(t){function r(t){return{canRename:!1,localizedErrorMessage:e.getLocaleSpecificMessage(t)}}t.getRenameInfo=function(t,n,i,a){var o=e.getTouchingPropertyName(n,i);return(o&&function(t){switch(t.kind){case 72:case 10:case 100:return!0;case 8:return e.isLiteralNameOfPropertyDeclarationOrIndexAccess(t);default:return!1}}(o)?function(t,n,i,a,o){var s=n.getSymbolAtLocation(t);if(s){var c=s.declarations;if(c&&0!==c.length){if(c.some(a))return r(e.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(!(e.isIdentifier(t)&&80===t.originalKeywordKind&&1536&s.parent.flags)){if(e.isStringLiteralLike(t)&&e.tryGetImportFromModuleSpecifier(t))return o&&o.allowRenameOfImportPath?function(t,n,i){if(!e.isExternalModuleNameRelative(t.text))return r(e.Diagnostics.You_cannot_rename_a_module_via_a_global_import);var a=e.find(i.declarations,e.isSourceFile);if(a){var o=e.endsWith(t.text,"/index")||e.endsWith(t.text,"/index.js")?void 0:e.tryRemoveSuffix(e.removeFileExtension(a.fileName),"/index"),s=void 0===o?a.fileName:o,c=void 0===o?"module":"directory",u=t.text.lastIndexOf("/")+1,l=e.createTextSpan(t.getStart(n)+1+u,t.text.length-u);return{canRename:!0,fileToRename:s,kind:c,displayName:s,fullDisplayName:s,kindModifiers:"",triggerSpan:l}}}(t,i,s):void 0;var u=e.SymbolDisplay.getSymbolKind(n,s,t),l=e.isImportOrExportSpecifierName(t)||e.isStringOrNumericLiteralLike(t)&&149===t.parent.kind?e.stripQuotes(e.getTextOfIdentifierOrLiteral(t)):void 0,_=l||n.symbolToString(s),d=l||n.getFullyQualifiedName(s);return function(t,r,n,i,a,o){return{canRename:!0,fileToRename:void 0,kind:n,displayName:t,fullDisplayName:r,kindModifiers:i,triggerSpan:function(t,r){var n=t.getStart(r),i=t.getWidth(r);return 10===t.kind&&(n+=1,i-=2),e.createTextSpan(n,i)}(a,o)}}(_,d,u,e.SymbolDisplay.getSymbolModifiers(s),t,i)}}}}(o,t.getTypeChecker(),n,function(e){return t.isSourceFileDefaultLibrary(e.getSourceFile())},a):void 0)||r(e.Diagnostics.You_cannot_rename_this_element)}}(e.Rename||(e.Rename={}))}(c||(c={})),function(e){!function(t){var r,n;function i(t,r,n){var i=e.Debug.assertDefined(e.findPrecedingToken(t.getFullStart(),r,t.parent,!0));return e.rangeContainsRange(n,i)}function a(t,r){var n=function(t,r){if(28===t.kind||20===t.kind)return{list:function(t,r,n){var i=t.getChildren(n),a=i.indexOf(r);return e.Debug.assert(a>=0&&i.length>a+1),i[a+1]}(t.parent,t,r),argumentIndex:0};var n=e.findContainingList(t);return n&&{list:n,argumentIndex:function(e,t){for(var r=0,n=0,i=e.getChildren();n<i.length;n++){var a=i[n];if(a===t)break;27!==a.kind&&r++}return r}(n,t)}}(t,r);if(n){var i=n.list,a=n.argumentIndex,o=function(t){var r=t.getChildren(),n=e.countWhere(r,function(e){return 27!==e.kind});r.length>0&&27===e.last(r).kind&&n++;return n}(i);return 0!==a&&e.Debug.assertLessThan(a,o),{list:i,argumentIndex:a,argumentCount:o,argumentsSpan:function(t,r){var n=t.getFullStart(),i=e.skipTrivia(r.text,t.getEnd(),!1);return e.createTextSpan(n,i-n)}(i,r)}}}function o(t,r,n){var i=t.parent;if(e.isCallOrNewExpression(i)){var o=i,s=a(t,n);if(!s)return;var u=s.list,l=s.argumentIndex,_=s.argumentCount,d=s.argumentsSpan;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===u.pos,invocation:{kind:0,node:o},argumentsSpan:d,argumentIndex:l,argumentCount:_}}if(e.isNoSubstitutionTemplateLiteral(t)&&e.isTaggedTemplateExpression(i))return e.isInsideTemplateLiteral(t,r,n)?c(i,0,n):void 0;if(e.isTemplateHead(t)&&193===i.parent.kind){var p=i,f=p.parent;return e.Debug.assert(206===p.kind),c(f,l=e.isInsideTemplateLiteral(t,r,n)?0:1,n)}if(e.isTemplateSpan(i)&&e.isTaggedTemplateExpression(i.parent.parent)){var m=i;f=i.parent.parent;if(e.isTemplateTail(t)&&!e.isInsideTemplateLiteral(t,r,n))return;return c(f,l=function(t,r,n,i){if(e.Debug.assert(n>=r.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralToken(r))return e.isInsideTemplateLiteral(r,n,i)?0:t+2;return t+1}(m.parent.templateSpans.indexOf(m),t,r,n),n)}if(e.isJsxOpeningLikeElement(i)){var g=i.attributes.pos,y=e.skipTrivia(n.text,i.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:e.createTextSpan(g,y-g),argumentIndex:0,argumentCount:1}}var h=e.getPossibleTypeArgumentsInfo(t,n);if(h){var v=h.called,b=h.nTypeArguments;return{isTypeParameterList:!0,invocation:o={kind:1,called:v},argumentsSpan:d=e.createTextSpanFromBounds(v.getStart(n),t.end),argumentIndex:b,argumentCount:b+1}}}function s(t){return e.isBinaryExpression(t.left)?s(t.left)+1:2}function c(t,r,n){var i=e.isNoSubstitutionTemplateLiteral(t.template)?1:t.template.templateSpans.length+1;return 0!==r&&e.Debug.assertLessThan(r,i),{isTypeParameterList:!1,invocation:{kind:0,node:t},argumentsSpan:function(t,r){var n=t.template,i=n.getStart(),a=n.getEnd();if(206===n.kind){var o=e.last(n.templateSpans);0===o.literal.getFullWidth()&&(a=e.skipTrivia(r.text,a,!1))}return e.createTextSpan(i,a-i)}(t,n),argumentIndex:r,argumentCount:i}}function u(t){return 0===t.kind?e.getInvokedExpression(t.node):t.called}function l(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}!function(e){e[e.Call=0]="Call",e[e.TypeArgs=1]="TypeArgs",e[e.Contextual=2]="Contextual"}(r||(r={})),t.getSignatureHelpItems=function(t,r,n,c,_){var g=t.getTypeChecker(),y=e.findTokenOnLeftOfPosition(r,n);if(y){var h=!!c&&"characterTyped"===c.kind;if(!h||!e.isInString(r,n,y)&&!e.isInComment(r,n)){var v=!!c&&"invoked"===c.kind,b=function(t,r,n,i,c){for(var u=function(t){e.Debug.assert(e.rangeContainsRange(t.parent,t),"Not a subspan",function(){return"Child: "+e.Debug.showSyntaxKind(t)+", parent: "+e.Debug.showSyntaxKind(t.parent)});var c=function(t,r,n,i){return function(t,r,n,i){var o=function(t,r,n){if(20===t.kind||27===t.kind){var i=t.parent;switch(i.kind){case 195:case 156:case 196:case 197:var o=a(t,r);if(!o)return;var c=o.argumentIndex,u=o.argumentCount,l=o.argumentsSpan,_=e.isMethodDeclaration(i)?n.getContextualTypeForObjectLiteralElement(i):n.getContextualType(i);return _&&{contextualType:_,argumentIndex:c,argumentCount:u,argumentsSpan:l};case 204:var d=function t(r){return e.isBinaryExpression(r.parent)?t(r.parent):r}(i),p=n.getContextualType(d),f=20===t.kind?0:s(i)-1,m=s(d);return p&&{contextualType:p,argumentIndex:f,argumentCount:m,argumentsSpan:e.createTextSpanFromNode(i)};default:return}}}(t,n,i);if(o){var c,u=o.contextualType,l=o.argumentIndex,_=o.argumentCount,d=o.argumentsSpan,p=u.getCallSignatures();return 1!==p.length?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:e.first(p),node:t,symbol:(c=u.symbol,"__type"===c.name&&e.firstDefined(c.declarations,function(t){return e.isFunctionTypeNode(t)?t.parent.symbol:void 0})||c)},argumentsSpan:d,argumentIndex:l,argumentCount:_}}}(t,0,n,i)||o(t,r,n)}(t,r,n,i);if(c)return{value:c}},l=t;!e.isSourceFile(l)&&(c||!e.isBlock(l));l=l.parent){var _=u(l);if("object"===f(_))return _.value}}(y,n,r,g,v);if(b){_.throwIfCancellationRequested();var D=function(t,r,n,a,o){var s=t.invocation,c=t.argumentCount;switch(s.kind){case 0:if(o&&!function(t,r,n){if(!e.isCallOrNewExpression(r))return!1;var a=r.getChildren(n);switch(t.kind){case 20:return e.contains(a,t);case 27:var o=e.findContainingList(t);return!!o&&e.contains(a,o);case 28:return i(t,n,r.expression);default:return!1}}(a,s.node,n))return;var u=[],l=r.getResolvedSignatureForSignatureHelp(s.node,u,c);return 0===u.length?void 0:{kind:0,candidates:u,resolvedSignature:l};case 1:var _=s.called;if(o&&!i(a,n,e.isIdentifier(_)?_.parent:_))return;var u=e.getPossibleGenericSignatures(_,c,r);if(0!==u.length)return{kind:0,candidates:u,resolvedSignature:e.first(u)};var d=r.getSymbolAtLocation(_);return d&&{kind:1,symbol:d};case 2:return{kind:0,candidates:[s.signature],resolvedSignature:s.signature};default:return e.Debug.assertNever(s)}}(b,g,r,y,h);return _.throwIfCancellationRequested(),D?g.runWithCancellationToken(_,function(t){return 0===D.kind?d(D.candidates,D.resolvedSignature,b,r,t):function(t,r,n,i){var a=r.argumentCount,o=r.argumentsSpan,s=r.invocation,c=r.argumentIndex,u=i.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(t);return u?{items:[function(t,r,n,i,a){var o=e.symbolToDisplayParts(n,t),s=e.createPrinter({removeComments:!0}),c=r.map(function(e){return m(e,n,i,a,s)}),u=t.getDocumentationComment(n),l=t.getJsDocTags();return{isVariadic:!1,prefixDisplayParts:o.concat([e.punctuationPart(28)]),suffixDisplayParts:[e.punctuationPart(30)],separatorDisplayParts:p,parameters:c,documentation:u,tags:l}}(t,u,i,l(s),n)],applicableSpan:o,selectedItemIndex:0,argumentIndex:c,argumentCount:a}:void 0}(D.symbol,b,r,t)}):e.isSourceFileJS(r)?function(t,r,n){if(2!==t.invocation.kind){var i=u(t.invocation),a=e.isIdentifier(i)?i.text:e.isPropertyAccessExpression(i)?i.name.text:void 0,o=r.getTypeChecker();return void 0===a?void 0:e.firstDefined(r.getSourceFiles(),function(r){return e.firstDefined(r.getNamedDeclarations().get(a),function(e){var i=e.symbol&&o.getTypeOfSymbolAtLocation(e.symbol,e),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,function(e){return d(a,a[0],t,r,e)})})})}}(b,t,_):void 0}}}},function(e){e[e.Candidate=0]="Candidate",e[e.Type=1]="Type"}(n||(n={})),t.getArgumentInfoForCompletions=function(e,t,r){var n=o(e,t,r);return!n||n.isTypeParameterList||0!==n.invocation.kind?void 0:{invocation:n.invocation.node,argumentCount:n.argumentCount,argumentIndex:n.argumentIndex}};var _=70246400;function d(t,r,n,i,a){var o=n.isTypeParameterList,s=n.argumentCount,c=n.argumentsSpan,d=n.invocation,f=n.argumentIndex,g=l(d),y=2===d.kind?d.symbol:a.getSymbolAtLocation(u(d)),h=y?e.symbolToDisplayParts(a,y,void 0,void 0):e.emptyArray,v=t.map(function(t){return function(t,r,n,i,a,o){var s=(n?function(t,r,n,i){var a=(t.target||t).typeParameters,o=e.createPrinter({removeComments:!0}),s=(a||e.emptyArray).map(function(e){return m(e,r,n,i,o)}),c=e.mapToDisplayParts(function(a){var s=t.thisParameter?[r.symbolToParameterDeclaration(t.thisParameter,n,_)]:[],c=e.createNodeArray(s.concat(r.getExpandedParameters(t).map(function(e){return r.symbolToParameterDeclaration(e,n,_)})));o.writeList(2576,c,i,a)});return{isVariadic:!1,parameters:s,prefix:[e.punctuationPart(28)],suffix:[e.punctuationPart(30)].concat(c)}}:function(t,r,n,i){var a=r.hasEffectiveRestParameter(t),o=e.createPrinter({removeComments:!0}),s=e.mapToDisplayParts(function(a){if(t.typeParameters&&t.typeParameters.length){var s=e.createNodeArray(t.typeParameters.map(function(e){return r.typeParameterToDeclaration(e,n)}));o.writeList(53776,s,i,a)}}),c=r.getExpandedParameters(t).map(function(t){return function(t,r,n,i,a){var o=e.mapToDisplayParts(function(e){var o=r.symbolToParameterDeclaration(t,n,_);a.writeNode(4,o,i,e)}),s=r.isOptionalParameter(t.valueDeclaration);return{name:t.name,documentation:t.getDocumentationComment(r),displayParts:o,isOptional:s}}(t,r,n,i,o)});return{isVariadic:a,parameters:c,prefix:s.concat([e.punctuationPart(20)]),suffix:[e.punctuationPart(21)]}})(t,i,a,o),c=s.isVariadic,u=s.parameters,l=s.prefix,d=s.suffix,f=r.concat(l),g=d.concat(function(t,r,n){return e.mapToDisplayParts(function(e){e.writePunctuation(":"),e.writeSpace(" ");var i=n.getTypePredicateOfSignature(t);i?n.writeTypePredicate(i,r,void 0,e):n.writeType(n.getReturnTypeOfSignature(t),r,void 0,e)})}(t,a,i)),y=t.getDocumentationComment(i),h=t.getJsDocTags();return{isVariadic:c,prefixDisplayParts:f,suffixDisplayParts:g,separatorDisplayParts:p,parameters:u,documentation:y,tags:h}}(t,h,o,a,g,i)});0!==f&&e.Debug.assertLessThan(f,s);var b=t.indexOf(r);return e.Debug.assert(-1!==b),{items:v,applicableSpan:c,selectedItemIndex:b,argumentIndex:f,argumentCount:s}}var p=[e.punctuationPart(27),e.spacePart()];function m(t,r,n,i,a){var o=e.mapToDisplayParts(function(e){var o=r.typeParameterToDeclaration(t,n);a.writeNode(4,o,i,e)});return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(r),displayParts:o,isOptional:!1}}}(e.SignatureHelp||(e.SignatureHelp={}))}(c||(c={})),function(e){var t=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;function r(t,r,n){var i=e.tryParseRawSourceMap(r);if(i&&i.sources&&i.file&&i.mappings)return e.createDocumentPositionMapper(t,i,n)}e.getSourceMapper=function(t){var r=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames()),n=t.getCurrentDirectory(),i=e.createMap(),a=e.createMap();return{tryGetSourcePosition:function t(r){if(e.isDeclarationFileName(r.fileName)){var n=c(r.fileName);if(n){var i=s(r.fileName).getSourcePosition(r);return i&&i!==r?t(i)||i:void 0}}},tryGetGeneratedPosition:function(i){if(!e.isDeclarationFileName(i.fileName)&&c(i.fileName)){var a=t.getProgram(),o=a.getCompilerOptions(),u=o.outFile||o.out,l=u?e.removeFileExtension(u)+".d.ts":e.getDeclarationEmitOutputFilePathWorker(i.fileName,a.getCompilerOptions(),n,a.getCommonSourceDirectory(),r);if(void 0!==l){var _=s(l,i.fileName).getGeneratedPosition(i);return _===i?void 0:_}}},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){i.clear(),a.clear()}};function o(t){return e.toPath(t,n,r)}function s(n,i){var s,c=o(n),u=a.get(c);if(u)return u;if(t.getDocumentPositionMapper)s=t.getDocumentPositionMapper(n,i);else if(t.readFile){var _=l(n);s=_&&e.getDocumentPositionMapper({getSourceFileLike:l,getCanonicalFileName:r,log:function(e){return t.log(e)}},n,e.getLineInfo(_.text,e.getLineStarts(_)),function(e){return!t.fileExists||t.fileExists(e)?t.readFile(e):void 0})}return a.set(c,s||e.identitySourceMapConsumer),s||e.identitySourceMapConsumer}function c(e){var r=t.getProgram();if(r){var n=o(e),i=r.getSourceFileByPath(n);return i&&i.resolvedPath===n?i:void 0}}function u(r){var n=o(r),a=i.get(n);if(void 0!==a)return a||void 0;if(t.readFile&&(!t.fileExists||t.fileExists(n))){var s=t.readFile(n),c=!!s&&function(t,r){return{text:t,lineMap:r,getLineAndCharacterOfPosition:function(t){return e.computeLineAndCharacterOfPosition(e.getLineStarts(this),t)}}}(s);return i.set(n,c),c||void 0}i.set(n,!1)}function l(e){return t.getSourceFileLike?t.getSourceFileLike(e):c(e)||u(e)}},e.getDocumentPositionMapper=function(n,i,a,o){var s=e.tryGetSourceMappingURL(a);if(s){var c=t.exec(s);if(c){if(c[1]){var u=c[1];return r(n,e.base64decode(e.sys,u),i)}s=void 0}}var l=[];s&&l.push(s),l.push(i+".map");for(var _=s&&e.getNormalizedAbsolutePath(s,e.getDirectoryPath(i)),d=0,p=l;d<p.length;d++){var f=p[d],m=e.getNormalizedAbsolutePath(f,e.getDirectoryPath(i)),g=o(m,_);if(e.isString(g))return r(n,g,m);if(void 0!==g)return g||void 0}}}(c||(c={})),function(e){var t=e.createMap();function r(t){switch(t.kind){case 249:var r=t.importClause,n=t.moduleSpecifier;return r&&!r.name&&r.namedBindings&&251===r.namedBindings.kind&&e.isStringLiteral(n)?r.namedBindings.name:void 0;case 248:return t.name;default:return}}function n(t){return e.isReturnStatement(t)&&!!t.expression&&i(t.expression)}function i(t){if(!a(t)||!t.arguments.every(o))return!1;for(var r=t.expression;a(r)||e.isPropertyAccessExpression(r);){if(e.isCallExpression(r)&&!r.arguments.every(o))return!1;r=r.expression}return!0}function a(t){return e.isCallExpression(t)&&(e.hasPropertyAccessExpressionWithName(t,"then")||e.hasPropertyAccessExpressionWithName(t,"catch"))}function o(e){switch(e.kind){case 239:case 196:case 197:t.set(s(e),!0);case 96:case 72:return!0;default:return!1}}function s(e){return e.pos.toString()+":"+e.end.toString()}e.computeSuggestionDiagnostics=function(i,a,o){a.getSemanticDiagnostics(i,o);var c,u=[],l=a.getTypeChecker();i.commonJsModuleIndicator&&(e.programContainsEs6Modules(a)||e.compilerOptionsIndicateEs6Modules(a.getCompilerOptions()))&&function(t){return t.statements.some(function(t){switch(t.kind){case 219:return t.declarationList.declarations.some(function(t){return!!t.initializer&&e.isRequireCall(function t(r){return e.isPropertyAccessExpression(r)?t(r.expression):r}(t.initializer),!0)});case 221:var r=t.expression;if(!e.isBinaryExpression(r))return e.isRequireCall(r,!0);var n=e.getAssignmentDeclarationKind(r);return 1===n||2===n;default:return!1}})}(i)&&u.push(e.createDiagnosticForNode((c=i.commonJsModuleIndicator,e.isBinaryExpression(c)?c.left:c),e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module));var _=e.isSourceFileJS(i);if(t.clear(),function r(a){if(_)switch(a.kind){case 196:var o=e.getDeclarationOfExpando(a);if(o){var c=o.symbol;if(c&&(c.exports&&c.exports.size||c.members&&c.members.size)){u.push(e.createDiagnosticForNode(e.isVariableDeclaration(a.parent)?a.parent.name:a,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration));break}}case 239:var d=a.symbol;d.members&&d.members.size>0&&u.push(e.createDiagnosticForNode(e.isVariableDeclaration(a.parent)?a.parent.name:a,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration))}else{if(e.isVariableStatement(a)&&a.parent===i&&2&a.declarationList.flags&&1===a.declarationList.declarations.length){var p=a.declarationList.declarations[0].initializer;p&&e.isRequireCall(p,!0)&&u.push(e.createDiagnosticForNode(p,e.Diagnostics.require_call_may_be_converted_to_an_import))}e.codefix.parameterShouldGetTypeFromJSDoc(a)&&u.push(e.createDiagnosticForNode(a.name||a,e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types))}e.isFunctionLikeDeclaration(a)&&function(r,i,a){(function(t,r){return!e.isAsyncFunction(t)&&t.body&&e.isBlock(t.body)&&(i=t.body,!!e.forEachReturnStatement(i,n))&&function(e,t){var r=t.getTypeAtLocation(e),n=t.getSignaturesOfType(r,0),i=n.length?t.getReturnTypeOfSignature(n[0]):void 0;return!!i&&!!t.getPromisedTypeOfPromise(i)}(t,r);var i})(r,i)&&!t.has(s(r))&&a.push(e.createDiagnosticForNode(!r.name&&e.isVariableDeclaration(r.parent)&&e.isIdentifier(r.parent.name)?r.parent.name:r,e.Diagnostics.This_may_be_converted_to_an_async_function))}(a,l,u),a.forEachChild(r)}(i),e.getAllowSyntheticDefaultImports(a.getCompilerOptions()))for(var d=0,p=i.imports;d<p.length;d++){var f=p[d],m=r(e.importFromModuleSpecifier(f));if(m){var g=e.getResolvedModule(i,f.text),y=g&&a.getSourceFile(g.resolvedFileName);y&&y.externalModuleIndicator&&e.isExportAssignment(y.externalModuleIndicator)&&y.externalModuleIndicator.isExportEquals&&u.push(e.createDiagnosticForNode(m,e.Diagnostics.Import_may_be_converted_to_a_default_import))}}return e.addRange(u,i.bindSuggestionDiagnostics),e.addRange(u,a.getSuggestionDiagnostics(i,o)),u.sort(function(e,t){return e.start-t.start})},e.isReturnStatementWithFixablePromiseHandler=n,e.isFixablePromiseHandler=i}(c||(c={})),function(e){!function(t){function r(t,r,i){var a=n(t,r,i);if(""!==a)return a;var o=e.getCombinedLocalAndExportSymbolFlags(r);return 32&o?e.getDeclarationOfKind(r,209)?"local class":"class":384&o?"enum":524288&o?"type":64&o?"interface":262144&o?"type parameter":262144&o?"type parameter":8&o?"enum member":2097152&o?"alias":1536&o?"module":a}function n(t,r,n){var a=t.getRootSymbols(r);if(1===a.length&&8192&e.first(a).flags&&0!==t.getTypeOfSymbolAtLocation(r,n).getNonNullableType().getCallSignatures().length)return"method";if(t.isUndefinedSymbol(r))return"var";if(t.isArgumentsSymbol(r))return"local var";if(100===n.kind&&e.isExpression(n))return"parameter";var o=e.getCombinedLocalAndExportSymbolFlags(r);if(3&o)return e.isFirstDeclarationOfSymbolParameter(r)?"parameter":r.valueDeclaration&&e.isVarConst(r.valueDeclaration)?"const":e.forEach(r.declarations,e.isLet)?"let":i(r)?"local var":"var";if(16&o)return i(r)?"local function":"function";if(32768&o)return"getter";if(65536&o)return"setter";if(8192&o)return"method";if(16384&o)return"constructor";if(4&o){if(33554432&o&&6&r.checkFlags){var s=e.forEach(t.getRootSymbols(r),function(t){var r=t.getFlags();if(98311&r)return"property";e.Debug.assert(!!(8208&r))});return s||(t.getTypeOfSymbolAtLocation(r,n).getCallSignatures().length?"method":"property")}switch(n.parent&&n.parent.kind){case 262:case 260:case 261:return 72===n.kind?"property":"JSX attribute";case 267:return"JSX attribute";default:return"property"}}return""}function i(t){return!t.parent&&e.forEach(t.declarations,function(t){if(196===t.kind)return!0;if(237!==t.kind&&239!==t.kind)return!1;for(var r=t.parent;!e.isFunctionBlock(r);r=r.parent)if(284===r.kind||245===r.kind)return!1;return!0})}t.getSymbolKind=r,t.getSymbolModifiers=function(t){var r=t&&t.declarations&&t.declarations.length>0?e.getNodeModifiers(t.declarations[0]):"",n=t&&16777216&t.flags?"optional":"";return r&&n?r+","+n:r||n},t.getSymbolDisplayPartsDocumentationAndSymbolKind=function t(i,a,o,s,c,u,l){void 0===u&&(u=e.getMeaningFromLocation(c));var _,d,p,f,m,g,y=[],h=e.getCombinedLocalAndExportSymbolFlags(a),v=1&u?n(i,a,c):"",b=!1,D=100===c.kind&&e.isInExpressionContext(c);if(100===c.kind&&!D)return{displayParts:[e.keywordPart(100)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==v||32&h||2097152&h){"getter"!==v&&"setter"!==v||(v="property");var x=void 0;if(p=D?i.getTypeAtLocation(c):i.getTypeOfSymbolAtLocation(a.exportSymbol||a,c),c.parent&&189===c.parent.kind){var S=c.parent.name;(S===c||S&&0===S.getFullWidth())&&(c=c.parent)}var T=void 0;if(e.isCallOrNewExpression(c)?T=c:e.isCallExpressionTarget(c)||e.isNewExpressionTarget(c)?T=c.parent:c.parent&&e.isJsxOpeningLikeElement(c.parent)&&e.isFunctionLike(a.valueDeclaration)&&(T=c.parent),T){x=i.getResolvedSignature(T,[]);var C=192===T.kind||e.isCallExpression(T)&&98===T.expression.kind,E=C?p.getConstructSignatures():p.getCallSignatures();if(e.contains(E,x.target)||e.contains(E,x)||(x=E.length?E[0]:void 0),x){switch(C&&32&h?(v="constructor",H(p.symbol,v)):2097152&h?(G(v="alias"),y.push(e.spacePart()),C&&(y.push(e.keywordPart(95)),y.push(e.spacePart())),W(a)):H(a,v),v){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":y.push(e.punctuationPart(57)),y.push(e.spacePart()),16&e.getObjectFlags(p)||!p.symbol||(e.addRange(y,e.symbolToDisplayParts(i,p.symbol,s,void 0,5)),y.push(e.lineBreakPart())),C&&(y.push(e.keywordPart(95)),y.push(e.spacePart())),Y(x,E,262144);break;default:Y(x,E)}b=!0}}else if(e.isNameOfFunctionDeclaration(c)&&!(98304&h)||124===c.kind&&157===c.parent.kind){var k=c.parent;e.find(a.declarations,function(e){return e===(124===c.kind?k.parent:k)})&&(E=157===k.kind?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures(),x=i.isImplementationOfOverload(k)?E[0]:i.getSignatureFromDeclaration(k),157===k.kind?(v="constructor",H(p.symbol,v)):H(160!==k.kind||2048&p.symbol.flags||4096&p.symbol.flags?a:p.symbol,v),Y(x,E),b=!0)}}if(32&h&&!b&&!D&&(V(),e.getDeclarationOfKind(a,209)?G("local class"):y.push(e.keywordPart(76)),y.push(e.spacePart()),W(a),X(a,o)),64&h&&2&u&&(U(),y.push(e.keywordPart(110)),y.push(e.spacePart()),W(a),X(a,o)),524288&h&&2&u&&(U(),y.push(e.keywordPart(140)),y.push(e.spacePart()),W(a),X(a,o),y.push(e.spacePart()),y.push(e.operatorPart(59)),y.push(e.spacePart()),e.addRange(y,e.typeToDisplayParts(i,i.getDeclaredTypeOfSymbol(a),s,8388608))),384&h&&(U(),e.some(a.declarations,function(t){return e.isEnumDeclaration(t)&&e.isEnumConst(t)})&&(y.push(e.keywordPart(77)),y.push(e.spacePart())),y.push(e.keywordPart(84)),y.push(e.spacePart()),W(a)),1536&h&&!D){U();var N=(J=e.getDeclarationOfKind(a,244))&&J.name&&72===J.name.kind;y.push(e.keywordPart(N?131:130)),y.push(e.spacePart()),W(a)}if(262144&h&&2&u)if(U(),y.push(e.punctuationPart(20)),y.push(e.textPart("type parameter")),y.push(e.punctuationPart(21)),y.push(e.spacePart()),W(a),a.parent)q(),W(a.parent,s),X(a.parent,s);else{var A=e.getDeclarationOfKind(a,150);if(void 0===A)return e.Debug.fail();(J=A.parent)&&(e.isFunctionLikeKind(J.kind)?(q(),x=i.getSignatureFromDeclaration(J),161===J.kind?(y.push(e.keywordPart(95)),y.push(e.spacePart())):160!==J.kind&&J.name&&W(J.symbol),e.addRange(y,e.signatureToDisplayParts(i,x,o,32))):242===J.kind&&(q(),y.push(e.keywordPart(140)),y.push(e.spacePart()),W(J.symbol),X(J.symbol,o)))}if(8&h&&(v="enum member",H(a,"enum member"),278===(J=a.declarations[0]).kind)){var F=i.getConstantValue(J);void 0!==F&&(y.push(e.spacePart()),y.push(e.operatorPart(59)),y.push(e.spacePart()),y.push(e.displayPart(e.getTextOfConstantValue(F),"number"==typeof F?e.SymbolDisplayPartKind.numericLiteral:e.SymbolDisplayPartKind.stringLiteral)))}if(2097152&h){if(U(),!b){var P=i.getAliasedSymbol(a);if(P!==a&&P.declarations&&P.declarations.length>0){var w=P.declarations[0],I=e.getNameOfDeclaration(w);if(I){var O=e.isModuleWithStringLiteralName(w)&&e.hasModifier(w,2),M="default"!==a.name&&!O,L=t(i,P,e.getSourceFileOfNode(w),w,I,u,M?a:P);y.push.apply(y,L.displayParts),y.push(e.lineBreakPart()),m=L.documentation,g=L.tags}}}switch(a.declarations[0].kind){case 247:y.push(e.keywordPart(85)),y.push(e.spacePart()),y.push(e.keywordPart(131));break;case 254:y.push(e.keywordPart(85)),y.push(e.spacePart()),y.push(e.keywordPart(a.declarations[0].isExportEquals?59:80));break;case 257:y.push(e.keywordPart(85));break;default:y.push(e.keywordPart(92))}y.push(e.spacePart()),W(a),e.forEach(a.declarations,function(t){if(248===t.kind){var r=t;if(e.isExternalModuleImportEqualsDeclaration(r))y.push(e.spacePart()),y.push(e.operatorPart(59)),y.push(e.spacePart()),y.push(e.keywordPart(134)),y.push(e.punctuationPart(20)),y.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(r)),e.SymbolDisplayPartKind.stringLiteral)),y.push(e.punctuationPart(21));else{var n=i.getSymbolAtLocation(r.moduleReference);n&&(y.push(e.spacePart()),y.push(e.operatorPart(59)),y.push(e.spacePart()),W(n,s))}return!0}})}if(!b)if(""!==v){if(p)if(D?(U(),y.push(e.keywordPart(100))):H(a,v),"property"===v||"JSX attribute"===v||3&h||"local var"===v||D)if(y.push(e.punctuationPart(57)),y.push(e.spacePart()),p.symbol&&262144&p.symbol.flags){var R=e.mapToDisplayParts(function(t){var r=i.typeParameterToDeclaration(p,s);K().writeNode(4,r,e.getSourceFileOfNode(e.getParseTreeNode(s)),t)});e.addRange(y,R)}else e.addRange(y,e.typeToDisplayParts(i,p,s));else(16&h||8192&h||16384&h||131072&h||98304&h||"method"===v)&&(E=p.getNonNullableType().getCallSignatures()).length&&Y(E[0],E)}else v=r(i,a,c);if(!_&&(_=a.getDocumentationComment(i),d=a.getJsDocTags(),0===_.length&&4&h&&a.parent&&e.forEach(a.parent.declarations,function(e){return 284===e.kind})))for(var B=0,j=a.declarations;B<j.length;B++){var J;if((J=j[B]).parent&&204===J.parent.kind){var z=i.getSymbolAtLocation(J.parent.right);if(z&&(_=z.getDocumentationComment(i),d=z.getJsDocTags(),_.length>0))break}}return 0===_.length&&m&&(_=m),0===d.length&&g&&(d=g),{displayParts:y,documentation:_,symbolKind:v,tags:0===d.length?void 0:d};function K(){return f||(f=e.createPrinter({removeComments:!0})),f}function U(){y.length&&y.push(e.lineBreakPart()),V()}function V(){l&&(G("alias"),y.push(e.spacePart()))}function q(){y.push(e.spacePart()),y.push(e.keywordPart(93)),y.push(e.spacePart())}function W(t,r){l&&t===a&&(t=l);var n=e.symbolToDisplayParts(i,t,r||o,void 0,7);e.addRange(y,n),16777216&a.flags&&y.push(e.punctuationPart(56))}function H(t,r){U(),r&&(G(r),t&&!e.some(t.declarations,function(t){return e.isArrowFunction(t)||(e.isFunctionExpression(t)||e.isClassExpression(t))&&!t.name})&&(y.push(e.spacePart()),W(t)))}function G(t){switch(t){case"var":case"function":case"let":case"const":case"constructor":return void y.push(e.textOrKeywordPart(t));default:return y.push(e.punctuationPart(20)),y.push(e.textOrKeywordPart(t)),void y.push(e.punctuationPart(21))}}function Y(t,r,n){void 0===n&&(n=0),e.addRange(y,e.signatureToDisplayParts(i,t,s,32|n)),r.length>1&&(y.push(e.spacePart()),y.push(e.punctuationPart(20)),y.push(e.operatorPart(38)),y.push(e.displayPart((r.length-1).toString(),e.SymbolDisplayPartKind.numericLiteral)),y.push(e.spacePart()),y.push(e.textPart(2===r.length?"overload":"overloads")),y.push(e.punctuationPart(21)));var a=t.getDocumentationComment(i);_=0===a.length?void 0:a,d=t.getJsDocTags()}function X(t,r){var n=e.mapToDisplayParts(function(n){var a=i.symbolToTypeParameterDeclarations(t,r);K().writeList(53776,a,e.getSourceFileOfNode(e.getParseTreeNode(r)),n)});e.addRange(y,n)}}}(e.SymbolDisplay||(e.SymbolDisplay={}))}(c||(c={})),function(e){function t(t,r){var i=[],a=r.compilerOptions?n(r.compilerOptions,i):e.getDefaultCompilerOptions();a.isolatedModules=!0,a.suppressOutputPathCheck=!0,a.allowNonTsExtensions=!0,a.noLib=!0,a.lib=void 0,a.types=void 0,a.noEmit=void 0,a.noEmitOnError=void 0,a.paths=void 0,a.rootDirs=void 0,a.declaration=void 0,a.composite=void 0,a.declarationDir=void 0,a.out=void 0,a.outFile=void 0,a.noResolve=!0;var o=r.fileName||(a.jsx?"module.tsx":"module.ts"),s=e.createSourceFile(o,t,a.target);r.moduleName&&(s.moduleName=r.moduleName),r.renamedDependencies&&(s.renamedDependencies=e.createMapFromTemplate(r.renamedDependencies));var c,u,l=e.getNewLineCharacter(a),_={getSourceFile:function(t){return t===e.normalizePath(o)?s:void 0},writeFile:function(t,r){e.fileExtensionIs(t,".map")?(e.Debug.assertEqual(u,void 0,"Unexpected multiple source map outputs, file:",t),u=r):(e.Debug.assertEqual(c,void 0,"Unexpected multiple outputs, file:",t),c=r)},getDefaultLibFileName:function(){return"lib.d.ts"},useCaseSensitiveFileNames:function(){return!1},getCanonicalFileName:function(e){return e},getCurrentDirectory:function(){return""},getNewLine:function(){return l},fileExists:function(e){return e===o},readFile:function(){return""},directoryExists:function(){return!0},getDirectories:function(){return[]}},d=e.createProgram([o],a,_);return r.reportDiagnostics&&(e.addRange(i,d.getSyntacticDiagnostics(s)),e.addRange(i,d.getOptionsDiagnostics())),d.emit(void 0,void 0,void 0,void 0,r.transformers),void 0===c?e.Debug.fail("Output generation failed"):{outputText:c,diagnostics:i,sourceMapText:u}}var r;function n(t,n){r=r||e.filter(e.optionDeclarations,function(t){return"object"===f(t.type)&&!e.forEachEntry(t.type,function(e){return"number"!=typeof e})}),t=e.cloneCompilerOptions(t);for(var i=function(r){if(!e.hasProperty(t,r.name))return"continue";var i=t[r.name];e.isString(i)?t[r.name]=e.parseCustomTypeOption(r,i,n):e.forEachEntry(r.type,function(e){return e===i})||n.push(e.createCompilerDiagnosticForInvalidCustomType(r))},a=0,o=r;a<o.length;a++){i(o[a])}return t}e.transpileModule=t,e.transpile=function(r,n,i,a,o){var s=t(r,{compilerOptions:n,fileName:i,reportDiagnostics:!!a,moduleName:o});return e.addRange(a,s.diagnostics),s.outputText},e.fixupCompilerOptions=n}(c||(c={})),function(e){!function(t){!function(e){e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace"}(t.FormattingRequestKind||(t.FormattingRequestKind={}));var r=function(){function t(e,t,r){this.sourceFile=e,this.formattingRequestKind=t,this.options=r}return t.prototype.updateContext=function(t,r,n,i,a){this.currentTokenSpan=e.Debug.assertDefined(t),this.currentTokenParent=e.Debug.assertDefined(r),this.nextTokenSpan=e.Debug.assertDefined(n),this.nextTokenParent=e.Debug.assertDefined(i),this.contextNode=e.Debug.assertDefined(a),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0},t.prototype.ContextNodeAllOnSameLine=function(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine},t.prototype.NextNodeAllOnSameLine=function(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine},t.prototype.TokensAreOnSameLine=function(){if(void 0===this.tokensAreOnSameLine){var e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine},t.prototype.ContextNodeBlockIsOnOneLine=function(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine},t.prototype.NextNodeBlockIsOnOneLine=function(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine},t.prototype.NodeIsOnOneLine=function(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line},t.prototype.BlockIsOnOneLine=function(t){var r=e.findChildOfKind(t,18,this.sourceFile),n=e.findChildOfKind(t,19,this.sourceFile);return!(!r||!n)&&this.sourceFile.getLineAndCharacterOfPosition(r.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line},t}();t.FormattingContext=r}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){var r,n=e.createScanner(7,!1,0),i=e.createScanner(7,!1,1);!function(e){e[e.Scan=0]="Scan",e[e.RescanGreaterThanToken=1]="RescanGreaterThanToken",e[e.RescanSlashToken=2]="RescanSlashToken",e[e.RescanTemplateToken=3]="RescanTemplateToken",e[e.RescanJsxIdentifier=4]="RescanJsxIdentifier",e[e.RescanJsxText=5]="RescanJsxText"}(r||(r={})),t.getFormattingScanner=function(t,r,a,o,s){var c=1===r?i:n;c.setText(t),c.setTextPos(a);var u,l,_,d,p,f=!0,m=s({advance:function(){p=void 0,c.getStartPos()!==a?f=!!l&&4===e.last(l).kind:c.scan(),u=void 0,l=void 0;for(var t=c.getStartPos();t<o;){var r=c.getToken();if(!e.isTrivia(r))break;c.scan();var n={pos:t,end:c.getStartPos(),kind:r};t=c.getStartPos(),u=e.append(u,n)}_=c.getStartPos()},readTokenInfo:function(t){e.Debug.assert(g());var r=function(e){switch(e.kind){case 32:case 67:case 68:case 48:case 47:return!0}return!1}(t)?1:13===t.kind?2:function(e){return 16===e.kind||17===e.kind}(t)?3:function(t){if(t.parent)switch(t.parent.kind){case 267:case 262:case 263:case 261:return e.isKeyword(t.kind)||72===t.kind}return!1}(t)?4:11===t.kind?5:0;if(p&&r===d)return y(p,t);c.getStartPos()!==_&&(e.Debug.assert(void 0!==p),c.setTextPos(_),c.scan());var n=function(t,r){var n,i=c.getToken();switch(d=0,r){case 1:if(30===i){d=1;var a=c.reScanGreaterToken();return e.Debug.assert(t.kind===a),a}break;case 2:if(42===(n=i)||64===n){d=2;var a=c.reScanSlashToken();return e.Debug.assert(t.kind===a),a}break;case 3:if(19===i)return d=3,c.reScanTemplateToken();break;case 4:return d=4,c.scanJsxIdentifier();case 5:return d=5,c.reScanJsxToken();case 0:break;default:e.Debug.assertNever(r)}return i}(t,r),i={pos:c.getStartPos(),end:c.getTextPos(),kind:n};for(l&&(l=void 0);c.getStartPos()<o&&(n=c.scan(),e.isTrivia(n));){var a={pos:c.getStartPos(),end:c.getTextPos(),kind:n};if(l||(l=[]),l.push(a),4===n){c.scan();break}}return y(p={leadingTrivia:u,trailingTrivia:l,token:i},t)},isOnToken:g,getCurrentLeadingTrivia:function(){return u},lastTrailingTriviaWasNewLine:function(){return f},skipToEndOf:function(e){c.setTextPos(e.end),_=c.getStartPos(),d=void 0,p=void 0,f=!1,u=void 0,l=void 0}});return p=void 0,c.setText(void 0),m;function g(){var t=p?p.token.kind:c.getToken();return(p?p.token.pos:c.getStartPos())<o&&1!==t&&!e.isTrivia(t)}function y(t,r){return e.isToken(r)&&t.token.kind!==r.kind&&(t.token.kind=r.kind),t}}}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){t.anyContext=e.emptyArray,function(e){e[e.Ignore=1]="Ignore",e[e.Space=2]="Space",e[e.NewLine=4]="NewLine",e[e.Delete=8]="Delete"}(t.RuleAction||(t.RuleAction={})),function(e){e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines"}(t.RuleFlags||(t.RuleFlags={}))}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){function r(e,t,r,n,a,o){return void 0===o&&(o=0),{leftTokenRange:i(t),rightTokenRange:i(r),rule:{debugName:e,context:n,action:a,flags:o}}}function n(e){return{tokens:e,isSpecific:!0}}function i(t){return"number"==typeof t?n([t]):e.isArray(t)?n(t):t}function a(t,r,i){void 0===i&&(i=[]);for(var a=[],o=t;o<=r;o++)e.contains(i,o)||a.push(o);return n(a)}function o(e){return function(t){return t.options&&t.options.hasOwnProperty(e)&&!!t.options[e]}}function s(e){return function(t){return t.options&&t.options.hasOwnProperty(e)&&!t.options[e]}}function c(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!t.options[e]}}function u(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!t.options[e]||t.TokensAreOnSameLine()}}function l(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!!t.options[e]}}function _(e){return 225===e.contextNode.kind}function d(e){return!_(e)}function p(e){switch(e.contextNode.kind){case 204:case 205:case 175:case 212:case 257:case 253:case 163:case 173:case 174:return!0;case 186:case 242:case 248:case 237:case 151:case 278:case 154:case 153:return 59===e.currentTokenSpan.kind||59===e.nextTokenSpan.kind;case 226:case 150:return 93===e.currentTokenSpan.kind||93===e.nextTokenSpan.kind||59===e.currentTokenSpan.kind||59===e.nextTokenSpan.kind;case 227:return 147===e.currentTokenSpan.kind||147===e.nextTokenSpan.kind}return!1}function f(e){return!p(e)}function m(e){return!g(e)}function g(t){var r=t.contextNode.kind;return 154===r||153===r||151===r||237===r||e.isFunctionLikeKind(r)}function y(e){return 205===e.contextNode.kind||175===e.contextNode.kind}function h(e){return e.TokensAreOnSameLine()||S(e)}function v(e){return 184===e.contextNode.kind||181===e.contextNode.kind||function(e){return x(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function b(e){return S(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function D(e){return x(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function x(e){return T(e.contextNode)}function S(e){return T(e.nextTokenParent)}function T(e){if(A(e))return!0;switch(e.kind){case 218:case 246:case 188:case 245:return!0}return!1}function C(e){switch(e.contextNode.kind){case 239:case 156:case 155:case 158:case 159:case 160:case 196:case 157:case 197:case 241:return!0}return!1}function E(e){return!C(e)}function k(e){return 239===e.contextNode.kind||196===e.contextNode.kind}function N(e){return A(e.contextNode)}function A(e){switch(e.kind){case 240:case 209:case 241:case 243:case 168:case 244:case 255:case 256:case 249:case 252:return!0}return!1}function F(e){switch(e.currentTokenParent.kind){case 240:case 244:case 243:case 274:case 245:case 232:return!0;case 218:var t=e.currentTokenParent.parent;if(!t||197!==t.kind&&196!==t.kind)return!0}return!1}function P(e){switch(e.contextNode.kind){case 222:case 232:case 225:case 226:case 227:case 224:case 235:case 223:case 231:case 274:return!0;default:return!1}}function w(e){return 188===e.contextNode.kind}function I(e){return function(e){return 191===e.contextNode.kind}(e)||function(e){return 192===e.contextNode.kind}(e)}function O(e){return 27!==e.currentTokenSpan.kind}function M(e){return 23!==e.nextTokenSpan.kind}function L(e){return 197===e.contextNode.kind}function R(e){return 183===e.contextNode.kind}function B(e){return e.TokensAreOnSameLine()&&11!==e.contextNode.kind}function j(e){return 260!==e.contextNode.kind&&264!==e.contextNode.kind}function J(e){return 270===e.contextNode.kind||269===e.contextNode.kind}function z(e){return 267===e.nextTokenParent.kind}function K(e){return 267===e.contextNode.kind}function U(e){return 261===e.contextNode.kind}function V(e){return!C(e)&&!S(e)}function q(e){return e.TokensAreOnSameLine()&&!!e.contextNode.decorators&&W(e.currentTokenParent)&&!W(e.nextTokenParent)}function W(t){for(;e.isExpressionNode(t);)t=t.parent;return 152===t.kind}function H(e){return 238===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function G(e){return 2!==e.formattingRequestKind}function Y(e){return 244===e.contextNode.kind}function X(e){return 168===e.contextNode.kind}function Q(e){return 161===e.contextNode.kind}function $(e,t){if(28!==e.kind&&30!==e.kind)return!1;switch(t.kind){case 164:case 194:case 242:case 240:case 209:case 241:case 239:case 196:case 197:case 156:case 155:case 160:case 161:case 191:case 192:case 211:return!0;default:return!1}}function Z(e){return $(e.currentTokenSpan,e.currentTokenParent)||$(e.nextTokenSpan,e.nextTokenParent)}function ee(e){return 194===e.contextNode.kind}function te(e){return 106===e.currentTokenSpan.kind&&200===e.currentTokenParent.kind}function re(e){return 207===e.contextNode.kind&&void 0!==e.contextNode.expression}function ne(e){return 213===e.contextNode.kind}t.getAllRules=function(){for(var i=[],x=0;x<=147;x++)i.push(x);function T(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{tokens:i.filter(function(t){return!e.some(function(e){return e===t})}),isSpecific:!1}}var A={tokens:i,isSpecific:!1},W=n(i.concat([3])),$=a(73,147),ie=a(28,71),ae=[93,94,147,119,128],oe=[72].concat(e.typeKeywords),se=W,ce=n([72,3,76,85,92]),ue=n([21,3,82,103,88,83]),le=[r("IgnoreBeforeComment",A,[2,3],t.anyContext,1),r("IgnoreAfterLineComment",2,A,t.anyContext,1),r("NotSpaceBeforeColon",A,57,[B,f,m],8),r("SpaceAfterColon",57,A,[B,f],2),r("NoSpaceBeforeQuestionMark",A,56,[B,f],8),r("SpaceAfterQuestionMarkInConditionalOperator",56,A,[B,y],2),r("NoSpaceAfterQuestionMark",56,A,[B],8),r("NoSpaceBeforeDot",A,24,[B],8),r("NoSpaceAfterDot",24,A,[B],8),r("NoSpaceBetweenImportParenInImportType",92,20,[B,R],8),r("NoSpaceAfterUnaryPrefixOperator",[44,45,53,52],[8,9,72,20,22,18,100,95],[B,f],8),r("NoSpaceAfterUnaryPreincrementOperator",44,[72,20,100,95],[B],8),r("NoSpaceAfterUnaryPredecrementOperator",45,[72,20,100,95],[B],8),r("NoSpaceBeforeUnaryPostincrementOperator",[72,21,23,95],44,[B],8),r("NoSpaceBeforeUnaryPostdecrementOperator",[72,21,23,95],45,[B],8),r("SpaceAfterPostincrementWhenFollowedByAdd",44,38,[B,p],2),r("SpaceAfterAddWhenFollowedByUnaryPlus",38,38,[B,p],2),r("SpaceAfterAddWhenFollowedByPreincrement",38,44,[B,p],2),r("SpaceAfterPostdecrementWhenFollowedBySubtract",45,39,[B,p],2),r("SpaceAfterSubtractWhenFollowedByUnaryMinus",39,39,[B,p],2),r("SpaceAfterSubtractWhenFollowedByPredecrement",39,45,[B,p],2),r("NoSpaceAfterCloseBrace",19,[27,26],[B],8),r("NewLineBeforeCloseBraceInBlockContext",W,19,[D],4),r("SpaceAfterCloseBrace",19,T(21),[B,F],2),r("SpaceBetweenCloseBraceAndElse",19,83,[B],2),r("SpaceBetweenCloseBraceAndWhile",19,107,[B],2),r("NoSpaceBetweenEmptyBraceBrackets",18,19,[B,w],8),r("SpaceAfterConditionalClosingParen",21,22,[P],2),r("NoSpaceBetweenFunctionKeywordAndStar",90,40,[k],8),r("SpaceAfterStarInGeneratorDeclaration",40,[72,20],[k],2),r("SpaceAfterFunctionInFuncDecl",90,A,[C],2),r("NewLineAfterOpenBraceInBlockContext",18,A,[D],4),r("SpaceAfterGetSetInMember",[126,137],72,[C],2),r("NoSpaceBetweenYieldKeywordAndStar",117,40,[B,re],8),r("SpaceBetweenYieldOrYieldStarAndOperand",[117,40],A,[B,re],2),r("NoSpaceBetweenReturnAndSemicolon",97,26,[B],8),r("SpaceAfterCertainKeywords",[105,101,95,81,97,104,122],A,[B],2),r("SpaceAfterLetConstInVariableDeclaration",[111,77],A,[B,H],2),r("NoSpaceBeforeOpenParenInFuncCall",A,20,[B,I,O],8),r("SpaceBeforeBinaryKeywordOperator",A,ae,[B,p],2),r("SpaceAfterBinaryKeywordOperator",ae,A,[B,p],2),r("SpaceAfterVoidOperator",106,A,[B,te],2),r("SpaceBetweenAsyncAndOpenParen",121,20,[L,B],2),r("SpaceBetweenAsyncAndFunctionKeyword",121,90,[B],2),r("NoSpaceBetweenTagAndTemplateString",[72,21],[14,15],[B],8),r("SpaceBeforeJsxAttribute",A,72,[z,B],2),r("SpaceBeforeSlashInJsxOpeningElement",A,42,[U,B],2),r("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",42,30,[U,B],8),r("NoSpaceBeforeEqualInJsxAttribute",A,59,[K,B],8),r("NoSpaceAfterEqualInJsxAttribute",59,A,[K,B],8),r("NoSpaceAfterModuleImport",[130,134],20,[B],8),r("SpaceAfterCertainTypeScriptKeywords",[118,76,125,80,84,85,86,126,109,92,110,130,131,113,115,114,133,137,116,140,144,129,127],A,[B],2),r("SpaceBeforeCertainTypeScriptKeywords",A,[86,109,144],[B],2),r("SpaceAfterModuleName",10,18,[Y],2),r("SpaceBeforeArrow",A,37,[B],2),r("SpaceAfterArrow",37,A,[B],2),r("NoSpaceAfterEllipsis",25,72,[B],8),r("NoSpaceAfterOptionalParameters",56,[21,27],[B,f],8),r("NoSpaceBetweenEmptyInterfaceBraceBrackets",18,19,[B,X],8),r("NoSpaceBeforeOpenAngularBracket",oe,28,[B,Z],8),r("NoSpaceBetweenCloseParenAndAngularBracket",21,28,[B,Z],8),r("NoSpaceAfterOpenAngularBracket",28,A,[B,Z],8),r("NoSpaceBeforeCloseAngularBracket",A,30,[B,Z],8),r("NoSpaceAfterCloseAngularBracket",30,[20,22,30,27],[B,Z,E],8),r("SpaceBeforeAt",[21,72],58,[B],2),r("NoSpaceAfterAt",58,A,[B],8),r("SpaceAfterDecorator",A,[118,72,85,80,76,116,115,113,114,126,137,22,40],[q],2),r("NoSpaceBeforeNonNullAssertionOperator",A,52,[B,ne],8),r("NoSpaceAfterNewKeywordOnConstructorSignature",95,20,[B,Q],8)],_e=[r("SpaceAfterConstructor",124,20,[o("insertSpaceAfterConstructor"),B],2),r("NoSpaceAfterConstructor",124,20,[c("insertSpaceAfterConstructor"),B],8),r("SpaceAfterComma",27,A,[o("insertSpaceAfterCommaDelimiter"),B,j,M],2),r("NoSpaceAfterComma",27,A,[c("insertSpaceAfterCommaDelimiter"),B,j],8),r("SpaceAfterAnonymousFunctionKeyword",90,20,[o("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),C],2),r("NoSpaceAfterAnonymousFunctionKeyword",90,20,[c("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),C],8),r("SpaceAfterKeywordInControl",$,20,[o("insertSpaceAfterKeywordsInControlFlowStatements"),P],2),r("NoSpaceAfterKeywordInControl",$,20,[c("insertSpaceAfterKeywordsInControlFlowStatements"),P],8),r("SpaceAfterOpenParen",20,A,[o("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),B],2),r("SpaceBeforeCloseParen",A,21,[o("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),B],2),r("SpaceBetweenOpenParens",20,20,[o("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),B],2),r("NoSpaceBetweenParens",20,21,[B],8),r("NoSpaceAfterOpenParen",20,A,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),B],8),r("NoSpaceBeforeCloseParen",A,21,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),B],8),r("SpaceAfterOpenBracket",22,A,[o("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),B],2),r("SpaceBeforeCloseBracket",A,23,[o("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),B],2),r("NoSpaceBetweenBrackets",22,23,[B],8),r("NoSpaceAfterOpenBracket",22,A,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),B],8),r("NoSpaceBeforeCloseBracket",A,23,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),B],8),r("SpaceAfterOpenBrace",18,A,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),v],2),r("SpaceBeforeCloseBrace",A,19,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),v],2),r("NoSpaceBetweenEmptyBraceBrackets",18,19,[B,w],8),r("NoSpaceAfterOpenBrace",18,A,[s("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),B],8),r("NoSpaceBeforeCloseBrace",A,19,[s("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),B],8),r("SpaceAfterTemplateHeadAndMiddle",[15,16],A,[o("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),B],2),r("SpaceBeforeTemplateMiddleAndTail",A,[16,17],[o("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),B],2),r("NoSpaceAfterTemplateHeadAndMiddle",[15,16],A,[c("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),B],8),r("NoSpaceBeforeTemplateMiddleAndTail",A,[16,17],[c("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),B],8),r("SpaceAfterOpenBraceInJsxExpression",18,A,[o("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),B,J],2),r("SpaceBeforeCloseBraceInJsxExpression",A,19,[o("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),B,J],2),r("NoSpaceAfterOpenBraceInJsxExpression",18,A,[c("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),B,J],8),r("NoSpaceBeforeCloseBraceInJsxExpression",A,19,[c("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),B,J],8),r("SpaceAfterSemicolonInFor",26,A,[o("insertSpaceAfterSemicolonInForStatements"),B,_],2),r("NoSpaceAfterSemicolonInFor",26,A,[c("insertSpaceAfterSemicolonInForStatements"),B,_],8),r("SpaceBeforeBinaryOperator",A,ie,[o("insertSpaceBeforeAndAfterBinaryOperators"),B,p],2),r("SpaceAfterBinaryOperator",ie,A,[o("insertSpaceBeforeAndAfterBinaryOperators"),B,p],2),r("NoSpaceBeforeBinaryOperator",A,ie,[c("insertSpaceBeforeAndAfterBinaryOperators"),B,p],8),r("NoSpaceAfterBinaryOperator",ie,A,[c("insertSpaceBeforeAndAfterBinaryOperators"),B,p],8),r("SpaceBeforeOpenParenInFuncDecl",A,20,[o("insertSpaceBeforeFunctionParenthesis"),B,C],2),r("NoSpaceBeforeOpenParenInFuncDecl",A,20,[c("insertSpaceBeforeFunctionParenthesis"),B,C],8),r("NewLineBeforeOpenBraceInControl",ue,18,[o("placeOpenBraceOnNewLineForControlBlocks"),P,b],4,1),r("NewLineBeforeOpenBraceInFunction",se,18,[o("placeOpenBraceOnNewLineForFunctions"),C,b],4,1),r("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",ce,18,[o("placeOpenBraceOnNewLineForFunctions"),N,b],4,1),r("SpaceAfterTypeAssertion",30,A,[o("insertSpaceAfterTypeAssertion"),B,ee],2),r("NoSpaceAfterTypeAssertion",30,A,[c("insertSpaceAfterTypeAssertion"),B,ee],8),r("SpaceBeforeTypeAnnotation",A,57,[o("insertSpaceBeforeTypeAnnotation"),B,g],2),r("NoSpaceBeforeTypeAnnotation",A,57,[c("insertSpaceBeforeTypeAnnotation"),B,g],8)],de=[r("NoSpaceBeforeSemicolon",A,26,[B],8),r("SpaceBeforeOpenBraceInControl",ue,18,[u("placeOpenBraceOnNewLineForControlBlocks"),P,G,h],2,1),r("SpaceBeforeOpenBraceInFunction",se,18,[u("placeOpenBraceOnNewLineForFunctions"),C,S,G,h],2,1),r("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",ce,18,[u("placeOpenBraceOnNewLineForFunctions"),N,G,h],2,1),r("NoSpaceBeforeComma",A,27,[B],8),r("NoSpaceBeforeOpenBracket",T(121,74),22,[B],8),r("NoSpaceAfterCloseBracket",23,A,[B,V],8),r("SpaceAfterSemicolon",26,A,[B],2),r("SpaceBetweenForAndAwaitKeyword",89,122,[B],2),r("SpaceBetweenStatements",[21,82,83,74],A,[B,j,d],2),r("SpaceAfterTryFinally",[103,88],18,[B],2)];return le.concat(_e,de)}}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){var r;function n(t,r){return e.Debug.assert(t<=147&&r<=147,"Must compute formatting context from tokens"),t*s+r}t.getFormatContext=function(i){return{options:i,getRule:(void 0===r&&(a=t.getAllRules(),o=function(e){for(var t=new Array(s*s),r=new Array(t.length),i=0,a=e;i<a.length;i++)for(var o=a[i],u=o.leftTokenRange.isSpecific&&o.rightTokenRange.isSpecific,l=0,_=o.leftTokenRange.tokens;l<_.length;l++)for(var d=_[l],p=0,f=o.rightTokenRange.tokens;p<f.length;p++){var m=f[p],g=n(d,m),y=t[g];void 0===y&&(y=t[g]=[]),c(y,o.rule,u,r,g)}return t}(a),r=function(t){var r=o[n(t.currentTokenSpan.kind,t.nextTokenSpan.kind)];return r&&e.find(r,function(r){return e.every(r.context,function(e){return e(t)})})}),r)};var a,o};var i,a=5,o=31,s=148;function c(r,n,s,c,u){var l,_,d,p=1===n.action?s?i.IgnoreRulesSpecific:i.IgnoreRulesAny:n.context!==t.anyContext?s?i.ContextRulesSpecific:i.ContextRulesAny:s?i.NoContextRulesSpecific:i.NoContextRulesAny,f=c[u]||0;r.splice(function(e,t){for(var r=0,n=0;n<=t;n+=a)r+=e&o,e>>=a;return r}(f,p),0,n),c[u]=(d=1+((l=f)>>(_=p)&o),e.Debug.assert((d&o)===d,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),l&~(o<<_)|d<<_)}!function(e){e[e.IgnoreRulesSpecific=0]="IgnoreRulesSpecific",e[e.IgnoreRulesAny=1*a]="IgnoreRulesAny",e[e.ContextRulesSpecific=2*a]="ContextRulesSpecific",e[e.ContextRulesAny=3*a]="ContextRulesAny",e[e.NoContextRulesSpecific=4*a]="NoContextRulesSpecific",e[e.NoContextRulesAny=5*a]="NoContextRulesAny"}(i||(i={}))}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){var r,n,i,a,o;function s(t,r,n){var i=e.findPrecedingToken(t,n);return i&&i.kind===r&&t===i.getEnd()?i:void 0}function c(e){for(var t=e;t&&t.parent&&t.parent.end===e.end&&!u(t.parent,t);)t=t.parent;return t}function u(t,r){switch(t.kind){case 240:case 241:return e.rangeContainsRange(t.members,r);case 244:var n=t.body;return!!n&&245===n.kind&&e.rangeContainsRange(n.statements,r);case 284:case 218:case 245:return e.rangeContainsRange(t.statements,r);case 274:return e.rangeContainsRange(t.block.statements,r)}return!1}function l(t,r,n,i){return t?_({pos:e.getLineStartPositionForPosition(t.getStart(r),r),end:t.end},r,n,i):[]}function _(r,n,i,a){var o=function(t,r){return function n(i){var a=e.forEachChild(i,function(n){return e.startEndContainsRange(n.getStart(r),n.end,t)&&n});if(a){var o=n(a);if(o)return o}return i}(r)}(r,n);return t.getFormattingScanner(n.text,n.languageVariant,function(t,r,n){var i=t.getStart(n);if(i===r.pos&&t.end===r.end)return i;var a=e.findPrecedingToken(r.pos,n);return a?a.end>=r.pos?t.pos:a.end:t.pos}(o,r,n),r.end,function(s){return d(r,o,t.SmartIndenter.getIndentationForNode(o,r,n,i.options),function(e,r,n){for(var i,a=-1;e;){var o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==a&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(r,e,i,n))return r.indentSize;a=o,i=e,e=e.parent}return 0}(o,i.options,n),s,i,a,function(t,r){if(!t.length)return a;var n=t.filter(function(t){return e.rangeOverlapsWithStartEnd(r,t.start,t.start+t.length)}).sort(function(e,t){return e.start-t.start});if(!n.length)return a;var i=0;return function(t){for(;;){if(i>=n.length)return!1;var r=n[i];if(t.end<=r.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,r.start,r.start+r.length))return!0;i++}};function a(){return!1}}(n.parseDiagnostics,r),n)})}function d(r,n,i,a,o,s,c,u,l){var _,d,f,m,g=s.options,y=s.getRule,h=new t.FormattingContext(l,c,g),v=-1,b=[];if(o.advance(),o.isOnToken()){var D=l.getLineAndCharacterOfPosition(n.getStart(l)).line,x=D;n.decorators&&(x=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(n,l)).line),function n(i,a,s,c,d,p){if(!e.rangeOverlapsWithStartEnd(r,i.getStart(l),i.getEnd()))return;var f=T(i,s,d,p);var y=a;e.forEachChild(i,function(e){b(e,-1,i,f,s,c,!1)},function(r){!function(r,n,a,s){e.Debug.assert(e.isNodeArray(r));var c=function(e,t){switch(e.kind){case 157:case 239:case 196:case 156:case 155:case 197:if(e.typeParameters===t)return 28;if(e.parameters===t)return 20;break;case 191:case 192:if(e.typeArguments===t)return 28;if(e.arguments===t)return 20;break;case 164:if(e.typeArguments===t)return 28;break;case 168:return 18}return 0}(n,r),u=s,_=a;if(0!==c)for(;o.isOnToken();){var d=o.readTokenInfo(n);if(d.token.end>r.pos)break;if(d.token.kind===c){_=l.getLineAndCharacterOfPosition(d.token.pos).line,D(d,n,s,n);var p=void 0;if(-1!==v)p=v;else{var f=e.getLineStartPositionForPosition(d.token.pos,l);p=t.SmartIndenter.findFirstNonWhitespaceColumn(f,d.token.pos,l,g)}u=T(n,a,p,g.indentSize)}else D(d,n,s,n)}for(var m=-1,y=0;y<r.length;y++){var h=r[y];m=b(h,m,i,u,_,_,!0,0===y)}var x=function(e){switch(e){case 20:return 21;case 28:return 30;case 18:return 19}return 0}(c);if(0!==x&&o.isOnToken()){var d=o.readTokenInfo(n);27===d.token.kind&&e.isCallLikeExpression(n)&&(o.advance(),d=o.isOnToken()?o.readTokenInfo(n):void 0),d&&d.token.kind===x&&e.rangeContainsRange(n,d.token)&&D(d,n,u,n,!0)}}(r,i,s,f)});for(;o.isOnToken();){var h=o.readTokenInfo(i);if(h.token.end>i.end)break;D(h,i,f,i)}function b(a,s,c,u,_,d,p,f){var h=a.getStart(l),b=l.getLineAndCharacterOfPosition(h).line,x=b;a.decorators&&(x=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(a,l)).line);var S=-1;if(p&&e.rangeContainsRange(r,c)&&-1!==(S=function(r,n,i,a,o){if(e.rangeOverlapsWithStartEnd(a,r,n)||e.rangeContainsStartEnd(a,r,n)){if(-1!==o)return o}else{var s=l.getLineAndCharacterOfPosition(r).line,c=e.getLineStartPositionForPosition(r,l),u=t.SmartIndenter.findFirstNonWhitespaceColumn(c,r,l,g);if(s!==i||r===u){var _=t.SmartIndenter.getBaseIndentation(g);return _>u?_:u}}return-1}(h,a.end,_,r,s))&&(s=S),!e.rangeOverlapsWithStartEnd(r,a.pos,a.end))return a.end<r.pos&&o.skipToEndOf(a),s;if(0===a.getFullWidth())return s;for(;o.isOnToken();){var T=o.readTokenInfo(i);if(T.token.end>h)break;D(T,i,u,i)}if(!o.isOnToken())return s;if(e.isToken(a)&&11!==a.kind){var T=o.readTokenInfo(a);return e.Debug.assert(T.token.end===a.end,"Token end is child end"),D(T,i,u,a),s}var C=152===a.kind?b:d,E=function(e,r,n,i,a,o){var s=t.SmartIndenter.shouldIndentChildNode(g,e)?g.indentSize:0;return o===r?{indentation:r===m?v:a.getIndentation(),delta:Math.min(g.indentSize,a.getDelta(e)+s)}:-1===n?20===e.kind&&r===m?{indentation:v,delta:a.getDelta(e)}:t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(i,e,r,l)?{indentation:a.getIndentation(),delta:s}:{indentation:a.getIndentation()+a.getDelta(e),delta:s}:{indentation:n,delta:s}}(a,b,S,i,u,C);if(n(a,y,b,x,E.indentation,E.delta),11===a.kind){var k={pos:a.getStart(),end:a.getEnd()};A(k,E.indentation,!0,!1)}return y=i,f&&187===c.kind&&-1===s&&(s=E.indentation),s}function D(t,n,i,a,s){e.Debug.assert(e.rangeContainsRange(n,t.token));var c=o.lastTrailingTriviaWasNewLine(),d=!1;t.leadingTrivia&&E(t.leadingTrivia,n,y,i);var p=0,f=e.rangeContainsRange(r,t.token),g=l.getLineAndCharacterOfPosition(t.token.pos);if(f){var h=u(t.token),b=_;if(p=k(t.token,g,n,y,i),!h)if(0===p){var D=b&&l.getLineAndCharacterOfPosition(b.end).line;d=c&&g.line!==D}else d=1===p}if(t.trailingTrivia&&E(t.trailingTrivia,n,y,i),d){var x=f&&!u(t.token)?i.getIndentationForToken(g.line,t.token.kind,a,!!s):-1,S=!0;if(t.leadingTrivia){var T=i.getIndentationForComment(t.token.kind,x,a);S=C(t.leadingTrivia,T,S,function(e){return N(e.pos,T,!1)})}-1!==x&&S&&(N(t.token.pos,x,1===p),m=g.line,v=x)}o.advance(),y=n}}(n,n,D,x,i,a)}if(!o.isOnToken()){var S=o.getCurrentLeadingTrivia();S&&(C(S,i,!1,function(e){return k(e,l.getLineAndCharacterOfPosition(e.pos),n,n,void 0)}),function(){var e=_?_.end:r.pos,t=l.getLineAndCharacterOfPosition(e).line,n=l.getLineAndCharacterOfPosition(r.end).line;F(t,n+1,_)}())}return b;function T(r,n,i,a){return{getIndentationForComment:function(e,t,r){switch(e){case 19:case 23:case 21:return i+o(r)}return-1!==t?t:i},getIndentationForToken:function(t,a,s,c){return!c&&function(t,i,a){switch(i){case 18:case 19:case 21:case 83:case 107:case 58:return!1;case 42:case 30:switch(a.kind){case 262:case 263:case 261:return!1}break;case 22:case 23:if(181!==a.kind)return!1}return n!==t&&!(r.decorators&&i===function(t){if(t.modifiers&&t.modifiers.length)return t.modifiers[0].kind;switch(t.kind){case 240:return 76;case 241:return 110;case 239:return 90;case 243:return 243;case 158:return 126;case 159:return 137;case 156:if(t.asteriskToken)return 40;case 154:case 151:var r=e.getNameOfDeclaration(t);if(r)return r.kind}}(r))}(t,a,s)?i+o(s):i},getIndentation:function(){return i},getDelta:o,recomputeIndentation:function(e){r.parent&&t.SmartIndenter.shouldIndentChildNode(g,r.parent,r,l)&&(i+=e?g.indentSize:-g.indentSize,a=t.SmartIndenter.shouldIndentChildNode(g,r)?g.indentSize:0)}};function o(e){return t.SmartIndenter.nodeWillIndentChild(g,r,e,l,!0)?a:0}}function C(t,n,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o],u=e.rangeContainsRange(r,c);switch(c.kind){case 3:u&&A(c,n,!i),i=!1;break;case 2:i&&u&&a(c),i=!1;break;case 4:i=!0}}return i}function E(t,n,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o];if(e.isComment(c.kind)&&e.rangeContainsRange(r,c))k(c,l.getLineAndCharacterOfPosition(c.pos),n,i,a)}}function k(t,n,i,a,o){var s=0;u(t)||(_?s=function(t,r,n,i,a,o,s,c){h.updateContext(i,o,t,n,s);var u,_=y(h),d=0;if(_){switch(d=function(e,t,r,n,i){var a=i!==r;switch(e.action){case 1:return 0;case 8:if(t.end!==n.pos)return w(t.end,n.pos-t.end),a?2:0;break;case 4:if(1!==e.flags&&r!==i)return 0;var o=i-r;if(1!==o)return I(t.end,n.pos-t.end,g.newLineCharacter),a?0:1;break;case 2:if(1!==e.flags&&r!==i)return 0;var s=n.pos-t.end;if(1!==s||32!==l.text.charCodeAt(t.end))return I(t.end,n.pos-t.end," "),a?2:0}return 0}(_,i,a,t,r)){case 2:n.getStart(l)===t.pos&&c.recomputeIndentation(!1);break;case 1:n.getStart(l)===t.pos&&c.recomputeIndentation(!0);break;default:e.Debug.assert(0===d)}u=!(8&_.action)&&1!==_.flags}else u=!0;r!==a&&u&&F(a,r,i);return d}(t,n.line,i,_,f,d,a,o):F(l.getLineAndCharacterOfPosition(r.pos).line,n.line));return _=t,d=i,f=n.line,s}function N(t,r,n){var i=p(r,g);if(n)I(t,0,i);else{var a=l.getLineAndCharacterOfPosition(t),o=e.getStartPositionOfLine(a.line,l);(r!==function(e,t){for(var r=0,n=0;n<t;n++)9===l.text.charCodeAt(e+n)?r+=g.tabSize-r%g.tabSize:r++;return r}(o,a.character)||function(e,t){return e!==l.text.substr(t,e.length)}(i,o))&&I(o,a.character,i)}}function A(r,n,i,a){void 0===a&&(a=!0);var o=l.getLineAndCharacterOfPosition(r.pos).line,s=l.getLineAndCharacterOfPosition(r.end).line;if(o!==s){for(var c=[],u=r.pos,_=o;_<s;_++){var d=e.getEndLinePosition(_,l);c.push({pos:u,end:d}),u=e.getStartPositionOfLine(_+1,l)}if(a&&c.push({pos:u,end:r.end}),0!==c.length){var f=e.getStartPositionOfLine(o,l),m=t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(f,c[0].pos,l,g);if(n!==m.column){var y=0;i&&(y=1,o++);for(var h=n-m.column,v=y;v<c.length;v++,o++){var b=e.getStartPositionOfLine(o,l),D=0===v?m:t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(c[v].pos,c[v].end,l,g),x=D.column+h;if(x>0){var S=p(x,g);I(b,D.character,S)}else w(b,D.character)}}}}else i||N(r.pos,n,!1)}function F(t,r,n){for(var i=t;i<r;i++){var a=e.getStartPositionOfLine(i,l),o=e.getEndLinePosition(i,l);if(!(n&&(e.isComment(n.kind)||e.isStringOrRegularExpressionOrTemplateLiteral(n.kind))&&n.pos<=o&&n.end>o)){var s=P(a,o);-1!==s&&(e.Debug.assert(s===a||!e.isWhiteSpaceSingleLine(l.text.charCodeAt(s-1))),w(s,o+1-s))}}}function P(t,r){for(var n=r;n>=t&&e.isWhiteSpaceSingleLine(l.text.charCodeAt(n));)n--;return n!==r?n+1:-1}function w(t,r){r&&b.push(e.createTextChangeFromStartLength(t,r,""))}function I(t,r,n){(r||n)&&b.push(e.createTextChangeFromStartLength(t,r,n))}}function p(t,r){if((!i||i.tabSize!==r.tabSize||i.indentSize!==r.indentSize)&&(i={tabSize:r.tabSize,indentSize:r.indentSize},a=o=void 0),r.convertTabsToSpaces){var n=void 0,s=Math.floor(t/r.indentSize),c=t%r.indentSize;return o||(o=[]),void 0===o[s]?(n=e.repeatString(" ",r.indentSize*s),o[s]=n):n=o[s],c?n+e.repeatString(" ",c):n}var u=Math.floor(t/r.tabSize),l=t-u*r.tabSize,_=void 0;return a||(a=[]),void 0===a[u]?a[u]=_=e.repeatString("\t",u):_=a[u],l?_+e.repeatString(" ",l):_}!function(e){e[e.Unknown=-1]="Unknown"}(r||(r={})),t.formatOnEnter=function(t,r,n){var i=r.getLineAndCharacterOfPosition(t).line;if(0===i)return[];for(var a=e.getEndLinePosition(i,r);e.isWhiteSpaceSingleLine(r.text.charCodeAt(a));)a--;return e.isLineBreak(r.text.charCodeAt(a))&&a--,_({pos:e.getStartPositionOfLine(i-1,r),end:a+1},r,n,2)},t.formatOnSemicolon=function(e,t,r){return l(c(s(e,26,t)),t,r,3)},t.formatOnOpeningCurly=function(t,r,n){var i=s(t,18,r);if(!i)return[];var a=c(i.parent);return _({pos:e.getLineStartPositionForPosition(a.getStart(r),r),end:t},r,n,4)},t.formatOnClosingCurly=function(e,t,r){return l(c(s(e,19,t)),t,r,5)},t.formatDocument=function(e,t){return _({pos:0,end:e.text.length},e,t,0)},t.formatSelection=function(t,r,n,i){return _({pos:e.getLineStartPositionForPosition(t,n),end:r},n,i,1)},t.formatNodeGivenIndentation=function(e,r,n,i,a,o){var s={pos:0,end:r.text.length};return t.getFormattingScanner(r.text,n,s.pos,s.end,function(t){return d(s,e,i,a,t,o,1,function(e){return!1},r)})},function(e){e[e.None=0]="None",e[e.LineAdded=1]="LineAdded",e[e.LineRemoved=2]="LineRemoved"}(n||(n={})),t.getRangeOfEnclosingComment=function(t,r,n,i){void 0===i&&(i=e.getTokenAtPosition(t,r));var a=e.findAncestor(i,e.isJSDoc);if(a&&(i=a.parent),!(i.getStart(t)<=r&&r<i.getEnd())){var o=(n=null===n?void 0:void 0===n?e.findPrecedingToken(r,t):n)&&e.getTrailingCommentRanges(t.text,n.end),s=e.getLeadingCommentRangesOfNode(i,t),c=e.concatenate(o,s);return c&&e.find(c,function(n){return e.rangeContainsPositionExclusive(n,r)||r===n.end&&(2===n.kind||r===t.getFullWidth())})}},t.getIndentationString=p}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){!function(r){var n,i;function a(e){return e.baseIndentSize||0}function o(e,t,r,n,i,o,u){for(var l=e.parent;l;){var p=!0;if(r){var f=e.getStart(i);p=f<r.pos||f>r.end}var m=s(l,e,i),y=m.line===t.line||d(l,e,t.line,i);if(p){var h=g(e,i,u,!y);if(-1!==h)return h+n;if(-1!==(h=c(e,l,t,y,i,u)))return h+n}x(u,l,e,i,o)&&!y&&(n+=u.indentSize);var v=_(l,e,t.line,i);l=(e=l).parent,t=v?i.getLineAndCharacterOfPosition(e.getStart(i)):m}return n+a(u)}function s(e,t,r){var n=p(t,r),i=n?n.pos:e.getStart(r);return r.getLineAndCharacterOfPosition(i)}function c(t,r,n,i,a,o){return(e.isDeclaration(t)||e.isStatementButNotDeclaration(t))&&(284===r.kind||!i)?h(n,a,o):-1}function u(t,r,n,i){var a=e.findNextToken(t,r,i);return a?18===a.kind?1:19===a.kind&&n===l(a,i).line?2:0:0}function l(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(t,r,n,i){if(!e.isCallExpression(t)||!e.contains(t.arguments,r))return!1;var a=t.expression.getEnd();return e.getLineAndCharacterOfPosition(i,a).line===n}function d(t,r,n,i){if(222===t.kind&&t.elseStatement===r){var a=e.findChildOfKind(t,83,i);return e.Debug.assert(void 0!==a),l(a,i).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(t,r,n,i){switch(n.kind){case 164:return a(n.typeArguments);case 188:return a(n.properties);case 187:return a(n.elements);case 168:return a(n.members);case 239:case 196:case 197:case 156:case 155:case 160:case 157:case 166:case 161:return a(n.typeParameters)||a(n.parameters);case 240:case 209:case 241:case 242:case 308:return a(n.typeParameters);case 192:case 191:return a(n.typeArguments)||a(n.arguments);case 238:return a(n.declarations);case 252:case 256:return a(n.elements);case 184:case 185:return a(n.elements)}function a(a){return a&&e.rangeContainsStartEnd(function(e,t,r){for(var n=e.getChildren(r),i=1;i<n.length-1;i++)if(n[i].pos===t.pos&&n[i].end===t.end)return{pos:n[i-1].end,end:n[i+1].getStart(r)};return t}(n,a,i),t,r)?a:void 0}}function m(e,t,r){return e?h(t.getLineAndCharacterOfPosition(e.pos),t,r):-1}function g(e,t,r,n){if(e.parent&&238===e.parent.kind)return-1;var i=p(e,t);if(i){var a=i.indexOf(e);if(-1!==a){var o=y(i,a,t,r);if(-1!==o)return o}return m(i,t,r)+(n?r.indentSize:0)}return-1}function y(t,r,n,i){e.Debug.assert(r>=0&&r<t.length);for(var a=l(t[r],n),o=r-1;o>=0;o--)if(27!==t[o].kind){if(n.getLineAndCharacterOfPosition(t[o].end).line!==a.line)return h(a,n,i);a=l(t[o],n)}return-1}function h(e,t,r){var n=t.getPositionOfLineAndCharacter(e.line,0);return b(n,n+e.character,t,r)}function v(t,r,n,i){for(var a=0,o=0,s=t;s<r;s++){var c=n.text.charCodeAt(s);if(!e.isWhiteSpaceSingleLine(c))break;9===c?o+=i.tabSize+o%i.tabSize:o++,a++}return{column:o,character:a}}function b(e,t,r,n){return v(e,t,r,n).column}function D(t,r,n,i,a){var o=n?n.kind:0;switch(r.kind){case 221:case 240:case 209:case 241:case 243:case 242:case 187:case 218:case 245:case 188:case 168:case 181:case 170:case 246:case 272:case 271:case 195:case 189:case 191:case 192:case 219:case 254:case 230:case 205:case 185:case 184:case 262:case 265:case 261:case 270:case 155:case 160:case 161:case 151:case 165:case 166:case 177:case 193:case 201:case 256:case 252:case 257:case 253:case 154:return!0;case 237:case 275:return!(!t.indentMultiLineObjectLiteralBeginningOnBlankLine&&i&&188===o)||function(t,r){var n=e.skipTrivia(t.text,r.pos),i=t.getLineAndCharacterOfPosition(n).line,a=t.getLineAndCharacterOfPosition(r.end).line;return i===a}(i,n);case 223:case 224:case 226:case 227:case 225:case 222:case 239:case 196:case 156:case 197:case 157:case 158:case 159:return 218!==o;case 255:return 256!==o;case 249:return 250!==o||!!n.namedBindings&&252!==n.namedBindings.kind;case 260:return 263!==o;case 264:return 266!==o;case 174:case 173:if(168===o)return!1}return a}function x(e,t,r,n,i){return void 0===i&&(i=!1),D(e,t,r,n,!1)&&!(i&&r&&function(e,t){switch(e){case 230:case 234:case 228:case 229:return 218!==t.kind;default:return!1}}(r.kind,t))}!function(e){e[e.Unknown=-1]="Unknown"}(n||(n={})),r.getIndentation=function(r,n,i,s){if(void 0===s&&(s=!1),r>n.text.length)return a(i);if(i.indentStyle===e.IndentStyle.None)return 0;var c=e.findPrecedingToken(r,n,void 0,!0),_=t.getRangeOfEnclosingComment(n,r,c||null);if(_&&3===_.kind)return function(t,r,n,i){var a=e.getLineAndCharacterOfPosition(t,r).line-1,o=e.getLineAndCharacterOfPosition(t,i.pos).line;if(e.Debug.assert(o>=0),a<=o)return b(e.getStartPositionOfLine(o,t),r,t,n);var s=e.getStartPositionOfLine(a,t),c=v(s,r,t,n),u=c.column,l=c.character;return 0===u?u:42===t.text.charCodeAt(s+l)?u-1:u}(n,r,i,_);if(!c)return a(i);if(e.isStringOrRegularExpressionOrTemplateLiteral(c.kind)&&c.getStart(n)<=r&&r<c.end)return 0;var d=n.getLineAndCharacterOfPosition(r).line;if(i.indentStyle===e.IndentStyle.Block)return function(t,r,n){for(var i=r;i>0;){var a=t.text.charCodeAt(i);if(!e.isWhiteSpaceLike(a))break;i--}return b(e.getLineStartPositionForPosition(i,t),i,t,n)}(n,r,i);if(27===c.kind&&204!==c.parent.kind){var p=function(t,r,n){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?y(i.list.getChildren(),i.listItemIndex-1,r,n):-1}(c,n,i);if(-1!==p)return p}var h=function(e,t,r){return t&&f(e,e,t,r)}(r,c.parent,n);return h&&!e.rangeContainsRange(h,c)?m(h,n,i)+i.indentSize:function(t,r,n,i,s,c){for(var _,d=n;d;){if(e.positionBelongsToNode(d,r,t)&&x(c,d,_,t,!0)){var p=l(d,t),f=u(n,d,i,t),m=0!==f?s&&2===f?c.indentSize:0:i!==p.line?c.indentSize:0;return o(d,p,void 0,m,t,!0,c)}var y=g(d,t,c,!0);if(-1!==y)return y;_=d,d=d.parent}return a(c)}(n,r,c,d,s,i)},r.getIndentationForNode=function(e,t,r,n){return o(e,r.getLineAndCharacterOfPosition(e.getStart(r)),t,0,r,!1,n)},r.getBaseIndentation=a,function(e){e[e.Unknown=0]="Unknown",e[e.OpenBrace=1]="OpenBrace",e[e.CloseBrace=2]="CloseBrace"}(i||(i={})),r.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,r.childStartsOnTheSameLineWithElseInIfStatement=d,r.getContainingList=p,r.findFirstNonWhitespaceCharacterAndColumn=v,r.findFirstNonWhitespaceColumn=b,r.nodeWillIndentChild=D,r.shouldIndentChildNode=x}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(c||(c={})),function(e){!function(t){function r(t){var r=t.__pos;return e.Debug.assert("number"==typeof r),r}function n(t,r){e.Debug.assert("number"==typeof r),t.__pos=r}function a(t){var r=t.__end;return e.Debug.assert("number"==typeof r),r}function o(t,r){e.Debug.assert("number"==typeof r),t.__end=r}var s,c;function u(t,r){return e.skipTrivia(t,r,!1,!0)}!function(e){e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll"}(s=t.LeadingTriviaOption||(t.LeadingTriviaOption={})),function(e){e[e.Exclude=0]="Exclude",e[e.Include=1]="Include"}(c=t.TrailingTriviaOption||(t.TrailingTriviaOption={}));var l,_={leadingTriviaOption:s.Exclude,trailingTriviaOption:c.Exclude};function d(e,t,r,n){return{pos:p(e,t,n),end:f(e,r,n)}}function p(t,r,n){var i=n.leadingTriviaOption;if(i===s.Exclude)return r.getStart(t);var a=r.getFullStart(),o=r.getStart(t);if(a===o)return o;var c=e.getLineStartPositionForPosition(a,t);if(e.getLineStartPositionForPosition(o,t)===c)return i===s.IncludeAll?a:o;var l=a>0?1:0,_=e.getStartPositionOfLine(e.getLineOfLocalPosition(t,c)+l,t);return _=u(t.text,_),e.getStartPositionOfLine(e.getLineOfLocalPosition(t,_),t)}function f(t,r,n){var i=r.end,a=n.trailingTriviaOption;if(a===c.Exclude||e.isExpression(r)&&a!==c.Include)return i;var o=e.skipTrivia(t.text,i,!0);return o===i||a!==c.Include&&!e.isLineBreak(t.text.charCodeAt(o-1))?i:o}function m(e,t){return!!t&&!!e.parent&&(27===t.kind||26===t.kind&&188===e.parent.kind)}!function(e){e[e.Remove=0]="Remove",e[e.ReplaceWithSingleNode=1]="ReplaceWithSingleNode",e[e.ReplaceWithMultipleNodes=2]="ReplaceWithMultipleNodes",e[e.Text=3]="Text"}(l||(l={}));var g,y=function(){function t(t,r){this.newLineCharacter=t,this.formatContext=r,this.changes=[],this.newFiles=[],this.classesWithNodesInsertedAtStart=e.createMap(),this.deletedNodes=[]}return t.fromContext=function(r){return new t(e.getNewLineOrDefaultFromHost(r.host,r.formatContext.options),r.formatContext)},t.with=function(e,r){var n=t.fromContext(e);return r(n),n.getChanges()},t.prototype.deleteRange=function(e,t){this.changes.push({kind:l.Remove,sourceFile:e,range:t})},t.prototype.delete=function(e,t){this.deletedNodes.push({sourceFile:e,node:t})},t.prototype.deleteModifier=function(t,r){this.deleteRange(t,{pos:r.getStart(t),end:e.skipTrivia(t.text,r.end,!0)})},t.prototype.deleteNodeRange=function(e,t,r,n){void 0===n&&(n={leadingTriviaOption:s.IncludeAll});var i=p(e,t,n),a=f(e,r,n);this.deleteRange(e,{pos:i,end:a})},t.prototype.deleteNodeRangeExcludingEnd=function(e,t,r,n){void 0===n&&(n={leadingTriviaOption:s.IncludeAll});var i=p(e,t,n),a=void 0===r?e.text.length:p(e,r,n);this.deleteRange(e,{pos:i,end:a})},t.prototype.replaceRange=function(e,t,r,n){void 0===n&&(n={}),this.changes.push({kind:l.ReplaceWithSingleNode,sourceFile:e,range:t,options:n,node:r})},t.prototype.replaceNode=function(e,t,r,n){void 0===n&&(n=_),this.replaceRange(e,d(e,t,t,n),r,n)},t.prototype.replaceNodeRange=function(e,t,r,n,i){void 0===i&&(i=_),this.replaceRange(e,d(e,t,r,i),n,i)},t.prototype.replaceRangeWithNodes=function(e,t,r,n){void 0===n&&(n={}),this.changes.push({kind:l.ReplaceWithMultipleNodes,sourceFile:e,range:t,options:n,nodes:r})},t.prototype.replaceNodeWithNodes=function(e,t,r,n){void 0===n&&(n=_),this.replaceRangeWithNodes(e,d(e,t,t,n),r,n)},t.prototype.replaceNodeWithText=function(e,t,r){this.replaceRangeWithText(e,d(e,t,t,_),r)},t.prototype.replaceNodeRangeWithNodes=function(e,t,r,n,i){void 0===i&&(i=_),this.replaceRangeWithNodes(e,d(e,t,r,i),n,i)},t.prototype.nextCommaToken=function(t,r){var n=e.findNextToken(r,r.parent,t);return n&&27===n.kind?n:void 0},t.prototype.replacePropertyAssignment=function(e,t,r){var n=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,r,{suffix:n})},t.prototype.insertNodeAt=function(t,r,n,i){void 0===i&&(i={}),this.replaceRange(t,e.createRange(r),n,i)},t.prototype.insertNodesAt=function(t,r,n,i){void 0===i&&(i={}),this.replaceRangeWithNodes(t,e.createRange(r),n,i)},t.prototype.insertNodeAtTopOfFile=function(t,r,n){var i=function(t){for(var r,n=0,i=t.statements;n<i.length;n++){var a=i[n];if(!e.isPrologueDirective(a))break;r=a}var o=0,s=t.text;if(r)return o=r.end,p(),o;var c=e.getShebang(s);void 0!==c&&(o=c.length,p());var u=e.getLeadingCommentRanges(s,o);if(!u)return o;u.length&&3===u[0].kind&&e.isPinnedComment(s,u[0].pos)&&(o=u[0].end,p(),u=u.slice(1));for(var l=0,_=u;l<_.length;l++){var d=_[l];if(2!==d.kind||!e.isRecognizedTripleSlashComment(s,d.pos,d.end))break;o=d.end,p()}return o;function p(){if(o<s.length){var t=s.charCodeAt(o);e.isLineBreak(t)&&++o<s.length&&13===t&&10===s.charCodeAt(o)&&o++}}}(t);this.insertNodeAt(t,i,r,{prefix:0===i?void 0:this.newLineCharacter,suffix:(e.isLineBreak(t.text.charCodeAt(i))?"":this.newLineCharacter)+(n?this.newLineCharacter:"")})},t.prototype.insertNodeBefore=function(e,t,r,n){void 0===n&&(n=!1),this.insertNodeAt(e,p(e,t,{}),r,this.getOptionsForInsertNodeBefore(t,n))},t.prototype.insertModifierBefore=function(t,r,n){var i=n.getStart(t);this.insertNodeAt(t,i,e.createToken(r),{suffix:" "})},t.prototype.insertLastModifierBefore=function(t,r,n){if(n.modifiers){var i=n.modifiers.end;this.insertNodeAt(t,i,e.createToken(r),{prefix:" "})}else this.insertModifierBefore(t,r,n)},t.prototype.insertCommentBeforeLine=function(t,r,n,i){var a=e.getStartPositionOfLine(r,t),o=e.getFirstNonSpaceCharacterPosition(t.text,a),s=E(t,o),c=e.getTouchingToken(t,s?o:n),u=t.text.slice(a,o),l=(s?"":this.newLineCharacter)+"//"+i+this.newLineCharacter+u;this.insertText(t,c.getStart(t),l)},t.prototype.insertJsdocCommentBefore=function(t,r,n){var i=r.getStart(t);if(r.jsDoc)for(var a=0,o=r.jsDoc;a<o.length;a++){var s=o[a];this.deleteRange(t,{pos:e.getLineStartPositionForPosition(s.getStart(t),t),end:f(t,s,{})})}var c=e.getPrecedingNonSpaceCharacterPosition(t.text,i-1),u=t.text.slice(c,i);this.insertNodeAt(t,i,n,{preserveLeadingWhitespace:!1,suffix:this.newLineCharacter+u})},t.prototype.replaceRangeWithText=function(e,t,r){this.changes.push({kind:l.Text,sourceFile:e,range:t,text:r})},t.prototype.insertText=function(t,r,n){this.replaceRangeWithText(t,e.createRange(r),n)},t.prototype.tryInsertTypeAnnotation=function(t,r,n){var i;if(e.isFunctionLike(r)){if(!(i=e.findChildOfKind(r,21,t))){if(!e.isArrowFunction(r))return;i=e.first(r.parameters)}}else i=237!==r.kind&&r.questionToken?r.questionToken:r.name;this.insertNodeAt(t,i.end,n,{prefix:": "})},t.prototype.insertTypeParameters=function(t,r,n){var i=(e.findChildOfKind(r,20,t)||e.first(r.parameters)).getStart(t);this.insertNodesAt(t,i,n,{prefix:"<",suffix:">"})},t.prototype.getOptionsForInsertNodeBefore=function(t,r){return e.isStatement(t)||e.isClassElement(t)?{suffix:r?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:e.isVariableDeclaration(t)?{suffix:", "}:e.isParameter(t)?{}:e.isStringLiteral(t)&&e.isImportDeclaration(t.parent)||e.isNamedImports(t)?{suffix:", "}:e.Debug.failBadSyntaxKind(t)},t.prototype.insertNodeAtConstructorStart=function(t,r,n){var i=e.firstOrUndefined(r.body.statements);i&&r.body.multiLine?this.insertNodeBefore(t,i,n):this.replaceConstructorBody(t,r,[n].concat(r.body.statements))},t.prototype.insertNodeAtConstructorEnd=function(t,r,n){var i=e.lastOrUndefined(r.body.statements);i&&r.body.multiLine?this.insertNodeAfter(t,i,n):this.replaceConstructorBody(t,r,r.body.statements.concat([n]))},t.prototype.replaceConstructorBody=function(t,r,n){this.replaceNode(t,r.body,e.createBlock(n,!0))},t.prototype.insertNodeAtEndOfScope=function(t,r,n){var i=p(t,r.getLastToken(),{});this.insertNodeAt(t,i,n,{prefix:e.isLineBreak(t.text.charCodeAt(r.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})},t.prototype.insertNodeAtClassStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},t.prototype.insertNodeAtObjectStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},t.prototype.insertNodeAtStartWorker=function(t,r,n){var a=r.getStart(t),o=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(e.getLineStartPositionForPosition(a,t),a,t,this.formatContext.options)+this.formatContext.options.indentSize;this.insertNodeAt(t,b(r).pos,n,i({indentation:o},this.getInsertNodeAtStartPrefixSuffix(t,r)))},t.prototype.getInsertNodeAtStartPrefixSuffix=function(t,r){var n=e.isObjectLiteralExpression(r)?",":"";if(0===b(r).length){if(e.addToSeen(this.classesWithNodesInsertedAtStart,e.getNodeId(r),{node:r,sourceFile:t})){var i=e.positionsAreOnSameLine.apply(void 0,v(r,t).concat([t]));return{prefix:this.newLineCharacter,suffix:n+(i?this.newLineCharacter:"")}}return{prefix:"",suffix:n+this.newLineCharacter}}return{prefix:this.newLineCharacter,suffix:n}},t.prototype.insertNodeAfterComma=function(e,t,r){var n=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},t.prototype.insertNodeAfter=function(e,t,r){var n=this.insertNodeAfterWorker(e,t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},t.prototype.insertNodeAtEndOfList=function(e,t,r){this.insertNodeAt(e,t.end,r,{prefix:", "})},t.prototype.insertNodesAfter=function(t,r,n){var i=this.insertNodeAfterWorker(t,r,e.first(n));this.insertNodesAt(t,i,n,this.getInsertNodeAfterOptions(t,r))},t.prototype.insertNodeAfterWorker=function(t,r,n){var i,a;return i=r,a=n,((e.isPropertySignature(i)||e.isPropertyDeclaration(i))&&e.isClassOrTypeElement(a)&&149===a.name.kind||e.isStatementButNotDeclaration(i)&&e.isStatementButNotDeclaration(a))&&59!==t.text.charCodeAt(r.end-1)&&this.replaceRange(t,e.createRange(r.end),e.createToken(26)),f(t,r,{})},t.prototype.getInsertNodeAfterOptions=function(t,r){var n=this.getInsertNodeAfterOptionsWorker(r);return i({},n,{prefix:r.end===t.end&&e.isStatement(r)?n.prefix?"\n"+n.prefix:"\n":n.prefix})},t.prototype.getInsertNodeAfterOptionsWorker=function(t){switch(t.kind){case 240:case 244:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 237:case 10:case 72:return{prefix:", "};case 275:return{suffix:","+this.newLineCharacter};case 85:return{prefix:" "};case 151:return{};default:return e.Debug.assert(e.isStatement(t)||e.isClassOrTypeElement(t)),{suffix:this.newLineCharacter}}},t.prototype.insertName=function(t,r,n){if(e.Debug.assert(!r.name),197===r.kind){var i=e.findChildOfKind(r,37,t),a=e.findChildOfKind(r,20,t);a?(this.insertNodesAt(t,a.getStart(t),[e.createToken(90),e.createIdentifier(n)],{joiner:" "}),k(this,t,i)):(this.insertText(t,e.first(r.parameters).getStart(t),"function "+n+"("),this.replaceRange(t,i,e.createToken(21))),218!==r.body.kind&&(this.insertNodesAt(t,r.body.getStart(t),[e.createToken(18),e.createToken(97)],{joiner:" ",suffix:" "}),this.insertNodesAt(t,r.body.end,[e.createToken(26),e.createToken(19)],{joiner:" "}))}else{var o=e.findChildOfKind(r,196===r.kind?90:76,t).end;this.insertNodeAt(t,o,e.createIdentifier(n),{prefix:" "})}},t.prototype.insertExportModifier=function(e,t){this.insertText(e,t.getStart(e),"export ")},t.prototype.insertNodeInListAfter=function(t,r,n,i){if(void 0===i&&(i=e.formatting.SmartIndenter.getContainingList(r,t)),i){var a=e.indexOfNode(i,r);if(!(a<0)){var o=r.getEnd();if(a!==i.length-1){var s=e.getTokenAtPosition(t,r.end);if(s&&m(r,s)){var c=e.getLineAndCharacterOfPosition(t,u(t.text,i[a+1].getFullStart())),l=e.getLineAndCharacterOfPosition(t,s.end),_=void 0,d=void 0;l.line===c.line?(d=s.end,_=function(e){for(var t="",r=0;r<e;r++)t+=" ";return t}(c.character-l.character)):d=e.getStartPositionOfLine(c.line,t);var p=""+e.tokenToString(s.kind)+t.text.substring(s.end,i[a+1].getStart(t));this.replaceRange(t,e.createRange(d,i[a+1].getStart(t)),n,{prefix:_,suffix:p})}}else{var f=r.getStart(t),g=e.getLineStartPositionForPosition(f,t),y=void 0,h=!1;if(1===i.length)y=27;else{var v=e.findPrecedingToken(r.pos,t);y=m(r,v)?v.kind:27,h=e.getLineStartPositionForPosition(i[a-1].getStart(t),t)!==g}if(function(t,r){for(var n=r;n<t.length;){var i=t.charCodeAt(n);if(!e.isWhiteSpaceSingleLine(i))return 47===i;n++}return!1}(t.text,r.end)&&(h=!0),h){this.replaceRange(t,e.createRange(o),e.createToken(y));var b=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(g,f,t,this.formatContext.options),D=e.skipTrivia(t.text,o,!0,!1);D!==o&&e.isLineBreak(t.text.charCodeAt(D-1))&&D--,this.replaceRange(t,e.createRange(D),n,{indentation:b,prefix:this.newLineCharacter})}else this.replaceRange(t,e.createRange(o),n,{prefix:e.tokenToString(y)+" "})}}}else e.Debug.fail("node is not a list element")},t.prototype.finishClassesWithNodesInsertedAtStart=function(){var t=this;this.classesWithNodesInsertedAtStart.forEach(function(r){var n=r.node,i=r.sourceFile,a=v(n,i),o=a[0],s=a[1];e.positionsAreOnSameLine(o,s,i)&&o!==s-1&&t.deleteRange(i,e.createRange(o,s-1))})},t.prototype.finishDeleteDeclarations=function(){for(var t=this,r=new e.NodeSet,n=function(t,n){i.deletedNodes.some(function(r){return r.sourceFile===t&&e.rangeContainsRangeExclusive(r.node,n)})||(e.isArray(n)?i.deleteRange(t,e.rangeOfTypeParameters(n)):T.deleteDeclaration(i,r,t,n))},i=this,a=0,o=this.deletedNodes;a<o.length;a++){var s=o[a];n(s.sourceFile,s.node)}r.forEach(function(n){var i=n.getSourceFile(),a=e.formatting.SmartIndenter.getContainingList(n,i);if(n===e.last(a)){var o=e.findLastIndex(a,function(e){return!r.has(e)},a.length-2);-1!==o&&t.deleteRange(i,{pos:a[o].end,end:h(i,a[o+1])})}})},t.prototype.getChanges=function(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();for(var t=g.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e),r=0,n=this.newFiles;r<n.length;r++){var i=n[r],a=i.oldFile,o=i.fileName,s=i.statements;t.push(g.newFileChanges(a,o,s,this.newLineCharacter,this.formatContext))}return t},t.prototype.createNewFile=function(e,t,r){this.newFiles.push({oldFile:e,fileName:t,statements:r})},t}();function h(t,r){return e.skipTrivia(t.text,p(t,r,{leadingTriviaOption:s.IncludeAll}),!1,!0)}function v(t,r){return[e.findChildOfKind(t,18,r).end,e.findChildOfKind(t,19,r).end]}function b(t){return e.isObjectLiteralExpression(t)?t.properties:t.members}function D(t,r){for(var n=r.length-1;n>=0;n--){var i=r[n],a=i.span,o=i.newText;t=""+t.substring(0,a.start)+o+t.substring(e.textSpanEnd(a))}return t}function x(t){var n=e.visitEachChild(t,x,e.nullTransformationContext,S,x),i=e.nodeIsSynthesized(n)?n:Object.create(n);return i.pos=r(t),i.end=a(t),i}function S(t,n,i,o,s){var c=e.visitNodes(t,n,i,o,s);if(!c)return c;var u=c===t?e.createNodeArray(c.slice(0)):c;return u.pos=r(t),u.end=a(t),u}t.ChangeTracker=y,t.getNewFileText=function(e,t,r,n){return g.newFileChangesWorker(void 0,t,e,r,n)},function(t){function r(t,r,i,a,o){var s=i.map(function(e){return n(e,t,a).text}).join(a),c=e.createSourceFile("any file name",s,7,!0,r);return D(s,e.formatting.formatDocument(c,o))+a}function n(t,r,n){var i=new C(n),a="\n"===n?1:0;return e.createPrinter({newLine:a,neverAsciiEscape:!0},i).writeNode(4,t,r,i),{text:i.getText(),node:x(t)}}t.getTextChangesFromChanges=function(t,r,i,a){return e.group(t,function(e){return e.sourceFile.path}).map(function(t){for(var o=t[0].sourceFile,s=e.stableSort(t,function(e,t){return e.range.pos-t.range.pos||e.range.end-t.range.end}),c=function(t){e.Debug.assert(s[t].range.end<=s[t+1].range.pos,"Changes overlap",function(){return JSON.stringify(s[t].range)+" and "+JSON.stringify(s[t+1].range)})},u=0;u<s.length-1;u++)c(u);var _=s.map(function(t){return e.createTextChange(e.createTextSpanFromRange(t.range),function(t,r,i,a,o){if(t.kind===l.Remove)return"";if(t.kind===l.Text)return t.text;var s=t.options,c=void 0===s?{}:s,u=t.range.pos,_=function(t){return function(t,r,i,a,o,s,c){var u=a.indentation,l=a.prefix,_=a.delta,d=n(t,r,o),p=d.node,f=d.text;c&&c(p,f);var m=s.options,g=void 0!==u?u:e.formatting.SmartIndenter.getIndentation(i,r,m,l===o||e.getLineStartPositionForPosition(i,r)===i);void 0===_&&(_=e.formatting.SmartIndenter.shouldIndentChildNode(s.options,t)&&m.indentSize||0);var y={text:f,getLineAndCharacterOfPosition:function(t){return e.getLineAndCharacterOfPosition(this,t)}},h=e.formatting.formatNodeGivenIndentation(p,y,r.languageVariant,g,_,s);return D(f,h)}(t,r,u,c,i,a,o)},d=t.kind===l.ReplaceWithMultipleNodes?t.nodes.map(function(t){return e.removeSuffix(_(t),i)}).join(t.options.joiner||i):_(t.node),p=c.preserveLeadingWhitespace||void 0!==c.indentation||e.getLineStartPositionForPosition(u,r)===u?d:d.replace(/^\s+/,"");return(c.prefix||"")+p+(c.suffix||"")}(t,o,r,i,a))});return{fileName:o.fileName,textChanges:_}})},t.newFileChanges=function(t,n,i,a,o){var s=r(t,e.getScriptKindFromFileName(n),i,a,o);return{fileName:n,textChanges:[e.createTextChange(e.createTextSpan(0,0),s)],isNewFile:!0}},t.newFileChangesWorker=r,t.getNonformattedText=n}(g||(g={})),t.applyChanges=D;var T,C=function(){function t(t){var r=this;this.lastNonTriviaPosition=0,this.writer=e.createTextWriter(t),this.onEmitNode=function(e,t,i){t&&n(t,r.lastNonTriviaPosition),i(e,t),t&&o(t,r.lastNonTriviaPosition)},this.onBeforeEmitNodeArray=function(e){e&&n(e,r.lastNonTriviaPosition)},this.onAfterEmitNodeArray=function(e){e&&o(e,r.lastNonTriviaPosition)},this.onBeforeEmitToken=function(e){e&&n(e,r.lastNonTriviaPosition)},this.onAfterEmitToken=function(e){e&&o(e,r.lastNonTriviaPosition)}}return t.prototype.setLastNonTriviaPosition=function(t,r){if(r||!function(t){return e.skipTrivia(t,0)===t.length}(t)){this.lastNonTriviaPosition=this.writer.getTextPos();for(var n=0;e.isWhiteSpaceLike(t.charCodeAt(t.length-n-1));)n++;this.lastNonTriviaPosition-=n}},t.prototype.write=function(e){this.writer.write(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeComment=function(e){this.writer.writeComment(e)},t.prototype.writeKeyword=function(e){this.writer.writeKeyword(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeOperator=function(e){this.writer.writeOperator(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writePunctuation=function(e){this.writer.writePunctuation(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeTrailingSemicolon=function(e){this.writer.writeTrailingSemicolon(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeParameter=function(e){this.writer.writeParameter(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeProperty=function(e){this.writer.writeProperty(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeSpace=function(e){this.writer.writeSpace(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeStringLiteral=function(e){this.writer.writeStringLiteral(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeSymbol=function(e,t){this.writer.writeSymbol(e,t),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeLine=function(){this.writer.writeLine()},t.prototype.increaseIndent=function(){this.writer.increaseIndent()},t.prototype.decreaseIndent=function(){this.writer.decreaseIndent()},t.prototype.getText=function(){return this.writer.getText()},t.prototype.rawWrite=function(e){this.writer.rawWrite(e),this.setLastNonTriviaPosition(e,!1)},t.prototype.writeLiteral=function(e){this.writer.writeLiteral(e),this.setLastNonTriviaPosition(e,!0)},t.prototype.getTextPos=function(){return this.writer.getTextPos()},t.prototype.getLine=function(){return this.writer.getLine()},t.prototype.getColumn=function(){return this.writer.getColumn()},t.prototype.getIndent=function(){return this.writer.getIndent()},t.prototype.isAtStartOfLine=function(){return this.writer.isAtStartOfLine()},t.prototype.clear=function(){this.writer.clear(),this.lastNonTriviaPosition=0},t}();function E(t,r){return!(e.isInComment(t,r)||e.isInString(t,r)||e.isInTemplateString(t,r)||e.isInJSXText(t,r))}function k(e,t,r,n){void 0===n&&(n={leadingTriviaOption:s.IncludeAll});var i=p(t,r,n),a=f(t,r,n);e.deleteRange(t,{pos:i,end:a})}function N(t,r,n,i){var a=e.Debug.assertDefined(e.formatting.SmartIndenter.getContainingList(i,n)),o=e.indexOfNode(a,i);e.Debug.assert(-1!==o),1!==a.length?(e.Debug.assert(!r.has(i),"Deleting a node twice"),r.add(i),t.deleteRange(n,{pos:h(n,i),end:o===a.length-1?f(n,i,{}):h(n,a[o+1])})):k(t,n,i)}t.isValidLocationToAddComment=E,function(t){function r(t,r,n){if(n.parent.name){var i=e.Debug.assertDefined(e.getTokenAtPosition(r,n.pos-1));t.deleteRange(r,{pos:i.getStart(r),end:n.end})}else{k(t,r,e.getAncestor(n,249))}}t.deleteDeclaration=function(t,n,i,a){switch(a.kind){case 151:var o=a.parent;e.isArrowFunction(o)&&1===o.parameters.length&&!e.findChildOfKind(o,20,i)?t.replaceNodeWithText(i,a,"()"):N(t,n,i,a);break;case 249:k(t,i,a,a===i.imports[0].parent?{leadingTriviaOption:s.Exclude}:void 0);break;case 186:var u=a.parent;185===u.kind&&a!==e.last(u.elements)?k(t,i,a):N(t,n,i,a);break;case 237:!function(t,r,n,i){var a=i.parent;if(274!==a.kind)if(1===a.declarations.length){var o=a.parent;switch(o.kind){case 227:case 226:t.replaceNode(n,i,e.createObjectLiteral());break;case 225:k(t,n,a);break;case 219:k(t,n,o);break;default:e.Debug.assertNever(o)}}else N(t,r,n,i);else t.deleteNodeRange(n,e.findChildOfKind(a,20,n),e.findChildOfKind(a,21,n))}(t,n,i,a);break;case 150:N(t,n,i,a);break;case 253:var l=a.parent;1===l.elements.length?r(t,i,l):N(t,n,i,a);break;case 251:r(t,i,a);break;default:e.isImportClause(a.parent)&&a.parent.name===a?function(t,r,n){if(n.namedBindings){var i=n.name.getStart(r),a=e.getTokenAtPosition(r,n.name.end);if(a&&27===a.kind){var o=e.skipTrivia(r.text,a.end,!1,!0);t.deleteRange(r,{pos:i,end:o})}else k(t,r,n.name)}else k(t,r,n.parent)}(t,i,a.parent):e.isCallLikeExpression(a.parent)?N(t,n,i,a):k(t,i,a,26===a.kind?{trailingTriviaOption:c.Exclude}:void 0)}}}(T||(T={})),t.deleteNode=k}(e.textChanges||(e.textChanges={}))}(c||(c={})),function(e){!function(t){var r=e.createMultiMap(),n=e.createMap();function i(t){return e.isArray(t)?e.formatStringFromArgs(e.getLocaleSpecificMessage(t[0]),t.slice(1)):e.getLocaleSpecificMessage(t)}function a(e,t,r,n,i,a){return{fixName:e,description:t,changes:r,fixId:n,fixAllDescription:i,commands:a?[a]:void 0}}function o(e,t){return{changes:e,commands:t}}function s(t,r,n){for(var i=t.program,a=t.sourceFile,o=t.cancellationToken,s=0,c=i.getSemanticDiagnostics(a,o).concat(e.computeSuggestionDiagnostics(a,i,o));s<c.length;s++){var u=c[s];e.contains(r,u.code)&&n(u)}}t.createCodeFixActionNoFixId=function(e,t,r){return a(e,i(r),t,void 0,void 0)},t.createCodeFixAction=function(e,t,r,n,o,s){return a(e,i(r),t,n,i(o),s)},t.registerCodeFix=function(t){for(var i=0,a=t.errorCodes;i<a.length;i++){var o=a[i];r.add(String(o),t)}if(t.fixIds)for(var s=0,c=t.fixIds;s<c.length;s++){var u=c[s];e.Debug.assert(!n.has(u)),n.set(u,t)}},t.getSupportedErrorCodes=function(){return e.arrayFrom(r.keys())},t.getFixes=function(t){return e.flatMap(r.get(String(t.errorCode))||e.emptyArray,function(e){return e.getCodeActions(t)})},t.getAllFixes=function(t){return n.get(e.cast(t.fixId,e.isString)).getAllCodeActions(t)},t.createCombinedCodeActions=o,t.createFileTextChanges=function(e,t){return{fileName:e,textChanges:t}},t.codeFixAll=function(t,r,n){var i=[];return o(e.textChanges.ChangeTracker.with(t,function(e){return s(t,r,function(t){return n(e,t,i)})}),0===i.length?void 0:i)},t.eachDiagnostic=s}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r=e.createMap();t.registerRefactor=function(e,t){r.set(e,t)},t.getApplicableRefactors=function(t){return e.arrayFrom(e.flatMapIterator(r.values(),function(e){return t.cancellationToken&&t.cancellationToken.isCancellationRequested()?void 0:e.getAvailableActions(t)}))},t.getEditsForRefactor=function(e,t,n){var i=r.get(t);return i&&i.getEditsForAction(e,n)}}(e.refactor||(e.refactor={})),e.getRefactorContextSpan=function(t){var r=t.startPosition,n=t.endPosition;return e.createTextSpanFromBounds(r,void 0===n?r:n)}}(c||(c={})),function(e){!function(t){var r="addConvertToUnknownForNonOverlappingTypes",n=[e.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.Debug.assertDefined(e.findAncestor(i,function(t){return e.isAsExpression(t)||e.isTypeAssertion(t)})),o=e.isAsExpression(a)?e.createAsExpression(a.expression,e.createKeywordTypeNode(143)):e.createTypeAssertion(e.createKeywordTypeNode(143),a.expression);t.replaceNode(r,a.expression,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start)});return[t.createCodeFixAction(r,a,e.Diagnostics.Add_unknown_conversion_for_non_overlapping_types,r,e.Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){return i(e,t.file,t.start)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="addMissingInvocationForDecorator",n=[e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.findAncestor(i,e.isDecorator);e.Debug.assert(!!a,"Expected position to be owned by a decorator.");var o=e.createCall(a.expression,void 0,void 0);t.replaceNode(r,a.expression,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start)});return[t.createCodeFixAction(r,a,e.Diagnostics.Call_decorator_expression,r,e.Diagnostics.Add_to_all_uncalled_decorators)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){return i(e,t.file,t.start)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="addNameToNamelessParameter",n=[e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n);if(!e.isIdentifier(i))return e.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a "+e.formatSyntaxKind(i.kind));var a=i.parent;if(!e.isParameter(a))return e.Debug.fail("Tried to add a parameter name to a non-parameter: "+e.formatSyntaxKind(i.kind));var o=a.parent.parameters.indexOf(a);e.Debug.assert(!a.type,"Tried to add a parameter name to a parameter that already had one."),e.Debug.assert(o>-1,"Parameter not found in parent parameter list.");var s=e.createParameter(void 0,a.modifiers,a.dotDotDotToken,"arg"+o,a.questionToken,e.createTypeReferenceNode(i,void 0),a.initializer);t.replaceNode(r,i,s)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start)});return[t.createCodeFixAction(r,a,e.Diagnostics.Add_parameter_name,r,e.Diagnostics.Add_names_to_all_parameters_without_names)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){return i(e,t.file,t.start)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="annotateWithTypeFromJSDoc",n=[e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.tryCast(e.isParameter(n.parent)?n.parent.parent:n.parent,a)}function a(t){return function(t){return e.isFunctionLikeDeclaration(t)||237===t.kind||153===t.kind||154===t.kind}(t)&&o(t)}function o(t){return e.isFunctionLikeDeclaration(t)?t.parameters.some(o)||!t.type&&!!e.getJSDocReturnType(t):!t.type&&!!e.getJSDocType(t)}function s(t,r,n){if(e.isFunctionLikeDeclaration(n)&&(e.getJSDocReturnType(n)||n.parameters.some(function(t){return!!e.getJSDocType(t)}))){if(!n.typeParameters){var i=e.getJSDocTypeParameterDeclarations(n);i.length&&t.insertTypeParameters(r,n,i)}var a=e.isArrowFunction(n)&&!e.findChildOfKind(n,20,r);a&&t.insertNodeBefore(r,e.first(n.parameters),e.createToken(20));for(var o=0,s=n.parameters;o<s.length;o++){var u=s[o];if(!u.type){var l=e.getJSDocType(u);l&&t.tryInsertTypeAnnotation(r,u,c(l))}}if(a&&t.insertNodeAfter(r,e.last(n.parameters),e.createToken(21)),!n.type){var _=e.getJSDocReturnType(n);_&&t.tryInsertTypeAnnotation(r,n,c(_))}}else{var d=e.Debug.assertDefined(e.getJSDocType(n));e.Debug.assert(!n.type),t.tryInsertTypeAnnotation(r,n,c(d))}}function c(t){switch(t.kind){case 289:case 290:return e.createTypeReferenceNode("any",e.emptyArray);case 293:return function(t){return e.createUnionTypeNode([e.visitNode(t.type,c),e.createTypeReferenceNode("undefined",e.emptyArray)])}(t);case 292:return c(t.type);case 291:return function(t){return e.createUnionTypeNode([e.visitNode(t.type,c),e.createTypeReferenceNode("null",e.emptyArray)])}(t);case 295:return function(t){return e.createArrayTypeNode(e.visitNode(t.type,c))}(t);case 294:return function(t){return e.createFunctionTypeNode(e.emptyArray,t.parameters.map(u),t.type)}(t);case 164:return function(t){var r=t.typeName,n=t.typeArguments;if(e.isIdentifier(t.typeName)){if(e.isJSDocIndexSignature(t))return function(t){var r=e.createParameter(void 0,void 0,void 0,135===t.typeArguments[0].kind?"n":"s",void 0,e.createTypeReferenceNode(135===t.typeArguments[0].kind?"number":"string",[]),void 0),n=e.createTypeLiteralNode([e.createIndexSignature(void 0,void 0,[r],t.typeArguments[1])]);return e.setEmitFlags(n,1),n}(t);var i=t.typeName.text;switch(t.typeName.text){case"String":case"Boolean":case"Object":case"Number":i=i.toLowerCase();break;case"array":case"date":case"promise":i=i[0].toUpperCase()+i.slice(1)}r=e.createIdentifier(i),n="Array"!==i&&"Promise"!==i||t.typeArguments?e.visitNodes(t.typeArguments,c):e.createNodeArray([e.createTypeReferenceNode("any",e.emptyArray)])}return e.createTypeReferenceNode(r,n)}(t);default:var r=e.visitEachChild(t,c,void 0);return e.setEmitFlags(r,1),r}}function u(t){var r=t.parent.parameters.indexOf(t),n=295===t.type.kind&&r===t.parent.parameters.length-1,i=t.name||(n?"rest":"arg"+r),a=n?e.createToken(25):t.dotDotDotToken;return e.createParameter(t.decorators,t.modifiers,a,i,t.questionToken,e.visitNode(t.type,c),t.initializer)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=i(n.sourceFile,n.span.start);if(a){var o=e.textChanges.ChangeTracker.with(n,function(e){return s(e,n.sourceFile,a)});return[t.createCodeFixAction(r,o,e.Diagnostics.Annotate_with_type_from_JSDoc,r,e.Diagnostics.Annotate_everything_with_types_from_JSDoc)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){var r=i(t.file,t.start);r&&s(e,t.file,r)})}}),t.parameterShouldGetTypeFromJSDoc=a}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r,n="inferFromUsage",i=[e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,e.Diagnostics.Variable_0_implicitly_has_an_1_type.code,e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code,e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,e.Diagnostics.Member_0_implicitly_has_an_1_type.code,e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code];function a(t,n,i,a,p,f,m,g){if(e.isParameterPropertyModifier(i.kind)||72===i.kind||25===i.kind||100===i.kind){var y=i.parent;switch(a=function(t){switch(t){case e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Variable_0_implicitly_has_an_1_type.code;case e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code;case e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Member_0_implicitly_has_an_1_type.code}return t}(a)){case e.Diagnostics.Member_0_implicitly_has_an_1_type.code:case e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(e.isVariableDeclaration(y)&&m(y)||e.isPropertyDeclaration(y)||e.isPropertySignature(y))return o(t,n,y,p,g,f),y;if(e.isPropertyAccessExpression(y)){var h=d(y.name,p,f),v=e.getTypeNodeIfAccessible(h,y,p,g);if(v){var b=e.createJSDocTypeTag(e.createJSDocTypeExpression(v),"");l(t,n,e.cast(y.parent.parent,e.isExpressionStatement),[b])}return y}return;case e.Diagnostics.Variable_0_implicitly_has_an_1_type.code:var D=p.getTypeChecker().getSymbolAtLocation(i);return D&&D.valueDeclaration&&e.isVariableDeclaration(D.valueDeclaration)&&m(D.valueDeclaration)?(o(t,n,D.valueDeclaration,p,g,f),D.valueDeclaration):void 0}var x=e.getContainingFunction(i);if(void 0!==x)switch(a){case e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code:if(e.isSetAccessorDeclaration(x))return s(t,n,x,p,g,f),x;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:if(m(x)){var S=e.cast(y,e.isParameter);return function(t,n,i,a,o,s,l){if(!e.isIdentifier(i.name))return;var p=function(t,n,i,a){var o;switch(t.kind){case 157:o=e.findChildOfKind(t,124,n);break;case 197:case 196:var s=t.parent;o=e.isVariableDeclaration(s)&&e.isIdentifier(s.name)?s.name:t.name;break;case 239:case 156:o=t.name}if(o)return r.inferTypeForParametersFromReferences(_(o,i,a),t,i,a)}(a,n,o,l)||a.parameters.map(function(t){return{declaration:t,type:e.isIdentifier(t.name)?d(t.name,o,l):o.getTypeChecker().getAnyType()}});if(e.Debug.assert(a.parameters.length===p.length),e.isInJSFile(a))u(t,n,p,o,s);else{var f=e.isArrowFunction(a)&&!e.findChildOfKind(a,20,n);f&&t.insertNodeBefore(n,e.first(a.parameters),e.createToken(20));for(var m=0,g=p;m<g.length;m++){var y=g[m],h=y.declaration,v=y.type;!h||h.type||h.initializer||c(t,n,h,v,o,s)}f&&t.insertNodeAfter(n,e.last(a.parameters),e.createToken(21))}}(t,n,S,x,p,g,f),S}return;case e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:return e.isGetAccessorDeclaration(x)&&e.isIdentifier(x.name)?(c(t,n,x,d(x.name,p,f),p,g),x):void 0;case e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:return e.isSetAccessorDeclaration(x)?(s(t,n,x,p,g,f),x):void 0;default:return e.Debug.fail(String(a))}}}function o(t,r,n,i,a,o){e.isIdentifier(n.name)&&c(t,r,n,d(n.name,i,o),i,a)}function s(t,r,n,i,a,o){var s=e.firstOrUndefined(n.parameters);if(s&&e.isIdentifier(n.name)&&e.isIdentifier(s.name)){var l=d(n.name,i,o);l===i.getTypeChecker().getAnyType()&&(l=d(s.name,i,o)),e.isInJSFile(n)?u(t,r,[{declaration:s,type:l}],i,a):c(t,r,s,l,i,a)}}function c(t,r,n,i,a,o){var s=e.getTypeNodeIfAccessible(i,n,a,o);if(s)if(e.isInJSFile(r)&&153!==n.kind){var c=e.isVariableDeclaration(n)?e.tryCast(n.parent.parent,e.isVariableStatement):n;if(!c)return;var u=e.createJSDocTypeExpression(s);l(t,r,c,[e.isGetAccessorDeclaration(n)?e.createJSDocReturnTag(u,""):e.createJSDocTypeTag(u,"")])}else t.tryInsertTypeAnnotation(r,n,s)}function u(t,r,n,i,a){var o=n.length&&n[0].declaration.parent;o&&l(t,r,o,e.mapDefined(n,function(t){var r=t.declaration;if(!r.initializer&&!e.getJSDocType(r)&&e.isIdentifier(r.name)){var n=t.type&&e.getTypeNodeIfAccessible(t.type,r,i,a),o=e.getSynthesizedClone(r.name);return e.setEmitFlags(o,3584),n&&e.createJSDocParamTag(o,!!t.isOptional,e.createJSDocTypeExpression(n),"")}}))}function l(t,r,n,i){var a=e.mapDefined(n.jsDoc,function(e){return e.comment}),o=e.flatMapToMutable(n.jsDoc,function(e){return e.tags}),s=i.filter(function(t){return!o||!o.some(function(r,n){var i=function(t,r){if(t.kind!==r.kind)return;switch(t.kind){case 304:var n=t,i=r;return e.isIdentifier(n.name)&&e.isIdentifier(i.name)&&n.name.escapedText===i.name.escapedText?e.createJSDocParamTag(i.name,i.isBracketed,i.typeExpression,n.comment):void 0;case 305:return e.createJSDocReturnTag(r.typeExpression,t.comment)}}(r,t);return i&&(o[n]=i),!!i})}),c=e.createJSDocComment(a.join("\n"),e.createNodeArray((o||e.emptyArray).concat(s))),u=197===n.kind?function(e){if(154===e.parent.kind)return e.parent;return e.parent.parent}(n):n;u.jsDoc=n.jsDoc,u.jsDocCache=n.jsDocCache,t.insertJsdocCommentBefore(r,u,c)}function _(t,r,n){return e.mapDefined(e.FindAllReferences.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),n),function(t){return 0!==t.kind?e.tryCast(t.node,e.isIdentifier):void 0})}function d(e,t,n){var i=_(e,t,n),a=t.getTypeChecker(),o=r.inferTypesFromReferences(i,a,n);return r.unifyFromContext(o,a)}t.registerCodeFix({errorCodes:i,getCodeActions:function(r){var i,o=r.sourceFile,s=r.program,c=r.span.start,u=r.errorCode,l=r.cancellationToken,_=r.host,d=e.getTokenAtPosition(o,c),p=e.textChanges.ChangeTracker.with(r,function(t){i=a(t,o,d,u,s,l,e.returnTrue,_)}),f=i&&e.getNameOfDeclaration(i);return f&&0!==p.length?[t.createCodeFixAction(n,p,[function(t,r){switch(t){case e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code:case e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.isSetAccessorDeclaration(e.getContainingFunction(r))?e.Diagnostics.Infer_type_of_0_from_usage:e.Diagnostics.Infer_parameter_types_from_usage;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Infer_parameter_types_from_usage;default:return e.Diagnostics.Infer_type_of_0_from_usage}}(u,d),f.getText(o)],n,e.Diagnostics.Infer_all_types_from_usage)]:void 0},fixIds:[n],getAllCodeActions:function(r){var n=r.sourceFile,o=r.program,s=r.cancellationToken,c=r.host,u=e.nodeSeenTracker();return t.codeFixAll(r,i,function(t,r){a(t,n,e.getTokenAtPosition(r.file,r.start),r.code,o,s,u,c)})}}),function(t){function r(e,t,r){for(var i={},a=0,s=e;a<s.length;a++){var c=s[a];r.throwIfCancellationRequested(),n(c,t,i)}return o(i,t)}function n(t,r,a){for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;switch(t.parent.kind){case 203:a.isNumber=!0;break;case 202:!function(e,t){switch(e.operator){case 44:case 45:case 39:case 53:t.isNumber=!0;break;case 38:t.isNumberOrString=!0}}(t.parent,a);break;case 204:!function(t,r,n,i){switch(r.operatorToken.kind){case 41:case 40:case 42:case 43:case 46:case 47:case 48:case 49:case 50:case 51:case 61:case 63:case 62:case 64:case 65:case 69:case 70:case 71:case 66:case 68:case 67:case 39:case 28:case 31:case 30:case 32:var a=n.getTypeAtLocation(r.left===t?r.right:r.left);1056&a.flags?u(i,a):i.isNumber=!0;break;case 60:case 38:var o=n.getTypeAtLocation(r.left===t?r.right:r.left);1056&o.flags?u(i,o):296&o.flags?i.isNumber=!0:132&o.flags?i.isString=!0:i.isNumberOrString=!0;break;case 59:case 33:case 35:case 36:case 34:u(i,n.getTypeAtLocation(r.left===t?r.right:r.left));break;case 93:t===r.left&&(i.isString=!0);break;case 55:t!==r.left||237!==t.parent.parent.kind&&!e.isAssignmentExpression(t.parent.parent,!0)||u(i,n.getTypeAtLocation(r.right))}}(t,t.parent,r,a);break;case 271:case 272:!function(e,t,r){u(r,t.getTypeAtLocation(e.parent.parent.expression))}(t.parent,r,a);break;case 191:case 192:t.parent.expression===t?function(e,t,r){var i={argumentTypes:[],returnType:{}};if(e.arguments)for(var a=0,o=e.arguments;a<o.length;a++){var s=o[a];i.argumentTypes.push(t.getTypeAtLocation(s))}n(e,t,i.returnType),191===e.kind?(r.callContexts||(r.callContexts=[])).push(i):(r.constructContexts||(r.constructContexts=[])).push(i)}(t.parent,r,a):i(t,r,a);break;case 189:!function(t,r,i){var a=e.escapeLeadingUnderscores(t.name.text);i.properties||(i.properties=e.createUnderscoreEscapedMap());var o=i.properties.get(a)||{};n(t,r,o),i.properties.set(a,o)}(t.parent,r,a);break;case 190:!function(e,t,r,i){if(t===e.argumentExpression)return void(i.isNumberOrString=!0);var a=r.getTypeAtLocation(e.argumentExpression),o={};n(e,r,o),296&a.flags?i.numberIndexContext=o:i.stringIndexContext=o}(t.parent,t,r,a);break;case 237:var o=t.parent,s=o.name,c=o.initializer;if(t===s){c&&u(a,r.getTypeAtLocation(c));break}default:return i(t,r,a)}}function i(t,r,n){e.isExpressionNode(t)&&u(n,r.getContextualType(t))}function a(t,r,n){if(void 0===n&&(n=r.getAnyType()),!t.length)return n;var i=r.getUnionType([r.getStringType(),r.getNumberType()]),a=function(t,r){for(var n=[],i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,c=r;s<c.length;s++){var u=c[s],l=u.high,_=u.low;l(o)&&(e.Debug.assert(!_(o)),n.push(_))}return t.filter(function(e){return n.every(function(t){return!t(e)})})}(t,[{high:function(e){return e===r.getStringType()||e===r.getNumberType()},low:function(e){return e===i}},{high:function(e){return!(16385&e.flags)},low:function(e){return!!(16385&e.flags)}},{high:function(e){return!(114689&e.flags||16&r.getObjectFlags(e))},low:function(e){return!!(16&r.getObjectFlags(e))}}]),o=a.filter(function(e){return 16&r.getObjectFlags(e)});return o.length&&(a=a.filter(function(e){return!(16&r.getObjectFlags(e))})).push(function(t,r){if(1===t.length)return t[0];for(var n=[],i=[],a=[],o=[],s=!1,c=!1,u=e.createMultiMap(),l=0,_=t;l<_.length;l++){for(var d=_[l],p=0,f=r.getPropertiesOfType(d);p<f.length;p++){var m=f[p];u.add(m.name,r.getTypeOfSymbolAtLocation(m,m.valueDeclaration))}n.push.apply(n,r.getSignaturesOfType(d,0)),i.push.apply(i,r.getSignaturesOfType(d,1)),d.stringIndexInfo&&(a.push(d.stringIndexInfo.type),s=s||d.stringIndexInfo.isReadonly),d.numberIndexInfo&&(o.push(d.numberIndexInfo.type),c=c||d.numberIndexInfo.isReadonly)}var g=e.mapEntries(u,function(e,n){var i=n.length<t.length?16777216:0,a=r.createSymbol(4|i,e);return a.type=r.getUnionType(n),[e,a]});return r.createAnonymousType(t[0].symbol,g,n,i,a.length?r.createIndexInfo(r.getUnionType(a),s):void 0,o.length?r.createIndexInfo(r.getUnionType(o),c):void 0)}(o,r)),r.getWidenedType(r.getUnionType(a))}function o(t,r){var n=[];if(t.isNumber&&n.push(r.getNumberType()),t.isString&&n.push(r.getStringType()),t.isNumberOrString&&n.push(r.getUnionType([r.getStringType(),r.getNumberType()])),n.push.apply(n,(t.candidateTypes||[]).map(function(e){return r.getBaseTypeOfLiteralType(e)})),t.properties&&l(t.properties.get("then"))){var i=s(0,t.properties.get("then").callContexts,!1,r).getCallSignatures().map(function(e){return e.getReturnType()});i.push(r.createPromiseType(i.length?r.getUnionType(i,2):r.getAnyType()))}else t.properties&&l(t.properties.get("push"))&&n.push(r.createArrayType(s(0,t.properties.get("push").callContexts,!1,r)));if(t.numberIndexContext)n.push(r.createArrayType(b(t.numberIndexContext)));else if(t.properties||t.callContexts||t.constructContexts||t.stringIndexContext){var u=e.createUnderscoreEscapedMap(),_=[],d=[],p=void 0;if(t.properties&&t.properties.forEach(function(e,t){var n=r.createSymbol(4,t);n.type=b(e),u.set(t,n)}),t.callContexts)for(var f=0,m=t.callContexts;f<m.length;f++){var g=m[f];_.push(c(g,r))}if(t.constructContexts)for(var y=0,h=t.constructContexts;y<h.length;y++){var v=h[y];d.push(c(v,r))}t.stringIndexContext&&(p=r.createIndexInfo(b(t.stringIndexContext),!1)),n.push(r.createAnonymousType(void 0,u,_,d,p,void 0))}return n;function b(e){return a(o(e,r),r)}}function s(t,r,n,i){var a=[];if(r)for(var o=0,s=r;o<s.length;o++){var c=s[o];c.argumentTypes.length>t&&(n?a=e.concatenate(a,e.map(c.argumentTypes.slice(t),function(e){return i.getBaseTypeOfLiteralType(e)})):a.push(i.getBaseTypeOfLiteralType(c.argumentTypes[t])))}if(a.length){var u=i.getWidenedType(i.getUnionType(a,2));return n?i.createArrayType(u):u}}function c(t,r){for(var n=[],i=0;i<t.argumentTypes.length;i++){var s=r.createSymbol(1,e.escapeLeadingUnderscores("arg"+i));s.type=r.getWidenedType(r.getBaseTypeOfLiteralType(t.argumentTypes[i])),n.push(s)}var c=a(o(t.returnType,r),r,r.getVoidType());return r.createSignature(void 0,void 0,void 0,n,c,void 0,t.argumentTypes.length,!1,!1)}function u(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function l(e){return!!e&&!!e.callContexts}t.inferTypesFromReferences=r,t.inferTypeForParametersFromReferences=function(t,i,o,s){var c=o.getTypeChecker();if(0!==t.length&&i.parameters){for(var u={},l=0,d=t;l<d.length;l++){var p=d[l];s.throwIfCancellationRequested(),n(p,c,u)}var f=(u.constructContexts||[]).concat(u.callContexts||[]);return i.parameters.map(function(t,n){for(var u=[],l=e.isRestParameter(t),d=!1,p=0,m=f;p<m.length;p++){var g=m[p];if(g.argumentTypes.length<=n)d=e.isInJSFile(i),u.push(c.getUndefinedType());else if(l)for(var y=n;y<g.argumentTypes.length;y++)u.push(c.getBaseTypeOfLiteralType(g.argumentTypes[y]));else u.push(c.getBaseTypeOfLiteralType(g.argumentTypes[n]))}if(e.isIdentifier(t.name)){var h=r(_(t.name,o,s),c,s);u.push.apply(u,l?e.mapDefined(h,c.getElementTypeOfArrayType):h)}var v=a(u,c);return{type:l?c.createArrayType(v):v,isOptional:d&&!l,declaration:t}})}},t.unifyFromContext=a}(r||(r={}))}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="convertFunctionToEs6Class",n=[e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];function i(t,r,n,i){var o=i.getSymbolAtLocation(e.getTokenAtPosition(r,n));if(o&&19&o.flags){var s,c,u=o.valueDeclaration;switch(u.kind){case 239:s=u,t.delete(r,u),c=function(t){var r=l(o);t.body&&r.unshift(e.createConstructor(void 0,void 0,t.parameters,t.body));var n=a(t,85);return e.createClassDeclaration(void 0,n,t.name,void 0,void 0,r)}(u);break;case 237:s=u.parent.parent,c=function(t){var r=t.initializer;if(!r||196!==r.kind)return;if(72!==t.name.kind)return;var n=l(t.symbol);r.body&&n.unshift(e.createConstructor(void 0,void 0,r.parameters,r.body));var i=a(s,85);return e.createClassDeclaration(void 0,i,t.name,void 0,void 0,n)}(u),1===u.parent.declarations.length?(e.copyLeadingComments(s,c,r),t.delete(r,s)):t.delete(r,u)}c&&(e.copyLeadingComments(u,c,r),t.insertNodeAfter(r,s,c))}function l(n){var i=[];return n.members&&n.members.forEach(function(e){var t=o(e,void 0);t&&i.push(t)}),n.exports&&n.exports.forEach(function(t){var r=o(t,[e.createToken(116)]);r&&i.push(r)}),i;function o(n,i){if(8192&n.flags){var o=n.valueDeclaration,s=o.parent;if(c=s.right,e.isFunctionLike(c)){var c,u=s.parent&&221===s.parent.kind?s.parent:s;if(t.delete(r,u),!s.right)return e.createProperty([],i,n.name,void 0,void 0,void 0);switch(s.right.kind){case 196:var l=s.right,_=e.concatenate(i,a(l,121)),d=e.createMethod(void 0,_,void 0,o.name,void 0,void 0,l.parameters,void 0,l.body);return e.copyLeadingComments(s,d,r),d;case 197:var p=s.right,f=p.body,m=void 0;m=218===f.kind?f:e.createBlock([e.createReturn(f)]);_=e.concatenate(i,a(p,121)),d=e.createMethod(void 0,_,void 0,o.name,void 0,void 0,p.parameters,void 0,m);return e.copyLeadingComments(s,d,r),d;default:if(e.isSourceFileJS(r))return;var g=e.createProperty(void 0,i,o.name,void 0,void 0,s.right);return e.copyLeadingComments(s.parent,g,r),g}}}}}}function a(t,r){return e.filter(t.modifiers,function(e){return e.kind===r})}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start,n.program.getTypeChecker())});return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_function_to_an_ES2015_class,r,e.Diagnostics.Convert_all_constructor_functions_to_classes)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return i(t,r.file,r.start,e.program.getTypeChecker())})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="convertToAsyncFunction",n=[e.Diagnostics.This_may_be_converted_to_an_async_function.code],i=!0;function a(t,r,n,i,a){var l,_=e.getTokenAtPosition(r,n);if(l=e.isIdentifier(_)&&e.isVariableDeclaration(_.parent)&&_.parent.initializer&&e.isFunctionLikeDeclaration(_.parent.initializer)?_.parent.initializer:e.tryCast(e.getContainingFunction(e.getTokenAtPosition(r,n)),e.isFunctionLikeDeclaration)){var d,p,m=e.createMap(),g=e.createMap(),y=[],h=e.isInJSFile(l),v=function(t,r){if(!t.body)return e.createMap();var n=e.createMap();return e.forEachChild(t.body,function t(i){o(i,r,"then")?(n.set(e.getNodeId(i).toString(),!0),e.forEach(i.arguments,t)):o(i,r,"catch")?(n.set(e.getNodeId(i).toString(),!0),e.forEachChild(i,t)):o(i,r)?n.set(e.getNodeId(i).toString(),!0):e.forEachChild(i,t)}),n}(l,i),b=function(t,r,n,i,a,o,u){var l=e.createMap(),_=e.createMap();return e.forEachChild(t,function t(o){if(e.isIdentifier(o)){var d=r.getSymbolAtLocation(o),p=d&&function(e,t){return e.valueDeclaration&&e.valueDeclaration.getSourceFile()===t}(d,i.sourceFile);if(d&&p){var m=f(r.getTypeAtLocation(o),r),g=e.getSymbolId(d).toString();if(!m||e.isFunctionLikeDeclaration(o.parent)||n.has(g)){if(o.parent&&(e.isParameter(o.parent)||e.isVariableDeclaration(o.parent))){var y=o.text,h=_.get(y);if(h&&h.some(function(e){return e!==d})){var v=c(o,_);l.set(g,v.identifier),n.set(g,v),u.push({identifier:v.identifier,symbol:d}),s(_,y,d)}else{var b=e.getSynthesizedDeepClone(o);l.set(g,b),n.set(g,{identifier:b,types:[],numberOfAssignmentsOriginal:u.filter(function(e){return e.identifier.text===o.text}).length}),(e.isParameter(o.parent)&&function(t){var n=t.parent;if(e.isCallExpression(n)||e.isIdentifier(n)&&!a.get(e.getNodeId(n).toString())){var i=r.getTypeAtLocation(n),o=i&&r.getPromisedTypeOfPromise(i);return!!o}return!1}(o.parent.parent)||e.isVariableDeclaration(o.parent))&&(u.push({identifier:b,symbol:d}),s(_,y,d))}}}else{var D=e.firstOrUndefined(m.parameters),x=D&&e.isParameter(D.valueDeclaration)&&e.tryCast(D.valueDeclaration.name,e.isIdentifier)||e.createOptimisticUniqueName("result"),S=c(x,_);n.set(g,S),u.push({identifier:S.identifier,symbol:d}),s(_,x.text,d)}}}else e.forEachChild(o,t)}),e.getSynthesizedDeepCloneWithRenames(t,!0,l,r,function(t,i){if(e.isIdentifier(t)){var s=r.getSymbolAtLocation(t),c=s&&e.getSymbolId(s).toString(),u=s&&n.get(c);if(u){var l=r.getTypeAtLocation(t);o.set(e.getNodeId(i).toString(),l)}}var _=a.get(e.getNodeId(t).toString());void 0!==_&&(a.delete(e.getNodeId(t).toString()),a.set(e.getNodeId(i).toString(),_))})}(l,i,m,a,v,g,y),D=function(e){var t=[];return e.forEach(function(e){0===e.numberOfAssignmentsOriginal&&t.push(e.identifier)}),t}(m),x=b.body&&e.isBlock(b.body)?(d=b.body,p=[],e.forEachReturnStatement(d,function(t){e.isReturnStatementWithFixablePromiseHandler(t)&&p.push(t)}),p):e.emptyArray,S={checker:i,synthNamesMap:m,allVarNames:y,setOfExpressionsToReturn:v,constIdentifiers:D,originalTypeMap:g,isInJSFile:h};if(x.length){t.insertLastModifierBefore(r,121,l);for(var T=function(n){e.forEachChild(n,function i(a){e.isCallExpression(a)?function(e,n){var i=u(e,S,e);t.replaceNodeWithNodes(r,n,i)}(a,n):e.isFunctionLike(a)||e.forEachChild(a,i)})},C=0,E=x;C<E.length;C++){T(E[C])}}}}function o(t,r,n){var i=(n?e.isCallExpression(t):e.isExpression(t))&&(!n||e.hasPropertyAccessExpressionWithName(t,n))&&r.getTypeAtLocation(t);return!(!i||!r.getPromisedTypeOfPromise(i))}function s(e,t,r){e.has(t)?e.get(t).push(r):e.set(t,[r])}function c(t,r){var n=(r.get(t.text)||e.emptyArray).length;return{identifier:0===n?t:e.createIdentifier(t.text+"_"+n),types:[],numberOfAssignmentsOriginal:0}}function u(t,r,n,a){if(!t)return e.emptyArray;var o=e.isIdentifier(t)&&r.originalTypeMap.get(e.getNodeId(t).toString())||r.checker.getTypeAtLocation(t);return e.isCallExpression(t)&&e.hasPropertyAccessExpressionWithName(t,"then")&&o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n,i){var a=t.arguments,o=a[0],s=a[1];if(!o)return u(t.expression,r,n);var c=g(o,r),l=p(o,i,c,t,r);if(s){var _=g(s,r),d=e.createBlock(u(t.expression,r,t,c).concat(l)),f=p(s,i,_,t,r),m=_?_.identifier.text:"e",y=e.createCatchClause(m,e.createBlock(f));return[e.createTry(d,y,void 0)]}return u(t.expression,r,t,c).concat(l)}(t,r,n,a):e.isCallExpression(t)&&e.hasPropertyAccessExpressionWithName(t,"catch")&&o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n){var i=t.arguments[0],a=g(i,r),o=r.setOfExpressionsToReturn.get(e.getNodeId(t).toString());n&&!o&&(n.numberOfAssignmentsOriginal=2,r.synthNamesMap.forEach(function(e,t){if(e.identifier.text===n.identifier.text){var i=l(n);r.synthNamesMap.set(t,i)}}),r.constIdentifiers.some(function(e){return e.text===n.identifier.text})&&r.constIdentifiers.push(l(n).identifier));var s,c=e.createBlock(u(t.expression,r,t,n)),_=p(i,n,a,t,r),d=a?a.identifier.text:"e",f=e.createCatchClause(d,e.createBlock(_));if(n&&!o){var m=n.types,y=r.checker.getUnionType(m,2),h=r.isInJSFile?void 0:r.checker.typeToTypeNode(y),v=[e.createVariableDeclaration(e.getSynthesizedDeepClone(n.identifier),h)];s=e.createVariableStatement(void 0,e.createVariableDeclarationList(v,1))}var b=e.createTry(c,f,void 0);return s?[s,b]:[b]}(t,r,a):e.isPropertyAccessExpression(t)?u(t.expression,r,n,a):o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n){var i=r.setOfExpressionsToReturn.get(e.getNodeId(t).toString()),a=t.original?t.original.parent:t.parent;if(n&&!i&&(!a||e.isPropertyAccessExpression(a)))return d(n,e.createAwait(t),r);if(!n&&!i&&(!a||e.isPropertyAccessExpression(a)))return[e.createStatement(e.createAwait(t))];return[e.createReturn(e.getSynthesizedDeepClone(t))]}(t,r,a):(i=!1,e.emptyArray)}function l(t){return{identifier:e.createOptimisticUniqueName(t.identifier.text),types:[],numberOfAssignmentsOriginal:0}}function _(e,t){return t.some(function(t){return t.text===e.text})?2:1}function d(t,r,n){return t&&0!==t.identifier.text.length?t.types.length<t.numberOfAssignmentsOriginal?[e.createStatement(e.createAssignment(e.getSynthesizedDeepClone(t.identifier),r))]:[e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(t.identifier),void 0,r)],_(t.identifier,n.constIdentifiers)))]:[e.createStatement(r)]}function p(t,r,n,a,s){var c=s.setOfExpressionsToReturn.get(e.getNodeId(a).toString());switch(t.kind){case 96:break;case 72:if(!n)break;var u=e.createCall(e.getSynthesizedDeepClone(t),void 0,[n.identifier]);if(c)return[e.createReturn(u)];var l=s.originalTypeMap.get(e.getNodeId(t).toString())||s.checker.getTypeAtLocation(t),p=s.checker.getSignaturesOfType(l,0);if(!p.length){i=!1;break}var g=p[0].getReturnType(),y=d(r,e.createAwait(u),s);return r&&r.types.push(g),y;case 196:case 197:var h=t.body;if(e.isBlock(h)){for(var v=[],b=!1,D=0,x=h.statements;D<x.length;D++){var S=x[D];e.isReturnStatement(S)&&(b=!0),e.isReturnStatementWithFixablePromiseHandler(S)?v=v.concat(m(s,[S],r)):v.push(S)}return c?v.map(function(t){return e.getSynthesizedDeepClone(t)}):function(t,r,n,i){for(var a=[],s=0,c=t;s<c.length;s++){var u=c[s];if(e.isReturnStatement(u)){if(u.expression){var l=o(u.expression,n.checker)?e.createAwait(u.expression):u.expression;void 0===r?a.push(e.createExpressionStatement(l)):a.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,l)],_(r,n.constIdentifiers))))}}else a.push(e.getSynthesizedDeepClone(u))}i||void 0===r||a.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,e.createIdentifier("undefined"))],_(r,n.constIdentifiers))));return a}(v,void 0===r?void 0:r.identifier,s,b)}var T=m(s,e.isFixablePromiseHandler(h)?[e.createReturn(h)]:e.emptyArray,r);if(T.length>0)return T;var C=f(s.checker.getTypeAtLocation(t),s.checker).getReturnType(),E=e.getSynthesizedDeepClone(h),k=s.checker.getPromisedTypeOfPromise(C)?e.createAwait(E):E;if(c)return[e.createReturn(k)];var N=d(r,k,s);return r&&r.types.push(C),N;default:i=!1}return e.emptyArray}function f(t,r){var n=r.getSignaturesOfType(t,0);return e.lastOrUndefined(n)}function m(t,r,n){for(var i=[],a=0,o=r;a<o.length;a++){var s=o[a];e.forEachChild(s,function r(a){if(e.isCallExpression(a)){var o=u(a,t,a,n);if((i=i.concat(o)).length>0)return}else e.isFunctionLike(a)||e.forEachChild(a,r)})}return i}function g(t,r){var n,i=0,a=[];e.isFunctionLikeDeclaration(t)?t.parameters.length>0&&(n=o(t.parameters[0].name)):e.isIdentifier(t)&&(n=o(t));if(n&&"undefined"!==n.identifier.text)return n;function o(t){var n,o=function(e){return e.symbol?e.symbol:r.checker.getSymbolAtLocation(e)}((n=t).original?n.original:n);return o&&r.synthNamesMap.get(e.getSymbolId(o).toString())||{identifier:t,types:a,numberOfAssignmentsOriginal:i}}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){i=!0;var o=e.textChanges.ChangeTracker.with(n,function(e){return a(e,n.sourceFile,n.span.start,n.program.getTypeChecker(),n)});return i?[t.createCodeFixAction(r,o,e.Diagnostics.Convert_to_async_function,r,e.Diagnostics.Convert_all_to_async_functions)]:[]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return a(t,r.file,r.start,e.program.getTypeChecker(),e)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){function r(t,r,n,i){for(var a=0,o=t.imports;a<o.length;a++){var s=o[a],c=e.getResolvedModule(t,s.text);if(c&&c.resolvedFileName===r.fileName){var u=e.importFromModuleSpecifier(s);switch(u.kind){case 248:n.replaceNode(t,u,e.makeImport(u.name,void 0,s,i));break;case 191:e.isRequireCall(u,!1)&&n.replaceNode(t,u,e.createPropertyAccess(e.getSynthesizedDeepClone(u),"default"))}}}}function n(t,r){t.forEachChild(function n(i){if(e.isPropertyAccessExpression(i)&&e.isExportsOrModuleExportsOrAlias(t,i.expression)){var a=i.parent;r(i,e.isBinaryExpression(a)&&a.left===i&&59===a.operatorToken.kind)}i.forEachChild(n)})}function i(r,n,i,p,f,m,g,y){switch(n.kind){case 219:return function(r,n,i,a,o,c,d){var p=n.declarationList,f=!1,m=e.flatMap(p.declarations,function(n){var m=n.name,g=n.initializer;if(g){if(e.isExportsOrModuleExportsOrAlias(r,g))return f=!0,[];if(e.isRequireCall(g,!0))return f=!0,function(r,n,i,a,o,c,u,d){switch(n.kind){case 184:var p=e.mapAllOrFail(n.elements,function(t){return t.dotDotDotToken||t.initializer||t.propertyName&&!e.isIdentifier(t.propertyName)||!e.isIdentifier(t.name)?void 0:l(t.propertyName&&t.propertyName.text,t.name.text)});if(p)return[e.makeImport(void 0,p,i,d)];case 185:var f=s(t.moduleSpecifierToValidIdentifier(i.text,u),c);return[e.makeImport(e.createIdentifier(f),void 0,i,d),_(void 0,e.getSynthesizedDeepClone(n),e.createIdentifier(f))];case 72:return function(t,r,n,i,a,o,c){for(var u=a.getSymbolAtLocation(r),l=e.createMap(),_=!1,d=0,p=o.original.get(r.text);d<p.length;d++){var f=p[d];if(a.getSymbolAtLocation(f)===u&&f!==r){var m=f.parent;if(e.isPropertyAccessExpression(m)){var g=m.expression,y=m.name.text;e.Debug.assert(g===f);var h=l.get(y);void 0===h&&(h=s(y,o),l.set(y,h)),i.replaceNode(t,m,e.createIdentifier(h))}else _=!0}}var v=0===l.size?void 0:e.arrayFrom(e.mapIterator(l.entries(),function(t){var r=t[0],n=t[1];return e.createImportSpecifier(r===n?void 0:e.createIdentifier(r),e.createIdentifier(n))}));v||(_=!0);return[e.makeImport(_?e.getSynthesizedDeepClone(r):void 0,v,n,c)]}(r,n,i,a,o,c,d);default:return e.Debug.assertNever(n)}}(r,m,g.arguments[0],i,a,o,c,d);if(e.isPropertyAccessExpression(g)&&e.isRequireCall(g.expression,!0))return f=!0,function(t,r,n,i,a){switch(t.kind){case 184:case 185:var o=s(r,i);return[u(o,r,n,a),_(void 0,t,e.createIdentifier(o))];case 72:return[u(t.text,r,n,a)];default:return e.Debug.assertNever(t)}}(m,g.name.text,g.expression.arguments[0],o,d)}return e.createVariableStatement(void 0,e.createVariableDeclarationList([n],p.flags))});f&&i.replaceNodeWithNodes(r,n,m)}(r,n,p,i,f,m,y),!1;case 221:var h=n.expression;switch(h.kind){case 191:return e.isRequireCall(h,!0)&&p.replaceNode(r,n,e.makeImport(void 0,void 0,h.arguments[0],y)),!1;case 204:return 59===h.operatorToken.kind&&function(t,r,n,i,s){var u=n.left,l=n.right;if(!e.isPropertyAccessExpression(u))return!1;if(e.isExportsOrModuleExportsOrAlias(t,u)){if(!e.isExportsOrModuleExportsOrAlias(t,l)){var p=e.isObjectLiteralExpression(l)?(f=l,(m=e.mapAllOrFail(f.properties,function(t){switch(t.kind){case 158:case 159:case 276:case 277:return;case 275:return e.isIdentifier(t.name)?function(t,r){var n=[e.createToken(85)];switch(r.kind){case 196:var i=r.name;if(i&&i.text!==t)return a();case 197:return c(t,n,r);case 209:return function(t,r,n){return e.createClassDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.heritageClauses),e.getSynthesizedDeepClones(n.members))}(t,n,r);default:return a()}function a(){return _(n,e.createIdentifier(t),r)}}(t.name.text,t.initializer):void 0;case 156:return e.isIdentifier(t.name)?c(t.name.text,[e.createToken(85)],t):void 0;default:e.Debug.assertNever(t)}}))&&[m,!1]):e.isRequireCall(l,!0)?function(t,r){var n=t.text,i=r.getSymbolAtLocation(t),s=i?i.exports:e.emptyUnderscoreEscapedMap;return s.has("export=")?[[o(n)],!0]:s.has("default")?s.size>1?[[a(n),o(n)],!0]:[[o(n)],!0]:[[a(n)],!1]}(l.arguments[0],r):void 0;return p?(i.replaceNodeWithNodes(t,n.parent,p[0]),p[1]):(i.replaceRangeWithText(t,e.createRange(u.getStart(t),l.pos),"export default"),!0)}i.delete(t,n.parent)}else e.isExportsOrModuleExportsOrAlias(t,u.expression)&&function(t,r,n,i){var a=r.left.name.text,o=i.get(a);if(void 0!==o){var s=[_(void 0,o,r.right),d([e.createExportSpecifier(o,a)])];n.replaceNodeWithNodes(t,r.parent,s)}else!function(t,r,n){var i=t.left,a=t.right,o=t.parent,s=i.name.text;if(!(e.isFunctionExpression(a)||e.isArrowFunction(a)||e.isClassExpression(a))||a.name&&a.name.text!==s)n.replaceNodeRangeWithNodes(r,i.expression,e.findChildOfKind(i,24,r),[e.createToken(85),e.createToken(77)],{joiner:" ",suffix:" "});else{n.replaceRange(r,{pos:i.getStart(r),end:a.getStart(r)},e.createToken(85),{suffix:" "}),a.name||n.insertName(r,a,s);var c=e.findChildOfKind(o,26,r);c&&n.delete(r,c)}}(r,t,n)}(t,n,i,s);var f,m;return!1}(r,i,h,p,g)}default:return!1}}function a(e){return d(void 0,e)}function o(t){return d([e.createExportSpecifier(void 0,"default")],t)}function s(e,t){for(;t.original.has(e)||t.additional.has(e);)e="_"+e;return t.additional.set(e,!0),e}function c(t,r,n){return e.createFunctionDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),e.getSynthesizedDeepClone(n.asteriskToken),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.parameters),e.getSynthesizedDeepClone(n.type),e.convertToFunctionBody(e.getSynthesizedDeepClone(n.body)))}function u(t,r,n,i){return"default"===r?e.makeImport(e.createIdentifier(t),void 0,n,i):e.makeImport(void 0,[l(r,t)],n,i)}function l(t,r){return e.createImportSpecifier(void 0!==t&&t!==r?e.createIdentifier(t):void 0,e.createIdentifier(r))}function _(t,r,n){return e.createVariableStatement(t,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,n)],2))}function d(t,r){return e.createExportDeclaration(void 0,void 0,t&&e.createNamedExports(t),void 0===r?void 0:e.createLiteral(r))}t.registerCodeFix({errorCodes:[e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module.code],getCodeActions:function(a){var o=a.sourceFile,c=a.program,u=a.preferences,l=e.textChanges.ChangeTracker.with(a,function(t){if(function(t,r,a,o,c){var u={original:(_=t,d=e.createMultiMap(),function t(r,n){e.isIdentifier(r)&&function(e){var t=e.parent;switch(t.kind){case 189:return t.name!==e;case 186:case 253:return t.propertyName!==e;default:return!0}}(r)&&n(r),r.forEachChild(function(e){return t(e,n)})}(_,function(e){return d.add(e.text,e)}),d),additional:e.createMap()},l=function(t,r,i){var a=e.createMap();return n(t,function(t){var n=t.name,o=n.text,c=n.originalKeywordKind;!a.has(o)&&(void 0!==c&&e.isNonContextualKeyword(c)||r.resolveName(t.name.text,t,67220415,!0))&&a.set(o,s("_"+o,i))}),a}(t,r,u);var _,d;!function(t,r,i){n(t,function(n,a){if(!a){var o=n.name.text;i.replaceNode(t,n,e.createIdentifier(r.get(o)||o))}})}(t,l,a);for(var p=!1,f=0,m=t.statements;f<m.length;f++){var g=m[f],y=i(t,g,r,a,u,o,l,c);p=p||y}return p}(o,c.getTypeChecker(),t,c.getCompilerOptions().target,e.getQuotePreference(o,u)))for(var a=0,l=c.getSourceFiles();a<l.length;a++){var _=l[a];r(_,o,t,e.getQuotePreference(_,u))}});return[t.createCodeFixActionNoFixId("convertToEs6Module",l,e.Diagnostics.Convert_to_ES6_module)]}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="correctQualifiedNameToIndexedAccessType",n=[e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function i(t,r){var n=e.findAncestor(e.getTokenAtPosition(t,r),e.isQualifiedName);return e.Debug.assert(!!n,"Expected position to be owned by a qualified name."),e.isIdentifier(n.left)?n:void 0}function a(t,r,n){var i=n.right.text,a=e.createIndexedAccessTypeNode(e.createTypeReferenceNode(n.left,void 0),e.createLiteralTypeNode(e.createLiteral(i)));t.replaceNode(r,n,a)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=i(n.sourceFile,n.span.start);if(o){var s=e.textChanges.ChangeTracker.with(n,function(e){return a(e,n.sourceFile,o)}),c=o.left.text+'["'+o.right.text+'"]';return[t.createCodeFixAction(r,s,[e.Diagnostics.Rewrite_as_the_indexed_access_type_0,c],r,e.Diagnostics.Rewrite_all_as_indexed_access_types)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){var r=i(t.file,t.start);r&&a(e,t.file,r)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r=[e.Diagnostics.Class_0_incorrectly_implements_interface_1.code,e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],n="fixClassIncorrectlyImplementsInterface";function i(t,r){return e.Debug.assertDefined(e.getContainingClass(e.getTokenAtPosition(t,r)))}function a(t){return!(8&e.getModifierFlags(t.valueDeclaration))}function o(r,n,i,o,s,c){var u=r.program.getTypeChecker(),l=function(t,r){var n=e.getEffectiveBaseTypeNode(t);if(!n)return e.createSymbolTable();var i=r.getTypeAtLocation(n),o=r.getPropertiesOfType(i);return e.createSymbolTable(o.filter(a))}(o,u),_=u.getTypeAtLocation(n),d=u.getPropertiesOfType(_).filter(e.and(a,function(e){return!l.has(e.escapedName)})),p=u.getTypeAtLocation(o);function f(e,n){var a=u.getIndexInfoOfType(e,n);a&&s.insertNodeAtClassStart(i,o,u.indexInfoToIndexSignatureDeclaration(a,n,o,void 0,t.getNoopSymbolTrackerWithResolver(r)))}p.getNumberIndexType()||f(_,1),p.getStringIndexType()||f(_,0),t.createMissingMemberNodes(o,d,r,c,function(e){return s.insertNodeAtClassStart(i,o,e)})}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,s=r.span,c=i(a,s.start);return e.mapDefined(e.getClassImplementsHeritageClauseElements(c),function(i){var s=e.textChanges.ChangeTracker.with(r,function(e){return o(r,i,a,c,e,r.preferences)});return 0===s.length?void 0:t.createCodeFixAction(n,s,[e.Diagnostics.Implement_interface_0,i.getText(a)],n,e.Diagnostics.Implement_all_unimplemented_interfaces)})},fixIds:[n],getAllCodeActions:function(n){var a=e.createMap();return t.codeFixAll(n,r,function(t,r){var s=i(r.file,r.start);if(e.addToSeen(a,e.getNodeId(s)))for(var c=0,u=e.getClassImplementsHeritageClauseElements(s);c<u.length;c++){var l=u[c];o(n,l,r.file,s,t,n.preferences)}})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){t.importFixId="fixMissingImport";var r,n,a=[e.Diagnostics.Cannot_find_name_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,e.Diagnostics.Cannot_find_namespace_0.code,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code];function o(t,r){return!(67220415&e.skipAlias(t,r).flags)}function s(t,r,n,i,a,o,s){var l=i.getTypeChecker(),_=e.flatMap(t,function(t){return function(t,r,n){var i=t.moduleSymbol,a=t.importKind;return t.exportedSymbolIsTypeOnly&&e.isSourceFileJS(n)?e.emptyArray:e.mapDefined(n.imports,function(t){var n=e.importFromModuleSpecifier(t);return 249!==n.kind&&248!==n.kind||r.getSymbolAtLocation(t)!==i?void 0:{declaration:n,importKind:a}})}(t,l,a)}),d=void 0===n?void 0:function(t,r,n,i){return e.firstDefined(t,function(t){var a=t.declaration,o=function(t){if(249===t.kind){var r=t.importClause&&e.isImportClause(t.importClause)&&t.importClause.namedBindings;return r&&251===r.kind?r.name:void 0}return t.name}(a);if(o){var s=i.getAliasedSymbol(i.getSymbolAtLocation(o));if(s&&s.exports.has(e.escapeLeadingUnderscores(r)))return{kind:0,namespacePrefix:o.text,position:n}}})}(_,r,n,l),p=function(t){return e.firstDefined(t,function(e){var t=e.declaration,r=e.importKind;if(249===t.kind){var n=t.importClause;if(n){var i=n.name,a=n.namedBindings;return 1===r&&!i||0===r&&(!a||252===a.kind)?{kind:2,importClause:n,importKind:r}:void 0}}})}(_),f=p?[p]:function(t,r,n,i,a,o,s){var l=e.firstDefined(r,u);return l?[l]:c(n,i,a,t,o,s)}(t,_,i,a,n,o,s);return(d?[d]:e.emptyArray).concat(f)}function c(t,r,n,i,a,o){var s=e.isSourceFileJS(r),c=e.flatMap(i,function(i){var c=i.moduleSymbol,u=i.importKind,l=i.exportedSymbolIsTypeOnly;return e.moduleSpecifiers.getModuleSpecifiers(c,t.getCompilerOptions(),r,a,t.getSourceFiles(),o,t.redirectTargetsMap).map(function(t){return l&&s?{kind:1,moduleSpecifier:t,position:e.Debug.assertDefined(n)}:{kind:3,moduleSpecifier:t,importKind:u}})});return e.sort(c,function(e,t){return e.moduleSpecifier.length-t.moduleSpecifier.length})}function u(t){var r=t.declaration,n=t.importKind,i=249===r.kind?r.moduleSpecifier:259===r.moduleReference.kind?r.moduleReference.expression:void 0;return i&&e.isStringLiteral(i)?{kind:3,moduleSpecifier:i.text,importKind:n}:void 0}function l(t,r,n){var a=e.getTokenAtPosition(t.sourceFile,n),c=r===e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code?function(t,r){var n=t.sourceFile,i=t.program,a=t.host,o=t.preferences,c=i.getTypeChecker(),u=function(t,r){var n=e.isIdentifier(t)?r.getSymbolAtLocation(t):void 0;if(e.isUMDExportSymbol(n))return n;var i=t.parent;return e.isJsxOpeningLikeElement(i)&&i.tagName===t||e.isJsxOpeningFragment(i)?e.tryCast(r.resolveName(r.getJsxNamespace(i),e.isJsxOpeningLikeElement(i)?t:i,67220415,!1),e.isUMDExportSymbol):void 0}(r,c);if(!u)return;var l=c.getAliasedSymbol(u),_=u.name;return{fixes:s([{moduleSymbol:l,importKind:function(t){if(e.getAllowSyntheticDefaultImports(t))return 1;var r=e.getEmitModuleKind(t);switch(r){case e.ModuleKind.AMD:case e.ModuleKind.CommonJS:case e.ModuleKind.UMD:return 3;case e.ModuleKind.System:case e.ModuleKind.ES2015:case e.ModuleKind.ESNext:case e.ModuleKind.None:return 2;default:return e.Debug.assertNever(r)}}(i.getCompilerOptions()),exportedSymbolIsTypeOnly:!1}],_,e.isIdentifier(r)?r.getStart(n):void 0,i,n,a,o),symbolName:_}}(t,a):e.isIdentifier(a)?function(t,r){var n=t.sourceFile,i=t.program,a=t.cancellationToken,c=t.host,u=t.preferences,l=i.getTypeChecker(),d=e.isJsxOpeningLikeElement(r.parent)&&r.parent.tagName===r&&(e.isIntrinsicJsxName(r.text)||l.resolveName(r.text,r,67108863,!1))?l.getJsxNamespace(n):r.text;return e.Debug.assert("default"!==d),{fixes:e.arrayFrom(e.flatMapIterator(function(t,r,n,i,a,s){var c=e.createMultiMap();function u(t,r,n){c.add(e.getUniqueSymbolId(r,a).toString(),{moduleSymbol:t,importKind:n,exportedSymbolIsTypeOnly:o(r,a)})}return v(a,i,s.getSourceFiles(),function(e){n.throwIfCancellationRequested();var i=_(e,a,s.getCompilerOptions());i&&i.name===t&&h(i.symbolForMeaning,r)&&u(e,i.symbol,i.kind);var o=a.tryGetMemberInModuleExportsAndProperties(t,e);o&&h(o,r)&&u(e,o,0)}),c}(d,e.getMeaningFromLocation(r),a,n,l,i).entries(),function(e){return e[0],s(e[1],d,r.getStart(n),i,n,c,u)})),symbolName:d}}(t,a):void 0;return c&&i({},c,{fixes:e.sort(c.fixes,function(e,t){return e.kind-t.kind})})}function _(t,r,n){var a=function(e,t){var r=t.tryGetMemberInModuleExports("default",e);if(r)return{symbol:r,kind:1};var n=t.resolveExternalModuleSymbol(e);return n===e?void 0:{symbol:n,kind:3}}(t,r);if(a){var o=a.symbol,s=a.kind,c=function t(r,n,i,a){var o=e.getLocalSymbolForExportDefault(r);if(o)return{symbolForMeaning:o,name:o.name};var s=(c=r,c.declarations&&e.firstDefined(c.declarations,function(t){if(e.isExportAssignment(t)){if(e.isIdentifier(t.expression))return t.expression.text}else if(e.isExportSpecifier(t))return e.Debug.assert("default"===t.name.text),t.propertyName&&t.propertyName.text}));var c;if(void 0!==s)return{symbolForMeaning:r,name:s};if(2097152&r.flags){var u=i.getImmediateAliasedSymbol(r);return u&&t(u,e.Debug.assertDefined(u.parent),i,a)}return{symbolForMeaning:r,name:D(n,a.target)}}(o,t,r,n);return c&&i({symbol:o,kind:s},c)}}function d(r,n,i,a,o){var s,c=e.textChanges.ChangeTracker.with(r,function(t){s=function(t,r,n,i,a){switch(i.kind){case 0:return f(t,r,i),[e.Diagnostics.Change_0_to_1,n,i.namespacePrefix+"."+n];case 1:return m(t,r,i,a),[e.Diagnostics.Change_0_to_1,n,g(i.moduleSpecifier,a)+n];case 2:var o=i.importClause,s=i.importKind;p(t,r,o,1===s?n:void 0,0===s?[n]:e.emptyArray);var c=e.stripQuotes(o.parent.moduleSpecifier.getText());return[1===s?e.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1:e.Diagnostics.Add_0_to_existing_import_declaration_from_1,n,c];case 3:var s=i.importKind,u=i.moduleSpecifier;return y(t,r,u,a,1===s?{defaultImport:n,namedImports:e.emptyArray,namespaceLikeImport:void 0}:0===s?{defaultImport:void 0,namedImports:[n],namespaceLikeImport:void 0}:{defaultImport:void 0,namedImports:e.emptyArray,namespaceLikeImport:{importKind:s,name:n}}),[1===s?e.Diagnostics.Import_default_0_from_module_1:e.Diagnostics.Import_0_from_module_1,n,u];default:return e.Debug.assertNever(i)}}(t,n,i,a,o)});return t.createCodeFixAction("import",c,s,t.importFixId,e.Diagnostics.Add_all_missing_imports)}function p(t,r,n,i,a){if(i&&(e.Debug.assert(!n.name),t.insertNodeAt(r,n.getStart(r),e.createIdentifier(i),{suffix:", "})),a.length){var o=a.map(function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))});if(n.namedBindings&&e.cast(n.namedBindings,e.isNamedImports).elements.length)for(var s=0,c=o;s<c.length;s++){var u=c[s];t.insertNodeInListAfter(r,e.last(e.cast(n.namedBindings,e.isNamedImports).elements),u)}else if(o.length){var l=e.createNamedImports(o);n.namedBindings?t.replaceNode(r,n.namedBindings,l):t.insertNodeAfter(r,e.Debug.assertDefined(n.name),l)}}}function f(e,t,r){var n=r.namespacePrefix,i=r.position;e.insertText(t,i,n+".")}function m(e,t,r,n){var i=r.moduleSpecifier,a=r.position;e.insertText(t,a,g(i,n))}function g(t,r){var n=e.getQuoteFromPreference(r);return"import("+n+t+n+")."}function y(t,r,n,i,a){var o=a.defaultImport,s=a.namedImports,c=a.namespaceLikeImport,u=e.makeStringLiteral(n,i);(void 0!==o||s.length)&&e.insertImport(t,r,e.makeImport(void 0===o?void 0:e.createIdentifier(o),s.map(function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))}),n,i)),c&&e.insertImport(t,r,3===c.importKind?e.createImportEqualsDeclaration(void 0,void 0,e.createIdentifier(c.name),e.createExternalModuleReference(u)):e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(e.createIdentifier(c.name))),u))}function h(t,r){var n=t.declarations;return e.some(n,function(t){return!!(e.getMeaningFromDeclaration(t)&r)})}function v(t,r,n,i){b(t,n,function(t,n){var a,o,s;(void 0===n||n!==r&&(a=r.fileName,o=n.fileName,void 0===(s=e.forEachAncestorDirectory(o,function(t){return"node_modules"===e.getBaseFileName(t)?t:void 0}))||e.startsWith(a,e.getDirectoryPath(s))))&&i(t)})}function b(t,r,n){for(var i=0,a=t.getAmbientModules();i<a.length;i++){n(a[i],void 0)}for(var o=0,s=r;o<s.length;o++){var c=s[o];e.isExternalOrCommonJsModule(c)&&n(t.getMergedSymbol(c.symbol),c)}}function D(t,r){return x(e.removeFileExtension(e.stripQuotes(t.name)),r)}function x(t,r){var n=e.getBaseFileName(e.removeSuffix(t,"/index")),i="",a=!0,o=n.charCodeAt(0);e.isIdentifierStart(o,r)?i+=String.fromCharCode(o):a=!1;for(var s=1;s<n.length;s++){var c=n.charCodeAt(s),u=e.isIdentifierPart(c,r);if(u){var l=String.fromCharCode(c);a||(l=l.toUpperCase()),i+=l}a=u}return e.isStringANonContextualKeyword(i)?"_"+i:i||"_"}t.registerCodeFix({errorCodes:a,getCodeActions:function(t){var r=t.errorCode,n=t.preferences,i=t.sourceFile,a=t.span,o=l(t,r,a.start);if(o){var s=o.fixes,c=o.symbolName,u=e.getQuotePreference(i,n);return s.map(function(e){return d(t,i,c,e,u)})}},fixIds:[t.importFixId],getAllCodeActions:function(r){var n=r.sourceFile,i=r.preferences,o=[],s=[],c=e.createMap(),u=e.createMap();return t.eachDiagnostic(r,a,function(t){var n=l(r,t.code,t.start);if(n&&n.fixes.length){var i=n.fixes,a=n.symbolName,_=e.first(i);switch(_.kind){case 0:o.push(_);break;case 1:s.push(_);break;case 2:var d=_.importClause,p=_.importKind,f=String(e.getNodeId(d));(m=c.get(f))||c.set(f,m={importClause:d,defaultImport:void 0,namedImports:[]}),0===p?e.pushIfUnique(m.namedImports,a):(e.Debug.assert(void 0===m.defaultImport||m.defaultImport===a),m.defaultImport=a);break;case 3:var m,g=_.moduleSpecifier;p=_.importKind;switch((m=u.get(g))||u.set(g,m={defaultImport:void 0,namedImports:[],namespaceLikeImport:void 0}),p){case 1:e.Debug.assert(void 0===m.defaultImport||m.defaultImport===a),m.defaultImport=a;break;case 0:e.pushIfUnique(m.namedImports,a);break;case 3:case 2:e.Debug.assert(void 0===m.namespaceLikeImport||m.namespaceLikeImport.name===a),m.namespaceLikeImport={importKind:p,name:a}}break;default:e.Debug.assertNever(_)}}}),t.createCombinedCodeActions(e.textChanges.ChangeTracker.with(r,function(t){for(var r=e.getQuotePreference(n,i),a=0,l=o;a<l.length;a++){var _=l[a];f(t,n,_)}for(var d=0,g=s;d<g.length;d++){_=g[d];m(t,n,_,r)}c.forEach(function(e){var r=e.importClause,i=e.defaultImport,a=e.namedImports;p(t,n,r,i,a)}),u.forEach(function(e,i){y(t,n,i,r,e)})}))}}),function(e){e[e.UseNamespace=0]="UseNamespace",e[e.ImportType=1]="ImportType",e[e.AddToExisting=2]="AddToExisting",e[e.AddNew=3]="AddNew"}(r||(r={})),function(e){e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.Equals=3]="Equals"}(n||(n={})),t.getImportCompletionAction=function(t,r,n,i,a,u,l,p,f){var m=function(t,r,n,i,a,s,c){var u=[];return b(s,c,function(c,l){if(!l||c===r||!e.startsWith(i.fileName,e.getDirectoryPath(l.fileName))){var d=_(c,s,a);d&&d.name===n&&e.skipAlias(d.symbol,s)===t&&u.push({moduleSymbol:c,importKind:d.kind,exportedSymbolIsTypeOnly:o(d.symbol,s)});for(var p=0,f=s.getExportsOfModule(c);p<f.length;p++){var m=f[p];m.name===n&&e.skipAlias(m,s)===t&&u.push({moduleSymbol:c,importKind:0,exportedSymbolIsTypeOnly:o(m,s)})}}}),u}(t,r,i,n,u.getCompilerOptions(),u.getTypeChecker(),u.getSourceFiles());e.Debug.assert(m.some(function(e){return e.moduleSymbol===r}));var g,y,h,v,D=e.first(c(u,n,p,m,a,f)).moduleSpecifier,x=e.first(s(m,i,p,u,n,a,f));return{moduleSpecifier:D,codeAction:(g=d({host:a,formatContext:l},n,i,x,e.getQuotePreference(n,f)),y=g.description,h=g.changes,v=g.commands,{description:y,changes:h,commands:v})}},t.forEachExternalModuleToImportFrom=v,t.moduleSymbolToValidIdentifier=D,t.moduleSpecifierToValidIdentifier=x}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r=[e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2.code];function n(t,r,n){var i,a=e.getTokenAtPosition(t,r),o=n.program.getTypeChecker();if(e.isPropertyAccessExpression(a.parent)&&a.parent.name===a){e.Debug.assert(72===a.kind);var s=o.getTypeAtLocation(a.parent.expression);i=o.getSuggestionForNonexistentProperty(a,s)}else if(e.isImportSpecifier(a.parent)&&a.parent.name===a){e.Debug.assert(72===a.kind);var c=function(t,r,n){if(!n||!e.isStringLiteralLike(n.moduleSpecifier))return;var i=e.getResolvedModule(t,n.moduleSpecifier.text);return i?r.program.getSourceFile(i.resolvedFileName):void 0}(t,n,e.findAncestor(a,e.isImportDeclaration));c&&c.symbol&&(i=o.getSuggestionForNonexistentExport(a,c.symbol))}else{var u=e.getMeaningFromLocation(a),l=e.getTextOfNode(a);e.Debug.assert(void 0!==l,"name should be defined"),i=o.getSuggestionForNonexistentSymbol(a,l,function(e){var t=0;4&e&&(t|=1920);2&e&&(t|=67897832);1&e&&(t|=67220415);return t}(u))}return void 0===i?void 0:{node:a,suggestion:i}}function i(t,r,n,i,a){!e.isIdentifierText(i,a)&&e.isPropertyAccessExpression(n.parent)?t.replaceNode(r,n.parent,e.createElementAccess(n.parent.expression,e.createLiteral(i))):t.replaceNode(r,n,e.createIdentifier(i))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,o=n(a,r.span.start,r);if(o){var s=o.node,c=o.suggestion,u=r.host.getCompilationSettings().target,l=e.textChanges.ChangeTracker.with(r,function(e){return i(e,a,s,c,u)});return[t.createCodeFixAction("spelling",l,[e.Diagnostics.Change_spelling_to_0,c],"fixSpelling",e.Diagnostics.Fix_all_detected_spelling_errors)]}},fixIds:["fixSpelling"],getAllCodeActions:function(e){return t.codeFixAll(e,r,function(t,r){var a=n(r.file,r.start,e),o=e.host.getCompilationSettings().target;a&&i(t,e.sourceFile,a.node,a.suggestion,o)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r,n="addMissingMember",i=[e.Diagnostics.Property_0_does_not_exist_on_type_1.code,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code],a="addMissingMember";function o(t,r,n){var i=e.getTokenAtPosition(t,r);if(e.isIdentifier(i)){var a=i.parent;if(e.isPropertyAccessExpression(a)){var o=e.skipConstraint(n.getTypeAtLocation(a.expression)),s=o.symbol;if(s&&s.declarations){var c=e.find(s.declarations,e.isClassLike)||e.find(s.declarations,e.isInterfaceDeclaration);if(c){var u=(o.target||o)!==n.getDeclaredTypeOfSymbol(s),l=c.getSourceFile();return{kind:1,token:i,parentDeclaration:c,makeStatic:u,declSourceFile:l,inJs:e.isSourceFileJS(l),call:e.tryCast(a.parent,e.isCallExpression)}}var _=e.find(s.declarations,e.isEnumDeclaration);return _?{kind:0,token:i,parentDeclaration:_}:void 0}}}}function s(t,r,n,i,a){if(a){if(209===n.kind)return;var o=n.name.getText(),s=c(e.createIdentifier(o),i);t.insertNodeAfter(r,n,s)}else{var u=e.getFirstConstructorWithBody(n);if(!u)return;var l=c(e.createThis(),i);t.insertNodeAtConstructorEnd(r,u,l)}}function c(t,r){return e.createStatement(e.createAssignment(e.createPropertyAccess(t,r),e.createIdentifier("undefined")))}function u(t,r,n){var i;if(204===n.parent.parent.kind){var a=n.parent.parent,o=n.parent===a.left?a.right:a.left,s=t.getWidenedType(t.getBaseTypeOfLiteralType(t.getTypeAtLocation(o)));i=t.typeToTypeNode(s,r)}else{var c=t.getContextualType(n.parent);i=c?t.typeToTypeNode(c):void 0}return i||e.createKeywordTypeNode(120)}function l(t,r,n,i,a,o){var s=e.createProperty(void 0,o?[e.createToken(116)]:void 0,i,void 0,a,void 0),c=function(t){for(var r,n=0,i=t.members;n<i.length;n++){var a=i[n];if(!e.isPropertyDeclaration(a))break;r=a}return r}(n);c?t.insertNodeAfter(r,c,s):t.insertNodeAtClassStart(r,n,s)}function _(r,n,i,a,o,s,c,u,l){var _=t.createMethodFromCallExpression(r,s,o.text,u,c,l,a),d=e.getAncestor(s,156);d&&d.parent===a?n.insertNodeAfter(i,d,_):n.insertNodeAtClassStart(i,a,_)}function d(t,r,n,i){var a=e.some(i.members,function(e){var t=r.getTypeAtLocation(e);return!!(t&&132&t.flags)}),o=e.createEnumMember(n,a?e.createStringLiteral(n.text):void 0);t.replaceNode(i.getSourceFile(),i,e.updateEnumDeclaration(i,i.decorators,i.modifiers,i.name,e.concatenate(i.members,e.singleElementArray(o))))}t.registerCodeFix({errorCodes:i,getCodeActions:function(r){var i=o(r.sourceFile,r.span.start,r.program.getTypeChecker());if(i){if(0===i.kind){var c=i.token,p=i.parentDeclaration,f=e.textChanges.ChangeTracker.with(r,function(e){return d(e,r.program.getTypeChecker(),c,p)});return[t.createCodeFixAction(n,f,[e.Diagnostics.Add_missing_enum_member_0,c.text],a,e.Diagnostics.Add_all_missing_members)]}var m=i.parentDeclaration,g=i.declSourceFile,y=i.inJs,h=i.makeStatic,v=i.token,b=i.call,D=b&&function(r,i,o,s,c,u,l,d){var p=e.textChanges.ChangeTracker.with(r,function(e){return _(r,e,i,o,s,c,u,l,d)});return t.createCodeFixAction(n,p,[u?e.Diagnostics.Declare_static_method_0:e.Diagnostics.Declare_method_0,s.text],a,e.Diagnostics.Add_all_missing_members)}(r,g,m,v,b,h,y,r.preferences),x=y&&!e.isInterfaceDeclaration(m)?e.singleElementArray(function(r,i,o,c,u){var l=e.textChanges.ChangeTracker.with(r,function(e){return s(e,i,o,c,u)});return 0===l.length?void 0:t.createCodeFixAction(n,l,[u?e.Diagnostics.Initialize_static_property_0:e.Diagnostics.Initialize_property_0_in_the_constructor,c],a,e.Diagnostics.Add_all_missing_members)}(r,g,m,v.text,h)):function(r,i,o,s,c){var _=u(r.program.getTypeChecker(),o,s),d=function(r,i,o,s,c,u){var _=e.textChanges.ChangeTracker.with(r,function(e){return l(e,i,o,c,u,s)});return t.createCodeFixAction(n,_,[s?e.Diagnostics.Declare_static_property_0:e.Diagnostics.Declare_property_0,c],a,e.Diagnostics.Add_all_missing_members)}(r,i,o,c,s.text,_);return c?[d]:[d,function(r,i,a,o,s){var c=e.createKeywordTypeNode(138),u=e.createParameter(void 0,void 0,void 0,"x",void 0,c,void 0),l=e.createIndexSignature(void 0,void 0,[u],s),_=e.textChanges.ChangeTracker.with(r,function(e){return e.insertNodeAtClassStart(i,a,l)});return t.createCodeFixActionNoFixId(n,_,[e.Diagnostics.Add_index_signature_for_property_0,o])}(r,i,o,s.text,_)]}(r,g,m,v,h);return e.concatenate(e.singleElementArray(D),x)}},fixIds:[a],getAllCodeActions:function(r){var n=r.program,a=r.preferences,c=n.getTypeChecker(),p=e.createMap(),f=new e.NodeMap;return t.createCombinedCodeActions(e.textChanges.ChangeTracker.with(r,function(m){t.eachDiagnostic(r,i,function(t){var r=o(t.file,t.start,c);if(r&&e.addToSeen(p,e.getNodeId(r.parentDeclaration)+"#"+r.token.text))if(0===r.kind){var n=r.token,i=r.parentDeclaration;d(m,c,n,i)}else{i=r.parentDeclaration;var a=r.token,s=f.getOrUpdate(i,function(){return[]});s.some(function(e){return e.token.text===a.text})||s.push(r)}}),f.forEach(function(t,i){for(var o=function(t,r){var n=[];for(;t;){var i=e.getClassExtendsHeritageElement(t),a=i&&r.getSymbolAtLocation(i.expression),o=a&&e.find(a.declarations,e.isClassLike);o&&n.push(o),t=o}return n}(i,c),d=function(t){if(o.some(function(e){var r=f.get(e);return!!r&&r.some(function(e){return e.token.text===t.token.text})}))return"continue";var i=t.parentDeclaration,c=t.declSourceFile,d=t.inJs,p=t.makeStatic,g=t.token,y=t.call;if(y)_(r,m,c,i,g,y,p,d,a);else if(d&&!e.isInterfaceDeclaration(i))s(m,c,i,g.text,p);else{var h=u(n.getTypeChecker(),i,g);l(m,c,i,g.text,h,p)}},p=0,g=t;p<g.length;p++){d(g[p])}})}))}}),function(e){e[e.Enum=0]="Enum",e[e.ClassOrInterface=1]="ClassOrInterface"}(r||(r={}))}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="addMissingNewOperator",n=[e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function i(t,r,n){var i=e.cast(function(t,r){var n=e.getTokenAtPosition(t,r.start),i=e.textSpanEnd(r);for(;n.end<i;)n=n.parent;return n}(r,n),e.isCallExpression),a=e.createNew(i.expression,i.typeArguments,i.arguments);t.replaceNode(r,i,a)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.sourceFile,o=n.span,s=e.textChanges.ChangeTracker.with(n,function(e){return i(e,a,o)});return[t.createCodeFixAction(r,s,e.Diagnostics.Add_missing_new_operator_to_call,r,e.Diagnostics.Add_missing_new_operator_to_all_calls)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return i(t,e.sourceFile,r)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixCannotFindModule",n="generateTypes",i=e.Diagnostics.Cannot_find_module_0.code,a=[i,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];function o(t,r,n){var i=n.sourceFile.fileName,a=e.tryResolveJSModule(r,e.getDirectoryPath(i),n.host);if(void 0!==a){var o=e.resolvePath(e.getDirectoryPath(n.program.getCompilerOptions().configFile.fileName),t,r+".d.ts");if(!n.host.fileExists(o))return{type:"generate types",file:i,fileToGenerateTypesFor:a,outputFileName:o}}}function s(r,n){var i=n.program.getCompilerOptions().configFile;if(i){var a=e.getTsConfigObjectLiteralExpression(i);if(a){var o=t.findJsonProperty(a,"compilerOptions");if(!o){var s=e.createObjectLiteral([u(),d()]);return r.insertNodeAtObjectStart(i,a,t.createJsonPropertyAssignment("compilerOptions",s)),l}var p=o.initializer;if(!e.isObjectLiteralExpression(p))return l;var f=function(r,n,i){var a=t.findJsonProperty(i,"baseUrl");return a?e.isStringLiteral(a.initializer)?a.initializer.text:c:(r.insertNodeAtObjectStart(n,i,u()),c)}(r,i,p),m=function(r,n,i){var a=t.findJsonProperty(i,"paths");if(!a||!e.isObjectLiteralExpression(a.initializer))return r.insertNodeAtObjectStart(n,i,d()),l;var o=e.firstDefined(a.initializer.properties,function(t){return e.isPropertyAssignment(t)&&e.isStringLiteral(t.name)&&"*"===t.name.text&&e.isArrayLiteralExpression(t.initializer)?e.firstDefined(t.initializer.elements,function(t){return e.isStringLiteral(t)?e.tryRemoveSuffix(t.text,"/*"):void 0}):void 0});return o||(r.insertNodeAtObjectStart(n,a.initializer,_()),l)}(r,i,p);return e.combinePaths(f,m)}}}t.registerCodeFix({errorCodes:a,getCodeActions:function(i){var a=i.host,c=i.sourceFile,u=f(c,i.span.start);if(void 0!==u){var l=m(u,a,i.errorCode);return void 0===l?e.singleElementArray(function(i,a){var c,u=e.textChanges.ChangeTracker.with(i,function(e){var t=s(e,i);c=void 0===t?void 0:o(t,a,i)});return c&&t.createCodeFixAction(r,u,[e.Diagnostics.Generate_types_for_0,a],n,e.Diagnostics.Generate_types_for_all_packages_without_types,c)}(i,u)):[t.createCodeFixAction(r,[],[e.Diagnostics.Install_0,l],"installTypesPackage",e.Diagnostics.Install_all_missing_types_packages,p(c.fileName,l))]}},fixIds:["installTypesPackage",n],getAllCodeActions:function(r){var i=null;return t.codeFixAll(r,a,function(t,a,c){var u=f(a.file,a.start);if(void 0!==u)switch(r.fixId){case"installTypesPackage":var l=m(u,r.host,a.code);l&&c.push(p(a.file.fileName,l));break;case n:var _=null!==i?i:i=s(t,r),d=void 0===_?void 0:o(_,u,r);d&&c.push(d);break;default:e.Debug.fail("Bad fixId: "+r.fixId)}})}});var c=".";function u(){return t.createJsonPropertyAssignment("baseUrl",e.createStringLiteral(c))}var l="types";function _(){return t.createJsonPropertyAssignment("*",e.createArrayLiteral([e.createStringLiteral(l+"/*")]))}function d(){return t.createJsonPropertyAssignment("paths",e.createObjectLiteral([_()]))}function p(e,t){return{type:"install package",file:e,packageName:t}}function f(t,r){var n=e.cast(e.getTokenAtPosition(t,r),e.isStringLiteral).text,i=e.parsePackageName(n).packageName;return e.isExternalModuleNameRelative(i)?void 0:i}function m(t,r,n){return n===i?e.JsTyping.nodeCoreModules.has(t)?"@types/node":void 0:r.isKnownTypesPackageName(t)?e.getTypesPackageName(t):void 0}}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r=[e.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,e.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],n="fixClassDoesntImplementInheritedAbstractMember";function i(t,r){var n=e.getTokenAtPosition(t,r);return e.cast(n.parent,e.isClassLike)}function a(r,n,i,a,s){var c=e.getEffectiveBaseTypeNode(r),u=i.program.getTypeChecker(),l=u.getTypeAtLocation(c),_=u.getPropertiesOfType(l).filter(o);t.createMissingMemberNodes(r,_,i,s,function(e){return a.insertNodeAtClassStart(n,r,e)})}function o(t){var r=e.getModifierFlags(e.first(t.getDeclarations()));return!(8&r||!(128&r))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.sourceFile,s=r.span,c=e.textChanges.ChangeTracker.with(r,function(e){return a(i(o,s.start),o,r,e,r.preferences)});return 0===c.length?void 0:[t.createCodeFixAction(n,c,e.Diagnostics.Implement_inherited_abstract_class,n,e.Diagnostics.Implement_all_inherited_abstract_classes)]},fixIds:[n],getAllCodeActions:function(n){var o=e.createMap();return t.codeFixAll(n,r,function(t,r){var s=i(r.file,r.start);e.addToSeen(o,e.getNodeId(s))&&a(s,n.sourceFile,n,t,n.preferences)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="classSuperMustPrecedeThisAccess",n=[e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function i(e,t,r,n){e.insertNodeAtConstructorStart(t,r,n),e.delete(t,n)}function a(t,r){var n=e.getTokenAtPosition(t,r);if(100===n.kind){var i=e.getContainingFunction(n),a=o(i.body);return a&&!a.expression.arguments.some(function(t){return e.isPropertyAccessExpression(t)&&t.expression===n})?{constructor:i,superCall:a}:void 0}}function o(t){return e.isExpressionStatement(t)&&e.isSuperCall(t.expression)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=a(o,s.start);if(c){var u=c.constructor,l=c.superCall,_=e.textChanges.ChangeTracker.with(n,function(e){return i(e,o,u,l)});return[t.createCodeFixAction(r,_,e.Diagnostics.Make_super_call_the_first_statement_in_the_constructor,r,e.Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]}},fixIds:[r],getAllCodeActions:function(r){var o=r.sourceFile,s=e.createMap();return t.codeFixAll(r,n,function(t,r){var n=a(r.file,r.start);if(n){var c=n.constructor,u=n.superCall;e.addToSeen(s,e.getNodeId(c.parent))&&i(t,o,c,u)}})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="constructorForDerivedNeedSuperCall",n=[e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.Debug.assert(124===n.kind),n.parent}function a(t,r,n){var i=e.createStatement(e.createCall(e.createSuper(),void 0,e.emptyArray));t.insertNodeAtConstructorStart(r,n,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start),u=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c)});return[t.createCodeFixAction(r,u,e.Diagnostics.Add_missing_super_call,r,e.Diagnostics.Add_all_missing_super_calls)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return a(t,e.sourceFile,i(r.file,r.start))})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="enableExperimentalDecorators",n=[e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning.code];t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var i=n.program.getCompilerOptions().configFile;if(void 0!==i){var a=e.textChanges.ChangeTracker.with(n,function(r){return function(r,n){t.setJsonCompilerOptionValue(r,n,"experimentalDecorators",e.createTrue())}(r,i)});return[t.createCodeFixActionNoFixId(r,a,e.Diagnostics.Enable_the_experimentalDecorators_option_in_your_configuration_file)]}},fixIds:[r]})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="extendsInterfaceBecomesImplements",n=[e.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function i(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingClass(n).heritageClauses,a=i[0].getFirstToken();return 86===a.kind?{extendsToken:a,heritageClauses:i}:void 0}function a(t,r,n,i){if(t.replaceNode(r,n,e.createToken(109)),2===i.length&&86===i[0].token&&109===i[1].token){var a=i[1].getFirstToken(),o=a.getFullStart();t.replaceRange(r,{pos:o,end:o},e.createToken(27));for(var s=r.text,c=a.end;c<s.length&&e.isWhiteSpaceSingleLine(s.charCodeAt(c));)c++;t.deleteRange(r,{pos:a.getStart(),end:c})}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=i(o,n.span.start);if(s){var c=s.extendsToken,u=s.heritageClauses,l=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c,u)});return[t.createCodeFixAction(r,l,e.Diagnostics.Change_extends_to_implements,r,e.Diagnostics.Change_all_extended_interfaces_to_implements)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){var r=i(t.file,t.start);r&&a(e,t.file,r.extendsToken,r.heritageClauses)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="forgottenThisPropertyAccess",n=e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,i=[e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,n];function a(t,r,i){var a=e.getTokenAtPosition(t,r);if(e.isIdentifier(a))return{node:a,className:i===n?e.getContainingClass(a).name.text:void 0}}function o(t,r,n){var i=n.node,a=n.className;e.suppressLeadingAndTrailingTrivia(i),t.replaceNode(r,i,e.createPropertyAccess(a?e.createIdentifier(a):e.createThis(),i))}t.registerCodeFix({errorCodes:i,getCodeActions:function(n){var i=n.sourceFile,s=a(i,n.span.start,n.errorCode);if(s){var c=e.textChanges.ChangeTracker.with(n,function(e){return o(e,i,s)});return[t.createCodeFixAction(r,c,[e.Diagnostics.Add_0_to_unresolved_variable,s.className||"this"],r,e.Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,i,function(t,r){var n=a(r.file,r.start,r.code);n&&o(t,e.sourceFile,n)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="unusedIdentifier",n="unusedIdentifier_prefix",i="unusedIdentifier_delete",a="unusedIdentifier_infer",o=[e.Diagnostics._0_is_declared_but_its_value_is_never_read.code,e.Diagnostics._0_is_declared_but_never_used.code,e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code,e.Diagnostics.All_imports_in_import_declaration_are_unused.code,e.Diagnostics.All_destructured_elements_are_unused.code,e.Diagnostics.All_variables_are_unused.code,e.Diagnostics.All_type_parameters_are_unused.code];function s(t,r,n){t.replaceNode(r,n.parent,e.createKeywordTypeNode(143))}function c(n,a){return t.createCodeFixAction(r,n,a,i,e.Diagnostics.Delete_all_unused_declarations)}function u(t,r,n){t.delete(r,e.Debug.assertDefined(e.cast(n.parent,e.isDeclarationWithTypeParameterChildren).typeParameters))}function l(t){return 92===t.kind?e.tryCast(t.parent,e.isImportDeclaration):void 0}function _(t,r,n,i,a,o){if(18!==t.kind||!e.isObjectBindingPattern(t.parent))return!1;var s=t.parent.parent;return 151===s.kind?m(r,n,s,i,a,o):r.delete(n,s),!0}function d(t,r,n){var i=e.tryCast(r.parent,e.isVariableDeclarationList);return!(!i||i.getChildren(t)[0]!==r)&&(n.delete(t,219===i.parent.kind?i.parent:i),!0)}function p(t,r,n,i){r!==e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code&&(127===i.kind&&(i=e.cast(i.parent,e.isInferTypeNode).typeParameter.name),e.isIdentifier(i)&&function(e){switch(e.parent.kind){case 151:case 150:return!0;case 237:var t=e.parent;switch(t.parent.parent.kind){case 227:case 226:return!0}}return!1}(i)&&t.replaceNode(n,i,e.createIdentifier("_"+i.text)))}function f(t,r,n,i,a,o){!function(t,r,n,i,a,o){var s=t.parent;e.isParameter(s)?m(r,n,s,i,a,o):r.delete(n,e.isImportClause(s)?t:e.isComputedPropertyName(s)?s.parent:s)}(r,n,t,i,a,o),e.isIdentifier(r)&&function(t,r,n,i){e.FindAllReferences.Core.eachSymbolReferenceInFile(n,i,r,function(n){e.isPropertyAccessExpression(n.parent)&&n.parent.name===n&&(n=n.parent),e.isBinaryExpression(n.parent)&&e.isExpressionStatement(n.parent.parent)&&n.parent.left===n&&t.delete(r,n.parent.parent)})}(n,t,r,i)}function m(t,r,n,i,a,o){(function(t,r,n){var i=t.parent;switch(i.kind){case 156:var a=r.getSymbolAtLocation(i.name);if(e.isMemberSymbolInBaseType(a,r))return!1;case 157:case 239:return!0;case 196:case 197:var o=i.parameters,s=o.indexOf(t);return e.Debug.assert(-1!==s),n?o.slice(s+1).every(function(e){return 72===e.name.kind&&!e.symbol.isReferenced}):s===o.length-1;case 159:return!1;default:return e.Debug.failBadSyntaxKind(i)}})(n,i,o)&&(n.modifiers&&n.modifiers.length>0&&(!e.isIdentifier(n.name)||e.FindAllReferences.Core.isSymbolReferencedInFile(n.name,i,r))?n.modifiers.forEach(function(e){t.deleteModifier(r,e)}):(t.delete(r,n),function(t,r,n,i,a){e.FindAllReferences.Core.eachSignatureCall(n.parent,i,a,function(e){var i=n.parent.parameters.indexOf(n);e.arguments.length>i&&t.delete(r,e.arguments[i])})}(t,r,n,a,i)))}t.registerCodeFix({errorCodes:o,getCodeActions:function(i){var o=i.errorCode,m=i.sourceFile,g=i.program,y=g.getTypeChecker(),h=g.getSourceFiles(),v=e.getTokenAtPosition(m,i.span.start);if(e.isJSDocTemplateTag(v))return[c(e.textChanges.ChangeTracker.with(i,function(e){return e.delete(m,v)}),e.Diagnostics.Remove_template_tag)];if(28===v.kind)return[c(T=e.textChanges.ChangeTracker.with(i,function(e){return u(e,m,v)}),e.Diagnostics.Remove_type_parameters)];var b=l(v);if(b)return[c(T=e.textChanges.ChangeTracker.with(i,function(e){return e.delete(m,b)}),[e.Diagnostics.Remove_import_from_0,e.showModuleSpecifier(b)])];var D=e.textChanges.ChangeTracker.with(i,function(e){return _(v,e,m,y,h,!1)});if(D.length)return[c(D,e.Diagnostics.Remove_destructuring)];var x=e.textChanges.ChangeTracker.with(i,function(e){return d(m,v,e)});if(x.length)return[c(x,e.Diagnostics.Remove_variable_statement)];var S=[];if(127===v.kind){var T=e.textChanges.ChangeTracker.with(i,function(e){return s(e,m,v)}),C=e.cast(v.parent,e.isInferTypeNode).typeParameter.name.text;S.push(t.createCodeFixAction(r,T,[e.Diagnostics.Replace_infer_0_with_unknown,C],a,e.Diagnostics.Replace_all_unused_infer_with_unknown))}else{var E=e.textChanges.ChangeTracker.with(i,function(e){return f(m,v,e,y,h,!1)});if(E.length){C=e.isComputedPropertyName(v.parent)?v.parent:v;S.push(c(E,[e.Diagnostics.Remove_declaration_for_Colon_0,C.getText(m)]))}}var k=e.textChanges.ChangeTracker.with(i,function(e){return p(e,o,m,v)});return k.length&&S.push(t.createCodeFixAction(r,k,[e.Diagnostics.Prefix_0_with_an_underscore,v.getText(m)],n,e.Diagnostics.Prefix_all_unused_declarations_with_where_possible)),S},fixIds:[n,i,a],getAllCodeActions:function(r){var c=r.sourceFile,m=r.program,g=m.getTypeChecker(),y=m.getSourceFiles();return t.codeFixAll(r,o,function(t,o){var m=e.getTokenAtPosition(c,o.start);switch(r.fixId){case n:p(t,o.code,c,m);break;case i:if(127===m.kind)break;var h=l(m);h?t.delete(c,h):e.isJSDocTemplateTag(m)?t.delete(c,m):28===m.kind?u(t,c,m):_(m,t,c,g,y,!0)||d(c,m,t)||f(c,m,t,g,y,!0);break;case a:127===m.kind&&s(t,c,m);break;default:e.Debug.fail(JSON.stringify(r.fixId))}})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixUnreachableCode",n=[e.Diagnostics.Unreachable_code_detected.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n),o=e.findAncestor(a,e.isStatement);e.Debug.assert(o.getStart(r)===a.getStart(r));var s=(e.isBlock(o.parent)?o.parent:o).parent;if(!e.isBlock(o.parent)||o===e.first(o.parent.statements))switch(s.kind){case 222:if(s.elseStatement){if(e.isBlock(o.parent))break;return void t.replaceNode(r,o,e.createBlock(e.emptyArray))}case 224:case 225:return void t.delete(r,s)}if(e.isBlock(o.parent)){var c=n+i,u=e.Debug.assertDefined(function(e,t){for(var r,n=0,i=e;n<i.length;n++){var a=i[n];if(!t(a))break;r=a}return r}(e.sliceAfter(o.parent.statements,o),function(e){return e.pos<c}));t.deleteNodeRange(r,o,u)}else t.delete(r,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start,n.span.length)});return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unreachable_code,r,e.Diagnostics.Remove_all_unreachable_code)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){return i(e,t.file,t.start,t.length)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixUnusedLabel",n=[e.Diagnostics.Unused_label.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.cast(i.parent,e.isLabeledStatement),o=i.getStart(r),s=a.statement.getStart(r),c=e.positionsAreOnSameLine(o,s,r)?s:e.skipTrivia(r.text,e.findChildOfKind(a,57,r).end,!0);t.deleteRange(r,{pos:o,end:c})}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start)});return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unused_label,r,e.Diagnostics.Remove_all_unused_labels)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){return i(e,t.file,t.start)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r=[e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code];function n(e,t,r,n,i){e.replaceNode(t,r,i.typeToTypeNode(n,r))}function i(t,r,n){var i=e.findAncestor(e.getTokenAtPosition(t,r),a),o=i&&i.type;return o&&{typeNode:o,type:n.getTypeFromTypeNode(o)}}function a(e){switch(e.kind){case 212:case 160:case 161:case 239:case 158:case 162:case 181:case 156:case 155:case 151:case 154:case 153:case 159:case 242:case 194:case 237:return!0;default:return!1}}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,o=r.program.getTypeChecker(),s=i(a,r.span.start,o);if(s){var c=s.typeNode,u=s.type,l=c.getText(a),_=[d(u,"fixJSDocTypes_plain",e.Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)];return 291===c.kind&&_.push(d(o.getNullableType(u,32768),"fixJSDocTypes_nullable",e.Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),_}function d(i,s,u){var _=e.textChanges.ChangeTracker.with(r,function(e){return n(e,a,c,i,o)});return t.createCodeFixAction("jdocTypes",_,[e.Diagnostics.Change_0_to_1,l,o.typeToString(i)],s,u)}},fixIds:["fixJSDocTypes_plain","fixJSDocTypes_nullable"],getAllCodeActions:function(e){var a=e.fixId,o=e.program,s=e.sourceFile,c=o.getTypeChecker();return t.codeFixAll(e,r,function(e,t){var r=i(t.file,t.start,c);if(r){var o=r.typeNode,u=r.type,l=291===o.kind&&"fixJSDocTypes_nullable"===a?c.getNullableType(u,32768):u;n(e,s,o,l,c)}})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixAwaitInSyncFunction",n=[e.Diagnostics.await_expression_is_only_allowed_within_an_async_function.code,e.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator.code];function i(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingFunction(n);if(i){var a,o;switch(i.kind){case 156:a=i.name;break;case 239:case 196:a=e.findChildOfKind(i,90,t);break;case 197:a=e.findChildOfKind(i,20,t)||e.first(i.parameters);break;default:return}return a&&{insertBefore:a,returnType:(o=i,o.type?o.type:e.isVariableDeclaration(o.parent)&&o.parent.type&&e.isFunctionTypeNode(o.parent.type)?o.parent.type.type:void 0)}}}function a(t,r,n){var i=n.insertBefore,a=n.returnType;if(a){var o=e.getEntityNameFromTypeNode(a);o&&72===o.kind&&"Promise"===o.text||t.replaceNode(r,a,e.createTypeReferenceNode("Promise",e.createNodeArray([a])))}t.insertModifierBefore(r,121,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start);if(c){var u=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c)});return[t.createCodeFixAction(r,u,e.Diagnostics.Add_async_modifier_to_containing_function,r,e.Diagnostics.Add_all_missing_async_modifiers)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){var n=i(r.file,r.start);n&&a(t,e.sourceFile,n)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="disableJsDiagnostics",n=e.mapDefined(Object.keys(e.Diagnostics),function(t){var r=e.Diagnostics[t];return r.category===e.DiagnosticCategory.Error?r.code:void 0});function i(t,r,n,i){var a=e.getLineAndCharacterOfPosition(r,n).line;i&&!e.addToSeen(i,a)||t.insertCommentBeforeLine(r,a,n," @ts-ignore")}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.sourceFile,o=n.program,s=n.span,c=n.host,u=n.formatContext;if(e.isInJSFile(a)&&e.isCheckJsEnabledForFile(a,o.getCompilerOptions())){var l=[t.createCodeFixActionNoFixId("disableJsDiagnostics",[t.createFileTextChanges(a.fileName,[e.createTextChange(a.checkJsDirective?e.createTextSpanFromBounds(a.checkJsDirective.pos,a.checkJsDirective.end):e.createTextSpan(0,0),"// @ts-nocheck"+e.getNewLineOrDefaultFromHost(c,u.options))])],e.Diagnostics.Disable_checking_for_this_file)];return e.textChanges.isValidLocationToAddComment(a,s.start)&&l.unshift(t.createCodeFixAction("disableJsDiagnostics",e.textChanges.ChangeTracker.with(n,function(e){return i(e,a,s.start)}),e.Diagnostics.Ignore_this_error_message,r,e.Diagnostics.Add_ts_ignore_to_all_error_messages)),l}},fixIds:[r],getAllCodeActions:function(r){var a=e.createMap();return t.codeFixAll(r,n,function(t,r){e.textChanges.isValidLocationToAddComment(r.file,r.start)&&i(t,r.file,r.start,a)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){function r(t){return{trackSymbol:e.noop,moduleResolverHost:function(e){return{directoryExists:e.host.directoryExists?function(t){return e.host.directoryExists(t)}:void 0,fileExists:e.host.fileExists?function(t){return e.host.fileExists(t)}:void 0,getCurrentDirectory:e.host.getCurrentDirectory?function(){return e.host.getCurrentDirectory()}:void 0,readFile:e.host.readFile?function(t){return e.host.readFile(t)}:void 0,useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames?function(){return e.host.useCaseSensitiveFileNames()}:void 0,getSourceFiles:function(){return e.program.getSourceFiles()},getCommonSourceDirectory:function(){return e.program.getCommonSourceDirectory()}}}(t)}}function n(t,n,o,s,c){var u=t.getDeclarations();if(u&&u.length){var l=o.program.getTypeChecker(),_=u[0],d=e.getSynthesizedDeepClone(e.getNameOfDeclaration(_),!1),p=function(t){if(4&t)return e.createToken(115);if(16&t)return e.createToken(114);return}(e.getModifierFlags(_)),f=p?e.createNodeArray([p]):void 0,m=l.getWidenedType(l.getTypeOfSymbolAtLocation(t,n)),g=!!(16777216&t.flags);switch(_.kind){case 158:case 159:case 153:case 154:var y=l.typeToTypeNode(m,n,void 0,r(o));c(e.createProperty(void 0,f,d,g?e.createToken(56):void 0,y,void 0));break;case 155:case 156:var h=l.getSignaturesOfType(m,0);if(!e.some(h))break;if(1===u.length){e.Debug.assert(1===h.length),D(h[0],f,d,a(s));break}for(var v=0,b=h;v<b.length;v++){D(b[v],e.getSynthesizedDeepClones(f,!1),e.getSynthesizedDeepClone(d,!1))}if(u.length>h.length)D(l.getSignatureFromDeclaration(u[u.length-1]),f,d,a(s));else e.Debug.assert(u.length===h.length),c(function(t,r,n,o,s){for(var c=t[0],u=t[0].minArgumentCount,l=!1,_=0,d=t;_<d.length;_++){var p=d[_];u=Math.min(p.minArgumentCount,u),p.hasRestParameter&&(l=!0),p.parameters.length>=c.parameters.length&&(!p.hasRestParameter||c.hasRestParameter)&&(c=p)}var f=c.parameters.length-(c.hasRestParameter?1:0),m=c.parameters.map(function(e){return e.name}),g=i(f,m,void 0,u,!1);if(l){var y=e.createArrayTypeNode(e.createKeywordTypeNode(120)),h=e.createParameter(void 0,void 0,e.createToken(25),m[f]||"rest",f>=u?e.createToken(56):void 0,y,void 0);g.push(h)}return function(t,r,n,i,o,s,c){return e.createMethod(void 0,t,void 0,r,n?e.createToken(56):void 0,i,o,s,a(c))}(o,r,n,void 0,g,void 0,s)}(h,d,g,f,s))}}function D(t,i,a,s){var u=function(t,n,i,a,o,s,c){var u=t.program.getTypeChecker().signatureToSignatureDeclaration(n,156,i,257,r(t));if(!u)return;return u.decorators=void 0,u.modifiers=a,u.name=o,u.questionToken=s?e.createToken(56):void 0,u.body=c,u}(o,t,n,i,a,g,s);u&&c(u)}}function i(t,r,n,i,a){for(var o=[],s=0;s<t;s++){var c=e.createParameter(void 0,void 0,void 0,r&&r[s]||"arg"+s,void 0!==i&&s>=i?e.createToken(56):void 0,a?void 0:n&&n[s]||e.createKeywordTypeNode(120),void 0);o.push(c)}return o}function a(t){return e.createBlock([e.createThrow(e.createNew(e.createIdentifier("Error"),void 0,[e.createLiteral("Method not implemented.","single"===t.quotePreference)]))],!0)}function o(t,r){return e.createPropertyAssignment(e.createStringLiteral(t),r)}function s(t,r){return e.find(t.properties,function(t){return e.isPropertyAssignment(t)&&!!t.name&&e.isStringLiteral(t.name)&&t.name.text===r})}t.createMissingMemberNodes=function(e,t,r,i,a){for(var o=e.symbol.members,s=0,c=t;s<c.length;s++){var u=c[s];o.has(u.escapedName)||n(u,e,r,i,a)}},t.getNoopSymbolTrackerWithResolver=r,t.createMethodFromCallExpression=function(t,n,o,s,c,u,l){var _=!e.isInterfaceDeclaration(l),d=n.typeArguments,p=n.arguments,f=n.parent,m=t.program.getTypeChecker(),g=r(t),y=e.map(p,function(e){return m.typeToTypeNode(m.getBaseTypeOfLiteralType(m.getTypeAtLocation(e)),l,void 0,g)}),h=e.map(p,function(t){return e.isIdentifier(t)?t.text:e.isPropertyAccessExpression(t)?t.name.text:void 0}),v=m.getContextualType(n),b=s||!v?void 0:m.typeToTypeNode(v,l,void 0,g);return e.createMethod(void 0,c?[e.createToken(116)]:void 0,e.isYieldExpression(f)?e.createToken(40):void 0,o,void 0,s?void 0:e.map(d,function(t,r){return e.createTypeParameterDeclaration(84+d.length-1<=90?String.fromCharCode(84+r):"T"+r)}),i(p.length,h,y,void 0,s),b,_?a(u):void 0)},t.setJsonCompilerOptionValue=function(t,r,n,i){var a=e.getTsConfigObjectLiteralExpression(r);if(a){var c=s(a,"compilerOptions");if(void 0!==c){var u=c.initializer;if(e.isObjectLiteralExpression(u)){var l=s(u,n);void 0===l?t.insertNodeAtObjectStart(r,u,o(n,i)):t.replaceNode(r,l.initializer,i)}}else t.insertNodeAtObjectStart(r,a,o("compilerOptions",e.createObjectLiteral([o(n,i)])))}},t.createJsonPropertyAssignment=o,t.findJsonProperty=s}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="invalidImportSyntax";function n(n,i,a,o){var s=e.textChanges.ChangeTracker.with(n,function(e){return e.replaceNode(i,a,o)});return t.createCodeFixActionNoFixId(r,s,[e.Diagnostics.Replace_import_with_0,s[0].textChanges[0].newText])}function i(i,a){var o=i.program.getTypeChecker().getTypeAtLocation(a);if(!o.symbol||!o.symbol.originatingImport)return[];var s=[],c=o.symbol.originatingImport;if(e.isImportCall(c)||e.addRange(s,function(t,r){var i=e.getSourceFileOfNode(r),a=e.getNamespaceDeclarationNode(r),o=t.program.getCompilerOptions(),s=[];return s.push(n(t,i,r,e.makeImport(a.name,void 0,r.moduleSpecifier,e.getQuotePreference(i,t.preferences)))),e.getEmitModuleKind(o)===e.ModuleKind.CommonJS&&s.push(n(t,i,r,e.createImportEqualsDeclaration(void 0,void 0,a.name,e.createExternalModuleReference(r.moduleSpecifier)))),s}(i,c)),e.isExpression(a)&&(!e.isNamedDeclaration(a.parent)||a.parent.name!==a)){var u=i.sourceFile,l=e.textChanges.ChangeTracker.with(i,function(t){return t.replaceNode(u,a,e.createPropertyAccess(a,"default"),{})});s.push(t.createCodeFixActionNoFixId(r,l,e.Diagnostics.Use_synthetic_default_member))}return s}t.registerCodeFix({errorCodes:[e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures.code,e.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature.code],getCodeActions:function(t){var r=t.sourceFile,n=e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures.code===t.errorCode?191:192,a=e.findAncestor(e.getTokenAtPosition(r,t.span.start),function(e){return e.kind===n&&e.getStart()===t.span.start&&e.getEnd()===t.span.start+t.span.length});if(!a)return[];var o=a.expression;return i(t,o)}}),t.registerCodeFix({errorCodes:[e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,e.Diagnostics.Type_predicate_0_is_not_assignable_to_1.code,e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2.code,e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2.code,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1.code,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code,e.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,e.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(t){var r=t.sourceFile,n=e.findAncestor(e.getTokenAtPosition(r,t.span.start),function(e){return e.getStart()===t.span.start&&e.getEnd()===t.span.start+t.span.length});if(!n)return[];return i(t,n)}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="strictClassInitialization",n="addMissingPropertyDefiniteAssignmentAssertions",i="addMissingPropertyUndefinedType",a="addMissingPropertyInitializer",o=[e.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function s(t,r){var n=e.getTokenAtPosition(t,r);return e.isIdentifier(n)?e.cast(n.parent,e.isPropertyDeclaration):void 0}function c(t,r,n){var i=e.updateProperty(n,n.decorators,n.modifiers,n.name,e.createToken(52),n.type,n.initializer);t.replaceNode(r,n,i)}function u(t,r,n){var i=e.createKeywordTypeNode(141),a=n.type,o=e.isUnionTypeNode(a)?a.types.concat(i):[a,i];t.replaceNode(r,a,e.createUnionTypeNode(o))}function l(t,r,n,i){var a=e.updateProperty(n,n.decorators,n.modifiers,n.name,n.questionToken,n.type,i);t.replaceNode(r,n,a)}function _(t,r){return function t(r,n){if(512&n.flags)return n===r.getFalseType()||n===r.getFalseType(!0)?e.createFalse():e.createTrue();if(n.isLiteral())return e.createLiteral(n.value);if(n.isUnion())return e.firstDefined(n.types,function(e){return t(r,e)});if(n.isClass()){var i=e.getClassLikeDeclarationOfSymbol(n.symbol);if(!i||e.hasModifier(i,128))return;var a=e.getFirstConstructorWithBody(i);if(a&&a.parameters.length)return;return e.createNew(e.createIdentifier(n.symbol.name),void 0,void 0)}if(r.isArrayLikeType(n))return e.createArrayLiteral();return}(t,t.getTypeFromTypeNode(r.type))}t.registerCodeFix({errorCodes:o,getCodeActions:function(o){var d=s(o.sourceFile,o.span.start);if(d){var p=[function(n,a){var o=e.textChanges.ChangeTracker.with(n,function(e){return u(e,n.sourceFile,a)});return t.createCodeFixAction(r,o,[e.Diagnostics.Add_undefined_type_to_property_0,a.name.getText()],i,e.Diagnostics.Add_undefined_type_to_all_uninitialized_properties)}(o,d),function(i,a){var o=e.textChanges.ChangeTracker.with(i,function(e){return c(e,i.sourceFile,a)});return t.createCodeFixAction(r,o,[e.Diagnostics.Add_definite_assignment_assertion_to_property_0,a.getText()],n,e.Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties)}(o,d)];return e.append(p,function(n,i){var o=_(n.program.getTypeChecker(),i);if(!o)return;var s=e.textChanges.ChangeTracker.with(n,function(e){return l(e,n.sourceFile,i,o)});return t.createCodeFixAction(r,s,[e.Diagnostics.Add_initializer_to_property_0,i.name.getText()],a,e.Diagnostics.Add_initializers_to_all_uninitialized_properties)}(o,d)),p}},fixIds:[n,i,a],getAllCodeActions:function(r){return t.codeFixAll(r,o,function(t,o){var d=s(o.file,o.start);if(d)switch(r.fixId){case n:c(t,o.file,d);break;case i:u(t,o.file,d);break;case a:var p=_(r.program.getTypeChecker(),d);if(!p)return;l(t,o.file,d,p);break;default:e.Debug.fail(JSON.stringify(r.fixId))}})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){function t(t,n,i,a){return r(e.inspectValue(t,n),i,a)}function r(t,r,n){return void 0===n&&(n=0),e.textChanges.getNewFileText(a(t,n),3,r.newLineCharacter||"\n",e.formatting.getFormatContext(r))}var n;function i(e){return a(e,2)}function a(t,r){var n="default"===t.name,l=n?"_default":t.name;if(!m(l)||n&&1!==r)return e.emptyArray;var d=n&&2===t.kind?[e.createModifier(85),e.createModifier(80)]:3===r||0===r?[e.createModifier(125)]:1===r?[e.createModifier(85)]:void 0,v=function(){return 0===r?[o(t.name,!0)]:e.emptyArray},b=function(){return n?[o("_default",!1)]:e.emptyArray};switch(t.kind){case 2:return v().concat(function(t,r,n){var i=n.source,o=n.prototypeMembers,l=n.namespaceMembers,d=_(i),v=void 0===d?{parameters:e.emptyArray,returnType:y()}:u(d),b=v.parameters,D=v.returnType,x=e.createMap();"object"===f(d)&&function(t,r){p(t,function(t){if(e.isAssignmentExpression(t,!0)&&e.isPropertyAccessExpression(t.left)&&100===t.left.expression.kind){var n=t.left.name.text;e.isJsPrivate(n)||e.getOrUpdate(r,n,function(){return e.createProperty(void 0,void 0,n,void 0,y(),void 0)})}})}(d,x);for(var S=0,T=o;S<T.length;S++){var C=T[S];if(2===C.kind){var E=s(C);E&&x.set(C.name,E)}}var k=0!==x.size||void 0===d||"number"!=typeof d&&157===d.kind?[]:void 0,N=e.flatMap(l,function(t){if(m(t.name)){if(k)switch(t.kind){case 3:if(t.members.some(function(e){return 2===e.kind}))break;case 1:case 0:return void k.push(g(e.createProperty(void 0,[e.createModifier(116)],t.name,void 0,c(t),void 0),0===t.kind?t.comment:void 0));case 2:if(!t.namespaceMembers.length){var r=s(t,[e.createModifier(116)]);if(r)return void k.push(r)}break;default:e.Debug.assertNever(t)}return a(t,2)}});return[k?e.createClassDeclaration(void 0,t,r,void 0,void 0,k.concat(b.length?[e.createConstructor(void 0,void 0,b,void 0)]:e.emptyArray,e.arrayFrom(x.values()))):e.createFunctionDeclaration(void 0,t,void 0,r,void 0,b,D,void 0)].concat(0===N.length?e.emptyArray:[h(t&&t.map(function(t){return e.getSynthesizedDeepClone(t)}),r,N)])}(d,l,t));case 3:var D=t.members;if(!t.hasNontrivialPrototype){if(0===r)return e.flatMap(D,function(e){return a(e,1)});if(D.some(function(e){return 2===e.kind}))return b().concat([h(d,l,e.flatMap(D,i))])}case 0:case 1:var x=0===t.kind?t.comment:void 0,S=e.createVariableStatement(d,e.createVariableDeclarationList([e.createVariableDeclaration(l,c(t))],2));return v().concat(b(),[g(S,x)]);default:return e.Debug.assertNever(t)}}function o(t,r){return e.createExportAssignment(void 0,void 0,r,e.createIdentifier(t))}function s(t,r){var n=t.name,i=t.source;if(m(n)){var a=_(i);if(void 0!==a&&("number"==typeof a||157!==a.kind)){var o=u(a);return o&&e.createMethod(void 0,r,void 0,n,void 0,void 0,o.parameters,o.returnType,void 0)}}}function c(t){switch(t.kind){case 0:return e.createTypeReferenceNode(t.typeName,void 0);case 1:return e.createArrayTypeNode(c(t.inner));case 2:return e.createTypeReferenceNode("Function",void 0);case 3:return e.createTypeLiteralNode(t.members.map(function(t){return e.createPropertySignature(void 0,(r=t.name,e.isIdentifierText(r,7)?e.createIdentifier(r):e.createStringLiteral(r)),void 0,c(t),void 0);var r}));default:return e.Debug.assertNever(t)}}function u(t){if("number"==typeof t)return{parameters:e.fill(t,function(e){return l("p"+e,y())}),returnType:y()};var r=!1,n=!1;return p(t,function(t){r=r||e.isIdentifier(t)&&"arguments"===t.text,n=n||e.isReturnStatement(t)&&!!t.expression&&200!==t.expression.kind}),{parameters:t.parameters.map(function(e){return l(""+e.name.getText(),y())}).concat(r?[e.createParameter(void 0,void 0,e.createToken(25),"args",void 0,e.createArrayTypeNode(y()))]:e.emptyArray),returnType:n?y():e.createKeywordTypeNode(106)}}function l(t,r){return e.createParameter(void 0,void 0,void 0,t,void 0,r)}function _(t){if("number"==typeof t)return t;var r=e.tryCast(d(t),function(t){return e.isFunctionExpression(t)||e.isArrowFunction(t)||e.isClassExpression(t)});return r?e.isClassExpression(r)?e.find(r.members,e.isConstructorDeclaration):r:e.cast(e.first(e.cast(d("{ "+t+" }"),e.isObjectLiteralExpression).properties),e.isMethodDeclaration)}function d(t){var r="const _ = "+t,n=e.createSourceFile("test.ts",r,7,!0);return e.first(e.cast(e.first(n.statements),e.isVariableStatement).declarationList.declarations).initializer}function p(t,r){t.body.forEachChild(function t(n){r(n),e.isFunctionLike(n)||n.forEachChild(t)})}function m(t){var r=e.stringToToken(t);return!(r&&e.isNonContextualKeyword(r))&&e.isIdentifierText(t,7)}function g(t,r){return void 0!==r&&e.addSyntheticLeadingComment(t,2,r),t}function y(){return e.createKeywordTypeNode(120)}function h(t,r,n){return e.createModuleDeclaration(void 0,t,e.createIdentifier(r),e.createModuleBlock(n),16)}e.generateTypesForModule=function(e,r,n){return t(e,r,n,0)},e.generateTypesForGlobal=function(e,r,n){return t(e,r,n,3)},e.valueInfoToDeclarationFileText=r,function(e){e[e.ExportEquals=0]="ExportEquals",e[e.NamedExport=1]="NamedExport",e[e.NamespaceMember=2]="NamespaceMember",e[e.Global=3]="Global"}(n||(n={}))}(c||(c={})),function(e){!function(t){var r="requireInTs",n=[e.Diagnostics.require_call_may_be_converted_to_an_import.code];function i(t,r,n,i){var a=function(t,r){var n=e.getTokenAtPosition(t,r).parent;if(!e.isRequireCall(n,!0))throw e.Debug.failBadSyntaxKind(n);var i=e.cast(n.parent,e.isVariableDeclaration);return{statement:e.cast(i.parent.parent,e.isVariableStatement),name:e.cast(i.name,e.isIdentifier),required:n.arguments[0]}}(r,n),o=a.statement,s=a.name,c=a.required;t.replaceNode(r,o,e.getAllowSyntheticDefaultImports(i.getCompilerOptions())?e.createImportDeclaration(void 0,void 0,e.createImportClause(s,void 0),c):e.createImportEqualsDeclaration(void 0,void 0,s,e.createExternalModuleReference(c)))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,function(e){return i(e,n.sourceFile,n.span.start,n.program)});return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_require_to_import,r,e.Diagnostics.Convert_all_require_to_import)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return i(t,r.file,r.start,e.program)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="useDefaultImport",n=[e.Diagnostics.Import_may_be_converted_to_a_default_import.code];function i(t,r){var n=e.getTokenAtPosition(t,r);if(e.isIdentifier(n)){var i=n.parent;if(e.isImportEqualsDeclaration(i)&&e.isExternalModuleReference(i.moduleReference))return{importNode:i,name:n,moduleSpecifier:i.moduleReference.expression};if(e.isNamespaceImport(i)){var a=i.parent.parent;return{importNode:a,name:n,moduleSpecifier:a.moduleSpecifier}}}}function a(t,r,n,i){t.replaceNode(r,n.importNode,e.makeImport(n.name,void 0,n.moduleSpecifier,e.getQuotePreference(r,i)))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span.start,c=i(o,s);if(c){var u=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c,n.preferences)});return[t.createCodeFixAction(r,u,e.Diagnostics.Convert_to_default_import,r,e.Diagnostics.Convert_all_to_default_imports)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){var n=i(r.file,r.start);n&&a(t,r.file,n,e.preferences)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixAddModuleReferTypeMissingTypeof",n=[e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.Debug.assert(92===n.kind),e.Debug.assert(183===n.parent.kind),n.parent}function a(t,r,n){var i=e.updateImportTypeNode(n,n.argument,n.qualifier,n.typeArguments,!0);t.replaceNode(r,n,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start),u=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c)});return[t.createCodeFixAction(r,u,e.Diagnostics.Add_missing_typeof,r,e.Diagnostics.Add_missing_typeof)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(t,r){return a(t,e.sourceFile,i(r.file,r.start))})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){var r="fixConvertToMappedObjectType",n=[e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead.code];function i(t,r){var n=e.getTokenAtPosition(t,r),i=e.cast(n.parent.parent,e.isIndexSignatureDeclaration);if(!e.isClassDeclaration(i.parent))return{indexSignature:i,container:e.isInterfaceDeclaration(i.parent)?i.parent:e.cast(i.parent.parent,e.isTypeAliasDeclaration)}}function a(t,r,n){var i,a,o=n.indexSignature,s=n.container,c=(e.isInterfaceDeclaration(s)?s.members:s.type.members).filter(function(t){return!e.isIndexSignatureDeclaration(t)}),u=e.first(o.parameters),l=e.createTypeParameterDeclaration(e.cast(u.name,e.isIdentifier),u.type),_=e.createMappedTypeNode(e.hasReadonlyModifier(o)?e.createModifier(133):void 0,l,o.questionToken,o.type),d=e.createIntersectionTypeNode(e.getAllSuperTypeNodes(s).concat([_],c.length?[e.createTypeLiteralNode(c)]:e.emptyArray));t.replaceNode(r,s,(i=s,a=d,e.createTypeAliasDeclaration(i.decorators,i.modifiers,i.name,i.typeParameters,a)))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start);if(c){var u=e.textChanges.ChangeTracker.with(n,function(e){return a(e,o,c)}),l=e.idText(c.container.name);return[t.createCodeFixAction(r,u,[e.Diagnostics.Convert_0_to_mapped_object_type,l],r,[e.Diagnostics.Convert_0_to_mapped_object_type,l])]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,function(e,t){var r=i(t.file,t.start);r&&a(e,t.file,r)})}})}(e.codefix||(e.codefix={}))}(c||(c={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&(e.isSourceFile(a.parent)||e.isModuleBlock(a.parent)&&e.isAmbientModule(a.parent.parent))){var o=e.isSourceFile(a.parent)?a.parent.symbol:a.parent.parent.symbol,s=e.getModifierFlags(a),c=!!(512&s);if(1&s&&(c||!o.exports.has("default")))switch(a.kind){case 239:case 240:case 241:case 243:case 242:case 244:var u=a;return u.name&&e.isIdentifier(u.name)?{exportNode:u,exportName:u.name,wasDefault:c,exportingModuleSymbol:o}:void 0;case 219:var l=a;if(!(2&l.declarationList.flags)||1!==l.declarationList.declarations.length)return;var _=e.first(l.declarationList.declarations);if(!_.initializer)return;return e.Debug.assert(!c),e.isIdentifier(_.name)?{exportNode:l,exportName:_.name,wasDefault:c,exportingModuleSymbol:o}:void 0;default:return}}}function n(t,r){return e.createImportSpecifier(t===r?void 0:e.createIdentifier(t),e.createIdentifier(r))}t.registerRefactor("Convert export",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=n.wasDefault?e.Diagnostics.Convert_default_export_to_named_export.message:e.Diagnostics.Convert_named_export_to_default_export.message;return[{name:"Convert export",description:i,actions:[{name:n.wasDefault?"Convert default export to named export":"Convert named export to default export",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert default export to named export"===i||"Convert named export to default export"===i),{edits:e.textChanges.ChangeTracker.with(t,function(i){return a=t.file,o=t.program,s=e.Debug.assertDefined(r(t)),c=i,u=t.cancellationToken,function(t,r,n,i){var a=r.wasDefault,o=r.exportNode,s=r.exportName;if(a)n.delete(t,e.Debug.assertDefined(e.findModifier(o,80)));else{var c=e.Debug.assertDefined(e.findModifier(o,85));switch(o.kind){case 239:case 240:case 241:n.insertNodeAfter(t,c,e.createToken(80));break;case 219:if(!e.FindAllReferences.Core.isSymbolReferencedInFile(s,i,t)){n.replaceNode(t,o,e.createExportDefault(e.Debug.assertDefined(e.first(o.declarationList.declarations).initializer)));break}case 243:case 242:case 244:n.deleteModifier(t,c),n.insertNodeAfter(t,o,e.createExportDefault(e.createIdentifier(s.text)));break;default:e.Debug.assertNever(o)}}}(a,s,c,o.getTypeChecker()),void function(t,r,i,a){var o=r.wasDefault,s=r.exportName,c=r.exportingModuleSymbol,u=t.getTypeChecker(),l=e.Debug.assertDefined(u.getSymbolAtLocation(s));e.FindAllReferences.Core.eachExportReference(t.getSourceFiles(),u,a,l,c,s.text,o,function(t){var r=t.getSourceFile();o?function(t,r,i,a){var o=r.parent;switch(o.kind){case 189:i.replaceNode(t,r,e.createIdentifier(a));break;case 253:case 257:var s=o;i.replaceNode(t,s,n(a,s.name.text));break;case 250:var c=o;e.Debug.assert(c.name===r);var s=n(a,r.text),u=c.namedBindings;if(u)if(251===u.kind){i.deleteRange(t,{pos:r.getStart(t),end:u.getStart(t)});var l=e.isStringLiteral(c.parent.moduleSpecifier)?e.quotePreferenceFromString(c.parent.moduleSpecifier,t):1,_=e.makeImport(void 0,[n(a,r.text)],c.parent.moduleSpecifier,l);i.insertNodeAfter(t,c.parent,_)}else i.delete(t,r),i.insertNodeAtEndOfList(t,u.elements,s);else i.replaceNode(t,r,e.createNamedImports([s]));break;default:e.Debug.failBadSyntaxKind(o)}}(r,t,i,s.text):function(t,r,n){var i,a,o=r.parent;switch(o.kind){case 189:n.replaceNode(t,r,e.createIdentifier("default"));break;case 253:var s=e.createIdentifier(o.name.text);1===o.parent.elements.length?n.replaceNode(t,o.parent,s):(n.delete(t,o),n.insertNodeBefore(t,o.parent,s));break;case 257:n.replaceNode(t,o,(i="default",a=o.name.text,e.createExportSpecifier(i===a?void 0:e.createIdentifier(i),e.createIdentifier(a))));break;default:e.Debug.assertNever(o)}}(r,t,i)})}(o,s,c,u);var a,o,s,c,u}),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&e.isImportDeclaration(a)){var o=a.importClause;return o&&o.namedBindings}}function n(t,r,n){return e.createImportDeclaration(void 0,void 0,e.createImportClause(r,n&&n.length?e.createNamedImports(n):void 0),t.moduleSpecifier)}t.registerRefactor("Convert import",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=251===n.kind?e.Diagnostics.Convert_namespace_import_to_named_imports.message:e.Diagnostics.Convert_named_imports_to_namespace_import.message;return[{name:"Convert import",description:i,actions:[{name:251===n.kind?"Convert namespace import to named imports":"Convert named imports to namespace import",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert namespace import to named imports"===i||"Convert named imports to namespace import"===i),{edits:e.textChanges.ChangeTracker.with(t,function(i){return a=t.file,o=t.program,s=i,c=e.Debug.assertDefined(r(t)),u=o.getTypeChecker(),void(251===c.kind?function(t,r,i,a,o){var s=!1,c=[],u=e.createMap();e.FindAllReferences.Core.eachSymbolReferenceInFile(a.name,r,t,function(t){if(e.isPropertyAccessExpression(t.parent)){var n=e.cast(t.parent,e.isPropertyAccessExpression),i=n.name.text;r.resolveName(i,t,67108863,!0)&&u.set(i,!0),e.Debug.assert(n.expression===t),c.push(n)}else s=!0});for(var l=e.createMap(),_=0,d=c;_<d.length;_++){var p=d[_],f=p.name.text,m=l.get(f);void 0===m&&l.set(f,m=u.has(f)?e.getUniqueName(f,t):f),i.replaceNode(t,p,e.createIdentifier(m))}var g=[];l.forEach(function(t,r){g.push(e.createImportSpecifier(t===r?void 0:e.createIdentifier(r),e.createIdentifier(t)))});var y=a.parent.parent;s&&!o?i.insertNodeAfter(t,y,n(y,void 0,g)):i.replaceNode(t,y,n(y,s?e.createIdentifier(a.name.text):void 0,g))}(a,u,s,c,e.getAllowSyntheticDefaultImports(o.getCompilerOptions())):function(t,r,i,a){for(var o=a.parent.parent,s=o.moduleSpecifier,c=s&&e.isStringLiteral(s)?e.codefix.moduleSpecifierToValidIdentifier(s.text,7):"module",u=a.elements.some(function(n){return e.FindAllReferences.Core.eachSymbolReferenceInFile(n.name,r,t,function(e){return!!r.resolveName(c,e,67108863,!0)})||!1})?e.getUniqueName(c,t):c,l=[],_=function(n){var a=(n.propertyName||n.name).text;e.FindAllReferences.Core.eachSymbolReferenceInFile(n.name,r,t,function(r){var o=e.createPropertyAccess(e.createIdentifier(u),a);e.isShorthandPropertyAssignment(r.parent)?i.replaceNode(t,r.parent,e.createPropertyAssignment(r.text,o)):e.isExportSpecifier(r.parent)&&!r.parent.propertyName?l.some(function(e){return e.name===n.name})||l.push(e.createImportSpecifier(n.propertyName&&e.createIdentifier(n.propertyName.text),e.createIdentifier(n.name.text))):i.replaceNode(t,r,o)})},d=0,p=a.elements;d<p.length;d++){var f=p[d];_(f)}i.replaceNode(t,a,e.createNamespaceImport(e.createIdentifier(u))),l.length&&i.insertNodeAfter(t,a.parent.parent,n(o,void 0,l))}(a,u,s,c));var a,o,s,c,u}),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){!function(r){var n,i,a,o,s="Extract Symbol";function c(t){var r=l(t.file,e.getRefactorContextSpan(t)).targetRange;if(void 0===r)return e.emptyArray;var n=function(t,r){var n=d(t,r),i=n.scopes,a=n.readsAndWrites,o=a.functionErrorsPerScope,s=a.constantErrorsPerScope;return i.map(function(t,r){var n,i,a=function(t){return e.isFunctionLikeDeclaration(t)?"inner function":e.isClassLike(t)?"method":"function"}(t),c=function(t){return e.isClassLike(t)?"readonly field":"constant"}(t),u=e.isFunctionLikeDeclaration(t)?function(t){switch(t.kind){case 157:return"constructor";case 196:case 239:return t.name?"function '"+t.name.text+"'":"anonymous function";case 197:return"arrow function";case 156:return"method '"+t.name.getText()+"'";case 158:return"'get "+t.name.getText()+"'";case 159:return"'set "+t.name.getText()+"'";default:throw e.Debug.assertNever(t)}}(t):e.isClassLike(t)?function(e){return 240===e.kind?e.name?"class '"+e.name.text+"'":"anonymous class declaration":e.name?"class expression '"+e.name.text+"'":"anonymous class expression"}(t):function(e){return 245===e.kind?"namespace '"+e.parent.name.getText()+"'":e.externalModuleIndicator?0:1}(t);return 1===u?(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"global"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[c,"global"])):0===u?(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"module"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[c,"module"])):(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[a,u]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[c,u])),0!==r||e.isClassLike(t)||(i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_enclosing_scope),[c])),{functionExtraction:{description:n,errors:o[r]},constantExtraction:{description:i,errors:s[r]}}})}(r,t);if(void 0===n)return e.emptyArray;for(var i=[],a=e.createMap(),o=[],c=e.createMap(),u=0,_=0,p=n;_<p.length;_++){var f=p[_],m=f.functionExtraction,g=f.constantExtraction;if(0===m.errors.length){var y=m.description;a.has(y)||(a.set(y,!0),i.push({description:y,name:"function_scope_"+u}))}if(0===g.errors.length){y=g.description;c.has(y)||(c.set(y,!0),o.push({description:y,name:"constant_scope_"+u}))}u++}var h=[];return i.length&&h.push({name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_function),actions:i}),o.length&&h.push({name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_constant),actions:o}),h.length?h:e.emptyArray}function u(t,r){var n=l(t.file,e.getRefactorContextSpan(t)).targetRange,a=/^function_scope_(\d+)$/.exec(r);if(a){var o=+a[1];return e.Debug.assert(isFinite(o),"Expected to parse a finite number from the function scope index"),function(t,r,n){var a=d(t,r),o=a.scopes,s=a.readsAndWrites,c=s.target,u=s.usagesPerScope,l=s.functionErrorsPerScope,_=s.exposedVariableDeclarations;return e.Debug.assert(!l[n].length,"The extraction went missing? How?"),r.cancellationToken.throwIfCancellationRequested(),function(t,r,n,a,o,s){var c,u,l=n.usages,_=n.typeParameterUsages,d=n.substitutions,g=s.program.getTypeChecker(),y=r.getSourceFile(),h=e.getUniqueName(e.isClassLike(r)?"newMethod":"newFunction",y),v=e.isInJSFile(r),b=e.createIdentifier(h),D=[],x=[];l.forEach(function(t,n){var i;if(!v){var a=g.getTypeOfSymbolAtLocation(t.symbol,t.node);a=g.getBaseTypeOfLiteralType(a),i=g.typeToTypeNode(a,r,1)}var o=e.createParameter(void 0,void 0,void 0,n,void 0,i);D.push(o),2===t.usage&&(u||(u=[])).push(t),x.push(e.createIdentifier(n))});var S=e.arrayFrom(_.values()).map(function(e){return{type:e,declaration:function(e){var t,r=e.symbol;if(r&&r.declarations)for(var n=0,i=r.declarations;n<i.length;n++){var a=i[n];(void 0===t||a.pos<t.pos)&&(t=a)}return t}(e)}}).sort(p),T=0===S.length?void 0:S.map(function(e){return e.declaration}),C=void 0!==T?T.map(function(t){return e.createTypeReferenceNode(t.name,void 0)}):void 0;if(e.isExpression(t)&&!v){var E=g.getContextualType(t);c=g.typeToTypeNode(E,r,1)}var k,N=function(t,r,n,i,a){var o,s=void 0!==n||r.length>0;if(e.isBlock(t)&&!s&&0===i.size)return{body:e.createBlock(t.statements,!0),returnValueProperty:void 0};var c=!1,u=e.createNodeArray(e.isBlock(t)?t.statements.slice(0):[e.isStatement(t)?t:e.createReturn(t)]);if(s||i.size){var l=e.visitNodes(u,function t(a){if(!c&&230===a.kind&&s){var u=f(r,n);return a.expression&&(o||(o="__return"),u.unshift(e.createPropertyAssignment(o,e.visitNode(a.expression,t)))),1===u.length?e.createReturn(u[0].name):e.createReturn(e.createObjectLiteral(u))}var l=c;c=c||e.isFunctionLikeDeclaration(a)||e.isClassLike(a);var _=i.get(e.getNodeId(a).toString()),d=_?e.getSynthesizedDeepClone(_):e.visitEachChild(a,t,e.nullTransformationContext);return c=l,d}).slice();if(s&&!a&&e.isStatement(t)){var _=f(r,n);1===_.length?l.push(e.createReturn(_[0].name)):l.push(e.createReturn(e.createObjectLiteral(_)))}return{body:e.createBlock(l,!0),returnValueProperty:o}}return{body:e.createBlock(u,!0),returnValueProperty:void 0}}(t,a,u,d,!!(o.facts&i.HasReturn)),A=N.body,F=N.returnValueProperty;if(e.suppressLeadingAndTrailingTrivia(A),e.isClassLike(r)){var P=v?[]:[e.createToken(113)];o.facts&i.InStaticRegion&&P.push(e.createToken(116)),o.facts&i.IsAsyncFunction&&P.push(e.createToken(121)),k=e.createMethod(void 0,P.length?P:void 0,o.facts&i.IsGenerator?e.createToken(40):void 0,b,void 0,T,D,c,A)}else k=e.createFunctionDeclaration(void 0,o.facts&i.IsAsyncFunction?[e.createToken(121)]:void 0,o.facts&i.IsGenerator?e.createToken(40):void 0,b,T,D,c,A);var w=e.textChanges.ChangeTracker.fromContext(s),I=function(t,r){return e.find(function(t){if(e.isFunctionLikeDeclaration(t)){var r=t.body;if(e.isBlock(r))return r.statements}else{if(e.isModuleBlock(t)||e.isSourceFile(t))return t.statements;if(e.isClassLike(t))return t.members;e.assertType(t)}return e.emptyArray}(r),function(r){return r.pos>=t&&e.isFunctionLikeDeclaration(r)&&!e.isConstructorDeclaration(r)})}((m(o.range)?e.last(o.range):o.range).end,r);I?w.insertNodeBefore(s.file,I,k,!0):w.insertNodeAtEndOfScope(s.file,r,k);var O=[],M=function(t,r,n){var a=e.createIdentifier(n);if(e.isClassLike(t)){var o=r.facts&i.InStaticRegion?e.createIdentifier(t.name.text):e.createThis();return e.createPropertyAccess(o,a)}return a}(r,o,h),L=e.createCall(M,C,x);if(o.facts&i.IsGenerator&&(L=e.createYield(e.createToken(40),L)),o.facts&i.IsAsyncFunction&&(L=e.createAwait(L)),a.length&&!u)if(e.Debug.assert(!F),e.Debug.assert(!(o.facts&i.HasReturn)),1===a.length){var R=a[0];O.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(R.name),e.getSynthesizedDeepClone(R.type),L)],R.parent.flags)))}else{for(var B=[],j=[],J=a[0].parent.flags,z=!1,K=0,U=a;K<U.length;K++){var R=U[K];B.push(e.createBindingElement(void 0,void 0,e.getSynthesizedDeepClone(R.name)));var V=g.typeToTypeNode(g.getBaseTypeOfLiteralType(g.getTypeAtLocation(R)),r,1);j.push(e.createPropertySignature(void 0,R.symbol.name,void 0,V,void 0)),z=z||void 0!==R.type,J&=R.parent.flags}var q=z?e.createTypeLiteralNode(j):void 0;q&&e.setEmitFlags(q,1),O.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createObjectBindingPattern(B),q,L)],J)))}else if(a.length||u){if(a.length)for(var W=0,H=a;W<H.length;W++){var R=H[W],G=R.parent.flags;2&G&&(G=-3&G|1),O.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(R.symbol.name,Z(R.type))],G)))}F&&O.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(F,Z(c))],1)));var Y=f(a,u);F&&Y.unshift(e.createShorthandPropertyAssignment(F)),1===Y.length?(e.Debug.assert(!F),O.push(e.createStatement(e.createAssignment(Y[0].name,L))),o.facts&i.HasReturn&&O.push(e.createReturn())):(O.push(e.createStatement(e.createAssignment(e.createObjectLiteral(Y),L))),F&&O.push(e.createReturn(e.createIdentifier(F))))}else o.facts&i.HasReturn?O.push(e.createReturn(L)):m(o.range)?O.push(e.createStatement(L)):O.push(L);m(o.range)?w.replaceNodeRangeWithNodes(s.file,e.first(o.range),e.last(o.range),O):w.replaceNodeWithNodes(s.file,o.range,O);var X=w.getChanges(),Q=(m(o.range)?e.first(o.range):o.range).getSourceFile().fileName,$=e.getRenameLocation(X,Q,h,!1);return{renameFilename:Q,renameLocation:$,edits:X};function Z(t){if(void 0!==t){for(var r=e.getSynthesizedDeepClone(t),n=r;e.isParenthesizedTypeNode(n);)n=n.type;return e.isUnionTypeNode(n)&&e.find(n.types,function(e){return 141===e.kind})?r:e.createUnionTypeNode([r,e.createKeywordTypeNode(141)])}}}(c,o[n],u[n],_,t,r)}(n,t,o)}var s=/^constant_scope_(\d+)$/.exec(r);if(s){o=+s[1];return e.Debug.assert(isFinite(o),"Expected to parse a finite number from the constant scope index"),function(t,r,n){var a=d(t,r),o=a.scopes,s=a.readsAndWrites,c=s.target,u=s.usagesPerScope,l=s.constantErrorsPerScope,p=s.exposedVariableDeclarations;return e.Debug.assert(!l[n].length,"The extraction went missing? How?"),e.Debug.assert(0===p.length,"Extract constant accepted a range containing a variable declaration?"),r.cancellationToken.throwIfCancellationRequested(),function(t,r,n,a,o){var s=n.substitutions,c=o.program.getTypeChecker(),u=r.getSourceFile(),l=e.getUniqueName(e.isClassLike(r)?"newProperty":"newLocal",u),d=e.isInJSFile(r),p=d||!c.isContextSensitive(t)?void 0:c.typeToTypeNode(c.getContextualType(t),r,1),f=function(t,r){return r.size?function t(n){var i=r.get(e.getNodeId(n).toString());return i?e.getSynthesizedDeepClone(i):e.visitEachChild(n,t,e.nullTransformationContext)}(t):t}(t,s);e.suppressLeadingAndTrailingTrivia(f);var m=e.textChanges.ChangeTracker.fromContext(o);if(e.isClassLike(r)){e.Debug.assert(!d);var y=[];y.push(e.createToken(113)),a&i.InStaticRegion&&y.push(e.createToken(116)),y.push(e.createToken(133));var h=e.createProperty(void 0,y,l,void 0,p,f),v=e.createPropertyAccess(a&i.InStaticRegion?e.createIdentifier(r.name.getText()):e.createThis(),e.createIdentifier(l)),b=t.pos,D=function(t,r){var n,i=r.members;e.Debug.assert(i.length>0);for(var a=!0,o=0,s=i;o<s.length;o++){var c=s[o];if(c.pos>t)return n||i[0];if(a&&!e.isPropertyDeclaration(c)){if(void 0!==n)return c;a=!1}n=c}return void 0===n?e.Debug.fail():n}(b,r);m.insertNodeBefore(o.file,D,h,!0),m.replaceNode(o.file,t,v)}else{var x=e.createVariableDeclaration(l,p,f),S=function(t,r){for(var n;void 0!==t&&t!==r;){if(e.isVariableDeclaration(t)&&t.initializer===n&&e.isVariableDeclarationList(t.parent)&&t.parent.declarations.length>1)return t;n=t,t=t.parent}}(t,r);if(S){m.insertNodeBefore(o.file,S,x);var v=e.createIdentifier(l);m.replaceNode(o.file,t,v)}else if(221===t.parent.kind&&r===e.findAncestor(t,_)){var T=e.createVariableStatement(void 0,e.createVariableDeclarationList([x],2));m.replaceNode(o.file,t.parent,T)}else{var T=e.createVariableStatement(void 0,e.createVariableDeclarationList([x],2)),D=function(t,r){var n;e.Debug.assert(!e.isClassLike(r));for(var i=t;i!==r;i=i.parent)_(i)&&(n=i);for(var i=(n||t).parent;;i=i.parent){if(g(i)){for(var a=void 0,o=0,s=i.statements;o<s.length;o++){var c=s[o];if(c.pos>t.pos)break;a=c}return!a&&e.isCaseClause(i)?(e.Debug.assert(e.isSwitchStatement(i.parent.parent)),i.parent.parent):e.Debug.assertDefined(a)}e.Debug.assert(i!==r,"Didn't encounter a block-like before encountering scope")}}(t,r);if(0===D.pos?m.insertNodeAtTopOfFile(o.file,T,!1):m.insertNodeBefore(o.file,D,T,!1),221===t.parent.kind)m.delete(o.file,t.parent);else{var v=e.createIdentifier(l);m.replaceNode(o.file,t,v)}}}var C=m.getChanges(),E=t.getSourceFile().fileName,k=e.getRenameLocation(C,E,l,!0);return{renameFilename:E,renameLocation:k,edits:C}}(e.isExpression(c)?c:c.statements[0].expression,o[n],u[n],t.facts,r)}(n,t,o)}e.Debug.fail("Unrecognized action name")}function l(t,r){var a=r.length;if(0===a)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractEmpty)]};var o=e.getParentNodeInSpan(e.getTokenAtPosition(t,r.start),t,r),s=e.getParentNodeInSpan(e.findTokenOnLeftOfPosition(t,e.textSpanEnd(r)),t,r),c=[],u=i.None;if(!o||!s)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o.parent!==s.parent)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o!==s){if(!g(o.parent))return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};for(var l=[],_=0,d=o.parent.statements;_<d.length;_++){var p=d[_];if(p===o||l.length){var f=h(p);if(f)return{errors:f};l.push(p)}if(p===s)break}return l.length?{targetRange:{range:l,facts:u,declarations:c}}:{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]}}if(e.isReturnStatement(o)&&!o.expression)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};var m=function(t){if(e.isReturnStatement(t)){if(t.expression)return t.expression}else if(e.isVariableStatement(t)){for(var r=0,n=void 0,i=0,a=t.declarationList.declarations;i<a.length;i++){var o=a[i];o.initializer&&(r++,n=o.initializer)}if(1===r)return n}else if(e.isVariableDeclaration(t)&&t.initializer)return t.initializer;return t}(o),y=function(t){if(e.isIdentifier(e.isExpressionStatement(t)?t.expression:t))return[e.createDiagnosticForNode(t,n.cannotExtractIdentifier)];return}(m)||h(m);return y?{errors:y}:{targetRange:{range:function(t){if(e.isStatement(t))return[t];if(e.isExpressionNode(t))return e.isExpressionStatement(t.parent)?[t.parent]:t;return}(m),facts:u,declarations:c}};function h(t){var a;if(function(e){e[e.None=0]="None",e[e.Break=1]="Break",e[e.Continue=2]="Continue",e[e.Return=4]="Return"}(a||(a={})),e.Debug.assert(t.pos<=t.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(!e.positionIsSynthesized(t.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),!(e.isStatement(t)||e.isExpressionNode(t)&&function(e){var t=e.parent;switch(t.kind){case 278:return!1}switch(e.kind){case 10:return 249!==t.kind&&253!==t.kind;case 208:case 184:case 186:return!1;case 72:return 186!==t.kind&&253!==t.kind&&257!==t.kind}return!0}(t)))return[e.createDiagnosticForNode(t,n.statementOrExpressionExpected)];if(4194304&t.flags)return[e.createDiagnosticForNode(t,n.cannotExtractAmbientBlock)];var o,s=e.getContainingClass(t);s&&function(t,r){for(var n=t;n!==r;){if(154===n.kind){e.hasModifier(n,32)&&(u|=i.InStaticRegion);break}if(151===n.kind){157===e.getContainingFunction(n).kind&&(u|=i.InStaticRegion);break}156===n.kind&&e.hasModifier(n,32)&&(u|=i.InStaticRegion),n=n.parent}}(t,s);var l,_=4;return function t(a){if(o)return!0;if(e.isDeclaration(a)){var s=237===a.kind?a.parent.parent:a;if(e.hasModifier(s,1))return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractExportedEntity)),!0;c.push(a.symbol)}switch(a.kind){case 249:return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractImport)),!0;case 98:if(191===a.parent.kind){var d=e.getContainingClass(a);if(d.pos<r.start||d.end>=r.start+r.length)return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractSuper)),!0}else u|=i.UsesThis}if(e.isFunctionLikeDeclaration(a)||e.isClassLike(a)){switch(a.kind){case 239:case 240:e.isSourceFile(a.parent)&&void 0===a.parent.externalModuleIndicator&&(o||(o=[])).push(e.createDiagnosticForNode(a,n.functionWillNotBeVisibleInTheNewScope))}return!1}var p=_;switch(a.kind){case 222:case 235:_=0;break;case 218:a.parent&&235===a.parent.kind&&a.parent.finallyBlock===a&&(_=4);break;case 271:_|=1;break;default:e.isIterationStatement(a,!1)&&(_|=3)}switch(a.kind){case 178:case 100:u|=i.UsesThis;break;case 233:var f=a.label;(l||(l=[])).push(f.escapedText),e.forEachChild(a,t),l.pop();break;case 229:case 228:var f=a.label;f?e.contains(l,f.escapedText)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):_&(229===a.kind?1:2)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break;case 201:u|=i.IsAsyncFunction;break;case 207:u|=i.IsGenerator;break;case 230:4&_?u|=i.HasReturn:(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalReturnStatement));break;default:e.forEachChild(a,t)}_=p}(t),o}}function _(t){return e.isFunctionLikeDeclaration(t)||e.isSourceFile(t)||e.isModuleBlock(t)||e.isClassLike(t)}function d(t,r){var a=r.file,o=function(t){var r=m(t.range)?e.first(t.range):t.range;if(t.facts&i.UsesThis){var n=e.getContainingClass(r);if(n){var a=e.findAncestor(r,e.isFunctionLikeDeclaration);return a?[a,n]:[n]}}for(var o=[];;)if(151===(r=r.parent).kind&&(r=e.findAncestor(r,function(t){return e.isFunctionLikeDeclaration(t)}).parent),_(r)&&(o.push(r),284===r.kind))return o}(t);return{scopes:o,readsAndWrites:function(t,r,a,o,s,c){var u,l,_=e.createMap(),d=[],p=[],f=[],g=[],y=[],h=e.createMap(),v=[],b=m(t.range)?1===t.range.length&&e.isExpressionStatement(t.range[0])?t.range[0].expression:void 0:t.range;if(void 0===b){var D=t.range,x=e.first(D).getStart(),S=e.last(D).end;l=e.createFileDiagnostic(o,x,S-x,n.expressionExpected)}else 147456&s.getTypeAtLocation(b).flags&&(l=e.createDiagnosticForNode(b,n.uselessConstantType));for(var T=0,C=r;T<C.length;T++){var E=C[T];d.push({usages:e.createMap(),typeParameterUsages:e.createMap(),substitutions:e.createMap()}),p.push(e.createMap()),f.push(e.isFunctionLikeDeclaration(E)&&239!==E.kind?[e.createDiagnosticForNode(E,n.cannotExtractToOtherFunctionLike)]:[]);var k=[];l&&k.push(l),e.isClassLike(E)&&e.isInJSFile(E)&&k.push(e.createDiagnosticForNode(E,n.cannotExtractToJSClass)),e.isArrowFunction(E)&&!e.isBlock(E.body)&&k.push(e.createDiagnosticForNode(E,n.cannotExtractToExpressionArrowFunction)),g.push(k)}var N=e.createMap(),A=m(t.range)?e.createBlock(t.range):t.range,F=m(t.range)?e.first(t.range):t.range,P=(w=F,!!e.findAncestor(w,function(t){return e.isDeclarationWithTypeParameters(t)&&0!==e.getEffectiveTypeParameterDeclarations(t).length}));var w;if(function c(u,l){if(void 0===l&&(l=1),P){var _=s.getTypeAtLocation(u);V(_)}if(e.isDeclaration(u)&&u.symbol&&y.push(u),e.isAssignmentExpression(u))c(u.left,2),c(u.right);else if(e.isUnaryExpressionWithWrite(u))c(u.operand,2);else if(e.isPropertyAccessExpression(u)||e.isElementAccessExpression(u))e.forEachChild(u,c);else if(e.isIdentifier(u)){if(!u.parent)return;if(e.isQualifiedName(u.parent)&&u!==u.parent.left)return;if(e.isPropertyAccessExpression(u.parent)&&u!==u.parent.expression)return;!function(c,u,l){var _=function(c,u,l){var _=q(c);if(_){var m=e.getSymbolId(_).toString(),y=N.get(m);if(y&&y>=u)return m;if(N.set(m,u),y){for(var h=0,v=d;h<v.length;h++){var b=v[h],D=b.usages.get(c.text);D&&b.usages.set(c.text,{usage:u,symbol:_,node:c})}return m}var x=_.getDeclarations(),S=x&&e.find(x,function(e){return e.getSourceFile()===o});if(S&&!e.rangeContainsStartEnd(a,S.getStart(),S.end)){if(t.facts&i.IsGenerator&&2===u){for(var T=e.createDiagnosticForNode(c,n.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators),C=0,E=f;C<E.length;C++){var k=E[C];k.push(T)}for(var A=0,F=g;A<F.length;A++){var k=F[A];k.push(T)}}for(var P=0;P<r.length;P++){var w=r[P],I=s.resolveName(_.name,w,_.flags,!1);if(I!==_&&!p[P].has(m)){var O=W(_.exportSymbol||_,w,l);if(O)p[P].set(m,O);else if(l){if(!(262144&_.flags)){var T=e.createDiagnosticForNode(c,n.typeWillNotBeVisibleInTheNewScope);f[P].push(T),g[P].push(T)}}else d[P].usages.set(c.text,{usage:u,symbol:_,node:c})}}return m}}}(c,u,l);if(_)for(var m=0;m<r.length;m++){var y=p[m].get(_);y&&d[m].substitutions.set(e.getNodeId(c).toString(),y)}}(u,l,e.isPartOfTypeNode(u))}else e.forEachChild(u,c)}(A),P&&!m(t.range)){var I=s.getContextualType(t.range);V(I)}if(_.size>0){for(var O=e.createMap(),M=0,L=F;void 0!==L&&M<r.length;L=L.parent)if(L===r[M]&&(O.forEach(function(e,t){d[M].typeParameterUsages.set(t,e)}),M++),e.isDeclarationWithTypeParameters(L))for(var R=0,B=e.getEffectiveTypeParameterDeclarations(L);R<B.length;R++){var j=B[R],J=s.getTypeAtLocation(j);_.has(J.id.toString())&&O.set(J.id.toString(),J)}e.Debug.assert(M===r.length)}if(y.length){var z=e.isBlockScope(r[0],r[0].parent)?r[0]:e.getEnclosingBlockScopeContainer(r[0]);e.forEachChild(z,function r(n){if(n===t.range||m(t.range)&&t.range.indexOf(n)>=0)return;var i=e.isIdentifier(n)?q(n):s.getSymbolAtLocation(n);if(i){var a=e.find(y,function(e){return e.symbol===i});if(a)if(e.isVariableDeclaration(a)){var o=a.symbol.id.toString();h.has(o)||(v.push(a),h.set(o,!0))}else u=u||a}e.forEachChild(n,r)})}for(var K=function(r){var i=d[r];if(r>0&&(i.usages.size>0||i.typeParameterUsages.size>0)){var a=m(t.range)?t.range[0]:t.range;g[r].push(e.createDiagnosticForNode(a,n.cannotAccessVariablesFromNestedScopes))}var o,s=!1;if(d[r].usages.forEach(function(t){2===t.usage&&(s=!0,106500&t.symbol.flags&&t.symbol.valueDeclaration&&e.hasModifier(t.symbol.valueDeclaration,64)&&(o=t.symbol.valueDeclaration))}),e.Debug.assert(m(t.range)||0===v.length),s&&!m(t.range)){var c=e.createDiagnosticForNode(t.range,n.cannotWriteInExpression);f[r].push(c),g[r].push(c)}else if(o&&r>0){var c=e.createDiagnosticForNode(o,n.cannotExtractReadonlyPropertyInitializerOutsideConstructor);f[r].push(c),g[r].push(c)}else if(u){var c=e.createDiagnosticForNode(u,n.cannotExtractExportedEntity);f[r].push(c),g[r].push(c)}},U=0;U<r.length;U++)K(U);return{target:A,usagesPerScope:d,functionErrorsPerScope:f,constantErrorsPerScope:g,exposedVariableDeclarations:v};function V(e){for(var t=s.getSymbolWalker(function(){return c.throwIfCancellationRequested(),!0}),r=t.walkType(e).visitedTypes,n=0,i=r;n<i.length;n++){var a=i[n];a.isTypeParameter()&&_.set(a.id.toString(),a)}}function q(t){return t.parent&&e.isShorthandPropertyAssignment(t.parent)&&t.parent.name===t?s.getShorthandAssignmentValueSymbol(t.parent):s.getSymbolAtLocation(t)}function W(t,r,n){if(t){var i=t.getDeclarations();if(i&&i.some(function(e){return e.parent===r}))return e.createIdentifier(t.name);var a=W(t.parent,r,n);if(void 0!==a)return n?e.createQualifiedName(a,e.createIdentifier(t.name)):e.createPropertyAccess(a,t.name)}}}(t,o,function(t,r){return m(t.range)?{pos:e.first(t.range).getStart(r),end:e.last(t.range).getEnd()}:t.range}(t,a),a,r.program.getTypeChecker(),r.cancellationToken)}}function p(t,r){var n=t.type,i=t.declaration,a=r.type,o=r.declaration;return e.compareProperties(i,o,"pos",e.compareValues)||e.compareStringsCaseSensitive(n.symbol?n.symbol.getName():"",a.symbol?a.symbol.getName():"")||e.compareValues(n.id,a.id)}function f(t,r){var n=e.map(t,function(t){return e.createShorthandPropertyAssignment(t.symbol.name)}),i=e.map(r,function(t){return e.createShorthandPropertyAssignment(t.symbol.name)});return void 0===n?i:void 0===i?n:n.concat(i)}function m(t){return e.isArray(t)}function g(e){switch(e.kind){case 218:case 284:case 245:case 271:return!0;default:return!1}}t.registerRefactor(s,{getAvailableActions:c,getEditsForAction:u}),r.getAvailableActions=c,r.getEditsForAction=u,function(t){function r(t){return{message:t,code:0,category:e.DiagnosticCategory.Message,key:t}}t.cannotExtractRange=r("Cannot extract range."),t.cannotExtractImport=r("Cannot extract import statement."),t.cannotExtractSuper=r("Cannot extract super call."),t.cannotExtractEmpty=r("Cannot extract empty range."),t.expressionExpected=r("expression expected."),t.uselessConstantType=r("No reason to extract constant of type."),t.statementOrExpressionExpected=r("Statement or expression expected."),t.cannotExtractRangeContainingConditionalBreakOrContinueStatements=r("Cannot extract range containing conditional break or continue statements."),t.cannotExtractRangeContainingConditionalReturnStatement=r("Cannot extract range containing conditional return statement."),t.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=r("Cannot extract range containing labeled break or continue with target outside of the range."),t.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=r("Cannot extract range containing writes to references located outside of the target range in generators."),t.typeWillNotBeVisibleInTheNewScope=r("Type will not visible in the new scope."),t.functionWillNotBeVisibleInTheNewScope=r("Function will not visible in the new scope."),t.cannotExtractIdentifier=r("Select more than a single identifier."),t.cannotExtractExportedEntity=r("Cannot extract exported declaration"),t.cannotWriteInExpression=r("Cannot write back side-effects when extracting an expression"),t.cannotExtractReadonlyPropertyInitializerOutsideConstructor=r("Cannot move initialization of read-only class property outside of the constructor"),t.cannotExtractAmbientBlock=r("Cannot extract code from ambient contexts"),t.cannotAccessVariablesFromNestedScopes=r("Cannot access variables from nested scopes"),t.cannotExtractToOtherFunctionLike=r("Cannot extract method to a function-like scope that is not a function"),t.cannotExtractToJSClass=r("Cannot extract constant to a class scope in JS"),t.cannotExtractToExpressionArrowFunction=r("Cannot extract constant to an arrow function without a block")}(n=r.Messages||(r.Messages={})),function(e){e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.InStaticRegion=16]="InStaticRegion"}(i||(i={})),r.getRangeToExtract=l,function(e){e[e.Module=0]="Module",e[e.Global=1]="Global"}(a||(a={})),function(e){e[e.Read=1]="Read",e[e.Write=2]="Write"}(o||(o={}))}(t.extractSymbol||(t.extractSymbol={}))}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){!function(r){var n="Generate 'get' and 'set' accessors",i=e.Diagnostics.Generate_get_and_set_accessors.message;function a(t){return e.isParameterPropertyDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertyAssignment(t)}function o(t,r){return e.isIdentifier(r)?e.createIdentifier(t):e.createLiteral(t)}function s(t,r,n){var i=r?n.name:e.createThis();return e.isIdentifier(t)?e.createPropertyAccess(i,t):e.createElementAccess(i,e.createLiteral(t))}function c(t,r,n){var i=e.append(t?void 0:[e.createToken(n)],r?e.createToken(116):void 0);return i&&e.createNodeArray(i)}function u(t){var r=t.file,n=t.startPosition,i=t.endPosition,s=e.getTokenAtPosition(r,n),c=e.findAncestor(s.parent,a);if(c&&e.nodeOverlapsWithStartEnd(c.name,r,n,i)&&function(t){return e.isIdentifier(t)||e.isStringLiteral(t)}(c.name)&&124==(124|e.getModifierFlags(c))){var u=c.name.text,l=function(e){return 95===e.charCodeAt(0)}(u),_=o(l?u:e.getUniqueName("_"+u,r),c.name),d=o(l?e.getUniqueName(u.substring(1),r):u,c.name);return{isStatic:e.hasStaticModifier(c),isReadonly:e.hasReadonlyModifier(c),type:e.getTypeAnnotationNode(c),container:151===c.kind?c.parent.parent:c.parent,originalName:c.name.text,declaration:c,fieldName:_,accessorName:d,renameAccessor:l}}}function l(t,r,n,i,a){e.isParameterPropertyDeclaration(i)?t.insertNodeAtClassStart(r,a,n):e.isPropertyAssignment(i)?t.insertNodeAfterComma(r,i,n):t.insertNodeAfter(r,i,n)}t.registerRefactor(n,{getEditsForAction:function(t,r){var n=t.file,i=u(t);if(!i)return;var a=e.isSourceFileJS(n),o=e.textChanges.ChangeTracker.fromContext(t),_=i.isStatic,d=i.isReadonly,p=i.fieldName,f=i.accessorName,m=i.originalName,g=i.type,y=i.container,h=i.declaration,v=i.renameAccessor;e.suppressLeadingAndTrailingTrivia(p),e.suppressLeadingAndTrailingTrivia(h),e.suppressLeadingAndTrailingTrivia(y);var b=e.isClassLike(y),D=-65&e.getModifierFlags(h),x=b?!D||8&D?c(a,_,115):e.createNodeArray(e.createModifiersFromModifierFlags(D)):void 0,S=b?c(a,_,113):void 0;!function(t,r,n,i,a){e.isPropertyDeclaration(n)?function(t,r,n,i,a){var o=e.updateProperty(n,n.decorators,a,i,n.questionToken||n.exclamationToken,n.type,n.initializer);t.replaceNode(r,n,o)}(t,r,n,i,a):e.isPropertyAssignment(n)?function(t,r,n,i){var a=e.updatePropertyAssignment(n,i,n.initializer);t.replacePropertyAssignment(r,n,a)}(t,r,n,i):t.replaceNode(r,n,e.updateParameter(n,n.decorators,a,n.dotDotDotToken,e.cast(i,e.isIdentifier),n.questionToken,n.type,n.initializer))}(o,n,h,p,S);var T=function(t,r,n,i,a,o){return e.createGetAccessor(void 0,i,r,void 0,n,e.createBlock([e.createReturn(s(t,a,o))],!0))}(p,f,g,x,_,y);if(e.suppressLeadingAndTrailingTrivia(T),l(o,n,T,h,y),d){var C=e.getFirstConstructorWithBody(y);C&&function(t,r,n,i,a){if(!n.body)return;n.body.forEachChild(function n(o){e.isElementAccessExpression(o)&&100===o.expression.kind&&e.isStringLiteral(o.argumentExpression)&&o.argumentExpression.text===a&&e.isWriteAccess(o)&&t.replaceNode(r,o.argumentExpression,e.createStringLiteral(i)),e.isPropertyAccessExpression(o)&&100===o.expression.kind&&o.name.text===a&&e.isWriteAccess(o)&&t.replaceNode(r,o.name,e.createIdentifier(i)),e.isFunctionLike(o)||e.isClassLike(o)||o.forEachChild(n)})}(o,n,C,p.text,m)}else{var E=function(t,r,n,i,a,o){return e.createSetAccessor(void 0,i,r,[e.createParameter(void 0,void 0,void 0,e.createIdentifier("value"),void 0,n)],e.createBlock([e.createStatement(e.createAssignment(s(t,a,o),e.createIdentifier("value")))],!0))}(p,f,g,x,_,y);e.suppressLeadingAndTrailingTrivia(E),l(o,n,E,h,y)}var k=o.getChanges(),N=n.fileName,A=v?f:p,F=(e.isIdentifier(A)?0:-1)+e.getRenameLocation(k,N,A.text,e.isParameter(h));return{renameFilename:N,renameLocation:F,edits:k}},getAvailableActions:function(t){return u(t)?[{name:n,description:i,actions:[{name:n,description:i}]}]:e.emptyArray}})}(t.generateGetAccessorAndSetAccessor||(t.generateGetAccessorAndSetAccessor={}))}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){function r(t){var r=function(t){var r=t.file,n=e.createTextRangeFromSpan(e.getRefactorContextSpan(t)),i=r.statements,a=e.findIndex(i,function(e){return e.end>n.pos});if(-1!==a){var o=i[a];if(e.isNamedDeclaration(o)&&o.name&&e.rangeContainsRange(o.name,n))return{toMove:[i[a]],afterLast:i[a+1]};if(!(n.pos>o.getStart(r))){var s=e.findIndex(i,function(e){return e.end>n.end},a);if(-1===s||!(0===s||i[s].getStart(r)<n.end))return{toMove:i.slice(a,-1===s?i.length:s),afterLast:-1===s?void 0:i[s]}}}}(t);if(void 0!==r){var n=[],i=[],a=r.toMove,o=r.afterLast;return e.getRangesWhere(a,function(t){return!function(t){switch(t.kind){case 249:return!0;case 248:return!e.hasModifier(t,1);case 219:return t.declarationList.declarations.every(function(t){return!!t.initializer&&e.isRequireCall(t.initializer,!0)});default:return!1}}(t)},function(e,t){for(var r=e;r<t;r++)n.push(a[r]);i.push({first:a[e],afterLast:o})}),0===n.length?void 0:{all:n,ranges:i}}}function n(e,t,r){for(var n=0,i=t;n<i.length;n++){var a=i[n],o=a.first,s=a.afterLast;r.deleteNodeRangeExcludingEnd(e,o,s)}}function i(e){return 249===e.kind?e.moduleSpecifier:248===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function a(t,r){if(e.isImportDeclaration(t))e.isStringLiteral(t.moduleSpecifier)&&r(t);else if(e.isImportEqualsDeclaration(t))e.isExternalModuleReference(t.moduleReference)&&e.isStringLiteralLike(t.moduleReference.expression)&&r(t);else if(e.isVariableStatement(t))for(var n=0,i=t.declarationList.declarations;n<i.length;n++){var a=i[n];a.initializer&&e.isRequireCall(a.initializer,!0)&&r(a)}}function o(t,r,n,i,a){if(n=e.ensurePathIsNonModuleName(n),i){var o=r.map(function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))});return e.makeImportIfNecessary(t,o,n,a)}e.Debug.assert(!t);var u=r.map(function(t){return e.createBindingElement(void 0,void 0,t)});return u.length?s(e.createObjectBindingPattern(u),void 0,c(e.createLiteral(n))):void 0}function s(t,r,n,i){return void 0===i&&(i=2),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(t,r,n)],i))}function c(t){return e.createCall(e.createIdentifier("require"),void 0,[t])}function u(t,r,n,i){switch(r.kind){case 249:!function(e,t,r,n){if(!t.importClause)return;var i=t.importClause,a=i.name,o=i.namedBindings,s=!a||n(a),c=!o||(251===o.kind?n(o.name):0!==o.elements.length&&o.elements.every(function(e){return n(e.name)}));if(s&&c)r.delete(e,t);else if(a&&s&&r.delete(e,a),o)if(c)r.delete(e,o);else if(252===o.kind)for(var u=0,l=o.elements;u<l.length;u++){var _=l[u];n(_.name)&&r.delete(e,_)}}(t,r,n,i);break;case 248:i(r.name)&&n.delete(t,r);break;case 237:!function(t,r,n,i){var a=r.name;switch(a.kind){case 72:i(a)&&n.delete(t,a);break;case 185:break;case 184:if(a.elements.every(function(t){return e.isIdentifier(t.name)&&i(t.name)}))n.delete(t,e.isVariableDeclarationList(r.parent)&&1===r.parent.declarations.length?r.parent.parent:r);else for(var o=0,s=a.elements;o<s.length;o++){var c=s[o];e.isIdentifier(c.name)&&i(c.name)&&n.delete(t,c.name)}}}(t,r,n,i);break;default:e.Debug.assertNever(r)}}function l(t){switch(t.kind){case 248:case 253:case 250:return!0;case 237:return _(t);case 186:return e.isVariableDeclaration(t.parent.parent)&&_(t.parent.parent);default:return!1}}function _(t){return e.isSourceFile(t.parent.parent.parent)&&!!t.initializer&&e.isRequireCall(t.initializer,!0)}function d(t,r,n){switch(t.kind){case 249:var i=t.importClause;if(!i)return;var a=i.name&&n(i.name)?i.name:void 0,o=i.namedBindings&&function(t,r){if(251===t.kind)return r(t.name)?t:void 0;var n=t.elements.filter(function(e){return r(e.name)});return n.length?e.createNamedImports(n):void 0}(i.namedBindings,n);return a||o?e.createImportDeclaration(void 0,void 0,e.createImportClause(a,o),r):void 0;case 248:return n(t.name)?t:void 0;case 237:var u=function(t,r){switch(t.kind){case 72:return r(t)?t:void 0;case 185:return t;case 184:var n=t.elements.filter(function(t){return t.propertyName||!e.isIdentifier(t.name)||r(t.name)});return n.length?e.createObjectBindingPattern(n):void 0}}(t.name,n);return u?s(u,t.type,c(r),t.parent.flags):void 0;default:return e.Debug.assertNever(t)}}function p(t,r,n){t.forEachChild(function t(i){if(e.isIdentifier(i)&&!e.isDeclarationName(i)){var a=r.getSymbolAtLocation(i);a&&n(a)}else i.forEachChild(t)})}t.registerRefactor("Move to a new file",{getAvailableActions:function(t){if(!t.preferences.allowTextChangesInNewFiles||void 0===r(t))return e.emptyArray;var n=e.getLocaleSpecificMessage(e.Diagnostics.Move_to_a_new_file);return[{name:"Move to a new file",description:n,actions:[{name:"Move to a new file",description:n}]}]},getEditsForAction:function(t,s){e.Debug.assert("Move to a new file"===s);var _=e.Debug.assertDefined(r(t));return{edits:e.textChanges.ChangeTracker.with(t,function(r){return s=t.file,S=t.program,T=_,C=r,E=t.host,k=t.preferences,N=S.getTypeChecker(),A=function(t,r,n){var i=new f,a=new f,o=new f,s=function(t){if(void 0===t)return;var r=n.getJsxNamespace(t),i=n.resolveName(r,t,1920,!0);return i&&e.some(i.declarations,l)?i:void 0}(e.find(r,function(e){return!!(2&e.transformFlags)}));s&&a.add(s);for(var c=0,u=r;c<u.length;c++){var _=u[c];y(_,function(t){i.add(e.Debug.assertDefined(e.isExpressionStatement(t)?n.getSymbolAtLocation(t.expression.left):t.symbol))})}for(var d=0,g=r;d<g.length;d++){var _=g[d];p(_,n,function(r){var n;if(r.declarations)for(var s=0,c=r.declarations;s<c.length;s++){var u=c[s];l(u)?a.add(r):m(u)&&(n=u,(e.isVariableDeclaration(n)?n.parent.parent.parent:n.parent)===t)&&!i.has(r)&&o.add(r)}})}for(var h=a.clone(),v=new f,b=0,D=t.statements;b<D.length;b++){var _=D[b];e.contains(r,_)||(s&&2&_.transformFlags&&h.delete(s),p(_,n,function(e){i.has(e)&&v.add(e),h.delete(e)}))}return{movedSymbols:i,newFileImportsFromOldFile:o,oldFileImportsFromNewFile:v,oldImportsNeededByNewFile:a,unusedImportsFromOldFile:h}}(s,T.all,N),F=e.getDirectoryPath(s.fileName),P=e.extensionFromPath(s.fileName),w=function(t,r,n,i){for(var a=t,o=1;;o++){var s=e.combinePaths(n,a+r);if(!i.fileExists(s))return a;a=t+"."+o}}(A.movedSymbols.forEachEntry(e.symbolNameNoDefault)||"newFile",P,F,E),I=w+P,C.createNewFile(s,e.combinePaths(F,I),function(t,r,s,l,_,p,f){var S=_.getTypeChecker();if(!t.externalModuleIndicator&&!t.commonJsModuleIndicator)return n(t,l.ranges,s),l.all;var T=!!t.externalModuleIndicator,C=e.getQuotePreference(t,f),E=function(t,r,n,i){var a,s=[];return t.forEach(function(t){"default"===t.escapedName?a=e.createIdentifier(e.symbolNameNoDefault(t)):s.push(t.name)}),o(a,s,r,n,i)}(r.oldFileImportsFromNewFile,p,T,C);return E&&e.insertImport(s,t,E),function(t,r,n,i,o){for(var s=0,c=t.statements;s<c.length;s++){var l=c[s];e.contains(r,l)||a(l,function(e){return u(t,e,n,function(e){return i.has(o.getSymbolAtLocation(e))})})}}(t,l.all,s,r.unusedImportsFromOldFile,S),n(t,l.ranges,s),function(t,r,n,o,s){for(var l=r.getTypeChecker(),_=function(r){if(r===n)return"continue";for(var _=function(_){a(_,function(a){if(l.getSymbolAtLocation(i(a))===n.symbol){var p=function(t){var r=e.isBindingElement(t.parent)?e.getPropertySymbolFromBindingElement(l,t.parent):e.skipAlias(l.getSymbolAtLocation(t),l);return!!r&&o.has(r)};u(r,a,t,p);var f=e.combinePaths(e.getDirectoryPath(i(a).text),s),m=d(a,e.createLiteral(f),p);m&&t.insertNodeAfter(r,_,m);var g=function(t){switch(t.kind){case 249:return t.importClause&&t.importClause.namedBindings&&251===t.importClause.namedBindings.kind?t.importClause.namedBindings.name:void 0;case 248:return t.name;case 237:return e.tryCast(t.name,e.isIdentifier);default:return e.Debug.assertNever(t)}}(a);g&&function(t,r,n,i,a,o,s,u){var l=e.codefix.moduleSpecifierToValidIdentifier(a,7),_=!1,d=[];if(e.FindAllReferences.Core.eachSymbolReferenceInFile(s,n,r,function(t){e.isPropertyAccessExpression(t.parent)&&(_=_||!!n.resolveName(l,t,67108863,!0),i.has(n.getSymbolAtLocation(t.parent.name))&&d.push(t))}),d.length){for(var p=_?e.getUniqueName(l,r):l,f=0,m=d;f<m.length;f++){var g=m[f];t.replaceNode(r,g,e.createIdentifier(p))}t.insertNodeAfter(r,u,function(t,r,n){var i=e.createIdentifier(r),a=e.createLiteral(n);switch(t.kind){case 249:return e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(i)),a);case 248:return e.createImportEqualsDeclaration(void 0,void 0,i,e.createExternalModuleReference(a));case 237:return e.createVariableDeclaration(i,void 0,c(a));default:return e.Debug.assertNever(t)}}(u,a,o))}}(t,r,l,o,s,f,g,a)}})},p=0,f=r.statements;p<f.length;p++){var m=f[p];_(m)}},p=0,f=r.getSourceFiles();p<f.length;p++){var m=f[p];_(m)}}(s,_,t,r.movedSymbols,p),function(t,r,n,s,c,u,l){for(var _,p=[],f=0,g=t.statements;f<g.length;f++){var y=g[f];a(y,function(t){e.append(p,d(t,i(t),function(e){return r.has(c.getSymbolAtLocation(e))}))})}var b=[],D=e.nodeSeenTracker();return n.forEach(function(r){for(var n=0,i=r.declarations;n<i.length;n++){var a=i[n];if(m(a)){var o=(l=a,e.isExpressionStatement(l)?l.expression.left.name:e.tryCast(l.name,e.isIdentifier));if(o){var c=h(a);D(c)&&v(t,c,s,u),e.hasModifier(a,512)?_=o:b.push(o.text)}}}var l}),e.append(p,o(_,b,e.removeFileExtension(e.getBaseFileName(t.fileName)),u,l)),p}(t,r.oldImportsNeededByNewFile,r.newFileImportsFromOldFile,s,S,T,C).concat(function(t,r,n,i){return e.flatMap(r,function(r){if(o=r,e.Debug.assert(e.isSourceFile(o.parent)),(g(o)||e.isVariableStatement(o))&&!b(t,r,i)&&y(r,function(t){return n.has(e.Debug.assertDefined(t.symbol))})){var a=function(t,r){return r?[function(t){var r=e.concatenate([e.createModifier(85)],t.modifiers);switch(t.kind){case 239:return e.updateFunctionDeclaration(t,t.decorators,r,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);case 240:return e.updateClassDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 219:return e.updateVariableStatement(t,r,t.declarationList);case 244:return e.updateModuleDeclaration(t,t.decorators,r,t.name,t.body);case 243:return e.updateEnumDeclaration(t,t.decorators,r,t.name,t.members);case 242:return e.updateTypeAliasDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.type);case 241:return e.updateInterfaceDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 248:return e.updateImportEqualsDeclaration(t,t.decorators,r,t.name,t.moduleReference);case 221:return e.Debug.fail();default:return e.Debug.assertNever(t)}}(t)]:function(e){return[e].concat(D(e).map(x))}(t)}(r,i);if(a)return a}var o;return r})}(t,l.all,r.oldFileImportsFromNewFile,T))}(s,A,C,T,S,w,k)),void function(t,r,n,i,a){var o=t.getCompilerOptions().configFile;if(o){var s=e.normalizePath(e.combinePaths(n,"..",i)),c=e.getRelativePathFromFile(o.fileName,s,a),u=o.statements[0]&&e.tryCast(o.statements[0].expression,e.isObjectLiteralExpression),l=u&&e.find(u.properties,function(t){return e.isPropertyAssignment(t)&&e.isStringLiteral(t.name)&&"files"===t.name.text});l&&e.isArrayLiteralExpression(l.initializer)&&r.insertNodeInListAfter(o,e.last(l.initializer.elements),e.createLiteral(c),l.initializer.elements)}}(S,C,s.fileName,I,e.hostGetCanonicalFileName(E));var s,S,T,C,E,k,N,A,F,P,w,I}),renameFilename:void 0,renameLocation:void 0}}});var f=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getSymbolId(t)),t)},t.prototype.has=function(t){return this.map.has(String(e.getSymbolId(t)))},t.prototype.delete=function(t){this.map.delete(String(e.getSymbolId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.forEachEntry=function(t){return e.forEachEntry(this.map,t)},t.prototype.clone=function(){var r=new t;return e.copyEntries(this.map,r.map),r},t}();function m(t){return g(t)&&e.isSourceFile(t.parent)||e.isVariableDeclaration(t)&&e.isSourceFile(t.parent.parent.parent)}function g(e){switch(e.kind){case 239:case 240:case 244:case 243:case 242:case 241:case 248:return!0;default:return!1}}function y(t,r){switch(t.kind){case 239:case 240:case 244:case 243:case 242:case 241:case 248:return r(t);case 219:return e.firstDefined(t.declarationList.declarations,function(t){return function t(r,n){switch(r.kind){case 72:return n(e.cast(r.parent,function(t){return e.isVariableDeclaration(t)||e.isBindingElement(t)}));case 185:case 184:return e.firstDefined(r.elements,function(r){return e.isOmittedExpression(r)?void 0:t(r.name,n)});default:return e.Debug.assertNever(r)}}(t.name,r)});case 221:var n=t.expression;return e.isBinaryExpression(n)&&1===e.getAssignmentDeclarationKind(n)?r(t):void 0}}function h(t){switch(t.kind){case 237:return t.parent.parent;case 186:return h(e.cast(t.parent.parent,function(t){return e.isVariableDeclaration(t)||e.isBindingElement(t)}));default:return t}}function v(t,r,n,i){if(!b(t,r,i))if(i)e.isExpressionStatement(r)||n.insertExportModifier(t,r);else{var a=D(r);0!==a.length&&n.insertNodesAfter(t,r,a.map(x))}}function b(t,r,n){return n?!e.isExpressionStatement(r)&&e.hasModifier(r,1):D(r).some(function(r){return t.symbol.exports.has(e.escapeLeadingUnderscores(r))})}function D(t){switch(t.kind){case 239:case 240:return[t.name.text];case 219:return e.mapDefined(t.declarationList.declarations,function(t){return e.isIdentifier(t.name)?t.name.text:void 0});case 244:case 243:case 242:case 241:case 248:return e.emptyArray;case 221:return e.Debug.fail();default:return e.Debug.assertNever(t)}}function x(t){return e.createExpressionStatement(e.createBinary(e.createPropertyAccess(e.createIdentifier("exports"),e.createIdentifier(t)),59,e.createIdentifier(t)))}}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){!function(r){var n="Add or remove braces in an arrow function",i=e.Diagnostics.Add_or_remove_braces_in_an_arrow_function.message,a="Add braces to arrow function",o="Remove braces from arrow function",s=e.Diagnostics.Add_braces_to_arrow_function.message,c=e.Diagnostics.Remove_braces_from_arrow_function.message;function u(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingFunction(n);if(i&&e.isArrowFunction(i)&&e.rangeContainsRange(i,n)&&!e.rangeContainsRange(i.body,n)){if(e.isExpression(i.body))return{func:i,addBraces:!0,expression:i.body};if(1===i.body.statements.length){var a=e.first(i.body.statements);if(e.isReturnStatement(a))return{func:i,addBraces:!1,expression:a.expression,returnStatement:a}}}}t.registerRefactor(n,{getEditsForAction:function(t,r){var n=t.file,i=t.startPosition,s=u(n,i);if(!s)return;var c,l=s.expression,_=s.returnStatement,d=s.func;if(r===a){var p=e.createReturn(l);c=e.createBlock([p],!0),e.suppressLeadingAndTrailingTrivia(c),e.copyLeadingComments(l,p,n,3,!0)}else if(r===o&&_){var f=l||e.createVoidZero();c=function(t){return e.isBinaryExpression(t)&&27===t.operatorToken.kind||e.isObjectLiteralExpression(t)}(f)?e.createParen(f):f,e.suppressLeadingAndTrailingTrivia(c),e.copyLeadingComments(_,c,n,3,!1)}else e.Debug.fail("invalid action");var m=e.textChanges.ChangeTracker.with(t,function(e){return e.replaceNode(n,d.body,c)});return{renameFilename:void 0,renameLocation:void 0,edits:m}},getAvailableActions:function(t){var r=t.file,l=t.startPosition,_=u(r,l);return _?[{name:n,description:i,actions:[_.addBraces?{name:a,description:s}:{name:o,description:c}]}]:e.emptyArray}})}(t.addOrRemoveBracesToArrowFunction||(t.addOrRemoveBracesToArrowFunction={}))}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){!function(t){!function(r){var n="Convert parameters to destructured object",i=2;function a(t,r){return e.getSymbolTarget(t)===e.getSymbolTarget(r)}function o(t){if(e.isDeclaration(t.node.parent))return t.node}function s(t){if(t.node.parent){var r=t.node,n=r.parent;switch(n.kind){case 191:var i=e.tryCast(n,e.isCallExpression);if(i&&i.expression===r)return i;break;case 192:var a=e.tryCast(n,e.isNewExpression);if(a&&a.expression===r)return a;break;case 189:var o=e.tryCast(n,e.isPropertyAccessExpression);if(o&&o.parent&&o.name===r){var s=e.tryCast(o.parent,e.isCallExpression);if(s&&s.expression===o)return s}break;case 190:var c=e.tryCast(n,e.isElementAccessExpression);if(c&&c.parent&&c.argumentExpression===r){var u=e.tryCast(c.parent,e.isCallExpression);if(u&&u.expression===c)return u}}}}function c(t){if(t.node.parent){var r=t.node,n=r.parent;switch(n.kind){case 189:var i=e.tryCast(n,e.isPropertyAccessExpression);if(i&&i.expression===r)return i;break;case 190:var a=e.tryCast(n,e.isElementAccessExpression);if(a&&a.expression===r)return a}}}function u(t){var r=t.node;if(2===e.getMeaningFromLocation(r)||e.isExpressionWithTypeArgumentsInClassExtendsClause(r.parent))return r}function l(t,r,n){var a=e.getTouchingToken(t,r),o=e.getContainingFunction(a);if(!function(t){var r=e.findAncestor(t,e.isJSDocNode);if(r){var n=e.findAncestor(r,function(t){return!e.isJSDocNode(t)});return!!n&&e.isFunctionLikeDeclaration(n)}return!1}(a))return!(o&&function(t,r){if(!function(t,r){return function(e){if(d(e))return e.length-1;return e.length}(t)>=i&&e.every(t,function(t){return function(t,r){if(e.isRestParameter(t)){var n=r.getTypeAtLocation(t);if(!r.isArrayType(n)&&!r.isTupleType(n))return!1}return!t.modifiers&&!t.decorators&&e.isIdentifier(t.name)}(t,r)})}(t.parameters,r))return!1;switch(t.kind){case 239:case 156:return!!t.name&&!!t.body&&!r.isImplementationOfOverload(t);case 157:return e.isClassDeclaration(t.parent)?!!t.body&&!!t.parent.name&&!r.isImplementationOfOverload(t):_(t.parent.parent)&&!!t.body&&!r.isImplementationOfOverload(t);case 196:case 197:return _(t.parent)}return!1}(o,n)&&e.rangeContainsRange(o,a))||o.body&&e.rangeContainsRange(o.body,a)?void 0:o}function _(t){return e.isVariableDeclaration(t)&&e.isVarConst(t)&&e.isIdentifier(t.name)&&!t.type}function d(t){return t.length>0&&e.isThis(t[0].name)}function p(t){return d(t)&&(t=e.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function f(t,r){var n=p(t.parameters),i=e.isRestParameter(e.last(n)),a=i?r.slice(0,n.length-1):r,o=e.map(a,function(t,r){var i,a,o=g(n[r]),s=(i=o,a=t,e.isIdentifier(a)&&e.getTextOfIdentifierOrLiteral(a)===i?e.createShorthandPropertyAssignment(i):e.createPropertyAssignment(i,a));return e.suppressLeadingAndTrailingTrivia(s.name),e.isPropertyAssignment(s)&&e.suppressLeadingAndTrailingTrivia(s.initializer),m(t,s),s});if(i&&r.length>=n.length){var s=r.slice(n.length-1),c=e.createPropertyAssignment(g(e.last(n)),e.createArrayLiteral(s));o.push(c)}return e.createObjectLiteral(o,!1)}function m(t,r){var n=t.getSourceFile();!function(e,t){for(var r=e.getFullStart(),n=e.getStart(),i=r;i<n;i++)if(10===t.charCodeAt(i))return!0;return!1}(t,n.text)?e.copyTrailingAsLeadingComments(t,r,n):e.copyLeadingComments(t,r,n),e.copyTrailingComments(t,r,n)}function g(t){return e.getTextOfIdentifierOrLiteral(t.name)}t.registerRefactor(n,{getEditsForAction:function(t,r){e.Debug.assert(r===n);var i=t.file,_=t.startPosition,y=t.program,h=t.cancellationToken,v=t.host,b=l(i,_,y.getTypeChecker());if(!b||!h)return;var D=function(t,r,n){var i=function(t){switch(t.kind){case 239:case 156:return[t.name];case 157:var r=e.findChildOfKind(t,124,t.getSourceFile());if(209===t.parent.kind){var n=t.parent.parent;return[n.name,r]}return[r];case 197:return[t.parent.name];case 196:return t.name?[t.name,t.parent.name]:[t.parent.name];default:return e.Debug.assertNever(t)}}(t),l=e.isConstructorDeclaration(t)?function(e){switch(e.parent.kind){case 240:var t=e.parent;return[t.name];case 209:var r=e.parent,n=e.parent.parent,i=r.name;return i?[i,n.name]:[n.name]}}(t):[],_=e.deduplicate(i.concat(l),e.equateValues),d=r.getTypeChecker(),p=function(r){for(var n={accessExpressions:[],typeUsages:[]},_={functionCalls:[],declarations:[],classReferences:n,valid:!0},p=e.map(i,d.getSymbolAtLocation),f=e.map(l,d.getSymbolAtLocation),m=e.isConstructorDeclaration(t),g=0,y=r;g<y.length;g++){var h=y[g];if(1===h.kind){if(e.contains(p,d.getSymbolAtLocation(h.node),a)||e.isNewExpressionTarget(h.node)){var v=o(h);if(v){_.declarations.push(v);continue}var b=s(h);if(b){_.functionCalls.push(b);continue}}if(m&&e.contains(f,d.getSymbolAtLocation(h.node),a)){var v=o(h);if(v){_.declarations.push(v);continue}var D=c(h);if(D){n.accessExpressions.push(D);continue}if(e.isClassDeclaration(t.parent)){var x=u(h);if(x){n.typeUsages.push(x);continue}}}_.valid=!1}else _.valid=!1}return _}(e.flatMap(_,function(t){return e.FindAllReferences.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),n)}));e.every(p.declarations,function(t){return e.contains(_,t)})||(p.valid=!1);return p}(b,y,h);if(D.valid){var x=e.textChanges.ChangeTracker.with(t,function(t){return function(t,r,n,i,a,o){var s=e.map(function(t,r,n){var i,a=r.getTypeChecker(),o=p(t.parameters),s=e.map(o,function(t){var r=e.createBindingElement(void 0,void 0,g(t),e.isRestParameter(t)&&b(t)?e.createArrayLiteral():t.initializer);e.suppressLeadingAndTrailingTrivia(r),t.initializer&&r.initializer&&m(t.initializer,r.initializer);return r}),c=e.createObjectBindingPattern(s),u=(l=o,_=e.map(l,v),e.addEmitFlags(e.createTypeLiteralNode(_),1));var l,_;e.every(o,b)&&(i=e.createObjectLiteral());var f=e.createParameter(void 0,void 0,void 0,c,void 0,u,i);if(d(t.parameters)){var y=t.parameters[0],h=e.createParameter(void 0,void 0,void 0,y.name,void 0,y.type);return e.suppressLeadingAndTrailingTrivia(h.name),m(y.name,h.name),y.type&&(e.suppressLeadingAndTrailingTrivia(h.type),m(y.type,h.type)),e.createNodeArray([h,f])}return e.createNodeArray([f]);function v(t){var i,o,s=t.type;s||!t.initializer&&!e.isRestParameter(t)||(i=t,o=a.getTypeAtLocation(i),s=e.getTypeNodeIfAccessible(o,i,r,n));var c=e.createPropertySignature(void 0,g(t),b(t)?e.createToken(56):t.questionToken,s,void 0);return e.suppressLeadingAndTrailingTrivia(c),m(t.name,c.name),t.type&&c.type&&m(t.type,c.type),c}function b(t){if(e.isRestParameter(t)){var r=a.getTypeAtLocation(t);return!a.isTupleType(r)}return a.isOptionalParameter(t)}}(a,r,n),function(t){return e.getSynthesizedDeepClone(t)});i.replaceNodeRangeWithNodes(t,e.first(a.parameters),e.last(a.parameters),s,{joiner:", ",indentation:0,leadingTriviaOption:e.textChanges.LeadingTriviaOption.IncludeAll,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include});for(var c=0,u=e.sortAndDeduplicate(o.functionCalls,function(t,r){return e.compareValues(t.pos,r.pos)});c<u.length;c++){var l=u[c];if(l.arguments&&l.arguments.length){var _=e.getSynthesizedDeepClone(f(a,l.arguments),!0);i.replaceNodeRange(e.getSourceFileOfNode(l),e.first(l.arguments),e.last(l.arguments),_,{leadingTriviaOption:e.textChanges.LeadingTriviaOption.IncludeAll,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include})}}}(i,y,v,t,b,D)});return{renameFilename:void 0,renameLocation:void 0,edits:x}}return{edits:[]}},getAvailableActions:function(t){var r=t.file,i=t.startPosition;if(e.isSourceFileJS(r))return e.emptyArray;if(!l(r,i,t.program.getTypeChecker()))return e.emptyArray;var a=e.getLocaleSpecificMessage(e.Diagnostics.Convert_parameters_to_destructured_object);return[{name:n,description:a,actions:[{name:n,description:a}]}]}})}(t.convertParamsToDestructuredObject||(t.convertParamsToDestructuredObject={}))}(e.refactor||(e.refactor={}))}(c||(c={})),function(e){function t(t,n,i,a){var o=e.isNodeKind(t)?new r(t,n,i):72===t?new u(72,n,i):new c(t,n,i);return o.parent=a,o.flags=12679168&a.flags,o}e.servicesVersion="0.8";var r=function(){function r(e,t,r){this.pos=t,this.end=r,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}return r.prototype.assertHasRealPosition=function(t){e.Debug.assert(!e.positionIsSynthesized(this.pos)&&!e.positionIsSynthesized(this.end),t||"Node must have a real position for this operation")},r.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},r.prototype.getStart=function(t,r){return this.assertHasRealPosition(),e.getTokenPosOfNode(this,t,r)},r.prototype.getFullStart=function(){return this.assertHasRealPosition(),this.pos},r.prototype.getEnd=function(){return this.assertHasRealPosition(),this.end},r.prototype.getWidth=function(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)},r.prototype.getFullWidth=function(){return this.assertHasRealPosition(),this.end-this.pos},r.prototype.getLeadingTriviaWidth=function(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos},r.prototype.getFullText=function(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)},r.prototype.getText=function(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())},r.prototype.getChildCount=function(e){return this.getChildren(e).length},r.prototype.getChildAt=function(e,t){return this.getChildren(t)[e]},r.prototype.getChildren=function(r){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=function(r,i){if(!e.isNodeKind(r.kind))return e.emptyArray;var a=[];if(e.isJSDocCommentContainingNode(r))return r.forEachChild(function(e){a.push(e)}),a;e.scanner.setText((i||r.getSourceFile()).text);var o=r.pos,s=function(e){n(a,o,e.pos,r),a.push(e),o=e.end};return e.forEach(r.jsDoc,s),o=r.pos,r.forEachChild(s,function(e){n(a,o,e.pos,r),a.push(function(e,r){var i=t(311,e.pos,e.end,r);i._children=[];for(var a=e.pos,o=0,s=e;o<s.length;o++){var c=s[o];n(i._children,a,c.pos,r),i._children.push(c),a=c.end}return n(i._children,a,e.end,r),i}(e,r)),o=e.end}),n(a,o,r.end,r),e.scanner.setText(void 0),a}(this,r))},r.prototype.getFirstToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t);if(r.length){var n=e.find(r,function(e){return e.kind<288||e.kind>310});return n.kind<148?n:n.getFirstToken(t)}},r.prototype.getLastToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t),n=e.lastOrUndefined(r);if(n)return n.kind<148?n:n.getLastToken(t)},r.prototype.forEachChild=function(t,r){return e.forEachChild(this,t,r)},r}();function n(r,n,i,a){for(e.scanner.setTextPos(n);n<i;){var o=e.scanner.scan(),s=e.scanner.getTextPos();if(s<=i&&(72===o&&e.Debug.fail("Did not expect "+e.Debug.showSyntaxKind(a)+" to have an Identifier in its trivia"),r.push(t(o,n,s,a))),n=s,1===o)break}}var a=function(){function t(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}return t.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},t.prototype.getStart=function(t,r){return e.getTokenPosOfNode(this,t,r)},t.prototype.getFullStart=function(){return this.pos},t.prototype.getEnd=function(){return this.end},t.prototype.getWidth=function(e){return this.getEnd()-this.getStart(e)},t.prototype.getFullWidth=function(){return this.end-this.pos},t.prototype.getLeadingTriviaWidth=function(e){return this.getStart(e)-this.pos},t.prototype.getFullText=function(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)},t.prototype.getText=function(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())},t.prototype.getChildCount=function(){return 0},t.prototype.getChildAt=function(){},t.prototype.getChildren=function(){return 1===this.kind&&this.jsDoc||e.emptyArray},t.prototype.getFirstToken=function(){},t.prototype.getLastToken=function(){},t.prototype.forEachChild=function(){},t}(),o=function(){function t(e,t){this.flags=e,this.escapedName=t}return t.prototype.getFlags=function(){return this.flags},Object.defineProperty(t.prototype,"name",{get:function(){return e.symbolName(this)},enumerable:!0,configurable:!0}),t.prototype.getEscapedName=function(){return this.escapedName},t.prototype.getName=function(){return this.name},t.prototype.getDeclarations=function(){return this.declarations},t.prototype.getDocumentationComment=function(t){return this.documentationComment||(this.documentationComment=e.emptyArray,this.documentationComment=p(this.declarations,t)),this.documentationComment},t.prototype.getJsDocTags=function(){return void 0===this.tags&&(this.tags=e.JsDoc.getJsDocTagsFromDeclarations(this.declarations)),this.tags},t}(),c=function(e){function t(t,r,n){var i=e.call(this,r,n)||this;return i.kind=t,i}return s(t,e),t}(a),u=function(t){function r(e,r,n){return t.call(this,r,n)||this}return s(r,t),Object.defineProperty(r.prototype,"text",{get:function(){return e.idText(this)},enumerable:!0,configurable:!0}),r}(a);u.prototype.kind=72;var l=function(){function t(e,t){this.checker=e,this.flags=t}return t.prototype.getFlags=function(){return this.flags},t.prototype.getSymbol=function(){return this.symbol},t.prototype.getProperties=function(){return this.checker.getPropertiesOfType(this)},t.prototype.getProperty=function(e){return this.checker.getPropertyOfType(this,e)},t.prototype.getApparentProperties=function(){return this.checker.getAugmentedPropertiesOfType(this)},t.prototype.getCallSignatures=function(){return this.checker.getSignaturesOfType(this,0)},t.prototype.getConstructSignatures=function(){return this.checker.getSignaturesOfType(this,1)},t.prototype.getStringIndexType=function(){return this.checker.getIndexTypeOfType(this,0)},t.prototype.getNumberIndexType=function(){return this.checker.getIndexTypeOfType(this,1)},t.prototype.getBaseTypes=function(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0},t.prototype.getNonNullableType=function(){return this.checker.getNonNullableType(this)},t.prototype.getConstraint=function(){return this.checker.getBaseConstraintOfType(this)},t.prototype.getDefault=function(){return this.checker.getDefaultFromTypeParameter(this)},t.prototype.isUnion=function(){return!!(1048576&this.flags)},t.prototype.isIntersection=function(){return!!(2097152&this.flags)},t.prototype.isUnionOrIntersection=function(){return!!(3145728&this.flags)},t.prototype.isLiteral=function(){return!!(384&this.flags)},t.prototype.isStringLiteral=function(){return!!(128&this.flags)},t.prototype.isNumberLiteral=function(){return!!(256&this.flags)},t.prototype.isTypeParameter=function(){return!!(262144&this.flags)},t.prototype.isClassOrInterface=function(){return!!(3&e.getObjectFlags(this))},t.prototype.isClass=function(){return!!(1&e.getObjectFlags(this))},t}(),_=function(){function t(e){this.checker=e}return t.prototype.getDeclaration=function(){return this.declaration},t.prototype.getTypeParameters=function(){return this.typeParameters},t.prototype.getParameters=function(){return this.parameters},t.prototype.getReturnType=function(){return this.checker.getReturnTypeOfSignature(this)},t.prototype.getDocumentationComment=function(){return this.documentationComment||(this.documentationComment=p(e.singleElementArray(this.declaration),this.checker))},t.prototype.getJsDocTags=function(){return void 0===this.jsDocTags&&(this.jsDocTags=this.declaration?e.JsDoc.getJsDocTagsFromDeclarations([this.declaration]):[]),this.jsDocTags},t}();function d(t){return e.getJSDocTags(t).some(function(e){return"inheritDoc"===e.tagName.text})}function p(t,r){if(!t)return e.emptyArray;var n=e.JsDoc.getJsDocCommentsFromDeclarations(t);if(0===n.length||t.some(d))for(var i=0,a=t;i<a.length;i++){var o=a[i],s=f(o,o.symbol.name,r);s&&(n=0===n.length?s.slice():s.concat(e.lineBreakPart(),n))}return n}function f(t,r,n){return e.firstDefined(t.parent?e.getAllSuperTypeNodes(t.parent):e.emptyArray,function(e){var t=n.getTypeAtLocation(e),i=t&&n.getPropertyOfType(t,r),a=i&&i.getDocumentationComment(n);return a&&a.length?a:void 0})}var m=function(t){function r(e,r,n){return t.call(this,e,r,n)||this}return s(r,t),r.prototype.update=function(t,r){return e.updateSourceFile(this,t,r)},r.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},r.prototype.getLineStarts=function(){return e.getLineStarts(this)},r.prototype.getPositionOfLineAndCharacter=function(t,r,n){return e.computePositionOfLineAndCharacter(e.getLineStarts(this),t,r,this.text,n)},r.prototype.getLineEndOfPosition=function(e){var t,r=this.getLineAndCharacterOfPosition(e).line,n=this.getLineStarts();r+1>=n.length&&(t=this.getEnd()),t||(t=n[r+1]-1);var i=this.getFullText();return"\n"===i[t]&&"\r"===i[t-1]?t-1:t},r.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},r.prototype.computeNamedDeclarations=function(){var t=e.createMultiMap();return this.forEachChild(function i(a){switch(a.kind){case 239:case 196:case 156:case 155:var o=a,s=n(o);if(s){var c=function(e){var r=t.get(e);r||t.set(e,r=[]);return r}(s),u=e.lastOrUndefined(c);u&&o.parent===u.parent&&o.symbol===u.symbol?o.body&&!u.body&&(c[c.length-1]=o):c.push(o)}e.forEachChild(a,i);break;case 240:case 209:case 241:case 242:case 243:case 244:case 248:case 257:case 253:case 250:case 251:case 158:case 159:case 168:r(a),e.forEachChild(a,i);break;case 151:if(!e.hasModifier(a,92))break;case 237:case 186:var l=a;if(e.isBindingPattern(l.name)){e.forEachChild(l.name,i);break}l.initializer&&i(l.initializer);case 278:case 154:case 153:r(a);break;case 255:a.exportClause&&e.forEach(a.exportClause.elements,i);break;case 249:var _=a.importClause;_&&(_.name&&r(_.name),_.namedBindings&&(251===_.namedBindings.kind?r(_.namedBindings):e.forEach(_.namedBindings.elements,i)));break;case 204:0!==e.getAssignmentDeclarationKind(a)&&r(a);default:e.forEachChild(a,i)}}),t;function r(e){var r=n(e);r&&t.add(r,e)}function n(t){var r=e.getNonAssignedNameOfDeclaration(t);return r&&(e.isComputedPropertyName(r)&&e.isPropertyAccessExpression(r.expression)?r.expression.name.text:e.isPropertyName(r)?e.getNameFromPropertyName(r):void 0)}},r}(r),g=function(){function t(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}return t.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},t}();function y(t){var r=!0;for(var n in t)if(e.hasProperty(t,n)&&!h(n)){r=!1;break}if(r)return t;var i={};for(var n in t){if(e.hasProperty(t,n))i[h(n)?n:n.charAt(0).toLowerCase()+n.substr(1)]=t[n]}return i}function h(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function v(){return{target:1,jsx:1}}e.toEditorSettings=y,e.displayPartsToString=function(t){return t?e.map(t,function(e){return e.text}).join(""):""},e.getDefaultCompilerOptions=v,e.getSupportedCodeFixes=function(){return e.codefix.getSupportedErrorCodes()};var b=function(){function t(t,r){this.host=t,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=e.createMap();for(var n=0,i=t.getScriptFileNames();n<i.length;n++){var a=i[n];this.createEntry(a,e.toPath(a,this.currentDirectory,r))}this._compilationSettings=t.getCompilationSettings()||{target:1,jsx:1}}return t.prototype.compilationSettings=function(){return this._compilationSettings},t.prototype.getProjectReferences=function(){return this.host.getProjectReferences&&this.host.getProjectReferences()},t.prototype.createEntry=function(t,r){var n,i=this.host.getScriptSnapshot(t);return n=i?{hostFileName:t,version:this.host.getScriptVersion(t),scriptSnapshot:i,scriptKind:e.getScriptKind(t,this.host)}:t,this.fileNameToEntry.set(r,n),n},t.prototype.getEntryByPath=function(e){return this.fileNameToEntry.get(e)},t.prototype.getHostFileInformation=function(t){var r=this.fileNameToEntry.get(t);return e.isString(r)?void 0:r},t.prototype.getOrCreateEntryByPath=function(t,r){var n=this.getEntryByPath(r)||this.createEntry(t,r);return e.isString(n)?void 0:n},t.prototype.getRootFileNames=function(){var t=[];return this.fileNameToEntry.forEach(function(r){e.isString(r)?t.push(r):6!==r.scriptKind&&t.push(r.hostFileName)}),t},t.prototype.getVersion=function(e){var t=this.getHostFileInformation(e);return t&&t.version},t.prototype.getScriptSnapshot=function(e){var t=this.getHostFileInformation(e);return t&&t.scriptSnapshot},t}(),D=function(){function t(e){this.host=e}return t.prototype.getCurrentSourceFile=function(t){var r=this.host.getScriptSnapshot(t);if(!r)throw new Error("Could not find file: '"+t+"'.");var n,i=e.getScriptKind(t,this.host),a=this.host.getScriptVersion(t);if(this.currentFileName!==t)n=S(t,r,7,a,!0,i);else if(this.currentFileVersion!==a){var o=r.getChangeRange(this.currentFileScriptSnapshot);n=T(this.currentSourceFile,r,a,o)}return n&&(this.currentFileVersion=a,this.currentFileName=t,this.currentFileScriptSnapshot=r,this.currentSourceFile=n),this.currentSourceFile},t}();function x(e,t,r){e.version=r,e.scriptSnapshot=t}function S(t,r,n,i,a,o){var s=e.createSourceFile(t,e.getSnapshotText(r),n,a,o);return x(s,r,i),s}function T(t,r,n,i,a){if(i&&n!==t.version&&!e.disableIncrementalParsing){var o=void 0,s=0!==i.span.start?t.text.substr(0,i.span.start):"",c=e.textSpanEnd(i.span)!==t.text.length?t.text.substr(e.textSpanEnd(i.span)):"";if(0===i.newLength)o=s&&c?s+c:s||c;else{var u=r.getText(i.span.start,i.span.start+i.newLength);o=s&&c?s+u+c:s?s+u:u+c}var l=e.updateSourceFile(t,o,i,a);return x(l,r,n),l.nameTable=void 0,t!==l&&t.scriptSnapshot&&(t.scriptSnapshot.dispose&&t.scriptSnapshot.dispose(),t.scriptSnapshot=void 0),l}return S(t.fileName,r,t.languageVersion,n,!0,t.scriptKind)}e.createLanguageServiceSourceFile=S,e.disableIncrementalParsing=!1,e.updateLanguageServiceSourceFile=T;var C=function(){function t(e){this.cancellationToken=e}return t.prototype.isCancellationRequested=function(){return!!this.cancellationToken&&this.cancellationToken.isCancellationRequested()},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}(),E=function(){function t(e,t){void 0===t&&(t=20),this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}return t.prototype.isCancellationRequested=function(){var t=e.timestamp();return Math.abs(t-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested())},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();function k(t){var r=function(t){switch(t.kind){case 10:case 8:if(149===t.parent.kind)return e.isObjectLiteralElement(t.parent.parent)?t.parent.parent:void 0;case 72:return!e.isObjectLiteralElement(t.parent)||188!==t.parent.parent.kind&&268!==t.parent.parent.kind||t.parent.name!==t?void 0:t.parent}return}(t);return r&&(e.isObjectLiteralExpression(r.parent)||e.isJsxAttributes(r.parent))?r:void 0}function N(t,r,n,i){var a=e.getNameFromPropertyName(t.name);if(!a)return e.emptyArray;if(!n.isUnion())return(o=n.getProperty(a))?[o]:e.emptyArray;var o,s=e.mapDefined(n.types,function(n){return e.isObjectLiteralExpression(t.parent)&&r.isTypeInvalidDueToUnionDiscriminant(n,t.parent)?void 0:n.getProperty(a)});if(i&&(0===s.length||s.length===n.types.length)&&(o=n.getProperty(a)))return[o];return 0===s.length?e.mapDefined(n.types,function(e){return e.getProperty(a)}):s}e.ThrottledCancellationToken=E,e.createLanguageService=function(t,r,n){var a;void 0===r&&(r=e.createDocumentRegistry(t.useCaseSensitiveFileNames&&t.useCaseSensitiveFileNames(),t.getCurrentDirectory())),void 0===n&&(n=!1);var o,s,c=new D(t),u=0,l=new C(t.getCancellationToken&&t.getCancellationToken()),_=t.getCurrentDirectory();function d(e){t.log&&t.log(e)}!e.localizedDiagnosticMessages&&t.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=t.getLocalizedDiagnosticMessages());var p=e.hostUsesCaseSensitiveFileNames(t),f=e.createGetCanonicalFileName(p),m=e.getSourceMapper({useCaseSensitiveFileNames:function(){return p},getCurrentDirectory:function(){return _},getProgram:v,fileExists:t.fileExists&&function(e){return t.fileExists(e)},readFile:t.readFile&&function(e,r){return t.readFile(e,r)},getDocumentPositionMapper:t.getDocumentPositionMapper&&function(e,r){return t.getDocumentPositionMapper(e,r)},getSourceFileLike:t.getSourceFileLike&&function(e){return t.getSourceFileLike(e)},log:d});function g(e){var t=o.getSourceFile(e);if(!t)throw new Error("Could not find sourceFile: '"+e+"' in "+(o&&JSON.stringify(o.getSourceFiles().map(function(e){return e.fileName})))+".");return t}function h(){if(e.Debug.assert(!n),t.getProjectVersion){var i=t.getProjectVersion();if(i){if(s===i&&!t.hasChangedAutomaticTypeDirectiveNames)return;s=i}}var a=t.getTypeRootsVersion?t.getTypeRootsVersion():0;u!==a&&(d("TypeRoots version has changed; provide new program"),o=void 0,u=a);var c=new b(t,f),g=c.getRootFileNames(),y=t.hasInvalidatedResolution||e.returnFalse,h=c.getProjectReferences();if(!e.isProgramUptoDate(o,g,c.compilationSettings(),function(e){return c.getVersion(e)},T,y,!!t.hasChangedAutomaticTypeDirectiveNames,h)){var v=c.compilationSettings(),D={getSourceFile:function(t,r,n,i){return C(t,e.toPath(t,_,f),0,0,i)},getSourceFileByPath:C,getCancellationToken:function(){return l},getCanonicalFileName:f,useCaseSensitiveFileNames:function(){return p},getNewLine:function(){return e.getNewLineCharacter(v,function(){return e.getNewLineOrDefaultFromHost(t)})},getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:e.noop,getCurrentDirectory:function(){return _},fileExists:T,readFile:function(r){var n=e.toPath(r,_,f),i=c&&c.getEntryByPath(n);return i?e.isString(i)?void 0:e.getSnapshotText(i.scriptSnapshot):t.readFile&&t.readFile(r)},realpath:t.realpath&&function(e){return t.realpath(e)},directoryExists:function(r){return e.directoryProbablyExists(r,t)},getDirectories:function(e){return t.getDirectories?t.getDirectories(e):[]},readDirectory:function(r,n,i,a,o){return e.Debug.assertDefined(t.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(r,n,i,a,o)},onReleaseOldSourceFile:function(e,t){var n=r.getKeyForCompilationSettings(t);r.releaseDocumentWithKey(e.resolvedPath,n)},hasInvalidatedResolution:y,hasChangedAutomaticTypeDirectiveNames:t.hasChangedAutomaticTypeDirectiveNames};t.trace&&(D.trace=function(e){return t.trace(e)}),t.resolveModuleNames&&(D.resolveModuleNames=function(e,r,n,i){return t.resolveModuleNames(e,r,n,i)}),t.resolveTypeReferenceDirectives&&(D.resolveTypeReferenceDirectives=function(e,r,n){return t.resolveTypeReferenceDirectives(e,r,n)});var x=r.getKeyForCompilationSettings(v),S={rootNames:g,options:v,host:D,oldProgram:o,projectReferences:h};return o=e.createProgram(S),c=void 0,m.clearCache(),void o.getTypeChecker()}function T(r){var n=e.toPath(r,_,f),i=c&&c.getEntryByPath(n);return i?!e.isString(i):!!t.fileExists&&t.fileExists(r)}function C(t,n,i,a,s){e.Debug.assert(void 0!==c,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");var u=c&&c.getOrCreateEntryByPath(t,n);if(u){if(!s){var l=o&&o.getSourceFileByPath(n);if(l)return e.Debug.assertEqual(u.scriptKind,l.scriptKind,"Registered script kind should match new script kind.",n),r.updateDocumentWithKey(t,n,v,x,u.scriptSnapshot,u.version,u.scriptKind)}return r.acquireDocumentWithKey(t,n,v,x,u.scriptSnapshot,u.version,u.scriptKind)}}}function v(){if(!n)return h(),o;e.Debug.assert(void 0===o)}function x(t,r,n){var i=e.normalizePath(t);e.Debug.assert(n.some(function(t){return e.normalizePath(t)===i})),h();var a=n.map(g),s=g(t);return e.DocumentHighlights.getDocumentHighlights(o,l,s,r,a)}function S(t,r,n,i){h();var a=n&&n.isForRename?o.getSourceFiles().filter(function(e){return!o.isSourceFileDefaultLibrary(e)}):o.getSourceFiles();return e.FindAllReferences.findReferenceOrRenameEntries(o,l,a,t,r,n,i)}function T(r){var n=e.getScriptKind(r,t);return 3===n||4===n}var E=e.createMapFromTemplate(((a={})[18]=19,a[20]=21,a[22]=23,a[30]=28,a));function A(r,n){var i=function(t){return e.toPath(t,_,f)};switch(r.type){case"install package":return t.installPackage?t.installPackage({fileName:i(r.file),packageName:r.packageName}):Promise.reject("Host does not implement `installPackage`");case"generate types":var a=r.fileToGenerateTypesFor,o=r.outputFileName;return t.inspectValue?t.inspectValue({fileNameToRequire:a}).then(function(r){var a=i(o);return t.writeFile(a,e.valueInfoToDeclarationFileText(r,n||e.testFormatSettings)),{successMessage:"Wrote types to '"+a+"'"}}):Promise.reject("Host does not implement `installPackage`");default:return e.Debug.assertNever(r)}}function F(r,n,i,a){var o="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:r,startPosition:o[0],endPosition:o[1],program:v(),host:t,formatContext:e.formatting.getFormatContext(a),cancellationToken:l,preferences:i}}return E.forEach(function(e,t){return E.set(e.toString(),Number(t))}),{dispose:function(){o&&(e.forEach(o.getSourceFiles(),function(e){return r.releaseDocument(e.fileName,o.getCompilerOptions())}),o=void 0),t=void 0},cleanupSemanticCache:function(){o=void 0},getSyntacticDiagnostics:function(e){return h(),o.getSyntacticDiagnostics(g(e),l).slice()},getSemanticDiagnostics:function(t){h();var r=g(t),n=o.getSemanticDiagnostics(r,l);if(!e.getEmitDeclarations(o.getCompilerOptions()))return n.slice();var i=o.getDeclarationDiagnostics(r,l);return n.concat(i)},getSuggestionDiagnostics:function(t){return h(),e.computeSuggestionDiagnostics(g(t),o,l)},getCompilerOptionsDiagnostics:function(){return h(),o.getOptionsDiagnostics(l).concat(o.getGlobalDiagnostics(l))},getSyntacticClassifications:function(t,r){return e.getSyntacticClassifications(l,c.getCurrentSourceFile(t),r)},getSemanticClassifications:function(t,r){return T(t)?(h(),e.getSemanticClassifications(o.getTypeChecker(),l,g(t),o.getClassifiableNames(),r)):[]},getEncodedSyntacticClassifications:function(t,r){return e.getEncodedSyntacticClassifications(l,c.getCurrentSourceFile(t),r)},getEncodedSemanticClassifications:function(t,r){return T(t)?(h(),e.getEncodedSemanticClassifications(o.getTypeChecker(),l,g(t),o.getClassifiableNames(),r)):{spans:[],endOfLineState:0}},getCompletionsAtPosition:function(r,n,a){void 0===a&&(a=e.emptyOptions);var s=i({},e.identity(a),{includeCompletionsForModuleExports:a.includeCompletionsForModuleExports||a.includeExternalModuleExports,includeCompletionsWithInsertText:a.includeCompletionsWithInsertText||a.includeInsertTextCompletions});return h(),e.Completions.getCompletionsAtPosition(t,o,d,g(r),n,s,a.triggerCharacter)},getCompletionEntryDetails:function(r,n,i,a,s,c){return void 0===c&&(c=e.emptyOptions),h(),e.Completions.getCompletionEntryDetails(o,d,g(r),n,{name:i,source:s},t,a&&e.formatting.getFormatContext(a),c,l)},getCompletionEntrySymbol:function(t,r,n,i){return h(),e.Completions.getCompletionEntrySymbol(o,d,g(t),r,{name:n,source:i})},getSignatureHelpItems:function(t,r,n){var i=(void 0===n?e.emptyOptions:n).triggerReason;h();var a=g(t);return e.SignatureHelp.getSignatureHelpItems(o,a,r,i,l)},getQuickInfoAtPosition:function(t,r){h();var n=g(t),i=e.getTouchingPropertyName(n,r);if(i!==n){var a=o.getTypeChecker(),s=function(t,r){var n=k(t);if(n){var i=r.getContextualType(n.parent),a=i&&N(n,r,i,!1);if(a&&1===a.length)return e.first(a)}return r.getSymbolAtLocation(t)}(i,a);if(!s||a.isUnknownSymbol(s)){var c=function(t,r,n){switch(r.kind){case 72:return!e.isLabelName(r)&&!e.isTagName(r);case 189:case 148:return!e.isInComment(t,n);case 100:case 178:case 98:return!0;default:return!1}}(n,i,r)?a.getTypeAtLocation(i):void 0;return c&&{kind:"",kindModifiers:"",textSpan:e.createTextSpanFromNode(i,n),displayParts:a.runWithCancellationToken(l,function(t){return e.typeToDisplayParts(t,c,e.getContainerNode(i))}),documentation:c.symbol?c.symbol.getDocumentationComment(a):void 0,tags:c.symbol?c.symbol.getJsDocTags():void 0}}var u=a.runWithCancellationToken(l,function(t){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(t,s,n,e.getContainerNode(i),i)}),_=u.symbolKind,d=u.displayParts,p=u.documentation,f=u.tags;return{kind:_,kindModifiers:e.SymbolDisplay.getSymbolModifiers(s),textSpan:e.createTextSpanFromNode(i,n),displayParts:d,documentation:p,tags:f}}},getDefinitionAtPosition:function(t,r){return h(),e.GoToDefinition.getDefinitionAtPosition(o,g(t),r)},getDefinitionAndBoundSpan:function(t,r){return h(),e.GoToDefinition.getDefinitionAndBoundSpan(o,g(t),r)},getImplementationAtPosition:function(t,r){return h(),e.FindAllReferences.getImplementationsAtPosition(o,l,o.getSourceFiles(),g(t),r)},getTypeDefinitionAtPosition:function(t,r){return h(),e.GoToDefinition.getTypeDefinitionAtPosition(o.getTypeChecker(),g(t),r)},getReferencesAtPosition:function(t,r){return h(),S(e.getTouchingPropertyName(g(t),r),r,{},e.FindAllReferences.toReferenceEntry)},findReferences:function(t,r){return h(),e.FindAllReferences.findReferencedSymbols(o,l,o.getSourceFiles(),g(t),r)},getOccurrencesAtPosition:function(t,r){return e.flatMap(x(t,r,[t]),function(e){return e.highlightSpans.map(function(t){return{fileName:e.fileName,textSpan:t.textSpan,isWriteAccess:"writtenReference"===t.kind,isDefinition:!1,isInString:t.isInString}})})},getDocumentHighlights:x,getNameOrDottedNameSpan:function(t,r,n){var i=c.getCurrentSourceFile(t),a=e.getTouchingPropertyName(i,r);if(a!==i){switch(a.kind){case 189:case 148:case 10:case 87:case 102:case 96:case 98:case 100:case 178:case 72:break;default:return}for(var o=a;;)if(e.isRightSideOfPropertyAccess(o)||e.isRightSideOfQualifiedName(o))o=o.parent;else{if(!e.isNameOfModuleDeclaration(o))break;if(244!==o.parent.parent.kind||o.parent.parent.body!==o.parent)break;o=o.parent.parent.name}return e.createTextSpanFromBounds(o.getStart(),a.getEnd())}},getBreakpointStatementAtPosition:function(t,r){var n=c.getCurrentSourceFile(t);return e.BreakpointResolver.spanInSourceFileAtLocation(n,r)},getNavigateToItems:function(t,r,n,i){void 0===i&&(i=!1),h();var a=n?[g(n)]:o.getSourceFiles();return e.NavigateTo.getNavigateToItems(a,o.getTypeChecker(),l,t,r,i)},getRenameInfo:function(t,r,n){return h(),e.Rename.getRenameInfo(o,g(t),r,n)},findRenameLocations:function(t,r,n,i,a){h();var o=g(t),s=e.getTouchingPropertyName(o,r);if(e.isIdentifier(s)&&(e.isJsxOpeningElement(s.parent)||e.isJsxClosingElement(s.parent))&&e.isIntrinsicJsxName(s.escapedText)){var c=s.parent.parent;return[c.openingElement,c.closingElement].map(function(t){return{fileName:o.fileName,textSpan:e.createTextSpanFromNode(t.tagName,o)}})}return S(s,r,{findInStrings:n,findInComments:i,providePrefixAndSuffixTextForRename:a,isForRename:!0},function(t,r,n){return e.FindAllReferences.toRenameLocation(t,r,n,a||!1)})},getNavigationBarItems:function(t){return e.NavigationBar.getNavigationBarItems(c.getCurrentSourceFile(t),l)},getNavigationTree:function(t){return e.NavigationBar.getNavigationTree(c.getCurrentSourceFile(t),l)},getOutliningSpans:function(t){var r=c.getCurrentSourceFile(t);return e.OutliningElementsCollector.collectElements(r,l)},getTodoComments:function(t,r){h();var n=g(t);l.throwIfCancellationRequested();var i,a,o=n.text,s=[];if(r.length>0&&(a=n.fileName,!e.stringContains(a,"/node_modules/")))for(var c=function(){var t="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+e.map(r,function(e){return"("+e.text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")"}).join("|")+")";return new RegExp(t+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}(),u=void 0;u=c.exec(o);){l.throwIfCancellationRequested(),e.Debug.assert(u.length===r.length+3);var _=u[1],d=u.index+_.length;if(e.isInComment(n,d)){for(var p=void 0,f=0;f<r.length;f++)u[f+3]&&(p=r[f]);if(void 0===p)return e.Debug.fail();if(!((i=o.charCodeAt(d+p.text.length))>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){var m=u[2];s.push({descriptor:p,message:m,position:d})}}}return s},getBraceMatchingAtPosition:function(t,r){var n=c.getCurrentSourceFile(t),i=e.getTouchingToken(n,r),a=i.getStart(n)===r?E.get(i.kind.toString()):void 0,o=a&&e.findChildOfKind(i.parent,a,n);return o?[e.createTextSpanFromNode(i,n),e.createTextSpanFromNode(o,n)].sort(function(e,t){return e.start-t.start}):e.emptyArray},getIndentationAtPosition:function(t,r,n){var i=e.timestamp(),a=y(n),o=c.getCurrentSourceFile(t);d("getIndentationAtPosition: getCurrentSourceFile: "+(e.timestamp()-i)),i=e.timestamp();var s=e.formatting.SmartIndenter.getIndentation(r,o,a);return d("getIndentationAtPosition: computeIndentation : "+(e.timestamp()-i)),s},getFormattingEditsForRange:function(t,r,n,i){var a=c.getCurrentSourceFile(t);return e.formatting.formatSelection(r,n,a,e.formatting.getFormatContext(y(i)))},getFormattingEditsForDocument:function(t,r){return e.formatting.formatDocument(c.getCurrentSourceFile(t),e.formatting.getFormatContext(y(r)))},getFormattingEditsAfterKeystroke:function(t,r,n,i){var a=c.getCurrentSourceFile(t),o=e.formatting.getFormatContext(y(i));if(!e.isInComment(a,r))switch(n){case"{":return e.formatting.formatOnOpeningCurly(r,a,o);case"}":return e.formatting.formatOnClosingCurly(r,a,o);case";":return e.formatting.formatOnSemicolon(r,a,o);case"\n":return e.formatting.formatOnEnter(r,a,o)}return[]},getDocCommentTemplateAtPosition:function(r,n){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(t),c.getCurrentSourceFile(r),n)},isValidBraceCompletionAtPosition:function(t,r,n){if(60===n)return!1;var i=c.getCurrentSourceFile(t);if(e.isInString(i,r))return!1;if(e.isInsideJsxElementOrAttribute(i,r))return 123===n;if(e.isInTemplateString(i,r))return!1;switch(n){case 39:case 34:case 96:return!e.isInComment(i,r)}return!0},getJsxClosingTagAtPosition:function(t,r){var n=c.getCurrentSourceFile(t),i=e.findPrecedingToken(r,n);if(i){var a=30===i.kind&&e.isJsxOpeningElement(i.parent)?i.parent.parent:e.isJsxText(i)?i.parent:void 0;return a&&function t(r){var n=r.openingElement,i=r.closingElement,a=r.parent;return!e.tagNamesAreEquivalent(n.tagName,i.tagName)||e.isJsxElement(a)&&e.tagNamesAreEquivalent(n.tagName,a.openingElement.tagName)&&t(a)}(a)?{newText:"</"+a.openingElement.tagName.getText(n)+">"}:void 0}},getSpanOfEnclosingComment:function(t,r,n){var i=c.getCurrentSourceFile(t),a=e.formatting.getRangeOfEnclosingComment(i,r);return!a||n&&3!==a.kind?void 0:e.createTextSpanFromRange(a)},getCodeFixesAtPosition:function(r,n,i,a,s,c){void 0===c&&(c=e.emptyOptions),h();var u=g(r),_=e.createTextSpanFromBounds(n,i),d=e.formatting.getFormatContext(s);return e.flatMap(e.deduplicate(a,e.equateValues,e.compareValues),function(r){return l.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:r,sourceFile:u,span:_,program:o,host:t,cancellationToken:l,formatContext:d,preferences:c})})},getCombinedCodeFix:function(r,n,i,a){void 0===a&&(a=e.emptyOptions),h(),e.Debug.assert("file"===r.type);var s=g(r.fileName),c=e.formatting.getFormatContext(i);return e.codefix.getAllFixes({fixId:n,sourceFile:s,program:o,host:t,cancellationToken:l,formatContext:c,preferences:a})},applyCodeActionCommand:function(t,r){var n="string"==typeof t?r:t,i="string"!=typeof t?r:void 0;return e.isArray(n)?Promise.all(n.map(function(e){return A(e,i)})):A(n,i)},organizeImports:function(r,n,i){void 0===i&&(i=e.emptyOptions),h(),e.Debug.assert("file"===r.type);var a=g(r.fileName),s=e.formatting.getFormatContext(n);return e.OrganizeImports.organizeImports(a,s,t,o,i)},getEditsForFileRename:function(r,n,i,a){return void 0===a&&(a=e.emptyOptions),e.getEditsForFileRename(v(),r,n,t,e.formatting.getFormatContext(i),a,m)},getEmitOutput:function(r,n){void 0===n&&(n=!1),h();var i=g(r),a=t.getCustomTransformers&&t.getCustomTransformers();return e.getFileEmitOutput(o,i,n,l,a)},getNonBoundSourceFile:function(e){return c.getCurrentSourceFile(e)},getProgram:v,getApplicableRefactors:function(t,r,n){void 0===n&&(n=e.emptyOptions),h();var i=g(t);return e.refactor.getApplicableRefactors(F(i,r,n))},getEditsForRefactor:function(t,r,n,i,a,o){void 0===o&&(o=e.emptyOptions),h();var s=g(t);return e.refactor.getEditsForRefactor(F(s,n,o,r),i,a)},toLineColumnOffset:m.toLineColumnOffset,getSourceMapper:function(){return m}}},e.getNameTable=function(t){return t.nameTable||function(t){var r=t.nameTable=e.createUnderscoreEscapedMap();t.forEachChild(function t(n){if(e.isIdentifier(n)&&!e.isTagName(n)&&n.escapedText||e.isStringOrNumericLiteralLike(n)&&function(t){return e.isDeclarationName(t)||259===t.parent.kind||function(e){return e&&e.parent&&190===e.parent.kind&&e.parent.argumentExpression===e}(t)||e.isLiteralComputedPropertyDeclarationName(t)}(n)){var i=e.getEscapedTextOfIdentifierOrLiteral(n);r.set(i,void 0===r.get(i)?n.pos:-1)}if(e.forEachChild(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a<o.length;a++){var s=o[a];e.forEachChild(s,t)}})}(t),t.nameTable},e.getContainingObjectLiteralElement=k,e.getPropertySymbolsFromContextualType=N,e.getDefaultLibFilePath=function(t){if(void 0!==xe)return xe+e.directorySeparator+e.getDefaultLibFileName(t);throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")},e.objectAllocator={getNodeConstructor:function(){return r},getTokenConstructor:function(){return c},getIdentifierConstructor:function(){return u},getSourceFileConstructor:function(){return m},getSymbolConstructor:function(){return o},getTypeConstructor:function(){return l},getSignatureConstructor:function(){return _},getSourceMapSourceConstructor:function(){return g}}}(c||(c={})),function(e){!function(t){t.spanInSourceFileAtLocation=function(t,r){if(!t.isDeclarationFile){var n=e.getTokenAtPosition(t,r),i=t.getLineAndCharacterOfPosition(r).line;if(t.getLineAndCharacterOfPosition(n.getStart(t)).line>i){var a=e.findPrecedingToken(n.pos,t);if(!a||t.getLineAndCharacterOfPosition(a.getEnd()).line!==i)return;n=a}if(!(4194304&n.flags))return _(n)}function o(r,n){var i=r.decorators?e.skipTrivia(t.text,r.decorators.end):r.getStart(t);return e.createTextSpanFromBounds(i,(n||r).getEnd())}function s(r,n){return o(r,e.findNextToken(n,n.parent,t))}function c(e,r){return e&&i===t.getLineAndCharacterOfPosition(e.getStart(t)).line?_(e):_(r)}function u(r){return _(e.findPrecedingToken(r.pos,t))}function l(r){return _(e.findNextToken(r,r.parent,t))}function _(r){if(r){var n=r.parent;switch(r.kind){case 219:return D(r.declarationList.declarations[0]);case 237:case 154:case 153:return D(r);case 151:return function t(r){if(e.isBindingPattern(r.name))return C(r.name);if(function(t){return!!t.initializer||void 0!==t.dotDotDotToken||e.hasModifier(t,12)}(r))return o(r);var n=r.parent,i=n.parameters.indexOf(r);return e.Debug.assert(-1!==i),0!==i?t(n.parameters[i-1]):_(n.body)}(r);case 239:case 156:case 155:case 158:case 159:case 157:case 196:case 197:return function(e){if(e.body)return x(e)?o(e):_(e.body)}(r);case 218:if(e.isFunctionBlock(r))return h=(y=r).statements.length?y.statements[0]:y.getLastToken(),x(y.parent)?c(y.parent,h):_(h);case 245:return S(r);case 274:return S(r.block);case 221:return o(r.expression);case 230:return o(r.getChildAt(0),r.expression);case 224:return s(r,r.expression);case 223:return _(r.statement);case 236:return o(r.getChildAt(0));case 222:return s(r,r.expression);case 233:return _(r.statement);case 229:case 228:return o(r.getChildAt(0),r.label);case 225:return(g=r).initializer?T(g):g.condition?o(g.condition):g.incrementor?o(g.incrementor):void 0;case 226:return s(r,r.expression);case 227:return T(r);case 232:return s(r,r.expression);case 271:case 272:return _(r.statements[0]);case 235:return S(r.tryBlock);case 234:case 254:return o(r,r.expression);case 248:return o(r,r.moduleReference);case 249:case 255:return o(r,r.moduleSpecifier);case 244:if(1!==e.getModuleInstanceState(r))return;case 240:case 243:case 278:case 186:return o(r);case 231:return _(r.statement);case 152:return v=n.decorators,e.createTextSpanFromBounds(e.skipTrivia(t.text,v.pos),v.end);case 184:case 185:return C(r);case 241:case 242:return;case 26:case 1:return c(e.findPrecedingToken(r.pos,t));case 27:return u(r);case 18:return function(r){switch(r.parent.kind){case 243:var n=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),n.members.length?n.members[0]:n.getLastToken(t));case 240:var i=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),i.members.length?i.members[0]:i.getLastToken(t));case 246:return c(r.parent.parent,r.parent.clauses[0])}return _(r.parent)}(r);case 19:return function(t){switch(t.parent.kind){case 245:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 243:case 240:return o(t);case 218:if(e.isFunctionBlock(t.parent))return o(t);case 274:return _(e.lastOrUndefined(t.parent.statements));case 246:var r=t.parent,n=e.lastOrUndefined(r.clauses);return n?_(e.lastOrUndefined(n.statements)):void 0;case 184:var i=t.parent;return _(e.lastOrUndefined(i.elements)||i);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var a=t.parent;return o(e.lastOrUndefined(a.properties)||a)}return _(t.parent)}}(r);case 23:return function(t){switch(t.parent.kind){case 185:var r=t.parent;return o(e.lastOrUndefined(r.elements)||r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var n=t.parent;return o(e.lastOrUndefined(n.elements)||n)}return _(t.parent)}}(r);case 20:return function(e){return 223===e.parent.kind||191===e.parent.kind||192===e.parent.kind?u(e):195===e.parent.kind?l(e):_(e.parent)}(r);case 21:return function(e){switch(e.parent.kind){case 196:case 239:case 197:case 156:case 155:case 158:case 159:case 157:case 224:case 223:case 225:case 227:case 191:case 192:case 195:return u(e);default:return _(e.parent)}}(r);case 57:return function(t){return e.isFunctionLike(t.parent)||275===t.parent.kind||151===t.parent.kind?u(t):_(t.parent)}(r);case 30:case 28:return function(e){return 194===e.parent.kind?l(e):_(e.parent)}(r);case 107:return function(e){return 223===e.parent.kind?s(e,e.parent.expression):_(e.parent)}(r);case 83:case 75:case 88:return l(r);case 147:return function(e){return 227===e.parent.kind?l(e):_(e.parent)}(r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(r))return E(r);if((72===r.kind||208===r.kind||275===r.kind||276===r.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return o(r);if(204===r.kind){var i=r,a=i.left,d=i.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a))return E(a);if(59===d.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent))return o(r);if(27===d.kind)return _(a)}if(e.isExpressionNode(r))switch(n.kind){case 223:return u(r);case 152:return _(r.parent);case 225:case 227:return o(r);case 204:if(27===r.parent.operatorToken.kind)return o(r);break;case 197:if(r.parent.body===r)return o(r)}switch(r.parent.kind){case 275:if(r.parent.name===r&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent.parent))return _(r.parent.initializer);break;case 194:if(r.parent.type===r)return l(r.parent.type);break;case 237:case 151:var p=r.parent,f=p.initializer,m=p.type;if(f===r||m===r||e.isAssignmentOperator(r.kind))return u(r);break;case 204:if(a=r.parent.left,e.isArrayLiteralOrObjectLiteralDestructuringPattern(a)&&r!==a)return u(r);break;default:if(e.isFunctionLike(r.parent)&&r.parent.type===r)return u(r)}return _(r.parent)}}var g,y,h,v;function b(r){return e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]===r?o(e.findPrecedingToken(r.pos,t,r.parent),r):o(r)}function D(r){if(226===r.parent.parent.kind)return _(r.parent.parent);var n=r.parent;return e.isBindingPattern(r.name)?C(r.name):r.initializer||e.hasModifier(r,1)||227===n.parent.kind?b(r):e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]!==r?_(e.findPrecedingToken(r.pos,t,r.parent)):void 0}function x(t){return e.hasModifier(t,1)||240===t.parent.kind&&157!==t.kind}function S(r){switch(r.parent.kind){case 244:if(1!==e.getModuleInstanceState(r.parent))return;case 224:case 222:case 226:return c(r.parent,r.statements[0]);case 225:case 227:return c(e.findPrecedingToken(r.pos,t,r.parent),r.statements[0])}return _(r.statements[0])}function T(e){if(238!==e.initializer.kind)return _(e.initializer);var t=e.initializer;return t.declarations.length>0?_(t.declarations[0]):void 0}function C(t){var r=e.forEach(t.elements,function(e){return 210!==e.kind?e:void 0});return r?_(r):186===t.parent.kind?o(t.parent):b(t.parent)}function E(t){e.Debug.assert(185!==t.kind&&184!==t.kind);var r=187===t.kind?t.elements:t.properties,n=e.forEach(r,function(e){return 210!==e.kind?e:void 0});return n?_(n):o(204===t.parent.kind?t.parent:t)}}}}(e.BreakpointResolver||(e.BreakpointResolver={}))}(c||(c={})),function(e){e.transform=function(t,r,n){var i=[];n=e.fixupCompilerOptions(n,i);var a=e.isArray(t)?t:[t],o=e.transformNodes(void 0,void 0,n,a,r,!0);return o.diagnostics=e.concatenate(o.diagnostics,i),o}}(c||(c={}));var c,u,l=function(){return this}();!function(t){function r(e,t){e&&e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}var n=function(){function e(e){this.scriptSnapshotShim=e}return e.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},e.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},e.prototype.getChangeRange=function(e){var r=e,n=this.scriptSnapshotShim.getChangeRange(r.scriptSnapshotShim);if(null===n)return null;var i=JSON.parse(n);return t.createTextChangeRange(t.createTextSpan(i.span.start,i.span.length),i.newLength)},e.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},e}(),i=function(){function e(e){var r=this;this.shimHost=e,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(e,n){var i=JSON.parse(r.shimHost.getModuleResolutionsForFile(n));return t.map(e,function(e){var r=t.getProperty(i,e);return r?{resolvedFileName:r,extension:t.extensionFromPath(r),isExternalLibraryImport:!1}:void 0})}),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return r.shimHost.directoryExists(e)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(e,n){var i=JSON.parse(r.shimHost.getTypeReferenceDirectiveResolutionsForFile(n));return t.map(e,function(e){return t.getProperty(i,e)})})}return e.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},e.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},e.prototype.error=function(e){this.shimHost.error(e)},e.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},e.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},e.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null===e||""===e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var t=JSON.parse(e);return t.allowNonTsExtensions=!0,t},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new n(t)},e.prototype.getScriptKind=function(e){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(e):0},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null===e||""===e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},e.prototype.getCancellationToken=function(){var e=this.shimHost.getCancellationToken();return new t.ThrottledCancellationToken(e)},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},e.prototype.readDirectory=function(e,r,n,i,a){var o=t.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(r),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.readFile=function(e,t){return this.shimHost.readFile(e,t)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e}();t.LanguageServiceShimHostAdapter=i;var a=function(){function e(e){var t=this;this.shimHost=e,this.useCaseSensitiveFileNames=!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames(),"directoryExists"in this.shimHost?this.directoryExists=function(e){return t.shimHost.directoryExists(e)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(e){return t.shimHost.realpath(e)}:this.realpath=void 0}return e.prototype.readDirectory=function(e,r,n,i,a){var o=t.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(r),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.readFile=function(e){return this.shimHost.readFile(e)},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e}();function o(e,t,r,n){return c(e,t,!0,r,n)}function c(e,n,i,a,o){try{var s=function(e,r,n,i){var a;i&&(e.log(r),a=t.timestamp());var o=n();if(i){var s=t.timestamp();if(e.log(r+" completed in "+(s-a)+" msec"),t.isString(o)){var c=o;c.length>128&&(c=c.substring(0,128)+"..."),e.log(" result.length="+c.length+", result='"+JSON.stringify(c)+"'")}}return o}(e,n,a,o);return i?JSON.stringify({result:s}):s}catch(i){return i instanceof t.OperationCanceledException?JSON.stringify({canceled:!0}):(r(e,i),i.description=n,JSON.stringify({error:i}))}}t.CoreServicesShimHostAdapter=a;var u=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();function _(e,r){return e.map(function(e){return function(e,r){return{message:t.flattenDiagnosticMessageText(e.messageText,r),start:e.start,length:e.length,category:t.diagnosticCategoryName(e),code:e.code,reportsUnnecessary:e.reportsUnnecessary}}(e,r)})}t.realizeDiagnostics=_;var d=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.host=r,i.languageService=n,i.logPerformance=!1,i.logger=i.host,i}return s(r,e),r.prototype.forwardJSONCall=function(e,t){return o(this.logger,e,t,this.logPerformance)},r.prototype.dispose=function(t){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,l&&l.CollectGarbage&&(l.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,e.prototype.dispose.call(this,t)},r.prototype.refresh=function(e){this.forwardJSONCall("refresh("+e+")",function(){return null})},r.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return e.languageService.cleanupSemanticCache(),null})},r.prototype.realizeDiagnostics=function(e){return _(e,t.getNewLineOrDefaultFromHost(this.host))},r.prototype.getSyntacticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+e+"', "+r+", "+n+")",function(){return i.languageService.getSyntacticClassifications(e,t.createTextSpan(r,n))})},r.prototype.getSemanticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+e+"', "+r+", "+n+")",function(){return i.languageService.getSemanticClassifications(e,t.createTextSpan(r,n))})},r.prototype.getEncodedSyntacticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('"+e+"', "+r+", "+n+")",function(){return p(i.languageService.getEncodedSyntacticClassifications(e,t.createTextSpan(r,n)))})},r.prototype.getEncodedSemanticClassifications=function(e,r,n){var i=this;return this.forwardJSONCall("getEncodedSemanticClassifications('"+e+"', "+r+", "+n+")",function(){return p(i.languageService.getEncodedSemanticClassifications(e,t.createTextSpan(r,n)))})},r.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSyntacticDiagnostics('"+e+"')",function(){var r=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(r)})},r.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSemanticDiagnostics('"+e+"')",function(){var r=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(r)})},r.prototype.getSuggestionDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSuggestionDiagnostics('"+e+"')",function(){return t.realizeDiagnostics(t.languageService.getSuggestionDiagnostics(e))})},r.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)})},r.prototype.getQuickInfoAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",function(){return r.languageService.getQuickInfoAtPosition(e,t)})},r.prototype.getNameOrDottedNameSpan=function(e,t,r){var n=this;return this.forwardJSONCall("getNameOrDottedNameSpan('"+e+"', "+t+", "+r+")",function(){return n.languageService.getNameOrDottedNameSpan(e,t,r)})},r.prototype.getBreakpointStatementAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('"+e+"', "+t+")",function(){return r.languageService.getBreakpointStatementAtPosition(e,t)})},r.prototype.getSignatureHelpItems=function(e,t,r){var n=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",function(){return n.languageService.getSignatureHelpItems(e,t,r)})},r.prototype.getDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAtPosition('"+e+"', "+t+")",function(){return r.languageService.getDefinitionAtPosition(e,t)})},r.prototype.getDefinitionAndBoundSpan=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('"+e+"', "+t+")",function(){return r.languageService.getDefinitionAndBoundSpan(e,t)})},r.prototype.getTypeDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('"+e+"', "+t+")",function(){return r.languageService.getTypeDefinitionAtPosition(e,t)})},r.prototype.getImplementationAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getImplementationAtPosition('"+e+"', "+t+")",function(){return r.languageService.getImplementationAtPosition(e,t)})},r.prototype.getRenameInfo=function(e,t,r){var n=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",function(){return n.languageService.getRenameInfo(e,t,r)})},r.prototype.findRenameLocations=function(e,t,r,n,i){var a=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+r+", "+n+", "+i+")",function(){return a.languageService.findRenameLocations(e,t,r,n,i)})},r.prototype.getBraceMatchingAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBraceMatchingAtPosition('"+e+"', "+t+")",function(){return r.languageService.getBraceMatchingAtPosition(e,t)})},r.prototype.isValidBraceCompletionAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('"+e+"', "+t+", "+r+")",function(){return n.languageService.isValidBraceCompletionAtPosition(e,t,r)})},r.prototype.getSpanOfEnclosingComment=function(e,t,r){var n=this;return this.forwardJSONCall("getSpanOfEnclosingComment('"+e+"', "+t+")",function(){return n.languageService.getSpanOfEnclosingComment(e,t,r)})},r.prototype.getIndentationAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getIndentationAtPosition('"+e+"', "+t+")",function(){var i=JSON.parse(r);return n.languageService.getIndentationAtPosition(e,t,i)})},r.prototype.getReferencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getReferencesAtPosition('"+e+"', "+t+")",function(){return r.languageService.getReferencesAtPosition(e,t)})},r.prototype.findReferences=function(e,t){var r=this;return this.forwardJSONCall("findReferences('"+e+"', "+t+")",function(){return r.languageService.findReferences(e,t)})},r.prototype.getOccurrencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getOccurrencesAtPosition('"+e+"', "+t+")",function(){return r.languageService.getOccurrencesAtPosition(e,t)})},r.prototype.getDocumentHighlights=function(e,r,n){var i=this;return this.forwardJSONCall("getDocumentHighlights('"+e+"', "+r+")",function(){var a=i.languageService.getDocumentHighlights(e,r,JSON.parse(n)),o=t.normalizeSlashes(e).toLowerCase();return t.filter(a,function(e){return t.normalizeSlashes(e.fileName).toLowerCase()===o})})},r.prototype.getCompletionsAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+", "+r+")",function(){return n.languageService.getCompletionsAtPosition(e,t,r)})},r.prototype.getCompletionEntryDetails=function(e,t,r,n,i,a){var o=this;return this.forwardJSONCall("getCompletionEntryDetails('"+e+"', "+t+", '"+r+"')",function(){var s=void 0===n?void 0:JSON.parse(n);return o.languageService.getCompletionEntryDetails(e,t,r,s,i,a)})},r.prototype.getFormattingEditsForRange=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsForRange('"+e+"', "+t+", "+r+")",function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsForRange(e,t,r,a)})},r.prototype.getFormattingEditsForDocument=function(e,t){var r=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",function(){var n=JSON.parse(t);return r.languageService.getFormattingEditsForDocument(e,n)})},r.prototype.getFormattingEditsAfterKeystroke=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+r+"')",function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsAfterKeystroke(e,t,r,a)})},r.prototype.getDocCommentTemplateAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('"+e+"', "+t+")",function(){return r.languageService.getDocCommentTemplateAtPosition(e,t)})},r.prototype.getNavigateToItems=function(e,t,r){var n=this;return this.forwardJSONCall("getNavigateToItems('"+e+"', "+t+", "+r+")",function(){return n.languageService.getNavigateToItems(e,t,r)})},r.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",function(){return t.languageService.getNavigationBarItems(e)})},r.prototype.getNavigationTree=function(e){var t=this;return this.forwardJSONCall("getNavigationTree('"+e+"')",function(){return t.languageService.getNavigationTree(e)})},r.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",function(){return t.languageService.getOutliningSpans(e)})},r.prototype.getTodoComments=function(e,t){var r=this;return this.forwardJSONCall("getTodoComments('"+e+"')",function(){return r.languageService.getTodoComments(e,JSON.parse(t))})},r.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",function(){return t.languageService.getEmitOutput(e)})},r.prototype.getEmitOutputObject=function(e){var t=this;return c(this.logger,"getEmitOutput('"+e+"')",!1,function(){return t.languageService.getEmitOutput(e)},this.logPerformance)},r}(u);function p(e){return{spans:e.spans.join(","),endOfLineState:e.endOfLineState}}var f=function(e){function r(r,n){var i=e.call(this,r)||this;return i.logger=n,i.logPerformance=!1,i.classifier=t.createClassifier(),i}return s(r,e),r.prototype.getEncodedLexicalClassifications=function(e,t,r){var n=this;return void 0===r&&(r=!1),o(this.logger,"getEncodedLexicalClassifications",function(){return p(n.classifier.getEncodedLexicalClassifications(e,t,r))},this.logPerformance)},r.prototype.getClassificationsForLine=function(e,t,r){void 0===r&&(r=!1);for(var n=this.classifier.getClassificationsForLine(e,t,r),i="",a=0,o=n.entries;a<o.length;a++){var s=o[a];i+=s.length+"\n",i+=s.classification+"\n"}return i+=n.finalLexState},r}(u),m=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.logger=r,i.host=n,i.logPerformance=!1,i}return s(r,e),r.prototype.forwardJSONCall=function(e,t){return o(this.logger,e,t,this.logPerformance)},r.prototype.resolveModuleName=function(e,r,n){var i=this;return this.forwardJSONCall("resolveModuleName('"+e+"')",function(){var a=JSON.parse(n),o=t.resolveModuleName(r,t.normalizeSlashes(e),a,i.host),s=o.resolvedModule?o.resolvedModule.resolvedFileName:void 0;return o.resolvedModule&&".ts"!==o.resolvedModule.extension&&".tsx"!==o.resolvedModule.extension&&".d.ts"!==o.resolvedModule.extension&&(s=void 0),{resolvedFileName:s,failedLookupLocations:o.failedLookupLocations}})},r.prototype.resolveTypeReferenceDirective=function(e,r,n){var i=this;return this.forwardJSONCall("resolveTypeReferenceDirective("+e+")",function(){var a=JSON.parse(n),o=t.resolveTypeReferenceDirective(r,t.normalizeSlashes(e),a,i.host);return{resolvedFileName:o.resolvedTypeReferenceDirective?o.resolvedTypeReferenceDirective.resolvedFileName:void 0,primary:!o.resolvedTypeReferenceDirective||o.resolvedTypeReferenceDirective.primary,failedLookupLocations:o.failedLookupLocations}})},r.prototype.getPreProcessedFileInfo=function(e,r){var n=this;return this.forwardJSONCall("getPreProcessedFileInfo('"+e+"')",function(){var e=t.preProcessFile(t.getSnapshotText(r),!0,!0);return{referencedFiles:n.convertFileReferences(e.referencedFiles),importedFiles:n.convertFileReferences(e.importedFiles),ambientExternalModules:e.ambientExternalModules,isLibFile:e.isLibFile,typeReferenceDirectives:n.convertFileReferences(e.typeReferenceDirectives),libReferenceDirectives:n.convertFileReferences(e.libReferenceDirectives)}})},r.prototype.getAutomaticTypeDirectiveNames=function(e){var r=this;return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"+e+"')",function(){var n=JSON.parse(e);return t.getAutomaticTypeDirectiveNames(n,r.host)})},r.prototype.convertFileReferences=function(e){if(e){for(var r=[],n=0,i=e;n<i.length;n++){var a=i[n];r.push({path:t.normalizeSlashes(a.fileName),position:a.pos,length:a.end-a.pos})}return r}},r.prototype.getTSConfigFileInfo=function(e,r){var n=this;return this.forwardJSONCall("getTSConfigFileInfo('"+e+"')",function(){var i=t.parseJsonText(e,t.getSnapshotText(r)),a=t.normalizeSlashes(e),o=t.parseJsonSourceFileConfigFileContent(i,n.host,t.getDirectoryPath(a),{},a);return{options:o.options,typeAcquisition:o.typeAcquisition,files:o.fileNames,raw:o.raw,errors:_(i.parseDiagnostics.concat(o.errors),"\r\n")}})},r.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return t.getDefaultCompilerOptions()})},r.prototype.discoverTypings=function(e){var r=this,n=t.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var i=JSON.parse(e);return void 0===r.safeList&&(r.safeList=t.JsTyping.loadSafeList(r.host,t.toPath(i.safeListPath,i.safeListPath,n))),t.JsTyping.discoverTypings(r.host,function(e){return r.logger.log(e)},i.fileNames,t.toPath(i.projectRootPath,i.projectRootPath,n),r.safeList,i.packageNameToTypingLocation,i.typeAcquisition,i.unresolvedImports,i.typesRegistry)})},r}(u),g=function(){function e(){this._shims=[]}return e.prototype.getServicesVersion=function(){return t.servicesVersion},e.prototype.createLanguageServiceShim=function(e){try{void 0===this.documentRegistry&&(this.documentRegistry=t.createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()));var n=new i(e),a=t.createLanguageService(n,this.documentRegistry,!1);return new d(this,e,a)}catch(t){throw r(e,t),t}},e.prototype.createClassifierShim=function(e){try{return new f(this,e)}catch(t){throw r(e,t),t}},e.prototype.createCoreServicesShim=function(e){try{var t=new a(e);return new m(this,e,t)}catch(t){throw r(e,t),t}},e.prototype.close=function(){t.clear(this._shims),this.documentRegistry=void 0},e.prototype.registerShim=function(e){this._shims.push(e)},e.prototype.unregisterShim=function(e){for(var t=0;t<this._shims.length;t++)if(this._shims[t]===e)return void delete this._shims[t];throw new Error("Invalid operation")},e}();t.TypeScriptServicesFactory=g,e.exports&&(e.exports=t)}(c||(c={})),function(e){!function(e){e.TypeScriptServicesFactory=c.TypeScriptServicesFactory}(e.Services||(e.Services={}))}(u||(u={}));c.versionMajorMinor});i(fr);var mr=a(function(e,t){var n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(rr),a=n(fr),o={allowNonTsExtensions:!0,allowJs:!0},s=new Map,c=new Map,u=new Set,l={code:"",filePath:""};function _(e){throw new Error(a.default.flattenDiagnosticMessageText(e.messageText,a.default.sys.newLine))}var d={close:function(){}};t.calculateProjectParserOptions=function(e,t,r){var n=[],o=r.tsconfigRootDir;l.code=e,l.filePath=t;var p=c.get(t);u.has(t)&&void 0!==p&&p(t,a.default.FileWatcherEventKind.Changed);var f=!0,m=!1,g=void 0;try{for(var y,h=function(){var e=y.value;i.default.isAbsolute(e)||(e=i.default.join(o,e));var t=s.get(e);if(void 0!==t)return n.push(t.getProgram().getProgram()),"continue";var u=a.default.createWatchCompilerHost(e,{allowNonTsExtensions:!0},a.default.sys,a.default.createSemanticDiagnosticsBuilderProgram,_,function(){}),p=u.readFile;u.readFile=function(e,t){return i.default.normalize(e)===i.default.normalize(l.filePath)?l.code:p(e,t)},u.onUnRecoverableConfigFileDiagnostic=_,u.afterProgramCreate=function(e){var t=e.getConfigFileParsingDiagnostics().filter(function(e){return e.category===a.default.DiagnosticCategory.Error&&18003!==e.code});t.length>0&&_(t[0])},u.watchFile=function(e,t){var r=i.default.normalize(e);return c.set(r,t),{close:function(){c.delete(r)}}},u.watchDirectory=function(){return d};var f=u.onCachedDirectoryStructureHostCreate;u.onCachedDirectoryStructureHostCreate=function(e){var t=e.readDirectory;e.readDirectory=function(e,n,i,a,o){return t(e,n?n.concat(r.extraFileExtensions):void 0,i,a,o)},f(e)};var m=a.default.createWatchProgram(u),g=m.getProgram().getProgram();s.set(e,m),n.push(g)},v=r.projects[Symbol.iterator]();!(f=(y=v.next()).done);f=!0)h()}catch(e){m=!0,g=e}finally{try{f||null==v.return||v.return()}finally{if(m)throw g}}return u.add(t),n},t.createProgram=function(e,t,r){if(r.projects&&1===r.projects.length){var n=r.projects[0];i.default.isAbsolute(n)||(n=i.default.join(r.tsconfigRootDir,n));var s=a.default.getParsedCommandLineOfConfigFile(n,o,Object.assign({},a.default.sys,{onUnRecoverableConfigFileDiagnostic:function(){}}));if(s){var c=a.default.createCompilerHost(s.options,!0),u=c.readFile;return c.readFile=function(r){return i.default.normalize(r)===i.default.normalize(t)?e:u(r)},a.default.createProgram([t],s.options,c)}}}});i(mr);var gr=a(function(e,t){var r;t=e.exports=G,r="object"===f(ve)&&ve.env&&ve.env.NODE_DEBUG&&/\bsemver\b/i.test(ve.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],s=0,c=s++;o[c]="0|[1-9]\\d*";var u=s++;o[u]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var _=s++;o[_]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var d=s++;o[d]="("+o[u]+")\\.("+o[u]+")\\.("+o[u]+")";var p=s++;o[p]="(?:"+o[c]+"|"+o[l]+")";var m=s++;o[m]="(?:"+o[u]+"|"+o[l]+")";var g=s++;o[g]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var y=s++;o[y]="(?:-?("+o[m]+"(?:\\."+o[m]+")*))";var h=s++;o[h]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[h]+"(?:\\."+o[h]+")*))";var b=s++,D="v?"+o[_]+o[g]+"?"+o[v]+"?";o[b]="^"+D+"$";var x="[v=\\s]*"+o[d]+o[y]+"?"+o[v]+"?",S=s++;o[S]="^"+x+"$";var T=s++;o[T]="((?:<|>)?=?)";var C=s++;o[C]=o[u]+"|x|X|\\*";var E=s++;o[E]=o[c]+"|x|X|\\*";var k=s++;o[k]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var N=s++;o[N]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[y]+")?"+o[v]+"?)?)?";var A=s++;o[A]="^"+o[T]+"\\s*"+o[k]+"$";var F=s++;o[F]="^"+o[T]+"\\s*"+o[N]+"$";var P=s++;o[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var w=s++;o[w]="(?:~>?)";var I=s++;o[I]="(\\s*)"+o[w]+"\\s+",a[I]=new RegExp(o[I],"g");var O=s++;o[O]="^"+o[w]+o[k]+"$";var M=s++;o[M]="^"+o[w]+o[N]+"$";var L=s++;o[L]="(?:\\^)";var R=s++;o[R]="(\\s*)"+o[L]+"\\s+",a[R]=new RegExp(o[R],"g");var B=s++;o[B]="^"+o[L]+o[k]+"$";var j=s++;o[j]="^"+o[L]+o[N]+"$";var J=s++;o[J]="^"+o[T]+"\\s*("+x+")$|^$";var z=s++;o[z]="^"+o[T]+"\\s*("+D+")$|^$";var K=s++;o[K]="(\\s*)"+o[T]+"\\s*("+x+"|"+o[k]+")",a[K]=new RegExp(o[K],"g");var U=s++;o[U]="^\\s*("+o[k]+")\\s+-\\s+("+o[k]+")\\s*$";var V=s++;o[V]="^\\s*("+o[N]+")\\s+-\\s+("+o[N]+")\\s*$";var q=s++;o[q]="(<|>)?=?\\s*\\*";for(var W=0;W<s;W++)r(W,o[W]),a[W]||(a[W]=new RegExp(o[W]));function H(e,t){if(e instanceof G)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t?a[S]:a[b]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(e instanceof G){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.loose=t;var o=e.trim().match(t?a[S]:a[b]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=H,t.valid=function(e,t){var r=H(e,t);return r?r.version:null},t.clean=function(e,t){var r=H(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=G,G.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},G.prototype.toString=function(){return this.version},G.prototype.compare=function(e){return r("SemVer.compare",this.version,this.loose,e),e instanceof G||(e=new G(e,this.loose)),this.compareMain(e)||this.comparePre(e)},G.prototype.compareMain=function(e){return e instanceof G||(e=new G(e,this.loose)),X(this.major,e.major)||X(this.minor,e.minor)||X(this.patch,e.patch)},G.prototype.comparePre=function(e){if(e instanceof G||(e=new G(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return X(n,i)}while(++t)},G.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=H(e),n=H(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=X;var Y=/^[0-9]+$/;function X(e,t){var r=Y.test(e),n=Y.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:e<t?-1:e>t?1:0}function Q(e,t,r){return new G(e,r).compare(new G(t,r))}function $(e,t,r){return Q(e,t,r)>0}function Z(e,t,r){return Q(e,t,r)<0}function ee(e,t,r){return 0===Q(e,t,r)}function te(e,t,r){return 0!==Q(e,t,r)}function re(e,t,r){return Q(e,t,r)>=0}function ne(e,t,r){return Q(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),i=e===r;break;case"!==":"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=$(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=Z(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ae(e,t){if(e instanceof ae){if(e.loose===t)return e;e=e.value}if(!(this instanceof ae))return new ae(e,t);r("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return X(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=$,t.lt=Z,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=ae;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ae)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ce(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,r,n,i,a,o,s,c,u,l,_,d){return((t=ce(r)?"":ce(n)?">="+r+".0.0":ce(i)?">="+r+"."+n+".0":">="+t)+" "+(s=ce(c)?"":ce(u)?"<"+(+c+1)+".0.0":ce(l)?"<"+c+"."+(+u+1)+".0":_?"<="+c+"."+u+"."+l+"-"+_:"<="+s)).trim()}function le(e,t){for(var n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length){for(n=0;n<e.length;n++)if(r(e[n].semver),e[n].semver!==oe&&e[n].semver.prerelease.length>0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function _e(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,a,o,s,c;switch(e=new G(e,n),t=new se(t,n),r){case">":i=$,a=ne,o=Z,s=">",c=">=";break;case"<":i=Z,a=re,o=$,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_e(e,t,n))return!1;for(var u=0;u<t.set.length;++u){var l=null,_=null;if(t.set[u].forEach(function(e){e.semver===oe&&(e=new ae(">=0.0.0")),l=l||e,_=_||e,i(e.semver,l.semver,n)?l=e:o(e.semver,_.semver,n)&&(_=e)}),l.operator===s||l.operator===c)return!1;if((!_.operator||_.operator===s)&&a(e,_.semver))return!1;if(_.operator===c&&o(e,_.semver))return!1}return!0}ae.prototype.parse=function(e){var t=this.loose?a[J]:a[z],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.loose):this.semver=oe},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(e){return r("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new G(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new se(e.value,t),_e(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),_e(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),r("range",e,t);var n=t?a[V]:a[U];e=e.replace(n,ue),r("hyphen replace",e),e=e.replace(a[K],"$1$2$3"),r("comparator trim",e,a[K]),e=(e=(e=e.replace(a[I],"$1~")).replace(a[R],"$1^")).split(/\s+/).join(" ");var i=t?a[J]:a[z],o=e.split(" ").map(function(e){return function(e,t){return r("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t?a[j]:a[B];return e.replace(n,function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),ce(n)?s="":ce(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":ce(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t?a[M]:a[O];return e.replace(n,function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),ce(n)?s="":ce(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":ce(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t?a[F]:a[A];return e.replace(n,function(t,n,i,a,o,s){r("xRange",e,t,n,i,a,o,s);var c=ce(i),u=c||ce(a),l=u||ce(o),_=l;return"="===n&&_&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&_?(u&&(a=0),l&&(o=0),">"===n?(n=">=",u?(i=+i+1,a=0,o=0):l&&(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),t=n+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[q],"")}(e,t),r("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new ae(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.loose));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e))return!0;return!1},t.satisfies=_e,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var a=new se(t,r)}catch(e){return null}return e.forEach(function(e){a.test(e)&&(n&&-1!==i.compare(e)||(i=new G(n=e,r)))}),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var a=new se(t,r)}catch(e){return null}return e.forEach(function(e){a.test(e)&&(n&&1!==i.compare(e)||(i=new G(n=e,r)))}),n},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return de(e,t,"<",r)},t.gtr=function(e,t,r){return de(e,t,">",r)},t.outside=de,t.prerelease=function(e,t){var r=H(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(a[P]);return null==t?null:H((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),yr=1/0,hr="[object Symbol]",vr=/&(?:amp|lt|gt|quot|#39|#96);/g,br=RegExp(vr.source),Dr="object"==f(r)&&r&&r.Object===Object&&r,xr="object"==("undefined"==typeof self?"undefined":f(self))&&self&&self.Object===Object&&self,Sr=Dr||xr||Function("return this")();var Tr,Cr=(Tr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},function(e){return null==Tr?void 0:Tr[e]}),Er=Object.prototype.toString,kr=Sr.Symbol,Nr=kr?kr.prototype:void 0,Ar=Nr?Nr.toString:void 0;function Fr(e){if("string"==typeof e)return e;if(function(e){return"symbol"==f(e)||function(e){return!!e&&"object"==f(e)}(e)&&Er.call(e)==hr}(e))return Ar?Ar.call(e):"";var t=e+"";return"0"==t&&1/e==-yr?"-0":t}var Pr=function(e){var t;return(e=null==(t=e)?"":Fr(t))&&br.test(e)?e.replace(vr,Cr):e},wr=a(function(e,t){Object.defineProperty(t,"__esModule",{value:!0})});i(wr);var Ir=a(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BigIntLiteral="BigIntLiteral",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ClassProperty="ClassProperty",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.DebuggerStatement="DebuggerStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.ForStatement="ForStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.Import="Import",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXFragment="JSXFragment",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXNamespacedName="JSXNamespacedName",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXSpreadChild="JSXSpreadChild",e.JSXText="JSXText",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression",e.TSAbstractClassProperty="TSAbstractClassProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAnyKeyword="TSAnyKeyword",e.TSArrayType="TSArrayType",e.TSAsExpression="TSAsExpression",e.TSAsyncKeyword="TSAsyncKeyword",e.TSBooleanKeyword="TSBooleanKeyword",e.TSBigIntKeyword="TSBigIntKeyword",e.TSConditionalType="TSConditionalType",e.TSConstructorType="TSConstructorType",e.TSCallSignatureDeclaration="TSCallSignatureDeclaration",e.TSClassImplements="TSClassImplements",e.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",e.TSDeclareKeyword="TSDeclareKeyword",e.TSDeclareFunction="TSDeclareFunction",e.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",e.TSEnumDeclaration="TSEnumDeclaration",e.TSEnumMember="TSEnumMember",e.TSExportAssignment="TSExportAssignment",e.TSExportKeyword="TSExportKeyword",e.TSExternalModuleReference="TSExternalModuleReference",e.TSImportType="TSImportType",e.TSInferType="TSInferType",e.TSLiteralType="TSLiteralType",e.TSIndexedAccessType="TSIndexedAccessType",e.TSIndexSignature="TSIndexSignature",e.TSInterfaceBody="TSInterfaceBody",e.TSInterfaceDeclaration="TSInterfaceDeclaration",e.TSInterfaceHeritage="TSInterfaceHeritage",e.TSImportEqualsDeclaration="TSImportEqualsDeclaration",e.TSFunctionType="TSFunctionType",e.TSMethodSignature="TSMethodSignature",e.TSModuleBlock="TSModuleBlock",e.TSModuleDeclaration="TSModuleDeclaration",e.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",e.TSNonNullExpression="TSNonNullExpression",e.TSNeverKeyword="TSNeverKeyword",e.TSNullKeyword="TSNullKeyword",e.TSNumberKeyword="TSNumberKeyword",e.TSMappedType="TSMappedType",e.TSObjectKeyword="TSObjectKeyword",e.TSParameterProperty="TSParameterProperty",e.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSQuestionToken="TSQuestionToken",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSStaticKeyword="TSStaticKeyword",e.TSStringKeyword="TSStringKeyword",e.TSSymbolKeyword="TSSymbolKeyword",e.TSThisType="TSThisType",e.TSTypeAnnotation="TSTypeAnnotation",e.TSTypeAliasDeclaration="TSTypeAliasDeclaration",e.TSTypeAssertion="TSTypeAssertion",e.TSTypeLiteral="TSTypeLiteral",e.TSTypeOperator="TSTypeOperator",e.TSTypeParameter="TSTypeParameter",e.TSTypeParameterDeclaration="TSTypeParameterDeclaration",e.TSTypeParameterInstantiation="TSTypeParameterInstantiation",e.TSTypePredicate="TSTypePredicate",e.TSTypeReference="TSTypeReference",e.TSTypeQuery="TSTypeQuery",e.TSIntersectionType="TSIntersectionType",e.TSTupleType="TSTupleType",e.TSOptionalType="TSOptionalType",e.TSParenthesizedType="TSParenthesizedType",e.TSUnionType="TSUnionType",e.TSUndefinedKeyword="TSUndefinedKeyword",e.TSUnknownKeyword="TSUnknownKeyword",e.TSVoidKeyword="TSVoidKeyword"}(t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})),function(e){e.Boolean="Boolean",e.Identifier="Identifier",e.JSXIdentifier="JSXIdentifier",e.JSXText="JSXText",e.Keyword="Keyword",e.Null="Null",e.Numeric="Numeric",e.Punctuator="Punctuator",e.RegularExpression="RegularExpression",e.String="String",e.Template="Template"}(t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={}))});i(Ir);var Or=a(function(e,t){var n=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(wr);t.TSESTree=i,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(Ir)});i(Or);var Mr=a(function(e,t){var n,i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(fr),o=i(Pr),s=a.default.SyntaxKind,c=[s.EqualsToken,s.PlusEqualsToken,s.MinusEqualsToken,s.AsteriskEqualsToken,s.AsteriskAsteriskEqualsToken,s.SlashEqualsToken,s.PercentEqualsToken,s.LessThanLessThanEqualsToken,s.GreaterThanGreaterThanEqualsToken,s.GreaterThanGreaterThanGreaterThanEqualsToken,s.AmpersandEqualsToken,s.BarEqualsToken,s.CaretEqualsToken],u=[s.BarBarToken,s.AmpersandAmpersandToken],l=(g(n={},s.OpenBraceToken,"{"),g(n,s.CloseBraceToken,"}"),g(n,s.OpenParenToken,"("),g(n,s.CloseParenToken,")"),g(n,s.OpenBracketToken,"["),g(n,s.CloseBracketToken,"]"),g(n,s.DotToken,"."),g(n,s.DotDotDotToken,"..."),g(n,s.SemicolonToken,","),g(n,s.CommaToken,","),g(n,s.LessThanToken,"<"),g(n,s.GreaterThanToken,">"),g(n,s.LessThanEqualsToken,"<="),g(n,s.GreaterThanEqualsToken,">="),g(n,s.EqualsEqualsToken,"=="),g(n,s.ExclamationEqualsToken,"!="),g(n,s.EqualsEqualsEqualsToken,"==="),g(n,s.InstanceOfKeyword,"instanceof"),g(n,s.ExclamationEqualsEqualsToken,"!=="),g(n,s.EqualsGreaterThanToken,"=>"),g(n,s.PlusToken,"+"),g(n,s.MinusToken,"-"),g(n,s.AsteriskToken,"*"),g(n,s.AsteriskAsteriskToken,"**"),g(n,s.SlashToken,"/"),g(n,s.PercentToken,"%"),g(n,s.PlusPlusToken,"++"),g(n,s.MinusMinusToken,"--"),g(n,s.LessThanLessThanToken,"<<"),g(n,s.LessThanSlashToken,"</"),g(n,s.GreaterThanGreaterThanToken,">>"),g(n,s.GreaterThanGreaterThanGreaterThanToken,">>>"),g(n,s.AmpersandToken,"&"),g(n,s.BarToken,"|"),g(n,s.CaretToken,"^"),g(n,s.ExclamationToken,"!"),g(n,s.TildeToken,"~"),g(n,s.AmpersandAmpersandToken,"&&"),g(n,s.BarBarToken,"||"),g(n,s.QuestionToken,"?"),g(n,s.ColonToken,":"),g(n,s.EqualsToken,"="),g(n,s.PlusEqualsToken,"+="),g(n,s.MinusEqualsToken,"-="),g(n,s.AsteriskEqualsToken,"*="),g(n,s.AsteriskAsteriskEqualsToken,"**="),g(n,s.SlashEqualsToken,"/="),g(n,s.PercentEqualsToken,"%="),g(n,s.LessThanLessThanEqualsToken,"<<="),g(n,s.GreaterThanGreaterThanEqualsToken,">>="),g(n,s.GreaterThanGreaterThanGreaterThanEqualsToken,">>>="),g(n,s.AmpersandEqualsToken,"&="),g(n,s.BarEqualsToken,"|="),g(n,s.CaretEqualsToken,"^="),g(n,s.AtToken,"@"),g(n,s.InKeyword,"in"),g(n,s.UniqueKeyword,"unique"),g(n,s.KeyOfKeyword,"keyof"),g(n,s.NewKeyword,"new"),g(n,s.ImportKeyword,"import"),g(n,s.ReadonlyKeyword,"readonly"),n);function _(e){return c.indexOf(e.kind)>-1}function d(e){return u.indexOf(e.kind)>-1}function p(e){return e.kind===s.SingleLineCommentTrivia||e.kind===s.MultiLineCommentTrivia}function f(e){return e.kind===s.JSDocComment}function m(e,t){var r=t.getLineAndCharacterOfPosition(e);return{line:r.line+1,column:r.character}}function y(e,t,r){return{start:m(e,r),end:m(t,r)}}function h(e){return e.kind>=s.FirstToken&&e.kind<=s.LastToken}function v(e){return e.kind>=s.JsxElement&&e.kind<=s.JsxAttribute}function b(e,t){for(;e;){if(t(e))return e;e=e.parent}}function D(e){return!!b(e,v)}function x(e){if(e.originalKeywordKind)switch(e.originalKeywordKind){case s.NullKeyword:return Or.AST_TOKEN_TYPES.Null;case s.GetKeyword:case s.SetKeyword:case s.TypeKeyword:case s.ModuleKeyword:return Or.AST_TOKEN_TYPES.Identifier;default:return Or.AST_TOKEN_TYPES.Keyword}if(e.kind>=s.FirstKeyword&&e.kind<=s.LastFutureReservedWord)return e.kind===s.FalseKeyword||e.kind===s.TrueKeyword?Or.AST_TOKEN_TYPES.Boolean:Or.AST_TOKEN_TYPES.Keyword;if(e.kind>=s.FirstPunctuation&&e.kind<=s.LastBinaryOperator)return Or.AST_TOKEN_TYPES.Punctuator;if(e.kind>=s.NoSubstitutionTemplateLiteral&&e.kind<=s.TemplateTail)return Or.AST_TOKEN_TYPES.Template;switch(e.kind){case s.NumericLiteral:return Or.AST_TOKEN_TYPES.Numeric;case s.JsxText:return Or.AST_TOKEN_TYPES.JSXText;case s.StringLiteral:return!e.parent||e.parent.kind!==s.JsxAttribute&&e.parent.kind!==s.JsxElement?Or.AST_TOKEN_TYPES.String:Or.AST_TOKEN_TYPES.JSXText;case s.RegularExpressionLiteral:return Or.AST_TOKEN_TYPES.RegularExpression;case s.Identifier:case s.ConstructorKeyword:case s.GetKeyword:case s.SetKeyword:}if(e.parent&&e.kind===s.Identifier){if(v(e.parent))return Or.AST_TOKEN_TYPES.JSXIdentifier;if(e.parent.kind===s.PropertyAccessExpression&&D(e))return Or.AST_TOKEN_TYPES.JSXIdentifier}return Or.AST_TOKEN_TYPES.Identifier}function S(e,t){var r=e.kind===s.JsxText?e.getFullStart():e.getStart(t),n=e.getEnd(),i=t.text.slice(r,n),a={type:x(e),value:i,range:[r,n],loc:y(r,n,t)};return"RegularExpression"===a.type&&(a.regex={pattern:i.slice(1,i.lastIndexOf("/")),flags:i.slice(i.lastIndexOf("/")+1)}),a}function T(e,t){return e.kind===s.EndOfFileToken?!!e.jsDoc:0!==e.getWidth(t)}function C(e,t){if(void 0!==e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(void 0!==n)return n}}t.isAssignmentOperator=_,t.isLogicalOperator=d,t.getTextForTokenKind=function(e){return l[e]},t.isESTreeClassMember=function(e){return e.kind!==s.SemicolonClassElement},t.hasModifier=function(e,t){return!!t.modifiers&&!!t.modifiers.length&&t.modifiers.some(function(t){return t.kind===e})},t.getLastModifier=function(e){return!!e.modifiers&&!!e.modifiers.length&&e.modifiers[e.modifiers.length-1]||null},t.isComma=function(e){return e.kind===s.CommaToken},t.isComment=p,t.isJSDocComment=f,t.getBinaryExpressionType=function(e){return _(e)?Or.AST_NODE_TYPES.AssignmentExpression:d(e)?Or.AST_NODE_TYPES.LogicalExpression:Or.AST_NODE_TYPES.BinaryExpression},t.getLineAndCharacterFor=m,t.getLocFor=y,t.canContainDirective=function(e){if(e.kind===a.default.SyntaxKind.Block)switch(e.parent.kind){case a.default.SyntaxKind.Constructor:case a.default.SyntaxKind.GetAccessor:case a.default.SyntaxKind.SetAccessor:case a.default.SyntaxKind.ArrowFunction:case a.default.SyntaxKind.FunctionExpression:case a.default.SyntaxKind.FunctionDeclaration:case a.default.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0},t.getRange=function(e,t){return[e.getStart(t),e.getEnd()]},t.isToken=h,t.isJSXToken=v,t.getDeclarationKind=function(e){return e.flags&a.default.NodeFlags.Let?"let":e.flags&a.default.NodeFlags.Const?"const":"var"},t.getTSNodeAccessibility=function(e){var t=e.modifiers;if(!t)return null;for(var r=0;r<t.length;r++)switch(t[r].kind){case s.PublicKeyword:return"public";case s.ProtectedKeyword:return"protected";case s.PrivateKeyword:return"private"}return null},t.findNextToken=function(e,t,r){return function t(n){return a.default.isToken(n)&&n.pos===e.end?n:C(n.getChildren(r),function(n){var i=n.pos<=e.pos&&n.end>e.end||n.pos===e.end;return i&&T(n,r)?t(n):void 0})}(t)},t.findFirstMatchingAncestor=b,t.hasJSXAncestor=D,t.unescapeStringLiteralText=function(e){return o.default(e)},t.isComputedProperty=function(e){return e.kind===s.ComputedPropertyName},t.isOptional=function(e){return!!e.questionToken&&e.questionToken.kind===s.QuestionToken},t.getTokenType=x,t.convertToken=S,t.convertTokens=function(e){var t=[];return function r(n){if(!p(n)&&!f(n))if(h(n)&&n.kind!==s.EndOfFileToken){var i=S(n,e);i&&t.push(i)}else n.getChildren(e).forEach(r)}(e),t},t.getNodeContainer=function(e,t,r){var n=null;return function e(i){var a=i.pos,o=i.end;t>=a&&r<=o&&(h(i)?n=i:i.getChildren().forEach(e))}(e),n},t.createError=function(e,t,r){var n=e.getLineAndCharacterOfPosition(t);return{index:t,lineNumber:n.line+1,column:n.character,message:r}},t.nodeHasTokens=T,t.firstDefined=C});i(Mr);var Lr=a(function(e,t){var n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(fr),a=i.default.SyntaxKind;t.convertError=function(e){return Mr.createError(e.file,e.start,e.message||e.messageText)};var o=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.inTypeMode=!1,this.ast=t,this.options=r}var t,r,n;return t=e,(r=[{key:"getASTMaps",value:function(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}},{key:"convertProgram",value:function(){return this.converter(this.ast)}},{key:"converter",value:function(e,t,r,n){if(!e)return null;var i=this.inTypeMode,a=this.allowPattern;void 0!==r&&(this.inTypeMode=r),void 0!==n&&(this.allowPattern=n);var o=this.convertNode(e,t||e.parent);return this.registerTSNodeInNodeMap(e,o),this.inTypeMode=i,this.allowPattern=a,o}},{key:"fixExports",value:function(e,t){if(e.modifiers&&e.modifiers[0].kind===a.ExportKeyword){this.registerTSNodeInNodeMap(e,t);var r=e.modifiers[0],n=e.modifiers[1],i=n&&n.kind===a.DefaultKeyword,o=i?Mr.findNextToken(n,this.ast,this.ast):Mr.findNextToken(r,this.ast,this.ast);return t.range[0]=o.getStart(this.ast),t.loc=Mr.getLocFor(t.range[0],t.range[1],this.ast),i?this.createNode(e,{type:Or.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:t,range:[r.getStart(this.ast),t.range[1]]}):this.createNode(e,{type:Or.AST_NODE_TYPES.ExportNamedDeclaration,declaration:t,specifiers:[],source:null,range:[r.getStart(this.ast),t.range[1]]})}return t}},{key:"registerTSNodeInNodeMap",value:function(e,t){t&&this.options.shouldProvideParserServices&&(this.tsNodeToESTreeNodeMap.has(e)||this.tsNodeToESTreeNodeMap.set(e,t))}},{key:"convertPattern",value:function(e,t){return this.converter(e,t,this.inTypeMode,!0)}},{key:"convertChild",value:function(e,t){return this.converter(e,t,this.inTypeMode,!1)}},{key:"convertType",value:function(e,t){return this.converter(e,t,!0,!1)}},{key:"createNode",value:function(e,t){var r=t;return r.range||(r.range=Mr.getRange(e,this.ast)),r.loc||(r.loc=Mr.getLocFor(r.range[0],r.range[1],this.ast)),r&&this.options.shouldProvideParserServices&&this.esTreeNodeToTSNodeMap.set(r,e),r}},{key:"convertTypeAnnotation",value:function(e,t){var r=t.kind===a.FunctionType||t.kind===a.ConstructorType?2:1,n=e.getFullStart()-r,i=Mr.getLocFor(n,e.end,this.ast);return{type:Or.AST_NODE_TYPES.TSTypeAnnotation,loc:i,range:[n,e.end],typeAnnotation:this.convertType(e)}}},{key:"convertBodyExpressions",value:function(e,t){var r=this,n=Mr.canContainDirective(t);return e.map(function(e){var t=r.convertChild(e);if(n){if(t&&t.expression&&i.default.isExpressionStatement(e)&&i.default.isStringLiteral(e.expression)){var a=t.expression.raw;return t.directive=a.slice(1,-1),t}n=!1}return t}).filter(function(e){return e})}},{key:"convertTypeArgumentsToTypeParameters",value:function(e){var t=this,r=Mr.findNextToken(e,this.ast,this.ast);return{type:Or.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[e.pos-1,r.end],loc:Mr.getLocFor(e.pos-1,r.end,this.ast),params:e.map(function(e){return t.convertType(e)})}}},{key:"convertTSTypeParametersToTypeParametersDeclaration",value:function(e){var t=this,r=Mr.findNextToken(e,this.ast,this.ast);return{type:Or.AST_NODE_TYPES.TSTypeParameterDeclaration,range:[e.pos-1,r.end],loc:Mr.getLocFor(e.pos-1,r.end,this.ast),params:e.map(function(e){return t.convertType(e)})}}},{key:"convertParameters",value:function(e){var t=this;return e&&e.length?e.map(function(e){var r=t.convertChild(e);return e.decorators&&e.decorators.length&&(r.decorators=e.decorators.map(function(e){return t.convertChild(e)})),r}):[]}},{key:"deeplyCopy",value:function(e){var t=this,r="TS".concat(a[e.kind]);if(this.options.errorOnUnknownASTType&&!Or.AST_NODE_TYPES[r])throw new Error('Unknown AST_NODE_TYPE: "'.concat(r,'"'));var n=this.createNode(e,{type:r});return Object.keys(e).filter(function(e){return!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc)$/.test(e)}).forEach(function(r){"type"===r?n.typeAnnotation=e.type?t.convertTypeAnnotation(e.type,e):null:"typeArguments"===r?n.typeParameters=e.typeArguments?t.convertTypeArgumentsToTypeParameters(e.typeArguments):null:"typeParameters"===r?n.typeParameters=e.typeParameters?t.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters):null:"decorators"===r?e.decorators&&e.decorators.length&&(n.decorators=e.decorators.map(function(e){return t.convertChild(e)})):Array.isArray(e[r])?n[r]=e[r].map(function(e){return t.convertChild(e)}):e[r]&&"object"===f(e[r])&&e[r].kind?n[r]=t.convertChild(e[r]):n[r]=e[r]}),n}},{key:"convertJSXTagName",value:function(e,t){var r;switch(e.kind){case a.PropertyAccessExpression:r=this.createNode(e,{type:Or.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(e.expression,t),property:this.convertJSXTagName(e.name,t)});break;case a.ThisKeyword:r=this.createNode(e,{type:Or.AST_NODE_TYPES.JSXIdentifier,name:"this"});break;case a.Identifier:default:r=this.createNode(e,{type:Or.AST_NODE_TYPES.JSXIdentifier,name:e.text})}return this.registerTSNodeInNodeMap(e,r),r}},{key:"applyModifiersToResult",value:function(e,t){var r=this;if(t&&t.length){for(var n={},i=0;i<t.length;i++){switch(t[i].kind){case a.ExportKeyword:case a.DefaultKeyword:n[i]=!0;break;case a.ConstKeyword:e.const=!0,n[i]=!0;break;case a.DeclareKeyword:e.declare=!0,n[i]=!0}}var o=t.filter(function(e,t){return!n[t]});o&&o.length&&(e.modifiers=o.map(function(e){return r.convertChild(e)}))}}},{key:"fixParentLocation",value:function(e,t){t[0]<e.range[0]&&(e.range[0]=t[0],e.loc.start=Mr.getLineAndCharacterFor(e.range[0],this.ast)),t[1]>e.range[1]&&(e.range[1]=t[1],e.loc.end=Mr.getLineAndCharacterFor(e.range[1],this.ast))}},{key:"convertNode",value:function(e,t){var r=this;switch(e.kind){case a.SourceFile:return this.createNode(e,{type:Or.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(e.statements,e),sourceType:e.externalModuleIndicator?"module":"script",range:[e.getStart(this.ast),e.endOfFileToken.end]});case a.Block:return this.createNode(e,{type:Or.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(e.statements,e)});case a.Identifier:return this.createNode(e,{type:Or.AST_NODE_TYPES.Identifier,name:e.text});case a.WithStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.WithStatement,object:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ReturnStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(e.expression)});case a.LabeledStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(e.label),body:this.convertChild(e.statement)});case a.ContinueStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(e.label)});case a.BreakStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.BreakStatement,label:this.convertChild(e.label)});case a.IfStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.IfStatement,test:this.convertChild(e.expression),consequent:this.convertChild(e.thenStatement),alternate:this.convertChild(e.elseStatement)});case a.SwitchStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(e.expression),cases:e.caseBlock.clauses.map(function(e){return r.convertChild(e)})});case a.CaseClause:case a.DefaultClause:return this.createNode(e,{type:Or.AST_NODE_TYPES.SwitchCase,test:e.kind===a.CaseClause?this.convertChild(e.expression):null,consequent:e.statements.map(function(e){return r.convertChild(e)})});case a.ThrowStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(e.expression)});case a.TryStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.TryStatement,block:this.convertChild(e.tryBlock),handler:this.convertChild(e.catchClause),finalizer:this.convertChild(e.finallyBlock)});case a.CatchClause:return this.createNode(e,{type:Or.AST_NODE_TYPES.CatchClause,param:e.variableDeclaration?this.convertChild(e.variableDeclaration.name):null,body:this.convertChild(e.block)});case a.WhileStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.WhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.DoStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ForStatement,init:this.convertChild(e.initializer),test:this.convertChild(e.condition),update:this.convertChild(e.incrementor),body:this.convertChild(e.statement)});case a.ForInStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForOfStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement),await:Boolean(e.awaitModifier&&e.awaitModifier.kind===a.AwaitKeyword)});case a.FunctionDeclaration:var n=Mr.hasModifier(a.DeclareKeyword,e),o=this.createNode(e,{type:n||!e.body?Or.AST_NODE_TYPES.TSDeclareFunction:Or.AST_NODE_TYPES.FunctionDeclaration,id:this.convertChild(e.name),generator:!!e.asteriskToken,expression:!1,async:Mr.hasModifier(a.AsyncKeyword,e),params:this.convertParameters(e.parameters),body:this.convertChild(e.body)||void 0});return e.type&&(o.returnType=this.convertTypeAnnotation(e.type,e)),n&&(o.declare=!0),e.typeParameters&&(o.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),e.decorators&&(o.decorators=e.decorators.map(function(e){return r.convertChild(e)})),this.fixExports(e,o);case a.VariableDeclaration:var s=this.createNode(e,{type:Or.AST_NODE_TYPES.VariableDeclarator,id:this.convertPattern(e.name),init:this.convertChild(e.initializer)});return e.exclamationToken&&(s.definite=!0),e.type&&(s.id.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(s.id,s.id.typeAnnotation.range)),s;case a.VariableStatement:var c=this.createNode(e,{type:Or.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarationList.declarations.map(function(e){return r.convertChild(e)}),kind:Mr.getDeclarationKind(e.declarationList)});return e.decorators&&(c.decorators=e.decorators.map(function(e){return r.convertChild(e)})),Mr.hasModifier(a.DeclareKeyword,e)&&(c.declare=!0),this.fixExports(e,c);case a.VariableDeclarationList:return this.createNode(e,{type:Or.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarations.map(function(e){return r.convertChild(e)}),kind:Mr.getDeclarationKind(e)});case a.ExpressionStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.ExpressionStatement,expression:this.convertChild(e.expression)});case a.ThisKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.ThisExpression});case a.ArrayLiteralExpression:return this.allowPattern?this.createNode(e,{type:Or.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map(function(e){return r.convertPattern(e)})}):this.createNode(e,{type:Or.AST_NODE_TYPES.ArrayExpression,elements:e.elements.map(function(e){return r.convertChild(e)})});case a.ObjectLiteralExpression:return this.allowPattern?this.createNode(e,{type:Or.AST_NODE_TYPES.ObjectPattern,properties:e.properties.map(function(e){return r.convertPattern(e)})}):this.createNode(e,{type:Or.AST_NODE_TYPES.ObjectExpression,properties:e.properties.map(function(e){return r.convertChild(e)})});case a.PropertyAssignment:return this.createNode(e,{type:Or.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.converter(e.initializer,e,this.inTypeMode,this.allowPattern),computed:Mr.isComputedProperty(e.name),method:!1,shorthand:!1,kind:"init"});case a.ShorthandPropertyAssignment:return e.objectAssignmentInitializer?this.createNode(e,{type:Or.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.createNode(e,{type:Or.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.name),right:this.convertChild(e.objectAssignmentInitializer)}),computed:!1,method:!1,shorthand:!0,kind:"init"}):this.createNode(e,{type:Or.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.convertChild(e.name),computed:!1,method:!1,shorthand:!0,kind:"init"});case a.ComputedPropertyName:return this.convertChild(e.expression);case a.PropertyDeclaration:var u=Mr.hasModifier(a.AbstractKeyword,e),l=this.createNode(e,{type:u?Or.AST_NODE_TYPES.TSAbstractClassProperty:Or.AST_NODE_TYPES.ClassProperty,key:this.convertChild(e.name),value:this.convertChild(e.initializer),computed:Mr.isComputedProperty(e.name),static:Mr.hasModifier(a.StaticKeyword,e),readonly:Mr.hasModifier(a.ReadonlyKeyword,e)||void 0});e.type&&(l.typeAnnotation=this.convertTypeAnnotation(e.type,e)),e.decorators&&(l.decorators=e.decorators.map(function(e){return r.convertChild(e)}));var _=Mr.getTSNodeAccessibility(e);return _&&(l.accessibility=_),e.name.kind===a.Identifier&&e.questionToken&&(l.optional=!0),e.exclamationToken&&(l.definite=!0),l.key.type===Or.AST_NODE_TYPES.Literal&&e.questionToken&&(l.optional=!0),l;case a.GetAccessor:case a.SetAccessor:case a.MethodDeclaration:var d,p=this.createNode(e,{type:Or.AST_NODE_TYPES.FunctionExpression,id:null,generator:!!e.asteriskToken,expression:!1,async:Mr.hasModifier(a.AsyncKeyword,e),body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end],params:[]});if(e.type&&(p.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(p.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(p,p.typeParameters.range)),t.kind===a.ObjectLiteralExpression)p.params=e.parameters.map(function(e){return r.convertChild(e)}),d=this.createNode(e,{type:Or.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:p,computed:Mr.isComputedProperty(e.name),method:e.kind===a.MethodDeclaration,shorthand:!1,kind:"init"});else{p.params=this.convertParameters(e.parameters);var f=Mr.hasModifier(a.AbstractKeyword,e)?Or.AST_NODE_TYPES.TSAbstractMethodDefinition:Or.AST_NODE_TYPES.MethodDefinition;d=this.createNode(e,{type:f,key:this.convertChild(e.name),value:p,computed:Mr.isComputedProperty(e.name),static:Mr.hasModifier(a.StaticKeyword,e),kind:"method"}),e.decorators&&(d.decorators=e.decorators.map(function(e){return r.convertChild(e)}));var m=Mr.getTSNodeAccessibility(e);m&&(d.accessibility=m)}return d.key.type===Or.AST_NODE_TYPES.Identifier&&e.questionToken&&(d.key.optional=!0),e.kind===a.GetAccessor?d.kind="get":e.kind===a.SetAccessor?d.kind="set":d.static||e.name.kind!==a.StringLiteral||"constructor"!==e.name.text||d.type===Or.AST_NODE_TYPES.Property||(d.kind="constructor"),d;case a.Constructor:var g=Mr.getLastModifier(e),y=g&&Mr.findNextToken(g,e,this.ast)||e.getFirstToken(),h=this.createNode(e,{type:Or.AST_NODE_TYPES.FunctionExpression,id:null,params:this.convertParameters(e.parameters),generator:!1,expression:!1,async:!1,body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end]});e.typeParameters&&(h.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(h,h.typeParameters.range)),e.type&&(h.returnType=this.convertTypeAnnotation(e.type,e));var v=this.createNode(e,{type:Or.AST_NODE_TYPES.Identifier,name:"constructor",range:[y.getStart(this.ast),y.end]}),b=Mr.hasModifier(a.StaticKeyword,e),D=this.createNode(e,{type:Mr.hasModifier(a.AbstractKeyword,e)?Or.AST_NODE_TYPES.TSAbstractMethodDefinition:Or.AST_NODE_TYPES.MethodDefinition,key:v,value:h,computed:!1,static:b,kind:b?"method":"constructor"}),x=Mr.getTSNodeAccessibility(e);return x&&(D.accessibility=x),D;case a.FunctionExpression:var S=this.createNode(e,{type:Or.AST_NODE_TYPES.FunctionExpression,id:this.convertChild(e.name),generator:!!e.asteriskToken,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Mr.hasModifier(a.AsyncKeyword,e),expression:!1});return e.type&&(S.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(S.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),S;case a.SuperKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.Super});case a.ArrayBindingPattern:return this.createNode(e,{type:Or.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map(function(e){return r.convertPattern(e)})});case a.OmittedExpression:return null;case a.ObjectBindingPattern:return this.createNode(e,{type:Or.AST_NODE_TYPES.ObjectPattern,properties:e.elements.map(function(e){return r.convertPattern(e)})});case a.BindingElement:if(t.kind===a.ArrayBindingPattern){var T=this.convertChild(e.name,t);return e.initializer?this.createNode(e,{type:Or.AST_NODE_TYPES.AssignmentPattern,left:T,right:this.convertChild(e.initializer)}):e.dotDotDotToken?this.createNode(e,{type:Or.AST_NODE_TYPES.RestElement,argument:T}):T}var C;return C=e.dotDotDotToken?this.createNode(e,{type:Or.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.propertyName||e.name)}):this.createNode(e,{type:Or.AST_NODE_TYPES.Property,key:this.convertChild(e.propertyName||e.name),value:this.convertChild(e.name),computed:Boolean(e.propertyName&&e.propertyName.kind===a.ComputedPropertyName),method:!1,shorthand:!e.propertyName,kind:"init"}),e.initializer&&(C.value=this.createNode(e,{type:Or.AST_NODE_TYPES.AssignmentPattern,left:this.convertChild(e.name),right:this.convertChild(e.initializer),range:[e.name.getStart(this.ast),e.initializer.end]})),C;case a.ArrowFunction:var E=this.createNode(e,{type:Or.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Mr.hasModifier(a.AsyncKeyword,e),expression:e.body.kind!==a.Block});return e.type&&(E.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(E.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),E;case a.YieldExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.YieldExpression,delegate:!!e.asteriskToken,argument:this.convertChild(e.expression)});case a.AwaitExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(e.expression)});case a.NoSubstitutionTemplateLiteral:return this.createNode(e,{type:Or.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(e,{type:Or.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-1),cooked:e.text},tail:!0})],expressions:[]});case a.TemplateExpression:var k=this.createNode(e,{type:Or.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(e.head)],expressions:[]});return e.templateSpans.forEach(function(e){k.expressions.push(r.convertChild(e.expression)),k.quasis.push(r.convertChild(e.literal))}),k;case a.TaggedTemplateExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.TaggedTemplateExpression,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,tag:this.convertChild(e.tag),quasi:this.convertChild(e.template)});case a.TemplateHead:case a.TemplateMiddle:case a.TemplateTail:var N=e.kind===a.TemplateTail;return this.createNode(e,{type:Or.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-(N?1:2)),cooked:e.text},tail:N});case a.SpreadAssignment:case a.SpreadElement:return this.allowPattern?this.createNode(e,{type:Or.AST_NODE_TYPES.RestElement,argument:this.convertPattern(e.expression)}):this.createNode(e,{type:Or.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(e.expression)});case a.Parameter:var A,F;return e.dotDotDotToken?A=F=this.createNode(e,{type:Or.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.name)}):e.initializer?(A=this.convertChild(e.name),F=this.createNode(e,{type:Or.AST_NODE_TYPES.AssignmentPattern,left:A,right:this.convertChild(e.initializer)}),e.modifiers&&(F.range[0]=A.range[0],F.loc=Mr.getLocFor(F.range[0],F.range[1],this.ast))):A=F=this.convertChild(e.name,t),e.type&&(A.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(A,A.typeAnnotation.range)),e.questionToken&&(e.questionToken.end>A.range[1]&&(A.range[1]=e.questionToken.end,A.loc.end=Mr.getLineAndCharacterFor(A.range[1],this.ast)),A.optional=!0),e.modifiers?this.createNode(e,{type:Or.AST_NODE_TYPES.TSParameterProperty,accessibility:Mr.getTSNodeAccessibility(e)||void 0,readonly:Mr.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Mr.hasModifier(a.StaticKeyword,e)||void 0,export:Mr.hasModifier(a.ExportKeyword,e)||void 0,parameter:F}):F;case a.ClassDeclaration:case a.ClassExpression:var P=e.heritageClauses||[],w=e.kind===a.ClassDeclaration?Or.AST_NODE_TYPES.ClassDeclaration:Or.AST_NODE_TYPES.ClassExpression,I=P.find(function(e){return e.token===a.ExtendsKeyword}),O=P.find(function(e){return e.token===a.ImplementsKeyword}),M=this.createNode(e,{type:w,id:this.convertChild(e.name),body:this.createNode(e,{type:Or.AST_NODE_TYPES.ClassBody,body:[],range:[e.members.pos-1,e.end]}),superClass:I&&I.types[0]?this.convertChild(I.types[0].expression):null});if(I){if(I.types.length>1)throw Mr.createError(this.ast,I.types[1].pos,"Classes can only extend a single class.");I.types[0]&&I.types[0].typeArguments&&(M.superTypeParameters=this.convertTypeArgumentsToTypeParameters(I.types[0].typeArguments))}e.typeParameters&&(M.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),O&&(M.implements=O.types.map(function(e){return r.convertChild(e)})),Mr.hasModifier(a.AbstractKeyword,e)&&(M.abstract=!0),Mr.hasModifier(a.DeclareKeyword,e)&&(M.declare=!0),e.decorators&&(M.decorators=e.decorators.map(function(e){return r.convertChild(e)}));var L=e.members.filter(Mr.isESTreeClassMember);return L.length&&(M.body.body=L.map(function(e){return r.convertChild(e)})),this.fixExports(e,M);case a.ModuleBlock:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(e.statements,e)});case a.ImportDeclaration:var R=this.createNode(e,{type:Or.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:[]});if(e.importClause&&(e.importClause.name&&R.specifiers.push(this.convertChild(e.importClause)),e.importClause.namedBindings))switch(e.importClause.namedBindings.kind){case a.NamespaceImport:R.specifiers.push(this.convertChild(e.importClause.namedBindings));break;case a.NamedImports:R.specifiers=R.specifiers.concat(e.importClause.namedBindings.elements.map(function(e){return r.convertChild(e)}))}return R;case a.NamespaceImport:return this.createNode(e,{type:Or.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(e.name)});case a.ImportSpecifier:return this.createNode(e,{type:Or.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(e.name),imported:this.convertChild(e.propertyName||e.name)});case a.ImportClause:return this.createNode(e,{type:Or.AST_NODE_TYPES.ImportDefaultSpecifier,local:this.convertChild(e.name),range:[e.getStart(this.ast),e.name.end]});case a.ExportDeclaration:return e.exportClause?this.createNode(e,{type:Or.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:e.exportClause.elements.map(function(e){return r.convertChild(e)}),declaration:null}):this.createNode(e,{type:Or.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(e.moduleSpecifier)});case a.ExportSpecifier:return this.createNode(e,{type:Or.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(e.propertyName||e.name),exported:this.convertChild(e.name)});case a.ExportAssignment:return e.isExportEquals?this.createNode(e,{type:Or.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(e.expression)}):this.createNode(e,{type:Or.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(e.expression)});case a.PrefixUnaryExpression:case a.PostfixUnaryExpression:var B=Mr.getTextForTokenKind(e.operator)||"";return/^(?:\+\+|--)$/.test(B)?this.createNode(e,{type:Or.AST_NODE_TYPES.UpdateExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)}):this.createNode(e,{type:Or.AST_NODE_TYPES.UnaryExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)});case a.DeleteExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(e.expression)});case a.VoidExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOfExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOperator:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeOperator,operator:Mr.getTextForTokenKind(e.operator),typeAnnotation:this.convertChild(e.type)});case a.BinaryExpression:if(Mr.isComma(e.operatorToken)){var j=this.createNode(e,{type:Or.AST_NODE_TYPES.SequenceExpression,expressions:[]}),J=this.convertChild(e.left);return J.type===Or.AST_NODE_TYPES.SequenceExpression&&e.left.kind!==a.ParenthesizedExpression?j.expressions=j.expressions.concat(J.expressions):j.expressions.push(J),j.expressions.push(this.convertChild(e.right)),j}var z=Mr.getBinaryExpressionType(e.operatorToken);return this.allowPattern&&z===Or.AST_NODE_TYPES.AssignmentExpression?this.createNode(e,{type:Or.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.left,e),right:this.convertChild(e.right)}):this.createNode(e,{type:z,operator:Mr.getTextForTokenKind(e.operatorToken.kind),left:this.converter(e.left,e,this.inTypeMode,z===Or.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(e.right)});case a.PropertyAccessExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.MemberExpression,object:this.convertChild(e.expression),property:this.convertChild(e.name),computed:!1});case a.ElementAccessExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.MemberExpression,object:this.convertChild(e.expression),property:this.convertChild(e.argumentExpression),computed:!0});case a.ConditionalExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(e.condition),consequent:this.convertChild(e.whenTrue),alternate:this.convertChild(e.whenFalse)});case a.CallExpression:var K=this.createNode(e,{type:Or.AST_NODE_TYPES.CallExpression,callee:this.convertChild(e.expression),arguments:e.arguments.map(function(e){return r.convertChild(e)})});return e.typeArguments&&(K.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),K;case a.NewExpression:var U=this.createNode(e,{type:Or.AST_NODE_TYPES.NewExpression,callee:this.convertChild(e.expression),arguments:e.arguments?e.arguments.map(function(e){return r.convertChild(e)}):[]});return e.typeArguments&&(U.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),U;case a.MetaProperty:return this.createNode(e,{type:Or.AST_NODE_TYPES.MetaProperty,meta:this.createNode(e.getFirstToken(),{type:Or.AST_NODE_TYPES.Identifier,name:Mr.getTextForTokenKind(e.keywordToken)}),property:this.convertChild(e.name)});case a.Decorator:return this.createNode(e,{type:Or.AST_NODE_TYPES.Decorator,expression:this.convertChild(e.expression)});case a.StringLiteral:var V=this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,raw:"",value:""});return V.raw=this.ast.text.slice(V.range[0],V.range[1]),t.name&&t.name===e?V.value=e.text:V.value=Mr.unescapeStringLiteralText(e.text),V;case a.NumericLiteral:return this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:Number(e.text),raw:e.getText()});case a.BigIntLiteral:var q=this.createNode(e,{type:Or.AST_NODE_TYPES.BigIntLiteral,raw:"",value:""});return q.raw=this.ast.text.slice(q.range[0],q.range[1]),q.value=q.raw.slice(0,-1),q;case a.RegularExpressionLiteral:var W=e.text.slice(1,e.text.lastIndexOf("/")),H=e.text.slice(e.text.lastIndexOf("/")+1),G=null;try{G=new RegExp(W,H)}catch(e){G=null}return this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:G,raw:e.text,regex:{pattern:W,flags:H}});case a.TrueKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case a.FalseKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case a.NullKeyword:return this.inTypeMode?this.createNode(e,{type:Or.AST_NODE_TYPES.TSNullKeyword}):this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:null,raw:"null"});case a.ImportKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.Import});case a.EmptyStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.EmptyStatement});case a.DebuggerStatement:return this.createNode(e,{type:Or.AST_NODE_TYPES.DebuggerStatement});case a.JsxElement:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(e.openingElement),closingElement:this.convertChild(e.closingElement),children:e.children.map(function(e){return r.convertChild(e)})});case a.JsxFragment:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(e.openingFragment),closingFragment:this.convertChild(e.closingFragment),children:e.children.map(function(e){return r.convertChild(e)})});case a.JsxSelfClosingElement:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(e,{type:Or.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!0,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map(function(e){return r.convertChild(e)}),range:Mr.getRange(e,this.ast)}),closingElement:null,children:[]});case a.JsxOpeningElement:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!1,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map(function(e){return r.convertChild(e)})});case a.JsxClosingElement:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(e.tagName,e)});case a.JsxOpeningFragment:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXOpeningFragment});case a.JsxClosingFragment:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXClosingFragment});case a.JsxExpression:var Y=e.expression?this.convertChild(e.expression):this.createNode(e,{type:Or.AST_NODE_TYPES.JSXEmptyExpression,range:[e.getStart(this.ast)+1,e.getEnd()-1]});return e.dotDotDotToken?this.createNode(e,{type:Or.AST_NODE_TYPES.JSXSpreadChild,expression:Y}):this.createNode(e,{type:Or.AST_NODE_TYPES.JSXExpressionContainer,expression:Y});case a.JsxAttribute:var X=this.convertChild(e.name);return X.type=Or.AST_NODE_TYPES.JSXIdentifier,this.createNode(e,{type:Or.AST_NODE_TYPES.JSXAttribute,name:X,value:this.convertChild(e.initializer)});case a.JsxText:var Q=e.getFullStart(),$=e.getEnd();return this.options.useJSXTextNode?this.createNode(e,{type:Or.AST_NODE_TYPES.JSXText,value:this.ast.text.slice(Q,$),raw:this.ast.text.slice(Q,$),range:[Q,$]}):this.createNode(e,{type:Or.AST_NODE_TYPES.Literal,value:this.ast.text.slice(Q,$),raw:this.ast.text.slice(Q,$),range:[Q,$]});case a.JsxSpreadAttribute:return this.createNode(e,{type:Or.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(e.expression)});case a.QualifiedName:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(e.left),right:this.convertChild(e.right)});case a.TypeReference:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeReference,typeName:this.convertType(e.typeName),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0});case a.TypeParameter:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeParameter,name:this.convertType(e.name),constraint:e.constraint?this.convertType(e.constraint):void 0,default:e.default?this.convertType(e.default):void 0});case a.ThisType:case a.AnyKeyword:case a.BigIntKeyword:case a.BooleanKeyword:case a.NeverKeyword:case a.NumberKeyword:case a.ObjectKeyword:case a.StringKeyword:case a.SymbolKeyword:case a.UnknownKeyword:case a.VoidKeyword:case a.UndefinedKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES["TS".concat(a[e.kind])]});case a.NonNullExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(e.expression)});case a.TypeLiteral:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeLiteral,members:e.members.map(function(e){return r.convertChild(e)})});case a.ArrayType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSArrayType,elementType:this.convertType(e.elementType)});case a.IndexedAccessType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertType(e.objectType),indexType:this.convertType(e.indexType)});case a.ConditionalType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSConditionalType,checkType:this.convertType(e.checkType),extendsType:this.convertType(e.extendsType),trueType:this.convertType(e.trueType),falseType:this.convertType(e.falseType)});case a.TypeQuery:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertType(e.exprName)});case a.MappedType:var Z=this.createNode(e,{type:Or.AST_NODE_TYPES.TSMappedType,typeParameter:this.convertType(e.typeParameter)});return e.readonlyToken&&(e.readonlyToken.kind===a.ReadonlyKeyword?Z.readonly=!0:Z.readonly=Mr.getTextForTokenKind(e.readonlyToken.kind)),e.questionToken&&(e.questionToken.kind===a.QuestionToken?Z.optional=!0:Z.optional=Mr.getTextForTokenKind(e.questionToken.kind)),e.type&&(Z.typeAnnotation=this.convertType(e.type)),Z;case a.ParenthesizedExpression:return this.convertChild(e.expression,t);case a.TypeAliasDeclaration:var ee=this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeAliasDeclaration,id:this.convertChild(e.name),typeAnnotation:this.convertType(e.type)});return Mr.hasModifier(a.DeclareKeyword,e)&&(ee.declare=!0),e.typeParameters&&(ee.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),this.fixExports(e,ee);case a.MethodSignature:var te=this.createNode(e,{type:Or.AST_NODE_TYPES.TSMethodSignature,computed:Mr.isComputedProperty(e.name),key:this.convertChild(e.name),params:this.convertParameters(e.parameters)});Mr.isOptional(e)&&(te.optional=!0),e.type&&(te.returnType=this.convertTypeAnnotation(e.type,e)),Mr.hasModifier(a.ReadonlyKeyword,e)&&(te.readonly=!0),e.typeParameters&&(te.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters));var re=Mr.getTSNodeAccessibility(e);return re&&(te.accessibility=re),Mr.hasModifier(a.ExportKeyword,e)&&(te.export=!0),Mr.hasModifier(a.StaticKeyword,e)&&(te.static=!0),te;case a.PropertySignature:var ne=this.createNode(e,{type:Or.AST_NODE_TYPES.TSPropertySignature,optional:Mr.isOptional(e)||void 0,computed:Mr.isComputedProperty(e.name),key:this.convertChild(e.name),typeAnnotation:e.type?this.convertTypeAnnotation(e.type,e):void 0,initializer:this.convertChild(e.initializer)||void 0,readonly:Mr.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Mr.hasModifier(a.StaticKeyword,e)||void 0,export:Mr.hasModifier(a.ExportKeyword,e)||void 0}),ie=Mr.getTSNodeAccessibility(e);return ie&&(ne.accessibility=ie),ne;case a.IndexSignature:var ae=this.createNode(e,{type:Or.AST_NODE_TYPES.TSIndexSignature,parameters:e.parameters.map(function(e){return r.convertChild(e)})});e.type&&(ae.typeAnnotation=this.convertTypeAnnotation(e.type,e)),Mr.hasModifier(a.ReadonlyKeyword,e)&&(ae.readonly=!0);var oe=Mr.getTSNodeAccessibility(e);return oe&&(ae.accessibility=oe),Mr.hasModifier(a.ExportKeyword,e)&&(ae.export=!0),Mr.hasModifier(a.StaticKeyword,e)&&(ae.static=!0),ae;case a.ConstructorType:case a.FunctionType:case a.ConstructSignature:case a.CallSignature:var se;switch(e.kind){case a.ConstructSignature:se=Or.AST_NODE_TYPES.TSConstructSignatureDeclaration;break;case a.CallSignature:se=Or.AST_NODE_TYPES.TSCallSignatureDeclaration;break;case a.FunctionType:se=Or.AST_NODE_TYPES.TSFunctionType;break;case a.ConstructorType:default:se=Or.AST_NODE_TYPES.TSConstructorType}var ce=this.createNode(e,{type:se,params:this.convertParameters(e.parameters)});return e.type&&(ce.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(ce.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),ce;case a.ExpressionWithTypeArguments:var ue=this.createNode(e,{type:t&&t.kind===a.InterfaceDeclaration?Or.AST_NODE_TYPES.TSInterfaceHeritage:Or.AST_NODE_TYPES.TSClassImplements,expression:this.convertChild(e.expression)});return e.typeArguments&&(ue.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),ue;case a.InterfaceDeclaration:var le=e.heritageClauses||[],_e=this.createNode(e,{type:Or.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(e,{type:Or.AST_NODE_TYPES.TSInterfaceBody,body:e.members.map(function(e){return r.convertChild(e)}),range:[e.members.pos-1,e.end]}),id:this.convertChild(e.name)});if(e.typeParameters&&(_e.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),le.length>0){var de=[],pe=[],fe=!0,me=!1,ge=void 0;try{for(var ye,he=le[Symbol.iterator]();!(fe=(ye=he.next()).done);fe=!0){var ve=ye.value;if(ve.token===a.ExtendsKeyword){var be=!0,De=!1,xe=void 0;try{for(var Se,Te=ve.types[Symbol.iterator]();!(be=(Se=Te.next()).done);be=!0){var Ce=Se.value;de.push(this.convertChild(Ce,e))}}catch(e){De=!0,xe=e}finally{try{be||null==Te.return||Te.return()}finally{if(De)throw xe}}}else if(ve.token===a.ImplementsKeyword){var Ee=!0,ke=!1,Ne=void 0;try{for(var Ae,Fe=ve.types[Symbol.iterator]();!(Ee=(Ae=Fe.next()).done);Ee=!0){var Pe=Ae.value;pe.push(this.convertChild(Pe,e))}}catch(e){ke=!0,Ne=e}finally{try{Ee||null==Fe.return||Fe.return()}finally{if(ke)throw Ne}}}}}catch(e){me=!0,ge=e}finally{try{fe||null==he.return||he.return()}finally{if(me)throw ge}}de.length&&(_e.extends=de),pe.length&&(_e.implements=pe)}return e.decorators&&(_e.decorators=e.decorators.map(function(e){return r.convertChild(e)})),Mr.hasModifier(a.AbstractKeyword,e)&&(_e.abstract=!0),Mr.hasModifier(a.DeclareKeyword,e)&&(_e.declare=!0),this.fixExports(e,_e);case a.TypePredicate:var we=this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypePredicate,parameterName:this.convertChild(e.parameterName),typeAnnotation:this.convertTypeAnnotation(e.type,e)});return we.typeAnnotation.loc=we.typeAnnotation.typeAnnotation.loc,we.typeAnnotation.range=we.typeAnnotation.typeAnnotation.range,we;case a.ImportType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSImportType,isTypeOf:!!e.isTypeOf,parameter:this.convertChild(e.argument),qualifier:this.convertChild(e.qualifier),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):null});case a.EnumDeclaration:var Ie=this.createNode(e,{type:Or.AST_NODE_TYPES.TSEnumDeclaration,id:this.convertChild(e.name),members:e.members.map(function(e){return r.convertChild(e)})});return this.applyModifiersToResult(Ie,e.modifiers),e.decorators&&(Ie.decorators=e.decorators.map(function(e){return r.convertChild(e)})),this.fixExports(e,Ie);case a.EnumMember:var Oe=this.createNode(e,{type:Or.AST_NODE_TYPES.TSEnumMember,id:this.convertChild(e.name)});return e.initializer&&(Oe.initializer=this.convertChild(e.initializer)),Oe;case a.ModuleDeclaration:var Me=this.createNode(e,{type:Or.AST_NODE_TYPES.TSModuleDeclaration,id:this.convertChild(e.name)});return e.body&&(Me.body=this.convertChild(e.body)),this.applyModifiersToResult(Me,e.modifiers),e.flags&i.default.NodeFlags.GlobalAugmentation&&(Me.global=!0),this.fixExports(e,Me);case a.OptionalType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertType(e.type)});case a.ParenthesizedType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSParenthesizedType,typeAnnotation:this.convertType(e.type)});case a.TupleType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTupleType,elementTypes:e.elementTypes.map(function(e){return r.convertType(e)})});case a.UnionType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSUnionType,types:e.types.map(function(e){return r.convertType(e)})});case a.IntersectionType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSIntersectionType,types:e.types.map(function(e){return r.convertType(e)})});case a.RestType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertType(e.type)});case a.AsExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertType(e.type)});case a.InferType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSInferType,typeParameter:this.convertType(e.typeParameter)});case a.LiteralType:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSLiteralType,literal:this.convertType(e.literal)});case a.TypeAssertionExpression:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertType(e.type),expression:this.convertChild(e.expression)});case a.ImportEqualsDeclaration:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(e.name),moduleReference:this.convertChild(e.moduleReference),isExport:Mr.hasModifier(a.ExportKeyword,e)});case a.ExternalModuleReference:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(e.expression)});case a.NamespaceExportDeclaration:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(e.name)});case a.AbstractKeyword:return this.createNode(e,{type:Or.AST_NODE_TYPES.TSAbstractKeyword});default:return this.deeplyCopy(e)}}}])&&m(t.prototype,r),n&&m(t,n),e}();t.Converter=o});i(Lr);var Rr=a(function(e,t){var n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(fr);function a(e,t,r){var n=e.getToken()===i.default.SyntaxKind.MultiLineCommentTrivia,a={pos:e.getTokenPos(),end:e.getTextPos(),kind:e.getToken()},o=r.substring(a.pos,a.end),s=n?o.replace(/^\/\*/,"").replace(/\*\/$/,""):o.replace(/^\/\//,""),c=Mr.getLocFor(a.pos,a.end,t);return function(e,t,r,n,i,a){var o={type:e?"Block":"Line",value:t};return"number"==typeof r&&(o.range=[r,n]),"object"===f(i)&&(o.loc={start:i,end:a}),o}(n,s,a.pos,a.end,c.start,c.end)}t.convertComments=function(e,t){for(var r=[],n=i.default.createScanner(e.languageVersion,!1,e.languageVariant,t),o=n.scan();o!==i.default.SyntaxKind.EndOfFileToken;){var s=n.getTokenPos(),c=n.getTextPos(),u=null;switch(o){case i.default.SyntaxKind.SingleLineCommentTrivia:case i.default.SyntaxKind.MultiLineCommentTrivia:var l=a(n,e,t);r.push(l);break;case i.default.SyntaxKind.GreaterThanToken:if((u=Mr.getNodeContainer(e,s,c))&&u.parent&&u.parent.kind===i.default.SyntaxKind.JsxOpeningElement&&u.parent.parent&&u.parent.parent.kind===i.default.SyntaxKind.JsxElement){o=n.reScanJsxToken();continue}break;case i.default.SyntaxKind.CloseBraceToken:if((u=Mr.getNodeContainer(e,s,c)).kind===i.default.SyntaxKind.TemplateMiddle||u.kind===i.default.SyntaxKind.TemplateTail){o=n.reScanTemplateToken();continue}break;case i.default.SyntaxKind.SlashToken:case i.default.SyntaxKind.SlashEqualsToken:if((u=Mr.getNodeContainer(e,s,c)).kind===i.default.SyntaxKind.RegularExpressionLiteral){o=n.reScanSlashToken();continue}}o=n.scan()}return r}});i(Rr);var Br=a(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(e.parseDiagnostics.length)throw Lr.convertError(e.parseDiagnostics[0]);var n=new Lr.Converter(e,{errorOnUnknownASTType:t.errorOnUnknownASTType||!1,useJSXTextNode:t.useJSXTextNode||!1,shouldProvideParserServices:r}),i=n.convertProgram();return t.tokens&&(i.tokens=Mr.convertTokens(e)),t.comment&&(i.comments=Rr.convertComments(e,t.code)),{estree:i,astMaps:r?n.getASTMaps():void 0}}});i(Br);var jr=a(function(e,t){var n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(fr);function a(e){return e.filter(function(e){switch(e.code){case 1013:case 1014:case 1044:case 1045:case 1048:case 1049:case 1070:case 1071:case 1085:case 1090:case 1096:case 1097:case 1098:case 1099:case 1117:case 1121:case 1123:case 1141:case 1162:case 1172:case 1173:case 1175:case 1176:case 1190:case 1200:case 1206:case 1211:case 1242:case 1246:case 1255:case 2364:case 2369:case 2462:case 8017:case 17012:case 17013:return!0}return!1})}function o(e){return Object.assign({},e,{message:i.default.flattenDiagnosticMessageText(e.messageText,i.default.sys.newLine)})}t.getFirstSemanticOrSyntacticError=function(e,t){try{var r=a(e.getSyntacticDiagnostics(t));if(r.length)return o(r[0]);var n=a(e.getSemanticDiagnostics(t));return n.length?o(n[0]):void 0}catch(e){return void console.warn('Warning From TSC: "'.concat(e.message))}}});i(jr);var Jr="@typescript-eslint/typescript-estree",zr="A parser that converts TypeScript source code into an ESTree compatible form",Kr="dist/parser.js",Ur="dist/parser.d.ts",Vr=["dist","README.md","LICENSE"],qr={node:">=6.14.0"},Wr="typescript-eslint/typescript-eslint",Hr={url:"https://github.com/typescript-eslint/typescript-eslint/issues"},Gr=["ast","estree","ecmascript","javascript","typescript","parser","syntax"],Yr={prebuild:"npm run clean",build:"tsc -p tsconfig.build.json",clean:"rimraf dist/",test:"jest --coverage","unit-tests":'jest "./tests/lib/.*"',"ast-alignment-tests":"jest spec.ts",typecheck:"tsc --noEmit"},Xr={"lodash.unescape":"4.0.1",semver:"5.5.0"},Qr={typescript:"*"},$r={"@babel/types":"^7.3.2","@typescript-eslint/shared-fixtures":"1.6.0"},Zr="ab3c1a1613a9b0a064d634822d7eff14bd94f5a5",en={name:Jr,version:"1.6.0",description:zr,main:Kr,types:Ur,files:Vr,engines:qr,repository:Wr,bugs:Hr,license:"BSD-2-Clause",keywords:Gr,scripts:Yr,dependencies:Xr,peerDependencies:Qr,devDependencies:$r,gitHead:Zr},tn=Object.freeze({name:Jr,version:"1.6.0",description:zr,main:Kr,types:Ur,files:Vr,engines:qr,repository:Wr,bugs:Hr,license:"BSD-2-Clause",keywords:Gr,scripts:Yr,dependencies:Xr,peerDependencies:Qr,devDependencies:$r,gitHead:Zr,default:en}),rn=tn&&en||tn,nn=a(function(e,t){var n=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(gr),o=n(fr),s=n(Br),c=">=3.2.1 <3.5.0",u=o.default.version,l=a.default.satisfies(u,c),_=!1;function d(e){return e.jsx?"estree.tsx":"estree.ts"}function p(){i={tokens:null,range:!1,loc:!1,comment:!1,comments:[],strict:!1,jsx:!1,useJSXTextNode:!1,log:console.log,projects:[],errorOnUnknownASTType:!1,errorOnTypeScriptSyntacticAndSemanticIssues:!1,code:"",tsconfigRootDir:ve.cwd(),extraFileExtensions:[]}}function f(e,t,r){return r&&function(e,t){return Mr.firstDefined(mr.calculateProjectParserOptions(e,t.filePath||d(t),i),function(e){var r=e.getSourceFile(t.filePath||d(t));return r&&{ast:r,program:e}})}(e,t)||r&&function(e,t){var r=t.filePath||d(t),n=mr.createProgram(e,r,i),a=n&&n.getSourceFile(r);return a&&{ast:a,program:n}}(e,t)||function(e){var t=d(i),r={fileExists:function(){return!0},getCanonicalFileName:function(){return t},getCurrentDirectory:function(){return""},getDirectories:function(){return[]},getDefaultLibFileName:function(){return"lib.d.ts"},getNewLine:function(){return"\n"},getSourceFile:function(t){return o.default.createSourceFile(t,e,o.default.ScriptTarget.Latest,!0)},readFile:function(){},useCaseSensitiveFileNames:function(){return!0},writeFile:function(){return null}},n=o.default.createProgram([t],{noResolve:!0,target:o.default.ScriptTarget.Latest,jsx:i.jsx?o.default.JsxEmit.Preserve:void 0},r);return{ast:n.getSourceFile(t),program:n}}(e)}function m(e){i.range="boolean"==typeof e.range&&e.range,i.loc="boolean"==typeof e.loc&&e.loc,"boolean"==typeof e.tokens&&e.tokens&&(i.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(i.comment=!0,i.comments=[]),"boolean"==typeof e.jsx&&e.jsx&&(i.jsx=!0),"boolean"==typeof e.useJSXTextNode&&e.useJSXTextNode&&(i.useJSXTextNode=!0),"boolean"==typeof e.errorOnUnknownASTType&&e.errorOnUnknownASTType&&(i.errorOnUnknownASTType=!0),"function"==typeof e.loggerFn?i.log=e.loggerFn:!1===e.loggerFn&&(i.log=Function.prototype),"string"==typeof e.project?i.projects=[e.project]:Array.isArray(e.project)&&e.project.every(function(e){return"string"==typeof e})&&(i.projects=e.project),"string"==typeof e.tsconfigRootDir&&(i.tsconfigRootDir=e.tsconfigRootDir),Array.isArray(e.extraFileExtensions)&&e.extraFileExtensions.every(function(e){return"string"==typeof e})&&(i.extraFileExtensions=e.extraFileExtensions)}function g(){if(!l&&!_){var e=["=============","WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.","You may find that it works just fine, or you may not.","SUPPORTED TYPESCRIPT VERSIONS: ".concat(c),"YOUR TYPESCRIPT VERSION: ".concat(u),"Please only submit bug reports when using the officially supported version.","============="];i.log(e.join("\n\n")),_=!0}}t.version=rn.version,t.parse=function(e,t){if(p(),t&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');"string"==typeof e||e instanceof String||(e=String(e)),i.code=e,void 0!==t&&m(t),g();var r=o.default.createSourceFile(d(i),e,o.default.ScriptTarget.Latest,!0);return s.default(r,i,!1).estree},t.parseAndGenerateServices=function(e,t){p(),"string"==typeof e||e instanceof String||(e=String(e)),i.code=e,void 0!==t&&(m(t),"boolean"==typeof t.errorOnTypeScriptSyntacticAndSemanticIssues&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(i.errorOnTypeScriptSyntacticAndSemanticIssues=!0)),g();var r=i.projects&&i.projects.length>0,n=f(e,t,r),a=n.ast,o=n.program,c=s.default(a,i,r),u=c.estree,l=c.astMaps;if(o&&i.errorOnTypeScriptSyntacticAndSemanticIssues){var _=jr.getFirstSemanticOrSyntacticError(o,a);if(_)throw Lr.convertError(_)}return{ast:u,services:{program:r?o:void 0,esTreeNodeToTSNodeMap:r&&l?l.esTreeNodeToTSNodeMap:void 0,tsNodeToESTreeNodeMap:r&&l?l.tsNodeToESTreeNodeMap:void 0}}},t.AST_NODE_TYPES=Or.AST_NODE_TYPES,t.AST_TOKEN_TYPES=Or.AST_TOKEN_TYPES,t.TSESTree=Or.TSESTree});i(nn);var an=_;function on(e,t){return nn.parse(e,{loc:!0,range:!0,tokens:!0,comment:!0,useJSXTextNode:!0,jsx:t,loggerFn:function(){}})}return{parsers:{typescript:Object.assign({parse:function(r,n,i){var a,o=function(e){return new RegExp(["(^[^\"'`]*</)","|","(^[^/]{2}.*/>)"].join(""),"m").test(e)}(r);try{a=on(r,o)}catch(t){try{a=on(r,!o)}catch(r){var s=t;if(void 0===s.lineNumber)throw s;throw e(s.message,{start:{line:s.lineNumber,column:s.column+1}})}}return delete a.tokens,t(r,a),H(a,Object.assign({},i,{originalText:r}))},astFormat:"estree",hasPragma:an},p)}}});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.typescript={}))}(globalThis,(function(e){"use strict";var t=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var r=function(e,t){if(e.startsWith("#!")){var r=e.indexOf("\n"),n={type:"Line",value:e.slice(2,r),range:[0,r],loc:{source:null,start:{line:1,column:0},end:{line:1,column:r}}};t.comments=[n].concat(t.comments)}},n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}function o(e){return e&&e.default||e}var s=Object.freeze({__proto__:null,default:{EOL:"\n"}}),c=a((function(e){e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return null;var r=t.filter((function(e){return"\r\n"===e})).length;return r>t.length-r?"\r\n":"\n"},e.exports.graceful=function(t){return e.exports(t)||"\n"}})),u=(c.graceful,o(s)),l=a((function(e,t){function r(){var e=u;return r=function(){return e},e}function n(){var e,t=(e=c)&&e.__esModule?e:{default:e};return n=function(){return t},t}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(o);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(o);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return f(e).pragmas},t.parseWithComments=f,t.print=function(e){var t=e.comments,i=void 0===t?"":t,a=e.pragmas,o=void 0===a?{}:a,s=(0,n().default)(i)||r().EOL,c=Object.keys(o),u=c.map((function(e){return m(e,o[e])})).reduce((function(e,t){return e.concat(t)}),[]).map((function(e){return" * "+e+s})).join("");if(!i){if(0===c.length)return"";if(1===c.length&&!Array.isArray(o[c[0]])){var l=o[c[0]];return"".concat("/**"," ").concat(m(c[0],l)[0]).concat(" */")}}var _=i.split(s).map((function(e){return"".concat(" *"," ").concat(e)})).join(s)+s;return"/**"+s+(i?_:"")+(i&&c.length?" *"+s:"")+u+" */"};var i=/\*\/$/,a=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,_=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,d=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,p=/(\r?\n|^) *\* ?/g;function f(e){var t=(0,n().default)(e)||r().EOL;e=e.replace(a,"").replace(i,"").replace(p,"$1");for(var o="";o!==e;)o=e,e=e.replace(_,"".concat(t,"$1 $2").concat(t));e=e.replace(l,"").trimRight();for(var c,u=Object.create(null),f=e.replace(d,"").replace(l,"").trimRight();c=d.exec(e);){var m=c[2].replace(s,"");"string"==typeof u[c[1]]||Array.isArray(u[c[1]])?u[c[1]]=[].concat(u[c[1]],m):u[c[1]]=m}return{comments:f,pragmas:u}}function m(e,t){return[].concat(t).map((function(t){return"@".concat(e," ").concat(t).trim()}))}}));i(l);l.extract,l.strip,l.parse,l.parseWithComments,l.print;var _=function(e){var t=Object.keys(l.parse(l.extract(e)));return-1!==t.indexOf("prettier")||-1!==t.indexOf("format")},d=function(e){return e.length>0?e[e.length-1]:null};var p={locStart:function e(t,r){return!(r=r||{}).ignoreDecorators&&t.declaration&&t.declaration.decorators&&t.declaration.decorators.length>0?e(t.declaration.decorators[0]):!r.ignoreDecorators&&t.decorators&&t.decorators.length>0?e(t.decorators[0]):t.__location?t.__location.startOffset:t.range?t.range[0]:"number"==typeof t.start?t.start:t.loc?t.loc.start:null},locEnd:function e(t){var r=t.nodes&&d(t.nodes);if(r&&t.source&&!t.source.end&&(t=r),t.__location)return t.__location.endOffset;var n=t.range?t.range[1]:"number"==typeof t.end?t.end:null;return t.typeAnnotation?Math.max(n,e(t.typeAnnotation)):t.loc&&!n?t.loc.end:n}};function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?D(e):t}function T(e,t,r){return(T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var C=function(e){return"string"==typeof e?e.replace(function(e){e=Object.assign({onlyFirst:!1},e);var t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}(),""):e},k=C,N=C;k.default=N;var A=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))},F=A,P=A;F.default=P;var w=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=k(e);for(var t=0,r=0;r<e.length;r++){var n=e.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=F(n)?2:1))}return t},I=w,O=w;I.default=O;var M=/[|\\{}()[\]^$+*?.]/g,L=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(M,"\\$&")},R=/[^\x20-\x7F]/;function B(e){if(e)switch(e.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function j(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o<a;){var s=t.charAt(o);if(e instanceof RegExp){if(!e.test(s))return o}else if(-1===e.indexOf(s))return o;i?o--:o++}return(-1===o||o===a)&&o}}var K=j(/\s/),J=j(" \t"),z=j(",; \t"),U=j(/[^\r\n]/);function V(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(var r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function q(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?U(e,t):t)}function W(e,t,r){var n=r&&r.backwards;if(!1===t)return!1;var i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function G(e,t,r){var n=J(e,(r=r||{}).backwards?t-1:t,r);return n!==W(e,n,r)}function H(e,t){for(var r=null,n=t;n!==r;)r=n,n=V(e,n=z(e,n)),n=J(e,n);return!1!==(n=W(e,n=q(e,n)))&&G(e,n)}function Y(e,t){for(var r=null,n=t;n!==r;)r=n,n=W(e,n=q(e,n=V(e,n=J(e,n))));return n}function X(e,t,r){return Y(e,r(t))}var Q={};function $(e){return Q[e]}[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){Q[e]=t}))}));var Z={"==":!0,"!=":!0,"===":!0,"!==":!0},ee={"*":!0,"/":!0,"%":!0},te={">>":!0,">>>":!0,"<<":!0};function re(e,t,r){for(var n=0,i=r=r||0;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function ne(e,t){var r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},a="'"===t?i:n,o=a===i?n:i,s=a.quote;(r.includes(a.quote)||r.includes(o.quote))&&(s=(r.match(a.regex)||[]).length>(r.match(o.regex)||[]).length?o.quote:a.quote);return s}function ie(e,t,r){var n='"'===t?"'":'"',i=e.replace(/\\([\s\S])|(['"])/g,(function(e,i,a){return i===n?i:a===t?"\\"+a:a||(r&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(i)?i:"\\"+i)}));return t+i+t}function ae(e){return e&&e.comments&&e.comments.length>0&&e.comments.some((function(e){return"prettier-ignore"===e.value.trim()}))}function oe(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var se={replaceEndOfLineWith:function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e.split("\n")[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;0!==r.length&&r.push(t),r.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r},getStringWidth:function(e){return e?R.test(e)?I(e):e.length:0},getMaxContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(L(t),")+"),"g"));return null===r?0:r.reduce((function(e,r){return Math.max(e,r.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(L(t),")+"),"g"));if(null===r)return 0;var n=new Map,i=0,a=!0,o=!1,s=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value.length/t.length;n.set(l,!0),l>i&&(i=l)}}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}for(var _=1;_<i;_++)if(!n.get(_))return _;return i+1},getPrecedence:$,shouldFlatten:function(e,t){return $(t)===$(e)&&("**"!==e&&((!Z[e]||!Z[t])&&(!("%"===t&&ee[e]||"%"===e&&ee[t])&&((t===e||!ee[t]||!ee[e])&&(!te[e]||!te[t])))))},isBitwiseOperator:function(e){return!!te[e]||"|"===e||"^"===e||"&"===e},isExportDeclaration:B,getParentExportDeclaration:function(e){var t=e.getParentNode();return"declaration"===e.getName()&&B(t)?t:null},getPenultimate:function(e){return e.length>1?e[e.length-2]:null},getLast:d,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Y,getNextNonSpaceNonCommentCharacterIndex:X,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(X(e,t,r))},skip:j,skipWhitespace:K,skipSpaces:J,skipToLineEnd:z,skipEverythingButNewLine:U,skipInlineComment:V,skipTrailingComment:q,skipNewline:W,isNextLineEmptyAfterIndex:H,isNextLineEmpty:function(e,t,r){return H(e,r(t))},isPreviousLineEmpty:function(e,t,r){var n=r(t)-1;return n=W(e,n=J(e,n,{backwards:!0}),{backwards:!0}),(n=J(e,n,{backwards:!0}))!==W(e,n,{backwards:!0})},hasNewline:G,hasNewlineInRange:function(e,t,r){for(var n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1},hasSpaces:function(e,t,r){return J(e,(r=r||{}).backwards?t-1:t,r)!==t},setLocStart:function(e,t){e.range?e.range[0]=t:e.start=t},setLocEnd:function(e,t){e.range?e.range[1]=t:e.end=t},startsWithNoLookaheadToken:function e(t,r){switch((t=function e(t){if(t.left)return e(t.left);return t}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return r;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return e(t.object,r);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,r);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,r);case"ConditionalExpression":return e(t.test,r);case"UpdateExpression":return!t.prefix&&e(t.argument,r);case"BindExpression":return t.object&&e(t.object,r);case"SequenceExpression":return e(t.expressions[0],r);case"TSAsExpression":return e(t.expression,r);default:return!1}},getAlignmentSize:re,getIndentSize:function(e,t){var r=e.lastIndexOf("\n");return-1===r?0:re(e.slice(r+1).match(/^[ \t]*/)[0],t)},getPreferredQuote:ne,printString:function(e,t,r){var n=e.slice(1,-1),i=!n.includes('"')&&!n.includes("'"),a="json"===t.parser?'"':t.__isInHtmlAttribute?"'":ne(e,t.singleQuote?"'":'"');return r?i?a+n+a:e:ie(n,a,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.embeddedInHtml))},printNumber:function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function(e){return ae(e.getValue())},hasNodeIgnoreComment:ae,makeString:ie,matchAncestorTypes:function(e,t,r){for(r=r||0,t=t.slice();t.length;){var n=e.getParentNode(r),i=t.shift();if(!n||n.type!==i)return!1;r++}return!0},addLeadingComment:function(e,t){t.leading=!0,t.trailing=!1,oe(e,t)},addDanglingComment:function(e,t){t.leading=!1,t.trailing=!1,oe(e,t)},addTrailingComment:function(e,t){t.leading=!1,t.trailing=!0,oe(e,t)},isWithinParentArrayProperty:function(e,t){var r=e.getValue(),n=e.getParentNode();if(null==n)return!1;if(!Array.isArray(n[t]))return!1;var i=e.getName();return n[t][i]===r}}.getLast;var ce=function(e,t){return function e(t,r,n,i){if(!t||"object"!==f(t))return;if(Array.isArray(t)){for(var a=0;a<t.length;a++)e(t[a],r,t,a);return}if("string"!=typeof t.type)return;for(var o=0,s=Object.keys(t);o<s.length;o++){var c=s[o];e(t[c],r,t,c)}var u=r(t);u&&(n[i]=u)}(e,(function(e){switch(e.type){case"VariableDeclaration":var r=se(e.declarations);r&&r.init&&function(e,r){if(";"===t.originalText[function(e){return"flow"===t.parser?e.range[1]:e.end}(r)])return;"flow"===t.parser?e.range=[e.range[0],r.range[1]]:e.end=r.end;e.loc=Object.assign({},e.loc,{end:e.loc.end})}(e,r);break;case"TSParenthesizedType":return e.typeAnnotation;case"TSUnionType":case"TSIntersectionType":if(1===e.types.length)return Object.assign({},e.types[0],{loc:e.loc,range:e.range});break;case"EnumDeclaration":"flow"===t.parser&&e.body.range[0]===e.range[0]&&e.body.range[1]===e.range[1]&&(e.body.range=[e.id.range[1],e.range[1]-1]),"babel-flow"===t.parser&&(e.body.start=e.id.end,e.body.end=e.end-1)}})),e},ue="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function le(){throw new Error("setTimeout has not been defined")}function _e(){throw new Error("clearTimeout has not been defined")}var de=le,pe=_e;function fe(e){if(de===setTimeout)return setTimeout(e,0);if((de===le||!de)&&setTimeout)return de=setTimeout,setTimeout(e,0);try{return de(e,0)}catch(t){try{return de.call(null,e,0)}catch(t){return de.call(this,e,0)}}}"function"==typeof ue.setTimeout&&(de=setTimeout),"function"==typeof ue.clearTimeout&&(pe=clearTimeout);var me,ge=[],ye=!1,he=-1;function ve(){ye&&me&&(ye=!1,me.length?ge=me.concat(ge):he=-1,ge.length&&be())}function be(){if(!ye){var e=fe(ve);ye=!0;for(var t=ge.length;t;){for(me=ge,ge=[];++he<t;)me&&me[he].run();he=-1,t=ge.length}me=null,ye=!1,function(e){if(pe===clearTimeout)return clearTimeout(e);if((pe===_e||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(e);try{pe(e)}catch(t){try{return pe.call(null,e)}catch(t){return pe.call(this,e)}}}(e)}}function xe(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];ge.push(new De(e,t)),1!==ge.length||ye||fe(be)}function De(e,t){this.fun=e,this.array=t}De.prototype.run=function(){this.fun.apply(null,this.array)};function Se(){}var Te=Se,Ee=Se,Ce=Se,ke=Se,Ne=Se,Ae=Se,Fe=Se;var Pe=ue.performance||{},we=Pe.now||Pe.mozNow||Pe.msNow||Pe.oNow||Pe.webkitNow||function(){return(new Date).getTime()};var Ie=new Date;var Oe={nextTick:xe,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Te,addListener:Ee,once:Ce,off:ke,removeListener:Ne,removeAllListeners:Ae,emit:Fe,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*we.call(Pe),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ie)/1e3}},Me=a((function(e,t){var r;t=e.exports=d,r="object"===f(Oe)&&Oe.env&&Oe.env.NODE_DEBUG&&/\bsemver\b/i.test(Oe.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],s=t.tokens={},c=0;function u(e){s[e]=c++}u("NUMERICIDENTIFIER"),o[s.NUMERICIDENTIFIER]="0|[1-9]\\d*",u("NUMERICIDENTIFIERLOOSE"),o[s.NUMERICIDENTIFIERLOOSE]="[0-9]+",u("NONNUMERICIDENTIFIER"),o[s.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",u("MAINVERSION"),o[s.MAINVERSION]="("+o[s.NUMERICIDENTIFIER]+")\\.("+o[s.NUMERICIDENTIFIER]+")\\.("+o[s.NUMERICIDENTIFIER]+")",u("MAINVERSIONLOOSE"),o[s.MAINVERSIONLOOSE]="("+o[s.NUMERICIDENTIFIERLOOSE]+")\\.("+o[s.NUMERICIDENTIFIERLOOSE]+")\\.("+o[s.NUMERICIDENTIFIERLOOSE]+")",u("PRERELEASEIDENTIFIER"),o[s.PRERELEASEIDENTIFIER]="(?:"+o[s.NUMERICIDENTIFIER]+"|"+o[s.NONNUMERICIDENTIFIER]+")",u("PRERELEASEIDENTIFIERLOOSE"),o[s.PRERELEASEIDENTIFIERLOOSE]="(?:"+o[s.NUMERICIDENTIFIERLOOSE]+"|"+o[s.NONNUMERICIDENTIFIER]+")",u("PRERELEASE"),o[s.PRERELEASE]="(?:-("+o[s.PRERELEASEIDENTIFIER]+"(?:\\."+o[s.PRERELEASEIDENTIFIER]+")*))",u("PRERELEASELOOSE"),o[s.PRERELEASELOOSE]="(?:-?("+o[s.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+o[s.PRERELEASEIDENTIFIERLOOSE]+")*))",u("BUILDIDENTIFIER"),o[s.BUILDIDENTIFIER]="[0-9A-Za-z-]+",u("BUILD"),o[s.BUILD]="(?:\\+("+o[s.BUILDIDENTIFIER]+"(?:\\."+o[s.BUILDIDENTIFIER]+")*))",u("FULL"),u("FULLPLAIN"),o[s.FULLPLAIN]="v?"+o[s.MAINVERSION]+o[s.PRERELEASE]+"?"+o[s.BUILD]+"?",o[s.FULL]="^"+o[s.FULLPLAIN]+"$",u("LOOSEPLAIN"),o[s.LOOSEPLAIN]="[v=\\s]*"+o[s.MAINVERSIONLOOSE]+o[s.PRERELEASELOOSE]+"?"+o[s.BUILD]+"?",u("LOOSE"),o[s.LOOSE]="^"+o[s.LOOSEPLAIN]+"$",u("GTLT"),o[s.GTLT]="((?:<|>)?=?)",u("XRANGEIDENTIFIERLOOSE"),o[s.XRANGEIDENTIFIERLOOSE]=o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",u("XRANGEIDENTIFIER"),o[s.XRANGEIDENTIFIER]=o[s.NUMERICIDENTIFIER]+"|x|X|\\*",u("XRANGEPLAIN"),o[s.XRANGEPLAIN]="[v=\\s]*("+o[s.XRANGEIDENTIFIER]+")(?:\\.("+o[s.XRANGEIDENTIFIER]+")(?:\\.("+o[s.XRANGEIDENTIFIER]+")(?:"+o[s.PRERELEASE]+")?"+o[s.BUILD]+"?)?)?",u("XRANGEPLAINLOOSE"),o[s.XRANGEPLAINLOOSE]="[v=\\s]*("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:"+o[s.PRERELEASELOOSE]+")?"+o[s.BUILD]+"?)?)?",u("XRANGE"),o[s.XRANGE]="^"+o[s.GTLT]+"\\s*"+o[s.XRANGEPLAIN]+"$",u("XRANGELOOSE"),o[s.XRANGELOOSE]="^"+o[s.GTLT]+"\\s*"+o[s.XRANGEPLAINLOOSE]+"$",u("COERCE"),o[s.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",u("COERCERTL"),a[s.COERCERTL]=new RegExp(o[s.COERCE],"g"),u("LONETILDE"),o[s.LONETILDE]="(?:~>?)",u("TILDETRIM"),o[s.TILDETRIM]="(\\s*)"+o[s.LONETILDE]+"\\s+",a[s.TILDETRIM]=new RegExp(o[s.TILDETRIM],"g");u("TILDE"),o[s.TILDE]="^"+o[s.LONETILDE]+o[s.XRANGEPLAIN]+"$",u("TILDELOOSE"),o[s.TILDELOOSE]="^"+o[s.LONETILDE]+o[s.XRANGEPLAINLOOSE]+"$",u("LONECARET"),o[s.LONECARET]="(?:\\^)",u("CARETTRIM"),o[s.CARETTRIM]="(\\s*)"+o[s.LONECARET]+"\\s+",a[s.CARETTRIM]=new RegExp(o[s.CARETTRIM],"g");u("CARET"),o[s.CARET]="^"+o[s.LONECARET]+o[s.XRANGEPLAIN]+"$",u("CARETLOOSE"),o[s.CARETLOOSE]="^"+o[s.LONECARET]+o[s.XRANGEPLAINLOOSE]+"$",u("COMPARATORLOOSE"),o[s.COMPARATORLOOSE]="^"+o[s.GTLT]+"\\s*("+o[s.LOOSEPLAIN]+")$|^$",u("COMPARATOR"),o[s.COMPARATOR]="^"+o[s.GTLT]+"\\s*("+o[s.FULLPLAIN]+")$|^$",u("COMPARATORTRIM"),o[s.COMPARATORTRIM]="(\\s*)"+o[s.GTLT]+"\\s*("+o[s.LOOSEPLAIN]+"|"+o[s.XRANGEPLAIN]+")",a[s.COMPARATORTRIM]=new RegExp(o[s.COMPARATORTRIM],"g");u("HYPHENRANGE"),o[s.HYPHENRANGE]="^\\s*("+o[s.XRANGEPLAIN]+")\\s+-\\s+("+o[s.XRANGEPLAIN]+")\\s*$",u("HYPHENRANGELOOSE"),o[s.HYPHENRANGELOOSE]="^\\s*("+o[s.XRANGEPLAINLOOSE]+")\\s+-\\s+("+o[s.XRANGEPLAINLOOSE]+")\\s*$",u("STAR"),o[s.STAR]="(<|>)?=?\\s*\\*";for(var l=0;l<c;l++)r(l,o[l]),a[l]||(a[l]=new RegExp(o[l]));function _(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof d)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?a[s.LOOSE]:a[s.FULL]).test(e))return null;try{return new d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof d){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof d))return new d(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=_,t.valid=function(e,t){var r=_(e,t);return r?r.version:null},t.clean=function(e,t){var r=_(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=d,d.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},d.prototype.toString=function(){return this.version},d.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof d||(e=new d(e,this.options)),this.compareMain(e)||this.comparePre(e)},d.prototype.compareMain=function(e){return e instanceof d||(e=new d(e,this.options)),m(this.major,e.major)||m(this.minor,e.minor)||m(this.patch,e.patch)},d.prototype.comparePre=function(e){if(e instanceof d||(e=new d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return m(n,i)}while(++t)},d.prototype.compareBuild=function(e){e instanceof d||(e=new d(e,this.options));var t=0;do{var n=this.build[t],i=e.build[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return m(n,i)}while(++t)},d.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new d(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(v(e,t))return null;var r=_(e),n=_(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==n[o])return i+o;return a},t.compareIdentifiers=m;var p=/^[0-9]+$/;function m(e,t){var r=p.test(e),n=p.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}function g(e,t,r){return new d(e,r).compare(new d(t,r))}function y(e,t,r){return g(e,t,r)>0}function h(e,t,r){return g(e,t,r)<0}function v(e,t,r){return 0===g(e,t,r)}function b(e,t,r){return 0!==g(e,t,r)}function x(e,t,r){return g(e,t,r)>=0}function D(e,t,r){return g(e,t,r)<=0}function S(e,t,r,n){switch(t){case"===":return"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),e===r;case"!==":return"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),e!==r;case"":case"=":case"==":return v(e,r,n);case"!=":return b(e,r,n);case">":return y(e,r,n);case">=":return x(e,r,n);case"<":return h(e,r,n);case"<=":return D(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function T(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof T){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof T))return new T(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===E?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return m(t,e)},t.major=function(e,t){return new d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(e,t).patch},t.compare=g,t.compareLoose=function(e,t){return g(e,t,!0)},t.compareBuild=function(e,t,r){var n=new d(e,r),i=new d(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return g(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=y,t.lt=h,t.eq=v,t.neq=b,t.gte=x,t.lte=D,t.cmp=S,t.Comparator=T;var E={};function C(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof C)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new C(e.raw,t);if(e instanceof T)return new C(e.value,t);if(!(this instanceof C))return new C(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function k(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function N(e){return!e||"x"===e.toLowerCase()||"*"===e}function A(e,t,r,n,i,a,o,s,c,u,l,_,d){return((t=N(r)?"":N(n)?">="+r+".0.0":N(i)?">="+r+"."+n+".0":">="+t)+" "+(s=N(c)?"":N(u)?"<"+(+c+1)+".0.0":N(l)?"<"+c+"."+(+u+1)+".0":_?"<="+c+"."+u+"."+l+"-"+_:"<="+s)).trim()}function F(e,t,n){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(i=0;i<e.length;i++)if(r(e[i].semver),e[i].semver!==E&&e[i].semver.prerelease.length>0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function P(e,t,r){try{t=new C(t,r)}catch(e){return!1}return t.test(e)}function w(e,t,r,n){var i,a,o,s,c;switch(e=new d(e,n),t=new C(t,n),r){case">":i=y,a=D,o=h,s=">",c=">=";break;case"<":i=h,a=x,o=y,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(P(e,t,n))return!1;for(var u=0;u<t.set.length;++u){var l=t.set[u],_=null,p=null;if(l.forEach((function(e){e.semver===E&&(e=new T(">=0.0.0")),_=_||e,p=p||e,i(e.semver,_.semver,n)?_=e:o(e.semver,p.semver,n)&&(p=e)})),_.operator===s||_.operator===c)return!1;if((!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===c&&o(e,p.semver))return!1}return!0}T.prototype.parse=function(e){var t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new d(r[2],this.options.loose):this.semver=E},T.prototype.toString=function(){return this.value},T.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===E||e===E)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return S(e,this.operator,this.semver,this.options)},T.prototype.intersects=function(e,t){if(!(e instanceof T))throw new TypeError("a Comparator is required");var r;if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new C(e.value,t),P(this.value,r,t));if(""===e.operator)return""===e.value||(r=new C(this.value,t),P(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=S(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=S(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=C,C.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},C.prototype.toString=function(){return this.range},C.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(n,A),r("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,a[s.COMPARATORTRIM]),e=(e=(e=e.replace(a[s.TILDETRIM],"$1~")).replace(a[s.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],o=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[s.CARETLOOSE]:a[s.CARET];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),N(n)?s="":N(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":N(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),N(n)?s="":N(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":N(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,(function(n,i,a,o,s,c){r("xRange",e,n,i,a,o,s,c);var u=N(a),l=u||N(o),_=l||N(s),d=_;return"="===i&&d&&(i=""),c=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(l&&(o=0),s=0,">"===i?(i=">=",l?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",l?a=+a+1:o=+o+1),n=i+a+"."+o+"."+s+c):l?n=">="+a+".0.0"+c+" <"+(+a+1)+".0.0"+c:_&&(n=">="+a+"."+o+".0"+c+" <"+a+"."+(+o+1)+".0"+c),r("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[s.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o=o.map((function(e){return new T(e,this.options)}),this)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Range is required");return this.set.some((function(r){return k(r,t)&&e.set.some((function(e){return k(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new C(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},C.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(F(this.set[t],e,this.options))return!0;return!1},t.satisfies=P,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var a=new C(t,r)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(n&&-1!==i.compare(e)||(i=new d(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var a=new C(t,r)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(n&&1!==i.compare(e)||(i=new d(n=e,r)))})),n},t.minVersion=function(e,t){e=new C(e,t);var r=new d("0.0.0");if(e.test(r))return r;if(r=new d("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;n<e.set.length;++n){e.set[n].forEach((function(e){var t=new d(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new C(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return w(e,t,"<",r)},t.gtr=function(e,t,r){return w(e,t,">",r)},t.outside=w,t.prerelease=function(e,t){var r=_(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new C(e,r),t=new C(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=a[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),a[s.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;a[s.COERCERTL].lastIndex=-1}else r=e.match(a[s.COERCE]);if(null===r)return null;return _(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}})),Le=(Me.SEMVER_SPEC_VERSION,Me.re,Me.src,Me.tokens,Me.parse,Me.valid,Me.clean,Me.SemVer,Me.inc,Me.diff,Me.compareIdentifiers,Me.rcompareIdentifiers,Me.major,Me.minor,Me.patch,Me.compare,Me.compareLoose,Me.compareBuild,Me.rcompare,Me.sort,Me.rsort,Me.gt,Me.lt,Me.eq,Me.neq,Me.gte,Me.lte,Me.cmp,Me.Comparator,Me.Range,Me.toComparators,Me.satisfies,Me.maxSatisfying,Me.minSatisfying,Me.minVersion,Me.validRange,Me.ltr,Me.gtr,Me.outside,Me.prerelease,Me.intersects,Me.coerce,"/Users/lydell/forks/prettier/node_modules/typescript/lib"),Re=Object.freeze({__proto__:null,default:{}});var Be=Object.freeze({__proto__:null,extname:function(e){var t=e.lastIndexOf(".");return-1===t?"":e.slice(t)}}),je=Object.freeze({__proto__:null,default:{}}),Ke=Object.freeze({__proto__:null,default:{}}),Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ze=function(e){if(0<=e&&e<Je.length)return Je[e];throw new TypeError("Must be between 0 and 63: "+e)},Ue=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};var Ve=function(e){var t,r="",n=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&n,(n>>>=5)>0&&(t|=32),r+=ze(t)}while(n>0);return r},qe=function(e,t,r){var n,i,a,o,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=Ue(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&i),c+=(i&=31)<<u,u+=5}while(n);r.value=(o=(a=c)>>1,1==(1&a)?-o:o),r.rest=t},We=a((function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?u:function(e){return l(e)?"$"+e:e},t.fromSetString=c?u:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=_(e.source,t.source);return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=e.generatedLine-t.generatedLine)?n:_(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=_(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:_(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=_(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:_(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}})),Ge=(We.getArg,We.urlParse,We.urlGenerate,We.normalize,We.join,We.isAbsolute,We.relative,We.toSetString,We.fromSetString,We.compareByOriginalPositions,We.compareByGeneratedPositionsDeflated,We.compareByGeneratedPositionsInflated,We.parseSourceMapInput,We.computeSourceURL,Object.prototype.hasOwnProperty),He="undefined"!=typeof Map;function Ye(){this._array=[],this._set=He?new Map:Object.create(null)}Ye.fromArray=function(e,t){for(var r=new Ye,n=0,i=e.length;n<i;n++)r.add(e[n],t);return r},Ye.prototype.size=function(){return He?this._set.size:Object.getOwnPropertyNames(this._set).length},Ye.prototype.add=function(e,t){var r=He?e:We.toSetString(e),n=He?this.has(e):Ge.call(this._set,r),i=this._array.length;n&&!t||this._array.push(e),n||(He?this._set.set(e,i):this._set[r]=i)},Ye.prototype.has=function(e){if(He)return this._set.has(e);var t=We.toSetString(e);return Ge.call(this._set,t)},Ye.prototype.indexOf=function(e){if(He){var t=this._set.get(e);if(t>=0)return t}else{var r=We.toSetString(e);if(Ge.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},Ye.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},Ye.prototype.toArray=function(){return this._array.slice()};var Xe={ArraySet:Ye};function Qe(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Qe.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},Qe.prototype.add=function(e){var t,r,n,i,a,o;t=this._last,r=e,n=t.generatedLine,i=r.generatedLine,a=t.generatedColumn,o=r.generatedColumn,i>n||i==n&&o>=a||We.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},Qe.prototype.toArray=function(){return this._sorted||(this._array.sort(We.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var $e=Xe.ArraySet,Ze={MappingList:Qe}.MappingList;function et(e){e||(e={}),this._file=We.getArg(e,"file",null),this._sourceRoot=We.getArg(e,"sourceRoot",null),this._skipValidation=We.getArg(e,"skipValidation",!1),this._sources=new $e,this._names=new $e,this._mappings=new Ze,this._sourcesContents=null}et.prototype._version=3,et.fromSourceMap=function(e){var t=e.sourceRoot,r=new et({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=We.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var i=n;null!==t&&(i=We.relative(t,n)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)})),r},et.prototype.addMapping=function(e){var t=We.getArg(e,"generated"),r=We.getArg(e,"original",null),n=We.getArg(e,"source",null),i=We.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},et.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=We.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[We.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[We.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},et.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=We.relative(i,n));var a=new $e,o=new $e;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=We.join(r,t.source)),null!=i&&(t.source=We.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||o.has(u)||o.add(u)}),this),this._sources=a,this._names=o,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=We.join(r,t)),null!=i&&(t=We.relative(i,t)),this.setSourceContent(t,n))}),this)},et.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},et.prototype._serializeMappings=function(){for(var e,t,r,n,i=0,a=1,o=0,s=0,c=0,u=0,l="",_=this._mappings.toArray(),d=0,p=_.length;d<p;d++){if(e="",(t=_[d]).generatedLine!==a)for(i=0;t.generatedLine!==a;)e+=";",a++;else if(d>0){if(!We.compareByGeneratedPositionsInflated(t,_[d-1]))continue;e+=","}e+=Ve(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=Ve(n-u),u=n,e+=Ve(t.originalLine-1-s),s=t.originalLine-1,e+=Ve(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=Ve(r-c),c=r)),l+=e}return l},et.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=We.relative(t,e));var r=We.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},et.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},et.prototype.toString=function(){return JSON.stringify(this.toJSON())};var tt={SourceMapGenerator:et},rt=a((function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,i){if(0===r.length)return-1;var a=function e(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?e(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n<a.length?n:-1:c:c-r>1?e(r,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===n(r[a],r[a-1],!0);)--a;return a}}));rt.GREATEST_LOWER_BOUND,rt.LEAST_UPPER_BOUND,rt.search;function nt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function it(e,t,r,n){if(r<n){var i=r-1;nt(e,(c=r,u=n,Math.round(c+Math.random()*(u-c))),n);for(var a=e[n],o=r;o<n;o++)t(e[o],a)<=0&&nt(e,i+=1,o);nt(e,i+1,o);var s=i+1;it(e,t,r,s-1),it(e,t,s+1,n)}var c,u}var at=Xe.ArraySet,ot=function(e,t){it(e,t,0,e.length-1)};function st(e,t){var r=e;return"string"==typeof e&&(r=We.parseSourceMapInput(e)),null!=r.sections?new lt(r,t):new ct(r,t)}st.fromSourceMap=function(e,t){return ct.fromSourceMap(e,t)},st.prototype._version=3,st.prototype.__generatedMappings=null,Object.defineProperty(st.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),st.prototype.__originalMappings=null,Object.defineProperty(st.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),st.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},st.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},st.GENERATED_ORDER=1,st.ORIGINAL_ORDER=2,st.GREATEST_LOWER_BOUND=1,st.LEAST_UPPER_BOUND=2,st.prototype.eachMapping=function(e,t,r){var n,i=t||null;switch(r||st.GENERATED_ORDER){case st.GENERATED_ORDER:n=this._generatedMappings;break;case st.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;n.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=We.computeSourceURL(a,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,i)},st.prototype.allGeneratedPositionsFor=function(e){var t=We.getArg(e,"line"),r={source:We.getArg(e,"source"),originalLine:t,originalColumn:We.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",We.compareByOriginalPositions,rt.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:We.getArg(a,"generatedLine",null),column:We.getArg(a,"generatedColumn",null),lastColumn:We.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)n.push({line:We.getArg(a,"generatedLine",null),column:We.getArg(a,"generatedColumn",null),lastColumn:We.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};function ct(e,t){var r=e;"string"==typeof e&&(r=We.parseSourceMapInput(e));var n=We.getArg(r,"version"),i=We.getArg(r,"sources"),a=We.getArg(r,"names",[]),o=We.getArg(r,"sourceRoot",null),s=We.getArg(r,"sourcesContent",null),c=We.getArg(r,"mappings"),u=We.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=We.normalize(o)),i=i.map(String).map(We.normalize).map((function(e){return o&&We.isAbsolute(o)&&We.isAbsolute(e)?We.relative(o,e):e})),this._names=at.fromArray(a.map(String),!0),this._sources=at.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map((function(e){return We.computeSourceURL(o,e,t)})),this.sourceRoot=o,this.sourcesContent=s,this._mappings=c,this._sourceMapURL=t,this.file=u}function ut(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ct.prototype=Object.create(st.prototype),ct.prototype.consumer=st,ct.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=We.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},ct.fromSourceMap=function(e,t){var r=Object.create(ct.prototype),n=r._names=at.fromArray(e._names.toArray(),!0),i=r._sources=at.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map((function(e){return We.computeSourceURL(r.sourceRoot,e,t)}));for(var a=e._mappings.toArray().slice(),o=r.__generatedMappings=[],s=r.__originalMappings=[],c=0,u=a.length;c<u;c++){var l=a[c],_=new ut;_.generatedLine=l.generatedLine,_.generatedColumn=l.generatedColumn,l.source&&(_.source=i.indexOf(l.source),_.originalLine=l.originalLine,_.originalColumn=l.originalColumn,l.name&&(_.name=n.indexOf(l.name)),s.push(_)),o.push(_)}return ot(r.__originalMappings,We.compareByOriginalPositions),r},ct.prototype._version=3,Object.defineProperty(ct.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),ct.prototype._parseMappings=function(e,t){for(var r,n,i,a,o,s=1,c=0,u=0,l=0,_=0,d=0,p=e.length,f=0,m={},g={},y=[],h=[];f<p;)if(";"===e.charAt(f))s++,f++,c=0;else if(","===e.charAt(f))f++;else{for((r=new ut).generatedLine=s,a=f;a<p&&!this._charIsMappingSeparator(e,a);a++);if(i=m[n=e.slice(f,a)])f+=n.length;else{for(i=[];f<a;)qe(e,f,g),o=g.value,f=g.rest,i.push(o);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");m[n]=i}r.generatedColumn=c+i[0],c=r.generatedColumn,i.length>1&&(r.source=_+i[1],_+=i[1],r.originalLine=u+i[2],u=r.originalLine,r.originalLine+=1,r.originalColumn=l+i[3],l=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),h.push(r),"number"==typeof r.originalLine&&y.push(r)}ot(h,We.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,ot(y,We.compareByOriginalPositions),this.__originalMappings=y},ct.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return rt.search(e,t,i,a)},ct.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},ct.prototype.originalPositionFor=function(e){var t={generatedLine:We.getArg(e,"line"),generatedColumn:We.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",We.compareByGeneratedPositionsDeflated,We.getArg(e,"bias",st.GREATEST_LOWER_BOUND));if(r>=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var i=We.getArg(n,"source",null);null!==i&&(i=this._sources.at(i),i=We.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=We.getArg(n,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:We.getArg(n,"originalLine",null),column:We.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},ct.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},ct.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,i=e;if(null!=this.sourceRoot&&(i=We.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=We.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},ct.prototype.generatedPositionFor=function(e){var t=We.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:We.getArg(e,"line"),originalColumn:We.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",We.compareByOriginalPositions,We.getArg(e,"bias",st.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===r.source)return{line:We.getArg(i,"generatedLine",null),column:We.getArg(i,"generatedColumn",null),lastColumn:We.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};function lt(e,t){var r=e;"string"==typeof e&&(r=We.parseSourceMapInput(e));var n=We.getArg(r,"version"),i=We.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new at,this._names=new at;var a={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=We.getArg(e,"offset"),n=We.getArg(r,"line"),i=We.getArg(r,"column");if(n<a.line||n===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new st(We.getArg(e,"map"),t)}}))}lt.prototype=Object.create(st.prototype),lt.prototype.constructor=st,lt.prototype._version=3,Object.defineProperty(lt.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),lt.prototype.originalPositionFor=function(e){var t={generatedLine:We.getArg(e,"line"),generatedColumn:We.getArg(e,"column")},r=rt.search(t,this._sections,(function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn})),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},lt.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},lt.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},lt.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer._findSourceIndex(We.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n)return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},lt.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],s=n.consumer._sources.at(o.source);s=We.computeSourceURL(n.consumer.sourceRoot,s,this._sourceMapURL),this._sources.add(s),s=this._sources.indexOf(s);var c=null;o.name&&(c=n.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var u={source:s,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(u),"number"==typeof u.originalLine&&this.__originalMappings.push(u)}ot(this.__generatedMappings,We.compareByGeneratedPositionsDeflated),ot(this.__originalMappings,We.compareByOriginalPositions)};var _t=tt.SourceMapGenerator,dt=/(\r?\n)/,pt="$$$isSourceNode$$$";function ft(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[pt]=!0,null!=n&&this.add(n)}ft.fromStringWithSourceMap=function(e,t,r){var n=new ft,i=e.split(dt),a=0,o=function(){return e()+(e()||"");function e(){return a<i.length?i[a++]:void 0}},s=1,c=0,u=null;return t.eachMapping((function(e){if(null!==u){if(!(s<e.generatedLine)){var t=(r=i[a]||"").substr(0,e.generatedColumn-c);return i[a]=r.substr(e.generatedColumn-c),c=e.generatedColumn,l(u,t),void(u=e)}l(u,o()),s++,c=0}for(;s<e.generatedLine;)n.add(o()),s++;if(c<e.generatedColumn){var r=i[a]||"";n.add(r.substr(0,e.generatedColumn)),i[a]=r.substr(e.generatedColumn),c=e.generatedColumn}u=e}),this),a<i.length&&(u&&l(u,o()),n.add(i.splice(a).join(""))),t.sources.forEach((function(e){var i=t.sourceContentFor(e);null!=i&&(null!=r&&(e=We.join(r,e)),n.setSourceContent(e,i))})),n;function l(e,t){if(null===e||void 0===e.source)n.add(t);else{var i=r?We.join(r,e.source):e.source;n.add(new ft(e.originalLine,e.originalColumn,i,t,e.name))}}},ft.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[pt]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},ft.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[pt]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},ft.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[pt]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},ft.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},ft.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[pt]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},ft.prototype.setSourceContent=function(e,t){this.sourceContents[We.toSetString(e)]=t},ft.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][pt]&&this.children[t].walkSourceContents(e);var n=Object.keys(this.sourceContents);for(t=0,r=n.length;t<r;t++)e(We.fromSetString(n[t]),this.sourceContents[n[t]])},ft.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},ft.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new _t(e),n=!1,i=null,a=null,o=null,s=null;return this.walk((function(e,c){t.code+=e,null!==c.source&&null!==c.line&&null!==c.column?(i===c.source&&a===c.line&&o===c.column&&s===c.name||r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name}),i=c.source,a=c.line,o=c.column,s=c.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),i=null,n=!1);for(var u=0,l=e.length;u<l;u++)10===e.charCodeAt(u)?(t.line++,t.column=0,u+1===l?(i=null,n=!1):n&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name})):t.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:t.code,map:r}};var mt=[],gt=[],yt="undefined"!=typeof Uint8Array?Uint8Array:Array,ht=!1;function vt(){ht=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)mt[t]=e[t],gt[e.charCodeAt(t)]=t;gt["-".charCodeAt(0)]=62,gt["_".charCodeAt(0)]=63}function bt(e,t,r){for(var n,i,a=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(mt[(i=n)>>18&63]+mt[i>>12&63]+mt[i>>6&63]+mt[63&i]);return a.join("")}function xt(e){var t;ht||vt();for(var r=e.length,n=r%3,i="",a=[],o=0,s=r-n;o<s;o+=16383)a.push(bt(e,o,o+16383>s?s:o+16383));return 1===n?(t=e[r-1],i+=mt[t>>2],i+=mt[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=mt[t>>10],i+=mt[t>>4&63],i+=mt[t<<2&63],i+="="),a.push(i),a.join("")}function Dt(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,_=r?i-1:0,d=r?-1:1,p=e[t+_];for(_+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+_],_+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+_],_+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)}function St(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,_=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+_>=1?d/c:d*Math.pow(2,1-_))*c>=2&&(o++,c/=2),o+_>=l?(s=0,o=l):o+_>=1?(s=(t*c-1)*Math.pow(2,i),o+=_):(s=t*Math.pow(2,_-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*m}var Tt={}.toString,Et=Array.isArray||function(e){return"[object Array]"==Tt.call(e)};function Ct(){return Nt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function kt(e,t){if(Ct()<t)throw new RangeError("Invalid typed array length");return Nt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Nt.prototype:(null===e&&(e=new Nt(t)),e.length=t),e}function Nt(e,t,r){if(!(Nt.TYPED_ARRAY_SUPPORT||this instanceof Nt))return new Nt(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Pt(this,e)}return At(this,e,t,r)}function At(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);Nt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Nt.prototype:e=wt(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!Nt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Mt(t,r),i=(e=kt(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(Ot(t)){var r=0|It(t.length);return 0===(e=kt(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?kt(e,0):wt(e,t);if("Buffer"===t.type&&Et(t.data))return wt(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Ft(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Pt(e,t){if(Ft(t),e=kt(e,t<0?0:0|It(t)),!Nt.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function wt(e,t){var r=t.length<0?0:0|It(t.length);e=kt(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function It(e){if(e>=Ct())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct().toString(16)+" bytes");return 0|e}function Ot(e){return!(null==e||!e._isBuffer)}function Mt(e,t){if(Ot(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return cr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ur(e).length;default:if(n)return cr(e).length;t=(""+t).toLowerCase(),n=!0}}function Lt(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qt(this,t,r);case"utf8":case"utf-8":return Gt(this,t,r);case"ascii":return Yt(this,t,r);case"latin1":case"binary":return Xt(this,t,r);case"base64":return Wt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Rt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Bt(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Nt.from(t,n)),Ot(t))return 0===t.length?-1:jt(e,t,r,n,i);if("number"==typeof t)return t&=255,Nt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):jt(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function jt(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(u(e,a)===u(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===c)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){for(var _=!0,d=0;d<c;d++)if(u(e,a+d)!==u(t,d)){_=!1;break}if(_)return a}return-1}function Kt(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function Jt(e,t,r,n){return lr(cr(t,e.length-r),e,r,n)}function zt(e,t,r,n){return lr(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function Ut(e,t,r,n){return zt(e,t,r,n)}function Vt(e,t,r,n){return lr(ur(t),e,r,n)}function qt(e,t,r,n){return lr(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function Wt(e,t,r){return 0===t&&r===e.length?xt(e):xt(e.slice(t,r))}function Gt(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,c,u=e[i],l=null,_=u>239?4:u>223?3:u>191?2:1;if(i+_<=r)switch(_){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,_=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=_}return function(e){var t=e.length;if(t<=Ht)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Ht));return r}(n)}Nt.TYPED_ARRAY_SUPPORT=void 0===ue.TYPED_ARRAY_SUPPORT||ue.TYPED_ARRAY_SUPPORT,Nt.poolSize=8192,Nt._augment=function(e){return e.__proto__=Nt.prototype,e},Nt.from=function(e,t,r){return At(null,e,t,r)},Nt.TYPED_ARRAY_SUPPORT&&(Nt.prototype.__proto__=Uint8Array.prototype,Nt.__proto__=Uint8Array),Nt.alloc=function(e,t,r){return function(e,t,r,n){return Ft(t),t<=0?kt(e,t):void 0!==r?"string"==typeof n?kt(e,t).fill(r,n):kt(e,t).fill(r):kt(e,t)}(null,e,t,r)},Nt.allocUnsafe=function(e){return Pt(null,e)},Nt.allocUnsafeSlow=function(e){return Pt(null,e)},Nt.isBuffer=function(e){return null!=e&&(!!e._isBuffer||_r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&_r(e.slice(0,0))}(e))},Nt.compare=function(e,t){if(!Ot(e)||!Ot(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},Nt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Nt.concat=function(e,t){if(!Et(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Nt.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Nt.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!Ot(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},Nt.byteLength=Mt,Nt.prototype._isBuffer=!0,Nt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Rt(this,t,t+1);return this},Nt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Rt(this,t,t+3),Rt(this,t+1,t+2);return this},Nt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Rt(this,t,t+7),Rt(this,t+1,t+6),Rt(this,t+2,t+5),Rt(this,t+3,t+4);return this},Nt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Gt(this,0,e):Lt.apply(this,arguments)},Nt.prototype.equals=function(e){if(!Ot(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Nt.compare(this,e)},Nt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Nt.prototype.compare=function(e,t,r,n,i){if(!Ot(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),l=0;l<s;++l)if(c[l]!==u[l]){a=c[l],o=u[l];break}return a<o?-1:o<a?1:0},Nt.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Nt.prototype.indexOf=function(e,t,r){return Bt(this,e,t,r,!0)},Nt.prototype.lastIndexOf=function(e,t,r){return Bt(this,e,t,r,!1)},Nt.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return Kt(this,e,t,r);case"utf8":case"utf-8":return Jt(this,e,t,r);case"ascii":return zt(this,e,t,r);case"latin1":case"binary":return Ut(this,e,t,r);case"base64":return Vt(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Nt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ht=4096;function Yt(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function Xt(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function Qt(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=sr(e[a]);return i}function $t(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function Zt(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function er(e,t,r,n,i,a){if(!Ot(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function tr(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function rr(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function nr(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ir(e,t,r,n,i){return i||nr(e,0,r,4),St(e,t,r,n,23,4),r+4}function ar(e,t,r,n,i){return i||nr(e,0,r,8),St(e,t,r,n,52,8),r+8}Nt.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Nt.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Nt.prototype;else{var i=t-e;r=new Nt(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},Nt.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},Nt.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Nt.prototype.readUInt8=function(e,t){return t||Zt(e,1,this.length),this[e]},Nt.prototype.readUInt16LE=function(e,t){return t||Zt(e,2,this.length),this[e]|this[e+1]<<8},Nt.prototype.readUInt16BE=function(e,t){return t||Zt(e,2,this.length),this[e]<<8|this[e+1]},Nt.prototype.readUInt32LE=function(e,t){return t||Zt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Nt.prototype.readUInt32BE=function(e,t){return t||Zt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Nt.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},Nt.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Nt.prototype.readInt8=function(e,t){return t||Zt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Nt.prototype.readInt16LE=function(e,t){t||Zt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Nt.prototype.readInt16BE=function(e,t){t||Zt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Nt.prototype.readInt32LE=function(e,t){return t||Zt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Nt.prototype.readInt32BE=function(e,t){return t||Zt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Nt.prototype.readFloatLE=function(e,t){return t||Zt(e,4,this.length),Dt(this,e,!0,23,4)},Nt.prototype.readFloatBE=function(e,t){return t||Zt(e,4,this.length),Dt(this,e,!1,23,4)},Nt.prototype.readDoubleLE=function(e,t){return t||Zt(e,8,this.length),Dt(this,e,!0,52,8)},Nt.prototype.readDoubleBE=function(e,t){return t||Zt(e,8,this.length),Dt(this,e,!1,52,8)},Nt.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||er(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},Nt.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||er(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Nt.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,1,255,0),Nt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Nt.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):tr(this,e,t,!0),t+2},Nt.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):tr(this,e,t,!1),t+2},Nt.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):rr(this,e,t,!0),t+4},Nt.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rr(this,e,t,!1),t+4},Nt.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);er(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Nt.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);er(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Nt.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,1,127,-128),Nt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Nt.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):tr(this,e,t,!0),t+2},Nt.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):tr(this,e,t,!1),t+2},Nt.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,2147483647,-2147483648),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):rr(this,e,t,!0),t+4},Nt.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rr(this,e,t,!1),t+4},Nt.prototype.writeFloatLE=function(e,t,r){return ir(this,e,t,!0,r)},Nt.prototype.writeFloatBE=function(e,t,r){return ir(this,e,t,!1,r)},Nt.prototype.writeDoubleLE=function(e,t,r){return ar(this,e,t,!0,r)},Nt.prototype.writeDoubleBE=function(e,t,r){return ar(this,e,t,!1,r)},Nt.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Nt.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},Nt.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Nt.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=Ot(e)?e:cr(new Nt(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var or=/[^+\/0-9A-Za-z-_]/g;function sr(e){return e<16?"0"+e.toString(16):e.toString(16)}function cr(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function ur(e){return function(e){var t,r,n,i,a,o;ht||vt();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new yt(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t<n;t+=4,r+=3)i=gt[e.charCodeAt(t)]<<18|gt[e.charCodeAt(t+1)]<<12|gt[e.charCodeAt(t+2)]<<6|gt[e.charCodeAt(t+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=gt[e.charCodeAt(t)]<<2|gt[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=gt[e.charCodeAt(t)]<<10|gt[e.charCodeAt(t+1)]<<4|gt[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(or,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function lr(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function _r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var dr=Object.prototype.toString,pr="function"==typeof Nt.alloc&&"function"==typeof Nt.allocUnsafe&&"function"==typeof Nt.from;var fr,mr=function(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return n=e,"ArrayBuffer"===dr.call(n).slice(8,-1)?function(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=n;else if((r>>>=0)>n)throw new RangeError("'length' is out of bounds");return pr?Nt.from(e.slice(t,t+r)):new Nt(new Uint8Array(e.slice(t,t+r)))}(e,t,r):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Nt.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return pr?Nt.from(e,t):new Nt(e,t)}(e,t):pr?Nt.from(e):new Nt(e);var n},gr=Object.freeze({__proto__:null,default:{}}),yr=o(Be),hr=o(Re),vr=(o(gr),yr);try{(fr=hr).existsSync&&fr.readFileSync||(fr=null)}catch(e){}var br="auto",xr={},Dr=/^data:application\/json[^,]+base64,/,Sr=[],Tr=[];function Er(){return"browser"===br||"node"!==br&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function Cr(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var kr=Cr(Sr);function Nr(e,t){if(!e)return t;var r=vr.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",a=r.slice(i.length);return i&&/^\/\w\:/.test(a)?(i+="/")+vr.resolve(r.slice(i.length),t).replace(/\\/g,"/"):i+vr.resolve(r.slice(i.length),t)}Sr.push((function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,(function(e,t){return t?"":"/"}))),e in xr)return xr[e];var t="";try{if(fr)fr.existsSync(e)&&(t=fr.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),4===r.readyState&&200===r.status&&(t=r.responseText)}}catch(e){}return xr[e]=t}));Cr(Tr);Tr.push((function(e){var t,r=function(e){var t;if(Er())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=4===r.readyState?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch(e){}t=kr(e);for(var i,a,o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!r)return null;if(Dr.test(r)){var n=r.slice(r.indexOf(",")+1);t=mr(n,"base64").toString(),r=e}else r=Nr(e,r),t=kr(r);return t?{url:r,map:t}:null}));Sr.slice(0),Tr.slice(0);var Ar=Object.freeze({__proto__:null,default:{}}),Fr=(o(je),o(Ke),o(Ar),a((function(e){var t=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n},r=n&&n.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=n&&n.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},a=n&&n.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){e.createMapShim=function(){function e(){var e=Object.create(null);return e.__=void 0,delete e.__,e}var t=function(){function e(e,t){this.currentEntry=e,this.selector=t}return e.prototype.next=function(){for(;this.currentEntry;){var e=!!this.currentEntry.skipNext;if(this.currentEntry=this.currentEntry.nextEntry,!e)break}return this.currentEntry?{value:this.selector(this.currentEntry.key,this.currentEntry.value),done:!1}:{value:void 0,done:!0}},e}();return(function(){function r(){this.data=e(),this.size=0,this.firstEntry={},this.lastEntry=this.firstEntry}return r.prototype.get=function(e){var t=this.data[e];return t&&t.value},r.prototype.set=function(e,t){if(this.has(e))this.data[e].value=t;else{this.size++;var r={key:e,value:t};this.data[e]=r;var n=this.lastEntry;n.nextEntry=r,r.previousEntry=n,this.lastEntry=r}return this},r.prototype.has=function(e){return e in this.data},r.prototype.delete=function(e){if(this.has(e)){this.size--;var t=this.data[e];delete this.data[e];var r=t.previousEntry;return r.nextEntry=t.nextEntry,t.nextEntry&&(t.nextEntry.previousEntry=r),this.lastEntry===t&&(this.lastEntry=r),t.previousEntry=void 0,t.nextEntry=r,t.skipNext=!0,!0}return!1},r.prototype.clear=function(){this.data=e(),this.size=0;for(var t=this.firstEntry,r=t.nextEntry;r;){var n=r.nextEntry;r.previousEntry=void 0,r.nextEntry=t,r.skipNext=!0,r=n}t.nextEntry=void 0,this.lastEntry=t},r.prototype.keys=function(){return new t(this.firstEntry,(function(e){return e}))},r.prototype.values=function(){return new t(this.firstEntry,(function(e,t){return t}))},r.prototype.entries=function(){return new t(this.firstEntry,(function(e,t){return[e,t]}))},r.prototype.forEach=function(e){for(var t=this.entries();;){var r=t.next();if(r.done)break;var n=r.value,i=n[0];e(n[1],i)}},r}())}}(s||(s={})),function(e){e.versionMajorMinor="3.7",e.version=e.versionMajorMinor+".2"}(s||(s={})),function(e){!function(e){e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan"}(e.Comparison||(e.Comparison={}))}(s||(s={})),function(e){e.tryGetNativeMap=function(){return"undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0}}(s||(s={})),function(e){function r(){return new e.Map}function n(e,t,r){if(void 0===r&&(r=k),e)for(var n=0,i=e;n<i.length;n++){if(r(i[n],t))return!0}return!1}function i(e,t){if(e){if(!t)return e.length>0;for(var r=0,n=e;r<n.length;r++){if(t(n[r]))return!0}}return!1}function a(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)}function o(e,t){return t<0?e.length+t:t}function s(e,t,r,n){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(r,n);r=void 0===r?0:o(t,r),n=void 0===n?t.length:o(t,n);for(var i=r;i<n&&i<t.length;i++)void 0!==t[i]&&e.push(t[i]);return e}function c(e,t,r){return!n(e,t,r)&&(e.push(t),!0)}function u(e,t,r){t.sort((function(t,n){return r(e[t],e[n])||A(t,n)}))}function l(e,t){return 0===e.length?e:e.slice().sort(t)}function _(e){var t=0;return{next:function(){return t===e.length?{value:void 0,done:!0}:{value:e[++t-1],done:!1}}}}function d(e,t,r,n,i){return p(e,r(t),r,n,i)}function p(e,t,r,n,a){if(!i(e))return-1;for(var o=a||0,s=e.length-1;o<=s;){var c=o+(s-o>>1);switch(n(r(e[c]),t)){case-1:o=c+1;break;case 0:return c;case 1:s=c-1}}return~o}function m(e,t,r,n,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===n||n<0?0:n,s=void 0===i||o+i>a-1?a-1:o+i,c=void 0;for(arguments.length<=2?(c=e[o],o++):c=r;o<=s;)c=t(c,e[o],o),o++;return c}}return r}e.emptyArray=[],e.Map=e.tryGetNativeMap()||function(){if("function"==typeof e.createMapShim)return e.createMapShim();throw new Error("TypeScript requires an environment that provides a compatible native Map implementation.")}(),e.createMap=r,e.createMapFromEntries=function(e){for(var t=r(),n=0,i=e;n<i.length;n++){var a=i[n],o=a[0],s=a[1];t.set(o,s)}return t},e.createMapFromTemplate=function(t){var r=new e.Map;for(var n in t)g.call(t,n)&&r.set(n,t[n]);return r},e.length=function(e){return e?e.length:0},e.forEach=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(n)return n}},e.forEachRight=function(e,t){if(e)for(var r=e.length-1;r>=0;r--){var n=t(e[r],r);if(n)return n}},e.firstDefined=function(e,t){if(void 0!==e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(void 0!==n)return n}},e.firstDefinedIterator=function(e,t){for(;;){var r=e.next();if(r.done)return;var n=t(r.value);if(void 0!==n)return n}},e.zipWith=function(t,r,n){var i=[];e.Debug.assertEqual(t.length,r.length);for(var a=0;a<t.length;a++)i.push(n(t[a],r[a],a));return i},e.zipToIterator=function(t,r){e.Debug.assertEqual(t.length,r.length);var n=0;return{next:function(){return n===t.length?{value:void 0,done:!0}:{value:[t[++n-1],r[n-1]],done:!1}}}},e.zipToMap=function(t,n){e.Debug.assert(t.length===n.length);for(var i=r(),a=0;a<t.length;++a)i.set(t[a],n[a]);return i},e.every=function(e,t){if(e)for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0},e.find=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t(n,r))return n}},e.findLast=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(t(n,r))return n}},e.findIndex=function(e,t,r){for(var n=r||0;n<e.length;n++)if(t(e[n],n))return n;return-1},e.findLastIndex=function(e,t,r){for(var n=void 0===r?e.length-1:r;n>=0;n--)if(t(e[n],n))return n;return-1},e.findMap=function(t,r){for(var n=0;n<t.length;n++){var i=r(t[n],n);if(i)return i}return e.Debug.fail()},e.contains=n,e.arraysEqual=function(e,t,r){return void 0===r&&(r=k),e.length===t.length&&e.every((function(e,n){return r(e,t[n])}))},e.indexOfAnyCharCode=function(e,t,r){for(var i=r||0;i<e.length;i++)if(n(t,e.charCodeAt(i)))return i;return-1},e.countWhere=function(e,t){var r=0;if(e)for(var n=0;n<e.length;n++){t(e[n],n)&&r++}return r},e.filter=function(e,t){if(e){for(var r=e.length,n=0;n<r&&t(e[n]);)n++;if(n<r){var i=e.slice(0,n);for(n++;n<r;){var a=e[n];t(a)&&i.push(a),n++}return i}}return e},e.filterMutate=function(e,t){for(var r=0,n=0;n<e.length;n++)t(e[n],n,e)&&(e[r]=e[n],r++);e.length=r},e.clear=function(e){e.length=0},e.map=function(e,t){var r;if(e){r=[];for(var n=0;n<e.length;n++)r.push(t(e[n],n))}return r},e.mapIterator=function(e,t){return{next:function(){var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}},e.sameMap=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=e[r],i=t(n,r);if(n!==i){var a=e.slice(0,r);for(a.push(i),r++;r<e.length;r++)a.push(t(e[r],r));return a}}return e},e.flatten=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];i&&(S(i)?s(t,i):t.push(i))}return t},e.flatMap=function(t,r){var n;if(t)for(var i=0;i<t.length;i++){var o=r(t[i],i);o&&(n=S(o)?s(n,o):a(n,o))}return n||e.emptyArray},e.flatMapToMutable=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);i&&(S(i)?s(r,i):r.push(i))}return r},e.flatMapIterator=function(t,r){var n=t.next();if(n.done)return e.emptyIterator;var i=a(n.value);return{next:function(){for(;;){var e=i.next();if(!e.done)return e;var r=t.next();if(r.done)return r;i=a(r.value)}}};function a(t){var n=r(t);return void 0===n?e.emptyIterator:S(n)?_(n):n}},e.sameFlatMap=function(e,t){var r;if(e)for(var n=0;n<e.length;n++){var i=e[n],a=t(i,n);(r||i!==a||S(a))&&(r||(r=e.slice(0,n)),S(a)?s(r,a):r.push(a))}return r||e},e.mapAllOrFail=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);if(void 0===i)return;r.push(i)}return r},e.mapDefined=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);void 0!==i&&r.push(i)}return r},e.mapDefinedIterator=function(e,t){return{next:function(){for(;;){var r=e.next();if(r.done)return r;var n=t(r.value);if(void 0!==n)return{value:n,done:!1}}}}},e.emptyIterator={next:function(){return{value:void 0,done:!0}}},e.singleIterator=function(e){var t=!1;return{next:function(){var r=t;return t=!0,r?{value:void 0,done:!0}:{value:e,done:!1}}}},e.spanMap=function(e,t,r){var n;if(e){n=[];for(var i=e.length,a=void 0,o=void 0,s=0,c=0;s<i;){for(;c<i;){if(o=t(e[c],c),0===c)a=o;else if(o!==a)break;c++}if(s<c){var u=r(e.slice(s,c),a,s,c);u&&n.push(u),s=c}a=o,c++}}return n},e.mapEntries=function(e,t){if(e){var n=r();return e.forEach((function(e,r){var i=t(r,e),a=i[0],o=i[1];n.set(a,o)})),n}},e.some=i,e.getRangesWhere=function(e,t,r){for(var n,i=0;i<e.length;i++)t(e[i])?n=void 0===n?i:n:void 0!==n&&(r(n,i),n=void 0);void 0!==n&&r(n,e.length)},e.concatenate=function(e,r){return i(r)?i(e)?t(e,r):r:e},e.deduplicate=function(e,t,r){return 0===e.length?[]:1===e.length?e.slice():r?function(e,t,r){var n=e.map((function(e,t){return t}));u(e,n,r);for(var i=e[n[0]],a=[n[0]],o=1;o<n.length;o++){var s=n[o],c=e[s];t(i,c)||(a.push(s),i=c)}return a.sort(),a.map((function(t){return e[t]}))}(e,t,r):function(e,t){for(var r=[],n=0,i=e;n<i.length;n++){c(r,i[n],t)}return r}(e,t)},e.insertSorted=function(e,t,r){if(0!==e.length){var n=d(e,t,E,r);n<0&&e.splice(~n,0,t)}else e.push(t)},e.sortAndDeduplicate=function(t,r,n){return function(t,r){if(0===t.length)return e.emptyArray;for(var n=t[0],i=[n],a=1;a<t.length;a++){var o=t[a];switch(r(o,n)){case!0:case 0:continue;case-1:return e.Debug.fail("Array is unsorted.")}i.push(n=o)}return i}(l(t,r),n||r||P)},e.arrayIsEqualTo=function(e,t,r){if(void 0===r&&(r=k),!e||!t)return e===t;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t[n],n))return!1;return!0},e.compact=function(e){var t;if(e)for(var r=0;r<e.length;r++){var n=e[r];!t&&n||(t||(t=e.slice(0,r)),n&&t.push(n))}return t||e},e.relativeComplement=function(t,r,n){if(!r||!t||0===r.length||0===t.length)return r;var i=[];e:for(var a=0,o=0;o<r.length;o++){o>0&&e.Debug.assertGreaterThanOrEqual(n(r[o],r[o-1]),0);t:for(var s=a;a<t.length;a++)switch(a>s&&e.Debug.assertGreaterThanOrEqual(n(t[a],t[a-1]),0),n(r[o],t[a])){case-1:i.push(r[o]);continue e;case 0:continue e;case 1:continue t}}return i},e.sum=function(e,t){for(var r=0,n=0,i=e;n<i.length;n++){r+=i[n][t]}return r},e.append=a,e.addRange=s,e.pushIfUnique=c,e.appendIfUnique=function(e,t,r){return e?(c(e,t,r),e):[t]},e.sort=l,e.arrayIterator=_,e.arrayReverseIterator=function(e){var t=e.length;return{next:function(){return 0===t?{value:void 0,done:!0}:{value:e[--t],done:!1}}}},e.stableSort=function(e,t){var r=e.map((function(e,t){return t}));return u(e,r,t),r.map((function(t){return e[t]}))},e.rangeEquals=function(e,t,r,n){for(;r<n;){if(e[r]!==t[r])return!1;r++}return!0},e.elementAt=function(e,t){if(e&&(t=o(e,t))<e.length)return e[t]},e.firstOrUndefined=function(e){return 0===e.length?void 0:e[0]},e.first=function(t){return e.Debug.assert(0!==t.length),t[0]},e.lastOrUndefined=function(e){return 0===e.length?void 0:e[e.length-1]},e.last=function(t){return e.Debug.assert(0!==t.length),t[t.length-1]},e.singleOrUndefined=function(e){return e&&1===e.length?e[0]:void 0},e.singleOrMany=function(e){return e&&1===e.length?e[0]:e},e.replaceElement=function(e,t,r){var n=e.slice(0);return n[t]=r,n},e.binarySearch=d,e.binarySearchKey=p,e.reduceLeft=m;var g=Object.prototype.hasOwnProperty;function y(e,t){return g.call(e,t)}function h(e,t){for(var r=[],n=e.next();!n.done;n=e.next())r.push(t?t(n.value):n.value);return r}function v(e,t,r){void 0===r&&(r=E);for(var n=b(),i=0,a=e;i<a.length;i++){var o=a[i];n.add(t(o),r(o))}return n}function b(){var e=r();return e.add=x,e.remove=D,e}function x(e,t){var r=this.get(e);return r?r.push(t):this.set(e,r=[t]),r}function D(e,t){var r=this.get(e);r&&(j(r,t),r.length||this.delete(e))}function S(e){return Array.isArray?Array.isArray(e):e instanceof Array}function T(e){}function E(e){return e}function C(e){return e.toLowerCase()}function k(e,t){return e===t}function N(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e<t?-1:1}function A(e,t){return N(e,t)}function F(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function P(e,t){return N(e,t)}e.hasProperty=y,e.getProperty=function(e,t){return g.call(e,t)?e[t]:void 0},e.getOwnKeys=function(e){var t=[];for(var r in e)g.call(e,r)&&t.push(r);return t},e.getAllKeys=function(e){var t=[];do{for(var r=0,n=Object.getOwnPropertyNames(e);r<n.length;r++){c(t,n[r])}}while(e=Object.getPrototypeOf(e));return t},e.getOwnValues=function(e){var t=[];for(var r in e)g.call(e,r)&&t.push(e[r]);return t},e.arrayFrom=h,e.assign=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];if(void 0!==a)for(var o in a)y(a,o)&&(e[o]=a[o])}return e},e.equalOwnProperties=function(e,t,r){if(void 0===r&&(r=k),e===t)return!0;if(!e||!t)return!1;for(var n in e)if(g.call(e,n)){if(!g.call(t,n))return!1;if(!r(e[n],t[n]))return!1}for(var n in t)if(g.call(t,n)&&!g.call(e,n))return!1;return!0},e.arrayToMap=function(e,t,n){void 0===n&&(n=E);for(var i=r(),a=0,o=e;a<o.length;a++){var s=o[a],c=t(s);void 0!==c&&i.set(c,n(s))}return i},e.arrayToNumericMap=function(e,t,r){void 0===r&&(r=E);for(var n=[],i=0,a=e;i<a.length;i++){var o=a[i];n[t(o)]=r(o)}return n},e.arrayToMultiMap=v,e.group=function(e,t){return h(v(e,t).values())},e.clone=function(e){var t={};for(var r in e)g.call(e,r)&&(t[r]=e[r]);return t},e.extend=function(e,t){var r={};for(var n in t)g.call(t,n)&&(r[n]=t[n]);for(var n in e)g.call(e,n)&&(r[n]=e[n]);return r},e.copyProperties=function(e,t){for(var r in t)g.call(t,r)&&(e[r]=t[r])},e.maybeBind=function(e,t){return t?t.bind(e):void 0},e.mapMap=function(e,t){var n=r();return e.forEach((function(e,r){return n.set.apply(n,t(e,r))})),n},e.createMultiMap=b,e.isArray=S,e.toArray=function(e){return S(e)?e:[e]},e.isString=function(e){return"string"==typeof e},e.isNumber=function(e){return"number"==typeof e},e.tryCast=function(e,t){return void 0!==e&&t(e)?e:void 0},e.cast=function(t,r){return void 0!==t&&r(t)?t:e.Debug.fail("Invalid cast. The supplied value "+t+" did not pass the test '"+e.Debug.getFunctionName(r)+"'.")},e.noop=T,e.returnFalse=function(){return!1},e.returnTrue=function(){return!0},e.returnUndefined=function(){},e.identity=E,e.toLowerCase=C,e.notImplemented=function(){throw new Error("Not implemented")},e.memoize=function(e){var t;return function(){return e&&(t=e(),e=void 0),t}},e.compose=function(e,t,r,n,i){if(i){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return function(e){return m(a,(function(e,t){return t(e)}),e)}}return n?function(i){return n(r(t(e(i))))}:r?function(n){return r(t(e(n)))}:t?function(r){return t(e(r))}:e?function(t){return e(t)}:function(e){return e}},function(e){e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive"}(e.AssertionLevel||(e.AssertionLevel={})),e.equateValues=k,e.equateStringsCaseInsensitive=function(e,t){return e===t||void 0!==e&&void 0!==t&&e.toUpperCase()===t.toUpperCase()},e.equateStringsCaseSensitive=function(e,t){return k(e,t)},e.compareValues=A,e.min=function(e,t,r){return-1===r(e,t)?e:t},e.compareStringsCaseInsensitive=F,e.compareStringsCaseSensitive=P,e.getStringComparer=function(e){return e?F:P};var w,I,O=function(){var e,t,r=function(){if("object"===("undefined"==typeof Intl?"undefined":f(Intl))&&"function"==typeof Intl.Collator)return i;if("function"==typeof String.prototype.localeCompare&&"function"==typeof String.prototype.toLocaleUpperCase&&"a".localeCompare("B")<0)return a;return o}();return function(n){return void 0===n?e||(e=r(n)):"en-US"===n?t||(t=r(n)):r(n)};function n(e,t,r){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;var n=r(e,t);return n<0?-1:n>0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,r){return n(e,r,t)}}function a(e){return void 0!==e?o():function(e,r){return n(e,r,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,r){return n(t,r,e)};function e(e,r){return t(e.toUpperCase(),r.toUpperCase())||t(e,r)}function t(e,t){return e<t?-1:e>t?1:0}}}();function M(e,t,r){for(var n=new Array(t.length+1),i=new Array(t.length+1),a=r+1,o=0;o<=t.length;o++)n[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),c=o>r?o-r:1,u=t.length>r+o?r+o:t.length;i[0]=o;for(var l=o,_=1;_<c;_++)i[_]=a;for(_=c;_<=u;_++){var d=s===t.charCodeAt(_-1)?n[_-1]:Math.min(n[_]+1,i[_-1]+1,n[_-1]+2);i[_]=d,l=Math.min(l,d)}for(_=u+1;_<=t.length;_++)i[_]=a;if(l>r)return;var p=n;n=i,i=p}var f=n[t.length];return f>r?void 0:f}function L(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function R(e,t){for(var r=t;r<e.length-1;r++)e[r]=e[r+1];e.pop()}function B(e,t){e[t]=e[e.length-1],e.pop()}function j(e,t){return function(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return B(e,r),!0;return!1}(e,(function(e){return e===t}))}function K(e,t){return 0===e.lastIndexOf(t,0)}function J(e,t){var r=e.prefix,n=e.suffix;return t.length>=r.length+n.length&&K(t,r)&&L(t,n)}e.getUILocale=function(){return I},e.setUILocale=function(e){I!==e&&(I=e,w=void 0)},e.compareStringsCaseSensitiveUI=function(e,t){return(w||(w=O(I)))(e,t)},e.compareProperties=function(e,t,r,n){return e===t?0:void 0===e?-1:void 0===t?1:n(e[r],t[r])},e.compareBooleans=function(e,t){return A(e?1:0,t?1:0)},e.getSpellingSuggestion=function(t,r,n){for(var i,a=Math.min(2,Math.floor(.34*t.length)),o=Math.floor(.4*t.length)+1,s=!1,c=t.toLowerCase(),u=0,l=r;u<l.length;u++){var _=l[u],d=n(_);if(void 0!==d&&Math.abs(d.length-c.length)<=a){var p=d.toLowerCase();if(p===c){if(d===t)continue;return _}if(s)continue;if(d.length<3)continue;var f=M(c,p,o-1);if(void 0===f)continue;f<3?(s=!0,i=_):(e.Debug.assert(f<o),o=f,i=_)}}return i},e.endsWith=L,e.removeSuffix=function(e,t){return L(e,t)?e.slice(0,e.length-t.length):e},e.tryRemoveSuffix=function(e,t){return L(e,t)?e.slice(0,e.length-t.length):void 0},e.stringContains=function(e,t){return-1!==e.indexOf(t)},e.removeMinAndVersionNumbers=function(e){var t=/[.-]((min)|(\d+(\.\d+)*))$/;return e.replace(t,"").replace(t,"")},e.orderedRemoveItem=function(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return R(e,r),!0;return!1},e.orderedRemoveItemAt=R,e.unorderedRemoveItemAt=B,e.unorderedRemoveItem=j,e.createGetCanonicalFileName=function(e){return e?E:C},e.patternText=function(e){return e.prefix+"*"+e.suffix},e.matchedText=function(t,r){return e.Debug.assert(J(t,r)),r.substring(t.prefix.length,r.length-t.suffix.length)},e.findBestPatternMatch=function(e,t,r){for(var n,i=-1,a=0,o=e;a<o.length;a++){var s=o[a],c=t(s);J(c,r)&&c.prefix.length>i&&(i=c.prefix.length,n=s)}return n},e.startsWith=K,e.removePrefix=function(e,t){return K(e,t)?e.substr(t.length):e},e.tryRemovePrefix=function(e,t,r){return void 0===r&&(r=E),K(r(e),r(t))?e.substring(t.length):void 0},e.and=function(e,t){return function(r){return e(r)&&t(r)}},e.or=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var r=0,n=e;r<n.length;r++){if((0,n[r])(t))return!0}return!1}},e.not=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return!e.apply(void 0,t)}},e.assertType=function(e){},e.singleElementArray=function(e){return void 0===e?void 0:[e]},e.enumerateInsertsAndDeletes=function(e,t,r,n,i,a){a=a||T;for(var o=0,s=0,c=e.length,u=t.length;o<c&&s<u;){var l=e[o],_=t[s],d=r(l,_);-1===d?(n(l),o++):1===d?(i(_),s++):(a(_,l),o++,s++)}for(;o<c;)n(e[o++]);for(;s<u;)i(t[s++])},e.fill=function(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t(n);return r},e.cartesianProduct=function(e){var t=[];return function e(t,r,n,i){for(var a=0,o=t[i];a<o.length;a++){var s=o[a],c=void 0;n?(c=n.slice()).push(s):c=[s],i===t.length-1?r.push(c):e(t,r,c,i+1)}}(e,t,void 0,0),t}}(s||(s={})),function(e){!function(t){function r(e){return t.currentAssertionLevel>=e}function n(e,t,r,a){e||(r&&(t+="\r\nVerbose Debug Information: "+("string"==typeof r?r:r())),i(t?"False expression: "+t:"False expression.",a||n))}function i(e,t){var r=new Error(e?"Debug Failure. "+e:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(r,t||i),r}function a(e,t){return null==e?i(t):e}function o(e){if("function"!=typeof e)return"";if(e.hasOwnProperty("name"))return e.name;var t=Function.prototype.toString.call(e),r=/^function\s+([\w\$]+)\s*\(/.exec(t);return r?r[1]:""}function s(t,r,n){void 0===t&&(t=0);var i=function(t){var r=[];for(var n in t){var i=t[n];"number"==typeof i&&r.push([i,n])}return e.stableSort(r,(function(t,r){return e.compareValues(t[0],r[0])}))}(r);if(0===t)return i.length>0&&0===i[0][0]?i[0][1]:"0";if(n){for(var a="",o=t,s=i.length-1;s>=0&&0!==o;s--){var c=i[s],u=c[0],l=c[1];0!==u&&(o&u)===u&&(o&=~u,a=l+(a?"|":"")+a)}if(0===o)return a}else for(var _=0,d=i;_<d.length;_++){var p=d[_];u=p[0],l=p[1];if(u===t)return l}return t.toString()}function c(t){return s(t,e.SyntaxKind,!1)}function u(t){return s(t,e.NodeFlags,!0)}function l(t){return s(t,e.ModifierFlags,!0)}function _(t){return s(t,e.TransformFlags,!0)}function d(t){return s(t,e.EmitFlags,!0)}function p(t){return s(t,e.SymbolFlags,!0)}function m(t){return s(t,e.TypeFlags,!0)}function g(t){return s(t,e.ObjectFlags,!0)}t.currentAssertionLevel=0,t.isDebugging=!1,t.shouldAssert=r,t.assert=n,t.assertEqual=function(e,t,r,n){e!==t&&i("Expected "+e+" === "+t+". "+(r?n?r+" "+n:r:""))},t.assertLessThan=function(e,t,r){e>=t&&i("Expected "+e+" < "+t+". "+(r||""))},t.assertLessThanOrEqual=function(e,t){e>t&&i("Expected "+e+" <= "+t)},t.assertGreaterThanOrEqual=function(e,t){e<t&&i("Expected "+e+" >= "+t)},t.fail=i,t.assertDefined=a,t.assertEachDefined=function(e,t){for(var r=0,n=e;r<n.length;r++){a(n[r],t)}return e},t.assertNever=function t(r,n,a){return void 0===n&&(n="Illegal value:"),i(n+" "+("object"===f(r)&&e.hasProperty(r,"kind")&&e.hasProperty(r,"pos")&&c?"SyntaxKind: "+c(r.kind):JSON.stringify(r)),a||t)},t.getFunctionName=o,t.formatSymbol=function(t){return"{ name: "+e.unescapeLeadingUnderscores(t.escapedName)+"; flags: "+p(t.flags)+"; declarations: "+e.map(t.declarations,(function(e){return c(e.kind)}))+" }"},t.formatEnum=s,t.formatSyntaxKind=c,t.formatNodeFlags=u,t.formatModifierFlags=l,t.formatTransformFlags=_,t.formatEmitFlags=d,t.formatSymbolFlags=p,t.formatTypeFlags=m,t.formatObjectFlags=g,t.failBadSyntaxKind=function e(t,r){return i((r||"Unexpected node.")+"\r\nNode "+c(t.kind)+" was unexpected.",e)},t.assertEachNode=r(1)?function(r,i,a){return n(void 0===i||e.every(r,i),a||"Unexpected node.",(function(){return"Node array did not pass test '"+o(i)+"'."}),t.assertEachNode)}:e.noop,t.assertNode=r(1)?function(e,r,i){return n(void 0===r||r(e),i||"Unexpected node.",(function(){return"Node "+c(e.kind)+" did not pass test '"+o(r)+"'."}),t.assertNode)}:e.noop,t.assertNotNode=r(1)?function(e,r,i){return n(void 0===r||!r(e),i||"Unexpected node.",(function(){return"Node "+c(e.kind)+" should not have passed test '"+o(r)+"'."}),t.assertNode)}:e.noop,t.assertOptionalNode=r(1)?function(e,r,i){return n(void 0===r||void 0===e||r(e),i||"Unexpected node.",(function(){return"Node "+c(e.kind)+" did not pass test '"+o(r)+"'."}),t.assertOptionalNode)}:e.noop,t.assertOptionalToken=r(1)?function(e,r,i){return n(void 0===r||void 0===e||e.kind===r,i||"Unexpected node.",(function(){return"Node "+c(e.kind)+" was not a '"+c(r)+"' token."}),t.assertOptionalToken)}:e.noop,t.assertMissingNode=r(1)?function(e,r){return n(void 0===e,r||"Unexpected node.",(function(){return"Node "+c(e.kind)+" was unexpected'."}),t.assertMissingNode)}:e.noop;var y,h=!1;function v(e){return function(){if(b(),!y)throw new Error("Debugging helpers could not be loaded.");return y}().formatControlFlowGraph(e)}function b(){if(!h){Object.defineProperties(e.objectAllocator.getSymbolConstructor().prototype,{__debugFlags:{get:function(){return p(this.flags)}}}),Object.defineProperties(e.objectAllocator.getTypeConstructor().prototype,{__debugFlags:{get:function(){return m(this.flags)}},__debugObjectFlags:{get:function(){return 524288&this.flags?g(this.objectFlags):""}},__debugTypeToString:{value:function(){return this.checker.typeToString(this)}}});for(var t=0,r=[e.objectAllocator.getNodeConstructor(),e.objectAllocator.getIdentifierConstructor(),e.objectAllocator.getTokenConstructor(),e.objectAllocator.getSourceFileConstructor()];t<r.length;t++){var n=r[t];n.prototype.hasOwnProperty("__debugKind")||Object.defineProperties(n.prototype,{__debugKind:{get:function(){return c(this.kind)}},__debugNodeFlags:{get:function(){return u(this.flags)}},__debugModifierFlags:{get:function(){return l(e.getModifierFlagsNoCache(this))}},__debugTransformFlags:{get:function(){return _(this.transformFlags)}},__debugIsParseTreeNode:{get:function(){return e.isParseTreeNode(this)}},__debugEmitFlags:{get:function(){return d(e.getEmitFlags(this))}},__debugGetText:{value:function(t){if(e.nodeIsSynthesized(this))return"";var r=e.getParseTreeNode(this),n=r&&e.getSourceFileOfNode(r);return n?e.getSourceTextOfNodeFromSourceFile(n,r,t):""}}})}try{if(e.sys&&e.sys.require){var i=e.getDirectoryPath(e.resolvePath(e.sys.getExecutingFilePath())),a=e.sys.require(i,"./compiler-debug");a.error||(a.module.init(e),y=a.module)}}catch(e){}h=!0}}t.printControlFlowGraph=function(e){return console.log(v(e))},t.formatControlFlowGraph=v,t.attachFlowNodeDebugInfo=function(t){h&&("__debugFlowFlags"in t||Object.defineProperties(t,{__debugFlowFlags:{get:function(){return s(this.flags,e.FlowFlags,!0)}},__debugToString:{value:function(){return v(this)}}}))},t.enableDebugInfo=b}(e.Debug||(e.Debug={}))}(s||(s={})),function(e){e.timestamp="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:Date.now?Date.now:function(){return+new Date}}(s||(s={})),function(e){!function(t){var r,n,i,a="function"==typeof onProfilerEvent&&!0===onProfilerEvent.profiler?onProfilerEvent:function(){},o=!1,s=0;function c(t,r,n){var i=0;return{enter:function(){1==++i&&u(r)},exit:function(){0==--i?(u(n),l(t,r,n)):i<0&&e.Debug.fail("enter/exit count does not match.")}}}function u(t){o&&(n.set(t,e.timestamp()),r.set(t,(r.get(t)||0)+1),a(t))}function l(t,r,a){if(o){var c=a&&n.get(a)||e.timestamp(),u=r&&n.get(r)||s;i.set(t,(i.get(t)||0)+(c-u))}}t.createTimerIf=function(e,r,n,i){return e?c(r,n,i):t.nullTimer},t.createTimer=c,t.nullTimer={enter:e.noop,exit:e.noop},t.mark=u,t.measure=l,t.getCount=function(e){return r&&r.get(e)||0},t.getDuration=function(e){return i&&i.get(e)||0},t.forEachMeasure=function(e){i.forEach((function(t,r){e(r,t)}))},t.enable=function(){r=e.createMap(),n=e.createMap(),i=e.createMap(),o=!0,s=e.timestamp()},t.disable=function(){o=!1}}(e.performance||(e.performance={}))}(s||(s={})),function(e){var t,r={logEvent:e.noop,logErrEvent:e.noop,logPerfEvent:e.noop,logInfoEvent:e.noop,logStartCommand:e.noop,logStopCommand:e.noop,logStartUpdateProgram:e.noop,logStopUpdateProgram:e.noop,logStartUpdateGraph:e.noop,logStopUpdateGraph:e.noop,logStartResolveModule:e.noop,logStopResolveModule:e.noop,logStartParseSourceFile:e.noop,logStopParseSourceFile:e.noop,logStartReadFile:e.noop,logStopReadFile:e.noop,logStartBindFile:e.noop,logStopBindFile:e.noop,logStartScheduledOperation:e.noop,logStopScheduledOperation:e.noop};try{t=require("@microsoft/typescript-etw")}catch(e){t=void 0}e.perfLogger=t&&t.logEvent?t:r}(s||(s={})),function(e){var t=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,r=/^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i,n=/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i,i=/^(0|[1-9]\d*)$/,a=function(){function t(t,i,a,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=""),void 0===c&&(c=""),"string"==typeof t){var u=e.Debug.assertDefined(o(t),"Invalid version");t=u.major,i=u.minor,a=u.patch,s=u.prerelease,c=u.build}e.Debug.assert(t>=0,"Invalid argument: major"),e.Debug.assert(i>=0,"Invalid argument: minor"),e.Debug.assert(a>=0,"Invalid argument: patch"),e.Debug.assert(!s||r.test(s),"Invalid argument: prerelease"),e.Debug.assert(!c||n.test(c),"Invalid argument: build"),this.major=t,this.minor=i,this.patch=a,this.prerelease=s?s.split("."):e.emptyArray,this.build=c?c.split("."):e.emptyArray}return t.tryParse=function(e){var r=o(e);if(r)return new t(r.major,r.minor,r.patch,r.prerelease,r.build)},t.prototype.compareTo=function(t){return this===t?0:void 0===t?1:e.compareValues(this.major,t.major)||e.compareValues(this.minor,t.minor)||e.compareValues(this.patch,t.patch)||function(t,r){if(t===r)return 0;if(0===t.length)return 0===r.length?0:1;if(0===r.length)return-1;for(var n=Math.min(t.length,r.length),a=0;a<n;a++){var o=t[a],s=r[a];if(o!==s){var c=i.test(o),u=i.test(s);if(c||u){if(c!==u)return c?-1:1;if(l=e.compareValues(+o,+s))return l}else{var l;if(l=e.compareStringsCaseSensitive(o,s))return l}}}return e.compareValues(t.length,r.length)}(this.prerelease,t.prerelease)},t.prototype.increment=function(r){switch(r){case"major":return new t(this.major+1,0,0);case"minor":return new t(this.major,this.minor+1,0);case"patch":return new t(this.major,this.minor,this.patch+1);default:return e.Debug.assertNever(r)}},t.prototype.toString=function(){var t=this.major+"."+this.minor+"."+this.patch;return e.some(this.prerelease)&&(t+="-"+this.prerelease.join(".")),e.some(this.build)&&(t+="+"+this.build.join(".")),t},t.zero=new t(0,0,0),t}();function o(e){var i=t.exec(e);if(i){var a=i[1],o=i[2],s=void 0===o?"0":o,c=i[3],u=void 0===c?"0":c,l=i[4],_=void 0===l?"":l,d=i[5],p=void 0===d?"":d;if((!_||r.test(_))&&(!p||n.test(p)))return{major:parseInt(a,10),minor:parseInt(s,10),patch:parseInt(u,10),prerelease:_,build:p}}}e.Version=a;var s=function(){function t(t){this._alternatives=t?e.Debug.assertDefined(p(t),"Invalid range spec."):e.emptyArray}return t.tryParse=function(e){var r=p(e);if(r){var n=new t("");return n._alternatives=r,n}},t.prototype.test=function(e){return"string"==typeof e&&(e=new a(e)),function(e,t){if(0===t.length)return!0;for(var r=0,n=t;r<n.length;r++){var i=n[r];if(v(e,i))return!0}return!1}(e,this._alternatives)},t.prototype.toString=function(){return t=this._alternatives,e.map(t,x).join(" || ")||"*";var t},t}();e.VersionRange=s;var c=/\s*\|\|\s*/g,u=/\s+/g,l=/^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,_=/^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i,d=/^\s*(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;function p(e){for(var t=[],r=0,n=e.trim().split(c);r<n.length;r++){var i=n[r];if(i){var a=[],o=_.exec(i);if(o){if(!m(o[1],o[2],a))return}else for(var s=0,l=i.split(u);s<l.length;s++){var p=l[s],f=d.exec(p);if(!f||!g(f[1],f[2],a))return}t.push(a)}}return t}function f(e){var t=l.exec(e);if(t){var r=t[1],n=t[2],i=void 0===n?"*":n,o=t[3],s=void 0===o?"*":o,c=t[4],u=t[5];return{version:new a(y(r)?0:parseInt(r,10),y(r)||y(i)?0:parseInt(i,10),y(r)||y(i)||y(s)?0:parseInt(s,10),c,u),major:r,minor:i,patch:s}}}function m(e,t,r){var n=f(e);if(!n)return!1;var i=f(t);return!!i&&(y(n.major)||r.push(h(">=",n.version)),y(i.major)||r.push(y(i.minor)?h("<",i.version.increment("major")):y(i.patch)?h("<",i.version.increment("minor")):h("<=",i.version)),!0)}function g(e,t,r){var n=f(t);if(!n)return!1;var i=n.version,o=n.major,s=n.minor,c=n.patch;if(y(o))"<"!==e&&">"!==e||r.push(h("<",a.zero));else switch(e){case"~":r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")));break;case"^":r.push(h(">=",i)),r.push(h("<",i.increment(i.major>0||y(s)?"major":i.minor>0||y(c)?"minor":"patch")));break;case"<":case">=":r.push(h(e,i));break;case"<=":case">":r.push(y(s)?h("<="===e?"<":">=",i.increment("major")):y(c)?h("<="===e?"<":">=",i.increment("minor")):h(e,i));break;case"=":case void 0:y(s)||y(c)?(r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")))):r.push(h("=",i));break;default:return!1}return!0}function y(e){return"*"===e||"x"===e||"X"===e}function h(e,t){return{operator:e,operand:t}}function v(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!b(e,i.operator,i.operand))return!1}return!0}function b(t,r,n){var i=t.compareTo(n);switch(r){case"<":return i<0;case"<=":return i<=0;case">":return i>0;case">=":return i>=0;case"=":return 0===i;default:return e.Debug.assertNever(r)}}function x(t){return e.map(t,D).join(" ")}function D(e){return""+e.operator+e.operand}}(s||(s={})),function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.QuestionDotToken=28]="QuestionDotToken",e[e.LessThanToken=29]="LessThanToken",e[e.LessThanSlashToken=30]="LessThanSlashToken",e[e.GreaterThanToken=31]="GreaterThanToken",e[e.LessThanEqualsToken=32]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=34]="EqualsEqualsToken",e[e.ExclamationEqualsToken=35]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",e[e.PlusToken=39]="PlusToken",e[e.MinusToken=40]="MinusToken",e[e.AsteriskToken=41]="AsteriskToken",e[e.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",e[e.SlashToken=43]="SlashToken",e[e.PercentToken=44]="PercentToken",e[e.PlusPlusToken=45]="PlusPlusToken",e[e.MinusMinusToken=46]="MinusMinusToken",e[e.LessThanLessThanToken=47]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=50]="AmpersandToken",e[e.BarToken=51]="BarToken",e[e.CaretToken=52]="CaretToken",e[e.ExclamationToken=53]="ExclamationToken",e[e.TildeToken=54]="TildeToken",e[e.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",e[e.BarBarToken=56]="BarBarToken",e[e.QuestionToken=57]="QuestionToken",e[e.ColonToken=58]="ColonToken",e[e.AtToken=59]="AtToken",e[e.QuestionQuestionToken=60]="QuestionQuestionToken",e[e.BacktickToken=61]="BacktickToken",e[e.EqualsToken=62]="EqualsToken",e[e.PlusEqualsToken=63]="PlusEqualsToken",e[e.MinusEqualsToken=64]="MinusEqualsToken",e[e.AsteriskEqualsToken=65]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=66]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=67]="SlashEqualsToken",e[e.PercentEqualsToken=68]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=69]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=70]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=72]="AmpersandEqualsToken",e[e.BarEqualsToken=73]="BarEqualsToken",e[e.CaretEqualsToken=74]="CaretEqualsToken",e[e.Identifier=75]="Identifier",e[e.BreakKeyword=76]="BreakKeyword",e[e.CaseKeyword=77]="CaseKeyword",e[e.CatchKeyword=78]="CatchKeyword",e[e.ClassKeyword=79]="ClassKeyword",e[e.ConstKeyword=80]="ConstKeyword",e[e.ContinueKeyword=81]="ContinueKeyword",e[e.DebuggerKeyword=82]="DebuggerKeyword",e[e.DefaultKeyword=83]="DefaultKeyword",e[e.DeleteKeyword=84]="DeleteKeyword",e[e.DoKeyword=85]="DoKeyword",e[e.ElseKeyword=86]="ElseKeyword",e[e.EnumKeyword=87]="EnumKeyword",e[e.ExportKeyword=88]="ExportKeyword",e[e.ExtendsKeyword=89]="ExtendsKeyword",e[e.FalseKeyword=90]="FalseKeyword",e[e.FinallyKeyword=91]="FinallyKeyword",e[e.ForKeyword=92]="ForKeyword",e[e.FunctionKeyword=93]="FunctionKeyword",e[e.IfKeyword=94]="IfKeyword",e[e.ImportKeyword=95]="ImportKeyword",e[e.InKeyword=96]="InKeyword",e[e.InstanceOfKeyword=97]="InstanceOfKeyword",e[e.NewKeyword=98]="NewKeyword",e[e.NullKeyword=99]="NullKeyword",e[e.ReturnKeyword=100]="ReturnKeyword",e[e.SuperKeyword=101]="SuperKeyword",e[e.SwitchKeyword=102]="SwitchKeyword",e[e.ThisKeyword=103]="ThisKeyword",e[e.ThrowKeyword=104]="ThrowKeyword",e[e.TrueKeyword=105]="TrueKeyword",e[e.TryKeyword=106]="TryKeyword",e[e.TypeOfKeyword=107]="TypeOfKeyword",e[e.VarKeyword=108]="VarKeyword",e[e.VoidKeyword=109]="VoidKeyword",e[e.WhileKeyword=110]="WhileKeyword",e[e.WithKeyword=111]="WithKeyword",e[e.ImplementsKeyword=112]="ImplementsKeyword",e[e.InterfaceKeyword=113]="InterfaceKeyword",e[e.LetKeyword=114]="LetKeyword",e[e.PackageKeyword=115]="PackageKeyword",e[e.PrivateKeyword=116]="PrivateKeyword",e[e.ProtectedKeyword=117]="ProtectedKeyword",e[e.PublicKeyword=118]="PublicKeyword",e[e.StaticKeyword=119]="StaticKeyword",e[e.YieldKeyword=120]="YieldKeyword",e[e.AbstractKeyword=121]="AbstractKeyword",e[e.AsKeyword=122]="AsKeyword",e[e.AssertsKeyword=123]="AssertsKeyword",e[e.AnyKeyword=124]="AnyKeyword",e[e.AsyncKeyword=125]="AsyncKeyword",e[e.AwaitKeyword=126]="AwaitKeyword",e[e.BooleanKeyword=127]="BooleanKeyword",e[e.ConstructorKeyword=128]="ConstructorKeyword",e[e.DeclareKeyword=129]="DeclareKeyword",e[e.GetKeyword=130]="GetKeyword",e[e.InferKeyword=131]="InferKeyword",e[e.IsKeyword=132]="IsKeyword",e[e.KeyOfKeyword=133]="KeyOfKeyword",e[e.ModuleKeyword=134]="ModuleKeyword",e[e.NamespaceKeyword=135]="NamespaceKeyword",e[e.NeverKeyword=136]="NeverKeyword",e[e.ReadonlyKeyword=137]="ReadonlyKeyword",e[e.RequireKeyword=138]="RequireKeyword",e[e.NumberKeyword=139]="NumberKeyword",e[e.ObjectKeyword=140]="ObjectKeyword",e[e.SetKeyword=141]="SetKeyword",e[e.StringKeyword=142]="StringKeyword",e[e.SymbolKeyword=143]="SymbolKeyword",e[e.TypeKeyword=144]="TypeKeyword",e[e.UndefinedKeyword=145]="UndefinedKeyword",e[e.UniqueKeyword=146]="UniqueKeyword",e[e.UnknownKeyword=147]="UnknownKeyword",e[e.FromKeyword=148]="FromKeyword",e[e.GlobalKeyword=149]="GlobalKeyword",e[e.BigIntKeyword=150]="BigIntKeyword",e[e.OfKeyword=151]="OfKeyword",e[e.QualifiedName=152]="QualifiedName",e[e.ComputedPropertyName=153]="ComputedPropertyName",e[e.TypeParameter=154]="TypeParameter",e[e.Parameter=155]="Parameter",e[e.Decorator=156]="Decorator",e[e.PropertySignature=157]="PropertySignature",e[e.PropertyDeclaration=158]="PropertyDeclaration",e[e.MethodSignature=159]="MethodSignature",e[e.MethodDeclaration=160]="MethodDeclaration",e[e.Constructor=161]="Constructor",e[e.GetAccessor=162]="GetAccessor",e[e.SetAccessor=163]="SetAccessor",e[e.CallSignature=164]="CallSignature",e[e.ConstructSignature=165]="ConstructSignature",e[e.IndexSignature=166]="IndexSignature",e[e.TypePredicate=167]="TypePredicate",e[e.TypeReference=168]="TypeReference",e[e.FunctionType=169]="FunctionType",e[e.ConstructorType=170]="ConstructorType",e[e.TypeQuery=171]="TypeQuery",e[e.TypeLiteral=172]="TypeLiteral",e[e.ArrayType=173]="ArrayType",e[e.TupleType=174]="TupleType",e[e.OptionalType=175]="OptionalType",e[e.RestType=176]="RestType",e[e.UnionType=177]="UnionType",e[e.IntersectionType=178]="IntersectionType",e[e.ConditionalType=179]="ConditionalType",e[e.InferType=180]="InferType",e[e.ParenthesizedType=181]="ParenthesizedType",e[e.ThisType=182]="ThisType",e[e.TypeOperator=183]="TypeOperator",e[e.IndexedAccessType=184]="IndexedAccessType",e[e.MappedType=185]="MappedType",e[e.LiteralType=186]="LiteralType",e[e.ImportType=187]="ImportType",e[e.ObjectBindingPattern=188]="ObjectBindingPattern",e[e.ArrayBindingPattern=189]="ArrayBindingPattern",e[e.BindingElement=190]="BindingElement",e[e.ArrayLiteralExpression=191]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=192]="ObjectLiteralExpression",e[e.PropertyAccessExpression=193]="PropertyAccessExpression",e[e.ElementAccessExpression=194]="ElementAccessExpression",e[e.CallExpression=195]="CallExpression",e[e.NewExpression=196]="NewExpression",e[e.TaggedTemplateExpression=197]="TaggedTemplateExpression",e[e.TypeAssertionExpression=198]="TypeAssertionExpression",e[e.ParenthesizedExpression=199]="ParenthesizedExpression",e[e.FunctionExpression=200]="FunctionExpression",e[e.ArrowFunction=201]="ArrowFunction",e[e.DeleteExpression=202]="DeleteExpression",e[e.TypeOfExpression=203]="TypeOfExpression",e[e.VoidExpression=204]="VoidExpression",e[e.AwaitExpression=205]="AwaitExpression",e[e.PrefixUnaryExpression=206]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=207]="PostfixUnaryExpression",e[e.BinaryExpression=208]="BinaryExpression",e[e.ConditionalExpression=209]="ConditionalExpression",e[e.TemplateExpression=210]="TemplateExpression",e[e.YieldExpression=211]="YieldExpression",e[e.SpreadElement=212]="SpreadElement",e[e.ClassExpression=213]="ClassExpression",e[e.OmittedExpression=214]="OmittedExpression",e[e.ExpressionWithTypeArguments=215]="ExpressionWithTypeArguments",e[e.AsExpression=216]="AsExpression",e[e.NonNullExpression=217]="NonNullExpression",e[e.MetaProperty=218]="MetaProperty",e[e.SyntheticExpression=219]="SyntheticExpression",e[e.TemplateSpan=220]="TemplateSpan",e[e.SemicolonClassElement=221]="SemicolonClassElement",e[e.Block=222]="Block",e[e.EmptyStatement=223]="EmptyStatement",e[e.VariableStatement=224]="VariableStatement",e[e.ExpressionStatement=225]="ExpressionStatement",e[e.IfStatement=226]="IfStatement",e[e.DoStatement=227]="DoStatement",e[e.WhileStatement=228]="WhileStatement",e[e.ForStatement=229]="ForStatement",e[e.ForInStatement=230]="ForInStatement",e[e.ForOfStatement=231]="ForOfStatement",e[e.ContinueStatement=232]="ContinueStatement",e[e.BreakStatement=233]="BreakStatement",e[e.ReturnStatement=234]="ReturnStatement",e[e.WithStatement=235]="WithStatement",e[e.SwitchStatement=236]="SwitchStatement",e[e.LabeledStatement=237]="LabeledStatement",e[e.ThrowStatement=238]="ThrowStatement",e[e.TryStatement=239]="TryStatement",e[e.DebuggerStatement=240]="DebuggerStatement",e[e.VariableDeclaration=241]="VariableDeclaration",e[e.VariableDeclarationList=242]="VariableDeclarationList",e[e.FunctionDeclaration=243]="FunctionDeclaration",e[e.ClassDeclaration=244]="ClassDeclaration",e[e.InterfaceDeclaration=245]="InterfaceDeclaration",e[e.TypeAliasDeclaration=246]="TypeAliasDeclaration",e[e.EnumDeclaration=247]="EnumDeclaration",e[e.ModuleDeclaration=248]="ModuleDeclaration",e[e.ModuleBlock=249]="ModuleBlock",e[e.CaseBlock=250]="CaseBlock",e[e.NamespaceExportDeclaration=251]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=252]="ImportEqualsDeclaration",e[e.ImportDeclaration=253]="ImportDeclaration",e[e.ImportClause=254]="ImportClause",e[e.NamespaceImport=255]="NamespaceImport",e[e.NamedImports=256]="NamedImports",e[e.ImportSpecifier=257]="ImportSpecifier",e[e.ExportAssignment=258]="ExportAssignment",e[e.ExportDeclaration=259]="ExportDeclaration",e[e.NamedExports=260]="NamedExports",e[e.ExportSpecifier=261]="ExportSpecifier",e[e.MissingDeclaration=262]="MissingDeclaration",e[e.ExternalModuleReference=263]="ExternalModuleReference",e[e.JsxElement=264]="JsxElement",e[e.JsxSelfClosingElement=265]="JsxSelfClosingElement",e[e.JsxOpeningElement=266]="JsxOpeningElement",e[e.JsxClosingElement=267]="JsxClosingElement",e[e.JsxFragment=268]="JsxFragment",e[e.JsxOpeningFragment=269]="JsxOpeningFragment",e[e.JsxClosingFragment=270]="JsxClosingFragment",e[e.JsxAttribute=271]="JsxAttribute",e[e.JsxAttributes=272]="JsxAttributes",e[e.JsxSpreadAttribute=273]="JsxSpreadAttribute",e[e.JsxExpression=274]="JsxExpression",e[e.CaseClause=275]="CaseClause",e[e.DefaultClause=276]="DefaultClause",e[e.HeritageClause=277]="HeritageClause",e[e.CatchClause=278]="CatchClause",e[e.PropertyAssignment=279]="PropertyAssignment",e[e.ShorthandPropertyAssignment=280]="ShorthandPropertyAssignment",e[e.SpreadAssignment=281]="SpreadAssignment",e[e.EnumMember=282]="EnumMember",e[e.UnparsedPrologue=283]="UnparsedPrologue",e[e.UnparsedPrepend=284]="UnparsedPrepend",e[e.UnparsedText=285]="UnparsedText",e[e.UnparsedInternalText=286]="UnparsedInternalText",e[e.UnparsedSyntheticReference=287]="UnparsedSyntheticReference",e[e.SourceFile=288]="SourceFile",e[e.Bundle=289]="Bundle",e[e.UnparsedSource=290]="UnparsedSource",e[e.InputFiles=291]="InputFiles",e[e.JSDocTypeExpression=292]="JSDocTypeExpression",e[e.JSDocAllType=293]="JSDocAllType",e[e.JSDocUnknownType=294]="JSDocUnknownType",e[e.JSDocNullableType=295]="JSDocNullableType",e[e.JSDocNonNullableType=296]="JSDocNonNullableType",e[e.JSDocOptionalType=297]="JSDocOptionalType",e[e.JSDocFunctionType=298]="JSDocFunctionType",e[e.JSDocVariadicType=299]="JSDocVariadicType",e[e.JSDocNamepathType=300]="JSDocNamepathType",e[e.JSDocComment=301]="JSDocComment",e[e.JSDocTypeLiteral=302]="JSDocTypeLiteral",e[e.JSDocSignature=303]="JSDocSignature",e[e.JSDocTag=304]="JSDocTag",e[e.JSDocAugmentsTag=305]="JSDocAugmentsTag",e[e.JSDocAuthorTag=306]="JSDocAuthorTag",e[e.JSDocClassTag=307]="JSDocClassTag",e[e.JSDocCallbackTag=308]="JSDocCallbackTag",e[e.JSDocEnumTag=309]="JSDocEnumTag",e[e.JSDocParameterTag=310]="JSDocParameterTag",e[e.JSDocReturnTag=311]="JSDocReturnTag",e[e.JSDocThisTag=312]="JSDocThisTag",e[e.JSDocTypeTag=313]="JSDocTypeTag",e[e.JSDocTemplateTag=314]="JSDocTemplateTag",e[e.JSDocTypedefTag=315]="JSDocTypedefTag",e[e.JSDocPropertyTag=316]="JSDocPropertyTag",e[e.SyntaxList=317]="SyntaxList",e[e.NotEmittedStatement=318]="NotEmittedStatement",e[e.PartiallyEmittedExpression=319]="PartiallyEmittedExpression",e[e.CommaListExpression=320]="CommaListExpression",e[e.MergeDeclarationMarker=321]="MergeDeclarationMarker",e[e.EndOfDeclarationMarker=322]="EndOfDeclarationMarker",e[e.SyntheticReferenceExpression=323]="SyntheticReferenceExpression",e[e.Count=324]="Count",e[e.FirstAssignment=62]="FirstAssignment",e[e.LastAssignment=74]="LastAssignment",e[e.FirstCompoundAssignment=63]="FirstCompoundAssignment",e[e.LastCompoundAssignment=74]="LastCompoundAssignment",e[e.FirstReservedWord=76]="FirstReservedWord",e[e.LastReservedWord=111]="LastReservedWord",e[e.FirstKeyword=76]="FirstKeyword",e[e.LastKeyword=151]="LastKeyword",e[e.FirstFutureReservedWord=112]="FirstFutureReservedWord",e[e.LastFutureReservedWord=120]="LastFutureReservedWord",e[e.FirstTypeNode=167]="FirstTypeNode",e[e.LastTypeNode=187]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=74]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=151]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=29]="FirstBinaryOperator",e[e.LastBinaryOperator=74]="LastBinaryOperator",e[e.FirstStatement=224]="FirstStatement",e[e.LastStatement=240]="LastStatement",e[e.FirstNode=152]="FirstNode",e[e.FirstJSDocNode=292]="FirstJSDocNode",e[e.LastJSDocNode=316]="LastJSDocNode",e[e.FirstJSDocTagNode=304]="FirstJSDocTagNode",e[e.LastJSDocTagNode=316]="LastJSDocTagNode",e[e.FirstContextualKeyword=121]="FirstContextualKeyword",e[e.LastContextualKeyword=151]="LastContextualKeyword"}(e.SyntaxKind||(e.SyntaxKind={})),function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.NestedNamespace=4]="NestedNamespace",e[e.Synthesized=8]="Synthesized",e[e.Namespace=16]="Namespace",e[e.OptionalChain=32]="OptionalChain",e[e.ExportContext=64]="ExportContext",e[e.ContainsThis=128]="ContainsThis",e[e.HasImplicitReturn=256]="HasImplicitReturn",e[e.HasExplicitReturn=512]="HasExplicitReturn",e[e.GlobalAugmentation=1024]="GlobalAugmentation",e[e.HasAsyncFunctions=2048]="HasAsyncFunctions",e[e.DisallowInContext=4096]="DisallowInContext",e[e.YieldContext=8192]="YieldContext",e[e.DecoratorContext=16384]="DecoratorContext",e[e.AwaitContext=32768]="AwaitContext",e[e.ThisNodeHasError=65536]="ThisNodeHasError",e[e.JavaScriptFile=131072]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=262144]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=524288]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=1048576]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=2097152]="PossiblyContainsImportMeta",e[e.JSDoc=4194304]="JSDoc",e[e.Ambient=8388608]="Ambient",e[e.InWithStatement=16777216]="InWithStatement",e[e.JsonFile=33554432]="JsonFile",e[e.BlockScoped=3]="BlockScoped",e[e.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=2816]="ReachabilityAndEmitFlags",e[e.ContextFlags=25358336]="ContextFlags",e[e.TypeExcludesFlags=40960]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=3145728]="PermanentlySetIncrementalFlags"}(e.NodeFlags||(e.NodeFlags={})),function(e){e[e.None=0]="None",e[e.Export=1]="Export",e[e.Ambient=2]="Ambient",e[e.Public=4]="Public",e[e.Private=8]="Private",e[e.Protected=16]="Protected",e[e.Static=32]="Static",e[e.Readonly=64]="Readonly",e[e.Abstract=128]="Abstract",e[e.Async=256]="Async",e[e.Default=512]="Default",e[e.Const=2048]="Const",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=92]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=2270]="TypeScriptModifier",e[e.ExportDefault=513]="ExportDefault",e[e.All=3071]="All"}(e.ModifierFlags||(e.ModifierFlags={})),function(e){e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement"}(e.JsxFlags||(e.JsxFlags={})),function(e){e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.Reported=4]="Reported",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask"}(e.RelationComparisonResult||(e.RelationComparisonResult={})),function(e){e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel"}(e.GeneratedIdentifierFlags||(e.GeneratedIdentifierFlags={})),function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.NumericLiteralFlags=1008]="NumericLiteralFlags"}(e.TokenFlags||(e.TokenFlags={})),function(e){e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.Referenced=1024]="Referenced",e[e.Shared=2048]="Shared",e[e.PreFinally=4096]="PreFinally",e[e.AfterFinally=8192]="AfterFinally",e[e.Cached=16384]="Cached",e[e.Label=12]="Label",e[e.Condition=96]="Condition"}(e.FlowFlags||(e.FlowFlags={}));var t,r=function(){};e.OperationCanceledException=r,function(e){e[e.Import=0]="Import",e[e.ReferenceFile=1]="ReferenceFile",e[e.TypeReferenceDirective=2]="TypeReferenceDirective"}(e.RefFileKind||(e.RefFileKind={})),function(e){e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely"}(e.StructureIsReused||(e.StructureIsReused={})),function(e){e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",e[e.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkupped=4]="ProjectReferenceCycle_OutputsSkupped"}(e.ExitStatus||(e.ExitStatus={})),function(e){e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype"}(e.UnionReduction||(e.UnionReduction={})),function(e){e[e.None=0]="None",e[e.Signature=1]="Signature",e[e.NoConstraints=2]="NoConstraints",e[e.Completion=4]="Completion"}(e.ContextFlags||(e.ContextFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifedNameInPlaceOfIdentifier=65536]="AllowQualifedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e[e.InReverseMappedType=33554432]="InReverseMappedType"}(e.NodeBuilderFlags||(e.NodeBuilderFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.WriteOwnNameForAnyLike=0]="WriteOwnNameForAnyLike",e[e.NodeBuilderFlagsMask=9469291]="NodeBuilderFlagsMask"}(e.TypeFormatFlags||(e.TypeFormatFlags={})),function(e){e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.DoNotIncludeSymbolChain=16]="DoNotIncludeSymbolChain"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={})),function(e){e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed"}(e.SymbolAccessibility||(e.SymbolAccessibility={})),function(e){e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread"}(e.SyntheticSymbolKind||(e.SyntheticSymbolKind={})),function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier"}(e.TypePredicateKind||(e.TypePredicateKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType"}(e.TypeReferenceSerializationKind||(e.TypeReferenceSerializationKind={})),function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=67108863]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer"}(e.SymbolFlags||(e.SymbolFlags={})),function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal"}(e.EnumKind||(e.EnumKind={})),function(e){e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.ReadPartial=16]="ReadPartial",e[e.WritePartial=32]="WritePartial",e[e.HasNonUniformType=64]="HasNonUniformType",e[e.HasLiteralType=128]="HasLiteralType",e[e.ContainsPublic=256]="ContainsPublic",e[e.ContainsProtected=512]="ContainsProtected",e[e.ContainsPrivate=1024]="ContainsPrivate",e[e.ContainsStatic=2048]="ContainsStatic",e[e.Late=4096]="Late",e[e.ReverseMapped=8192]="ReverseMapped",e[e.OptionalParameter=16384]="OptionalParameter",e[e.RestParameter=32768]="RestParameter",e[e.DeferredType=65536]="DeferredType",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial"}(e.CheckFlags||(e.CheckFlags={})),function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this"}(e.InternalSymbolName||(e.InternalSymbolName={})),function(e){e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=256]="SuperInstance",e[e.SuperStatic=512]="SuperStatic",e[e.ContextChecked=1024]="ContextChecked",e[e.AsyncMethodWithSuper=2048]="AsyncMethodWithSuper",e[e.AsyncMethodWithSuperBinding=4096]="AsyncMethodWithSuperBinding",e[e.CaptureArguments=8192]="CaptureArguments",e[e.EnumValuesComputed=16384]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=32768]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=65536]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=131072]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=262144]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=524288]="BlockScopedBindingInLoop",e[e.ClassWithBodyScopedClassBinding=1048576]="ClassWithBodyScopedClassBinding",e[e.BodyScopedClassBinding=2097152]="BodyScopedClassBinding",e[e.NeedsLoopOutParameter=4194304]="NeedsLoopOutParameter",e[e.AssignmentsMarked=8388608]="AssignmentsMarked",e[e.ClassWithConstructorReference=16777216]="ClassWithConstructorReference",e[e.ConstructorReferenceInClass=33554432]="ConstructorReferenceInClass"}(e.NodeCheckFlags||(e.NodeCheckFlags={})),function(e){e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109440]="Unit",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.Primitive=131068]="Primitive",e[e.StringLike=132]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.DisjointDomains=67238908]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=4194304]="InstantiablePrimitive",e[e.Instantiable=63176704]="Instantiable",e[e.StructuredOrInstantiable=66846720]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899392]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Narrowable=133970943]="Narrowable",e[e.NotUnionOrUnit=67637251]="NotUnionOrUnit",e[e.NotPrimitiveUnion=66994211]="NotPrimitiveUnion",e[e.IncludesMask=68943871]="IncludesMask",e[e.IncludesStructuredOrInstantiable=262144]="IncludesStructuredOrInstantiable",e[e.IncludesNonWideningType=2097152]="IncludesNonWideningType",e[e.IncludesWildcard=4194304]="IncludesWildcard",e[e.IncludesEmptyObject=8388608]="IncludesEmptyObject",e[e.GenericMappedType=131072]="GenericMappedType"}(e.TypeFlags||(e.TypeFlags={})),function(e){e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ContainsSpread=1024]="ContainsSpread",e[e.ReverseMapped=2048]="ReverseMapped",e[e.JsxAttributes=4096]="JsxAttributes",e[e.MarkerType=8192]="MarkerType",e[e.JSLiteral=16384]="JSLiteral",e[e.FreshLiteral=32768]="FreshLiteral",e[e.ArrayLiteral=65536]="ArrayLiteral",e[e.PrimitiveUnion=131072]="PrimitiveUnion",e[e.ContainsWideningType=262144]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=524288]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=1048576]="NonInferrableType",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=786432]="RequiresWidening",e[e.PropagatingFlags=1835008]="PropagatingFlags"}(e.ObjectFlags||(e.ObjectFlags={})),function(e){e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent",e[e.VarianceMask=7]="VarianceMask",e[e.Unmeasurable=8]="Unmeasurable",e[e.Unreliable=16]="Unreliable",e[e.AllowsStructuralFallback=24]="AllowsStructuralFallback"}(e.VarianceFlags||(e.VarianceFlags={})),function(e){e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed"}(e.JsxReferenceKind||(e.JsxReferenceKind={})),function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"}(e.SignatureKind||(e.SignatureKind={})),function(e){e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.IsOptionalCall=4]="IsOptionalCall",e[e.PropagatingFlags=3]="PropagatingFlags"}(e.SignatureFlags||(e.SignatureFlags={})),function(e){e[e.String=0]="String",e[e.Number=1]="Number"}(e.IndexKind||(e.IndexKind={})),function(e){e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.HomomorphicMappedType=2]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=4]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=8]="MappedTypeConstraint",e[e.ReturnType=16]="ReturnType",e[e.LiteralKeyof=32]="LiteralKeyof",e[e.NoConstraints=64]="NoConstraints",e[e.AlwaysStrict=128]="AlwaysStrict",e[e.MaxValue=256]="MaxValue",e[e.PriorityImpliesCombination=56]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity"}(e.InferencePriority||(e.InferencePriority={})),function(e){e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction"}(e.InferenceFlags||(e.InferenceFlags={})),function(e){e[e.False=0]="False",e[e.Maybe=1]="Maybe",e[e.True=-1]="True"}(e.Ternary||(e.Ternary={})),function(e){e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty"}(e.AssignmentDeclarationKind||(e.AssignmentDeclarationKind={})),function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(t=e.DiagnosticCategory||(e.DiagnosticCategory={})),e.diagnosticCategoryName=function(e,r){void 0===r&&(r=!0);var n=t[e.category];return r?n.toLowerCase():n},function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(e.ModuleResolutionKind||(e.ModuleResolutionKind={})),function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(e.ModuleKind||(e.ModuleKind={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative"}(e.JsxEmit||(e.JsxEmit={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(e.NewLineKind||(e.NewLineKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"}(e.ScriptKind||(e.ScriptKind={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(e.ScriptTarget||(e.ScriptTarget={})),function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(e.LanguageVariant||(e.LanguageVariant={})),function(e){e[e.None=0]="None",e[e.Recursive=1]="Recursive"}(e.WatchDirectoryFlags||(e.WatchDirectoryFlags={})),function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(e.CharacterCodes||(e.CharacterCodes={})),function(e){e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo"}(e.Extension||(e.Extension={})),function(e){e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2019=8]="ContainsES2019",e[e.ContainsES2018=16]="ContainsES2018",e[e.ContainsES2017=32]="ContainsES2017",e[e.ContainsES2016=64]="ContainsES2016",e[e.ContainsES2015=128]="ContainsES2015",e[e.ContainsGenerator=256]="ContainsGenerator",e[e.ContainsDestructuringAssignment=512]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=1024]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=2048]="ContainsLexicalThis",e[e.ContainsRestOrSpread=4096]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=8192]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=16384]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=32768]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=65536]="ContainsBindingPattern",e[e.ContainsYield=131072]="ContainsYield",e[e.ContainsHoistedDeclarationOrCompletion=262144]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=524288]="ContainsDynamicImport",e[e.ContainsClassFields=1048576]="ContainsClassFields",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2019=8]="AssertES2019",e[e.AssertES2018=16]="AssertES2018",e[e.AssertES2017=32]="AssertES2017",e[e.AssertES2016=64]="AssertES2016",e[e.AssertES2015=128]="AssertES2015",e[e.AssertGenerator=256]="AssertGenerator",e[e.AssertDestructuringAssignment=512]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=536870912]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=536870912]="PropertyAccessExcludes",e[e.NodeExcludes=536870912]="NodeExcludes",e[e.ArrowFunctionExcludes=537371648]="ArrowFunctionExcludes",e[e.FunctionExcludes=537373696]="FunctionExcludes",e[e.ConstructorExcludes=537372672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=537372672]="MethodOrAccessorExcludes",e[e.PropertyExcludes=536872960]="PropertyExcludes",e[e.ClassExcludes=536888320]="ClassExcludes",e[e.ModuleExcludes=537168896]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=536896512]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=536875008]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=536944640]="VariableDeclarationListExcludes",e[e.ParameterExcludes=536870912]="ParameterExcludes",e[e.CatchClauseExcludes=536879104]="CatchClauseExcludes",e[e.BindingPatternExcludes=536875008]="BindingPatternExcludes",e[e.PropertyNamePropagatingFlags=2048]="PropertyNamePropagatingFlags"}(e.TransformFlags||(e.TransformFlags={})),function(e){e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.AdviseOnEmitNode=2]="AdviseOnEmitNode",e[e.NoSubstitution=4]="NoSubstitution",e[e.CapturesThis=8]="CapturesThis",e[e.NoLeadingSourceMap=16]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=32]="NoTrailingSourceMap",e[e.NoSourceMap=48]="NoSourceMap",e[e.NoNestedSourceMaps=64]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=128]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=256]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=384]="NoTokenSourceMaps",e[e.NoLeadingComments=512]="NoLeadingComments",e[e.NoTrailingComments=1024]="NoTrailingComments",e[e.NoComments=1536]="NoComments",e[e.NoNestedComments=2048]="NoNestedComments",e[e.HelperName=4096]="HelperName",e[e.ExportName=8192]="ExportName",e[e.LocalName=16384]="LocalName",e[e.InternalName=32768]="InternalName",e[e.Indented=65536]="Indented",e[e.NoIndentation=131072]="NoIndentation",e[e.AsyncFunctionBody=262144]="AsyncFunctionBody",e[e.ReuseTempVariableScope=524288]="ReuseTempVariableScope",e[e.CustomPrologue=1048576]="CustomPrologue",e[e.NoHoisting=2097152]="NoHoisting",e[e.HasEndOfDeclarationMarker=4194304]="HasEndOfDeclarationMarker",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e[e.TypeScriptClassWrapper=33554432]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=67108864]="NeverApplyImportHelper"}(e.EmitFlags||(e.EmitFlags={})),function(e){e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.Spread=1024]="Spread",e[e.SpreadArrays=2048]="SpreadArrays",e[e.Await=4096]="Await",e[e.AsyncGenerator=8192]="AsyncGenerator",e[e.AsyncDelegator=16384]="AsyncDelegator",e[e.AsyncValues=32768]="AsyncValues",e[e.ExportStar=65536]="ExportStar",e[e.MakeTemplateObject=131072]="MakeTemplateObject",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=131072]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=32768]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=12288]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=53248]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes"}(e.ExternalEmitHelpers||(e.ExternalEmitHelpers={})),function(e){e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement"}(e.EmitHint||(e.EmitHint={})),function(e){e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal"}(e.BundleFileSectionKind||(e.BundleFileSectionKind={})),function(e){e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.Modifiers=262656]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.TupleTypeElements=528]="TupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=49153]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment"}(e.ListFormat||(e.ListFormat={})),function(e){e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default"}(e.PragmaKindFlags||(e.PragmaKindFlags={})),e.commentPragmas={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4}}}(s||(s={})),function(e){function t(e){for(var t=5381,r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r);return t.toString()}var n,i;function a(e){var t;return(t={})[i.Low]=e.Low,t[i.Medium]=e.Medium,t[i.High]=e.High,t}e.generateDjb2Hash=t,e.setStackTraceLimit=function(){Error.stackTraceLimit<100&&(Error.stackTraceLimit=100)},function(e){e[e.Created=0]="Created",e[e.Changed=1]="Changed",e[e.Deleted=2]="Deleted"}(n=e.FileWatcherEventKind||(e.FileWatcherEventKind={})),function(e){e[e.High=2e3]="High",e[e.Medium=500]="Medium",e[e.Low=250]="Low"}(i=e.PollingInterval||(e.PollingInterval={})),e.missingFileModifiedTime=new Date(0);var o,s,c={Low:32,Medium:64,High:256},u=a(c);function l(t){if(t.getEnvironmentVariable){var n=function(e,t){var r=o(e);if(r)return n("Low"),n("Medium"),n("High"),!0;return!1;function n(e){t[e]=r[e]||t[e]}}("TSC_WATCH_POLLINGINTERVAL",i);u=s("TSC_WATCH_POLLINGCHUNKSIZE",c)||u,e.unchangedPollThresholds=s("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",c)||e.unchangedPollThresholds}function o(e){var r;return n("Low"),n("Medium"),n("High"),r;function n(n){var i=function(e,r){return t.getEnvironmentVariable(e+"_"+r.toUpperCase())}(e,n);i&&((r||(r={}))[n]=Number(i))}}function s(e,t){var i=o(e);return(n||i)&&a(i?r(r({},t),i):t)}}function _(t){var r=[],n=[],a=c(i.Low),o=c(i.Medium),s=c(i.High);return function(t,n,i){var a={fileName:t,callback:n,unchangedPolls:0,mtime:v(t)};return r.push(a),m(a,i),{close:function(){a.isClosed=!0,e.unorderedRemoveItem(r,a)}}};function c(e){var t=[];return t.pollingInterval=e,t.pollIndex=0,t.pollScheduled=!1,t}function l(t){t.pollIndex=d(t,t.pollingInterval,t.pollIndex,u[t.pollingInterval]),t.length?h(t.pollingInterval):(e.Debug.assert(0===t.pollIndex),t.pollScheduled=!1)}function _(e){d(n,i.Low,0,n.length),l(e),!e.pollScheduled&&n.length&&h(i.Low)}function d(t,r,a,o){for(var s=t.length,c=a,u=0;u<o&&s>0;d(),s--){var l=t[a];if(l)if(l.isClosed)t[a]=void 0;else{u++;var _=p(l,v(l.fileName));l.isClosed?t[a]=void 0:_?(l.unchangedPolls=0,t!==n&&(t[a]=void 0,g(l))):l.unchangedPolls!==e.unchangedPollThresholds[r]?l.unchangedPolls++:t===n?(l.unchangedPolls=1,t[a]=void 0,m(l,i.Low)):r!==i.High&&(l.unchangedPolls++,t[a]=void 0,m(l,r===i.Low?i.Medium:i.High)),t[a]&&(c<a&&(t[c]=l,t[a]=void 0),c++)}}return a;function d(){++a===t.length&&(c<a&&(t.length=c),a=0,c=0)}}function f(e){switch(e){case i.Low:return a;case i.Medium:return o;case i.High:return s}}function m(e,t){f(t).push(e),y(t)}function g(e){n.push(e),y(i.Low)}function y(e){f(e).pollScheduled||h(e)}function h(e){f(e).pollScheduled=t.setTimeout(e===i.Low?_:l,e,f(e))}function v(r){return t.getModifiedTime(r)||e.missingFileModifiedTime}}function d(t,r){var n=e.createMap(),i=e.createMultiMap(),a=e.createGetCanonicalFileName(r);return function(r,o,s){var c=a(r),u=n.get(c);return u?u.refCount++:n.set(c,{watcher:t(r,(function(t,r){return e.forEach(i.get(c),(function(e){return e(t,r)}))}),s),refCount:1}),i.add(c,o),{close:function(){var t=e.Debug.assertDefined(n.get(c));i.remove(c,o),t.refCount--,t.refCount||(n.delete(c),e.closeFileWatcherOf(t))}}}}function p(e,t){var r=e.mtime.getTime(),n=t.getTime();return r!==n&&(e.mtime=t,e.callback(e.fileName,f(r,n)),!0)}function f(e,t){return 0===e?n.Created:0===t?n.Deleted:n.Changed}function m(t){var r=e.createMap(),n=e.createMultiMap(),i=e.getStringComparer(!t.useCaseSensitiveFileNames),a=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames);return o;function o(i,o){var u=a(i),l=r.get(u);return l?l.refCount++:(l={watcher:t.watchDirectory(i,(function(t){c(t)||(n.forEach((function(r,n){(n===u||e.startsWith(u,n)&&u[n.length]===e.directorySeparator)&&r.forEach((function(e){return e(t)}))})),s(i,u))})),refCount:1,childWatches:e.emptyArray},r.set(u,l),s(i,u)),o&&n.add(u,o),{dirName:i,close:function(){var t=e.Debug.assertDefined(r.get(u));o&&n.remove(u,o),t.refCount--,t.refCount||(r.delete(u),e.closeFileWatcherOf(t),t.childWatches.forEach(e.closeFileWatcher))}}}function s(n,a){var s=r.get(a);s&&(s.childWatches=function(r,n){var a;return e.enumerateInsertsAndDeletes(t.directoryExists(r)?e.mapDefined(t.getAccessibleSortedChildDirectories(r),(function(n){var a=e.getNormalizedAbsolutePath(n,r);return c(a)||0!==i(a,e.normalizePath(t.realpath(a)))?void 0:a})):e.emptyArray,n,(function(e,t){return i(e,t.dirName)}),(function(e){s(o(e))}),e.closeFileWatcher,s),a||e.emptyArray;function s(e){(a||(a=[])).push(e)}}(n,s.childWatches))}function c(r){return e.some(e.ignoredPaths,(function(n){return function(r,n){return!!e.stringContains(r,n)||!t.useCaseSensitiveFileNames&&e.stringContains(a(r),n)}(r,n)}))}}function g(t){var r=t.writeFile;t.writeFile=function(n,i,a){var o=e.getDirectoryPath(e.normalizeSlashes(n));o&&!t.directoryExists(o)&&function t(r,n){var i=e.getDirectoryPath(r),a=""!==i&&r!==i&&!n.directoryExists(i);a&&t(i,n),!a&&n.directoryExists(r)||n.createDirectory(r)}(o,t),r.call(t,n,i,a)}}function y(){if(void 0!==Oe){var e=Oe.version;if(e){var t=e.indexOf(".");if(-1!==t)return parseInt(e.substring(1,t))}}}e.unchangedPollThresholds=a(c),e.setCustomPollingValues=l,e.createDynamicPriorityPollingWatchFile=_,e.createSingleFileWatcherPerName=d,e.onWatchedFileStat=p,e.getFileWatcherEventKind=f,e.ignoredPaths=["/node_modules/.","/.git","/.#"],e.sysLog=e.noop,e.createRecursiveDirectoryWatcher=m,e.patchWriteFileEnsuringDirectory=g,e.getNodeMajorVersion=y,e.sys=(s="\ufeff","undefined"!=typeof ChakraHost&&(o=function(){var t=ChakraHost.realpath&&function(e){return ChakraHost.realpath(e)};return{newLine:ChakraHost.newLine||"\r\n",args:ChakraHost.args,useCaseSensitiveFileNames:!!ChakraHost.useCaseSensitiveFileNames,write:ChakraHost.echo,readFile:function(e,t){return ChakraHost.readFile(e)},writeFile:function(e,t,r){r&&(t=s+t),ChakraHost.writeFile(e,t)},resolvePath:ChakraHost.resolvePath,fileExists:ChakraHost.fileExists,deleteFile:ChakraHost.deleteFile,getModifiedTime:ChakraHost.getModifiedTime,setModifiedTime:ChakraHost.setModifiedTime,directoryExists:ChakraHost.directoryExists,createDirectory:ChakraHost.createDirectory,getExecutingFilePath:function(){return ChakraHost.executingFile},getCurrentDirectory:function(){return ChakraHost.currentDirectory},getDirectories:ChakraHost.getDirectories,getEnvironmentVariable:ChakraHost.getEnvironmentVariable||function(){return""},readDirectory:function(t,r,n,i,a){var o=e.getFileMatcherPatterns(t,n,i,!!ChakraHost.useCaseSensitiveFileNames,ChakraHost.currentDirectory);return ChakraHost.readDirectory(t,r,o.basePaths,o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern)},exit:ChakraHost.quit,realpath:t}}()),o&&g(o),o),e.sys&&e.sys.getEnvironmentVariable&&(l(e.sys),e.Debug.currentAssertionLevel=/^development$/i.test(e.sys.getEnvironmentVariable("NODE_ENV"))?1:0),e.sys&&e.sys.debugMode&&(e.Debug.isDebugging=!0)}(s||(s={})),function(e){e.directorySeparator="/";var r="\\",n="://",i=/\\/g;function a(e){return 47===e||92===e}function o(e){return d(e)>0}function s(e){return 0!==d(e)}function c(e){return/^\.\.?($|[\\/])/.test(e)}function u(t,r){return t.length>r.length&&e.endsWith(t,r)}function l(e){return e.length>0&&a(e.charCodeAt(e.length-1))}function _(e){return e>=97&&e<=122||e>=65&&e<=90}function d(t){if(!t)return 0;var i=t.charCodeAt(0);if(47===i||92===i){if(t.charCodeAt(1)!==i)return 1;var a=t.indexOf(47===i?e.directorySeparator:r,2);return a<0?t.length:a+1}if(_(i)&&58===t.charCodeAt(1)){var o=t.charCodeAt(2);if(47===o||92===o)return 3;if(2===t.length)return 2}var s=t.indexOf(n);if(-1!==s){var c=s+n.length,u=t.indexOf(e.directorySeparator,c);if(-1!==u){var l=t.slice(0,s),d=t.slice(c,u);if("file"===l&&(""===d||"localhost"===d)&&_(t.charCodeAt(u+1))){var p=function(e,t){var r=e.charCodeAt(t);if(58===r)return t+1;if(37===r&&51===e.charCodeAt(t+1)){var n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(t,u+2);if(-1!==p){if(47===t.charCodeAt(p))return~(p+1);if(p===t.length)return~p}}return~(u+1)}return~t.length}return 0}function p(e){var t=d(e);return t<0?~t:t}function f(t){var r=p(t=b(t));return r===t.length?t:(t=k(t)).slice(0,Math.max(r,t.lastIndexOf(e.directorySeparator)))}function m(t,r,n){if(p(t=b(t))===t.length)return"";var i=(t=k(t)).slice(Math.max(p(t),t.lastIndexOf(e.directorySeparator)+1)),a=void 0!==r&&void 0!==n?y(i,r,n):void 0;return a?i.slice(0,i.length-a.length):i}function g(t,r,n){if(e.startsWith(r,".")||(r="."+r),t.length>=r.length&&46===t.charCodeAt(t.length-r.length)){var i=t.slice(t.length-r.length);if(n(i,r))return i}}function y(t,r,n){if(r)return function(e,t,r){if("string"==typeof t)return g(e,t,r)||"";for(var n=0,i=t;n<i.length;n++){var a=g(e,i[n],r);if(a)return a}return""}(k(t),r,n?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive);var i=m(t),a=i.lastIndexOf(".");return a>=0?i.substring(a):""}function h(r,n){return void 0===n&&(n=""),function(r,n){var i=r.substring(0,n),a=r.substring(n).split(e.directorySeparator);return a.length&&!e.lastOrUndefined(a)&&a.pop(),t([i],a)}(r=D(n,r),p(r))}function v(t){return 0===t.length?"":(t[0]&&N(t[0]))+t.slice(1).join(e.directorySeparator)}function b(t){return t.replace(i,e.directorySeparator)}function x(t){if(!e.some(t))return[];for(var r=[t[0]],n=1;n<t.length;n++){var i=t[n];if(i&&"."!==i){if(".."===i)if(r.length>1){if(".."!==r[r.length-1]){r.pop();continue}}else if(r[0])continue;r.push(i)}}return r}function D(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&(e=b(e));for(var n=0,i=t;n<i.length;n++){var a=i[n];a&&(a=b(a),e=e&&0===p(a)?N(e)+a:a)}return e}function S(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return C(e.some(n)?D.apply(void 0,t([r],n)):b(r))}function T(e,t){return x(h(e,t))}function E(e,t){return v(T(e,t))}function C(e){var t=v(x(h(e=b(e))));return t&&l(e)?N(t):t}function k(e){return l(e)?e.substr(0,e.length-1):e}function N(t){return l(t)?t:t+e.directorySeparator}function A(e){return s(e)||c(e)?e:"./"+e}e.isAnyDirectorySeparator=a,e.isUrl=function(e){return d(e)<0},e.isRootedDiskPath=o,e.isDiskPathRoot=function(e){var t=d(e);return t>0&&t===e.length},e.pathIsAbsolute=s,e.pathIsRelative=c,e.hasExtension=function(t){return e.stringContains(m(t),".")},e.fileExtensionIs=u,e.fileExtensionIsOneOf=function(e,t){for(var r=0,n=t;r<n.length;r++){if(u(e,n[r]))return!0}return!1},e.hasTrailingDirectorySeparator=l,e.getRootLength=p,e.getDirectoryPath=f,e.getBaseFileName=m,e.getAnyExtensionFromPath=y,e.getPathComponents=h,e.getPathFromPathComponents=v,e.normalizeSlashes=b,e.reducePathComponents=x,e.combinePaths=D,e.resolvePath=S,e.getNormalizedPathComponents=T,e.getNormalizedAbsolutePath=E,e.normalizePath=C,e.getNormalizedAbsolutePathWithoutRoot=function(t,r){return function(t){return 0===t.length?"":t.slice(1).join(e.directorySeparator)}(T(t,r))},e.toPath=function(e,t,r){return r(o(e)?C(e):E(e,t))},e.normalizePathAndParts=function(t){var r=x(h(t=b(t))),n=r[0],i=r.slice(1);if(i.length){var a=n+i.join(e.directorySeparator);return{path:l(t)?N(a):a,parts:i}}return{path:n,parts:i}},e.removeTrailingDirectorySeparator=k,e.ensureTrailingDirectorySeparator=N,e.ensurePathIsNonModuleName=A,e.changeAnyExtension=function(t,r,n,i){var a=void 0!==n&&void 0!==i?y(t,n,i):y(t);return a?t.slice(0,t.length-a.length)+(e.startsWith(r,".")?r:"."+r):t};var F=/(^|\/)\.{0,2}($|\/)/;function P(t,r,n){if(t===r)return 0;if(void 0===t)return-1;if(void 0===r)return 1;var i=t.substring(0,p(t)),a=r.substring(0,p(r)),o=e.compareStringsCaseInsensitive(i,a);if(0!==o)return o;var s=t.substring(i.length),c=r.substring(a.length);if(!F.test(s)&&!F.test(c))return n(s,c);for(var u=x(h(t)),l=x(h(r)),_=Math.min(u.length,l.length),d=1;d<_;d++){var f=n(u[d],l[d]);if(0!==f)return f}return e.compareValues(u.length,l.length)}function w(r,n,i,a){var o,s=x(h(r)),c=x(h(n));for(o=0;o<s.length&&o<c.length;o++){var u=a(s[o]),l=a(c[o]);if(!(0===o?e.equateStringsCaseInsensitive:i)(u,l))break}if(0===o)return c;for(var _=c.slice(o),d=[];o<s.length;o++)d.push("..");return t([""],d,_)}function I(t,r,n){e.Debug.assert(p(t)>0==p(r)>0,"Paths must either both be absolute or both be relative");var i="function"==typeof n?n:e.identity;return v(w(t,r,"boolean"==typeof n&&n?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,i))}function O(t,r,n,i,a){var s=w(S(n,t),S(n,r),e.equateStringsCaseSensitive,i),c=s[0];if(a&&o(c)){var u=c.charAt(0)===e.directorySeparator?"file://":"file:///";s[0]=u+c}return v(s)}e.comparePathsCaseSensitive=function(t,r){return P(t,r,e.compareStringsCaseSensitive)},e.comparePathsCaseInsensitive=function(t,r){return P(t,r,e.compareStringsCaseInsensitive)},e.comparePaths=function(t,r,n,i){return"string"==typeof n?(t=D(n,t),r=D(n,r)):"boolean"==typeof n&&(i=n),P(t,r,e.getStringComparer(i))},e.containsPath=function(t,r,n,i){if("string"==typeof n?(t=D(n,t),r=D(n,r)):"boolean"==typeof n&&(i=n),void 0===t||void 0===r)return!1;if(t===r)return!0;var a=x(h(t)),o=x(h(r));if(o.length<a.length)return!1;for(var s=i?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,c=0;c<a.length;c++){if(!(0===c?e.equateStringsCaseInsensitive:s)(a[c],o[c]))return!1}return!0},e.startsWithDirectory=function(t,r,n){var i=n(t),a=n(r);return e.startsWith(i,a+"/")||e.startsWith(i,a+"\\")},e.getPathComponentsRelativeTo=w,e.getRelativePathFromDirectory=I,e.convertToRelativePath=function(e,t,r){return o(e)?O(t,e,t,r,!1):e},e.getRelativePathFromFile=function(e,t,r){return A(I(f(e),t,r))},e.getRelativePathToDirectoryOrUrl=O,e.forEachAncestorDirectory=function(e,t){for(;;){var r=t(e);if(void 0!==r)return r;var n=f(e);if(n===e)return;e=n}}}(s||(s={})),function(e){function t(e,t,r,n,i,a){return{code:e,category:t,key:r,message:n,reportsUnnecessary:i,elidedInCompatabilityPyramid:a}}e.Diagnostics={Unterminated_string_literal:t(1002,e.DiagnosticCategory.Error,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:t(1003,e.DiagnosticCategory.Error,"Identifier_expected_1003","Identifier expected."),_0_expected:t(1005,e.DiagnosticCategory.Error,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:t(1006,e.DiagnosticCategory.Error,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),Trailing_comma_not_allowed:t(1009,e.DiagnosticCategory.Error,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:t(1010,e.DiagnosticCategory.Error,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:t(1011,e.DiagnosticCategory.Error,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:t(1012,e.DiagnosticCategory.Error,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:t(1013,e.DiagnosticCategory.Error,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:t(1014,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:t(1015,e.DiagnosticCategory.Error,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:t(1016,e.DiagnosticCategory.Error,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:t(1017,e.DiagnosticCategory.Error,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:t(1018,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:t(1019,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:t(1020,e.DiagnosticCategory.Error,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:t(1021,e.DiagnosticCategory.Error,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:t(1022,e.DiagnosticCategory.Error,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),An_index_signature_parameter_type_must_be_either_string_or_number:t(1023,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_must_be_either_string_or_number_1023","An index signature parameter type must be either 'string' or 'number'."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:t(1024,e.DiagnosticCategory.Error,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),Accessibility_modifier_already_seen:t(1028,e.DiagnosticCategory.Error,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:t(1029,e.DiagnosticCategory.Error,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:t(1030,e.DiagnosticCategory.Error,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_a_class_element:t(1031,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_class_element_1031","'{0}' modifier cannot appear on a class element."),super_must_be_followed_by_an_argument_list_or_member_access:t(1034,e.DiagnosticCategory.Error,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:t(1035,e.DiagnosticCategory.Error,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:t(1036,e.DiagnosticCategory.Error,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:t(1038,e.DiagnosticCategory.Error,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:t(1039,e.DiagnosticCategory.Error,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:t(1040,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_with_a_class_declaration:t(1041,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_a_class_declaration_1041","'{0}' modifier cannot be used with a class declaration."),_0_modifier_cannot_be_used_here:t(1042,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_data_property:t(1043,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_data_property_1043","'{0}' modifier cannot appear on a data property."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:t(1044,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),A_0_modifier_cannot_be_used_with_an_interface_declaration:t(1045,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_interface_declaration_1045","A '{0}' modifier cannot be used with an interface declaration."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:t(1046,e.DiagnosticCategory.Error,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:t(1047,e.DiagnosticCategory.Error,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:t(1048,e.DiagnosticCategory.Error,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:t(1049,e.DiagnosticCategory.Error,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:t(1051,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:t(1052,e.DiagnosticCategory.Error,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:t(1053,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:t(1054,e.DiagnosticCategory.Error,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:t(1055,e.DiagnosticCategory.Error,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:t(1056,e.DiagnosticCategory.Error,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),An_async_function_or_method_must_have_a_valid_awaitable_return_type:t(1057,e.DiagnosticCategory.Error,"An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057","An async function or method must have a valid awaitable return type."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1058,e.DiagnosticCategory.Error,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:t(1059,e.DiagnosticCategory.Error,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:t(1060,e.DiagnosticCategory.Error,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:t(1061,e.DiagnosticCategory.Error,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:t(1062,e.DiagnosticCategory.Error,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:t(1063,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:t(1064,e.DiagnosticCategory.Error,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064","The return type of an async function or method must be the global Promise<T> type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:t(1066,e.DiagnosticCategory.Error,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:t(1068,e.DiagnosticCategory.Error,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:t(1069,e.DiagnosticCategory.Error,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:t(1070,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:t(1071,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:t(1079,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:t(1084,e.DiagnosticCategory.Error,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:t(1085,e.DiagnosticCategory.Error,"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085","Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),_0_modifier_cannot_appear_on_a_constructor_declaration:t(1089,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:t(1090,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:t(1091,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:t(1092,e.DiagnosticCategory.Error,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:t(1093,e.DiagnosticCategory.Error,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:t(1094,e.DiagnosticCategory.Error,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:t(1095,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:t(1096,e.DiagnosticCategory.Error,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:t(1097,e.DiagnosticCategory.Error,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:t(1098,e.DiagnosticCategory.Error,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:t(1099,e.DiagnosticCategory.Error,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:t(1100,e.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:t(1101,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:t(1102,e.DiagnosticCategory.Error,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator:t(1103,e.DiagnosticCategory.Error,"A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103","A 'for-await-of' statement is only allowed within an async function or async generator."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:t(1104,e.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:t(1105,e.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),Jump_target_cannot_cross_function_boundary:t(1107,e.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:t(1108,e.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:t(1109,e.DiagnosticCategory.Error,"Expression_expected_1109","Expression expected."),Type_expected:t(1110,e.DiagnosticCategory.Error,"Type_expected_1110","Type expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:t(1113,e.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:t(1114,e.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:t(1115,e.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:t(1116,e.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:t(1117,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:t(1118,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:t(1119,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:t(1120,e.DiagnosticCategory.Error,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_in_strict_mode:t(1121,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode."),Variable_declaration_list_cannot_be_empty:t(1123,e.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:t(1124,e.DiagnosticCategory.Error,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:t(1125,e.DiagnosticCategory.Error,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:t(1126,e.DiagnosticCategory.Error,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:t(1127,e.DiagnosticCategory.Error,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:t(1128,e.DiagnosticCategory.Error,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:t(1129,e.DiagnosticCategory.Error,"Statement_expected_1129","Statement expected."),case_or_default_expected:t(1130,e.DiagnosticCategory.Error,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:t(1131,e.DiagnosticCategory.Error,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:t(1132,e.DiagnosticCategory.Error,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:t(1134,e.DiagnosticCategory.Error,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:t(1135,e.DiagnosticCategory.Error,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:t(1136,e.DiagnosticCategory.Error,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:t(1137,e.DiagnosticCategory.Error,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:t(1138,e.DiagnosticCategory.Error,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:t(1139,e.DiagnosticCategory.Error,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:t(1140,e.DiagnosticCategory.Error,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:t(1141,e.DiagnosticCategory.Error,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:t(1142,e.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:t(1144,e.DiagnosticCategory.Error,"or_expected_1144","'{' or ';' expected."),Declaration_expected:t(1146,e.DiagnosticCategory.Error,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:t(1147,e.DiagnosticCategory.Error,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:t(1148,e.DiagnosticCategory.Error,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:t(1149,e.DiagnosticCategory.Error,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),const_declarations_must_be_initialized:t(1155,e.DiagnosticCategory.Error,"const_declarations_must_be_initialized_1155","'const' declarations must be initialized."),const_declarations_can_only_be_declared_inside_a_block:t(1156,e.DiagnosticCategory.Error,"const_declarations_can_only_be_declared_inside_a_block_1156","'const' declarations can only be declared inside a block."),let_declarations_can_only_be_declared_inside_a_block:t(1157,e.DiagnosticCategory.Error,"let_declarations_can_only_be_declared_inside_a_block_1157","'let' declarations can only be declared inside a block."),Unterminated_template_literal:t(1160,e.DiagnosticCategory.Error,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:t(1161,e.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:t(1162,e.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:t(1163,e.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:t(1164,e.DiagnosticCategory.Error,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1165,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1166,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166","A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1168,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1169,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1170,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:t(1171,e.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:t(1172,e.DiagnosticCategory.Error,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:t(1173,e.DiagnosticCategory.Error,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:t(1174,e.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:t(1175,e.DiagnosticCategory.Error,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:t(1176,e.DiagnosticCategory.Error,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:t(1177,e.DiagnosticCategory.Error,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:t(1178,e.DiagnosticCategory.Error,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:t(1179,e.DiagnosticCategory.Error,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:t(1180,e.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:t(1181,e.DiagnosticCategory.Error,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:t(1182,e.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:t(1183,e.DiagnosticCategory.Error,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:t(1184,e.DiagnosticCategory.Error,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:t(1185,e.DiagnosticCategory.Error,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:t(1186,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:t(1187,e.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:t(1188,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:t(1189,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:t(1190,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:t(1191,e.DiagnosticCategory.Error,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:t(1192,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:t(1193,e.DiagnosticCategory.Error,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:t(1194,e.DiagnosticCategory.Error,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),Catch_clause_variable_cannot_have_a_type_annotation:t(1196,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_a_type_annotation_1196","Catch clause variable cannot have a type annotation."),Catch_clause_variable_cannot_have_an_initializer:t(1197,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:t(1198,e.DiagnosticCategory.Error,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:t(1199,e.DiagnosticCategory.Error,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:t(1200,e.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:t(1202,e.DiagnosticCategory.Error,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:t(1203,e.DiagnosticCategory.Error,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided:t(1205,e.DiagnosticCategory.Error,"Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205","Cannot re-export a type when the '--isolatedModules' flag is provided."),Decorators_are_not_valid_here:t(1206,e.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:t(1207,e.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),All_files_must_be_modules_when_the_isolatedModules_flag_is_provided:t(1208,e.DiagnosticCategory.Error,"All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208","All files must be modules when the '--isolatedModules' flag is provided."),Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:t(1210,e.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:t(1211,e.DiagnosticCategory.Error,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:t(1212,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t(1213,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:t(1214,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:t(1215,e.DiagnosticCategory.Error,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:t(1216,e.DiagnosticCategory.Error,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:t(1218,e.DiagnosticCategory.Error,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning:t(1219,e.DiagnosticCategory.Error,"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219","Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."),Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher:t(1220,e.DiagnosticCategory.Error,"Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220","Generators are only available when targeting ECMAScript 2015 or higher."),Generators_are_not_allowed_in_an_ambient_context:t(1221,e.DiagnosticCategory.Error,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:t(1222,e.DiagnosticCategory.Error,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:t(1223,e.DiagnosticCategory.Error,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:t(1224,e.DiagnosticCategory.Error,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:t(1225,e.DiagnosticCategory.Error,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:t(1226,e.DiagnosticCategory.Error,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:t(1227,e.DiagnosticCategory.Error,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:t(1228,e.DiagnosticCategory.Error,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:t(1229,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:t(1230,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_can_only_be_used_in_a_module:t(1231,e.DiagnosticCategory.Error,"An_export_assignment_can_only_be_used_in_a_module_1231","An export assignment can only be used in a module."),An_import_declaration_can_only_be_used_in_a_namespace_or_module:t(1232,e.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module."),An_export_declaration_can_only_be_used_in_a_module:t(1233,e.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:t(1234,e.DiagnosticCategory.Error,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:t(1235,e.DiagnosticCategory.Error,"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235","A namespace declaration is only allowed in a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:t(1236,e.DiagnosticCategory.Error,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:t(1237,e.DiagnosticCategory.Error,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:t(1238,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:t(1239,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:t(1240,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:t(1241,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:t(1242,e.DiagnosticCategory.Error,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:t(1243,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:t(1244,e.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:t(1245,e.DiagnosticCategory.Error,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:t(1246,e.DiagnosticCategory.Error,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:t(1247,e.DiagnosticCategory.Error,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:t(1248,e.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:t(1249,e.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5:t(1250,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:t(1251,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:t(1252,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag:t(1253,e.DiagnosticCategory.Error,"_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253","'{0}' tag cannot be used independently as a top level JSDoc tag."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:t(1254,e.DiagnosticCategory.Error,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:t(1255,e.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_rest_element_must_be_last_in_a_tuple_type:t(1256,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_tuple_type_1256","A rest element must be last in a tuple type."),A_required_element_cannot_follow_an_optional_element:t(1257,e.DiagnosticCategory.Error,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation:t(1258,e.DiagnosticCategory.Error,"Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258","Definite assignment assertions can only be used along with a type annotation."),Module_0_can_only_be_default_imported_using_the_1_flag:t(1259,e.DiagnosticCategory.Error,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:t(1260,e.DiagnosticCategory.Error,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),with_statements_are_not_allowed_in_an_async_function_block:t(1300,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expression_is_only_allowed_within_an_async_function:t(1308,e.DiagnosticCategory.Error,"await_expression_is_only_allowed_within_an_async_function_1308","'await' expression is only allowed within an async function."),can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment:t(1312,e.DiagnosticCategory.Error,"can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312","'=' can only be used in an object literal property inside a destructuring assignment."),The_body_of_an_if_statement_cannot_be_the_empty_statement:t(1313,e.DiagnosticCategory.Error,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:t(1314,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:t(1315,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:t(1316,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:t(1317,e.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:t(1318,e.DiagnosticCategory.Error,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:t(1319,e.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1320,e.DiagnosticCategory.Error,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1321,e.DiagnosticCategory.Error,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1322,e.DiagnosticCategory.Error,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd:t(1323,e.DiagnosticCategory.Error,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323","Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."),Dynamic_import_must_have_one_specifier_as_an_argument:t(1324,e.DiagnosticCategory.Error,"Dynamic_import_must_have_one_specifier_as_an_argument_1324","Dynamic import must have one specifier as an argument."),Specifier_of_dynamic_import_cannot_be_spread_element:t(1325,e.DiagnosticCategory.Error,"Specifier_of_dynamic_import_cannot_be_spread_element_1325","Specifier of dynamic import cannot be spread element."),Dynamic_import_cannot_have_type_arguments:t(1326,e.DiagnosticCategory.Error,"Dynamic_import_cannot_have_type_arguments_1326","Dynamic import cannot have type arguments"),String_literal_with_double_quotes_expected:t(1327,e.DiagnosticCategory.Error,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:t(1328,e.DiagnosticCategory.Error,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:t(1329,e.DiagnosticCategory.Error,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:t(1330,e.DiagnosticCategory.Error,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:t(1331,e.DiagnosticCategory.Error,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:t(1332,e.DiagnosticCategory.Error,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:t(1333,e.DiagnosticCategory.Error,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:t(1334,e.DiagnosticCategory.Error,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:t(1335,e.DiagnosticCategory.Error,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead:t(1336,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336","An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead:t(1337,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337","An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:t(1338,e.DiagnosticCategory.Error,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:t(1339,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:t(1340,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Type_arguments_cannot_be_used_here:t(1342,e.DiagnosticCategory.Error,"Type_arguments_cannot_be_used_here_1342","Type arguments cannot be used here."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system:t(1343,e.DiagnosticCategory.Error,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'."),A_label_is_not_allowed_here:t(1344,e.DiagnosticCategory.Error,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:t(1345,e.DiagnosticCategory.Error,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness"),This_parameter_is_not_allowed_with_use_strict_directive:t(1346,e.DiagnosticCategory.Error,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:t(1347,e.DiagnosticCategory.Error,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:t(1348,e.DiagnosticCategory.Error,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:t(1349,e.DiagnosticCategory.Error,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:t(1350,e.DiagnosticCategory.Message,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:t(1351,e.DiagnosticCategory.Error,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:t(1352,e.DiagnosticCategory.Error,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:t(1353,e.DiagnosticCategory.Error,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:t(1354,e.DiagnosticCategory.Error,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:t(1355,e.DiagnosticCategory.Error,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:t(1356,e.DiagnosticCategory.Error,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:t(1357,e.DiagnosticCategory.Error,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:t(1358,e.DiagnosticCategory.Error,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:t(1359,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),The_types_of_0_are_incompatible_between_these_types:t(2200,e.DiagnosticCategory.Error,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:t(2201,e.DiagnosticCategory.Error,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:t(2202,e.DiagnosticCategory.Error,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:t(2203,e.DiagnosticCategory.Error,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2204,e.DiagnosticCategory.Error,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2205,e.DiagnosticCategory.Error,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Duplicate_identifier_0:t(2300,e.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:t(2301,e.DiagnosticCategory.Error,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:t(2302,e.DiagnosticCategory.Error,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:t(2303,e.DiagnosticCategory.Error,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:t(2304,e.DiagnosticCategory.Error,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:t(2305,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:t(2306,e.DiagnosticCategory.Error,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0:t(2307,e.DiagnosticCategory.Error,"Cannot_find_module_0_2307","Cannot find module '{0}'."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:t(2308,e.DiagnosticCategory.Error,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:t(2309,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:t(2310,e.DiagnosticCategory.Error,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),A_class_may_only_extend_another_class:t(2311,e.DiagnosticCategory.Error,"A_class_may_only_extend_another_class_2311","A class may only extend another class."),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2312,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:t(2313,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:t(2314,e.DiagnosticCategory.Error,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:t(2315,e.DiagnosticCategory.Error,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:t(2316,e.DiagnosticCategory.Error,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:t(2317,e.DiagnosticCategory.Error,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:t(2318,e.DiagnosticCategory.Error,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:t(2319,e.DiagnosticCategory.Error,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:t(2320,e.DiagnosticCategory.Error,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:t(2321,e.DiagnosticCategory.Error,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:t(2322,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:t(2323,e.DiagnosticCategory.Error,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:t(2324,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:t(2325,e.DiagnosticCategory.Error,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:t(2326,e.DiagnosticCategory.Error,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:t(2327,e.DiagnosticCategory.Error,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:t(2328,e.DiagnosticCategory.Error,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_is_missing_in_type_0:t(2329,e.DiagnosticCategory.Error,"Index_signature_is_missing_in_type_0_2329","Index signature is missing in type '{0}'."),Index_signatures_are_incompatible:t(2330,e.DiagnosticCategory.Error,"Index_signatures_are_incompatible_2330","Index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:t(2331,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:t(2332,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:t(2333,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:t(2334,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:t(2335,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:t(2336,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:t(2337,e.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:t(2338,e.DiagnosticCategory.Error,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:t(2339,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:t(2340,e.DiagnosticCategory.Error,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:t(2341,e.DiagnosticCategory.Error,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:t(2342,e.DiagnosticCategory.Error,"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342","An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:t(2343,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:t(2344,e.DiagnosticCategory.Error,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:t(2345,e.DiagnosticCategory.Error,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:t(2346,e.DiagnosticCategory.Error,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:t(2347,e.DiagnosticCategory.Error,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:t(2348,e.DiagnosticCategory.Error,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:t(2349,e.DiagnosticCategory.Error,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:t(2350,e.DiagnosticCategory.Error,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:t(2351,e.DiagnosticCategory.Error,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:t(2352,e.DiagnosticCategory.Error,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:t(2353,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:t(2354,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:t(2355,e.DiagnosticCategory.Error,"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'void' nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:t(2356,e.DiagnosticCategory.Error,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:t(2357,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2358,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:t(2359,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:t(2360,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2361,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2362,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2363,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:t(2364,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:t(2365,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:t(2366,e.DiagnosticCategory.Error,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap:t(2367,e.DiagnosticCategory.Error,"This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367","This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."),Type_parameter_name_cannot_be_0:t(2368,e.DiagnosticCategory.Error,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:t(2369,e.DiagnosticCategory.Error,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:t(2370,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:t(2371,e.DiagnosticCategory.Error,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_be_referenced_in_its_initializer:t(2372,e.DiagnosticCategory.Error,"Parameter_0_cannot_be_referenced_in_its_initializer_2372","Parameter '{0}' cannot be referenced in its initializer."),Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:t(2373,e.DiagnosticCategory.Error,"Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_string_index_signature:t(2374,e.DiagnosticCategory.Error,"Duplicate_string_index_signature_2374","Duplicate string index signature."),Duplicate_number_index_signature:t(2375,e.DiagnosticCategory.Error,"Duplicate_number_index_signature_2375","Duplicate number index signature."),A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:t(2376,e.DiagnosticCategory.Error,"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376","A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties."),Constructors_for_derived_classes_must_contain_a_super_call:t(2377,e.DiagnosticCategory.Error,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:t(2378,e.DiagnosticCategory.Error,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Getter_and_setter_accessors_do_not_agree_in_visibility:t(2379,e.DiagnosticCategory.Error,"Getter_and_setter_accessors_do_not_agree_in_visibility_2379","Getter and setter accessors do not agree in visibility."),get_and_set_accessor_must_have_the_same_type:t(2380,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_type_2380","'get' and 'set' accessor must have the same type."),A_signature_with_an_implementation_cannot_use_a_string_literal_type:t(2381,e.DiagnosticCategory.Error,"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381","A signature with an implementation cannot use a string literal type."),Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:t(2382,e.DiagnosticCategory.Error,"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382","Specialized overload signature is not assignable to any non-specialized signature."),Overload_signatures_must_all_be_exported_or_non_exported:t(2383,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:t(2384,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:t(2385,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:t(2386,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:t(2387,e.DiagnosticCategory.Error,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:t(2388,e.DiagnosticCategory.Error,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:t(2389,e.DiagnosticCategory.Error,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:t(2390,e.DiagnosticCategory.Error,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:t(2391,e.DiagnosticCategory.Error,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:t(2392,e.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:t(2393,e.DiagnosticCategory.Error,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:t(2394,e.DiagnosticCategory.Error,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:t(2395,e.DiagnosticCategory.Error,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:t(2396,e.DiagnosticCategory.Error,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:t(2397,e.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:t(2399,e.DiagnosticCategory.Error,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:t(2400,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:t(2401,e.DiagnosticCategory.Error,"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401","Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:t(2402,e.DiagnosticCategory.Error,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:t(2403,e.DiagnosticCategory.Error,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:t(2404,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:t(2405,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:t(2406,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:t(2407,e.DiagnosticCategory.Error,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:t(2408,e.DiagnosticCategory.Error,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:t(2409,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:t(2410,e.DiagnosticCategory.Error,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Property_0_of_type_1_is_not_assignable_to_string_index_type_2:t(2411,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411","Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:t(2412,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412","Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),Numeric_index_type_0_is_not_assignable_to_string_index_type_1:t(2413,e.DiagnosticCategory.Error,"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413","Numeric index type '{0}' is not assignable to string index type '{1}'."),Class_name_cannot_be_0:t(2414,e.DiagnosticCategory.Error,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:t(2415,e.DiagnosticCategory.Error,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:t(2416,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:t(2417,e.DiagnosticCategory.Error,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:t(2418,e.DiagnosticCategory.Error,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Class_0_incorrectly_implements_interface_1:t(2420,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2422,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2423,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:t(2425,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:t(2426,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:t(2427,e.DiagnosticCategory.Error,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:t(2428,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:t(2430,e.DiagnosticCategory.Error,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:t(2431,e.DiagnosticCategory.Error,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:t(2432,e.DiagnosticCategory.Error,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:t(2433,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:t(2434,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:t(2435,e.DiagnosticCategory.Error,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:t(2436,e.DiagnosticCategory.Error,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:t(2437,e.DiagnosticCategory.Error,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:t(2438,e.DiagnosticCategory.Error,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:t(2439,e.DiagnosticCategory.Error,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:t(2440,e.DiagnosticCategory.Error,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:t(2441,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:t(2442,e.DiagnosticCategory.Error,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:t(2443,e.DiagnosticCategory.Error,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:t(2444,e.DiagnosticCategory.Error,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:t(2445,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:t(2446,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:t(2447,e.DiagnosticCategory.Error,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:t(2448,e.DiagnosticCategory.Error,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:t(2449,e.DiagnosticCategory.Error,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:t(2450,e.DiagnosticCategory.Error,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:t(2451,e.DiagnosticCategory.Error,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:t(2452,e.DiagnosticCategory.Error,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:t(2453,e.DiagnosticCategory.Error,"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453","The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),Variable_0_is_used_before_being_assigned:t(2454,e.DiagnosticCategory.Error,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:t(2455,e.DiagnosticCategory.Error,"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455","Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),Type_alias_0_circularly_references_itself:t(2456,e.DiagnosticCategory.Error,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:t(2457,e.DiagnosticCategory.Error,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:t(2458,e.DiagnosticCategory.Error,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Type_0_is_not_an_array_type:t(2461,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:t(2462,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:t(2463,e.DiagnosticCategory.Error,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:t(2464,e.DiagnosticCategory.Error,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:t(2465,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:t(2466,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:t(2467,e.DiagnosticCategory.Error,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:t(2468,e.DiagnosticCategory.Error,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:t(2469,e.DiagnosticCategory.Error,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:t(2470,e.DiagnosticCategory.Error,"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470","'Symbol' reference does not refer to the global Symbol constructor object."),A_computed_property_name_of_the_form_0_must_be_of_type_symbol:t(2471,e.DiagnosticCategory.Error,"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471","A computed property name of the form '{0}' must be of type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:t(2472,e.DiagnosticCategory.Error,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:t(2473,e.DiagnosticCategory.Error,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values:t(2474,e.DiagnosticCategory.Error,"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474","const enum member initializers can only contain literal values and other computed enum values."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:t(2475,e.DiagnosticCategory.Error,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:t(2476,e.DiagnosticCategory.Error,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:t(2477,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:t(2478,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),Property_0_does_not_exist_on_const_enum_1:t(2479,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_const_enum_1_2479","Property '{0}' does not exist on 'const' enum '{1}'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:t(2480,e.DiagnosticCategory.Error,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:t(2481,e.DiagnosticCategory.Error,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:t(2483,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:t(2484,e.DiagnosticCategory.Error,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:t(2487,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2488,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:t(2489,e.DiagnosticCategory.Error,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:t(2490,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:t(2491,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:t(2492,e.DiagnosticCategory.Error,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:t(2493,e.DiagnosticCategory.Error,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:t(2494,e.DiagnosticCategory.Error,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:t(2495,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:t(2496,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496","The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:t(2497,e.DiagnosticCategory.Error,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:t(2498,e.DiagnosticCategory.Error,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2499,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2500,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:t(2501,e.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:t(2502,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:t(2503,e.DiagnosticCategory.Error,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:t(2504,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:t(2505,e.DiagnosticCategory.Error,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:t(2506,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:t(2507,e.DiagnosticCategory.Error,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:t(2508,e.DiagnosticCategory.Error,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2509,e.DiagnosticCategory.Error,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:t(2510,e.DiagnosticCategory.Error,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:t(2511,e.DiagnosticCategory.Error,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:t(2512,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:t(2513,e.DiagnosticCategory.Error,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),Classes_containing_abstract_methods_must_be_marked_abstract:t(2514,e.DiagnosticCategory.Error,"Classes_containing_abstract_methods_must_be_marked_abstract_2514","Classes containing abstract methods must be marked abstract."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:t(2515,e.DiagnosticCategory.Error,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:t(2516,e.DiagnosticCategory.Error,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:t(2517,e.DiagnosticCategory.Error,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:t(2518,e.DiagnosticCategory.Error,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:t(2519,e.DiagnosticCategory.Error,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:t(2520,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:t(2521,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521","Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method:t(2522,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522","The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:t(2523,e.DiagnosticCategory.Error,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:t(2524,e.DiagnosticCategory.Error,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:t(2525,e.DiagnosticCategory.Error,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:t(2526,e.DiagnosticCategory.Error,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:t(2527,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:t(2528,e.DiagnosticCategory.Error,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:t(2529,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:t(2530,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:t(2531,e.DiagnosticCategory.Error,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:t(2532,e.DiagnosticCategory.Error,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:t(2533,e.DiagnosticCategory.Error,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:t(2534,e.DiagnosticCategory.Error,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Enum_type_0_has_members_with_initializers_that_are_not_literals:t(2535,e.DiagnosticCategory.Error,"Enum_type_0_has_members_with_initializers_that_are_not_literals_2535","Enum type '{0}' has members with initializers that are not literals."),Type_0_cannot_be_used_to_index_type_1:t(2536,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:t(2537,e.DiagnosticCategory.Error,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:t(2538,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:t(2539,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:t(2540,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),The_target_of_an_assignment_must_be_a_variable_or_a_property_access:t(2541,e.DiagnosticCategory.Error,"The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541","The target of an assignment must be a variable or a property access."),Index_signature_in_type_0_only_permits_reading:t(2542,e.DiagnosticCategory.Error,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:t(2543,e.DiagnosticCategory.Error,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:t(2544,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:t(2545,e.DiagnosticCategory.Error,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1:t(2546,e.DiagnosticCategory.Error,"Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546","Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:t(2547,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2548,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2549,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:t(2551,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:t(2552,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:t(2553,e.DiagnosticCategory.Error,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:t(2554,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:t(2555,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),Expected_0_arguments_but_got_1_or_more:t(2556,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_or_more_2556","Expected {0} arguments, but got {1} or more."),Expected_at_least_0_arguments_but_got_1_or_more:t(2557,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_or_more_2557","Expected at least {0} arguments, but got {1} or more."),Expected_0_type_arguments_but_got_1:t(2558,e.DiagnosticCategory.Error,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:t(2559,e.DiagnosticCategory.Error,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:t(2560,e.DiagnosticCategory.Error,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:t(2561,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:t(2562,e.DiagnosticCategory.Error,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:t(2563,e.DiagnosticCategory.Error,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:t(2564,e.DiagnosticCategory.Error,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:t(2565,e.DiagnosticCategory.Error,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:t(2566,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:t(2567,e.DiagnosticCategory.Error,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2569,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569","Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Object_is_of_type_unknown:t(2571,e.DiagnosticCategory.Error,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Rest_signatures_are_incompatible:t(2572,e.DiagnosticCategory.Error,"Rest_signatures_are_incompatible_2572","Rest signatures are incompatible."),Property_0_is_incompatible_with_rest_element_type:t(2573,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_rest_element_type_2573","Property '{0}' is incompatible with rest element type."),A_rest_element_type_must_be_an_array_type:t(2574,e.DiagnosticCategory.Error,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:t(2575,e.DiagnosticCategory.Error,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_is_a_static_member_of_type_1:t(2576,e.DiagnosticCategory.Error,"Property_0_is_a_static_member_of_type_1_2576","Property '{0}' is a static member of type '{1}'"),Return_type_annotation_circularly_references_itself:t(2577,e.DiagnosticCategory.Error,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode:t(2580,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery:t(2581,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha:t(2582,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2583,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:t(2584,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2585,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Enum_type_0_circularly_references_itself:t(2586,e.DiagnosticCategory.Error,"Enum_type_0_circularly_references_itself_2586","Enum type '{0}' circularly references itself."),JSDoc_type_0_circularly_references_itself:t(2587,e.DiagnosticCategory.Error,"JSDoc_type_0_circularly_references_itself_2587","JSDoc type '{0}' circularly references itself."),Cannot_assign_to_0_because_it_is_a_constant:t(2588,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:t(2589,e.DiagnosticCategory.Error,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:t(2590,e.DiagnosticCategory.Error,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:t(2591,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:t(2592,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:t(2593,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig."),This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:t(2594,e.DiagnosticCategory.Error,"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594","This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."),JSX_element_attributes_type_0_may_not_be_a_union_type:t(2600,e.DiagnosticCategory.Error,"JSX_element_attributes_type_0_may_not_be_a_union_type_2600","JSX element attributes type '{0}' may not be a union type."),The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:t(2601,e.DiagnosticCategory.Error,"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601","The return type of a JSX element constructor must return an object type."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:t(2602,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:t(2603,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:t(2604,e.DiagnosticCategory.Error,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:t(2605,e.DiagnosticCategory.Error,"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605","JSX element type '{0}' is not a constructor function for JSX elements."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:t(2606,e.DiagnosticCategory.Error,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:t(2607,e.DiagnosticCategory.Error,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:t(2608,e.DiagnosticCategory.Error,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:t(2609,e.DiagnosticCategory.Error,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property:t(2610,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2611,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:t(2612,e.DiagnosticCategory.Error,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:t(2613,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:t(2614,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:t(2649,e.DiagnosticCategory.Error,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:t(2651,e.DiagnosticCategory.Error,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:t(2652,e.DiagnosticCategory.Error,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:t(2653,e.DiagnosticCategory.Error,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:t(2654,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654","Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:t(2656,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656","Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),JSX_expressions_must_have_one_parent_element:t(2657,e.DiagnosticCategory.Error,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:t(2658,e.DiagnosticCategory.Error,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:t(2659,e.DiagnosticCategory.Error,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:t(2660,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:t(2661,e.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:t(2662,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:t(2663,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:t(2664,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:t(2665,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:t(2666,e.DiagnosticCategory.Error,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:t(2667,e.DiagnosticCategory.Error,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:t(2668,e.DiagnosticCategory.Error,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:t(2669,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:t(2670,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:t(2671,e.DiagnosticCategory.Error,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:t(2672,e.DiagnosticCategory.Error,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:t(2673,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:t(2674,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:t(2675,e.DiagnosticCategory.Error,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:t(2676,e.DiagnosticCategory.Error,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:t(2677,e.DiagnosticCategory.Error,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:t(2678,e.DiagnosticCategory.Error,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:t(2679,e.DiagnosticCategory.Error,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:t(2680,e.DiagnosticCategory.Error,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:t(2681,e.DiagnosticCategory.Error,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),get_and_set_accessor_must_have_the_same_this_type:t(2682,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_this_type_2682","'get' and 'set' accessor must have the same 'this' type."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:t(2683,e.DiagnosticCategory.Error,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:t(2684,e.DiagnosticCategory.Error,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:t(2685,e.DiagnosticCategory.Error,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:t(2686,e.DiagnosticCategory.Error,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:t(2687,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:t(2688,e.DiagnosticCategory.Error,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:t(2689,e.DiagnosticCategory.Error,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead:t(2691,e.DiagnosticCategory.Error,"An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691","An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:t(2692,e.DiagnosticCategory.Error,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:t(2693,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:t(2694,e.DiagnosticCategory.Error,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:t(2695,e.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:t(2696,e.DiagnosticCategory.Error,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2697,e.DiagnosticCategory.Error,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),Spread_types_may_only_be_created_from_object_types:t(2698,e.DiagnosticCategory.Error,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:t(2699,e.DiagnosticCategory.Error,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:t(2700,e.DiagnosticCategory.Error,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:t(2701,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:t(2702,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:t(2703,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a delete operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:t(2704,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a delete operator cannot be a read-only property."),An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2705,e.DiagnosticCategory.Error,"An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705","An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Required_type_parameters_may_not_follow_optional_type_parameters:t(2706,e.DiagnosticCategory.Error,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:t(2707,e.DiagnosticCategory.Error,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:t(2708,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:t(2709,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:t(2710,e.DiagnosticCategory.Error,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2711,e.DiagnosticCategory.Error,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2712,e.DiagnosticCategory.Error,"A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712","A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:t(2713,e.DiagnosticCategory.Error,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:t(2714,e.DiagnosticCategory.Error,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:t(2715,e.DiagnosticCategory.Error,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:t(2716,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:t(2717,e.DiagnosticCategory.Error,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:t(2718,e.DiagnosticCategory.Error,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:t(2719,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:t(2720,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:t(2721,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:t(2722,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:t(2723,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),Module_0_has_no_exported_member_1_Did_you_mean_2:t(2724,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_2_2724","Module '{0}' has no exported member '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:t(2725,e.DiagnosticCategory.Error,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:t(2726,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:t(2727,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:t(2728,e.DiagnosticCategory.Message,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:t(2729,e.DiagnosticCategory.Error,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:t(2730,e.DiagnosticCategory.Error,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:t(2731,e.DiagnosticCategory.Error,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:t(2732,e.DiagnosticCategory.Error,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"),Property_0_was_also_declared_here:t(2733,e.DiagnosticCategory.Error,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),It_is_highly_likely_that_you_are_missing_a_semicolon:t(2734,e.DiagnosticCategory.Error,"It_is_highly_likely_that_you_are_missing_a_semicolon_2734","It is highly likely that you are missing a semicolon."),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:t(2735,e.DiagnosticCategory.Error,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:t(2736,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ESNext:t(2737,e.DiagnosticCategory.Error,"BigInt_literals_are_not_available_when_targeting_lower_than_ESNext_2737","BigInt literals are not available when targeting lower than ESNext."),An_outer_value_of_this_is_shadowed_by_this_container:t(2738,e.DiagnosticCategory.Message,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:t(2739,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:t(2740,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:t(2741,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:t(2742,e.DiagnosticCategory.Error,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:t(2743,e.DiagnosticCategory.Error,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:t(2744,e.DiagnosticCategory.Error,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:t(2745,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:t(2746,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:t(2747,e.DiagnosticCategory.Error,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided:t(2748,e.DiagnosticCategory.Error,"Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748","Cannot access ambient const enums when the '--isolatedModules' flag is provided."),_0_refers_to_a_value_but_is_being_used_as_a_type_here:t(2749,e.DiagnosticCategory.Error,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749","'{0}' refers to a value, but is being used as a type here."),The_implementation_signature_is_declared_here:t(2750,e.DiagnosticCategory.Error,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:t(2751,e.DiagnosticCategory.Error,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:t(2752,e.DiagnosticCategory.Error,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:t(2753,e.DiagnosticCategory.Error,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:t(2754,e.DiagnosticCategory.Error,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:t(2755,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:t(2756,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:t(2757,e.DiagnosticCategory.Error,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2758,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:t(2759,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:t(2760,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:t(2761,e.DiagnosticCategory.Error,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2762,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:t(2763,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:t(2764,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:t(2765,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:t(2766,e.DiagnosticCategory.Error,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:t(2767,e.DiagnosticCategory.Error,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:t(2768,e.DiagnosticCategory.Error,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:t(2769,e.DiagnosticCategory.Error,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:t(2770,e.DiagnosticCategory.Error,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:t(2771,e.DiagnosticCategory.Error,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:t(2772,e.DiagnosticCategory.Error,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:t(2773,e.DiagnosticCategory.Error,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead:t(2774,e.DiagnosticCategory.Error,"This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774","This condition will always return true since the function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:t(2775,e.DiagnosticCategory.Error,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:t(2776,e.DiagnosticCategory.Error,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:t(2777,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:t(2778,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:t(2779,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:t(2780,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:t(2781,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),Import_declaration_0_is_using_private_name_1:t(4e3,e.DiagnosticCategory.Error,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:t(4002,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:t(4004,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4006,e.DiagnosticCategory.Error,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4008,e.DiagnosticCategory.Error,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4010,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4012,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4014,e.DiagnosticCategory.Error,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4016,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4019,e.DiagnosticCategory.Error,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4020,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:t(4022,e.DiagnosticCategory.Error,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4023,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:t(4024,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:t(4025,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4026,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4027,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t(4028,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4029,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4030,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:t(4031,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4032,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:t(4033,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4034,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4035,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4036,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4037,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4038,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4039,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4040,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4041,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4042,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4043,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4044,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:t(4045,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4046,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:t(4047,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4048,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:t(4049,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4050,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4051,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t(4052,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4053,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4054,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t(4055,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4056,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:t(4057,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4058,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:t(4059,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:t(4060,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4061,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4062,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:t(4063,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4064,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4065,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4066,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4067,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4068,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4069,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4070,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4071,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4072,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4073,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4074,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4075,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4076,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:t(4077,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4078,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:t(4081,e.DiagnosticCategory.Error,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:t(4082,e.DiagnosticCategory.Error,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:t(4083,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict:t(4090,e.DiagnosticCategory.Error,"Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090","Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4091,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:t(4092,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:t(4094,e.DiagnosticCategory.Error,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4095,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4096,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t(4097,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4098,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4099,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:t(4100,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4101,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:t(4102,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:t(4103,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:t(4104,e.DiagnosticCategory.Error,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:t(4105,e.DiagnosticCategory.Error,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:t(4106,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:t(4107,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4108,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:t(4109,e.DiagnosticCategory.Error,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:t(4110,e.DiagnosticCategory.Error,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),The_current_host_does_not_support_the_0_option:t(5001,e.DiagnosticCategory.Error,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:t(5009,e.DiagnosticCategory.Error,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5010,e.DiagnosticCategory.Error,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:t(5012,e.DiagnosticCategory.Error,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:t(5014,e.DiagnosticCategory.Error,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:t(5023,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:t(5024,e.DiagnosticCategory.Error,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Could_not_write_file_0_Colon_1:t(5033,e.DiagnosticCategory.Error,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:t(5042,e.DiagnosticCategory.Error,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:t(5047,e.DiagnosticCategory.Error,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_cannot_be_specified_when_option_target_is_ES3:t(5048,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_when_option_target_is_ES3_5048","Option '{0}' cannot be specified when option 'target' is 'ES3'."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:t(5051,e.DiagnosticCategory.Error,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:t(5052,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:t(5053,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:t(5054,e.DiagnosticCategory.Error,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:t(5055,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:t(5056,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:t(5057,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:t(5058,e.DiagnosticCategory.Error,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:t(5059,e.DiagnosticCategory.Error,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Option_paths_cannot_be_used_without_specifying_baseUrl_option:t(5060,e.DiagnosticCategory.Error,"Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060","Option 'paths' cannot be used without specifying '--baseUrl' option."),Pattern_0_can_have_at_most_one_Asterisk_character:t(5061,e.DiagnosticCategory.Error,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character:t(5062,e.DiagnosticCategory.Error,"Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' in can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:t(5063,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:t(5064,e.DiagnosticCategory.Error,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5065,e.DiagnosticCategory.Error,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:t(5066,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:t(5067,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:t(5068,e.DiagnosticCategory.Error,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:t(5069,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy:t(5070,e.DiagnosticCategory.Error,"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070","Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:t(5071,e.DiagnosticCategory.Error,"Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071","Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),Unknown_build_option_0:t(5072,e.DiagnosticCategory.Error,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:t(5073,e.DiagnosticCategory.Error,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:t(5074,e.DiagnosticCategory.Error,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:t(5075,e.DiagnosticCategory.Error,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:t(5076,e.DiagnosticCategory.Error,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:t(6e3,e.DiagnosticCategory.Message,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:t(6001,e.DiagnosticCategory.Message,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:t(6002,e.DiagnosticCategory.Message,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:t(6003,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:t(6004,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:t(6005,e.DiagnosticCategory.Message,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:t(6006,e.DiagnosticCategory.Message,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:t(6007,e.DiagnosticCategory.Message,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:t(6008,e.DiagnosticCategory.Message,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:t(6009,e.DiagnosticCategory.Message,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:t(6010,e.DiagnosticCategory.Message,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:t(6011,e.DiagnosticCategory.Message,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:t(6012,e.DiagnosticCategory.Message,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:t(6013,e.DiagnosticCategory.Message,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:t(6014,e.DiagnosticCategory.Message,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT:t(6015,e.DiagnosticCategory.Message,"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT_6015","Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'."),Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext:t(6016,e.DiagnosticCategory.Message,"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016","Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'."),Print_this_message:t(6017,e.DiagnosticCategory.Message,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:t(6019,e.DiagnosticCategory.Message,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:t(6020,e.DiagnosticCategory.Message,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:t(6023,e.DiagnosticCategory.Message,"Syntax_Colon_0_6023","Syntax: {0}"),options:t(6024,e.DiagnosticCategory.Message,"options_6024","options"),file:t(6025,e.DiagnosticCategory.Message,"file_6025","file"),Examples_Colon_0:t(6026,e.DiagnosticCategory.Message,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:t(6027,e.DiagnosticCategory.Message,"Options_Colon_6027","Options:"),Version_0:t(6029,e.DiagnosticCategory.Message,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:t(6030,e.DiagnosticCategory.Message,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:t(6031,e.DiagnosticCategory.Message,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:t(6032,e.DiagnosticCategory.Message,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:t(6034,e.DiagnosticCategory.Message,"KIND_6034","KIND"),FILE:t(6035,e.DiagnosticCategory.Message,"FILE_6035","FILE"),VERSION:t(6036,e.DiagnosticCategory.Message,"VERSION_6036","VERSION"),LOCATION:t(6037,e.DiagnosticCategory.Message,"LOCATION_6037","LOCATION"),DIRECTORY:t(6038,e.DiagnosticCategory.Message,"DIRECTORY_6038","DIRECTORY"),STRATEGY:t(6039,e.DiagnosticCategory.Message,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:t(6040,e.DiagnosticCategory.Message,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Generates_corresponding_map_file:t(6043,e.DiagnosticCategory.Message,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:t(6044,e.DiagnosticCategory.Error,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:t(6045,e.DiagnosticCategory.Error,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:t(6046,e.DiagnosticCategory.Error,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:t(6048,e.DiagnosticCategory.Error,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."),Unsupported_locale_0:t(6049,e.DiagnosticCategory.Error,"Unsupported_locale_0_6049","Unsupported locale '{0}'."),Unable_to_open_file_0:t(6050,e.DiagnosticCategory.Error,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:t(6051,e.DiagnosticCategory.Error,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:t(6052,e.DiagnosticCategory.Message,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:t(6053,e.DiagnosticCategory.Error,"File_0_not_found_6053","File '{0}' not found."),File_0_has_unsupported_extension_The_only_supported_extensions_are_1:t(6054,e.DiagnosticCategory.Error,"File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:t(6055,e.DiagnosticCategory.Message,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:t(6056,e.DiagnosticCategory.Message,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:t(6058,e.DiagnosticCategory.Message,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:t(6059,e.DiagnosticCategory.Error,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:t(6060,e.DiagnosticCategory.Message,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:t(6061,e.DiagnosticCategory.Message,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file:t(6064,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_6064","Option '{0}' can only be specified in 'tsconfig.json' file."),Enables_experimental_support_for_ES7_decorators:t(6065,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:t(6066,e.DiagnosticCategory.Message,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Enables_experimental_support_for_ES7_async_functions:t(6068,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_async_functions_6068","Enables experimental support for ES7 async functions."),Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:t(6069,e.DiagnosticCategory.Message,"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069","Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:t(6070,e.DiagnosticCategory.Message,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:t(6071,e.DiagnosticCategory.Message,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:t(6072,e.DiagnosticCategory.Message,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:t(6073,e.DiagnosticCategory.Message,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:t(6074,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:t(6075,e.DiagnosticCategory.Message,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:t(6076,e.DiagnosticCategory.Message,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:t(6077,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:t(6078,e.DiagnosticCategory.Message,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:t(6079,e.DiagnosticCategory.Message,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation_Colon_preserve_react_native_or_react:t(6080,e.DiagnosticCategory.Message,"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080","Specify JSX code generation: 'preserve', 'react-native', or 'react'."),File_0_has_an_unsupported_extension_so_skipping_it:t(6081,e.DiagnosticCategory.Message,"File_0_has_an_unsupported_extension_so_skipping_it_6081","File '{0}' has an unsupported extension, so skipping it."),Only_amd_and_system_modules_are_supported_alongside_0:t(6082,e.DiagnosticCategory.Error,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:t(6083,e.DiagnosticCategory.Message,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:t(6084,e.DiagnosticCategory.Message,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:t(6085,e.DiagnosticCategory.Message,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:t(6086,e.DiagnosticCategory.Message,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:t(6087,e.DiagnosticCategory.Message,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:t(6088,e.DiagnosticCategory.Message,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:t(6089,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:t(6090,e.DiagnosticCategory.Message,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:t(6091,e.DiagnosticCategory.Message,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:t(6092,e.DiagnosticCategory.Message,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:t(6093,e.DiagnosticCategory.Message,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:t(6094,e.DiagnosticCategory.Message,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1:t(6095,e.DiagnosticCategory.Message,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095","Loading module as file / folder, candidate module location '{0}', target file type '{1}'."),File_0_does_not_exist:t(6096,e.DiagnosticCategory.Message,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exist_use_it_as_a_name_resolution_result:t(6097,e.DiagnosticCategory.Message,"File_0_exist_use_it_as_a_name_resolution_result_6097","File '{0}' exist - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_type_1:t(6098,e.DiagnosticCategory.Message,"Loading_module_0_from_node_modules_folder_target_file_type_1_6098","Loading module '{0}' from 'node_modules' folder, target file type '{1}'."),Found_package_json_at_0:t(6099,e.DiagnosticCategory.Message,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:t(6100,e.DiagnosticCategory.Message,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:t(6101,e.DiagnosticCategory.Message,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:t(6102,e.DiagnosticCategory.Message,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Option_0_should_have_array_of_strings_as_a_value:t(6103,e.DiagnosticCategory.Error,"Option_0_should_have_array_of_strings_as_a_value_6103","Option '{0}' should have array of strings as a value."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:t(6104,e.DiagnosticCategory.Message,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:t(6105,e.DiagnosticCategory.Message,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:t(6106,e.DiagnosticCategory.Message,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:t(6107,e.DiagnosticCategory.Message,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:t(6108,e.DiagnosticCategory.Message,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:t(6109,e.DiagnosticCategory.Message,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:t(6110,e.DiagnosticCategory.Message,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:t(6111,e.DiagnosticCategory.Message,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:t(6112,e.DiagnosticCategory.Message,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:t(6113,e.DiagnosticCategory.Message,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:t(6114,e.DiagnosticCategory.Error,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:t(6115,e.DiagnosticCategory.Message,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:t(6116,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Resolving_using_primary_search_paths:t(6117,e.DiagnosticCategory.Message,"Resolving_using_primary_search_paths_6117","Resolving using primary search paths..."),Resolving_from_node_modules_folder:t(6118,e.DiagnosticCategory.Message,"Resolving_from_node_modules_folder_6118","Resolving from node_modules folder..."),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:t(6119,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:t(6120,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:t(6121,e.DiagnosticCategory.Message,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:t(6122,e.DiagnosticCategory.Message,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:t(6123,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:t(6124,e.DiagnosticCategory.Message,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:t(6125,e.DiagnosticCategory.Message,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:t(6126,e.DiagnosticCategory.Message,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:t(6127,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:t(6128,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:t(6130,e.DiagnosticCategory.Message,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:t(6131,e.DiagnosticCategory.Error,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:t(6132,e.DiagnosticCategory.Message,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:t(6133,e.DiagnosticCategory.Error,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:t(6134,e.DiagnosticCategory.Message,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:t(6135,e.DiagnosticCategory.Message,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:t(6136,e.DiagnosticCategory.Message,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:t(6137,e.DiagnosticCategory.Error,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:t(6138,e.DiagnosticCategory.Error,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:t(6139,e.DiagnosticCategory.Message,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:t(6140,e.DiagnosticCategory.Error,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:t(6141,e.DiagnosticCategory.Message,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:t(6142,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:t(6144,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:t(6145,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:t(6146,e.DiagnosticCategory.Message,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:t(6147,e.DiagnosticCategory.Message,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:t(6148,e.DiagnosticCategory.Message,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:t(6149,e.DiagnosticCategory.Message,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:t(6150,e.DiagnosticCategory.Message,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:t(6151,e.DiagnosticCategory.Message,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:t(6152,e.DiagnosticCategory.Message,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:t(6153,e.DiagnosticCategory.Message,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:t(6154,e.DiagnosticCategory.Message,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:t(6155,e.DiagnosticCategory.Message,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:t(6156,e.DiagnosticCategory.Message,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:t(6157,e.DiagnosticCategory.Message,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:t(6158,e.DiagnosticCategory.Message,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:t(6159,e.DiagnosticCategory.Message,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:t(6160,e.DiagnosticCategory.Message,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:t(6161,e.DiagnosticCategory.Message,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:t(6162,e.DiagnosticCategory.Message,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:t(6163,e.DiagnosticCategory.Message,"The_character_set_of_the_input_files_6163","The character set of the input files."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:t(6164,e.DiagnosticCategory.Message,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Do_not_truncate_error_messages:t(6165,e.DiagnosticCategory.Message,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:t(6166,e.DiagnosticCategory.Message,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:t(6167,e.DiagnosticCategory.Message,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:t(6168,e.DiagnosticCategory.Message,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:t(6169,e.DiagnosticCategory.Message,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:t(6170,e.DiagnosticCategory.Message,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:t(6171,e.DiagnosticCategory.Message,"Command_line_Options_6171","Command-line Options"),Basic_Options:t(6172,e.DiagnosticCategory.Message,"Basic_Options_6172","Basic Options"),Strict_Type_Checking_Options:t(6173,e.DiagnosticCategory.Message,"Strict_Type_Checking_Options_6173","Strict Type-Checking Options"),Module_Resolution_Options:t(6174,e.DiagnosticCategory.Message,"Module_Resolution_Options_6174","Module Resolution Options"),Source_Map_Options:t(6175,e.DiagnosticCategory.Message,"Source_Map_Options_6175","Source Map Options"),Additional_Checks:t(6176,e.DiagnosticCategory.Message,"Additional_Checks_6176","Additional Checks"),Experimental_Options:t(6177,e.DiagnosticCategory.Message,"Experimental_Options_6177","Experimental Options"),Advanced_Options:t(6178,e.DiagnosticCategory.Message,"Advanced_Options_6178","Advanced Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:t(6179,e.DiagnosticCategory.Message,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),Enable_all_strict_type_checking_options:t(6180,e.DiagnosticCategory.Message,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),List_of_language_service_plugins:t(6181,e.DiagnosticCategory.Message,"List_of_language_service_plugins_6181","List of language service plugins."),Scoped_package_detected_looking_in_0:t(6182,e.DiagnosticCategory.Message,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_to_file_1_from_old_program:t(6183,e.DiagnosticCategory.Message,"Reusing_resolution_of_module_0_to_file_1_from_old_program_6183","Reusing resolution of module '{0}' to file '{1}' from old program."),Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program:t(6184,e.DiagnosticCategory.Message,"Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184","Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),Disable_strict_checking_of_generic_signatures_in_function_types:t(6185,e.DiagnosticCategory.Message,"Disable_strict_checking_of_generic_signatures_in_function_types_6185","Disable strict checking of generic signatures in function types."),Enable_strict_checking_of_function_types:t(6186,e.DiagnosticCategory.Message,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:t(6187,e.DiagnosticCategory.Message,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:t(6188,e.DiagnosticCategory.Error,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:t(6189,e.DiagnosticCategory.Error,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:t(6191,e.DiagnosticCategory.Message,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:t(6192,e.DiagnosticCategory.Error,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:t(6193,e.DiagnosticCategory.Message,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:t(6194,e.DiagnosticCategory.Message,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:t(6195,e.DiagnosticCategory.Message,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:t(6196,e.DiagnosticCategory.Error,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:t(6197,e.DiagnosticCategory.Message,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:t(6198,e.DiagnosticCategory.Error,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:t(6199,e.DiagnosticCategory.Error,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:t(6200,e.DiagnosticCategory.Error,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:t(6201,e.DiagnosticCategory.Message,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:t(6202,e.DiagnosticCategory.Error,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:t(6203,e.DiagnosticCategory.Message,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:t(6204,e.DiagnosticCategory.Message,"and_here_6204","and here."),All_type_parameters_are_unused:t(6205,e.DiagnosticCategory.Error,"All_type_parameters_are_unused_6205","All type parameters are unused"),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:t(6206,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:t(6207,e.DiagnosticCategory.Message,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:t(6208,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:t(6209,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:t(6210,e.DiagnosticCategory.Message,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:t(6211,e.DiagnosticCategory.Message,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:t(6212,e.DiagnosticCategory.Message,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:t(6213,e.DiagnosticCategory.Message,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:t(6214,e.DiagnosticCategory.Message,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:t(6215,e.DiagnosticCategory.Message,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:t(6216,e.DiagnosticCategory.Message,"Found_1_error_6216","Found 1 error."),Found_0_errors:t(6217,e.DiagnosticCategory.Message,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:t(6218,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:t(6219,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:t(6220,e.DiagnosticCategory.Message,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:t(6221,e.DiagnosticCategory.Message,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:t(6222,e.DiagnosticCategory.Message,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:t(6223,e.DiagnosticCategory.Message,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Projects_to_reference:t(6300,e.DiagnosticCategory.Message,"Projects_to_reference_6300","Projects to reference"),Enable_project_compilation:t(6302,e.DiagnosticCategory.Message,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:t(6304,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:t(6305,e.DiagnosticCategory.Error,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:t(6306,e.DiagnosticCategory.Error,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:t(6307,e.DiagnosticCategory.Error,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Cannot_prepend_project_0_because_it_does_not_have_outFile_set:t(6308,e.DiagnosticCategory.Error,"Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308","Cannot prepend project '{0}' because it does not have 'outFile' set"),Output_file_0_from_project_1_does_not_exist:t(6309,e.DiagnosticCategory.Error,"Output_file_0_from_project_1_does_not_exist_6309","Output file '{0}' from project '{1}' does not exist"),Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2:t(6350,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350","Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2:t(6351,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:t(6352,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:t(6353,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:t(6354,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:t(6355,e.DiagnosticCategory.Message,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:t(6356,e.DiagnosticCategory.Message,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:t(6357,e.DiagnosticCategory.Message,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:t(6358,e.DiagnosticCategory.Message,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:t(6359,e.DiagnosticCategory.Message,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),delete_this_Project_0_is_up_to_date_because_it_was_previously_built:t(6360,e.DiagnosticCategory.Message,"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360","delete this - Project '{0}' is up to date because it was previously built"),Project_0_is_up_to_date:t(6361,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:t(6362,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:t(6363,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:t(6364,e.DiagnosticCategory.Message,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:t(6365,e.DiagnosticCategory.Message,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects"),Enable_verbose_logging:t(6366,e.DiagnosticCategory.Message,"Enable_verbose_logging_6366","Enable verbose logging"),Show_what_would_be_built_or_deleted_if_specified_with_clean:t(6367,e.DiagnosticCategory.Message,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Build_all_projects_including_those_that_appear_to_be_up_to_date:t(6368,e.DiagnosticCategory.Message,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368","Build all projects, including those that appear to be up to date"),Option_build_must_be_the_first_command_line_argument:t(6369,e.DiagnosticCategory.Error,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:t(6370,e.DiagnosticCategory.Error,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:t(6371,e.DiagnosticCategory.Message,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed:t(6372,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372","Project '{0}' is out of date because output of its dependency '{1}' has changed"),Updating_output_of_project_0:t(6373,e.DiagnosticCategory.Message,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:t(6374,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),A_non_dry_build_would_update_output_of_project_0:t(6375,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_output_of_project_0_6375","A non-dry build would update output of project '{0}'"),Cannot_update_output_of_project_0_because_there_was_error_reading_file_1:t(6376,e.DiagnosticCategory.Message,"Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376","Cannot update output of project '{0}' because there was error reading file '{1}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:t(6377,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Enable_incremental_compilation:t(6378,e.DiagnosticCategory.Message,"Enable_incremental_compilation_6378","Enable incremental compilation"),Composite_projects_may_not_disable_incremental_compilation:t(6379,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:t(6380,e.DiagnosticCategory.Message,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:t(6381,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:t(6382,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:t(6383,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:t(6500,e.DiagnosticCategory.Message,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:t(6501,e.DiagnosticCategory.Message,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:t(6502,e.DiagnosticCategory.Message,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:t(6503,e.DiagnosticCategory.Message,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),Variable_0_implicitly_has_an_1_type:t(7005,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:t(7006,e.DiagnosticCategory.Error,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:t(7008,e.DiagnosticCategory.Error,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:t(7009,e.DiagnosticCategory.Error,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:t(7010,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7011,e.DiagnosticCategory.Error,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7013,e.DiagnosticCategory.Error,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7014,e.DiagnosticCategory.Error,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:t(7015,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:t(7016,e.DiagnosticCategory.Error,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:t(7017,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:t(7018,e.DiagnosticCategory.Error,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:t(7019,e.DiagnosticCategory.Error,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7020,e.DiagnosticCategory.Error,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:t(7022,e.DiagnosticCategory.Error,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7023,e.DiagnosticCategory.Error,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7024,e.DiagnosticCategory.Error,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:t(7025,e.DiagnosticCategory.Error,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:t(7026,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:t(7027,e.DiagnosticCategory.Error,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:t(7028,e.DiagnosticCategory.Error,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:t(7029,e.DiagnosticCategory.Error,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:t(7030,e.DiagnosticCategory.Error,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:t(7031,e.DiagnosticCategory.Error,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:t(7032,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:t(7033,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:t(7034,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:t(7035,e.DiagnosticCategory.Error,"Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035","Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:t(7036,e.DiagnosticCategory.Error,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:t(7037,e.DiagnosticCategory.Message,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:t(7038,e.DiagnosticCategory.Message,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:t(7039,e.DiagnosticCategory.Error,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:t(7040,e.DiagnosticCategory.Error,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`"),The_containing_arrow_function_captures_the_global_value_of_this:t(7041,e.DiagnosticCategory.Error,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:t(7042,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7043,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7044,e.DiagnosticCategory.Suggestion,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7045,e.DiagnosticCategory.Suggestion,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:t(7046,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:t(7047,e.DiagnosticCategory.Suggestion,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:t(7048,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:t(7049,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:t(7050,e.DiagnosticCategory.Suggestion,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:t(7051,e.DiagnosticCategory.Error,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:t(7052,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}' ?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:t(7053,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:t(7054,e.DiagnosticCategory.Error,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:t(7055,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),You_cannot_rename_this_element:t(8e3,e.DiagnosticCategory.Error,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:t(8001,e.DiagnosticCategory.Error,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_a_ts_file:t(8002,e.DiagnosticCategory.Error,"import_can_only_be_used_in_a_ts_file_8002","'import ... =' can only be used in a .ts file."),export_can_only_be_used_in_a_ts_file:t(8003,e.DiagnosticCategory.Error,"export_can_only_be_used_in_a_ts_file_8003","'export=' can only be used in a .ts file."),type_parameter_declarations_can_only_be_used_in_a_ts_file:t(8004,e.DiagnosticCategory.Error,"type_parameter_declarations_can_only_be_used_in_a_ts_file_8004","'type parameter declarations' can only be used in a .ts file."),implements_clauses_can_only_be_used_in_a_ts_file:t(8005,e.DiagnosticCategory.Error,"implements_clauses_can_only_be_used_in_a_ts_file_8005","'implements clauses' can only be used in a .ts file."),interface_declarations_can_only_be_used_in_a_ts_file:t(8006,e.DiagnosticCategory.Error,"interface_declarations_can_only_be_used_in_a_ts_file_8006","'interface declarations' can only be used in a .ts file."),module_declarations_can_only_be_used_in_a_ts_file:t(8007,e.DiagnosticCategory.Error,"module_declarations_can_only_be_used_in_a_ts_file_8007","'module declarations' can only be used in a .ts file."),type_aliases_can_only_be_used_in_a_ts_file:t(8008,e.DiagnosticCategory.Error,"type_aliases_can_only_be_used_in_a_ts_file_8008","'type aliases' can only be used in a .ts file."),_0_can_only_be_used_in_a_ts_file:t(8009,e.DiagnosticCategory.Error,"_0_can_only_be_used_in_a_ts_file_8009","'{0}' can only be used in a .ts file."),types_can_only_be_used_in_a_ts_file:t(8010,e.DiagnosticCategory.Error,"types_can_only_be_used_in_a_ts_file_8010","'types' can only be used in a .ts file."),type_arguments_can_only_be_used_in_a_ts_file:t(8011,e.DiagnosticCategory.Error,"type_arguments_can_only_be_used_in_a_ts_file_8011","'type arguments' can only be used in a .ts file."),parameter_modifiers_can_only_be_used_in_a_ts_file:t(8012,e.DiagnosticCategory.Error,"parameter_modifiers_can_only_be_used_in_a_ts_file_8012","'parameter modifiers' can only be used in a .ts file."),non_null_assertions_can_only_be_used_in_a_ts_file:t(8013,e.DiagnosticCategory.Error,"non_null_assertions_can_only_be_used_in_a_ts_file_8013","'non-null assertions' can only be used in a .ts file."),enum_declarations_can_only_be_used_in_a_ts_file:t(8015,e.DiagnosticCategory.Error,"enum_declarations_can_only_be_used_in_a_ts_file_8015","'enum declarations' can only be used in a .ts file."),type_assertion_expressions_can_only_be_used_in_a_ts_file:t(8016,e.DiagnosticCategory.Error,"type_assertion_expressions_can_only_be_used_in_a_ts_file_8016","'type assertion expressions' can only be used in a .ts file."),Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:t(8017,e.DiagnosticCategory.Error,"Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017","Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0:t(8018,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018","Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),Report_errors_in_js_files:t(8019,e.DiagnosticCategory.Message,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:t(8020,e.DiagnosticCategory.Error,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:t(8021,e.DiagnosticCategory.Error,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:t(8022,e.DiagnosticCategory.Error,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:t(8023,e.DiagnosticCategory.Error,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:t(8024,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:t(8025,e.DiagnosticCategory.Error,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one `@augments` or `@extends` tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:t(8026,e.DiagnosticCategory.Error,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:t(8027,e.DiagnosticCategory.Error,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:t(8028,e.DiagnosticCategory.Error,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:t(8029,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:t(8030,e.DiagnosticCategory.Error,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:t(8031,e.DiagnosticCategory.Error,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:t(8032,e.DiagnosticCategory.Error,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause:t(9002,e.DiagnosticCategory.Error,"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002","Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),class_expressions_are_not_currently_supported:t(9003,e.DiagnosticCategory.Error,"class_expressions_are_not_currently_supported_9003","'class' expressions are not currently supported."),Language_service_is_disabled:t(9004,e.DiagnosticCategory.Error,"Language_service_is_disabled_9004","Language service is disabled."),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:t(9005,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:t(9006,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:t(17e3,e.DiagnosticCategory.Error,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:t(17001,e.DiagnosticCategory.Error,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:t(17002,e.DiagnosticCategory.Error,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),JSX_attribute_expected:t(17003,e.DiagnosticCategory.Error,"JSX_attribute_expected_17003","JSX attribute expected."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:t(17004,e.DiagnosticCategory.Error,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:t(17005,e.DiagnosticCategory.Error,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17006,e.DiagnosticCategory.Error,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17007,e.DiagnosticCategory.Error,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:t(17008,e.DiagnosticCategory.Error,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:t(17009,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:t(17010,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:t(17011,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:t(17012,e.DiagnosticCategory.Error,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:t(17013,e.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:t(17014,e.DiagnosticCategory.Error,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:t(17015,e.DiagnosticCategory.Error,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),JSX_fragment_is_not_supported_when_using_jsxFactory:t(17016,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_jsxFactory_17016","JSX fragment is not supported when using --jsxFactory"),JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma:t(17017,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017","JSX fragment is not supported when using an inline JSX factory pragma"),Circularity_detected_while_resolving_configuration_Colon_0:t(18e3,e.DiagnosticCategory.Error,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not:t(18001,e.DiagnosticCategory.Error,"A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001","A path in an 'extends' option must be relative or rooted, but '{0}' is not."),The_files_list_in_config_file_0_is_empty:t(18002,e.DiagnosticCategory.Error,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:t(18003,e.DiagnosticCategory.Error,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module:t(80001,e.DiagnosticCategory.Suggestion,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001","File is a CommonJS module; it may be converted to an ES6 module."),This_constructor_function_may_be_converted_to_a_class_declaration:t(80002,e.DiagnosticCategory.Suggestion,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:t(80003,e.DiagnosticCategory.Suggestion,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:t(80004,e.DiagnosticCategory.Suggestion,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:t(80005,e.DiagnosticCategory.Suggestion,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:t(80006,e.DiagnosticCategory.Suggestion,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:t(80007,e.DiagnosticCategory.Suggestion,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:t(80008,e.DiagnosticCategory.Suggestion,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),Add_missing_super_call:t(90001,e.DiagnosticCategory.Message,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:t(90002,e.DiagnosticCategory.Message,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:t(90003,e.DiagnosticCategory.Message,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_declaration_for_Colon_0:t(90004,e.DiagnosticCategory.Message,"Remove_declaration_for_Colon_0_90004","Remove declaration for: '{0}'"),Remove_import_from_0:t(90005,e.DiagnosticCategory.Message,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:t(90006,e.DiagnosticCategory.Message,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:t(90007,e.DiagnosticCategory.Message,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:t(90008,e.DiagnosticCategory.Message,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_destructuring:t(90009,e.DiagnosticCategory.Message,"Remove_destructuring_90009","Remove destructuring"),Remove_variable_statement:t(90010,e.DiagnosticCategory.Message,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:t(90011,e.DiagnosticCategory.Message,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:t(90012,e.DiagnosticCategory.Message,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_module_1:t(90013,e.DiagnosticCategory.Message,"Import_0_from_module_1_90013","Import '{0}' from module \"{1}\""),Change_0_to_1:t(90014,e.DiagnosticCategory.Message,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Add_0_to_existing_import_declaration_from_1:t(90015,e.DiagnosticCategory.Message,"Add_0_to_existing_import_declaration_from_1_90015","Add '{0}' to existing import declaration from \"{1}\""),Declare_property_0:t(90016,e.DiagnosticCategory.Message,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:t(90017,e.DiagnosticCategory.Message,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:t(90018,e.DiagnosticCategory.Message,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:t(90019,e.DiagnosticCategory.Message,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:t(90020,e.DiagnosticCategory.Message,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:t(90021,e.DiagnosticCategory.Message,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:t(90022,e.DiagnosticCategory.Message,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:t(90023,e.DiagnosticCategory.Message,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:t(90024,e.DiagnosticCategory.Message,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:t(90025,e.DiagnosticCategory.Message,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:t(90026,e.DiagnosticCategory.Message,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:t(90027,e.DiagnosticCategory.Message,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:t(90028,e.DiagnosticCategory.Message,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:t(90029,e.DiagnosticCategory.Message,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:t(90030,e.DiagnosticCategory.Message,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:t(90031,e.DiagnosticCategory.Message,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Import_default_0_from_module_1:t(90032,e.DiagnosticCategory.Message,"Import_default_0_from_module_1_90032","Import default '{0}' from module \"{1}\""),Add_default_import_0_to_existing_import_declaration_from_1:t(90033,e.DiagnosticCategory.Message,"Add_default_import_0_to_existing_import_declaration_from_1_90033","Add default import '{0}' to existing import declaration from \"{1}\""),Add_parameter_name:t(90034,e.DiagnosticCategory.Message,"Add_parameter_name_90034","Add parameter name"),Convert_function_to_an_ES2015_class:t(95001,e.DiagnosticCategory.Message,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_function_0_to_class:t(95002,e.DiagnosticCategory.Message,"Convert_function_0_to_class_95002","Convert function '{0}' to class"),Extract_to_0_in_1:t(95004,e.DiagnosticCategory.Message,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:t(95005,e.DiagnosticCategory.Message,"Extract_function_95005","Extract function"),Extract_constant:t(95006,e.DiagnosticCategory.Message,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:t(95007,e.DiagnosticCategory.Message,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:t(95008,e.DiagnosticCategory.Message,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:t(95009,e.DiagnosticCategory.Message,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Annotate_with_types_from_JSDoc:t(95010,e.DiagnosticCategory.Message,"Annotate_with_types_from_JSDoc_95010","Annotate with types from JSDoc"),Infer_type_of_0_from_usage:t(95011,e.DiagnosticCategory.Message,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:t(95012,e.DiagnosticCategory.Message,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:t(95013,e.DiagnosticCategory.Message,"Convert_to_default_import_95013","Convert to default import"),Install_0:t(95014,e.DiagnosticCategory.Message,"Install_0_95014","Install '{0}'"),Replace_import_with_0:t(95015,e.DiagnosticCategory.Message,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:t(95016,e.DiagnosticCategory.Message,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES6_module:t(95017,e.DiagnosticCategory.Message,"Convert_to_ES6_module_95017","Convert to ES6 module"),Add_undefined_type_to_property_0:t(95018,e.DiagnosticCategory.Message,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:t(95019,e.DiagnosticCategory.Message,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:t(95020,e.DiagnosticCategory.Message,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Add_all_missing_members:t(95022,e.DiagnosticCategory.Message,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:t(95023,e.DiagnosticCategory.Message,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:t(95024,e.DiagnosticCategory.Message,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:t(95025,e.DiagnosticCategory.Message,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:t(95026,e.DiagnosticCategory.Message,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:t(95027,e.DiagnosticCategory.Message,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:t(95028,e.DiagnosticCategory.Message,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:t(95029,e.DiagnosticCategory.Message,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:t(95030,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:t(95031,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:t(95032,e.DiagnosticCategory.Message,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:t(95033,e.DiagnosticCategory.Message,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:t(95034,e.DiagnosticCategory.Message,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:t(95035,e.DiagnosticCategory.Message,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:t(95036,e.DiagnosticCategory.Message,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:t(95037,e.DiagnosticCategory.Message,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:t(95038,e.DiagnosticCategory.Message,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:t(95039,e.DiagnosticCategory.Message,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:t(95040,e.DiagnosticCategory.Message,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:t(95041,e.DiagnosticCategory.Message,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:t(95042,e.DiagnosticCategory.Message,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:t(95043,e.DiagnosticCategory.Message,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:t(95044,e.DiagnosticCategory.Message,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:t(95045,e.DiagnosticCategory.Message,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:t(95046,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:t(95047,e.DiagnosticCategory.Message,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:t(95048,e.DiagnosticCategory.Message,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:t(95049,e.DiagnosticCategory.Message,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:t(95050,e.DiagnosticCategory.Message,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:t(95051,e.DiagnosticCategory.Message,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:t(95052,e.DiagnosticCategory.Message,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:t(95053,e.DiagnosticCategory.Message,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:t(95054,e.DiagnosticCategory.Message,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:t(95055,e.DiagnosticCategory.Message,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:t(95056,e.DiagnosticCategory.Message,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:t(95057,e.DiagnosticCategory.Message,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:t(95058,e.DiagnosticCategory.Message,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:t(95059,e.DiagnosticCategory.Message,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:t(95060,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:t(95061,e.DiagnosticCategory.Message,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:t(95062,e.DiagnosticCategory.Message,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:t(95063,e.DiagnosticCategory.Message,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:t(95064,e.DiagnosticCategory.Message,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:t(95065,e.DiagnosticCategory.Message,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:t(95066,e.DiagnosticCategory.Message,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_unknown_conversion_for_non_overlapping_types:t(95069,e.DiagnosticCategory.Message,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:t(95070,e.DiagnosticCategory.Message,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:t(95071,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:t(95072,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:t(95073,e.DiagnosticCategory.Message,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:t(95074,e.DiagnosticCategory.Message,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:t(95075,e.DiagnosticCategory.Message,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Allow_accessing_UMD_globals_from_modules:t(95076,e.DiagnosticCategory.Message,"Allow_accessing_UMD_globals_from_modules_95076","Allow accessing UMD globals from modules."),Extract_type:t(95077,e.DiagnosticCategory.Message,"Extract_type_95077","Extract type"),Extract_to_type_alias:t(95078,e.DiagnosticCategory.Message,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:t(95079,e.DiagnosticCategory.Message,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:t(95080,e.DiagnosticCategory.Message,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:t(95081,e.DiagnosticCategory.Message,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:t(95082,e.DiagnosticCategory.Message,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:t(95083,e.DiagnosticCategory.Message,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:t(95084,e.DiagnosticCategory.Message,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:t(95085,e.DiagnosticCategory.Message,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:t(95086,e.DiagnosticCategory.Message,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:t(95087,e.DiagnosticCategory.Message,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:t(95088,e.DiagnosticCategory.Message,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:t(95089,e.DiagnosticCategory.Message,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:t(95090,e.DiagnosticCategory.Message,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:t(95091,e.DiagnosticCategory.Message,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:t(95092,e.DiagnosticCategory.Message,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:t(95093,e.DiagnosticCategory.Message,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:t(95094,e.DiagnosticCategory.Message,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:t(95095,e.DiagnosticCategory.Message,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:t(18004,e.DiagnosticCategory.Error,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:t(18006,e.DiagnosticCategory.Error,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:t(18007,e.DiagnosticCategory.Error,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?")}}(s||(s={})),function(e){var t;function n(e){return e>=75}e.tokenIsIdentifierOrKeyword=n,e.tokenIsIdentifierOrKeywordOrGreaterThan=function(e){return 31===e||n(e)};var i=((t={abstract:121,any:124,as:122,asserts:123,bigint:150,boolean:127,break:76,case:77,catch:78,class:79,continue:81,const:80}).constructor=128,t.debugger=82,t.declare=129,t.default=83,t.delete=84,t.do=85,t.else=86,t.enum=87,t.export=88,t.extends=89,t.false=90,t.finally=91,t.for=92,t.from=148,t.function=93,t.get=130,t.if=94,t.implements=112,t.import=95,t.in=96,t.infer=131,t.instanceof=97,t.interface=113,t.is=132,t.keyof=133,t.let=114,t.module=134,t.namespace=135,t.never=136,t.new=98,t.null=99,t.number=139,t.object=140,t.package=115,t.private=116,t.protected=117,t.public=118,t.readonly=137,t.require=138,t.global=149,t.return=100,t.set=141,t.static=119,t.string=142,t.super=101,t.switch=102,t.symbol=143,t.this=103,t.throw=104,t.true=105,t.try=106,t.type=144,t.typeof=107,t.undefined=145,t.unique=146,t.unknown=147,t.var=108,t.void=109,t.while=110,t.with=111,t.yield=120,t.async=125,t.await=126,t.of=151,t),a=e.createMapFromTemplate(i),o=e.createMapFromTemplate(r(r({},i),{"{":18,"}":19,"(":20,")":21,"[":22,"]":23,".":24,"...":25,";":26,",":27,"<":29,">":31,"<=":32,">=":33,"==":34,"!=":35,"===":36,"!==":37,"=>":38,"+":39,"-":40,"**":42,"*":41,"/":43,"%":44,"++":45,"--":46,"<<":47,"</":30,">>":48,">>>":49,"&":50,"|":51,"^":52,"!":53,"~":54,"&&":55,"||":56,"?":57,"??":60,"?.":28,":":58,"=":62,"+=":63,"-=":64,"*=":65,"**=":66,"/=":67,"%=":68,"<<=":69,">>=":70,">>>=":71,"&=":72,"|=":73,"^=":74,"@":59,"`":61})),s=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],c=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],u=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],l=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],_=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2208,2228,2230,2237,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42943,42946,42950,42999,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69376,69404,69415,69415,69424,69445,69600,69622,69635,69687,69763,69807,69840,69864,69891,69926,69956,69956,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70751,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71680,71723,71840,71903,71935,71935,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72384,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,123136,123180,123191,123197,123214,123214,123584,123627,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101],d=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2208,2228,2230,2237,2259,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3162,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3328,3331,3333,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7673,7675,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42943,42946,42950,42999,43047,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69376,69404,69415,69415,69424,69456,69600,69622,69632,69702,69734,69743,69759,69818,69840,69864,69872,69881,69888,69940,69942,69951,69956,69958,69968,70003,70006,70006,70016,70084,70089,70092,70096,70106,70108,70108,70144,70161,70163,70199,70206,70206,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70751,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71680,71738,71840,71913,71935,71935,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72384,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92768,92777,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,123136,123180,123184,123197,123200,123209,123214,123214,123584,123641,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101,917760,917999];function p(e,t){if(e<t[0])return!1;for(var r,n=0,i=t.length;n+1<i;){if(r=n+(i-n)/2,t[r-=r%2]<=e&&e<=t[r+1])return!0;e<t[r]?i=r:n=r+2}return!1}function f(e,t){return p(e,t>=2?_:1===t?u:s)}e.isUnicodeIdentifierStart=f;var m,g=(m=[],o.forEach((function(e,t){m[e]=t})),m);function y(e){for(var t=new Array,r=0,n=0;r<e.length;){var i=e.charCodeAt(r);switch(r++,i){case 13:10===e.charCodeAt(r)&&r++;case 10:t.push(n),n=r;break;default:i>127&&S(i)&&(t.push(n),n=r)}}return t.push(n),t}function h(t,r,n,i,a){(r<0||r>=t.length)&&(a?r=r<0?0:r>=t.length?t.length-1:r:e.Debug.fail("Bad line number. Line: "+r+", lineStarts.length: "+t.length+" , line map is correct? "+(void 0!==i?e.arraysEqual(t,y(i)):"unknown")));var o=t[r]+n;return a?o>t[r+1]?t[r+1]:"string"==typeof i&&o>i.length?i.length:o:(r<t.length-1?e.Debug.assert(o<t[r+1]):void 0!==i&&e.Debug.assert(o<=i.length),o)}function v(e){return e.lineMap||(e.lineMap=y(e.text))}function b(t,r){var n=e.binarySearch(t,r,e.identity,e.compareValues);return n<0&&(n=~n-1,e.Debug.assert(-1!==n,"position cannot precede the beginning of the file")),{line:n,character:r-t[n]}}function x(e){return D(e)||S(e)}function D(e){return 32===e||9===e||11===e||12===e||160===e||133===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function S(e){return 10===e||13===e||8232===e||8233===e}function T(e){return e>=48&&e<=57}function E(e){return e>=48&&e<=55}e.tokenToString=function(e){return g[e]},e.stringToToken=function(e){return o.get(e)},e.computeLineStarts=y,e.getPositionOfLineAndCharacter=function(e,t,r,n){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,r,n):h(v(e),t,r,e.text,n)},e.computePositionOfLineAndCharacter=h,e.getLineStarts=v,e.computeLineAndCharacterOfPosition=b,e.getLineAndCharacterOfPosition=function(e,t){return b(v(e),t)},e.isWhiteSpaceLike=x,e.isWhiteSpaceSingleLine=D,e.isLineBreak=S,e.isOctalDigit=E,e.couldStartTrivia=function(e,t){var r=e.charCodeAt(t);switch(r){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return r>127}},e.skipTrivia=function(t,r,n,i){if(void 0===i&&(i=!1),e.positionIsSynthesized(r))return r;for(;;){var a=t.charCodeAt(r);switch(a){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)return r;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(i)break;if(47===t.charCodeAt(r+1)){for(r+=2;r<t.length&&!S(t.charCodeAt(r));)r++;continue}if(42===t.charCodeAt(r+1)){for(r+=2;r<t.length;){if(42===t.charCodeAt(r)&&47===t.charCodeAt(r+1)){r+=2;break}r++}continue}break;case 60:case 124:case 61:case 62:if(k(t,r)){r=N(t,r);continue}break;case 35:if(0===r&&F(t,r)){r=P(t,r);continue}break;default:if(a>127&&x(a)){r++;continue}}return r}};var C="<<<<<<<".length;function k(t,r){if(e.Debug.assert(r>=0),0===r||S(t.charCodeAt(r-1))){var n=t.charCodeAt(r);if(r+C<t.length){for(var i=0;i<C;i++)if(t.charCodeAt(r+i)!==n)return!1;return 61===n||32===t.charCodeAt(r+C)}}return!1}function N(t,r,n){n&&n(e.Diagnostics.Merge_conflict_marker_encountered,r,C);var i=t.charCodeAt(r),a=t.length;if(60===i||62===i)for(;r<a&&!S(t.charCodeAt(r));)r++;else for(e.Debug.assert(124===i||61===i);r<a;){var o=t.charCodeAt(r);if((61===o||62===o)&&o!==i&&k(t,r))break;r++}return r}var A=/^#!.*/;function F(t,r){return e.Debug.assert(0===r),A.test(t)}function P(e,t){return t+=A.exec(e)[0].length}function w(e,t,r,n,i,a,o){var s,c,u,l,_=!1,d=n,p=o;if(0===r){d=!0;var f=L(t);f&&(r=f.length)}e:for(;r>=0&&r<t.length;){var m=t.charCodeAt(r);switch(m){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)break e;d=!0,_&&(l=!0);continue;case 9:case 11:case 12:case 32:r++;continue;case 47:var g=t.charCodeAt(r+1),y=!1;if(47===g||42===g){var h=47===g?2:3,v=r;if(r+=2,47===g)for(;r<t.length;){if(S(t.charCodeAt(r))){y=!0;break}r++}else for(;r<t.length;){if(42===t.charCodeAt(r)&&47===t.charCodeAt(r+1)){r+=2;break}r++}if(d){if(_&&(p=i(s,c,u,l,a,p),!e&&p))return p;s=v,c=r,u=h,l=y,_=!0}continue}break e;default:if(m>127&&x(m)){_&&S(m)&&(l=!0),r++;continue}break e}}return _&&(p=i(s,c,u,l,a,p)),p}function I(e,t,r,n,i){return w(!0,e,t,!1,r,n,i)}function O(e,t,r,n,i){return w(!0,e,t,!0,r,n,i)}function M(e,t,r,n,i,a){return a||(a=[]),a.push({kind:r,pos:e,end:t,hasTrailingNewLine:n}),a}function L(e){var t=A.exec(e);if(t)return t[0]}function R(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&f(e,t)}function B(e,t){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||e>127&&function(e,t){return p(e,t>=2?d:1===t?l:c)}(e,t)}e.isShebangTrivia=F,e.scanShebangTrivia=P,e.forEachLeadingCommentRange=function(e,t,r,n){return w(!1,e,t,!1,r,n)},e.forEachTrailingCommentRange=function(e,t,r,n){return w(!1,e,t,!0,r,n)},e.reduceEachLeadingCommentRange=I,e.reduceEachTrailingCommentRange=O,e.getLeadingCommentRanges=function(e,t){return I(e,t,M,void 0,void 0)},e.getTrailingCommentRanges=function(e,t){return O(e,t,M,void 0,void 0)},e.getShebang=L,e.isIdentifierStart=R,e.isIdentifierPart=B,e.isIdentifierText=function(e,t){var r=j(e,0);if(!R(r,t))return!1;for(var n=K(r);n<e.length;n+=K(r))if(!B(r=j(e,n),t))return!1;return!0},e.createScanner=function(t,r,i,o,s,c,u){void 0===i&&(i=0);var l,_,d,p,f,m,g,y=o,h=0;re(y,c,u);var v={getStartPos:function(){return d},getTextPos:function(){return l},getToken:function(){return f},getTokenPos:function(){return p},getTokenText:function(){return y.substring(p,l)},getTokenValue:function(){return m},hasUnicodeEscape:function(){return 0!=(1024&g)},hasExtendedUnicodeEscape:function(){return 0!=(8&g)},hasPrecedingLineBreak:function(){return 0!=(1&g)},isIdentifier:function(){return 75===f||f>111},isReservedWord:function(){return f>=76&&f<=111},isUnterminated:function(){return 0!=(4&g)},getTokenFlags:function(){return g},reScanGreaterToken:function(){if(31===f){if(62===y.charCodeAt(l))return 62===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=71):(l+=2,f=49):61===y.charCodeAt(l+1)?(l+=2,f=70):(l++,f=48);if(61===y.charCodeAt(l))return l++,f=33}return f},reScanSlashToken:function(){if(43===f||67===f){for(var r=p+1,n=!1,i=!1;;){if(r>=_){g|=4,b(e.Diagnostics.Unterminated_regular_expression_literal);break}var a=y.charCodeAt(r);if(S(a)){g|=4,b(e.Diagnostics.Unterminated_regular_expression_literal);break}if(n)n=!1;else{if(47===a&&!i){r++;break}91===a?i=!0:92===a?n=!0:93===a&&(i=!1)}r++}for(;r<_&&B(y.charCodeAt(r),t);)r++;l=r,m=y.substring(p,l),f=13}return f},reScanTemplateToken:function(){return e.Debug.assert(19===f,"'reScanTemplateToken' should only be called on a '}'"),l=p,f=z()},scanJsxIdentifier:function(){if(n(f))for(;l<_;){if(45!==y.charCodeAt(l)){var e=l;if(m+=Y(),l===e)break}else m+="-",l++}return f},scanJsxAttributeValue:function(){switch(d=l,y.charCodeAt(l)){case 34:case 39:return m=J(!0),f=10;default:return Z()}},reScanJsxToken:function(){return l=p=d,f=ee()},reScanLessThanToken:function(){if(47===f)return l=p+1,f=29;return f},reScanQuestionToken:function(){return e.Debug.assert(60===f,"'reScanQuestionToken' should only be called on a '??'"),l=p+1,f=57},scanJsxToken:ee,scanJsDocToken:function(){if(d=p=l,g=0,l>=_)return f=1;var e=j(y,l);switch(l+=K(e),e){case 9:case 11:case 12:case 32:for(;l<_&&D(y.charCodeAt(l));)l++;return f=5;case 64:return f=59;case 10:case 13:return g|=1,f=4;case 42:return f=41;case 123:return f=18;case 125:return f=19;case 91:return f=22;case 93:return f=23;case 60:return f=29;case 62:return f=31;case 61:return f=62;case 44:return f=27;case 46:return f=24;case 96:return f=61;case 92:l--;var r=H();if(r>=0&&R(r,t))return l+=3,g|=8,m=q()+Y(),f=X();var n=G();return n>=0&&R(n,t)?(l+=6,g|=1024,m=String.fromCharCode(n)+Y(),f=X()):(l++,f=0)}if(R(e,t)){for(var i=e;l<_&&B(i=j(y,l),t)||45===y.charCodeAt(l);)l+=K(i);return m=y.substring(p,l),92===i&&(m+=Y()),f=X()}return f=0},scan:Z,getText:function(){return y},setText:re,setScriptTarget:function(e){t=e},setLanguageVariant:function(e){i=e},setOnError:function(e){s=e},setTextPos:ne,setInJSDocType:function(e){h+=e?1:-1},tryScan:function(e){return te(e,!1)},lookAhead:function(e){return te(e,!0)},scanRange:function(e,t,r){var n=_,i=l,a=d,o=p,s=f,c=m,u=g;re(y,e,t);var h=r();return _=n,l=i,d=a,p=o,f=s,m=c,g=u,h}};return e.Debug.isDebugging&&Object.defineProperty(v,"__debugShowCurrentPositionInText",{get:function(){var e=v.getText();return e.slice(0,v.getStartPos())+"║"+e.slice(v.getStartPos())}}),v;function b(e,t,r){if(void 0===t&&(t=l),s){var n=l;l=t,s(e,r||0),l=n}}function C(){for(var t=l,r=!1,n=!1,i="";;){var a=y.charCodeAt(l);if(95!==a){if(!T(a))break;r=!0,n=!1,l++}else g|=512,r?(r=!1,n=!0,i+=y.substring(t,l)):b(n?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),t=++l}return 95===y.charCodeAt(l-1)&&b(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),i+y.substring(t,l)}function A(){var t,r,n=l,i=C();46===y.charCodeAt(l)&&(l++,t=C());var a,o=l;if(69===y.charCodeAt(l)||101===y.charCodeAt(l)){l++,g|=16,43!==y.charCodeAt(l)&&45!==y.charCodeAt(l)||l++;var s=l,c=C();c?(r=y.substring(o,s)+c,o=l):b(e.Diagnostics.Digit_expected)}if(512&g?(a=i,t&&(a+="."+t),r&&(a+=r)):a=y.substring(n,o),void 0!==t||16&g)return w(n,void 0===t&&!!(16&g)),{type:8,value:""+ +a};m=a;var u=$();return w(n),{type:u,value:m}}function w(r,n){if(R(j(y,l),t)){var i=l,a=Y().length;1===a&&"n"===y[i]?b(n?e.Diagnostics.A_bigint_literal_cannot_use_exponential_notation:e.Diagnostics.A_bigint_literal_must_be_an_integer,r,i-r+1):(b(e.Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,i,a),l=i)}}function I(){for(var e=l;E(y.charCodeAt(l));)l++;return+y.substring(e,l)}function O(e,t){var r=L(e,!1,t);return r?parseInt(r,16):-1}function M(e,t){return L(e,!0,t)}function L(t,r,n){for(var i=[],a=!1,o=!1;i.length<t||r;){var s=y.charCodeAt(l);if(n&&95===s)g|=512,a?(a=!1,o=!0):b(o?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++;else{if(a=n,s>=65&&s<=70)s+=32;else if(!(s>=48&&s<=57||s>=97&&s<=102))break;i.push(s),l++,o=!1}}return i.length<t&&(i=[]),95===y.charCodeAt(l-1)&&b(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),String.fromCharCode.apply(String,i)}function J(t){void 0===t&&(t=!1);for(var r=y.charCodeAt(l),n="",i=++l;;){if(l>=_){n+=y.substring(i,l),g|=4,b(e.Diagnostics.Unterminated_string_literal);break}var a=y.charCodeAt(l);if(a===r){n+=y.substring(i,l),l++;break}if(92!==a||t){if(S(a)&&!t){n+=y.substring(i,l),g|=4,b(e.Diagnostics.Unterminated_string_literal);break}l++}else n+=y.substring(i,l),n+=U(),i=l}return n}function z(){for(var t,r=96===y.charCodeAt(l),n=++l,i="";;){if(l>=_){i+=y.substring(n,l),g|=4,b(e.Diagnostics.Unterminated_template_literal),t=r?14:17;break}var a=y.charCodeAt(l);if(96===a){i+=y.substring(n,l),l++,t=r?14:17;break}if(36===a&&l+1<_&&123===y.charCodeAt(l+1)){i+=y.substring(n,l),l+=2,t=r?15:16;break}92!==a?13!==a?l++:(i+=y.substring(n,l),++l<_&&10===y.charCodeAt(l)&&l++,i+="\n",n=l):(i+=y.substring(n,l),i+=U(),n=l)}return e.Debug.assert(void 0!==t),m=i,t}function U(){if(++l>=_)return b(e.Diagnostics.Unexpected_end_of_text),"";var t=y.charCodeAt(l);switch(l++,t){case 48:return"\0";case 98:return"\b";case 116:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:return l<_&&123===y.charCodeAt(l)?(g|=8,l++,q()):(g|=1024,V(4));case 120:return V(2);case 13:l<_&&10===y.charCodeAt(l)&&l++;case 10:case 8232:case 8233:return"";default:return String.fromCharCode(t)}}function V(t){var r=O(t,!1);return r>=0?String.fromCharCode(r):(b(e.Diagnostics.Hexadecimal_digit_expected),"")}function q(){var t=M(1,!1),r=t?parseInt(t,16):-1,n=!1;return r<0?(b(e.Diagnostics.Hexadecimal_digit_expected),n=!0):r>1114111&&(b(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),n=!0),l>=_?(b(e.Diagnostics.Unexpected_end_of_text),n=!0):125===y.charCodeAt(l)?l++:(b(e.Diagnostics.Unterminated_Unicode_escape_sequence),n=!0),n?"":W(r)}function W(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var r=Math.floor((t-65536)/1024)+55296,n=(t-65536)%1024+56320;return String.fromCharCode(r,n)}function G(){if(l+5<_&&117===y.charCodeAt(l+1)){var e=l;l+=2;var t=O(4,!1);return l=e,t}return-1}function H(){if(t>=2&&117===j(y,l+1)&&123===j(y,l+2)){var e=l;l+=3;var r=M(1,!1),n=r?parseInt(r,16):-1;return l=e,n}return-1}function Y(){for(var e="",r=l;l<_;){var n=j(y,l);if(B(n,t))l+=K(n);else{if(92!==n)break;if((n=H())>=0&&B(n,t)){l+=3,g|=8,e+=q(),r=l;continue}if(!((n=G())>=0&&B(n,t)))break;g|=1024,e+=y.substring(r,l),e+=W(n),r=l+=6}}return e+=y.substring(r,l)}function X(){var e=m.length;if(e>=2&&e<=11){var t=m.charCodeAt(0);if(t>=97&&t<=122){var r=a.get(m);if(void 0!==r)return f=r}}return f=75}function Q(t){for(var r="",n=!1,i=!1;;){var a=y.charCodeAt(l);if(95!==a){if(n=!0,!T(a)||a-48>=t)break;r+=y[l],l++,i=!1}else g|=512,n?(n=!1,i=!0):b(i?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++}return 95===y.charCodeAt(l-1)&&b(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),r}function $(){if(110===y.charCodeAt(l))return m+="n",384&g&&(m=e.parsePseudoBigInt(m)+"n"),l++,9;var t=128&g?parseInt(m.slice(2),2):256&g?parseInt(m.slice(2),8):+m;return m=""+t,8}function Z(){var n;d=l,g=0;for(var a=!1;;){if(p=l,l>=_)return f=1;var o=j(y,l);if(35===o&&0===l&&F(y,l)){if(l=P(y,l),r)continue;return f=6}switch(o){case 10:case 13:if(g|=1,r){l++;continue}return 13===o&&l+1<_&&10===y.charCodeAt(l+1)?l+=2:l++,f=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(r){l++;continue}for(;l<_&&D(y.charCodeAt(l));)l++;return f=5;case 33:return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=37):(l+=2,f=35):(l++,f=53);case 34:case 39:return m=J(),f=10;case 96:return f=z();case 37:return 61===y.charCodeAt(l+1)?(l+=2,f=68):(l++,f=44);case 38:return 38===y.charCodeAt(l+1)?(l+=2,f=55):61===y.charCodeAt(l+1)?(l+=2,f=72):(l++,f=50);case 40:return l++,f=20;case 41:return l++,f=21;case 42:if(61===y.charCodeAt(l+1))return l+=2,f=65;if(42===y.charCodeAt(l+1))return 61===y.charCodeAt(l+2)?(l+=3,f=66):(l+=2,f=42);if(l++,h&&!a&&1&g){a=!0;continue}return f=41;case 43:return 43===y.charCodeAt(l+1)?(l+=2,f=45):61===y.charCodeAt(l+1)?(l+=2,f=63):(l++,f=39);case 44:return l++,f=27;case 45:return 45===y.charCodeAt(l+1)?(l+=2,f=46):61===y.charCodeAt(l+1)?(l+=2,f=64):(l++,f=40);case 46:return T(y.charCodeAt(l+1))?(m=A().value,f=8):46===y.charCodeAt(l+1)&&46===y.charCodeAt(l+2)?(l+=3,f=25):(l++,f=24);case 47:if(47===y.charCodeAt(l+1)){for(l+=2;l<_&&!S(y.charCodeAt(l));)l++;if(r)continue;return f=2}if(42===y.charCodeAt(l+1)){l+=2,42===y.charCodeAt(l)&&47!==y.charCodeAt(l+1)&&(g|=2);for(var s=!1;l<_;){var c=y.charCodeAt(l);if(42===c&&47===y.charCodeAt(l+1)){l+=2,s=!0;break}S(c)&&(g|=1),l++}if(s||b(e.Diagnostics.Asterisk_Slash_expected),r)continue;return s||(g|=4),f=3}return 61===y.charCodeAt(l+1)?(l+=2,f=67):(l++,f=43);case 48:if(l+2<_&&(88===y.charCodeAt(l+1)||120===y.charCodeAt(l+1)))return l+=2,(m=M(1,!0))||(b(e.Diagnostics.Hexadecimal_digit_expected),m="0"),m="0x"+m,g|=64,f=$();if(l+2<_&&(66===y.charCodeAt(l+1)||98===y.charCodeAt(l+1)))return l+=2,(m=Q(2))||(b(e.Diagnostics.Binary_digit_expected),m="0"),m="0b"+m,g|=128,f=$();if(l+2<_&&(79===y.charCodeAt(l+1)||111===y.charCodeAt(l+1)))return l+=2,(m=Q(8))||(b(e.Diagnostics.Octal_digit_expected),m="0"),m="0o"+m,g|=256,f=$();if(l+1<_&&E(y.charCodeAt(l+1)))return m=""+I(),g|=32,f=8;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n=A(),f=n.type,m=n.value,f;case 58:return l++,f=58;case 59:return l++,f=26;case 60:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 60===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=69):(l+=2,f=47):61===y.charCodeAt(l+1)?(l+=2,f=32):1===i&&47===y.charCodeAt(l+1)&&42!==y.charCodeAt(l+2)?(l+=2,f=30):(l++,f=29);case 61:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=36):(l+=2,f=34):62===y.charCodeAt(l+1)?(l+=2,f=38):(l++,f=62);case 62:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return l++,f=31;case 63:return l++,46!==y.charCodeAt(l)||T(y.charCodeAt(l+1))?63===y.charCodeAt(l)?(l++,f=60):f=57:(l++,f=28);case 91:return l++,f=22;case 93:return l++,f=23;case 94:return 61===y.charCodeAt(l+1)?(l+=2,f=74):(l++,f=52);case 123:return l++,f=18;case 124:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 124===y.charCodeAt(l+1)?(l+=2,f=56):61===y.charCodeAt(l+1)?(l+=2,f=73):(l++,f=51);case 125:return l++,f=19;case 126:return l++,f=54;case 64:return l++,f=59;case 92:var u=H();if(u>=0&&R(u,t))return l+=3,g|=8,m=q()+Y(),f=X();var v=G();return v>=0&&R(v,t)?(l+=6,g|=1024,m=String.fromCharCode(v)+Y(),f=X()):(b(e.Diagnostics.Invalid_character),l++,f=0);default:if(R(o,t)){for(l+=K(o);l<_&&B(o=j(y,l),t);)l+=K(o);return m=y.substring(p,l),92===o&&(m+=Y()),f=X()}if(D(o)){l+=K(o);continue}if(S(o)){g|=1,l+=K(o);continue}return b(e.Diagnostics.Invalid_character),l+=K(o),f=0}}}function ee(){if(d=p=l,l>=_)return f=1;var e=y.charCodeAt(l);if(60===e)return 47===y.charCodeAt(l+1)?(l+=2,f=30):(l++,f=29);if(123===e)return l++,f=18;for(var t=0;l<_&&123!==(e=y.charCodeAt(l));){if(60===e){if(k(y,l))return l=N(y,l,b),f=7;break}S(e)&&0===t?t=-1:x(e)||(t=l),l++}return m=y.substring(d,l),-1===t?12:11}function te(e,t){var r=l,n=d,i=p,a=f,o=m,s=g,c=e();return c&&!t||(l=r,d=n,p=i,f=a,m=o,g=s),c}function re(e,t,r){y=e||"",_=void 0===r?y.length:t+r,ne(t||0)}function ne(t){e.Debug.assert(t>=0),l=t,d=t,p=t,f=0,m=void 0,g=0}};var j=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n=e.charCodeAt(t);if(n>=55296&&n<=56319&&r>t+1){var i=e.charCodeAt(t+1);if(i>=56320&&i<=57343)return 1024*(n-55296)+i-56320+65536}return n}};function K(e){return e>=65536?2:1}}(s||(s={})),function(e){e.isExternalModuleNameRelative=function(t){return e.pathIsRelative(t)||e.isRootedDiskPath(t)},e.sortAndDeduplicateDiagnostics=function(t){return e.sortAndDeduplicate(t,e.compareDiagnostics)}}(s||(s={})),function(e){e.resolvingEmptyArray=[],e.emptyMap=e.createMap(),e.emptyUnderscoreEscapedMap=e.emptyMap,e.externalHelpersModuleNameText="tslib",e.defaultMaximumTruncationLength=160,e.getDeclarationOfKind=function(e,t){var r=e.declarations;if(r)for(var n=0,i=r;n<i.length;n++){var a=i[n];if(a.kind===t)return a}},e.createUnderscoreEscapedMap=function(){return new e.Map},e.hasEntries=function(e){return!!e&&!!e.size},e.createSymbolTable=function(t){var r=e.createMap();if(t)for(var n=0,i=t;n<i.length;n++){var a=i[n];r.set(a.escapedName,a)}return r};var n,i,a=(n="",{getText:function(){return n},write:i=function(e){return n+=e},rawWrite:i,writeKeyword:i,writeOperator:i,writePunctuation:i,writeSpace:i,writeStringLiteral:i,writeLiteral:i,writeParameter:i,writeProperty:i,writeSymbol:function(e,t){return i(e)},writeTrailingSemicolon:i,writeComment:i,getTextPos:function(){return n.length},getLine:function(){return 0},getColumn:function(){return 0},getIndent:function(){return 0},isAtStartOfLine:function(){return!1},hasTrailingComment:function(){return!1},hasTrailingWhitespace:function(){return!!n.length&&e.isWhiteSpaceLike(n.charCodeAt(n.length-1))},writeLine:function(){return n+=" "},increaseIndent:e.noop,decreaseIndent:e.noop,clear:function(){return n=""},trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop});function o(t,r){return e.moduleResolutionOptionDeclarations.some((function(n){return!e.isJsonEqual(e.getCompilerOptionValue(t,n),e.getCompilerOptionValue(r,n))}))}function s(e,t){for(;e;){var r=t(e);if("quit"===r)return;if(r)return e;e=e.parent}}function c(e,t){e.forEach((function(e,r){t.set(r,e)}))}function u(e){return e.end-e.pos}function l(t){return function(t){if(!(524288&t.flags)){(0!=(65536&t.flags)||e.forEachChild(t,l))&&(t.flags|=262144),t.flags|=524288}}(t),0!=(262144&t.flags)}function _(e){for(;e&&288!==e.kind;)e=e.parent;return e}function d(t,r){e.Debug.assert(t>=0);var n=e.getLineStarts(r),i=t,a=r.text;if(i+1===n.length)return a.length-1;var o=n[i],s=n[i+1]-1;for(e.Debug.assert(e.isLineBreak(a.charCodeAt(s)));o<=s&&e.isLineBreak(a.charCodeAt(s));)s--;return s}function p(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function m(e){return!p(e)}function g(e,r,n){if(void 0===r||0===r.length)return e;for(var i=0;i<e.length&&n(e[i]);++i);return e.splice.apply(e,t([i,0],r)),e}function y(e,t,r){if(void 0===t)return e;for(var n=0;n<e.length&&r(e[n]);++n);return e.splice(n,0,t),e}function h(e){return U(e)||!!(1048576&E(e))}function v(e,t){return 42===e.charCodeAt(t+1)&&33===e.charCodeAt(t+2)}function b(t,r,n){return p(t)?t.pos:e.isJSDocNode(t)?e.skipTrivia((r||_(t)).text,t.pos,!1,!0):n&&e.hasJSDocNodes(t)?b(t.jsDoc[0]):317===t.kind&&t._children.length>0?b(t._children[0],r,n):e.skipTrivia((r||_(t)).text,t.pos)}function x(e,t,r){return void 0===r&&(r=!1),D(e.text,t,r)}function D(t,r,n){if(void 0===n&&(n=!1),p(r))return"";var i=t.substring(n?r.pos:e.skipTrivia(t,r.pos),r.end);return function e(t){return 292===t.kind||t.parent&&e(t.parent)}(r)&&(i=i.replace(/(^|\r?\n|\r)\s*\*\s*/g,"$1")),i}function S(e,t){return void 0===t&&(t=!1),x(_(e),e,t)}function T(e){return e.pos}function E(e){var t=e.emitNode;return t&&t.flags||0}function C(e){var t=lt(e);return 241===t.kind&&278===t.parent.kind}function k(t){return e.isModuleDeclaration(t)&&(10===t.name.kind||N(t))}function N(e){return!!(1024&e.flags)}function A(e){return k(e)&&F(e)}function F(t){switch(t.parent.kind){case 288:return e.isExternalModule(t.parent);case 249:return k(t.parent.parent)&&e.isSourceFile(t.parent.parent.parent)&&!e.isExternalModule(t.parent.parent.parent)}return!1}function P(t,r){switch(t.kind){case 288:case 250:case 278:case 248:case 229:case 230:case 231:case 161:case 160:case 162:case 163:case 243:case 200:case 201:return!0;case 222:return!e.isFunctionLike(r)}return!1}function w(t){switch(t.kind){case 164:case 165:case 159:case 166:case 169:case 170:case 298:case 244:case 213:case 245:case 246:case 314:case 243:case 160:case 161:case 162:case 163:case 200:case 201:return!0;default:return e.assertType(t),!1}}function I(e){switch(e.kind){case 253:case 252:return!0;default:return!1}}function O(e){return e&&0!==u(e)?S(e):"(Missing)"}function M(t){switch(t.kind){case 75:return t.escapedText;case 10:case 8:case 14:return e.escapeLeadingUnderscores(t.text);case 153:return et(t.expression)?e.escapeLeadingUnderscores(t.expression.text):e.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");default:return e.Debug.assertNever(t)}}function L(t,r,n,i,a,o,s){var c=B(t,r);return e.createFileDiagnostic(t,c.start,c.length,n,i,a,o,s)}function R(t,r){var n=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);n.scan();var i=n.getTokenPos();return e.createTextSpanFromBounds(i,n.getTextPos())}function B(t,r){var n=r;switch(r.kind){case 288:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):R(t,i);case 241:case 190:case 244:case 213:case 245:case 248:case 247:case 282:case 243:case 200:case 160:case 162:case 163:case 246:case 158:case 157:n=r.name;break;case 201:return function(t,r){var n=e.skipTrivia(t.text,r.pos);if(r.body&&222===r.body.kind){var i=e.getLineAndCharacterOfPosition(t,r.body.pos).line;if(i<e.getLineAndCharacterOfPosition(t,r.body.end).line)return e.createTextSpan(n,d(i,t)-n+1)}return e.createTextSpanFromBounds(n,r.end)}(t,r);case 275:case 276:var a=e.skipTrivia(t.text,r.pos),o=r.statements.length>0?r.statements[0].pos:r.end;return e.createTextSpanFromBounds(a,o)}if(void 0===n)return R(t,r.pos);e.Debug.assert(!e.isJSDoc(n));var s=p(n),c=s||e.isJsxText(r)?n.pos:e.skipTrivia(t.text,n.pos);return s?(e.Debug.assert(c===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(c===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(e.Debug.assert(c>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(c<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),e.createTextSpanFromBounds(c,n.end)}function j(e){return 6===e.scriptKind}function K(t){return!!(2&e.getCombinedNodeFlags(t))}function J(e){return 195===e.kind&&95===e.expression.kind}function z(t){return e.isImportTypeNode(t)&&e.isLiteralTypeNode(t.argument)&&e.isStringLiteral(t.argument.literal)}function U(e){return 225===e.kind&&10===e.expression.kind}e.changesAffectModuleResolution=function(e,t){return e.configFilePath!==t.configFilePath||o(e,t)},e.optionsHaveModuleResolutionChanges=o,e.findAncestor=s,e.forEachAncestor=function(t,r){for(;;){var n=r(t);if("quit"===n)return;if(void 0!==n)return n;if(e.isSourceFile(t))return;t=t.parent}},e.forEachEntry=function(e,t){for(var r=e.entries(),n=r.next();!n.done;n=r.next()){var i=n.value,a=i[0],o=t(i[1],a);if(o)return o}},e.forEachKey=function(e,t){for(var r=e.keys(),n=r.next();!n.done;n=r.next()){var i=t(n.value);if(i)return i}},e.copyEntries=c,e.arrayToSet=function(t,r){return e.arrayToMap(t,r||function(e){return e},e.returnTrue)},e.cloneMap=function(t){var r=e.createMap();return c(t,r),r},e.usingSingleLineStringWriter=function(e){var t=a.getText();try{return e(a),a.getText()}finally{a.clear(),a.writeKeyword(t)}},e.getFullWidth=u,e.getResolvedModule=function(e,t){return e&&e.resolvedModules&&e.resolvedModules.get(t)},e.setResolvedModule=function(t,r,n){t.resolvedModules||(t.resolvedModules=e.createMap()),t.resolvedModules.set(r,n)},e.setResolvedTypeReferenceDirective=function(t,r,n){t.resolvedTypeReferenceDirectiveNames||(t.resolvedTypeReferenceDirectiveNames=e.createMap()),t.resolvedTypeReferenceDirectiveNames.set(r,n)},e.projectReferenceIsEqualTo=function(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular},e.moduleResolutionIsEqualTo=function(e,t){return e.isExternalLibraryImport===t.isExternalLibraryImport&&e.extension===t.extension&&e.resolvedFileName===t.resolvedFileName&&e.originalPath===t.originalPath&&(r=e.packageId,n=t.packageId,r===n||!!r&&!!n&&r.name===n.name&&r.subModuleName===n.subModuleName&&r.version===n.version);var r,n},e.packageIdToString=function(e){var t=e.name,r=e.subModuleName;return(r?t+"/"+r:t)+"@"+e.version},e.typeDirectiveIsEqualTo=function(e,t){return e.resolvedFileName===t.resolvedFileName&&e.primary===t.primary},e.hasChangesInResolutions=function(t,r,n,i){e.Debug.assert(t.length===r.length);for(var a=0;a<t.length;a++){var o=r[a],s=n&&n.get(t[a]);if(s?!o||!i(s,o):o)return!0}return!1},e.containsParseError=l,e.getSourceFileOfNode=_,e.isStatementWithLocals=function(e){switch(e.kind){case 222:case 250:case 229:case 230:case 231:return!0}return!1},e.getStartPositionOfLine=function(t,r){return e.Debug.assert(t>=0),e.getLineStarts(r)[t]},e.nodePosToString=function(t){var r=_(t),n=e.getLineAndCharacterOfPosition(r,t.pos);return r.fileName+"("+(n.line+1)+","+(n.character+1)+")"},e.getEndLinePosition=d,e.isFileLevelUniqueName=function(e,t,r){return!(r&&r(t)||e.identifiers.has(t))},e.nodeIsMissing=p,e.nodeIsPresent=m,e.insertStatementsAfterStandardPrologue=function(e,t){return g(e,t,U)},e.insertStatementsAfterCustomPrologue=function(e,t){return g(e,t,h)},e.insertStatementAfterStandardPrologue=function(e,t){return y(e,t,U)},e.insertStatementAfterCustomPrologue=function(e,t){return y(e,t,h)},e.isRecognizedTripleSlashComment=function(t,r,n){if(47===t.charCodeAt(r+1)&&r+2<n&&47===t.charCodeAt(r+2)){var i=t.substring(r,n);return!!(i.match(e.fullTripleSlashReferencePathRegEx)||i.match(e.fullTripleSlashAMDReferencePathRegEx)||i.match(V)||i.match(q))}return!1},e.isPinnedComment=v,e.getTokenPosOfNode=b,e.getNonDecoratorTokenPosOfNode=function(t,r){return p(t)||!t.decorators?b(t,r):e.skipTrivia((r||_(t)).text,t.decorators.end)},e.getSourceTextOfNodeFromSourceFile=x,e.getTextOfNodeFromSourceText=D,e.getTextOfNode=S,e.indexOfNode=function(t,r){return e.binarySearch(t,r,T,e.compareValues)},e.getEmitFlags=E,e.getLiteralText=function(t,r,n){if(!_t(t)&&t.parent&&!(e.isNumericLiteral(t)&&512&t.numericLiteralFlags||e.isBigIntLiteral(t)))return x(r,t);var i=n||16777216&E(t)?xt:Et;switch(t.kind){case 10:return t.singleQuote?"'"+i(t.text,39)+"'":'"'+i(t.text,34)+'"';case 14:case 15:case 16:case 17:var a=t.rawText||function(e){return e.replace(gt,"\\${")}(i(t.text,96));switch(t.kind){case 14:return"`"+a+"`";case 15:return"`"+a+"${";case 16:return"}"+a+"${";case 17:return"}"+a+"`"}break;case 8:case 9:case 13:return t.text}return e.Debug.fail("Literal kind '"+t.kind+"' not accounted for.")},e.getTextOfConstantValue=function(t){return e.isString(t)?'"'+Et(t)+'"':""+t},e.makeIdentifierFromModuleName=function(t){return e.getBaseFileName(t).replace(/^(\d)/,"_$1").replace(/\W/g,"_")},e.isBlockOrCatchScoped=function(t){return 0!=(3&e.getCombinedNodeFlags(t))||C(t)},e.isCatchClauseVariableDeclarationOrBindingElement=C,e.isAmbientModule=k,e.isModuleWithStringLiteralName=function(t){return e.isModuleDeclaration(t)&&10===t.name.kind},e.isNonGlobalAmbientModule=function(t){return e.isModuleDeclaration(t)&&e.isStringLiteral(t.name)},e.isEffectiveModuleDeclaration=function(t){return e.isModuleDeclaration(t)||e.isIdentifier(t)},e.isShorthandAmbientModuleSymbol=function(e){return function(e){return e&&248===e.kind&&!e.body}(e.valueDeclaration)},e.isBlockScopedContainerTopLevel=function(t){return 288===t.kind||248===t.kind||e.isFunctionLike(t)},e.isGlobalScopeAugmentation=N,e.isExternalModuleAugmentation=A,e.isModuleAugmentationExternal=F,e.getNonAugmentationDeclaration=function(t){return e.find(t.declarations,(function(t){return!(A(t)||e.isModuleDeclaration(t)&&N(t))}))},e.isEffectiveExternalModule=function(t,r){return e.isExternalModule(t)||r.isolatedModules||e.getEmitModuleKind(r)===e.ModuleKind.CommonJS&&!!t.commonJsModuleIndicator},e.isEffectiveStrictModeSourceFile=function(t,r){switch(t.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return!t.isDeclarationFile&&(!!e.getStrictOptionValue(r,"alwaysStrict")||(!!e.startsWithUseStrict(t.statements)||!(!e.isExternalModule(t)&&!r.isolatedModules)&&(e.getEmitModuleKind(r)>=e.ModuleKind.ES2015||!r.noImplicitUseStrict)))},e.isBlockScope=P,e.isDeclarationWithTypeParameters=function(t){switch(t.kind){case 308:case 315:case 303:return!0;default:return e.assertType(t),w(t)}},e.isDeclarationWithTypeParameterChildren=w,e.isAnyImportSyntax=I,e.isLateVisibilityPaintedStatement=function(e){switch(e.kind){case 253:case 252:case 224:case 244:case 243:case 248:case 246:case 245:case 247:return!0;default:return!1}},e.isAnyImportOrReExport=function(t){return I(t)||e.isExportDeclaration(t)},e.getEnclosingBlockScopeContainer=function(e){return s(e.parent,(function(e){return P(e,e.parent)}))},e.declarationNameToString=O,e.getNameFromIndexInfo=function(e){return e.declaration?O(e.declaration.parameters[0].name):void 0},e.getTextOfPropertyName=M,e.entityNameToString=function t(r){switch(r.kind){case 75:return 0===u(r)?e.idText(r):S(r);case 152:return t(r.left)+"."+t(r.right);case 193:return t(r.expression)+"."+t(r.name);default:throw e.Debug.assertNever(r)}},e.createDiagnosticForNode=function(e,t,r,n,i,a){return L(_(e),e,t,r,n,i,a)},e.createDiagnosticForNodeArray=function(t,r,n,i,a,o,s){var c=e.skipTrivia(t.text,r.pos);return e.createFileDiagnostic(t,c,r.end-c,n,i,a,o,s)},e.createDiagnosticForNodeInSourceFile=L,e.createDiagnosticForNodeFromMessageChain=function(e,t,r){var n=_(e),i=B(n,e);return{file:n,start:i.start,length:i.length,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}},e.getSpanOfTokenAtPosition=R,e.getErrorSpanForNode=B,e.isExternalOrCommonJsModule=function(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)},e.isJsonSourceFile=j,e.isEnumConst=function(t){return!!(2048&e.getCombinedModifierFlags(t))},e.isDeclarationReadonly=function(t){return!(!(64&e.getCombinedModifierFlags(t))||e.isParameterPropertyDeclaration(t,t.parent))},e.isVarConst=K,e.isLet=function(t){return!!(1&e.getCombinedNodeFlags(t))},e.isSuperCall=function(e){return 195===e.kind&&101===e.expression.kind},e.isImportCall=J,e.isImportMeta=function(t){return e.isMetaProperty(t)&&95===t.keywordToken&&"meta"===t.name.escapedText},e.isLiteralImportTypeNode=z,e.isPrologueDirective=U,e.getLeadingCommentRangesOfNode=function(t,r){return 11!==t.kind?e.getLeadingCommentRanges(r.text,t.pos):void 0},e.getJSDocCommentRanges=function(t,r){var n=155===t.kind||154===t.kind||200===t.kind||201===t.kind||199===t.kind?e.concatenate(e.getTrailingCommentRanges(r,t.pos),e.getLeadingCommentRanges(r,t.pos)):e.getLeadingCommentRanges(r,t.pos);return e.filter(n,(function(e){return 42===r.charCodeAt(e.pos+1)&&42===r.charCodeAt(e.pos+2)&&47!==r.charCodeAt(e.pos+3)}))},e.fullTripleSlashReferencePathRegEx=/^(\/\/\/\s*<reference\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;var V=/^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;e.fullTripleSlashAMDReferencePathRegEx=/^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;var q=/^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/;function W(t){if(167<=t.kind&&t.kind<=187)return!0;switch(t.kind){case 124:case 147:case 139:case 150:case 142:case 127:case 143:case 140:case 145:case 136:return!0;case 109:return 204!==t.parent.kind;case 215:return!ir(t);case 154:return 185===t.parent.kind||180===t.parent.kind;case 75:152===t.parent.kind&&t.parent.right===t?t=t.parent:193===t.parent.kind&&t.parent.name===t&&(t=t.parent),e.Debug.assert(75===t.kind||152===t.kind||193===t.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 152:case 193:case 103:var r=t.parent;if(171===r.kind)return!1;if(187===r.kind)return!r.isTypeOf;if(167<=r.kind&&r.kind<=187)return!0;switch(r.kind){case 215:return!ir(r);case 154:case 314:return t===r.constraint;case 158:case 157:case 155:case 241:return t===r.type;case 243:case 200:case 201:case 161:case 160:case 159:case 162:case 163:return t===r.type;case 164:case 165:case 166:case 198:return t===r.type;case 195:case 196:return e.contains(r.typeArguments,t);case 197:return!1}}return!1}function G(e){if(e)switch(e.kind){case 190:case 282:case 155:case 279:case 158:case 157:case 280:case 241:return!0}return!1}function H(e){return 242===e.parent.kind&&224===e.parent.parent.kind}function Y(e,t,r){return e.properties.filter((function(e){if(279===e.kind){var n=M(e.name);return t===n||!!r&&r===n}return!1}))}function X(t){if(t&&t.statements.length){var r=t.statements[0].expression;return e.tryCast(r,e.isObjectLiteralExpression)}}function Q(t,r){var n=X(t);return n?Y(n,r):e.emptyArray}function $(t,r){for(e.Debug.assert(288!==t.kind);;){if(!(t=t.parent))return e.Debug.fail();switch(t.kind){case 153:if(e.isClassLike(t.parent.parent))return t;t=t.parent;break;case 156:155===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent);break;case 201:if(!r)continue;case 243:case 200:case 248:case 158:case 157:case 160:case 159:case 161:case 162:case 163:case 164:case 165:case 166:case 247:case 288:return t}}}function Z(e){var t=e.kind;return(193===t||194===t)&&101===e.expression.kind}function ee(e,t,r){switch(e.kind){case 244:return!0;case 158:return 244===t.kind;case 162:case 163:case 160:return void 0!==e.body&&244===t.kind;case 155:return void 0!==t.body&&(161===t.kind||160===t.kind||163===t.kind)&&244===r.kind}return!1}function te(e,t,r){return void 0!==e.decorators&&ee(e,t,r)}function re(e,t,r){return te(e,t,r)||ne(e,t)}function ne(t,r){switch(t.kind){case 244:return e.some(t.members,(function(e){return re(e,t,r)}));case 160:case 163:return e.some(t.parameters,(function(e){return te(e,t,r)}));default:return!1}}function ie(e){var t=e.parent;return(266===t.kind||265===t.kind||267===t.kind)&&t.tagName===e}function ae(e){switch(e.kind){case 101:case 99:case 105:case 90:case 13:case 191:case 192:case 193:case 194:case 195:case 196:case 197:case 216:case 198:case 217:case 199:case 200:case 213:case 201:case 204:case 202:case 203:case 206:case 207:case 208:case 209:case 212:case 210:case 214:case 264:case 265:case 268:case 211:case 205:case 218:return!0;case 152:for(;152===e.parent.kind;)e=e.parent;return 171===e.parent.kind||ie(e);case 75:if(171===e.parent.kind||ie(e))return!0;case 8:case 9:case 10:case 14:case 103:return oe(e);default:return!1}}function oe(e){var t=e.parent;switch(t.kind){case 241:case 155:case 158:case 157:case 282:case 279:case 190:return t.initializer===e;case 225:case 226:case 227:case 228:case 234:case 235:case 236:case 275:case 238:return t.expression===e;case 229:var r=t;return r.initializer===e&&242!==r.initializer.kind||r.condition===e||r.incrementor===e;case 230:case 231:var n=t;return n.initializer===e&&242!==n.initializer.kind||n.expression===e;case 198:case 216:case 220:case 153:return e===t.expression;case 156:case 274:case 273:case 281:return!0;case 215:return t.expression===e&&ir(t);case 280:return t.objectAssignmentInitializer===e;default:return ae(t)}}function se(e){return 252===e.kind&&263===e.moduleReference.kind}function ce(e){return ue(e)}function ue(e){return!!e&&!!(131072&e.flags)}function le(t,r){if(195!==t.kind)return!1;var n=t,i=n.expression,a=n.arguments;if(75!==i.kind||"require"!==i.escapedText)return!1;if(1!==a.length)return!1;var o=a[0];return!r||e.isStringLiteralLike(o)}function _e(t){return ue(t)&&t.initializer&&e.isBinaryExpression(t.initializer)&&(56===t.initializer.operatorToken.kind||60===t.initializer.operatorToken.kind)&&t.name&&ar(t.name)&&pe(t.name,t.initializer.left)?t.initializer.right:t.initializer}function de(t,r){if(e.isCallExpression(t)){var n=ze(t.expression);return 200===n.kind||201===n.kind?t:void 0}return 200===t.kind||213===t.kind||201===t.kind?t:e.isObjectLiteralExpression(t)&&(0===t.properties.length||r)?t:void 0}function pe(t,r){return ot(t)&&ot(r)?st(t)==st(t):e.isIdentifier(t)&&he(r)?(103===r.expression.kind||e.isIdentifier(r.expression)&&("window"===r.expression.escapedText||"self"===r.expression.escapedText||"global"===r.expression.escapedText))&&pe(t,Se(r)):!(!he(t)||!he(r))&&(Ee(t)===Ee(r)&&pe(t.expression,r.expression))}function fe(t){return e.isIdentifier(t)&&"exports"===t.escapedText}function me(t){return(e.isPropertyAccessExpression(t)||ve(t))&&e.isIdentifier(t.expression)&&"module"===t.expression.escapedText&&"exports"===Ee(t)}function ge(t){var r=function(t){if(e.isCallExpression(t)){if(!ye(t))return 0;var r=t.arguments[0];return fe(r)||me(r)?8:be(r)&&"prototype"===Ee(r)?9:7}if(62!==t.operatorToken.kind||!Cr(t.left))return 0;if(De(t.left.expression,!0)&&"prototype"===Ee(t.left)&&e.isObjectLiteralExpression(ke(t)))return 6;return Ce(t.left)}(t);return 5===r||ue(t)?r:0}function ye(t){return 3===e.length(t.arguments)&&e.isPropertyAccessExpression(t.expression)&&e.isIdentifier(t.expression.expression)&&"Object"===e.idText(t.expression.expression)&&"defineProperty"===e.idText(t.expression.name)&&et(t.arguments[1])&&De(t.arguments[0],!0)}function he(t){return e.isPropertyAccessExpression(t)||ve(t)}function ve(t){return e.isElementAccessExpression(t)&&(et(t.argumentExpression)||it(t.argumentExpression))}function be(t,r){return e.isPropertyAccessExpression(t)&&(!r&&103===t.expression.kind||De(t.expression,!0))||xe(t,r)}function xe(e,t){return ve(e)&&(!t&&103===e.expression.kind||ar(e.expression)||be(e.expression,!0))}function De(e,t){return ar(e)||be(e,t)}function Se(t){return e.isPropertyAccessExpression(t)?t.name:t.argumentExpression}function Te(t){if(e.isPropertyAccessExpression(t))return t.name;var r=ze(t.argumentExpression);return e.isNumericLiteral(r)||e.isStringLiteralLike(r)?r:t}function Ee(t){var r=Te(t);if(r){if(e.isIdentifier(r))return r.escapedText;if(e.isStringLiteralLike(r)||e.isNumericLiteral(r))return e.escapeLeadingUnderscores(r.text)}if(e.isElementAccessExpression(t)&&it(t.argumentExpression))return ct(e.idText(t.argumentExpression.name))}function Ce(t){if(103===t.expression.kind)return 4;if(me(t))return 2;if(De(t.expression,!0)){if(sr(t.expression))return 3;for(var r=t;!e.isIdentifier(r.expression);)r=r.expression;var n=r.expression;if(("exports"===n.escapedText||"module"===n.escapedText&&"exports"===Ee(r))&&be(t))return 1;if(De(t,!0)||e.isElementAccessExpression(t)&&nt(t)&&103!==t.expression.kind)return 5}return 0}function ke(t){for(;e.isBinaryExpression(t.right);)t=t.right;return t.right}function Ne(t){switch(t.parent.kind){case 253:case 259:return t.parent;case 263:return t.parent.parent;case 195:return J(t.parent)||le(t.parent,!1)?t.parent:void 0;case 186:return e.Debug.assert(e.isStringLiteral(t)),e.tryCast(t.parent.parent,e.isImportTypeNode);default:return}}function Ae(e){return 315===e.kind||308===e.kind||309===e.kind}function Fe(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&0!==ge(t.expression)&&e.isBinaryExpression(t.expression.right)&&(56===t.expression.right.operatorToken.kind||60===t.expression.right.operatorToken.kind)?t.expression.right.right:void 0}function Pe(e){switch(e.kind){case 224:var t=we(e);return t&&t.initializer;case 158:case 279:return e.initializer}}function we(t){return e.isVariableStatement(t)?e.firstOrUndefined(t.declarationList.declarations):void 0}function Ie(t){return e.isModuleDeclaration(t)&&t.body&&248===t.body.kind?t.body:void 0}function Oe(t){var r=t.parent;return 279===r.kind||258===r.kind||158===r.kind||225===r.kind&&193===t.kind||Ie(r)||e.isBinaryExpression(t)&&62===t.operatorToken.kind?r:r.parent&&(we(r.parent)===t||e.isBinaryExpression(r)&&62===r.operatorToken.kind)?r.parent:r.parent&&r.parent.parent&&(we(r.parent.parent)||Pe(r.parent.parent)===t||Fe(r.parent.parent))?r.parent.parent:void 0}function Me(e){return Le(Re(e))}function Le(t){var r=Fe(t)||function(t){return e.isExpressionStatement(t)&&t.expression&&e.isBinaryExpression(t.expression)&&62===t.expression.operatorToken.kind?t.expression.right:void 0}(t)||Pe(t)||we(t)||Ie(t)||t;return r&&e.isFunctionLike(r)?r:void 0}function Re(t){return e.Debug.assertDefined(s(t.parent,e.isJSDoc)).parent}function Be(t){var r=e.isJSDocParameterTag(t)?t.typeExpression&&t.typeExpression.type:t.type;return void 0!==t.dotDotDotToken||!!r&&299===r.kind}function je(e){for(var t=e.parent;;){switch(t.kind){case 208:var r=t.operatorToken.kind;return er(r)&&t.left===e?62===r?1:2:0;case 206:case 207:var n=t.operator;return 45===n||46===n?2:0;case 230:case 231:return t.initializer===e?1:0;case 199:case 191:case 212:case 217:e=t;break;case 280:if(t.name!==e)return 0;e=t.parent;break;case 279:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function Ke(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function Je(e){return Ke(e,199)}function ze(e){for(;199===e.kind;)e=e.expression;return e}function Ue(t){return ar(t)||e.isClassExpression(t)}function Ve(e){return Ue(qe(e))}function qe(t){return e.isExportAssignment(t)?t.expression:t.right}function We(t){var r=Ge(t);if(r&&ue(t)){var n=e.getJSDocAugmentsTag(t);if(n)return n.class}return r}function Ge(e){var t=Xe(e.heritageClauses,89);return t&&t.types.length>0?t.types[0]:void 0}function He(e){var t=Xe(e.heritageClauses,112);return t?t.types:void 0}function Ye(e){var t=Xe(e.heritageClauses,89);return t?t.types:void 0}function Xe(e,t){if(e)for(var r=0,n=e;r<n.length;r++){var i=n[r];if(i.token===t)return i}}function Qe(e){return 76<=e&&e<=151}function $e(e){return 121<=e&&e<=151}function Ze(e){return Qe(e)&&!$e(e)}function et(t){return e.isStringLiteralLike(t)||e.isNumericLiteral(t)}function tt(t){return e.isPrefixUnaryExpression(t)&&(39===t.operator||40===t.operator)&&e.isNumericLiteral(t.operand)}function rt(t){var r=e.getNameOfDeclaration(t);return!!r&&nt(r)}function nt(t){if(153!==t.kind&&194!==t.kind)return!1;var r=e.isElementAccessExpression(t)?t.argumentExpression:t.expression;return!et(r)&&!tt(r)&&!it(r)}function it(t){return e.isPropertyAccessExpression(t)&&ut(t.expression)}function at(t){switch(t.kind){case 75:return t.escapedText;case 10:case 8:return e.escapeLeadingUnderscores(t.text);case 153:var r=t.expression;return it(r)?ct(e.idText(r.name)):et(r)?e.escapeLeadingUnderscores(r.text):void 0;default:return e.Debug.assertNever(t)}}function ot(e){switch(e.kind){case 75:case 10:case 14:case 8:return!0;default:return!1}}function st(t){return 75===t.kind?e.idText(t):t.text}function ct(e){return"__@"+e}function ut(e){return 75===e.kind&&"Symbol"===e.escapedText}function lt(e){for(;190===e.kind;)e=e.parent.parent;return e}function _t(t){return e.positionIsSynthesized(t.pos)||e.positionIsSynthesized(t.end)}function dt(e,t,r){switch(e){case 196:return r?0:1;case 206:case 203:case 204:case 202:case 205:case 209:case 211:return 1;case 208:switch(t){case 42:case 62:case 63:case 64:case 66:case 65:case 67:case 68:case 69:case 70:case 71:case 72:case 74:case 73:return 1}}return 0}function pt(e){return 208===e.kind?e.operatorToken.kind:206===e.kind||207===e.kind?e.operator:e.kind}function ft(e,t,r){switch(e){case 320:return 0;case 212:return 1;case 211:return 2;case 209:return 4;case 208:switch(t){case 27:return 0;case 62:case 63:case 64:case 66:case 65:case 67:case 68:case 69:case 70:case 71:case 72:case 74:case 73:return 3;default:return mt(t)}case 206:case 203:case 204:case 202:case 205:return 16;case 207:return 17;case 195:return 18;case 196:return r?19:18;case 197:case 193:case 194:return 19;case 103:case 101:case 75:case 99:case 105:case 90:case 8:case 9:case 10:case 191:case 192:case 200:case 201:case 213:case 264:case 265:case 268:case 13:case 14:case 210:case 199:case 214:return 20;default:return-1}}function mt(e){switch(e){case 60:return 4;case 56:return 5;case 55:return 6;case 51:return 7;case 52:return 8;case 50:return 9;case 34:case 35:case 36:case 37:return 10;case 29:case 31:case 32:case 33:case 97:case 96:case 122:return 11;case 47:case 48:case 49:return 12;case 39:case 40:return 13;case 41:case 43:case 44:return 14;case 42:return 15}return-1}e.isPartOfTypeNode=W,e.isChildOfNodeWithKind=function(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1},e.forEachReturnStatement=function(t,r){return function t(n){switch(n.kind){case 234:return r(n);case 250:case 222:case 226:case 227:case 228:case 229:case 230:case 231:case 235:case 236:case 275:case 276:case 237:case 239:case 278:return e.forEachChild(n,t)}}(t)},e.forEachYieldExpression=function(t,r){return function t(n){switch(n.kind){case 211:r(n);var i=n.expression;return void(i&&t(i));case 247:case 245:case 248:case 246:case 244:case 213:return;default:if(e.isFunctionLike(n)){if(n.name&&153===n.name.kind)return void t(n.name.expression)}else W(n)||e.forEachChild(n,t)}}(t)},e.getRestParameterElementType=function(t){return t&&173===t.kind?t.elementType:t&&168===t.kind?e.singleOrUndefined(t.typeArguments):void 0},e.getMembersOfDeclaration=function(e){switch(e.kind){case 245:case 244:case 213:case 172:return e.members;case 192:return e.properties}},e.isVariableLike=G,e.isVariableLikeOrAccessor=function(t){return G(t)||e.isAccessor(t)},e.isVariableDeclarationInVariableStatement=H,e.isValidESSymbolDeclaration=function(t){return e.isVariableDeclaration(t)?K(t)&&e.isIdentifier(t.name)&&H(t):e.isPropertyDeclaration(t)?Yt(t)&&Ht(t):e.isPropertySignature(t)&&Yt(t)},e.introducesArgumentsExoticObject=function(e){switch(e.kind){case 160:case 159:case 161:case 162:case 163:case 243:case 200:return!0}return!1},e.unwrapInnermostStatementOfLabel=function(e,t){for(;;){if(t&&t(e),237!==e.statement.kind)return e.statement;e=e.statement}},e.isFunctionBlock=function(t){return t&&222===t.kind&&e.isFunctionLike(t.parent)},e.isObjectLiteralMethod=function(e){return e&&160===e.kind&&192===e.parent.kind},e.isObjectLiteralOrClassExpressionMethod=function(e){return 160===e.kind&&(192===e.parent.kind||213===e.parent.kind)},e.isIdentifierTypePredicate=function(e){return e&&1===e.kind},e.isThisTypePredicate=function(e){return e&&0===e.kind},e.getPropertyAssignment=Y,e.getTsConfigObjectLiteralExpression=X,e.getTsConfigPropArrayElementValue=function(t,r,n){return e.firstDefined(Q(t,r),(function(t){return e.isArrayLiteralExpression(t.initializer)?e.find(t.initializer.elements,(function(t){return e.isStringLiteral(t)&&t.text===n})):void 0}))},e.getTsConfigPropArray=Q,e.getContainingFunction=function(t){return s(t.parent,e.isFunctionLike)},e.getContainingFunctionDeclaration=function(t){return s(t.parent,e.isFunctionLikeDeclaration)},e.getContainingClass=function(t){return s(t.parent,e.isClassLike)},e.getThisContainer=$,e.getNewTargetContainer=function(e){var t=$(e,!1);if(t)switch(t.kind){case 161:case 243:case 200:return t}},e.getSuperContainer=function(t,r){for(;;){if(!(t=t.parent))return t;switch(t.kind){case 153:t=t.parent;break;case 243:case 200:case 201:if(!r)continue;case 158:case 157:case 160:case 159:case 161:case 162:case 163:return t;case 156:155===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent)}}},e.getImmediatelyInvokedFunctionExpression=function(e){if(200===e.kind||201===e.kind){for(var t=e,r=e.parent;199===r.kind;)t=r,r=r.parent;if(195===r.kind&&r.expression===t)return r}},e.isSuperOrSuperProperty=function(e){return 101===e.kind||Z(e)},e.isSuperProperty=Z,e.isThisProperty=function(e){var t=e.kind;return(193===t||194===t)&&103===e.expression.kind},e.getEntityNameFromTypeNode=function(e){switch(e.kind){case 168:return e.typeName;case 215:return ar(e.expression)?e.expression:void 0;case 75:case 152:return e}},e.getInvokedExpression=function(e){switch(e.kind){case 197:return e.tag;case 266:case 265:return e.tagName;default:return e.expression}},e.nodeCanBeDecorated=ee,e.nodeIsDecorated=te,e.nodeOrChildIsDecorated=re,e.childIsDecorated=ne,e.isJSXTagName=ie,e.isExpressionNode=ae,e.isInExpressionContext=oe,e.isExternalModuleImportEqualsDeclaration=se,e.getExternalModuleImportEqualsDeclarationExpression=function(t){return e.Debug.assert(se(t)),t.moduleReference.expression},e.isInternalModuleImportEqualsDeclaration=function(e){return 252===e.kind&&263!==e.moduleReference.kind},e.isSourceFileJS=ce,e.isSourceFileNotJS=function(e){return!ue(e)},e.isInJSFile=ue,e.isInJsonFile=function(e){return!!e&&!!(33554432&e.flags)},e.isInJSDoc=function(e){return!!e&&!!(4194304&e.flags)},e.isJSDocIndexSignature=function(t){return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText&&t.typeArguments&&2===t.typeArguments.length&&(142===t.typeArguments[0].kind||139===t.typeArguments[0].kind)},e.isRequireCall=le,e.isSingleOrDoubleQuote=function(e){return 39===e||34===e},e.isStringDoubleQuoted=function(e,t){return 34===x(t,e).charCodeAt(0)},e.getDeclarationOfExpando=function(t){if(t.parent){var r,n;if(e.isVariableDeclaration(t.parent)&&t.parent.initializer===t){if(!ue(t)&&!K(t.parent))return;r=t.parent.name,n=t.parent}else if(e.isBinaryExpression(t.parent)){var i=t.parent,a=t.parent.operatorToken.kind;if(62===a&&i.right===t)n=r=i.left;else if(!(56!==a&&60!==a||(e.isVariableDeclaration(i.parent)&&i.parent.initializer===i?(r=i.parent.name,n=i.parent):e.isBinaryExpression(i.parent)&&62===i.parent.operatorToken.kind&&i.parent.right===i&&(n=r=i.parent.left),r&&De(r)&&pe(r,i.left))))return}if(r&&de(t,sr(r)))return n}},e.isAssignmentDeclaration=function(t){return e.isBinaryExpression(t)||Cr(t)||e.isIdentifier(t)||e.isCallExpression(t)},e.getEffectiveInitializer=_e,e.getDeclaredExpandoInitializer=function(e){var t=_e(e);return t&&de(t,sr(e.name))},e.getAssignedExpandoInitializer=function(t){if(t&&t.parent&&e.isBinaryExpression(t.parent)&&62===t.parent.operatorToken.kind){var r=sr(t.parent.left);return de(t.parent.right,r)||function(t,r,n){var i=e.isBinaryExpression(r)&&(56===r.operatorToken.kind||60===r.operatorToken.kind)&&de(r.right,n);if(i&&pe(t,r.left))return i}(t.parent.left,t.parent.right,r)}if(t&&e.isCallExpression(t)&&ye(t)){var n=function(t,r){return e.forEach(t.properties,(function(t){return e.isPropertyAssignment(t)&&e.isIdentifier(t.name)&&"value"===t.name.escapedText&&t.initializer&&de(t.initializer,r)}))}(t.arguments[2],"prototype"===t.arguments[1].text);if(n)return n}},e.getExpandoInitializer=de,e.isDefaultedExpandoInitializer=function(t){var r=e.isVariableDeclaration(t.parent)?t.parent.name:e.isBinaryExpression(t.parent)&&62===t.parent.operatorToken.kind?t.parent.left:void 0;return r&&de(t.right,sr(r))&&ar(r)&&pe(r,t.left)},e.getNameOfExpando=function(t){if(e.isBinaryExpression(t.parent)){var r=56!==t.parent.operatorToken.kind&&60!==t.parent.operatorToken.kind||!e.isBinaryExpression(t.parent.parent)?t.parent:t.parent.parent;if(62===r.operatorToken.kind&&e.isIdentifier(r.left))return r.left}else if(e.isVariableDeclaration(t.parent))return t.parent.name},e.getRightMostAssignedExpression=function(e){for(;nr(e,!0);)e=e.right;return e},e.isExportsIdentifier=fe,e.isModuleExportsAccessExpression=me,e.getAssignmentDeclarationKind=ge,e.isBindableObjectDefinePropertyCall=ye,e.isLiteralLikeAccess=he,e.isLiteralLikeElementAccess=ve,e.isBindableStaticAccessExpression=be,e.isBindableStaticElementAccessExpression=xe,e.isBindableStaticNameExpression=De,e.getNameOrArgument=Se,e.getElementOrPropertyAccessArgumentExpressionOrName=Te,e.getElementOrPropertyAccessName=Ee,e.getAssignmentDeclarationPropertyAccessKind=Ce,e.getInitializerOfBinaryExpression=ke,e.isPrototypePropertyAssignment=function(t){return e.isBinaryExpression(t)&&3===ge(t)},e.isSpecialPropertyDeclaration=function(t){return ue(t)&&t.parent&&225===t.parent.kind&&(!e.isElementAccessExpression(t)||ve(t))&&!!e.getJSDocTypeTag(t.parent)},e.isFunctionSymbol=function(t){if(!t||!t.valueDeclaration)return!1;var r=t.valueDeclaration;return 243===r.kind||e.isVariableDeclaration(r)&&r.initializer&&e.isFunctionLike(r.initializer)},e.importFromModuleSpecifier=function(t){return Ne(t)||e.Debug.failBadSyntaxKind(t.parent)},e.tryGetImportFromModuleSpecifier=Ne,e.getExternalModuleName=function(t){switch(t.kind){case 253:case 259:return t.moduleSpecifier;case 252:return 263===t.moduleReference.kind?t.moduleReference.expression:void 0;case 187:return z(t)?t.argument.literal:void 0;default:return e.Debug.assertNever(t)}},e.getNamespaceDeclarationNode=function(t){switch(t.kind){case 253:return t.importClause&&e.tryCast(t.importClause.namedBindings,e.isNamespaceImport);case 252:return t;case 259:return;default:return e.Debug.assertNever(t)}},e.isDefaultImport=function(e){return 253===e.kind&&!!e.importClause&&!!e.importClause.name},e.hasQuestionToken=function(e){if(e)switch(e.kind){case 155:case 160:case 159:case 280:case 279:case 158:case 157:return void 0!==e.questionToken}return!1},e.isJSDocConstructSignature=function(t){var r=e.isJSDocFunctionType(t)?e.firstOrUndefined(t.parameters):void 0,n=e.tryCast(r&&r.name,e.isIdentifier);return!!n&&"new"===n.escapedText},e.isJSDocTypeAlias=Ae,e.isTypeAlias=function(t){return Ae(t)||e.isTypeAliasDeclaration(t)},e.getSingleInitializerOfVariableStatementOrPropertyDeclaration=Pe,e.getJSDocCommentsAndTags=function(t){var r;G(t)&&e.hasInitializer(t)&&e.hasJSDocNodes(t.initializer)&&(r=e.append(r,e.last(t.initializer.jsDoc)));for(var n=t;n&&n.parent;){if(e.hasJSDocNodes(n)&&(r=e.append(r,e.last(n.jsDoc))),155===n.kind){r=e.addRange(r,e.getJSDocParameterTags(n));break}if(154===n.kind){r=e.addRange(r,e.getJSDocTypeParameterTags(n));break}n=Oe(n)}return r||e.emptyArray},e.getParameterSymbolFromJSDoc=function(t){if(t.symbol)return t.symbol;if(e.isIdentifier(t.name)){var r=t.name.escapedText,n=Me(t);if(n){var i=e.find(n.parameters,(function(e){return 75===e.name.kind&&e.name.escapedText===r}));return i&&i.symbol}}},e.getHostSignatureFromJSDoc=Me,e.getHostSignatureFromJSDocHost=Le,e.getJSDocHost=Re,e.getTypeParameterFromJsDoc=function(t){var r=t.name.escapedText,n=t.parent.parent.parent.typeParameters;return n&&e.find(n,(function(e){return e.name.escapedText===r}))},e.hasRestParameter=function(t){var r=e.lastOrUndefined(t.parameters);return!!r&&Be(r)},e.isRestParameter=Be,function(e){e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound"}(e.AssignmentKind||(e.AssignmentKind={})),e.getAssignmentTargetKind=je,e.isAssignmentTarget=function(e){return 0!==je(e)},e.isNodeWithPossibleHoistedDeclaration=function(e){switch(e.kind){case 222:case 224:case 235:case 226:case 236:case 250:case 275:case 276:case 237:case 229:case 230:case 231:case 227:case 228:case 239:case 278:return!0}return!1},e.isValueSignatureDeclaration=function(t){return e.isFunctionExpression(t)||e.isArrowFunction(t)||e.isMethodOrAccessor(t)||e.isFunctionDeclaration(t)||e.isConstructorDeclaration(t)},e.walkUpParenthesizedTypes=function(e){return Ke(e,181)},e.walkUpParenthesizedExpressions=Je,e.skipParentheses=ze,e.isDeleteTarget=function(e){return(193===e.kind||194===e.kind)&&((e=Je(e.parent))&&202===e.kind)},e.isNodeDescendantOf=function(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1},e.isDeclarationName=function(t){return!e.isSourceFile(t)&&!e.isBindingPattern(t)&&e.isDeclaration(t.parent)&&t.parent.name===t},e.getDeclarationFromName=function(t){var r=t.parent;switch(t.kind){case 10:case 14:case 8:if(e.isComputedPropertyName(r))return r.parent;case 75:if(e.isDeclaration(r))return r.name===t?r:void 0;if(e.isQualifiedName(r)){var n=r.parent;return e.isJSDocParameterTag(n)&&n.name===r?n:void 0}var i=r.parent;return e.isBinaryExpression(i)&&0!==ge(i)&&(i.left.symbol||i.symbol)&&e.getNameOfDeclaration(i)===t?i:void 0;default:return}},e.isLiteralComputedPropertyDeclarationName=function(t){return et(t)&&153===t.parent.kind&&e.isDeclaration(t.parent.parent)},e.isIdentifierName=function(e){var t=e.parent;switch(t.kind){case 158:case 157:case 160:case 159:case 162:case 163:case 282:case 279:case 193:return t.name===e;case 152:if(t.right===e){for(;152===t.kind;)t=t.parent;return 171===t.kind||168===t.kind}return!1;case 190:case 257:return t.propertyName===e;case 261:case 271:return!0}return!1},e.isAliasSymbolDeclaration=function(t){return 252===t.kind||251===t.kind||254===t.kind&&!!t.name||255===t.kind||257===t.kind||261===t.kind||258===t.kind&&Ve(t)||e.isBinaryExpression(t)&&2===ge(t)&&Ve(t)||e.isPropertyAccessExpression(t)&&e.isBinaryExpression(t.parent)&&t.parent.left===t&&62===t.parent.operatorToken.kind&&Ue(t.parent.right)||280===t.kind||279===t.kind&&Ue(t.initializer)},e.exportAssignmentIsAlias=Ve,e.getExportAssignmentExpression=qe,e.getPropertyAssignmentAliasLikeExpression=function(e){return 280===e.kind?e.name:279===e.kind?e.initializer:e.parent.right},e.getEffectiveBaseTypeNode=We,e.getClassExtendsHeritageElement=Ge,e.getClassImplementsHeritageClauseElements=He,e.getAllSuperTypeNodes=function(t){return e.isInterfaceDeclaration(t)?Ye(t)||e.emptyArray:e.isClassLike(t)&&e.concatenate(e.singleElementArray(We(t)),He(t))||e.emptyArray},e.getInterfaceBaseTypeNodes=Ye,e.getHeritageClause=Xe,e.getAncestor=function(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}},e.isKeyword=Qe,e.isContextualKeyword=$e,e.isNonContextualKeyword=Ze,e.isFutureReservedKeyword=function(e){return 112<=e&&e<=120},e.isStringANonContextualKeyword=function(t){var r=e.stringToToken(t);return void 0!==r&&Ze(r)},e.isStringAKeyword=function(t){var r=e.stringToToken(t);return void 0!==r&&Qe(r)},e.isIdentifierANonContextualKeyword=function(e){var t=e.originalKeywordKind;return!!t&&!$e(t)},e.isTrivia=function(e){return 2<=e&&e<=7},function(e){e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator"}(e.FunctionFlags||(e.FunctionFlags={})),e.getFunctionFlags=function(e){if(!e)return 4;var t=0;switch(e.kind){case 243:case 200:case 160:e.asteriskToken&&(t|=1);case 201:Gt(e,256)&&(t|=2)}return e.body||(t|=4),t},e.isAsyncFunction=function(e){switch(e.kind){case 243:case 200:case 201:case 160:return void 0!==e.body&&void 0===e.asteriskToken&&Gt(e,256)}return!1},e.isStringOrNumericLiteralLike=et,e.isSignedNumericLiteral=tt,e.hasDynamicName=rt,e.isDynamicName=nt,e.isWellKnownSymbolSyntactically=it,e.getPropertyNameForPropertyNameNode=at,e.isPropertyNameLiteral=ot,e.getTextOfIdentifierOrLiteral=st,e.getEscapedTextOfIdentifierOrLiteral=function(t){return 75===t.kind?t.escapedText:e.escapeLeadingUnderscores(t.text)},e.getPropertyNameForKnownSymbolName=ct,e.isKnownSymbol=function(t){return e.startsWith(t.escapedName,"__@")},e.isESSymbolIdentifier=ut,e.isPushOrUnshiftIdentifier=function(e){return"push"===e.escapedText||"unshift"===e.escapedText},e.isParameterDeclaration=function(e){return 155===lt(e).kind},e.getRootDeclaration=lt,e.nodeStartsNewLexicalEnvironment=function(e){var t=e.kind;return 161===t||200===t||243===t||201===t||160===t||162===t||163===t||248===t||288===t},e.nodeIsSynthesized=_t,e.getOriginalSourceFile=function(t){return e.getParseTreeNode(t,e.isSourceFile)||t},function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(e.Associativity||(e.Associativity={})),e.getExpressionAssociativity=function(e){var t=pt(e),r=196===e.kind&&void 0!==e.arguments;return dt(e.kind,t,r)},e.getOperatorAssociativity=dt,e.getExpressionPrecedence=function(e){var t=pt(e),r=196===e.kind&&void 0!==e.arguments;return ft(e.kind,t,r)},e.getOperator=pt,e.getOperatorPrecedence=ft,e.getBinaryOperatorPrecedence=mt,e.createDiagnosticCollection=function(){var t=[],r=[],n=e.createMap(),i=!1;return{add:function(a){var o;a.file?(o=n.get(a.file.fileName))||(o=[],n.set(a.file.fileName,o),e.insertSorted(r,a.file.fileName,e.compareStringsCaseSensitive)):(i&&(i=!1,t=t.slice()),o=t);e.insertSorted(o,a,e.compareDiagnostics)},lookup:function(r){var i;i=r.file?n.get(r.file.fileName):t;if(!i)return;var a=e.binarySearch(i,r,e.identity,e.compareDiagnosticsSkipRelatedInformation);if(a>=0)return i[a];return},getGlobalDiagnostics:function(){return i=!0,t},getDiagnostics:function(i){if(i)return n.get(i)||[];var a=e.flatMapToMutable(r,(function(e){return n.get(e)}));if(!t.length)return a;return a.unshift.apply(a,t),a},reattachFileDiagnostics:function(t){e.forEach(n.get(t.fileName),(function(e){return e.file=t}))}}};var gt=/\$\{/g;var yt=/[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,ht=/[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,vt=/[\\\`]/g,bt=e.createMapFromTemplate({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085"});function xt(e,t){var r=96===t?vt:39===t?ht:yt;return e.replace(r,Dt)}function Dt(e,t,r){if(0===e.charCodeAt(0)){var n=r.charCodeAt(t+e.length);return n>=48&&n<=57?"\\x00":"\\0"}return bt.get(e)||St(e.charCodeAt(0))}function St(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}e.escapeString=xt,e.stripQuotes=function(e){var t,r=e.length;return r>=2&&e.charCodeAt(0)===e.charCodeAt(r-1)&&(39===(t=e.charCodeAt(0))||34===t||96===t)?e.substring(1,r-1):e},e.isIntrinsicJsxName=function(t){var r=t.charCodeAt(0);return r>=97&&r<=122||e.stringContains(t,"-")};var Tt=/[^\u0000-\u007F]/g;function Et(e,t){return e=xt(e,t),Tt.test(e)?e.replace(Tt,(function(e){return St(e.charCodeAt(0))})):e}e.escapeNonAsciiString=Et;var Ct=[""," "];function kt(e){return void 0===Ct[e]&&(Ct[e]=kt(e-1)+Ct[1]),Ct[e]}function Nt(){return Ct[1].length}function At(e,t,r){return t.moduleName||Ft(e,t.fileName,r&&r.fileName)}function Ft(t,r,n){var i=function(e){return t.getCanonicalFileName(e)},a=e.toPath(n?e.getDirectoryPath(n):t.getCommonSourceDirectory(),t.getCurrentDirectory(),i),o=e.getNormalizedAbsolutePath(r,t.getCurrentDirectory()),s=e.getRelativePathToDirectoryOrUrl(a,o,a,i,!1),c=e.removeFileExtension(s);return n?e.ensurePathIsNonModuleName(c):c}function Pt(t,r,n,i,a){var o=r.declarationDir||r.outDir,s=o?Ot(t,o,n,i,a):t;return e.removeFileExtension(s)+".d.ts"}function wt(e,t,r,n){return!(t.noEmitForJsFiles&&ce(e)||e.isDeclarationFile||r(e)||j(e)&&n(e.fileName))}function It(e,t,r){return Ot(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))}function Ot(t,r,n,i,a){var o=e.getNormalizedAbsolutePath(t,n);return o=0===a(o).indexOf(a(i))?o.substring(i.length):o,e.combinePaths(r,o)}function Mt(t,r){return e.getLineAndCharacterOfPosition(t,r).line}function Lt(t,r){return e.computeLineAndCharacterOfPosition(t,r).line}function Rt(e){if(e&&e.parameters.length>0){var t=2===e.parameters.length&&Bt(e.parameters[0]);return e.parameters[t?1:0]}}function Bt(e){return jt(e.name)}function jt(e){return!!e&&75===e.kind&&Kt(e)}function Kt(e){return 103===e.originalKeywordKind}function Jt(t){var r=t.type;return r||!ue(t)?r:e.isJSDocPropertyLikeTag(t)?t.typeExpression&&t.typeExpression.type:e.getJSDocType(t)}function zt(e,t,r,n){Ut(e,t,r.pos,n)}function Ut(e,t,r,n){n&&n.length&&r!==n[0].pos&&Lt(e,r)!==Lt(e,n[0].pos)&&t.writeLine()}function Vt(e,t,r,n,i,a,o,s){if(n&&n.length>0){i&&r.writeSpace(" ");for(var c=!1,u=0,l=n;u<l.length;u++){var _=l[u];c&&(r.writeSpace(" "),c=!1),s(e,t,r,_.pos,_.end,o),_.hasTrailingNewLine?r.writeLine():c=!0}c&&a&&r.writeSpace(" ")}}function qt(e,t,r,n,i,a){var o=Math.min(t,a-1),s=e.substring(i,o).replace(/^\s+|\s+$/g,"");s?(r.writeComment(s),o!==t&&r.writeLine()):r.rawWrite(n)}function Wt(t,r,n){for(var i=0;r<n&&e.isWhiteSpaceSingleLine(t.charCodeAt(r));r++)9===t.charCodeAt(r)?i+=Nt()-i%Nt():i++;return i}function Gt(e,t){return!!Xt(e,t)}function Ht(e){return Gt(e,32)}function Yt(e){return Gt(e,64)}function Xt(e,t){return Qt(e)&t}function Qt(e){if(536870912&e.modifierFlagsCache)return-536870913&e.modifierFlagsCache;var t=$t(e);return e.modifierFlagsCache=536870912|t,t}function $t(e){var t=0;if(e.modifiers)for(var r=0,n=e.modifiers;r<n.length;r++){t|=Zt(n[r].kind)}return(4&e.flags||75===e.kind&&e.isInJSDocNamespace)&&(t|=1),t}function Zt(e){switch(e){case 119:return 32;case 118:return 4;case 117:return 16;case 116:return 8;case 121:return 128;case 88:return 1;case 129:return 2;case 80:return 2048;case 83:return 512;case 125:return 256;case 137:return 64}return 0}function er(e){return e>=62&&e<=74}function tr(e){var t=rr(e);return t&&!t.isImplements?t.class:void 0}function rr(t){return e.isExpressionWithTypeArguments(t)&&e.isHeritageClause(t.parent)&&e.isClassLike(t.parent.parent)?{class:t.parent.parent,isImplements:112===t.parent.token}:void 0}function nr(t,r){return e.isBinaryExpression(t)&&(r?62===t.operatorToken.kind:er(t.operatorToken.kind))&&e.isLeftHandSideExpression(t.left)}function ir(e){return void 0!==tr(e)}function ar(e){return 75===e.kind||or(e)}function or(t){return e.isPropertyAccessExpression(t)&&ar(t.expression)}function sr(e){return be(e)&&"prototype"===Ee(e)}e.getIndentString=kt,e.getIndentSize=Nt,e.createTextWriter=function(t){var r,n,i,a,o,s=!1;function c(t){var n=e.computeLineStarts(t);n.length>1?(a=a+n.length-1,o=r.length-t.length+e.last(n),i=o-r.length==0):i=!1}function u(e){e&&e.length&&(i&&(e=kt(n)+e,i=!1),r+=e,c(e))}function l(e){e&&(s=!1),u(e)}function _(){r="",n=0,i=!0,a=0,o=0,s=!1}return _(),{write:l,rawWrite:function(e){void 0!==e&&(r+=e,c(e),s=!1)},writeLiteral:function(e){e&&e.length&&l(e)},writeLine:function(){i||(a++,o=(r+=t).length,i=!0,s=!1)},increaseIndent:function(){n++},decreaseIndent:function(){n--},getIndent:function(){return n},getTextPos:function(){return r.length},getLine:function(){return a},getColumn:function(){return i?n*Nt():r.length-o},getText:function(){return r},isAtStartOfLine:function(){return i},hasTrailingComment:function(){return s},hasTrailingWhitespace:function(){return!!r.length&&e.isWhiteSpaceLike(r.charCodeAt(r.length-1))},clear:_,reportInaccessibleThisError:e.noop,reportPrivateInBaseOfClassExpression:e.noop,reportInaccessibleUniqueSymbolError:e.noop,trackSymbol:e.noop,writeKeyword:l,writeOperator:l,writeParameter:l,writeProperty:l,writePunctuation:l,writeSpace:l,writeStringLiteral:l,writeSymbol:function(e,t){return l(e)},writeTrailingSemicolon:l,writeComment:function(e){e&&(s=!0),u(e)},getTextPosWithWriteLine:function(){return i?r.length:r.length+t.length}}},e.getTrailingSemicolonDeferringWriter=function(e){var t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return r(r({},e),{writeTrailingSemicolon:function(){t=!0},writeLiteral:function(t){n(),e.writeLiteral(t)},writeStringLiteral:function(t){n(),e.writeStringLiteral(t)},writeSymbol:function(t,r){n(),e.writeSymbol(t,r)},writePunctuation:function(t){n(),e.writePunctuation(t)},writeKeyword:function(t){n(),e.writeKeyword(t)},writeOperator:function(t){n(),e.writeOperator(t)},writeParameter:function(t){n(),e.writeParameter(t)},writeSpace:function(t){n(),e.writeSpace(t)},writeProperty:function(t){n(),e.writeProperty(t)},writeComment:function(t){n(),e.writeComment(t)},writeLine:function(){n(),e.writeLine()},increaseIndent:function(){n(),e.increaseIndent()},decreaseIndent:function(){n(),e.decreaseIndent()}})},e.getResolvedExternalModuleName=At,e.getExternalModuleNameFromDeclaration=function(e,t,r){var n=t.getExternalModuleFileFromDeclaration(r);if(n&&!n.isDeclarationFile)return At(e,n)},e.getExternalModuleNameFromPath=Ft,e.getOwnEmitOutputFilePath=function(t,r,n){var i=r.getCompilerOptions();return(i.outDir?e.removeFileExtension(It(t,r,i.outDir)):e.removeFileExtension(t))+n},e.getDeclarationEmitOutputFilePath=function(e,t){return Pt(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))},e.getDeclarationEmitOutputFilePathWorker=Pt,e.getSourceFilesToEmit=function(t,r){var n=t.getCompilerOptions(),i=function(e){return t.isSourceFileFromExternalLibrary(e)},a=function(e){return t.getResolvedProjectReferenceToRedirect(e)};if(n.outFile||n.out){var o=e.getEmitModuleKind(n),s=n.emitDeclarationOnly||o===e.ModuleKind.AMD||o===e.ModuleKind.System;return e.filter(t.getSourceFiles(),(function(t){return(s||!e.isExternalModule(t))&&wt(t,n,i,a)}))}var c=void 0===r?t.getSourceFiles():[r];return e.filter(c,(function(e){return wt(e,n,i,a)}))},e.sourceFileMayBeEmitted=wt,e.getSourceFilePathInNewDir=It,e.getSourceFilePathInNewDirWorker=Ot,e.writeFile=function(t,r,n,i,a,o){t.writeFile(n,i,a,(function(t){r.add(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,n,t))}),o)},e.getLineOfLocalPosition=Mt,e.getLineOfLocalPositionFromLineMap=Lt,e.getFirstConstructorWithBody=function(t){return e.find(t.members,(function(t){return e.isConstructorDeclaration(t)&&m(t.body)}))},e.getSetAccessorValueParameter=Rt,e.getSetAccessorTypeAnnotationNode=function(e){var t=Rt(e);return t&&t.type},e.getThisParameter=function(t){if(t.parameters.length&&!e.isJSDocSignature(t)){var r=t.parameters[0];if(Bt(r))return r}},e.parameterIsThisKeyword=Bt,e.isThisIdentifier=jt,e.identifierIsThisKeyword=Kt,e.getAllAccessorDeclarations=function(t,r){var n,i,a,o;return rt(r)?(n=r,162===r.kind?a=r:163===r.kind?o=r:e.Debug.fail("Accessor has wrong kind")):e.forEach(t,(function(t){e.isAccessor(t)&&Gt(t,32)===Gt(r,32)&&(at(t.name)===at(r.name)&&(n?i||(i=t):n=t,162!==t.kind||a||(a=t),163!==t.kind||o||(o=t)))})),{firstAccessor:n,secondAccessor:i,getAccessor:a,setAccessor:o}},e.getEffectiveTypeAnnotationNode=Jt,e.getTypeAnnotationNode=function(e){return e.type},e.getEffectiveReturnTypeNode=function(t){return e.isJSDocSignature(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(ue(t)?e.getJSDocReturnType(t):void 0)},e.getJSDocTypeParameterDeclarations=function(t){return e.flatMap(e.getJSDocTags(t),(function(t){return function(t){return e.isJSDocTemplateTag(t)&&!(301===t.parent.kind&&t.parent.tags.some(Ae))}(t)?t.typeParameters:void 0}))},e.getEffectiveSetAccessorTypeAnnotationNode=function(e){var t=Rt(e);return t&&Jt(t)},e.emitNewLineBeforeLeadingComments=zt,e.emitNewLineBeforeLeadingCommentsOfPosition=Ut,e.emitNewLineBeforeLeadingCommentOfPosition=function(e,t,r,n){r!==n&&Lt(e,r)!==Lt(e,n)&&t.writeLine()},e.emitComments=Vt,e.emitDetachedComments=function(t,r,n,i,a,o,s){var c,u;if(s?0===a.pos&&(c=e.filter(e.getLeadingCommentRanges(t,a.pos),(function(e){return v(t,e.pos)}))):c=e.getLeadingCommentRanges(t,a.pos),c){for(var l=[],_=void 0,d=0,p=c;d<p.length;d++){var f=p[d];if(_){var m=Lt(r,_.end);if(Lt(r,f.pos)>=m+2)break}l.push(f),_=f}if(l.length){m=Lt(r,e.last(l).end);Lt(r,e.skipTrivia(t,a.pos))>=m+2&&(zt(r,n,a,c),Vt(t,r,n,l,!1,!0,o,i),u={nodePos:a.pos,detachedCommentEndPos:e.last(l).end})}}return u},e.writeCommentRange=function(t,r,n,i,a,o){if(42===t.charCodeAt(i+1))for(var s=e.computeLineAndCharacterOfPosition(r,i),c=r.length,u=void 0,l=i,_=s.line;l<a;_++){var d=_+1===c?t.length+1:r[_+1];if(l!==i){void 0===u&&(u=Wt(t,r[s.line],i));var p=n.getIndent()*Nt()-u+Wt(t,l,d);if(p>0){var f=p%Nt(),m=kt((p-f)/Nt());for(n.rawWrite(m);f;)n.rawWrite(" "),f--}else n.rawWrite("")}qt(t,a,n,o,l,d),l=d}else n.writeComment(t.substring(i,a))},e.hasModifiers=function(e){return 0!==Qt(e)},e.hasModifier=Gt,e.hasStaticModifier=Ht,e.hasReadonlyModifier=Yt,e.getSelectedModifierFlags=Xt,e.getModifierFlags=Qt,e.getModifierFlagsNoCache=$t,e.modifierToFlag=Zt,e.isLogicalOperator=function(e){return 56===e||55===e||53===e},e.isAssignmentOperator=er,e.tryGetClassExtendingExpressionWithTypeArguments=tr,e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments=rr,e.isAssignmentExpression=nr,e.isDestructuringAssignment=function(e){if(nr(e,!0)){var t=e.left.kind;return 192===t||191===t}return!1},e.isExpressionWithTypeArgumentsInClassExtendsClause=ir,e.isEntityNameExpression=ar,e.getFirstIdentifier=function(e){switch(e.kind){case 75:return e;case 152:do{e=e.left}while(75!==e.kind);return e;case 193:do{e=e.expression}while(75!==e.kind);return e}},e.isDottedName=function e(t){return 75===t.kind||103===t.kind||193===t.kind&&e(t.expression)||199===t.kind&&e(t.expression)},e.isPropertyAccessEntityNameExpression=or,e.tryGetPropertyAccessOrIdentifierToString=function t(r){return e.isPropertyAccessExpression(r)?t(r.expression)+"."+r.name:e.isIdentifier(r)?e.unescapeLeadingUnderscores(r.escapedText):void 0},e.isPrototypeAccess=sr,e.isRightSideOfQualifiedNameOrPropertyAccess=function(e){return 152===e.parent.kind&&e.parent.right===e||193===e.parent.kind&&e.parent.name===e},e.isEmptyObjectLiteral=function(e){return 192===e.kind&&0===e.properties.length},e.isEmptyArrayLiteral=function(e){return 191===e.kind&&0===e.elements.length},e.getLocalSymbolForExportDefault=function(t){return function(t){return t&&e.length(t.declarations)>0&&Gt(t.declarations[0],512)}(t)?t.declarations[0].localSymbol:void 0},e.tryExtractTSExtension=function(t){return e.find(e.supportedTSExtensionsForExtractExtension,(function(r){return e.fileExtensionIs(t,r)}))};var cr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ur(t){for(var r,n,i,a,o="",s=function(t){for(var r=[],n=t.length,i=0;i<n;i++){var a=t.charCodeAt(i);a<128?r.push(a):a<2048?(r.push(a>>6|192),r.push(63&a|128)):a<65536?(r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)):a<131072?(r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)):e.Debug.assert(!1,"Unexpected code point")}return r}(t),c=0,u=s.length;c<u;)r=s[c]>>2,n=(3&s[c])<<4|s[c+1]>>4,i=(15&s[c+1])<<2|s[c+2]>>6,a=63&s[c+2],c+1>=u?i=a=64:c+2>=u&&(a=64),o+=cr.charAt(r)+cr.charAt(n)+cr.charAt(i)+cr.charAt(a),c+=3;return o}e.convertToBase64=ur,e.base64encode=function(e,t){return e&&e.base64encode?e.base64encode(t):ur(t)},e.base64decode=function(e,t){if(e&&e.base64decode)return e.base64decode(t);for(var r=t.length,n=[],i=0;i<r&&t.charCodeAt(i)!==cr.charCodeAt(64);){var a=cr.indexOf(t[i]),o=cr.indexOf(t[i+1]),s=cr.indexOf(t[i+2]),c=cr.indexOf(t[i+3]),u=(63&a)<<2|o>>4&3,l=(15&o)<<4|s>>2&15,_=(3&s)<<6|63&c;0===l&&0!==s?n.push(u):0===_&&0!==c?n.push(u,l):n.push(u,l,_),i+=4}return function(e){for(var t="",r=0,n=e.length;r<n;){var i=e[r];if(i<128)t+=String.fromCharCode(i),r++;else if(192==(192&i)){for(var a=63&i,o=e[++r];128==(192&o);)a=a<<6|63&o,o=e[++r];t+=String.fromCharCode(a)}else t+=String.fromCharCode(i),r++}return t}(n)},e.readJson=function(t,r){try{var n=r.readFile(t);if(!n)return{};var i=e.parseConfigFileTextToJson(t,n);return i.error?{}:i.config}catch(e){return{}}},e.directoryProbablyExists=function(e,t){return!t.directoryExists||t.directoryExists(e)};var lr,_r="\r\n",dr="\n";function pr(t,r){return void 0===r&&(r=t),e.Debug.assert(r>=t||-1===r),{pos:t,end:r}}function fr(e,t){return pr(t,e.end)}function mr(e){return e.decorators&&e.decorators.length>0?fr(e,e.decorators.end):e}function gr(e,t,r){return yr(hr(e,r),t.end,r)}function yr(e,t,r){return e===t||Mt(r,e)===Mt(r,t)}function hr(t,r){return e.positionIsSynthesized(t.pos)?-1:e.skipTrivia(r.text,t.pos)}function vr(e){return void 0!==e.initializer}function br(e){return 33554432&e.flags?e.checkFlags:0}function xr(t){var r=t.parent;if(!r)return 0;switch(r.kind){case 199:return xr(r);case 207:case 206:var n=r.operator;return 45===n||46===n?c():0;case 208:var i=r,a=i.left,o=i.operatorToken;return a===t&&er(o.kind)?62===o.kind?1:c():0;case 193:return r.name!==t?0:xr(r);case 279:var s=xr(r.parent);return t===r.name?function(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return e.Debug.assertNever(t)}}(s):s;case 280:return t===r.objectAssignmentInitializer?0:xr(r.parent);case 191:return xr(r);default:return 0}function c(){return r.parent&&225===function(e){for(;199===e.kind;)e=e.parent;return e}(r.parent).kind?1:2}}function Dr(e,t,r){var n=r.onDeleteValue,i=r.onExistingValue;e.forEach((function(r,a){var o=t.get(a);void 0===o?(e.delete(a),n(r,a)):i&&i(r,o,a)}))}function Sr(e){if(32&e.flags){var t=Tr(e);return!!t&&Gt(t,128)}return!1}function Tr(t){return e.find(t.declarations,e.isClassLike)}function Er(e){return 3899392&e.flags?e.objectFlags:0}function Cr(e){return 193===e.kind||194===e.kind}e.getNewLineCharacter=function(t,r){switch(t.newLine){case 0:return _r;case 1:return dr}return r?r():e.sys?e.sys.newLine:_r},e.createRange=pr,e.moveRangeEnd=function(e,t){return pr(e.pos,t)},e.moveRangePos=fr,e.moveRangePastDecorators=mr,e.moveRangePastModifiers=function(e){return e.modifiers&&e.modifiers.length>0?fr(e,e.modifiers.end):mr(e)},e.isCollapsedRange=function(e){return e.pos===e.end},e.createTokenRange=function(t,r){return pr(t,t+e.tokenToString(r).length)},e.rangeIsOnSingleLine=function(e,t){return gr(e,e,t)},e.rangeStartPositionsAreOnSameLine=function(e,t,r){return yr(hr(e,r),hr(t,r),r)},e.rangeEndPositionsAreOnSameLine=function(e,t,r){return yr(e.end,t.end,r)},e.rangeStartIsOnSameLineAsRangeEnd=gr,e.rangeEndIsOnSameLineAsRangeStart=function(e,t,r){return yr(e.end,hr(t,r),r)},e.isNodeArrayMultiLine=function(e,t){return!yr(e.pos,e.end,t)},e.positionsAreOnSameLine=yr,e.getStartPositionOfRange=hr,e.isDeclarationNameOfEnumOrNamespace=function(t){var r=e.getParseTreeNode(t);if(r)switch(r.parent.kind){case 247:case 248:return r===r.parent.name}return!1},e.getInitializedVariables=function(t){return e.filter(t.declarations,vr)},e.isWatchSet=function(e){return e.watch&&e.hasOwnProperty("watch")},e.closeFileWatcher=function(e){e.close()},e.getCheckFlags=br,e.getDeclarationModifierFlagsFromSymbol=function(t){if(t.valueDeclaration){var r=e.getCombinedModifierFlags(t.valueDeclaration);return t.parent&&32&t.parent.flags?r:-29&r}if(6&br(t)){var n=t.checkFlags;return(1024&n?8:256&n?4:16)|(2048&n?32:0)}return 4194304&t.flags?36:0},e.skipAlias=function(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e},e.getCombinedLocalAndExportSymbolFlags=function(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags},e.isWriteOnlyAccess=function(e){return 1===xr(e)},e.isWriteAccess=function(e){return 0!==xr(e)},function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(lr||(lr={})),e.compareDataObjects=function e(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(var n in t)if("object"===f(t[n])){if(!e(t[n],r[n]))return!1}else if("function"!=typeof t[n]&&t[n]!==r[n])return!1;return!0},e.clearMap=function(e,t){e.forEach(t),e.clear()},e.mutateMapSkippingNewValues=Dr,e.mutateMap=function(e,t,r){Dr(e,t,r);var n=r.createNewValue;t.forEach((function(t,r){e.has(r)||e.set(r,n(r,t))}))},e.isAbstractConstructorType=function(e){return!!(16&Er(e))&&!!e.symbol&&Sr(e.symbol)},e.isAbstractConstructorSymbol=Sr,e.getClassLikeDeclarationOfSymbol=Tr,e.getObjectFlags=Er,e.typeHasCallOrConstructSignatures=function(e,t){return 0!==t.getSignaturesOfType(e,0).length||0!==t.getSignaturesOfType(e,1).length},e.forSomeAncestorDirectory=function(t,r){return!!e.forEachAncestorDirectory(t,(function(e){return!!r(e)||void 0}))},e.isUMDExportSymbol=function(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&e.isNamespaceExportDeclaration(t.declarations[0])},e.showModuleSpecifier=function(t){var r=t.moduleSpecifier;return e.isStringLiteral(r)?r.text:S(r)},e.getLastChild=function(t){var r;return e.forEachChild(t,(function(e){m(e)&&(r=e)}),(function(e){for(var t=e.length-1;t>=0;t--)if(m(e[t])){r=e[t];break}})),r},e.addToSeen=function(e,t,r){return void 0===r&&(r=!0),t=String(t),!e.has(t)&&(e.set(t,r),!0)},e.isObjectTypeDeclaration=function(t){return e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isTypeLiteralNode(t)},e.isTypeNodeKind=function(e){return e>=167&&e<=187||124===e||147===e||139===e||150===e||140===e||127===e||142===e||143===e||103===e||109===e||145===e||99===e||136===e||215===e||293===e||294===e||295===e||296===e||297===e||298===e||299===e},e.isAccessExpression=Cr,e.isBundleFileTextLike=function(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}},e.getDotOrQuestionDotToken=function(t){return t.questionDotToken||e.createNode(24,t.expression.end,t.name.pos)}}(s||(s={})),function(e){function t(e){return e.start+e.length}function r(e){return 0===e.length}function n(e,t){var r=a(e,t);return r&&0===r.length?void 0:r}function i(e,t,r,n){return r<=e+t&&r+n>=e}function a(e,r){var n=Math.max(e.start,r.start),i=Math.min(t(e),t(r));return n<=i?s(n,i):void 0}function o(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function s(e,t){return o(e,t-e)}function c(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function u(t){return!!e.isBindingPattern(t)&&e.every(t.elements,l)}function l(t){return!!e.isOmittedExpression(t)||u(t.name)}function _(t){for(var r=t.parent;e.isBindingElement(r.parent);)r=r.parent.parent;return r.parent}function d(t,r){e.isBindingElement(t)&&(t=_(t));var n=r(t);return 241===t.kind&&(t=t.parent),t&&242===t.kind&&(n|=r(t),t=t.parent),t&&224===t.kind&&(n|=r(t)),n}function p(e,t){if(e)for(;void 0!==e.original;)e=e.original;return!t||t(e)?e:void 0}function f(e){return 0==(8&e.flags)}function m(e){var t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function g(e){return m(e.escapedText)}function y(t){var r=t.parent.parent;if(r){if(e.isDeclaration(r))return h(r);switch(r.kind){case 224:if(r.declarationList&&r.declarationList.declarations[0])return h(r.declarationList.declarations[0]);break;case 225:var n=r.expression;switch(208===n.kind&&62===n.operatorToken.kind&&(n=n.left),n.kind){case 193:return n.name;case 194:var i=n.argumentExpression;if(e.isIdentifier(i))return i}break;case 199:return h(r.expression);case 237:if(e.isDeclaration(r.statement)||e.isExpression(r.statement))return h(r.statement)}}}function h(t){var r=D(t);return r&&e.isIdentifier(r)?r:void 0}function v(e){return e.name||y(e)}function b(e){return!!e.name}function x(t){switch(t.kind){case 75:return t;case 316:case 310:var r=t.name;if(152===r.kind)return r.right;break;case 195:case 208:var n=t;switch(e.getAssignmentDeclarationKind(n)){case 1:case 4:case 5:case 3:return e.getElementOrPropertyAccessArgumentExpressionOrName(n.left);case 7:case 8:case 9:return n.arguments[1];default:return}case 315:return v(t);case 309:return y(t);case 258:var i=t.expression;return e.isIdentifier(i)?i:void 0;case 194:var a=t;if(e.isBindableStaticElementAccessExpression(a))return a.argumentExpression}return t.name}function D(t){if(void 0!==t)return x(t)||(e.isFunctionExpression(t)||e.isClassExpression(t)?function(t){if(!t.parent)return;if(e.isPropertyAssignment(t.parent)||e.isBindingElement(t.parent))return t.parent.name;if(e.isBinaryExpression(t.parent)&&t===t.parent.right){if(e.isIdentifier(t.parent.left))return t.parent.left;if(e.isAccessExpression(t.parent.left))return e.getElementOrPropertyAccessArgumentExpressionOrName(t.parent.left)}else if(e.isVariableDeclaration(t.parent)&&e.isIdentifier(t.parent.name))return t.parent.name}(t):void 0)}function S(t){if(t.name){if(e.isIdentifier(t.name)){var r=t.name.escapedText;return k(t.parent).filter((function(t){return e.isJSDocParameterTag(t)&&e.isIdentifier(t.name)&&t.name.escapedText===r}))}var n=t.parent.parameters.indexOf(t);e.Debug.assert(n>-1,"Parameters should always be in their parents' parameter list");var i=k(t.parent).filter(e.isJSDocParameterTag);if(n<i.length)return[i[n]]}return e.emptyArray}function T(t){return N(t,e.isJSDocReturnTag)}function E(t){var r=N(t,e.isJSDocTypeTag);if(r&&r.typeExpression&&r.typeExpression.type)return r}function C(t){var r=N(t,e.isJSDocTypeTag);return!r&&e.isParameter(t)&&(r=e.find(S(t),(function(e){return!!e.typeExpression}))),r&&r.typeExpression&&r.typeExpression.type}function k(t){var r=t.jsDocCache;if(void 0===r){var n=e.getJSDocCommentsAndTags(t);e.Debug.assert(n.length<2||n[0]!==n[1]),t.jsDocCache=r=e.flatMap(n,(function(t){return e.isJSDoc(t)?t.tags:t}))}return r}function N(t,r){return e.find(k(t),r)}e.getDefaultLibFileName=function(e){switch(e.target){case 99:return"lib.esnext.full.d.ts";case 7:return"lib.es2020.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}},e.textSpanEnd=t,e.textSpanIsEmpty=r,e.textSpanContainsPosition=function(e,r){return r>=e.start&&r<t(e)},e.textRangeContainsPositionInclusive=function(e,t){return t>=e.pos&&t<=e.end},e.textSpanContainsTextSpan=function(e,r){return r.start>=e.start&&t(r)<=t(e)},e.textSpanOverlapsWith=function(e,t){return void 0!==n(e,t)},e.textSpanOverlap=n,e.textSpanIntersectsWithTextSpan=function(e,t){return i(e.start,e.length,t.start,t.length)},e.textSpanIntersectsWith=function(e,t,r){return i(e.start,e.length,t,r)},e.decodedTextSpanIntersectsWith=i,e.textSpanIntersectsWithPosition=function(e,r){return r<=t(e)&&r>=e.start},e.textSpanIntersection=a,e.createTextSpan=o,e.createTextSpanFromBounds=s,e.textChangeRangeNewSpan=function(e){return o(e.span.start,e.newLength)},e.textChangeRangeIsUnchanged=function(e){return r(e.span)&&0===e.newLength},e.createTextChangeRange=c,e.unchangedTextChangeRange=c(o(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=function(r){if(0===r.length)return e.unchangedTextChangeRange;if(1===r.length)return r[0];for(var n=r[0],i=n.span.start,a=t(n.span),o=i+n.newLength,u=1;u<r.length;u++){var l=r[u],_=i,d=a,p=o,f=l.span.start,m=t(l.span),g=f+l.newLength;i=Math.min(_,f),a=Math.max(d,d+(m-p)),o=Math.max(g,g+(p-m))}return c(s(i,a),o-i)},e.getTypeParameterOwner=function(t){if(t&&154===t.kind)for(var r=t;r;r=r.parent)if(e.isFunctionLike(r)||e.isClassLike(r)||245===r.kind)return r},e.isParameterPropertyDeclaration=function(t,r){return e.hasModifier(t,92)&&161===r.kind},e.isEmptyBindingPattern=u,e.isEmptyBindingElement=l,e.walkUpBindingElementsAndPatterns=_,e.getCombinedModifierFlags=function(t){return d(t,e.getModifierFlags)},e.getCombinedNodeFlags=function(e){return d(e,(function(e){return e.flags}))},e.validateLocaleAndSetLanguage=function(t,r,n){var i=/^([a-z]+)([_\-]([a-z]+))?$/.exec(t.toLowerCase());if(i){var a=i[1];o(a,i[3],n)||o(a,void 0,n),e.setUILocale(t)}else n&&n.push(e.createCompilerDiagnostic(e.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1,"en","ja-jp"));function o(t,n,i){var a=e.normalizePath(r.getExecutingFilePath()),o=e.getDirectoryPath(a),s=e.combinePaths(o,t);if(n&&(s=s+"-"+n),s=r.resolvePath(e.combinePaths(s,"diagnosticMessages.generated.json")),!r.fileExists(s))return!1;var c="";try{c=r.readFile(s)}catch(t){return i&&i.push(e.createCompilerDiagnostic(e.Diagnostics.Unable_to_open_file_0,s)),!1}try{e.localizedDiagnosticMessages=JSON.parse(c)}catch(t){return i&&i.push(e.createCompilerDiagnostic(e.Diagnostics.Corrupted_locale_file_0,s)),!1}return!0}},e.getOriginalNode=p,e.isParseTreeNode=f,e.getParseTreeNode=function(e,t){return void 0===e||f(e)?e:!f(e=p(e))||t&&!t(e)?void 0:e},e.escapeLeadingUnderscores=function(e){return e.length>=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e},e.unescapeLeadingUnderscores=m,e.idText=g,e.symbolName=function(e){return m(e.escapedName)},e.nodeHasName=function t(r,n){return!(!b(r)||!e.isIdentifier(r.name)||g(r.name)!==g(n))||!(!e.isVariableStatement(r)||!e.some(r.declarationList.declarations,(function(e){return t(e,n)})))},e.getNameOfJSDocTypedef=v,e.isNamedDeclaration=b,e.getNonAssignedNameOfDeclaration=x,e.getNameOfDeclaration=D,e.getJSDocParameterTags=S,e.getJSDocTypeParameterTags=function(t){var r=t.name.escapedText;return k(t.parent).filter((function(t){return e.isJSDocTemplateTag(t)&&t.typeParameters.some((function(e){return e.name.escapedText===r}))}))},e.hasJSDocParameterTags=function(t){return!!N(t,e.isJSDocParameterTag)},e.getJSDocAugmentsTag=function(t){return N(t,e.isJSDocAugmentsTag)},e.getJSDocClassTag=function(t){return N(t,e.isJSDocClassTag)},e.getJSDocEnumTag=function(t){return N(t,e.isJSDocEnumTag)},e.getJSDocThisTag=function(t){return N(t,e.isJSDocThisTag)},e.getJSDocReturnTag=T,e.getJSDocTemplateTag=function(t){return N(t,e.isJSDocTemplateTag)},e.getJSDocTypeTag=E,e.getJSDocType=C,e.getJSDocReturnType=function(t){var r=T(t);if(r&&r.typeExpression)return r.typeExpression.type;var n=E(t);if(n&&n.typeExpression){var i=n.typeExpression.type;if(e.isTypeLiteralNode(i)){var a=e.find(i.members,e.isCallSignatureDeclaration);return a&&a.type}if(e.isFunctionTypeNode(i))return i.type}},e.getJSDocTags=k,e.getAllJSDocTagsOfKind=function(e,t){return k(e).filter((function(e){return e.kind===t}))},e.getEffectiveTypeParameterDeclarations=function(t){if(e.isJSDocSignature(t))return e.emptyArray;if(e.isJSDocTypeAlias(t))return e.Debug.assert(301===t.parent.kind),e.flatMap(t.parent.tags,(function(t){return e.isJSDocTemplateTag(t)?t.typeParameters:void 0}));if(t.typeParameters)return t.typeParameters;if(e.isInJSFile(t)){var r=e.getJSDocTypeParameterDeclarations(t);if(r.length)return r;var n=C(t);if(n&&e.isFunctionTypeNode(n)&&n.typeParameters)return n.typeParameters}return e.emptyArray},e.getEffectiveConstraintOfTypeParameter=function(t){return t.constraint?t.constraint:e.isJSDocTemplateTag(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0}}(s||(s={})),function(e){function t(e){return 75===e.kind}function r(e){return 168===e.kind}function n(e){return 193===e.kind}function i(e){return 194===e.kind}function a(e){return 195===e.kind}function o(e){switch(e.kind){case 285:case 286:return!0;default:return!1}}e.isNumericLiteral=function(e){return 8===e.kind},e.isBigIntLiteral=function(e){return 9===e.kind},e.isStringLiteral=function(e){return 10===e.kind},e.isJsxText=function(e){return 11===e.kind},e.isRegularExpressionLiteral=function(e){return 13===e.kind},e.isNoSubstitutionTemplateLiteral=function(e){return 14===e.kind},e.isTemplateHead=function(e){return 15===e.kind},e.isTemplateMiddle=function(e){return 16===e.kind},e.isTemplateTail=function(e){return 17===e.kind},e.isIdentifier=t,e.isQualifiedName=function(e){return 152===e.kind},e.isComputedPropertyName=function(e){return 153===e.kind},e.isTypeParameterDeclaration=function(e){return 154===e.kind},e.isParameter=function(e){return 155===e.kind},e.isDecorator=function(e){return 156===e.kind},e.isPropertySignature=function(e){return 157===e.kind},e.isPropertyDeclaration=function(e){return 158===e.kind},e.isMethodSignature=function(e){return 159===e.kind},e.isMethodDeclaration=function(e){return 160===e.kind},e.isConstructorDeclaration=function(e){return 161===e.kind},e.isGetAccessorDeclaration=function(e){return 162===e.kind},e.isSetAccessorDeclaration=function(e){return 163===e.kind},e.isCallSignatureDeclaration=function(e){return 164===e.kind},e.isConstructSignatureDeclaration=function(e){return 165===e.kind},e.isIndexSignatureDeclaration=function(e){return 166===e.kind},e.isGetOrSetAccessorDeclaration=function(e){return 163===e.kind||162===e.kind},e.isTypePredicateNode=function(e){return 167===e.kind},e.isTypeReferenceNode=r,e.isFunctionTypeNode=function(e){return 169===e.kind},e.isConstructorTypeNode=function(e){return 170===e.kind},e.isTypeQueryNode=function(e){return 171===e.kind},e.isTypeLiteralNode=function(e){return 172===e.kind},e.isArrayTypeNode=function(e){return 173===e.kind},e.isTupleTypeNode=function(e){return 174===e.kind},e.isUnionTypeNode=function(e){return 177===e.kind},e.isIntersectionTypeNode=function(e){return 178===e.kind},e.isConditionalTypeNode=function(e){return 179===e.kind},e.isInferTypeNode=function(e){return 180===e.kind},e.isParenthesizedTypeNode=function(e){return 181===e.kind},e.isThisTypeNode=function(e){return 182===e.kind},e.isTypeOperatorNode=function(e){return 183===e.kind},e.isIndexedAccessTypeNode=function(e){return 184===e.kind},e.isMappedTypeNode=function(e){return 185===e.kind},e.isLiteralTypeNode=function(e){return 186===e.kind},e.isImportTypeNode=function(e){return 187===e.kind},e.isObjectBindingPattern=function(e){return 188===e.kind},e.isArrayBindingPattern=function(e){return 189===e.kind},e.isBindingElement=function(e){return 190===e.kind},e.isArrayLiteralExpression=function(e){return 191===e.kind},e.isObjectLiteralExpression=function(e){return 192===e.kind},e.isPropertyAccessExpression=n,e.isPropertyAccessChain=function(e){return n(e)&&!!(32&e.flags)},e.isElementAccessExpression=i,e.isElementAccessChain=function(e){return i(e)&&!!(32&e.flags)},e.isCallExpression=a,e.isCallChain=function(e){return a(e)&&!!(32&e.flags)},e.isOptionalChain=function(e){var t=e.kind;return!!(32&e.flags)&&(193===t||194===t||195===t)},e.isExpressionOfOptionalChainRoot=function(t){return e.isOptionalChainRoot(t.parent)&&t.parent.expression===t},e.isNullishCoalesce=function(e){return 208===e.kind&&60===e.operatorToken.kind},e.isNewExpression=function(e){return 196===e.kind},e.isTaggedTemplateExpression=function(e){return 197===e.kind},e.isTypeAssertion=function(e){return 198===e.kind},e.isConstTypeReference=function(e){return r(e)&&t(e.typeName)&&"const"===e.typeName.escapedText&&!e.typeArguments},e.isParenthesizedExpression=function(e){return 199===e.kind},e.skipPartiallyEmittedExpressions=function(e){for(;319===e.kind;)e=e.expression;return e},e.isFunctionExpression=function(e){return 200===e.kind},e.isArrowFunction=function(e){return 201===e.kind},e.isDeleteExpression=function(e){return 202===e.kind},e.isTypeOfExpression=function(e){return 203===e.kind},e.isVoidExpression=function(e){return 204===e.kind},e.isAwaitExpression=function(e){return 205===e.kind},e.isPrefixUnaryExpression=function(e){return 206===e.kind},e.isPostfixUnaryExpression=function(e){return 207===e.kind},e.isBinaryExpression=function(e){return 208===e.kind},e.isConditionalExpression=function(e){return 209===e.kind},e.isTemplateExpression=function(e){return 210===e.kind},e.isYieldExpression=function(e){return 211===e.kind},e.isSpreadElement=function(e){return 212===e.kind},e.isClassExpression=function(e){return 213===e.kind},e.isOmittedExpression=function(e){return 214===e.kind},e.isExpressionWithTypeArguments=function(e){return 215===e.kind},e.isAsExpression=function(e){return 216===e.kind},e.isNonNullExpression=function(e){return 217===e.kind},e.isMetaProperty=function(e){return 218===e.kind},e.isTemplateSpan=function(e){return 220===e.kind},e.isSemicolonClassElement=function(e){return 221===e.kind},e.isBlock=function(e){return 222===e.kind},e.isVariableStatement=function(e){return 224===e.kind},e.isEmptyStatement=function(e){return 223===e.kind},e.isExpressionStatement=function(e){return 225===e.kind},e.isIfStatement=function(e){return 226===e.kind},e.isDoStatement=function(e){return 227===e.kind},e.isWhileStatement=function(e){return 228===e.kind},e.isForStatement=function(e){return 229===e.kind},e.isForInStatement=function(e){return 230===e.kind},e.isForOfStatement=function(e){return 231===e.kind},e.isContinueStatement=function(e){return 232===e.kind},e.isBreakStatement=function(e){return 233===e.kind},e.isBreakOrContinueStatement=function(e){return 233===e.kind||232===e.kind},e.isReturnStatement=function(e){return 234===e.kind},e.isWithStatement=function(e){return 235===e.kind},e.isSwitchStatement=function(e){return 236===e.kind},e.isLabeledStatement=function(e){return 237===e.kind},e.isThrowStatement=function(e){return 238===e.kind},e.isTryStatement=function(e){return 239===e.kind},e.isDebuggerStatement=function(e){return 240===e.kind},e.isVariableDeclaration=function(e){return 241===e.kind},e.isVariableDeclarationList=function(e){return 242===e.kind},e.isFunctionDeclaration=function(e){return 243===e.kind},e.isClassDeclaration=function(e){return 244===e.kind},e.isInterfaceDeclaration=function(e){return 245===e.kind},e.isTypeAliasDeclaration=function(e){return 246===e.kind},e.isEnumDeclaration=function(e){return 247===e.kind},e.isModuleDeclaration=function(e){return 248===e.kind},e.isModuleBlock=function(e){return 249===e.kind},e.isCaseBlock=function(e){return 250===e.kind},e.isNamespaceExportDeclaration=function(e){return 251===e.kind},e.isImportEqualsDeclaration=function(e){return 252===e.kind},e.isImportDeclaration=function(e){return 253===e.kind},e.isImportClause=function(e){return 254===e.kind},e.isNamespaceImport=function(e){return 255===e.kind},e.isNamedImports=function(e){return 256===e.kind},e.isImportSpecifier=function(e){return 257===e.kind},e.isExportAssignment=function(e){return 258===e.kind},e.isExportDeclaration=function(e){return 259===e.kind},e.isNamedExports=function(e){return 260===e.kind},e.isExportSpecifier=function(e){return 261===e.kind},e.isMissingDeclaration=function(e){return 262===e.kind},e.isExternalModuleReference=function(e){return 263===e.kind},e.isJsxElement=function(e){return 264===e.kind},e.isJsxSelfClosingElement=function(e){return 265===e.kind},e.isJsxOpeningElement=function(e){return 266===e.kind},e.isJsxClosingElement=function(e){return 267===e.kind},e.isJsxFragment=function(e){return 268===e.kind},e.isJsxOpeningFragment=function(e){return 269===e.kind},e.isJsxClosingFragment=function(e){return 270===e.kind},e.isJsxAttribute=function(e){return 271===e.kind},e.isJsxAttributes=function(e){return 272===e.kind},e.isJsxSpreadAttribute=function(e){return 273===e.kind},e.isJsxExpression=function(e){return 274===e.kind},e.isCaseClause=function(e){return 275===e.kind},e.isDefaultClause=function(e){return 276===e.kind},e.isHeritageClause=function(e){return 277===e.kind},e.isCatchClause=function(e){return 278===e.kind},e.isPropertyAssignment=function(e){return 279===e.kind},e.isShorthandPropertyAssignment=function(e){return 280===e.kind},e.isSpreadAssignment=function(e){return 281===e.kind},e.isEnumMember=function(e){return 282===e.kind},e.isSourceFile=function(e){return 288===e.kind},e.isBundle=function(e){return 289===e.kind},e.isUnparsedSource=function(e){return 290===e.kind},e.isUnparsedPrepend=function(e){return 284===e.kind},e.isUnparsedTextLike=o,e.isUnparsedNode=function(e){return o(e)||283===e.kind||287===e.kind},e.isJSDocTypeExpression=function(e){return 292===e.kind},e.isJSDocAllType=function(e){return 293===e.kind},e.isJSDocUnknownType=function(e){return 294===e.kind},e.isJSDocNullableType=function(e){return 295===e.kind},e.isJSDocNonNullableType=function(e){return 296===e.kind},e.isJSDocOptionalType=function(e){return 297===e.kind},e.isJSDocFunctionType=function(e){return 298===e.kind},e.isJSDocVariadicType=function(e){return 299===e.kind},e.isJSDoc=function(e){return 301===e.kind},e.isJSDocAuthorTag=function(e){return 306===e.kind},e.isJSDocAugmentsTag=function(e){return 305===e.kind},e.isJSDocClassTag=function(e){return 307===e.kind},e.isJSDocEnumTag=function(e){return 309===e.kind},e.isJSDocThisTag=function(e){return 312===e.kind},e.isJSDocParameterTag=function(e){return 310===e.kind},e.isJSDocReturnTag=function(e){return 311===e.kind},e.isJSDocTypeTag=function(e){return 313===e.kind},e.isJSDocTemplateTag=function(e){return 314===e.kind},e.isJSDocTypedefTag=function(e){return 315===e.kind},e.isJSDocPropertyTag=function(e){return 316===e.kind},e.isJSDocPropertyLikeTag=function(e){return 316===e.kind||310===e.kind},e.isJSDocTypeLiteral=function(e){return 302===e.kind},e.isJSDocCallbackTag=function(e){return 308===e.kind},e.isJSDocSignature=function(e){return 303===e.kind}}(s||(s={})),function(e){function t(e){return e>=152}function r(e){return 8<=e&&e<=14}function n(e){return 14<=e&&e<=17}function i(e){switch(e){case 121:case 125:case 80:case 129:case 83:case 88:case 118:case 116:case 117:case 137:case 119:return!0}return!1}function a(t){return!!(92&e.modifierToFlag(t))}function o(e){return e&&c(e.kind)}function s(e){switch(e){case 243:case 160:case 161:case 162:case 163:case 200:case 201:return!0;default:return!1}}function c(e){switch(e){case 159:case 164:case 303:case 165:case 166:case 169:case 298:case 170:return!0;default:return s(e)}}function u(e){var t=e.kind;return 161===t||158===t||160===t||162===t||163===t||166===t||221===t}function l(e){var t=e.kind;return 165===t||164===t||157===t||159===t||166===t}function _(e){var t=e.kind;return 279===t||280===t||281===t||160===t||162===t||163===t}function d(e){switch(e.kind){case 188:case 192:return!0}return!1}function p(e){switch(e.kind){case 189:case 191:return!0}return!1}function f(e){switch(e){case 193:case 194:case 196:case 195:case 264:case 265:case 268:case 197:case 191:case 199:case 192:case 213:case 200:case 75:case 13:case 8:case 9:case 10:case 14:case 210:case 90:case 99:case 103:case 105:case 101:case 217:case 218:case 95:return!0;default:return!1}}function m(e){switch(e){case 206:case 207:case 202:case 203:case 204:case 205:case 198:return!0;default:return f(e)}}function g(t){return function(e){switch(e){case 209:case 211:case 201:case 208:case 212:case 216:case 214:case 320:case 319:return!0;default:return m(e)}}(e.skipPartiallyEmittedExpressions(t).kind)}function y(e){return 319===e.kind}function h(e){return 318===e.kind}function v(t){return e.isExportAssignment(t)||e.isExportDeclaration(t)}function b(e){return 243===e||262===e||244===e||245===e||246===e||247===e||248===e||253===e||252===e||259===e||258===e||251===e}function x(e){return 233===e||232===e||240===e||227===e||225===e||223===e||230===e||231===e||229===e||226===e||237===e||234===e||236===e||238===e||239===e||224===e||228===e||235===e||318===e||322===e||321===e}function D(e){return e.kind>=304&&e.kind<=316}function S(e){return!!e.initializer}e.isSyntaxList=function(e){return 317===e.kind},e.isNode=function(e){return t(e.kind)},e.isNodeKind=t,e.isToken=function(e){return e.kind>=0&&e.kind<=151},e.isNodeArray=function(e){return e.hasOwnProperty("pos")&&e.hasOwnProperty("end")},e.isLiteralKind=r,e.isLiteralExpression=function(e){return r(e.kind)},e.isTemplateLiteralKind=n,e.isTemplateLiteralToken=function(e){return n(e.kind)},e.isTemplateMiddleOrTemplateTail=function(e){var t=e.kind;return 16===t||17===t},e.isImportOrExportSpecifier=function(t){return e.isImportSpecifier(t)||e.isExportSpecifier(t)},e.isStringTextContainingNode=function(e){return 10===e.kind||n(e.kind)},e.isGeneratedIdentifier=function(t){return e.isIdentifier(t)&&(7&t.autoGenerateFlags)>0},e.isModifierKind=i,e.isParameterPropertyModifier=a,e.isClassMemberModifier=function(e){return a(e)||119===e},e.isModifier=function(e){return i(e.kind)},e.isEntityName=function(e){var t=e.kind;return 152===t||75===t},e.isPropertyName=function(e){var t=e.kind;return 75===t||10===t||8===t||153===t},e.isBindingName=function(e){var t=e.kind;return 75===t||188===t||189===t},e.isFunctionLike=o,e.isFunctionLikeDeclaration=function(e){return e&&s(e.kind)},e.isFunctionLikeKind=c,e.isFunctionOrModuleBlock=function(t){return e.isSourceFile(t)||e.isModuleBlock(t)||e.isBlock(t)&&o(t.parent)},e.isClassElement=u,e.isClassLike=function(e){return e&&(244===e.kind||213===e.kind)},e.isAccessor=function(e){return e&&(162===e.kind||163===e.kind)},e.isMethodOrAccessor=function(e){switch(e.kind){case 160:case 162:case 163:return!0;default:return!1}},e.isTypeElement=l,e.isClassOrTypeElement=function(e){return l(e)||u(e)},e.isObjectLiteralElementLike=_,e.isTypeNode=function(t){return e.isTypeNodeKind(t.kind)},e.isFunctionOrConstructorTypeNode=function(e){switch(e.kind){case 169:case 170:return!0}return!1},e.isBindingPattern=function(e){if(e){var t=e.kind;return 189===t||188===t}return!1},e.isAssignmentPattern=function(e){var t=e.kind;return 191===t||192===t},e.isArrayBindingElement=function(e){var t=e.kind;return 190===t||214===t},e.isDeclarationBindingElement=function(e){switch(e.kind){case 241:case 155:case 190:return!0}return!1},e.isBindingOrAssignmentPattern=function(e){return d(e)||p(e)},e.isObjectBindingOrAssignmentPattern=d,e.isArrayBindingOrAssignmentPattern=p,e.isPropertyAccessOrQualifiedNameOrImportTypeNode=function(e){var t=e.kind;return 193===t||152===t||187===t},e.isPropertyAccessOrQualifiedName=function(e){var t=e.kind;return 193===t||152===t},e.isCallLikeExpression=function(e){switch(e.kind){case 266:case 265:case 195:case 196:case 197:case 156:return!0;default:return!1}},e.isCallOrNewExpression=function(e){return 195===e.kind||196===e.kind},e.isTemplateLiteral=function(e){var t=e.kind;return 210===t||14===t},e.isLeftHandSideExpression=function(t){return f(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpression=function(t){return m(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpressionWithWrite=function(e){switch(e.kind){case 207:return!0;case 206:return 45===e.operator||46===e.operator;default:return!1}},e.isExpression=g,e.isAssertionExpression=function(e){var t=e.kind;return 198===t||216===t},e.isPartiallyEmittedExpression=y,e.isNotEmittedStatement=h,e.isSyntheticReference=function(e){return 323===e.kind},e.isNotEmittedOrPartiallyEmittedNode=function(e){return h(e)||y(e)},e.isIterationStatement=function e(t,r){switch(t.kind){case 229:case 230:case 231:case 227:case 228:return!0;case 237:return r&&e(t.statement,r)}return!1},e.isScopeMarker=v,e.hasScopeMarker=function(t){return e.some(t,v)},e.needsScopeMarker=function(t){return!(e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)||e.isAmbientModule(t))},e.isExternalModuleIndicator=function(t){return e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)},e.isForInOrOfStatement=function(e){return 230===e.kind||231===e.kind},e.isConciseBody=function(t){return e.isBlock(t)||g(t)},e.isFunctionBody=function(t){return e.isBlock(t)},e.isForInitializer=function(t){return e.isVariableDeclarationList(t)||g(t)},e.isModuleBody=function(e){var t=e.kind;return 249===t||248===t||75===t},e.isNamespaceBody=function(e){var t=e.kind;return 249===t||248===t},e.isJSDocNamespaceBody=function(e){var t=e.kind;return 75===t||248===t},e.isNamedImportBindings=function(e){var t=e.kind;return 256===t||255===t},e.isModuleOrEnumDeclaration=function(e){return 248===e.kind||247===e.kind},e.isDeclaration=function(t){return 154===t.kind?t.parent&&314!==t.parent.kind||e.isInJSFile(t):201===(r=t.kind)||190===r||244===r||213===r||161===r||247===r||282===r||261===r||243===r||200===r||162===r||254===r||252===r||257===r||245===r||271===r||160===r||159===r||248===r||251===r||255===r||155===r||279===r||158===r||157===r||163===r||280===r||246===r||154===r||241===r||315===r||308===r||316===r;var r},e.isDeclarationStatement=function(e){return b(e.kind)},e.isStatementButNotDeclaration=function(e){return x(e.kind)},e.isStatement=function(t){var r=t.kind;return x(r)||b(r)||function(t){if(222!==t.kind)return!1;if(void 0!==t.parent&&(239===t.parent.kind||278===t.parent.kind))return!1;return!e.isFunctionBlock(t)}(t)},e.isModuleReference=function(e){var t=e.kind;return 263===t||152===t||75===t},e.isJsxTagNameExpression=function(e){var t=e.kind;return 103===t||75===t||193===t},e.isJsxChild=function(e){var t=e.kind;return 264===t||274===t||265===t||11===t||268===t},e.isJsxAttributeLike=function(e){var t=e.kind;return 271===t||273===t},e.isStringLiteralOrJsxExpression=function(e){var t=e.kind;return 10===t||274===t},e.isJsxOpeningLikeElement=function(e){var t=e.kind;return 266===t||265===t},e.isCaseOrDefaultClause=function(e){var t=e.kind;return 275===t||276===t},e.isJSDocNode=function(e){return e.kind>=292&&e.kind<=316},e.isJSDocCommentContainingNode=function(t){return 301===t.kind||D(t)||e.isJSDocTypeLiteral(t)||e.isJSDocSignature(t)},e.isJSDocTag=D,e.isSetAccessor=function(e){return 163===e.kind},e.isGetAccessor=function(e){return 162===e.kind},e.isOptionalChainRoot=function(t){return e.isOptionalChain(t)&&!!t.questionDotToken},e.hasJSDocNodes=function(e){var t=e.jsDoc;return!!t&&t.length>0},e.hasType=function(e){return!!e.type},e.hasInitializer=S,e.hasOnlyExpressionInitializer=function(t){return S(t)&&!e.isForStatement(t)&&!e.isForInStatement(t)&&!e.isForOfStatement(t)&&!e.isJsxAttribute(t)},e.isObjectLiteralElement=function(e){return 271===e.kind||273===e.kind||_(e)},e.isTypeReferenceType=function(e){return 168===e.kind||215===e.kind};var T=1073741823;e.guessIndentation=function(t){for(var r=T,n=0,i=t;n<i.length;n++){var a=i[n];if(a.length){for(var o=0;o<a.length&&o<r&&e.isWhiteSpaceLike(a.charCodeAt(o));o++);if(o<r&&(r=o),0===r)return 0}}return r===T?void 0:r},e.isStringLiteralLike=function(e){return 10===e.kind||14===e.kind}}(s||(s={})),function(e){function t(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=void 0,this.mergeId=void 0,this.parent=void 0}function r(t,r){this.flags=r,e.Debug.isDebugging&&(this.checker=t)}function n(t,r){this.flags=r,e.Debug.isDebugging&&(this.checker=t)}function i(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0}function a(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||function(e){return e}}function o(t,r,n){return void 0===n&&(n=0),t.replace(/{(\d+)}/g,(function(t,i){return""+e.Debug.assertDefined(r[+i+n])}))}function s(t){return e.localizedDiagnosticMessages&&e.localizedDiagnosticMessages[t.key]||t.message}function c(e){return e.file?e.file.path:void 0}function u(t,r){return l(t,r)||function(t,r){if(!t.relatedInformation&&!r.relatedInformation)return 0;if(t.relatedInformation&&r.relatedInformation)return e.compareValues(t.relatedInformation.length,r.relatedInformation.length)||e.forEach(t.relatedInformation,(function(e,t){return u(e,r.relatedInformation[t])}))||0;return t.relatedInformation?-1:1}(t,r)||0}function l(t,r){return e.compareStringsCaseSensitive(c(t),c(r))||e.compareValues(t.start,r.start)||e.compareValues(t.length,r.length)||e.compareValues(t.code,r.code)||function t(r,n){if("string"==typeof r&&"string"==typeof n)return e.compareStringsCaseSensitive(r,n);if("string"==typeof r)return-1;if("string"==typeof n)return 1;var i=e.compareStringsCaseSensitive(r.messageText,n.messageText);if(i)return i;if(!r.next&&!n.next)return 0;if(!r.next)return-1;if(!n.next)return 1;var a=Math.min(r.next.length,n.next.length);for(var o=0;o<a;o++)if(i=t(r.next[o],n.next[o]))return i;if(r.next.length<n.next.length)return-1;if(r.next.length>n.next.length)return 1;return 0}(t.messageText,r.messageText)||0}function _(e){return e.target||0}function d(t){return"number"==typeof t.module?t.module:_(t)>=2?e.ModuleKind.ES2015:e.ModuleKind.CommonJS}function p(e){return!(!e.declaration&&!e.composite)}function f(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function m(e,t){return t.strictFlag?f(e,t.name):e[t.name]}function g(t,r,n,i){for(var a=e.getPathComponents(e.toPath(t,n,i)),o=e.getPathComponents(e.toPath(r,n,i));!y(a[a.length-2],i)&&!y(o[o.length-2],i)&&i(a[a.length-1])===i(o[o.length-1]);)a.pop(),o.pop();return[e.getPathFromPathComponents(a),e.getPathFromPathComponents(o)]}function y(t,r){return"node_modules"===r(t)||e.startsWith(t,"@")}e.isNamedImportsOrExports=function(e){return 256===e.kind||260===e.kind},e.objectAllocator={getNodeConstructor:function(){return i},getTokenConstructor:function(){return i},getIdentifierConstructor:function(){return i},getSourceFileConstructor:function(){return i},getSymbolConstructor:function(){return t},getTypeConstructor:function(){return r},getSignatureConstructor:function(){return n},getSourceMapSourceConstructor:function(){return a}},e.formatStringFromArgs=o,e.getLocaleSpecificMessage=s,e.createFileDiagnostic=function(t,r,n,i){e.Debug.assertGreaterThanOrEqual(r,0),e.Debug.assertGreaterThanOrEqual(n,0),t&&(e.Debug.assertLessThanOrEqual(r,t.text.length),e.Debug.assertLessThanOrEqual(r+n,t.text.length));var a=s(i);return arguments.length>4&&(a=o(a,arguments,4)),{file:t,start:r,length:n,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary}},e.formatMessage=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),r},e.createCompilerDiagnostic=function(e){var t=s(e);return arguments.length>1&&(t=o(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary}},e.createCompilerDiagnosticFromMessageChain=function(e){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText}},e.chainDiagnosticMessages=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:void 0===e||Array.isArray(e)?e:[e]}},e.concatenateDiagnosticMessageChains=function(e,t){for(var r=e;r.next;)r=r.next[0];r.next=[t]},e.compareDiagnostics=u,e.compareDiagnosticsSkipRelatedInformation=l,e.getEmitScriptTarget=_,e.getEmitModuleKind=d,e.getEmitModuleResolutionKind=function(t){var r=t.moduleResolution;return void 0===r&&(r=d(t)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic),r},e.hasJsonModuleEmitEnabled=function(t){switch(d(t)){case e.ModuleKind.CommonJS:case e.ModuleKind.AMD:case e.ModuleKind.ES2015:case e.ModuleKind.ESNext:return!0;default:return!1}},e.unreachableCodeIsError=function(e){return!1===e.allowUnreachableCode},e.unusedLabelIsError=function(e){return!1===e.allowUnusedLabels},e.getAreDeclarationMapsEnabled=function(e){return!(!p(e)||!e.declarationMap)},e.getAllowSyntheticDefaultImports=function(t){var r=d(t);return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:t.esModuleInterop||r===e.ModuleKind.System},e.getEmitDeclarations=p,e.isIncrementalCompilation=function(e){return!(!e.incremental&&!e.composite)},e.getStrictOptionValue=f,e.compilerOptionsAffectSemanticDiagnostics=function(t,r){return r!==t&&e.semanticDiagnosticsOptionDeclarations.some((function(n){return!e.isJsonEqual(m(r,n),m(t,n))}))},e.compilerOptionsAffectEmit=function(t,r){return r!==t&&e.affectsEmitOptionDeclarations.some((function(n){return!e.isJsonEqual(m(r,n),m(t,n))}))},e.getCompilerOptionValue=m,e.hasZeroOrOneAsteriskCharacter=function(e){for(var t=!1,r=0;r<e.length;r++)if(42===e.charCodeAt(r)){if(t)return!1;t=!0}return!0},e.discoverProbableSymlinks=function(t,r,n){for(var i=e.createMap(),a=0,o=e.flatten(e.mapDefined(t,(function(t){return t.resolvedModules&&e.compact(e.arrayFrom(e.mapIterator(t.resolvedModules.values(),(function(e){return e&&e.originalPath&&e.resolvedFileName!==e.originalPath?[e.resolvedFileName,e.originalPath]:void 0}))))})));a<o.length;a++){var s=o[a],c=g(s[0],s[1],n,r),u=c[0],l=c[1];i.set(l,u)}return i}}(s||(s={})),function(e){e.tryRemoveDirectoryPrefix=function(t,r,n){var i=e.tryRemovePrefix(t,r,n);return void 0===i?void 0:function(t){return e.isAnyDirectorySeparator(t.charCodeAt(0))?t.slice(1):void 0}(i)};var r=/[^\w\s\/]/g;function n(e){return"\\"+e}e.regExpEscape=function(e){return e.replace(r,n)};var i=[42,63];e.commonPackageFolders=["node_modules","bower_components","jspm_packages"];var a="(?!("+e.commonPackageFolders.join("|")+")(/|$))",o={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:"(/"+a+"[^/.][^/]*)*?",replaceWildcardCharacter:function(e){return p(e,o.singleAsteriskRegexFragment)}},s={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/"+a+"[^/.][^/]*)*?",replaceWildcardCharacter:function(e){return p(e,s.singleAsteriskRegexFragment)}},c={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:function(e){return p(e,c.singleAsteriskRegexFragment)}},u={files:o,directories:s,exclude:c};function l(e,t,r){var n=_(e,t,r);if(n&&n.length)return"^("+n.map((function(e){return"("+e+")"})).join("|")+")"+("exclude"===r?"($|/)":"$")}function _(t,n,i){if(void 0!==t&&0!==t.length)return e.flatMap(t,(function(t){return t&&function(t,n,i,o){var s=o.singleAsteriskRegexFragment,c=o.doubleAsteriskRegexFragment,u=o.replaceWildcardCharacter,l="",_=!1,p=e.getNormalizedPathComponents(t,n),f=e.last(p);if("exclude"!==i&&"**"===f)return;p[0]=e.removeTrailingDirectorySeparator(p[0]),d(f)&&p.push("**","*");for(var m=0,g=0,y=p;g<y.length;g++){var h=y[g];if("**"===h)l+=c;else if("directories"===i&&(l+="(",m++),_&&(l+=e.directorySeparator),"exclude"!==i){var v="";42===h.charCodeAt(0)?(v+="([^./]"+s+")?",h=h.substr(1)):63===h.charCodeAt(0)&&(v+="[^./]",h=h.substr(1)),(v+=h.replace(r,u))!==h&&(l+=a),l+=v}else l+=h.replace(r,u);_=!0}for(;m>0;)l+=")?",m--;return l}(t,n,i,u[i])}))}function d(e){return!/[.*?]/.test(e)}function p(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function m(t,r,n,i,a){t=e.normalizePath(t),a=e.normalizePath(a);var o=e.combinePaths(a,t);return{includeFilePatterns:e.map(_(n,o,"files"),(function(e){return"^"+e+"$"})),includeFilePattern:l(n,o,"files"),includeDirectoryPattern:l(n,o,"directories"),excludePattern:l(r,o,"exclude"),basePaths:y(t,n,i)}}function g(e,t){return new RegExp(e,t?"":"i")}function y(t,r,n){var i=[t];if(r){for(var a=[],o=0,s=r;o<s.length;o++){var c=s[o],u=e.isRootedDiskPath(c)?c:e.normalizePath(e.combinePaths(t,c));a.push(h(u))}a.sort(e.getStringComparer(!n));for(var l=function(r){e.every(i,(function(i){return!e.containsPath(i,r,t,!n)}))&&i.push(r)},_=0,d=a;_<d.length;_++){l(d[_])}}return i}function h(t){var r=e.indexOfAnyCharCode(t,i);return r<0?e.hasExtension(t)?e.removeTrailingDirectorySeparator(e.getDirectoryPath(t)):t:t.substring(0,t.lastIndexOf(e.directorySeparator,r))}function v(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":return 1;case".jsx":return 2;case".ts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}e.getRegularExpressionForWildcard=l,e.getRegularExpressionsForWildcards=_,e.isImplicitGlob=d,e.getFileMatcherPatterns=m,e.getRegexFromPattern=g,e.matchFiles=function(t,r,n,i,a,o,s,c,u){t=e.normalizePath(t),o=e.normalizePath(o);for(var l=m(t,n,i,a,o),_=l.includeFilePatterns&&l.includeFilePatterns.map((function(e){return g(e,a)})),d=l.includeDirectoryPattern&&g(l.includeDirectoryPattern,a),p=l.excludePattern&&g(l.excludePattern,a),f=_?_.map((function(){return[]})):[[]],y=e.createMap(),h=e.createGetCanonicalFileName(a),v=0,b=l.basePaths;v<b.length;v++){var x=b[v];D(x,e.combinePaths(o,x),s)}return e.flatten(f);function D(t,n,i){var a=h(u(n));if(!y.has(a)){y.set(a,!0);for(var o=c(t),s=o.files,l=o.directories,m=function(i){var a=e.combinePaths(t,i),o=e.combinePaths(n,i);if(r&&!e.fileExtensionIsOneOf(a,r))return"continue";if(p&&p.test(o))return"continue";if(_){var s=e.findIndex(_,(function(e){return e.test(o)}));-1!==s&&f[s].push(a)}else f[0].push(a)},g=0,v=e.sort(s,e.compareStringsCaseSensitive);g<v.length;g++){m(S=v[g])}if(void 0===i||0!=--i)for(var b=0,x=e.sort(l,e.compareStringsCaseSensitive);b<x.length;b++){var S=x[b],T=e.combinePaths(t,S),E=e.combinePaths(n,S);d&&!d.test(E)||p&&p.test(E)||D(T,E,i)}}}},e.ensureScriptKind=function(e,t){return t||v(e)||3},e.getScriptKindFromFileName=v,e.supportedTSExtensions=[".ts",".tsx",".d.ts"],e.supportedTSExtensionsWithJson=[".ts",".tsx",".d.ts",".json"],e.supportedTSExtensionsForExtractExtension=[".d.ts",".ts",".tsx"],e.supportedJSExtensions=[".js",".jsx"],e.supportedJSAndJsonExtensions=[".js",".jsx",".json"];var b=t(e.supportedTSExtensions,e.supportedJSExtensions),x=t(e.supportedTSExtensions,e.supportedJSExtensions,[".json"]);function D(r,n){var i=r&&r.allowJs;if(!n||0===n.length)return i?b:e.supportedTSExtensions;var a=t(i?b:e.supportedTSExtensions,e.mapDefined(n,(function(e){return 7===e.scriptKind||i&&(1===(t=e.scriptKind)||2===t)?e.extension:void 0;var t})));return e.deduplicate(a,e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}function S(r,n){return r&&r.resolveJsonModule?n===b?x:n===e.supportedTSExtensions?e.supportedTSExtensionsWithJson:t(n,[".json"]):n}function T(e,t){return e<2?0:e<t.length?2:t.length}e.getSupportedExtensions=D,e.getSuppoertedExtensionsWithJsonIfResolveJsonModule=S,e.hasJSFileExtension=function(t){return e.some(e.supportedJSExtensions,(function(r){return e.fileExtensionIs(t,r)}))},e.hasJSOrJsonFileExtension=function(t){return e.supportedJSAndJsonExtensions.some((function(r){return e.fileExtensionIs(t,r)}))},e.hasTSFileExtension=function(t){return e.some(e.supportedTSExtensions,(function(r){return e.fileExtensionIs(t,r)}))},e.isSupportedSourceFileName=function(t,r,n){if(!t)return!1;for(var i=0,a=S(r,D(r,n));i<a.length;i++){var o=a[i];if(e.fileExtensionIs(t,o))return!0}return!1},function(e){e[e.TypeScriptFiles=0]="TypeScriptFiles",e[e.DeclarationAndJavaScriptFiles=2]="DeclarationAndJavaScriptFiles",e[e.Highest=0]="Highest",e[e.Lowest=2]="Lowest"}(e.ExtensionPriority||(e.ExtensionPriority={})),e.getExtensionPriority=function(t,r){for(var n=r.length-1;n>=0;n--)if(e.fileExtensionIs(t,r[n]))return T(n,r);return 0},e.adjustExtensionPriority=T,e.getNextLowestExtensionPriority=function(e,t){return e<2?2:t.length};var E=[".d.ts",".ts",".js",".tsx",".jsx",".json"];function C(t,r){return e.fileExtensionIs(t,r)?k(t,r):void 0}function k(e,t){return e.substring(0,e.length-t.length)}function N(t){e.Debug.assert(e.hasZeroOrOneAsteriskCharacter(t));var r=t.indexOf("*");return-1===r?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function A(e){return".ts"===e||".tsx"===e||".d.ts"===e}function F(t){return e.find(E,(function(r){return e.fileExtensionIs(t,r)}))}e.removeFileExtension=function(e){for(var t=0,r=E;t<r.length;t++){var n=C(e,r[t]);if(void 0!==n)return n}return e},e.tryRemoveExtension=C,e.removeExtension=k,e.changeExtension=function(t,r){return e.changeAnyExtension(t,r,E,!1)},e.tryParsePattern=N,e.positionIsSynthesized=function(e){return!(e>=0)},e.extensionIsTS=A,e.resolutionExtensionIsTSOrJson=function(e){return A(e)||".json"===e},e.extensionFromPath=function(t){var r=F(t);return void 0!==r?r:e.Debug.fail("File "+t+" has unknown extension.")},e.isAnySupportedFileExtension=function(e){return void 0!==F(e)},e.tryGetExtensionFromPath=F,e.isCheckJsEnabledForFile=function(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs},e.emptyFileSystemEntries={files:e.emptyArray,directories:e.emptyArray},e.matchPatternOrExact=function(t,r){for(var n=[],i=0,a=t;i<a.length;i++){var o=a[i],s=N(o);if(s)n.push(s);else if(o===r)return o}return e.findBestPatternMatch(n,(function(e){return e}),r)},e.sliceAfter=function(t,r){var n=t.indexOf(r);return e.Debug.assert(-1!==n),t.slice(n)},e.addRelatedInfo=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.relatedInformation||(e.relatedInformation=[]),(t=e.relatedInformation).push.apply(t,r),e},e.minAndMax=function(t,r){e.Debug.assert(0!==t.length);for(var n=r(t[0]),i=n,a=1;a<t.length;a++){var o=r(t[a]);o<n?n=o:o>i&&(i=o)}return{min:n,max:i}};var P=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getNodeId(t)),t)},t.prototype.tryAdd=function(e){return!this.has(e)&&(this.add(e),!0)},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.some=function(t){return e.forEachEntry(this.map,t)||!1},t}();e.NodeSet=P;var w=function(){function t(){this.map=e.createMap()}return t.prototype.get=function(t){var r=this.map.get(String(e.getNodeId(t)));return r&&r.value},t.prototype.getOrUpdate=function(e,t){var r=this.get(e);if(r)return r;var n=t();return this.set(e,n),n},t.prototype.set=function(t,r){this.map.set(String(e.getNodeId(t)),{node:t,value:r})},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach((function(t){var r=t.node,n=t.value;return e(n,r)}))},t}();e.NodeMap=w,e.rangeOfNode=function(t){return{pos:e.getTokenPosOfNode(t),end:t.end}},e.rangeOfTypeParameters=function(e){return{pos:e.pos-1,end:e.end+1}},e.skipTypeChecking=function(e,t,r){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||r.isSourceOfProjectReferenceRedirect(e.fileName)},e.isJsonEqual=function t(r,n){return r===n||"object"===f(r)&&null!==r&&"object"===f(n)&&null!==n&&e.equalOwnProperties(r,n,t)},e.getOrUpdate=function(e,t,r){var n=e.get(t);if(void 0===n){var i=r();return e.set(t,i),i}return n},e.parsePseudoBigInt=function(e){var t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:for(var r=e.length-1,n=0;48===e.charCodeAt(n);)n++;return e.slice(n,r)||"0"}for(var i=e.length-1,a=(i-2)*t,o=new Uint16Array((a>>>4)+(15&a?1:0)),s=i-1,c=0;s>=2;s--,c+=t){var u=c>>>4,l=e.charCodeAt(s),_=(l<=57?l-48:10+l-(l<=70?65:97))<<(15&c);o[u]|=_;var d=_>>>16;d&&(o[u+1]|=d)}for(var p="",f=o.length-1,m=!0;m;){var g=0;m=!1;for(u=f;u>=0;u--){var y=g<<16|o[u],h=y/10|0;o[u]=h,g=y-10*h,h&&!m&&(f=u,m=!0)}p=g+p}return p},e.pseudoBigIntToString=function(e){var t=e.negative,r=e.base10Value;return(t&&"0"!==r?"-":"")+r}}(s||(s={})),function(e){var t,r,n,i,a,o,s;function c(e,t){return t&&e(t)}function u(e,t,r){if(r){if(t)return t(r);for(var n=0,i=r;n<i.length;n++){var a=e(i[n]);if(a)return a}}}function l(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function _(t,r,n){if(t&&!(t.kind<=151))switch(t.kind){case 152:return c(r,t.left)||c(r,t.right);case 154:return c(r,t.name)||c(r,t.constraint)||c(r,t.default)||c(r,t.expression);case 280:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||c(r,t.equalsToken)||c(r,t.objectAssignmentInitializer);case 281:return c(r,t.expression);case 155:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.dotDotDotToken)||c(r,t.name)||c(r,t.questionToken)||c(r,t.type)||c(r,t.initializer);case 158:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||c(r,t.type)||c(r,t.initializer);case 157:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.type)||c(r,t.initializer);case 279:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.questionToken)||c(r,t.initializer);case 241:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.exclamationToken)||c(r,t.type)||c(r,t.initializer);case 190:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.dotDotDotToken)||c(r,t.propertyName)||c(r,t.name)||c(r,t.initializer);case 169:case 170:case 164:case 165:case 166:return u(r,n,t.decorators)||u(r,n,t.modifiers)||u(r,n,t.typeParameters)||u(r,n,t.parameters)||c(r,t.type);case 160:case 159:case 161:case 162:case 163:case 200:case 243:case 201:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.asteriskToken)||c(r,t.name)||c(r,t.questionToken)||c(r,t.exclamationToken)||u(r,n,t.typeParameters)||u(r,n,t.parameters)||c(r,t.type)||c(r,t.equalsGreaterThanToken)||c(r,t.body);case 168:return c(r,t.typeName)||u(r,n,t.typeArguments);case 167:return c(r,t.assertsModifier)||c(r,t.parameterName)||c(r,t.type);case 171:return c(r,t.exprName);case 172:return u(r,n,t.members);case 173:return c(r,t.elementType);case 174:return u(r,n,t.elementTypes);case 177:case 178:return u(r,n,t.types);case 179:return c(r,t.checkType)||c(r,t.extendsType)||c(r,t.trueType)||c(r,t.falseType);case 180:return c(r,t.typeParameter);case 187:return c(r,t.argument)||c(r,t.qualifier)||u(r,n,t.typeArguments);case 181:case 183:return c(r,t.type);case 184:return c(r,t.objectType)||c(r,t.indexType);case 185:return c(r,t.readonlyToken)||c(r,t.typeParameter)||c(r,t.questionToken)||c(r,t.type);case 186:return c(r,t.literal);case 188:case 189:case 191:return u(r,n,t.elements);case 192:return u(r,n,t.properties);case 193:return c(r,t.expression)||c(r,t.questionDotToken)||c(r,t.name);case 194:return c(r,t.expression)||c(r,t.questionDotToken)||c(r,t.argumentExpression);case 195:case 196:return c(r,t.expression)||c(r,t.questionDotToken)||u(r,n,t.typeArguments)||u(r,n,t.arguments);case 197:return c(r,t.tag)||c(r,t.questionDotToken)||u(r,n,t.typeArguments)||c(r,t.template);case 198:return c(r,t.type)||c(r,t.expression);case 199:case 202:case 203:case 204:return c(r,t.expression);case 206:return c(r,t.operand);case 211:return c(r,t.asteriskToken)||c(r,t.expression);case 205:return c(r,t.expression);case 207:return c(r,t.operand);case 208:return c(r,t.left)||c(r,t.operatorToken)||c(r,t.right);case 216:return c(r,t.expression)||c(r,t.type);case 217:return c(r,t.expression);case 218:return c(r,t.name);case 209:return c(r,t.condition)||c(r,t.questionToken)||c(r,t.whenTrue)||c(r,t.colonToken)||c(r,t.whenFalse);case 212:return c(r,t.expression);case 222:case 249:return u(r,n,t.statements);case 288:return u(r,n,t.statements)||c(r,t.endOfFileToken);case 224:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.declarationList);case 242:return u(r,n,t.declarations);case 225:return c(r,t.expression);case 226:return c(r,t.expression)||c(r,t.thenStatement)||c(r,t.elseStatement);case 227:return c(r,t.statement)||c(r,t.expression);case 228:return c(r,t.expression)||c(r,t.statement);case 229:return c(r,t.initializer)||c(r,t.condition)||c(r,t.incrementor)||c(r,t.statement);case 230:return c(r,t.initializer)||c(r,t.expression)||c(r,t.statement);case 231:return c(r,t.awaitModifier)||c(r,t.initializer)||c(r,t.expression)||c(r,t.statement);case 232:case 233:return c(r,t.label);case 234:return c(r,t.expression);case 235:return c(r,t.expression)||c(r,t.statement);case 236:return c(r,t.expression)||c(r,t.caseBlock);case 250:return u(r,n,t.clauses);case 275:return c(r,t.expression)||u(r,n,t.statements);case 276:return u(r,n,t.statements);case 237:return c(r,t.label)||c(r,t.statement);case 238:return c(r,t.expression);case 239:return c(r,t.tryBlock)||c(r,t.catchClause)||c(r,t.finallyBlock);case 278:return c(r,t.variableDeclaration)||c(r,t.block);case 156:return c(r,t.expression);case 244:case 213:case 245:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.typeParameters)||u(r,n,t.heritageClauses)||u(r,n,t.members);case 246:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.typeParameters)||c(r,t.type);case 247:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||u(r,n,t.members);case 282:return c(r,t.name)||c(r,t.initializer);case 248:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.body);case 252:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.name)||c(r,t.moduleReference);case 253:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.importClause)||c(r,t.moduleSpecifier);case 254:return c(r,t.name)||c(r,t.namedBindings);case 251:case 255:return c(r,t.name);case 256:case 260:return u(r,n,t.elements);case 259:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.exportClause)||c(r,t.moduleSpecifier);case 257:case 261:return c(r,t.propertyName)||c(r,t.name);case 258:return u(r,n,t.decorators)||u(r,n,t.modifiers)||c(r,t.expression);case 210:return c(r,t.head)||u(r,n,t.templateSpans);case 220:return c(r,t.expression)||c(r,t.literal);case 153:return c(r,t.expression);case 277:return u(r,n,t.types);case 215:return c(r,t.expression)||u(r,n,t.typeArguments);case 263:return c(r,t.expression);case 262:return u(r,n,t.decorators);case 320:return u(r,n,t.elements);case 264:return c(r,t.openingElement)||u(r,n,t.children)||c(r,t.closingElement);case 268:return c(r,t.openingFragment)||u(r,n,t.children)||c(r,t.closingFragment);case 265:case 266:return c(r,t.tagName)||u(r,n,t.typeArguments)||c(r,t.attributes);case 272:return u(r,n,t.properties);case 271:return c(r,t.name)||c(r,t.initializer);case 273:return c(r,t.expression);case 274:return c(r,t.dotDotDotToken)||c(r,t.expression);case 267:return c(r,t.tagName);case 175:case 176:case 292:case 296:case 295:case 297:case 299:return c(r,t.type);case 298:return u(r,n,t.parameters)||c(r,t.type);case 301:return u(r,n,t.tags);case 310:case 316:return c(r,t.tagName)||(t.isNameFirst?c(r,t.name)||c(r,t.typeExpression):c(r,t.typeExpression)||c(r,t.name));case 306:return c(r,t.tagName);case 305:return c(r,t.tagName)||c(r,t.class);case 314:return c(r,t.tagName)||c(r,t.constraint)||u(r,n,t.typeParameters);case 315:return c(r,t.tagName)||(t.typeExpression&&292===t.typeExpression.kind?c(r,t.typeExpression)||c(r,t.fullName):c(r,t.fullName)||c(r,t.typeExpression));case 308:return c(r,t.tagName)||c(r,t.fullName)||c(r,t.typeExpression);case 311:case 313:case 312:case 309:return c(r,t.tagName)||c(r,t.typeExpression);case 303:return e.forEach(t.typeParameters,r)||e.forEach(t.parameters,r)||c(r,t.type);case 302:return e.forEach(t.jsDocPropertyTags,r);case 304:case 307:return c(r,t.tagName);case 319:return c(r,t.expression)}}function d(t){return e.fileExtensionIs(t,".d.ts")}function p(t,r){for(var n=[],i=0,a=e.getLeadingCommentRanges(r,0)||e.emptyArray;i<a.length;i++){var o=a[i];v(n,o,r.substring(o.pos,o.end))}t.pragmas=e.createMap();for(var s=0,c=n;s<c.length;s++){var u=c[s];if(t.pragmas.has(u.name)){var l=t.pragmas.get(u.name);l instanceof Array?l.push(u.args):t.pragmas.set(u.name,[l,u.args])}else t.pragmas.set(u.name,u.args)}}function f(t,r){t.checkJsDirective=void 0,t.referencedFiles=[],t.typeReferenceDirectives=[],t.libReferenceDirectives=[],t.amdDependencies=[],t.hasNoDefaultLib=!1,t.pragmas.forEach((function(n,i){switch(i){case"reference":var a=t.referencedFiles,o=t.typeReferenceDirectives,s=t.libReferenceDirectives;e.forEach(e.toArray(n),(function(n){var i=n.arguments,c=i.types,u=i.lib,l=i.path;n.arguments["no-default-lib"]?t.hasNoDefaultLib=!0:c?o.push({pos:c.pos,end:c.end,fileName:c.value}):u?s.push({pos:u.pos,end:u.end,fileName:u.value}):l?a.push({pos:l.pos,end:l.end,fileName:l.value}):r(n.range.pos,n.range.end-n.range.pos,e.Diagnostics.Invalid_reference_directive_syntax)}));break;case"amd-dependency":t.amdDependencies=e.map(e.toArray(n),(function(e){return{name:e.arguments.name,path:e.arguments.path}}));break;case"amd-module":if(n instanceof Array)for(var c=0,u=n;c<u.length;c++){var l=u[c];t.moduleName&&r(l.range.pos,l.range.end-l.range.pos,e.Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments),t.moduleName=l.arguments.name}else t.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":e.forEach(e.toArray(n),(function(e){(!t.checkJsDirective||e.range.pos>t.checkJsDirective.pos)&&(t.checkJsDirective={enabled:"ts-check"===i,end:e.range.end,pos:e.range.pos})}));break;case"jsx":return;default:e.Debug.fail("Unhandled pragma kind")}}))}!function(e){e[e.None=0]="None",e[e.Yield=1]="Yield",e[e.Await=2]="Await",e[e.Type=4]="Type",e[e.IgnoreMissingOpenBrace=16]="IgnoreMissingOpenBrace",e[e.JSDoc=32]="JSDoc"}(t||(t={})),e.createNode=function(t,o,s){return 288===t?new(a||(a=e.objectAllocator.getSourceFileConstructor()))(t,o,s):75===t?new(i||(i=e.objectAllocator.getIdentifierConstructor()))(t,o,s):e.isNodeKind(t)?new(r||(r=e.objectAllocator.getNodeConstructor()))(t,o,s):new(n||(n=e.objectAllocator.getTokenConstructor()))(t,o,s)},e.isJSDocLikeText=l,e.forEachChild=_,e.createSourceFile=function(t,r,n,i,a){var s;return void 0===i&&(i=!1),e.performance.mark("beforeParse"),e.perfLogger.logStartParseSourceFile(t),s=100===n?o.parseSourceFile(t,r,n,void 0,i,6):o.parseSourceFile(t,r,n,void 0,i,a),e.perfLogger.logStopParseSourceFile(),e.performance.mark("afterParse"),e.performance.measure("Parse","beforeParse","afterParse"),s},e.parseIsolatedEntityName=function(e,t){return o.parseIsolatedEntityName(e,t)},e.parseJsonText=function(e,t){return o.parseJsonText(e,t)},e.isExternalModule=function(e){return void 0!==e.externalModuleIndicator},e.updateSourceFile=function(e,t,r,n){void 0===n&&(n=!1);var i=s.updateSourceFile(e,t,r,n);return i.flags|=3145728&e.flags,i},e.parseIsolatedJSDocComment=function(e,t,r){var n=o.JSDocParser.parseIsolatedJSDocComment(e,t,r);return n&&n.jsDoc&&o.fixupParentReferences(n.jsDoc),n},e.parseJSDocTypeExpressionForTests=function(e,t,r){return o.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)},function(t){var r,n,i,a,o,s,c,u,m,g,y,h,v,b,D,S,T,E,C=e.createScanner(99,!0),k=20480,N=!1;function A(t,r,n,i,a){void 0===n&&(n=2),P(r,n,i,6),(o=L(t,2,6,!1)).flags=D,ae();var c=re();if(1===ne())o.statements=Ee([],c,c),o.endOfFileToken=be();else{var u=Se(225);switch(ne()){case 22:u.expression=jr();break;case 105:case 90:case 99:u.expression=be();break;case 40:de((function(){return 8===ae()&&58!==ae()}))?u.expression=gr():u.expression=Jr();break;case 8:case 10:if(de((function(){return 58!==ae()}))){u.expression=ut();break}default:u.expression=Jr()}Ce(u),o.statements=Ee([u],c),o.endOfFileToken=ve(1,e.Diagnostics.Unexpected_token)}a&&M(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s;var l=o;return w(),l}function F(e){return 4===e||2===e||1===e||6===e?1:0}function P(t,o,u,l){switch(r=e.objectAllocator.getNodeConstructor(),n=e.objectAllocator.getTokenConstructor(),i=e.objectAllocator.getIdentifierConstructor(),a=e.objectAllocator.getSourceFileConstructor(),m=t,c=u,s=[],v=0,y=e.createMap(),h=0,g=0,l){case 1:case 2:D=131072;break;case 6:D=33685504;break;default:D=0}N=!1,C.setText(m),C.setOnError(te),C.setScriptTarget(o),C.setLanguageVariant(F(l))}function w(){C.setText(""),C.setOnError(void 0),s=void 0,o=void 0,y=void 0,c=void 0,m=void 0,b=void 0}function I(t,r,n,i){var a=d(t);return a&&(D|=8388608),(o=L(t,r,i,a)).flags=D,ae(),p(o,m),f(o,(function(t,r,n){s.push(e.createFileDiagnostic(o,t,r,n))})),o.statements=Ye(0,an),e.Debug.assert(1===ne()),o.endOfFileToken=O(be()),function(t){t.externalModuleIndicator=e.forEach(t.statements,Hn)||function(e){return 2097152&e.flags?Yn(e):void 0}(t)}(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s,n&&M(o),o}function O(t){e.Debug.assert(!t.jsDoc);var r=e.mapDefined(e.getJSDocCommentRanges(t,o.text),(function(e){return E.parseJSDocComment(t,e.pos,e.end-e.pos)}));return r.length&&(t.jsDoc=r),t}function M(t){var r=t;return void _(t,(function t(n){if(n.parent!==r){n.parent=r;var i=r;if(r=n,_(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a<o.length;a++){var s=o[a];s.parent=n,r=s,_(s,t)}r=i}}))}function L(t,r,n,i){var o=new a(288,0,m.length);return g++,o.text=m,o.bindDiagnostics=[],o.bindSuggestionDiagnostics=void 0,o.languageVersion=r,o.fileName=e.normalizePath(t),o.languageVariant=F(n),o.isDeclarationFile=i,o.scriptKind=n,o}function R(e,t){e?D|=t:D&=~t}function B(e){R(e,4096)}function j(e){R(e,8192)}function K(e){R(e,16384)}function J(e){R(e,32768)}function z(e,t){var r=e&D;if(r){R(!1,r);var n=t();return R(!0,r),n}return t()}function U(e,t){var r=e&~D;if(r){R(!0,r);var n=t();return R(!1,r),n}return t()}function V(e){return z(4096,e)}function q(e){return U(32768,e)}function W(e){return 0!=(D&e)}function G(){return W(8192)}function H(){return W(4096)}function Y(){return W(16384)}function X(){return W(32768)}function Q(e,t){Z(C.getTokenPos(),C.getTextPos(),e,t)}function $(t,r,n,i){var a=e.lastOrUndefined(s);a&&t===a.start||s.push(e.createFileDiagnostic(o,t,r,n,i)),N=!0}function Z(e,t,r,n){$(e,t-e,r,n)}function ee(e,t,r){Z(e.pos,e.end,t,r)}function te(e,t){$(C.getTextPos(),t,e)}function re(){return C.getStartPos()}function ne(){return u}function ie(){return u=C.scan()}function ae(){return e.isKeyword(u)&&(C.hasUnicodeEscape()||C.hasExtendedUnicodeEscape())&&Z(C.getTokenPos(),C.getTextPos(),e.Diagnostics.Keywords_cannot_contain_escape_characters),ie()}function oe(){return u=C.scanJsDocToken()}function se(){return u=C.reScanGreaterToken()}function ce(){return u=C.reScanLessThanToken()}function ue(){return u=C.scanJsxIdentifier()}function le(){return u=C.scanJsxToken()}function _e(t,r){var n=u,i=s.length,a=N,o=D,c=r?C.lookAhead(t):C.tryScan(t);return e.Debug.assert(o===D),c&&!r||(u=n,s.length=i,N=a),c}function de(e){return _e(e,!0)}function pe(e){return _e(e,!1)}function fe(){return 75===ne()||(120!==ne()||!G())&&((126!==ne()||!X())&&ne()>111)}function me(t,r,n){return void 0===n&&(n=!0),ne()===t?(n&&ae(),!0):(r?Q(r):Q(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function ge(e){return ne()===e&&(ae(),!0)}function ye(e){if(ne()===e)return be()}function he(e){if(ne()===e)return function(){var e=Se(ne());return oe(),Ce(e)}()}function ve(t,r,n){return ye(t)||ke(t,!1,r||e.Diagnostics._0_expected,n||e.tokenToString(t))}function be(){var e=Se(ne());return ae(),Ce(e)}function xe(){return 26===ne()||(19===ne()||1===ne()||C.hasPrecedingLineBreak())}function De(){return xe()?(26===ne()&&ae(),!0):me(26)}function Se(t,a){g++;var o=a>=0?a:C.getStartPos();return e.isNodeKind(t)||0===t?new r(t,o,o):75===t?new i(t,o,o):new n(t,o,o)}function Te(e,t){var r=Se(e,t);return 2&C.getTokenFlags()&&O(r),r}function Ee(e,t,r){var n=e.length,i=n>=1&&n<=4?e.slice():e;return i.pos=t,i.end=void 0===r?C.getStartPos():r,i}function Ce(e,t){return e.end=void 0===t?C.getStartPos():t,D&&(e.flags|=D),N&&(N=!1,e.flags|=65536),e}function ke(t,r,n,i){r?$(C.getStartPos(),0,n,i):n&&Q(n,i);var a=Se(t);return 75===t?a.escapedText="":(e.isLiteralKind(t)||e.isTemplateLiteralKind(t))&&(a.text=""),Ce(a)}function Ne(e){var t=y.get(e);return void 0===t&&y.set(e,t=e),t}function Ae(t,r){if(h++,t){var n=Se(75);return 75!==ne()&&(n.originalKeywordKind=ne()),n.escapedText=e.escapeLeadingUnderscores(Ne(C.getTokenValue())),ie(),Ce(n)}var i=1===ne(),a=C.isReservedWord(),o=C.getTokenText(),s=a?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:e.Diagnostics.Identifier_expected;return ke(75,i,r||s,o)}function Fe(e){return Ae(fe(),e)}function Pe(t){return Ae(e.tokenIsIdentifierOrKeyword(ne()),t)}function we(){return e.tokenIsIdentifierOrKeyword(ne())||10===ne()||8===ne()}function Ie(e){if(10===ne()||8===ne()){var t=ut();return t.text=Ne(t.text),t}return e&&22===ne()?function(){var e=Se(153);return me(22),e.expression=V(rr),me(23),Ce(e)}():Pe()}function Oe(){return Ie(!0)}function Me(e){return ne()===e&&pe(Re)}function Le(){return ae(),!C.hasPrecedingLineBreak()&&Be()}function Re(){switch(ne()){case 80:return 87===ae();case 88:return ae(),83===ne()?de(je):41!==ne()&&122!==ne()&&18!==ne()&&Be();case 83:return je();case 119:case 130:case 141:return ae(),Be();default:return Le()}}function Be(){return 22===ne()||18===ne()||41===ne()||25===ne()||we()}function je(){return ae(),79===ne()||93===ne()||113===ne()||121===ne()&&de(Qr)||125===ne()&&de($r)}function Ke(t,r){if(Qe(t))return!0;switch(t){case 0:case 1:case 3:return!(26===ne()&&r)&&rn();case 2:return 77===ne()||83===ne();case 4:return de(kt);case 5:return de(Cn)||26===ne()&&!r;case 6:return 22===ne()||we();case 12:switch(ne()){case 22:case 41:case 25:case 24:return!0;default:return we()}case 18:return we();case 9:return 22===ne()||25===ne()||we();case 7:return 18===ne()?de(Je):r?fe()&&!qe():er()&&!qe();case 8:return pn();case 10:return 27===ne()||25===ne()||pn();case 19:return fe();case 15:switch(ne()){case 27:case 24:return!0}case 11:return 25===ne()||tr();case 16:return vt(!1);case 17:return vt(!0);case 20:case 21:return 27===ne()||zt();case 22:return Rn();case 23:return e.tokenIsIdentifierOrKeyword(ne());case 13:return e.tokenIsIdentifierOrKeyword(ne())||18===ne();case 14:return!0}return e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function Je(){if(e.Debug.assert(18===ne()),19===ae()){var t=ae();return 27===t||18===t||89===t||112===t}return!0}function ze(){return ae(),fe()}function Ue(){return ae(),e.tokenIsIdentifierOrKeyword(ne())}function Ve(){return ae(),e.tokenIsIdentifierOrKeywordOrGreaterThan(ne())}function qe(){return(112===ne()||89===ne())&&de(We)}function We(){return ae(),tr()}function Ge(){return ae(),zt()}function He(e){if(1===ne())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:return 19===ne();case 3:return 19===ne()||77===ne()||83===ne();case 7:return 18===ne()||89===ne()||112===ne();case 8:return function(){if(xe())return!0;if(dr(ne()))return!0;if(38===ne())return!0;return!1}();case 19:return 31===ne()||20===ne()||18===ne()||89===ne()||112===ne();case 11:return 21===ne()||26===ne();case 15:case 21:case 10:return 23===ne();case 17:case 16:case 18:return 21===ne()||23===ne();case 20:return 27!==ne();case 22:return 18===ne()||19===ne();case 13:return 31===ne()||43===ne();case 14:return 29===ne()&&de(zn);default:return!1}}function Ye(e,t){var r=v;v|=1<<e;for(var n=[],i=re();!He(e);)if(Ke(e,!1)){var a=Xe(e,t);n.push(a)}else if(Ze(e))break;return v=r,Ee(n,i)}function Xe(e,t){var r=Qe(e);return r?$e(r):t()}function Qe(t){if(c&&function(e){switch(e){case 5:case 2:case 0:case 1:case 3:case 6:case 4:case 8:case 17:case 16:return!0}return!1}(t)&&!N){var r=c.currentNode(C.getStartPos());if(!(e.nodeIsMissing(r)||r.intersectsChange||e.containsParseError(r)))if((25358336&r.flags)===D&&function(e,t){switch(t){case 5:return function(e){if(e)switch(e.kind){case 161:case 166:case 162:case 163:case 158:case 221:return!0;case 160:var t=e;return!(75===t.name.kind&&128===t.name.originalKeywordKind)}return!1}(e);case 2:return function(e){if(e)switch(e.kind){case 275:case 276:return!0}return!1}(e);case 0:case 1:case 3:return function(e){if(e)switch(e.kind){case 243:case 224:case 222:case 226:case 225:case 238:case 234:case 236:case 233:case 232:case 230:case 231:case 229:case 228:case 235:case 223:case 239:case 237:case 227:case 240:case 253:case 252:case 259:case 258:case 248:case 244:case 245:case 247:case 246:return!0}return!1}(e);case 6:return function(e){return 282===e.kind}(e);case 4:return function(e){if(e)switch(e.kind){case 165:case 159:case 166:case 157:case 164:return!0}return!1}(e);case 8:return function(e){if(241!==e.kind)return!1;return void 0===e.initializer}(e);case 17:case 16:return function(e){if(155!==e.kind)return!1;return void 0===e.initializer}(e)}return!1}(r,t))return r.jsDocCache&&(r.jsDocCache=void 0),r}}function $e(e){return C.setTextPos(e.end),ae(),e}function Ze(t){return Q(function(t){switch(t){case 0:case 1:return e.Diagnostics.Declaration_or_statement_expected;case 2:return e.Diagnostics.case_or_default_expected;case 3:return e.Diagnostics.Statement_expected;case 18:case 4:return e.Diagnostics.Property_or_signature_expected;case 5:return e.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected;case 6:return e.Diagnostics.Enum_member_expected;case 7:return e.Diagnostics.Expression_expected;case 8:return e.Diagnostics.Variable_declaration_expected;case 9:return e.Diagnostics.Property_destructuring_pattern_expected;case 10:return e.Diagnostics.Array_element_destructuring_pattern_expected;case 11:return e.Diagnostics.Argument_expression_expected;case 12:return e.Diagnostics.Property_assignment_expected;case 15:return e.Diagnostics.Expression_or_comma_expected;case 17:case 16:return e.Diagnostics.Parameter_declaration_expected;case 19:return e.Diagnostics.Type_parameter_declaration_expected;case 20:return e.Diagnostics.Type_argument_expected;case 21:return e.Diagnostics.Type_expected;case 22:return e.Diagnostics.Unexpected_token_expected;case 23:case 13:case 14:return e.Diagnostics.Identifier_expected;default:return}}(t)),!!function(){for(var e=0;e<24;e++)if(v&1<<e&&(Ke(e,!0)||He(e)))return!0;return!1}()||(ae(),!1)}function et(e,t,r){var n=v;v|=1<<e;for(var i=[],a=re(),o=-1;;)if(Ke(e,!1)){var s=C.getStartPos();if(i.push(Xe(e,t)),o=C.getTokenPos(),ge(27))continue;if(o=-1,He(e))break;me(27,tt(e)),r&&26===ne()&&!C.hasPrecedingLineBreak()&&ae(),s===C.getStartPos()&&ae()}else{if(He(e))break;if(Ze(e))break}v=n;var c=Ee(i,a);return o>=0&&(c.hasTrailingComma=!0),c}function tt(t){return 6===t?e.Diagnostics.An_enum_member_name_must_be_followed_by_a_or:void 0}function rt(){var e=Ee([],re());return e.isMissingList=!0,e}function nt(e,t,r,n){if(me(r)){var i=et(e,t);return me(n),i}return rt()}function it(e,t){for(var r=e?Pe(t):Fe(t),n=C.getStartPos();ge(24);){if(29===ne()){r.jsdocDotPos=n;break}n=C.getStartPos(),r=at(r,ot(e))}return r}function at(e,t){var r=Se(152,e.pos);return r.left=e,r.right=t,Ce(r)}function ot(t){if(C.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(ne())&&de(Xr))return ke(75,!0,e.Diagnostics.Identifier_expected);return t?Pe():Fe()}function st(){var t,r=Se(210);r.head=(t=lt(ne()),e.Debug.assert(15===t.kind,"Template head has wrong token kind"),t),e.Debug.assert(15===r.head.kind,"Template head has wrong token kind");var n=[],i=re();do{n.push(ct())}while(16===e.last(n).literal.kind);return r.templateSpans=Ee(n,i),Ce(r)}function ct(){var t,r,n=Se(220);return n.expression=V(rr),19===ne()?(u=C.reScanTemplateToken(),r=lt(ne()),e.Debug.assert(16===r.kind||17===r.kind,"Template fragment has wrong token kind"),t=r):t=ve(17,e.Diagnostics._0_expected,e.tokenToString(19)),n.literal=t,Ce(n)}function ut(){return lt(ne())}function lt(e){var t=Se(e);switch(t.text=C.getTokenValue(),e){case 14:case 15:case 16:case 17:var r=14===e||17===e,n=C.getTokenText();t.rawText=n.substring(1,n.length-(C.isUnterminated()?0:r?1:2))}return C.hasExtendedUnicodeEscape()&&(t.hasExtendedUnicodeEscape=!0),C.isUnterminated()&&(t.isUnterminated=!0),8===t.kind&&(t.numericLiteralFlags=1008&C.getTokenFlags()),ae(),Ce(t),t}function _t(){var t=Se(168);return t.typeName=it(!0,e.Diagnostics.Type_expected),C.hasPrecedingLineBreak()||29!==ce()||(t.typeArguments=nt(20,Qt,29,31)),Ce(t)}function dt(){var e=Se(182);return ae(),Ce(e)}function pt(e){var t=Se(293);return e?Vt(297,t):(ae(),Ce(t))}function ft(){var e=Se(155);return 103!==ne()&&98!==ne()||(e.name=Pe(),me(58)),e.type=mt(),Ce(e)}function mt(){C.setInJSDocType(!0);var e=ye(134);if(e){var t=Se(300,e.pos);e:for(;;)switch(ne()){case 19:case 1:case 27:case 5:break e;default:oe()}return C.setInJSDocType(!1),Ce(t)}var r=ye(25),n=Yt();if(C.setInJSDocType(!1),r){var i=Se(299,r.pos);i.type=n,n=Ce(i)}return 62===ne()?Vt(297,n):n}function gt(){var e=Se(154);return e.name=Fe(),ge(89)&&(zt()||!tr()?e.constraint=Qt():e.expression=yr()),ge(62)&&(e.default=Qt()),Ce(e)}function yt(){if(29===ne())return nt(19,gt,29,31)}function ht(){if(ge(58))return Qt()}function vt(t){return 25===ne()||pn()||e.isModifierKind(ne())||59===ne()||zt(!t)}function bt(){var t=Te(155);return 103===ne()?(t.name=Ae(!0),t.type=ht(),Ce(t)):(t.decorators=kn(),t.modifiers=Nn(),t.dotDotDotToken=ye(25),t.name=fn(),0===e.getFullWidth(t.name)&&!e.hasModifiers(t)&&e.isModifierKind(ne())&&ae(),t.questionToken=ye(57),t.type=ht(),t.initializer=nr(),Ce(t))}function xt(t,r,n){32&r||(n.typeParameters=yt());var i=function(e,t){if(!me(20))return e.parameters=rt(),!1;var r=G(),n=X();return j(!!(1&t)),J(!!(2&t)),e.parameters=32&t?et(17,ft):et(16,bt),j(r),J(n),me(21)}(n,r);return(!function(t,r){if(38===t)return me(t),!0;if(ge(58))return!0;if(r&&38===ne())return Q(e.Diagnostics._0_expected,e.tokenToString(58)),ae(),!0;return!1}(t,!!(4&r))||(n.type=Yt(),!function t(r){switch(r.kind){case 168:return e.nodeIsMissing(r.typeName);case 169:case 170:var n=r,i=n.parameters,a=n.type;return!!i.isMissingList||t(a);case 181:return t(r.type);default:return!1}}(n.type)))&&i}function Dt(){ge(27)||De()}function St(e){var t=Te(e);return 165===e&&me(98),xt(58,4,t),Dt(),Ce(t)}function Tt(){return 22===ne()&&de(Et)}function Et(){if(ae(),25===ne()||23===ne())return!0;if(e.isModifierKind(ne())){if(ae(),fe())return!0}else{if(!fe())return!1;ae()}return 58===ne()||27===ne()||57===ne()&&(ae(),58===ne()||27===ne()||23===ne())}function Ct(e){return e.kind=166,e.parameters=nt(16,bt,22,23),e.type=Zt(),Dt(),Ce(e)}function kt(){if(20===ne()||29===ne())return!0;for(var t=!1;e.isModifierKind(ne());)t=!0,ae();return 22===ne()||(we()&&(t=!0,ae()),!!t&&(20===ne()||29===ne()||57===ne()||58===ne()||27===ne()||xe()))}function Nt(){if(20===ne()||29===ne())return St(164);if(98===ne()&&de(At))return St(165);var e=Te(0);return e.modifiers=Nn(),Tt()?Ct(e):function(e){return e.name=Oe(),e.questionToken=ye(57),20===ne()||29===ne()?(e.kind=159,xt(58,4,e)):(e.kind=157,e.type=Zt(),62===ne()&&(e.initializer=nr())),Dt(),Ce(e)}(e)}function At(){return ae(),20===ne()||29===ne()}function Ft(){return 24===ae()}function Pt(){switch(ae()){case 20:case 29:case 24:return!0}return!1}function wt(){var e;return me(18)?(e=Ye(4,Nt),me(19)):e=rt(),e}function It(){return ae(),39===ne()||40===ne()?137===ae():(137===ne()&&ae(),22===ne()&&ze()&&96===ae())}function Ot(){var e=Se(185);return me(18),137!==ne()&&39!==ne()&&40!==ne()||(e.readonlyToken=be(),137!==e.readonlyToken.kind&&ve(137)),me(22),e.typeParameter=function(){var e=Se(154);return e.name=Fe(),me(96),e.constraint=Qt(),Ce(e)}(),me(23),57!==ne()&&39!==ne()&&40!==ne()||(e.questionToken=be(),57!==e.questionToken.kind&&ve(57)),e.type=Zt(),De(),me(19),Ce(e)}function Mt(){var e=re();if(ge(25)){var t=Se(176,e);return t.type=Qt(),Ce(t)}var r=Qt();return 4194304&D||295!==r.kind||r.pos!==r.type.pos||(r.kind=175),r}function Lt(){var e=be();return 24===ne()?void 0:e}function Rt(e){var t,r=Se(186);e&&((t=Se(206)).operator=40,ae());var n=105===ne()||90===ne()?be():lt(ne());return e&&(t.operand=n,Ce(t),n=t),r.literal=n,Ce(r)}function Bt(){return ae(),95===ne()}function jt(){o.flags|=1048576;var t=Se(187);return ge(107)&&(t.isTypeOf=!0),me(95),me(20),t.argument=Qt(),me(21),ge(24)&&(t.qualifier=it(!0,e.Diagnostics.Type_expected)),C.hasPrecedingLineBreak()||29!==ce()||(t.typeArguments=nt(20,Qt,29,31)),Ce(t)}function Kt(){return ae(),8===ne()||9===ne()}function Jt(){switch(ne()){case 124:case 147:case 142:case 139:case 150:case 143:case 127:case 145:case 136:case 140:return pe(Lt)||_t();case 41:return pt(!1);case 65:return pt(!0);case 60:C.reScanQuestionToken();case 57:return r=C.getStartPos(),ae(),27===ne()||19===ne()||21===ne()||31===ne()||62===ne()||51===ne()?Ce(t=Se(294,r)):((t=Se(295,r)).type=Qt(),Ce(t));case 93:return function(){if(de(Jn)){var e=Te(298);return ae(),xt(58,36,e),Ce(e)}var t=Se(168);return t.typeName=Pe(),Ce(t)}();case 53:return function(){var e=Se(296);return ae(),e.type=Jt(),Ce(e)}();case 14:case 10:case 8:case 9:case 105:case 90:return Rt();case 40:return de(Kt)?Rt(!0):_t();case 109:case 99:return be();case 103:var e=dt();return 132!==ne()||C.hasPrecedingLineBreak()?e:function(e){ae();var t=Se(167,e.pos);return t.parameterName=e,t.type=Qt(),Ce(t)}(e);case 107:return de(Bt)?jt():function(){var e=Se(171);return me(107),e.exprName=it(!0),Ce(e)}();case 18:return de(It)?Ot():function(){var e=Se(172);return e.members=wt(),Ce(e)}();case 22:return function(){var e=Se(174);return e.elementTypes=nt(21,Mt,22,23),Ce(e)}();case 20:return function(){var e=Se(181);return me(20),e.type=Qt(),me(21),Ce(e)}();case 95:return jt();case 123:return de(Xr)?function(){var e=Se(167);return e.assertsModifier=ve(123),e.parameterName=103===ne()?dt():Fe(),e.type=ge(132)?Qt():void 0,Ce(e)}():_t();default:return _t()}var t,r}function zt(e){switch(ne()){case 124:case 147:case 142:case 139:case 150:case 127:case 137:case 143:case 146:case 109:case 145:case 99:case 103:case 107:case 136:case 18:case 22:case 29:case 51:case 50:case 98:case 10:case 8:case 9:case 105:case 90:case 140:case 41:case 57:case 53:case 25:case 131:case 95:case 123:return!0;case 93:return!e;case 40:return!e&&de(Kt);case 20:return!e&&de(Ut);default:return fe()}}function Ut(){return ae(),21===ne()||vt(!1)||zt()}function Vt(e,t){ae();var r=Se(e,t.pos);return r.type=t,Ce(r)}function qt(){var e=ne();switch(e){case 133:case 146:case 137:return function(e){var t=Se(183);return me(e),t.operator=e,t.type=qt(),Ce(t)}(e);case 131:return function(){var e=Se(180);me(131);var t=Se(154);return t.name=Fe(),e.typeParameter=Ce(t),Ce(e)}()}return function(){for(var e=Jt();!C.hasPrecedingLineBreak();)switch(ne()){case 53:e=Vt(296,e);break;case 57:if(!(4194304&D)&&de(Ge))return e;e=Vt(295,e);break;case 22:var t;if(me(22),zt())(t=Se(184,e.pos)).objectType=e,t.indexType=Qt(),me(23),e=Ce(t);else(t=Se(173,e.pos)).elementType=e,me(23),e=Ce(t);break;default:return e}return e}()}function Wt(e,t,r){var n=C.getStartPos(),i=ge(r),a=t();if(ne()===r||i){for(var o=[a];ge(r);)o.push(t());var s=Se(e,n);s.types=Ee(o,n),a=Ce(s)}return a}function Gt(){return Wt(178,qt,50)}function Ht(){if(ae(),21===ne()||25===ne())return!0;if(function(){if(e.isModifierKind(ne())&&Nn(),fe()||103===ne())return ae(),!0;if(22===ne()||18===ne()){var t=s.length;return fn(),t===s.length}return!1}()){if(58===ne()||27===ne()||57===ne()||62===ne())return!0;if(21===ne()&&(ae(),38===ne()))return!0}return!1}function Yt(){var e=fe()&&pe(Xt),t=Qt();if(e){var r=Se(167,e.pos);return r.assertsModifier=void 0,r.parameterName=e,r.type=t,Ce(r)}return t}function Xt(){var e=Fe();if(132===ne()&&!C.hasPrecedingLineBreak())return ae(),e}function Qt(){return z(40960,$t)}function $t(e){if(29===ne()||20===ne()&&de(Ht)||98===ne())return function(){var e=re(),t=Te(ge(98)?170:169,e);return xt(38,4,t),Ce(t)}();var t=Wt(177,Gt,51);if(!e&&!C.hasPrecedingLineBreak()&&ge(89)){var r=Se(179,t.pos);return r.checkType=t,r.extendsType=$t(!0),me(57),r.trueType=$t(),me(58),r.falseType=$t(),Ce(r)}return t}function Zt(){return ge(58)?Qt():void 0}function er(){switch(ne()){case 103:case 101:case 99:case 105:case 90:case 8:case 9:case 10:case 14:case 15:case 20:case 22:case 18:case 93:case 79:case 98:case 43:case 67:case 75:return!0;case 95:return de(Pt);default:return fe()}}function tr(){if(er())return!0;switch(ne()){case 39:case 40:case 54:case 53:case 84:case 107:case 109:case 45:case 46:case 29:case 126:case 120:return!0;default:return!!function(){if(H()&&96===ne())return!1;return e.getBinaryOperatorPrecedence(ne())>0}()||fe()}}function rr(){var e=Y();e&&K(!1);for(var t,r=ir();t=ye(27);)r=fr(r,t,ir());return e&&K(!0),r}function nr(){return ge(62)?ir():void 0}function ir(){if(function(){if(120===ne())return!!G()||de(Zr);return!1}())return function(){var e=Se(211);return ae(),C.hasPrecedingLineBreak()||41!==ne()&&!tr()?Ce(e):(e.asteriskToken=ye(41),e.expression=ir(),Ce(e))}();var t=function(){var t=function(){if(20===ne()||29===ne()||125===ne())return de(or);if(38===ne())return 1;return 0}();if(0===t)return;var r=1===t?ur(!0):pe(sr);if(!r)return;var n=e.hasModifier(r,256),i=ne();return r.equalsGreaterThanToken=ve(38),r.body=38===i||18===i?lr(n):Fe(),Ce(r)}()||function(){if(125===ne()&&1===de(cr)){var e=An();return ar(_r(0),e)}return}();if(t)return t;var r=_r(0);return 75===r.kind&&38===ne()?ar(r):e.isLeftHandSideExpression(r)&&e.isAssignmentOperator(se())?fr(r,be(),ir()):function(t){var r=ye(57);if(!r)return t;var n=Se(209,t.pos);return n.condition=t,n.questionToken=r,n.whenTrue=z(k,ir),n.colonToken=ve(58),n.whenFalse=e.nodeIsPresent(n.colonToken)?ir():ke(75,!1,e.Diagnostics._0_expected,e.tokenToString(58)),Ce(n)}(r)}function ar(t,r){var n;e.Debug.assert(38===ne(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>"),r?(n=Se(201,r.pos)).modifiers=r:n=Se(201,t.pos);var i=Se(155,t.pos);return i.name=t,Ce(i),n.parameters=Ee([i],i.pos,i.end),n.equalsGreaterThanToken=ve(38),n.body=lr(!!r),O(Ce(n))}function or(){if(125===ne()){if(ae(),C.hasPrecedingLineBreak())return 0;if(20!==ne()&&29!==ne())return 0}var t=ne(),r=ae();if(20===t){if(21===r)switch(ae()){case 38:case 58:case 18:return 1;default:return 0}if(22===r||18===r)return 2;if(25===r)return 1;if(e.isModifierKind(r)&&125!==r&&de(ze))return 1;if(!fe()&&103!==r)return 0;switch(ae()){case 58:return 1;case 57:return ae(),58===ne()||27===ne()||62===ne()||21===ne()?1:0;case 27:case 62:case 21:return 2}return 0}return e.Debug.assert(29===t),fe()?1===o.languageVariant?de((function(){var e=ae();if(89===e)switch(ae()){case 62:case 31:return!1;default:return!0}else if(27===e)return!0;return!1}))?1:0:2:0}function sr(){var t=C.getTokenPos();if(!b||!b.has(t.toString())){var r=ur(!1);return r||(b||(b=e.createMap())).set(t.toString(),!0),r}}function cr(){if(125===ne()){if(ae(),C.hasPrecedingLineBreak()||38===ne())return 0;var e=_r(0);if(!C.hasPrecedingLineBreak()&&75===e.kind&&38===ne())return 1}return 0}function ur(t){var r=Te(201);if(r.modifiers=An(),xt(58,e.hasModifier(r,256)?2:0,r)||t){var n=r.type&&e.isJSDocFunctionType(r.type);if(t||38===ne()||!n&&18===ne())return r}}function lr(e){return 18===ne()?qr(e?2:0):26===ne()||93===ne()||79===ne()||!rn()||18!==ne()&&93!==ne()&&79!==ne()&&59!==ne()&&tr()?e?q(ir):z(32768,ir):qr(16|(e?2:0))}function _r(e){return pr(e,yr())}function dr(e){return 96===e||151===e}function pr(t,r){for(;;){se();var n=e.getBinaryOperatorPrecedence(ne());if(!(42===ne()?n>=t:n>t))break;if(96===ne()&&H())break;if(122===ne()){if(C.hasPrecedingLineBreak())break;ae(),r=mr(r,Qt())}else r=fr(r,be(),_r(n))}return r}function fr(e,t,r){var n=Se(208,e.pos);return n.left=e,n.operatorToken=t,n.right=r,Ce(n)}function mr(e,t){var r=Se(216,e.pos);return r.expression=e,r.type=t,Ce(r)}function gr(){var e=Se(206);return e.operator=ne(),ae(),e.operand=hr(),Ce(e)}function yr(){if(function(){switch(ne()){case 39:case 40:case 54:case 53:case 84:case 107:case 109:case 126:return!1;case 29:if(1!==o.languageVariant)return!1;default:return!0}}()){var t=vr();return 42===ne()?pr(e.getBinaryOperatorPrecedence(ne()),t):t}var r=ne(),n=hr();if(42===ne()){var i=e.skipTrivia(m,n.pos),a=n.end;198===n.kind?Z(i,a,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):Z(i,a,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(r))}return n}function hr(){switch(ne()){case 39:case 40:case 54:case 53:return gr();case 84:return function(){var e=Se(202);return ae(),e.expression=hr(),Ce(e)}();case 107:return function(){var e=Se(203);return ae(),e.expression=hr(),Ce(e)}();case 109:return function(){var e=Se(204);return ae(),e.expression=hr(),Ce(e)}();case 29:return function(){var e=Se(198);return me(29),e.type=Qt(),me(31),e.expression=hr(),Ce(e)}();case 126:if(126===ne()&&(X()||de(Zr)))return function(){var e=Se(205);return ae(),e.expression=hr(),Ce(e)}();default:return vr()}}function vr(){if(45===ne()||46===ne())return(t=Se(206)).operator=ne(),ae(),t.operand=br(),Ce(t);if(1===o.languageVariant&&29===ne()&&de(Ve))return Dr(!0);var t,r=br();return e.Debug.assert(e.isLeftHandSideExpression(r)),45!==ne()&&46!==ne()||C.hasPrecedingLineBreak()?r:((t=Se(207,r.pos)).operand=r,t.operator=ne(),ae(),Ce(t))}function br(){var t;if(95===ne())if(de(At))o.flags|=1048576,t=be();else if(de(Ft)){var r=C.getStartPos();ae(),ae();var n=Se(218,r);n.keywordToken=95,n.name=Pe(),t=Ce(n),o.flags|=2097152}else t=xr();else t=101===ne()?function(){var t=be();if(29===ne()){var r=re();void 0!==pe(Mr)&&Z(r,re(),e.Diagnostics.super_may_not_use_type_arguments)}if(20===ne()||24===ne()||22===ne())return t;var n=Se(193,t.pos);return n.expression=t,ve(24,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),n.name=ot(!0),Ce(n)}():xr();return function(t){for(;;){t=Pr(t,!0);var r=ye(28);if(29===ne()||47===ne()){var n=pe(Mr);if(n){if(wr()){t=Ir(t,r,n);continue}(i=Se(195,t.pos)).expression=t,i.questionDotToken=r,i.typeArguments=n,i.arguments=Or(),(r||32&t.flags)&&(i.flags|=32),t=Ce(i);continue}}else if(20===ne()){var i;(i=Se(195,t.pos)).expression=t,i.questionDotToken=r,i.arguments=Or(),(r||32&t.flags)&&(i.flags|=32),t=Ce(i);continue}if(r){var a=Se(193,t.pos);a.expression=t,a.questionDotToken=r,a.name=ke(75,!1,e.Diagnostics.Identifier_expected),a.flags|=32,t=Ce(a)}break}return t}(t)}function xr(){return Pr(Lr(),!0)}function Dr(t){var r,n=function(e){var t=C.getStartPos();if(me(29),31===ne()){var r=Se(269,t);return le(),Ce(r)}var n,i=Er(),a=Ln(),o=(s=Se(272),s.properties=Ye(13,kr),Ce(s));var s;31===ne()?(n=Se(266,t),le()):(me(43),e?me(31):(me(31,void 0,!1),le()),n=Se(265,t));return n.tagName=i,n.typeArguments=a,n.attributes=o,Ce(n)}(t);if(266===n.kind)(i=Se(264,n.pos)).openingElement=n,i.children=Tr(i.openingElement),i.closingElement=function(e){var t=Se(267);me(30),t.tagName=Er(),e?me(31):(me(31,void 0,!1),le());return Ce(t)}(t),x(i.openingElement.tagName,i.closingElement.tagName)||ee(i.closingElement,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(m,i.openingElement.tagName)),r=Ce(i);else if(269===n.kind){var i;(i=Se(268,n.pos)).openingFragment=n,i.children=Tr(i.openingFragment),i.closingFragment=function(t){var r=Se(270);me(30),e.tokenIsIdentifierOrKeyword(ne())&&ee(Er(),e.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);t?me(31):(me(31,void 0,!1),le());return Ce(r)}(t),r=Ce(i)}else e.Debug.assert(265===n.kind),r=n;if(t&&29===ne()){var a=pe((function(){return Dr(!0)}));if(a){Q(e.Diagnostics.JSX_expressions_must_have_one_parent_element);var o=Se(208,r.pos);return o.end=a.end,o.left=r,o.right=a,o.operatorToken=ke(27,!1),o.operatorToken.pos=o.operatorToken.end=o.right.pos,o}}return r}function Sr(t,r){switch(r){case 1:return void(e.isJsxOpeningFragment(t)?ee(t,e.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag):ee(t.tagName,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(m,t.tagName)));case 30:case 7:return;case 11:case 12:return function(){var e=Se(11);return e.text=C.getTokenValue(),e.containsOnlyTriviaWhiteSpaces=12===u,u=C.scanJsxToken(),Ce(e)}();case 18:return Cr(!1);case 29:return Dr(!1);default:return e.Debug.assertNever(r)}}function Tr(e){var t=[],r=re(),n=v;for(v|=16384;;){var i=Sr(e,u=C.reScanJsxToken());if(!i)break;t.push(i)}return v=n,Ee(t,r)}function Er(){ue();for(var e=103===ne()?be():Pe();ge(24);){var t=Se(193,e.pos);t.expression=e,t.name=ot(!0),e=Ce(t)}return e}function Cr(e){var t=Se(274);if(me(18))return 19!==ne()&&(t.dotDotDotToken=ye(25),t.expression=rr()),e?me(19):me(19,void 0,!1)&&le(),Ce(t)}function kr(){if(18===ne())return function(){var e=Se(273);return me(18),me(25),e.expression=rr(),me(19),Ce(e)}();ue();var e=Se(271);if(e.name=Pe(),62===ne())switch(u=C.scanJsxAttributeValue()){case 10:e.initializer=ut();break;default:e.initializer=Cr(!0)}return Ce(e)}function Nr(){return ae(),e.tokenIsIdentifierOrKeyword(ne())||22===ne()||wr()}function Ar(e,t){var r=Se(193,e.pos);return r.expression=e,r.questionDotToken=t,r.name=ot(!0),(t||32&e.flags)&&(r.flags|=32),Ce(r)}function Fr(t,r){var n=Se(194,t.pos);if(n.expression=t,n.questionDotToken=r,23===ne())n.argumentExpression=ke(75,!0,e.Diagnostics.An_element_access_expression_should_take_an_argument);else{var i=V(rr);e.isStringOrNumericLiteralLike(i)&&(i.text=Ne(i.text)),n.argumentExpression=i}return me(23),(r||32&t.flags)&&(n.flags|=32),Ce(n)}function Pr(t,r){for(;;){var n=void 0,i=!1;if(r&&28===ne()&&de(Nr)?(n=ve(28),i=e.tokenIsIdentifierOrKeyword(ne())):i=ge(24),i)t=Ar(t,n);else if(n||53!==ne()||C.hasPrecedingLineBreak())if(!n&&Y()||!ge(22)){if(!wr())return t;t=Ir(t,n,void 0)}else t=Fr(t,n);else{ae();var a=Se(217,t.pos);a.expression=t,t=Ce(a)}}}function wr(){return 14===ne()||15===ne()}function Ir(e,t,r){var n=Se(197,e.pos);return n.tag=e,n.questionDotToken=t,n.typeArguments=r,n.template=14===ne()?ut():st(),(t||32&e.flags)&&(n.flags|=32),Ce(n)}function Or(){me(20);var e=et(11,Br);return me(21),e}function Mr(){if(29===ce()){ae();var e=et(20,Qt);if(me(31))return e&&function(){switch(ne()){case 20:case 14:case 15:case 24:case 21:case 23:case 58:case 26:case 57:case 34:case 36:case 35:case 37:case 55:case 56:case 60:case 52:case 50:case 51:case 19:case 1:return!0;case 27:case 18:default:return!1}}()?e:void 0}}function Lr(){switch(ne()){case 8:case 9:case 10:case 14:return ut();case 103:case 101:case 99:case 105:case 90:return be();case 20:return function(){var e=Te(199);return me(20),e.expression=V(rr),me(21),Ce(e)}();case 22:return jr();case 18:return Jr();case 125:if(!de($r))break;return zr();case 79:return wn(Te(0),213);case 93:return zr();case 98:return function(){var t=C.getStartPos();if(me(98),ge(24)){var r=Se(218,t);return r.keywordToken=98,r.name=Pe(),Ce(r)}var n,i=Lr();for(;;){i=Pr(i,!1),n=pe(Mr),wr()&&(e.Debug.assert(!!n,"Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'"),i=Ir(i,void 0,n),n=void 0);break}var a=Se(196,t);a.expression=i,a.typeArguments=n,(a.typeArguments||20===ne())&&(a.arguments=Or());return Ce(a)}();case 43:case 67:if(13===(u=C.reScanSlashToken()))return ut();break;case 15:return st()}return Fe(e.Diagnostics.Expression_expected)}function Rr(){return 25===ne()?function(){var e=Se(212);return me(25),e.expression=ir(),Ce(e)}():27===ne()?Se(214):ir()}function Br(){return z(k,Rr)}function jr(){var e=Se(191);return me(22),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.elements=et(15,Rr),me(23),Ce(e)}function Kr(){var e=Te(0);if(ye(25))return e.kind=281,e.expression=ir(),Ce(e);if(e.decorators=kn(),e.modifiers=Nn(),Me(130))return En(e,162);if(Me(141))return En(e,163);var t=ye(41),r=fe();if(e.name=Oe(),e.questionToken=ye(57),e.exclamationToken=ye(53),t||20===ne()||29===ne())return Dn(e,t);if(r&&58!==ne()){e.kind=280;var n=ye(62);n&&(e.equalsToken=n,e.objectAssignmentInitializer=V(ir))}else e.kind=279,me(58),e.initializer=V(ir);return Ce(e)}function Jr(){var e=Se(192);return me(18),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.properties=et(12,Kr,!0),me(19),Ce(e)}function zr(){var t=Y();t&&K(!1);var r=Te(200);r.modifiers=Nn(),me(93),r.asteriskToken=ye(41);var n=r.asteriskToken?1:0,i=e.hasModifier(r,256)?2:0;return r.name=n&&i?U(40960,Ur):n?function(e){return U(8192,e)}(Ur):i?q(Ur):Ur(),xt(58,n|i,r),r.body=qr(n|i),t&&K(!0),Ce(r)}function Ur(){return fe()?Fe():void 0}function Vr(e,t){var r=Se(222);return me(18,t)||e?(C.hasPrecedingLineBreak()&&(r.multiLine=!0),r.statements=Ye(1,an),me(19)):r.statements=rt(),Ce(r)}function qr(e,t){var r=G();j(!!(1&e));var n=X();J(!!(2&e));var i=Y();i&&K(!1);var a=Vr(!!(16&e),t);return i&&K(!0),j(r),J(n),a}function Wr(){var e=re();me(92);var t,r,n=ye(126);if(me(20),26!==ne()&&(t=108===ne()||114===ne()||80===ne()?yn(!0):U(4096,rr)),n?me(151):ge(151)){var i=Se(231,e);i.awaitModifier=n,i.initializer=t,i.expression=V(ir),me(21),r=i}else if(ge(96)){var a=Se(230,e);a.initializer=t,a.expression=V(rr),me(21),r=a}else{var o=Se(229,e);o.initializer=t,me(26),26!==ne()&&21!==ne()&&(o.condition=V(rr)),me(26),21!==ne()&&(o.incrementor=V(rr)),me(21),r=o}return r.statement=an(),Ce(r)}function Gr(e){var t=Se(e);return me(233===e?76:81),xe()||(t.label=Fe()),De(),Ce(t)}function Hr(){return 77===ne()?function(){var e=Se(275);return me(77),e.expression=V(rr),me(58),e.statements=Ye(3,an),Ce(e)}():function(){var e=Se(276);return me(83),me(58),e.statements=Ye(3,an),Ce(e)}()}function Yr(){var e=Se(239);return me(106),e.tryBlock=Vr(!1),e.catchClause=78===ne()?function(){var e=Se(278);me(78),ge(20)?(e.variableDeclaration=gn(),me(21)):e.variableDeclaration=void 0;return e.block=Vr(!1),Ce(e)}():void 0,e.catchClause&&91!==ne()||(me(91),e.finallyBlock=Vr(!1)),Ce(e)}function Xr(){return ae(),e.tokenIsIdentifierOrKeyword(ne())&&!C.hasPrecedingLineBreak()}function Qr(){return ae(),79===ne()&&!C.hasPrecedingLineBreak()}function $r(){return ae(),93===ne()&&!C.hasPrecedingLineBreak()}function Zr(){return ae(),(e.tokenIsIdentifierOrKeyword(ne())||8===ne()||9===ne()||10===ne())&&!C.hasPrecedingLineBreak()}function en(){for(;;)switch(ne()){case 108:case 114:case 80:case 93:case 79:case 87:return!0;case 113:case 144:return ae(),!C.hasPrecedingLineBreak()&&fe();case 134:case 135:return un();case 121:case 125:case 129:case 116:case 117:case 118:case 137:if(ae(),C.hasPrecedingLineBreak())return!1;continue;case 149:return ae(),18===ne()||75===ne()||88===ne();case 95:return ae(),10===ne()||41===ne()||18===ne()||e.tokenIsIdentifierOrKeyword(ne());case 88:if(ae(),62===ne()||41===ne()||18===ne()||83===ne()||122===ne())return!0;continue;case 119:ae();continue;default:return!1}}function tn(){return de(en)}function rn(){switch(ne()){case 59:case 26:case 18:case 108:case 114:case 93:case 79:case 87:case 94:case 85:case 110:case 92:case 81:case 76:case 100:case 111:case 102:case 104:case 106:case 82:case 78:case 91:return!0;case 95:return tn()||de(Pt);case 80:case 88:return tn();case 125:case 129:case 113:case 134:case 135:case 144:case 149:return!0;case 118:case 116:case 117:case 119:case 137:return tn()||!de(Xr);default:return tr()}}function nn(){return ae(),fe()||18===ne()||22===ne()}function an(){switch(ne()){case 26:return function(){var e=Se(223);return me(26),Ce(e)}();case 18:return Vr(!1);case 108:return vn(Te(241));case 114:if(de(nn))return vn(Te(241));break;case 93:return bn(Te(243));case 79:return Pn(Te(244));case 94:return function(){var e=Se(226);return me(94),me(20),e.expression=V(rr),me(21),e.thenStatement=an(),e.elseStatement=ge(86)?an():void 0,Ce(e)}();case 85:return function(){var e=Se(227);return me(85),e.statement=an(),me(110),me(20),e.expression=V(rr),me(21),ge(26),Ce(e)}();case 110:return function(){var e=Se(228);return me(110),me(20),e.expression=V(rr),me(21),e.statement=an(),Ce(e)}();case 92:return Wr();case 81:return Gr(232);case 76:return Gr(233);case 100:return function(){var e=Se(234);return me(100),xe()||(e.expression=V(rr)),De(),Ce(e)}();case 111:return function(){var e=Se(235);return me(111),me(20),e.expression=V(rr),me(21),e.statement=U(16777216,an),Ce(e)}();case 102:return function(){var e=Se(236);me(102),me(20),e.expression=V(rr),me(21);var t=Se(250);return me(18),t.clauses=Ye(2,Hr),me(19),e.caseBlock=Ce(t),Ce(e)}();case 104:return function(){var e=Se(238);return me(104),e.expression=C.hasPrecedingLineBreak()?void 0:V(rr),De(),Ce(e)}();case 106:case 78:case 91:return Yr();case 82:return function(){var e=Se(240);return me(82),De(),Ce(e)}();case 59:return sn();case 125:case 113:case 144:case 134:case 135:case 129:case 80:case 87:case 88:case 95:case 116:case 117:case 118:case 121:case 119:case 137:case 149:if(tn())return sn()}return function(){var e=Te(0),t=V(rr);return 75===t.kind&&ge(58)?(e.kind=237,e.label=t,e.statement=an()):(e.kind=225,e.expression=t,De()),Ce(e)}()}function on(e){return 129===e.kind}function sn(){var t=de((function(){return kn(),Nn()})),r=e.some(t,on);if(r){var n=U(8388608,(function(){var e=Qe(v);if(e)return $e(e)}));if(n)return n}var i=Te(0);if(i.decorators=kn(),i.modifiers=Nn(),r){for(var a=0,o=i.modifiers;a<o.length;a++){o[a].flags|=8388608}return U(8388608,(function(){return cn(i)}))}return cn(i)}function cn(t){switch(ne()){case 108:case 114:case 80:return vn(t);case 93:return bn(t);case 79:return Pn(t);case 113:return function(e){return e.kind=245,me(113),e.name=Fe(),e.typeParameters=yt(),e.heritageClauses=In(),e.members=wt(),Ce(e)}(t);case 144:return function(e){return e.kind=246,me(144),e.name=Fe(),e.typeParameters=yt(),me(62),e.type=Qt(),De(),Ce(e)}(t);case 87:return function(e){e.kind=247,me(87),e.name=Fe(),me(18)?(e.members=et(6,Bn),me(19)):e.members=rt();return Ce(e)}(t);case 149:case 134:case 135:return function(e){var t=0;if(149===ne())return Kn(e);if(ge(135))t|=16;else if(me(134),10===ne())return Kn(e);return function e(t,r){t.kind=248;var n=16&r;t.flags|=r;t.name=Fe();t.body=ge(24)?e(Se(0),4|n):jn();return Ce(t)}(e,t)}(t);case 95:return function(e){me(95);var t,r=C.getStartPos();if(fe()&&(t=Fe(),27!==ne()&&148!==ne()))return function(e,t){return e.kind=252,e.name=t,me(62),e.moduleReference=function(){return 138===ne()&&de(Jn)?function(){var e=Se(263);return me(138),me(20),e.expression=Un(),me(21),Ce(e)}():it(!1)}(),De(),Ce(e)}(e,t);e.kind=253,(t||41===ne()||18===ne())&&(e.importClause=function(e,t){var r=Se(254,t);e&&(r.name=e);r.name&&!ge(27)||(r.namedBindings=41===ne()?(n=Se(255),me(41),me(122),n.name=Fe(),Ce(n)):Vn(256));var n;return Ce(r)}(t,r),me(148));return e.moduleSpecifier=Un(),De(),Ce(e)}(t);case 88:switch(ae(),ne()){case 83:case 62:return function(e){e.kind=258,ge(62)?e.isExportEquals=!0:me(83);return e.expression=ir(),De(),Ce(e)}(t);case 122:return function(e){return e.kind=251,me(122),me(135),e.name=Fe(),De(),Ce(e)}(t);default:return function(e){e.kind=259,ge(41)?(me(148),e.moduleSpecifier=Un()):(e.exportClause=Vn(260),(148===ne()||10===ne()&&!C.hasPrecedingLineBreak())&&(me(148),e.moduleSpecifier=Un()));return De(),Ce(e)}(t)}default:if(t.decorators||t.modifiers){var r=ke(262,!0,e.Diagnostics.Declaration_expected);return r.pos=t.pos,r.decorators=t.decorators,r.modifiers=t.modifiers,Ce(r)}return}}function un(){return ae(),!C.hasPrecedingLineBreak()&&(fe()||10===ne())}function ln(e,t){if(18===ne()||!xe())return qr(e,t);De()}function _n(){if(27===ne())return Se(214);var e=Se(190);return e.dotDotDotToken=ye(25),e.name=fn(),e.initializer=nr(),Ce(e)}function dn(){var e=Se(190);e.dotDotDotToken=ye(25);var t=fe(),r=Oe();return t&&58!==ne()?e.name=r:(me(58),e.propertyName=r,e.name=fn()),e.initializer=nr(),Ce(e)}function pn(){return 18===ne()||22===ne()||fe()}function fn(){return 22===ne()?function(){var e=Se(189);return me(22),e.elements=et(10,_n),me(23),Ce(e)}():18===ne()?function(){var e=Se(188);return me(18),e.elements=et(9,dn),me(19),Ce(e)}():Fe()}function mn(){return gn(!0)}function gn(e){var t=Se(241);return t.name=fn(),e&&75===t.name.kind&&53===ne()&&!C.hasPrecedingLineBreak()&&(t.exclamationToken=be()),t.type=Zt(),dr(ne())||(t.initializer=nr()),Ce(t)}function yn(t){var r=Se(242);switch(ne()){case 108:break;case 114:r.flags|=1;break;case 80:r.flags|=2;break;default:e.Debug.fail()}if(ae(),151===ne()&&de(hn))r.declarations=rt();else{var n=H();B(t),r.declarations=et(8,t?gn:mn),B(n)}return Ce(r)}function hn(){return ze()&&21===ae()}function vn(e){return e.kind=224,e.declarationList=yn(!1),De(),Ce(e)}function bn(t){t.kind=243,me(93),t.asteriskToken=ye(41),t.name=e.hasModifier(t,512)?Ur():Fe();var r=t.asteriskToken?1:0,n=e.hasModifier(t,256)?2:0;return xt(58,r|n,t),t.body=ln(r|n,e.Diagnostics.or_expected),Ce(t)}function xn(t){return pe((function(){if(128===ne()?me(128):10===ne()&&20===de(ae)?pe((function(){var e=ut();return"constructor"===e.text?e:void 0})):void 0)return t.kind=161,xt(58,0,t),t.body=ln(0,e.Diagnostics.or_expected),Ce(t)}))}function Dn(t,r,n){t.kind=160,t.asteriskToken=r;var i=r?1:0,a=e.hasModifier(t,256)?2:0;return xt(58,i|a,t),t.body=ln(i|a,n),Ce(t)}function Sn(t){return t.kind=158,t.questionToken||53!==ne()||C.hasPrecedingLineBreak()||(t.exclamationToken=be()),t.type=Zt(),t.initializer=e.hasModifier(t,32)?V(nr):z(12288,nr),De(),Ce(t)}function Tn(t){var r=ye(41);return t.name=Oe(),t.questionToken=ye(57),r||20===ne()||29===ne()?Dn(t,r,e.Diagnostics.or_expected):Sn(t)}function En(e,t){return e.kind=t,e.name=Oe(),xt(58,0,e),e.body=ln(0),Ce(e)}function Cn(){var t;if(59===ne())return!0;for(;e.isModifierKind(ne());){if(t=ne(),e.isClassMemberModifier(t))return!0;ae()}if(41===ne())return!0;if(we()&&(t=ne(),ae()),22===ne())return!0;if(void 0!==t){if(!e.isKeyword(t)||141===t||130===t)return!0;switch(ne()){case 20:case 29:case 53:case 58:case 62:case 57:return!0;default:return xe()}}return!1}function kn(){for(var e,t=re();;){var r=re();if(!ge(59))break;var n=Se(156,r);n.expression=U(16384,br),Ce(n),(e||(e=[])).push(n)}return e&&Ee(e,t)}function Nn(t){for(var r,n=re();;){var i=C.getStartPos(),a=ne();if(80===ne()&&t){if(!pe(Le))break}else if(!e.isModifierKind(ne())||!pe(Re))break;var o=Ce(Se(a,i));(r||(r=[])).push(o)}return r&&Ee(r,n)}function An(){var e;if(125===ne()){var t=C.getStartPos(),r=ne();ae(),e=Ee([Ce(Se(r,t))],t)}return e}function Fn(){if(26===ne()){var t=Se(221);return ae(),Ce(t)}var r=Te(0);if(r.decorators=kn(),r.modifiers=Nn(!0),Me(130))return En(r,162);if(Me(141))return En(r,163);if(128===ne()||10===ne()){var n=xn(r);if(n)return n}if(Tt())return Ct(r);if(e.tokenIsIdentifierOrKeyword(ne())||10===ne()||8===ne()||41===ne()||22===ne()){if(r.modifiers&&e.some(r.modifiers,on)){for(var i=0,a=r.modifiers;i<a.length;i++){a[i].flags|=8388608}return U(8388608,(function(){return Tn(r)}))}return Tn(r)}return r.decorators||r.modifiers?(r.name=ke(75,!0,e.Diagnostics.Declaration_expected),Sn(r)):e.Debug.fail("Should not have attempted to parse class member declaration.")}function Pn(e){return wn(e,244)}function wn(e,t){return e.kind=t,me(79),e.name=!fe()||112===ne()&&de(Ue)?void 0:Fe(),e.typeParameters=yt(),e.heritageClauses=In(),me(18)?(e.members=Ye(5,Fn),me(19)):e.members=rt(),Ce(e)}function In(){if(Rn())return Ye(22,On)}function On(){var t=ne();e.Debug.assert(89===t||112===t);var r=Se(277);return r.token=t,ae(),r.types=et(7,Mn),Ce(r)}function Mn(){var e=Se(215);return e.expression=br(),e.typeArguments=Ln(),Ce(e)}function Ln(){return 29===ne()?nt(20,Qt,29,31):void 0}function Rn(){return 89===ne()||112===ne()}function Bn(){var e=Te(282);return e.name=Oe(),e.initializer=V(nr),Ce(e)}function jn(){var e=Se(249);return me(18)?(e.statements=Ye(1,an),me(19)):e.statements=rt(),Ce(e)}function Kn(e){return e.kind=248,149===ne()?(e.name=Fe(),e.flags|=1024):(e.name=ut(),e.name.text=Ne(e.name.text)),18===ne()?e.body=jn():De(),Ce(e)}function Jn(){return 20===ae()}function zn(){return 43===ae()}function Un(){if(10===ne()){var e=ut();return e.text=Ne(e.text),e}return rr()}function Vn(e){var t=Se(e);return t.elements=nt(23,256===e?Wn:qn,18,19),Ce(t)}function qn(){return Gn(261)}function Wn(){return Gn(257)}function Gn(t){var r=Se(t),n=e.isKeyword(ne())&&!fe(),i=C.getTokenPos(),a=C.getTextPos(),o=Pe();return 122===ne()?(r.propertyName=o,me(122),n=e.isKeyword(ne())&&!fe(),i=C.getTokenPos(),a=C.getTextPos(),r.name=Pe()):r.name=o,257===t&&n&&Z(i,a,e.Diagnostics.Identifier_expected),Ce(r)}function Hn(t){return e.hasModifier(t,1)||252===t.kind&&263===t.moduleReference.kind||253===t.kind||258===t.kind||259===t.kind?t:void 0}function Yn(t){return function(t){return e.isMetaProperty(t)&&95===t.keywordToken&&"meta"===t.name.escapedText}(t)?t:_(t,Yn)}t.parseSourceFile=function(t,r,n,i,a,o){if(void 0===a&&(a=!1),6===(o=e.ensureScriptKind(t,o))){var s=A(t,r,n,i,a);return e.convertToObjectWorker(s,s.parseDiagnostics,!1,void 0,void 0),s.referencedFiles=e.emptyArray,s.typeReferenceDirectives=e.emptyArray,s.libReferenceDirectives=e.emptyArray,s.amdDependencies=e.emptyArray,s.hasNoDefaultLib=!1,s.pragmas=e.emptyMap,s}P(r,n,i,o);var c=I(t,n,a,o);return w(),c},t.parseIsolatedEntityName=function(e,t){P(e,t,void 0,1),ae();var r=it(!0),n=1===ne()&&!s.length;return w(),n?r:void 0},t.parseJsonText=A,t.fixupParentReferences=M,function(e){e[e.SourceElements=0]="SourceElements",e[e.BlockStatements=1]="BlockStatements",e[e.SwitchClauses=2]="SwitchClauses",e[e.SwitchClauseStatements=3]="SwitchClauseStatements",e[e.TypeMembers=4]="TypeMembers",e[e.ClassMembers=5]="ClassMembers",e[e.EnumMembers=6]="EnumMembers",e[e.HeritageClauseElement=7]="HeritageClauseElement",e[e.VariableDeclarations=8]="VariableDeclarations",e[e.ObjectBindingElements=9]="ObjectBindingElements",e[e.ArrayBindingElements=10]="ArrayBindingElements",e[e.ArgumentExpressions=11]="ArgumentExpressions",e[e.ObjectLiteralMembers=12]="ObjectLiteralMembers",e[e.JsxAttributes=13]="JsxAttributes",e[e.JsxChildren=14]="JsxChildren",e[e.ArrayLiteralMembers=15]="ArrayLiteralMembers",e[e.Parameters=16]="Parameters",e[e.JSDocParameters=17]="JSDocParameters",e[e.RestProperties=18]="RestProperties",e[e.TypeParameters=19]="TypeParameters",e[e.TypeArguments=20]="TypeArguments",e[e.TupleElementTypes=21]="TupleElementTypes",e[e.HeritageClauses=22]="HeritageClauses",e[e.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",e[e.Count=24]="Count"}(S||(S={})),function(e){e[e.False=0]="False",e[e.True=1]="True",e[e.Unknown=2]="Unknown"}(T||(T={})),function(t){function r(t){var r,n=Se(292),i=(t?ge:me)(18);return n.type=U(4194304,mt),t&&!i||(r=19,ne()===r?oe():Q(e.Diagnostics._0_expected,e.tokenToString(r))),M(n),Ce(n)}var n,i;function a(t,n){void 0===t&&(t=0);var i=m,a=void 0===n?i.length:t+n;if(n=a-t,e.Debug.assert(t>=0),e.Debug.assert(t<=a),e.Debug.assert(a<=i.length),l(i,t)){var o,s,c,u=[];return C.scanRange(t+3,n-5,(function(){var e,r,n=1,l=t-Math.max(i.lastIndexOf("\n",t),0)+4;function p(t){e||(e=l),u.push(t),l+=t.length}for(oe();I(5););I(4)&&(n=0,l=0);e:for(;;){switch(ne()){case 59:0===n||1===n?(d(u),b(y(l)),n=0,e=void 0):p(C.getTokenText());break;case 4:u.push(C.getTokenText()),n=0,l=0;break;case 41:var f=C.getTokenText();1===n||2===n?(n=2,p(f)):(n=1,l+=f.length);break;case 5:var m=C.getTokenText();2===n?u.push(m):void 0!==e&&l+m.length>e&&u.push(m.slice(e-l-1)),l+=m.length;break;case 1:break e;default:n=2,p(C.getTokenText())}oe()}return _(u),d(u),(r=Se(301,t)).tags=o&&Ee(o,s,c),r.comment=u.length?u.join(""):void 0,Ce(r,a)}))}function _(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function d(e){for(;e.length&&""===e[e.length-1].trim();)e.pop()}function p(){for(;;){if(oe(),1===ne())return!0;if(5!==ne()&&4!==ne())return!1}}function f(){if(5!==ne()&&4!==ne()||!de(p))for(;5===ne()||4===ne();)oe()}function g(){if((5===ne()||4===ne())&&de(p))return"";for(var e=C.hasPrecedingLineBreak(),t=!1,r="";e&&41===ne()||5===ne()||4===ne();)r+=C.getTokenText(),4===ne()?(e=!0,t=!0,r=""):41===ne()&&(e=!1),oe();return t?r:""}function y(t){e.Debug.assert(59===ne());var n=C.getTokenPos();oe();var i,a=O(void 0),s=g();switch(a.escapedText){case"author":i=function(e,t,r){var n=Se(306,e);n.tagName=t;var i=pe((function(){return function(){var e=[],t=!1,r=!1,n=C.getToken();e:for(;;){switch(n){case 75:case 5:case 24:case 59:e.push(C.getTokenText());break;case 29:if(t||r)return;t=!0,e.push(C.getTokenText());break;case 31:if(!t||r)return;r=!0,e.push(C.getTokenText()),C.setTextPos(C.getTokenPos()+1);break e;case 4:case 1:break e}n=oe()}if(t&&r)return 0===e.length?void 0:e.join("")}()}));if(!i)return Ce(n);if(n.comment=i,de((function(){return 4!==ae()}))){var a=v(r);a&&(n.comment+=a)}return Ce(n)}(n,a,t);break;case"augments":case"extends":i=function(e,t){var r=Se(305,e);return r.tagName=t,r.class=function(){var e=ge(18),t=Se(215);t.expression=function(){var e=O();for(;ge(24);){var t=Se(193,e.pos);t.expression=e,t.name=O(),e=Ce(t)}return e}(),t.typeArguments=Ln();var r=Ce(t);e&&me(19);return r}(),Ce(r)}(n,a);break;case"class":case"constructor":i=function(e,t){var r=Se(307,e);return r.tagName=t,Ce(r)}(n,a);break;case"this":i=function(e,t){var n=Se(312,e);return n.tagName=t,n.typeExpression=r(!0),f(),Ce(n)}(n,a);break;case"enum":i=function(e,t){var n=Se(309,e);return n.tagName=t,n.typeExpression=r(!0),f(),Ce(n)}(n,a);break;case"arg":case"argument":case"param":return T(n,a,2,t);case"return":case"returns":i=function(t,r){e.some(o,e.isJSDocReturnTag)&&Z(r.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,r.escapedText);var n=Se(311,t);return n.tagName=r,n.typeExpression=x(),Ce(n)}(n,a);break;case"template":i=function(t,n){var i;18===ne()&&(i=r());var a=[],o=re();do{f();var s=Se(154);s.name=O(e.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),Ce(s),f(),a.push(s)}while(I(27));var c=Se(314,t);return c.tagName=n,c.constraint=i,c.typeParameters=Ee(a,o),Ce(c),c}(n,a);break;case"type":i=E(n,a);break;case"typedef":i=function(t,r,n){var i=x();g();var a,o=Se(315,t);if(o.tagName=r,o.fullName=k(),o.name=N(o.fullName),f(),o.comment=v(n),o.typeExpression=i,!i||S(i.type)){for(var s=void 0,c=void 0,u=void 0;s=pe((function(){return F(n)}));)if(c||(c=Se(302,t)),313===s.kind){if(u)break;u=s}else c.jsDocPropertyTags=e.append(c.jsDocPropertyTags,s);c&&(i&&173===i.type.kind&&(c.isArrayType=!0),o.typeExpression=u&&u.typeExpression&&!S(u.typeExpression.type)?u.typeExpression:Ce(c),a=o.typeExpression.end)}return Ce(o,a||void 0!==o.comment?C.getStartPos():(o.fullName||o.typeExpression||o.tagName).end)}(n,a,t);break;case"callback":i=function(t,r,n){var i,a=Se(308,t);a.tagName=r,a.fullName=k(),a.name=N(a.fullName),f(),a.comment=v(n);var o=Se(303,t);o.parameters=[];for(;i=pe((function(){return P(4,n)}));)o.parameters=e.append(o.parameters,i);var s=pe((function(){if(I(59)){var e=y(n);if(e&&311===e.kind)return e}}));s&&(o.type=s);return a.typeExpression=Ce(o),Ce(a)}(n,a,t);break;default:i=function(e,t){var r=Se(304,e);return r.tagName=t,Ce(r)}(n,a)}return i.comment||(s||(t+=i.end-i.pos),i.comment=v(t,s.slice(t))),i}function v(t,r){var n,i=[],a=0;function o(e){n||(n=t),i.push(e),t+=e.length}r&&(o(r),a=2);var s=ne();e:for(;;){switch(s){case 4:a>=1&&(a=0,i.push(C.getTokenText())),t=0;break;case 59:if(3===a){i.push(C.getTokenText());break}C.setTextPos(C.getTextPos()-1);case 1:break e;case 5:if(2===a||3===a)o(C.getTokenText());else{var c=C.getTokenText();void 0!==n&&t+c.length>n&&i.push(c.slice(n-t)),t+=c.length}break;case 18:a=2,de((function(){return 59===oe()&&e.tokenIsIdentifierOrKeyword(oe())&&"link"===C.getTokenText()}))&&(o(C.getTokenText()),oe(),o(C.getTokenText()),oe()),o(C.getTokenText());break;case 61:a=3===a?2:3,o(C.getTokenText());break;case 41:if(0===a){a=1,t+=1;break}default:3!==a&&(a=2),o(C.getTokenText())}s=oe()}return _(i),d(i),0===i.length?void 0:i.join("")}function b(e){e&&(o?o.push(e):(o=[e],s=e.pos),c=e.end)}function x(){return g(),18===ne()?r():void 0}function D(){var t=I(22);t&&f();var r,n=I(61),i=function(){var e=O();ge(22)&&me(23);for(;ge(24);){var t=O();ge(22)&&me(23),e=at(e,t)}return e}();return n&&(he(r=61)||ke(r,!1,e.Diagnostics._0_expected,e.tokenToString(r))),t&&(f(),ye(62)&&rr(),me(23)),{name:i,isBracketed:t}}function S(t){switch(t.kind){case 140:return!0;case 173:return S(t.elementType);default:return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText}}function T(t,r,n,i){var a=x(),o=!a;g();var s=D(),c=s.name,u=s.isBracketed;f(),o&&(a=x());var l=Se(1===n?316:310,t),_=v(i+C.getStartPos()-t),d=4!==n&&function(t,r,n,i){if(t&&S(t.type)){for(var a=Se(292,C.getTokenPos()),o=void 0,s=void 0,c=C.getStartPos(),u=void 0;o=pe((function(){return P(n,i,r)}));)310!==o.kind&&316!==o.kind||(u=e.append(u,o));if(u)return(s=Se(302,c)).jsDocPropertyTags=u,173===t.type.kind&&(s.isArrayType=!0),a.type=Ce(s),Ce(a)}}(a,c,n,i);return d&&(a=d,o=!0),l.tagName=r,l.typeExpression=a,l.name=c,l.isNameFirst=o,l.isBracketed=u,l.comment=_,Ce(l)}function E(t,n){e.some(o,e.isJSDocTypeTag)&&Z(n.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,n.escapedText);var i=Se(313,t);return i.tagName=n,i.typeExpression=r(!0),Ce(i)}function k(t){var r=C.getTokenPos();if(e.tokenIsIdentifierOrKeyword(ne())){var n=O();if(ge(24)){var i=Se(248,r);return t&&(i.flags|=4),i.name=n,i.body=k(!0),Ce(i)}return t&&(n.isInJSDocNamespace=!0),n}}function N(t){if(t)for(var r=t;;){if(e.isIdentifier(r)||!r.body)return e.isIdentifier(r)?r:r.name;r=r.body}}function A(t,r){for(;!e.isIdentifier(t)||!e.isIdentifier(r);){if(e.isIdentifier(t)||e.isIdentifier(r)||t.right.escapedText!==r.right.escapedText)return!1;t=t.left,r=r.left}return t.escapedText===r.escapedText}function F(e){return P(1,e)}function P(t,r,n){for(var i=!0,a=!1;;)switch(oe()){case 59:if(i){var o=w(t,r);return!(o&&(310===o.kind||316===o.kind)&&4!==t&&n&&(e.isIdentifier(o.name)||!A(n,o.name.left)))&&o}a=!1;break;case 4:i=!0,a=!1;break;case 41:a&&(i=!1),a=!0;break;case 75:i=!1;break;case 1:return!1}}function w(t,r){e.Debug.assert(59===ne());var n=C.getStartPos();oe();var i,a=O();switch(f(),a.escapedText){case"type":return 1===t&&E(n,a);case"prop":case"property":i=1;break;case"arg":case"argument":case"param":i=6;break;default:return!1}return!!(t&i)&&T(n,a,t,r)}function I(e){return ne()===e&&(oe(),!0)}function O(t){if(!e.tokenIsIdentifierOrKeyword(ne()))return ke(75,!t,t||e.Diagnostics.Identifier_expected);h++;var r=C.getTokenPos(),n=C.getTextPos(),i=Se(75,r);return 75!==ne()&&(i.originalKeywordKind=ne()),i.escapedText=e.escapeLeadingUnderscores(Ne(C.getTokenValue())),Ce(i,n),oe(),i}}t.parseJSDocTypeExpressionForTests=function(e,t,n){P(e,99,void 0,1),o=L("file.js",99,1,!1),C.setText(e,t,n),u=C.scan();var i=r(),a=s;return w(),i?{jsDocTypeExpression:i,diagnostics:a}:void 0},t.parseJSDocTypeExpression=r,t.parseIsolatedJSDocComment=function(e,t,r){P(e,99,void 0,1),o={languageVariant:0,text:e};var n=U(4194304,(function(){return a(t,r)})),i=s;return w(),n?{jsDoc:n,diagnostics:i}:void 0},t.parseJSDocComment=function(e,t,r){var n,i=u,c=s.length,l=N,_=U(4194304,(function(){return a(t,r)}));return _&&(_.parent=e),131072&D&&(o.jsDocDiagnostics||(o.jsDocDiagnostics=[]),(n=o.jsDocDiagnostics).push.apply(n,s)),u=i,s.length=c,N=l,_},function(e){e[e.BeginningOfLine=0]="BeginningOfLine",e[e.SawAsterisk=1]="SawAsterisk",e[e.SavingComments=2]="SavingComments",e[e.SavingBackticks=3]="SavingBackticks"}(n||(n={})),function(e){e[e.Property=1]="Property",e[e.Parameter=2]="Parameter",e[e.CallbackParameter=4]="CallbackParameter"}(i||(i={}))}(E=t.JSDocParser||(t.JSDocParser={}))}(o||(o={})),function(t){function r(t,r,i,o,s,c){return void(r?l(t):u(t));function u(t){var r="";if(c&&n(t)&&(r=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),t.pos+=i,t.end+=i,c&&n(t)&&e.Debug.assert(r===s.substring(t.pos,t.end)),_(t,u,l),e.hasJSDocNodes(t))for(var d=0,p=t.jsDoc;d<p.length;d++){u(p[d])}a(t,c)}function l(e){e._children=void 0,e.pos+=i,e.end+=i;for(var t=0,r=e;t<r.length;t++){u(r[t])}}}function n(e){switch(e.kind){case 10:case 8:case 75:return!0}return!1}function i(t,r,n,i,a){e.Debug.assert(t.end>=r,"Adjusting an element that was entirely before the change range"),e.Debug.assert(t.pos<=n,"Adjusting an element that was entirely after the change range"),e.Debug.assert(t.pos<=t.end),t.pos=Math.min(t.pos,i),t.end>=n?t.end+=a:t.end=Math.min(t.end,i),e.Debug.assert(t.pos<=t.end),t.parent&&(e.Debug.assert(t.pos>=t.parent.pos),e.Debug.assert(t.end<=t.parent.end))}function a(t,r){if(r){var n=t.pos,i=function(t){e.Debug.assert(t.pos>=n),n=t.end};if(e.hasJSDocNodes(t))for(var a=0,o=t.jsDoc;a<o.length;a++){i(o[a])}_(t,i),e.Debug.assert(n<=t.end)}}function s(t,r){var n,i=t;if(_(t,(function t(a){if(e.nodeIsMissing(a))return;if(!(a.pos<=r))return e.Debug.assert(a.pos>r),!0;if(a.pos>=i.pos&&(i=a),r<a.end)return _(a,t),!0;e.Debug.assert(a.end<=r),n=a})),n){var a=function(t){for(;;){var r=e.getLastChild(t);if(!r)return t;t=r}}(n);a.pos>i.pos&&(i=a)}return i}function c(t,r,n,i){var a=t.text;if(n&&(e.Debug.assert(a.length-n.span.length+n.newLength===r.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,n.span.start),s=r.substr(0,n.span.start);e.Debug.assert(o===s);var c=a.substring(e.textSpanEnd(n.span),a.length),u=r.substring(e.textSpanEnd(e.textChangeRangeNewSpan(n)),r.length);e.Debug.assert(c===u)}}var u;t.updateSourceFile=function(t,n,u,l){if(c(t,n,u,l=l||e.Debug.shouldAssert(2)),e.textChangeRangeIsUnchanged(u))return t;if(0===t.statements.length)return o.parseSourceFile(t.fileName,n,t.languageVersion,void 0,!0,t.scriptKind);var d=t;e.Debug.assert(!d.hasBeenIncrementallyParsed),d.hasBeenIncrementallyParsed=!0;var p=t.text,f=function(t){var r=t.statements,n=0;e.Debug.assert(n<r.length);var i=r[n],a=-1;return{currentNode:function(o){return o!==a&&(i&&i.end===o&&n<r.length-1&&(i=r[++n]),i&&i.pos===o||function(e){return r=void 0,n=-1,i=void 0,void _(t,a,o);function a(t){return e>=t.pos&&e<t.end&&(_(t,a,o),!0)}function o(t){if(e>=t.pos&&e<t.end)for(var s=0;s<t.length;s++){var c=t[s];if(c){if(c.pos===e)return r=t,n=s,i=c,!0;if(c.pos<e&&e<c.end)return _(c,a,o),!0}}return!1}}(o)),a=o,e.Debug.assert(!i||i.pos===o),i}}}(t),m=function(t,r){for(var n=r.span.start,i=0;n>0&&i<=1;i++){var a=s(t,n);e.Debug.assert(a.pos<=n);var o=a.pos;n=Math.max(0,o-1)}var c=e.createTextSpanFromBounds(n,e.textSpanEnd(r.span)),u=r.newLength+(r.span.start-n);return e.createTextChangeRange(c,u)}(t,u);c(t,n,m,l),e.Debug.assert(m.span.start<=u.span.start),e.Debug.assert(e.textSpanEnd(m.span)===e.textSpanEnd(u.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(m))===e.textSpanEnd(e.textChangeRangeNewSpan(u)));var g=e.textChangeRangeNewSpan(m).length-m.span.length;return function(t,n,o,s,c,u,l,d){return void p(t);function p(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!1,c,u,l,d);else{var m=t.end;if(m>=n){if(t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c),_(t,p,f),e.hasJSDocNodes(t))for(var g=0,y=t.jsDoc;g<y.length;g++){p(y[g])}a(t,d)}else e.Debug.assert(m<n)}}function f(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!0,c,u,l,d);else{var a=t.end;if(a>=n){t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c);for(var _=0,f=t;_<f.length;_++){p(f[_])}}else e.Debug.assert(a<n)}}}(d,m.span.start,e.textSpanEnd(m.span),e.textSpanEnd(e.textChangeRangeNewSpan(m)),g,p,n,l),o.parseSourceFile(t.fileName,n,t.languageVersion,f,!0,t.scriptKind)},function(e){e[e.Value=-1]="Value"}(u||(u={}))}(s||(s={})),e.isDeclarationFileName=d,e.processCommentPragmas=p,e.processPragmasIntoFields=f;var m=e.createMap();function g(e){if(m.has(e))return m.get(e);var t=new RegExp("(\\s"+e+"\\s*=\\s*)('|\")(.+?)\\2","im");return m.set(e,t),t}var y=/^\/\/\/\s*<(\S+)\s.*?\/>/im,h=/^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im;function v(t,r,n){var i=2===r.kind&&y.exec(n);if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(!(o&&1&o.kind))return;if(o.args){for(var s={},c=0,u=o.args;c<u.length;c++){var l=u[c],_=g(l.name).exec(n);if(!_&&!l.optional)return;if(_)if(l.captureSpan){var d=r.pos+_.index+_[1].length+_[2].length;s[l.name]={value:_[3],pos:d,end:d+_[3].length}}else s[l.name]=_[3]}t.push({name:a,args:{arguments:s,range:r}})}else t.push({name:a,args:{arguments:{},range:r}})}else{var p=2===r.kind&&h.exec(n);if(p)return b(t,r,2,p);if(3===r.kind)for(var f=/\s*@(\S+)\s*(.*)\s*$/gim,m=void 0;m=f.exec(n);)b(t,r,4,m)}}function b(t,r,n,i){if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(o&&o.kind&n){var s=function(t,r){if(!r)return{};if(!t.args)return{};for(var n=r.split(/\s+/),i={},a=0;a<t.args.length;a++){var o=t.args[a];if(!n[a]&&!o.optional)return"fail";if(o.captureSpan)return e.Debug.fail("Capture spans not yet implemented for non-xml pragmas");i[o.name]=n[a]}return i}(o,i[2]);"fail"!==s&&t.push({name:a,args:{arguments:s,range:r}})}}}function x(e,t){return e.kind===t.kind&&(75===e.kind?e.escapedText===t.escapedText:103===e.kind||e.name.escapedText===t.name.escapedText&&x(e.expression,t.expression))}e.tagNamesAreEquivalent=x}(s||(s={})),function(e){e.compileOnSaveCommandLineOption={name:"compileOnSave",type:"boolean"};var n,i,a=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["esnext.array","lib.es2019.array.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.bigint","lib.esnext.bigint.d.ts"]];function o(e){return e&&void 0!==e.enableAutoDiscovery&&void 0===e.enable?{enable:e.enableAutoDiscovery,include:e.include||[],exclude:e.exclude||[]}:e}function s(){return n||(n=c(e.optionDeclarations))}function c(t){var r=e.createMap(),n=e.createMap();return e.forEach(t,(function(e){r.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)})),{optionNameMap:r,shortOptionNames:n}}function u(t){return l(t,e.createCompilerDiagnostic)}function l(t,r){var n=e.arrayFrom(t.type.keys()).map((function(e){return"'"+e+"'"})).join(", ");return r(e.Diagnostics.Argument_for_0_option_must_be_Colon_1,"--"+t.name,n)}function _(e,t,r){return G(e,H(t||""),r)}function d(t,r,n){if(void 0===r&&(r=""),r=H(r),!e.startsWith(r,"-")){if(""===r)return[];var i=r.split(",");switch(t.element.type){case"number":return e.map(i,parseInt);case"string":return e.map(i,(function(e){return e||""}));default:return e.mapDefined(i,(function(e){return _(t.element,e,n)}))}}}function p(t,r,n,i){var a=r[0],o=r[1],s={},c=[],u=[];return l(n),{options:s,fileNames:c,errors:u};function l(r){for(var n=0;n<r.length;){var i=r[n];if(n++,64===i.charCodeAt(0))p(i.slice(1));else if(45===i.charCodeAt(0)){var l=g(t,i.slice(45===i.charCodeAt(1)?2:1),!0);if(l)if(l.isTSConfigOnly)u.push(e.createCompilerDiagnostic(e.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file,l.name));else switch(r[n]||"boolean"===l.type||u.push(e.createCompilerDiagnostic(o,l.name)),l.type){case"number":s[l.name]=parseInt(r[n]),n++;break;case"boolean":var f=r[n];s[l.name]="false"!==f,"false"!==f&&"true"!==f||n++;break;case"string":s[l.name]=r[n]||"",n++;break;case"list":var m=d(l,r[n],u);s[l.name]=m||[],m&&n++;break;default:s[l.name]=_(l,r[n],u),n++}else u.push(e.createCompilerDiagnostic(a,i))}else c.push(i)}}function p(t){var r=i?i(t):e.sys.readFile(t);if(r){for(var n=[],a=0;;){for(;a<r.length&&r.charCodeAt(a)<=32;)a++;if(a>=r.length)break;var o=a;if(34===r.charCodeAt(o)){for(a++;a<r.length&&34!==r.charCodeAt(a);)a++;a<r.length?(n.push(r.substring(o+1,a)),a++):u.push(e.createCompilerDiagnostic(e.Diagnostics.Unterminated_quoted_string_in_response_file_0,t))}else{for(;r.charCodeAt(a)>32;)a++;n.push(r.substring(o,a))}}l(n)}else u.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t))}}function m(e,t){return g(s,e,t)}function g(e,t,r){void 0===r&&(r=!1),t=t.toLowerCase();var n=e(),i=n.optionNameMap,a=n.shortOptionNames;if(r){var o=a.get(t);void 0!==o&&(t=o)}return i.get(t)}function y(t,r){var n=e.parseJsonText(t,r);return{config:x(n,n.parseDiagnostics),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function h(t,r){var n=v(t,r);return e.isString(n)?e.parseJsonText(t,n):{parseDiagnostics:[n]}}function v(t,r){var n;try{n=r(t)}catch(r){return e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r.message)}return void 0===n?e.createCompilerDiagnostic(e.Diagnostics.The_specified_path_does_not_exist_Colon_0,t):n}function b(t){return e.arrayToMap(t,(function(e){return e.name}))}function x(e,t){return D(e,t,!0,void 0,void 0)}function D(t,r,n,i,a){return t.statements.length?c(t.statements[0].expression,i):n?{}:void 0;function o(e){return i&&i.elementOptions===e}function s(i,s,l,_){for(var d=n?{}:void 0,p=0,f=i.properties;p<f.length;p++){var m=f[p];if(279===m.kind){m.questionToken&&r.push(e.createDiagnosticForNodeInSourceFile(t,m.questionToken,e.Diagnostics._0_can_only_be_used_in_a_ts_file,"?")),u(m.name)||r.push(e.createDiagnosticForNodeInSourceFile(t,m.name,e.Diagnostics.String_literal_with_double_quotes_expected));var g=e.getTextOfPropertyName(m.name),y=g&&e.unescapeLeadingUnderscores(g),h=y&&s?s.get(y):void 0;y&&l&&!h&&r.push(e.createDiagnosticForNodeInSourceFile(t,m.name,l,y));var v=c(m.initializer,h);if(void 0!==y&&(n&&(d[y]=v),a&&(_||o(s)))){var b=T(h,v);_?b&&a.onSetValidOptionKeyValueInParent(_,h,v):o(s)&&(b?a.onSetValidOptionKeyValueInRoot(y,m.name,v,m.initializer):h||a.onSetUnknownOptionKeyValueInRoot(y,m.name,v,m.initializer))}}else r.push(e.createDiagnosticForNodeInSourceFile(t,m,e.Diagnostics.Property_assignment_expected))}return d}function c(i,a){switch(i.kind){case 105:return g(a&&"boolean"!==a.type),!0;case 90:return g(a&&"boolean"!==a.type),!1;case 99:return g(a&&"extends"===a.name),null;case 10:u(i)||r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.String_literal_with_double_quotes_expected)),g(a&&e.isString(a.type)&&"string"!==a.type);var o=i.text;if(a&&!e.isString(a.type)){var _=a;_.type.has(o.toLowerCase())||r.push(l(_,(function(r,n,a){return e.createDiagnosticForNodeInSourceFile(t,i,r,n,a)})))}return o;case 8:return g(a&&"number"!==a.type),Number(i.text);case 206:if(40!==i.operator||8!==i.operand.kind)break;return g(a&&"number"!==a.type),-Number(i.operand.text);case 192:g(a&&"object"!==a.type);var d=i;if(a){var p=a;return s(d,p.elementOptions,p.extraKeyDiagnosticMessage,p.name)}return s(d,void 0,void 0,void 0);case 191:return g(a&&"list"!==a.type),f=i.elements,m=a&&a.element,n?e.filter(f.map((function(e){return c(e,m)})),(function(e){return void 0!==e})):f.forEach((function(e){return c(e,m)}))}var f,m;return void(a?g(!0):r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal)));function g(n){n&&r.push(e.createDiagnosticForNodeInSourceFile(t,i,e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,a.name,S(a)))}}function u(r){return e.isStringLiteral(r)&&e.isStringDoubleQuoted(r,t)}}function S(t){return"list"===t.type?"Array":e.isString(t.type)?t.type:"string"}function T(t,r){if(t){if(P(r))return!0;if("list"===t.type)return e.isArray(r);var n=e.isString(t.type)?t.type:"string";return f(r)===n}return!1}function E(t){if(e.length(t)){if(1!==e.length(t))return t;if("**/*"!==t[0])return t}}function C(t,r){return e.forEachEntry(r,(function(e,r){if(e===t)return r}))}function k(t,r){var n=e.createMap(),i=s().optionNameMap,a=r&&e.createGetCanonicalFileName(r.useCaseSensitiveFileNames),o=function(o){if(e.hasProperty(t,o)){if(i.has(o)&&i.get(o).category===e.Diagnostics.Command_line_Options)return"continue";var s=t[o],c=i.get(o.toLowerCase());if(c){var u=function e(t){return"string"===t.type||"number"===t.type||"boolean"===t.type||"object"===t.type?void 0:"list"===t.type?e(t.element):t.type}(c);u?"list"===c.type?n.set(o,s.map((function(e){return C(e,u)}))):n.set(o,C(s,u)):r&&c.isFilePath?n.set(o,e.getRelativePathFromFile(r.configFilePath,e.getNormalizedAbsolutePath(s,e.getDirectoryPath(r.configFilePath)),a)):n.set(o,s)}}};for(var c in t)o(c);return n}function N(e,t,r){if(e)if("list"===e.type){var n=t;if(e.element.isFilePath&&n.length)return n.map(r)}else if(e.isFilePath)return r(t);return t}function A(e,t,r,n,i,a,o,s){return I(void 0,e,t,r,n,i,a,o,s)}function F(e,t){t&&Object.defineProperty(e,"configFile",{enumerable:!1,writable:!1,value:t})}function P(e){return null==e}function w(t,r){return e.getDirectoryPath(e.getNormalizedAbsolutePath(t,r))}function I(t,r,n,i,a,o,s,c,u){void 0===a&&(a={}),void 0===s&&(s=[]),void 0===c&&(c=[]),e.Debug.assert(void 0===t&&void 0!==r||void 0!==t&&void 0===r);var l,_=[],d=B(t,r,n,i,o,s,_,u),p=d.raw,f=e.extend(a,d.options||{});f.configFilePath=o&&e.normalizeSlashes(o),F(f,r);var m=function(){var t,a,u;if(e.hasProperty(p,"files")&&!P(p.files))if(e.isArray(p.files)){t=p.files;var d=!(e.hasProperty(p,"references")&&!P(p.references))||0===p.references.length,m=e.hasProperty(p,"extends");if(0===t.length&&d&&!m)if(r){var g=o||"tsconfig.json",y=e.Diagnostics.The_files_list_in_config_file_0_is_empty,h=e.firstDefined(e.getTsConfigPropArray(r,"files"),(function(e){return e.initializer})),b=h?e.createDiagnosticForNodeInSourceFile(r,h,y,g):e.createCompilerDiagnostic(y,g);_.push(b)}else v(e.Diagnostics.The_files_list_in_config_file_0_is_empty,o||"tsconfig.json")}else v(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"files","Array");e.hasProperty(p,"include")&&!P(p.include)&&(e.isArray(p.include)?a=p.include:v(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"include","Array"));if(e.hasProperty(p,"exclude")&&!P(p.exclude))e.isArray(p.exclude)?u=p.exclude:v(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"exclude","Array");else if(p.compilerOptions){var x=p.compilerOptions.outDir,D=p.compilerOptions.declarationDir;(x||D)&&(u=[x,D].filter((function(e){return!!e})))}void 0===t&&void 0===a&&(a=["**/*"]);var S=function(t,r,n,i,a,o,s,c,u){var l,_;i=e.normalizePath(i),r&&(l=ee(r,s,!1,u,"include"));n&&(_=ee(n,s,!0,u,"exclude"));var d=function(t,r,n,i){var a=e.getRegularExpressionForWildcard(r,n,"exclude"),o=a&&new RegExp(a,i?"":"i"),s={};if(void 0!==t){for(var c=[],u=0,l=t;u<l.length;u++){var _=l[u],d=e.normalizePath(e.combinePaths(n,_));if(!o||!o.test(d)){var p=te(d,i);if(p){var f=p.key,m=p.flags,g=s[f];(void 0===g||g<m)&&(s[f]=m,1===m&&c.push(f))}}}for(var f in s)if(e.hasProperty(s,f))for(var y=0,h=c;y<h.length;y++){var v=h[y];f!==v&&e.containsPath(v,f,n,!i)&&delete s[f]}}return s}(l,_,i,o.useCaseSensitiveFileNames);return Z({filesSpecs:t,includeSpecs:r,excludeSpecs:n,validatedIncludeSpecs:l,validatedExcludeSpecs:_,wildcardDirectories:d},i,a,o,c)}(t,a,u,o?w(o,i):i,f,n,_,c,r);M(S,L(p),s)&&_.push(O(S.spec,o));if(e.hasProperty(p,"references")&&!P(p.references))if(e.isArray(p.references))for(var T=0,E=p.references;T<E.length;T++){var C=E[T];"string"!=typeof C.path?v(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(l||(l=[])).push({path:e.getNormalizedAbsolutePath(C.path,i),originalPath:C.path,prepend:C.prepend,circular:C.circular})}else v(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"references","Array");return S}(),g=m.fileNames,y=m.wildcardDirectories,h=m.spec;return{options:f,fileNames:g,projectReferences:l,typeAcquisition:d.typeAcquisition||z(),raw:p,errors:_,wildcardDirectories:y,compileOnSave:!!p.compileOnSave,configFileSpecs:h};function v(t,n,i){r||_.push(e.createCompilerDiagnostic(t,n,i))}}function O(t,r){var n=t.includeSpecs,i=t.excludeSpecs;return e.createCompilerDiagnostic(e.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,r||"tsconfig.json",JSON.stringify(n||[]),JSON.stringify(i||[]))}function M(e,t,r){return 0===e.fileNames.length&&t&&(!r||0===r.length)}function L(t){return!e.hasProperty(t,"files")&&!e.hasProperty(t,"references")}function R(e){return!!e.options}function B(r,n,a,o,s,c,u,l){o=e.normalizeSlashes(o);var _=e.getNormalizedAbsolutePath(s||"",o);if(c.indexOf(_)>=0)return u.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,t(c,[_]).join(" -> "))),{raw:r||x(n,u)};var d=r?function(t,r,n,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=J(t.compilerOptions,n,a,i),c=U(t.typeAcquisition||t.typingOptions,n,a,i);if(t.compileOnSave=function(t,r,n){if(!e.hasProperty(t,e.compileOnSaveCommandLineOption.name))return!1;var i=q(e.compileOnSaveCommandLineOption,t.compileOnSave,r,n);return"boolean"==typeof i&&i}(t,n,a),t.extends)if(e.isString(t.extends)){var u=i?w(i,n):n;o=j(t.extends,r,u,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,typeAcquisition:c,extendedConfigPath:o}}(r,a,o,s,u):function(t,r,n,a,o){var s,c,u,l=K(a),_={onSetValidOptionKeyValueInParent:function(t,r,i){e.Debug.assert("compilerOptions"===t||"typeAcquisition"===t||"typingOptions"===t),("compilerOptions"===t?l:"typeAcquisition"===t?s||(s=z(a)):c||(c=z(a)))[r.name]=function t(r,n,i){if(P(i))return;if("list"===r.type){var a=r;return a.element.isFilePath||!e.isString(a.element.type)?e.filter(e.map(i,(function(e){return t(a.element,n,e)})),(function(e){return!!e})):i}if(!e.isString(r.type))return r.type.get(e.isString(i)?i.toLowerCase():i);return W(r,n,i)}(r,n,i)},onSetValidOptionKeyValueInRoot:function(i,s,c,l){switch(i){case"extends":var _=a?w(a,n):n;return void(u=j(c,r,_,o,(function(r,n){return e.createDiagnosticForNodeInSourceFile(t,l,r,n)})))}},onSetUnknownOptionKeyValueInRoot:function(r,n,i,a){"excludes"===r&&o.push(e.createDiagnosticForNodeInSourceFile(t,n,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},d=D(t,o,!0,(void 0===i&&(i={name:void 0,type:"object",elementOptions:b([{name:"compilerOptions",type:"object",elementOptions:b(e.optionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_compiler_option_0},{name:"typingOptions",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"typeAcquisition",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"extends",type:"string"},{name:"references",type:"list",element:{name:"references",type:"object"}},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])}),i),_);s||(s=c?void 0!==c.enableAutoDiscovery?{enable:c.enableAutoDiscovery,include:c.include,exclude:c.exclude}:c:z(a));return{raw:d,options:l,typeAcquisition:s,extendedConfigPath:u}}(n,a,o,s,u);if(d.extendedConfigPath){c=c.concat([_]);var p=function(t,r,n,i,a,o,s){var c,u,l,_,d=n.useCaseSensitiveFileNames?r:e.toLowerCase(r);if(s&&(u=s.get(d)))l=u.extendedResult,_=u.extendedConfig;else{if(!(l=h(r,(function(e){return n.readFile(e)}))).parseDiagnostics.length){var p=e.getDirectoryPath(r);if(R(_=B(void 0,l,n,p,e.getBaseFileName(r),a,o,s))){var f=e.convertToRelativePath(p,i,e.identity),m=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(f,t)},g=function(t){y[t]&&(y[t]=e.map(y[t],m))},y=_.raw;g("include"),g("exclude"),g("files")}}s&&s.set(d,{extendedResult:l,extendedConfig:_})}t&&(t.extendedSourceFiles=[l.fileName],l.extendedSourceFiles&&(c=t.extendedSourceFiles).push.apply(c,l.extendedSourceFiles));if(l.parseDiagnostics.length)return void o.push.apply(o,l.parseDiagnostics);return _}(n,d.extendedConfigPath,a,o,c,u,l);if(p&&R(p)){var f=p.raw,m=d.raw,g=function(e){var t=m[e]||f[e];t&&(m[e]=t)};g("include"),g("exclude"),g("files"),void 0===m.compileOnSave&&(m.compileOnSave=f.compileOnSave),d.options=e.assign({},p.options,d.options)}}return d}function j(t,r,n,i,a){if(t=e.normalizeSlashes(t),e.isRootedDiskPath(t)||e.startsWith(t,"./")||e.startsWith(t,"../")){var o=e.getNormalizedAbsolutePath(t,n);return r.fileExists(o)||e.endsWith(o,".json")||(o+=".json",r.fileExists(o))?o:void i.push(a(e.Diagnostics.File_0_not_found,t))}var s=e.nodeModuleNameResolver(t,e.combinePaths(n,"tsconfig.json"),{moduleResolution:e.ModuleResolutionKind.NodeJs},r,void 0,void 0,!0);if(s.resolvedModule)return s.resolvedModule.resolvedFileName;i.push(a(e.Diagnostics.File_0_not_found,t))}function K(t){return t&&"jsconfig.json"===e.getBaseFileName(t)?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function J(t,r,n,i){var a=K(i);return V(e.optionDeclarations,t,r,a,e.Diagnostics.Unknown_compiler_option_0,n),i&&(a.configFilePath=e.normalizeSlashes(i)),a}function z(t){return{enable:!!t&&"jsconfig.json"===e.getBaseFileName(t),include:[],exclude:[]}}function U(t,r,n,i){var a=z(i),s=o(t);return V(e.typeAcquisitionDeclarations,s,r,a,e.Diagnostics.Unknown_type_acquisition_option_0,n),a}function V(t,r,n,i,a,o){if(r){var s=b(t);for(var c in r){var u=s.get(c);u?i[u.name]=q(u,r[c],n,o):o.push(e.createCompilerDiagnostic(a,c))}}}function q(t,r,n,i){if(T(t,r)){var a=t.type;return"list"===a&&e.isArray(r)?function(t,r,n,i){return e.filter(e.map(r,(function(e){return q(t.element,e,n,i)})),(function(e){return!!e}))}(t,r,n,i):e.isString(a)?W(t,n,r):G(t,r,i)}i.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,t.name,S(t)))}function W(t,r,n){return t.isFilePath&&""===(n=e.getNormalizedAbsolutePath(n,r))&&(n="."),n}function G(e,t,r){if(!P(t)){var n=t.toLowerCase(),i=e.type.get(n);if(void 0!==i)return i;r.push(u(e))}}function H(e){return"function"==typeof e.trim?e.trim():e.replace(/^[\s]+|[\s]+$/g,"")}e.libs=a.map((function(e){return e[0]})),e.libMap=e.createMapFromEntries(a),e.commonOptionsWithBuild=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_this_message},{name:"help",shortName:"?",type:"boolean"},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen},{name:"listFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_files_part_of_the_compilation},{name:"listEmittedFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_generated_files_part_of_the_compilation},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental},{name:"traceResolution",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Enable_tracing_of_the_name_resolution_process},{name:"diagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_diagnostic_information},{name:"extendedDiagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_verbose_diagnostic_information},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE_OR_DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Generates_a_CPU_profile},{name:"incremental",shortName:"i",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_incremental_compilation,transpileOptionValue:void 0},{name:"locale",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us}],e.optionDeclarations=t(e.commonOptionsWithBuild,[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_all_compiler_options},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_the_compiler_s_version},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,paramType:e.Diagnostics.FILE_OR_DIRECTORY,description:e.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date},{name:"showConfig",type:"boolean",category:e.Diagnostics.Command_line_Options,isCommandLineOnly:!0,description:e.Diagnostics.Print_the_final_configuration_instead_of_building},{name:"listFilesOnly",type:"boolean",category:e.Diagnostics.Command_line_Options,affectsSemanticDiagnostics:!0,affectsEmit:!0,isCommandLineOnly:!0,description:e.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing},{name:"target",shortName:"t",type:e.createMapFromTemplate({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,esnext:99}),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.VERSION,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT},{name:"module",shortName:"m",type:e.createMapFromTemplate({none:e.ModuleKind.None,commonjs:e.ModuleKind.CommonJS,amd:e.ModuleKind.AMD,system:e.ModuleKind.System,umd:e.ModuleKind.UMD,es6:e.ModuleKind.ES2015,es2015:e.ModuleKind.ES2015,esnext:e.ModuleKind.ESNext}),affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext},{name:"lib",type:"list",element:{name:"lib",type:e.libMap},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_library_files_to_be_included_in_the_compilation,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:"checkJs",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Report_errors_in_js_files},{name:"jsx",type:e.createMapFromTemplate({preserve:1,"react-native":3,react:2}),affectsSourceFile:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react},{name:"declaration",shortName:"d",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"declarationMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"emitDeclarationOnly",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Only_emit_d_ts_declaration_files,transpileOptionValue:void 0},{name:"sourceMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_map_file},{name:"outFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Redirect_output_structure_to_the_directory},{name:"rootDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir},{name:"composite",type:"boolean",affectsEmit:!0,isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_project_compilation,transpileOptionValue:void 0},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_file_to_store_incremental_compilation_information,transpileOptionValue:void 0},{name:"removeComments",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_comments_to_output},{name:"noEmit",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_outputs,transpileOptionValue:void 0},{name:"importHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Import_emit_helpers_from_tslib},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3},{name:"isolatedModules",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule,transpileOptionValue:!0},{name:"strict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_all_strict_type_checking_options},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_null_checks},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_function_types},{name:"strictBindCallApply",type:"boolean",strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_locals},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_parameters},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:"moduleResolution",type:e.createMapFromTemplate({node:e.ModuleResolutionKind.NodeJs,classic:e.ModuleResolutionKind.Classic}),affectsModuleResolution:!0,paramType:e.Diagnostics.STRATEGY,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Base_directory_to_resolve_non_absolute_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,isTSConfigOnly:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime,transpileOptionValue:void 0},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_folders_to_include_type_definitions_from},{name:"types",type:"list",element:{name:"types",type:"string"},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Type_declaration_files_to_be_included_in_compilation,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports},{name:"preserveSymlinks",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Do_not_resolve_the_real_path_of_symlinks},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_accessing_UMD_globals_from_modules},{name:"sourceRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations},{name:"mapRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSourceMap",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file},{name:"inlineSources",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set},{name:"experimentalDecorators",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:"emitDecoratorMetadata",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:"jsxFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h},{name:"resolveJsonModule",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Include_modules_imported_with_json_extension},{name:"out",type:"string",affectsEmit:!0,isFilePath:!1,category:e.Diagnostics.Advanced_Options,paramType:e.Diagnostics.FILE,description:e.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"reactNamespace",type:"string",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit},{name:"skipDefaultLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files},{name:"charset",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_character_set_of_the_input_files},{name:"emitBOM",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files},{name:"newLine",type:e.createMapFromTemplate({crlf:0,lf:1}),affectsEmit:!0,paramType:e.Diagnostics.NEWLINE,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix},{name:"noErrorTruncation",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_truncate_error_messages},{name:"noLib",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts,transpileOptionValue:!0},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files,transpileOptionValue:!0},{name:"stripInternal",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation},{name:"disableSizeLimit",type:"boolean",affectsSourceFile:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_size_limitations_on_JavaScript_projects},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,transpileOptionValue:void 0},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:"declarationDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Output_directory_for_generated_declaration_files,transpileOptionValue:void 0},{name:"skipLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Skip_type_checking_of_declaration_files},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:"forceConsistentCasingInFileNames",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_class_fields_with_Define_instead_of_Set},{name:"keyofStringsOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:e.Diagnostics.List_of_language_service_plugins}]),e.semanticDiagnosticsOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsSemanticDiagnostics})),e.affectsEmitOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsEmit})),e.moduleResolutionOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsModuleResolution})),e.sourceFileAffectingCompilerOptions=e.optionDeclarations.filter((function(e){return!!e.affectsSourceFile||!!e.affectsModuleResolution||!!e.affectsBindDiagnostics})),e.transpileOptionValueCompilerOptions=e.optionDeclarations.filter((function(t){return e.hasProperty(t,"transpileOptionValue")})),e.buildOpts=t(e.commonOptionsWithBuild,[{name:"verbose",shortName:"v",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Enable_verbose_logging,type:"boolean"},{name:"dry",shortName:"d",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean"},{name:"force",shortName:"f",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean"},{name:"clean",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Delete_the_outputs_of_all_projects,type:"boolean"}]),e.typeAcquisitionDeclarations=[{name:"enableAutoDiscovery",type:"boolean"},{name:"enable",type:"boolean"},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}}],e.defaultInitCompilerOptions={module:e.ModuleKind.CommonJS,target:1,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0},e.convertEnableAutoDiscoveryToEnable=o,e.getOptionNameMap=s,e.createOptionNameMap=c,e.createCompilerDiagnosticForInvalidCustomType=u,e.parseCustomTypeOption=_,e.parseListTypeOption=d,e.parseCommandLine=function(t,r){return p(s,[e.Diagnostics.Unknown_compiler_option_0,e.Diagnostics.Compiler_option_0_expects_an_argument],t,r)},e.getOptionFromName=m,e.parseBuildCommand=function(t){var r,n=p((function(){return r||(r=c(e.buildOpts))}),[e.Diagnostics.Unknown_build_option_0,e.Diagnostics.Build_option_0_requires_a_value_of_type_1],t),i=n.options,a=n.fileNames,o=n.errors,s=i;return 0===a.length&&a.push("."),s.clean&&s.force&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","force")),s.clean&&s.verbose&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","verbose")),s.clean&&s.watch&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","watch")),s.watch&&s.dry&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:s,projects:a,errors:o}},e.getDiagnosticText=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.createCompilerDiagnostic.apply(void 0,arguments).messageText},e.getParsedCommandLineOfConfigFile=function(t,r,n,i){var a;try{a=n.readFile(t)}catch(r){var o=e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r.message);return void n.onUnRecoverableConfigFileDiagnostic(o)}if(a){var s=e.parseJsonText(t,a),c=n.getCurrentDirectory();return s.path=e.toPath(t,c,e.createGetCanonicalFileName(n.useCaseSensitiveFileNames)),s.resolvedPath=s.path,s.originalFileName=s.fileName,A(s,n,e.getNormalizedAbsolutePath(e.getDirectoryPath(t),c),r,e.getNormalizedAbsolutePath(t,c),void 0,void 0,i)}o=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t),n.onUnRecoverableConfigFileDiagnostic(o)},e.readConfigFile=function(t,r){var n=v(t,r);return e.isString(n)?y(t,n):{config:{},error:n}},e.parseConfigFileTextToJson=y,e.readJsonConfigFile=h,e.convertToObject=x,e.convertToObjectWorker=D,e.convertToTSConfig=function(t,n,i){var a=e.createGetCanonicalFileName(i.useCaseSensitiveFileNames),o=e.map(e.filter(t.fileNames,t.configFileSpecs&&t.configFileSpecs.validatedIncludeSpecs?function(t,r,n,i){if(!r)return function(e){return!0};var a=e.getFileMatcherPatterns(t,n,r,i.useCaseSensitiveFileNames,i.getCurrentDirectory()),o=a.excludePattern&&e.getRegexFromPattern(a.excludePattern,i.useCaseSensitiveFileNames),s=a.includeFilePattern&&e.getRegexFromPattern(a.includeFilePattern,i.useCaseSensitiveFileNames);if(s)return o?function(e){return!(s.test(e)&&!o.test(e))}:function(e){return!s.test(e)};if(o)return function(e){return o.test(e)};return function(e){return!0}}(n,t.configFileSpecs.validatedIncludeSpecs,t.configFileSpecs.validatedExcludeSpecs,i):function(e){return!0}),(function(t){return e.getRelativePathFromFile(e.getNormalizedAbsolutePath(n,i.getCurrentDirectory()),e.getNormalizedAbsolutePath(t,i.getCurrentDirectory()),a)})),s=k(t.options,{configFilePath:e.getNormalizedAbsolutePath(n,i.getCurrentDirectory()),useCaseSensitiveFileNames:i.useCaseSensitiveFileNames});return r(r({compilerOptions:r(r({},e.arrayFrom(s.entries()).reduce((function(e,t){var n;return r(r({},e),((n={})[t[0]]=t[1],n))}),{})),{showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0}),references:e.map(t.projectReferences,(function(e){return r(r({},e),{path:e.originalPath?e.originalPath:"",originalPath:void 0})})),files:e.length(o)?o:void 0},t.configFileSpecs?{include:E(t.configFileSpecs.validatedIncludeSpecs),exclude:t.configFileSpecs.validatedExcludeSpecs}:{}),{compileOnSave:!!t.compileOnSave||void 0})},e.generateTSConfig=function(t,r,n){var i=k(e.extend(t,e.defaultInitCompilerOptions));return function(){for(var t=e.createMultiMap(),c=0,u=e.optionDeclarations;c<u.length;c++){var l=u[c],_=l.category;s(l)&&t.add(e.getLocaleSpecificMessage(_),l)}var d=0,p=0,f=[],m=[];t.forEach((function(t,r){0!==f.length&&(f.push(""),m.push("")),f.push("/* "+r+" */"),m.push("");for(var n=0,o=t;n<o.length;n++){var s=o[n],c=void 0;c=i.has(s.name)?'"'+s.name+'": '+JSON.stringify(i.get(s.name))+((p+=1)===i.size?"":","):'// "'+s.name+'": '+JSON.stringify(a(s))+",",f.push(c),m.push("/* "+(s.description&&e.getLocaleSpecificMessage(s.description)||s.name)+" */"),d=Math.max(c.length,d)}}));var g=o(2),y=[];y.push("{"),y.push(g+'"compilerOptions": {');for(var h=0;h<f.length;h++){var v=f[h],b=m[h];y.push(v&&""+g+g+v+(b&&o(d-v.length+2)+b))}if(r.length){y.push(g+"},"),y.push(g+'"files": [');for(h=0;h<r.length;h++)y.push(""+g+g+JSON.stringify(r[h])+(h===r.length-1?"":","));y.push(g+"]")}else y.push(g+"}");return y.push("}"),y.join(n)+n}();function a(t){switch(t.type){case"number":return 1;case"boolean":return!0;case"string":return t.isFilePath?"./":"";case"list":return[];case"object":return{};default:var r=t.type.keys().next();return r.done?e.Debug.fail("Expected 'option.type' to have entries."):r.value}}function o(e){return Array(e+1).join(" ")}function s(t){var r=t.category,n=t.name;return void 0!==r&&r!==e.Diagnostics.Command_line_Options&&(r!==e.Diagnostics.Advanced_Options||i.has(n))}},e.convertToOptionsWithAbsolutePaths=function(t,r){var n={},i=s().optionNameMap;for(var a in t)e.hasProperty(t,a)&&(n[a]=N(i.get(a.toLowerCase()),t[a],r));return n.configFilePath&&(n.configFilePath=r(n.configFilePath)),n},e.parseJsonConfigFileContent=function(e,t,r,n,i,a,o,s){return I(e,void 0,t,r,n,i,a,o,s)},e.parseJsonSourceFileConfigFileContent=A,e.setConfigFileInOptions=F,e.canJsonReportNoInutFiles=L,e.updateErrorForNoInputFiles=function(t,r,n,i,a){var o=i.length;return M(t,a)?i.push(O(n,r)):e.filterMutate(i,(function(t){return!function(t){return t.code===e.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(t)})),o!==i.length},e.convertCompilerOptionsFromJson=function(e,t,r){var n=[];return{options:J(e,t,n,r),errors:n}},e.convertTypeAcquisitionFromJson=function(e,t,r){var n=[];return{options:U(e,t,n,r),errors:n}};var Y=/(^|\/)\*\*\/?$/,X=/(^|\/)\*\*\/(.*\/)?\.\.($|\/)/,Q=/\/[^/]*?[*?][^/]*\//,$=/^[^*?]*(?=\/[^/]*[*?])/;function Z(t,r,n,i,a){void 0===a&&(a=[]),r=e.normalizePath(r);var o,s=i.useCaseSensitiveFileNames?e.identity:e.toLowerCase,c=e.createMap(),u=e.createMap(),l=e.createMap(),_=t.filesSpecs,d=t.validatedIncludeSpecs,p=t.validatedExcludeSpecs,f=t.wildcardDirectories,m=e.getSupportedExtensions(n,a),g=e.getSuppoertedExtensionsWithJsonIfResolveJsonModule(n,m);if(_)for(var y=0,h=_;y<h.length;y++){var v=h[y],b=e.getNormalizedAbsolutePath(v,r);c.set(s(b),b)}if(d&&d.length>0)for(var x=function(t){if(e.fileExtensionIs(t,".json")){if(!o){var n=d.filter((function(t){return e.endsWith(t,".json")})),a=e.map(e.getRegularExpressionsForWildcards(n,r,"files"),(function(e){return"^"+e+"$"}));o=a?a.map((function(t){return e.getRegexFromPattern(t,i.useCaseSensitiveFileNames)})):e.emptyArray}if(-1!==e.findIndex(o,(function(e){return e.test(t)}))){var _=s(t);c.has(_)||l.has(_)||l.set(_,t)}return"continue"}if(function(t,r,n,i,a){for(var o=e.getExtensionPriority(t,i),s=e.adjustExtensionPriority(o,i),c=0;c<s;c++){var u=i[c],l=a(e.changeExtension(t,u));if(r.has(l)||n.has(l))return!0}return!1}(t,c,u,m,s))return"continue";!function(t,r,n,i){for(var a=e.getExtensionPriority(t,n),o=e.getNextLowestExtensionPriority(a,n);o<n.length;o++){var s=n[o],c=i(e.changeExtension(t,s));r.delete(c)}}(t,u,m,s);var p=s(t);c.has(p)||u.has(p)||u.set(p,t)},D=0,S=i.readDirectory(r,g,p,d,void 0);D<S.length;D++){x(b=S[D])}var T=e.arrayFrom(c.values()),E=e.arrayFrom(u.values());return{fileNames:T.concat(E,e.arrayFrom(l.values())),wildcardDirectories:f,spec:t}}function ee(t,r,n,i,a){return t.filter((function(t){var o=function(t,r){if(!r&&Y.test(t))return e.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0;if(X.test(t))return e.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0}(t,n);return void 0!==o&&r.push(function(t,r){var n=e.getTsConfigPropArrayElementValue(i,a,r);return n?e.createDiagnosticForNodeInSourceFile(i,n,t,r):e.createCompilerDiagnostic(t,r)}(o,t)),void 0===o}))}function te(t,r){var n=$.exec(t);return n?{key:r?n[0]:n[0].toLowerCase(),flags:Q.test(t)?1:0}:e.isImplicitGlob(t)?{key:t,flags:1}:void 0}function re(t,r){switch(r.type){case"object":case"string":return"";case"number":return"number"==typeof t?t:"";case"boolean":return"boolean"==typeof t?t:"";case"list":var n=r.element;return e.isArray(t)?t.map((function(e){return re(e,n)})):"";default:return e.forEachEntry(r.type,(function(e,r){if(e===t)return r}))}}e.getFileNamesFromConfigSpecs=Z,e.convertCompilerOptionsForTelemetry=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=m(r);void 0!==n&&(t[r]=re(e[r],n))}return t}}(s||(s={})),function(e){function n(t){t.trace(e.formatMessage.apply(void 0,arguments))}function i(e,t){return!!e.traceResolution&&void 0!==t.trace}function a(t,r){var n;if(r&&t){var i=t.packageJsonContent;"string"==typeof i.name&&"string"==typeof i.version&&(n={name:i.name,subModuleName:r.path.slice(t.packageDirectory.length+e.directorySeparator.length),version:i.version})}return r&&{path:r.path,extension:r.ext,packageId:n}}function o(e){return a(void 0,e)}function s(t){if(t)return e.Debug.assert(void 0===t.packageId),{path:t.path,ext:t.extension}}var c,u;function l(t){if(t)return e.Debug.assert(e.extensionIsTS(t.extension)),{fileName:t.path,packageId:t.packageId}}function _(e,t,r){return{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId},failedLookupLocations:r}}function d(t,r,i,a){if(e.hasProperty(t,r)){var o=t[r];if(f(o)===i&&null!==o)return o;a.traceEnabled&&n(a.host,e.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2,r,i,null===o?"null":f(o))}else a.traceEnabled&&n(a.host,e.Diagnostics.package_json_does_not_have_a_0_field,r)}function p(t,r,i,a){var o=d(t,r,"string",a);if(void 0!==o){if(o){var s=e.normalizePath(e.combinePaths(i,o));return a.traceEnabled&&n(a.host,e.Diagnostics.package_json_has_0_field_1_that_references_2,r,o,s),s}a.traceEnabled&&n(a.host,e.Diagnostics.package_json_had_a_falsy_0_field,r)}}function m(e,t,r){return p(e,"typings",t,r)||p(e,"types",t,r)}function g(e,t,r){return p(e,"main",t,r)}function y(t,r){var i=function(t,r){var i=d(t,"typesVersions","object",r);if(void 0!==i)return r.traceEnabled&&n(r.host,e.Diagnostics.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),i}(t,r);if(void 0!==i){if(r.traceEnabled)for(var a in i)e.hasProperty(i,a)&&!e.VersionRange.tryParse(a)&&n(r.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,a);var o=h(i);if(o){var s=o.version,c=o.paths;if("object"===f(c))return o;r.traceEnabled&&n(r.host,e.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2,"typesVersions['"+s+"']","object",f(c))}else r.traceEnabled&&n(r.host,e.Diagnostics.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,e.versionMajorMinor)}}function h(t){for(var r in u||(u=new e.Version(e.version)),t)if(e.hasProperty(t,r)){var n=e.VersionRange.tryParse(r);if(void 0!==n&&n.test(u))return{version:r,paths:t[r]}}}function v(t,r){return t.typeRoots?t.typeRoots:(t.configFilePath?n=e.getDirectoryPath(t.configFilePath):r.getCurrentDirectory&&(n=r.getCurrentDirectory()),void 0!==n?function(t,r){if(!r.directoryExists)return[e.combinePaths(t,b)];var n;return e.forEachAncestorDirectory(e.normalizePath(t),(function(t){var i=e.combinePaths(t,b);r.directoryExists(i)&&(n||(n=[])).push(i)})),n}(n,r):void 0);var n}e.trace=n,e.isTraceEnabled=i,function(e){e[e.TypeScript=0]="TypeScript",e[e.JavaScript=1]="JavaScript",e[e.Json=2]="Json",e[e.TSConfig=3]="TSConfig",e[e.DtsOnly=4]="DtsOnly"}(c||(c={})),e.getPackageJsonTypesVersionsPaths=h,e.getEffectiveTypeRoots=v;var b=e.combinePaths("node_modules","@types");function x(t){var r=e.createMap(),n=e.createMap();return{ownMap:r,redirectsMap:n,getOrCreateMapOfCacheRedirects:function(i){if(!i)return r;var a=i.sourceFile.path,o=n.get(a);o||(o=!t||e.optionsHaveModuleResolutionChanges(t,i.commandLine.options)?e.createMap():r,n.set(a,o));return o},clear:function(){r.clear(),n.clear()},setOwnOptions:function(e){t=e},setOwnMap:function(e){r=e}}}function D(t,r,n,i){return{getOrCreateCacheForDirectory:function(r,o){var s=e.toPath(r,n,i);return a(t,o,s,e.createMap)},getOrCreateCacheForModuleName:function(t,n){return e.Debug.assert(!e.isExternalModuleNameRelative(t)),a(r,n,t,o)},directoryToModuleNameMap:t,moduleNameToDirectoryMap:r};function a(e,t,r,n){var i=e.getOrCreateMapOfCacheRedirects(t),a=i.get(r);return a||(a=n(),i.set(r,a)),a}function o(){var t=e.createMap();return{get:function(r){return t.get(e.toPath(r,n,i))},set:function(r,a){var o=e.toPath(r,n,i);if(t.has(o))return;t.set(o,a);var s=a.resolvedModule&&(a.resolvedModule.originalPath||a.resolvedModule.resolvedFileName),c=s&&function(t,r){var a=e.toPath(e.getDirectoryPath(r),n,i),o=0,s=Math.min(t.length,a.length);for(;o<s&&t.charCodeAt(o)===a.charCodeAt(o);)o++;if(o===t.length&&(a.length===o||a[o]===e.directorySeparator))return t;var c=e.getRootLength(t);if(o<c)return;var u=t.lastIndexOf(e.directorySeparator,o-1);if(-1===u)return;return t.substr(0,Math.max(u,c))}(o,s),u=o;for(;u!==c;){var l=e.getDirectoryPath(u);if(l===u||t.has(l))break;t.set(l,a),u=l}}}}}function S(t,r,i,a,o){var s=function(t,r,i,a){var o=a.compilerOptions,s=o.baseUrl,c=o.paths;if(s&&c&&!e.pathIsRelative(r))return a.traceEnabled&&(n(a.host,e.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,s,r),n(a.host,e.Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,r)),G(t,r,s,c,i,!1,a)}(t,r,a,o);return s?s.value:e.isExternalModuleNameRelative(r)?function(t,r,i,a,o){if(!o.compilerOptions.rootDirs)return;o.traceEnabled&&n(o.host,e.Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,r);for(var s,c,u=e.normalizePath(e.combinePaths(i,r)),l=0,_=o.compilerOptions.rootDirs;l<_.length;l++){var d=_[l],p=e.normalizePath(d);e.endsWith(p,e.directorySeparator)||(p+=e.directorySeparator);var f=e.startsWith(u,p)&&(void 0===c||c.length<p.length);o.traceEnabled&&n(o.host,e.Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2,p,u,f),f&&(c=p,s=d)}if(c){o.traceEnabled&&n(o.host,e.Diagnostics.Longest_matching_prefix_for_0_is_1,u,c);var m=u.substr(c.length);o.traceEnabled&&n(o.host,e.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2,m,c,u);var g=a(t,u,!e.directoryProbablyExists(i,o.host),o);if(g)return g;o.traceEnabled&&n(o.host,e.Diagnostics.Trying_other_entries_in_rootDirs);for(var y=0,h=o.compilerOptions.rootDirs;y<h.length;y++){if((d=h[y])!==s){var v=e.combinePaths(e.normalizePath(d),m);o.traceEnabled&&n(o.host,e.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2,m,d,v);var b=e.getDirectoryPath(v),x=a(t,v,!e.directoryProbablyExists(b,o.host),o);if(x)return x}}o.traceEnabled&&n(o.host,e.Diagnostics.Module_resolution_using_rootDirs_has_failed)}return}(t,r,i,a,o):function(t,r,i,a){var o=a.compilerOptions.baseUrl;if(!o)return;a.traceEnabled&&n(a.host,e.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,o,r);var s=e.normalizePath(e.combinePaths(o,r));a.traceEnabled&&n(a.host,e.Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2,r,o,s);return i(t,s,!e.directoryProbablyExists(e.getDirectoryPath(s),a.host),a)}(t,r,a,o)}e.resolveTypeReferenceDirective=function(t,r,a,o,s){var u=i(a,o);s&&(a=s.commandLine.options);var _=[],d={compilerOptions:a,host:o,traceEnabled:u,failedLookupLocations:_},p=v(a,o);u&&(void 0===r?void 0===p?n(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,t):n(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,t,p):void 0===p?n(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,t,r):n(o,e.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,t,r,p),s&&n(o,e.Diagnostics.Using_compiler_options_of_project_reference_redirect_0,s.sourceFile.fileName));var f,m=function(){if(p&&p.length)return u&&n(o,e.Diagnostics.Resolving_with_primary_search_path_0,p.join(", ")),e.firstDefined(p,(function(r){var i=e.combinePaths(r,t),a=e.getDirectoryPath(i),s=e.directoryProbablyExists(a,o);return!s&&u&&n(o,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,a),l(j(c.DtsOnly,i,!s,d))}));u&&n(o,e.Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),g=!0;if(m||(m=function(){var i=r&&e.getDirectoryPath(r);if(void 0!==i){u&&n(o,e.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0,i);var a=void 0;if(e.isExternalModuleNameRelative(t)){var s=e.normalizePathAndParts(e.combinePaths(i,t)).path;a=w(c.DtsOnly,s,!1,d,!0)}else{var _=U(c.DtsOnly,t,i,d,void 0,void 0);a=_&&_.value}var p=l(a);return!p&&u&&n(o,e.Diagnostics.Type_reference_directive_0_was_not_resolved,t),p}u&&n(o,e.Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),g=!1),m){var y=m.fileName,h=m.packageId,b=a.preserveSymlinks?y:P(y,o,u);u&&(h?n(o,e.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,t,b,e.packageIdToString(h),g):n(o,e.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,t,b,g)),f={primary:g,resolvedFileName:b,packageId:h,isExternalLibraryImport:I(y)}}return{resolvedTypeReferenceDirective:f,failedLookupLocations:_}},e.getAutomaticTypeDirectiveNames=function(t,r){if(t.types)return t.types;var n=[];if(r.directoryExists&&r.getDirectories){var i=v(t,r);if(i)for(var a=0,o=i;a<o.length;a++){var s=o[a];if(r.directoryExists(s))for(var c=0,u=r.getDirectories(s);c<u.length;c++){var l=u[c],_=e.normalizePath(l),d=e.combinePaths(s,_,"package.json");if(!(r.fileExists(d)&&null===e.readJson(d,r).typings)){var p=e.getBaseFileName(_);46!==p.charCodeAt(0)&&n.push(p)}}}}return n},e.createModuleResolutionCache=function(e,t,r){return D(x(r),x(r),e,t)},e.createCacheWithRedirects=x,e.createModuleResolutionCacheWithMaps=D,e.resolveModuleNameFromCache=function(t,r,n){var i=e.getDirectoryPath(r),a=n&&n.getOrCreateCacheForDirectory(i);return a&&a.get(t)},e.resolveModuleName=function(t,r,a,o,s,c){var u=i(a,o);c&&(a=c.commandLine.options),u&&(n(o,e.Diagnostics.Resolving_module_0_from_1,t,r),c&&n(o,e.Diagnostics.Using_compiler_options_of_project_reference_redirect_0,c.sourceFile.fileName));var l=e.getDirectoryPath(r),_=s&&s.getOrCreateCacheForDirectory(l,c),d=_&&_.get(t);if(d)u&&n(o,e.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1,t,l);else{var p=a.moduleResolution;switch(void 0===p?(p=e.getEmitModuleKind(a)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic,u&&n(o,e.Diagnostics.Module_resolution_kind_is_not_specified_using_0,e.ModuleResolutionKind[p])):u&&n(o,e.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0,e.ModuleResolutionKind[p]),e.perfLogger.logStartResolveModule(t),p){case e.ModuleResolutionKind.NodeJs:d=A(t,r,a,o,s,c);break;case e.ModuleResolutionKind.Classic:d=$(t,r,a,o,s,c);break;default:return e.Debug.fail("Unexpected moduleResolution: "+p)}d&&d.resolvedModule&&e.perfLogger.logInfoEvent('Module "'+t+'" resolved to "'+d.resolvedModule.resolvedFileName+'"'),e.perfLogger.logStopResolveModule(d&&d.resolvedModule?""+d.resolvedModule.resolvedFileName:"null"),_&&(_.set(t,d),e.isExternalModuleNameRelative(t)||s.getOrCreateCacheForModuleName(t,c).set(l,d))}return u&&(d.resolvedModule?d.resolvedModule.packageId?n(o,e.Diagnostics.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,t,d.resolvedModule.resolvedFileName,e.packageIdToString(d.resolvedModule.packageId)):n(o,e.Diagnostics.Module_name_0_was_successfully_resolved_to_1,t,d.resolvedModule.resolvedFileName):n(o,e.Diagnostics.Module_name_0_was_not_resolved,t)),d},e.resolveJSModule=function(e,t,r){var n=N(e,t,r),i=n.resolvedModule,a=n.failedLookupLocations;if(!i)throw new Error("Could not resolve JS module '"+e+"' starting at '"+t+"'. Looked in: "+a.join(", "));return i.resolvedFileName},e.tryResolveJSModule=function(e,t,r){var n=N(e,t,r).resolvedModule;return n&&n.resolvedFileName};var T=[c.JavaScript],E=[c.TypeScript,c.JavaScript],C=t(E,[c.Json]),k=[c.TSConfig];function N(t,r,n){return F(t,r,{moduleResolution:e.ModuleResolutionKind.NodeJs,allowJs:!0},n,void 0,T,void 0)}function A(t,r,n,i,a,o,s){return F(t,e.getDirectoryPath(r),n,i,a,s?k:n.resolveJsonModule?C:E,o)}function F(t,a,o,s,u,l,d){var p=i(o,s),f=[],m={compilerOptions:o,host:s,traceEnabled:p,failedLookupLocations:f},g=e.forEach(l,(function(i){return function(i){var l=S(i,t,a,(function(e,t,r,n){return w(e,t,r,n,!0)}),m);if(l)return Z({resolved:l,isExternalLibraryImport:I(l.path)});if(e.isExternalModuleNameRelative(t)){var _=e.normalizePathAndParts(e.combinePaths(a,t)),f=_.path,g=_.parts,y=w(i,f,!1,m,!0);return y&&Z({resolved:y,isExternalLibraryImport:e.contains(g,"node_modules")})}p&&n(s,e.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1,t,c[i]);var h=U(i,t,a,m,u,d);if(!h)return;var v=h.value;if(!o.preserveSymlinks&&v&&!v.originalPath){var b=P(v.path,s,p),x=b===v.path?void 0:v.path;v=r(r({},v),{path:b,originalPath:x})}return{value:v&&{resolved:v,isExternalLibraryImport:!0}}}(i)}));if(g&&g.value){var y=g.value;return _(y.resolved,y.isExternalLibraryImport,f)}return{resolvedModule:void 0,failedLookupLocations:f}}function P(t,r,i){if(!r.realpath)return t;var a=e.normalizePath(r.realpath(t));return i&&n(r,e.Diagnostics.Resolving_real_path_for_0_result_1,t,a),e.Debug.assert(r.fileExists(a),t+" linked to nonexistent file "+a),a}function w(t,r,i,o,s){if(o.traceEnabled&&n(o.host,e.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1,r,c[t]),!e.hasTrailingDirectorySeparator(r)){if(!i){var u=e.getDirectoryPath(r);e.directoryProbablyExists(u,o.host)||(o.traceEnabled&&n(o.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,u),i=!0)}var l=L(t,r,i,o);if(l){var _=s?function(t){var r=e.normalizePath(t.path),n=r.lastIndexOf(e.nodeModulesPathPart);if(-1===n)return;var i=n+e.nodeModulesPathPart.length,a=O(r,i);64===r.charCodeAt(i)&&(a=O(r,a));return r.slice(0,a)}(l):void 0;return a(_?K(_,!1,o):void 0,l)}}i||(e.directoryProbablyExists(r,o.host)||(o.traceEnabled&&n(o.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,r),i=!0));return j(t,r,i,o,s)}function I(t){return e.stringContains(t,e.nodeModulesPathPart)}function O(t,r){var n=t.indexOf(e.directorySeparator,r+1);return-1===n?r:n}function M(e,t,r,n){return o(L(e,t,r,n))}function L(t,r,i,a){if(t===c.Json||t===c.TSConfig){var o=e.tryRemoveExtension(r,".json");return void 0===o&&t===c.Json?void 0:R(o||r,t,i,a)}var s=R(r,t,i,a);if(s)return s;if(e.hasJSFileExtension(r)){var u=e.removeFileExtension(r);if(a.traceEnabled){var l=r.substring(u.length);n(a.host,e.Diagnostics.File_name_0_has_a_1_extension_stripping_it,r,l)}return R(u,t,i,a)}}function R(t,r,n,i){if(!n){var a=e.getDirectoryPath(t);a&&(n=!e.directoryProbablyExists(a,i.host))}switch(r){case c.DtsOnly:return o(".d.ts");case c.TypeScript:return o(".ts")||o(".tsx")||o(".d.ts");case c.JavaScript:return o(".js")||o(".jsx");case c.TSConfig:case c.Json:return o(".json")}function o(e){var r=B(t+e,n,i);return void 0===r?void 0:{path:r,ext:e}}}function B(t,r,i){if(!r){if(i.host.fileExists(t))return i.traceEnabled&&n(i.host,e.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result,t),t;i.traceEnabled&&n(i.host,e.Diagnostics.File_0_does_not_exist,t)}i.failedLookupLocations.push(t)}function j(e,t,r,n,i){void 0===i&&(i=!0);var o=i?K(t,r,n):void 0;return a(o,J(e,t,r,n,o&&o.packageJsonContent,o&&o.versionPaths))}function K(t,r,i){var a=i.host,o=i.traceEnabled,s=!r&&e.directoryProbablyExists(t,a),c=e.combinePaths(t,"package.json");if(s&&a.fileExists(c)){var u=e.readJson(c,a);return o&&n(a,e.Diagnostics.Found_package_json_at_0,c),{packageDirectory:t,packageJsonContent:u,versionPaths:y(u,i)}}s&&o&&n(a,e.Diagnostics.File_0_does_not_exist,c),i.failedLookupLocations.push(c)}function J(t,r,i,a,u,l){var _;if(u)switch(t){case c.JavaScript:case c.Json:_=g(u,r,a);break;case c.TypeScript:_=m(u,r,a)||g(u,r,a);break;case c.DtsOnly:_=m(u,r,a);break;case c.TSConfig:_=function(e,t,r){return p(e,"tsconfig",t,r)}(u,r,a);break;default:return e.Debug.assertNever(t)}var d=function(t,r,i,a){var s=B(r,i,a);if(s){var u=function(t,r){var n=e.tryGetExtensionFromPath(r);return void 0!==n&&function(e,t){switch(e){case c.JavaScript:return".js"===t||".jsx"===t;case c.TSConfig:case c.Json:return".json"===t;case c.TypeScript:return".ts"===t||".tsx"===t||".d.ts"===t;case c.DtsOnly:return".d.ts"===t}}(t,n)?{path:r,ext:n}:void 0}(t,s);if(u)return o(u);a.traceEnabled&&n(a.host,e.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it,s)}return w(t===c.DtsOnly?c.TypeScript:t,r,i,a,!1)},f=_?!e.directoryProbablyExists(e.getDirectoryPath(_),a.host):void 0,y=i||!e.directoryProbablyExists(r,a.host),h=e.combinePaths(r,t===c.TSConfig?"tsconfig":"index");if(l&&(!_||e.containsPath(r,_))){var v=e.getRelativePathFromDirectory(r,_||h,!1);a.traceEnabled&&n(a.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,l.version,e.version,v);var b=G(t,v,r,l.paths,d,f||y,a);if(b)return s(b.value)}var x=_&&s(d(t,_,f,a));return x||L(t,h,y,a)}function z(t){var r=t.indexOf(e.directorySeparator);return"@"===t[0]&&(r=t.indexOf(e.directorySeparator,r+1)),-1===r?{packageName:t,rest:""}:{packageName:t.slice(0,r),rest:t.slice(r+1)}}function U(e,t,r,n,i,a){return V(e,t,r,n,!1,i,a)}function V(t,r,n,i,a,o,s){var c=o&&o.getOrCreateCacheForModuleName(r,s);return e.forEachAncestorDirectory(e.normalizeSlashes(n),(function(n){if("node_modules"!==e.getBaseFileName(n)){var o=Q(c,r,n,i);return o||Z(q(t,r,n,i,a))}}))}function q(t,r,i,a,o){var s=e.combinePaths(i,"node_modules"),u=e.directoryProbablyExists(s,a.host);!u&&a.traceEnabled&&n(a.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,s);var l=o?void 0:W(t,r,s,u,a);if(l)return l;if(t===c.TypeScript||t===c.DtsOnly){var _=e.combinePaths(s,"@types"),d=u;return u&&!e.directoryProbablyExists(_,a.host)&&(a.traceEnabled&&n(a.host,e.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it,_),d=!1),W(c.DtsOnly,function(t,r){var i=Y(t);r.traceEnabled&&i!==t&&n(r.host,e.Diagnostics.Scoped_package_detected_looking_in_0,i);return i}(r,a),_,d,a)}}function W(t,r,i,s,c){var u=e.normalizePath(e.combinePaths(i,r)),l=K(u,!s,c);if(l){var _=L(t,u,!s,c);if(_)return o(_);var d=J(t,u,!s,c,l.packageJsonContent,l.versionPaths);return a(l,d)}var p=function(e,t,r,n){var i=L(e,t,r,n)||J(e,t,r,n,l&&l.packageJsonContent,l&&l.versionPaths);return a(l,i)},f=z(r),m=f.packageName,g=f.rest;if(""!==g){var y=e.combinePaths(i,m);if((l=K(y,!s,c))&&l.versionPaths){c.traceEnabled&&n(c.host,e.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,l.versionPaths.version,e.version,g);var h=s&&e.directoryProbablyExists(y,c.host),v=G(t,g,y,l.versionPaths.paths,p,!h,c);if(v)return v.value}}return p(t,u,!s,c)}function G(t,r,i,a,s,c,u){var l=e.matchPatternOrExact(e.getOwnKeys(a),r);if(l){var _=e.isString(l)?void 0:e.matchedText(l,r),d=e.isString(l)?l:e.patternText(l);return u.traceEnabled&&n(u.host,e.Diagnostics.Module_name_0_matched_pattern_1,r,d),{value:e.forEach(a[d],(function(r){var a=_?r.replace("*",_):r,l=e.normalizePath(e.combinePaths(i,a));u.traceEnabled&&n(u.host,e.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1,r,a);var d=e.tryGetExtensionFromPath(l);if(void 0!==d){var p=B(l,c,u);if(void 0!==p)return o({path:p,ext:d})}return s(t,l,c||!e.directoryProbablyExists(e.getDirectoryPath(l),u.host),u)}))}}}e.nodeModuleNameResolver=A,e.nodeModulesPathPart="/node_modules/",e.pathContainsNodeModules=I,e.parsePackageName=z;var H="__";function Y(t){if(e.startsWith(t,"@")){var r=t.replace(e.directorySeparator,H);if(r!==t)return r.slice(1)}return t}function X(t){return e.stringContains(t,H)?"@"+t.replace(H,e.directorySeparator):t}function Q(t,r,i,a){var o,s=t&&t.get(i);if(s)return a.traceEnabled&&n(a.host,e.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1,r,i),(o=a.failedLookupLocations).push.apply(o,s.failedLookupLocations),{value:s.resolvedModule&&{path:s.resolvedModule.resolvedFileName,originalPath:s.resolvedModule.originalPath||!0,extension:s.resolvedModule.extension,packageId:s.resolvedModule.packageId}}}function $(t,r,n,a,o,s){var u=[],l={compilerOptions:n,host:a,traceEnabled:i(n,a),failedLookupLocations:u},d=e.getDirectoryPath(r),p=f(c.TypeScript)||f(c.JavaScript);return _(p&&p.value,!1,u);function f(r){var n=S(r,t,d,M,l);if(n)return{value:n};if(e.isExternalModuleNameRelative(t)){var i=e.normalizePath(e.combinePaths(d,t));return Z(M(r,i,!1,l))}var a=o&&o.getOrCreateCacheForModuleName(t,s),u=e.forEachAncestorDirectory(d,(function(n){var i=Q(a,t,n,l);if(i)return i;var o=e.normalizePath(e.combinePaths(n,t));return Z(M(r,o,!1,l))}));return u||(r===c.TypeScript?function(e,t,r){return V(c.DtsOnly,e,t,r,!0,void 0,void 0)}(t,d,l):void 0)}}function Z(e){return void 0!==e?{value:e}:void 0}e.getTypesPackageName=function(e){return"@types/"+Y(e)},e.mangleScopedPackageName=Y,e.getPackageNameFromTypesPackageName=function(t){var r=e.removePrefix(t,"@types/");return r!==t?X(r):t},e.unmangleScopedPackageName=X,e.classicNameResolver=$,e.loadModuleFromGlobalCache=function(t,r,a,o,s){var u=i(a,o);u&&n(o,e.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,r,t,s);var l=[],d={compilerOptions:a,host:o,traceEnabled:u,failedLookupLocations:l};return _(q(c.DtsOnly,t,s,d,!1),!0,l)}}(s||(s={})),function(e){var n;function i(e,t){return e.body&&!e.body.parent&&g(e,e.body),e.body?a(e.body,t):1}function a(t,r){void 0===r&&(r=e.createMap());var n=""+e.getNodeId(t);if(r.has(n))return r.get(n)||0;r.set(n,void 0);var s=function(t,r){switch(t.kind){case 245:case 246:return 0;case 247:if(e.isEnumConst(t))return 2;break;case 253:case 252:if(!e.hasModifier(t,1))return 0;break;case 259:if(!t.moduleSpecifier&&t.exportClause){for(var n=0,s=0,c=t.exportClause.elements;s<c.length;s++){var u=o(c[s],r);if(u>n&&(n=u),1===n)return n}return n}break;case 249:var l=0;return e.forEachChild(t,(function(t){var n=a(t,r);switch(n){case 0:return;case 2:return void(l=2);case 1:return l=1,!0;default:e.Debug.assertNever(n)}})),l;case 248:return i(t,r);case 75:if(t.isInJSDocNamespace)return 0}return 1}(t,r);return r.set(n,s),s}function o(t,r){for(var n=t.propertyName||t.name,i=t.parent;i;){if(e.isBlock(i)||e.isModuleBlock(i)||e.isSourceFile(i)){for(var o=void 0,s=0,c=i.statements;s<c.length;s++){var u=c[s];if(e.nodeHasName(u,n)){u.parent||g(i,u);var l=a(u,r);if((void 0===o||l>o)&&(o=l),1===o)return o}}if(void 0!==o)return o}i=i.parent}return 1}function s(t){return e.Debug.attachFlowNodeDebugInfo(t),t}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={})),e.getModuleInstanceState=i,function(e){e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethod=128]="IsObjectLiteralOrClassExpressionMethod"}(n||(n={}));var c=s,u=function(){var n,a,o,u,f,y,h,v,b,x,D,S,T,E,C,k,N,A,F,P,w,I,O,M,L=0,R={flags:1},B={flags:1},j=0;function K(t,r,i,a,o){return e.createDiagnosticForNodeInSourceFile(e.getSourceFileOfNode(t)||n,t,r,i,a,o)}return function(t,r){n=t,a=r,o=e.getEmitScriptTarget(a),w=function(t,r){return!(!e.getStrictOptionValue(r,"alwaysStrict")||t.isDeclarationFile)||!!t.externalModuleIndicator}(n,r),O=e.createUnderscoreEscapedMap(),L=0,M=n.isDeclarationFile,I=e.objectAllocator.getSymbolConstructor(),e.Debug.attachFlowNodeDebugInfo(R),e.Debug.attachFlowNodeDebugInfo(B),n.locals||(Be(n),n.symbolCount=L,n.classifiableNames=O,function(){if(!b)return;for(var t=f,r=v,i=h,a=u,o=D,c=0,l=b;c<l.length;c++){var _=l[c],d=e.getJSDocHost(_);f=e.findAncestor(d.parent,(function(e){return!!(1&Ee(e))}))||n,h=e.getEnclosingBlockScopeContainer(d)||n,D=s({flags:2}),u=_,Be(_.typeExpression);var p=e.getNameOfDeclaration(_);if((e.isJSDocEnumTag(_)||!_.fullName)&&p&&e.isPropertyAccessEntityNameExpression(p.parent)){var m=$e(p.parent);if(m){Xe(n.symbol,p.parent,m,!!e.findAncestor(p,(function(t){return e.isPropertyAccessExpression(t)&&"prototype"===t.name.escapedText})),!1);var g=f;switch(e.getAssignmentDeclarationPropertyAccessKind(p.parent)){case 1:case 2:f=e.isExternalOrCommonJsModule(n)?n:void 0;break;case 4:f=p.parent.expression;break;case 3:f=p.parent.expression.name;break;case 5:f=e.isPropertyAccessExpression(p.parent.expression)?p.parent.expression.name:p.parent.expression;break;case 0:return e.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}f&&G(_,524288,788968),f=g}}else e.isJSDocEnumTag(_)||!_.fullName||75===_.fullName.kind?(u=_.parent,Pe(_,524288,788968)):Be(_.fullName)}f=t,v=r,h=i,u=a,D=o}()),n=void 0,a=void 0,o=void 0,u=void 0,f=void 0,y=void 0,h=void 0,v=void 0,b=void 0,x=!1,D=void 0,S=void 0,T=void 0,E=void 0,C=void 0,k=void 0,A=void 0,F=!1,P=0,j=0};function J(e,t){return L++,new I(e,t)}function z(t,r,n){t.flags|=n,r.symbol=t,t.declarations=e.appendIfUnique(t.declarations,r),1955&n&&!t.exports&&(t.exports=e.createSymbolTable()),6240&n&&!t.members&&(t.members=e.createSymbolTable()),t.constEnumOnlyModule&&304&t.flags&&(t.constEnumOnlyModule=!1),111551&n&&U(t,r)}function U(t,r){var n=t.valueDeclaration;(!n||e.isAssignmentDeclaration(n)&&!e.isAssignmentDeclaration(r)||n.kind!==r.kind&&e.isEffectiveModuleDeclaration(n))&&(t.valueDeclaration=r)}function V(t){if(258===t.kind)return t.isExportEquals?"export=":"default";var r=e.getNameOfDeclaration(t);if(r){if(e.isAmbientModule(t)){var n=e.getTextOfIdentifierOrLiteral(r);return e.isGlobalScopeAugmentation(t)?"__global":'"'+n+'"'}if(153===r.kind){var i=r.expression;return e.isStringOrNumericLiteralLike(i)?e.escapeLeadingUnderscores(i.text):e.isSignedNumericLiteral(i)?e.tokenToString(i.operator)+i.operand.text:(e.Debug.assert(e.isWellKnownSymbolSyntactically(i)),e.getPropertyNameForKnownSymbolName(e.idText(i.name)))}return e.isWellKnownSymbolSyntactically(r)?e.getPropertyNameForKnownSymbolName(e.idText(r.name)):e.isPropertyNameLiteral(r)?e.getEscapedTextOfIdentifierOrLiteral(r):void 0}switch(t.kind){case 161:return"__constructor";case 169:case 164:case 303:return"__call";case 170:case 165:return"__new";case 166:return"__index";case 259:return"__export";case 288:return"export=";case 208:if(2===e.getAssignmentDeclarationKind(t))return"export=";e.Debug.fail("Unknown binary declaration kind");break;case 298:return e.isJSDocConstructSignature(t)?"__new":"__call";case 155:return e.Debug.assert(298===t.parent.kind,"Impossible parameter parent kind",(function(){return"parent is: "+(e.SyntaxKind?e.SyntaxKind[t.parent.kind]:t.parent.kind)+", expected JSDocFunctionType"})),"arg"+t.parent.parameters.indexOf(t)}}function q(t){return e.isNamedDeclaration(t)?e.declarationNameToString(t.name):e.unescapeLeadingUnderscores(e.Debug.assertDefined(V(t)))}function W(r,i,a,o,s,c){e.Debug.assert(!e.hasDynamicName(a));var u,l=e.hasModifier(a,512),_=l&&i?"default":V(a);if(void 0===_)u=J(0,"__missing");else if(u=r.get(_),2885600&o&&O.set(_,!0),u){if(c&&!u.isReplaceableByMethod)return u;if(u.flags&s)if(u.isReplaceableByMethod)r.set(_,u=J(0,_));else if(!(3&o&&67108864&u.flags)){e.isNamedDeclaration(a)&&(a.name.parent=a);var d=2&u.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,p=!0;(384&u.flags||384&o)&&(d=e.Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,p=!1);var f=!1;e.length(u.declarations)&&(l?(d=e.Diagnostics.A_module_cannot_have_multiple_default_exports,p=!1,f=!0):u.declarations&&u.declarations.length&&258===a.kind&&!a.isExportEquals&&(d=e.Diagnostics.A_module_cannot_have_multiple_default_exports,p=!1,f=!0));var m=e.getNameOfDeclaration(a)||a,g=[];e.forEach(u.declarations,(function(t,r){var i=e.getNameOfDeclaration(t)||t,a=K(i,d,p?q(t):void 0);n.bindDiagnostics.push(f?e.addRelatedInfo(a,K(m,0===r?e.Diagnostics.Another_export_default_is_here:e.Diagnostics.and_here)):a),f&&g.push(K(i,e.Diagnostics.The_first_export_default_is_here))}));var y=K(m,d,p?q(a):void 0);n.bindDiagnostics.push(f?e.addRelatedInfo.apply(void 0,t([y],g)):y),u=J(0,_)}}else r.set(_,u=J(0,_)),c&&(u.isReplaceableByMethod=!0);return z(u,a,o),u.parent?e.Debug.assert(u.parent===i,"Existing symbol parent should match new one"):u.parent=i,u}function G(t,r,n){var i=1&e.getCombinedModifierFlags(t);if(2097152&r)return 261===t.kind||252===t.kind&&i?W(f.symbol.exports,f.symbol,t,r,n):W(f.locals,void 0,t,r,n);if(e.isJSDocTypeAlias(t)&&e.Debug.assert(e.isInJSFile(t)),!e.isAmbientModule(t)&&(i||64&f.flags)||e.isJSDocTypeAlias(t)){if(!f.locals||e.hasModifier(t,512)&&!V(t))return W(f.symbol.exports,f.symbol,t,r,n);var a=111551&r?1048576:0,o=W(f.locals,void 0,t,a,n);return o.exportSymbol=W(f.symbol.exports,f.symbol,t,r,n),t.localSymbol=o,o}return W(f.locals,void 0,t,r,n)}function H(e){if(M)$(e);else if(536870912&e.transformFlags)M=!0,$(e),M=!1,j|=e.transformFlags&~m(e.kind);else{var t=j;j=0,$(e),j=t|p(e,j)}}function Y(e){X(e,(function(e){return 243===e.kind?Be(e):void 0})),X(e,(function(e){return 243!==e.kind?Be(e):void 0}))}function X(t,r){if(void 0===r&&(r=Be),void 0!==t)if(M)e.forEach(t,r);else{var n=j;j=0;for(var i=0,a=0,o=t;a<o.length;a++){var s=o[a];r(s),i|=-536870913&s.transformFlags}t.transformFlags=536870912|i,j|=n}}function Q(t){e.forEachChild(t,Be,X)}function $(t){if(function(t){if(!(1&D.flags))return!1;if(D===R){if((e.isStatementButNotDeclaration(t)&&223!==t.kind||244===t.kind||248===t.kind&&function(e){var t=i(e);return 1===t||2===t&&!!a.preserveConstEnums}(t))&&(D=B,!a.allowUnreachableCode)){var r=e.unreachableCodeIsError(a)&&!(8388608&t.flags)&&(!e.isVariableStatement(t)||!!(3&e.getCombinedNodeFlags(t.declarationList))||t.declarationList.declarations.some((function(e){return!!e.initializer})));!function(t,r){if(e.isStatement(t)&&l(t)&&e.isBlock(t.parent)){var n=t.parent.statements,i=e.sliceAfter(n,t);e.getRangesWhere(i,l,(function(e,t){return r(i[e],i[t-1])}))}else r(t,t)}(t,(function(t,n){return Re(r,t,n,e.Diagnostics.Unreachable_code_detected)}))}}return!0}(t))return Q(t),void je(t);switch(t.kind>=224&&t.kind<=240&&!a.allowUnreachableCode&&(t.flowNode=D),t.kind){case 228:!function(e){var t=ie(),r=ne(),n=ne();oe(t,D),D=t,me(e.expression,r,n),D=_e(r),ge(e.statement,n,t),oe(t,D),D=_e(n)}(t);break;case 227:!function(t){var r=ie(),n=237===t.parent.kind?e.lastOrUndefined(A):void 0,i=n?n.continueTarget:ne(),a=n?n.breakTarget:ne();oe(r,D),D=r,ge(t.statement,a,i),oe(i,D),D=_e(i),me(t.expression,r,a),D=_e(a)}(t);break;case 229:!function(e){var t=ie(),r=ne(),n=ne();Be(e.initializer),oe(t,D),D=t,me(e.condition,r,n),D=_e(r),ge(e.statement,n,t),Be(e.incrementor),oe(t,D),D=_e(n)}(t);break;case 230:case 231:!function(e){var t=ie(),r=ne();Be(e.expression),oe(t,D),D=t,231===e.kind&&Be(e.awaitModifier);oe(r,D),Be(e.initializer),242!==e.initializer.kind&&ve(e.initializer);ge(e.statement,r,t),oe(t,D),D=_e(r)}(t);break;case 226:!function(e){var t=ne(),r=ne(),n=ne();me(e.expression,t,r),D=_e(t),Be(e.thenStatement),oe(n,D),D=_e(r),Be(e.elseStatement),oe(n,D),D=_e(n)}(t);break;case 234:case 238:!function(e){Be(e.expression),234===e.kind&&(F=!0,E&&oe(E,D));D=R}(t);break;case 233:case 232:!function(e){if(Be(e.label),e.label){var t=function(e){if(A)for(var t=0,r=A;t<r.length;t++){var n=r[t];if(n.name===e)return n}return}(e.label.escapedText);t&&(t.referenced=!0,ye(e,t.breakTarget,t.continueTarget))}else ye(e,S,T)}(t);break;case 239:!function(e){var t=ne(),r=D,n=[],i=c;(e.catchClause||e.finallyBlock)&&(c=function(e){return n.push(e),s(e)});Be(e.tryBlock),c=i,oe(t,D);var a=D,o=R;if(e.catchClause){if(D=r,n.length){var u=ne();oe(u,D);for(var l=0,_=n;l<_.length;l++){var d=_[l];oe(u,d)}D=_e(u)}Be(e.catchClause),oe(t,D),o=D}if(e.finallyBlock){var p=r;if(!e.catchClause&&n.length){var f=ne();oe(f,r);for(var m=0,g=n;m<g.length;m++){d=g[m];oe(f,d)}p=_e(f)}var y=s({flags:4096,antecedent:p,lock:{}});if(oe(t,y),D=_e(t),Be(e.finallyBlock),1&D.flags||1&a.flags&&1&o.flags&&(D=a===B||o===B?B:R),!(1&D.flags)){var h=c({flags:8192,antecedent:D});y.lock=h,D=h}}else D=_e(t)}(t);break;case 236:!function(t){var r=ne();Be(t.expression);var n=S,i=N;S=r,N=D,Be(t.caseBlock),oe(r,D);var a=e.forEach(t.caseBlock.clauses,(function(e){return 276===e.kind}));t.possiblyExhaustive=!a&&!r.antecedents,a||oe(r,ce(N,t,0,0));S=n,N=i,D=_e(r)}(t);break;case 250:!function(e){var t=j;j=0;for(var r=e.clauses,n=R,i=0;i<r.length;i++){for(var o=i;!r[i].statements.length&&i+1<r.length;)Be(r[i]),i++;var s=ne();oe(s,ce(N,e.parent,o,i+1)),oe(s,n),D=_e(s);var c=r[i];Be(c),n=D,1&D.flags||i===r.length-1||!a.noFallthroughCasesInSwitch||(c.fallthroughFlowNode=D)}r.transformFlags=536870912|j,j|=t}(t);break;case 275:!function(e){var t=D;D=N,Be(e.expression),D=t,X(e.statements)}(t);break;case 225:!function(t){if(Be(t.expression),195===t.expression.kind){var r=t.expression;e.isDottedName(r.expression)&&(D=function(e,t){return ae(e),c({flags:512,antecedent:e,node:t})}(D,r))}}(t);break;case 237:!function(t){var r=ie(),n=ne();Be(t.label),oe(r,D);var i=function(e,t,r){var n={name:e,breakTarget:t,continueTarget:r,referenced:!1};return(A||(A=[])).push(n),n}(t.label.escapedText,n,r);Be(t.statement),A.pop(),i.referenced||a.allowUnusedLabels||function(e,t,r){Re(e,t,t,r)}(e.unusedLabelIsError(a),t.label,e.Diagnostics.Unused_label);t.statement&&227===t.statement.kind||(oe(n,D),D=_e(n))}(t);break;case 206:!function(e){if(53===e.operator){var t=C;C=k,k=t,Q(e),k=C,C=t}else Q(e),45!==e.operator&&46!==e.operator||ve(e.operand)}(t);break;case 207:!function(e){Q(e),(45===e.operator||46===e.operator)&&ve(e.operand)}(t);break;case 208:!function(t){var r=t.operatorToken.kind;if(55===r||56===r||60===r)if(pe(t)){var n=ne();be(t,n,n),D=_e(n)}else be(t,C,k);else{if(Q(t),e.isAssignmentOperator(r)&&!e.isAssignmentTarget(t))if(ve(t.left),62===r&&194===t.left.kind)re(t.left.expression)&&(D=le(D,t))}}(t);break;case 202:!function(e){Q(e),193===e.expression.kind&&ve(e.expression)}(t);break;case 209:!function(e){var t=ne(),r=ne(),n=ne();me(e.condition,t,r),D=_e(t),Be(e.questionToken),Be(e.whenTrue),oe(n,D),D=_e(r),Be(e.colonToken),Be(e.whenFalse),oe(n,D),D=_e(n)}(t);break;case 241:!function(t){Q(t),(t.initializer||e.isForInOrOfStatement(t.parent.parent))&&function t(r){var n=e.isOmittedExpression(r)?void 0:r.name;if(e.isBindingPattern(n))for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];t(o)}else D=ue(D,r)}(t)}(t);break;case 193:case 194:!function(t){e.isOptionalChain(t)?Te(t):Q(t)}(t);break;case 195:!function(t){if(e.isOptionalChain(t))Te(t);else{var r=e.skipParentheses(t.expression);200===r.kind||201===r.kind?(X(t.typeArguments),X(t.arguments),Be(t.expression)):Q(t)}if(193===t.expression.kind){var n=t.expression;re(n.expression)&&e.isPushOrUnshiftIdentifier(n.name)&&(D=le(D,t))}}(t);break;case 315:case 308:case 309:!function(e){e.tagName.parent=e,309!==e.kind&&e.fullName&&g(e,e.fullName)}(t);break;case 288:Y(t.statements),Be(t.endOfFileToken);break;case 222:case 249:Y(t.statements);break;default:Q(t)}je(t)}function Z(t){switch(t.kind){case 75:case 103:case 193:case 194:return ee(t);case 195:return function(e){if(e.arguments)for(var t=0,r=e.arguments;t<r.length;t++){if(ee(r[t]))return!0}if(193===e.expression.kind&&ee(e.expression.expression))return!0;return!1}(t);case 199:return Z(t.expression);case 208:return function(t){switch(t.operatorToken.kind){case 62:return ee(t.left);case 34:case 35:case 36:case 37:return re(t.left)||re(t.right)||te(t.right,t.left)||te(t.left,t.right);case 97:return re(t.left);case 96:return r=t.left,n=t.right,e.isStringLiteralLike(r)&&Z(n);case 27:return Z(t.right)}var r,n;return!1}(t);case 206:return 53===t.operator&&Z(t.operand);case 203:return Z(t.expression)}return!1}function ee(t){return 75===t.kind||103===t.kind||101===t.kind||(e.isPropertyAccessExpression(t)||e.isNonNullExpression(t)||e.isParenthesizedExpression(t))&&ee(t.expression)||e.isElementAccessExpression(t)&&e.isStringOrNumericLiteralLike(t.argumentExpression)&&ee(t.expression)||e.isOptionalChain(t)}function te(t,r){return e.isTypeOfExpression(t)&&re(t.expression)&&e.isStringLiteralLike(r)}function re(e){switch(e.kind){case 199:return re(e.expression);case 208:switch(e.operatorToken.kind){case 62:return re(e.left);case 27:return re(e.right)}}return ee(e)}function ne(){return s({flags:4,antecedents:void 0})}function ie(){return s({flags:8,antecedents:void 0})}function ae(e){e.flags|=1024&e.flags?2048:1024}function oe(t,r){1&r.flags||e.contains(t.antecedents,r)||((t.antecedents||(t.antecedents=[])).push(r),ae(r))}function se(t,r,n){return 1&r.flags?r:n?!(105===n.kind&&64&t||90===n.kind&&32&t)||e.isExpressionOfOptionalChainRoot(n)||e.isNullishCoalesce(n.parent)?Z(n)?(ae(r),c({flags:t,antecedent:r,node:n})):r:R:32&t?r:R}function ce(e,t,r,n){return Z(t.expression)?(ae(e),c({flags:128,antecedent:e,switchStatement:t,clauseStart:r,clauseEnd:n})):e}function ue(e,t){return ae(e),c({flags:16,antecedent:e,node:t})}function le(e,t){return ae(e),c({flags:256,antecedent:e,node:t})}function _e(e){var t=e.antecedents;return t?1===t.length?t[0]:e:R}function de(e){for(;;)if(199===e.kind)e=e.expression;else{if(206!==e.kind||53!==e.operator)return 208===e.kind&&(55===e.operatorToken.kind||56===e.operatorToken.kind||60===e.operatorToken.kind);e=e.operand}}function pe(t){for(;e.isParenthesizedExpression(t.parent)||e.isPrefixUnaryExpression(t.parent)&&53===t.parent.operator;)t=t.parent;return!(function(e){var t=e.parent;switch(t.kind){case 226:case 228:case 227:return t.expression===e;case 229:case 209:return t.condition===e}return!1}(t)||de(t.parent)||e.isOptionalChain(t.parent)&&t.parent.expression===t)}function fe(e,t,r,n){var i=C,a=k;C=r,k=n,e(t),C=i,k=a}function me(t,r,n){fe(Be,t,r,n),t&&(de(t)||e.isOptionalChain(t)&&xe(t))||(oe(r,se(32,D,t)),oe(n,se(64,D,t)))}function ge(e,t,r){var n=S,i=T;S=t,T=r,Be(e),S=n,T=i}function ye(e,t,r){var n=233===e.kind?t:r;n&&(oe(n,D),D=R)}function he(e){208===e.kind&&62===e.operatorToken.kind?ve(e.left):ve(e)}function ve(e){if(ee(e))D=ue(D,e);else if(191===e.kind)for(var t=0,r=e.elements;t<r.length;t++){var n=r[t];212===n.kind?ve(n.expression):he(n)}else if(192===e.kind)for(var i=0,a=e.properties;i<a.length;i++){var o=a[i];279===o.kind?he(o.initializer):280===o.kind?ve(o.name):281===o.kind&&ve(o.expression)}}function be(e,t,r){var n=ne();55===e.operatorToken.kind?me(e.left,n,r):me(e.left,t,n),D=_e(n),Be(e.operatorToken),me(e.right,t,r)}function xe(t){return!e.isOptionalChain(t.parent)||e.isOptionalChainRoot(t.parent)||t!==t.parent.expression}function De(e){switch(Be(e.questionDotToken),e.kind){case 193:Be(e.name);break;case 194:Be(e.argumentExpression);break;case 195:X(e.typeArguments),X(e.arguments)}}function Se(t,r,n){var i=t.questionDotToken?ne():void 0;!function(t,r,n){fe(Be,t,r,n),e.isOptionalChain(t)&&!xe(t)||(oe(r,se(32,D,t)),oe(n,se(64,D,t)))}(t.expression,i||r,n),i&&(D=_e(i)),fe(De,t,r,n),xe(t)&&(oe(r,se(32,D,t)),oe(n,se(64,D,t)))}function Te(e){if(pe(e)){var t=ne();Se(e,t,t),D=_e(t)}else Se(e,C,k)}function Ee(t){switch(t.kind){case 213:case 244:case 247:case 192:case 172:case 302:case 272:return 1;case 245:return 65;case 248:case 246:case 185:return 33;case 288:return 37;case 160:if(e.isObjectLiteralOrClassExpressionMethod(t))return 173;case 161:case 243:case 159:case 162:case 163:case 164:case 303:case 298:case 169:case 165:case 166:case 170:return 45;case 200:case 201:return 61;case 249:return 4;case 158:return t.initializer?4:0;case 278:case 229:case 230:case 231:case 250:return 2;case 222:return e.isFunctionLike(t.parent)?0:2}return 0}function Ce(e){v&&(v.nextContainer=e),v=e}function ke(t,r,i){switch(f.kind){case 248:return G(t,r,i);case 288:return function(t,r,i){return e.isExternalModule(n)?G(t,r,i):W(n.locals,void 0,t,r,i)}(t,r,i);case 213:case 244:return function(t,r,n){return e.hasModifier(t,32)?W(f.symbol.exports,f.symbol,t,r,n):W(f.symbol.members,f.symbol,t,r,n)}(t,r,i);case 247:return W(f.symbol.exports,f.symbol,t,r,i);case 172:case 302:case 192:case 245:case 272:return W(f.symbol.members,f.symbol,t,r,i);case 169:case 170:case 164:case 165:case 303:case 166:case 160:case 159:case 161:case 162:case 163:case 243:case 200:case 201:case 298:case 315:case 308:case 246:case 185:return W(f.locals,void 0,t,r,i)}}function Ne(t){8388608&t.flags&&!function(t){var r=e.isSourceFile(t)?t:e.tryCast(t.body,e.isModuleBlock);return!!r&&r.statements.some((function(t){return e.isExportDeclaration(t)||e.isExportAssignment(t)}))}(t)?t.flags|=64:t.flags&=-65}function Ae(e){var t=i(e),r=0!==t;return ke(e,r?512:1024,r?110735:0),t}function Fe(e,t,r){var n=J(t,r);return 106508&t&&(n.parent=f.symbol),z(n,e,t),n}function Pe(t,r,n){switch(h.kind){case 248:G(t,r,n);break;case 288:if(e.isExternalOrCommonJsModule(f)){G(t,r,n);break}default:h.locals||(h.locals=e.createSymbolTable(),Ce(h)),W(h.locals,void 0,t,r,n)}}function we(t){!(w&&t.originalKeywordKind>=112&&t.originalKeywordKind<=120)||e.isIdentifierName(t)||8388608&t.flags||4194304&t.flags||n.parseDiagnostics.length||n.bindDiagnostics.push(K(t,function(t){if(e.getContainingClass(t))return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(n.externalModuleIndicator)return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),e.declarationNameToString(t)))}function Ie(t,r){if(r&&75===r.kind){var i=r;if(function(t){return e.isIdentifier(t)&&("eval"===t.escapedText||"arguments"===t.escapedText)}(i)){var a=e.getErrorSpanForNode(n,r);n.bindDiagnostics.push(e.createFileDiagnostic(n,a.start,a.length,function(t){if(e.getContainingClass(t))return e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;if(n.externalModuleIndicator)return e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Invalid_use_of_0_in_strict_mode}(t),e.idText(i)))}}}function Oe(e){w&&Ie(e,e.name)}function Me(t){if(o<2&&288!==h.kind&&248!==h.kind&&!e.isFunctionLike(h)){var r=e.getErrorSpanForNode(n,t);n.bindDiagnostics.push(e.createFileDiagnostic(n,r.start,r.length,function(t){return e.getContainingClass(t)?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:n.externalModuleIndicator?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5}(t)))}}function Le(t,r,i,a,o){var s=e.getSpanOfTokenAtPosition(n,t.pos);n.bindDiagnostics.push(e.createFileDiagnostic(n,s.start,s.length,r,i,a,o))}function Re(t,i,a,o){!function(t,i,a){var o=e.createFileDiagnostic(n,i.pos,i.end-i.pos,a);t?n.bindDiagnostics.push(o):n.bindSuggestionDiagnostics=e.append(n.bindSuggestionDiagnostics,r(r({},o),{category:e.DiagnosticCategory.Suggestion}))}(t,{pos:e.getTokenPosOfNode(i,n),end:a.end},o)}function Be(t){if(t){t.parent=u;var r=w;if(function(t){switch(t.kind){case 75:if(t.isInJSDocNamespace){for(var r=t.parent;r&&!e.isJSDocTypeAlias(r);)r=r.parent;Pe(r,524288,788968);break}case 103:return D&&(e.isExpression(t)||280===u.kind)&&(t.flowNode=D),we(t);case 193:case 194:var i=t;D&&ee(i)&&(i.flowNode=D),e.isSpecialPropertyDeclaration(i)&&function(t){103===t.expression.kind?qe(t):e.isBindableStaticAccessExpression(t)&&288===t.parent.parent.kind&&(e.isPrototypeAccess(t.expression)?He(t,t.parent):Ye(t))}(i),e.isInJSFile(i)&&n.commonJsModuleIndicator&&e.isModuleExportsAccessExpression(i)&&!d(h,"module")&&W(n.locals,void 0,i.expression,134217729,111550);break;case 208:switch(e.getAssignmentDeclarationKind(t)){case 1:Ve(t);break;case 2:!function(t){if(!Ue(t))return;var r=e.getRightMostAssignedExpression(t.right);if(e.isEmptyObjectLiteral(r)||f===n&&_(n,r))return;var i=e.exportAssignmentIsAlias(t)?2097152:1049092;U(W(n.symbol.exports,n.symbol,t,67108864|i,0),t)}(t);break;case 3:He(t.left,t);break;case 6:!function(e){e.left.parent=e,e.right.parent=e,Ze(e.left.expression,e.left,!1,!0)}(t);break;case 4:qe(t);break;case 5:!function(t){var r=et(t.left.expression);if(!e.isInJSFile(t)&&!e.isFunctionSymbol(r))return;if(t.left.parent=t,t.right.parent=t,e.isIdentifier(t.left.expression)&&f===n&&_(n,t.left.expression))Ve(t);else if(e.hasDynamicName(t)){Fe(t,67108868,"__computed");var i=Xe(r,t.left.expression,$e(t.left),!1,!1);Ge(t,i)}else Ye(e.cast(t.left,e.isBindableStaticAccessExpression))}(t);break;case 0:break;default:e.Debug.fail("Unknown binary expression special property assignment kind")}return function(t){w&&e.isLeftHandSideExpression(t.left)&&e.isAssignmentOperator(t.operatorToken.kind)&&Ie(t,t.left)}(t);case 278:return function(e){w&&e.variableDeclaration&&Ie(e,e.variableDeclaration.name)}(t);case 202:return function(t){if(w&&75===t.expression.kind){var r=e.getErrorSpanForNode(n,t.expression);n.bindDiagnostics.push(e.createFileDiagnostic(n,r.start,r.length,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(t);case 8:return function(t){w&&32&t.numericLiteralFlags&&n.bindDiagnostics.push(K(t,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode))}(t);case 207:return function(e){w&&Ie(e,e.operand)}(t);case 206:return function(e){w&&(45!==e.operator&&46!==e.operator||Ie(e,e.operand))}(t);case 235:return function(t){w&&Le(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode)}(t);case 237:return function(t){w&&a.target>=2&&(e.isDeclarationStatement(t.statement)||e.isVariableStatement(t.statement))&&Le(t.label,e.Diagnostics.A_label_is_not_allowed_here)}(t);case 182:return void(x=!0);case 167:break;case 154:return function(t){if(e.isJSDocTemplateTag(t.parent)){var r=e.find(t.parent.parent.tags,e.isJSDocTypeAlias)||e.getHostSignatureFromJSDoc(t.parent);r?(r.locals||(r.locals=e.createSymbolTable()),W(r.locals,void 0,t,262144,526824)):ke(t,262144,526824)}else if(180===t.parent.kind){var n=function(t){var r=e.findAncestor(t,(function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&t.parent.extendsType===t}));return r&&r.parent}(t.parent);n?(n.locals||(n.locals=e.createSymbolTable()),W(n.locals,void 0,t,262144,526824)):Fe(t,262144,V(t))}else ke(t,262144,526824)}(t);case 155:return nt(t);case 241:return rt(t);case 190:return t.flowNode=D,rt(t);case 158:case 157:return function(e){return it(e,4|(e.questionToken?16777216:0),0)}(t);case 279:case 280:return it(t,4,0);case 282:return it(t,8,900095);case 164:case 165:case 166:return ke(t,131072,0);case 160:case 159:return it(t,8192|(t.questionToken?16777216:0),e.isObjectLiteralMethod(t)?0:103359);case 243:return function(t){n.isDeclarationFile||8388608&t.flags||e.isAsyncFunction(t)&&(P|=2048);Oe(t),w?(Me(t),Pe(t,16,110991)):ke(t,16,110991)}(t);case 161:return ke(t,16384,0);case 162:return it(t,32768,46015);case 163:return it(t,65536,78783);case 169:case 298:case 303:case 170:return function(t){var r=J(131072,V(t));z(r,t,131072);var n=J(2048,"__type");z(n,t,2048),n.members=e.createSymbolTable(),n.members.set(r.escapedName,r)}(t);case 172:case 302:case 185:return function(e){return Fe(e,2048,"__type")}(t);case 307:return function(t){Q(t);var r=e.getHostSignatureFromJSDoc(t);r&&160!==r.kind&&z(r.symbol,r,32)}(t);case 192:return function(t){var r;if(function(e){e[e.Property=1]="Property",e[e.Accessor=2]="Accessor"}(r||(r={})),w)for(var i=e.createUnderscoreEscapedMap(),a=0,o=t.properties;a<o.length;a++){var s=o[a];if(281!==s.kind&&75===s.name.kind){var c=s.name,u=279===s.kind||280===s.kind||160===s.kind?1:2,l=i.get(c.escapedText);if(l){if(1===u&&1===l){var _=e.getErrorSpanForNode(n,c);n.bindDiagnostics.push(e.createFileDiagnostic(n,_.start,_.length,e.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode))}}else i.set(c.escapedText,u)}}return Fe(t,4096,"__object")}(t);case 200:case 201:return function(t){n.isDeclarationFile||8388608&t.flags||e.isAsyncFunction(t)&&(P|=2048);D&&(t.flowNode=D);Oe(t);var r=t.name?t.name.escapedText:"__function";return Fe(t,16,r)}(t);case 195:switch(e.getAssignmentDeclarationKind(t)){case 7:return function(e){var t=et(e.arguments[0]),r=288===e.parent.parent.kind;t=Xe(t,e.arguments[0],r,!1,!1),Qe(e,t,!1)}(t);case 8:return function(e){if(!Ue(e))return;var t=tt(e.arguments[0],void 0,(function(e,t){return t&&z(t,e,67110400),t}));if(t){W(t.exports,t,e,1048580,0)}}(t);case 9:return function(e){var t=et(e.arguments[0].expression);t&&z(t,t.valueDeclaration,32);Qe(e,t,!0)}(t);case 0:break;default:return e.Debug.fail("Unknown call expression assignment declaration kind")}e.isInJSFile(t)&&function(t){!n.commonJsModuleIndicator&&e.isRequireCall(t,!1)&&Ue(t)}(t);break;case 213:case 244:return w=!0,function(t){if(244===t.kind)Pe(t,32,899503);else{var r=t.name?t.name.escapedText:"__class";Fe(t,32,r),t.name&&O.set(t.name.escapedText,!0)}var i=t.symbol,a=J(4194308,"prototype"),o=i.exports.get(a.escapedName);o&&(t.name&&(t.name.parent=t),n.bindDiagnostics.push(K(o.declarations[0],e.Diagnostics.Duplicate_identifier_0,e.symbolName(a))));i.exports.set(a.escapedName,a),a.parent=i}(t);case 245:return Pe(t,64,788872);case 246:return Pe(t,524288,788968);case 247:return function(t){return e.isEnumConst(t)?Pe(t,128,899967):Pe(t,256,899327)}(t);case 248:return function(t){if(Ne(t),e.isAmbientModule(t))if(e.hasModifier(t,1)&&Le(t,e.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),e.isModuleAugmentationExternal(t))Ae(t);else{var r=void 0;if(10===t.name.kind){var i=t.name.text;e.hasZeroOrOneAsteriskCharacter(i)?r=e.tryParsePattern(i):Le(t.name,e.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,i)}var a=ke(t,512,110735);n.patternAmbientModules=e.append(n.patternAmbientModules,r&&{pattern:r,symbol:a})}else{var o=Ae(t);if(0!==o)(a=t.symbol).constEnumOnlyModule=!(304&a.flags)&&2===o&&!1!==a.constEnumOnlyModule}}(t);case 272:return function(e){return Fe(e,4096,"__jsxAttributes")}(t);case 271:return function(e,t,r){return ke(e,t,r)}(t,4,0);case 252:case 255:case 257:case 261:return ke(t,2097152,2097152);case 251:return function(t){t.modifiers&&t.modifiers.length&&n.bindDiagnostics.push(K(t,e.Diagnostics.Modifiers_cannot_appear_here));var r=e.isSourceFile(t.parent)?e.isExternalModule(t.parent)?t.parent.isDeclarationFile?void 0:e.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files:e.Diagnostics.Global_module_exports_may_only_appear_in_module_files:e.Diagnostics.Global_module_exports_may_only_appear_at_top_level;r?n.bindDiagnostics.push(K(t,r)):(n.symbol.globalExports=n.symbol.globalExports||e.createSymbolTable(),W(n.symbol.globalExports,n.symbol,t,2097152,2097152))}(t);case 254:return function(e){e.name&&ke(e,2097152,2097152)}(t);case 259:return function(e){f.symbol&&f.symbol.exports?e.exportClause||W(f.symbol.exports,f.symbol,e,8388608,0):Fe(e,8388608,V(e))}(t);case 258:return function(t){if(f.symbol&&f.symbol.exports){var r=e.exportAssignmentIsAlias(t)?2097152:4,n=W(f.symbol.exports,f.symbol,t,r,67108863);t.isExportEquals&&U(n,t)}else Fe(t,2097152,V(t))}(t);case 288:return Ke(t.statements),function(){if(Ne(n),e.isExternalModule(n))ze();else if(e.isJsonSourceFile(n)){ze();var t=n.symbol;W(n.symbol.exports,n.symbol,n,4,67108863),n.symbol=t}}();case 222:if(!e.isFunctionLike(t.parent))return;case 249:return Ke(t.statements);case 310:if(303===t.parent.kind)return nt(t);if(302!==t.parent.kind)break;case 316:var o=t,s=o.isBracketed||o.typeExpression&&297===o.typeExpression.type.kind?16777220:4;return ke(o,s,0);case 315:case 308:case 309:(b||(b=[])).push(t)}}(t),t.kind>151){var i=u;u=t;var o=Ee(t);0===o?H(t):function(t,r){var n=f,i=y,a=h;if(1&r?(201!==t.kind&&(y=f),f=h=t,32&r&&(f.locals=e.createSymbolTable()),Ce(f)):2&r&&((h=t).locals=void 0),4&r){var o=c,u=D,l=S,_=T,d=E,p=A,m=F,g=16&r&&!e.hasModifier(t,256)&&!t.asteriskToken&&!!e.getImmediatelyInvokedFunctionExpression(t);g||(D=s({flags:2}),144&r&&(D.node=t)),E=g||161===t.kind?ne():void 0,S=void 0,T=void 0,A=void 0,F=!1,c=s,H(t),t.flags&=-2817,!(1&D.flags)&&8&r&&e.nodeIsPresent(t.body)&&(t.flags|=256,F&&(t.flags|=512),t.endFlowNode=D),288===t.kind&&(t.flags|=P),E&&(oe(E,D),D=_e(E),161===t.kind&&(t.returnFlowNode=D)),g||(D=u),S=l,T=_,E=d,A=p,F=m,c=o}else 64&r?(x=!1,H(t),t.flags=x?128|t.flags:-129&t.flags):H(t);f=n,y=i,h=a}(t,o),u=i}else if(!M&&0==(536870912&t.transformFlags)){j|=p(t,0);i=u;1===t.kind&&(u=t),je(t),u=i}w=r}}function je(t){if(e.hasJSDocNodes(t))if(e.isInJSFile(t))for(var r=0,n=t.jsDoc;r<n.length;r++){Be(n[r])}else for(var i=0,a=t.jsDoc;i<a.length;i++){g(t,a[i])}}function Ke(t){if(!w)for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!e.isPrologueDirective(i))return;if(Je(i))return void(w=!0)}}function Je(t){var r=e.getSourceTextOfNodeFromSourceFile(n,t.expression);return'"use strict"'===r||"'use strict'"===r}function ze(){Fe(n,512,'"'+e.removeFileExtension(n.fileName)+'"')}function Ue(e){return!n.externalModuleIndicator&&(n.commonJsModuleIndicator||(n.commonJsModuleIndicator=e,ze()),!0)}function Ve(t){if(Ue(t)){var r=tt(t.left.expression,void 0,(function(e,t){return t&&z(t,e,67110400),t}));if(r){var n=e.isClassExpression(t.right)?1048612:1048580;W(r.exports,r,t.left,n,0)}}}function qe(t){e.Debug.assert(e.isInJSFile(t));var r=e.getThisContainer(t,!1);switch(r.kind){case 243:case 200:var n=r.symbol;if(e.isBinaryExpression(r.parent)&&62===r.parent.operatorToken.kind){var i=r.parent.left;e.isBindableStaticAccessExpression(i)&&e.isPrototypeAccess(i.expression)&&(n=et(i.expression.expression,y))}n&&n.valueDeclaration&&(n.members=n.members||e.createSymbolTable(),e.hasDynamicName(t)?We(t,n):W(n.members,n,t,67108868,0),z(n,n.valueDeclaration,32));break;case 161:case 158:case 160:case 162:case 163:var a=r.parent,o=e.hasModifier(r,32)?a.symbol.exports:a.symbol.members;e.hasDynamicName(t)?We(t,a.symbol):W(o,a.symbol,t,67108868,0,!0);break;case 288:r.commonJsModuleIndicator?W(r.symbol.exports,r.symbol,t,1048580,0):ke(t,1,111550);break;default:e.Debug.failBadSyntaxKind(r)}}function We(e,t){Fe(e,4,"__computed"),Ge(e,t)}function Ge(t,r){r&&(r.assignmentDeclarationMembers||(r.assignmentDeclarationMembers=e.createMap())).set(""+e.getNodeId(t),t)}function He(e,t){var r=e.expression,n=r.expression;e.parent=t,n.parent=r,r.parent=e,Ze(n,e,!0,!0)}function Ye(e){e.expression.parent=e,Ze(e.expression,e,!1,!1)}function Xe(t,r,i,a,o){if(i&&!a){t=tt(r,t,(function(t,r,i){return r?(z(r,t,67110400),r):W(i?i.exports:n.jsGlobalAugmentations||(n.jsGlobalAugmentations=e.createSymbolTable()),i,t,67110400,110735)}))}return o&&t&&t.valueDeclaration&&z(t,t.valueDeclaration,32),t}function Qe(t,r,n){if(r&&function(t){if(1072&t.flags)return!0;var r=t.valueDeclaration;if(r&&e.isCallExpression(r))return!!e.getAssignedExpandoInitializer(r);var n=r?e.isVariableDeclaration(r)?r.initializer:e.isBinaryExpression(r)?r.right:e.isPropertyAccessExpression(r)&&e.isBinaryExpression(r.parent)?r.parent.right:void 0:void 0;if(n=n&&e.getRightMostAssignedExpression(n)){var i=e.isPrototypeAccess(e.isVariableDeclaration(r)?r.name:e.isBinaryExpression(r)?r.left:r);return!!e.getExpandoInitializer(!e.isBinaryExpression(n)||56!==n.operatorToken.kind&&60!==n.operatorToken.kind?n:n.right,i)}return!1}(r)){var i=n?r.members||(r.members=e.createSymbolTable()):r.exports||(r.exports=e.createSymbolTable()),a=0,o=0;e.isFunctionLikeDeclaration(e.getAssignedExpandoInitializer(t))?(a=8192,o=103359):e.isCallExpression(t)&&e.isBindableObjectDefinePropertyCall(t)&&(e.some(t.arguments[2].properties,(function(t){var r=e.getNameOfDeclaration(t);return!!r&&e.isIdentifier(r)&&"set"===e.idText(r)}))&&(a|=65540,o|=78783),e.some(t.arguments[2].properties,(function(t){var r=e.getNameOfDeclaration(t);return!!r&&e.isIdentifier(r)&&"get"===e.idText(r)}))&&(a|=32772,o|=46015)),0===a&&(a=4,o=0),W(i,r,t,67108864|a,-67108865&o)}}function $e(t){return e.isBinaryExpression(t.parent)?288===function(t){for(;e.isBinaryExpression(t.parent);)t=t.parent;return t.parent}(t.parent).parent.kind:288===t.parent.parent.kind}function Ze(e,t,r,n){var i=et(e),a=$e(t);Qe(t,i=Xe(i,t.expression,a,r,n),r)}function et(t,r){if(void 0===r&&(r=f),e.isIdentifier(t))return d(r,t.escapedText);var n=et(t.expression);return n&&n.exports&&n.exports.get(e.getElementOrPropertyAccessName(t))}function tt(t,r,i){if(_(n,t))return n.symbol;if(e.isIdentifier(t))return i(t,et(t),r);var a=tt(t.expression,r,i);return i(e.getNameOrArgument(t),a&&a.exports&&a.exports.get(e.getElementOrPropertyAccessName(t)),a)}function rt(t){w&&Ie(t,t.name),e.isBindingPattern(t.name)||(e.isBlockOrCatchScoped(t)?Pe(t,2,111551):e.isParameterDeclaration(t)?ke(t,1,111551):ke(t,1,111550))}function nt(t){if((310!==t.kind||303===f.kind)&&(!w||8388608&t.flags||Ie(t,t.name),e.isBindingPattern(t.name)?Fe(t,1,"__"+t.parent.parameters.indexOf(t)):ke(t,1,111551),e.isParameterPropertyDeclaration(t,t.parent))){var r=t.parent.parent;W(r.symbol.members,r.symbol,t,4|(t.questionToken?16777216:0),0)}}function it(t,r,i){return n.isDeclarationFile||8388608&t.flags||!e.isAsyncFunction(t)||(P|=2048),D&&e.isObjectLiteralOrClassExpressionMethod(t)&&(t.flowNode=D),e.hasDynamicName(t)?Fe(t,r,"__computed"):ke(t,r,i)}}();function l(t){return!(e.isFunctionDeclaration(t)||function(t){switch(t.kind){case 245:case 246:return!0;case 248:return 1!==i(t);case 247:return e.hasModifier(t,2048);default:return!1}}(t)||e.isEnumDeclaration(t)||e.isVariableStatement(t)&&!(3&e.getCombinedNodeFlags(t))&&t.declarationList.declarations.some((function(e){return!e.initializer})))}function _(t,r){for(var n=0,i=[r];i.length&&n<100;){if(n++,r=i.shift(),e.isExportsIdentifier(r)||e.isModuleExportsAccessExpression(r))return!0;if(e.isIdentifier(r)){var a=d(t,r.escapedText);if(a&&a.valueDeclaration&&e.isVariableDeclaration(a.valueDeclaration)&&a.valueDeclaration.initializer){var o=a.valueDeclaration.initializer;i.push(o),e.isAssignmentExpression(o,!0)&&(i.push(o.left),i.push(o.right))}}}return!1}function d(t,r){var n=t.locals&&t.locals.get(r);return n?n.exportSymbol||n:e.isSourceFile(t)&&t.jsGlobalAugmentations&&t.jsGlobalAugmentations.has(r)?t.jsGlobalAugmentations.get(r):t.symbol&&t.symbol.exports&&t.symbol.exports.get(r)}function p(t,r){var n=t.kind;switch(n){case 195:return function(t,r){var n=r,i=e.skipOuterExpressions(t.expression),a=t.expression;32&t.flags&&(n|=4);t.typeArguments&&(n|=1);(4096&r||e.isSuperOrSuperProperty(i))&&(n|=128,e.isSuperProperty(i)&&(n|=2048));95===a.kind&&(n|=524288);return t.transformFlags=536870912|n,-536875009&n}(t,r);case 196:return function(e,t){var r=t;e.typeArguments&&(r|=1);4096&t&&(r|=128);return e.transformFlags=536870912|r,-536875009&r}(t,r);case 248:return function(t,r){var n=1;0==(2&e.getModifierFlags(t))&&(n|=r);return t.transformFlags=536870912|n,-537168897&n}(t,r);case 199:return function(e,t){var r=t,n=e.expression.kind;216!==n&&198!==n||(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 208:return function(e,t){var r=t,n=e.operatorToken.kind,i=e.left.kind;60===n?r|=4:62===n&&192===i?r|=656:62===n&&191===i?r|=640:42!==n&&66!==n||(r|=64);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 225:return function(e,t){var r=t;return e.transformFlags=536870912|r,-536870913&r}(t,r);case 155:return function(t,r){var n=r,i=t.name,a=t.initializer,o=t.dotDotDotToken;(t.questionToken||t.type||1024&r&&e.some(t.decorators)||e.isThisIdentifier(i))&&(n|=1);e.hasModifier(t,92)&&(n|=1025);8192&r&&(n|=16);(65536&r||a||o)&&(n|=128);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 201:return function(t,r){var n=128|r;(e.hasModifier(t,2270)||t.typeParameters||t.type)&&(n|=1);e.hasModifier(t,256)&&(n|=32);8192&r&&(n|=16);return t.transformFlags=536870912|n,-537371649&n}(t,r);case 200:return function(t,r){var n=r;(e.hasModifier(t,2270)||t.typeParameters||t.type)&&(n|=1);e.hasModifier(t,256)&&(n|=t.asteriskToken?16:32);8192&r&&(n|=16);t.asteriskToken&&(n|=256);return t.transformFlags=536870912|n,-537373697&n}(t,r);case 243:return function(t,r){var n,i=e.getModifierFlags(t);!t.body||2&i?n=1:(n=262144|r,(2270&i||t.typeParameters||t.type)&&(n|=1),256&i&&(n|=t.asteriskToken?16:32),8192&r&&(n|=16),t.asteriskToken&&(n|=256));return t.transformFlags=536870912|n,-537373697&n}(t,r);case 241:return function(e,t){var r=t;r|=65664,8192&t&&(r|=16);e.type&&(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 242:return function(e,t){var r=262144|t;65536&t&&(r|=128);3&e.flags&&(r|=32896);return e.transformFlags=536870912|r,-536944641&r}(t,r);case 224:return function(t,r){var n,i=t.declarationList.transformFlags;e.hasModifier(t,2)?n=1:(n=r,65536&i&&(n|=128));return t.transformFlags=536870912|n,-536870913&n}(t,r);case 237:return function(t,r){var n=r;32768&r&&e.isIterationStatement(t,!0)&&(n|=128);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 244:return function(t,r){var n;e.hasModifier(t,2)?n=1:(n=128|r,(1024&r||t.typeParameters)&&(n|=1));return t.transformFlags=536870912|n,-536888321&n}(t,r);case 213:return function(e,t){var r=128|t;(1024&t||e.typeParameters)&&(r|=1);return e.transformFlags=536870912|r,-536888321&r}(t,r);case 277:return function(t,r){var n=r;switch(t.token){case 89:n|=128;break;case 112:n|=1;break;default:e.Debug.fail("Unexpected token for heritage clause")}return t.transformFlags=536870912|n,-536870913&n}(t,r);case 278:return function(t,r){var n=r;t.variableDeclaration?e.isBindingPattern(t.variableDeclaration.name)&&(n|=128):n|=8;return t.transformFlags=536870912|n,-536879105&n}(t,r);case 215:return function(e,t){var r=128|t;e.typeArguments&&(r|=1);return e.transformFlags=536870912|r,-536870913&r}(t,r);case 161:return function(t,r){var n=r;!e.hasModifier(t,2270)&&t.body||(n|=1);8192&r&&(n|=16);return t.transformFlags=536870912|n,-537372673&n}(t,r);case 158:return function(t,r){var n=1048576|r;(e.some(t.decorators)||e.hasModifier(t,2270)||t.type)&&(n|=1);(e.isComputedPropertyName(t.name)||e.hasStaticModifier(t)&&t.initializer)&&(n|=1024);return t.transformFlags=536870912|n,f(t.name,-536872961&n)}(t,r);case 160:return function(t,r){var n=128|r;(t.decorators||e.hasModifier(t,2270)||t.typeParameters||t.type||!t.body)&&(n|=1);8192&r&&(n|=16);e.hasModifier(t,256)&&(n|=t.asteriskToken?16:32);t.asteriskToken&&(n|=256);return t.transformFlags=536870912|n,f(t.name,-537372673&n)}(t,r);case 162:case 163:return function(t,r){var n=r;(t.decorators||e.hasModifier(t,2270)||t.type||!t.body)&&(n|=1);8192&r&&(n|=16);return t.transformFlags=536870912|n,f(t.name,-537372673&n)}(t,r);case 252:return function(t,r){var n=r;e.isExternalModuleImportEqualsDeclaration(t)||(n|=1);return t.transformFlags=536870912|n,-536870913&n}(t,r);case 193:case 194:return function(e,t){var r=t;32&e.flags&&(r|=4);101===e.expression.kind&&(r|=48);return e.transformFlags=536870912|r,-536870913&r}(t,r);default:return function(e,t,r){var n=r,i=536870912;switch(t){case 125:case 205:n|=48;break;case 198:case 216:case 319:n|=1,i=536870912;break;case 118:case 116:case 117:case 121:case 129:case 80:case 247:case 282:case 217:case 137:n|=1;break;case 264:case 265:case 266:case 11:case 267:case 268:case 269:case 270:case 271:case 272:case 273:case 274:n|=2;break;case 14:case 15:case 16:case 17:case 210:case 197:case 280:case 119:case 218:n|=128;break;case 10:e.hasExtendedUnicodeEscape&&(n|=128);break;case 8:384&e.numericLiteralFlags&&(n|=128);break;case 9:n|=4;break;case 231:e.awaitModifier&&(n|=16),n|=128;break;case 211:n|=131216;break;case 124:case 139:case 150:case 136:case 140:case 142:case 127:case 143:case 109:case 154:case 157:case 159:case 164:case 165:case 166:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:case 176:case 177:case 178:case 179:case 180:case 181:case 245:case 246:case 182:case 183:case 184:case 185:case 186:case 251:n=1,i=-2;break;case 153:n|=16384;break;case 212:n|=4224;break;case 281:n|=8208;break;case 101:n|=128,i=536870912;break;case 103:n|=2048;break;case 188:n|=65664,4096&r&&(n|=8208),i=536875008;break;case 189:n|=65664,i=536875008;break;case 190:n|=128,e.dotDotDotToken&&(n|=4096);break;case 156:n|=1025;break;case 192:i=536896512,16384&r&&(n|=128),8192&r&&(n|=16);break;case 191:i=536875008;break;case 227:case 228:case 229:case 230:32768&r&&(n|=128);break;case 288:break;case 234:n|=262160;break;case 232:case 233:n|=262144}return e.transformFlags=536870912|n,n&~i}(t,n,r)}}function f(e,t){return t|2048&e.transformFlags}function m(e){if(e>=167&&e<=187)return-2;switch(e){case 195:case 196:case 191:return 536875008;case 248:return 537168896;case 155:return 536870912;case 201:return 537371648;case 200:case 243:return 537373696;case 242:return 536944640;case 244:case 213:return 536888320;case 161:return 537372672;case 160:case 162:case 163:return 537372672;case 124:case 139:case 150:case 136:case 142:case 140:case 127:case 143:case 109:case 154:case 157:case 159:case 164:case 165:case 166:case 245:case 246:return-2;case 192:return 536896512;case 278:return 536879104;case 188:case 189:return 536875008;case 198:case 216:case 319:case 199:case 101:return 536870912;case 193:case 194:default:return 536870912}}function g(t,r){r.parent=t,e.forEachChild(r,(function(e){return g(r,e)}))}e.bindSourceFile=function(t,r){e.performance.mark("beforeBind"),e.perfLogger.logStartBindFile(""+t.fileName),u(t,r),e.perfLogger.logStopBindFile(),e.performance.mark("afterBind"),e.performance.measure("Bind","beforeBind","afterBind")},e.isExportsOrModuleExportsOrAlias=_,e.computeTransformFlagsForNode=p,e.getTransformFlagsSubtreeExclusions=m}(s||(s={})),function(e){e.createGetSymbolWalker=function(t,r,n,i,a,o,s,c,u,l,_){return function(d){void 0===d&&(d=function(){return!0});var p=[],f=[];return{walkType:function(t){try{return m(t),{visitedTypes:e.getOwnValues(p),visitedSymbols:e.getOwnValues(f)}}finally{e.clear(p),e.clear(f)}},walkSymbol:function(t){try{return h(t),{visitedTypes:e.getOwnValues(p),visitedSymbols:e.getOwnValues(f)}}finally{e.clear(p),e.clear(f)}}};function m(t){if(t&&(!p[t.id]&&(p[t.id]=t,!h(t.symbol)))){if(524288&t.flags){var r=t,n=r.objectFlags;4&n&&function(t){m(t.target),e.forEach(_(t),m)}(t),32&n&&function(e){m(e.typeParameter),m(e.constraintType),m(e.templateType),m(e.modifiersType)}(t),3&n&&(y(a=t),e.forEach(a.typeParameters,m),e.forEach(i(a),m),m(a.thisType)),24&n&&y(r)}var a;262144&t.flags&&function(e){m(u(e))}(t),3145728&t.flags&&function(t){e.forEach(t.types,m)}(t),4194304&t.flags&&function(e){m(e.type)}(t),8388608&t.flags&&function(e){m(e.objectType),m(e.indexType),m(e.constraint)}(t)}}function g(i){var a=r(i);a&&m(a.type),e.forEach(i.typeParameters,m);for(var o=0,s=i.parameters;o<s.length;o++){h(s[o])}m(t(i)),m(n(i))}function y(e){m(c(e,0)),m(c(e,1));for(var t=a(e),r=0,n=t.callSignatures;r<n.length;r++){g(n[r])}for(var i=0,o=t.constructSignatures;i<o.length;i++){g(o[i])}for(var s=0,u=t.properties;s<u.length;s++){h(u[s])}}function h(t){if(!t)return!1;var r=e.getSymbolId(t);return!f[r]&&(f[r]=t,!d(t)||(m(o(t)),t.exports&&t.exports.forEach(h),e.forEach(t.declarations,(function(e){if(e.type&&171===e.type.kind){var t=e.type;h(s(l(t.exprName)))}})),!1))}}}}(s||(s={})),function(e){var n,a,o,s,c=/^".+"$/,u=1,l=1,_=1,d=1;!function(e){e[e.AllowsSyncIterablesFlag=1]="AllowsSyncIterablesFlag",e[e.AllowsAsyncIterablesFlag=2]="AllowsAsyncIterablesFlag",e[e.AllowsStringInputFlag=4]="AllowsStringInputFlag",e[e.ForOfFlag=8]="ForOfFlag",e[e.YieldStarFlag=16]="YieldStarFlag",e[e.SpreadFlag=32]="SpreadFlag",e[e.DestructuringFlag=64]="DestructuringFlag",e[e.Element=1]="Element",e[e.Spread=33]="Spread",e[e.Destructuring=65]="Destructuring",e[e.ForOf=13]="ForOf",e[e.ForAwaitOf=15]="ForAwaitOf",e[e.YieldStar=17]="YieldStar",e[e.AsyncYieldStar=19]="AsyncYieldStar",e[e.GeneratorReturnType=1]="GeneratorReturnType",e[e.AsyncGeneratorReturnType=2]="AsyncGeneratorReturnType"}(n||(n={})),function(e){e[e.Yield=0]="Yield",e[e.Return=1]="Return",e[e.Next=2]="Next"}(a||(a={})),function(e){e[e.Normal=0]="Normal",e[e.GeneratorYield=1]="GeneratorYield"}(o||(o={})),function(e){e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.All=16777215]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.UndefinedFacts=9830144]="UndefinedFacts",e[e.NullFacts=9363232]="NullFacts",e[e.EmptyObjectStrictFacts=16318463]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=16777215]="EmptyObjectFacts"}(s||(s={}));var p,m,g,y,h,v,b,x,D=e.createMapFromTemplate({string:1,number:2,bigint:4,boolean:8,symbol:16,undefined:65536,object:32,function:64}),S=e.createMapFromTemplate({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384});!function(e){e[e.Type=0]="Type",e[e.ResolvedBaseConstructorType=1]="ResolvedBaseConstructorType",e[e.DeclaredType=2]="DeclaredType",e[e.ResolvedReturnType=3]="ResolvedReturnType",e[e.ImmediateBaseConstraint=4]="ImmediateBaseConstraint",e[e.EnumTagType=5]="EnumTagType",e[e.JSDocTypeReference=6]="JSDocTypeReference",e[e.ResolvedTypeArguments=7]="ResolvedTypeArguments"}(p||(p={})),function(e){e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp"}(m||(m={})),function(e){e[e.None=0]="None",e[e.NoIndexSignatures=1]="NoIndexSignatures",e[e.Writing=2]="Writing",e[e.CacheSymbol=4]="CacheSymbol",e[e.NoTupleBoundsCheck=8]="NoTupleBoundsCheck"}(g||(g={})),function(e){e[e.None=0]="None",e[e.Bivariant=1]="Bivariant",e[e.Strict=2]="Strict"}(y||(y={})),function(e){e[e.IncludeReadonly=1]="IncludeReadonly",e[e.ExcludeReadonly=2]="ExcludeReadonly",e[e.IncludeOptional=4]="IncludeOptional",e[e.ExcludeOptional=8]="ExcludeOptional"}(h||(h={})),function(e){e[e.None=0]="None",e[e.Source=1]="Source",e[e.Target=2]="Target",e[e.Both=3]="Both"}(v||(v={})),function(e){e.resolvedExports="resolvedExports",e.resolvedMembers="resolvedMembers"}(b||(b={})),function(e){e[e.Local=0]="Local",e[e.Parameter=1]="Parameter"}(x||(x={}));var T,E,C,k=e.and(P,(function(t){return!e.isAccessor(t)}));function N(e){return e.id||(e.id=l,l++),e.id}function A(e){return e.id||(e.id=u,u++),e.id}function F(t,r){var n=e.getModuleInstanceState(t);return 1===n||r&&2===n}function P(e){return 243!==e.kind&&160!==e.kind||!!e.body}function w(t){switch(t.parent.kind){case 257:case 261:return e.isIdentifier(t);default:return e.isDeclarationName(t)}}function I(e){switch(e.kind){case 254:case 252:case 255:case 257:return!0;case 75:return 257===e.parent.kind;default:return!1}}function O(e){switch(e){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function M(e){return!!(1&e.flags)}function L(e){return!!(2&e.flags)}function R(e){return!!(4&e.flags)}!function(e){e[e.GetAccessor=1]="GetAccessor",e[e.SetAccessor=2]="SetAccessor",e[e.PropertyAssignment=4]="PropertyAssignment",e[e.Method=8]="Method",e[e.GetOrSetAccessor=3]="GetOrSetAccessor",e[e.PropertyAssignmentOrMethod=12]="PropertyAssignmentOrMethod"}(T||(T={})),function(e){e[e.None=0]="None",e[e.ExportValue=1]="ExportValue",e[e.ExportType=2]="ExportType",e[e.ExportNamespace=4]="ExportNamespace"}(E||(E={})),e.getNodeId=N,e.getSymbolId=A,e.isInstantiatedModule=F,e.createTypeChecker=function(n,a){var o,s,u,l,p=e.memoize((function(){var t=e.createMap();return n.getSourceFiles().forEach((function(r){r.resolvedModules&&e.forEachEntry(r.resolvedModules,(function(e){e&&e.packageId&&t.set(e.packageId.name,!0)}))})),t})),m=e.objectAllocator.getSymbolConstructor(),g=e.objectAllocator.getTypeConstructor(),y=e.objectAllocator.getSignatureConstructor(),h=0,v=0,b=0,x=0,T=0,E=0,B=e.createSymbolTable(),j=e.identity,K=n.getCompilerOptions(),J=e.getEmitScriptTarget(K),z=e.getEmitModuleKind(K),U=e.getAllowSyntheticDefaultImports(K),V=e.getStrictOptionValue(K,"strictNullChecks"),q=e.getStrictOptionValue(K,"strictFunctionTypes"),W=e.getStrictOptionValue(K,"strictBindCallApply"),G=e.getStrictOptionValue(K,"strictPropertyInitialization"),H=e.getStrictOptionValue(K,"noImplicitAny"),Y=e.getStrictOptionValue(K,"noImplicitThis"),X=!!K.keyofStringsOnly,Q=K.suppressExcessPropertyErrors?0:32768,$=function(){var t,r=n.getResolvedTypeReferenceDirectives();r&&(t=e.createMap(),r.forEach((function(r,i){r&&r.resolvedFileName&&function r(i,a){if(t.has(i.path))return;t.set(i.path,a);for(var o=0,s=i.referencedFiles;o<s.length;o++){var c=s[o].fileName,u=e.resolveTripleslashReference(c,i.originalFileName),l=n.getSourceFile(u);l&&r(l,a)}}(n.getSourceFile(r.resolvedFileName),i)})));return{getReferencedExportContainer:hb,getReferencedImportDeclaration:vb,getReferencedDeclarationWithCollidingName:xb,isDeclarationWithCollidingName:Db,isValueAliasDeclaration:function(t){return!(t=e.getParseTreeNode(t))||Sb(t)},hasGlobalName:Jb,isReferencedAliasDeclaration:function(t,r){return!(t=e.getParseTreeNode(t))||function t(r,n){if(e.isAliasSymbolDeclaration(r)){var i=ri(r);if(i&&_n(i).referenced)return!0;var a=_n(i).target;if(a&&1&e.getModifierFlags(r)&&111551&a.flags&&(K.preserveConstEnums||!Cb(a)))return!0}if(n)return!!e.forEachChild(r,(function(e){return t(e,n)}));return!1}(t,r)},getNodeCheckFlags:function(t){return(t=e.getParseTreeNode(t))?wb(t):0},isTopLevelValueImportEqualsWithEntityName:Tb,isDeclarationVisible:Ui,isImplementationOfOverload:kb,isRequiredInitializedParameter:Nb,isOptionalUninitializedParameterProperty:Ab,isExpandoFunctionDeclaration:Fb,getPropertiesOfContainerFunction:Pb,createTypeOfDeclaration:Bb,createReturnTypeOfSignatureDeclaration:jb,createTypeOfExpression:Kb,createLiteralConstValue:qb,isSymbolAccessible:Ei,isEntityNameVisible:Fi,getConstantValue:function(t){var r=e.getParseTreeNode(t,Ob);return r?Mb(r):void 0},collectLinkedAliases:Vi,getReferencedValueDeclaration:Ub,getTypeReferenceSerializationKind:Rb,isOptionalParameter:Ps,moduleExportsSomeValue:yb,isArgumentsLocalBinding:gb,getExternalModuleFileFromDeclaration:Wb,getTypeReferenceDirectivesForEntityName:function(e){if(!t)return;var r=790504;(75===e.kind&&Md(e)||193===e.kind&&!function(e){return e.parent&&215===e.parent.kind&&e.parent.parent&&277===e.parent.parent.kind}(e))&&(r=1160127);var n=Kn(e,r,!0);return n&&n!==ge?i(n,r):void 0},getTypeReferenceDirectivesForSymbol:i,isLiteralConstDeclaration:Vb,isLateBound:function(t){var r=e.getParseTreeNode(t,e.isDeclaration),n=r&&ri(r);return!!(n&&4096&e.getCheckFlags(n))},getJsxFactoryEntity:function(t){return t?(Yr(t),e.getSourceFileOfNode(t).localJsxFactory||Ht):Ht},getAllAccessorDeclarations:function(t){var r=163===(t=e.getParseTreeNode(t,e.isGetOrSetAccessorDeclaration)).kind?162:163,n=e.getDeclarationOfKind(ri(t),r);return{firstAccessor:n&&n.pos<t.pos?n:t,secondAccessor:n&&n.pos<t.pos?t:n,setAccessor:163===t.kind?t:n,getAccessor:162===t.kind?t:n}},getSymbolOfExternalModuleSpecifier:function(e){return Un(e,e,void 0)},isBindingCapturedByNode:function(t,r){var n=e.getParseTreeNode(t),i=e.getParseTreeNode(r);return!!n&&!!i&&(e.isVariableDeclaration(i)||e.isBindingElement(i))&&function(t,r){var n=dn(t);return!!n&&e.contains(n.capturedBlockScopeBindings,ri(r))}(n,i)},getDeclarationStatementsForSourceFile:function(t,r,n,i){var a=e.getParseTreeNode(t);e.Debug.assert(a&&288===a.kind,"Non-sourcefile node passed into getDeclarationsForSourceFile");var o=ri(t);return o?o.exports?Z.symbolTableToDeclarationStatements(o.exports,t,r,n,i):[]:t.locals?Z.symbolTableToDeclarationStatements(t.locals,t,r,n,i):[]}};function i(r,n){if(t&&function(r){if(!r.declarations)return!1;var n=r;for(;;){var i=ni(n);if(!i)break;n=i}if(n.valueDeclaration&&288===n.valueDeclaration.kind&&512&n.flags)return!1;for(var a=0,o=r.declarations;a<o.length;a++){var s=o[a],c=e.getSourceFileOfNode(s);if(t.has(c.path))return!0}return!1}(r)){for(var i,a=0,o=r.declarations;a<o.length;a++){var s=o[a];if(s.symbol&&s.symbol.flags&n){var c=e.getSourceFileOfNode(s),u=t.get(c.path);if(!u)return;(i||(i=[])).push(u)}}return i}}}(),Z=function(){return{typeToTypeNode:function(e,t,r,n){return i(t,r,n,(function(t){return s(e,t)}))},indexInfoToIndexSignatureDeclaration:function(e,t,r,n,a){return i(r,n,a,(function(r){return d(e,t,r)}))},signatureToSignatureDeclaration:function(e,t,r,n,a){return i(r,n,a,(function(r){return p(e,t,r)}))},symbolToEntityName:function(e,t,r,n,a){return i(r,n,a,(function(r){return C(e,r,t,!1)}))},symbolToExpression:function(e,t,r,n,a){return i(r,n,a,(function(r){return k(e,r,t)}))},symbolToTypeParameterDeclarations:function(e,t,r,n){return i(t,r,n,(function(t){return b(e,t)}))},symbolToParameterDeclaration:function(e,t,r,n){return i(t,r,n,(function(t){return g(e,t)}))},typeParameterToDeclaration:function(e,t,r,n){return i(t,r,n,(function(t){return m(e,t)}))},symbolTableToDeclarationStatements:function(a,o,c,u,l){return i(o,c,u,(function(i){return function(i,a,o){var c,u=U(e.createProperty,160,!0),l=U((function(t,r,n,i,a,o){return e.createPropertySignature(r,n,i,a,o)}),159,!1),_=a.enclosingDeclaration,f=[],g=e.createMap(),y=a;a=r(r({},y),{usedSymbolNames:e.createMap(),remappedSymbolNames:e.createMap(),tracker:r(r({},y.tracker),{trackSymbol:function(e,t,r){if(0===Ei(e,t,r,!1).accessibility){var n=v(e,a,r);4&e.flags||w(n[0])}else y.tracker&&y.tracker.trackSymbol&&y.tracker.trackSymbol(e,t,r)}})}),y.usedSymbolNames&&y.usedSymbolNames.forEach((function(e,t){a.usedSymbolNames.set(t,!0)}));e.forEachEntry(i,(function(t,r){Q(t,e.unescapeLeadingUnderscores(r))}));var h=!o,b=i.get("export=");b&&i.size>1&&2097152&b.flags&&(i=e.createSymbolTable()).set("export=",b);return N(i),function(r){r=function(t){var r=e.find(t,(function(t){return e.isExportDeclaration(t)&&!t.moduleSpecifier&&!!t.exportClause}));if(r){var n=e.mapDefined(r.exportClause.elements,(function(r){if(!r.propertyName){var n=e.filter(t,(function(t){return e.nodeHasName(t,r.name)}));if(e.length(n)&&e.every(n,S))return void e.forEach(n,T)}return r}));e.length(n)?r.exportClause.elements=e.createNodeArray(n):t=e.filter(t,(function(e){return e!==r}))}return t}(r=function(r){var n=e.filter(r,(function(t){return e.isExportDeclaration(t)&&!t.moduleSpecifier&&!!t.exportClause}));if(e.length(n)>1){var i=e.filter(r,(function(t){return!e.isExportDeclaration(t)||!!t.moduleSpecifier||!t.exportClause}));r=t(i,[e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.flatMap(n,(function(e){return e.exportClause.elements}))),void 0)])}var a=e.filter(r,(function(t){return e.isExportDeclaration(t)&&!!t.moduleSpecifier&&!!t.exportClause}));if(e.length(a)>1){var o=e.group(a,(function(t){return e.isStringLiteral(t.moduleSpecifier)?">"+t.moduleSpecifier.text:">"}));if(o.length!==a.length)for(var s=function(n){n.length>1&&(r=t(e.filter(r,(function(e){return-1===n.indexOf(e)})),[e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.flatMap(n,(function(e){return e.exportClause.elements}))),n[0].moduleSpecifier)]))},c=0,u=o;c<u.length;c++){var l=u[c];s(l)}}return r}(r=function(r){var n=e.find(r,e.isExportAssignment),i=e.find(r,e.isModuleDeclaration);if(i&&n&&n.isExportEquals&&e.isIdentifier(n.expression)&&e.isIdentifier(i.name)&&e.idText(i.name)===e.idText(n.expression)&&i.body&&e.isModuleBlock(i.body)){var a=e.filter(r,(function(t){return!!(1&e.getModifierFlags(t))}));e.length(a)&&(i.body.statements=e.createNodeArray(t(i.body.statements,[e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.map(e.flatMap(a,(function(t){return function(t){if(e.isVariableStatement(t))return e.filter(e.map(t.declarationList.declarations,e.getNameOfDeclaration),x);return e.filter([e.getNameOfDeclaration(t)],x)}(t)})),(function(t){return e.createExportSpecifier(void 0,t)}))),void 0)]))),e.find(r,(function(t){return t!==i&&e.nodeHasName(t,i.name)}))||(f=[],e.forEach(i.body.statements,(function(e){I(e,0)})),r=t(e.filter(r,(function(e){return e!==i&&e!==n})),f))}return r}(r))),_&&(e.isSourceFile(_)&&e.isExternalOrCommonJsModule(_)||e.isModuleDeclaration(_))&&(!e.some(r,e.isExternalModuleIndicator)||!e.hasScopeMarker(r)&&e.some(r,e.needsScopeMarker))&&r.push(e.createEmptyExports());return r}(f);function x(e){return!!e&&75===e.kind}function S(t){return e.isEnumDeclaration(t)||e.isVariableStatement(t)||e.isFunctionDeclaration(t)||e.isClassDeclaration(t)||e.isModuleDeclaration(t)&&!e.isExternalModuleAugmentation(t)&&!e.isGlobalScopeAugmentation(t)||e.isInterfaceDeclaration(t)||rb(t)}function T(t){var r=-3&(1|e.getModifierFlags(t));t.modifiers=e.createNodeArray(e.createModifiersFromModifierFlags(r)),t.modifierFlagsCache=0}function N(t,r,n){var i=c;r||(c=e.createMap()),t.forEach((function(e){P(e,!1,!!n)})),r||c.forEach((function(e){P(e,!0,!!n)})),c=i}function P(n,i,o){var c=ti(n);if(!g.has(""+A(c))&&(g.set(""+A(c),!0),!i||e.length(n.declarations)&&e.some(n.declarations,(function(t){return!!e.findAncestor(t,(function(e){return e===_}))})))){var d=a;a=function(t){var n=r({},t);n.typeParameterNames&&(n.typeParameterNames=e.cloneMap(n.typeParameterNames));n.typeParameterNamesByText&&(n.typeParameterNamesByText=e.cloneMap(n.typeParameterNamesByText));n.typeParameterSymbolList&&(n.typeParameterSymbolList=e.cloneMap(n.typeParameterSymbolList));return n}(a);var p=function(r,n,i){var o=e.unescapeLeadingUnderscores(r.escapedName),c="default"===r.escapedName;if(e.isStringANonContextualKeyword(o)&&!c)return void(a.encounteredError=!0);var _=c&&!!(-113&r.flags||16&r.flags&&e.length(ts(wa(r))))&&!(2097152&r.flags);_&&(n=!0);var d=(n?0:1)|(c&&!_?512:0),p=1536&r.flags&&7&r.flags&&"export="!==r.escapedName,f=p&&z(wa(r),r);(16&r.flags||f)&&M(wa(r),r,Q(r,o),d);524288&r.flags&&function(t,r,n){var i=Ya(t),o=_n(t).typeParameters,c=e.map(o,(function(e){return m(e,a)})),u=e.find(t.declarations,e.isJSDocTypeAlias),l=u?u.comment||u.parent.comment:void 0,_=a.flags;a.flags|=8388608,I(e.setSyntheticLeadingComments(e.createTypeAliasDeclaration(void 0,void 0,Q(t,r),c,s(i,a)),l?[{kind:3,text:"*\n * "+l.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),n),a.flags=_}(r,o,d);!(7&r.flags&&"export="!==r.escapedName)||4194304&r.flags||32&r.flags||f||function(t,r,n,i,a,o){if(a)j(t);else{var s=wa(t),c=Q(t,r);if(16&t.flags||!z(s,t)){var u=2&t.flags?Bp(t)?2:1:void 0,l=!i&&4&t.flags?Y(c,t):c,_=t.declarations&&e.find(t.declarations,(function(t){return e.isVariableDeclaration(t)}));_&&e.isVariableDeclarationList(_.parent)&&1===_.parent.declarations.length&&(_=_.parent.parent),I(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(l,q(s,t))],u)),_),l!==c?-2&o:o),l===c||n||I(e.createExportDeclaration(void 0,void 0,e.createNamedExports([e.createExportSpecifier(l,c)])),0)}else M(s,t,c,o)}}(r,o,n,_,i,d);384&r.flags&&function(t,r,n){I(e.createEnumDeclaration(void 0,e.createModifiersFromModifierFlags(hy(t)?2048:0),Q(t,r),e.map(e.filter(ts(wa(t)),(function(e){return!!(8&e.flags)})),(function(t){var r=t.declarations&&t.declarations[0]&&e.isEnumMember(t.declarations[0])&&Mb(t.declarations[0]);return e.createEnumMember(e.unescapeLeadingUnderscores(t.escapedName),void 0===r?void 0:e.createLiteral(r))}))),n)}(r,o,d);32&r.flags&&(4&r.flags?R(r,Q(r,o),d):function(r,n,i){for(var o=ja(r),c=e.map(o,(function(e){return m(e,a)})),l=Ha(r),_=Wa(l),d=wa(r),p=qa(d),f=e.length(_)?[e.createHeritageClause(89,e.map(_,(function(t){return function(t,r,n){var i=H(t);if(i)return i;var o=Y(n+"_base");return I(e.createVariableStatement(undefined,e.createVariableDeclarationList([e.createVariableDeclaration(o,s(r,a))],2)),0),e.createExpressionWithTypeArguments(void 0,e.createIdentifier(o))}(t,p,n)})))]:void 0,g=e.flatMap(ts(l),(function(e){return u(e,!1,_[0])})),y=528&r.flags?[]:e.flatMap(e.filter(ts(d),(function(e){return!(4194304&e.flags)&&"prototype"!==e.escapedName})),(function(e){return u(e,!0,p)})),h=W(1,d,_[0],161),v=0,b=h;v<b.length;v++){var x=b[v];x.type=void 0,x.typeParameters=void 0}var D=G(l,_[0]);I(e.setTextRange(e.createClassDeclaration(void 0,void 0,n,c,f,t(D,y,h,g)),r.declarations&&e.filter(r.declarations,(function(t){return e.isClassDeclaration(t)||e.isClassExpression(t)}))[0]),i)}(r,Q(r,o),d));(1536&r.flags&&(!p||function(t){return e.every(O(t),(function(e){return!(111551&On(e).flags)}))}(r))||f)&&function(t,r,n){var i=O(t),a=e.arrayToMultiMap(i,(function(e){return e.parent&&e.parent===t?"real":"merged"})),o=a.get("real")||e.emptyArray,s=a.get("merged")||e.emptyArray;if(e.length(o)){var c=Q(t,r);L(o,c,n,!!(67108880&t.flags))}if(e.length(s)){c=Q(t,r);var u=e.createModuleBlock([e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.map(e.filter(s,(function(e){return"export="!==e.escapedName})),(function(t){var r=e.unescapeLeadingUnderscores(t.escapedName),n=Q(t,r),i=t.declarations&&En(t),a=i&&wn(i,!0);w(a||t);var o=a?Q(a,e.unescapeLeadingUnderscores(a.escapedName)):n;return e.createExportSpecifier(r===o?void 0:o,r)}))))]);I(e.createModuleDeclaration(void 0,void 0,e.createIdentifier(c),u,16),0)}}(r,o,d);64&r.flags&&function(r,n,i){var o=Ha(r),s=ja(r),c=e.map(s,(function(e){return m(e,a)})),u=Wa(o),_=e.length(u)?iu(u):void 0,d=e.flatMap(ts(o),(function(e){return function(e,t){return l(e,!1,t)}(e,_)})),p=W(0,o,_,164),f=W(1,o,_,165),g=G(o,_),y=e.length(u)?[e.createHeritageClause(89,e.mapDefined(u,(function(e){return H(e)})))]:void 0;I(e.createInterfaceDeclaration(void 0,void 0,Q(r,n),c,y,t(g,f,p,d)),i)}(r,o,d);2097152&r.flags&&R(r,Q(r,o),d);4&r.flags&&"export="===r.escapedName&&j(r);if(8388608&r.flags)for(var g=0,y=r.declarations;g<y.length;g++){var h=y[g],v=zn(h,h.moduleSpecifier);v&&I(e.createExportDeclaration(void 0,void 0,void 0,e.createLiteral(D(v,a))),0)}_&&I(e.createExportAssignment(void 0,void 0,!1,e.createIdentifier(Q(r,o))),0)}(n,i,o);return a=d,p}}function w(t){e.some(t.declarations,e.isParameterDeclaration)||(e.Debug.assertDefined(c),Y(e.unescapeLeadingUnderscores(t.escapedName),t),c.set(""+A(t),t))}function I(t,r){var n=0;1&r&&_&&function(t){return e.isSourceFile(t)&&(e.isExternalOrCommonJsModule(t)||e.isJsonSourceFile(t))||e.isAmbientModule(t)&&!e.isGlobalScopeAugmentation(t)}(_)&&S(t)&&(n|=1),!h||1&n||_&&8388608&_.flags||!(e.isEnumDeclaration(t)||e.isVariableStatement(t)||e.isFunctionDeclaration(t)||e.isClassDeclaration(t)||e.isModuleDeclaration(t))||(n|=2),512&r&&(e.isClassDeclaration(t)||e.isInterfaceDeclaration(t)||e.isFunctionDeclaration(t))&&(n|=512),n&&(t.modifiers=e.createNodeArray(e.createModifiersFromModifierFlags(n|e.getModifierFlags(t))),t.modifierFlagsCache=0),f.push(t)}function O(t){return t.exports?e.filter(e.arrayFrom(t.exports.values()),(function(e){return!(4194304&e.flags||"prototype"===e.escapedName)})):[]}function M(t,r,n,i){for(var o=0,s=xs(t,0);o<s.length;o++){var c=s[o],u=p(c,243,a);u.name=e.createIdentifier(n),I(e.setTextRange(u,c.declaration),i)}1536&r.flags&&r.exports&&r.exports.size||L(e.filter(ts(t),(function(e){return!(4194304&e.flags||"prototype"===e.escapedName)})),n,i,!0)}function L(t,n,i,o){if(e.length(t)){var s=e.arrayToMultiMap(t,(function(t){return!e.length(t.declarations)||e.some(t.declarations,(function(t){return e.getSourceFileOfNode(t)===e.getSourceFileOfNode(a.enclosingDeclaration)}))?"local":"remote"})).get("local")||e.emptyArray,c=e.createModuleDeclaration(void 0,void 0,e.createIdentifier(n),e.createModuleBlock([]),16);c.flags^=8,c.parent=_,c.locals=e.createSymbolTable(t),c.symbol=t[0].parent;var u=f;f=[];var l=h;h=!1;var d=r(r({},a),{enclosingDeclaration:c}),p=a;a=d,N(e.createSymbolTable(s),o,!0),a=p,h=l;var m=f;f=u,c.flags^=8,c.parent=void 0,c.locals=void 0,c.symbol=void 0,c.body=e.createModuleBlock(m),I(c,i)}}function R(t,r,n){var i=En(t);if(!i)return e.Debug.fail();var o=ti(wn(i,!0));if(o){var s=e.unescapeLeadingUnderscores(o.escapedName);"export="===s&&(K.esModuleInterop||K.allowSyntheticDefaultImports)&&(s="default");var c=Q(o,s);switch(w(o),i.kind){case 252:var u=!(512&o.flags);I(e.createImportEqualsDeclaration(void 0,void 0,e.createIdentifier(r),u?C(o,a,67108863,!1):e.createExternalModuleReference(e.createLiteral(D(t,a)))),u?n:0);break;case 251:I(e.createNamespaceExportDeclaration(e.idText(i.name)),0);break;case 254:I(e.createImportDeclaration(void 0,void 0,e.createImportClause(e.createIdentifier(r),void 0),e.createLiteral(D(o.parent||o,a))),0);break;case 255:I(e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(e.createIdentifier(r))),e.createLiteral(D(o,a))),0);break;case 257:I(e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamedImports([e.createImportSpecifier(r!==s?e.createIdentifier(s):void 0,e.createIdentifier(r))])),e.createLiteral(D(o.parent||o,a))),0);break;case 261:var l=i.parent.parent.moduleSpecifier;B(e.unescapeLeadingUnderscores(t.escapedName),l?s:c,l&&e.isStringLiteralLike(l)?e.createLiteral(l.text):void 0);break;case 258:j(t);break;case 208:case 193:"default"===t.escapedName||"export="===t.escapedName?j(t):B(r,c);break;default:return e.Debug.failBadSyntaxKind(i,"Unhandled alias declaration kind in symbol serializer!")}}}function B(t,r,n){I(e.createExportDeclaration(void 0,void 0,e.createNamedExports([e.createExportSpecifier(t!==r?r:void 0,t)]),n),0)}function j(t){if(!(4194304&t.flags)){var r=e.unescapeLeadingUnderscores(t.escapedName),n="export="===r,i=n||"default"===r,o=t.declarations&&En(t),s=o&&wn(o,!0);if(s&&e.length(s.declarations)&&e.some(s.declarations,(function(t){return e.getSourceFileOfNode(t)===e.getSourceFileOfNode(_)}))){var c=i?e.getExportAssignmentExpression(o):e.getPropertyAssignmentAliasLikeExpression(o),u=e.isEntityNameExpression(c)?function(t){switch(t.kind){case 75:return t;case 152:do{t=t.left}while(75!==t.kind);return t;case 193:do{if(e.isModuleExportsAccessExpression(t.expression))return t.name;t=t.expression}while(75!==t.kind);return t}}(c):void 0,l=u&&Kn(u,67108863,!0,!0,_);(l||s)&&w(l||s);var d=a.tracker.trackSymbol;if(a.tracker.trackSymbol=e.noop,i)f.push(e.createExportAssignment(void 0,void 0,n,k(s,a,67108863)));else if(u===c)B(r,e.idText(u));else if(e.isClassExpression(c))B(r,Q(s,e.symbolName(s)));else{var p=Y(r,t);I(e.createImportEqualsDeclaration(void 0,void 0,e.createIdentifier(p),C(s,a,67108863,!1)),0),B(r,p)}a.tracker.trackSymbol=d}else{p=Y(r,t);var m=rd(wa(t));if(z(m,t))M(m,t,p,i?0:1);else I(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(p,q(m,t))],2)),r===p?1:0);i?f.push(e.createExportAssignment(void 0,void 0,n,e.createIdentifier(p))):r!==p&&B(r,p)}}}function z(t,r){var n=e.getSourceFileOfNode(a.enclosingDeclaration);return 48&e.getObjectFlags(t)&&!Ts(t,0)&&!Ts(t,1)&&!(!e.length(ts(t))&&!e.length(xs(t,0)))&&!e.length(xs(t,1))&&!V(r)&&!(t.symbol&&e.some(t.symbol.declarations,(function(t){return e.getSourceFileOfNode(t)!==n})))&&!e.some(ts(t),(function(e){return fo(e.escapedName)}))&&!e.some(ts(t),(function(t){return e.some(t.declarations,(function(t){return e.getSourceFileOfNode(t)!==n}))}))&&e.every(ts(t),(function(t){return e.isIdentifierText(e.symbolName(t),J)&&!e.isStringAKeyword(e.symbolName(t))}))}function U(t,r,n){return function(i,o,s){if(o&&2887656&i.flags)return[];if(4194304&i.flags||s&&vs(s,i.escapedName)&&uy(vs(s,i.escapedName))===uy(i)&&(16777216&i.flags)==(16777216&vs(s,i.escapedName).flags)&&El(wa(i),Xi(s,i.escapedName)))return[];var c=o?32:0,u=function(t,r){var n=function(t,r){var n=t.nameType;if(n){if(384&n.flags){var i=""+n.value;return e.isIdentifierText(i,K.target)||Mf(i)?Mf(i)&&e.startsWith(i,"-")?e.createComputedPropertyName(e.createLiteral(+i)):F(i):e.createLiteral(i)}if(8192&n.flags)return e.createComputedPropertyName(k(n.symbol,r,111551))}}(t,r);if(n)return n;return F(e.unescapeLeadingUnderscores(t.escapedName))}(i,a),l=e.find(i.declarations,e.or(e.isPropertyDeclaration,e.isAccessor,e.isVariableDeclaration,e.isPropertySignature,e.isBinaryExpression,e.isPropertyAccessExpression));if(98304&i.flags&&n){var _=[];return 65536&i.flags&&_.push(e.setTextRange(e.createSetAccessor(void 0,e.createModifiersFromModifierFlags(c),u,[e.createParameter(void 0,void 0,void 0,"arg",void 0,q(wa(i),i))],void 0),e.find(i.declarations,e.isSetAccessor)||l)),32768&i.flags&&_.push(e.setTextRange(e.createGetAccessor(void 0,e.createModifiersFromModifierFlags(c),u,[],q(wa(i),i),void 0),e.find(i.declarations,e.isGetAccessor)||l)),_}if(7&i.flags)return e.setTextRange(t(void 0,e.createModifiersFromModifierFlags((uy(i)?64:0)|c),u,16777216&i.flags?e.createToken(57):void 0,q(wa(i),i),void 0),e.find(i.declarations,e.or(e.isPropertyDeclaration,e.isVariableDeclaration))||l);if(8208&i.flags){for(var d=[],f=0,m=xs(wa(i),0);f<m.length;f++){var g=m[f],y=p(g,r,a);y.name=u,c&&(y.modifiers=e.createNodeArray(e.createModifiersFromModifierFlags(c))),16777216&i.flags&&(y.questionToken=e.createToken(57)),d.push(e.setTextRange(y,g.declaration))}return d}return e.Debug.fail("Unhandled class member kind! "+(i.__debugFlags||i.flags))}}function V(t){return e.find(t.declarations,(function(t){return!!e.getEffectiveTypeAnnotationNode(t)&&!!e.findAncestor(t,(function(e){return e===_}))}))}function q(t,r){var i=V(r);if(i&&!e.isFunctionLikeDeclaration(i)){var c=e.getEffectiveTypeAnnotationNode(i),u=e.visitNode(c,(function t(r){if(e.isJSDocAllType(r))return e.createKeywordTypeNode(124);if(e.isJSDocUnknownType(r))return e.createKeywordTypeNode(147);if(e.isJSDocNullableType(r))return e.createUnionTypeNode([e.visitNode(r.type,t),e.createKeywordTypeNode(99)]);if(e.isJSDocOptionalType(r))return e.createUnionTypeNode([e.visitNode(r.type,t),e.createKeywordTypeNode(145)]);if(e.isJSDocNonNullableType(r))return e.visitNode(r.type,t);if((e.isExpressionWithTypeArguments(r)||e.isTypeReferenceNode(r))&&e.isJSDocIndexSignature(r))return e.createTypeLiteralNode([e.createIndexSignature(void 0,void 0,[e.createParameter(void 0,void 0,void 0,"x",void 0,e.visitNode(r.typeArguments[0],t))],e.visitNode(r.typeArguments[1],t))]);if(e.isJSDocFunctionType(r)){var i;return e.isJSDocConstructSignature(r)?e.createConstructorTypeNode(e.visitNodes(r.typeParameters,t),e.mapDefined(r.parameters,(function(r,n){return r.name&&e.isIdentifier(r.name)&&"new"===r.name.escapedText?void(i=r.type):e.createParameter(void 0,void 0,r.dotDotDotToken,r.name||r.dotDotDotToken?"args":"arg"+n,r.questionToken,e.visitNode(r.type,t),void 0)})),e.visitNode(i||r.type,t)):e.createFunctionTypeNode(e.visitNodes(r.typeParameters,t),e.map(r.parameters,(function(r,n){return e.createParameter(void 0,void 0,r.dotDotDotToken,r.name||r.dotDotDotToken?"args":"arg"+n,r.questionToken,e.visitNode(r.type,t),void 0)})),e.visitNode(r.type,t))}if(e.isLiteralImportTypeNode(r))return e.updateImportTypeNode(r,e.updateLiteralTypeNode(r.argument,function(t,r){if(o){if(a.tracker&&a.tracker.moduleResolverHost){var i=Wb(t);if(i){var s={getCanonicalFileName:e.createGetCanonicalFileName(!!n.useCaseSensitiveFileNames),getCurrentDirectory:a.tracker.moduleResolverHost.getCurrentDirectory?function(){return a.tracker.moduleResolverHost.getCurrentDirectory()}:function(){return""},getCommonSourceDirectory:function(){return a.tracker.moduleResolverHost.getCommonSourceDirectory()}},c=e.getResolvedExternalModuleName(s,i);return e.createLiteral(c)}}}else if(a.tracker&&a.tracker.trackExternalModuleSymbolOfImportTypeNode){var u=Un(r,r,void 0);u&&a.tracker.trackExternalModuleSymbolOfImportTypeNode(u)}return r}(r,r.argument.literal)),r.qualifier,e.visitNodes(r.typeArguments,t,e.isTypeNode),r.isTypeOf);if(e.isEntityName(r)||e.isEntityNameExpression(r)){var s=Kn(e.getFirstIdentifier(r),67108863,!0,!0);if(s&&(w(s),e.isIdentifier(r)&&262144&s.flags)){var c=E(ro(s),a);return e.idText(c)!==e.idText(r)?c:r}}return e.visitEachChild(r,t,e.nullTransformationContext)}));return u===c?e.getMutableClone(c):u}var l=a.flags;8192&t.flags&&t.symbol===r&&(a.flags|=1048576);var _=s(t,a);return a.flags=l,_}function W(t,r,n,i){var o=xs(r,t);if(1===t){if(!n&&e.every(o,(function(t){return 0===e.length(t.parameters)})))return[];if(n){var s=xs(n,1);if(!e.length(s)&&e.every(o,(function(t){return 0===e.length(t.parameters)})))return[];if(s.length===o.length){for(var c=!1,u=0;u<s.length;u++)if(!m_(o[u],s[u],!1,!1,!0,Cl)){c=!0;break}if(!c)return[]}}}for(var l=[],_=0,d=o;_<d.length;_++){var f=d[_],m=p(f,i,a);l.push(e.setTextRange(m,f.declaration))}return l}function G(e,t){for(var r=[],n=0,i=[0,1];n<i.length;n++){var o=i[n],s=Ts(e,o);if(s){if(t){var c=Ts(t,o);if(c&&El(s.type,c.type))continue}r.push(d(s,o,a))}}return r}function H(t){var r,n;if(t.target&&xi(t.target.symbol,_,111551,!1)?(r=e.map(_c(t),(function(e){return s(e,a)})),n=k(t.target.symbol,a,788968)):t.symbol&&xi(t.symbol,_,111551,!1)&&(n=k(t.symbol,a,788968)),n)return e.createExpressionWithTypeArguments(r,n)}function Y(e,t){if(t&&a.remappedSymbolNames.has(""+A(t)))return a.remappedSymbolNames.get(""+A(t));t&&(e=X(t,e));for(var r=0,n=e;a.usedSymbolNames.has(e);)e=n+"_"+ ++r;return a.usedSymbolNames.set(e,!0),t&&a.remappedSymbolNames.set(""+A(t),e),e}function X(t,r){if("default"===r||"__class"===r||"__function"===r){var n=a.flags;a.flags|=16777216;var i=zi(t,a);a.flags=n,r=i.length>0&&e.isSingleOrDoubleQuote(i.charCodeAt(0))?e.stripQuotes(i):i}return"default"===r?r="_default":"export="===r&&(r="_exports"),r=e.isIdentifierText(r,J)&&!e.isStringANonContextualKeyword(r)?r:"_"+r.replace(/[^a-zA-Z0-9]/g,"_")}function Q(e,t){return a.remappedSymbolNames.has(""+A(e))?a.remappedSymbolNames.get(""+A(e)):(t=X(e,t),a.remappedSymbolNames.set(""+A(e),t),t)}}(a,i,l)}))}};function i(t,r,i,a){e.Debug.assert(void 0===t||0==(8&t.flags));var o={enclosingDeclaration:t,flags:r||0,tracker:i&&i.trackSymbol?i:{trackSymbol:e.noop,moduleResolverHost:134217728&r?{getCommonSourceDirectory:n.getCommonSourceDirectory?function(){return n.getCommonSourceDirectory()}:function(){return""},getSourceFiles:function(){return n.getSourceFiles()},getCurrentDirectory:e.maybeBind(n,n.getCurrentDirectory),getProbableSymlinks:e.maybeBind(n,n.getProbableSymlinks)}:void 0},encounteredError:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0},s=a(o);return o.encounteredError?void 0:s}function a(t){return t.truncating?t.truncating:t.truncating=!(1&t.flags)&&t.approximateLength>e.defaultMaximumTruncationLength}function s(t,r){o&&o.throwIfCancellationRequested&&o.throwIfCancellationRequested();var n=8388608&r.flags;if(r.flags&=-8388609,t){if(1&t.flags)return r.approximateLength+=3,e.createKeywordTypeNode(124);if(2&t.flags)return e.createKeywordTypeNode(147);if(4&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(142);if(8&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(139);if(64&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(150);if(16&t.flags)return r.approximateLength+=7,e.createKeywordTypeNode(127);if(1024&t.flags&&!(1048576&t.flags)){var i=ni(t.symbol),c=S(i,r,788968);return ro(i)===t?c:R(c,e.createTypeReferenceNode(e.symbolName(t.symbol),void 0))}if(1056&t.flags)return S(t.symbol,r,788968);if(128&t.flags)return r.approximateLength+=t.value.length+2,e.createLiteralTypeNode(e.setEmitFlags(e.createLiteral(t.value),16777216));if(256&t.flags){var m=t.value;return r.approximateLength+=(""+m).length,e.createLiteralTypeNode(m<0?e.createPrefix(40,e.createLiteral(-m)):e.createLiteral(m))}if(2048&t.flags)return r.approximateLength+=e.pseudoBigIntToString(t.value).length+1,e.createLiteralTypeNode(e.createLiteral(t.value));if(512&t.flags)return r.approximateLength+=t.intrinsicName.length,"true"===t.intrinsicName?e.createTrue():e.createFalse();if(8192&t.flags){if(!(1048576&r.flags)){if(Ti(t.symbol,r.enclosingDeclaration))return r.approximateLength+=6,S(t.symbol,r,111551);r.tracker.reportInaccessibleUniqueSymbolError&&r.tracker.reportInaccessibleUniqueSymbolError()}return r.approximateLength+=13,e.createTypeOperatorNode(146,e.createKeywordTypeNode(143))}if(16384&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(109);if(32768&t.flags)return r.approximateLength+=9,e.createKeywordTypeNode(145);if(65536&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(99);if(131072&t.flags)return r.approximateLength+=5,e.createKeywordTypeNode(136);if(4096&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(143);if(67108864&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(140);if(hu(t))return 4194304&r.flags&&(r.encounteredError||32768&r.flags||(r.encounteredError=!0),r.tracker.reportInaccessibleThisError&&r.tracker.reportInaccessibleThisError()),r.approximateLength+=4,e.createThis();if(!n&&t.aliasSymbol&&(16384&r.flags||Si(t.aliasSymbol,r.enclosingDeclaration))){var g=_(t.aliasTypeArguments,r);return!mi(t.aliasSymbol.escapedName)||32&t.aliasSymbol.flags?S(t.aliasSymbol,r,788968,g):e.createTypeReferenceNode(e.createIdentifier(""),g)}var y=e.getObjectFlags(t);if(4&y)return e.Debug.assert(!!(524288&t.flags)),t.node?O(t,L):L(t);if(262144&t.flags||3&y){if(262144&t.flags&&e.contains(r.inferTypeParameters,t))return r.approximateLength+=e.symbolName(t.symbol).length+6,e.createInferTypeNode(f(t,r,void 0));if(4&r.flags&&262144&t.flags&&!Si(t.symbol,r.enclosingDeclaration)){var h=E(t,r);return r.approximateLength+=e.idText(h).length,e.createTypeReferenceNode(e.createIdentifier(e.idText(h)),void 0)}return t.symbol?S(t.symbol,r,788968):e.createTypeReferenceNode(e.createIdentifier("?"),void 0)}if(3145728&t.flags){var v=1048576&t.flags?function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e[n];if(r|=i.flags,!(98304&i.flags)){if(1536&i.flags){var a=512&i.flags?Me:$a(i);if(1048576&a.flags){var o=a.types.length;if(n+o<=e.length&&Vu(e[n+o-1])===Vu(a.types[o-1])){t.push(a),n+=o-1;continue}}}t.push(i)}}65536&r&&t.push(Ce);32768&r&&t.push(Se);return t||e}(t.types):t.types;if(1===e.length(v))return s(v[0],r);var b=_(v,r,!0);return b&&b.length>0?e.createUnionOrIntersectionTypeNode(1048576&t.flags?177:178,b):void(r.encounteredError||262144&r.flags||(r.encounteredError=!0))}if(48&y)return e.Debug.assert(!!(524288&t.flags)),I(t);if(4194304&t.flags){var x=t.type;r.approximateLength+=6;var D=s(x,r);return e.createTypeOperatorNode(D)}if(8388608&t.flags){var T=s(t.objectType,r);D=s(t.indexType,r);return r.approximateLength+=2,e.createIndexedAccessTypeNode(T,D)}if(16777216&t.flags){var C=s(t.checkType,r),k=r.inferTypeParameters;r.inferTypeParameters=t.root.inferTypeParameters;var F=s(t.extendsType,r);r.inferTypeParameters=k;var P=s(Au(t),r),w=s(Fu(t),r);return r.approximateLength+=15,e.createConditionalTypeNode(C,F,P,w)}return 33554432&t.flags?s(t.typeVariable,r):e.Debug.fail("Should be unreachable.")}function I(t){var n=""+t.id,i=t.symbol;if(i){if(Sg(i.valueDeclaration)){var a=t===Ha(i)?788968:111551;return S(i,r,a)}if(32&i.flags&&!Na(i)&&!(213===i.valueDeclaration.kind&&2048&r.flags)||896&i.flags||function(){var t=!!(8192&i.flags)&&e.some(i.declarations,(function(t){return e.hasModifier(t,32)})),a=!!(16&i.flags)&&(i.parent||e.forEach(i.declarations,(function(e){return 288===e.parent.kind||249===e.parent.kind})));if(t||a)return(!!(4096&r.flags)||r.visitedTypes&&r.visitedTypes.has(n))&&(!(8&r.flags)||Ti(i,r.enclosingDeclaration))}())return S(i,r,111551);if(r.visitedTypes&&r.visitedTypes.has(n)){var o=function(t){if(t.symbol&&2048&t.symbol.flags){var r=e.findAncestor(t.symbol.declarations[0].parent,(function(e){return 181!==e.kind}));if(246===r.kind)return ri(r)}return}(t);return o?S(o,r,788968):u(r)}return O(t,M)}return M(t)}function O(t,n){var i,a=""+t.id,o=16&e.getObjectFlags(t)&&t.symbol&&32&t.symbol.flags,s=4&e.getObjectFlags(t)&&t.node?"N"+N(t.node):t.symbol?(o?"+":"")+A(t.symbol):void 0;if(r.visitedTypes||(r.visitedTypes=e.createMap()),s&&!r.symbolDepth&&(r.symbolDepth=e.createMap()),s){if((i=r.symbolDepth.get(s)||0)>10)return u(r);r.symbolDepth.set(s,i+1)}r.visitedTypes.set(a,!0);var c=n(t);return r.visitedTypes.delete(a),s&&r.symbolDepth.set(s,i),c}function M(t){if(Xo(t))return function(t){e.Debug.assert(!!(524288&t.flags));var n,i=t.declaration.readonlyToken?e.createToken(t.declaration.readonlyToken.kind):void 0,a=t.declaration.questionToken?e.createToken(t.declaration.questionToken.kind):void 0;n=qo(t)?e.createTypeOperatorNode(s(Wo(t),r)):s(zo(t),r);var o=f(Jo(t),r,n),c=s(Uo(t),r),u=e.createMappedTypeNode(i,o,a,c);return r.approximateLength+=10,e.setEmitFlags(u,1)}(t);var n=Qo(t);if(!n.properties.length&&!n.stringIndexInfo&&!n.numberIndexInfo){if(!n.callSignatures.length&&!n.constructSignatures.length)return r.approximateLength+=2,e.setEmitFlags(e.createTypeLiteralNode(void 0),1);if(1===n.callSignatures.length&&!n.constructSignatures.length)return p(n.callSignatures[0],169,r);if(1===n.constructSignatures.length&&!n.callSignatures.length)return p(n.constructSignatures[0],170,r)}var i=r.flags;r.flags|=4194304;var o=function(t){if(a(r))return[e.createPropertySignature(void 0,"...",void 0,void 0,void 0)];for(var n=[],i=0,o=t.callSignatures;i<o.length;i++){var s=o[i];n.push(p(s,164,r))}for(var c=0,_=t.constructSignatures;c<_.length;c++){s=_[c];n.push(p(s,165,r))}if(t.stringIndexInfo){var f=void 0;2048&t.objectFlags?(f=d(tc(he,t.stringIndexInfo.isReadonly,t.stringIndexInfo.declaration),0,r)).type=u(r):f=d(t.stringIndexInfo,0,r),n.push(f)}t.numberIndexInfo&&n.push(d(t.numberIndexInfo,1,r));var m=t.properties;if(!m)return n;for(var g=0,y=0,h=m;y<h.length;y++){var v=h[y];if(g++,2048&r.flags){if(4194304&v.flags)continue;24&e.getDeclarationModifierFlagsFromSymbol(v)&&r.tracker.reportPrivateInBaseOfClassExpression&&r.tracker.reportPrivateInBaseOfClassExpression(e.unescapeLeadingUnderscores(v.escapedName))}if(a(r)&&g+2<m.length-1){n.push(e.createPropertySignature(void 0,"... "+(m.length-g)+" more ...",void 0,void 0,void 0)),l(m[m.length-1],r,n);break}l(v,r,n)}return n.length?n:void 0}(n);r.flags=i;var c=e.createTypeLiteralNode(o);return r.approximateLength+=2,e.setEmitFlags(c,1024&r.flags?0:1)}function L(t){var n=_c(t);if(t.target===dt||t.target===pt){if(2&r.flags){var i=s(n[0],r);return e.createTypeReferenceNode(t.target===dt?"Array":"ReadonlyArray",[i])}var a=s(n[0],r),o=e.createArrayTypeNode(a);return t.target===dt?o:e.createTypeOperatorNode(137,o)}if(!(8&t.target.objectFlags)){if(2048&r.flags&&t.symbol.valueDeclaration&&e.isClassLike(t.symbol.valueDeclaration)&&!Ti(t.symbol,r.enclosingDeclaration))return I(t);var c=t.target.outerTypeParameters,u=(E=0,void 0);if(c)for(var l=c.length;E<l;){var d=E,p=ac(c[E]);do{E++}while(E<l&&ac(c[E])===p);if(!e.rangeEquals(c,n,d,E)){var f=_(n.slice(d,E),r),m=r.flags;r.flags|=16;var g=S(p,r,788968,f);r.flags=m,u=u?R(u,g):g}}var y=void 0;if(n.length>0){var h=(t.target.typeParameters||e.emptyArray).length;y=_(n.slice(E,h),r)}var v=r.flags;r.flags|=16;var b=S(t.symbol,r,788968,y);return r.flags=v,u?R(u,b):b}if(n.length>0){var x=dc(t),D=_(n.slice(0,x),r),T=t.target.hasRestElement;if(D){for(var E=t.target.minLength;E<Math.min(x,D.length);E++)D[E]=T&&E===x-1?e.createRestTypeNode(e.createArrayTypeNode(D[E])):e.createOptionalTypeNode(D[E]);var C=e.createTupleTypeNode(D);return t.target.readonly?e.createTypeOperatorNode(137,C):C}}if(r.encounteredError||524288&r.flags){C=e.createTupleTypeNode([]);return t.target.readonly?e.createTypeOperatorNode(137,C):C}r.encounteredError=!0}function R(t,r){if(e.isImportTypeNode(t)){var n=t.typeArguments;t.qualifier&&((e.isIdentifier(t.qualifier)?t.qualifier:t.qualifier.right).typeArguments=n),t.typeArguments=r.typeArguments;for(var i=0,a=B(r);i<a.length;i++){var o=a[i];t.qualifier=t.qualifier?e.createQualifiedName(t.qualifier,o):o}return t}n=t.typeArguments;(e.isIdentifier(t.typeName)?t.typeName:t.typeName.right).typeArguments=n,t.typeArguments=r.typeArguments;for(var s=0,c=B(r);s<c.length;s++){o=c[s];t.typeName=e.createQualifiedName(t.typeName,o)}return t}function B(t){for(var r=t.typeName,n=[];!e.isIdentifier(r);)n.unshift(r.right),r=r.left;return n.unshift(r),n}r.encounteredError=!0}function u(t){return t.approximateLength+=3,1&t.flags?e.createKeywordTypeNode(124):e.createTypeReferenceNode(e.createIdentifier("..."),void 0)}function l(t,r,n){var i=!!(8192&e.getCheckFlags(t)),a=i&&33554432&r.flags?he:wa(t),o=r.enclosingDeclaration;if(r.enclosingDeclaration=void 0,r.tracker.trackSymbol&&4096&e.getCheckFlags(t)){var c=e.first(t.declarations);if(mo(c))if(e.isBinaryExpression(c)){var l=e.getNameOfDeclaration(c);l&&e.isElementAccessExpression(l)&&e.isPropertyAccessEntityNameExpression(l.argumentExpression)&&y(l.argumentExpression,o,r)}else y(c.name.expression,o,r)}var _=C(t,r,111551,!0);r.approximateLength+=e.symbolName(t).length+1,r.enclosingDeclaration=o;var d=16777216&t.flags?e.createToken(57):void 0;if(8208&t.flags&&!$o(a).length&&!uy(t))for(var f=0,m=xs(_p(a,(function(e){return!(32768&e.flags)})),0);f<m.length;f++){var g=p(m[f],159,r);g.name=_,g.questionToken=d,n.push(D(g))}else{var h=r.flags;r.flags|=i?33554432:0;var v=void 0;v=i&&33554432&h?u(r):a?s(a,r):e.createKeywordTypeNode(124),r.flags=h;var b=uy(t)?[e.createToken(137)]:void 0;b&&(r.approximateLength+=9);var x=e.createPropertySignature(b,_,d,v,void 0);n.push(D(x))}function D(r){if(e.some(t.declarations,(function(e){return 316===e.kind}))){var n=e.find(t.declarations,(function(e){return 316===e.kind})).comment;n&&e.setSyntheticLeadingComments(r,[{kind:3,text:"*\n * "+n.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}])}else t.valueDeclaration&&e.setCommentRange(r,t.valueDeclaration);return r}}function _(t,r,n){if(e.some(t)){if(a(r)){if(!n)return[e.createTypeReferenceNode("...",void 0)];if(t.length>2)return[s(t[0],r),e.createTypeReferenceNode("... "+(t.length-2)+" more ...",void 0),s(t[t.length-1],r)]}for(var i=[],o=0,c=0,u=t;c<u.length;c++){var l=u[c];if(o++,a(r)&&o+2<t.length-1){i.push(e.createTypeReferenceNode("... "+(t.length-o)+" more ...",void 0));var _=s(t[t.length-1],r);_&&i.push(_);break}r.approximateLength+=2;var d=s(l,r);d&&i.push(d)}return i}}function d(t,r,n){var i=e.getNameFromIndexInfo(t)||"x",a=e.createKeywordTypeNode(0===r?142:139),o=e.createParameter(void 0,void 0,void 0,i,void 0,a,void 0),c=s(t.type||he,n);return t.type||2097152&n.flags||(n.encounteredError=!0),n.approximateLength+=i.length+4,e.createIndexSignature(void 0,t.isReadonly?[e.createToken(137)]:void 0,[o],c)}function p(t,r,n){var i,a;32&n.flags&&t.target&&t.mapper&&t.target.typeParameters?a=t.target.typeParameters.map((function(e){return s(gl(e,t.mapper),n)})):i=t.typeParameters&&t.typeParameters.map((function(e){return m(e,n)}));var o,c=No(t).map((function(e){return g(e,n,161===r)}));if(t.thisParameter){var u=g(t.thisParameter,n);c.unshift(u)}var l=Js(t);if(l){var _=2===l.kind||3===l.kind?e.createToken(123):void 0,d=1===l.kind||3===l.kind?e.setEmitFlags(e.createIdentifier(l.parameterName),16777216):e.createThisTypeNode(),p=l.type&&s(l.type,n);o=e.createTypePredicateNodeWithModifier(_,d,p)}else{var f=zs(t);o=f&&s(f,n)}return 256&n.flags?o&&124===o.kind&&(o=void 0):o||(o=e.createKeywordTypeNode(124)),n.approximateLength+=3,e.createSignatureDeclaration(r,i,c,o,a)}function f(t,r,n){var i=r.flags;r.flags&=-513;var a=E(t,r),o=ps(t),c=o&&s(o,r);return r.flags=i,e.createTypeParameterDeclaration(a,n,c)}function m(e,t,r){return void 0===r&&(r=ns(e)),f(e,t,r&&s(r,t))}function g(t,r,n){var i=e.getDeclarationOfKind(t,155);i||tn(t)||(i=e.getDeclarationOfKind(t,310));var a=wa(t);i&&Nb(i)&&(a=z_(a));var o=s(a,r),c=!(8192&r.flags)&&n&&i&&i.modifiers?i.modifiers.map(e.getSynthesizedClone):void 0,u=i&&e.isRestParameter(i)||32768&e.getCheckFlags(t)?e.createToken(25):void 0,l=i&&i.name?75===i.name.kind?e.setEmitFlags(e.getSynthesizedClone(i.name),16777216):152===i.name.kind?e.setEmitFlags(e.getSynthesizedClone(i.name.right),16777216):function(t){return function t(n){r.tracker.trackSymbol&&e.isComputedPropertyName(n)&&po(n)&&y(n.expression,r.enclosingDeclaration,r);var i=e.visitEachChild(n,t,e.nullTransformationContext,void 0,t);var a=e.nodeIsSynthesized(i)?i:e.getSynthesizedClone(i);190===a.kind&&(a.initializer=void 0);return e.setEmitFlags(a,16777217)}(t)}(i.name):e.symbolName(t),_=i&&Ps(i)||16384&e.getCheckFlags(t)?e.createToken(57):void 0,d=e.createParameter(void 0,c,u,l,_,o,void 0);return r.approximateLength+=e.symbolName(t).length+3,d}function y(t,r,n){if(n.tracker.trackSymbol){var i=e.getFirstIdentifier(t),a=gn(i,i.escapedText,1160127,void 0,void 0,!0);a&&n.tracker.trackSymbol(a,r,111551)}}function h(e,t,r,n){return t.tracker.trackSymbol(e,t.enclosingDeclaration,r),v(e,t,r,n)}function v(t,r,n,i){var a;return 262144&t.flags||!(r.enclosingDeclaration||64&r.flags)||134217728&r.flags?a=[t]:(a=e.Debug.assertDefined(function t(n,a,o){var s=xi(n,r.enclosingDeclaration,a,!!(128&r.flags));var c;if(!s||Di(s[0],r.enclosingDeclaration,1===s.length?a:bi(a))){var u=ii(s?s[0]:n,r.enclosingDeclaration);if(e.length(u)){c=u.map((function(t){return e.some(t.declarations,Ni)?D(t,r):void 0}));var l=u.map((function(e,t){return t}));l.sort((function(t,r){var n=c[t],i=c[r];if(n&&i){var a=e.pathIsRelative(i);return e.pathIsRelative(n)===a?e.moduleSpecifiers.countPathComponents(n)-e.moduleSpecifiers.countPathComponents(i):a?-1:1}return 0}));for(var _=l.map((function(e){return u[e]})),d=0,p=_;d<p.length;d++){var f=p[d],m=t(f,bi(a),!1);if(m){if(f.exports&&f.exports.get("export=")&&oi(f.exports.get("export="),n)){s=m;break}s=m.concat(s||[ai(f,n)||n]);break}}}}if(s)return s;if(o||!(6144&n.flags)){if(!o&&!i&&e.forEach(n.declarations,Ni))return;return[n]}}(t,n,!0)),e.Debug.assert(a&&a.length>0)),a}function b(t,r){var n;return 524384&Iv(t).flags&&(n=e.createNodeArray(e.map(ja(t),(function(e){return m(e,r)})))),n}function x(t,r,n){e.Debug.assert(t&&0<=r&&r<t.length);var i=t[r],a=""+A(i);if(!n.typeParameterSymbolList||!n.typeParameterSymbolList.get(a)){var o;if((n.typeParameterSymbolList||(n.typeParameterSymbolList=e.createMap())).set(a,!0),512&n.flags&&r<t.length-1){var s=i,c=t[r+1];if(1&e.getCheckFlags(c)){var u=function(t){return e.concatenate(Ba(t),ja(t))}(2097152&s.flags?Mn(s):s);o=_(e.map(u,c.mapper),n)}else o=b(i,n)}return o}}function D(t,i){var a=e.getDeclarationOfKind(t,288);if(a&&void 0!==a.moduleName)return a.moduleName;if(!a){if(i.tracker.trackReferencedAmbientModule){var o=e.filter(t.declarations,e.isAmbientModule);if(e.length(o))for(var s=0,u=o;s<u.length;s++){var l=u[s];i.tracker.trackReferencedAmbientModule(l,t)}}if(c.test(t.escapedName))return t.escapedName.substring(1,t.escapedName.length-1)}if(!i.enclosingDeclaration||!i.tracker.moduleResolverHost)return c.test(t.escapedName)?t.escapedName.substring(1,t.escapedName.length-1):e.getSourceFileOfNode(e.getNonAugmentationDeclaration(t)).fileName;var _=e.getSourceFileOfNode(e.getOriginalNode(i.enclosingDeclaration)),d=_n(t),p=d.specifierCache&&d.specifierCache.get(_.path);if(!p){var f=K.out||K.outFile,m=i.tracker.moduleResolverHost,g=f?r(r({},K),{baseUrl:m.getCommonSourceDirectory()}):K;p=e.first(e.moduleSpecifiers.getModuleSpecifiers(t,g,_,m,n.getSourceFiles(),{importModuleSpecifierPreference:f?"non-relative":"relative"},n.redirectTargetsMap)),d.specifierCache=d.specifierCache||e.createMap(),d.specifierCache.set(_.path,p)}return p}function S(t,r,n,i){var a=h(t,r,n,!(16384&r.flags)),o=111551===n;if(e.some(a[0].declarations,Ni)){var s=a.length>1?g(a,a.length-1,1):void 0,c=i||x(a,0,r),u=D(a[0],r);!(67108864&r.flags)&&e.getEmitModuleResolutionKind(K)===e.ModuleResolutionKind.NodeJs&&u.indexOf("/node_modules/")>=0&&(r.encounteredError=!0,r.tracker.reportLikelyUnsafeImportRequiredError&&r.tracker.reportLikelyUnsafeImportRequiredError(u));var l=e.createLiteralTypeNode(e.createLiteral(u));if(r.tracker.trackExternalModuleSymbolOfImportTypeNode&&r.tracker.trackExternalModuleSymbolOfImportTypeNode(a[0]),r.approximateLength+=u.length+10,!s||e.isEntityName(s)){if(s)(f=e.isIdentifier(s)?s:s.right).typeArguments=void 0;return e.createImportTypeNode(l,s,c,o)}var _=function t(r){return e.isIndexedAccessTypeNode(r.objectType)?t(r.objectType):r}(s),d=_.objectType.typeName;return e.createIndexedAccessTypeNode(e.createImportTypeNode(l,d,c,o),_.indexType)}var p=g(a,a.length-1,0);if(e.isIndexedAccessTypeNode(p))return p;if(o)return e.createTypeQueryNode(p);var f,m=(f=e.isIdentifier(p)?p:p.right).typeArguments;return f.typeArguments=void 0,e.createTypeReferenceNode(p,m);function g(t,n,a){var o,s=n===t.length-1?i:x(t,n,r),c=t[n],u=t[n-1];if(0===n)r.flags|=16777216,o=zi(c,r),r.approximateLength+=(o?o.length:0)+1,r.flags^=16777216;else if(u&&Qn(u)){var l=Qn(u);e.forEachEntry(l,(function(t,r){if(oi(t,c)&&!fo(r)&&"export="!==r)return o=e.unescapeLeadingUnderscores(r),!0}))}if(o||(o=zi(c,r)),r.approximateLength+=o.length+1,!(16&r.flags)&&u&&bo(u)&&bo(u).get(c.escapedName)&&oi(bo(u).get(c.escapedName),c)){var _=g(t,n-1,a);return e.isIndexedAccessTypeNode(_)?e.createIndexedAccessTypeNode(_,e.createLiteralTypeNode(e.createLiteral(o))):e.createIndexedAccessTypeNode(e.createTypeReferenceNode(_,s),e.createLiteralTypeNode(e.createLiteral(o)))}var d=e.setEmitFlags(e.createIdentifier(o,s),16777216);if(d.symbol=c,n>a){_=g(t,n-1,a);return e.isEntityName(_)?e.createQualifiedName(_,d):e.Debug.fail("Impossible construct - an export of an indexed access cannot be reachable")}return d}}function T(e,t){return!!gn(t.enclosingDeclaration,e,788968,void 0,e,!1)}function E(t,r){if(4&r.flags&&r.typeParameterNames){var n=r.typeParameterNames.get(""+qc(t));if(n)return n}var i=C(t.symbol,r,788968,!0);if(!(75&i.kind))return e.createIdentifier("(Missing type parameter)");if(4&r.flags){for(var a=i.escapedText,o=0,s=a;r.typeParameterNamesByText&&r.typeParameterNamesByText.get(s)||T(s,r);)s=a+"_"+ ++o;s!==a&&(i=e.createIdentifier(s,i.typeArguments)),(r.typeParameterNames||(r.typeParameterNames=e.createMap())).set(""+qc(t),i),(r.typeParameterNamesByText||(r.typeParameterNamesByText=e.createMap())).set(i.escapedText,!0)}return i}function C(t,r,n,i){var a=h(t,r,n);return!i||1===a.length||r.encounteredError||65536&r.flags||(r.encounteredError=!0),function t(n,i){var a=x(n,i,r);var o=n[i];0===i&&(r.flags|=16777216);var s=zi(o,r);0===i&&(r.flags^=16777216);var c=e.setEmitFlags(e.createIdentifier(s,a),16777216);c.symbol=o;return i>0?e.createQualifiedName(t(n,i-1),c):c}(a,a.length-1)}function k(t,r,n){var i=h(t,r,n);return function t(n,i){var a=x(n,i,r);var o=n[i];0===i&&(r.flags|=16777216);var s=zi(o,r);0===i&&(r.flags^=16777216);var c=s.charCodeAt(0);if(e.isSingleOrDoubleQuote(c)&&e.some(o.declarations,Ni))return e.createLiteral(D(o,r));var u=e.isIdentifierStart(c,J);if(0===i||u){var l=e.setEmitFlags(e.createIdentifier(s,a),16777216);return l.symbol=o,i>0?e.createPropertyAccess(t(n,i-1),l):l}91===c&&(s=s.substring(1,s.length-1),c=s.charCodeAt(0));var _=void 0;return e.isSingleOrDoubleQuote(c)?(_=e.createLiteral(s.substring(1,s.length-1).replace(/\\./g,(function(e){return e.substring(1)})))).singleQuote=39===c:""+ +s===s&&(_=e.createLiteral(+s)),_||((_=e.setEmitFlags(e.createIdentifier(s,a),16777216)).symbol=o),e.createElementAccess(t(n,i-1),_)}(i,i.length-1)}function F(t){return e.isIdentifierText(t,K.target)?e.createIdentifier(t):e.createLiteral(Mf(t)?+t:t)}}(),ee=e.createSymbolTable(),te=en(4,"undefined");te.declarations=[];var re=en(1536,"globalThis",8);re.exports=ee,ee.set(re.escapedName,re);var ne,ie=en(4,"arguments"),ae=en(4,"require"),oe={getNodeCount:function(){return e.sum(n.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(n.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(n.getSourceFiles(),"symbolCount")+v},getTypeCount:function(){return h},getRelationCacheSizes:function(){return{assignable:Vr.size,identity:Wr.size,subtype:Ur.size}},isUndefinedSymbol:function(e){return e===te},isArgumentsSymbol:function(e){return e===ie},isUnknownSymbol:function(e){return e===ge},getMergedSymbol:ti,getDiagnostics:eb,getGlobalDiagnostics:function(){return tb(),jr.getGlobalDiagnostics()},getTypeOfSymbolAtLocation:function(t,r){return(r=e.getParseTreeNode(r))?function(t,r){if(t=t.exportSymbol||t,75===r.kind&&(e.isRightSideOfQualifiedNameOrPropertyAccess(r)&&(r=r.parent),e.isExpressionNode(r)&&!e.isAssignmentTarget(r))){var n=Ky(r);if(si(dn(r).resolvedSymbol)===t)return n}return wa(t)}(t,r):xe},getSymbolsOfParameterPropertyDeclaration:function(t,r){var n=e.getParseTreeNode(t,e.isParameter);return void 0===n?e.Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):function(t,r){var n=t.parent,i=t.parent.parent,a=fn(n.locals,r,111551),o=fn(bo(i.symbol),r,111551);if(a&&o)return[a,o];return e.Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,e.escapeLeadingUnderscores(r))},getDeclaredTypeOfSymbol:ro,getPropertiesOfType:ts,getPropertyOfType:function(t,r){return vs(t,e.escapeLeadingUnderscores(r))},getTypeOfPropertyOfType:function(t,r){return Xi(t,e.escapeLeadingUnderscores(r))},getIndexInfoOfType:Ts,getSignaturesOfType:xs,getIndexTypeOfType:Es,getBaseTypes:Wa,getBaseTypeOfLiteralType:k_,getWidenedType:rd,getTypeFromTypeNode:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r?Yu(r):xe},getParameterType:Mg,getPromisedTypeOfPromise:lh,getReturnTypeOfSignature:zs,isNullableType:_m,getNullableType:J_,getNonNullableType:U_,getNonOptionalType:W_,getTypeArguments:_c,typeToTypeNode:Z.typeToTypeNode,indexInfoToIndexSignatureDeclaration:Z.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:Z.signatureToSignatureDeclaration,symbolToEntityName:Z.symbolToEntityName,symbolToExpression:Z.symbolToExpression,symbolToTypeParameterDeclarations:Z.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:Z.symbolToParameterDeclaration,typeParameterToDeclaration:Z.typeParameterToDeclaration,getSymbolsInScope:function(t,r){return(t=e.getParseTreeNode(t))?function(t,r){if(16777216&t.flags)return[];var n=e.createSymbolTable(),i=!1;return function(){for(;t;){switch(t.locals&&!pn(t)&&o(t.locals,r),t.kind){case 288:if(!e.isExternalOrCommonJsModule(t))break;case 248:o(ri(t).exports,2623475&r);break;case 247:o(ri(t).exports,8&r);break;case 213:t.name&&a(t.symbol,r);case 244:case 245:i||o(bo(ri(t)),788968&r);break;case 200:t.name&&a(t.symbol,r)}e.introducesArgumentsExoticObject(t)&&a(ie,r),i=e.hasModifier(t,32),t=t.parent}o(ee,r)}(),n.delete("this"),Ns(n);function a(t,r){if(e.getCombinedLocalAndExportSymbolFlags(t)&r){var i=t.escapedName;n.has(i)||n.set(i,t)}}function o(e,t){t&&e.forEach((function(e){a(e,t)}))}}(t,r):[]},getSymbolAtLocation:function(t){return(t=e.getParseTreeNode(t))?cb(t):void 0},getShorthandAssignmentValueSymbol:function(t){return(t=e.getParseTreeNode(t))?function(e){if(e&&280===e.kind)return Kn(e.name,2208703);return}(t):void 0},getExportSpecifierLocalTargetSymbol:function(t){var r=e.getParseTreeNode(t,e.isExportSpecifier);return r?function(e){return e.parent.parent.moduleSpecifier?An(e.parent.parent,e):Kn(e.propertyName||e.name,2998271)}(r):void 0},getExportSymbolOfSymbol:function(e){return ti(e.exportSymbol||e)},getTypeAtLocation:function(t){return(t=e.getParseTreeNode(t))?ub(t):xe},getTypeOfAssignmentPattern:function(t){var r=e.getParseTreeNode(t,e.isAssignmentPattern);return r&&lb(r)||xe},getPropertySymbolOfDestructuringAssignment:function(t){var r=e.getParseTreeNode(t,e.isIdentifier);return r?function(t){var r=lb(e.cast(t.parent.parent,e.isAssignmentPattern));return r&&vs(r,t.escapedText)}(r):void 0},signatureToString:function(t,r,n,i){return wi(t,e.getParseTreeNode(r),n,i)},typeToString:function(t,r,n){return Ii(t,e.getParseTreeNode(r),n)},symbolToString:function(t,r,n,i){return Pi(t,e.getParseTreeNode(r),n,i)},typePredicateToString:function(t,r,n){return Ri(t,e.getParseTreeNode(r),n)},writeSignature:function(t,r,n,i,a){return wi(t,e.getParseTreeNode(r),n,i,a)},writeType:function(t,r,n,i){return Ii(t,e.getParseTreeNode(r),n,i)},writeSymbol:function(t,r,n,i,a){return Pi(t,e.getParseTreeNode(r),n,i,a)},writeTypePredicate:function(t,r,n,i){return Ri(t,e.getParseTreeNode(r),n,i)},getAugmentedPropertiesOfType:fb,getRootSymbols:function t(r){var n=function(t){if(6&e.getCheckFlags(t))return e.mapDefined(_n(t).containingType.types,(function(e){return vs(e,t.escapedName)}));if(33554432&t.flags){var r=t,n=r.leftSpread,i=r.rightSpread,a=r.syntheticOrigin;return n?[n,i]:a?[a]:e.singleElementArray(function(e){var t,r=e;for(;r=_n(r).target;)t=r;return t}(t))}return}(r);return n?e.flatMap(n,t):[r]},getContextualType:function(t,r){var n=e.getParseTreeNode(t,e.isExpression);return n?xf(n,r):void 0},getContextualTypeForObjectLiteralElement:function(t){var r=e.getParseTreeNode(t,e.isObjectLiteralElementLike);return r?pf(r):void 0},getContextualTypeForArgumentAtIndex:function(t,r){var n=e.getParseTreeNode(t,e.isCallLikeExpression);return n&&uf(n,r)},getContextualTypeForJsxAttribute:function(t){var r=e.getParseTreeNode(t,e.isJsxAttributeLike);return r&&gf(r)},isContextSensitive:bl,getFullyQualifiedName:jn,getResolvedSignature:function(e,t,r){return se(e,t,r,0)},getResolvedSignatureForSignatureHelp:function(e,t,r){return se(e,t,r,16)},getExpandedParameters:No,hasEffectiveRestParameter:Kg,getConstantValue:function(t){var r=e.getParseTreeNode(t,Ob);return r?Mb(r):void 0},isValidPropertyAccess:function(t,r){var n=e.getParseTreeNode(t,e.isPropertyAccessOrQualifiedNameOrImportTypeNode);return!!n&&function(e,t){switch(e.kind){case 193:return Pm(e,101===e.expression.kind,t,rd(zy(e.expression)));case 152:return Pm(e,!1,t,rd(zy(e.left)));case 187:return Pm(e,!1,t,Yu(e))}}(n,e.escapeLeadingUnderscores(r))},isValidPropertyAccessForCompletions:function(t,r,n){var i=e.getParseTreeNode(t,e.isPropertyAccessExpression);return!!i&&function(e,t,r){return Pm(e,193===e.kind&&101===e.expression.kind,r.escapedName,t)}(i,r,n)},getSignatureFromDeclaration:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?Ls(r):void 0},isImplementationOfOverload:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?kb(r):void 0},getImmediateAliasedSymbol:Bf,getAliasedSymbol:Mn,getEmitResolver:function(e,t){return eb(e,t),$},getExportsOfModule:Yn,getExportsAndPropertiesOfModule:function(t){var r=Yn(t),n=Wn(t);n!==t&&e.addRange(r,ts(wa(n)));return r},getSymbolWalker:e.createGetSymbolWalker((function(e){return qs(e)||he}),Js,zs,Wa,Qo,wa,Od,Ss,ns,e.getFirstIdentifier,_c),getAmbientModules:function(){at||(at=[],ee.forEach((function(e,t){c.test(t)&&at.push(e)})));return at},getJsxIntrinsicTagNamesAt:function(t){var r=Wf(C.IntrinsicElements,t);return r?ts(r):e.emptyArray},isOptionalParameter:function(t){var r=e.getParseTreeNode(t,e.isParameter);return!!r&&Ps(r)},tryGetMemberInModuleExports:function(t,r){return Xn(e.escapeLeadingUnderscores(t),r)},tryGetMemberInModuleExportsAndProperties:function(t,r){return function(e,t){var r=Xn(e,t);if(r)return r;var n=Wn(t);if(n===t)return;var i=wa(n);return 131068&i.flags?void 0:vs(i,e)}(e.escapeLeadingUnderscores(t),r)},tryFindAmbientModuleWithoutAugmentations:function(e){return Fs(e,!1)},getApparentType:ms,getUnionType:Qc,isTypeAssignableTo:function(e,t){return Fl(e,t)},createAnonymousType:hi,createSignature:To,createSymbol:en,createIndexInfo:tc,getAnyType:function(){return he},getStringType:function(){return Ne},getNumberType:function(){return Ae},createPromiseType:Gg,createArrayType:jc,getElementTypeOfArrayType:v_,getBooleanType:function(){return Me},getFalseType:function(e){return e?Pe:we},getTrueType:function(e){return e?Ie:Oe},getVoidType:function(){return Re},getUndefinedType:function(){return Se},getNullType:function(){return Ce},getESSymbolType:function(){return Le},getNeverType:function(){return Be},getOptionalType:function(){return Ee},isSymbolAccessible:Ei,getObjectFlags:e.getObjectFlags,isArrayType:y_,isTupleType:w_,isArrayLikeType:b_,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some((function(t){var r=t.name&&ou(t.name),n=r&&_o(r)?yo(r):void 0,i=void 0===n?void 0:Xi(e,n);return!!i&&C_(i)&&!Fl(ub(t),i)}))},getAllPossiblePropertiesOfTypes:function(t){var r=Qc(t);if(!(1048576&r.flags))return fb(r);for(var n=e.createSymbolTable(),i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,c=fb(o);s<c.length;s++){var u=c[s].escapedName;if(!n.has(u)){var l=gs(r,u);l&&n.set(u,l)}}return e.arrayFrom(n.values())},getSuggestionForNonexistentProperty:function(e,t){return Cm(e,t)},getSuggestionForNonexistentSymbol:function(t,r,n){return function(t,r,n){var i=km(t,r,n);return i&&e.symbolName(i)}(t,e.escapeLeadingUnderscores(r),n)},getSuggestionForNonexistentExport:function(t,r){return function(t,r){var n=Nm(t,r);return n&&e.symbolName(n)}(t,r)},getBaseConstraintOfType:cs,getDefaultFromTypeParameter:function(e){return e&&262144&e.flags?ps(e):void 0},resolveName:function(t,r,n,i){return gn(r,e.escapeLeadingUnderscores(t),n,void 0,void 0,!1,i)},getJsxNamespace:function(t){return e.unescapeLeadingUnderscores(Yr(t))},getAccessibleSymbolChain:xi,getTypePredicateOfSignature:Js,resolveExternalModuleSymbol:Wn,tryGetThisTypeAt:function(t,r){return(t=e.getParseTreeNode(t))&&Xp(t,r)},getTypeArgumentConstraint:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r&&function(t){var r=e.tryCast(t.parent,e.isTypeReferenceType);if(!r)return;var n=th(r),i=ns(n[r.typeArguments.indexOf(t)]);return i&&gl(i,el(n,Zy(r,n)))}(r)},getSuggestionDiagnostics:function(t,i){if(e.skipTypeChecking(t,K,n))return e.emptyArray;var a;try{return o=i,Qv(t),e.Debug.assert(!!(1&dn(t).flags)),a=e.addRange(a,Kr.getDiagnostics(t.fileName)),t.isDeclarationFile||$v(0)&&$v(1)||Sh(Zv(t),(function(t,n,i){e.containsParseError(t)||$v(n)||(a||(a=[])).push(r(r({},i),{category:e.DiagnosticCategory.Suggestion}))})),a||e.emptyArray}finally{o=void 0}},runWithCancellationToken:function(e,t){try{return o=e,t(oe)}finally{o=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:ja};function se(t,r,n,i){var a=e.getParseTreeNode(t,e.isCallLikeExpression);ne=n;var o=a?Dg(a,r,i):void 0;return ne=void 0,o}var ce=e.createMap(),ue=e.createMap(),le=e.createMap(),_e=e.createMap(),de=e.createMap(),pe=e.createMap(),fe=[],me=e.createMap(),ge=en(4,"unknown"),ye=en(0,"__resolving__"),he=_i(1,"any"),ve=_i(1,"any"),be=_i(1,"any"),xe=_i(1,"error"),De=_i(2,"unknown"),Se=_i(32768,"undefined"),Te=V?Se:_i(32768,"undefined",262144),Ee=_i(32768,"undefined"),Ce=_i(65536,"null"),ke=V?Ce:_i(65536,"null",262144),Ne=_i(4,"string"),Ae=_i(8,"number"),Fe=_i(64,"bigint"),Pe=_i(512,"false"),we=_i(512,"false"),Ie=_i(512,"true"),Oe=_i(512,"true");Ie.regularType=Oe,Ie.freshType=Ie,Oe.regularType=Oe,Oe.freshType=Ie,Pe.regularType=we,Pe.freshType=Pe,we.regularType=we,we.freshType=Pe;var Me=di([we,Oe]);di([we,Ie]),di([Pe,Oe]),di([Pe,Ie]);var Le=_i(4096,"symbol"),Re=_i(16384,"void"),Be=_i(131072,"never"),je=_i(131072,"never"),Ke=_i(131072,"never",1048576),Je=_i(131072,"never"),ze=_i(131072,"never"),Ue=_i(67108864,"object"),Ve=Qc([Ne,Ae,Le]),qe=X?Ne:Ve,We=Qc([Ae,Fe]),Ge=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0),He=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0);He.objectFlags|=4096;var Ye=en(2048,"__type");Ye.members=e.createSymbolTable();var Xe=hi(Ye,B,e.emptyArray,e.emptyArray,void 0,void 0),Qe=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0);Qe.instantiations=e.createMap();var $e=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0);$e.objectFlags|=1048576;var Ze=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0),et=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0),tt=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0),rt=fi(),nt=fi();nt.constraint=rt;var it,at,ot,st,ct,ut,lt,_t,dt,pt,ft,mt,gt,yt,ht,vt,bt,xt,Dt,St,Tt,Et,Ct,kt,Nt,At,Ft,Pt,wt,It,Ot,Mt,Lt,Rt,Bt,jt,Kt,Jt,zt,Ut,Vt,qt,Wt,Gt,Ht,Yt,Xt=fi(),Qt=Is(1,"<<unresolved>>",0,he),$t=To(void 0,void 0,void 0,e.emptyArray,he,void 0,0,0),Zt=To(void 0,void 0,void 0,e.emptyArray,xe,void 0,0,0),er=To(void 0,void 0,void 0,e.emptyArray,he,void 0,0,0),tr=To(void 0,void 0,void 0,e.emptyArray,je,void 0,0,0),rr=tc(Ne,!0),nr=e.createMap(),ir={get yieldType(){throw new Error("Not supported")},get returnType(){throw new Error("Not supported")},get nextType(){throw new Error("Not supported")}},ar=rv(he,he,he),or=rv(he,he,De),sr=rv(Be,he,Se),cr={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Rt||(Rt=Fc("AsyncIterator",3,e))||Qe},getGlobalIterableType:function(e){return Lt||(Lt=Fc("AsyncIterable",1,e))||Qe},getGlobalIterableIteratorType:function(e){return Bt||(Bt=Fc("AsyncIterableIterator",1,e))||Qe},getGlobalGeneratorType:function(e){return jt||(jt=Fc("AsyncGenerator",3,e))||Qe},resolveIterationType:dh,mustHaveANextMethodDiagnostic:e.Diagnostics.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},ur={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return Pt||(Pt=Fc("Iterator",3,e))||Qe},getGlobalIterableType:Mc,getGlobalIterableIteratorType:function(e){return wt||(wt=Fc("IterableIterator",1,e))||Qe},getGlobalGeneratorType:function(e){return It||(It=Fc("Generator",3,e))||Qe},resolveIterationType:function(e,t){return e},mustHaveANextMethodDiagnostic:e.Diagnostics.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},lr=e.createMap(),_r=e.createMap(),dr=0,pr=0,fr=0,mr=!1,gr=0,yr=Wu(""),hr=Wu(0),vr=Wu({negative:!1,base10Value:"0"}),br=[],xr=[],Dr=[],Sr=0,Tr=10,Er=[],Cr=[],kr=[],Nr=[],Ar=[],Fr=[],Pr=[],wr=[],Ir=[],Or=[],Mr=[],Lr=[],Rr=[],Br=[],jr=e.createDiagnosticCollection(),Kr=e.createDiagnosticCollection(),Jr=e.createMapFromTemplate({string:Ne,number:Ae,bigint:Fe,boolean:Me,symbol:Le,undefined:Se}),zr=Qc(e.arrayFrom(D.keys(),Wu)),Ur=e.createMap(),Vr=e.createMap(),qr=e.createMap(),Wr=e.createMap(),Gr=e.createMap(),Hr=e.createSymbolTable();return Hr.set(te.escapedName,te),function(){for(var t=0,r=n.getSourceFiles();t<r.length;t++){var i=r[t];e.bindSourceFile(i,K)}var a;it=e.createMap();for(var o=0,s=n.getSourceFiles();o<s.length;o++){if(!(i=s[o]).redirectInfo){if(!e.isExternalOrCommonJsModule(i)){var c=i.locals.get("globalThis");if(c)for(var u=0,l=c.declarations;u<l.length;u++){var _=l[u];jr.add(e.createDiagnosticForNode(_,e.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"))}un(ee,i.locals)}if(i.jsGlobalAugmentations&&un(ee,i.jsGlobalAugmentations),i.patternAmbientModules&&i.patternAmbientModules.length&&(ot=e.concatenate(ot,i.patternAmbientModules)),i.moduleAugmentations.length&&(a||(a=[])).push(i.moduleAugmentations),i.symbol&&i.symbol.globalExports)i.symbol.globalExports.forEach((function(e,t){ee.has(t)||ee.set(t,e)}))}}if(a)for(var d=0,p=a;d<p.length;d++)for(var f=p[d],m=0,g=f;m<g.length;m++){var y=g[m];e.isGlobalScopeAugmentation(y.parent)&&ln(y)}(function(t,r,n){r.forEach((function(r,i){var a=t.get(i);a?e.forEach(a.declarations,function(t,r){return function(n){return jr.add(e.createDiagnosticForNode(n,r,t))}}(e.unescapeLeadingUnderscores(i),n)):t.set(i,r)}))})(ee,Hr,e.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0),_n(te).type=Te,_n(ie).type=Fc("IArguments",0,!0),_n(ge).type=xe,_n(re).type=pi(16,re),dt=Fc("Array",1,!0),ct=Fc("Object",0,!0),ut=Fc("Function",0,!0),lt=W&&Fc("CallableFunction",0,!0)||ut,_t=W&&Fc("NewableFunction",0,!0)||ut,ft=Fc("String",0,!0),mt=Fc("Number",0,!0),gt=Fc("Boolean",0,!0),yt=Fc("RegExp",0,!0),vt=jc(he),(bt=jc(ve))===Ge&&(bt=hi(void 0,B,e.emptyArray,e.emptyArray,void 0,void 0));if(pt=Lc("ReadonlyArray",1)||dt,xt=pt?Rc(pt,[he]):vt,ht=Lc("ThisType",1),a)for(var h=0,v=a;h<v.length;h++){f=v[h];for(var b=0,x=f;b<x.length;b++){y=x[b];e.isGlobalScopeAugmentation(y.parent)||ln(y)}}it.forEach((function(t){var r=t.firstFile,n=t.secondFile,i=t.conflictingSymbols;if(i.size<8)i.forEach((function(t,r){for(var n=t.isBlockScoped,i=t.firstFileLocations,a=t.secondFileLocations,o=n?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,s=0,c=i;s<c.length;s++){cn(c[s],o,r,a)}for(var u=0,l=a;u<l.length;u++){cn(l[u],o,r,i)}}));else{var a=e.arrayFrom(i.keys()).join(", ");jr.add(e.addRelatedInfo(e.createDiagnosticForNode(r,e.Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,a),e.createDiagnosticForNode(n,e.Diagnostics.Conflicts_are_in_this_file))),jr.add(e.addRelatedInfo(e.createDiagnosticForNode(n,e.Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,a),e.createDiagnosticForNode(r,e.Diagnostics.Conflicts_are_in_this_file)))}})),it=void 0}(),oe;function Yr(t){if(t){var r=e.getSourceFileOfNode(t);if(r){if(r.localJsxNamespace)return r.localJsxNamespace;var n=r.pragmas.get("jsx");if(n){var i=e.isArray(n)?n[0]:n;if(r.localJsxFactory=e.parseIsolatedEntityName(i.arguments.factory,J),r.localJsxFactory)return r.localJsxNamespace=e.getFirstIdentifier(r.localJsxFactory).escapedText}}}return Gt||(Gt="React",K.jsxFactory?(Ht=e.parseIsolatedEntityName(K.jsxFactory,J))&&(Gt=e.getFirstIdentifier(Ht).escapedText):K.reactNamespace&&(Gt=e.escapeLeadingUnderscores(K.reactNamespace))),Gt}function Xr(t,r,n,i,a,o){var s=t?e.createDiagnosticForNode(t,r,n,i,a,o):e.createCompilerDiagnostic(r,n,i,a,o);return jr.add(s),s}function Qr(t,n){t?jr.add(n):Kr.add(r(r({},n),{category:e.DiagnosticCategory.Suggestion}))}function $r(t,r,n,i,a,o,s){Qr(t,"message"in n?e.createDiagnosticForNode(r,n,i,a,o,s):e.createDiagnosticForNodeFromMessageChain(r,n))}function Zr(t,r,n,i,a,o,s){var c=Xr(t,n,i,a,o,s);if(r){var u=e.createDiagnosticForNode(t,e.Diagnostics.Did_you_forget_to_use_await);e.addRelatedInfo(c,u)}return c}function en(e,t,r){v++;var n=new m(33554432|e,t);return n.checkFlags=r||0,n}function tn(e){return 0!=(33554432&e.flags)}function rn(e){var t=0;return 2&e&&(t|=111551),1&e&&(t|=111550),4&e&&(t|=0),8&e&&(t|=900095),16&e&&(t|=110991),32&e&&(t|=899503),64&e&&(t|=788872),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=110735),8192&e&&(t|=103359),32768&e&&(t|=46015),65536&e&&(t|=78783),262144&e&&(t|=526824),524288&e&&(t|=788968),2097152&e&&(t|=2097152),t}function nn(e,t){t.mergeId||(t.mergeId=_,_++),Er[t.mergeId]=e}function an(t){var r=en(t.flags,t.escapedName);return r.declarations=t.declarations?t.declarations.slice():[],r.parent=t.parent,t.valueDeclaration&&(r.valueDeclaration=t.valueDeclaration),t.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),t.members&&(r.members=e.cloneMap(t.members)),t.exports&&(r.exports=e.cloneMap(t.exports)),nn(r,t),r}function on(t,r,n){if(void 0===n&&(n=!1),!(t.flags&rn(r.flags))||67108864&(r.flags|t.flags)){if(r===t)return t;if(!(33554432&t.flags)){var i=On(t);if(i===ge)return r;t=an(i)}512&r.flags&&512&t.flags&&t.constEnumOnlyModule&&!r.constEnumOnlyModule&&(t.constEnumOnlyModule=!1),t.flags|=r.flags,r.valueDeclaration&&(!t.valueDeclaration||e.isAssignmentDeclaration(t.valueDeclaration)&&!e.isAssignmentDeclaration(r.valueDeclaration)||e.isEffectiveModuleDeclaration(t.valueDeclaration)&&!e.isEffectiveModuleDeclaration(r.valueDeclaration))&&(t.valueDeclaration=r.valueDeclaration),e.addRange(t.declarations,r.declarations),r.members&&(t.members||(t.members=e.createSymbolTable()),un(t.members,r.members,n)),r.exports&&(t.exports||(t.exports=e.createSymbolTable()),un(t.exports,r.exports,n)),n||nn(t,r)}else if(1024&t.flags)t!==re&&Xr(e.getNameOfDeclaration(r.declarations[0]),e.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,Pi(t));else{var a=!!(384&t.flags||384&r.flags),o=!!(2&t.flags||2&r.flags),s=a?e.Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:o?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0,c=r.declarations&&e.getSourceFileOfNode(r.declarations[0]),u=t.declarations&&e.getSourceFileOfNode(t.declarations[0]),l=Pi(r);if(c&&u&&it&&!a&&c!==u){var _=-1===e.comparePaths(c.path,u.path)?c:u,d=_===c?u:c,p=e.getOrUpdate(it,_.path+"|"+d.path,(function(){return{firstFile:_,secondFile:d,conflictingSymbols:e.createMap()}})),f=e.getOrUpdate(p.conflictingSymbols,l,(function(){return{isBlockScoped:o,firstFileLocations:[],secondFileLocations:[]}}));m(f.firstFileLocations,r),m(f.secondFileLocations,t)}else sn(r,s,l,t),sn(t,s,l,r)}return t;function m(t,r){for(var n=0,i=r.declarations;n<i.length;n++){var a=i[n];e.pushIfUnique(t,(e.getExpandoInitializer(a,!1)?e.getNameOfExpando(a):e.getNameOfDeclaration(a))||a)}}}function sn(t,r,n,i){e.forEach(t.declarations,(function(t){cn((e.getExpandoInitializer(t,!1)?e.getNameOfExpando(t):e.getNameOfDeclaration(t))||t,r,n,i.declarations)}))}function cn(t,r,n,i){for(var a=function(t,r,n,i,a,o){var s=t?e.createDiagnosticForNode(t,r,n,i,a,o):e.createCompilerDiagnostic(r,n,i,a,o),c=jr.lookup(s);return c||(jr.add(s),s)}(t,r,n),o=0,s=i||e.emptyArray;o<s.length;o++){var c=s[o];a.relatedInformation=a.relatedInformation||[],e.length(a.relatedInformation)>=5||e.addRelatedInfo(a,e.length(a.relatedInformation)?e.createDiagnosticForNode(c,e.Diagnostics.and_here):e.createDiagnosticForNode(c,e.Diagnostics._0_was_also_declared_here,n))}}function un(e,t,r){void 0===r&&(r=!1),t.forEach((function(t,n){var i=e.get(n);e.set(n,i?on(i,t,r):t)}))}function ln(t){var r=t.parent;if(r.symbol.declarations[0]===r)if(e.isGlobalScopeAugmentation(r))un(ee,r.symbol.exports);else{var n=Un(t,t,8388608&t.parent.parent.flags?void 0:e.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!n)return;if(1920&(n=Wn(n)).flags)if(e.some(ot,(function(e){return n===e.symbol}))){var i=on(r.symbol,n,!0);st||(st=e.createMap()),st.set(t.text,i)}else on(n,r.symbol);else Xr(t,e.Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,t.text)}else e.Debug.assert(r.symbol.declarations.length>1)}function _n(e){if(33554432&e.flags)return e;var t=A(e);return Cr[t]||(Cr[t]={})}function dn(e){var t=N(e);return kr[t]||(kr[t]={flags:0})}function pn(t){return 288===t.kind&&!e.isExternalOrCommonJsModule(t)}function fn(t,r,n){if(n){var i=t.get(r);if(i){if(e.Debug.assert(0==(1&e.getCheckFlags(i)),"Should never get an instantiated symbol here."),i.flags&n)return i;if(2097152&i.flags){var a=Mn(i);if(a===ge||a.flags&n)return i}}}}function mn(t,r){var i=e.getSourceFileOfNode(t),a=e.getSourceFileOfNode(r);if(i!==a){if(z&&(i.externalModuleIndicator||a.externalModuleIndicator)||!K.outFile&&!K.out||Md(r)||8388608&t.flags)return!0;if(u(r,t))return!0;var o=n.getSourceFiles();return o.indexOf(i)<=o.indexOf(a)}if(t.pos<=r.pos){if(190===t.kind){var s=e.getAncestor(r,190);return s?e.findAncestor(s,e.isBindingElement)!==e.findAncestor(t,e.isBindingElement)||t.pos<s.pos:mn(e.getAncestor(t,241),r)}return 241===t.kind?!function(t,r){var n=e.getEnclosingBlockScopeContainer(t);switch(t.parent.parent.kind){case 224:case 229:case 231:if(Sn(r,t,n))return!0}var i=t.parent.parent;return e.isForInOrOfStatement(i)&&Sn(r,i.expression,n)}(t,r):e.isClassDeclaration(t)?!e.findAncestor(r,(function(r){return e.isComputedPropertyName(r)&&r.parent.parent===t})):!e.isPropertyDeclaration(t)||!function(t,r){if(r.end>t.end)return!1;return void 0===e.findAncestor(r,(function(e){if(e===t)return"quit";switch(e.kind){case 201:case 158:return!0;case 222:switch(e.parent.kind){case 162:case 160:case 163:return!0;default:return!1}default:return!1}}))}(t,r)}if(261===r.parent.kind||258===r.parent.kind&&r.parent.isExportEquals)return!0;if(258===r.kind&&r.isExportEquals)return!0;var c=e.getEnclosingBlockScopeContainer(t);return!!(4194304&r.flags)||Md(r)||u(r,t,c);function u(t,r,n){return!!e.findAncestor(t,(function(i){if(i===n)return"quit";if(e.isFunctionLike(i))return!0;if(i.parent&&158===i.parent.kind&&i.parent.initializer===i)if(e.hasModifier(i.parent,32)){if(160===r.kind)return!0}else if(!(158===r.kind&&!e.hasModifier(r,32))||e.getContainingClass(t)!==e.getContainingClass(r))return!0;return!1}))}}function gn(e,t,r,n,i,a,o,s){return void 0===o&&(o=!1),yn(e,t,r,n,i,a,o,fn,s)}function yn(t,r,n,i,a,o,s,c,u){var l,_,d,p,f,m,g=t,y=!1,h=t,v=!1;e:for(;t;){if(t.locals&&!pn(t)&&(l=c(t.locals,r,n))){var b=!0;if(e.isFunctionLike(t)&&_&&_!==t.body){if(n&l.flags&788968&&301!==_.kind&&(b=!!(262144&l.flags)&&(_===t.type||155===_.kind||154===_.kind)),n&l.flags&3){var x=t;K.target&&K.target>=2&&e.isParameter(_)&&x.body&&l.valueDeclaration.pos>=x.body.pos&&l.valueDeclaration.end<=x.body.end?b=!1:1&l.flags&&(b=155===_.kind||_===t.type&&!!e.findAncestor(l.valueDeclaration,e.isParameter))}}else 179===t.kind&&(b=_===t.trueType);if(b)break e;l=void 0}switch(y=y||hn(t,_),t.kind){case 288:if(!e.isExternalOrCommonJsModule(t))break;v=!0;case 248:var D=ri(t).exports||B;if(288===t.kind||e.isModuleDeclaration(t)&&8388608&t.flags&&!e.isGlobalScopeAugmentation(t)){if(l=D.get("default")){var S=e.getLocalSymbolForExportDefault(l);if(S&&l.flags&n&&S.escapedName===r)break e;l=void 0}var T=D.get(r);if(T&&2097152===T.flags&&e.getDeclarationOfKind(T,261))break}if("default"!==r&&(l=c(D,r,2623475&n))){if(!e.isSourceFile(t)||!t.commonJsModuleIndicator||l.declarations.some(e.isJSDocTypeAlias))break e;l=void 0}break;case 247:if(l=c(ri(t).exports,r,8&n))break e;break;case 158:if(!e.hasModifier(t,32)){var E=ui(t.parent);E&&E.locals&&c(E.locals,r,111551&n)&&(p=t)}break;case 244:case 213:case 245:if(l=c(ri(t).members||B,r,788968&n)){if(!xn(l,t)){l=void 0;break}if(_&&e.hasModifier(_,32))return void Xr(h,e.Diagnostics.Static_members_cannot_reference_class_type_parameters);break e}if(213===t.kind&&32&n){var C=t.name;if(C&&r===C.escapedText){l=t.symbol;break e}}break;case 215:if(_===t.expression&&89===t.parent.token){var k=t.parent.parent;if(e.isClassLike(k)&&(l=c(ri(k).members,r,788968&n)))return void(i&&Xr(h,e.Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters))}break;case 153:if(m=t.parent.parent,(e.isClassLike(m)||245===m.kind)&&(l=c(ri(m).members,r,788968&n)))return void Xr(h,e.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);break;case 201:if(K.target>=2)break;case 160:case 161:case 162:case 163:case 243:if(3&n&&"arguments"===r){l=ie;break e}break;case 200:if(3&n&&"arguments"===r){l=ie;break e}if(16&n){var N=t.name;if(N&&r===N.escapedText){l=t.symbol;break e}}break;case 156:t.parent&&155===t.parent.kind&&(t=t.parent),t.parent&&(e.isClassElement(t.parent)||244===t.parent.kind)&&(t=t.parent);break;case 315:case 308:case 309:t=e.getJSDocHost(t);break;case 155:_&&_===t.initializer&&(f=t);break;case 190:if(_&&_===t.initializer)155===(I=e.getRootDeclaration(t)).kind&&(f=t)}vn(t)&&(d=t),_=t,t=t.parent}if(!o||!l||d&&l===d.symbol||(l.isReferenced|=n),!l){if(_&&(e.Debug.assert(288===_.kind),_.commonJsModuleIndicator&&"exports"===r&&n&_.symbol.flags))return _.symbol;s||(l=c(ee,r,n))}if(!l&&g&&e.isInJSFile(g)&&g.parent&&e.isRequireCall(g.parent,!1))return ae;if(l){if(i){if(p){var A=p.name;return void Xr(h,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(A),bn(a))}if(h&&(2&n||(32&n||384&n)&&111551==(111551&n))){var F=si(l);(2&F.flags||32&F.flags||384&F.flags)&&function(t,r){if(e.Debug.assert(!!(2&t.flags||32&t.flags||384&t.flags)),67108881&t.flags&&32&t.flags)return;var n=e.find(t.declarations,(function(t){return e.isBlockOrCatchScoped(t)||e.isClassLike(t)||247===t.kind}));if(void 0===n)return e.Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(8388608&n.flags||mn(n,r))){var i=void 0,a=e.declarationNameToString(e.getNameOfDeclaration(n));2&t.flags?i=Xr(r,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,a):32&t.flags?i=Xr(r,e.Diagnostics.Class_0_used_before_its_declaration,a):256&t.flags?i=Xr(r,e.Diagnostics.Enum_0_used_before_its_declaration,a):(e.Debug.assert(!!(128&t.flags)),K.preserveConstEnums&&(i=Xr(r,e.Diagnostics.Class_0_used_before_its_declaration,a))),i&&e.addRelatedInfo(i,e.createDiagnosticForNode(n,e.Diagnostics._0_is_declared_here,a))}}(F,h)}if(l&&v&&111551==(111551&n)&&!(4194304&g.flags)){var P=ti(l);e.length(P.declarations)&&e.every(P.declarations,(function(t){return e.isNamespaceExportDeclaration(t)||e.isSourceFile(t)&&!!t.symbol.globalExports}))&&$r(!K.allowUmdGlobalAccess,h,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,e.unescapeLeadingUnderscores(r))}if(l&&f&&!y&&111551==(111551&n)){var w=ti(xo(l)),I=e.getRootDeclaration(f);w===ri(f)?Xr(h,e.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer,e.declarationNameToString(f.name)):w.valueDeclaration&&w.valueDeclaration.pos>f.pos&&I.parent.locals&&c(I.parent.locals,w.escapedName,n)===w&&Xr(h,e.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(f.name),e.declarationNameToString(h))}}return l}if(i&&!(h&&(function(t,r,n){if(!e.isIdentifier(t)||t.escapedText!==r||nb(t)||Md(t))return!1;var i=e.getThisContainer(t,!1),a=i;for(;a;){if(e.isClassLike(a.parent)){var o=ri(a.parent);if(!o)break;if(vs(wa(o),r))return Xr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,bn(n),Pi(o)),!0;if(a===i&&!e.hasModifier(a,32))if(vs(ro(o).thisType,r))return Xr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,bn(n)),!0}a=a.parent}return!1}(h,r,a)||Dn(h)||function(t,r,n){var i=1920|(e.isInJSFile(t)?111551:0);if(n===i){var a=On(gn(t,r,788968&~i,void 0,void 0,!1)),o=t.parent;if(a){if(e.isQualifiedName(o)){e.Debug.assert(o.left===t,"Should only be resolving left side of qualified name as a namespace");var s=o.right.escapedText;if(vs(ro(a),s))return Xr(o,e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,e.unescapeLeadingUnderscores(r),e.unescapeLeadingUnderscores(s)),!0}return Xr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,e.unescapeLeadingUnderscores(r)),!0}}return!1}(h,r,n)||function(t,r,n){if(111551&n){if("any"===r||"string"===r||"number"===r||"boolean"===r||"never"===r)return Xr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,e.unescapeLeadingUnderscores(r)),!0;var i=On(gn(t,r,788544,void 0,void 0,!1));if(i&&!(1024&i.flags)){var a=function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(r)?e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here;return Xr(t,a,e.unescapeLeadingUnderscores(r)),!0}}return!1}(h,r,n)||function(t,r,n){if(111127&n){if(On(gn(t,r,1024,void 0,void 0,!1)))return Xr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_value,e.unescapeLeadingUnderscores(r)),!0}else if(788544&n){if(On(gn(t,r,1536,void 0,void 0,!1)))return Xr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_type,e.unescapeLeadingUnderscores(r)),!0}return!1}(h,r,n)||function(t,r,n){if(788584&n){var i=On(gn(t,r,111127,void 0,void 0,!1));if(i&&!(1920&i.flags))return Xr(t,e.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here,e.unescapeLeadingUnderscores(r)),!0}return!1}(h,r,n)))){var O=void 0;if(u&&Sr<Tr&&(O=km(g,r,n))){var M=Pi(O),L=Xr(h,u,bn(a),M);O.valueDeclaration&&e.addRelatedInfo(L,e.createDiagnosticForNode(O.valueDeclaration,e.Diagnostics._0_is_declared_here,M))}O||Xr(h,i,bn(a)),Sr++}}function hn(t,r){return 201!==t.kind&&200!==t.kind?e.isTypeQueryNode(t)||(e.isFunctionLikeDeclaration(t)||158===t.kind&&!e.hasModifier(t,32))&&(!r||r!==t.name):(!r||r!==t.name)&&(!(!t.asteriskToken&&!e.hasModifier(t,256))||!e.getImmediatelyInvokedFunctionExpression(t))}function vn(e){switch(e.kind){case 243:case 244:case 245:case 247:case 246:case 248:return!0;default:return!1}}function bn(t){return e.isString(t)?e.unescapeLeadingUnderscores(t):e.declarationNameToString(t)}function xn(t,r){for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(154===a.kind)if((e.isJSDocTemplateTag(a.parent)?e.getJSDocHost(a.parent):a.parent)===r)return!(e.isJSDocTemplateTag(a.parent)&&e.find(a.parent.parent.tags,e.isJSDocTypeAlias))}return!1}function Dn(t){var r=function t(r){switch(r.kind){case 75:case 193:return r.parent?t(r.parent):void 0;case 215:if(e.isEntityNameExpression(r.expression))return r.expression;default:return}}(t);return!(!r||!Kn(r,64,!0))&&(Xr(t,e.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements,e.getTextOfNode(r)),!0)}function Sn(t,r,n){return!!r&&!!e.findAncestor(t,(function(t){return t===n||e.isFunctionLike(t)?"quit":t===r}))}function Tn(e){switch(e.kind){case 252:return e;case 254:return e.parent;case 255:return e.parent.parent;case 257:return e.parent.parent.parent;default:return}}function En(t){return e.find(t.declarations,e.isAliasSymbolDeclaration)}function Cn(e,t,r){var n=e.exports.get("export=");return n?vs(wa(n),t):On(e.exports.get(t),r)}function kn(t){return e.isExportAssignment(t)&&!t.isExportEquals||e.hasModifier(t,512)||e.isExportSpecifier(t)}function Nn(t,r,n){if(!U)return!1;if(!t||t.isDeclarationFile){var i=Cn(r,"default",!0);return(!i||!e.some(i.declarations,kn))&&!Cn(r,e.escapeLeadingUnderscores("__esModule"),n)}return e.isSourceFileJS(t)?!t.externalModuleIndicator&&!Cn(r,e.escapeLeadingUnderscores("__esModule"),n):Hn(r)}function An(t,r,n){void 0===n&&(n=!1);var i=zn(t,t.moduleSpecifier),a=r.propertyName||r.name,o="default"===a.escapedText&&!(!K.allowSyntheticDefaultImports&&!K.esModuleInterop),s=Gn(i,t.moduleSpecifier,n,o);if(s&&a.escapedText){if(e.isShorthandAmbientModuleSymbol(i))return i;var c=void 0;c=i&&i.exports&&i.exports.get("export=")?vs(wa(s),a.escapedText):function(e,t){if(3&e.flags){var r=e.valueDeclaration.type;if(r)return On(vs(Yu(r),t))}}(s,a.escapedText),c=On(c,n);var u=function(e,t,r){if(1536&e.flags)return On(Qn(e).get(t),r)}(s,a.escapedText,n);!u&&U&&"default"===a.escapedText&&(u=Wn(i,n)||On(i,n));var l=u&&c&&u!==c?function(t,r){if(t===ge&&r===ge)return ge;if(790504&t.flags)return t;var n=en(t.flags|r.flags,t.escapedName);return n.declarations=e.deduplicate(e.concatenate(t.declarations,r.declarations),e.equateValues),n.parent=t.parent||r.parent,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),r.members&&(n.members=r.members),t.exports&&(n.exports=t.exports),n}(c,u):u||c;if(!l){var _=jn(i,t),d=e.declarationNameToString(a),p=Nm(a,s);if(void 0!==p){var f=Pi(p),m=Xr(a,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2,_,d,f);p.valueDeclaration&&e.addRelatedInfo(m,e.createDiagnosticForNode(p.valueDeclaration,e.Diagnostics._0_is_declared_here,f))}else i.exports&&i.exports.has("default")?Xr(a,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,_,d):Xr(a,e.Diagnostics.Module_0_has_no_exported_member_1,_,d)}return l}}function Fn(e,t,r){return e.parent.parent.moduleSpecifier?An(e.parent.parent,e,r):Kn(e.propertyName||e.name,t,!1,r)}function Pn(t,r){if(e.isClassExpression(t))return ky(t).symbol;if(e.isEntityName(t)||e.isEntityNameExpression(t)){var n=Kn(t,901119,!0,r);return n||(ky(t),dn(t).resolvedSymbol)}}function wn(t,r){switch(void 0===r&&(r=!1),t.kind){case 252:return function(t,r){return 263===t.moduleReference.kind?Wn(zn(t,e.getExternalModuleImportEqualsDeclarationExpression(t))):Bn(t.moduleReference,r)}(t,r);case 254:return function(t,r){var n=zn(t,t.parent.moduleSpecifier);if(n){var i=void 0;i=e.isShorthandAmbientModuleSymbol(n)?n:Cn(n,"default",r);var a=Nn(e.find(n.declarations,e.isSourceFile),n,r);if(i||a){if(a)return Wn(n,r)||On(n,r)}else if(Hn(n)){var o=z>=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop",s=n.exports.get("export=").valueDeclaration,c=Xr(t.name,e.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag,Pi(n),o);e.addRelatedInfo(c,e.createDiagnosticForNode(s,e.Diagnostics.This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,o))}else n.exports&&n.exports.has(t.symbol.escapedName)?Xr(t.name,e.Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Pi(n),Pi(t.symbol)):Xr(t.name,e.Diagnostics.Module_0_has_no_default_export,Pi(n));return i}}(t,r);case 255:return function(e,t){var r=e.parent.parent.moduleSpecifier;return Gn(zn(e,r),r,t,!1)}(t,r);case 257:return function(e,t){return An(e.parent.parent.parent,e,t)}(t,r);case 261:return Fn(t,901119,r);case 258:case 208:return function(t,r){return Pn(e.isExportAssignment(t)?t.expression:t.right,r)}(t,r);case 251:return function(e,t){return Wn(e.parent.symbol,t)}(t,r);case 280:return Kn(t.name,901119,!0,r);case 279:return function(e,t){return Pn(e.initializer,t)}(t,r);case 193:return function(t,r){if(e.isBinaryExpression(t.parent)&&t.parent.left===t&&62===t.parent.operatorToken.kind)return Pn(t.parent.right,r)}(t,r);default:return e.Debug.fail()}}function In(e,t){return void 0===t&&(t=901119),!!e&&(2097152==(e.flags&(2097152|t))||!!(2097152&e.flags&&67108864&e.flags))}function On(e,t){return!t&&In(e)?Mn(e):e}function Mn(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=_n(t);if(r.target)r.target===ye&&(r.target=ge);else{r.target=ye;var n=En(t);if(!n)return e.Debug.fail();var i=wn(n);r.target===ye?r.target=i||ge:Xr(n,e.Diagnostics.Circular_definition_of_import_alias_0,Pi(t))}return r.target}function Ln(e){var t=ri(e),r=Mn(t);r&&((r===ge||111551&r.flags&&!Cb(r))&&Rn(t))}function Rn(t){var r=_n(t);if(!r.referenced){r.referenced=!0;var n=En(t);if(!n)return e.Debug.fail();if(e.isInternalModuleImportEqualsDeclaration(n)){var i=On(t);(i===ge||111551&i.flags)&&ky(n.moduleReference)}}}function Bn(t,r){return 75===t.kind&&e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),75===t.kind||152===t.parent.kind?Kn(t,1920,!1,r):(e.Debug.assert(252===t.parent.kind),Kn(t,901119,!1,r))}function jn(e,t){return e.parent?jn(e.parent,t)+"."+Pi(e):Pi(e,t,void 0,20)}function Kn(t,r,n,i,a){if(!e.nodeIsMissing(t)){var o,s=1920|(e.isInJSFile(t)?111551&r:0);if(75===t.kind){var c=r===s?e.Diagnostics.Cannot_find_namespace_0:Id(e.getFirstIdentifier(t)),u=e.isInJSFile(t)?function(t,r){if(Dc(t.parent)){var n=function(t){if(e.findAncestor(t,(function(t){return e.isJSDocNode(t)||4194304&t.flags?e.isJSDocTypeAlias(t):"quit"})))return;var r=e.getJSDocHost(t);if(e.isExpressionStatement(r)&&e.isBinaryExpression(r.expression)&&3===e.getAssignmentDeclarationKind(r.expression)){if(i=ri(r.expression.left))return Jn(i)}if((e.isObjectLiteralMethod(r)||e.isPropertyAssignment(r))&&e.isBinaryExpression(r.parent.parent)&&6===e.getAssignmentDeclarationKind(r.parent.parent)){if(i=ri(r.parent.parent.left))return Jn(i)}var n=e.getHostSignatureFromJSDocHost(r);if(n){var i;return(i=ri(n))&&i.valueDeclaration}}(t.parent);if(n)return gn(n,t.escapedText,r,void 0,t,!0)}}(t,r):void 0;if(!(o=gn(a||t,t.escapedText,r,n||u?void 0:c,t,!0)))return u}else{if(152!==t.kind&&193!==t.kind)throw e.Debug.assertNever(t,"Unknown entity name kind.");var l=152===t.kind?t.left:t.expression,_=152===t.kind?t.right:t.name,d=Kn(l,s,n,!1,a);if(!d||e.nodeIsMissing(_))return;if(d===ge)return d;if(e.isInJSFile(t)&&d.valueDeclaration&&e.isVariableDeclaration(d.valueDeclaration)&&d.valueDeclaration.initializer&&Ag(d.valueDeclaration.initializer)){var p=d.valueDeclaration.initializer.arguments[0],f=zn(p,p);if(f){var m=Wn(f);m&&(d=m)}}if(!(o=fn(Qn(d),_.escapedText,r)))return void(n||Xr(_,e.Diagnostics.Namespace_0_has_no_exported_member_1,jn(d),e.declarationNameToString(_)))}return e.Debug.assert(0==(1&e.getCheckFlags(o)),"Should never get an instantiated symbol here."),o.flags&r||i?o:Mn(o)}}function Jn(t){var r=t.parent.valueDeclaration;if(r)return(e.isAssignmentDeclaration(r)?e.getAssignedExpandoInitializer(r):e.hasOnlyExpressionInitializer(r)?e.getDeclaredExpandoInitializer(r):void 0)||r}function zn(t,r,n){return Un(t,r,n?void 0:e.Diagnostics.Cannot_find_module_0)}function Un(t,r,n,i){return void 0===i&&(i=!1),e.isStringLiteralLike(r)?Vn(t,r.text,n,r,i):void 0}function Vn(t,r,i,a,o){(void 0===o&&(o=!1),e.startsWith(r,"@types/"))&&Xr(a,e.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,e.removePrefix(r,"@types/"),r);var s=Fs(r,!0);if(s)return s;var c=e.getSourceFileOfNode(t),u=e.getResolvedModule(c,r),l=u&&e.getResolutionDiagnostic(K,u),_=u&&!l&&n.getSourceFile(u.resolvedFileName);if(_)return _.symbol?(u.isExternalLibraryImport&&!e.resolutionExtensionIsTSOrJson(u.extension)&&qn(!1,a,u,r),ti(_.symbol)):void(i&&Xr(a,e.Diagnostics.File_0_is_not_a_module,_.fileName));if(ot){var d=e.findBestPatternMatch(ot,(function(e){return e.pattern}),r);if(d){var p=st&&st.get(r);return ti(p?p:d.symbol)}}if(u&&!e.resolutionExtensionIsTSOrJson(u.extension)&&void 0===l||l===e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type)o?Xr(a,e.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,r,u.resolvedFileName):qn(H&&!!i,a,u,r);else if(i){if(u){var f=n.getProjectReferenceRedirect(u.resolvedFileName);if(f)return void Xr(a,e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,f,u.resolvedFileName)}if(l)Xr(a,l,r,u.resolvedFileName);else{var m=e.tryExtractTSExtension(r);if(m)Xr(a,e.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead,m,e.removeExtension(r,m));else!K.resolveJsonModule&&e.fileExtensionIs(r,".json")&&e.getEmitModuleResolutionKind(K)===e.ModuleResolutionKind.NodeJs&&e.hasJsonModuleEmitEnabled(K)?Xr(a,e.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,r):Xr(a,i,r)}}}function qn(t,r,n,i){var a,o=n.packageId,s=n.resolvedFileName,c=!e.isExternalModuleNameRelative(i)&&o?(a=o.name,p().has(e.getTypesPackageName(a))?e.chainDiagnosticMessages(void 0,e.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,o.name,e.mangleScopedPackageName(o.name)):e.chainDiagnosticMessages(void 0,e.Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,i,e.mangleScopedPackageName(o.name))):void 0;$r(t,r,e.chainDiagnosticMessages(c,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,i,s))}function Wn(t,r){if(t){var n=function(t,r){if(!t||t===ge||t===r||1===r.exports.size||2097152&t.flags)return t;var n=_n(t);if(n.cjsExportMerged)return n.cjsExportMerged;var i=33554432&t.flags?t:an(t);i.flags=512|i.flags,void 0===i.exports&&(i.exports=e.createSymbolTable());return r.exports.forEach((function(e,t){"export="!==t&&i.exports.set(t,i.exports.has(t)?on(i.exports.get(t),e):e)})),_n(i).cjsExportMerged=i,n.cjsExportMerged=i}(ti(On(t.exports.get("export="),r)),ti(t));return ti(n)||t}}function Gn(t,r,n,i){var a=Wn(t,n);if(!n&&a){if(!(i||1539&a.flags||e.getDeclarationOfKind(a,288))){var o=z>=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop";return Xr(r,e.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,o),a}if(K.esModuleInterop){var s=r.parent;if(e.isImportDeclaration(s)&&e.getNamespaceDeclarationNode(s)||e.isImportCall(s)){var c=wa(a),u=bs(c,0);if(u&&u.length||(u=bs(c,1)),u&&u.length){var l=Ng(c,a,t),_=en(a.flags,a.escapedName);_.declarations=a.declarations?a.declarations.slice():[],_.parent=a.parent,_.target=a,_.originatingImport=s,a.valueDeclaration&&(_.valueDeclaration=a.valueDeclaration),a.constEnumOnlyModule&&(_.constEnumOnlyModule=!0),a.members&&(_.members=e.cloneMap(a.members)),a.exports&&(_.exports=e.cloneMap(a.exports));var d=Qo(l);return _.type=hi(_,d.members,e.emptyArray,e.emptyArray,d.stringIndexInfo,d.numberIndexInfo),_}}}}return a}function Hn(e){return void 0!==e.exports.get("export=")}function Yn(e){return Ns($n(e))}function Xn(e,t){var r=$n(t);if(r)return r.get(e)}function Qn(e){return 6256&e.flags?vo(e,"resolvedExports"):1536&e.flags?$n(e):e.exports||B}function $n(e){var t=_n(e);return t.resolvedExports||(t.resolvedExports=ei(e))}function Zn(t,r,n,i){r&&r.forEach((function(r,a){if("default"!==a){var o=t.get(a);if(o){if(n&&i&&o&&On(o)!==On(r)){var s=n.get(a);s.exportsWithDuplicate?s.exportsWithDuplicate.push(i):s.exportsWithDuplicate=[i]}}else t.set(a,r),n&&i&&n.set(a,{specifierText:e.getTextOfNode(i.moduleSpecifier)})}}))}function ei(t){var r=[];return function t(n){if(!(n&&n.exports&&e.pushIfUnique(r,n)))return;var i=e.cloneMap(n.exports);var a=n.exports.get("__export");if(a){for(var o=e.createSymbolTable(),s=e.createMap(),c=0,u=a.declarations;c<u.length;c++){var l=u[c],_=zn(l,l.moduleSpecifier),d=t(_);Zn(o,d,s,l)}s.forEach((function(t,r){var n=t.exportsWithDuplicate;if("export="!==r&&n&&n.length&&!i.has(r))for(var a=0,o=n;a<o.length;a++){var c=o[a];jr.add(e.createDiagnosticForNode(c,e.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,s.get(r).specifierText,e.unescapeLeadingUnderscores(r)))}})),Zn(i,o)}return i}(t=Wn(t))||B}function ti(e){var t;return e&&e.mergeId&&(t=Er[e.mergeId])?t:e}function ri(e){return ti(e.symbol&&xo(e.symbol))}function ni(e){return ti(e.parent&&xo(e.parent))}function ii(t,r){var i=ni(t);if(i&&!(262144&t.flags)){var a=e.mapDefined(i.declarations,(function(e){var t=Ci(e),r=t&&t.exports&&t.exports.get("export=");return r&&i&&oi(r,i)?t:void 0})),o=r&&function(t,r){var i,a=e.getSourceFileOfNode(r),o=""+N(a),s=_n(t);if(s.extendedContainersByFile&&(i=s.extendedContainersByFile.get(o)))return i;if(a&&a.imports){for(var c=0,u=a.imports;c<u.length;c++){var l=u[c];if(!e.nodeIsSynthesized(l)){var _=zn(r,l,!0);if(_)ai(_,t)&&(i=e.append(i,_))}}if(e.length(i))return(s.extendedContainersByFile||(s.extendedContainersByFile=e.createMap())).set(o,i),i}if(s.extendedContainers)return s.extendedContainers;for(var d=0,p=n.getSourceFiles();d<p.length;d++){var f=p[d];if(e.isExternalModule(f)){var m=ri(f);ai(m,t)&&(i=e.append(i,m))}}return s.extendedContainers=i||e.emptyArray}(t,r);if(r&&xi(i,r,1920,!1))return e.concatenate(e.concatenate([i],a),o);var s=e.append(a,i);return e.concatenate(s,o)}var c=e.mapDefined(t.declarations,(function(t){return!e.isAmbientModule(t)&&t.parent&&Ni(t.parent)?ri(t.parent):e.isClassExpression(t)&&e.isBinaryExpression(t.parent)&&62===t.parent.operatorToken.kind&&e.isAccessExpression(t.parent.left)&&e.isEntityNameExpression(t.parent.left.expression)?e.isModuleExportsAccessExpression(t.parent.left)||e.isExportsIdentifier(t.parent.left.expression)?ri(e.getSourceFileOfNode(t)):(ky(t.parent.left.expression),dn(t.parent.left.expression).resolvedSymbol):void 0}));if(e.length(c))return e.mapDefined(c,(function(e){return ai(e,t)?e:void 0}))}function ai(t,r){if(t===ni(r))return r;var n=t.exports&&t.exports.get("export=");if(n&&oi(n,r))return t;var i=Qn(t),a=i.get(r.escapedName);return a&&oi(a,r)?a:e.forEachEntry(i,(function(e){if(oi(e,r))return e}))}function oi(e,t){if(ti(On(ti(e)))===ti(On(ti(t))))return e}function si(e){return ti(e&&0!=(1048576&e.flags)?e.exportSymbol:e)}function ci(e){return!!(111551&e.flags||2097152&e.flags&&111551&Mn(e).flags)}function ui(t){for(var r=0,n=t.members;r<n.length;r++){var i=n[r];if(161===i.kind&&e.nodeIsPresent(i.body))return i}}function li(e){var t=new g(oe,e);return h++,t.id=h,t}function _i(e,t,r){void 0===r&&(r=0);var n=li(e);return n.intrinsicName=t,n.objectFlags=r,n}function di(e){var t=Qc(e);return t.flags|=16,t.intrinsicName="boolean",t}function pi(e,t){var r=li(524288);return r.objectFlags=e,r.symbol=t,r.members=void 0,r.properties=void 0,r.callSignatures=void 0,r.constructSignatures=void 0,r.stringIndexInfo=void 0,r.numberIndexInfo=void 0,r}function fi(e){var t=li(262144);return e&&(t.symbol=e),t}function mi(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)}function gi(t){var r;return t.forEach((function(e,t){!mi(t)&&ci(e)&&(r||(r=[])).push(e)})),r||e.emptyArray}function yi(t,r,n,i,a,o){return t.members=r,t.properties=r===B?e.emptyArray:gi(r),t.callSignatures=n,t.constructSignatures=i,t.stringIndexInfo=a,t.numberIndexInfo=o,t}function hi(e,t,r,n,i,a){return yi(pi(16,e),t,r,n,i,a)}function vi(t,r){for(var n,i=function(t){if(t.locals&&!pn(t)&&(n=r(t.locals)))return{value:n};switch(t.kind){case 288:if(!e.isExternalOrCommonJsModule(t))break;case 248:var i=ri(t);if(n=r(i.exports||B))return{value:n};break;case 244:case 213:case 245:var a;if((ri(t).members||B).forEach((function(t,r){788968&t.flags&&(a||(a=e.createSymbolTable())).set(r,t)})),a&&(n=r(a)))return{value:n}}},a=t;a;a=a.parent){var o=i(a);if("object"===f(o))return o.value}return r(ee)}function bi(e){return 111551===e?111551:1920}function xi(t,r,n,i,a){if(void 0===a&&(a=e.createMap()),t&&!function(e){if(e.declarations&&e.declarations.length){for(var t=0,r=e.declarations;t<r.length;t++){switch(r[t].kind){case 158:case 160:case 162:case 163:continue;default:return!1}}return!0}return!1}(t)){var o=""+A(t),s=a.get(o);return s||a.set(o,s=[]),vi(r,c)}function c(a,o){if(e.pushIfUnique(s,a)){var _=function(a,o){if(l(a.get(t.escapedName),void 0,o))return[t];return e.forEachEntry(a,(function(a){if(2097152&a.flags&&"export="!==a.escapedName&&"default"!==a.escapedName&&!(e.isUMDExportSymbol(a)&&r&&e.isExternalModule(e.getSourceFileOfNode(r)))&&(!i||e.some(a.declarations,e.isExternalModuleImportEqualsDeclaration))&&(o||!e.getDeclarationOfKind(a,261))){var s=Mn(a);if(l(a,s,o))return[a];var _=Qn(s),d=_&&c(_,!0);if(d&&u(a,bi(n)))return[a].concat(d)}if(a.escapedName===t.escapedName&&a.exportSymbol&&l(ti(a.exportSymbol),void 0,o))return[t]}))}(a,o);return s.pop(),_}}function u(e,t){return!Di(e,r,t)||!!xi(e.parent,r,bi(t),i,a)}function l(r,i,a){return(t===(i||r)||ti(t)===ti(i||r))&&!e.some(r.declarations,Ni)&&(a||u(ti(r),n))}}function Di(t,r,n){var i=!1;return vi(r,(function(r){var a=ti(r.get(t.escapedName));return!!a&&(a===t||!!((a=2097152&a.flags&&!e.getDeclarationOfKind(a,261)?Mn(a):a).flags&n)&&(i=!0,!0))})),i}function Si(e,t){return 0===Ei(e,t,788968,!1).accessibility}function Ti(e,t){return 0===Ei(e,t,111551,!1).accessibility}function Ei(t,r,n,i){if(t&&r){var a=function t(r,n,i,a,o){if(e.length(r)){for(var s,c=0,u=r;c<u.length;c++){var l=u[c],_=xi(l,n,a,!1);if(_){s=l;var d=Ai(_[0],o);if(d)return d}else if(e.some(l.declarations,Ni))return{accessibility:0};var p=ii(l,n),f=e.first(l.declarations);!e.length(p)&&111551&a&&f&&e.isObjectLiteralExpression(f)&&f.parent&&e.isVariableDeclaration(f.parent)&&f===f.parent.initializer&&(p=[ri(f.parent)]);var m=t(p,n,i,i===l?bi(a):a,o);if(m)return m}return s?{accessibility:1,errorSymbolName:Pi(i,n,a),errorModuleName:s!==i?Pi(s,n,1920):void 0}:void 0}}([t],r,t,n,i);if(a)return a;var o=e.forEach(t.declarations,Ci);if(o)if(o!==Ci(r))return{accessibility:2,errorSymbolName:Pi(t,r,n),errorModuleName:Pi(o)};return{accessibility:1,errorSymbolName:Pi(t,r,n)}}return{accessibility:0}}function Ci(t){var r=e.findAncestor(t,ki);return r&&ri(r)}function ki(t){return e.isAmbientModule(t)||288===t.kind&&e.isExternalOrCommonJsModule(t)}function Ni(t){return e.isModuleWithStringLiteralName(t)||288===t.kind&&e.isExternalOrCommonJsModule(t)}function Ai(t,r){var n;if(e.every(e.filter(t.declarations,(function(e){return 75!==e.kind})),(function(t){if(!Ui(t)){var r=Tn(t);return r&&!e.hasModifier(r,1)&&Ui(r.parent)?i(t,r):e.isVariableDeclaration(t)&&e.isVariableStatement(t.parent.parent)&&!e.hasModifier(t.parent.parent,1)&&Ui(t.parent.parent.parent)?i(t,t.parent.parent):!(!e.isLateVisibilityPaintedStatement(t)||e.hasModifier(t,1)||!Ui(t.parent))&&i(t,t)}return!0})))return{accessibility:0,aliasesToMakeVisible:n};function i(t,i){return r&&(dn(t).isVisible=!0,n=e.appendIfUnique(n,i)),!0}}function Fi(t,r){var n;n=171===t.parent.kind||e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)||153===t.parent.kind?1160127:152===t.kind||193===t.kind||252===t.parent.kind?1920:788968;var i=e.getFirstIdentifier(t),a=gn(r,i.escapedText,n,void 0,void 0,!1);return a&&Ai(a,!0)||{accessibility:1,errorSymbolName:e.getTextOfNode(i),errorNode:i}}function Pi(t,r,n,i,a){void 0===i&&(i=4);var o=70221824;2&i&&(o|=128),1&i&&(o|=512),8&i&&(o|=16384),16&i&&(o|=134217728);var s=4&i?Z.symbolToExpression:Z.symbolToEntityName;return a?c(a).getText():e.usingSingleLineStringWriter(c);function c(i){var a=s(t,n,r,o),c=e.createPrinter({removeComments:!0}),u=r&&e.getSourceFileOfNode(r);return c.writeNode(4,a,u,i),i}}function wi(t,r,n,i,a){return void 0===n&&(n=0),a?o(a).getText():e.usingSingleLineStringWriter(o);function o(a){var o;o=262144&n?1===i?170:169:1===i?165:164;var s=Z.signatureToSignatureDeclaration(t,o,r,70222336|Li(n)),c=e.createPrinter({removeComments:!0,omitTrailingSemicolon:!0}),u=r&&e.getSourceFileOfNode(r);return c.writeNode(4,s,u,e.getTrailingSemicolonDeferringWriter(a)),a}}function Ii(t,r,n,i){void 0===n&&(n=1064960),void 0===i&&(i=e.createTextWriter(""));var a=K.noErrorTruncation||1&n,o=Z.typeToTypeNode(t,r,70221824|Li(n)|(a?1:0),i);if(void 0===o)return e.Debug.fail("should always get typenode");var s=e.createPrinter({removeComments:!0}),c=r&&e.getSourceFileOfNode(r);s.writeNode(4,o,c,i);var u=i.getText(),l=a?void 0:2*e.defaultMaximumTruncationLength;return l&&u&&u.length>=l?u.substr(0,l-"...".length)+"...":u}function Oi(e,t){var r=Mi(e.symbol)?Ii(e,e.symbol.valueDeclaration):Ii(e),n=Mi(t.symbol)?Ii(t,t.symbol.valueDeclaration):Ii(t);return r===n&&(r=Ii(e,void 0,64),n=Ii(t,void 0,64)),[r,n]}function Mi(t){return t&&t.valueDeclaration&&e.isExpression(t.valueDeclaration)&&!bl(t.valueDeclaration)}function Li(e){return void 0===e&&(e=0),9469291&e}function Ri(t,r,n,i){return void 0===n&&(n=16384),i?a(i).getText():e.usingSingleLineStringWriter(a);function a(i){var a=e.createTypePredicateNodeWithModifier(2===t.kind||3===t.kind?e.createToken(123):void 0,1===t.kind||3===t.kind?e.createIdentifier(t.parameterName):e.createThisTypeNode(),t.type&&Z.typeToTypeNode(t.type,r,70222336|Li(n))),o=e.createPrinter({removeComments:!0}),s=r&&e.getSourceFileOfNode(r);return o.writeNode(4,a,s,i),i}}function Bi(e){return 8===e?"private":16===e?"protected":"public"}function ji(t){return t&&t.parent&&249===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function Ki(t){return 288===t.kind||e.isAmbientModule(t)}function Ji(t,r){var n=t.nameType;if(n){if(384&n.flags){var i=""+n.value;return e.isIdentifierText(i,K.target)||Mf(i)?Mf(i)&&e.startsWith(i,"-")?"["+i+"]":i:'"'+e.escapeString(i,34)+'"'}if(8192&n.flags)return"["+zi(n.symbol,r)+"]"}}function zi(t,r){if(r&&"default"===t.escapedName&&!(16384&r.flags)&&(!(16777216&r.flags)||!t.declarations||r.enclosingDeclaration&&e.findAncestor(t.declarations[0],Ki)!==e.findAncestor(r.enclosingDeclaration,Ki)))return"default";if(t.declarations&&t.declarations.length){var n=e.firstDefined(t.declarations,(function(t){return e.getNameOfDeclaration(t)?t:void 0})),i=n&&e.getNameOfDeclaration(n);if(n&&i){if(e.isCallExpression(n)&&e.isBindableObjectDefinePropertyCall(n))return e.symbolName(t);if(e.isComputedPropertyName(i)&&!(4096&e.getCheckFlags(t))&&t.nameType&&384&t.nameType.flags){var a=Ji(t,r);if(void 0!==a)return a}return e.declarationNameToString(i)}if(n||(n=t.declarations[0]),n.parent&&241===n.parent.kind)return e.declarationNameToString(n.parent.name);switch(n.kind){case 213:case 200:case 201:return!r||r.encounteredError||131072&r.flags||(r.encounteredError=!0),213===n.kind?"(Anonymous class)":"(Anonymous function)"}}var o=Ji(t,r);return void 0!==o?o:e.symbolName(t)}function Ui(t){if(t){var r=dn(t);return void 0===r.isVisible&&(r.isVisible=!!function(){switch(t.kind){case 308:case 315:case 309:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&e.isSourceFile(t.parent.parent.parent));case 190:return Ui(t.parent.parent);case 241:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 248:case 244:case 245:case 246:case 243:case 247:case 252:if(e.isExternalModuleAugmentation(t))return!0;var r=Yi(t);return 1&e.getCombinedModifierFlags(t)||252!==t.kind&&288!==r.kind&&8388608&r.flags?Ui(r):pn(r);case 158:case 157:case 162:case 163:case 160:case 159:if(e.hasModifier(t,24))return!1;case 161:case 165:case 164:case 166:case 155:case 249:case 169:case 170:case 172:case 168:case 173:case 174:case 177:case 178:case 181:return Ui(t.parent);case 254:case 255:case 257:return!1;case 154:case 288:case 251:return!0;case 258:default:return!1}}()),r.isVisible}return!1}function Vi(t,r){var n,i,a;return t.parent&&258===t.parent.kind?n=gn(t,t.escapedText,2998271,void 0,t,!1):261===t.parent.kind&&(n=Fn(t.parent,2998271)),n&&((a=e.createMap()).set(""+A(n),!0),function t(n){e.forEach(n,(function(n){var o=Tn(n)||n;if(r?dn(n).isVisible=!0:(i=i||[],e.pushIfUnique(i,o)),e.isInternalModuleImportEqualsDeclaration(n)){var s=n.moduleReference,c=gn(n,e.getFirstIdentifier(s).escapedText,901119,void 0,void 0,!1),u=c&&""+A(c);c&&!a.has(u)&&(a.set(u,!0),t(c.declarations))}}))}(n.declarations)),i}function qi(e,t){var r=Wi(e,t);if(r>=0){for(var n=br.length,i=r;i<n;i++)xr[i]=!1;return!1}return br.push(e),xr.push(!0),Dr.push(t),!0}function Wi(e,t){for(var r=br.length-1;r>=0;r--){if(Gi(br[r],Dr[r]))return-1;if(br[r]===e&&Dr[r]===t)return r}return-1}function Gi(t,r){switch(r){case 0:return!!_n(t).type;case 5:return!!dn(t).resolvedEnumType;case 2:return!!_n(t).declaredType;case 1:return!!t.resolvedBaseConstructorType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint;case 6:return!!_n(t).resolvedJSDocType;case 7:return!!t.resolvedTypeArguments}return e.Debug.assertNever(r)}function Hi(){return br.pop(),Dr.pop(),xr.pop()}function Yi(t){return e.findAncestor(e.getRootDeclaration(t),(function(e){switch(e.kind){case 241:case 242:case 257:case 256:case 255:case 254:return!1;default:return!0}})).parent}function Xi(e,t){var r=vs(e,t);return r?wa(r):void 0}function Qi(e){return e&&0!=(1&e.flags)}function $i(e){var t=ri(e);return t&&_n(t).type||ua(e,!1)}function Zi(t){return 153===t.kind&&!e.isStringOrNumericLiteralLike(t.expression)}function ea(t,r,n){if(131072&(t=_p(t,(function(e){return!(98304&e.flags)}))).flags)return Ge;if(1048576&t.flags)return pp(t,(function(e){return ea(e,r,n)}));var i=Qc(e.map(r,ou));if(gu(t)||yu(i)){if(131072&i.flags)return t;var a=Ut||(Ut=Ac("Omit",524288,e.Diagnostics.Cannot_find_global_type_0));return a?fc(a,[t,i]):xe}for(var o=e.createSymbolTable(),s=0,c=ts(t);s<c.length;s++){var u=c[s];Fl(su(u,8576),i)||24&e.getDeclarationModifierFlagsFromSymbol(u)||!ju(u)||o.set(u.escapedName,Ku(u,!1))}var l=Ts(t,0),_=Ts(t,1);return hi(n,o,e.emptyArray,e.emptyArray,l,_)}function ta(e,t){var r=ra(e);return r?Op(r,t):t}function ra(t){var r=function(e){var t=e.parent.parent;switch(t.kind){case 190:case 279:return ra(t);case 191:return ra(e.parent);case 241:return t.initializer;case 208:return t.right}}(t);if(r&&r.flowNode){var n=function(e){var t=e.parent;if(190===e.kind&&188===t.kind)return na(e.propertyName||e.name);if(279===e.kind||280===e.kind)return na(e.name);return""+t.elements.indexOf(e)}(t);if(n){var i=e.createNode(194,t.pos,t.end);i.parent=t,i.expression=r;var a=e.createNode(10,t.pos,t.end);return a.parent=i,a.text=n,i.argumentExpression=a,i.flowNode=r.flowNode,i}}}function na(e){var t=ou(e);return 384&t.flags?""+t.value:void 0}function ia(t){var r,n=t.parent,i=$i(n.parent);if(!i||Qi(i))return i;if(V&&8388608&t.flags&&e.isParameterDeclaration(t)&&(i=U_(i)),188===n.kind)if(t.dotDotDotToken){if(2&i.flags||!Kf(i))return Xr(t,e.Diagnostics.Rest_types_may_only_be_created_from_object_types),xe;for(var a=[],o=0,s=n.elements;o<s.length;o++){var c=s[o];c.dotDotDotToken||a.push(c.propertyName||c.name)}r=ea(i,a,t.symbol)}else{var u=t.propertyName||t.name;r=ta(t,Jp(Su(i,d=ou(u),u),t.name))}else{var l=Zh(65,i,Se,n),_=n.elements.indexOf(t);if(t.dotDotDotToken)r=lp(i,w_)?pp(i,(function(e){return Vc(e,_)})):jc(l);else if(b_(i)){var d=Wu(_),p=Af(t)?8:0;r=ta(t,Jp(Tu(i,d,t.name,p)||xe,t.name))}else r=l}return t.initializer?e.getEffectiveTypeAnnotationNode(e.walkUpBindingElementsAndPatterns(t))?!V||32768&R_(Ay(t))?r:Hd(r,524288):Qc([Hd(r,524288),Ay(t)],2):r}function aa(t){var r=e.getJSDocType(t);if(r)return Yu(r)}function oa(t){var r=e.skipParentheses(t);return 191===r.kind&&0===r.elements.length}function sa(e,t){return void 0===t&&(t=!0),V&&t?z_(e):e}function ca(e){return 155===e.kind&&(200===e.parent.kind||201===e.parent.kind)&&!!xf(e.parent)}function ua(t,r){if(e.isVariableDeclaration(t)&&230===t.parent.parent.kind){var n=lu(dm(zy(t.parent.parent.expression)));return 4456448&n.flags?_u(n):Ne}if(e.isVariableDeclaration(t)&&231===t.parent.parent.kind){var i=t.parent.parent;return $h(i.expression,i.awaitModifier)||he}if(e.isBindingPattern(t.parent))return ia(t);var a=r&&(e.isParameter(t)&&As(t)||!e.isBindingElement(t)&&!e.isVariableDeclaration(t)&&!!t.questionToken),o=xa(t);if(o)return sa(o,a);if((H||e.isInJSFile(t))&&241===t.kind&&!e.isBindingPattern(t.name)&&!(1&e.getCombinedModifierFlags(t))&&!(8388608&t.flags)){if(!(2&e.getCombinedNodeFlags(t))&&(!t.initializer||function(t){var r=e.skipParentheses(t);return 99===r.kind||75===r.kind&&Od(r)===te}(t.initializer)))return ve;if(t.initializer&&oa(t.initializer))return bt}if(155===t.kind){var s,c=t.parent;if(163===c.kind&&!go(c)){var u=e.getDeclarationOfKind(ri(t.parent),162);if(u){var l=Ls(u),_=lx(c);return _&&t===_?(e.Debug.assert(!_.type),wa(l.thisParameter)):zs(l)}}if(e.isInJSFile(t)){var d=e.getJSDocType(c);if(d&&e.isFunctionTypeNode(d))return Mg(Ls(d),c.parameters.indexOf(t))}if(s="this"===t.symbol.escapedName?tf(c):rf(t,!0))return sa(s,a)}else if(e.isInJSFile(t)){var p=_a(t,ri(t),e.getDeclaredExpandoInitializer(t));if(p)return p}return t.initializer&&!ca(t)?sa(s=Ay(t),a):e.isJsxAttribute(t)?Ie:e.isBindingPattern(t.name)&&!ca(t)?ya(t.name,!1,!0):void 0}function la(t,r){var n=e.getAssignedExpandoInitializer(t.valueDeclaration);if(n){var i=e.getJSDocTypeTag(n);return i&&i.typeExpression?Yu(i.typeExpression):_a(t.valueDeclaration,t,n)||N_(ky(n))}for(var a,o,s=!1,c=!1,u=0,l=t.declarations;u<l.length;u++){var _=l[u],d=e.isBinaryExpression(_)||e.isCallExpression(_)?_:e.isAccessExpression(_)?e.isBinaryExpression(_.parent)?_.parent:_:void 0;if(d){var p=e.isAccessExpression(d)?e.getAssignmentDeclarationPropertyAccessKind(d):e.getAssignmentDeclarationKind(d);4===p&&(fa(d)?s=!0:c=!0),e.isCallExpression(d)||(a=da(a,d,t,_)),a||(o||(o=[])).push(e.isBinaryExpression(d)||e.isCallExpression(d)?pa(t,r,d,p):Be)}}var f=a;if(!f){if(!e.length(o))return xe;var m=s?function(t,r){return e.Debug.assert(t.length===r.length),t.filter((function(t,n){var i=r[n],a=e.isBinaryExpression(i)?i:e.isBinaryExpression(i.parent)?i.parent:void 0;return a&&fa(a)}))}(o,t.declarations):void 0;if(c){var g=function(t){var r=e.forEach(t.declarations,(function(t){var r=e.getThisContainer(t,!1).parent;return e.isClassLike(r)&&r}));if(r){var n=ro(ri(r)),i=n&&Wa(n)[0];if(i)return Xi(i,t.escapedName)}}(t);g&&((m||(m=[])).push(g),s=!0)}f=Qc(e.some(m,(function(e){return!!(-98305&e.flags)}))?m:o,2)}var y=rd(sa(f,c&&!s));return _p(y,(function(e){return!!(-98305&e.flags)}))===Be?(id(t.valueDeclaration,he),he):y}function _a(t,r,n){if(e.isInJSFile(t)&&n&&e.isObjectLiteralExpression(n)&&!n.properties.length){for(var i=e.createSymbolTable();e.isBinaryExpression(t)||e.isPropertyAccessExpression(t);){var a=ri(t);a&&e.hasEntries(a.exports)&&un(i,a.exports),t=e.isBinaryExpression(t)?t.parent:t.parent.parent}var o=ri(t);o&&e.hasEntries(o.exports)&&un(i,o.exports);var s=hi(r,i,e.emptyArray,e.emptyArray,void 0,void 0);return s.objectFlags|=16384,s}}function da(t,r,n,i){var a=e.getEffectiveTypeAnnotationNode(r.parent);if(a){var o=rd(Yu(a));if(!t)return o;t===xe||o===xe||El(t,o)||Uh(void 0,t,i,o)}if(n.parent){var s=e.getEffectiveTypeAnnotationNode(n.parent.valueDeclaration);if(s)return Xi(Yu(s),n.escapedName)}return t}function pa(t,r,n,i){if(e.isCallExpression(n)){if(r)return wa(r);var a=ky(n.arguments[2]),o=Xi(a,"value");if(o)return o;var s=Xi(a,"get");if(s){var c=qm(s);if(c)return zs(c)}var u=Xi(a,"set");if(u){var l=qm(u);if(l)return Ug(l)}return he}var _=r?wa(r):N_(ky(n.right));if(524288&_.flags&&2===i&&"export="===t.escapedName){var d=Qo(_),p=e.createSymbolTable();e.copyEntries(d.members,p),r&&!r.exports&&(r.exports=e.createSymbolTable()),(r||t).exports.forEach((function(e,t){if(p.has(t)){var r=d.members.get(t),n=en(e.flags|r.flags,t);n.type=Qc([wa(e),wa(r)]),p.set(t,n)}else p.set(t,e)}));var f=hi(d.symbol,p,d.callSignatures,d.constructSignatures,d.stringIndexInfo,d.numberIndexInfo);return f.objectFlags|=16384&e.getObjectFlags(_),f}return x_(_)?(id(n,vt),vt):_}function fa(t){var r=e.getThisContainer(t,!1);return 161===r.kind||243===r.kind||200===r.kind&&!e.isPrototypePropertyAssignment(r.parent)}function ma(t,r,n){return t.initializer?sa(Ay(t)):e.isBindingPattern(t.name)?ya(t.name,r,n):(n&&!ba(t)&&id(t,he),he)}function ga(t,r,n){var i,a=t.elements,o=e.lastOrUndefined(a),s=!(!o||190!==o.kind||!o.dotDotDotToken);if(0===a.length||1===a.length&&s)return J>=2?(i=he,Rc(Mc(!0),[i])):vt;var c=Uc(e.map(a,(function(t){return e.isOmittedExpression(t)?he:ma(t,r,n)})),e.findLastIndex(a,(function(t){return!e.isOmittedExpression(t)&&!Af(t)}),a.length-(s?2:1))+1,s);return r&&((c=uc(c)).pattern=t),c}function ya(t,r,n){return void 0===r&&(r=!1),void 0===n&&(n=!1),188===t.kind?function(t,r,n){var i,a=e.createSymbolTable(),o=524416;e.forEach(t.elements,(function(e){var t=e.propertyName||e.name;if(e.dotDotDotToken)i=tc(he,!1);else{var s=ou(t);if(_o(s)){var c=yo(s),u=en(4|(e.initializer?16777216:0),c);u.type=ma(e,r,n),u.bindingElement=e,a.set(u.escapedName,u)}else o|=512}}));var s=hi(void 0,a,e.emptyArray,e.emptyArray,i,void 0);return s.objectFlags|=o,r&&(s.pattern=t),s}(t,r,n):ga(t,r,n)}function ha(e,t){return va(ua(e,!0),e,t)}function va(t,r,n){return t?(n&&ad(r,t),8192&t.flags&&(e.isBindingElement(r)||!r.type)&&t.symbol!==ri(r)&&(t=Le),rd(t)):(t=e.isParameter(r)&&r.dotDotDotToken?vt:he,n&&(ba(r)||id(r,t)),t)}function ba(t){var r=e.getRootDeclaration(t);return ah(155===r.kind?r.parent:r)}function xa(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Yu(r)}function Da(t){var r=_n(t);if(!r.type){var n=function(t){if(4194304&t.flags)return(r=ro(ni(t))).typeParameters?cc(r,e.map(r.typeParameters,(function(e){return he}))):r;var r;if(t===ae)return he;if(134217728&t.flags){var n=ri(e.getSourceFileOfNode(t.valueDeclaration)),i=e.createSymbolTable();return i.set("exports",n),hi(t,i,e.emptyArray,e.emptyArray,void 0,void 0)}var a,o=t.valueDeclaration;if(e.isCatchClauseVariableDeclarationOrBindingElement(o))return he;if(e.isSourceFile(o)&&e.isJsonSourceFile(o)){if(!o.statements.length)return Ge;var s=N_(zy(o.statements[0].expression));return 524288&s.flags?Q_(s):s}if(!qi(t,0))return 512&t.flags&&!(67108864&t.flags)?Aa(t):Pa(t);if(258===o.kind)a=va(ky(o.expression),o);else if(e.isBinaryExpression(o)||e.isInJSFile(o)&&(e.isCallExpression(o)||(e.isPropertyAccessExpression(o)||e.isBindableStaticElementAccessExpression(o))&&e.isBinaryExpression(o.parent)))a=la(t);else if(e.isJSDocPropertyLikeTag(o)||e.isPropertyAccessExpression(o)||e.isElementAccessExpression(o)||e.isIdentifier(o)||e.isStringLiteralLike(o)||e.isNumericLiteral(o)||e.isClassDeclaration(o)||e.isFunctionDeclaration(o)||e.isMethodDeclaration(o)&&!e.isObjectLiteralMethod(o)||e.isMethodSignature(o)||e.isSourceFile(o)){if(9136&t.flags)return Aa(t);a=e.isBinaryExpression(o.parent)?la(t):xa(o)||he}else if(e.isPropertyAssignment(o))a=xa(o)||Iy(o);else if(e.isJsxAttribute(o))a=xa(o)||Uf(o);else if(e.isShorthandPropertyAssignment(o))a=xa(o)||wy(o.name,0);else if(e.isObjectLiteralMethod(o))a=xa(o)||Oy(o,0);else if(e.isParameter(o)||e.isPropertyDeclaration(o)||e.isPropertySignature(o)||e.isVariableDeclaration(o)||e.isBindingElement(o))a=ha(o,!0);else if(e.isEnumDeclaration(o))a=Aa(t);else if(e.isEnumMember(o))a=Fa(t);else{if(!e.isAccessor(o))return e.Debug.fail("Unhandled declaration kind! "+e.Debug.formatSyntaxKind(o.kind)+" for "+e.Debug.formatSymbol(t));a=ka(t)}if(!Hi())return 512&t.flags&&!(67108864&t.flags)?Aa(t):Pa(t);return a}(t);r.type||(r.type=n)}return r.type}function Sa(t){if(t)return 162===t.kind?e.getEffectiveReturnTypeNode(t):e.getEffectiveSetAccessorTypeAnnotationNode(t)}function Ta(e){var t=Sa(e);return t&&Yu(t)}function Ea(e){return Ks(Ls(e))}function Ca(t){var r=_n(t);return r.type||(r.type=function(t){if(!qi(t,0))return xe;var r=ka(t);if(!Hi()){if(r=he,H)Xr(e.getDeclarationOfKind(t,162),e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Pi(t))}return r}(t))}function ka(t){var r=e.getDeclarationOfKind(t,162),n=e.getDeclarationOfKind(t,163);if(r&&e.isInJSFile(r)){var i=aa(r);if(i)return i}var a=Ta(r);if(a)return a;var o=Ta(n);return o||(r&&r.body?Xg(r):(n?ah(n)||$r(H,n,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Pi(t)):(e.Debug.assert(!!r,"there must exist a getter as we are current checking either setter or getter in this function"),ah(r)||$r(H,r,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Pi(t))),he))}function Na(t){var r=qa(Ha(t));return 8650752&r.flags?r:2097152&r.flags?e.find(r.types,(function(e){return!!(8650752&e.flags)})):void 0}function Aa(t){var r=_n(t),n=r;if(!r.type){var i=e.getDeclarationOfExpando(t.valueDeclaration);if(i){var a=Tg(t,ri(i));a&&(t=r=a)}n.type=r.type=function(t){var r=t.valueDeclaration;if(1536&t.flags&&e.isShorthandAmbientModuleSymbol(t))return he;if(208===r.kind||(193===r.kind||194===r.kind)&&208===r.parent.kind)return la(t);if(512&t.flags&&r&&e.isSourceFile(r)&&r.commonJsModuleIndicator){var n=Wn(t);if(n!==t){if(!qi(t,0))return xe;var i=ti(t.exports.get("export=")),a=la(i,i===n?void 0:n);return Hi()?a:Pa(t)}}var o=pi(16,t);if(32&t.flags){var s=Na(t);return s?iu([o,s]):o}return V&&16777216&t.flags?z_(o):o}(t)}return r.type}function Fa(e){var t=_n(e);return t.type||(t.type=eo(e))}function Pa(t){var r=t.valueDeclaration;return e.getEffectiveTypeAnnotationNode(r)?(Xr(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Pi(t)),xe):(H&&(155!==r.kind||r.initializer)&&Xr(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Pi(t)),he)}function wa(t){return 65536&e.getCheckFlags(t)?function(t){var r=_n(t);return r.type||(e.Debug.assertDefined(r.deferralParent),e.Debug.assertDefined(r.deferralConstituents),r.type=1048576&r.deferralParent.flags?Qc(r.deferralConstituents):iu(r.deferralConstituents)),r.type}(t):1&e.getCheckFlags(t)?function(e){var t=_n(e);if(!t.type){if(!qi(e,0))return t.type=xe;var r=gl(wa(t.target),t.mapper);Hi()||(r=Pa(e)),t.type=r}return t.type}(t):8192&e.getCheckFlags(t)?function(e){return hd(e.propertyType,e.mappedType,e.constraintType)}(t):7&t.flags?Da(t):9136&t.flags?Aa(t):8&t.flags?Fa(t):98304&t.flags?Ca(t):2097152&t.flags?function(e){var t=_n(e);if(!t.type){var r=Mn(e);t.type=111551&r.flags?wa(r):xe}return t.type}(t):xe}function Ia(t,r){return void 0!==t&&void 0!==r&&0!=(4&e.getObjectFlags(t))&&t.target===r}function Oa(t){return 4&e.getObjectFlags(t)?t.target:t}function Ma(t,r){return function t(n){if(7&e.getObjectFlags(n)){var i=Oa(n);return i===r||e.some(Wa(i),t)}if(2097152&n.flags)return e.some(n.types,t);return!1}(t)}function La(t,r){for(var n=0,i=r;n<i.length;n++){var a=i[n];t=e.appendIfUnique(t,to(ri(a)))}return t}function Ra(t,r){for(;;){if((t=t.parent)&&e.isBinaryExpression(t)){var n=e.getAssignmentDeclarationKind(t);if(6===n||3===n){var i=ri(t.left);i&&i.parent&&!e.findAncestor(i.parent.valueDeclaration,(function(e){return t===e}))&&(t=i.parent.valueDeclaration)}}if(!t)return;switch(t.kind){case 244:case 213:case 245:case 164:case 165:case 159:case 169:case 170:case 298:case 243:case 160:case 200:case 201:case 246:case 314:case 315:case 309:case 308:case 185:case 179:var a=Ra(t,r);if(185===t.kind)return e.append(a,to(ri(t.typeParameter)));if(179===t.kind)return e.concatenate(a,Pu(t));var o=La(a,e.getEffectiveTypeParameterDeclarations(t)),s=r&&(244===t.kind||213===t.kind||245===t.kind||Sg(t))&&Ha(ri(t)).thisType;return s?e.append(o,s):o}}}function Ba(t){var r=32&t.flags?t.valueDeclaration:e.getDeclarationOfKind(t,245);return e.Debug.assert(!!r,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),Ra(r)}function ja(t){for(var r,n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(245===a.kind||244===a.kind||213===a.kind||Sg(a)||e.isTypeAlias(a)){var o=a;r=La(r,e.getEffectiveTypeParameterDeclarations(o))}}return r}function Ka(e){var t=xs(e,1);if(1===t.length){var r=t[0];return!r.typeParameters&&1===r.parameters.length&&M(r)&&v_(Ig(r.parameters[0]))===he}return!1}function Ja(e){if(xs(e,1).length>0)return!0;if(8650752&e.flags){var t=cs(e);return!!t&&Ka(t)}return!1}function za(t){return e.getEffectiveBaseTypeNode(t.symbol.valueDeclaration)}function Ua(t,r,n){var i=e.length(r),a=e.isInJSFile(n);return e.filter(xs(t,1),(function(t){return(a||i>=Os(t.typeParameters))&&i<=e.length(t.typeParameters)}))}function Va(t,r,n){var i=Ua(t,r,n),a=e.map(r,Yu);return e.sameMap(i,(function(t){return e.some(t.typeParameters)?Ws(t,a,e.isInJSFile(n)):t}))}function qa(t){if(!t.resolvedBaseConstructorType){var r=t.symbol.valueDeclaration,n=e.getEffectiveBaseTypeNode(r),i=za(t);if(!i)return t.resolvedBaseConstructorType=Se;if(!qi(t,1))return xe;var a=zy(i.expression);if(n&&i!==n&&(e.Debug.assert(!n.typeArguments),zy(n.expression)),2621440&a.flags&&Qo(a),!Hi())return Xr(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Pi(t.symbol)),t.resolvedBaseConstructorType=xe;if(!(1&a.flags||a===ke||Ja(a))){var o=Xr(i.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,Ii(a));if(262144&a.flags){var s=ic(a),c=De;if(s){var u=xs(s,1);u[0]&&(c=zs(u[0]))}e.addRelatedInfo(o,e.createDiagnosticForNode(a.symbol.declarations[0],e.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Pi(a.symbol),Ii(c)))}return t.resolvedBaseConstructorType=xe}t.resolvedBaseConstructorType=a}return t.resolvedBaseConstructorType}function Wa(t){return t.resolvedBaseTypes||(8&t.objectFlags?t.resolvedBaseTypes=[jc(Qc(t.typeParameters||e.emptyArray),t.readonly)]:96&t.symbol.flags?(32&t.symbol.flags&&function(t){t.resolvedBaseTypes=e.resolvingEmptyArray;var r=ms(qa(t));if(!(2621441&r.flags))return t.resolvedBaseTypes=e.emptyArray;var n,i=za(t),a=r.symbol?ro(r.symbol):void 0;if(r.symbol&&32&r.symbol.flags&&function(e){var t=e.outerTypeParameters;if(t){var r=t.length-1,n=_c(e);return t[r].symbol!==n[r].symbol}return!0}(a))n=pc(i,r.symbol);else if(1&r.flags)n=r;else{var o=Va(r,i.typeArguments,i);if(!o.length)return Xr(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments),t.resolvedBaseTypes=e.emptyArray;n=zs(o[0])}if(n===xe)return t.resolvedBaseTypes=e.emptyArray;if(!Ga(n))return Xr(i.expression,e.Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Ii(n)),t.resolvedBaseTypes=e.emptyArray;if(t===n||Ma(n,t))return Xr(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,Ii(t,void 0,2)),t.resolvedBaseTypes=e.emptyArray;t.resolvedBaseTypes===e.resolvingEmptyArray&&(t.members=void 0);t.resolvedBaseTypes=[n]}(t),64&t.symbol.flags&&function(t){t.resolvedBaseTypes=t.resolvedBaseTypes||e.emptyArray;for(var r=0,n=t.symbol.declarations;r<n.length;r++){var i=n[r];if(245===i.kind&&e.getInterfaceBaseTypeNodes(i))for(var a=0,o=e.getInterfaceBaseTypeNodes(i);a<o.length;a++){var s=o[a],c=Yu(s);c!==xe&&(Ga(c)?t===c||Ma(c,t)?Xr(i,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,Ii(t,void 0,2)):t.resolvedBaseTypes===e.emptyArray?t.resolvedBaseTypes=[c]:t.resolvedBaseTypes.push(c):Xr(s,e.Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}}(t)):e.Debug.fail("type must be class or interface")),t.resolvedBaseTypes}function Ga(t){if(262144&t.flags){var r=cs(t);if(r)return Ga(r)}return!!(67633153&t.flags)&&!Xo(t)||!!(2097152&t.flags)&&e.every(t.types,Ga)}function Ha(t){var r=_n(t),n=r;if(!r.declaredType){var i=32&t.flags?1:2,a=Tg(t,function(t){var r=t&&t.parent&&(e.isFunctionDeclaration(t)&&ri(t)||e.isBinaryExpression(t.parent)&&ri(t.parent.left)||e.isVariableDeclaration(t.parent)&&ri(t.parent)),n=r&&r.exports&&r.exports.get("prototype"),i=n&&n.valueDeclaration&&function(t){if(!t.parent)return!1;var r=t.parent;for(;r&&193===r.kind;)r=r.parent;if(r&&e.isBinaryExpression(r)&&e.isPrototypeAccess(r.left)&&62===r.operatorToken.kind){var n=e.getInitializerOfBinaryExpression(r);return e.isObjectLiteralExpression(n)&&n}}(n.valueDeclaration);return i?ri(i):void 0}(t.valueDeclaration));a&&(t=r=a);var o=n.declaredType=r.declaredType=pi(i,t),s=Ba(t),c=ja(t);(s||c||1===i||!function(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r];if(245===i.kind){if(128&i.flags)return!1;var a=e.getInterfaceBaseTypeNodes(i);if(a)for(var o=0,s=a;o<s.length;o++){var c=s[o];if(e.isEntityNameExpression(c.expression)){var u=Kn(c.expression,788968,!0);if(!u||!(64&u.flags)||Ha(u).thisType)return!1}}}}return!0}(t))&&(o.objectFlags|=4,o.typeParameters=e.concatenate(s,c),o.outerTypeParameters=s,o.localTypeParameters=c,o.instantiations=e.createMap(),o.instantiations.set(oc(o.typeParameters),o),o.target=o,o.resolvedTypeArguments=o.typeParameters,o.thisType=fi(t),o.thisType.isThisType=!0,o.thisType.constraint=o)}return r.declaredType}function Ya(t){var r=_n(t);if(!r.declaredType){if(!qi(t,2))return xe;var n=e.find(t.declarations,e.isTypeAlias);if(!n)return e.Debug.fail("Type alias symbol with no valid declaration found");var i=e.isJSDocTypeAlias(n)?n.typeExpression:n.type,a=i?Yu(i):xe;if(Hi()){var o=ja(t);o&&(r.typeParameters=o,r.instantiations=e.createMap(),r.instantiations.set(oc(o),a))}else a=xe,Xr(e.isJSDocEnumTag(n)?n:n.name||n,e.Diagnostics.Type_alias_0_circularly_references_itself,Pi(t));r.declaredType=a}return r.declaredType}function Xa(t){var r=t.initializer;if(!r)return!(8388608&t.flags);switch(r.kind){case 10:case 8:case 14:return!0;case 206:return 40===r.operator&&8===r.operand.kind;case 75:return e.nodeIsMissing(r)||!!ri(t.parent).exports.get(r.escapedText);case 208:return function t(r){return!!e.isStringLiteralLike(r)||208===r.kind&&(t(r.left)&&t(r.right))}(r);default:return!1}}function Qa(t){var r=_n(t);if(void 0!==r.enumKind)return r.enumKind;for(var n=!1,i=0,a=t.declarations;i<a.length;i++){var o=a[i];if(247===o.kind)for(var s=0,c=o.members;s<c.length;s++){var u=c[s];if(u.initializer&&e.isStringLiteralLike(u.initializer))return r.enumKind=1;Xa(u)||(n=!0)}}return r.enumKind=n?0:1}function $a(e){return 1024&e.flags&&!(1048576&e.flags)?ro(ni(e.symbol)):e}function Za(e){var t=_n(e);if(t.declaredType)return t.declaredType;if(1===Qa(e)){b++;for(var r=[],n=0,i=e.declarations;n<i.length;n++){var a=i[n];if(247===a.kind)for(var o=0,s=a.members;o<s.length;o++){var c=s[o],u=Ib(c),l=Uu(Wu(void 0!==u?u:0,b,ri(c)));_n(ri(c)).declaredType=l,r.push(Vu(l))}}if(r.length){var _=Qc(r,1,e,void 0);return 1048576&_.flags&&(_.flags|=1024,_.symbol=e),t.declaredType=_}}var d=li(32);return d.symbol=e,t.declaredType=d}function eo(e){var t=_n(e);if(!t.declaredType){var r=Za(ni(e));t.declaredType||(t.declaredType=r)}return t.declaredType}function to(e){var t=_n(e);return t.declaredType||(t.declaredType=fi(e))}function ro(e){return no(e)||xe}function no(e){return 96&e.flags?Ha(e):524288&e.flags?Ya(e):262144&e.flags?to(e):384&e.flags?Za(e):8&e.flags?eo(e):2097152&e.flags?function(e){var t=_n(e);return t.declaredType||(t.declaredType=ro(Mn(e)))}(e):void 0}function io(e){switch(e.kind){case 124:case 147:case 142:case 139:case 150:case 127:case 143:case 140:case 109:case 145:case 99:case 136:case 186:return!0;case 173:return io(e.elementType);case 168:return!e.typeArguments||e.typeArguments.every(io)}return!1}function ao(t){var r=e.getEffectiveConstraintOfTypeParameter(t);return!r||io(r)}function oo(t){var r=e.getEffectiveTypeAnnotationNode(t);return r?io(r):!e.hasInitializer(t)}function so(t){if(t.declarations&&1===t.declarations.length){var r=t.declarations[0];if(r)switch(r.kind){case 158:case 157:return oo(r);case 160:case 159:case 161:case 162:case 163:return function(t){var r=e.getEffectiveReturnTypeNode(t),n=e.getEffectiveTypeParameterDeclarations(t);return(161===t.kind||!!r&&io(r))&&t.parameters.every(oo)&&n.every(ao)}(r)}}return!1}function co(t,r,n){for(var i=e.createSymbolTable(),a=0,o=t;a<o.length;a++){var s=o[a];i.set(s.escapedName,n&&so(s)?s:cl(s,r))}return i}function uo(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];e.has(i.escapedName)||e.set(i.escapedName,i)}}function lo(t){if(!t.declaredProperties){var r=t.symbol,n=bo(r);t.declaredProperties=gi(n),t.declaredCallSignatures=e.emptyArray,t.declaredConstructSignatures=e.emptyArray,t.declaredCallSignatures=js(n.get("__call")),t.declaredConstructSignatures=js(n.get("__new")),t.declaredStringIndexInfo=rc(r,0),t.declaredNumberIndexInfo=rc(r,1)}return t}function _o(e){return!!(8576&e.flags)}function po(t){if(!e.isComputedPropertyName(t)&&!e.isElementAccessExpression(t))return!1;var r=e.isComputedPropertyName(t)?t.expression:t.argumentExpression;return e.isEntityNameExpression(r)&&_o(e.isComputedPropertyName(t)?Lf(t):ky(r))}function fo(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function mo(t){var r=e.getNameOfDeclaration(t);return!!r&&po(r)}function go(t){return e.hasDynamicName(t)&&!mo(t)}function yo(t){return 8192&t.flags?t.escapedName:384&t.flags?e.escapeLeadingUnderscores(""+t.value):e.Debug.fail()}function ho(t,r,n,i){e.Debug.assert(!!i.symbol,"The member is expected to have a symbol.");var a=dn(i);if(!a.resolvedSymbol){a.resolvedSymbol=i.symbol;var o=e.isBinaryExpression(i)?i.left:i.name,s=e.isElementAccessExpression(o)?ky(o.argumentExpression):Lf(o);if(_o(s)){var c=yo(s),u=i.symbol.flags,l=n.get(c);l||n.set(c,l=en(0,c,4096));var _=r&&r.get(c);if(l.flags&rn(u)||_){var d=_?e.concatenate(_.declarations,l.declarations):l.declarations,p=!(8192&s.flags)&&e.unescapeLeadingUnderscores(c)||e.declarationNameToString(o);e.forEach(d,(function(t){return Xr(e.getNameOfDeclaration(t)||t,e.Diagnostics.Property_0_was_also_declared_here,p)})),Xr(o||i,e.Diagnostics.Duplicate_property_0,p),l=en(0,c,4096)}return l.nameType=s,function(t,r,n){e.Debug.assert(!!(4096&e.getCheckFlags(t)),"Expected a late-bound symbol."),t.flags|=n,_n(r.symbol).lateSymbol=t,t.declarations?t.declarations.push(r):t.declarations=[r],111551&n&&(t.valueDeclaration&&t.valueDeclaration.kind===r.kind||(t.valueDeclaration=r))}(l,i,u),l.parent?e.Debug.assert(l.parent===t,"Existing symbol parent should match new one"):l.parent=t,a.resolvedSymbol=l}}return a.resolvedSymbol}function vo(t,r){var n=_n(t);if(!n[r]){var i="resolvedExports"===r,a=i?1536&t.flags?ei(t):t.exports:t.members;n[r]=a||B;for(var o=e.createSymbolTable(),s=0,c=t.declarations;s<c.length;s++){var u=c[s],l=e.getMembersOfDeclaration(u);if(l)for(var _=0,d=l;_<d.length;_++){var p=d[_];i===e.hasStaticModifier(p)&&mo(p)&&ho(t,a,o,p)}}var f=t.assignmentDeclarationMembers;if(f)for(var m=0,g=e.arrayFrom(f.values());m<g.length;m++){p=g[m];var y=e.getAssignmentDeclarationKind(p);i===!(3===y||4===y||9===y||6===y)&&mo(p)&&ho(t,a,o,p)}n[r]=function(t,r){if(!e.hasEntries(t))return r;if(!e.hasEntries(r))return t;var n=e.createSymbolTable();return un(n,t),un(n,r),n}(a,o)||B}return n[r]}function bo(e){return 6256&e.flags?vo(e,"resolvedMembers"):e.members||B}function xo(t){if(106500&t.flags&&"__computed"===t.escapedName){var r=_n(t);if(!r.lateSymbol&&e.some(t.declarations,mo)){var n=ti(t.parent);e.some(t.declarations,e.hasStaticModifier)?Qn(n):bo(n)}return r.lateSymbol||(r.lateSymbol=t)}return t}function Do(t,r,n){if(4&e.getObjectFlags(t)){var i=t.target,a=_c(t);if(e.length(i.typeParameters)===e.length(a)){var o=cc(i,e.concatenate(a,[r||i.thisType]));return n?ms(o):o}}else if(2097152&t.flags)return iu(e.map(t.types,(function(e){return Do(e,r,n)})));return n?ms(t):t}function So(t,r,n,i){var a,o,s,c,u,l;e.rangeEquals(n,i,0,n.length)?(a=j,o=r.symbol?bo(r.symbol):e.createSymbolTable(r.declaredProperties),s=r.declaredCallSignatures,c=r.declaredConstructSignatures,u=r.declaredStringIndexInfo,l=r.declaredNumberIndexInfo):(a=el(n,i),o=co(r.declaredProperties,a,1===n.length),s=$u(r.declaredCallSignatures,a),c=$u(r.declaredConstructSignatures,a),u=vl(r.declaredStringIndexInfo,a),l=vl(r.declaredNumberIndexInfo,a));var _=Wa(r);if(_.length){r.symbol&&o===bo(r.symbol)&&(o=e.createSymbolTable(r.declaredProperties)),yi(t,o,s,c,u,l);for(var d=e.lastOrUndefined(i),p=0,f=_;p<f.length;p++){var m=f[p],g=d?Do(gl(m,a),d):m;uo(o,ts(g)),s=e.concatenate(s,xs(g,0)),c=e.concatenate(c,xs(g,1)),u||(u=g===he?tc(he,!1):Ts(g,0)),l=l||Ts(g,1)}}yi(t,o,s,c,u,l)}function To(e,t,r,n,i,a,o,s){var c=new y(oe,s);return c.declaration=e,c.typeParameters=t,c.parameters=n,c.thisParameter=r,c.resolvedReturnType=i,c.resolvedTypePredicate=a,c.minArgumentCount=o,c.target=void 0,c.mapper=void 0,c}function Eo(e){var t=To(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,3&e.flags);return t.target=e.target,t.mapper=e.mapper,t}function Co(e,t){var r=Eo(e);return r.unionSignatures=t,r.target=void 0,r.mapper=void 0,r}function ko(e){return R(e)?e:e.optionalCallSignatureCache||(e.optionalCallSignatureCache=function(e){var t=Eo(e);return t.flags|=4,t}(e))}function No(t){if(M(t)){var r=t.parameters.length-1,n=wa(t.parameters[r]);if(w_(n)){var i=_c(n),a=n.target.minLength,o=n.target.hasRestElement?i.length-1:-1,s=e.map(i,(function(e,n){var i=en(1,Og(t,r+n),n===o?32768:n>=a?16384:0);return i.type=n===o?jc(e):e,i}));return e.concatenate(t.parameters.slice(0,r),s)}}return t.parameters}function Ao(e,t,r,n,i){for(var a=0,o=e;a<o.length;a++){var s=o[a];if(m_(s,t,r,n,i,r?Nl:Cl))return s}}function Fo(t,r,n){if(r.typeParameters){if(n>0)return;for(var i=1;i<t.length;i++)if(!Ao(t[i],r,!1,!1,!1))return;return[r]}var a;for(i=0;i<t.length;i++){var o=i===n?r:Ao(t[i],r,!0,!1,!0);if(!o)return;a=e.appendIfUnique(a,o)}return a}function Po(t){for(var r,n,i=0;i<t.length;i++){if(0===t[i].length)return e.emptyArray;t[i].length>1&&(n=void 0===n?i:-1);for(var a=0,o=t[i];a<o.length;a++){var s=o[a];if(!r||!Ao(r,s,!1,!1,!0)){var c=Fo(t,s,i);if(c){var u=s;if(c.length>1){var l=s.thisParameter,_=e.forEach(c,(function(e){return e.thisParameter}));if(_)l=X_(_,iu(e.mapDefined(c,(function(e){return e.thisParameter&&wa(e.thisParameter)}))));(u=Co(s,c)).thisParameter=l}(r||(r=[])).push(u)}}}}if(!e.length(r)&&-1!==n){for(var d=t[void 0!==n?n:0],p=d.slice(),f=function(t){if(t!==d){var r=t[0];if(e.Debug.assert(!!r,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),!(p=r.typeParameters&&e.some(p,(function(e){return!!e.typeParameters}))?void 0:e.map(p,(function(t){return function(t,r){var n=t.declaration,i=function(e,t){for(var r=Bg(e),n=Bg(t),i=r>=n?e:t,a=i===e?t:e,o=i===e?r:n,s=Kg(e)||Kg(t),c=s&&!Kg(i),u=new Array(o+(c?1:0)),l=0;l<o;l++){var _=Lg(i,l),d=Lg(a,l)||De,p=iu([_,d]),f=s&&!c&&l===o-1,m=l>=jg(i)&&l>=jg(a),g=l>=r?void 0:Og(e,l),y=l>=n?void 0:Og(t,l),h=en(1|(m&&!f?16777216:0),(g===y?g:g?y?void 0:g:y)||"arg"+l);h.type=f?jc(p):p,u[l]=h}if(c){var v=en(1,"args");v.type=jc(Mg(a,o)),u[o]=v}return u}(t,r),a=function(e,t){if(!e||!t)return e||t;var r=iu([wa(e),wa(t)]);return X_(e,r)}(t.thisParameter,r.thisParameter),o=Math.max(t.minArgumentCount,r.minArgumentCount),s=To(n,t.typeParameters||r.typeParameters,a,i,void 0,void 0,o,3&(t.flags|r.flags));return s.unionSignatures=e.concatenate(t.unionSignatures||[t],[r]),s}(t,r)}))))return"break"}},m=0,g=t;m<g.length;m++){if("break"===f(g[m]))break}r=p}return r||e.emptyArray}function wo(e,t){for(var r=[],n=!1,i=0,a=e;i<a.length;i++){var o=Ts(a[i],t);if(!o)return;r.push(o.type),n=n||o.isReadonly}return tc(Qc(r,2),n)}function Io(e,t){return e?t?iu([e,t]):e:t}function Oo(e,t){return e?t?tc(iu([e.type,t.type]),e.isReadonly&&t.isReadonly):e:t}function Mo(e,t){return e&&t&&tc(Qc([e.type,t.type]),e.isReadonly||t.isReadonly)}function Lo(t){var r=e.countWhere(t,(function(e){return xs(e,1).length>0})),n=e.map(t,Ka);if(r>0&&r===e.countWhere(n,(function(e){return e}))){var i=n.indexOf(!0);n[i]=!1}return n}function Ro(t){for(var r,n,i,a,o=t.types,s=Lo(o),c=e.countWhere(s,(function(e){return e})),u=function(u){var l=t.types[u];if(!s[u]){var _=xs(l,1);_.length&&c>0&&(_=e.map(_,(function(e){var t=Eo(e);return t.resolvedReturnType=function(e,t,r,n){for(var i=[],a=0;a<t.length;a++)a===n?i.push(e):r[a]&&i.push(zs(xs(t[a],1)[0]));return iu(i)}(zs(e),o,s,u),t}))),n=Bo(n,_)}r=Bo(r,xs(l,0)),i=Oo(i,Ts(l,0)),a=Oo(a,Ts(l,1))},l=0;l<o.length;l++)u(l);yi(t,B,r||e.emptyArray,n||e.emptyArray,i,a)}function Bo(t,r){for(var n=function(r){t&&!e.every(t,(function(e){return!m_(e,r,!1,!1,!1,Cl)}))||(t=e.append(t,r))},i=0,a=r;i<a.length;i++){n(a[i])}return t}function jo(t){var r=ti(t.symbol);if(t.target)yi(t,B,e.emptyArray,e.emptyArray,void 0,void 0),yi(t,a=co($o(t.target),t.mapper,!1),n=$u(xs(t.target,0),t.mapper),i=$u(xs(t.target,1),t.mapper),o=vl(Ts(t.target,0),t.mapper),u=vl(Ts(t.target,1),t.mapper));else if(2048&r.flags){yi(t,B,e.emptyArray,e.emptyArray,void 0,void 0);var n=js((a=bo(r)).get("__call")),i=js(a.get("__new"));yi(t,a,n,i,o=rc(r,0),u=rc(r,1))}else{var a=B,o=void 0;if(r.exports&&(a=Qn(r),r===re)){var s=e.createMap();a.forEach((function(e){418&e.flags||s.set(e.escapedName,e)})),a=s}if(yi(t,a,e.emptyArray,e.emptyArray,void 0,void 0),32&r.flags){var c=qa(Ha(r));11272192&c.flags?uo(a=e.createSymbolTable(gi(a)),ts(c)):c===he&&(o=tc(he,!1))}var u=384&r.flags&&(32&ro(r).flags||e.some(t.properties,(function(e){return!!(296&wa(e).flags)})))?rr:void 0;if(yi(t,a,e.emptyArray,e.emptyArray,o,u),8208&r.flags&&(t.callSignatures=js(r)),32&r.flags){var l=Ha(r);i=r.members?js(r.members.get("__constructor")):e.emptyArray;16&r.flags&&(i=e.addRange(i.slice(),e.mapDefined(t.callSignatures,(function(e){return Sg(e.declaration)?To(e.declaration,e.typeParameters,e.thisParameter,e.parameters,l,void 0,e.minArgumentCount,3&e.flags):void 0})))),i.length||(i=function(t){var r=xs(qa(t),1);if(0===r.length)return[To(void 0,t.localTypeParameters,void 0,e.emptyArray,t,void 0,0,0)];for(var n=za(t),i=e.isInJSFile(n),a=Ec(n),o=e.length(a),s=[],c=0,u=r;c<u.length;c++){var l=u[c],_=Os(l.typeParameters),d=e.length(l.typeParameters);if(i||o>=_&&o<=d){var p=d?Hs(l,Ms(a,l.typeParameters,_,i)):Eo(l);p.typeParameters=t.localTypeParameters,p.resolvedReturnType=t,s.push(p)}}return s}(l)),t.constructSignatures=i}}}function Ko(t){if(131069&t.flags)return t;if(4194304&t.flags)return lu(ms(t.type));if(16777216&t.flags){if(t.root.isDistributive){var r=t.checkType,n=Ko(r);if(n!==r)return ml(t,rl(Zu(t.root.checkType,n),t.mapper))}return t}return 1048576&t.flags?Qc(e.sameMap(t.types,Ko)):2097152&t.flags?iu(e.sameMap(t.types,Ko)):Be}function Jo(e){return e.typeParameter||(e.typeParameter=to(ri(e.declaration.typeParameter)))}function zo(e){return e.constraintType||(e.constraintType=ns(Jo(e))||xe)}function Uo(e){return e.templateType||(e.templateType=e.declaration.type?gl(sa(Yu(e.declaration.type),!!(4&Go(e))),e.mapper||j):xe)}function Vo(t){return e.getEffectiveConstraintOfTypeParameter(t.declaration.typeParameter)}function qo(e){var t=Vo(e);return 183===t.kind&&133===t.operator}function Wo(e){if(!e.modifiersType)if(qo(e))e.modifiersType=gl(Yu(Vo(e).type),e.mapper||j);else{var t=zo(Cu(e.declaration)),r=t&&262144&t.flags?ns(t):t;e.modifiersType=r&&4194304&r.flags?gl(r.type,e.mapper||j):De}return e.modifiersType}function Go(e){var t=e.declaration;return(t.readonlyToken?40===t.readonlyToken.kind?2:1:0)|(t.questionToken?40===t.questionToken.kind?8:4:0)}function Ho(e){var t=Go(e);return 8&t?-1:4&t?1:0}function Yo(e){var t=Ho(e),r=Wo(e);return t||(Xo(r)?Ho(r):0)}function Xo(t){return!!(32&e.getObjectFlags(t))&&yu(zo(t))}function Qo(t){return t.members||(524288&t.flags?4&t.objectFlags?function(t){var r=lo(t.target),n=e.concatenate(r.typeParameters,[r.thisType]),i=_c(t);So(t,r,n,i.length===n.length?i:e.concatenate(i,[t]))}(t):3&t.objectFlags?function(t){So(t,lo(t),e.emptyArray,e.emptyArray)}(t):2048&t.objectFlags?function(t){for(var r=Ts(t.source,0),n=Go(t.mappedType),i=!(1&n),a=4&n?0:16777216,o=r&&tc(hd(r.type,t.mappedType,t.constraintType),i&&r.isReadonly),s=e.createSymbolTable(),c=0,u=ts(t.source);c<u.length;c++){var l=u[c],_=8192|(i&&uy(l)?8:0),d=en(4|l.flags&a,l.escapedName,_);d.declarations=l.declarations,d.nameType=l.nameType,d.propertyType=wa(l),d.mappedType=t.mappedType,d.constraintType=t.constraintType,s.set(l.escapedName,d)}yi(t,s,e.emptyArray,e.emptyArray,o,void 0)}(t):16&t.objectFlags?jo(t):32&t.objectFlags&&function(t){var r,n,i=e.createSymbolTable();yi(t,B,e.emptyArray,e.emptyArray,void 0,void 0);var a=Jo(t),o=zo(t),s=Uo(t.target||t),c=ms(Wo(t)),u=Go(t),l=X?128:8576;if(qo(t)){for(var _=0,d=ts(c);_<d.length;_++){p(su(d[_],l))}(1&c.flags||Ts(c,0))&&p(Ne),!X&&Ts(c,1)&&p(Ae)}else up(Ko(o),p);function p(e){var o=rl(t.mapper,el([a],[e])),l=gl(s,o);if(_o(e)){var _=yo(e),d=vs(c,_),p=!!(4&u||!(8&u)&&d&&16777216&d.flags),f=en(4|(p?16777216:0),_,!!(1&u||!(2&u)&&d&&uy(d))?8:0);f.type=V&&p&&!Fl(Se,l)?z_(l):V&&!p&&d&&16777216&d.flags?Hd(l,524288):l,d&&(f.syntheticOrigin=d,f.declarations=d.declarations),f.nameType=e,i.set(_,f)}else 5&e.flags?r=tc(l,!!(1&u)):40&e.flags&&(n=tc(n?Qc([n.type,l]):l,!!(1&u)))}yi(t,i,e.emptyArray,e.emptyArray,r,n)}(t):1048576&t.flags?function(t){var r=Po(e.map(t.types,(function(e){return e===ut?[Zt]:xs(e,0)}))),n=Po(e.map(t.types,(function(e){return xs(e,1)}))),i=wo(t.types,0),a=wo(t.types,1);yi(t,B,r,n,i,a)}(t):2097152&t.flags&&Ro(t)),t}function $o(t){return 524288&t.flags?Qo(t).properties:e.emptyArray}function Zo(e,t){if(524288&e.flags){var r=Qo(e).members.get(t);if(r&&ci(r))return r}}function es(t){if(t.possiblePropertyCache)return t.possiblePropertyCache.size?e.arrayFrom(t.possiblePropertyCache.values()):e.emptyArray;t.possiblePropertyCache=e.createSymbolTable();for(var r=0,n=t.types;r<n.length;r++)for(var i=0,a=ts(n[r]);i<a.length;i++){var o=a[i];if(!t.possiblePropertyCache.has(o.escapedName)){var s=ys(t,o.escapedName);s&&t.possiblePropertyCache.set(o.escapedName,s)}}return t.possiblePropertyCache.size?e.arrayFrom(t.possiblePropertyCache.values()):e.emptyArray}function ts(t){return 3145728&(t=ms(t)).flags?function(t){if(!t.resolvedProperties){for(var r=e.createSymbolTable(),n=0,i=t.types;n<i.length;n++){for(var a=0,o=ts(i[n]);a<o.length;a++){var s=o[a];if(!r.has(s.escapedName)){var c=hs(t,s.escapedName);c&&r.set(s.escapedName,c)}}if(1048576&t.flags)break}t.resolvedProperties=gi(r)}return t.resolvedProperties}(t):$o(t)}function rs(e){return 262144&e.flags?ns(e):8388608&e.flags?function(e){return ls(e)?function(e){var t=is(e.indexType);if(t&&t!==e.indexType){var r=Tu(e.objectType,t);if(r)return r}var n=is(e.objectType);if(n&&n!==e.objectType)return Tu(n,e.indexType);return}(e):void 0}(e):16777216&e.flags?function(e){return ls(e)?ss(e):void 0}(e):cs(e)}function ns(e){return ls(e)?ic(e):void 0}function is(e){var t=vu(e,!1);return t!==e?t:rs(e)}function as(e){if(!e.resolvedDefaultConstraint){var t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=e.combinedMapper?gl(e.root.trueType,e.combinedMapper):Au(e))}(e),r=Fu(e);e.resolvedDefaultConstraint=Qi(t)?r:Qi(r)?t:Qc([t,r])}return e.resolvedDefaultConstraint}function os(e){if(e.root.isDistributive&&e.restrictiveInstantiation!==e){var t=vu(e.checkType,!1),r=t===e.checkType?rs(t):t;if(r&&r!==e.checkType){var n=ml(e,rl(Zu(e.root.checkType,r),e.mapper));if(!(131072&n.flags))return n}}}function ss(e){return os(e)||as(e)}function cs(e){if(62128128&e.flags){var t=_s(e);return t!==Ze&&t!==et?t:void 0}return 4194304&e.flags?qe:void 0}function us(e){return cs(e)||e}function ls(e){return _s(e)!==et}function _s(t){var r=!1;return t.resolvedBaseConstraint||(t.resolvedBaseConstraint=Do(n(t),t));function n(t){if(!t.immediateBaseConstraint){if(!qi(t,4))return et;if(E>=50)return Xr(l,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),r=!0,t.immediateBaseConstraint=Ze;E++;var n=function(e){if(262144&e.flags){var t=ic(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){for(var r=e.types,n=[],a=0,o=r;a<o.length;a++){var s=i(o[a]);s&&n.push(s)}return 1048576&e.flags&&n.length===r.length?Qc(n):2097152&e.flags&&n.length?iu(n):void 0}if(4194304&e.flags)return qe;if(8388608&e.flags){var c=i(e.objectType),u=i(e.indexType),l=c&&u&&Tu(c,u);return l&&i(l)}if(16777216&e.flags){t=ss(e);E++;var _=t&&i(t);return E--,_}if(33554432&e.flags)return i(e.substitute);return e}(vu(t,!1));if(E--,!Hi()){if(262144&t.flags){var a=nc(t);if(a){var o=Xr(a,e.Diagnostics.Type_parameter_0_has_a_circular_constraint,Ii(t));!l||e.isNodeDescendantOf(a,l)||e.isNodeDescendantOf(l,a)||e.addRelatedInfo(o,e.createDiagnosticForNode(l,e.Diagnostics.Circularity_originates_in_type_at_this_location))}}n=et}r&&(n=et),t.immediateBaseConstraint=n||Ze}return t.immediateBaseConstraint}function i(e){var t=n(e);return t!==Ze&&t!==et?t:void 0}}function ds(t){if(t.default)t.default===tt&&(t.default=et);else if(t.target){var r=ds(t.target);t.default=r?gl(r,t.mapper):Ze}else{t.default=tt;var n=t.symbol&&e.forEach(t.symbol.declarations,(function(t){return e.isTypeParameterDeclaration(t)&&t.default})),i=n?Yu(n):Ze;t.default===tt&&(t.default=i)}return t.default}function ps(e){var t=ds(e);return t!==Ze&&t!==et?t:void 0}function fs(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){var t=_l(e);if(t){var r=ns(t);if(r&&(y_(r)||w_(r))){var n=Zu(t,r);return gl(e,rl(n,e.mapper))}}return e}(e))}function ms(t){var r,n=63176704&t.flags?cs(t)||De:t;return 32&e.getObjectFlags(n)?fs(n):2097152&n.flags?function(e){return e.resolvedApparentType||(e.resolvedApparentType=Do(e,e,!0))}(n):132&n.flags?ft:296&n.flags?mt:2112&n.flags?(r=J>=99,Vt||(Vt=Fc("BigInt",0,r))||Ge):528&n.flags?gt:12288&n.flags?wc(J>=2):67108864&n.flags?Ge:4194304&n.flags?qe:2&n.flags&&!V?Ge:n}function gs(t,r){for(var n,i=e.createMap(),a=1048576&t.flags,o=a?24:0,s=a?0:16777216,c=4,u=0,l=0,_=t.types;l<_.length;l++){if((E=ms(_[l]))!==xe){var d=(T=vs(E,r))?e.getDeclarationModifierFlagsFromSymbol(T):0;if(!T||d&o){if(a){var p=!fo(r)&&(Mf(r)&&Ts(E,1)||Ts(E,0));p?(u|=32|(p.isReadonly?8:0),n=e.append(n,w_(E)?I_(E)||Se:p.type)):Cd(E)?(u|=32,n=e.append(n,Se)):u|=16}}else{a?s|=16777216&T.flags:s&=T.flags;var f=""+A(T);i.has(f)||i.set(f,T),u|=(uy(T)?8:0)|(24&d?0:256)|(16&d?512:0)|(8&d?1024:0)|(32&d?2048:0),sm(T)||(c=2)}}}if(i.size){var m,g,y,h=e.arrayFrom(i.values());if(!(1!==h.length||16&u||n))return h[0];for(var v,b=[],x=!1,D=0,S=h;D<S.length;D++){var T=S[D];v?T.valueDeclaration!==v&&(x=!0):v=T.valueDeclaration,m=e.addRange(m,T.declarations);var E=wa(T);g?E!==g&&(u|=64):(g=E,y=T.nameType),C_(E)&&(u|=128),b.push(E)}e.addRange(b,n);var C=en(4|s,r,c|u);return C.containingType=t,!x&&v&&(C.valueDeclaration=v,v.symbol.parent&&(C.parent=v.symbol.parent)),C.declarations=m,C.nameType=y,b.length>2?(C.checkFlags|=65536,C.deferralParent=t,C.deferralConstituents=b):C.type=a?Qc(b):iu(b),C}}function ys(t,r){var n=t.propertyCache||(t.propertyCache=e.createSymbolTable()),i=n.get(r);return i||(i=gs(t,r))&&n.set(r,i),i}function hs(t,r){var n=ys(t,r);return!n||16&e.getCheckFlags(n)?void 0:n}function vs(e,t){if(524288&(e=ms(e)).flags){var r=Qo(e),n=r.members.get(t);if(n&&ci(n))return n;var i=r===$e?ut:r.callSignatures.length?lt:r.constructSignatures.length?_t:void 0;if(i){var a=Zo(i,t);if(a)return a}return Zo(ct,t)}if(3145728&e.flags)return hs(e,t)}function bs(t,r){if(3670016&t.flags){var n=Qo(t);return 0===r?n.callSignatures:n.constructSignatures}return e.emptyArray}function xs(e,t){return bs(ms(e),t)}function Ds(e,t){if(3670016&e.flags){var r=Qo(e);return 0===t?r.stringIndexInfo:r.numberIndexInfo}}function Ss(e,t){var r=Ds(e,t);return r&&r.type}function Ts(e,t){return Ds(ms(e),t)}function Es(e,t){return Ss(ms(e),t)}function Cs(t,r){if(Y_(t)){for(var n=[],i=0,a=ts(t);i<a.length;i++){var o=a[i];(0===r||Mf(o.escapedName))&&n.push(wa(o))}if(0===r&&e.append(n,Es(t,1)),n.length)return Qc(n,2)}}function ks(t){for(var r,n=0,i=e.getEffectiveTypeParameterDeclarations(t);n<i.length;n++){var a=i[n];r=e.appendIfUnique(r,to(a.symbol))}return r}function Ns(e){var t=[];return e.forEach((function(e,r){mi(r)||t.push(e)})),t}function As(t){return e.isInJSFile(t)&&(t.type&&297===t.type.kind||e.getJSDocParameterTags(t).some((function(e){var t=e.isBracketed,r=e.typeExpression;return t||!!r&&297===r.type.kind})))}function Fs(t,r){if(!e.isExternalModuleNameRelative(t)){var n=fn(ee,'"'+t+'"',512);return n&&r?ti(n):n}}function Ps(t){if(e.hasQuestionToken(t)||ws(t)||As(t))return!0;if(t.initializer){var r=Ls(t.parent),n=t.parent.parameters.indexOf(t);return e.Debug.assert(n>=0),n>=jg(r)}var i=e.getImmediatelyInvokedFunctionExpression(t.parent);return!!i&&(!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=i.arguments.length)}function ws(t){if(!e.isJSDocParameterTag(t))return!1;var r=t.isBracketed,n=t.typeExpression;return r||!!n&&297===n.type.kind}function Is(e,t,r,n){return{kind:e,parameterName:t,parameterIndex:r,type:n}}function Os(t){var r,n=0;if(t)for(var i=0;i<t.length;i++)(r=t[i]).symbol&&e.forEach(r.symbol.declarations,(function(t){return e.isTypeParameterDeclaration(t)&&t.default}))||(n=i+1);return n}function Ms(t,r,n,i){var a=e.length(r);if(!a)return[];var o=e.length(t);if(i||o>=n&&o<=a){for(var s=t?t.slice():[],c=o;c<a;c++)s[c]=xe;var u=Pd(i);for(c=o;c<a;c++){var l=ps(r[c]);i&&l&&(El(l,De)||El(l,Ge))&&(l=he),s[c]=l?gl(l,el(r,s)):u}return s.length=r.length,s}return t&&t.slice()}function Ls(t){var r,n=dn(t);if(!n.resolvedSignature){for(var i=[],a=0,o=0,s=void 0,c=!1,u=e.getImmediatelyInvokedFunctionExpression(t),l=e.isJSDocConstructSignature(t),_=!u&&e.isInJSFile(t)&&e.isValueSignatureDeclaration(t)&&!e.hasJSDocParameterTags(t)&&!e.getJSDocType(t),d=l?1:0;d<t.parameters.length;d++){var p=t.parameters[d],f=p.symbol,m=e.isJSDocParameterTag(p)?p.typeExpression&&p.typeExpression.type:p.type;if(f&&4&f.flags&&!e.isBindingPattern(p.name))f=gn(p,f.escapedName,111551,void 0,void 0,!1);0===d&&"this"===f.escapedName?(c=!0,s=p.symbol):i.push(f),m&&186===m.kind&&(a|=2),ws(p)||p.initializer||p.questionToken||p.dotDotDotToken||u&&i.length>u.arguments.length&&!m||_||As(p)||(o=i.length)}if(!(162!==t.kind&&163!==t.kind||go(t)||c&&s)){var g=162===t.kind?163:162,y=e.getDeclarationOfKind(ri(t),g);y&&(s=(r=lx(y))&&r.symbol)}var h=161===t.kind?Ha(ti(t.parent.symbol)):void 0,v=h?h.localTypeParameters:ks(t);(e.hasRestParameter(t)||e.isInJSFile(t)&&function(t,r){if(e.isJSDocSignature(t)||!Bs(t))return!1;var n=e.lastOrUndefined(t.parameters),i=n?e.getJSDocParameterTags(n):e.getJSDocTags(t).filter(e.isJSDocParameterTag),a=e.firstDefined(i,(function(t){return t.typeExpression&&e.isJSDocVariadicType(t.typeExpression.type)?t.typeExpression.type:void 0})),o=en(3,"args",32768);o.type=a?jc(Yu(a.type)):vt,a&&r.pop();return r.push(o),!0}(t,i))&&(a|=1),n.resolvedSignature=To(t,v,s,i,void 0,void 0,o,a)}return n.resolvedSignature}function Rs(t){var r=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0,n=r&&r.typeExpression&&qm(Yu(r.typeExpression));return n&&Ys(n)}function Bs(t){var r=dn(t);return void 0===r.containsArgumentsReference&&(8192&r.flags?r.containsArgumentsReference=!0:r.containsArgumentsReference=function t(r){if(!r)return!1;switch(r.kind){case 75:return"arguments"===r.escapedText&&e.isExpressionNode(r);case 158:case 160:case 162:case 163:return 153===r.name.kind&&t(r.name);default:return!e.nodeStartsNewLexicalEnvironment(r)&&!e.isPartOfTypeNode(r)&&!!e.forEachChild(r,t)}}(t.body)),r.containsArgumentsReference}function js(t){if(!t)return e.emptyArray;for(var r=[],n=0;n<t.declarations.length;n++){var i=t.declarations[n];if(e.isFunctionLike(i)){if(n>0&&i.body){var a=t.declarations[n-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)continue}r.push(Ls(i))}}return r}function Ks(e){if(e.thisParameter)return wa(e.thisParameter)}function Js(t){if(!t.resolvedTypePredicate){if(t.target){var r=Js(t.target);t.resolvedTypePredicate=r?(o=r,s=t.mapper,Is(o.kind,o.parameterName,o.parameterIndex,gl(o.type,s))):Qt}else if(t.unionSignatures)t.resolvedTypePredicate=function(e){for(var t,r=[],n=0,i=e;n<i.length;n++){var a=Js(i[n]);if(a&&2!==a.kind&&3!==a.kind){if(t){if(!$c(t,a))return}else t=a;r.push(a.type)}}if(!t)return;var o=Qc(r);return Is(t.kind,t.parameterName,t.parameterIndex,o)}(t.unionSignatures)||Qt;else{var n=t.declaration&&e.getEffectiveReturnTypeNode(t.declaration),i=void 0;if(!n&&e.isInJSFile(t.declaration)){var a=Rs(t.declaration);a&&t!==a&&(i=Js(a))}t.resolvedTypePredicate=n&&e.isTypePredicateNode(n)?function(t,r){var n=t.parameterName,i=t.type&&Yu(t.type);return 182===n.kind?Is(t.assertsModifier?2:0,void 0,void 0,i):Is(t.assertsModifier?3:1,n.escapedText,e.findIndex(r.parameters,(function(e){return e.escapedName===n.escapedText})),i)}(n,t):i||Qt}e.Debug.assert(!!t.resolvedTypePredicate)}var o,s;return t.resolvedTypePredicate===Qt?void 0:t.resolvedTypePredicate}function zs(t){if(!t.resolvedReturnType){if(!qi(t,3))return xe;var r=t.target?gl(zs(t.target),t.mapper):t.unionSignatures?Qc(e.map(t.unionSignatures,zs),2):Us(t.declaration)||(e.nodeIsMissing(t.declaration.body)?he:Xg(t.declaration));if(R(t)&&(r=V_(r)),!Hi()){if(t.declaration){var n=e.getEffectiveReturnTypeNode(t.declaration);if(n)Xr(n,e.Diagnostics.Return_type_annotation_circularly_references_itself);else if(H){var i=t.declaration,a=e.getNameOfDeclaration(i);a?Xr(a,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,e.declarationNameToString(a)):Xr(i,e.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}r=he}t.resolvedReturnType=r}return t.resolvedReturnType}function Us(t){if(161===t.kind)return Ha(ti(t.parent.symbol));if(e.isJSDocConstructSignature(t))return Yu(t.parameters[0].type);var r=e.getEffectiveReturnTypeNode(t);if(r)return Yu(r);if(162===t.kind&&!go(t)){var n=e.isInJSFile(t)&&aa(t);if(n)return n;var i=Ta(e.getDeclarationOfKind(ri(t),163));if(i)return i}return function(e){var t=Rs(e);return t&&zs(t)}(t)}function Vs(e){return!e.resolvedReturnType&&Wi(e,3)>=0}function qs(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]),r=w_(t)?I_(t):t;return r&&Es(r,1)}}function Ws(e,t,r,n){var i=Gs(e,Ms(t,e.typeParameters,Os(e.typeParameters),r));if(n){var a=Wm(zs(i));if(a){var o=Eo(a);o.typeParameters=n;var s=Eo(i);return s.resolvedReturnType=$s(o),s}}return i}function Gs(t,r){var n=t.instantiations||(t.instantiations=e.createMap()),i=oc(r),a=n.get(i);return a||n.set(i,a=Hs(t,r)),a}function Hs(e,t){return sl(e,function(e,t){return el(e.typeParameters,t)}(e,t),!0)}function Ys(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return sl(e,tl(e.typeParameters),!0)}(e)):e}function Xs(t){return t.typeParameters?t.canonicalSignatureCache||(t.canonicalSignatureCache=function(t){return Ws(t,e.map(t.typeParameters,(function(e){return e.target&&!ns(e.target)?e.target:e})),e.isInJSFile(t.declaration))}(t)):t}function Qs(t){var r=t.typeParameters;if(r){var n=tl(r);return sl(t,el(r,e.map(r,(function(e){return gl(cs(e),n)||De}))),!0)}return t}function $s(t){if(!t.isolatedSignatureType){var r=t.declaration?t.declaration.kind:0,n=161===r||165===r||170===r,i=pi(16);i.members=B,i.properties=e.emptyArray,i.callSignatures=n?e.emptyArray:[t],i.constructSignatures=n?[t]:e.emptyArray,t.isolatedSignatureType=i}return t.isolatedSignatureType}function Zs(e){return e.members.get("__index")}function ec(t,r){var n=1===r?139:142,i=Zs(t);if(i)for(var a=0,o=i.declarations;a<o.length;a++){var s=o[a],c=e.cast(s,e.isIndexSignatureDeclaration);if(1===c.parameters.length){var u=c.parameters[0];if(u.type&&u.type.kind===n)return c}}}function tc(e,t,r){return{type:e,isReadonly:t,declaration:r}}function rc(t,r){var n=ec(t,r);if(n)return tc(n.type?Yu(n.type):he,e.hasModifier(n,64),n)}function nc(t){return e.mapDefined(e.filter(t.symbol&&t.symbol.declarations,e.isTypeParameterDeclaration),e.getEffectiveConstraintOfTypeParameter)[0]}function ic(t){if(!t.constraint)if(t.target){var r=ns(t.target);t.constraint=r?gl(r,t.mapper):Ze}else{var n=nc(t);t.constraint=n?Yu(n):function(t){var r;if(t.symbol)for(var n=0,i=t.symbol.declarations;n<i.length;n++){var a=i[n];if(180===a.parent.kind){var o=a.parent.parent;if(168===o.kind){var s=o,c=th(s);if(c){var u=s.typeArguments.indexOf(a.parent);if(u<c.length){var l=ns(c[u]);if(l){var _=gl(l,el(c,Zy(s,c)));_!==t&&(r=e.append(r,_))}}}}else 155===o.kind&&o.dotDotDotToken&&(r=e.append(r,jc(De)))}}return r&&iu(r)}(t)||Ze}return t.constraint===Ze?void 0:t.constraint}function ac(t){var r=e.getDeclarationOfKind(t.symbol,154),n=e.isJSDocTemplateTag(r.parent)?e.getHostSignatureFromJSDoc(r.parent):r.parent;return n&&ri(n)}function oc(e){var t="";if(e)for(var r=e.length,n=0;n<r;){for(var i=e[n].id,a=1;n+a<r&&e[n+a].id===i+a;)a++;t.length&&(t+=","),t+=i,a>1&&(t+=":"+a),n+=a}return t}function sc(t,r){for(var n=0,i=0,a=t;i<a.length;i++){var o=a[i];o.flags&r||(n|=e.getObjectFlags(o))}return 1835008&n}function cc(e,t){var r=oc(t),n=e.instantiations.get(r);return n||(n=pi(4,e.symbol),e.instantiations.set(r,n),n.objectFlags|=t?sc(t,0):0,n.target=e,n.resolvedTypeArguments=t),n}function uc(e){var t=li(e.flags);return t.symbol=e.symbol,t.objectFlags=e.objectFlags,t.target=e.target,t.resolvedTypeArguments=e.resolvedTypeArguments,t}function lc(e,t,r){var n=Mu(t),i=Lu(n),a=pi(4,e.symbol);return a.target=e,a.node=t,a.mapper=r,a.aliasSymbol=n,a.aliasTypeArguments=r?Qu(i,r):i,a}function _c(t){var r,n;if(!t.resolvedTypeArguments){if(!qi(t,7))return(null===(r=t.target.localTypeParameters)||void 0===r?void 0:r.map((function(){return xe})))||e.emptyArray;var i=t.node,a=i?168===i.kind?e.concatenate(t.target.outerTypeParameters,Zy(i,t.target.localTypeParameters)):173===i.kind?[Yu(i.elementType)]:e.map(i.elementTypes,Yu):e.emptyArray;Hi()?t.resolvedTypeArguments=t.mapper?Qu(a,t.mapper):a:(t.resolvedTypeArguments=(null===(n=t.target.localTypeParameters)||void 0===n?void 0:n.map((function(){return xe})))||e.emptyArray,Xr(t.node||l,t.target.symbol?e.Diagnostics.Type_arguments_for_0_circularly_reference_themselves:e.Diagnostics.Tuple_type_arguments_circularly_reference_themselves,t.target.symbol&&Pi(t.target.symbol)))}return t.resolvedTypeArguments}function dc(t){return e.length(t.target.typeParameters)}function pc(t,r){var n=ro(ti(r)),i=n.localTypeParameters;if(i){var a=e.length(t.typeArguments),o=Os(i),s=e.isInJSFile(t);if(!(!H&&s)&&(a<o||a>i.length)){var c=s&&e.isExpressionWithTypeArguments(t)&&!e.isJSDocAugmentsTag(t.parent);if(Xr(t,o===i.length?c?e.Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_1_type_argument_s:c?e.Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Ii(n,void 0,2),o,i.length),!s)return xe}return 168===t.kind&&Jc(t)?lc(n,t,void 0):cc(n,e.concatenate(n.outerTypeParameters,Ms(Ec(t),i,o,s)))}return Sc(t,r)?n:xe}function fc(t,r){var n=ro(t),i=_n(t),a=i.typeParameters,o=oc(r),s=i.instantiations.get(o);return s||i.instantiations.set(o,s=gl(n,el(a,Ms(r,a,Os(a),e.isInJSFile(t.valueDeclaration))))),s}function mc(t){switch(t.kind){case 168:return t.typeName;case 215:var r=t.expression;if(e.isEntityNameExpression(r))return r}}function gc(e,t,r){return e&&Kn(e,t,r)||ge}function yc(t,r){if(r===ge)return xe;if(96&(r=function(t){var r=t.valueDeclaration;if(r&&e.isInJSFile(r)&&!(524288&t.flags)){var n=e.isVariableDeclaration(r)?e.getDeclaredExpandoInitializer(r):e.getAssignedExpandoInitializer(r);return n&&ri(n)||void 0}}(r)||r).flags)return pc(t,r);if(524288&r.flags)return function(t,r){var n=ro(r),i=_n(r).typeParameters;if(i){var a=e.length(t.typeArguments),o=Os(i);return a<o||a>i.length?(Xr(t,o===i.length?e.Diagnostics.Generic_type_0_requires_1_type_argument_s:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Pi(r),o,i.length),xe):fc(r,Ec(t))}return Sc(t,r)?n:xe}(t,r);var n=no(r);if(n)return Sc(t,r)?262144&n.flags?xc(n,t):Vu(n):xe;if(111551&r.flags&&Dc(t)){var i=function(t,r){var n=wa(r),i=n;if(r.valueDeclaration){var a=e.getRootDeclaration(r.valueDeclaration),o=!1;if(e.isVariableDeclaration(a)&&a.initializer){for(var s=a.initializer;e.isPropertyAccessExpression(s);)s=s.expression;o=e.isCallExpression(s)&&e.isRequireCall(s,!0)&&!!n.symbol}var c=r!==n.symbol&&ti(r)===n.symbol;(o||187===t.kind||c)&&(i=yc(t,n.symbol))}return _n(r).resolvedJSDocType=i}(t,r);return i||(gc(mc(t),788968),wa(r))}return xe}function hc(e,t){if(3&t.flags||t===e)return e;var r=qc(e)+">"+qc(t),n=pe.get(r);if(n)return n;var i=li(33554432);return i.typeVariable=e,i.substitute=t,pe.set(r,i),i}function vc(e){return 174===e.kind&&1===e.elementTypes.length}function bc(e,t,r){return vc(t)&&vc(r)?bc(e,t.elementTypes[0],r.elementTypes[0]):ku(Yu(t))===e?Yu(r):void 0}function xc(t,r){for(var n;r&&!e.isStatement(r)&&301!==r.kind;){var i=r.parent;if(179===i.kind&&r===i.trueType){var a=bc(t,i.checkType,i.extendsType);a&&(n=e.append(n,a))}r=i}return n?hc(t,iu(e.append(n,t))):t}function Dc(e){return!!(4194304&e.flags)&&(168===e.kind||187===e.kind)}function Sc(t,r){return!t.typeArguments||(Xr(t,e.Diagnostics.Type_0_is_not_generic,r?Pi(r):t.typeName?e.declarationNameToString(t.typeName):"(anonymous)"),!1)}function Tc(t){var r=dn(t);if(!r.resolvedType){var n=void 0,i=void 0;Dc(t)&&((i=function(t){if(e.isIdentifier(t.typeName)){var r=t.typeArguments;switch(t.typeName.escapedText){case"String":return Sc(t),Ne;case"Number":return Sc(t),Ae;case"Boolean":return Sc(t),Me;case"Void":return Sc(t),Re;case"Undefined":return Sc(t),Se;case"Null":return Sc(t),Ce;case"Function":case"function":return Sc(t),ut;case"Array":case"array":return r&&r.length||H?void 0:vt;case"Promise":case"promise":return r&&r.length||H?void 0:Gg(he);case"Object":if(r&&2===r.length){if(e.isJSDocIndexSignature(t)){var n=Yu(r[0]),i=tc(Yu(r[1]),!1);return hi(void 0,B,e.emptyArray,e.emptyArray,n===Ne?i:void 0,n===Ae?i:void 0)}return he}return Sc(t),H?void 0:he}}}(t))||((n=gc(mc(t),788968,!0))===ge?n=gc(mc(t),900095):gc(mc(t),788968),i=yc(t,n))),i||(i=yc(t,n=gc(mc(t),788968))),r.resolvedSymbol=n,r.resolvedType=i}return r.resolvedType}function Ec(t){return e.map(t.typeArguments,Yu)}function Cc(e){var t=dn(e);return t.resolvedType||(t.resolvedType=Vu(rd(zy(e.exprName)))),t.resolvedType}function kc(t,r){function n(e){for(var t=0,r=e.declarations;t<r.length;t++){var n=r[t];switch(n.kind){case 244:case 245:case 247:return n}}}if(!t)return r?Qe:Ge;var i=ro(t);return 524288&i.flags?e.length(i.typeParameters)!==r?(Xr(n(t),e.Diagnostics.Global_type_0_must_have_1_type_parameter_s,e.symbolName(t),r),r?Qe:Ge):i:(Xr(n(t),e.Diagnostics.Global_type_0_must_be_a_class_or_interface_type,e.symbolName(t)),r?Qe:Ge)}function Nc(t,r){return Ac(t,111551,r?e.Diagnostics.Cannot_find_global_value_0:void 0)}function Ac(e,t,r){return gn(void 0,e,t,r,e,!1)}function Fc(t,r,n){var i=function(t,r){return Ac(t,788968,r?e.Diagnostics.Cannot_find_global_type_0:void 0)}(t,n);return i||n?kc(i,r):void 0}function Pc(e){return St||(St=Nc("Symbol",e))}function wc(e){return Tt||(Tt=Fc("Symbol",0,e))||Ge}function Ic(e){return Ct||(Ct=Fc("Promise",1,e))||Qe}function Oc(e){return Nt||(Nt=Nc("Promise",e))}function Mc(e){return Ft||(Ft=Fc("Iterable",1,e))||Qe}function Lc(e,t){void 0===t&&(t=0);var r=Ac(e,788968,void 0);return r&&kc(r,t)}function Rc(e,t){return e!==Qe?cc(e,t):Ge}function Bc(e){return Rc(Et||(Et=Fc("TypedPropertyDescriptor",1,!0))||Qe,[e])}function jc(e,t){return Rc(t?pt:dt,[e])}function Kc(t){var r=function(t){return e.isTypeOperatorNode(t)&&137===t.operator}(t.parent);if(173===t.kind||1===t.elementTypes.length&&176===t.elementTypes[0].kind)return r?pt:dt;var n=e.lastOrUndefined(t.elementTypes),i=n&&176===n.kind?n:void 0,a=e.findLastIndex(t.elementTypes,(function(e){return 175!==e.kind&&e!==i}))+1;return zc(t.elementTypes.length,a,!!i,r,void 0)}function Jc(e){var t=e.parent;switch(t.kind){case 181:case 168:case 177:case 178:case 184:case 179:case 183:return Jc(t);case 246:return!0}return!1}function zc(t,r,n,i,a){var o=t+(n?"+":",")+r+(i?"R":"")+(a&&a.length?","+a.join(","):""),s=ce.get(o);return s||ce.set(o,s=function(t,r,n,i,a){var o,s=[],c=n?t-1:t;if(t){o=new Array(t);for(var u=0;u<t;u++){var l=o[u]=fi();if(u<c){var _=en(4|(u>=r?16777216:0),""+u,i?8:0);_.type=l,s.push(_)}}}var d=[];for(u=r;u<=c;u++)d.push(Wu(u));var p=en(4,"length");p.type=n?Ae:Qc(d),s.push(p);var f=pi(12);return f.typeParameters=o,f.outerTypeParameters=void 0,f.localTypeParameters=o,f.instantiations=e.createMap(),f.instantiations.set(oc(f.typeParameters),f),f.target=f,f.resolvedTypeArguments=f.typeParameters,f.thisType=fi(),f.thisType.isThisType=!0,f.thisType.constraint=f,f.declaredProperties=s,f.declaredCallSignatures=e.emptyArray,f.declaredConstructSignatures=e.emptyArray,f.declaredStringIndexInfo=void 0,f.declaredNumberIndexInfo=void 0,f.minLength=r,f.hasRestElement=n,f.readonly=i,f.associatedNames=a,f}(t,r,n,i,a)),s}function Uc(e,t,r,n,i){void 0===t&&(t=e.length),void 0===r&&(r=!1),void 0===n&&(n=!1);var a=e.length;if(1===a&&r)return jc(e[0],n);var o=zc(a,t,a>0&&r,n,i);return e.length?cc(o,e):o}function Vc(e,t){var r=e.target;return r.hasRestElement&&(t=Math.min(t,dc(e)-1)),Uc(_c(e).slice(t),Math.max(0,r.minLength-t),r.hasRestElement,r.readonly,r.associatedNames&&r.associatedNames.slice(t))}function qc(e){return e.id}function Wc(t,r){return e.binarySearch(t,r,qc,e.compareValues)>=0}function Gc(t,r){var n=e.binarySearch(t,r,qc,e.compareValues);return n<0&&(t.splice(~n,0,r),!0)}function Hc(t,r,n){var i=n.flags;if(1048576&i)return Yc(t,r,n.types);if(!(131072&i))if(r|=68943871&i,66846720&i&&(r|=262144),n===be&&(r|=4194304),!V&&98304&i)262144&e.getObjectFlags(n)||(r|=2097152);else{var a=t.length,o=a&&n.id>t[a-1].id?~a:e.binarySearch(t,n,qc,e.compareValues);o<0&&t.splice(~o,0,n)}return r}function Yc(e,t,r){for(var n=0,i=r;n<i.length;n++){t=Hc(e,t,i[n])}return t}function Xc(t,r){var n=t.length;if(0===n||function(e){var t=e[0];if(1024&t.flags){for(var r=ni(t.symbol),n=1;n<e.length;n++){var i=e[n];if(!(1024&i.flags)||r!==ni(i.symbol))return!1}return!0}return!1}(t))return!0;for(var i=n,a=0;i>0;)for(var o=t[--i],s=0,c=t;s<c.length;s++){var u=c[s];if(o!==u){if(1e5===a)if(a/(n-i)*n>(r?25e6:1e6))return Xr(l,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1;if(a++,Al(o,u)&&(!(1&e.getObjectFlags(Oa(o)))||!(1&e.getObjectFlags(Oa(u)))||Pl(o,u))){e.orderedRemoveItemAt(t,i);break}}}return!0}function Qc(t,r,n,i){if(void 0===r&&(r=1),0===t.length)return Be;if(1===t.length)return t[0];var a=[],o=Yc(a,0,t);if(0!==r){if(3&o)return 1&o?4194304&o?be:he:De;switch(r){case 1:11136&o&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(128&i.flags&&4&r||256&i.flags&&8&r||2048&i.flags&&64&r||8192&i.flags&&4096&r||qu(i)&&Wc(t,i.regularType))&&e.orderedRemoveItemAt(t,n)}}(a,o);break;case 2:if(!Xc(a,!(262144&o)))return xe}if(0===a.length)return 65536&o?2097152&o?Ce:ke:32768&o?2097152&o?Se:Te:Be}return Zc(a,66994211&o?0:131072,n,i)}function $c(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function Zc(e,t,r,n){if(0===e.length)return Be;if(1===e.length)return e[0];var i=oc(e),a=ue.get(i);return a||(a=li(1048576),ue.set(i,a),a.objectFlags=t|sc(e,98304),a.types=e,a.aliasSymbol=r,a.aliasTypeArguments=n),a}function eu(e,t,r){var n=r.flags;return 2097152&n?tu(e,t,r.types):(Gl(r)?8388608&t||(t|=8388608,e.set(r.id.toString(),r)):(3&n?r===be&&(t|=4194304):!V&&98304&n||e.has(r.id.toString())||(109440&r.flags&&109440&t&&(t|=67108864),e.set(r.id.toString(),r)),t|=68943871&n),t)}function tu(e,t,r){for(var n=0,i=r;n<i.length;n++){t=eu(e,t,Vu(i[n]))}return t}function ru(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!Wc(i.types,t)){var a=128&t.flags?Ne:256&t.flags?Ae:2048&t.flags?Fe:8192&t.flags?Le:void 0;if(!a||!Wc(i.types,a))return!1}}return!0}function nu(t,r){if(e.every(t,(function(t){return!!(1048576&t.flags)&&e.some(t.types,(function(e){return!!(e.flags&r)}))}))){for(var n=0;n<t.length;n++)t[n]=_p(t[n],(function(e){return!(e.flags&r)}));return!0}return!1}function iu(t,r,n){var i=e.createMap(),a=tu(i,0,t),o=e.arrayFrom(i.values());if(131072&a||V&&98304&a&&76021760&a||67108864&a&&130044&a||132&a&&67238776&a||296&a&&67238612&a||2112&a&&67236796&a||12288&a&&67226620&a||49152&a&&67189756&a)return Be;if(1&a)return 4194304&a?be:he;if(!V&&98304&a)return 32768&a?Se:Ce;if((4&a&&128&a||8&a&&256&a||64&a&&2048&a||4096&a&&8192&a)&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(4&i.flags&&128&r||8&i.flags&&256&r||64&i.flags&&2048&r||4096&i.flags&&8192&r)&&e.orderedRemoveItemAt(t,n)}}(o,a),8388608&a&&524288&a&&e.orderedRemoveItemAt(o,e.findIndex(o,Gl)),0===o.length)return De;if(1===o.length)return o[0];var s=oc(o),c=le.get(s);if(!c){if(1048576&a)if(function(t){var r,n=e.findIndex(t,(function(t){return!!(131072&e.getObjectFlags(t))}));if(n<0)return!1;for(var i=n+1;i<t.length;){var a=t[i];131072&e.getObjectFlags(a)?((r||(r=[t[n]])).push(a),e.orderedRemoveItemAt(t,i)):i++}if(!r)return!1;for(var o=[],s=[],c=0,u=r;c<u.length;c++)for(var l=0,_=u[c].types;l<_.length;l++){Gc(o,a=_[l])&&ru(r,a)&&Gc(s,a)}return t[n]=Zc(s,131072),!0}(o))c=iu(o,r,n);else if(nu(o,32768))c=Qc([iu(o),Se],1,r,n);else if(nu(o,65536))c=Qc([iu(o),Ce],1,r,n);else{if(e.reduceLeft(o,(function(e,t){return e*(1048576&t.flags?t.types.length:1)}),1)>=1e5)return Xr(l,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),xe;var u=e.findIndex(o,(function(e){return 0!=(1048576&e.flags)})),_=o[u];c=Qc(e.map(_.types,(function(t){return iu(e.replaceElement(o,u,t))})),1,r,n)}else c=function(e,t,r){var n=li(2097152);return n.objectFlags=sc(e,98304),n.types=e,n.aliasSymbol=t,n.aliasTypeArguments=r,n}(o,r,n);le.set(s,c)}return c}function au(e,t){var r=li(4194304);return r.type=e,r.stringsOnly=t,r}function ou(t){return e.isIdentifier(t)?Wu(e.unescapeLeadingUnderscores(t.escapedText)):Vu(e.isComputedPropertyName(t)?Lf(t):zy(t))}function su(t,r){if(!(24&e.getDeclarationModifierFlagsFromSymbol(t))){var n=xo(t).nameType;if(!n&&!e.isKnownSymbol(t))if("default"===t.escapedName)n=Wu("default");else{var i=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);n=i&&ou(i)||Wu(e.symbolName(t))}if(n&&n.flags&r)return n}return Be}function cu(t,r){return Qc(e.map(ts(t),(function(e){return su(e,r)})))}function uu(e){var t=Ts(e,1);return t!==rr?t:void 0}function lu(t,r,n){return void 0===r&&(r=X),1048576&t.flags?iu(e.map(t.types,(function(e){return lu(e,r,n)}))):2097152&t.flags?Qc(e.map(t.types,(function(e){return lu(e,r,n)}))):fy(t,58982400)?function(e,t){return t?e.resolvedStringIndexType||(e.resolvedStringIndexType=au(e,!0)):e.resolvedIndexType||(e.resolvedIndexType=au(e,!1))}(t,r):32&e.getObjectFlags(t)?_p(zo(t),(function(e){return!(n&&5&e.flags)})):t===be?be:2&t.flags?Be:131073&t.flags?qe:r?!n&&Ts(t,0)?Ne:cu(t,128):!n&&Ts(t,0)?Qc([Ne,Ae,cu(t,8192)]):uu(t)?Qc([Ae,cu(t,8320)]):cu(t,8576)}function _u(t){if(X)return t;var r=zt||(zt=Ac("Extract",524288,e.Diagnostics.Cannot_find_global_type_0));return r?fc(r,[t,Ne]):Ne}function du(t){return!H&&(!!(16384&e.getObjectFlags(t))||(1048576&t.flags?e.every(t.types,du):2097152&t.flags?e.some(t.types,du):!!(63176704&t.flags)&&du(_s(t))))}function pu(t,r){var n=r&&194===r.kind?r:void 0;return _o(t)?yo(t):n&&Lm(n.argumentExpression,t,!1)?e.getPropertyNameForKnownSymbolName(e.idText(n.argumentExpression.name)):r&&e.isPropertyName(r)?e.getPropertyNameForPropertyNameNode(r):void 0}function fu(t,r,n,i,a,o,s){var c=o&&194===o.kind?o:void 0,u=pu(n,o);if(void 0!==u){var l=vs(r,u);if(l){if(c){if(Fm(l,c,103===c.expression.kind),e.isAssignmentTarget(c)&&(ly(c,l)||_y(c)))return void Xr(c.argumentExpression,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,Pi(l));4&s&&(dn(o).resolvedSymbol=l)}var _=wa(l);return c&&1!==e.getAssignmentTargetKind(c)?Op(c,_):_}if(lp(r,w_)&&Mf(u)&&+u>=0){if(o&&lp(r,(function(e){return!e.target.hasRestElement}))&&!(8&s)){var d=mu(o);w_(r)?Xr(d,e.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2,Ii(r),dc(r),e.unescapeLeadingUnderscores(u)):Xr(d,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(u),Ii(r))}return v(Ts(r,1)),pp(r,(function(e){return I_(e)||Se}))}}if(!(98304&n.flags)&&my(n,12716)){if(131073&r.flags)return r;var p=Ts(r,0),f=my(n,296)&&Ts(r,1)||p;if(f)return 1&s&&f===p?void(c&&Xr(c,e.Diagnostics.Type_0_cannot_be_used_to_index_type_1,Ii(n),Ii(t))):o&&!my(n,12)?(Xr(d=mu(o),e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Ii(n)),f.type):(v(f),f.type);if(131072&n.flags)return Be;if(du(r))return he;if(c&&!yy(r)){if(r.symbol===re&&void 0!==u&&re.exports.has(u)&&418&re.exports.get(u).flags)Xr(c,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(u),Ii(r));else if(H&&!K.suppressImplicitAnyIndexErrors&&!a)if(void 0!==u&&Tm(u,r))Xr(c,e.Diagnostics.Property_0_is_a_static_member_of_type_1,u,Ii(r));else if(Es(r,1))Xr(c.argumentExpression,e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{var m=void 0;if(void 0!==u&&(m=Cm(u,r)))void 0!==m&&Xr(c.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,u,Ii(r),m);else{var g=function(t,r){var n=e.isAssignmentTarget(r)?"set":"get";if(!function(e,r){void 0===r&&(r=1);var n=Zo(t,e);if(n){var i=qm(wa(n));if(i&&jg(i)===r&&"string"===Ii(Mg(i,0)))return!0}return!1}(n))return;var i=e.tryGetPropertyAccessOrIdentifierToString(r);void 0===i?i=n:i+="."+n;return i}(r,c);if(void 0!==g)Xr(c,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Ii(r),g);else{var y=void 0;if(1024&n.flags)y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+Ii(n)+"]",Ii(r));else if(8192&n.flags){var h=jn(n.symbol,c);y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+h+"]",Ii(r))}else 128&n.flags?y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,n.value,Ii(r)):256&n.flags?y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,n.value,Ii(r)):12&n.flags&&(y=e.chainDiagnosticMessages(void 0,e.Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Ii(n),Ii(r)));y=e.chainDiagnosticMessages(y,e.Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Ii(i),Ii(r)),jr.add(e.createDiagnosticForNodeFromMessageChain(c,y))}}}return}}if(du(r))return he;if(o){d=mu(o);384&n.flags?Xr(d,e.Diagnostics.Property_0_does_not_exist_on_type_1,""+n.value,Ii(r)):12&n.flags?Xr(d,e.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1,Ii(r),Ii(n)):Xr(d,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Ii(n))}return Qi(n)?n:void 0;function v(t){t&&t.isReadonly&&c&&(e.isAssignmentTarget(c)||e.isDeleteTarget(c))&&Xr(c,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,Ii(r))}}function mu(e){return 194===e.kind?e.argumentExpression:184===e.kind?e.indexType:153===e.kind?e.expression:e}function gu(e){return fy(e,59113472)}function yu(e){return fy(e,63176704)}function hu(e){return!!(262144&e.flags&&e.isThisType)}function vu(t,r){return 8388608&t.flags?function(t,r){var n=r?"simplifiedForWriting":"simplifiedForReading";if(t[n])return t[n]===et?t:t[n];t[n]=et;var i=vu(t.objectType,r),a=vu(t.indexType,r),o=function(t,r,n){if(1048576&r.flags){var i=e.map(r.types,(function(e){return vu(Su(t,e),n)}));return n?iu(i):Qc(i)}}(i,a,r);if(o)return t[n]=o;if(!(63176704&a.flags)){var s=bu(i,a,r);if(s)return t[n]=s}if(Xo(i))return t[n]=pp(Du(i,t.indexType),(function(e){return vu(e,r)}));return t[n]=t}(t,r):16777216&t.flags?function(e,t){var r=e.checkType,n=e.extendsType,i=Au(e),a=Fu(e);if(131072&a.flags&&ku(i)===ku(r)){if(1&r.flags||Fl(hl(r),hl(n)))return vu(i,t);if(xu(r,n))return Be}else if(131072&i.flags&&ku(a)===ku(r)){if(!(1&r.flags)&&Fl(hl(r),hl(n)))return Be;if(1&r.flags||xu(r,n))return vu(a,t)}return e}(t,r):t}function bu(t,r,n){if(3145728&t.flags){var i=e.map(t.types,(function(e){return vu(Su(e,r),n)}));return 2097152&t.flags||n?iu(i):Qc(i)}}function xu(e,t){return!!(131072&Qc([Io(e,t),Be]).flags)}function Du(e,t){var r=el([Jo(e)],[t]),n=rl(e.mapper,r);return gl(Uo(e),n)}function Su(e,t,r){return Tu(e,t,r,0)||(r?xe:De)}function Tu(e,t,r,n){if(void 0===n&&(n=0),e===be||t===be)return be;if(!Hl(e)||98304&t.flags||!my(t,12)||(t=Ne),yu(t)||(!r||184===r.kind)&&gu(e)){if(3&e.flags)return e;var i=e.id+","+t.id,a=de.get(i);return a||de.set(i,a=function(e,t){var r=li(8388608);return r.objectType=e,r.indexType=t,r}(e,t)),a}var o=ms(e);if(1048576&t.flags&&!(16&t.flags)){for(var s=[],c=!1,u=0,l=t.types;u<l.length;u++){var _=fu(e,o,l[u],t,c,r,n);if(_)s.push(_);else{if(!r)return;c=!0}}if(c)return;return 2&n?iu(s):Qc(s)}return fu(e,o,t,t,!1,r,4|n)}function Eu(e){var t=dn(e);if(!t.resolvedType){var r=Yu(e.objectType),n=Yu(e.indexType),i=Su(r,n,e);t.resolvedType=8388608&i.flags&&i.objectType===r&&i.indexType===n?xc(i,e):i}return t.resolvedType}function Cu(e){var t=dn(e);if(!t.resolvedType){var r=pi(32,e.symbol);r.declaration=e,r.aliasSymbol=Mu(e),r.aliasTypeArguments=Lu(r.aliasSymbol),t.resolvedType=r,zo(r)}return t.resolvedType}function ku(e){return 33554432&e.flags?e.typeVariable:8388608&e.flags&&(33554432&e.objectType.flags||33554432&e.indexType.flags)?Su(ku(e.objectType),ku(e.indexType)):e}function Nu(e,t){var r=gl(e.checkType,t),n=gl(e.extendsType,t);if(r===be||n===be)return be;var i,a=fy(r,63307776);if(e.inferTypeParameters){var o=cd(e.inferTypeParameters,void 0,0);a||Sd(o.inferences,r,n,192),i=rl(t,o.mapper)}var s=i?gl(e.extendsType,i):n;if(!a&&!fy(s,63307776)){if(3&s.flags)return gl(e.trueType,i||t);if(1&r.flags)return Qc([gl(e.trueType,i||t),gl(e.falseType,t)]);if(!Fl(yl(r),yl(s)))return gl(e.falseType,t);if(Fl(hl(r),hl(s)))return gl(e.trueType,i||t)}var c=ku(r),u=li(16777216);return u.root=e,u.checkType=c,u.extendsType=n,u.mapper=t,u.combinedMapper=i,u.aliasSymbol=e.aliasSymbol,u.aliasTypeArguments=Qu(e.aliasTypeArguments,t),u}function Au(e){return e.resolvedTrueType||(e.resolvedTrueType=gl(e.root.trueType,e.mapper))}function Fu(e){return e.resolvedFalseType||(e.resolvedFalseType=gl(e.root.falseType,e.mapper))}function Pu(t){var r;return t.locals&&t.locals.forEach((function(t){262144&t.flags&&(r=e.append(r,ro(t)))})),r}function wu(t){var r=dn(t);if(!r.resolvedType){if(t.isTypeOf&&t.typeArguments)return Xr(t,e.Diagnostics.Type_arguments_cannot_be_used_here),r.resolvedSymbol=ge,r.resolvedType=xe;if(!e.isLiteralImportTypeNode(t))return Xr(t.argument,e.Diagnostics.String_literal_expected),r.resolvedSymbol=ge,r.resolvedType=xe;var n=t.isTypeOf?111551:4194304&t.flags?900095:788968,i=zn(t,t.argument.literal);if(!i)return r.resolvedSymbol=ge,r.resolvedType=xe;var a=Wn(i,!1);if(e.nodeIsMissing(t.qualifier)){if(a.flags&n)r.resolvedType=Iu(t,r,a,n);else Xr(t,111551===n?e.Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,t.argument.literal.text),r.resolvedSymbol=ge,r.resolvedType=xe}else{for(var o=function t(r){return e.isIdentifier(r)?[r]:e.append(t(r.left),r.right)}(t.qualifier),s=a,c=void 0;c=o.shift();){var u=o.length?1920:n,l=fn(Qn(ti(On(s))),c.escapedText,u);if(!l)return Xr(c,e.Diagnostics.Namespace_0_has_no_exported_member_1,jn(s),e.declarationNameToString(c)),r.resolvedType=xe;dn(c).resolvedSymbol=l,dn(c.parent).resolvedSymbol=l,s=l}r.resolvedType=Iu(t,r,s,n)}}return r.resolvedType}function Iu(e,t,r,n){var i=On(r);return t.resolvedSymbol=i,111551===n?wa(r):yc(e,i)}function Ou(t){var r=dn(t);if(!r.resolvedType){var n=Mu(t);if(0!==bo(t.symbol).size||n){var i=pi(16,t.symbol);i.aliasSymbol=n,i.aliasTypeArguments=Lu(n),e.isJSDocTypeLiteral(t)&&t.isArrayType&&(i=jc(i)),r.resolvedType=i}else r.resolvedType=Xe}return r.resolvedType}function Mu(t){for(var r=t.parent;e.isParenthesizedTypeNode(r)||e.isTypeOperatorNode(r)&&137===r.operator;)r=r.parent;return e.isTypeAlias(r)?ri(r):void 0}function Lu(e){return e?ja(e):void 0}function Ru(e){return!!(524288&e.flags)&&!Xo(e)}function Bu(t,r,n,i,a){if(1&t.flags||1&r.flags)return he;if(2&t.flags||2&r.flags)return De;if(131072&t.flags)return r;if(131072&r.flags)return t;if(1048576&t.flags)return pp(t,(function(e){return Bu(e,r,n,i,a)}));if(1048576&r.flags)return pp(r,(function(e){return Bu(t,e,n,i,a)}));if(71307260&r.flags)return t;if(gu(t)||gu(r)){if(Wl(t))return r;if(2097152&t.flags){var o=t.types,s=o[o.length-1];if(Ru(s)&&Ru(r))return iu(e.concatenate(o.slice(0,o.length-1),[Bu(s,r,n,i,a)]))}return iu([t,r])}var c,u,l=e.createSymbolTable(),_=e.createUnderscoreEscapedMap();t===Ge?(c=Ts(r,0),u=Ts(r,1)):(c=Mo(Ts(t,0),Ts(r,0)),u=Mo(Ts(t,1),Ts(r,1)));for(var d=0,p=ts(r);d<p.length;d++){var f=p[d];24&e.getDeclarationModifierFlagsFromSymbol(f)?_.set(f.escapedName,!0):ju(f)&&l.set(f.escapedName,Ku(f,a))}for(var m=0,g=ts(t);m<g.length;m++){var y=g[m];if(!_.has(y.escapedName)&&ju(y))if(l.has(y.escapedName)){var h=wa(f=l.get(y.escapedName));if(16777216&f.flags){var v=e.concatenate(y.declarations,f.declarations),b=en(4|16777216&y.flags,y.escapedName);b.type=Qc([wa(y),Hd(h,524288)]),b.leftSpread=y,b.rightSpread=f,b.declarations=v,b.nameType=y.nameType,l.set(y.escapedName,b)}}else l.set(y.escapedName,Ku(y,a))}var x=hi(n,l,e.emptyArray,e.emptyArray,Ju(c,a),Ju(u,a));return x.objectFlags|=525440|i,x}function ju(t){return!(106496&t.flags&&t.declarations.some((function(t){return e.isClassLike(t.parent)})))}function Ku(e,t){var r=65536&e.flags&&!(32768&e.flags);if(!r&&t===uy(e))return e;var n=en(4|16777216&e.flags,e.escapedName,t?8:0);return n.type=r?Se:wa(e),n.declarations=e.declarations,n.nameType=e.nameType,n.syntheticOrigin=e,n}function Ju(e,t){return e&&e.isReadonly!==t?tc(e.type,t,e.declaration):e}function zu(e,t,r){var n=li(e);return n.symbol=r,n.value=t,n}function Uu(e){if(2944&e.flags){if(!e.freshType){var t=zu(e.flags,e.value,e.symbol);t.regularType=e,t.freshType=t,e.freshType=t}return e.freshType}return e}function Vu(t){return 2944&t.flags?t.regularType:1048576&t.flags?Qc(e.sameMap(t.types,Vu)):t}function qu(e){return!!(2944&e.flags)&&e.freshType===e}function Wu(t,r,n){var i=(r||"")+("number"==typeof t?"#":"string"==typeof t?"@":"n")+("object"===f(t)?e.pseudoBigIntToString(t):t),a=_e.get(i);if(!a){var o=("number"==typeof t?256:"string"==typeof t?128:2048)|(r?1024:0);_e.set(i,a=zu(o,t,n)),a.regularType=a}return a}function Gu(t){if(e.isValidESSymbolDeclaration(t)){var r=ri(t),n=_n(r);return n.uniqueESSymbolType||(n.uniqueESSymbolType=function(e){var t=li(8192);return t.symbol=e,t.escapedName="__@"+t.symbol.escapedName+"@"+A(t.symbol),t}(r))}return Le}function Hu(t){var r=dn(t);return r.resolvedType||(r.resolvedType=function(t){var r=e.getThisContainer(t,!1),n=r&&r.parent;if(n&&(e.isClassLike(n)||245===n.kind)&&!e.hasModifier(r,32)&&(!e.isConstructorDeclaration(r)||e.isNodeDescendantOf(t,r.body)))return Ha(ri(n)).thisType;if(n&&e.isObjectLiteralExpression(n)&&e.isBinaryExpression(n.parent)&&6===e.getAssignmentDeclarationKind(n.parent))return Ha(ri(n.parent.left).parent).thisType;var i=4194304&t.flags?e.getHostSignatureFromJSDoc(t):void 0;return i&&e.isFunctionExpression(i)&&e.isBinaryExpression(i.parent)&&3===e.getAssignmentDeclarationKind(i.parent)?Ha(ri(i.parent.left).parent).thisType:Sg(r)&&e.isNodeDescendantOf(t,r.body)?Ha(ri(r)).thisType:(Xr(t,e.Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),xe)}(t)),r.resolvedType}function Yu(t){switch(t.kind){case 124:case 293:case 294:return he;case 147:return De;case 142:return Ne;case 139:return Ae;case 150:return Fe;case 127:return Me;case 143:return Le;case 109:return Re;case 145:return Se;case 99:return Ce;case 136:return Be;case 140:return 131072&t.flags?he:Ue;case 182:case 103:return Hu(t);case 186:return function(e){var t=dn(e);return t.resolvedType||(t.resolvedType=Vu(zy(e.literal))),t.resolvedType}(t);case 168:return Tc(t);case 167:return t.assertsModifier?Re:Me;case 215:return Tc(t);case 171:return Cc(t);case 173:case 174:return function(t){var r=dn(t);if(!r.resolvedType){var n=Kc(t);if(n===Qe)r.resolvedType=Ge;else if(Jc(t))r.resolvedType=174===t.kind&&0===t.elementTypes.length?n:lc(n,t,void 0);else{var i=173===t.kind?[Yu(t.elementType)]:e.map(t.elementTypes,Yu);r.resolvedType=cc(n,i)}}return r.resolvedType}(t);case 175:return function(e){var t=Yu(e.type);return V?z_(t):t}(t);case 177:return function(t){var r=dn(t);if(!r.resolvedType){var n=Mu(t);r.resolvedType=Qc(e.map(t.types,Yu),1,n,Lu(n))}return r.resolvedType}(t);case 178:return function(t){var r=dn(t);if(!r.resolvedType){var n=Mu(t);r.resolvedType=iu(e.map(t.types,Yu),n,Lu(n))}return r.resolvedType}(t);case 295:return function(e){var t=Yu(e.type);return V?J_(t,65536):t}(t);case 297:return sa(Yu(t.type));case 181:case 296:case 292:return Yu(t.type);case 176:return v_(Yu(t.type))||xe;case 299:return function(t){var r=Yu(t.type),n=t.parent,i=t.parent.parent;if(e.isJSDocTypeExpression(t.parent)&&e.isJSDocParameterTag(i)){var a=e.getHostSignatureFromJSDoc(i);if(a){var o=e.lastOrUndefined(a.parameters),s=e.getParameterSymbolFromJSDoc(i);if(!o||s&&o.symbol===s&&e.isRestParameter(o))return jc(r)}}if(e.isParameter(n)&&e.isJSDocFunctionType(n.parent))return jc(r);return sa(r)}(t);case 169:case 170:case 172:case 302:case 298:case 303:return Ou(t);case 183:return function(t){var r=dn(t);if(!r.resolvedType)switch(t.operator){case 133:r.resolvedType=lu(Yu(t.type));break;case 146:r.resolvedType=143===t.type.kind?Gu(e.walkUpParenthesizedTypes(t.parent)):xe;break;case 137:r.resolvedType=Yu(t.type);break;default:throw e.Debug.assertNever(t.operator)}return r.resolvedType}(t);case 184:return Eu(t);case 185:return Cu(t);case 179:return function(t){var r=dn(t);if(!r.resolvedType){var n=Yu(t.checkType),i=Mu(t),a=Lu(i),o=Ra(t,!0),s=a?o:e.filter(o,(function(e){return ll(e,t)})),c={node:t,checkType:n,extendsType:Yu(t.extendsType),trueType:Yu(t.trueType),falseType:Yu(t.falseType),isDistributive:!!(262144&n.flags),inferTypeParameters:Pu(t),outerTypeParameters:s,instantiations:void 0,aliasSymbol:i,aliasTypeArguments:a};r.resolvedType=Nu(c,void 0),s&&(c.instantiations=e.createMap(),c.instantiations.set(oc(s),r.resolvedType))}return r.resolvedType}(t);case 180:return function(e){var t=dn(e);return t.resolvedType||(t.resolvedType=to(ri(e.typeParameter))),t.resolvedType}(t);case 187:return wu(t);case 75:case 152:var r=cb(t);return r?ro(r):xe;default:return xe}}function Xu(e,t,r){if(e&&e.length)for(var n=0;n<e.length;n++){var i=e[n],a=r(i,t);if(i!==a){var o=0===n?[]:e.slice(0,n);for(o.push(a),n++;n<e.length;n++)o.push(r(e[n],t));return o}}return e}function Qu(e,t){return Xu(e,t,gl)}function $u(e,t){return Xu(e,t,sl)}function Zu(e,t){return function(r){return r===e?t:r}}function el(t,r){return e.Debug.assert(void 0===r||t.length===r.length),1===t.length?Zu(t[0],r?r[0]:he):2===t.length?(n=t[0],i=r?r[0]:he,a=t[1],o=r?r[1]:he,function(e){return e===n?i:e===a?o:e}):function(e,t){return function(r){for(var n=0;n<e.length;n++)if(r===e[n])return t?t[n]:he;return r}}(t,r);var n,i,a,o}function tl(e){return el(e,void 0)}function rl(e,t){return e?t?function(r){return gl(e(r),t)}:e:t}function nl(e,t,r){return function(n){return n===e?t:r(n)}}function il(e){return 262144&e.flags?be:e}function al(e){return 262144&e.flags?(t=e).constraint===De?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=fi(t.symbol),t.restrictiveInstantiation.constraint=De,t.restrictiveInstantiation):e;var t}function ol(e){var t=fi(e.symbol);return t.target=e,t}function sl(t,r,n){var i;if(t.typeParameters&&!n){i=e.map(t.typeParameters,ol),r=rl(el(t.typeParameters,i),r);for(var a=0,o=i;a<o.length;a++){o[a].mapper=r}}var s=To(t.declaration,i,t.thisParameter&&cl(t.thisParameter,r),Xu(t.parameters,r,cl),void 0,void 0,t.minArgumentCount,3&t.flags);return s.target=t,s.mapper=r,s}function cl(t,r){var n=_n(t);if(n.type&&!fy(n.type,63700992))return t;1&e.getCheckFlags(t)&&(t=n.target,r=rl(n.mapper,r));var i=en(t.flags,t.escapedName,1|53256&e.getCheckFlags(t));return i.declarations=t.declarations,i.parent=t.parent,i.target=t,i.mapper=r,t.valueDeclaration&&(i.valueDeclaration=t.valueDeclaration),t.nameType&&(i.nameType=t.nameType),i}function ul(t,r){var n=64&t.objectFlags?t.target:t,i=4&t.objectFlags?t.node:t.symbol.declarations[0],a=dn(i),o=a.outerTypeParameters;if(!o){var s=i;if(e.isInJSFile(s)){var c=e.findAncestor(s,e.isJSDocParameterTag);if(c){var u=e.getParameterSymbolFromJSDoc(c);u&&(s=u.valueDeclaration)}}var l=Ra(s,!0);if(Sg(s)){var _=ks(s);l=e.addRange(l,_)}o=l||e.emptyArray,o=(4&n.objectFlags||2048&n.symbol.flags)&&!n.aliasTypeArguments?e.filter(o,(function(e){return ll(e,s)})):o,a.outerTypeParameters=o,o.length&&(a.instantiations=e.createMap(),a.instantiations.set(oc(o),n))}if(o.length){var d=e.map(o,rl(t.mapper,r)),p=oc(d),f=a.instantiations.get(p);if(!f){var m=el(o,d);f=4&n.objectFlags?lc(t.target,t.node,m):32&n.objectFlags?function(t,r){var n=_l(t);if(n){var i=gl(n,r);if(n!==i)return pp(i,(function(i){if(61603843&i.flags&&i!==be&&i!==xe){var a=nl(n,i,r);return y_(i)?function(e,t,r){var n=pl(t,Ae,!0,r);return n===xe?xe:jc(n,dl(h_(e),Go(t)))}(i,t,a):w_(i)?function(t,r,n){var i=t.target.minLength,a=e.map(_c(t),(function(e,t){return pl(r,Wu(""+t),t>=i,n)})),o=Go(r),s=4&o?0:8&o?dc(t)-(t.target.hasRestElement?1:0):i,c=dl(t.target.readonly,o);return e.contains(a,xe)?xe:Uc(a,s,t.target.hasRestElement,c,t.target.associatedNames)}(i,t,a):fl(t,a)}return i}))}return fl(t,r)}(n,m):fl(n,m),a.instantiations.set(p,f)}return f}return t}function ll(t,r){if(t.symbol&&t.symbol.declarations&&1===t.symbol.declarations.length){for(var n=t.symbol.declarations[0].parent,i=r;i!==n;i=i.parent)if(!i||222===i.kind||179===i.kind&&e.forEachChild(i.extendsType,a))return!0;return!!e.forEachChild(r,a)}return!0;function a(r){switch(r.kind){case 182:return!!t.isThisType;case 75:return!t.isThisType&&e.isPartOfTypeNode(r)&&function(e){return!(152===e.kind||168===e.parent.kind&&e.parent.typeArguments&&e===e.parent.typeName||187===e.parent.kind&&e.parent.typeArguments&&e===e.parent.qualifier)}(r)&&Yu(r)===t;case 171:return!0}return!!e.forEachChild(r,a)}}function _l(e){var t=zo(e);if(4194304&t.flags){var r=ku(t.type);if(262144&r.flags)return r}}function dl(e,t){return!!(1&t)||!(2&t)&&e}function pl(e,t,r,n){var i=rl(n,el([Jo(e)],[t])),a=gl(Uo(e.target||e),i),o=Go(e);return V&&4&o&&!Fl(Se,a)?z_(a):V&&8&o&&r?Hd(a,524288):a}function fl(e,t){var r=pi(64|e.objectFlags,e.symbol);if(32&e.objectFlags){r.declaration=e.declaration;var n=Jo(e),i=ol(n);r.typeParameter=i,t=rl(Zu(n,i),t),i.mapper=t}return r.target=e,r.mapper=t,r.aliasSymbol=e.aliasSymbol,r.aliasTypeArguments=Qu(e.aliasTypeArguments,t),r}function ml(t,r){var n=t.root;if(n.outerTypeParameters){var i=e.map(n.outerTypeParameters,r),a=oc(i),o=n.instantiations.get(a);if(!o)o=function(e,t){if(e.isDistributive){var r=e.checkType,n=t(r);if(r!==n&&1179648&n.flags)return pp(n,(function(n){return Nu(e,nl(r,n,t))}))}return Nu(e,t)}(n,el(n.outerTypeParameters,i)),n.instantiations.set(a,o);return o}return t}function gl(t,r){if(!t||!r||r===j)return t;if(50===T||x>=5e6)return Xr(l,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),xe;x++,T++;var n=function(e,t){var r=e.flags;if(262144&r)return t(e);if(524288&r){var n=e.objectFlags;if(16&n)return md(e)?ul(e,t):e;if(32&n)return ul(e,t);if(4&n){if(e.node)return ul(e,t);var i=e.resolvedTypeArguments,a=Qu(i,t);return a!==i?cc(e.target,a):e}return e}if(1048576&r&&!(131068&r)){var o=e.types;return(s=Qu(o,t))!==o?Qc(s,1,e.aliasSymbol,Qu(e.aliasTypeArguments,t)):e}if(2097152&r){var s;o=e.types;return(s=Qu(o,t))!==o?iu(s,e.aliasSymbol,Qu(e.aliasTypeArguments,t)):e}if(4194304&r)return lu(gl(e.type,t));if(8388608&r)return Su(gl(e.objectType,t),gl(e.indexType,t));if(16777216&r)return ml(e,rl(e.mapper,t));if(33554432&r){var c=gl(e.typeVariable,t);if(8650752&c.flags)return hc(c,gl(e.substitute,t));var u=gl(e.substitute,t);return 3&u.flags||Fl(hl(c),hl(u))?c:u}return e}(t,r);return T--,n}function yl(e){return 262143&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=gl(e,il))}function hl(e){return 262143&e.flags?e:e.restrictiveInstantiation?e.restrictiveInstantiation:(e.restrictiveInstantiation=gl(e,al),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation,e.restrictiveInstantiation)}function vl(e,t){return e&&tc(gl(e.type,t),e.isReadonly,e.declaration)}function bl(t){switch(e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 200:case 201:case 160:case 243:return xl(t);case 192:return e.some(t.properties,bl);case 191:return e.some(t.elements,bl);case 209:return bl(t.whenTrue)||bl(t.whenFalse);case 208:return(56===t.operatorToken.kind||60===t.operatorToken.kind)&&(bl(t.left)||bl(t.right));case 279:return bl(t.initializer);case 199:return bl(t.expression);case 272:return e.some(t.properties,bl)||e.isJsxOpeningElement(t.parent)&&e.some(t.parent.parent.children,bl);case 271:var r=t.initializer;return!!r&&bl(r);case 274:var n=t.expression;return!!n&&bl(n)}return!1}function xl(t){if(e.isFunctionDeclaration(t)&&(!e.isInJSFile(t)||!aa(t)))return!1;if(t.typeParameters)return!1;if(e.some(t.parameters,(function(t){return!e.getEffectiveTypeAnnotationNode(t)})))return!0;if(201!==t.kind){var r=e.firstOrUndefined(t.parameters);if(!r||!e.parameterIsThisKeyword(r))return!0}return Dl(t)}function Dl(e){return!!e.body&&222!==e.body.kind&&bl(e.body)}function Sl(t){return(e.isInJSFile(t)&&e.isFunctionDeclaration(t)||Cf(t)||e.isObjectLiteralMethod(t))&&xl(t)}function Tl(t){if(524288&t.flags){var r=Qo(t);if(r.constructSignatures.length||r.callSignatures.length){var n=pi(16,t.symbol);return n.members=r.members,n.properties=r.properties,n.callSignatures=e.emptyArray,n.constructSignatures=e.emptyArray,n}}else if(2097152&t.flags)return iu(e.map(t.types,Tl));return t}function El(e,t){return Ql(e,t,Wr)}function Cl(e,t){return Ql(e,t,Wr)?-1:0}function kl(e,t){return Ql(e,t,Vr)?-1:0}function Nl(e,t){return Ql(e,t,Ur)?-1:0}function Al(e,t){return Ql(e,t,Ur)}function Fl(e,t){return Ql(e,t,Vr)}function Pl(t,r){return 1048576&t.flags?e.every(t.types,(function(e){return Pl(e,r)})):1048576&r.flags?e.some(r.types,(function(e){return Pl(t,e)})):58982400&t.flags?Pl(cs(t)||De,r):r===ct?!!(67633152&t.flags):r===ut?!!(524288&t.flags)&&Wd(t):Ma(t,Oa(r))}function wl(e,t){return Ql(e,t,qr)}function Il(e,t){return wl(e,t)||wl(t,e)}function Ol(e,t,r,n,i,a){return Zl(e,t,Vr,r,n,i,a)}function Ml(e,t,r,n,i,a){return Ll(e,t,Vr,r,n,i,a,void 0)}function Ll(e,t,r,n,i,a,o,s){return!!Ql(e,t,r)||(!n||!Bl(i,e,t,r,a,o,s))&&Zl(e,t,r,n,a,o,s)}function Rl(t){return!!(16777216&t.flags||2097152&t.flags&&e.some(t.types,Rl))}function Bl(t,n,a,o,s,c,u){if(!t||Rl(a))return!1;if(!Zl(n,a,o,void 0)&&function(t,r,n,i,a,o,s){for(var c=xs(r,0),u=xs(r,1),l=0,_=[u,c];l<_.length;l++){var d=_[l];if(e.some(d,(function(e){var t=zs(e);return!(131073&t.flags)&&Zl(t,n,i,void 0)}))){var p=s||{};Ol(r,n,t,a,o,p);var f=p.errors[p.errors.length-1];return e.addRelatedInfo(f,e.createDiagnosticForNode(t,d===u?e.Diagnostics.Did_you_mean_to_use_new_with_this_expression:e.Diagnostics.Did_you_mean_to_call_this_expression)),!0}}return!1}(t,n,a,o,s,c,u))return!0;switch(t.kind){case 274:case 199:return Bl(t.expression,n,a,o,s,c,u);case 208:switch(t.operatorToken.kind){case 62:case 27:return Bl(t.right,n,a,o,s,c,u)}break;case 192:return function(t,r,n,a,o,s){return!(131068&n.flags)&&jl(function(t){var r,n,a,o;return i(this,(function(i){switch(i.label){case 0:if(!e.length(t.properties))return[2];r=0,n=t.properties,i.label=1;case 1:if(!(r<n.length))return[3,8];if(a=n[r],e.isSpreadAssignment(a))return[3,7];if(!(o=su(ri(a),8576))||131072&o.flags)return[3,7];switch(a.kind){case 163:case 162:case 160:case 280:return[3,2];case 279:return[3,4]}return[3,6];case 2:return[4,{errorNode:a.name,innerExpression:void 0,nameType:o}];case 3:return i.sent(),[3,7];case 4:return[4,{errorNode:a.name,innerExpression:a.initializer,nameType:o,errorMessage:Zi(a.name)?e.Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0}];case 5:return i.sent(),[3,7];case 6:e.Debug.assertNever(a),i.label=7;case 7:return r++,[3,1];case 8:return[2]}}))}(t),r,n,a,o,s)}(t,n,a,o,c,u);case 191:return function(e,t,r,n,i,a){if(131068&r.flags)return!1;if(D_(t))return jl(zl(e,r),t,r,n,i,a);var o=Ff(e,1,!0);if(D_(o))return jl(zl(e,r),o,r,n,i,a);return!1}(t,n,a,o,c,u);case 272:return function(t,n,a,o,s,c){var u,l=jl(function(t){var r,n,a;return i(this,(function(i){switch(i.label){case 0:if(!e.length(t.properties))return[2];r=0,n=t.properties,i.label=1;case 1:return r<n.length?(a=n[r],e.isJsxSpreadAttribute(a)?[3,3]:[4,{errorNode:a.name,innerExpression:a.initializer,nameType:Wu(e.idText(a.name))}]):[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}(t),n,a,o,s,c);if(e.isJsxOpeningElement(t.parent)&&e.isJsxElement(t.parent.parent)){var _=t.parent.parent,d=Xf(Hf(t)),p=void 0===d?"children":e.unescapeLeadingUnderscores(d),f=Wu(p),m=Su(a,f),g=Jl(_.children);if(!e.length(g))return l;var y=e.length(g)>1,h=_p(m,S_),v=_p(m,(function(e){return!S_(e)}));if(y){if(h!==Be){var b=Uc(Vf(_,0)),x=function(t,r){var n,a,o,s,c;return i(this,(function(i){switch(i.label){case 0:if(!e.length(t.children))return[2];n=0,a=0,i.label=1;case 1:return a<t.children.length?(o=t.children[a],s=Wu(a-n),(c=Kl(o,s,r))?[4,c]:[3,3]):[3,5];case 2:return i.sent(),[3,4];case 3:n++,i.label=4;case 4:return a++,[3,1];case 5:return[2]}}))}(_,T);l=jl(x,b,h,o,s,c)||l}else if(!Ql(Su(n,f),m,o)){l=!0;var D=Xr(_.openingElement.tagName,e.Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,p,Ii(m));c&&c.skipLogging&&(c.errors||(c.errors=[])).push(D)}}else if(v!==Be){var S=Kl(g[0],f,T);S&&(l=jl(function(){return i(this,(function(e){switch(e.label){case 0:return[4,S];case 1:return e.sent(),[2]}}))}(),n,a,o,s,c)||l)}else if(!Ql(Su(n,f),m,o)){l=!0;D=Xr(_.openingElement.tagName,e.Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,p,Ii(m));c&&c.skipLogging&&(c.errors||(c.errors=[])).push(D)}}return l;function T(){if(!u){var n=e.getTextOfNode(t.parent.tagName),i=Xf(Hf(t)),o=void 0===i?"children":e.unescapeLeadingUnderscores(i),s=Su(a,Wu(o)),c=e.Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;u=r(r({},c),{key:"!!ALREADY FORMATTED!!",message:e.formatMessage(void 0,c,n,o,Ii(s))})}return u}}(t,n,a,o,c,u);case 201:return function(t,r,n,i,a,o){if(e.isBlock(t.body))return!1;if(e.some(t.parameters,e.hasType))return!1;var s=qm(r);if(!s)return!1;var c=xs(n,0);if(!e.length(c))return!1;var u=t.body,l=zs(s),_=Qc(e.map(c,zs));if(!Zl(l,_,i,void 0)){var d=u&&Bl(u,l,_,i,void 0,a,o);if(d)return d;var p=o||{};if(Zl(l,_,i,u,void 0,a,p),p.errors)return n.symbol&&e.length(n.symbol.declarations)&&e.addRelatedInfo(p.errors[p.errors.length-1],e.createDiagnosticForNode(n.symbol.declarations[0],e.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)),!0}return!1}(t,n,a,o,c,u)}return!1}function jl(t,r,n,i,a,o){for(var s=!1,c=t.next();!c.done;c=t.next()){var u=c.value,l=u.errorNode,_=u.innerExpression,d=u.nameType,p=u.errorMessage,f=Tu(n,d);if(f&&!(8388608&f.flags)){var m=Tu(r,d);if(m&&!Zl(m,f,i,void 0))if(_&&Bl(_,m,f,i,void 0,a,o))s=!0;else{var g=o||{},y=_?wy(_,0,m):m;if(Zl(y,f,i,l,p,a,g)&&y!==m&&Zl(m,f,i,l,p,a,g),g.errors){var h=g.errors[g.errors.length-1],v=_o(d)?yo(d):void 0,b=void 0!==v?vs(n,v):void 0,x=!1;if(!b){var D=my(d,296)&&Ts(n,1)||Ts(n,0)||void 0;D&&D.declaration&&!e.getSourceFileOfNode(D.declaration).hasNoDefaultLib&&(x=!0,e.addRelatedInfo(h,e.createDiagnosticForNode(D.declaration,e.Diagnostics.The_expected_type_comes_from_this_index_signature)))}if(!x&&(b&&e.length(b.declarations)||n.symbol&&e.length(n.symbol.declarations))){var S=b&&e.length(b.declarations)?b.declarations[0]:n.symbol.declarations[0];e.getSourceFileOfNode(S).hasNoDefaultLib||e.addRelatedInfo(h,e.createDiagnosticForNode(S,e.Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!v||8192&d.flags?Ii(d):e.unescapeLeadingUnderscores(v),Ii(n)))}}s=!0}}}return s}function Kl(t,r,n){switch(t.kind){case 274:return{errorNode:t,innerExpression:t.expression,nameType:r};case 11:if(t.containsOnlyTriviaWhiteSpaces)break;return{errorNode:t,innerExpression:void 0,nameType:r,errorMessage:n()};case 264:case 265:case 268:return{errorNode:t,innerExpression:t,nameType:r};default:return e.Debug.assertNever(t,"Found invalid jsx child")}}function Jl(t){return e.filter(t,(function(t){return!e.isJsxText(t)||!t.containsOnlyTriviaWhiteSpaces}))}function zl(t,r){var n,a,o,s;return i(this,(function(i){switch(i.label){case 0:if(!(n=e.length(t.elements)))return[2];a=0,i.label=1;case 1:return a<n?D_(r)&&!vs(r,""+a)?[3,3]:(o=t.elements[a],e.isOmittedExpression(o)?[3,3]:(s=Wu(a),[4,{errorNode:o,innerExpression:o,nameType:s}])):[3,4];case 2:i.sent(),i.label=3;case 3:return a++,[3,1];case 4:return[2]}}))}function Ul(e,t,r,n,i){return Zl(e,t,qr,r,n,i)}function Vl(t,r,n,i,a,o,s,c){if(t===r)return-1;if(function(e){return!e.typeParameters&&(!e.thisParameter||Qi(Ig(e.thisParameter)))&&1===e.parameters.length&&M(e)&&(Ig(e.parameters[0])===vt||Qi(Ig(e.parameters[0])))&&Qi(zs(e))}(r))return-1;var u=Bg(r);if(!Kg(r)&&jg(t)>u)return 0;t.typeParameters&&t.typeParameters!==r.typeParameters&&(t=Hm(t,r=Xs(r),void 0,c));var l=Bg(t),_=zg(t),d=zg(r);if(_&&d&&l!==u)return 0;var p=r.declaration?r.declaration.kind:0,f=!n&&q&&160!==p&&159!==p&&161!==p,m=-1,g=Ks(t);if(g&&g!==Re){var y=Ks(r);if(y){if(!(x=!f&&c(g,y,!1)||c(y,g,a)))return a&&o(e.Diagnostics.The_this_types_of_each_signature_are_incompatible),0;m&=x}}for(var h=_||d?Math.min(l,u):Math.max(l,u),v=_||d?h-1:-1,b=0;b<h;b++){var x,D=b===v?Rg(t,b):Mg(t,b),S=b===v?Rg(r,b):Mg(r,b),T=n?void 0:qm(U_(D)),E=n?void 0:qm(U_(S));if(!(x=T&&E&&!Js(T)&&!Js(E)&&(98304&R_(D))==(98304&R_(S))?Vl(E,T,f?2:1,!1,a,o,s,c):!n&&!f&&c(D,S,!1)||c(S,D,a)))return a&&o(e.Diagnostics.Types_of_parameters_0_and_1_are_incompatible,e.unescapeLeadingUnderscores(Og(t,b)),e.unescapeLeadingUnderscores(Og(r,b))),0;m&=x}if(!i){var C=Vs(r)?he:r.declaration&&Sg(r.declaration)?Ha(ti(r.declaration.symbol)):zs(r);if(C===Re)return m;var k=Vs(t)?he:t.declaration&&Sg(t.declaration)?Ha(ti(t.declaration.symbol)):zs(t),N=Js(r);if(N){var A=Js(t);if(A)m&=function(t,r,n,i,a){if(t.kind!==r.kind)return n&&(i(e.Diagnostics.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Ri(t),Ri(r))),0;if((1===t.kind||3===t.kind)&&t.parameterIndex!==r.parameterIndex)return n&&(i(e.Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1,t.parameterName,r.parameterName),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Ri(t),Ri(r))),0;var o=t.type===r.type?-1:t.type&&r.type?a(t.type,r.type,n):0;0===o&&n&&i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Ri(t),Ri(r));return o}(A,N,a,o,c);else if(e.isIdentifierTypePredicate(N))return a&&o(e.Diagnostics.Signature_0_must_be_a_type_predicate,wi(t)),0}else!(m&=1===n&&c(C,k,!1)||c(k,C,a))&&a&&s&&s(k,C)}return m}function ql(e,t){var r=Ys(e),n=Ys(t),i=zs(r),a=zs(n);return!(a!==Re&&!Ql(a,i,Vr)&&!Ql(i,a,Vr))&&0!==Vl(r,n,0,!0,!1,void 0,void 0,kl)}function Wl(t){return 524288&t.flags?!Xo(t)&&(0===(r=Qo(t)).properties.length&&0===r.callSignatures.length&&0===r.constructSignatures.length&&!r.stringIndexInfo&&!r.numberIndexInfo):!!(67108864&t.flags)||(1048576&t.flags?e.some(t.types,Wl):!!(2097152&t.flags)&&e.every(t.types,Wl));var r}function Gl(t){return!!(16&e.getObjectFlags(t))&&Wl(t)}function Hl(t){return 524288&t.flags&&!Xo(t)&&0===ts(t).length&&Ts(t,0)&&!Ts(t,1)||3145728&t.flags&&e.every(t.types,Hl)||!1}function Yl(t,r,n){if(t===r)return!0;var i=A(t)+","+A(r),a=Gr.get(i);if(void 0!==a&&(4&a||!(2&a)||!n))return!!(1&a);if(!(t.escapedName===r.escapedName&&256&t.flags&&256&r.flags))return Gr.set(i,6),!1;for(var o=wa(r),s=0,c=ts(wa(t));s<c.length;s++){var u=c[s];if(8&u.flags){var l=vs(o,u.escapedName);if(!(l&&8&l.flags))return n?(n(e.Diagnostics.Property_0_is_missing_in_type_1,e.symbolName(u),Ii(ro(r),void 0,64)),Gr.set(i,6)):Gr.set(i,2),!1}}return Gr.set(i,1),!0}function Xl(e,t,r,n){var i=e.flags,a=t.flags;if(3&a||131072&i||e===be)return!0;if(131072&a)return!1;if(132&i&&4&a)return!0;if(128&i&&1024&i&&128&a&&!(1024&a)&&e.value===t.value)return!0;if(296&i&&8&a)return!0;if(256&i&&1024&i&&256&a&&!(1024&a)&&e.value===t.value)return!0;if(2112&i&&64&a)return!0;if(528&i&&16&a)return!0;if(12288&i&&4096&a)return!0;if(32&i&&32&a&&Yl(e.symbol,t.symbol,n))return!0;if(1024&i&&1024&a){if(1048576&i&&1048576&a&&Yl(e.symbol,t.symbol,n))return!0;if(2944&i&&2944&a&&e.value===t.value&&Yl(ni(e.symbol),ni(t.symbol),n))return!0}if(32768&i&&(!V||49152&a))return!0;if(65536&i&&(!V||65536&a))return!0;if(524288&i&&67108864&a)return!0;if(r===Vr||r===qr){if(1&i)return!0;if(264&i&&!(1024&i)&&(32&a||256&a&&1024&a))return!0}return!1}function Ql(e,t,r){if(qu(e)&&(e=e.regularType),qu(t)&&(t=t.regularType),e===t||r===qr&&!(131072&t.flags)&&Xl(t,e,r)||r!==Wr&&Xl(e,t,r))return!0;if(524288&e.flags&&524288&t.flags){var n=r.get(u_(e,t,!1,r));if(void 0!==n)return!!(1&n)}return!!(66846720&e.flags||66846720&t.flags)&&Zl(e,t,r,void 0)}function $l(t,r){return 4096&e.getObjectFlags(t)&&!Jf(r.escapedName)}function Zl(r,n,i,a,o,s,c){var u,l,_,d,p,m,g=0,y=0,h=0,v=!1,b=0,x=[];e.Debug.assert(i!==Wr||!a,"no error reporting in identity checking");var D=L(r,n,!!a,o);if(x.length&&w(),v){var S=Xr(a,e.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1,Ii(r),Ii(n));c&&(c.errors||(c.errors=[])).push(S)}else if(u){if(s){var T=s();T&&(e.concatenateDiagnosticMessageChains(T,u),u=T)}var E=void 0;if(o&&a&&!D&&r.symbol){var k=_n(r.symbol);if(k.originatingImport&&!e.isImportCall(k.originatingImport))if(Zl(wa(k.target),n,i,void 0)){var N=e.createDiagnosticForNode(k.originatingImport,e.Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead);E=e.append(E,N)}}S=e.createDiagnosticForNodeFromMessageChain(a,u,E);l&&e.addRelatedInfo.apply(void 0,t([S],l)),c&&(c.errors||(c.errors=[])).push(S),c&&c.skipLogging||jr.add(S)}return a&&c&&c.skipLogging&&0===D&&e.Debug.assert(!!c.errors,"missed opportunity to interact with error."),0!==D;function A(e){u=e.errorInfo,m=e.lastSkippedInfo,x=e.incompatibleStack,b=e.overrideNextErrorInfo,l=e.relatedInfo}function F(){return{errorInfo:u,lastSkippedInfo:m,incompatibleStack:x.slice(),overrideNextErrorInfo:b,relatedInfo:l?l.slice():void 0}}function P(e,t,r,n,i){b++,m=void 0,x.push([e,t,r,n,i])}function w(){var r=x;x=[];var n=m;if(m=void 0,1===r.length)return I.apply(void 0,r[0]),void(n&&O.apply(void 0,t([void 0],n)));for(var i="",a=[];r.length;){var o=r.pop(),s=o[0],c=o.slice(1);switch(s.code){case e.Diagnostics.Types_of_property_0_are_incompatible.code:0===i.indexOf("new ")&&(i="("+i+")");var u=""+c[0];i=0===i.length?""+u:e.isIdentifierText(u,K.target)?i+"."+u:"["===u[0]&&"]"===u[u.length-1]?""+i+u:i+"["+u+"]";break;case e.Diagnostics.Call_signature_return_types_0_and_1_are_incompatible.code:case e.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:case e.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case e.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:if(0===i.length){var l=s;s.code===e.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?l=e.Diagnostics.Call_signature_return_types_0_and_1_are_incompatible:s.code===e.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(l=e.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible),a.unshift([l,c[0],c[1]])}else{i=""+(s.code===e.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code||s.code===e.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":"")+i+"("+(s.code===e.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||s.code===e.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"...")+")"}break;default:return e.Debug.fail("Unhandled Diagnostic: "+s.code)}}i?I(")"===i[i.length-1]?e.Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types:e.Diagnostics.The_types_of_0_are_incompatible_between_these_types,i):a.shift();for(var _=0,d=a;_<d.length;_++){var p=d[_],f=(s=p[0],c=p.slice(1),s.elidedInCompatabilityPyramid);s.elidedInCompatabilityPyramid=!1,I.apply(void 0,t([s],c)),s.elidedInCompatabilityPyramid=f}n&&O.apply(void 0,t([void 0],n))}function I(t,r,n,i,o){e.Debug.assert(!!a),x.length&&w(),t.elidedInCompatabilityPyramid||(u=e.chainDiagnosticMessages(u,t,r,n,i,o))}function O(t,r,n){x.length&&w();var a=Oi(r,n),o=a[0],s=a[1];262144&n.flags&&void 0!==n.immediateBaseConstraint&&Fl(r,n.immediateBaseConstraint)&&I(e.Diagnostics._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,o,s,Ii(n.immediateBaseConstraint)),t||(t=i===qr?e.Diagnostics.Type_0_is_not_comparable_to_type_1:o===s?e.Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:e.Diagnostics.Type_0_is_not_assignable_to_type_1),I(t,o,s)}function M(t,r,n){if(D_(t)){var i=t.target;return i&&i.readonly&&S_(r)&&(!h_(r)||w_(r)&&!r.target.readonly)?(n&&I(e.Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ii(t),Ii(r)),!1):b_(r)}return D_(r)?b_(t):!(h_(t)&&y_(r)&&!h_(r))||(n&&I(e.Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ii(t),Ii(r)),!1)}function L(t,r,n,o,s){if(void 0===n&&(n=!1),qu(t)&&(t=t.regularType),qu(r)&&(r=r.regularType),33554432&t.flags&&(t=t.substitute),33554432&r.flags&&(r=r.typeVariable),25165824&t.flags&&(t=vu(t,!1)),25165824&r.flags&&(r=vu(r,!0)),1048576&r.flags&&524288&t.flags&&r.types.length<=3&&fy(r,98304)){var c=fp(r,-98305);1179648&c.flags||(r=c)}if(t===r)return-1;if(i===Wr)return function(e,t){var r,n=e.flags&t.flags;if(524288&n||8388608&n||16777216&n||4194304&n||33554432&n)return z(e,t,!1,!1);if(3145728&n&&(r=R(e,t))&&(r&=R(t,e)))return r;return 0}(t,r);if(i===qr&&!(131072&r.flags)&&Xl(r,t,i)||Xl(t,r,i,n?I:void 0))return-1;var l=!!(4096&e.getObjectFlags(t)),_=!s&&Cd(t)&&32768&e.getObjectFlags(t);if(_){var d=1048576&r.flags?j(t,r):void 0;if(function t(r,n,o,s){if(!H&&16384&e.getObjectFlags(n))return!1;if(im(n)){var c=!!(4096&e.getObjectFlags(r));if((i===Vr||i===qr)&&(cp(ct,n)||!c&&Wl(n)))return!1;if(o)return t(r,o,void 0,s);for(var u=function(t){if(function(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}(t,r.symbol)&&!nm(n,t.escapedName,c)){if(s){var i=_p(n,im);if(!a)return{value:e.Debug.fail()};if(e.isJsxAttributes(a)||e.isJsxOpeningLikeElement(a)||e.isJsxOpeningLikeElement(a.parent))t.valueDeclaration&&e.isJsxAttribute(t.valueDeclaration)&&(a=t.valueDeclaration.name),I(e.Diagnostics.Property_0_does_not_exist_on_type_1,Pi(t),Ii(i));else{var o=r.symbol&&e.firstOrUndefined(r.symbol.declarations),u=void 0;if(t.valueDeclaration&&e.findAncestor(t.valueDeclaration,(function(e){return e===o}))){var l=t.valueDeclaration;e.Debug.assertNode(l,e.isObjectLiteralElementLike),a=l;var _=l.name;e.isIdentifier(_)&&(u=Cm(_,i))}void 0!==u?I(e.Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Pi(t),Ii(i),u):I(e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Pi(t),Ii(i))}}return{value:!0}}},l=0,_=ts(r);l<_.length;l++){var d=_[l],p=u(d);if("object"===f(p))return p.value}}return!1}(t,r,d,n))return n&&O(o,t,r),0}var p=i!==qr&&!s&&2752508&t.flags&&t!==ct&&2621440&r.flags&&t_(r)&&(ts(t).length>0||mb(t));if(p&&!function(e,t,r){for(var n=0,i=ts(e);n<i.length;n++){var a=i[n];if(nm(t,a.escapedName,r))return!0}return!1}(t,r,l)){if(n){var g=xs(t,0),y=xs(t,1);g.length>0&&L(zs(g[0]),r,!1)||y.length>0&&L(zs(y[0]),r,!1)?I(e.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Ii(t),Ii(r)):I(e.Diagnostics.Type_0_has_no_properties_in_common_with_type_1,Ii(t),Ii(r))}return 0}var h=0,v=F(),x=!!s;if(1048576&t.flags)h=i===qr?J(t,r,n&&!(131068&t.flags)):function(e,t,r){for(var n=-1,i=e.types,a=0,o=i;a<o.length;a++){var s=L(o[a],t,r);if(!s)return 0;n&=s}return n}(t,r,n&&!(131068&t.flags));else{if(1048576&r.flags){if((h=B(Q_(t),r,n&&!(131068&t.flags)&&!(131068&r.flags)))&&(_||p)){d=j(t,r)||function(e){if(fy(e,67108864)){var t=_p(e,(function(e){return!(131068&e.flags)}));if(!(131072&t.flags))return t}return e}(r);if(!Y(t,d,n,void 0,x))return 0}}else if(2097152&r.flags){if(x=!0,(h=function(e,t,r){for(var n=-1,i=t.types,a=0,o=i;a<o.length;a++){var s=o[a],c=L(e,s,r,void 0,!0);if(!c)return 0;n&=c}return n}(Q_(t),r,n))&&(_||p)&&!Y(t,r,n,void 0,!1))return 0}else 2097152&t.flags&&(h=J(t,r,!1));!h&&(66846720&t.flags||66846720&r.flags)&&(h=z(t,r,n,x))&&A(v)}if(!h&&2359296&t.flags){var D=function(t,r){for(var n,i=!1,a=0,o=t;a<o.length;a++){if(63176704&(l=o[a]).flags){for(var s=rs(l);s&&21233664&s.flags;)s=rs(s);s&&(n=e.append(n,s),r&&(n=e.append(n,l)))}else 67238908&l.flags&&(i=!0)}if(n&&(r||i)){if(i)for(var c=0,u=t;c<u.length;c++){var l;67238908&(l=u[c]).flags&&(n=e.append(n,l))}return iu(n)}}(2097152&t.flags?t.types:[t],!!(1048576&r.flags));D&&(2097152&t.flags||1048576&r.flags)&&lp(D,(function(e){return e!==t}))&&(h=L(D,r,!1,void 0,x))&&A(v)}if(!h&&n){var S=b>0;if(S&&b--,524288&t.flags&&524288&r.flags){var T=u;M(t,r,n),u!==T&&(S=!!u)}if(524288&t.flags&&131068&r.flags)!function(t,r){var n=Mi(t.symbol)?Ii(t,t.symbol.valueDeclaration):Ii(t),i=Mi(r.symbol)?Ii(r,r.symbol.valueDeclaration):Ii(r);(ft===t&&Ne===r||mt===t&&Ae===r||gt===t&&Me===r||wc(!1)===t&&Le===r)&&I(e.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,i,n)}(t,r);else if(t.symbol&&524288&t.flags&&ct===t)I(e.Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(l&&2097152&r.flags){var E=r.types,k=Wf(C.IntrinsicAttributes,a),N=Wf(C.IntrinsicClassAttributes,a);if(k!==xe&&N!==xe&&(e.contains(E,k)||e.contains(E,N)))return h}if(!o&&S)return m=[t,r],h;O(o,t,r)}return h}function R(e,t){for(var r=-1,n=0,i=e.types;n<i.length;n++){var a=B(i[n],t,!1);if(!a)return 0;r&=a}return r}function B(t,r,n){var i=r.types;if(1048576&r.flags&&Wc(i,t))return-1;for(var a=0,o=i;a<o.length;a++){var s=L(t,o[a],!1);if(s)return s}n&&L(t,j(t,r)||function(t,r){var n=e.getObjectFlags(t);if(20&n&&1048576&r.flags)return e.find(r.types,(function(r){if(524288&r.flags){var i=n&e.getObjectFlags(r);if(4&i)return t.target===r.target;if(16&i)return!!t.aliasSymbol&&t.aliasSymbol===r.aliasSymbol}return!1}))}(t,r)||function(t,r){if(128&e.getObjectFlags(t)&&up(r,b_))return e.find(r.types,(function(e){return!b_(e)}))}(t,r)||function(t,r){var n=0;if(xs(t,n).length>0||xs(t,n=1).length>0)return e.find(r.types,(function(e){return xs(e,n).length>0}))}(t,r)||function(t,r){for(var n,i=0,a=0,o=r.types;a<o.length;a++){var s=o[a],c=iu([lu(t),lu(s)]);if(4194304&c.flags)n=s,i=1/0;else if(1048576&c.flags){var u=e.length(e.filter(c.types,E_));u>=i&&(n=s,i=u)}else E_(c)&&1>=i&&(n=s,i=1)}return n}(t,r)||i[i.length-1],!0);return 0}function j(t,r){if(1048576&r.flags&&2621440&t.flags){var n=ts(t);if(n){var i=zd(n,r);if(i)return e_(r,e.map(i,(function(e){return[function(){return wa(e)},e.escapedName]})),L)}}}function J(e,t,r){var n=e.types;if(1048576&e.flags&&Wc(n,t))return-1;for(var i=n.length,a=0;a<i;a++){var o=L(n[a],t,r&&a===i-1);if(o)return o}return 0}function z(t,r,n,a){if(v)return 0;var o=u_(t,r,a,i),s=i.get(o);if(void 0!==s&&(!(n&&2&s)||4&s)){if(Yt){var c=24&s;8&c&&gl(t,U),16&c&&gl(t,q)}return 1&s?-1:0}if(_){for(var l=0;l<g;l++)if(o===_[l])return 1;if(100===y)return v=!0,0}else _=[],d=[],p=[];var m=g;_[g]=o,g++,d[y]=t,p[y]=r,y++;var b,x=h;1&h||!d_(t,d,y)||(h|=1),2&h||!d_(r,p,y)||(h|=2);var D=0;Yt&&(b=Yt,Yt=function(e){return D|=e?16:8,b(e)});var S=3!==h?function(t,r,n,a){var o,s,c=t.flags&r.flags;if(i===Wr&&!(524288&c)){if(4194304&c)return L(t.type,r.type,!1);var l=0;return 8388608&c&&(l=L(t.objectType,r.objectType,!1))&&(l&=L(t.indexType,r.indexType,!1))?l:16777216&c&&t.root.isDistributive===r.root.isDistributive&&(l=L(t.checkType,r.checkType,!1))&&(l&=L(t.extendsType,r.extendsType,!1))&&(l&=L(Au(t),Au(r),!1))&&(l&=L(Fu(t),Fu(r),!1))?l:33554432&c?L(t.substitute,r.substitute,!1):0}var _=!1,d=F();if(17301504&t.flags&&t.aliasSymbol&&t.aliasTypeArguments&&t.aliasSymbol===r.aliasSymbol&&!t.aliasTypeArgumentsContainsMarker&&!r.aliasTypeArgumentsContainsMarker){var p=n_(t.aliasSymbol);if(void 0!==(K=W(t.aliasTypeArguments,r.aliasTypeArguments,p,a)))return K}if(262144&r.flags){if(32&e.getObjectFlags(t)&&L(lu(r),zo(t))&&!(4&Go(t))){var m=Uo(t),g=Su(r,Jo(t));if(o=L(m,g,n))return o}}else if(4194304&r.flags){if(4194304&t.flags&&(o=L(r.type,t.type,!1)))return o;if((P=is(r.type))&&-1===L(t,lu(P,r.stringsOnly),n))return-1}else if(8388608&r.flags){if(i!==Wr){var y=r.objectType,h=r.indexType,v=cs(y)||y,b=cs(h)||h;if(!gu(v)&&!yu(b))if((P=Tu(v,b,void 0,2|(v!==y?1:0)))&&(o=L(t,P,n)))return o}}else if(Xo(r)){var x=Uo(r),D=Go(r);if(!(8&D)){if(8388608&x.flags&&x.objectType===t&&x.indexType===Jo(r))return-1;if(!Xo(t)){var S=zo(r),T=lu(t,void 0,!0),E=4&D,C=E?Io(S,T):void 0;if(E?!(131072&C.flags):L(S,T)){var k=Jo(r),N=C?iu([C,k]):k;g=Su(t,N),m=Uo(r);if(o=L(g,m,n))return o}s=u,A(d)}}}if(8650752&t.flags){var P;if(8388608&t.flags&&8388608&r.flags){if((o=L(t.objectType,r.objectType,n))&&(o&=L(t.indexType,r.indexType,n)),o)return A(d),o}else if(!(P=rs(t))||262144&t.flags&&1&P.flags){if(o=L(Ge,fp(r,-67108865)))return A(d),o}else{if(o=L(P,r,!1,void 0,a))return A(d),o;if(o=L(Do(P,t),r,n,void 0,a))return A(d),o}}else if(4194304&t.flags){if(o=L(qe,r,n))return A(d),o}else if(16777216&t.flags)if(16777216&r.flags){var w=t.root.inferTypeParameters,I=t.extendsType,O=void 0;if(w){var M=cd(w,void 0,0,L);Sd(M.inferences,r.extendsType,I,192),I=gl(I,M.mapper),O=M.mapper}if(El(I,r.extendsType)&&(L(t.checkType,r.checkType)||L(r.checkType,t.checkType))&&((o=L(gl(Au(t),O),Au(r),n))&&(o&=L(Fu(t),Fu(r),n)),o))return A(d),o}else{var R=os(t);if(R&&(o=L(R,r,n)))return A(d),o;var B=as(t);if(B&&(o=L(B,r,n)))return A(d),o}else{if(i!==Ur&&function(t){return!!(32&e.getObjectFlags(t)&&4&Go(t))}(r)&&Wl(t))return-1;if(Xo(r))return Xo(t)&&(o=function(e,t,r){if(i===qr||(i===Wr?Go(e)===Go(t):Yo(e)<=Yo(t))){var n,a=zo(t),o=gl(zo(e),Yo(e)<0?U:q);if(n=L(a,o,r)){var s=el([Jo(e)],[Jo(t)]);return n&L(gl(Uo(e),s),Uo(t),r)}}return 0}(t,r,n))?(A(d),o):0;var j=!!(131068&t.flags);if(i!==Wr)t=ms(t);else if(Xo(t))return 0;if(4&e.getObjectFlags(t)&&4&e.getObjectFlags(r)&&t.target===r.target&&!(8192&e.getObjectFlags(t)||8192&e.getObjectFlags(r))){var K;p=a_(t.target);if(void 0!==(K=W(_c(t),_c(r),p,a)))return K}else{if(h_(r)?y_(t)||w_(t):y_(r)&&w_(t)&&!t.target.readonly)return i!==Wr?L(Es(t,1)||he,Es(r,1)||he,n):0;if(i===Ur&&Wl(r)&&32768&e.getObjectFlags(r)&&!Wl(t))return 0}if(2621440&t.flags&&524288&r.flags){var J=n&&u===d.errorInfo&&!j;if((o=Y(t,r,J,void 0,a))&&(o&=X(t,r,0,J))&&(o&=X(t,r,1,J))&&(o&=te(t,r,0,j,J))&&(o&=te(t,r,1,j,J)),_&&o)u=s||u||d.errorInfo;else if(o)return o}if(2621440&t.flags&&1048576&r.flags){var z=fp(r,524288);if(1048576&z.flags){var V=function(t,r){var n=zd($o(t),r);if(!n)return 0;for(var i=1,a=0,o=n;a<o.length;a++){var s=o[a];if((i*=dp(wa(s)))>25)return 0}for(var c=new Array(n.length),u=e.createUnderscoreEscapedMap(),l=0;l<n.length;l++){var _=wa(s=n[l]);c[l]=1048576&_.flags?_.types:[_],u.set(s.escapedName,!0)}for(var d=e.cartesianProduct(c),p=[],m=function(i){var a=!1;e:for(var o=0,s=r.types;o<s.length;o++){for(var c=s[o],u=function(e){var a=n[e],o=Zo(c,a.escapedName);return o?a===o?"continue":G(t,r,a,o,(function(t){return i[e]}),!1,!1)?void 0:"continue-outer":"continue-outer"},l=0;l<n.length;l++){switch(u(l)){case"continue-outer":continue e}}e.pushIfUnique(p,c,e.equateValues),a=!0}if(!a)return{value:0}},g=0,y=d;g<y.length;g++){var h=y[g],v=m(h);if("object"===f(v))return v.value}for(var b=-1,x=0,D=p;x<D.length;x++){var S=D[x];if((b&=Y(t,S,!1,u,!1))&&(b&=X(t,S,0,!1))&&(b&=X(t,S,1,!1))&&(b&=te(t,S,0,!1,!1))&&(b&=te(t,S,1,!1,!1)),!b)return b}return b}(t,z);if(V)return V}}}return 0;function W(t,r,a,c){if(o=function(t,r,n,a,o){if(void 0===t&&(t=e.emptyArray),void 0===r&&(r=e.emptyArray),void 0===n&&(n=e.emptyArray),t.length!==r.length&&i===Wr)return 0;for(var s=t.length<=r.length?t.length:r.length,c=-1,u=0;u<s;u++){var l=u<n.length?n[u]:1,_=7&l;if(4!==_){var d=t[u],p=r[u],f=-1;if(8&l?f=i===Wr?L(d,p,!1):Cl(d,p):1===_?f=L(d,p,a,void 0,o):2===_?f=L(p,d,a,void 0,o):3===_?(f=L(p,d,!1))||(f=L(d,p,a,void 0,o)):(f=L(d,p,a,void 0,o))&&(f&=L(p,d,a,void 0,o)),!f)return 0;c&=f}}return c}(t,r,a,n,c))return o;if(e.some(a,(function(e){return!!(24&e)})))return s=void 0,void A(d);var l=r&&function(e,t){for(var r=0;r<t.length;r++)if(1==(7&t[r])&&16384&e[r].flags)return!0;return!1}(r,a);if(_=!l,a!==e.emptyArray&&!l){if(_&&(!n||!e.some(a,(function(e){return 0==(7&e)}))))return 0;s=u,A(d)}}}(t,r,n,a):1;if(Yt&&(Yt=b),h=x,y--,S){if(-1===S||0===y){for(l=m;l<g;l++)i.set(_[l],1|D);g=m}}else i.set(o,2|(n?4:0)|D),g=m;return S}function U(e){return!Yt||e!==rt&&e!==nt&&e!==Xt||Yt(!1),e}function q(e){return!Yt||e!==rt&&e!==nt&&e!==Xt||Yt(!0),e}function W(e,t){if(!t||0===e.length)return e;for(var r,n=0;n<e.length;n++)t.has(e[n].escapedName)?r||(r=e.slice(0,n)):r&&r.push(e[n]);return r||e}function G(t,r,n,a,o,s,c){var u=e.getDeclarationModifierFlagsFromSymbol(n),l=e.getDeclarationModifierFlagsFromSymbol(a);if(8&u||8&l){var _=n.valueDeclaration!==a.valueDeclaration;if(1024&e.getCheckFlags(n)&&_)return s&&I(e.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1,Pi(n),Ii(t)),0;if(_)return s&&(8&u&&8&l?I(e.Diagnostics.Types_have_separate_declarations_of_a_private_property_0,Pi(a)):I(e.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2,Pi(a),Ii(8&u?t:r),Ii(8&u?r:t))),0}else if(16&l){if(!function(t,r){return!l_(r,(function(r){return!!(16&e.getDeclarationModifierFlagsFromSymbol(r))&&(n=t,i=__(r),!l_(n,(function(e){var t=__(e);return!!t&&Ma(t,i)})));var n,i}))}(n,a))return s&&I(e.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,Pi(a),Ii(__(n)||t),Ii(__(a)||r)),0}else if(16&u)return s&&I(e.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2,Pi(a),Ii(t),Ii(r)),0;var d=function(t,r,n,i,a){var o=V&&!!(48&e.getCheckFlags(r)),s=n(t);if(65536&e.getCheckFlags(r)&&!_n(r).type){var c=_n(r);e.Debug.assertDefined(c.deferralParent),e.Debug.assertDefined(c.deferralConstituents);for(var u=!!(1048576&c.deferralParent.flags),l=u?0:-1,_=0,d=c.deferralConstituents;_<d.length;_++){var p=L(s,d[_],!1,void 0,!u);if(u){if(p)return p}else{if(!p)return L(s,sa(wa(r),o),i);l&=p}}return u&&!l&&o&&(l=L(s,Se)),u&&!l&&i?L(s,sa(wa(r),o),i):l}return L(s,sa(wa(r),o),i,void 0,a)}(n,a,o,s,c);return d?i!==qr&&16777216&n.flags&&!(16777216&a.flags)?(s&&I(e.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2,Pi(a),Ii(t),Ii(r)),0):d:(s&&P(e.Diagnostics.Types_of_property_0_are_incompatible,Pi(a)),0)}function Y(r,n,a,s,c){if(i===Wr)return function(e,t,r){if(!(524288&e.flags&&524288&t.flags))return 0;var n=W($o(e),r),i=W($o(t),r);if(n.length!==i.length)return 0;for(var a=-1,o=0,s=n;o<s.length;o++){var c=s[o],u=Zo(t,c.escapedName);if(!u)return 0;var l=f_(c,u,L);if(!l)return 0;a&=l}return a}(r,n,s);var _,d=i===Ur&&!Cd(r)&&!x_(r)&&!w_(r),p=bd(r,n,d,!1);if(p){if(a){var f=e.arrayFrom(vd(r,n,d,!1)),m=!1;if((!o||o.code!==e.Diagnostics.Class_0_incorrectly_implements_interface_1.code&&o.code!==e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(m=!0),1===f.length){var g=Pi(p);I.apply(void 0,t([e.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2,g],Oi(r,n))),e.length(p.declarations)&&(_=e.createDiagnosticForNode(p.declarations[0],e.Diagnostics._0_is_declared_here,g),e.Debug.assert(!!u),l?l.push(_):l=[_]),m&&u&&b++}else M(r,n,!1)&&(f.length>5?I(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Ii(r),Ii(n),e.map(f.slice(0,4),(function(e){return Pi(e)})).join(", "),f.length-4):I(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Ii(r),Ii(n),e.map(f,(function(e){return Pi(e)})).join(", ")),m&&u&&b++)}return 0}if(Cd(n))for(var y=0,h=W(ts(r),s);y<h.length;y++){if(!Zo(n,(w=h[y]).escapedName)){var v=wa(w);if(v!==Se&&v!==Te&&v!==Ee)return a&&I(e.Diagnostics.Property_0_does_not_exist_on_type_1,Pi(w),Ii(n)),0}}var x=-1;if(w_(n)){var D=I_(n);if(D){if(!w_(r))return 0;var S=I_(r);if(S&&!L(S,D,a))return a&&I(e.Diagnostics.Rest_signatures_are_incompatible),0;for(var T=dc(n)-1,E=dc(r)-(S?1:0),C=_c(r),k=T;k<E;k++){if(!(B=L(C[k],D,a)))return a&&I(e.Diagnostics.Property_0_is_incompatible_with_rest_element_type,""+k),0;x&=B}}}for(var N=1048576&n.flags?es(n):ts(n),A=w_(r)&&w_(n),F=0,P=W(N,s);F<P.length;F++){var w,O=P[F],R=O.escapedName;if(!(4194304&O.flags)&&(!A||Mf(R)||"length"===R))if((w=vs(r,R))&&w!==O){var B;if(!(B=G(r,n,w,O,wa,a,c)))return 0;x&=B}}return x}function X(t,r,n,a){if(i===Wr)return function(e,t,r){var n=xs(e,r),i=xs(t,r);if(n.length!==i.length)return 0;for(var a=-1,o=0;o<n.length;o++){var s=m_(n[o],i[o],!1,!1,!1,L);if(!s)return 0;a&=s}return a}(t,r,n);if(r===$e||t===$e)return-1;var o=t.symbol&&Sg(t.symbol.valueDeclaration),s=r.symbol&&Sg(r.symbol.valueDeclaration),c=xs(t,o&&1===n?0:n),u=xs(r,s&&1===n?0:n);if(1===n&&c.length&&u.length){if(e.isAbstractConstructorType(t)&&!e.isAbstractConstructorType(r))return a&&I(e.Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type),0;if(!function(t,r,n){if(!t.declaration||!r.declaration)return!0;var i=e.getSelectedModifierFlags(t.declaration,24),a=e.getSelectedModifierFlags(r.declaration,24);if(8===a)return!0;if(16===a&&8!==i)return!0;if(16!==a&&!i)return!0;n&&I(e.Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type,Bi(i),Bi(a));return!1}(c[0],u[0],a))return 0}var l=-1,_=F(),d=1===n?$:Q;if(64&e.getObjectFlags(t)&&64&e.getObjectFlags(r)&&t.symbol===r.symbol)for(var p=0;p<u.length;p++){if(!(x=Z(c[p],u[p],!0,a,d(c[p],u[p]))))return 0;l&=x}else if(1===c.length&&1===u.length){var f=i===qr||!!K.noStrictGenericChecks;l=Z(c[0],u[0],f,a,d(c[0],u[0]))}else e:for(var m=0,g=u;m<g.length;m++){for(var y=g[m],h=a,v=0,b=c;v<b.length;v++){var x,D=b[v];if(x=Z(D,y,!0,h,d(D,y))){l&=x,A(_);continue e}h=!1}return h&&I(e.Diagnostics.Type_0_provides_no_match_for_the_signature_1,Ii(t),wi(y,void 0,void 0,n)),0}return l}function Q(t,r){return 0===t.parameters.length&&0===r.parameters.length?function(t,r){return P(e.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ii(t),Ii(r))}:function(t,r){return P(e.Diagnostics.Call_signature_return_types_0_and_1_are_incompatible,Ii(t),Ii(r))}}function $(t,r){return 0===t.parameters.length&&0===r.parameters.length?function(t,r){return P(e.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ii(t),Ii(r))}:function(t,r){return P(e.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible,Ii(t),Ii(r))}}function Z(e,t,r,n,i){return Vl(r?Ys(e):e,r?Ys(t):t,0,!1,n,I,i,L)}function ee(t,r,n){var i=L(t.type,r.type,n);return!i&&n&&I(e.Diagnostics.Index_signatures_are_incompatible),i}function te(t,r,n,a,o){if(i===Wr)return function(e,t,r){var n=Ts(t,r),i=Ts(e,r);if(!i&&!n)return-1;if(i&&n&&i.isReadonly===n.isReadonly)return L(i.type,n.type);return 0}(t,r,n);var s=Ts(r,n);if(!s||1&s.type.flags&&!a)return-1;var c=Ts(t,n)||1===n&&Ts(t,0);if(c)return ee(c,s,o);if(Xo(t))return 0===n?L(Uo(t),s.type,o):0;if(Y_(t)){var u=-1;if(0===n){var l=Ts(t,1);l&&(u=ee(l,s,o))}return u&&(u&=function(t,r,n,i){for(var a=-1,o=0,s=$o(t);o<s.length;o++){var c=s[o];if(!$l(t,c)&&(!(c.nameType&&8192&c.nameType.flags)&&(0===n||Mf(c.escapedName)))){var u=L(wa(c),r,i);if(!u)return i&&I(e.Diagnostics.Property_0_is_incompatible_with_index_signature,Pi(c)),0;a&=u}}return a}(t,s.type,n,o)),u}return o&&I(e.Diagnostics.Index_signature_is_missing_in_type_0,Ii(t)),0}}function e_(e,t,r,n){for(var i=e.types.map((function(e){})),a=0,o=t;a<o.length;a++)for(var s=o[a],c=s[0],u=s[1],l=0,_=0,d=e.types;_<d.length;_++){var p=Xi(d[_],u);p&&r(c(),p)?i[l]=void 0===i[l]||i[l]:i[l]=!1,l++}var f=i.indexOf(!0);return-1===f||-1!==i.indexOf(!0,f+1)?n:e.types[f]}function t_(t){if(524288&t.flags){var r=Qo(t);return 0===r.callSignatures.length&&0===r.constructSignatures.length&&!r.stringIndexInfo&&!r.numberIndexInfo&&r.properties.length>0&&e.every(r.properties,(function(e){return!!(16777216&e.flags)}))}return!!(2097152&t.flags)&&e.every(t.types,t_)}function r_(t,r,n){var i=cc(t,e.map(t.typeParameters,(function(e){return e===r?n:e})));return i.objectFlags|=8192,i}function n_(e){var t=_n(e);return i_(t.typeParameters,t,(function(r,n,i){var a=fc(e,Qu(t.typeParameters,Zu(n,i)));return a.aliasTypeArgumentsContainsMarker=!0,a}))}function i_(t,r,n){void 0===t&&(t=e.emptyArray);var i=r.variances;if(!i){r.variances=e.emptyArray,i=[];for(var a=function(e){var t=!1,a=!1,o=Yt;Yt=function(e){return e?a=!0:t=!0};var s=n(r,e,rt),c=n(r,e,nt),u=(Fl(c,s)?1:0)|(Fl(s,c)?2:0);3===u&&Fl(n(r,e,Xt),s)&&(u=4),Yt=o,(t||a)&&(t&&(u|=8),a&&(u|=16)),i.push(u)},o=0,s=t;o<s.length;o++){a(s[o])}r.variances=i}return i}function a_(t){return t===dt||t===pt||8&t.objectFlags?e.emptyArray:i_(t.typeParameters,t,r_)}function o_(e){return 262144&e.flags&&!ns(e)}function s_(t){return function(t){return!!(4&e.getObjectFlags(t))&&!t.node}(t)&&e.some(_c(t),(function(e){return o_(e)||s_(e)}))}function c_(e,t,r){void 0===r&&(r=0);for(var n=""+e.target.id,i=0,a=_c(e);i<a.length;i++){var o=a[i];if(o_(o)){var s=t.indexOf(o);s<0&&(s=t.length,t.push(o)),n+="="+s}else r<4&&s_(o)?n+="<"+c_(o,t,r+1)+">":n+="-"+o.id}return n}function u_(e,t,r,n){if(n===Wr&&e.id>t.id){var i=e;e=t,t=i}var a=r?"&":"";if(s_(e)&&s_(t)){var o=[];return c_(e,o)+","+c_(t,o)+a}return e.id+","+t.id+a}function l_(t,r){if(!(6&e.getCheckFlags(t)))return r(t);for(var n=0,i=t.containingType.types;n<i.length;n++){var a=vs(i[n],t.escapedName),o=a&&l_(a,r);if(o)return o}}function __(e){return e.parent&&32&e.parent.flags?ro(ni(e)):void 0}function d_(e,t,r){if(r>=5&&524288&e.flags){var n=e.symbol;if(n)for(var i=0,a=0;a<r;a++){if(524288&(s=t[a]).flags&&s.symbol===n&&++i>=5)return!0}}if(r>=5&&8388608&e.flags){var o=p_(e);for(i=0,a=0;a<r;a++){var s;if(p_(s=t[a])===o&&++i>=5)return!0}}return!1}function p_(e){for(var t=e;8388608&t.flags;)t=t.objectType;return t}function f_(t,r,n){if(t===r)return-1;var i=24&e.getDeclarationModifierFlagsFromSymbol(t);if(i!==(24&e.getDeclarationModifierFlagsFromSymbol(r)))return 0;if(i){if(Iv(t)!==Iv(r))return 0}else if((16777216&t.flags)!=(16777216&r.flags))return 0;return uy(t)!==uy(r)?0:n(wa(t),wa(r))}function m_(t,r,n,i,a,o){if(t===r)return-1;if(!function(e,t,r){var n=Bg(e),i=Bg(t),a=jg(e),o=jg(t),s=Kg(e),c=Kg(t);return n===i&&a===o&&s===c||!!(r&&a<=o)}(t,r,n))return 0;if(e.length(t.typeParameters)!==e.length(r.typeParameters))return 0;if(r.typeParameters){for(var s=el(t.typeParameters,r.typeParameters),c=0;c<r.typeParameters.length;c++){if(!((m=t.typeParameters[c])===(p=r.typeParameters[c])||o(gl(ic(m),s)||De,ic(p)||De)&&o(gl(ps(m),s)||De,ps(p)||De)))return 0}t=sl(t,s,!0)}var u=-1;if(!i){var l=Ks(t);if(l){var _=Ks(r);if(_){if(!(f=o(l,_)))return 0;u&=f}}}var d=Bg(r);for(c=0;c<d;c++){var p,f,m=Mg(t,c);if(!(f=o(p=Mg(r,c),m)))return 0;u&=f}if(!a){var g=Js(t),y=Js(r);u&=g||y?function(e,t,r){return e&&t&&$c(e,t)?e.type===t.type?-1:e.type&&t.type?r(e.type,t.type):0:0}(g,y,o):o(zs(t),zs(r))}return u}function g_(t){return function(e){for(var t,r=0,n=e;r<n.length;r++){var i=n[r],a=k_(i);if(t||(t=a),a===i||a!==t)return!1}return!0}(t)?Qc(t):e.reduceLeft(t,(function(e,t){return Al(e,t)?t:e}))}function y_(t){return!!(4&e.getObjectFlags(t))&&(t.target===dt||t.target===pt)}function h_(t){return!!(4&e.getObjectFlags(t))&&t.target===pt}function v_(e){return y_(e)?_c(e)[0]:void 0}function b_(e){return y_(e)||!(98304&e.flags)&&Fl(e,xt)}function x_(e){var t=y_(e)?_c(e)[0]:void 0;return t===Te||t===Je}function D_(e){return w_(e)||!!vs(e,"0")}function S_(e){return b_(e)||D_(e)}function T_(e){return!(240512&e.flags)}function E_(e){return!!(109440&e.flags)}function C_(t){return!!(16&t.flags)||(1048576&t.flags?!!(1024&t.flags)||e.every(t.types,E_):E_(t))}function k_(t){return 1024&t.flags?$a(t):128&t.flags?Ne:256&t.flags?Ae:2048&t.flags?Fe:512&t.flags?Me:1048576&t.flags?Qc(e.sameMap(t.types,k_)):t}function N_(t){return 1024&t.flags&&qu(t)?$a(t):128&t.flags&&qu(t)?Ne:256&t.flags&&qu(t)?Ae:2048&t.flags&&qu(t)?Fe:512&t.flags&&qu(t)?Me:1048576&t.flags?Qc(e.sameMap(t.types,N_)):t}function A_(t){return 8192&t.flags?Le:1048576&t.flags?Qc(e.sameMap(t.types,A_)):t}function F_(e,t){return Fy(e,t)||(e=A_(N_(e))),e}function P_(e,t,r,n){e&&E_(e)&&(e=F_(e,t?bv(r,t,n):void 0));return e}function w_(t){return!!(4&e.getObjectFlags(t)&&8&t.target.objectFlags)}function I_(e){return e.target.hasRestElement?_c(e)[e.target.typeParameters.length-1]:void 0}function O_(e){return dc(e)-(e.target.hasRestElement?1:0)}function M_(e){return"0"===e.value.base10Value}function L_(e){for(var t=0,r=0,n=e;r<n.length;r++){t|=R_(n[r])}return t}function R_(e){return 1048576&e.flags?L_(e.types):128&e.flags?""===e.value?128:0:256&e.flags?0===e.value?256:0:2048&e.flags?M_(e)?2048:0:512&e.flags?e===Pe||e===we?512:0:117724&e.flags}function B_(e){return 117632&R_(e)?_p(e,(function(e){return!(117632&R_(e))})):e}function j_(e){return pp(e,K_)}function K_(e){return 4&e.flags?yr:8&e.flags?hr:64&e.flags?vr:e===we||e===Pe||114688&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&M_(e)?e:Be}function J_(e,t){var r=t&~e.flags&98304;return 0===r?e:Qc(32768===r?[e,Se]:65536===r?[e,Ce]:[e,Se,Ce])}function z_(t){return e.Debug.assert(V),32768&t.flags?t:Qc([t,Se])}function U_(e){return V?function(e){return Dt||(Dt=Ac("NonNullable",524288,void 0)||ge),Dt!==ge?fc(Dt,[e]):Hd(e,2097152)}(e):e}function V_(e){return V?Qc([e,Ee]):e}function q_(e){return e!==Ee}function W_(e){return V?_p(e,q_):e}function G_(e,t){return t?V_(e):e}function H_(t,r){return e.isExpressionOfOptionalChainRoot(r)?U_(t):e.isOptionalChain(r)?W_(t):t}function Y_(t){return!(!t.symbol||0==(7040&t.symbol.flags)||mb(t))||!!(2048&e.getObjectFlags(t)&&Y_(t.source))}function X_(t,r){var n=en(t.flags,t.escapedName,8&e.getCheckFlags(t));return n.declarations=t.declarations,n.parent=t.parent,n.type=r,n.target=t,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),t.nameType&&(n.nameType=t.nameType),n}function Q_(t){if(!(Cd(t)&&32768&e.getObjectFlags(t)))return t;var r=t.regularType;if(r)return r;var n=t,i=function(t,r){for(var n=e.createSymbolTable(),i=0,a=$o(t);i<a.length;i++){var o=a[i],s=wa(o),c=r(s);n.set(o.escapedName,c===s?o:X_(o,c))}return n}(t,Q_),a=hi(n.symbol,i,n.callSignatures,n.constructSignatures,n.stringIndexInfo,n.numberIndexInfo);return a.flags=n.flags,a.objectFlags|=-32769&n.objectFlags,t.regularType=a,a}function $_(e,t,r){return{parent:e,propertyName:t,siblings:r,resolvedProperties:void 0}}function Z_(t){if(!t.resolvedProperties){for(var r=e.createMap(),n=0,i=function e(t){if(!t.siblings){for(var r=[],n=0,i=e(t.parent);n<i.length;n++){var a=i[n];if(Cd(a)){var o=Zo(a,t.propertyName);o&&up(wa(o),(function(e){r.push(e)}))}}t.siblings=r}return t.siblings}(t);n<i.length;n++){var a=i[n];if(Cd(a)&&!(1024&e.getObjectFlags(a)))for(var o=0,s=ts(a);o<s.length;o++){var c=s[o];r.set(c.escapedName,c)}}t.resolvedProperties=e.arrayFrom(r.values())}return t.resolvedProperties}function ed(e,t){if(!(4&e.flags))return e;var r=wa(e),n=nd(r,t&&$_(t,e.escapedName,void 0));return n===r?e:X_(e,n)}function td(e){var t=me.get(e.escapedName);if(t)return t;var r=X_(e,Se);return r.flags|=16777216,me.set(e.escapedName,r),r}function rd(e){return nd(e,void 0)}function nd(t,r){if(786432&e.getObjectFlags(t)){if(void 0===r&&t.widened)return t.widened;var n=void 0;if(98304&t.flags)n=he;else if(Cd(t))n=function(t,r){for(var n=e.createSymbolTable(),i=0,a=$o(t);i<a.length;i++){var o=a[i];n.set(o.escapedName,ed(o,r))}if(r)for(var s=0,c=Z_(r);s<c.length;s++){o=c[s];n.has(o.escapedName)||n.set(o.escapedName,td(o))}var u=Ts(t,0),l=Ts(t,1),_=hi(t.symbol,n,e.emptyArray,e.emptyArray,u&&tc(rd(u.type),u.isReadonly),l&&tc(rd(l.type),l.isReadonly));return _.objectFlags|=1064960&e.getObjectFlags(t),_}(t,r);else if(1048576&t.flags){var i=r||$_(void 0,void 0,t.types),a=e.sameMap(t.types,(function(e){return 98304&e.flags?e:nd(e,i)}));n=Qc(a,e.some(a,Wl)?2:1)}else 2097152&t.flags?n=iu(e.sameMap(t.types,rd)):(y_(t)||w_(t))&&(n=cc(t.target,e.sameMap(_c(t),rd)));return n&&void 0===r&&(t.widened=n),n||t}return t}function id(t,r,n){var i=Ii(rd(r));if(!e.isInJSFile(t)||e.isCheckJsEnabledForFile(e.getSourceFileOfNode(t),K)){var a;switch(t.kind){case 208:case 158:case 157:a=H?e.Diagnostics.Member_0_implicitly_has_an_1_type:e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 155:var o=t;if(e.isIdentifier(o.name)&&(e.isCallSignatureDeclaration(o.parent)||e.isMethodSignature(o.parent)||e.isFunctionTypeNode(o.parent))&&o.parent.parameters.indexOf(o)>-1&&(gn(o,o.name.escapedText,788968,void 0,o.name.escapedText,!0)||o.name.originalKeywordKind&&e.isTypeNodeKind(o.name.originalKeywordKind))){var s="arg"+o.parent.parameters.indexOf(o);return void $r(H,t,e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,s,e.declarationNameToString(o.name))}a=t.dotDotDotToken?H?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:H?e.Diagnostics.Parameter_0_implicitly_has_an_1_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 190:if(a=e.Diagnostics.Binding_element_0_implicitly_has_an_1_type,!H)return;break;case 298:return void Xr(t,e.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);case 243:case 160:case 159:case 162:case 163:case 200:case 201:if(H&&!t.name)return void Xr(t,1===n?e.Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);a=H?1===n?e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 185:return void(H&&Xr(t,e.Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type));default:a=H?e.Diagnostics.Variable_0_implicitly_has_an_1_type:e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}$r(H,t,a,e.declarationNameToString(e.getNameOfDeclaration(t)),i)}}function ad(t,r,n){a&&H&&262144&e.getObjectFlags(r)&&(function t(r){var n=!1;if(262144&e.getObjectFlags(r)){if(1048576&r.flags)if(e.some(r.types,Wl))n=!0;else for(var i=0,a=r.types;i<a.length;i++){t(_=a[i])&&(n=!0)}if(y_(r)||w_(r))for(var o=0,s=_c(r);o<s.length;o++){t(_=s[o])&&(n=!0)}if(Cd(r))for(var c=0,u=$o(r);c<u.length;c++){var l=u[c],_=wa(l);262144&e.getObjectFlags(_)&&(t(_)||Xr(l.valueDeclaration,e.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type,Pi(l),Ii(rd(_))),n=!0)}}return n}(r)||id(t,r,n))}function od(e,t,r){var n=Bg(e),i=Bg(t),a=Jg(e),o=Jg(t),s=o?i-1:i,c=a?s:Math.min(n,s),u=Ks(e);if(u){var l=Ks(t);l&&r(u,l)}for(var _=0;_<c;_++)r(Mg(e,_),Mg(t,_));o&&r(Rg(e,c),o)}function sd(e,t,r){var n=Js(e),i=Js(t);n&&i&&$c(n,i)&&n.type&&i.type?r(n.type,i.type):r(zs(e),zs(t))}function cd(e,t,r,n){return ud(e.map(dd),t,r,n||kl)}function ud(e,t,r,n){var i={inferences:e,signature:t,flags:r,compareTypes:n,mapper:function(e){return ld(i,e,!0)},nonFixingMapper:function(e){return ld(i,e,!1)}};return i}function ld(e,t,r){for(var n=e.inferences,i=0;i<n.length;i++){var a=n[i];if(t===a.typeParameter)return r&&!a.isFixed&&(_d(n),a.isFixed=!0),Fd(e,i)}return t}function _d(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];n.isFixed||(n.inferredType=void 0)}}function dd(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1}}function pd(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed}}function fd(e){return e&&e.mapper}function md(t){var r=e.getObjectFlags(t);return!!(63176704&t.flags||4&r&&(t.node||e.forEach(_c(t),md))||16&r&&t.symbol&&14384&t.symbol.flags&&t.symbol.declarations||32&r||3145728&t.flags&&!(1024&t.flags)&&function(t){void 0===t.couldContainTypeVariables&&(t.couldContainTypeVariables=e.some(t.types,md));return t.couldContainTypeVariables}(t))}function gd(t,r){return!!(t===r||3145728&t.flags&&e.some(t.types,(function(e){return gd(e,r)}))||16777216&t.flags&&(gd(Au(t),r)||gd(Fu(t),r)))}function yd(t,r,n){var i=t.id+","+r.id+","+n.id;if(lr.has(i))return lr.get(i);lr.set(i,void 0);var a=function(t,r,n){if(!(Ts(t,0)||0!==ts(t).length&&function t(r){return!(1048576&e.getObjectFlags(r))||Cd(r)&&e.some(ts(r),(function(e){return t(wa(e))}))}(t)))return;if(y_(t))return jc(hd(_c(t)[0],r,n),h_(t));if(w_(t)){var i=e.map(_c(t),(function(e){return hd(e,r,n)})),a=4&Go(r)?dc(t)-(t.target.hasRestElement?1:0):t.target.minLength;return Uc(i,a,t.target.hasRestElement,t.target.readonly,t.target.associatedNames)}var o=pi(2064,void 0);return o.source=t,o.mappedType=r,o.constraintType=n,o}(t,r,n);return lr.set(i,a),a}function hd(e,t,r){var n=Su(r.type,Jo(t)),i=Uo(t),a=dd(n);return Sd([a],e,i),Dd(a)||De}function vd(t,r,n,a){var o,s,c,u,l,_,d;return i(this,(function(i){switch(i.label){case 0:o=1048576&r.flags?es(r):ts(r),s=0,c=o,i.label=1;case 1:return s<c.length?(u=c[s],!n&&(16777216&u.flags||48&e.getCheckFlags(u))?[3,5]:(l=vs(t,u.escapedName))?[3,3]:[4,u]):[3,6];case 2:return i.sent(),[3,5];case 3:return a&&109440&(_=wa(u)).flags?1&(d=wa(l)).flags||Vu(d)===Vu(_)?[3,5]:[4,u]:[3,5];case 4:i.sent(),i.label=5;case 5:return s++,[3,1];case 6:return[2]}}))}function bd(e,t,r,n){var i=vd(e,t,r,n).next();if(!i.done)return i.value}function xd(e,t){return w_(e)&&w_(t)&&function(e,t){return t.target.minLength>e.target.minLength||!I_(t)&&(!!I_(e)||O_(t)<O_(e))}(e,t)||!!bd(e,t,!1,!0)&&!!bd(t,e,!1,!0)}function Dd(e){return e.candidates?Qc(e.candidates,2):e.contraCandidates?iu(e.contraCandidates):void 0}function Sd(t,r,n,i,a){var o,s;void 0===i&&(i=0),void 0===a&&(a=!1);var c,u=!1,l=256,_=!0;function d(r,o){if(md(o)){if(r===be){var s=c;return c=r,d(o,o),void(c=s)}if(r.aliasSymbol&&r.aliasTypeArguments&&r.aliasSymbol===o.aliasSymbol)g(r.aliasTypeArguments,o.aliasTypeArguments,n_(r.aliasSymbol));else if(r===o&&3145728&r.flags)for(var y=0,x=r.types;y<x.length;y++){var D=x[y];d(D,D)}else{if(1048576&o.flags){var S=m(1048576&r.flags?r.types:[r],o.types,Td),T=m(S[0],S[1],Ed),E=T[0];if(0===(k=T[1]).length)return;if(o=Qc(k),0===E.length)return void p(r,o,1);r=Qc(E)}else if(2097152&o.flags&&e.some(o.types,(function(e){return!!h(e)||Xo(e)&&!!h(_l(e)||Be)}))){if(!(1048576&r.flags)){var C=m(2097152&r.flags?r.types:[r],o.types,El),k=(E=C[0],C[1]);if(0===E.length||0===k.length)return;r=iu(E),o=iu(k)}}else 41943040&o.flags&&(o=ku(o));if(8650752&o.flags){if(1048576&e.getObjectFlags(r)||r===je||16&i&&(r===ve||r===bt))return;var N=h(o);if(N){if(!N.isFixed){if((void 0===N.priority||i<N.priority)&&(N.candidates=void 0,N.contraCandidates=void 0,N.topLevel=!0,N.priority=i),i===N.priority){var A=c||r;a&&!u?e.contains(N.contraCandidates,A)||(N.contraCandidates=e.append(N.contraCandidates,A),_d(t)):e.contains(N.candidates,A)||(N.candidates=e.append(N.candidates,A),_d(t))}!(16&i)&&262144&o.flags&&N.topLevel&&!gd(n,o)&&(N.topLevel=!1,_d(t))}return void(l=Math.min(l,i))}var F=vu(o,!1);if(F!==o)f(r,F,d);else if(8388608&o.flags){var P=vu(o.indexType,!1);if(63176704&P.flags){var w=bu(vu(o.objectType,!1),P,!1);w&&w!==o&&f(r,w,d)}}}if(!(4&e.getObjectFlags(r)&&4&e.getObjectFlags(o)&&(r.target===o.target||y_(r)&&y_(o)))||r.node&&o.node)if(4194304&r.flags&&4194304&o.flags)a=!a,d(r.type,o.type),a=!a;else if((C_(r)||4&r.flags)&&4194304&o.flags){var I=function(t){var r=e.createSymbolTable();up(t,(function(t){if(128&t.flags){var n=e.escapeLeadingUnderscores(t.value),i=en(4,n);i.type=he,t.symbol&&(i.declarations=t.symbol.declarations,i.valueDeclaration=t.symbol.valueDeclaration),r.set(n,i)}}));var n=4&t.flags?tc(Ge,!1):void 0;return hi(void 0,r,e.emptyArray,e.emptyArray,n,void 0)}(r);a=!a,p(I,o.type,32),a=!a}else if(8388608&r.flags&&8388608&o.flags)d(r.objectType,o.objectType),d(r.indexType,o.indexType);else if(16777216&r.flags&&16777216&o.flags)d(r.checkType,o.checkType),d(r.extendsType,o.extendsType),d(Au(r),Au(o)),d(Fu(r),Fu(o));else if(16777216&o.flags&&!a){v(r,[Au(o),Fu(o)],o.flags)}else if(3145728&o.flags)v(r,o.types,o.flags);else if(1048576&r.flags)for(var O=0,M=r.types;O<M.length;O++){d(M[O],o)}else{if(!(64&i&&65273856&r.flags)){var L=ms(r);if(L!==r&&_&&!(2621440&L.flags))return _=!1,d(L,o);r=L}2621440&r.flags&&f(r,o,b)}else g(_c(r),_c(o),a_(r.target))}}}function p(e,t,r){var n=i;i|=r,d(e,t),i=n}function f(t,r,n){var i=t.id+","+r.id,a=s&&s.get(i);if(void 0===a){(s||(s=e.createMap())).set(i,-1);var o=l;l=256,n(t,r),s.set(i,l),l=Math.min(l,o)}else l=Math.min(l,a)}function m(t,r,n){for(var i,a,o=0,s=r;o<s.length;o++)for(var c=s[o],u=0,l=t;u<l.length;u++){var _=l[u];n(_,c)&&(d(_,c),i=e.appendIfUnique(i,_),a=e.appendIfUnique(a,c))}return[i?e.filter(t,(function(t){return!e.contains(i,t)})):t,a?e.filter(r,(function(t){return!e.contains(a,t)})):r]}function g(e,t,r){for(var n=e.length<t.length?e.length:t.length,i=0;i<n;i++)i<r.length&&2==(7&r[i])?y(e[i],t[i]):d(e[i],t[i])}function y(e,t){q||128&i?(a=!a,d(e,t),a=!a):d(e,t)}function h(e){if(8650752&e.flags)for(var r=0,n=t;r<n.length;r++){var i=n[r];if(e===i.typeParameter)return i}}function v(t,r,n){var a=0;if(1048576&n){for(var o=void 0,s=1048576&t.flags?t.types:[t],c=new Array(s.length),u=!1,_=0,f=r;_<f.length;_++){if(h(T=f[_]))o=T,a++;else for(var m=0;m<s.length;m++){var g=l;l=256,d(s[m],T),l===i&&(c[m]=!0),u=u||-1===l,l=Math.min(l,g)}}if(0===a){var y=function(t){for(var r,n=0,i=t;n<i.length;n++){var a=i[n],o=2097152&a.flags&&e.find(a.types,(function(e){return!!h(e)}));if(!o||r&&o!==r)return;r=o}return r}(r);return void(y&&p(t,y,1))}if(1===a&&!u){var v=e.flatMap(s,(function(e,t){return c[t]?void 0:e}));if(v.length)return void d(Qc(v),o)}}else for(var b=0,x=r;b<x.length;b++){h(T=x[b])?a++:d(t,T)}if(2097152&n?1===a:a>0)for(var D=0,S=r;D<S.length;D++){var T;h(T=S[D])&&p(t,T,1)}}function b(t,r){var n=524288&r.flags&&!(16&e.getObjectFlags(r)&&r.symbol&&32&r.symbol.flags)?r.symbol:void 0;if(n){if(e.contains(o,n))return void(l=-1);(o||(o=[])).push(n),x(t,r),o.pop()}else x(t,r)}function x(t,r){if(4&e.getObjectFlags(t)&&4&e.getObjectFlags(r)&&(t.target===r.target||y_(t)&&y_(r)))g(_c(t),_c(r),a_(t.target));else{if(Xo(t)&&Xo(r)&&(d(zo(t),zo(r)),d(Uo(t),Uo(r))),32&e.getObjectFlags(r))if(function t(r,n,i){if(1048576&i.flags){for(var a=!1,o=0,s=i.types;o<s.length;o++){a=t(r,n,s[o])||a}return a}if(4194304&i.flags){var c=h(i.type);if(c&&!c.isFixed){var u=yd(r,n,i);u&&p(u,c.typeParameter,1048576&e.getObjectFlags(r)?4:2)}return!0}if(262144&i.flags){p(lu(r),i,8);var l=rs(i);if(l&&t(r,n,l))return!0;var _=e.map(ts(r),wa),f=Es(r,0),m=uu(r),g=m&&m.type;return d(Qc(e.append(e.append(_,f),g)),Uo(n)),!0}return!1}(t,r,zo(r)))return;xd(t,r)||(!function(e,t){if(y_(e)||w_(e)){if(w_(t)){for(var r=w_(e)?O_(e):0,n=O_(t),i=w_(e)?I_(e):v_(e),a=I_(t),o=n<r||i?n:r,s=0;s<o;s++)d(s<r?_c(e)[s]:i,_c(t)[s]);if(a){var c=o<r?_c(e).slice(o,r):[];i&&c.push(i),c.length&&d(Qc(c),a)}return}if(y_(t))return void T(e,t)}for(var u=$o(t),l=0,_=u;l<_.length;l++){var p=_[l],f=vs(e,p.escapedName);f&&d(wa(f),wa(p))}}(t,r),D(t,r,0),D(t,r,1),T(t,r))}}function D(t,r,n){for(var i=xs(t,n),a=xs(r,n),o=i.length,s=a.length,c=o<s?o:s,u=!!(1048576&e.getObjectFlags(t)),l=0;l<c;l++)S(Qs(i[o-c+l]),Qs(a[s-c+l]),u)}function S(e,t,r){if(!r){var n=u,i=t.declaration?t.declaration.kind:0;u=u||160===i||159===i||161===i,od(e,t,y),u=n}sd(e,t,d)}function T(e,t){var r=Es(t,0);r&&((n=Es(e,0)||Cs(e,0))&&d(n,r));var n,i=Es(t,1);i&&((n=Es(e,1)||Es(e,0)||Cs(e,1))&&d(n,i))}d(r,n)}function Td(e,t){return El(e,t)||!!(384&e.flags)&&El(k_(e),t)}function Ed(e,t){return!!(524288&e.flags&&524288&t.flags&&e.symbol&&e.symbol===t.symbol||e.aliasSymbol&&e.aliasTypeArguments&&e.aliasSymbol===t.aliasSymbol)}function Cd(t){return!!(128&e.getObjectFlags(t))}function kd(t){return!!(65664&e.getObjectFlags(t))}function Nd(t){return 56&t.priority?iu(t.contraCandidates):function(t){return e.reduceLeft(t,(function(e,t){return Al(t,e)?t:e}))}(t.contraCandidates)}function Ad(t,r){var n=function(t){if(t.length>1){var r=e.filter(t,kd);if(r.length){var n=Qc(r,2);return e.concatenate(e.filter(t,(function(e){return!kd(e)})),[n])}}return t}(t.candidates),i=function(e){var t=ns(e);return!!t&&fy(16777216&t.flags?as(t):t,4325372)}(t.typeParameter),a=!i&&t.topLevel&&(t.isFixed||!gd(zs(r),t.typeParameter)),o=i?e.sameMap(n,Vu):a?e.sameMap(n,N_):n;return rd(56&t.priority?Qc(o,2):function(t){if(!V)return g_(t);var r=e.filter(t,(function(e){return!(98304&e.flags)}));return r.length?J_(g_(r),98304&L_(t)):Qc(t,2)}(o))}function Fd(t,r){var n=t.inferences[r];if(!n.inferredType){var i=void 0,a=t.signature;if(a){var o=n.candidates?Ad(n,a):void 0;if(n.contraCandidates){var s=Nd(n);i=!o||131072&o.flags||!Al(o,s)?s:o}else if(o)i=o;else if(1&t.flags)i=je;else{var c=ps(n.typeParameter);c&&(i=gl(c,rl(function(t,r){return function(n){return e.findIndex(t.inferences,(function(e){return e.typeParameter===n}))>=r?De:n}}(t,r),t.nonFixingMapper)))}}else i=Dd(n);n.inferredType=i||Pd(!!(2&t.flags));var u=ns(n.typeParameter);if(u){var l=gl(u,t.nonFixingMapper);i&&t.compareTypes(i,Do(l,i))||(n.inferredType=i=l)}}return n.inferredType}function Pd(e){return e?he:De}function wd(e){for(var t=[],r=0;r<e.inferences.length;r++)t.push(Fd(e,r));return t}function Id(t){switch(t.escapedText){case"document":case"console":return e.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;case"$":return K.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery;case"describe":case"suite":case"it":case"test":return K.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha;case"process":case"require":case"Buffer":case"module":return K.types?e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:e.Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode;case"Map":case"Set":case"Promise":case"Symbol":case"WeakMap":case"WeakSet":case"Iterator":case"AsyncIterator":return e.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later;default:return 280===t.parent.kind?e.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:e.Diagnostics.Cannot_find_name_0}}function Od(t){var r=dn(t);return r.resolvedSymbol||(r.resolvedSymbol=!e.nodeIsMissing(t)&&gn(t,t.escapedText,1160127,Id(t),t,!e.isWriteOnlyAccess(t),!1,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1)||ge),r.resolvedSymbol}function Md(t){return!!e.findAncestor(t,(function(e){return 171===e.kind||75!==e.kind&&152!==e.kind&&"quit"}))}function Ld(t,r){switch(r.kind){case 199:case 217:return Ld(t,r.expression)}switch(t.kind){case 75:return 75===r.kind&&Od(t)===Od(r)||(241===r.kind||190===r.kind)&&si(Od(t))===ri(r);case 103:return 103===r.kind;case 101:return 101===r.kind;case 217:case 199:return Ld(t.expression,r);case 193:case 194:return e.isAccessExpression(r)&&Rd(t)===Rd(r)&&Ld(t.expression,r.expression)}return!1}function Rd(t){return 193===t.kind?t.name.escapedText:e.isStringOrNumericLiteralLike(t.argumentExpression)?e.escapeLeadingUnderscores(t.argumentExpression.text):void 0}function Bd(t,r){for(;e.isAccessExpression(t);)if(Ld(t=t.expression,r))return!0;return!1}function jd(t,r){for(;e.isOptionalChain(t);)if(Ld(t=t.expression,r))return!0;return!1}function Kd(t,r){var n;return e.isAccessExpression(r)&&Bd(t,r.expression)&&void 0!==(n=Rd(r))&&Jd(function t(r){if(75===r.kind)return wa(Od(r));if(e.isAccessExpression(r)){var n=t(r.expression);if(n){var i=Rd(r);return void 0!==i?Xi(n,i):void 0}}return}(r.expression),n)}function Jd(t,r){if(t&&1048576&t.flags){var n=ys(t,r);if(n&&2&e.getCheckFlags(n))return void 0===n.isDiscriminantProperty&&(n.isDiscriminantProperty=192==(192&n.checkFlags)&&function(e){return!!(1048576&e.flags&&(1040&e.flags||!yu(e)))}(wa(n))),!!n.isDiscriminantProperty}return!1}function zd(e,t){for(var r,n=0,i=e;n<i.length;n++){var a=i[n];if(Jd(t,a.escapedName)){if(r){r.push(a);continue}r=[a]}}return r}function Ud(e,t){return Ld(e,t)||Bd(e,t)}function Vd(e){return(!e.id||e.id<0)&&(e.id=d,d++),e.id}function qd(e,t){if(e!==t){if(131072&t.flags)return t;var r=_p(e,(function(e){return function(e,t){if(!(1048576&e.flags))return Fl(e,t);for(var r=0,n=e.types;r<n.length;r++){if(Fl(n[r],t))return!0}return!1}(t,e)}));if(512&t.flags&&qu(t)&&(r=pp(r,Uu)),Fl(t,r))return r}return e}function Wd(e){var t=Qo(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&Al(e,ut))}function Gd(t){var r=t.flags;if(4&r)return V?16317953:16776705;if(128&r){var n=""===t.value;return V?n?12123649:7929345:n?12582401:16776705}if(40&r)return V?16317698:16776450;if(256&r){var i=0===t.value;return V?i?12123394:7929090:i?12582146:16776450}if(64&r)return V?16317188:16775940;if(2048&r){i=M_(t);return V?i?12122884:7928580:i?12581636:16775940}return 16&r?V?16316168:16774920:528&r?V?t===Pe||t===we?12121864:7927560:t===Pe||t===we?12580616:16774920:524288&r?16&e.getObjectFlags(t)&&Wl(t)?V?16318463:16777215:Wd(t)?V?7880640:16728e3:V?7888800:16736160:49152&r?9830144:65536&r?9363232:12288&r?V?7925520:16772880:67108864&r?V?7888800:16736160:63176704&r?Gd(cs(t)||De):3145728&r?function(e){for(var t=0,r=0,n=e;r<n.length;r++){t|=Gd(n[r])}return t}(t.types):16777215}function Hd(e,t){return _p(e,(function(e){return 0!=(Gd(e)&t)}))}function Yd(e,t){if(t){var r=Ky(t);return Qc([Hd(e,524288),r])}return e}function Xd(e,t){var r=ou(t);if(!_o(r))return xe;var n=yo(r);return Jp(Xi(e,n),t)||Mf(n)&&Es(e,1)||Es(e,0)||xe}function Qd(e,t){return lp(e,D_)&&function(e,t){var r=Xi(e,""+t);return r||(lp(e,w_)?pp(e,(function(e){return I_(e)||Se})):void 0)}(e,t)||Zh(65,e,Se,void 0)||xe}function $d(e){return jc(Zh(65,e,Se,void 0)||xe)}function Zd(e){return 208===e.parent.kind&&e.parent.left===e||231===e.parent.kind&&e.parent.initializer===e}function ep(e){return Xd(tp(e.parent),e.name)}function tp(e){var t=e.parent;switch(t.kind){case 230:return Ne;case 231:return $h(t.expression,t.awaitModifier)||xe;case 208:return function(e){return 191===e.parent.kind&&Zd(e.parent)||279===e.parent.kind&&Zd(e.parent.parent)?Yd(tp(e),e.right):Ky(e.right)}(t);case 202:return Se;case 191:return function(e,t){return Qd(tp(e),e.elements.indexOf(t))}(t,e);case 212:return function(e){return $d(tp(e.parent))}(t);case 279:return ep(t);case 280:return function(e){return Yd(ep(e),e.objectAssignmentInitializer)}(t)}return xe}function rp(e){return e.initializer?function(e){return dn(e).resolvedType||Ky(e)}(e.initializer):230===e.parent.parent.kind?Ne:231===e.parent.parent.kind&&$h(e.parent.parent.expression,e.parent.parent.awaitModifier)||xe}function np(e){return 241===e.kind?rp(e):function(e){var t=e.parent,r=np(t.parent);return Yd(188===t.kind?Xd(r,e.propertyName||e.name):e.dotDotDotToken?$d(r):Qd(r,t.elements.indexOf(e)),e.initializer)}(e)}function ip(e){switch(e.kind){case 199:return ip(e.expression);case 208:switch(e.operatorToken.kind){case 62:return ip(e.left);case 27:return ip(e.right)}}return e}function ap(e){return 275===e.kind?Vu(Ky(e.expression)):Be}function op(e){var t=dn(e);if(!t.switchTypes){t.switchTypes=[];for(var r=0,n=e.caseBlock.clauses;r<n.length;r++){var i=n[r];t.switchTypes.push(ap(i))}}return t.switchTypes}function sp(t){for(var r=[],n=0,i=t.caseBlock.clauses;n<i.length;n++){var a=i[n];if(275===a.kind){if(e.isStringLiteralLike(a.expression)){r.push(a.expression.text);continue}return e.emptyArray}r.push(void 0)}return r}function cp(e,t){return e===t||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(var r=0,n=e.types;r<n.length;r++){var i=n[r];if(!Wc(t.types,i))return!1}return!0}if(1024&e.flags&&$a(e)===t)return!0;return Wc(t.types,e)}(e,t)}function up(t,r){return 1048576&t.flags?e.forEach(t.types,r):r(t)}function lp(t,r){return 1048576&t.flags?e.every(t.types,r):r(t)}function _p(t,r){if(1048576&t.flags){var n=t.types,i=e.filter(n,r);return i===n?t:Zc(i,t.objectFlags)}return r(t)?t:Be}function dp(e){return 1048576&e.flags?e.types.length:1}function pp(e,t,r){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);for(var n,i=0,a=e.types;i<a.length;i++){var o=t(a[i]);o&&(n?n.push(o):n=[o])}return n&&Qc(n,r?0:1)}function fp(e,t){return _p(e,(function(e){return 0!=(e.flags&t)}))}function mp(e,t){return cp(Ne,e)&&fy(t,128)||cp(Ae,e)&&fy(t,256)||cp(Fe,e)&&fy(t,2048)?pp(e,(function(e){return 4&e.flags?fp(t,132):8&e.flags?fp(t,264):64&e.flags?fp(t,2112):e})):e}function gp(e){return 0===e.flags}function yp(e){return 0===e.flags?e.type:e}function hp(e,t){return t?{flags:0,type:e}:e}function vp(e){return fe[e.id]||(fe[e.id]=function(e){var t=pi(256);return t.elementType=e,t}(e))}function bp(e,t){var r=k_(Jy(t));return cp(r,e.elementType)?e:vp(Qc([e.elementType,r]))}function xp(e){return e.finalArrayType||(e.finalArrayType=131072&(t=e.elementType).flags?bt:jc(1048576&t.flags?Qc(t.types,2):t));var t}function Dp(t){return 256&e.getObjectFlags(t)?xp(t):t}function Sp(t){return 256&e.getObjectFlags(t)?t.elementType:Be}function Tp(t,r){return function(t){for(var r=!1,n=0,i=t;n<i.length;n++){var a=i[n];if(!(131072&a.flags)){if(!(256&e.getObjectFlags(a)))return!1;r=!0}}return r}(t)?vp(Qc(e.map(t,Sp))):Qc(e.sameMap(t,Dp),r)}function Ep(t){var r=function e(t){var r=t.parent;return 199===r.kind||208===r.kind&&62===r.operatorToken.kind&&r.left===t||208===r.kind&&27===r.operatorToken.kind&&r.right===t?e(r):t}(t),n=r.parent,i=193===n.kind&&("length"===n.name.escapedText||195===n.parent.kind&&e.isPushOrUnshiftIdentifier(n.name)),a=194===n.kind&&n.expression===r&&208===n.parent.kind&&62===n.parent.operatorToken.kind&&n.parent.left===n&&!e.isAssignmentTarget(n.parent)&&my(Ky(n.argumentExpression),296);return i||a}function Cp(t,r){if(8752&t.flags)return wa(t);if(7&t.flags){if((n=t.valueDeclaration)&&(241===n.kind||155===n.kind||158===n.kind||157===n.kind)&&e.getEffectiveTypeAnnotationNode(n))return wa(t);r&&t.valueDeclaration&&e.addRelatedInfo(r,e.createDiagnosticForNode(t.valueDeclaration,e.Diagnostics._0_is_declared_here,Pi(t)))}var n}function kp(t,r){if(!(16777216&t.flags))switch(t.kind){case 75:var n=si(Od(t));return Cp(2097152&n.flags?Mn(n):n,r);case 103:return function(t){var r=e.getThisContainer(t,!1);if(e.isFunctionLike(r)){var n=Ls(r);if(n.thisParameter)return Cp(n.thisParameter)}if(e.isClassLike(r.parent)){var i=ri(r.parent);return e.hasModifier(r,32)?wa(i):ro(i).thisType}}(t);case 193:var i=kp(t.expression,r),a=i&&vs(i,t.name.escapedText);return a&&Cp(a,r);case 199:return kp(t.expression,r)}}function Np(t){var r=dn(t),n=r.effectsSignature;if(void 0===n){var i=void 0;225===t.parent.kind?i=kp(t.expression,void 0):101!==t.expression.kind&&(i=e.isOptionalChain(t)?gm(H_(zy(t.expression),t.expression),t.expression):lm(t.expression));var a=xs(i&&ms(i)||De,0),o=1!==a.length||a[0].typeParameters?e.some(a,Ap)?Dg(t):void 0:a[0];n=r.effectsSignature=o&&Ap(o)?o:Zt}return n===Zt?void 0:n}function Ap(e){return!!(Js(e)||e.declaration&&131072&(Us(e.declaration)||De).flags)}function Fp(e){var t=Ip(e,!1);return qt=e,Wt=t,t}function Pp(e){return!(4096&e.flags&&e.lock.locked)&&Ip(e,!1)}function wp(t){var r=e.skipParentheses(t);return 90===r.kind||208===r.kind&&(55===r.operatorToken.kind&&(wp(r.left)||wp(r.right))||56===r.operatorToken.kind&&wp(r.left)&&wp(r.right))}function Ip(t,r){for(;;){if(t===qt)return Wt;var n=t.flags;if(2048&n){if(!r){var i=Vd(t),a=Mr[i];return void 0!==a?a:Mr[i]=Ip(t,!0)}r=!1}if(4464&n)t=t.antecedent;else if(512&n){var o=Np(t.node);if(o){var s=Js(o);if(s&&3===s.kind){var c=t.node.arguments[s.parameterIndex];if(c&&wp(c))return!1}if(131072&zs(o).flags)return!1}t=t.antecedent}else{if(4&n)return e.some(t.antecedents,Pp);if(8&n)t=t.antecedents[0];else{if(!(128&n)){if(8192&n){qt=void 0,t.locked=!0;var u=Ip(t.antecedent,!1);return t.locked=!1,u}return!(1&n)}if(t.clauseStart===t.clauseEnd&&ey(t.switchStatement))return!1;t=t.antecedent}}}}function Op(t,r,n,i,a){var o;void 0===n&&(n=r);var s=!1,c=0;if(mr)return xe;if(!t.flowNode||!a&&!(133970943&r.flags))return r;gr++;var u=fr,l=yp(p(t.flowNode));fr=u;var _=256&e.getObjectFlags(l)&&Ep(t)?bt:Dp(l);return _===ze||t.parent&&217===t.parent.kind&&131072&Hd(_,2097152).flags?r:_;function d(){return s?o:(s=!0,o=function e(t,r,n,i){switch(t.kind){case 75:var a=Od(t);return a!==ge?(i?N(i):"-1")+"|"+qc(r)+"|"+qc(n)+"|"+(jp(t)?"@":"")+A(a):void 0;case 103:return"0";case 217:case 199:return e(t.expression,r,n,i);case 193:case 194:var o=Rd(t);if(void 0!==o){var s=e(t.expression,r,n,i);return s&&s+"."+o}}}(t,r,n,i))}function p(a){if(2e3===c)return mr=!0,function(t){var r=e.findAncestor(t,e.isFunctionOrModuleBlock),n=e.getSourceFileOfNode(t),i=e.getSpanOfTokenAtPosition(n,r.statements.pos);jr.add(e.createFileDiagnostic(n,i.start,i.length,e.Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}(t),xe;for(c++;;){var o=a.flags;if(2048&o)for(var s=u;s<fr;s++)if(Ir[s]===a)return c--,Or[s];var l=void 0;if(8192&o)a.locked=!0,l=p(a.antecedent),a.locked=!1;else{if(4096&o){a=a.antecedent;continue}if(16&o){if(!(l=m(a))){a=a.antecedent;continue}}else if(512&o){if(!(l=g(a))){a=a.antecedent;continue}}else if(96&o)l=h(a);else if(128&o)l=v(a);else if(12&o){if(1===a.antecedents.length){a=a.antecedents[0];continue}l=4&o?b(a):x(a)}else if(256&o){if(!(l=y(a))){a=a.antecedent;continue}}else if(2&o){var _=a.node;if(_&&_!==i&&193!==t.kind&&194!==t.kind&&103!==t.kind){a=_.flowNode;continue}l=n}else l=Jh(r)}return 2048&o&&(Ir[fr]=a,Or[fr]=l,fr++),c--,l}}function f(e){var r=e.node;if(16384&e.flags){var n=Ar[N(r)];if(n)return n}var i=gr,a=Jp(241===r.kind||190===r.kind?np(r):tp(r),t);return gr!==i&&pr===dr&&(e.flags|=16384,Ar[N(r)]=a),a}function m(n){var i=n.node;if(Ld(t,i)){if(!Fp(n))return ze;if(2===e.getAssignmentTargetKind(i)){var a=p(n.antecedent);return hp(k_(yp(a)),gp(a))}if(r===ve||r===bt){if(function(e){return 241===e.kind&&e.initializer&&oa(e.initializer)||190!==e.kind&&208===e.parent.kind&&oa(e.parent.right)}(i))return vp(Be);var o=k_(f(n));return Fl(o,r)?o:vt}return 1048576&r.flags?qd(r,f(n)):r}if(Bd(t,i)){if(!Fp(n))return ze;if(e.isVariableDeclaration(i)&&(e.isInJSFile(i)||e.isVarConst(i))){var s=e.getDeclaredExpandoInitializer(i);if(s&&(200===s.kind||201===s.kind))return p(n.antecedent)}return r}if(e.isVariableDeclaration(i)&&230===i.parent.parent.kind&&Ld(t,i.parent.parent.expression))return dm(yp(p(n.antecedent)))}function g(t){var r=Np(t.node);if(r){var n=Js(r);if(n&&(2===n.kind||3===n.kind)){var i=p(t.antecedent),a=yp(i),o=n.type?B(a,n,t.node,!0):3===n.kind&&n.parameterIndex>=0&&n.parameterIndex<t.node.arguments.length?function t(r,n){var i=e.skipParentheses(n);if(90===i.kind)return ze;if(208===i.kind){if(55===i.operatorToken.kind)return t(t(r,i.left),i.right);if(56===i.operatorToken.kind)return Qc([t(r,i.left),t(r,i.right)])}return j(r,i,!0)}(a,t.node.arguments[n.parameterIndex]):a;return o===a?i:hp(o,gp(i))}if(131072&zs(r).flags)return ze}}function y(n){if(r===ve||r===bt){var i=n.node,a=195===i.kind?i.expression.expression:i.left.expression;if(Ld(t,ip(a))){var o=p(n.antecedent),s=yp(o);if(256&e.getObjectFlags(s)){var c=s;if(195===i.kind)for(var u=0,l=i.arguments;u<l.length;u++){c=bp(c,l[u])}else my(Jy(i.left.argumentExpression),296)&&(c=bp(c,i.right));return c===s?o:hp(c,gp(o))}return o}}}function h(e){var t=p(e.antecedent),r=yp(t);if(131072&r.flags)return t;var n=0!=(32&e.flags),i=Dp(r),a=j(i,e.node,n);if(a===i)return t;var o=gp(t);return hp(o&&131072&a.flags?je:a,o)}function v(n){var i=n.switchStatement.expression,a=p(n.antecedent),o=yp(a);if(Ld(t,i))o=M(o,n.switchStatement,n.clauseStart,n.clauseEnd);else if(203===i.kind&&Ld(t,i.expression))o=function(t,r,n,i){var a=sp(r);if(!a.length)return t;var o,s,c=e.findIndex(a,(function(e){return void 0===e})),u=n===i||c>=n&&c<i;if(c>-1){var l=a.filter((function(e){return void 0!==e})),_=c<n?n-1:n,d=c<i?i-1:i;o=l.slice(_,d),s=Zg(_,d,l,u)}else o=a.slice(n,i),s=Zg(n,i,a,u);if(u)return _p(t,(function(e){return(Gd(e)&s)===s}));var p=Hd(Qc(o.map((function(e){return function(e,t){switch(t){case"function":return 1&e.flags?e:ut;case"object":return 2&e.flags?Qc([Ue,Ce]):e;default:return Jr.get(t)||e}}(t,e)}))),s);1048576&p.flags&&(p=qd(p,us(t)));return Hd(pp(t,(f=p,function(e){if(Al(f,e))return f;if(63176704&e.flags){var t=cs(e)||he;if(Al(f,t))return iu([e,f])}return e})),s);var f}(o,n.switchStatement,n.clauseStart,n.clauseEnd);else if(V&&(jd(i,t)?o=O(o,n.switchStatement,n.clauseStart,n.clauseEnd,(function(e){return!(163840&e.flags)})):203===i.kind&&jd(i.expression,t)&&(o=O(o,n.switchStatement,n.clauseStart,n.clauseEnd,(function(e){return!(131072&e.flags||128&e.flags&&"undefined"===e.value)})))),T(i,o))o=E(o,i,(function(e){return M(e,n.switchStatement,n.clauseStart,n.clauseEnd)}));else if(Kd(t,i))o=r;else if(n.clauseStart===n.clauseEnd&&ey(n.switchStatement))return ze;return hp(o,gp(a))}function b(t){for(var i=[],a=!1,o=!1,s=0,c=t.antecedents;s<c.length;s++){var u=c[s];if(!(4096&u.flags&&u.lock.locked)){var l=p(u),_=yp(l);if(_===r&&r===n)return _;e.pushIfUnique(i,_),cp(_,r)||(a=!0),gp(l)&&(o=!0)}}return hp(Tp(i,a?2:1),o)}function x(t){var n=Vd(t),i=Nr[n]||(Nr[n]=e.createMap()),a=d();if(!a)return r;var o=i.get(a);if(o)return o;for(var s=dr;s<pr;s++)if(Fr[s]===t&&Pr[s]===a&&wr[s].length)return hp(Tp(wr[s],1),!0);for(var c,u=[],l=!1,_=0,f=t.antecedents;_<f.length;_++){var m=f[_],g=void 0;if(c){Fr[pr]=t,Pr[pr]=a,wr[pr]=u,pr++,g=p(m),pr--;var y=i.get(a);if(y)return y}else g=c=p(m);var h=yp(g);if(e.pushIfUnique(u,h),cp(h,r)||(l=!0),h===r)break}var v=Tp(u,l?2:1);return gp(c)?hp(v,!0):(i.set(a,v),v)}function T(r,n){if(!(1048576&n.flags&&e.isAccessExpression(r)))return!1;var i=Rd(r);return void 0!==i&&(Ld(t,r.expression)&&Jd(n,i))}function E(e,t,r){var n=Rd(t);if(void 0===n)return e;var i=Xi(e,n),a=i&&r(i);return i===a?e:_p(e,(function(e){return wl(function(e,t){return Xi(e,t)||Mf(t)&&Es(e,1)||Es(e,0)||De}(e,n),a)}))}function C(e,n,i){return Ld(t,n)?Hd(e,i?4194304:8388608):(V&&i&&jd(n,t)&&(e=Hd(e,2097152)),T(n,r)?E(e,n,(function(e){return Hd(e,i?4194304:8388608)})):Kd(t,n)?r:e)}function k(t,r,n){if(1572864&t.flags||hu(t)){var i=e.escapeLeadingUnderscores(r.text);return _p(t,(function(e){return function(e,t,r){if(Ts(e,0))return!0;var n=vs(e,t);return n?!!(16777216&n.flags)||r:!r}(e,i,n)}))}return t}function F(n,i,a){switch(i.operatorToken.kind){case 62:return C(j(n,i.right,a),i.left,a);case 34:case 35:case 36:case 37:var o=i.operatorToken.kind,s=ip(i.left),c=ip(i.right);if(203===s.kind&&e.isStringLiteralLike(c))return I(n,s,o,c,a);if(203===c.kind&&e.isStringLiteralLike(s))return I(n,c,o,s,a);if(Ld(t,s))return w(n,o,c,a);if(Ld(t,c))return w(n,o,s,a);if(V&&(jd(s,t)?n=P(n,o,c,a):jd(c,t)&&(n=P(n,o,s,a))),T(s,r))return E(n,s,(function(e){return w(e,o,c,a)}));if(T(c,r))return E(n,c,(function(e){return w(e,o,s,a)}));if(Kd(t,s)||Kd(t,c))return r;break;case 97:return function(n,i,a){var o=ip(i.left);if(!Ld(t,o))return a&&V&&jd(o,t)?Hd(n,2097152):Bd(t,o)&&!function(t){return e.isAccessExpression(t)&&103===t.expression.kind&&!!(8&t.expression.flags)}(t)?r:n;var s,c=Ky(i.right);if(!Pl(c,ut))return n;var u=vs(c,"prototype");if(u){var l=wa(u);Qi(l)||(s=l)}if(Qi(n)&&(s===ct||s===ut))return n;if(!s){var _=xs(c,1);s=_.length?Qc(e.map(_,(function(e){return zs(Ys(e))}))):Ge}return L(n,s,a,Pl)}(n,i,a);case 96:var u=ip(i.right);if(e.isStringLiteralLike(i.left)&&Ld(t,u))return k(n,i.left,a);break;case 27:return j(n,i.right,a)}return n}function P(e,t,r,n){var i=34===t||35===t;return(34===t||36===t?n:!n)===!(Gd(Ky(r))&(i?262144:65536))?Hd(e,2097152):e}function w(e,t,r,n){if(1&e.flags)return e;35!==t&&37!==t||(n=!n);var i=Ky(r);if(2&e.flags&&n&&(36===t||37===t))return 67239932&i.flags?i:524288&i.flags?Ue:e;if(98304&i.flags)return V?Hd(e,34===t||35===t?n?262144:2097152:65536&i.flags?n?131072:1048576:n?65536:524288):e;if(67637251&e.flags)return e;if(n){var a=_p(e,34===t?function(e){return Il(e,i)||(t=i,0!=(524&e.flags)&&0!=(28&t.flags));var t}:function(e){return Il(e,i)});return 131072&a.flags?e:mp(a,i)}if(E_(i)){var o=Vu(i);return _p(e,(function(e){return Vu(e)!==o}))}return e}function I(e,n,i,a,o){35!==i&&37!==i||(o=!o);var s=ip(n.expression);if(!Ld(t,s))return V&&jd(s,t)&&o===("undefined"!==a.text)?Hd(e,2097152):Bd(t,s)?r:e;if(1&e.flags&&"function"===a.text)return e;var c=o?D.get(a.text)||128:S.get(a.text)||32768;return Hd(o?pp(e,(function(e){if(2&e.flags&&"object"===a.text)return Qc([Ue,Ce]);var t="function"===a.text?ut:Jr.get(a.text);if(t){if(Al(e,t))return e;if(Al(t,e))return t;if(63176704&e.flags){var r=cs(e)||he;if(Al(t,r))return iu([e,t])}}return e})):e,c)}function O(t,r,n,i,a){return n!==i&&e.every(op(r).slice(n,i),a)?Hd(t,2097152):t}function M(t,r,n,i){var a=op(r);if(!a.length)return t;var o=a.slice(n,i),s=n===i||e.contains(o,Be);if(2&t.flags&&!s){for(var c=void 0,u=0;u<o.length;u+=1){var l=o[u];if(67239932&l.flags)void 0!==c&&c.push(l);else{if(!(524288&l.flags))return t;void 0===c&&(c=o.slice(0,u)),c.push(Ue)}}return Qc(void 0===c?o:c)}var _=Qc(o),d=131072&_.flags?Be:mp(_p(t,(function(e){return Il(_,e)})),_);if(!s)return d;var p=_p(t,(function(t){return!(E_(t)&&e.contains(a,Vu(t)))}));return 131072&d.flags?p:Qc([d,p])}function L(e,t,r,n){if(!r)return _p(e,(function(e){return!n(e,t)}));if(1048576&e.flags){var i=_p(e,(function(e){return n(e,t)}));if(!(131072&i.flags))return i}return Al(t,e)?t:Fl(e,t)?e:Fl(t,e)?t:iu([e,t])}function R(r,n,i){if(function(e,t){if(e.arguments)for(var r=0,n=e.arguments;r<n.length;r++){if(Ud(t,n[r]))return!0}return!(193!==e.expression.kind||!Ud(t,e.expression.expression))}(n,t)){var a=i||!e.isCallChain(n)?Np(n):void 0,o=a&&Js(a);if(o&&(0===o.kind||1===o.kind))return B(r,o,n,i)}return r}function B(n,i,a,o){if(i.type&&(!Qi(n)||i.type!==ct&&i.type!==ut)){var s=function(t,r){if(1===t.kind||3===t.kind)return r.arguments[t.parameterIndex];var n=e.skipParentheses(r.expression);return e.isAccessExpression(n)?e.skipParentheses(n.expression):void 0}(i,a);if(s){if(Ld(t,s))return L(n,i.type,o,Al);if(V&&o&&jd(s,t)&&!(65536&Gd(i.type)))return Hd(n,2097152);if(Bd(t,s))return r}}return n}function j(n,i,a){if(e.isExpressionOfOptionalChainRoot(i)||e.isBinaryExpression(i.parent)&&60===i.parent.operatorToken.kind&&i.parent.left===i)return function(e,n,i){if(Ld(t,n))return Hd(e,i?2097152:262144);if(T(n,r))return E(e,n,(function(e){return Hd(e,i?2097152:262144)}));if(Kd(t,n))return r;return e}(n,i,a);switch(i.kind){case 75:case 103:case 101:case 193:case 194:return C(n,i,a);case 195:return R(n,i,a);case 199:return j(n,i.expression,a);case 208:return F(n,i,a);case 206:if(53===i.operator)return j(n,i.operand,!a)}return n}}function Mp(t){return e.findAncestor(t.parent,(function(t){return e.isFunctionLike(t)&&!e.getImmediatelyInvokedFunctionExpression(t)||249===t.kind||288===t.kind||158===t.kind}))}function Lp(t){var r=e.getRootDeclaration(t.valueDeclaration).parent,n=dn(r);return 8388608&n.flags||(n.flags|=8388608,function(t){return!!e.findAncestor(t.parent,(function(t){return e.isFunctionLike(t)&&!!(8388608&dn(t).flags)}))}(r)||Rp(r)),t.isAssigned||!1}function Rp(t){if(75===t.kind){if(e.isAssignmentTarget(t)){var r=Od(t);r.valueDeclaration&&155===e.getRootDeclaration(r.valueDeclaration).kind&&(r.isAssigned=!0)}}else e.forEachChild(t,Rp)}function Bp(e){return 3&e.flags&&0!=(2&om(e))&&wa(e)!==bt}function jp(e){var t=e.parent;return 193===t.kind||195===t.kind&&t.expression===e||194===t.kind&&t.expression===e||190===t.kind&&t.name===e&&!!t.initializer}function Kp(e){return 58982400&e.flags&&fy(cs(e)||De,98304)}function Jp(e,t){return e&&jp(t)&&up(e,Kp)?pp(rd(e),us):e}function zp(t,r){In(t,111551)&&!Md(r)&&(K.preserveConstEnums&&function(t){return!!e.findAncestor(t,(function(t){return t.parent&&e.isExportAssignment(t.parent)&&t.parent.expression===t&&e.isEntityNameExpression(t)}))}(r)||!Cb(Mn(t)))&&Rn(t)}function Up(t){var r=Od(t);if(r===ge)return xe;if(r===ie){var n=e.getContainingFunction(t);return J<2&&(201===n.kind?Xr(t,e.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression):e.hasModifier(n,256)&&Xr(t,e.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method)),dn(n).flags|=8192,wa(r)}t.parent&&e.isPropertyAccessExpression(t.parent)&&t.parent.expression===t||zp(r,t);var i=si(r),a=i.valueDeclaration;if(32&i.flags)if(244===a.kind&&e.nodeIsDecorated(a))for(n=e.getContainingClass(t);void 0!==n;){if(n===a&&n.name!==t){dn(a).flags|=16777216,dn(t).flags|=33554432;break}n=e.getContainingClass(n)}else if(213===a.kind)for(n=e.getThisContainer(t,!1);288!==n.kind;){if(n.parent===a){158===n.kind&&e.hasModifier(n,32)&&(dn(a).flags|=16777216,dn(t).flags|=33554432);break}n=e.getThisContainer(n,!1)}!function(t,r){if(J>=2||0==(34&r.flags)||e.isSourceFile(r.valueDeclaration)||278===r.valueDeclaration.parent.kind)return;var n=e.getEnclosingBlockScopeContainer(r.valueDeclaration),i=function(t,r){return!!e.findAncestor(t,(function(t){return t===r?"quit":e.isFunctionLike(t)}))}(t.parent,n),a=n,o=!1;for(;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}if(o){if(i){var s=!0;if(e.isForStatement(n)&&e.getAncestor(r.valueDeclaration,242).parent===n){var c=function(t,r){return e.findAncestor(t,(function(e){return e===r?"quit":e===r.initializer||e===r.condition||e===r.incrementor||e===r.statement}))}(t.parent,n);if(c){var u=dn(c);u.flags|=131072;var l=u.capturedBlockScopeBindings||(u.capturedBlockScopeBindings=[]);e.pushIfUnique(l,r),c===n.initializer&&(s=!1)}}s&&(dn(a).flags|=65536)}229===n.kind&&e.getAncestor(r.valueDeclaration,242).parent===n&&function(t,r){var n=t;for(;199===n.parent.kind;)n=n.parent;var i=!1;if(e.isAssignmentTarget(n))i=!0;else if(206===n.parent.kind||207===n.parent.kind){var a=n.parent;i=45===a.operator||46===a.operator}if(!i)return!1;return!!e.findAncestor(n,(function(e){return e===r?"quit":e===r.statement}))}(t,n)&&(dn(r.valueDeclaration).flags|=4194304),dn(r.valueDeclaration).flags|=524288}i&&(dn(r.valueDeclaration).flags|=262144)}(t,r);var o=Jp(wa(i),t),s=e.getAssignmentTargetKind(t);if(s){if(!(3&i.flags||e.isInJSFile(t)&&512&i.flags))return Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,Pi(r)),xe;if(uy(i))return 3&i.flags?Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant,Pi(r)):Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,Pi(r)),xe}var c=2097152&i.flags;if(3&i.flags){if(1===s)return o}else{if(!c)return o;a=e.find(r.declarations,I)}if(!a)return o;for(var u=155===e.getRootDeclaration(a).kind,l=Mp(a),_=Mp(t),d=_!==l,p=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&Zd(t.parent.parent),f=134217728&r.flags;_!==l&&(200===_.kind||201===_.kind||e.isObjectLiteralOrClassExpressionMethod(_))&&(Bp(i)||u&&!Lp(i));)_=Mp(_);var m=u||c||d||p||f||e.isBindingElement(a)||o!==ve&&o!==bt&&(!V||0!=(16387&o.flags)||Md(t)||261===t.parent.kind)||217===t.parent.kind||241===a.kind&&a.exclamationToken||8388608&a.flags,g=Op(t,o,m?u?function(e,t){return V&&155===t.kind&&t.initializer&&32768&R_(e)&&!(32768&R_(zy(t.initializer)))?Hd(e,524288):e}(o,a):o:o===ve||o===bt?Se:z_(o),_,!m);if(Ep(t)||o!==ve&&o!==bt){if(!m&&!(32768&R_(o))&&32768&R_(g))return Xr(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,Pi(r)),o}else if(g===ve||g===bt)return H&&(Xr(e.getNameOfDeclaration(a),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Pi(r),Ii(g)),Xr(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,Pi(r),Ii(g))),Jh(g);return s?k_(g):g}function Vp(e,t){(dn(e).flags|=2,158===t.kind||161===t.kind)?dn(t.parent).flags|=4:dn(t).flags|=4}function qp(t){return e.isSuperCall(t)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,qp)}function Wp(e){var t=dn(e);return void 0===t.hasSuperCall&&(t.superCall=qp(e.body),t.hasSuperCall=!!t.superCall),t.superCall}function Gp(e){return qa(ro(ri(e)))===ke}function Hp(t,r,n){var i=r.parent;if(e.getClassExtendsHeritageElement(i)&&!Gp(i)){var a=Wp(r);(!a||a.end>t.pos)&&Xr(t,n)}}function Yp(t){var r=e.getThisContainer(t,!0),n=!1;switch(161===r.kind&&Hp(t,r,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class),201===r.kind&&(r=e.getThisContainer(r,!1),n=!0),r.kind){case 248:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 247:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 161:Qp(t,r)&&Xr(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 158:case 157:e.hasModifier(r,32)&&Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 153:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}n&&J<2&&Vp(t,r);var i=Xp(t,!0,r);if(Y){var a=wa(re);if(i===a&&n)Xr(t,e.Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this);else if(!i){var o=Xr(t,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!e.isSourceFile(r)){var s=Xp(r);s&&s!==a&&e.addRelatedInfo(o,e.createDiagnosticForNode(r,e.Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container))}}}return i||he}function Xp(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=e.getThisContainer(t,!1));var i=e.isInJSFile(t);if(e.isFunctionLike(n)&&(!af(t)||e.getThisParameter(n))){var a=function(t){if(200===t.kind&&e.isBinaryExpression(t.parent)&&3===e.getAssignmentDeclarationKind(t.parent))return t.parent.left.expression.expression;if(160===t.kind&&192===t.parent.kind&&e.isBinaryExpression(t.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent))return t.parent.parent.left.expression;if(200===t.kind&&279===t.parent.kind&&192===t.parent.parent.kind&&e.isBinaryExpression(t.parent.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent.parent))return t.parent.parent.parent.left.expression;if(200===t.kind&&e.isPropertyAssignment(t.parent)&&e.isIdentifier(t.parent.name)&&("value"===t.parent.name.escapedText||"get"===t.parent.name.escapedText||"set"===t.parent.name.escapedText)&&e.isObjectLiteralExpression(t.parent.parent)&&e.isCallExpression(t.parent.parent.parent)&&t.parent.parent.parent.arguments[2]===t.parent.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent.parent))return t.parent.parent.parent.arguments[0].expression;if(e.isMethodDeclaration(t)&&e.isIdentifier(t.name)&&("value"===t.name.escapedText||"get"===t.name.escapedText||"set"===t.name.escapedText)&&e.isObjectLiteralExpression(t.parent)&&e.isCallExpression(t.parent.parent)&&t.parent.parent.arguments[2]===t.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent))return t.parent.parent.arguments[0].expression}(n);if(i&&a){var o=zy(a).symbol;if(o&&o.members&&16&o.flags)return Op(t,ro(o).thisType)}else if(i&&(200===n.kind||243===n.kind)&&e.getJSDocClassTag(n)){return Op(t,ro(ti(n.symbol)).thisType)}var s=Ea(n)||tf(n);if(s)return Op(t,s)}if(e.isClassLike(n.parent)){var c,u=ri(n.parent);return Op(t,c=e.hasModifier(n,32)?wa(u):ro(u).thisType)}if(i&&((c=function(t){var r=e.getJSDocType(t);if(r&&298===r.kind){var n=r;if(n.parameters.length>0&&n.parameters[0].name&&"this"===n.parameters[0].name.escapedText)return Yu(n.parameters[0].type)}var i=e.getJSDocThisTag(t);if(i&&i.typeExpression)return Yu(i.typeExpression)}(n))&&c!==xe))return Op(t,c);if(e.isSourceFile(n)){if(n.commonJsModuleIndicator){var l=ri(n);return l&&wa(l)}if(r)return wa(re)}}function Qp(t,r){return!!e.findAncestor(t,(function(t){return e.isFunctionLikeDeclaration(t)?"quit":155===t.kind&&t.parent===r}))}function $p(t){var r=195===t.parent.kind&&t.parent.expression===t,n=e.getSuperContainer(t,!0),i=!1;if(!r)for(;n&&201===n.kind;)n=e.getSuperContainer(n,!0),i=J<2;var a=0;if(!function(t){if(!t)return!1;if(r)return 161===t.kind;if(e.isClassLike(t.parent)||192===t.parent.kind)return e.hasModifier(t,32)?160===t.kind||159===t.kind||162===t.kind||163===t.kind:160===t.kind||159===t.kind||162===t.kind||163===t.kind||158===t.kind||157===t.kind||161===t.kind;return!1}(n)){var o=e.findAncestor(t,(function(e){return e===n?"quit":153===e.kind}));return o&&153===o.kind?Xr(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):r?Xr(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):n&&n.parent&&(e.isClassLike(n.parent)||192===n.parent.kind)?Xr(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):Xr(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),xe}if(r||161!==n.kind||Hp(t,n,e.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),a=e.hasModifier(n,32)||r?512:256,dn(t).flags|=a,160===n.kind&&e.hasModifier(n,256)&&(e.isSuperProperty(t.parent)&&e.isAssignmentTarget(t.parent)?dn(n).flags|=4096:dn(n).flags|=2048),i&&Vp(t.parent,n),192===n.parent.kind)return J<2?(Xr(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),xe):he;var s=n.parent;if(!e.getClassExtendsHeritageElement(s))return Xr(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),xe;var c=ro(ri(s)),u=c&&Wa(c)[0];return u?161===n.kind&&Qp(t,n)?(Xr(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),xe):512===a?qa(c):Do(u,c.thisType):xe}function Zp(t){return 4&e.getObjectFlags(t)&&t.target===ht?_c(t)[0]:void 0}function ef(t){return pp(t,(function(t){return 2097152&t.flags?e.forEach(t.types,Zp):Zp(t)}))}function tf(t){if(201!==t.kind){if(Sl(t)){var r=Nf(t);if(r){var n=r.thisParameter;if(n)return wa(n)}}var i=e.isInJSFile(t);if(Y||i){var a=function(e){return 160!==e.kind&&162!==e.kind&&163!==e.kind||192!==e.parent.kind?200===e.kind&&279===e.parent.kind?e.parent.parent:void 0:e.parent}(t);if(a){for(var o=hf(a),s=a,c=o;c;){var u=ef(c);if(u)return gl(u,fd(Df(a)));if(279!==s.parent.kind)break;c=hf(s=s.parent.parent)}return rd(o?U_(o):ky(a))}var l=t.parent;if(208===l.kind&&62===l.operatorToken.kind){var _=l.left;if(193===_.kind||194===_.kind){var d=_.expression;if(i&&e.isIdentifier(d)){var p=e.getSourceFileOfNode(l);if(p.commonJsModuleIndicator&&Od(d)===p.symbol)return}return rd(ky(d))}}}}}function rf(t,r){var n=t.parent;if(Sl(n)){var i=e.getImmediatelyInvokedFunctionExpression(n);if(i&&i.arguments){var a=rg(i),o=n.parameters.indexOf(t);if(t.dotDotDotToken)return Xm(a,o,a.length,he,void 0);var s=dn(i),c=s.resolvedSignature;s.resolvedSignature=$t;var u=o<a.length?N_(zy(a[o])):t.initializer?void 0:Te;return s.resolvedSignature=c,u}var l=Nf(n);if(l){if(r){if(ay(n),Qi(u=wa(ti(n.symbol))))return u;l=xs(u,0)[0]}var _=n.parameters.indexOf(t)-(e.getThisParameter(n)?1:0);return t.dotDotDotToken&&e.lastOrUndefined(n.parameters)===t?Rg(l,_):Lg(l,_)}}}function nf(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Yu(r);switch(t.kind){case 155:return rf(t,!1);case 190:return function(t){var r=t.parent.parent,n=t.propertyName||t.name,i=nf(r);if(i&&!e.isBindingPattern(n)&&!Zi(n)){var a=ou(n);if(_o(a)){var o=yo(a);return Xi(i,o)}}}(t)}}function af(t){for(var r=!1;t.parent&&!e.isFunctionLike(t.parent);){if(e.isParameter(t.parent)&&(r||t.parent.initializer===t))return!0;e.isBindingElement(t.parent)&&t.parent.initializer===t&&(r=!0),t=t.parent}return!1}function of(t,r){var n=!!(2&e.getFunctionFlags(r)),i=sf(r);if(i)return bv(t,i,n)||void 0}function sf(e){var t=Us(e);if(t)return t;var r=kf(e);return r&&!Vs(r)?zs(r):void 0}function cf(e,t,r){var n=rg(e).indexOf(t);return-1===n?void 0:uf(e,n,r)}function uf(t,r,n){var i=dn(t).resolvedSignature===er?er:Dg(t);if(e.isJsxOpeningLikeElement(t)&&0===r)return Sf(i,t);if(n&&4&n&&i.target){var a=Qs(i.target);return Io(Mg(i,r),Mg(a,r))}return Mg(i,r)}function lf(t,r){var n=t.parent,i=n.left,a=n.operatorToken,o=n.right;switch(a.kind){case 62:if(t!==o)return;var s=function(t){var r=e.getAssignmentDeclarationKind(t);switch(r){case 0:return!0;case 5:case 1:case 6:case 3:if(t.left.symbol){var n=t.left.symbol.valueDeclaration;if(!n)return!1;var i=e.cast(t.left,e.isAccessExpression),a=e.getEffectiveTypeAnnotationNode(n);if(a)return Yu(a);if(e.isIdentifier(i.expression)){var o=i.expression,s=gn(o,o.escapedText,111551,void 0,o.escapedText,!0);if(s){if(u=e.getEffectiveTypeAnnotationNode(s.valueDeclaration)){var c=e.getElementOrPropertyAccessName(i);if(void 0!==c)return(l=_f(Yu(u),c))||!1}return!1}}return!e.isInJSFile(n)}return!0;case 2:case 4:if(!t.symbol)return!0;var u,l;if(t.symbol.valueDeclaration)if(u=e.getEffectiveTypeAnnotationNode(t.symbol.valueDeclaration))if(l=Yu(u))return l;if(2===r)return!1;var _=e.cast(t.left,e.isAccessExpression);if(!e.isObjectLiteralMethod(e.getThisContainer(_.expression,!1)))return!1;var d=Yp(_.expression),p=e.getElementOrPropertyAccessName(_);return void 0!==p&&d&&_f(d,p)||!1;case 7:case 8:case 9:return e.Debug.fail("Does not apply");default:return e.Debug.assertNever(r)}}(n);if(!s)return;return!0===s?Ky(i):s;case 56:case 60:var c=xf(n,r);return t===o&&(c&&c.pattern||!c&&!e.isDefaultedExpandoInitializer(n))?Ky(i):c;case 55:case 27:return t===o?xf(n,r):void 0;default:return}}function _f(t,r){return pp(t,(function(t){if(Xo(t)){var n=zo(t),i=cs(n)||n,a=Wu(e.unescapeLeadingUnderscores(r));if(Fl(a,i))return Du(t,a)}else if(3670016&t.flags){var o=vs(t,r);if(o)return wa(o);if(w_(t)){var s=I_(t);if(s&&Mf(r)&&+r>=0)return s}return Mf(r)&&df(t,1)||df(t,0)}}),!0)}function df(e,t){return pp(e,(function(e){return Ss(e,t)}),!0)}function pf(e,t){var r=hf(e.parent,t);if(r){if(!go(e)){var n=_f(r,ri(e).escapedName);if(n)return n}return If(e.name)&&df(r,1)||df(r,0)}}function ff(e,t){return e&&(_f(e,""+t)||ev(1,e,Se,void 0,!1))}function mf(t){var r=t.parent;return e.isJsxAttributeLike(r)?xf(t):e.isJsxElement(r)?function(e,t){var r=hf(e.openingElement.tagName),n=Xf(Hf(e));if(r&&!Qi(r)&&n&&""!==n){var i=Jl(e.children),a=i.indexOf(t),o=_f(r,n);return o&&(1===i.length?o:pp(o,(function(e){return b_(e)?Su(e,Wu(a)):e}),!0))}}(r,t):void 0}function gf(t){if(e.isJsxAttribute(t)){var r=hf(t.parent);if(!r||Qi(r))return;return _f(r,t.name.escapedText)}return xf(t.parent)}function yf(e){switch(e.kind){case 10:case 8:case 9:case 14:case 105:case 90:case 99:case 75:case 145:return!0;case 193:case 199:return yf(e.expression);case 274:return!e.expression||yf(e.expression)}return!1}function hf(t,r){var n=vf(e.isObjectLiteralMethod(t)?function(t,r){if(e.Debug.assert(e.isObjectLiteralMethod(t)),!(16777216&t.flags))return pf(t,r)}(t,r):xf(t,r),t,r);if(n&&!(r&&2&r&&8650752&n.flags)){var i=pp(n,ms,!0);if(1048576&i.flags){if(e.isObjectLiteralExpression(t))return function(t,r){return e_(r,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&279===e.kind&&yf(e.initializer)&&Jd(r,e.symbol.escapedName)})),(function(e){return[function(){return zy(e.initializer)},e.symbol.escapedName]})),Fl,r)}(t,i);if(e.isJsxAttributes(t))return function(t,r){return e_(r,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&271===e.kind&&Jd(r,e.symbol.escapedName)&&(!e.initializer||yf(e.initializer))})),(function(e){return[e.initializer?function(){return zy(e.initializer)}:function(){return Ie},e.symbol.escapedName]})),Fl,r)}(t,i)}return i}}function vf(t,r,n){if(t&&fy(t,63176704)){var i=Df(r);if(i&&e.some(i.inferences,Ry)){if(n&&1&n)return bf(t,i.nonFixingMapper);if(i.returnMapper)return bf(t,i.returnMapper)}}return t}function bf(t,r){return 63176704&t.flags?gl(t,r):1048576&t.flags?Qc(e.map(t.types,(function(e){return bf(e,r)})),0):2097152&t.flags?iu(e.map(t.types,(function(e){return bf(e,r)}))):t}function xf(t,r){if(!(16777216&t.flags)){if(t.contextualType)return t.contextualType;var n=t.parent;switch(n.kind){case 241:case 155:case 158:case 157:case 190:return function(t){var r=t.parent;if(e.hasInitializer(r)&&t===r.initializer){var n=nf(r);if(n)return n;if(e.isBindingPattern(r.name))return ya(r.name,!0,!1)}}(t);case 201:case 234:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r);if(1&n)return;var i=sf(r);if(i){if(2&n){var a=uh(i);return a&&Qc([a,Hg(a)])}return i}}}(t);case 211:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r),i=sf(r);if(i)return t.asteriskToken?i:bv(0,i,0!=(2&n))}}(n);case 205:return function(e){var t=xf(e);if(t){var r=dh(t);return r&&Qc([r,Hg(r)])}}(n);case 195:if(95===n.expression.kind)return Ne;case 196:return cf(n,t,r);case 198:case 216:return e.isConstTypeReference(n.type)?void 0:Yu(n.type);case 208:return lf(t,r);case 279:case 280:return pf(n,r);case 281:return hf(n.parent,r);case 191:var i=n;return ff(hf(i,r),e.indexOfNode(i.elements,t));case 209:return function(e,t){var r=e.parent;return e===r.whenTrue||e===r.whenFalse?xf(r,t):void 0}(t,r);case 220:return e.Debug.assert(210===n.parent.kind),function(e,t){if(197===e.parent.kind)return cf(e.parent,t)}(n.parent,t);case 199:var a=e.isInJSFile(n)?e.getJSDocTypeTag(n):void 0;return a?Yu(a.typeExpression.type):xf(n,r);case 274:return mf(n);case 271:case 273:return gf(n);case 266:case 265:return function(t){if(e.isJsxOpeningElement(t)&&t.parent.contextualType)return t.parent.contextualType;return uf(t,0)}(n)}}}function Df(t){var r=e.findAncestor(t,(function(e){return!!e.inferenceContext}));return r&&r.inferenceContext}function Sf(t,r){return 0!==$m(r)?function(e,t){var r=Vg(e,De);r=Tf(t,Hf(t),r);var n=Wf(C.IntrinsicAttributes,t);n!==xe&&(r=Io(n,r));return r}(t,r):function(t,r){var n=Hf(r),i=(o=n,Yf(C.ElementAttributesPropertyNameContainer,o)),a=void 0===i?Vg(t,De):""===i?zs(t):function(e,t){if(e.unionSignatures){for(var r=[],n=0,i=e.unionSignatures;n<i.length;n++){var a=zs(i[n]);if(Qi(a))return a;var o=Xi(a,t);if(!o)return;r.push(o)}return iu(r)}var s=zs(e);return Qi(s)?s:Xi(s,t)}(t,i);var o;if(!a)return i&&e.length(r.attributes.properties)&&Xr(r,e.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,e.unescapeLeadingUnderscores(i)),De;if(Qi(a=Tf(r,n,a)))return a;var s=a,c=Wf(C.IntrinsicClassAttributes,r);if(c!==xe){var u=ja(c.symbol),l=zs(t);s=Io(u?cc(c,Ms([l],u,Os(u),e.isInJSFile(r))):c,s)}var _=Wf(C.IntrinsicAttributes,r);return _!==xe&&(s=Io(_,s)),s}(t,r)}function Tf(t,r,n){var i,a=(i=r)&&fn(i.exports,C.LibraryManagedAttributes,788968);if(a){var o=ro(a),s=function(e){if(zf(e.tagName))return $s(vg(e,t=$f(e)));var t,r=ky(e.tagName);return 128&r.flags?(t=Qf(r,e))?$s(vg(e,t)):xe:r}(t);if(e.length(o.typeParameters)>=2)return cc(o,c=Ms([s,n],o.typeParameters,2,e.isInJSFile(t)));if(e.length(o.aliasTypeArguments)>=2){var c=Ms([s,n],o.aliasTypeArguments,2,e.isInJSFile(t));return fc(o.aliasSymbol,c)}}return n}function Ef(t,r){var n=xs(t,0);if(1===n.length){var i=n[0];if(!function(t,r){for(var n=0;n<r.parameters.length;n++){var i=r.parameters[n];if(i.initializer||i.questionToken||i.dotDotDotToken||As(i))break}r.parameters.length&&e.parameterIsThisKeyword(r.parameters[0])&&n--;return!Kg(t)&&Bg(t)<n}(i,r))return i}}function Cf(e){return 200===e.kind||201===e.kind}function kf(t){return Cf(t)||e.isObjectLiteralMethod(t)?Nf(t):void 0}function Nf(t){e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t));var r=Rs(t);if(r)return r;var n=hf(t,1);if(n){if(!(1048576&n.flags))return Ef(n,t);for(var i,a=0,o=n.types;a<o.length;a++){var s=Ef(o[a],t);if(s)if(i){if(!m_(i[0],s,!1,!0,!0,Cl))return;i.push(s)}else i=[s]}return i?1===i.length?i[0]:Co(i[0],i):void 0}}function Af(e){return 190===e.kind&&!!e.initializer||208===e.kind&&62===e.operatorToken.kind}function Ff(t,r,n){for(var i=t.elements,a=i.length,o=!1,s=[],c=e.isAssignmentTarget(t),u=hf(t),l=Py(t),_=0;_<a;_++){var d=i[_];if(c&&212===d.kind){var p=zy(d.expression,r,n),f=Es(p,1)||ev(65,p,Se,void 0,!1);f&&s.push(f)}else{var m=wy(d,r,ff(u,_),n);s.push(m)}_<a-1&&212===d.kind&&(o=!0)}if(!o){var g=a>0&&212===i[a-1].kind,y=a-(g?1:0),h=void 0;if(c&&y>0)return(m=uc(Uc(s,y,g))).pattern=t,m;if(h=wf(s,u,g,a,l))return Pf(h);if(n)return Pf(Uc(s,y,g))}return Pf(jc(s.length?Qc(s,2):V?Je:Te,l))}function Pf(t){if(!(4&e.getObjectFlags(t)))return t;var r=t.literalType;return r||((r=t.literalType=uc(t)).objectFlags|=589824),r}function wf(e,t,r,n,i){if(void 0===n&&(n=e.length),void 0===i&&(i=!1),i||t&&up(t,D_))return Uc(e,n-(r?1:0),r,i)}function If(e){switch(e.kind){case 153:return function(e){return my(Lf(e),296)}(e);case 75:return Mf(e.escapedText);case 8:case 10:return Mf(e.text);default:return!1}}function Of(e){return"Infinity"===e||"-Infinity"===e||"NaN"===e}function Mf(e){return(+e).toString()===e}function Lf(t){var r=dn(t.expression);return r.resolvedType||(r.resolvedType=zy(t.expression),98304&r.resolvedType.flags||!my(r.resolvedType,12716)&&!Fl(r.resolvedType,Ve)?Xr(t,e.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any):Lm(t.expression,r.resolvedType,!0)),r.resolvedType}function Rf(e,t,r,n){for(var i=[],a=0;a<r.length;a++)(0===n||If(e.properties[a+t].name))&&i.push(wa(r[a]));return tc(i.length?Qc(i,2):Se,Py(e))}function Bf(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=_n(t);if(!r.immediateTarget){var n=En(t);if(!n)return e.Debug.fail();r.immediateTarget=wn(n,!0)}return r.immediateTarget}function jf(t,r){var n,i=e.isAssignmentTarget(t);!function(t,r){for(var n=e.createUnderscoreEscapedMap(),i=0,a=t.properties;i<a.length;i++){var o=a[i];if(281!==o.kind){var s=o.name;if(153===s.kind&&ax(s),280===o.kind&&!r&&o.objectAssignmentInitializer)return vx(o.equalsToken,e.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment);if(o.modifiers)for(var c=0,u=o.modifiers;c<u.length;c++){var l=u[c];125===l.kind&&160===o.kind||vx(l,e.Diagnostics._0_modifier_cannot_be_used_here,e.getTextOfNode(l))}var _=void 0;switch(o.kind){case 280:cx(o.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);case 279:sx(o.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional),8===s.kind&&Dx(s),_=4;break;case 160:_=8;break;case 162:_=1;break;case 163:_=2;break;default:throw e.Debug.assertNever(o,"Unexpected syntax kind:"+o.kind)}var d=e.getPropertyNameForPropertyNameNode(s);if(void 0!==d){var p=n.get(d);if(p)if(12&_&&12&p)vx(s,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(s));else{if(!(3&_&&3&p))return vx(s,e.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);if(3===p||_===p)return vx(s,e.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);n.set(d,_|p)}else n.set(d,_)}}else if(r){var f=e.skipParentheses(o.expression);if(e.isArrayLiteralExpression(f)||e.isObjectLiteralExpression(f))return vx(o.expression,e.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern)}}}(t,i);var a=[],o=Ge,s=hf(t),c=s&&s.pattern&&(188===s.pattern.kind||192===s.pattern.kind),u=Py(t),l=u?8:0,_=e.isInJSFile(t)&&!e.isInJsonFile(t),d=e.getJSDocEnumTag(t),p=!s&&_&&!d,f=Q,m=!1,g=!1,y=!1;n=e.createSymbolTable();for(var h=0,v=0;v<t.properties.length;v++){var b=t.properties[v],x=ri(b),D=b.name&&153===b.name.kind&&!e.isWellKnownSymbolSyntactically(b.name.expression)?Lf(b.name):void 0;if(279===b.kind||280===b.kind||e.isObjectLiteralMethod(b)){var S=279===b.kind?Iy(b,r):280===b.kind?wy(b.name,r):Oy(b,r);if(_){var T=aa(b);T?(Ol(S,T,b),S=T):d&&d.typeExpression&&Ol(S,Yu(d.typeExpression),b)}f|=1835008&e.getObjectFlags(S);var E=D&&_o(D)?D:void 0,C=E?en(4|x.flags,yo(E),4096|l):en(4|x.flags,x.escapedName,l);if(E&&(C.nameType=E),i)(279===b.kind&&Af(b.initializer)||280===b.kind&&b.objectAssignmentInitializer)&&(C.flags|=16777216);else if(c&&!(512&e.getObjectFlags(s))){var k=vs(s,x.escapedName);k?C.flags|=16777216&k.flags:K.suppressExcessPropertyErrors||Ts(s,0)||Xr(b.name,e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Pi(x),Ii(s))}C.declarations=x.declarations,C.parent=x.parent,x.valueDeclaration&&(C.valueDeclaration=x.valueDeclaration),C.type=S,C.target=x,x=C}else{if(281===b.kind){if(J<2&&Gb(b,2),a.length>0&&(o=Bu(o,F(),t.symbol,f,u),a=[],n=e.createSymbolTable(),g=!1,y=!1),!Kf(S=zy(b.expression)))return Xr(b,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),xe;o=Bu(o,S,t.symbol,f,u),h=v+1;continue}e.Debug.assert(162===b.kind||163===b.kind),Yv(b)}!D||8576&D.flags?n.set(x.escapedName,x):Fl(D,Ve)&&(Fl(D,Ae)?y=!0:g=!0,i&&(m=!0)),a.push(x)}if(c)for(var N=0,A=ts(s);N<A.length;N++){C=A[N];n.get(C.escapedName)||o&&vs(o,C.escapedName)||(16777216&C.flags||Xr(C.valueDeclaration||C.bindingElement,e.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),n.set(C.escapedName,C),a.push(C))}return o!==Ge?(a.length>0&&(o=Bu(o,F(),t.symbol,f,u)),o):F();function F(){var r=g?Rf(t,h,a,0):void 0,o=y?Rf(t,h,a,1):void 0,s=hi(t.symbol,n,e.emptyArray,e.emptyArray,r,o);return s.objectFlags|=524416|f,p&&(s.objectFlags|=16384),m&&(s.objectFlags|=512),i&&(s.pattern=t),s}}function Kf(t){if(63176704&t.flags){var r=cs(t);if(void 0!==r)return Kf(r)}return!!(126615553&t.flags||117632&R_(t)&&Kf(B_(t))||3145728&t.flags&&e.every(t.types,Kf))}function Jf(t){return!e.stringContains(t,"-")}function zf(t){return 75===t.kind&&e.isIntrinsicJsxName(t.escapedText)}function Uf(e,t){return e.initializer?wy(e.initializer,t):Ie}function Vf(e,t){for(var r=[],n=0,i=e.children;n<i.length;n++){var a=i[n];11===a.kind?a.containsOnlyTriviaWhiteSpaces||r.push(Ne):r.push(wy(a,t))}return r}function qf(t,r){return function(t,r){for(var n,i=t.attributes,a=e.createSymbolTable(),o=He,s=!1,c=!1,u=4096,l=Xf(Hf(t)),_=0,d=i.properties;_<d.length;_++){var p=d[_],f=p.symbol;if(e.isJsxAttribute(p)){var m=Uf(p,r);u|=1835008&e.getObjectFlags(m);var g=en(33554436|f.flags,f.escapedName);g.declarations=f.declarations,g.parent=f.parent,f.valueDeclaration&&(g.valueDeclaration=f.valueDeclaration),g.type=m,g.target=f,a.set(g.escapedName,g),p.name.escapedText===l&&(c=!0)}else{e.Debug.assert(273===p.kind),a.size>0&&(o=Bu(o,S(),i.symbol,u,!1),a=e.createSymbolTable()),Qi(m=ky(p.expression,r))&&(s=!0),Kf(m)?o=Bu(o,m,i.symbol,u,!1):n=n?iu([n,m]):m}}s||a.size>0&&(o=Bu(o,S(),i.symbol,u,!1));var y=264===t.parent.kind?t.parent:void 0;if(y&&y.openingElement===t&&y.children.length>0){var h=Vf(y,r);if(!s&&l&&""!==l){c&&Xr(i,e.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,e.unescapeLeadingUnderscores(l));var v=hf(t.attributes),b=v&&_f(v,l),x=en(33554436,l);x.type=1===h.length?h[0]:wf(h,b,!1)||jc(Qc(h)),x.valueDeclaration=e.createPropertySignature(void 0,e.unescapeLeadingUnderscores(l),void 0,void 0,void 0),x.valueDeclaration.parent=i,x.valueDeclaration.symbol=x;var D=e.createSymbolTable();D.set(l,x),o=Bu(o,hi(i.symbol,D,e.emptyArray,e.emptyArray,void 0,void 0),i.symbol,u,!1)}}return s?he:n&&o!==He?iu([n,o]):n||(o===He?S():o);function S(){u|=Q;var t=hi(i.symbol,a,e.emptyArray,e.emptyArray,void 0,void 0);return t.objectFlags|=524416|u,t}}(t.parent,r)}function Wf(e,t){var r=Hf(t),n=r&&Qn(r),i=n&&fn(n,e,788968);return i?ro(i):xe}function Gf(t){var r=dn(t);if(!r.resolvedSymbol){var n=Wf(C.IntrinsicElements,t);if(n!==xe){if(!e.isIdentifier(t.tagName))return e.Debug.fail();var i=vs(n,t.tagName.escapedText);return i?(r.jsxFlags|=1,r.resolvedSymbol=i):Es(n,0)?(r.jsxFlags|=2,r.resolvedSymbol=n.symbol):(Xr(t,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.idText(t.tagName),"JSX."+C.IntrinsicElements),r.resolvedSymbol=ge)}return H&&Xr(t,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,e.unescapeLeadingUnderscores(C.IntrinsicElements)),r.resolvedSymbol=ge}return r.resolvedSymbol}function Hf(e){var t=e&&dn(e);if(t&&t.jsxNamespace)return t.jsxNamespace;if(!t||!1!==t.jsxNamespace){var r=Yr(e),n=gn(e,r,1920,void 0,r,!1);if(n){var i=On(fn(Qn(On(n)),C.JSX,1920));if(i)return t&&(t.jsxNamespace=i),i;t&&(t.jsxNamespace=!1)}}return Ac(C.JSX,1920,void 0)}function Yf(t,r){var n=r&&fn(r.exports,t,788968),i=n&&ro(n),a=i&&ts(i);if(a){if(0===a.length)return"";if(1===a.length)return a[0].escapedName;a.length>1&&Xr(n.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,e.unescapeLeadingUnderscores(t))}}function Xf(e){return Yf(C.ElementChildrenAttributeNameContainer,e)}function Qf(t,r){var n=Wf(C.IntrinsicElements,r);if(n!==xe){var i=t.value,a=vs(n,e.escapeLeadingUnderscores(i));if(a)return wa(a);var o=Es(n,0);return o||void 0}return he}function $f(t){e.Debug.assert(zf(t.tagName));var r=dn(t);if(!r.resolvedJsxElementAttributesType){var n=Gf(t);return 1&r.jsxFlags?r.resolvedJsxElementAttributesType=wa(n):2&r.jsxFlags?r.resolvedJsxElementAttributesType=rc(n,0).type:r.resolvedJsxElementAttributesType=xe}return r.resolvedJsxElementAttributesType}function Zf(e){var t=Wf(C.ElementClass,e);if(t!==xe)return t}function em(e){return Wf(C.Element,e)}function tm(e){var t=em(e);if(t)return Qc([t,Ce])}function rm(t){var r,n=e.isJsxOpeningLikeElement(t);n&&function(t){tx(t,t.typeArguments);for(var r=e.createUnderscoreEscapedMap(),n=0,i=t.attributes.properties;n<i.length;n++){var a=i[n];if(273!==a.kind){var o=a.name,s=a.initializer;if(r.get(o.escapedText))return vx(o,e.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(r.set(o.escapedText,!0),s&&274===s.kind&&!s.expression)return vx(s,e.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}}(t),r=t,0===(K.jsx||0)&&Xr(r,e.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===em(r)&&H&&Xr(r,e.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);var i=jr&&2===K.jsx?e.Diagnostics.Cannot_find_name_0:void 0,a=Yr(t),o=gn(n?t.tagName:t,a,111551,i,a,!0);if(o&&(o.isReferenced=67108863,2097152&o.flags&&Rn(o)),n){var s=Dg(t);!function(t,r,n){if(1===t)(i=tm(n))&&Zl(r,i,Vr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements);else if(0===t){(a=Zf(n))&&Zl(r,a,Vr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements)}else{var i=tm(n),a=Zf(n);if(!i||!a)return;Zl(r,Qc([i,a]),Vr,n,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements)}}($m(t),zs(s),t)}}function nm(e,t,r){if(524288&e.flags){var n=Qo(e);if(n.stringIndexInfo||n.numberIndexInfo&&Mf(t)||Zo(e,t)||r&&!Jf(t))return!0}else if(3145728&e.flags&&im(e))for(var i=0,a=e.types;i<a.length;i++){if(nm(a[i],t,r))return!0}return!1}function im(t){return!!(524288&t.flags&&!(512&e.getObjectFlags(t))||67108864&t.flags||1048576&t.flags&&e.some(t.types,im)||2097152&t.flags&&e.every(t.types,im))}function am(t,r){if(function(t){if(t.expression&&e.isCommaSequence(t.expression))vx(t.expression,e.Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}(t),t.expression){var n=zy(t.expression,r);return t.dotDotDotToken&&n!==he&&!y_(n)&&Xr(t,e.Diagnostics.JSX_spread_child_must_be_an_array_type),n}return xe}function om(t){return t.valueDeclaration?e.getCombinedNodeFlags(t.valueDeclaration):0}function sm(t){if(8192&t.flags||4&e.getCheckFlags(t))return!0;if(e.isInJSFile(t.valueDeclaration)){var r=t.valueDeclaration.parent;return r&&e.isBinaryExpression(r)&&3===e.getAssignmentDeclarationKind(r)}}function cm(t,r,n,i){var a,o=e.getDeclarationModifierFlagsFromSymbol(i),s=152===t.kind?t.right:187===t.kind?t:t.name;if(1024&e.getCheckFlags(i))return Xr(s,e.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1,Pi(i),Ii(n)),!1;if(r){if(J<2&&um(i))return Xr(s,e.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(128&o)return Xr(s,e.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,Pi(i),Ii(__(i))),!1}if(128&o&&e.isThisProperty(t)&&um(i)&&((a=e.getClassLikeDeclarationOfSymbol(ni(i)))&&function(t){return!!e.findAncestor(t,(function(t){return!!(e.isConstructorDeclaration(t)&&e.nodeIsPresent(t.body)||e.isPropertyDeclaration(t))||!(!e.isClassLike(t)&&!e.isFunctionLikeDeclaration(t))&&"quit"}))}(t)))return Xr(s,e.Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,Pi(i),e.getTextOfIdentifierOrLiteral(a.name)),!1;if(!(24&o))return!0;if(8&o)return!!ab(t,a=e.getClassLikeDeclarationOfSymbol(ni(i)))||(Xr(s,e.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1,Pi(i),Ii(__(i))),!1);if(r)return!0;var c=ib(t,(function(t){var r=ro(ri(t));return function(t,r){return l_(r,(function(r){return!!(16&e.getDeclarationModifierFlagsFromSymbol(r))&&!Ma(t,__(r))}))?void 0:t}(r,i)?r:void 0}));if(!c){var u=void 0;if(32&o||!(u=function(t){var r=e.getThisContainer(t,!1);return r&&e.isFunctionLike(r)?e.getThisParameter(r):void 0}(t))||!u.type)return Xr(s,e.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,Pi(i),Ii(__(i)||n)),!1;var l=Yu(u.type);c=262144&l.flags?ns(l):l}return!!(32&o)||(262144&n.flags&&(n=n.isThisType?ns(n):cs(n)),!(!n||!Ma(n,c))||(Xr(s,e.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1,Pi(i),Ii(c)),!1))}function um(e){return!!l_(e,(function(e){return!(8192&e.flags)}))}function lm(e){return gm(zy(e),e)}function _m(e){return!!(98304&(V?R_(e):e.flags))}function dm(e){return _m(e)?U_(e):e}function pm(t,r){Xr(t,32768&r?65536&r?e.Diagnostics.Object_is_possibly_null_or_undefined:e.Diagnostics.Object_is_possibly_undefined:e.Diagnostics.Object_is_possibly_null)}function fm(t,r){Xr(t,32768&r?65536&r?e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined:e.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null)}function mm(t,r,n){if(V&&2&t.flags)return Xr(r,e.Diagnostics.Object_is_of_type_unknown),xe;var i=98304&(V?R_(t):t.flags);if(i){n(r,i);var a=U_(t);return 229376&a.flags?xe:a}return t}function gm(e,t){return mm(e,t,pm)}function ym(t,r){var n=gm(t,r);return n!==xe&&16384&n.flags&&Xr(r,e.Diagnostics.Object_is_possibly_undefined),n}function hm(e){return 32&e.flags?function(e){var t=zy(e.expression),r=H_(t,e.expression);return G_(xm(e,e.expression,gm(r,e.expression),e.name),r!==t)}(e):xm(e,e.expression,lm(e.expression),e.name)}function vm(e){return xm(e,e.left,lm(e.left),e.right)}function bm(t){for(;199===t.parent.kind;)t=t.parent;return e.isCallOrNewExpression(t.parent)&&t.parent.expression===t}function xm(t,r,n,i){var a=dn(r).resolvedSymbol,o=e.getAssignmentTargetKind(t),s=ms(0!==o||bm(t)?rd(n):n);if(Qi(s)||s===je)return e.isIdentifier(r)&&a&&zp(a,t),s;var c,u=vs(s,i.escapedText);if(!e.isIdentifier(r)||!a||u&&Cb(u)||zp(a,t),u){if(function(t,r,n){var i,a=t.valueDeclaration;if(!a||e.getSourceFileOfNode(r).isDeclarationFile)return;var o=e.idText(n);!function(t){return!!e.findAncestor(t,(function(t){switch(t.kind){case 158:return!0;case 279:case 160:case 162:case 163:case 281:case 153:case 220:case 274:case 271:case 272:case 273:case 266:case 215:case 277:return!1;default:return!e.isExpressionNode(t)&&"quit"}}))}(r)||mn(a,n)||function(e){if(!(32&e.parent.flags))return!1;var t=wa(e.parent);for(;;){if(!(t=t.symbol&&Sm(t)))return!1;var r=vs(t,e.escapedName);if(r&&r.valueDeclaration)return!0}}(t)?244!==a.kind||168===r.parent.kind||8388608&a.flags||mn(a,n)||(i=Xr(n,e.Diagnostics.Class_0_used_before_its_declaration,o)):i=Xr(n,e.Diagnostics.Property_0_is_used_before_its_initialization,o);i&&e.addRelatedInfo(i,e.createDiagnosticForNode(a,e.Diagnostics._0_is_declared_here,o))}(u,t,i),Fm(u,t,103===r.kind),dn(t).resolvedSymbol=u,cm(t,101===r.kind,s,u),o&&(ly(t,u)||_y(t)))return Xr(i,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,e.idText(i)),xe;c=Jp(wa(u),t)}else{var l=0===o||!gu(n)||hu(n)?Ts(s,0):void 0;if(!l||!l.type)return du(n)?he:n.symbol===re?(re.exports.has(i.escapedText)&&418&re.exports.get(i.escapedText).flags?Xr(i,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(i.escapedText),Ii(n)):H&&Xr(i,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Ii(n)),he):(i.escapedText&&!Dn(t)&&function(t,r){var n,i;if(1048576&r.flags&&!(131068&r.flags))for(var a=0,o=r.types;a<o.length;a++){var s=o[a];if(!vs(s,t.escapedText)&&!Ts(s,0)){n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(t),Ii(s));break}}if(Tm(t.escapedText,r))n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_is_a_static_member_of_type_1,e.declarationNameToString(t),Ii(r));else{var c=lh(r);if(c&&vs(c,t.escapedText))n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(t),Ii(r)),i=e.createDiagnosticForNode(t,e.Diagnostics.Did_you_forget_to_use_await);else{var u=Em(t,r);if(void 0!==u){var l=e.symbolName(u);n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e.declarationNameToString(t),Ii(r),l),i=u.valueDeclaration&&e.createDiagnosticForNode(u.valueDeclaration,e.Diagnostics._0_is_declared_here,l)}else n=e.chainDiagnosticMessages(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(t),Ii(r))}}var _=e.createDiagnosticForNodeFromMessageChain(t,n);i&&e.addRelatedInfo(_,i);jr.add(_)}(i,hu(n)?s:n),xe);l.isReadonly&&(e.isAssignmentTarget(t)||e.isDeleteTarget(t))&&Xr(t,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,Ii(s)),c=l.type}return Dm(t,u,c,i)}function Dm(t,r,n,i){var a=e.getAssignmentTargetKind(t);if(194!==t.kind&&193!==t.kind||1===a||r&&!(98311&r.flags)&&!(8192&r.flags&&1048576&n.flags))return n;var o=!1;if(V&&G&&103===t.expression.kind){var s=r&&r.valueDeclaration;if(s&&Ov(s)){var c=Mp(t);161===c.kind&&c.parent===s.parent&&(o=!0)}}else V&&r&&r.valueDeclaration&&e.isPropertyAccessExpression(r.valueDeclaration)&&e.getAssignmentDeclarationPropertyAccessKind(r.valueDeclaration)&&Mp(t)===Mp(r.valueDeclaration)&&(o=!0);var u=Op(t,n,o?z_(n):n);return o&&!(32768&R_(n))&&32768&R_(u)?(Xr(i,e.Diagnostics.Property_0_is_used_before_being_assigned,Pi(r)),n):a?k_(u):u}function Sm(e){var t=Wa(e);if(0!==t.length)return iu(t)}function Tm(t,r){var n=r.symbol&&vs(wa(r.symbol),t);return void 0!==n&&n.valueDeclaration&&e.hasModifier(n.valueDeclaration,32)}function Em(t,r){return Am(e.isString(t)?t:e.idText(t),ts(r),111551)}function Cm(t,r){var n=Em(t,r);return n&&e.symbolName(n)}function km(t,r,n){return e.Debug.assert(void 0!==r,"outername should always be defined"),yn(t,r,n,void 0,r,!1,!1,(function(t,n,i){return e.Debug.assertEqual(r,n,"name should equal outerName"),fn(t,n,i)||Am(e.unescapeLeadingUnderscores(n),e.arrayFrom(t.values()),i)}))}function Nm(t,r){return r.exports&&Am(e.idText(t),Yn(r),2623475)}function Am(t,r,n){return e.getSpellingSuggestion(t,r,(function(t){var r=e.symbolName(t);return!e.startsWith(r,'"')&&t.flags&n?r:void 0}))}function Fm(t,r,n){if(t&&106500&t.flags&&t.valueDeclaration&&e.hasModifier(t.valueDeclaration,8)&&(!r||!e.isWriteOnlyAccess(r)||65536&t.flags&&!(32768&t.flags))){if(n){var i=e.findAncestor(r,e.isFunctionLikeDeclaration);if(i&&i.symbol===t)return}(1&e.getCheckFlags(t)?_n(t).target:t).isReferenced=67108863}}function Pm(t,r,n,i){if(i===xe||Qi(i))return!0;var a=vs(i,n);return a?cm(t,r,i,a):e.isInJSFile(t)&&0!=(1048576&i.flags)&&i.types.some((function(e){return Pm(t,r,n,e)}))}function wm(t){var r=t.initializer;if(242===r.kind){var n=r.declarations[0];if(n&&!e.isBindingPattern(n.name))return ri(n)}else if(75===r.kind)return Od(r)}function Im(e){return Es(e,1)&&!Es(e,0)}function Om(e){return 32&e.flags?function(e){var t=zy(e.expression),r=H_(t,e.expression);return G_(Mm(e,gm(r,e.expression)),r!==t)}(e):Mm(e,lm(e.expression))}function Mm(t,r){var n=0!==e.getAssignmentTargetKind(t)||bm(t)?rd(r):r,i=t.argumentExpression,a=zy(i);if(n===xe||n===je)return n;if(yy(n)&&!e.isStringLiteralLike(i))return Xr(i,e.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal),xe;var o=Tu(n,function(t){var r=e.skipParentheses(t);if(75===r.kind){var n=Od(r);if(3&n.flags)for(var i=t,a=t.parent;a;){if(230===a.kind&&i===a.statement&&wm(a)===n&&Im(Ky(a.expression)))return!0;i=a,a=a.parent}}return!1}(i)?Ae:a,t,e.isAssignmentTarget(t)?2|(gu(n)&&!hu(n)?1:0):0)||xe;return nh(Dm(t,o.symbol,o,i),t)}function Lm(t,r,n){if(r===xe)return!1;if(!e.isWellKnownSymbolSyntactically(t))return!1;if(0==(12288&r.flags))return n&&Xr(t,e.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol,e.getTextOfNode(t)),!1;var i=t.expression,a=Od(i);if(!a)return!1;var o=Pc(!0);return!!o&&(a===o||(n&&Xr(i,e.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object),!1))}function Rm(t){return e.isCallOrNewExpression(t)||e.isTaggedTemplateExpression(t)||e.isJsxOpeningLikeElement(t)}function Bm(t){return Rm(t)&&e.forEach(t.typeArguments,Gv),197===t.kind?zy(t.template):e.isJsxOpeningLikeElement(t)?zy(t.attributes):156!==t.kind&&e.forEach(t.arguments,(function(e){zy(e)})),$t}function jm(e){return Bm(e),Zt}function Km(e){return!!e&&(212===e.kind||219===e.kind&&e.isSpread)}function Jm(t){return e.findIndex(t,Km)}function zm(e){return!!(16384&e.flags)}function Um(t,r,n,i){var a;void 0===i&&(i=!1);var o=!1,s=Bg(n),c=jg(n);if(197===t.kind)if(a=r.length,210===t.template.kind){var u=e.last(t.template.templateSpans);o=e.nodeIsMissing(u.literal)||!!u.literal.isUnterminated}else{var l=t.template;e.Debug.assert(14===l.kind),o=!!l.isUnterminated}else if(156===t.kind)a=ng(t,n);else if(e.isJsxOpeningLikeElement(t)){if(o=t.attributes.end===t.end)return!0;a=0===c?r.length:1,s=0===r.length?s:1,c=Math.min(c,1)}else{if(!t.arguments)return e.Debug.assert(196===t.kind),0===jg(n);a=i?r.length+1:r.length,o=t.arguments.end===t.end;var _=Jm(r);if(_>=0)return _>=jg(n)&&(Kg(n)||_<Bg(n))}if(!Kg(n)&&a>s)return!1;if(o||a>=c)return!0;for(var d=a;d<c;d++){if(131072&_p(Mg(n,d),zm).flags)return!1}return!0}function Vm(t,r){var n=e.length(t.typeParameters),i=Os(t.typeParameters);return!r||r.length>=i&&r.length<=n}function qm(e){return Gm(e,0,!1)}function Wm(e){return Gm(e,0,!1)||Gm(e,1,!1)}function Gm(e,t,r){if(524288&e.flags){var n=Qo(e);if(r||0===n.properties.length&&!n.stringIndexInfo&&!n.numberIndexInfo){if(0===t&&1===n.callSignatures.length&&0===n.constructSignatures.length)return n.callSignatures[0];if(1===t&&1===n.constructSignatures.length&&0===n.callSignatures.length)return n.constructSignatures[0]}}}function Hm(t,r,n,i){var a=cd(t.typeParameters,t,0,i),o=Jg(r),s=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return od(s?sl(r,s):r,t,(function(e,t){Sd(a.inferences,e,t)})),n||sd(r,t,(function(e,t){Sd(a.inferences,e,t,16)})),Ws(t,wd(a),e.isInJSFile(r.declaration))}function Ym(t,r,n,i,a){if(e.isJsxOpeningLikeElement(t))return function(e,t,r,n){var i=Sf(t,e),a=Cy(e.attributes,i,n,r);return Sd(n.inferences,a,i),wd(n)}(t,r,i,a);if(156!==t.kind){var o=xf(t);if(o){var s=Df(t),c=gl(o,fd(function(t,r){return void 0===r&&(r=0),t&&ud(e.map(t.inferences,pd),t.signature,t.flags|r,t.compareTypes)}(s,1))),u=qm(c),l=u&&u.typeParameters?$s(Gs(u,u.typeParameters)):c,_=zs(r);Sd(a.inferences,l,_,16);var d=cd(r.typeParameters,r,a.flags),p=gl(o,s&&s.returnMapper);Sd(d.inferences,p,_),a.returnMapper=e.some(d.inferences,Ry)?fd(function(t){var r=e.filter(t.inferences,Ry);return r.length?ud(e.map(r,pd),t.signature,t.flags,t.compareTypes):void 0}(d)):void 0}}var f=Ks(r);if(f){var m=eg(t),g=m?zy(m):Re;Sd(a.inferences,g,f)}for(var y=zg(r),h=y?Math.min(Bg(r)-1,n.length):n.length,v=0;v<h;v++){var b=n[v];if(214!==b.kind){var x=Mg(r,v),D=Cy(b,x,a,i);Sd(a.inferences,D,x)}}if(y){var S=Xm(n,h,n.length,y,a);Sd(a.inferences,S,y)}return wd(a)}function Xm(t,r,n,i,a){if(r>=n-1){var o=t[n-1];if(Km(o))return 219===o.kind?jc(o.type):function(e){return up(e,(function(e){return!(63176705&e.flags||y_(e)||w_(e))}))?jc(Su(e,Ae)):e}(Cy(o.expression,i,a,0))}for(var s=[],c=-1,u=r;u<n;u++){var l=Su(i,Wu(u-r)),_=Cy(t[u],l,a,0);c<0&&Km(t[u])&&(c=u-r);var d=fy(l,4325372);s.push(d?Vu(_):N_(_))}return c<0?Uc(s):Uc(e.append(s.slice(0,c),Qc(s.slice(c))),c,!0)}function Qm(t,r,n,i){for(var a,o=e.isInJSFile(t.declaration),s=t.typeParameters,c=Ms(e.map(r,Yu),s,Os(s),o),u=0;u<r.length;u++){e.Debug.assert(void 0!==s[u],"Should not call checkTypeArguments with too many type arguments");var l=ns(s[u]);if(l){var _=n&&i?function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1)}:void 0,d=i||e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1;a||(a=el(s,c));var p=c[u];if(!Ol(p,Do(gl(l,a),p),n?r[u]:void 0,d,_))return}}return c}function $m(t){if(zf(t.tagName))return 2;var r=ms(zy(t.tagName));return e.length(xs(r,1))?0:e.length(xs(r,0))?1:2}function Zm(t,r,n,i,a,o,s){var c={errors:void 0,skipLogging:!0};if(e.isJsxOpeningLikeElement(t))return function(e,t,r,n,i,a,o){var s=Sf(t,e);return Ll(Cy(e.attributes,s,void 0,n),s,r,i?e.tagName:void 0,e.attributes,void 0,a,o)}(t,n,i,a,o,s,c)?void 0:(e.Debug.assert(!o||!!c.errors,"jsx should have errors when reporting errors"),c.errors||e.emptyArray);var u=Ks(n);if(u&&u!==Re&&196!==t.kind){var l=eg(t),_=void 0;l?(_=zy(l),e.isOptionalChainRoot(l.parent)?_=U_(_):e.isOptionalChain(l.parent)&&(_=W_(_))):_=Re;var d=o?l||t:void 0,p=e.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1;if(!Zl(_,u,i,d,p,s,c))return e.Debug.assert(!o||!!c.errors,"this parameter should have errors when reporting errors"),c.errors||e.emptyArray}for(var f=e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,m=zg(n),g=m?Math.min(Bg(n)-1,r.length):r.length,y=0;y<g;y++){var h=r[y];if(214!==h.kind){var v=Mg(n,y),b=Cy(h,v,void 0,a),x=4&a?Q_(b):b;if(!Ll(x,v,i,o?h:void 0,h,f,s,c))return e.Debug.assert(!o||!!c.errors,"parameter should have errors when reporting errors"),S(h,x,v),c.errors||e.emptyArray}}if(m){var D=Xm(r,g,r.length,m,void 0);d=o?g<r.length?r[g]:t:void 0;if(!Zl(D,m,i,d,f,void 0,c))return e.Debug.assert(!o||!!c.errors,"rest parameter should have errors when reporting errors"),S(d,D,m),c.errors||e.emptyArray}return;function S(t,r,n){if(t&&o&&c.errors&&c.errors.length){if(uh(n))return;var a=uh(r);a&&Ql(a,n,i)&&e.addRelatedInfo(c.errors[0],e.createDiagnosticForNode(t,e.Diagnostics.Did_you_forget_to_use_await))}}}function eg(t){if(195===t.kind){var r=e.skipOuterExpressions(t.expression);if(193===r.kind||194===r.kind)return r.expression}}function tg(t,r,n){var i=e.createNode(219,t.pos,t.end);return i.parent=t,i.type=r,i.isSpread=n||!1,i}function rg(t){if(197===t.kind){var r=t.template,n=[tg(r,Kt||(Kt=Fc("TemplateStringsArray",0,!0))||Ge)];return 210===r.kind&&e.forEach(r.templateSpans,(function(e){n.push(e.expression)})),n}if(156===t.kind)return function(t){var r=t.parent,n=t.expression;switch(r.kind){case 244:case 213:return[tg(n,wa(ri(r)))];case 155:var i=r.parent;return[tg(n,161===r.parent.kind?wa(ri(i)):xe),tg(n,he),tg(n,Ae)];case 158:case 160:case 162:case 163:var a=158!==r.kind&&0!==J;return[tg(n,db(r)),tg(n,pb(r)),tg(n,a?Bc(ub(r)):he)]}return e.Debug.fail()}(t);if(e.isJsxOpeningLikeElement(t))return t.attributes.properties.length>0||e.isJsxOpeningElement(t)&&t.parent.children.length>0?[t.attributes]:e.emptyArray;var i=t.arguments||e.emptyArray,a=i.length;if(a&&Km(i[a-1])&&Jm(i)===a-1){var o=i[a-1],s=pr?zy(o.expression):ky(o.expression);if(w_(s)){var c=_c(s),u=s.target.hasRestElement?c.length-1:-1,l=e.map(c,(function(e,t){return tg(o,e,t===u)}));return e.concatenate(i.slice(0,a-1),l)}}return i}function ng(t,r){switch(t.parent.kind){case 244:case 213:return 1;case 158:return 2;case 160:case 162:case 163:return 0===J||r.parameters.length<=2?2:3;case 155:return 3;default:return e.Debug.fail()}}function ig(t,r){var n,i,a=e.getSourceFileOfNode(t);if(e.isPropertyAccessExpression(t.expression)){var o=e.getErrorSpanForNode(a,t.expression.name);n=o.start,i=r?o.length:t.end-n}else{var s=e.getErrorSpanForNode(a,t.expression);n=s.start,i=r?s.length:t.end-n}return{start:n,length:i,sourceFile:a}}function ag(t,r,n,i,a,o){if(e.isCallExpression(t)){var s=ig(t),c=s.sourceFile,u=s.start,l=s.length;return e.createFileDiagnostic(c,u,l,r,n,i,a,o)}return e.createDiagnosticForNode(t,r,n,i,a,o)}function og(t,r,n){for(var i,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=n.length,l=0,_=r;l<_.length;l++){var d=_[l],p=jg(d),f=Bg(d);p<u&&p>s&&(s=p),u<f&&f<c&&(c=f),p<a&&(a=p,i=d),o=Math.max(o,f)}var m,g,y=e.some(r,Kg),h=y?a:a<o?a+"-"+o:a,v=Jm(n)>-1;u<=o&&v&&u--;var b=y||v?y&&v?e.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more:y?e.Diagnostics.Expected_at_least_0_arguments_but_got_1:e.Diagnostics.Expected_0_arguments_but_got_1_or_more:e.Diagnostics.Expected_0_arguments_but_got_1;if(i&&jg(i)>u&&i.declaration){var x=i.declaration.parameters[i.thisParameter?u+1:u];x&&(g=e.createDiagnosticForNode(x,e.isBindingPattern(x.name)?e.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided:e.Diagnostics.An_argument_for_0_was_not_provided,x.name?e.isBindingPattern(x.name)?void 0:e.idText(e.getFirstIdentifier(x.name)):u))}if(a<u&&u<o)return ag(t,e.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,u,s,c);if(!v&&u<a){var D=ag(t,b,h,u);return g?e.addRelatedInfo(D,g):D}if(y||v){if(m=e.createNodeArray(n),v&&u){var S=e.elementAt(n,Jm(n)+1)||void 0;m=e.createNodeArray(n.slice(o>u&&S?n.indexOf(S):Math.min(o,n.length-1)))}}else m=e.createNodeArray(n.slice(o));m.pos=e.first(m).pos,m.end=e.last(m).end,m.end===m.pos&&m.end++;var T=e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),m,b,h,u);return g?e.addRelatedInfo(T,g):T}function sg(t,r,n,i,o,s){var c,u=197===t.kind,l=156===t.kind,_=e.isJsxOpeningLikeElement(t),d=!n;l||(c=t.typeArguments,(u||_||101!==t.expression.kind)&&e.forEach(c,Gv));var p=n||[];if(function(t,r,n){var i,a,o,s,c=0,u=-1;e.Debug.assert(!r.length);for(var l=0,_=t;l<_.length;l++){var d=_[l],p=d.declaration&&ri(d.declaration),f=d.declaration&&d.declaration.parent;a&&p!==a?(o=c=r.length,i=f):i&&f===i?o+=1:(i=f,o=c),a=p,L(d)?(s=++u,c++):s=o,r.splice(s,0,n?ko(d):d)}}(r,p,o),!p.length)return d&&jr.add(ag(t,e.Diagnostics.Call_target_does_not_contain_any_signatures)),jm(t);var f,m,g,y,h=rg(t),v=1===p.length&&!p[0].typeParameters,b=l||v||!e.some(h,bl)?0:4,x=!!(16&i)&&195===t.kind&&t.arguments.hasTrailingComma;if(p.length>1&&(y=W(p,Ur,x)),y||(y=W(p,Vr,x)),y)return y;if(d)if(f)if(1===f.length||f.length>3){var D,S=f[f.length-1];f.length>3&&(D=e.chainDiagnosticMessages(D,e.Diagnostics.The_last_overload_gave_the_following_error),D=e.chainDiagnosticMessages(D,e.Diagnostics.No_overload_matches_this_call));var T=Zm(t,h,S,Vr,0,!0,(function(){return D}));if(T)for(var E=0,C=T;E<C.length;E++){var k=C[E];S.declaration&&f.length>3&&e.addRelatedInfo(k,e.createDiagnosticForNode(S.declaration,e.Diagnostics.The_last_overload_is_declared_here)),jr.add(k)}else e.Debug.fail("No error for last overload signature")}else{for(var N=[],A=0,F=Number.MAX_VALUE,P=0,w=0,I=function(r){var n=Zm(t,h,r,Vr,0,!0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Overload_0_of_1_2_gave_the_following_error,w+1,p.length,wi(r))}));n?(n.length<=F&&(F=n.length,P=w),A=Math.max(A,n.length),N.push(n)):e.Debug.fail("No error for 3 or fewer overload signatures"),w++},O=0,R=f;O<R.length;O++){I(R[O])}var B=A>1?N[P]:e.flatten(N);e.Debug.assert(B.length>0,"No errors reported for 3 or fewer overload signatures");var j=e.chainDiagnosticMessages(e.map(B,(function(e){return"string"==typeof e.messageText?e:e.messageText})),e.Diagnostics.No_overload_matches_this_call),K=e.flatMap(B,(function(e){return e.relatedInformation}));if(e.every(B,(function(e){return e.start===B[0].start&&e.length===B[0].length&&e.file===B[0].file}))){var J=B[0],z=J.file,U=J.start,V=J.length;jr.add({file:z,start:U,length:V,code:j.code,category:j.category,messageText:j,relatedInformation:K})}else jr.add(e.createDiagnosticForNodeFromMessageChain(t,j,K))}else if(m)jr.add(og(t,[m],h));else if(g)Qm(g,t.typeArguments,!0,s);else{var q=e.filter(r,(function(e){return Vm(e,c)}));0===q.length?jr.add(function(t,r,n){var i=n.length;if(1===r.length){var a=Os((_=r[0]).typeParameters),o=e.length(_.typeParameters);return e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.Expected_0_type_arguments_but_got_1,a<o?a+"-"+o:a,i)}for(var s=-1/0,c=1/0,u=0,l=r;u<l.length;u++){var _,d=Os((_=l[u]).typeParameters);o=e.length(_.typeParameters);d>i?c=Math.min(c,d):o<i&&(s=Math.max(s,o))}return s!==-1/0&&c!==1/0?e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,i,s,c):e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.Expected_0_type_arguments_but_got_1,s===-1/0?c:s,i)}(t,r,c)):l?s&&jr.add(ag(t,s)):jr.add(og(t,q,h))}return a||!h?jm(t):function(t,r,n,i){return e.Debug.assert(r.length>0),i||1===r.length||r.some((function(e){return!!e.typeParameters}))?function(t,r,n){var i=function(e,t){for(var r=-1,n=-1,i=0;i<e.length;i++){var a=e[i],o=Bg(a);if(Kg(a)||o>=t)return i;o>n&&(n=o,r=i)}return r}(r,void 0===ne?n.length:ne),a=r[i],o=a.typeParameters;if(!o)return a;var s=Rm(t)?t.typeArguments:void 0,c=s?Hs(a,function(e,t,r){var n=e.map(ub);for(;n.length>t.length;)n.pop();for(;n.length<t.length;)n.push(ns(t[n.length])||Pd(r));return n}(s,o,e.isInJSFile(t))):function(t,r,n,i){var a=cd(r,n,e.isInJSFile(t)?2:0),o=Ym(t,n,i,12,a);return Hs(n,o)}(t,o,a,n);return r[i]=c,c}(t,r,n):function(t){var r,n=e.mapDefined(t,(function(e){return e.thisParameter}));n.length&&(r=ug(n,n.map(Ig)));for(var i=e.minAndMax(t,cg),a=i.min,o=i.max,s=[],c=function(r){var n=e.mapDefined(t,(function(t){return M(t)?r<t.parameters.length-1?t.parameters[r]:e.last(t.parameters):r<t.parameters.length?t.parameters[r]:void 0}));e.Debug.assert(0!==n.length),s.push(ug(n,e.mapDefined(t,(function(e){return Lg(e,r)}))))},u=0;u<o;u++)c(u);var l=e.mapDefined(t,(function(t){return M(t)?e.last(t.parameters):void 0})),_=0;if(0!==l.length){var d=jc(Qc(e.mapDefined(t,qs),2));s.push(lg(l,d)),_|=1}t.some(L)&&(_|=2);return To(t[0].declaration,void 0,r,s,iu(t.map(zs)),void 0,a,_)}(r)}(t,p,h,!!n);function W(r,n,i){if(void 0===i&&(i=!1),f=void 0,m=void 0,g=void 0,v){var a=r[0];if(c||!Um(t,h,a,i))return;return Zm(t,h,a,n,0,!1,void 0)?void(f=[a]):a}for(var o=0;o<r.length;o++){if(Vm(a=r[o],c)&&Um(t,h,a,i)){var s=void 0,u=void 0;if(a.typeParameters){var l=void 0;if(c){if(!(l=Qm(a,c,!1))){g=a;continue}}else u=cd(a.typeParameters,a,e.isInJSFile(t)?2:0),l=Ym(t,a,h,8|b,u),b|=4&u.flags?8:0;if(s=Ws(a,l,e.isInJSFile(a.declaration),u&&u.inferredTypeParameters),zg(a)&&!Um(t,h,s,i)){m=s;continue}}else s=a;if(!Zm(t,h,s,n,b,!1,void 0)){if(b){if(b=0,u)if(s=Ws(a,l=Ym(t,a,h,b,u),e.isInJSFile(a.declaration),u&&u.inferredTypeParameters),zg(a)&&!Um(t,h,s,i)){m=s;continue}if(Zm(t,h,s,n,b,!1,void 0)){(f||(f=[])).push(s);continue}}return r[o]=s,s}(f||(f=[])).push(s)}}}}function cg(e){var t=e.parameters.length;return M(e)?t-1:t}function ug(e,t){return lg(e,Qc(t,2))}function lg(t,r){return X_(e.first(t),r)}function _g(e){return!(!e.typeParameters||!Lb(zs(e)))}function dg(e,t,r,n){return Qi(e)||Qi(t)&&!!(262144&e.flags)||!r&&!n&&!(1179648&t.flags)&&Fl(e,ut)}function pg(t,r,n){if(t.arguments&&J<1){var i=Jm(t.arguments);i>=0&&Xr(t.arguments[i],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var a=lm(t.expression);if(a===je)return tr;if((a=ms(a))===xe)return jm(t);if(Qi(a))return t.typeArguments&&Xr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Bm(t);var o=xs(a,1);if(o.length){if(!function(t,r){if(!r||!r.declaration)return!0;var n=r.declaration,i=e.getSelectedModifierFlags(n,24);if(!i)return!0;var a=e.getClassLikeDeclarationOfSymbol(n.parent.symbol),o=ro(n.parent.symbol);if(!ab(t,a)){var s=e.getContainingClass(t);if(s&&16&i){var c=ub(s);if(function t(r,n){var i=Wa(n);if(!e.length(i))return!1;var a=i[0];if(2097152&a.flags){for(var o=Lo(a.types),s=0,c=0,u=a.types;c<u.length;c++){var l=u[c];if(!o[s]&&3&e.getObjectFlags(l)){if(l.symbol===r)return!0;if(t(r,l))return!0}s++}return!1}if(a.symbol===r)return!0;return t(r,a)}(n.parent.symbol,c))return!0}return 8&i&&Xr(t,e.Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Ii(o)),16&i&&Xr(t,e.Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Ii(o)),!1}return!0}(t,o[0]))return jm(t);var s=a.symbol&&e.getClassLikeDeclarationOfSymbol(a.symbol);return s&&e.hasModifier(s,128)?(Xr(t,e.Diagnostics.Cannot_create_an_instance_of_an_abstract_class),jm(t)):sg(t,o,r,n,!1)}var c=xs(a,0);if(c.length){var u=sg(t,c,r,n,!1);return H||(u.declaration&&!Sg(u.declaration)&&zs(u)!==Re&&Xr(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),Ks(u)===Re&&Xr(t,e.Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),u}return mg(t.expression,a,1),jm(t)}function fg(t,r){var n,i=0===r,a=dh(t),o=a&&xs(a,r).length>0;if(1048576&t.flags){for(var s=!1,c=0,u=t.types;c<u.length;c++){var l=u[c];if(0!==xs(l,r).length){if(s=!0,n)break}else if(n||(n=e.chainDiagnosticMessages(n,i?e.Diagnostics.Type_0_has_no_call_signatures:e.Diagnostics.Type_0_has_no_construct_signatures,Ii(l)),n=e.chainDiagnosticMessages(n,i?e.Diagnostics.Not_all_constituents_of_type_0_are_callable:e.Diagnostics.Not_all_constituents_of_type_0_are_constructable,Ii(t))),s)break}s||(n=e.chainDiagnosticMessages(void 0,i?e.Diagnostics.No_constituent_of_type_0_is_callable:e.Diagnostics.No_constituent_of_type_0_is_constructable,Ii(t))),n||(n=e.chainDiagnosticMessages(n,i?e.Diagnostics.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:e.Diagnostics.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Ii(t)))}else n=e.chainDiagnosticMessages(n,i?e.Diagnostics.Type_0_has_no_call_signatures:e.Diagnostics.Type_0_has_no_construct_signatures,Ii(t));return{messageChain:e.chainDiagnosticMessages(n,i?e.Diagnostics.This_expression_is_not_callable:e.Diagnostics.This_expression_is_not_constructable),relatedMessage:o?e.Diagnostics.Did_you_forget_to_use_await:void 0}}function mg(t,r,n,i){var a=fg(r,n),o=a.messageChain,s=a.relatedMessage,c=e.createDiagnosticForNodeFromMessageChain(t,o);if(s&&e.addRelatedInfo(c,e.createDiagnosticForNode(t,s)),e.isCallExpression(t.parent)){var u=ig(t.parent,!0),l=u.start,_=u.length;c.start=l,c.length=_}jr.add(c),gg(r,n,i?e.addRelatedInfo(c,i):c)}function gg(t,r,n){if(t.symbol){var i=_n(t.symbol).originatingImport;if(i&&!e.isImportCall(i)){var a=xs(wa(_n(t.symbol).target),r);if(!a||!a.length)return;e.addRelatedInfo(n,e.createDiagnosticForNode(i,e.Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}}function yg(t){switch(t.parent.kind){case 244:case 213:return e.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;case 155:return e.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;case 158:return e.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;case 160:case 162:case 163:return e.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;default:return e.Debug.fail()}}function hg(t,r,n){var i=zy(t.expression),a=ms(i);if(a===xe)return jm(t);var o,s,c=xs(a,0),u=xs(a,1).length;if(dg(i,a,c.length,u))return Bm(t);if(o=t,(s=c).length&&e.every(s,(function(e){return 0===e.minArgumentCount&&!M(e)&&e.parameters.length<ng(o,e)}))){var l=e.getTextOfNode(t.expression,!1);return Xr(t,e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0,l),jm(t)}var _=yg(t);if(!c.length){var d=fg(a,0),p=e.chainDiagnosticMessages(d.messageChain,_),f=e.createDiagnosticForNodeFromMessageChain(t.expression,p);return d.relatedMessage&&e.addRelatedInfo(f,e.createDiagnosticForNode(t.expression,d.relatedMessage)),jr.add(f),gg(a,0,f),jm(t)}return sg(t,c,r,n,!1,_)}function vg(t,r){var n=Hf(t),i=n&&Qn(n),a=i&&fn(i,C.Element,788968),o=a&&Z.symbolToEntityName(a,788968,t),s=e.createFunctionTypeNode(void 0,[e.createParameter(void 0,void 0,void 0,"props",void 0,Z.typeToTypeNode(r,t))],o?e.createTypeReferenceNode(o,void 0):e.createKeywordTypeNode(124)),c=en(1,"props");return c.type=r,To(s,void 0,void 0,[c],a?ro(a):xe,void 0,1,0)}function bg(t,r,n){if(zf(t.tagName)){var i=$f(t),a=vg(t,i);return Ml(Cy(t.attributes,Sf(a,t),void 0,0),i,t.tagName,t.attributes),a}var o=zy(t.tagName),s=ms(o);if(s===xe)return jm(t);var c=function t(r,n){if(4&r.flags)return[$t];if(128&r.flags){var i=Qf(r,n);return i?[vg(n,i)]:(Xr(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,r.value,"JSX."+C.IntrinsicElements),e.emptyArray)}var a=ms(r),o=xs(a,1);return 0===o.length&&(o=xs(a,0)),0===o.length&&1048576&a.flags&&(o=Po(e.map(a.types,(function(e){return t(e,n)})))),o}(o,t);return dg(o,s,c.length,0)?Bm(t):0===c.length?(Xr(t.tagName,e.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,e.getTextOfNode(t.tagName)),jm(t)):sg(t,c,r,n,!1)}function xg(t,r,n){switch(t.kind){case 195:return function(t,r,n){if(101===t.expression.kind){var i=$p(t.expression);if(Qi(i)){for(var a=0,o=t.arguments;a<o.length;a++){zy(o[a])}return $t}if(i!==xe){var s=e.getEffectiveBaseTypeNode(e.getContainingClass(t));if(s)return sg(t,Va(i,s.typeArguments,s),r,n,!1)}return Bm(t)}var c,u=zy(t.expression);if(e.isCallChain(t)){var l=H_(u,t.expression);c=l!==u,u=l}else c=!1;if((u=mm(u,t.expression,fm))===je)return tr;var _=ms(u);if(_===xe)return jm(t);var d=xs(_,0),p=xs(_,1).length;if(dg(u,_,d.length,p))return u!==xe&&t.typeArguments&&Xr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Bm(t);if(!d.length){if(p)Xr(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ii(u));else{var f=void 0;if(1===t.arguments.length){var m=e.getSourceFileOfNode(t).text;e.isLineBreak(m.charCodeAt(e.skipTrivia(m,t.expression.end,!0)-1))&&(f=e.createDiagnosticForNode(t.expression,e.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon))}mg(t.expression,_,0,f)}return jm(t)}return 8&n&&!t.typeArguments&&d.some(_g)?(Ly(t,n),er):d.some((function(t){return e.isInJSFile(t.declaration)&&!!e.getJSDocClassTag(t.declaration)}))?(Xr(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ii(u)),jm(t)):sg(t,d,r,n,c)}(t,r,n);case 196:return pg(t,r,n);case 197:return function(e,t,r){var n=zy(e.tag),i=ms(n);if(i===xe)return jm(e);var a=xs(i,0),o=xs(i,1).length;return dg(n,i,a.length,o)?Bm(e):a.length?sg(e,a,t,r,!1):(mg(e.tag,i,0),jm(e))}(t,r,n);case 156:return hg(t,r,n);case 266:case 265:return bg(t,r,n)}throw e.Debug.assertNever(t,"Branch in 'resolveSignature' should be unreachable.")}function Dg(e,t,r){var n=dn(e),i=n.resolvedSignature;if(i&&i!==er&&!t)return i;n.resolvedSignature=er;var a=xg(e,t,r||0);return a!==er&&(n.resolvedSignature=dr===pr?a:i),a}function Sg(t){if(!t||!e.isInJSFile(t))return!1;var r=e.isFunctionDeclaration(t)||e.isFunctionExpression(t)?t:e.isVariableDeclaration(t)&&t.initializer&&e.isFunctionExpression(t.initializer)?t.initializer:void 0;if(r){if(e.getJSDocClassTag(t))return!0;var n=ri(r);return!!n&&e.hasEntries(n.members)}return!1}function Tg(t,r){if(r&&(e.hasEntries(r.exports)||e.hasEntries(r.members))){var n=_n(r);if(!n.inferredClassSymbol||!n.inferredClassSymbol.has(""+A(t))){var i=tn(t)?t:an(t);return i.exports=i.exports||e.createSymbolTable(),i.members=i.members||e.createSymbolTable(),i.flags|=32&r.flags,e.hasEntries(r.exports)&&un(i.exports,r.exports),e.hasEntries(r.members)&&un(i.members,r.members),(n.inferredClassSymbol||(n.inferredClassSymbol=e.createMap())).set(""+A(i),i),i}return n.inferredClassSymbol.get(""+A(t))}}function Eg(t,r){tx(t,t.typeArguments)||rx(t.arguments);var n=Dg(t,void 0,r);if(n===er)return Ke;if(101===t.expression.kind)return Re;if(196===t.kind){var i=n.declaration;if(i&&161!==i.kind&&165!==i.kind&&170!==i.kind&&!e.isJSDocConstructSignature(i)&&!Sg(i))return H&&Xr(t,e.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),he}if(e.isInJSFile(t)&&Ag(t))return function(e){var t=zn(e,e);if(t){var r=Wn(t);if(r)return wa(r)}return he}(t.arguments[0]);var a=zs(n);if(12288&a.flags&&Cg(t))return Gu(e.walkUpParenthesizedExpressions(t.parent));if(195===t.kind&&225===t.parent.kind&&16384&a.flags&&Js(n))if(e.isDottedName(t.expression)){if(!Np(t)){var o=Xr(t.expression,e.Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);kp(t.expression,o)}}else Xr(t.expression,e.Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);if(e.isInJSFile(t)){var s=e.getDeclarationOfExpando(t);if(s){var c=ri(s);if(c&&e.hasEntries(c.exports)){var u=hi(c,c.exports,e.emptyArray,e.emptyArray,void 0,void 0);return u.objectFlags|=16384,iu([a,u])}}}return a}function Cg(t){if(!e.isCallExpression(t))return!1;var r=t.expression;if(e.isPropertyAccessExpression(r)&&"for"===r.name.escapedText&&(r=r.expression),!e.isIdentifier(r)||"Symbol"!==r.escapedText)return!1;var n=Pc(!1);return!!n&&n===gn(r,"Symbol",111551,void 0,void 0,!1)}function kg(t){if(rx(t.arguments)||function(t){if(z===e.ModuleKind.ES2015)return vx(t,e.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd);if(t.typeArguments)return vx(t,e.Diagnostics.Dynamic_import_cannot_have_type_arguments);var r=t.arguments;if(1!==r.length)return vx(t,e.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);if(Qb(r),e.isSpreadElement(r[0]))return vx(r[0],e.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element)}(t),0===t.arguments.length)return Yg(t,he);for(var r=t.arguments[0],n=ky(r),i=1;i<t.arguments.length;++i)ky(t.arguments[i]);(32768&n.flags||65536&n.flags||!Fl(n,Ne))&&Xr(r,e.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0,Ii(n));var a=zn(t,r);if(a){var o=Gn(a,r,!0,!1);if(o)return Yg(t,Ng(wa(o),o,a))}return Yg(t,he)}function Ng(t,r,n){if(U&&t&&t!==xe){var i=t;if(!i.syntheticType)if(Nn(e.find(n.declarations,e.isSourceFile),n,!1)){var a=e.createSymbolTable(),o=en(2097152,"default");o.nameType=Wu("default"),o.target=On(r),a.set("default",o);var s=en(2048,"__type"),c=hi(s,a,e.emptyArray,e.emptyArray,void 0,void 0);s.type=c,i.syntheticType=Kf(t)?Bu(t,c,s,0,!1):c}else i.syntheticType=t;return i.syntheticType}return t}function Ag(t){if(!e.isRequireCall(t,!0))return!1;if(!e.isIdentifier(t.expression))return e.Debug.fail();var r=gn(t.expression,t.expression.escapedText,111551,void 0,void 0,!0);if(r===ae)return!0;if(2097152&r.flags)return!1;var n=16&r.flags?243:3&r.flags?241:0;if(0!==n){var i=e.getDeclarationOfKind(r,n);return!!i&&!!(8388608&i.flags)}return!1}function Fg(t){return function(t){if(t.questionDotToken||32&t.flags)return vx(t.template,e.Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain);return!1}(t)||tx(t,t.typeArguments),J<2&&Gb(t,131072),zs(Dg(t))}function Pg(t,r,n,i){var o=zy(n,i);if(e.isConstTypeReference(r))return function t(r){switch(r.kind){case 10:case 14:case 8:case 9:case 105:case 90:case 191:case 192:return!0;case 199:return t(r.expression);case 206:var n=r.operator,i=r.operand;return 40===n&&(8===i.kind||9===i.kind)||39===n&&8===i.kind;case 193:case 194:var a=r.expression;if(e.isIdentifier(a)){var o=cb(a);return o&&2097152&o.flags&&(o=Mn(o)),!!(o&&384&o.flags&&1===Qa(o))}}return!1}(n)||Xr(n,e.Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals),Vu(o);Gv(r),o=Q_(k_(o));var s=Yu(r);a&&s!==xe&&(wl(s,rd(o))||Ul(o,s,t,e.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first));return s}function wg(t){return function(t){var r=t.name.escapedText;switch(t.keywordToken){case 98:if("target"!==r)return vx(t.name,e.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,t.name.escapedText,e.tokenToString(t.keywordToken),"target");break;case 95:if("meta"!==r)vx(t.name,e.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,t.name.escapedText,e.tokenToString(t.keywordToken),"meta")}}(t),98===t.keywordToken?function(t){var r=e.getNewTargetContainer(t);return r?161===r.kind?wa(ri(r.parent)):wa(ri(r)):(Xr(t,e.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),xe)}(t):95===t.keywordToken?function(t){z!==e.ModuleKind.ESNext&&z!==e.ModuleKind.System&&Xr(t,e.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system);var r=e.getSourceFileOfNode(t);return e.Debug.assert(!!(2097152&r.flags),"Containing file is missing import meta node flag."),e.Debug.assert(!!r.externalModuleIndicator,"Containing file should be a module."),"meta"===t.name.escapedText?function(){return Jt||(Jt=Fc("ImportMeta",0,!0))||Ge}():xe}(t):e.Debug.assertNever(t.keywordToken)}function Ig(t){var r=wa(t);if(V){var n=t.valueDeclaration;if(n&&e.hasInitializer(n))return z_(r)}return r}function Og(e,t){var r=e.parameters.length-(M(e)?1:0);if(t<r)return e.parameters[t].escapedName;var n=e.parameters[r]||ge,i=wa(n);if(w_(i)){var a=i.target.associatedNames,o=t-r;return a&&a[o]||n.escapedName+"_"+o}return n.escapedName}function Mg(e,t){return Lg(e,t)||he}function Lg(e,t){var r=e.parameters.length-(M(e)?1:0);if(t<r)return Ig(e.parameters[t]);if(M(e)){var n=wa(e.parameters[r]),i=t-r;if(!w_(n)||n.target.hasRestElement||i<_c(n).length)return Su(n,Wu(i))}}function Rg(e,t){var r=Bg(e),n=Jg(e),i=r-(n?1:0);if(n&&t===i)return n;for(var a=[],o=[],s=t;s<i;s++)a.push(Mg(e,s)),o.push(Og(e,s));n&&(a.push(Su(n,Ae)),o.push(Og(e,i)));var c=jg(e);return Uc(a,c<t?0:c-t,!!n,!1,o)}function Bg(e){var t=e.parameters.length;if(M(e)){var r=wa(e.parameters[t-1]);if(w_(r))return t+_c(r).length-1}return t}function jg(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]);if(w_(t)){var r=t.target.minLength;if(r>0)return e.parameters.length-1+r}}return e.minArgumentCount}function Kg(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]);return!w_(t)||t.target.hasRestElement}return!1}function Jg(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]);return w_(t)?function(e){var t=I_(e);return t&&jc(t)}(t):t}}function zg(e){var t=Jg(e);return!t||y_(t)||Qi(t)?void 0:t}function Ug(e){return Vg(e,Be)}function Vg(e,t){return e.parameters.length>0?Mg(e,0):t}function qg(t,r){(t.typeParameters=r.typeParameters,r.thisParameter)&&((!(a=t.thisParameter)||a.valueDeclaration&&!a.valueDeclaration.type)&&(a||(t.thisParameter=X_(r.thisParameter,void 0)),Wg(t.thisParameter,wa(r.thisParameter))));for(var n=t.parameters.length-(M(t)?1:0),i=0;i<n;i++){var a=t.parameters[i];if(!e.getEffectiveTypeAnnotationNode(a.valueDeclaration))Wg(a,Mg(r,i))}M(t)&&(!tn(a=e.last(t.parameters))&&e.getEffectiveTypeAnnotationNode(a.valueDeclaration)||Wg(a,Rg(r,n)))}function Wg(t,r){var n=_n(t);if(!n.type){n.type=r;var i=t.valueDeclaration;75!==i.name.kind&&(n.type===De&&(n.type=ya(i.name)),function t(r){for(var n=0,i=r.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||(75===a.name.kind?_n(ri(a)).type=ia(a):t(a.name))}}(i.name))}}function Gg(e){var t=Ic(!0);return t!==Qe?cc(t,[e=dh(e)||De]):De}function Hg(e){var t,r=(t=!0,kt||(kt=Fc("PromiseLike",1,t))||Qe);return r!==Qe?cc(r,[e=dh(e)||De]):De}function Yg(t,r){var n=Gg(r);return n===De?(Xr(t,e.isImportCall(t)?e.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:e.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),xe):(Oc(!0)||Xr(t,e.isImportCall(t)?e.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function Xg(t,r){if(!t.body)return xe;var n,i,a,o=e.getFunctionFlags(t),s=0!=(2&o),c=0!=(1&o),u=Re;if(222!==t.body.kind)n=ky(t.body,r&&-9&r),s&&(n=_h(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member));else if(c){var l=ry(t,r);l?l.length>0&&(n=Qc(l,2)):u=Be;var _=function(t,r){var n=[],i=[],a=0!=(2&e.getFunctionFlags(t));return e.forEachYieldExpression(t.body,(function(t){var o,s=t.expression?zy(t.expression,r):Te;if(e.pushIfUnique(n,$g(t,s,he,a)),t.asteriskToken){var c=iv(s,a?19:17,t.expression);o=c&&c.nextType}else o=xf(t);o&&e.pushIfUnique(i,o)})),{yieldTypes:n,nextTypes:i}}(t,r),d=_.yieldTypes,p=_.nextTypes;i=e.some(d)?Qc(d,2):void 0,a=e.some(p)?iu(p):void 0}else{var f=ry(t,r);if(!f)return 2&o?Yg(t,Be):Be;if(0===f.length)return 2&o?Yg(t,Re):Re;n=Qc(f,2)}if(n||i||a){var m=kf(t);if(m||(i&&ad(t,i,1),n&&ad(t,n),a&&ad(t,a)),n&&E_(n)||i&&E_(i)||a&&E_(a)){var g=m?m===Ls(t)?c?void 0:n:vf(zs(m),t):void 0;c?(i=P_(i,g,0,s),n=P_(n,g,1,s),a=P_(a,g,2,s)):n=function(e,t,r){return e&&E_(e)&&(e=F_(e,t?r?lh(t):t:void 0)),e}(n,g,s)}i&&(i=rd(i)),n&&(n=rd(n)),a&&(a=rd(a))}return c?Qg(i||Be,n||u,a||of(2,t)||De,s):s?Gg(n||u):n||u}function Qg(e,t,r,n){var i=n?cr:ur,a=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||De,t=i.resolveIterationType(t,void 0)||De,r=i.resolveIterationType(r,void 0)||De,a===Qe){var o=i.getGlobalIterableIteratorType(!1),s=o!==Qe?cv(o,i):void 0,c=s?s.returnType:he,u=s?s.nextType:Se;return Fl(t,c)&&Fl(u,r)?o!==Qe?Rc(o,[e]):(i.getGlobalIterableIteratorType(!0),Ge):(i.getGlobalGeneratorType(!0),Ge)}return Rc(a,[e,t,r])}function $g(t,r,n,i){var a=t.expression||t,o=t.asteriskToken?Zh(i?19:17,r,n,a):r;return i?dh(o,a,t.asteriskToken?e.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:e.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function Zg(e,t,r,n){var i=0;if(n){for(var a=t;a<r.length;a++)i|=S.get(r[a])||32768;for(a=e;a<t;a++)i&=~(S.get(r[a])||0);for(a=0;a<e;a++)i|=S.get(r[a])||32768}else{for(a=e;a<t;a++)i|=D.get(r[a])||128;for(a=0;a<e;a++)i&=~(D.get(r[a])||0)}return i}function ey(t){var r=dn(t);return void 0!==r.isExhaustive?r.isExhaustive:r.isExhaustive=function(t){if(203===t.expression.kind){var r=Ky(t.expression.expression),n=Zg(0,0,sp(t),!0);return!!(131072&_p(cs(r)||r,(function(e){return(Gd(e)&n)===n})).flags)}var i=Ky(t.expression);if(!C_(i))return!1;var a=op(t);if(!a.length||e.some(a,T_))return!1;return function(t,r){return 1048576&t.flags?!e.forEach(t.types,(function(t){return!e.contains(r,t)})):e.contains(r,t)}(pp(i,Vu),a)}(t)}function ty(e){return e.endFlowNode&&Fp(e.endFlowNode)}function ry(t,r){var n=e.getFunctionFlags(t),i=[],a=ty(t),o=!1;if(e.forEachReturnStatement(t.body,(function(s){var c=s.expression;if(c){var u=ky(c,r&&-9&r);2&n&&(u=_h(u,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)),131072&u.flags&&(o=!0),e.pushIfUnique(i,u)}else a=!0})),0!==i.length||a||!o&&!function(e){switch(e.kind){case 200:case 201:return!0;case 160:return 192===e.parent.kind;default:return!1}}(t))return!(V&&i.length&&a)||Sg(t)&&i.some((function(e){return e.symbol===t.symbol}))||e.pushIfUnique(i,Se),i}function ny(t,r){if(a){var n=e.getFunctionFlags(t),i=r&&oy(r,n);if((!i||!fy(i,16385))&&159!==t.kind&&!e.nodeIsMissing(t.body)&&222===t.body.kind&&ty(t)){var o=512&t.flags;if(i&&131072&i.flags)Xr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);else if(i&&!o)Xr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);else if(i&&V&&!Fl(Se,i))Xr(e.getEffectiveReturnTypeNode(t),e.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(K.noImplicitReturns){if(!i){if(!o)return;if(Tv(t,zs(Ls(t))))return}Xr(e.getEffectiveReturnTypeNode(t)||t,e.Diagnostics.Not_all_code_paths_return_a_value)}}}}function iy(t,r){if(e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t)),Yv(t),r&&4&r&&bl(t)){if(!e.getEffectiveReturnTypeNode(t)&&Dl(t)){var n=dn(t);if(n.contextFreeType)return n.contextFreeType;var i=Xg(t,r),a=To(void 0,void 0,void 0,e.emptyArray,i,void 0,0,0),o=hi(t.symbol,B,[a],e.emptyArray,void 0,void 0);return o.objectFlags|=1048576,n.contextFreeType=o}return $e}ex(t)||200!==t.kind||ox(t);var s=wa(ti(t.symbol));return Qi(s)?s:(ay(t,r),s)}function ay(t,r){var n=dn(t);if(!(1024&n.flags)){var i=Nf(t);if(!(1024&n.flags)){if(n.flags|=1024,i){var a=wa(ti(t.symbol));if(Qi(a))return;var o=xs(a,0)[0];if(bl(t)){var s=Df(t);r&&2&r&&function(t,r,n){for(var i=t.parameters.length-(M(t)?1:0),a=0;a<i;a++){var o=t.parameters[a].valueDeclaration;if(o.type){var s=e.getEffectiveTypeAnnotationNode(o);s&&Sd(n.inferences,Yu(s),Mg(r,a))}}var c=Jg(r);if(c&&262144&c.flags){qg(t,sl(r,n.nonFixingMapper));var u=Bg(r)-1;Sd(n.inferences,Rg(t,u),c)}}(o,i,s),qg(o,s?sl(i,s.mapper):i)}if(!Us(t)&&!o.resolvedReturnType){var c=Xg(t,r);o.resolvedReturnType||(o.resolvedReturnType=c)}}Wy(t)}}}function oy(e,t){var r=!!(2&t);return e&&!!(1&t)?bv(1,e,r)||xe:e&&r?dh(e)||xe:e}function sy(e,t,r,n){if(void 0===n&&(n=!1),!Fl(t,We)){var i=n&&uh(t);return Zr(e,!!i&&Fl(i,We),r),!1}return!0}function cy(t){if(!e.isCallExpression(t))return!1;if(!e.isBindableObjectDefinePropertyCall(t))return!1;var r=ky(t.arguments[2]);if(Xi(r,"value")){var n=vs(r,"writable"),i=n&&wa(n);if(!i||i===Pe||i===we)return!0;if(n&&n.valueDeclaration&&e.isPropertyAssignment(n.valueDeclaration)){var a=zy(n.valueDeclaration.initializer);if(a===Pe||a===we)return!0}return!1}return!vs(r,"set")}function uy(t){return!!(8&e.getCheckFlags(t)||4&t.flags&&64&e.getDeclarationModifierFlagsFromSymbol(t)||3&t.flags&&2&om(t)||98304&t.flags&&!(65536&t.flags)||8&t.flags||e.some(t.declarations,cy))}function ly(t,r){if(uy(r)){if(4&r.flags&&(193===t.kind||194===t.kind)&&103===t.expression.kind){var n=e.getContainingFunction(t);return!n||161!==n.kind||(!r.valueDeclaration||!(n.parent===r.valueDeclaration.parent||n===r.valueDeclaration.parent))}return!0}return!1}function _y(t){if(193===t.kind||194===t.kind){var r=e.skipParentheses(t.expression);if(75===r.kind){var n=dn(r).resolvedSymbol;if(2097152&n.flags){var i=En(n);return!!i&&255===i.kind}}}return!1}function dy(t,r,n){var i=e.skipOuterExpressions(t,3);return 75!==i.kind&&193!==i.kind&&194!==i.kind?(Xr(t,r),!1):!(32&i.flags)||(Xr(t,n),!1)}function py(e){return fy(e,2112)?my(e,3)||fy(e,296)?We:Fe:Ae}function fy(e,t){if(e.flags&t&-131073||131072&t&&Xo(e))return!0;if(3145728&e.flags)for(var r=0,n=e.types;r<n.length;r++){if(fy(n[r],t))return!0}return!1}function my(e,t,r){return!!(e.flags&t)||!(r&&114691&e.flags)&&(!!(296&t)&&Fl(e,Ae)||!!(2112&t)&&Fl(e,Fe)||!!(132&t)&&Fl(e,Ne)||!!(528&t)&&Fl(e,Me)||!!(16384&t)&&Fl(e,Re)||!!(131072&t)&&Fl(e,Be)||!!(65536&t)&&Fl(e,Ce)||!!(32768&t)&&Fl(e,Se)||!!(4096&t)&&Fl(e,Le)||!!(67108864&t)&&Fl(e,Ue))}function gy(t,r,n){return 1048576&t.flags?e.every(t.types,(function(e){return gy(e,r,n)})):my(t,r,n)}function yy(t){return!!(16&e.getObjectFlags(t))&&!!t.symbol&&hy(t.symbol)}function hy(e){return 0!=(128&e.flags)}function vy(t,r,n,i,a){void 0===a&&(a=!1);var o=t.properties,s=o[n];if(279===s.kind||280===s.kind){var c=s.name,u=ou(c);if(_o(u)){var l=vs(r,yo(u));l&&(Fm(l,s,a),cm(s,!1,r,l))}var _=ta(s,Su(r,u,c));return xy(280===s.kind?s:s.initializer,_)}if(281===s.kind){if(!(n<o.length-1)){J<99&&Gb(s,4);var d=[];if(i)for(var p=0,f=i;p<f.length;p++){var m=f[p];e.isSpreadAssignment(m)||d.push(m.name)}_=ea(r,d,r.symbol);return Qb(i,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),xy(s.expression,_)}Xr(s,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern)}else Xr(s,e.Diagnostics.Property_assignment_expected)}function by(t,r,n,i,a){var o=t.elements,s=o[n];if(214!==s.kind){if(212!==s.kind){var c=Wu(n);if(b_(r)){var u=Af(s)?8:0,l=Tu(r,c,tg(s,c),u)||xe;return xy(s,ta(s,Af(s)?Hd(l,524288):l),a)}return xy(s,i,a)}if(n<o.length-1)Xr(s,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);else{var _=s.expression;if(208!==_.kind||62!==_.operatorToken.kind)return Qb(t.elements,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),xy(_,lp(r,w_)?pp(r,(function(e){return Vc(e,n)})):jc(i),a);Xr(_.operatorToken,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}}function xy(t,r,n,i){var a;if(280===t.kind){var o=t;o.objectAssignmentInitializer&&(!V||32768&R_(zy(o.objectAssignmentInitializer))||(r=Hd(r,524288)),Ty(o.name,o.equalsToken,o.objectAssignmentInitializer,n)),a=t.name}else a=t;return 208===a.kind&&62===a.operatorToken.kind&&(Sy(a,n),a=a.left),192===a.kind?function(e,t,r){var n=e.properties;if(V&&0===n.length)return gm(t,e);for(var i=0;i<n.length;i++)vy(e,t,i,n,r);return t}(a,r,i):191===a.kind?function(e,t,r){var n=e.elements;J<2&&K.downlevelIteration&&Gb(e,512);for(var i=Zh(65,t,Se,e)||xe,a=0;a<n.length;a++)by(e,t,a,i,r);return t}(a,r,n):function(t,r,n){var i=zy(t,n),a=281===t.parent.kind?e.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:e.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,o=281===t.parent.kind?e.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:e.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;dy(t,a,o)&&Ml(r,i,t,t);return r}(a,r,n)}function Dy(e,t){return 0!=(98304&t.flags)||wl(e,t)}function Sy(t,r){return e.isInJSFile(t)&&e.getAssignedExpandoInitializer(t)?zy(t.right,r):(function(t){var r=t.left,n=t.operatorToken,i=t.right;60===n.kind&&(!e.isBinaryExpression(r)||56!==r.operatorToken.kind&&55!==r.operatorToken.kind||vx(r,e.Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses,e.tokenToString(r.operatorToken.kind),e.tokenToString(n.kind)),!e.isBinaryExpression(i)||56!==i.operatorToken.kind&&55!==i.operatorToken.kind||vx(i,e.Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses,e.tokenToString(i.operatorToken.kind),e.tokenToString(n.kind)))}(t),Ty(t.left,t.operatorToken,t.right,r,t))}function Ty(t,r,n,i,o){var s,c=r.kind;if(62===c&&(192===t.kind||191===t.kind))return xy(t,zy(n,i),i,103===n.kind);s=55===c||56===c||60===c?Yh(t,i):zy(t,i);var u=zy(n,i);switch(c){case 41:case 42:case 65:case 66:case 43:case 67:case 44:case 68:case 40:case 64:case 47:case 69:case 48:case 70:case 49:case 71:case 51:case 73:case 52:case 74:case 50:case 72:if(s===je||u===je)return je;s=gm(s,t),u=gm(u,n);var l=void 0;if(528&s.flags&&528&u.flags&&void 0!==(l=function(e){switch(e){case 51:case 73:return 56;case 52:case 74:return 37;case 50:case 72:return 55;default:return}}(r.kind)))return Xr(o||r,e.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,e.tokenToString(r.kind),e.tokenToString(l)),Ae;var _,d=sy(t,s,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),p=sy(n,u,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0);if(my(s,3)&&my(u,3)||!fy(s,2112)&&!fy(u,2112))_=Ae;else if(g(s,u)){switch(c){case 49:case 71:b()}_=Fe}else b(g),_=xe;return d&&p&&h(_),_;case 39:case 63:if(s===je||u===je)return je;my(s,132)||my(u,132)||(s=gm(s,t),u=gm(u,n));var f=void 0;if(my(s,296,!0)&&my(u,296,!0)?f=Ae:my(s,2112,!0)&&my(u,2112,!0)?f=Fe:my(s,132,!0)||my(u,132,!0)?f=Ne:(Qi(s)||Qi(u))&&(f=s===xe||u===xe?xe:he),f&&!y(c))return f;if(!f){return b((function(e,t){return my(e,2543)&&my(t,2543)})),he}return 63===c&&h(f),f;case 29:case 31:case 32:case 33:return y(c)&&(s=k_(gm(s,t)),u=k_(gm(u,n)),v((function(e,t){return wl(e,t)||wl(t,e)||Fl(e,We)&&Fl(t,We)}))),Me;case 34:case 35:case 36:case 37:return v((function(e,t){return Dy(e,t)||Dy(t,e)})),Me;case 97:return function(t,r,n,i){return n===je||i===je?je:(!Qi(n)&&gy(n,131068)&&Xr(t,e.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Qi(i)||mb(i)||Al(i,ut)||Xr(r,e.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type),Me)}(t,n,s,u);case 96:return function(t,r,n,i){return n===je||i===je?je:(n=gm(n,t),i=gm(i,r),wl(n,Ne)||my(n,12584)||Xr(t,e.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol),gy(i,126091264)||Xr(r,e.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Me)}(t,n,s,u);case 55:return 4194304&Gd(s)?Qc([j_(V?s:k_(u)),u]):s;case 56:return 8388608&Gd(s)?Qc([B_(s),u],2):s;case 60:return 262144&Gd(s)?Qc([U_(s),u],2):s;case 62:var m=e.isBinaryExpression(t.parent)?e.getAssignmentDeclarationKind(t.parent):0;return function(t,r){if(2===t)for(var n=0,i=$o(r);n<i.length;n++){var a=i[n],o=wa(a);if(o.symbol&&32&o.symbol.flags){var s=a.escapedName,c=gn(a.valueDeclaration,s,788968,void 0,s,!1);if(c&&c.declarations.some(e.isJSDocTypedefTag))return vx(c.declarations[0],e.Diagnostics.Duplicate_identifier_0,e.unescapeLeadingUnderscores(s)),vx(a.valueDeclaration,e.Diagnostics.Duplicate_identifier_0,e.unescapeLeadingUnderscores(s))}}}(m,u),function(r){switch(r){case 2:return!0;case 1:case 5:case 6:case 3:case 4:var i=ri(t),a=e.getAssignedExpandoInitializer(n);return a&&e.isObjectLiteralExpression(a)&&i&&e.hasEntries(i.exports);default:return!1}}(m)?(524288&u.flags&&(2===m||6===m||Wl(u)||Wd(u)||1&e.getObjectFlags(u))||h(u),s):(h(u),Q_(u));case 27:return K.allowUnreachableCode||!function t(r){switch((r=e.skipParentheses(r)).kind){case 75:case 10:case 13:case 197:case 210:case 14:case 8:case 9:case 105:case 90:case 99:case 145:case 200:case 213:case 201:case 191:case 192:case 203:case 217:case 265:case 264:return!0;case 209:return t(r.whenTrue)&&t(r.whenFalse);case 208:return!e.isAssignmentOperator(r.operatorToken.kind)&&(t(r.left)&&t(r.right));case 206:case 207:switch(r.operator){case 53:case 39:case 40:case 54:return!0}return!1;case 204:case 198:case 216:default:return!1}}(t)||function(e){return 75===e.kind&&"eval"===e.escapedText}(n)||Xr(t,e.Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects),u;default:return e.Debug.fail()}function g(e,t){return my(e,2112)&&my(t,2112)}function y(r){var i=fy(s,12288)?t:fy(u,12288)?n:void 0;return!i||(Xr(i,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(r)),!1)}function h(r){a&&e.isAssignmentOperator(c)&&(!dy(t,e.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,e.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)||e.isIdentifier(t)&&"exports"===e.unescapeLeadingUnderscores(t.escapedText)||Ml(r,s,t,n))}function v(e){return!e(s,u)&&(b(e),!0)}function b(t){var n,i=!1,a=o||r;if(t){var c=dh(s),l=dh(u);i=!(c===s&&l===u)&&!(!c||!l)&&t(c,l)}var _=s,d=u;!i&&t&&(n=function(e,t,r){var n=e,i=t,a=k_(e),o=k_(t);r(a,o)||(n=a,i=o);return[n,i]}(s,u,t),_=n[0],d=n[1]);var p=Oi(_,d),f=p[0],m=p[1];(function(t,n,i,a){var o;switch(r.kind){case 36:case 34:o="false";break;case 37:case 35:o="true"}if(o)return Zr(t,n,e.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap,o,i,a);return})(a,i,f,m)||Zr(a,i,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2,e.tokenToString(r.kind),f,m)}}function Ey(t){a&&(8192&t.flags&&!function(t){for(var r=t,n=t.parent;n;){if(e.isFunctionLike(n)&&r===n.body)return!1;if(e.isClassLike(r))return!0;r=n,n=n.parent}return!1}(t)||yx(t,e.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body),af(t)&&Xr(t,e.Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer));var r=e.getContainingFunction(t);if(!r)return he;var n=e.getFunctionFlags(r);if(!(1&n))return he;var i=0!=(2&n);t.asteriskToken&&(i&&J<99&&Gb(t,53248),!i&&J<2&&K.downlevelIteration&&Gb(t,256));var o=Us(r),s=o&&xv(o,i),c=s&&s.yieldType||he,u=s&&s.nextType||he,l=i?dh(u)||he:u,_=t.expression?zy(t.expression):Te,d=$g(t,_,l,i);return o&&d&&Ml(d,c,t.expression||t,t.expression),t.asteriskToken?tv(i?19:17,1,_,t.expression)||he:o?bv(2,o,i)||he:of(2,r)||he}function Cy(t,r,n,i){var a=function(t){return 272!==t.kind||e.isJsxSelfClosingElement(t.parent)?t:t.parent.parent}(t),o=a.contextualType,s=a.inferenceContext;a.contextualType=r,a.inferenceContext=n;var c=zy(t,1|i|(n?2:0)),u=fy(c,2944)&&Fy(c,vf(r,t))?Vu(c):c;return a.contextualType=o,a.inferenceContext=s,u}function ky(e,t){var r=dn(e);if(!r.resolvedType){if(t&&0!==t)return zy(e,t);var n=dr;dr=pr,r.resolvedType=zy(e,t),dr=n}return r.resolvedType}function Ny(t){return 198===(t=e.skipParentheses(t)).kind||216===t.kind}function Ay(t){var r=e.getEffectiveInitializer(t),n=Ky(r,!0),i=e.isParameter(t)&&189===t.name.kind&&w_(n)&&!n.target.hasRestElement&&dc(n)<t.name.elements.length?function(t,r){for(var n=r.elements,i=dc(t),a=i?_c(t).slice():[],o=i;o<n.length;o++){var s=n[o];(o<n.length-1||190!==s.kind||!s.dotDotDotToken)&&(a.push(!e.isOmittedExpression(s)&&Af(s)?ma(s,!1,!1):he),e.isOmittedExpression(s)||Af(s)||id(s,he))}return Uc(a,t.target.minLength,!1,t.target.readonly)}(n,t.name):n,a=2&e.getCombinedNodeFlags(t)||e.isDeclarationReadonly(t)||Ny(r)||Fy(i,xf(r))?i:N_(i);if(e.isInJSFile(t)){if(98304&a.flags)return id(t,he),he;if(x_(a))return id(t,vt),vt}return a}function Fy(t,r){if(r){if(3145728&r.flags){var n=r.types;return e.some(n,(function(e){return Fy(t,e)}))}if(58982400&r.flags){var i=cs(r)||De;return fy(i,4)&&fy(t,128)||fy(i,8)&&fy(t,256)||fy(i,64)&&fy(t,2048)||fy(i,4096)&&fy(t,8192)||Fy(t,i)}return!!(4194432&r.flags&&fy(t,128)||256&r.flags&&fy(t,256)||2048&r.flags&&fy(t,2048)||512&r.flags&&fy(t,512)||8192&r.flags&&fy(t,8192))}return!1}function Py(t){var r=t.parent;return e.isAssertionExpression(r)&&e.isConstTypeReference(r.type)||(e.isParenthesizedExpression(r)||e.isArrayLiteralExpression(r)||e.isSpreadElement(r))&&Py(r)||(e.isPropertyAssignment(r)||e.isShorthandPropertyAssignment(r))&&Py(r.parent)}function wy(e,t,r,n){var i=zy(e,t,n);return Py(e)?Vu(i):Ny(e)?i:F_(i,vf(2===arguments.length?xf(e):r,e))}function Iy(e,t){return 153===e.name.kind&&Lf(e.name),wy(e.initializer,t)}function Oy(e,t){return dx(e),153===e.name.kind&&Lf(e.name),My(e,iy(e,t),t)}function My(t,r,n){if(n&&10&n){var i=Gm(r,0,!0),a=Gm(r,1,!0),o=i||a;if(o&&o.typeParameters){var s=hf(t,2);if(s){var c=Gm(U_(s),i?0:1,!1);if(c&&!c.typeParameters){if(8&n)return Ly(t,n),$e;var u=Df(t),l=u.signature&&zs(u.signature),_=l&&Wm(l);if(_&&!_.typeParameters&&!e.every(u.inferences,Ry)){var d=function(t,r){for(var n,i,a=[],o=0,s=r;o<s.length;o++){var c=(p=s[o]).symbol.escapedName;if(By(t.inferredTypeParameters,c)||By(a,c)){var u=fi(en(262144,jy(e.concatenate(t.inferredTypeParameters,a),c)));u.target=p,n=e.append(n,p),i=e.append(i,u),a.push(u)}else a.push(p)}if(i)for(var l=el(n,i),_=0,d=i;_<d.length;_++){var p;(p=d[_]).mapper=l}return a}(u,o.typeParameters),p=Gs(o,d),f=e.map(u.inferences,(function(e){return dd(e.typeParameter)}));if(od(p,c,(function(e,t){Sd(f,e,t,0,!0)})),e.some(f,Ry)&&(sd(p,c,(function(e,t){Sd(f,e,t)})),!function(e,t){for(var r=0;r<e.length;r++)if(Ry(e[r])&&Ry(t[r]))return!0;return!1}(u.inferences,f)))return function(e,t){for(var r=0;r<e.length;r++)!Ry(e[r])&&Ry(t[r])&&(e[r]=t[r])}(u.inferences,f),u.inferredTypeParameters=e.concatenate(u.inferredTypeParameters,d),$s(p)}return $s(Hm(o,c,u))}}}}return r}function Ly(e,t){2&t&&(Df(e).flags|=4)}function Ry(e){return!(!e.candidates&&!e.contraCandidates)}function By(t,r){return e.some(t,(function(e){return e.symbol.escapedName===r}))}function jy(e,t){for(var r=t.length;r>1&&t.charCodeAt(r-1)>=48&&t.charCodeAt(r-1)<=57;)r--;for(var n=t.slice(0,r),i=1;;i++){var a=n+i;if(!By(e,a))return a}}function Ky(t,r){var n=e.skipParentheses(t);if(!e.isCallExpression(n)||101===n.expression.kind||e.isRequireCall(n,!0)||Cg(n)){if(e.isAssertionExpression(n)&&!e.isConstTypeReference(n.type))return Yu(n.type)}else{var i=void 0,a=void 0;if(e.isCallChain(n)){var o=H_(a=zy(n.expression),n.expression);i=a!==o,a=gm(o,n.expression)}else i=!1,a=lm(n.expression);var s=qm(a);if(s&&!s.typeParameters)return G_(zs(s),i)}return r?ky(t):zy(t)}function Jy(e){var t=dn(e);if(t.contextFreeType)return t.contextFreeType;var r=e.contextualType;e.contextualType=he;var n=t.contextFreeType=zy(e,4);return e.contextualType=r,n}function zy(t,r,n){var i=l;l=t,x=0;var s=My(t,function(t,r,n){var i=t.kind;if(o)switch(i){case 213:case 200:case 201:o.throwIfCancellationRequested()}switch(i){case 75:return Up(t);case 103:return Yp(t);case 101:return $p(t);case 99:return ke;case 14:case 10:return Uu(Wu(t.text));case 8:return Dx(t),Uu(Wu(+t.text));case 9:return function(t){if(!(e.isLiteralTypeNode(t.parent)||e.isPrefixUnaryExpression(t.parent)&&e.isLiteralTypeNode(t.parent.parent))&&J<99&&vx(t,e.Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ESNext))return!0}(t),Uu(function(t){return Wu({negative:!1,base10Value:e.parsePseudoBigInt(t.text)})}(t));case 105:return Ie;case 90:return Pe;case 210:return function(t){return e.forEach(t.templateSpans,(function(t){fy(zy(t.expression),12288)&&Xr(t.expression,e.Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String)})),Ne}(t);case 13:return yt;case 191:return Ff(t,r,n);case 192:return jf(t,r);case 193:return hm(t);case 152:return vm(t);case 194:return Om(t);case 195:if(95===t.expression.kind)return kg(t);case 196:return Eg(t,r);case 197:return Fg(t);case 199:return function(t,r){var n=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0;if(n)return Pg(n,n.typeExpression.type,t.expression,r);return zy(t.expression,r)}(t,r);case 213:return function(e){return Pv(e),Yv(e),wa(ri(e))}(t);case 200:case 201:return iy(t,r);case 203:return function(e){return zy(e.expression),zr}(t);case 198:case 216:return function(e){return Pg(e,e.type,e.expression)}(t);case 217:return function(e){return U_(zy(e.expression))}(t);case 218:return wg(t);case 202:return function(t){zy(t.expression);var r=e.skipParentheses(t.expression);if(193!==r.kind&&194!==r.kind)return Xr(r,e.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference),Me;var n=si(dn(r).resolvedSymbol);return n&&uy(n)&&Xr(r,e.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property),Me}(t);case 204:return function(e){return zy(e.expression),Te}(t);case 205:return function(t){if(a){if(!(32768&t.flags)){var r=e.getSourceFileOfNode(t);if(!gx(r)){var n=e.getSpanOfTokenAtPosition(r,t.pos),i=e.createFileDiagnostic(r,n.start,n.length,e.Diagnostics.await_expression_is_only_allowed_within_an_async_function),o=e.getContainingFunction(t);if(o&&161!==o.kind){e.Debug.assert(0==(2&e.getFunctionFlags(o)),"Enclosing function should never be an async function.");var s=e.createDiagnosticForNode(o,e.Diagnostics.Did_you_mean_to_mark_this_function_as_async);e.addRelatedInfo(i,s)}jr.add(i)}}af(t)&&Xr(t,e.Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer)}var c=zy(t.expression),u=_h(c,t,e.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return u!==c||u===xe||3&c.flags||Qr(!1,e.createDiagnosticForNode(t,e.Diagnostics.await_has_no_effect_on_the_type_of_this_expression)),u}(t);case 206:return function(t){var r=zy(t.operand);if(r===je)return je;switch(t.operand.kind){case 8:switch(t.operator){case 40:return Uu(Wu(-t.operand.text));case 39:return Uu(Wu(+t.operand.text))}break;case 9:if(40===t.operator)return Uu(Wu({negative:!0,base10Value:e.parsePseudoBigInt(t.operand.text)}))}switch(t.operator){case 39:case 40:case 54:return gm(r,t.operand),fy(r,12288)&&Xr(t.operand,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(t.operator)),39===t.operator?(fy(r,2112)&&Xr(t.operand,e.Diagnostics.Operator_0_cannot_be_applied_to_type_1,e.tokenToString(t.operator),Ii(k_(r))),Ae):py(r);case 53:Yh(t.operand);var n=12582912&Gd(r);return 4194304===n?Pe:8388608===n?Ie:Me;case 45:case 46:return sy(t.operand,gm(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&dy(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),py(r)}return xe}(t);case 207:return function(t){var r=zy(t.operand);return r===je?je:(sy(t.operand,gm(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&dy(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),py(r))}(t);case 208:return Sy(t,r);case 209:return function(e,t){return Yh(e.condition),Qc([zy(e.whenTrue,t),zy(e.whenFalse,t)],2)}(t,r);case 212:return function(e,t){return J<2&&Gb(e,K.downlevelIteration?1536:2048),Zh(33,zy(e.expression,t),Se,e.expression)}(t,r);case 214:return Te;case 211:return Ey(t);case 219:return t.type;case 274:return am(t,r);case 264:case 265:return function(e,t){return Yv(e),em(e)||he}(t);case 268:return function(t){return rm(t.openingFragment),2===K.jsx&&(K.jsxFactory||e.getSourceFileOfNode(t).pragmas.has("jsx"))&&Xr(t,K.jsxFactory?e.Diagnostics.JSX_fragment_is_not_supported_when_using_jsxFactory:e.Diagnostics.JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma),Vf(t),em(t)||he}(t);case 272:return qf(t,r);case 266:e.Debug.fail("Shouldn't ever directly check a JsxOpeningElement")}return xe}(t,r,n),r);return yy(s)&&function(t,r){193===t.parent.kind&&t.parent.expression===t||194===t.parent.kind&&t.parent.expression===t||(75===t.kind||152===t.kind)&&ob(t)||171===t.parent.kind&&t.parent.exprName===t||261===t.parent.kind||Xr(t,e.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);if(K.isolatedModules){e.Debug.assert(!!(128&r.symbol.flags)),8388608&r.symbol.valueDeclaration.flags&&Xr(t,e.Diagnostics.Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided)}}(t,s),l=i,s}function Uy(t){t.expression&&yx(t.expression,e.Diagnostics.Type_expected),Gv(t.constraint),Gv(t.default);var r=to(ri(t));cs(r),function(e){return ds(e)!==et}(r)||Xr(t.default,e.Diagnostics.Type_parameter_0_has_a_circular_default,Ii(r));var n=ns(r),i=ps(r);n&&i&&Ol(i,Do(gl(n,Zu(r,i)),i),t.default,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1),a&&kv(t.name,e.Diagnostics.Type_parameter_name_cannot_be_0)}function Vy(t){Yb(t),zh(t);var r=e.getContainingFunction(t);e.hasModifier(t,92)&&(161===r.kind&&e.nodeIsPresent(r.body)||Xr(t,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation)),t.questionToken&&e.isBindingPattern(t.name)&&r.body&&Xr(t,e.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),t.name&&e.isIdentifier(t.name)&&("this"===t.name.escapedText||"new"===t.name.escapedText)&&(0!==r.parameters.indexOf(t)&&Xr(t,e.Diagnostics.A_0_parameter_must_be_the_first_parameter,t.name.escapedText),161!==r.kind&&165!==r.kind&&170!==r.kind||Xr(t,e.Diagnostics.A_constructor_cannot_have_a_this_parameter),201===r.kind&&Xr(t,e.Diagnostics.An_arrow_function_cannot_have_a_this_parameter)),!t.dotDotDotToken||e.isBindingPattern(t.name)||Fl(wa(t.symbol),xt)||Xr(t,e.Diagnostics.A_rest_parameter_must_be_of_an_array_type)}function qy(t,r,n){for(var i=0,a=t.elements;i<a.length;i++){var o=a[i];if(!e.isOmittedExpression(o)){var s=o.name;if(75===s.kind&&s.escapedText===n)return Xr(r,e.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((189===s.kind||188===s.kind)&&qy(s,r,n))return!0}}}function Wy(t){166===t.kind?function(t){Yb(t)||function(t){var r=t.parameters[0];if(1!==t.parameters.length)return vx(r?r.name:t,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter);if(r.dotDotDotToken)return vx(r.dotDotDotToken,e.Diagnostics.An_index_signature_cannot_have_a_rest_parameter);if(e.hasModifiers(r))return vx(r.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(r.questionToken)return vx(r.questionToken,e.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark);if(r.initializer)return vx(r.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer);if(!r.type)return vx(r.name,e.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);if(142!==r.type.kind&&139!==r.type.kind){var n=Yu(r.type);return 4&n.flags||8&n.flags?vx(r.name,e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead,e.getTextOfNode(r.name),Ii(n),Ii(t.type?Yu(t.type):he)):1048576&n.flags&&gy(n,384,!0)?vx(r.name,e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead):vx(r.name,e.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number)}if(!t.type)return vx(t,e.Diagnostics.An_index_signature_must_have_a_type_annotation)}(t)}(t):169!==t.kind&&243!==t.kind&&170!==t.kind&&164!==t.kind&&161!==t.kind&&165!==t.kind||ex(t);var r=e.getFunctionFlags(t);if(4&r||(3==(3&r)&&J<99&&Gb(t,12288),2==(3&r)&&J<4&&Gb(t,64),0!=(3&r)&&J<2&&Gb(t,128)),Nv(t.typeParameters),e.forEach(t.parameters,Vy),t.type&&Gv(t.type),a){!function(t){if(J>=2||K.noEmit||!e.hasRestParameter(t)||8388608&t.flags||e.nodeIsMissing(t.body))return;e.forEach(t.parameters,(function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.escapedText===ie.escapedName&&Xr(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)}))}(t);var n=e.getEffectiveReturnTypeNode(t);if(H&&!n)switch(t.kind){case 165:Xr(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 164:Xr(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(n){var i=e.getFunctionFlags(t);if(1==(5&i)){var o=Yu(n);if(o===Re)Xr(n,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var s=bv(0,o,0!=(2&i))||he;Ol(Qg(s,bv(1,o,0!=(2&i))||s,bv(2,o,0!=(2&i))||De,!!(2&i)),o,n)}}else 2==(3&i)&&function(t,r){var n=Yu(r);if(J>=2){if(n===xe)return;var i=Ic(!0);if(i!==Qe&&!Ia(n,i))return void Xr(r,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)}else{if(function(t){fh(t&&e.getEntityNameFromTypeNode(t))}(r),n===xe)return;var a=e.getEntityNameFromTypeNode(r);if(void 0===a)return void Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,Ii(n));var o=Kn(a,111551,!0),s=o?wa(o):xe;if(s===xe)return void(75===a.kind&&"Promise"===a.escapedText&&Oa(n)===Ic(!1)?Xr(r,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)));var c=(_=!0,At||(At=Fc("PromiseConstructorLike",0,_))||Ge);if(c===Ge)return void Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a));if(!Ol(s,c,r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return;var u=a&&e.getFirstIdentifier(a),l=fn(t.locals,u.escapedText,111551);if(l)return void Xr(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(u),e.entityNameToString(a))}var _;_h(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(t,n)}166!==t.kind&&298!==t.kind&&Dh(t)}}function Gy(t){for(var r=e.createMap(),n=0,i=t.members;n<i.length;n++){var a=i[n];if(157===a.kind){var o=void 0,s=a.name;switch(s.kind){case 10:case 8:o=s.text;break;case 75:o=e.idText(s);break;default:continue}r.get(o)?(Xr(e.getNameOfDeclaration(a.symbol.valueDeclaration),e.Diagnostics.Duplicate_identifier_0,o),Xr(a.name,e.Diagnostics.Duplicate_identifier_0,o)):r.set(o,!0)}}}function Hy(t){if(245===t.kind){var r=ri(t);if(r.declarations.length>0&&r.declarations[0]!==t)return}var n=Zs(ri(t));if(n)for(var i=!1,a=!1,o=0,s=n.declarations;o<s.length;o++){var c=s[o];if(1===c.parameters.length&&c.parameters[0].type)switch(c.parameters[0].type.kind){case 142:a?Xr(c,e.Diagnostics.Duplicate_string_index_signature):a=!0;break;case 139:i?Xr(c,e.Diagnostics.Duplicate_number_index_signature):i=!0}}}function Yy(t){Yb(t)||function(t){if(e.isClassLike(t.parent)){if(e.isStringLiteral(t.name)&&"constructor"===t.name.text)return vx(t.name,e.Diagnostics.Classes_may_not_have_a_field_named_constructor);if(_x(t.name,e.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0}else if(245===t.parent.kind){if(_x(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(t.initializer)return vx(t.initializer,e.Diagnostics.An_interface_property_cannot_have_an_initializer)}else if(172===t.parent.kind){if(_x(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(t.initializer)return vx(t.initializer,e.Diagnostics.A_type_literal_property_cannot_have_an_initializer)}8388608&t.flags&&fx(t);if(e.isPropertyDeclaration(t)&&t.exclamationToken&&(!e.isClassLike(t.parent)||!t.type||t.initializer||8388608&t.flags||e.hasModifier(t,160)))return vx(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context)}(t)||ax(t.name),zh(t)}function Xy(t){Wy(t),function(t){var r=e.isInJSFile(t)?e.getJSDocTypeParameterDeclarations(t):void 0,n=t.typeParameters||r&&e.firstOrUndefined(r);if(n){var i=n.pos===n.end?n.pos:e.skipTrivia(e.getSourceFileOfNode(t).text,n.pos);return hx(t,i,n.end-i,e.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration)}}(t)||function(t){var r=e.getEffectiveReturnTypeNode(t);if(r)vx(r,e.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration)}(t),Gv(t.body);var r=ri(t);if(t===e.getDeclarationOfKind(r,t.kind)&&sh(r),!e.nodeIsMissing(t.body)&&a){var n=t.parent;if(e.getClassExtendsHeritageElement(n)){Vp(t.parent,n);var i=Gp(n),o=Wp(t);if(o){if(i&&Xr(o,e.Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),e.some(t.parent.members,(function(t){return 158===t.kind&&!e.hasModifier(t,32)&&!!t.initializer}))||e.some(t.parameters,(function(t){return e.hasModifier(t,92)}))){for(var s=void 0,c=0,u=t.body.statements;c<u.length;c++){var l=u[c];if(225===l.kind&&e.isSuperCall(l.expression)){s=l;break}if(!e.isPrologueDirective(l))break}s||Xr(t,e.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties)}}else i||Xr(t,e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call)}}}function Qy(t){if(a){if(ex(t)||function(t){if(!(8388608&t.flags)){if(J<1)return vx(t.name,e.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);if(void 0===t.body&&!e.hasModifier(t,128))return hx(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(t.body&&e.hasModifier(t,128))return vx(t,e.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);if(t.typeParameters)return vx(t.name,e.Diagnostics.An_accessor_cannot_have_type_parameters);if(!function(e){return lx(e)||e.parameters.length===(162===e.kind?0:1)}(t))return vx(t.name,162===t.kind?e.Diagnostics.A_get_accessor_cannot_have_parameters:e.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);if(163===t.kind){if(t.type)return vx(t.name,e.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);var r=e.Debug.assertDefined(e.getSetAccessorValueParameter(t),"Return value does not match parameter count assertion.");if(r.dotDotDotToken)return vx(r.dotDotDotToken,e.Diagnostics.A_set_accessor_cannot_have_rest_parameter);if(r.questionToken)return vx(r.questionToken,e.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);if(r.initializer)return vx(t.name,e.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(t)||ax(t.name),vh(t),Wy(t),162===t.kind&&!(8388608&t.flags)&&e.nodeIsPresent(t.body)&&256&t.flags&&(512&t.flags||Xr(t.name,e.Diagnostics.A_get_accessor_must_return_a_value)),153===t.name.kind&&Lf(t.name),!go(t)){var r=162===t.kind?163:162,n=e.getDeclarationOfKind(ri(t),r);if(n){var i=e.getModifierFlags(t),o=e.getModifierFlags(n);(28&i)!=(28&o)&&Xr(t.name,e.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility),(128&i)!=(128&o)&&Xr(t.name,e.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract),$y(t,n,Ta,e.Diagnostics.get_and_set_accessor_must_have_the_same_type),$y(t,n,Ea,e.Diagnostics.get_and_set_accessor_must_have_the_same_this_type)}}var s=Ca(ri(t));162===t.kind&&ny(t,s)}Gv(t.body)}function $y(e,t,r,n){var i=r(e),a=r(t);i&&a&&!El(i,a)&&Xr(e,n)}function Zy(t,r){return Ms(e.map(t.typeArguments,Yu),r,Os(r),e.isInJSFile(t))}function eh(t,r){for(var n,i,a=!0,o=0;o<r.length;o++){var s=ns(r[o]);s&&(n||(i=el(r,n=Zy(t,r))),a=a&&Ol(n[o],gl(s,i),t.typeArguments[o],e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1))}return a}function th(t){var r=Tc(t);if(r!==xe){var n=dn(t).resolvedSymbol;if(n)return 524288&n.flags&&_n(n).typeParameters||(4&e.getObjectFlags(r)?r.target.localTypeParameters:void 0)}}function rh(t){tx(t,t.typeArguments),168!==t.kind||void 0===t.typeName.jsdocDotPos||e.isInJSFile(t)||e.isInJSDoc(t)||hx(t,t.typeName.jsdocDotPos,1,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments),e.forEach(t.typeArguments,Gv);var r=Tc(t);if(r!==xe){if(t.typeArguments&&a){var n=th(t);n&&eh(t,n)}32&r.flags&&8&dn(t).resolvedSymbol.flags&&Xr(t,e.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals,Ii(r))}}function nh(t,r){if(!(8388608&t.flags))return t;var n=t.objectType,i=t.indexType;if(Fl(i,lu(n,!1)))return 194===r.kind&&e.isAssignmentTarget(r)&&32&e.getObjectFlags(n)&&1&Go(n)&&Xr(r,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,Ii(n)),t;var a=ms(n);if(Ts(a,1)&&my(i,296))return t;if(gu(n)){var o=pu(i,r);if(o){var s=up(a,(function(e){return vs(e,o)}));if(s&&24&e.getDeclarationModifierFlagsFromSymbol(s))return Xr(r,e.Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,e.unescapeLeadingUnderscores(o)),xe}}return Xr(r,e.Diagnostics.Type_0_cannot_be_used_to_index_type_1,Ii(i),Ii(n)),xe}function ih(t){!function(t){if(146===t.operator){if(143!==t.type.kind)return vx(t.type,e.Diagnostics._0_expected,e.tokenToString(143));var r=e.walkUpParenthesizedTypes(t.parent);switch(r.kind){case 241:var n=r;if(75!==n.name.kind)return vx(t,e.Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!e.isVariableDeclarationInVariableStatement(n))return vx(t,e.Diagnostics.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return vx(r.name,e.Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 158:if(!e.hasModifier(r,32)||!e.hasModifier(r,64))return vx(r.name,e.Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 157:if(!e.hasModifier(r,64))return vx(r.name,e.Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:vx(t,e.Diagnostics.unique_symbol_types_are_not_allowed_here)}}else if(137===t.operator&&173!==t.type.kind&&174!==t.type.kind)yx(t,e.Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,e.tokenToString(143))}(t),Gv(t.type)}function ah(t){return e.hasModifier(t,8)&&!!(8388608&t.flags)}function oh(t,r){var n=e.getCombinedModifierFlags(t);return 245!==t.parent.kind&&244!==t.parent.kind&&213!==t.parent.kind&&8388608&t.flags&&(2&n||e.isModuleBlock(t.parent)&&e.isModuleDeclaration(t.parent.parent)&&e.isGlobalScopeAugmentation(t.parent.parent)||(n|=1),n|=2),n&r}function sh(t){if(a){for(var r,n,i,o=0,s=155,c=!1,u=!0,l=!1,_=t.declarations,d=0!=(16384&t.flags),p=!1,f=!1,m=!1,g=0,y=_;g<y.length;g++){var h=y[g],v=8388608&h.flags,b=245===h.parent.kind||172===h.parent.kind||v;if(b&&(i=void 0),244!==h.kind&&213!==h.kind||v||(m=!0),243===h.kind||160===h.kind||159===h.kind||161===h.kind){var x=oh(h,155);o|=x,s&=x,c=c||e.hasQuestionToken(h),u=u&&e.hasQuestionToken(h),e.nodeIsPresent(h.body)&&r?d?f=!0:p=!0:i&&i.parent===h.parent&&i.end!==h.pos&&N(i),e.nodeIsPresent(h.body)?r||(r=h):l=!0,i=h,b||(n=h)}}if(f&&e.forEach(_,(function(t){Xr(t,e.Diagnostics.Multiple_constructor_implementations_are_not_allowed)})),p&&e.forEach(_,(function(t){Xr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_function_implementation)})),m&&!d&&16&t.flags&&e.forEach(_,(function(r){cn(e.getNameOfDeclaration(r)||r,e.Diagnostics.Duplicate_identifier_0,e.symbolName(t),e.filter(_,(function(e){return e!==r})))})),!n||n.body||e.hasModifier(n,128)||n.questionToken||N(n),l&&(function(t,r,n,i,a){if(0!==(i^a)){var o=oh(k(t,r),n);e.forEach(t,(function(t){var r=oh(t,n)^o;1&r?Xr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported):2&r?Xr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient):24&r?Xr(e.getNameOfDeclaration(t)||t,e.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected):128&r&&Xr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract)}))}}(_,r,155,o,s),function(t,r,n,i){if(n!==i){var a=e.hasQuestionToken(k(t,r));e.forEach(t,(function(t){e.hasQuestionToken(t)!==a&&Xr(e.getNameOfDeclaration(t),e.Diagnostics.Overload_signatures_must_all_be_optional_or_required)}))}}(_,r,c,u),r))for(var D=js(t),S=Ls(r),T=0,E=D;T<E.length;T++){var C=E[T];if(!ql(S,C)){e.addRelatedInfo(Xr(C.declaration,e.Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),e.createDiagnosticForNode(r,e.Diagnostics.The_implementation_signature_is_declared_here));break}}}function k(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}function N(t){if(!t.name||!e.nodeIsMissing(t.name)){var r=!1,n=e.forEachChild(t.parent,(function(e){if(r)return e;r=e===t}));if(n&&n.pos===t.end&&n.kind===t.kind){var i=n.name||n,a=n.name;if(t.name&&a&&(e.isComputedPropertyName(t.name)&&e.isComputedPropertyName(a)||!e.isComputedPropertyName(t.name)&&!e.isComputedPropertyName(a)&&e.getEscapedTextOfIdentifierOrLiteral(t.name)===e.getEscapedTextOfIdentifierOrLiteral(a))){if((160===t.kind||159===t.kind)&&e.hasModifier(t,32)!==e.hasModifier(n,32))Xr(i,e.hasModifier(t,32)?e.Diagnostics.Function_overload_must_be_static:e.Diagnostics.Function_overload_must_not_be_static);return}if(e.nodeIsPresent(n.body))return void Xr(i,e.Diagnostics.Function_implementation_name_must_be_0,e.declarationNameToString(t.name))}var o=t.name||t;d?Xr(o,e.Diagnostics.Constructor_implementation_is_missing):e.hasModifier(t,128)?Xr(o,e.Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive):Xr(o,e.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}}}function ch(t){if(a){var r=t.localSymbol;if((r||(r=ri(t)).exportSymbol)&&e.getDeclarationOfKind(r,t.kind)===t){for(var n=0,i=0,o=0,s=0,c=r.declarations;s<c.length;s++){var u=y(m=c[s]),l=oh(m,513);1&l?512&l?o|=u:n|=u:i|=u}var _=n&i,d=o&(n|i);if(_||d)for(var p=0,f=r.declarations;p<f.length;p++){u=y(m=f[p]);var m,g=e.getNameOfDeclaration(m);u&d?Xr(g,e.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,e.declarationNameToString(g)):u&_&&Xr(g,e.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,e.declarationNameToString(g))}}}function y(t){var r=t;switch(r.kind){case 245:case 246:case 315:case 308:case 309:return 2;case 248:return e.isAmbientModule(r)||0!==e.getModuleInstanceState(r)?5:4;case 244:case 247:return 3;case 288:return 7;case 258:if(!e.isEntityNameExpression(r.expression))return 1;r=r.expression;case 252:case 255:case 254:var n=0,i=Mn(ri(r));return e.forEach(i.declarations,(function(e){n|=y(e)})),n;case 241:case 190:case 243:case 257:return 1;default:return e.Debug.failBadSyntaxKind(r)}}}function uh(e,t,r,n){var i=lh(e,t);return i&&dh(i,t,r,n)}function lh(t,r){if(!Qi(t)){var n=t;if(n.promisedTypeOfPromise)return n.promisedTypeOfPromise;if(Ia(t,Ic(!1)))return n.promisedTypeOfPromise=_c(t)[0];var i=Xi(t,"then");if(!Qi(i)){var a=i?xs(i,0):e.emptyArray;if(0!==a.length){var o=Hd(Qc(e.map(a,Ug)),2097152);if(!Qi(o)){var s=xs(o,0);if(0!==s.length)return n.promisedTypeOfPromise=Qc(e.map(s,Ug),2);r&&Xr(r,e.Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}}else r&&Xr(r,e.Diagnostics.A_promise_must_have_a_then_method)}}}function _h(e,t,r,n){return dh(e,t,r,n)||xe}function dh(t,r,n,i){var a=t;if(a.awaitedTypeOfType)return a.awaitedTypeOfType;if(Qi(t))return a.awaitedTypeOfType=t;if(1048576&t.flags){for(var o=void 0,s=0,c=t.types;s<c.length;s++){var u=c[s];o=e.append(o,dh(u,r,n,i))}if(!o)return;return a.awaitedTypeOfType=Qc(o)}var l=lh(t);if(l){if(t.id===l.id||Br.indexOf(l.id)>=0)return void(r&&Xr(r,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Br.push(t.id);var _=dh(l,r,n,i);if(Br.pop(),!_)return;return a.awaitedTypeOfType=_}var d=Xi(t,"then");if(!(d&&xs(d,0).length>0))return a.awaitedTypeOfType=t;if(r){if(!n)return e.Debug.fail();Xr(r,n,i)}}function ph(t){var r=zs(Dg(t));if(!(1&r.flags)){var n,i,a=yg(t);switch(t.parent.kind){case 244:n=Qc([wa(ri(t.parent)),Re]);break;case 155:n=Re,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 158:n=Re,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 160:case 162:case 163:n=Qc([Bc(ub(t.parent)),Re]);break;default:return e.Debug.fail()}Ol(r,n,t,a,(function(){return i}))}}function fh(t){if(t){var r=e.getFirstIdentifier(t),n=2097152|(75===t.kind?788968:1920),i=gn(r,r.escapedText,n,void 0,void 0,!0);i&&2097152&i.flags&&ci(i)&&!Cb(Mn(i))&&Rn(i)}}function mh(t){var r=gh(t);r&&e.isEntityName(r)&&fh(r)}function gh(e){if(e)switch(e.kind){case 178:case 177:return yh(e.types);case 179:return yh([e.trueType,e.falseType]);case 181:return gh(e.type);case 168:return e.typeName}}function yh(t){for(var r,n=0,i=t;n<i.length;n++){for(var a=i[n];181===a.kind;)a=a.type;if(136!==a.kind&&(V||99!==a.kind&&145!==a.kind)){var o=gh(a);if(!o)return;if(r){if(!e.isIdentifier(r)||!e.isIdentifier(o)||r.escapedText!==o.escapedText)return}else r=o}}return r}function hh(t){var r=e.getEffectiveTypeAnnotationNode(t);return e.isRestParameter(t)?e.getRestParameterElementType(r):r}function vh(t){if(t.decorators&&e.nodeCanBeDecorated(t,t.parent,t.parent.parent)){K.experimentalDecorators||Xr(t,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning);var r=t.decorators[0];if(Gb(r,8),155===t.kind&&Gb(r,32),K.emitDecoratorMetadata)switch(Gb(r,16),t.kind){case 244:var n=e.getFirstConstructorWithBody(t);if(n)for(var i=0,a=n.parameters;i<a.length;i++){mh(hh(a[i]))}break;case 162:case 163:var o=162===t.kind?163:162,s=e.getDeclarationOfKind(ri(t),o);mh(Sa(t)||s&&Sa(s));break;case 160:for(var c=0,u=t.parameters;c<u.length;c++){mh(hh(u[c]))}mh(e.getEffectiveReturnTypeNode(t));break;case 158:mh(e.getEffectiveTypeAnnotationNode(t));break;case 155:mh(hh(t));for(var l=0,_=t.parent.parameters;l<_.length;l++){mh(hh(_[l]))}}e.forEach(t.decorators,ph)}}function bh(e){switch(e.kind){case 75:return e;case 193:return e.name;default:return}}function xh(t){vh(t),Wy(t);var r=e.getFunctionFlags(t);if(t.name&&153===t.name.kind&&Lf(t.name),!go(t)){var n=ri(t),i=t.localSymbol||n,o=e.find(i.declarations,(function(e){return e.kind===t.kind&&!(131072&e.flags)}));t===o&&sh(i),n.parent&&e.getDeclarationOfKind(n,t.kind)===t&&sh(n)}var s=159===t.kind?void 0:t.body;if(Gv(s),ny(t,Us(t)),a&&!e.getEffectiveReturnTypeNode(t)&&(e.nodeIsMissing(s)&&!ah(t)&&id(t,he),1&r&&e.nodeIsPresent(s)&&zs(Ls(t))),e.isInJSFile(t)){var c=e.getJSDocTypeTag(t);c&&c.typeExpression&&!Ef(Yu(c.typeExpression),t)&&Xr(c,e.Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function Dh(t){if(a&&!(8388608&t.flags)){var r=e.getSourceFileOfNode(t),n=_r.get(r.path);n||(n=[],_r.set(r.path,n)),n.push(t)}}function Sh(t,r){for(var n=0,i=t;n<i.length;n++){var a=i[n];switch(a.kind){case 244:case 213:Ch(a,r),Nh(a,r);break;case 288:case 248:case 222:case 250:case 229:case 230:case 231:wh(a,r);break;case 161:case 200:case 243:case 201:case 160:case 162:case 163:a.body&&wh(a,r),Nh(a,r);break;case 159:case 164:case 165:case 169:case 170:case 246:case 245:Nh(a,r);break;case 180:kh(a,r);break;default:e.Debug.assertNever(a,"Node should not have been registered for unused identifiers check")}}}function Th(t,r,n){var i=e.getNameOfDeclaration(t)||t,a=rb(t)?e.Diagnostics._0_is_declared_but_never_used:e.Diagnostics._0_is_declared_but_its_value_is_never_read;n(t,0,e.createDiagnosticForNode(i,a,r))}function Eh(t){return e.isIdentifier(t)&&95===e.idText(t).charCodeAt(0)}function Ch(t,r){for(var n=0,i=t.members;n<i.length;n++){var a=i[n];switch(a.kind){case 160:case 158:case 162:case 163:if(163===a.kind&&32768&a.symbol.flags)break;var o=ri(a);!o.isReferenced&&e.hasModifier(a,8)&&r(a,0,e.createDiagnosticForNode(a.name,e.Diagnostics._0_is_declared_but_its_value_is_never_read,Pi(o)));break;case 161:for(var s=0,c=a.parameters;s<c.length;s++){var u=c[s];!u.symbol.isReferenced&&e.hasModifier(u,8)&&r(u,0,e.createDiagnosticForNode(u.name,e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read,e.symbolName(u.symbol)))}break;case 166:case 221:break;default:e.Debug.fail()}}}function kh(t,r){var n=t.typeParameter;Ah(n)&&r(t,1,e.createDiagnosticForNode(t,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.idText(n.name)))}function Nh(t,r){if(e.last(ri(t).declarations)===t)for(var n=e.getEffectiveTypeParameterDeclarations(t),i=new e.NodeSet,a=0,o=n;a<o.length;a++){var s=o[a];if(Ah(s)){var c=e.idText(s.name),u=s.parent;if(180!==u.kind&&u.typeParameters.every(Ah)){if(i.tryAdd(u)){var l=e.isJSDocTemplateTag(u)?e.rangeOfNode(u):e.rangeOfTypeParameters(u.typeParameters),_=1===n.length,d=_?e.Diagnostics._0_is_declared_but_its_value_is_never_read:e.Diagnostics.All_type_parameters_are_unused,p=_?c:void 0;r(s,1,e.createFileDiagnostic(e.getSourceFileOfNode(u),l.pos,l.end-l.pos,d,p))}}else r(s,1,e.createDiagnosticForNode(s,e.Diagnostics._0_is_declared_but_its_value_is_never_read,c))}}}function Ah(e){return!(262144&ti(e.symbol).isReferenced||Eh(e.name))}function Fh(e,t,r,n){var i=String(n(t)),a=e.get(i);a?a[1].push(r):e.set(i,[t,[r]])}function Ph(t){return e.tryCast(e.getRootDeclaration(t),e.isParameter)}function wh(t,r){if(!(8388608&t.flags)){var n=e.createMap(),i=e.createMap(),a=e.createMap();t.locals.forEach((function(t){var o;if(262144&t.flags?3&t.flags&&!(3&t.isReferenced):!t.isReferenced&&!t.exportSymbol)for(var s=0,c=t.declarations;s<c.length;s++){var u=c[s];if(!(e.isAmbientModule(u)||(e.isVariableDeclaration(u)&&e.isForInOrOfStatement(u.parent.parent)||Oh(u))&&Eh(u.name)))if(Oh(u))Fh(n,254===(o=u).kind?o:255===o.kind?o.parent:o.parent.parent,u,N);else if(e.isBindingElement(u)&&e.isObjectBindingPattern(u.parent)){u!==e.last(u.parent.elements)&&e.last(u.parent.elements).dotDotDotToken||Fh(i,u.parent,u,N)}else if(e.isVariableDeclaration(u))Fh(a,u.parent,u,N);else{var l=t.valueDeclaration&&Ph(t.valueDeclaration),_=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);l&&_?e.isParameterPropertyDeclaration(l,l.parent)||e.parameterIsThisKeyword(l)||Eh(_)||r(l,1,e.createDiagnosticForNode(_,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.symbolName(t))):Th(u,e.symbolName(t),r)}}})),n.forEach((function(t){var n=t[0],i=t[1],a=n.parent;if((n.name?1:0)+(n.namedBindings?255===n.namedBindings.kind?1:n.namedBindings.elements.length:0)===i.length)r(a,0,1===i.length?e.createDiagnosticForNode(a,e.Diagnostics._0_is_declared_but_its_value_is_never_read,e.idText(e.first(i).name)):e.createDiagnosticForNode(a,e.Diagnostics.All_imports_in_import_declaration_are_unused));else for(var o=0,s=i;o<s.length;o++){var c=s[o];Th(c,e.idText(c.name),r)}})),i.forEach((function(t){var n=t[0],i=t[1],o=Ph(n.parent)?1:0;if(n.elements.length===i.length)1===i.length&&241===n.parent.kind&&242===n.parent.parent.kind?Fh(a,n.parent.parent,n.parent,N):r(n,o,1===i.length?e.createDiagnosticForNode(n,e.Diagnostics._0_is_declared_but_its_value_is_never_read,Ih(e.first(i).name)):e.createDiagnosticForNode(n,e.Diagnostics.All_destructured_elements_are_unused));else for(var s=0,c=i;s<c.length;s++){var u=c[s];r(u,o,e.createDiagnosticForNode(u,e.Diagnostics._0_is_declared_but_its_value_is_never_read,Ih(u.name)))}})),a.forEach((function(t){var n=t[0],i=t[1];if(n.declarations.length===i.length)r(n,0,1===i.length?e.createDiagnosticForNode(e.first(i).name,e.Diagnostics._0_is_declared_but_its_value_is_never_read,Ih(e.first(i).name)):e.createDiagnosticForNode(224===n.parent.kind?n.parent:n,e.Diagnostics.All_variables_are_unused));else for(var a=0,o=i;a<o.length;a++){var s=o[a];r(s,0,e.createDiagnosticForNode(s,e.Diagnostics._0_is_declared_but_its_value_is_never_read,Ih(s.name)))}}))}}function Ih(t){switch(t.kind){case 75:return e.idText(t);case 189:case 188:return Ih(e.cast(e.first(t.elements),e.isBindingElement).name);default:return e.Debug.assertNever(t)}}function Oh(e){return 254===e.kind||257===e.kind||255===e.kind}function Mh(t){if(222===t.kind&&xx(t),e.isFunctionOrModuleBlock(t)){var r=mr;e.forEach(t.statements,Gv),mr=r}else e.forEach(t.statements,Gv);t.locals&&Dh(t)}function Lh(t,r,n){if(!r||r.escapedText!==n)return!1;if(158===t.kind||157===t.kind||160===t.kind||159===t.kind||162===t.kind||163===t.kind)return!1;if(8388608&t.flags)return!1;var i=e.getRootDeclaration(t);return 155!==i.kind||!e.nodeIsMissing(i.parent.body)}function Rh(t){e.findAncestor(t,(function(r){return!!(4&wb(r))&&(75!==t.kind?Xr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):Xr(t,e.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0)}))}function Bh(t){e.findAncestor(t,(function(r){return!!(8&wb(r))&&(75!==t.kind?Xr(e.getNameOfDeclaration(t),e.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):Xr(t,e.Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0)}))}function jh(t,r){if(!(z>=e.ModuleKind.ES2015||K.noEmit)&&(Lh(t,r,"require")||Lh(t,r,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Yi(t);288===n.kind&&e.isExternalOrCommonJsModule(n)&&Xr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(r),e.declarationNameToString(r))}}function Kh(t,r){if(!(J>=4||K.noEmit)&&Lh(t,r,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Yi(t);288===n.kind&&e.isExternalOrCommonJsModule(n)&&2048&n.flags&&Xr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(r),e.declarationNameToString(r))}}function Jh(e){return e===ve?he:e===bt?vt:e}function zh(t){if(vh(t),e.isBindingElement(t)||Gv(t.type),t.name){if(153===t.name.kind&&(Lf(t.name),t.initializer&&ky(t.initializer)),190===t.kind){188===t.parent.kind&&J<99&&Gb(t,4),t.propertyName&&153===t.propertyName.kind&&Lf(t.propertyName);var r=t.parent.parent,n=$i(r),i=t.propertyName||t.name;if(n&&!e.isBindingPattern(i)){var a=ou(i);if(_o(a)){var o=vs(n,yo(a));o&&(Fm(o,void 0,!1),cm(r,!!r.initializer&&101===r.initializer.kind,n,o))}}}if(e.isBindingPattern(t.name)&&(189===t.name.kind&&J<2&&K.downlevelIteration&&Gb(t,512),e.forEach(t.name.elements,Gv)),t.initializer&&155===e.getRootDeclaration(t).kind&&e.nodeIsMissing(e.getContainingFunction(t).body))Xr(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);else if(e.isBindingPattern(t.name)){var s=t.initializer&&230!==t.parent.parent.kind,c=0===t.name.elements.length;if(s||c){var u=ha(t);if(s){var l=ky(t.initializer);V&&c?ym(l,t):Ml(l,ha(t),t,t.initializer)}c&&(e.isArrayBindingPattern(t.name)?Zh(65,u,Se,t):V&&ym(u,t))}}else{var _=ri(t),d=Jh(wa(_));if(t===_.valueDeclaration){var p=e.getEffectiveInitializer(t);if(p)e.isInJSFile(t)&&e.isObjectLiteralExpression(p)&&(0===p.properties.length||e.isPrototypeAccess(t.name))&&e.hasEntries(_.exports)||230===t.parent.parent.kind||Ml(ky(p),d,t,p,void 0);_.declarations.length>1&&e.some(_.declarations,(function(r){return r!==t&&e.isVariableLike(r)&&!Vh(r,t)}))&&Xr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}else{var f=Jh(ha(t));d===xe||f===xe||El(d,f)||67108864&_.flags||Uh(_.valueDeclaration,d,t,f),t.initializer&&Ml(ky(t.initializer),f,t,t.initializer,void 0),Vh(t,_.valueDeclaration)||Xr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}158!==t.kind&&157!==t.kind&&(ch(t),241!==t.kind&&190!==t.kind||function(t){if(0==(3&e.getCombinedNodeFlags(t))&&!e.isParameterDeclaration(t)&&(241!==t.kind||t.initializer)){var r=ri(t);if(1&r.flags){if(!e.isIdentifier(t.name))return e.Debug.fail();var n=gn(t,t.name.escapedText,3,void 0,void 0,!1);if(n&&n!==r&&2&n.flags&&3&om(n)){var i=e.getAncestor(n.valueDeclaration,242),a=224===i.parent.kind&&i.parent.parent?i.parent.parent:void 0;if(!(a&&(222===a.kind&&e.isFunctionLike(a.parent)||249===a.kind||248===a.kind||288===a.kind))){var o=Pi(n);Xr(t,e.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,o,o)}}}}}(t),jh(t,t.name),Kh(t,t.name))}}}function Uh(t,r,n,i){var a=e.getNameOfDeclaration(n),o=158===n.kind||157===n.kind?e.Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,s=e.declarationNameToString(a),c=Xr(a,o,s,Ii(r),Ii(i));t&&e.addRelatedInfo(c,e.createDiagnosticForNode(t,e.Diagnostics._0_was_also_declared_here,s))}function Vh(t,r){if(155===t.kind&&241===r.kind||241===t.kind&&155===r.kind)return!0;if(e.hasQuestionToken(t)!==e.hasQuestionToken(r))return!1;return e.getSelectedModifierFlags(t,504)===e.getSelectedModifierFlags(r,504)}function qh(t){return function(t){if(230!==t.parent.parent.kind&&231!==t.parent.parent.kind)if(8388608&t.flags)fx(t);else if(!t.initializer){if(e.isBindingPattern(t.name)&&!e.isBindingPattern(t.parent))return vx(t,e.Diagnostics.A_destructuring_declaration_must_have_an_initializer);if(e.isVarConst(t))return vx(t,e.Diagnostics.const_declarations_must_be_initialized)}if(t.exclamationToken&&(224!==t.parent.parent.kind||!t.type||t.initializer||8388608&t.flags))return vx(t.exclamationToken,e.Diagnostics.Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation);K.module===e.ModuleKind.ES2015||K.module===e.ModuleKind.ESNext||K.module===e.ModuleKind.System||K.noEmit||8388608&t.parent.parent.flags||!e.hasModifier(t.parent.parent,1)||function t(r){if(75===r.kind){if("__esModule"===e.idText(r))return vx(r,e.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else for(var n=r.elements,i=0,a=n;i<a.length;i++){var o=a[i];if(!e.isOmittedExpression(o))return t(o.name)}return!1}(t.name);(e.isLet(t)||e.isVarConst(t))&&function t(r){if(75===r.kind){if(114===r.originalKeywordKind)return vx(r,e.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else for(var n=r.elements,i=0,a=n;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||t(o.name)}return!1}(t.name)}(t),zh(t)}function Wh(t){return function(t){if(t.dotDotDotToken){var r=t.parent.elements;if(t!==e.last(r))return vx(t,e.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);if(Qb(r,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),t.propertyName)return vx(t.name,e.Diagnostics.A_rest_element_cannot_have_a_property_name);if(t.initializer)hx(t,t.initializer.pos-1,1,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}(t),zh(t)}function Gh(t){Yb(t)||mx(t.declarationList)||function(t){if(!function e(t){switch(t.kind){case 226:case 227:case 228:case 235:case 229:case 230:case 231:return!1;case 237:return e(t.parent)}return!0}(t.parent)){if(e.isLet(t.declarationList))return vx(t,e.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);if(e.isVarConst(t.declarationList))vx(t,e.Diagnostics.const_declarations_can_only_be_declared_inside_a_block)}}(t),e.forEach(t.declarationList.declarations,Gv)}function Hh(t){xx(t),function(t,r){if(!V)return;var n=e.isIdentifier(t.expression)?t.expression:e.isPropertyAccessExpression(t.expression)?t.expression.name:void 0;if(!n)return;if(R_(r))return;if(0===xs(r,0).length)return;var i=cb(n);if(!i)return;e.forEachChild(t.thenStatement,(function t(r){if(e.isIdentifier(r)){var n=cb(r);if(n&&n.id===i.id)return!0}return e.forEachChild(r,t)}))||Xr(t.expression,e.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead)}(t,Yh(t.expression)),Gv(t.thenStatement),223===t.thenStatement.kind&&Xr(t.thenStatement,e.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement),Gv(t.elseStatement)}function Yh(t,r){var n=zy(t,r);return 16384&n.flags&&Xr(t,e.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness),n}function Xh(t){ux(t);var r=dm(zy(t.expression));if(242===t.initializer.kind){var n=t.initializer.declarations[0];n&&e.isBindingPattern(n.name)&&Xr(n.name,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),Qh(t)}else{var i=t.initializer,a=zy(i);191===i.kind||192===i.kind?Xr(i,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):Fl(function(e){var t=_u(lu(e));return 131072&t.flags?Ne:t}(r),a)?dy(i,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access):Xr(i,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}r!==Be&&my(r,126091264)||Xr(t.expression,e.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,Ii(r)),Gv(t.statement),t.locals&&Dh(t)}function Qh(e){var t=e.initializer;t.declarations.length>=1&&qh(t.declarations[0])}function $h(e,t){return Zh(t?15:13,lm(e),Se,e)}function Zh(e,t,r,n){return Qi(t)?t:ev(e,t,r,n,!0)||he}function ev(t,r,n,i,a){var o=0!=(2&t);if(r!==Be){var s=J>=2,c=!s&&K.downlevelIteration;if(s||c||o){var u=iv(r,t,s?i:void 0);if(a&&u){var l=8&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&t?e.Diagnostics.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;l&&Ol(n,u.nextType,i,l)}if(u||s)return u&&u.yieldType}var _=r,d=!1,p=!1;if(4&t){if(1048576&_.flags){var f=r.types,m=e.filter(f,(function(e){return!(132&e.flags)}));m!==f&&(_=Qc(m,2))}else 132&_.flags&&(_=Be);if((p=_!==r)&&(J<1&&i&&(Xr(i,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),d=!0),131072&_.flags))return Ne}if(!b_(_)){if(i&&!d){var g=tv(t,0,r,void 0),y=4&t&&!p?c?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:g?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,!0]:c?[e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:g?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type,!0],h=y[0];Zr(i,y[1]&&!!uh(_),h,Ii(_))}return p?Ne:void 0}var v=Es(_,1);return p&&v?132&v.flags?Ne:Qc([v,Ne],2):v}_v(i,r,o)}function tv(e,t,r,n){if(!Qi(r)){var i=iv(r,e,n);return i&&i[O(t)]}}function rv(e,t,r){if(void 0===e&&(e=Be),void 0===t&&(t=Be),void 0===r&&(r=De),67359327&e.flags&&180227&t.flags&&180227&r.flags){var n=oc([e,t,r]),i=nr.get(n);return i||(i={yieldType:e,returnType:t,nextType:r},nr.set(n,i)),i}return{yieldType:e,returnType:t,nextType:r}}function nv(t){for(var r,n,i,a=0,o=t;a<o.length;a++){var s=o[a];if(void 0!==s&&s!==ir){if(s===ar)return ar;r=e.append(r,s.yieldType),n=e.append(n,s.returnType),i=e.append(i,s.nextType)}}return r||n||i?rv(r&&Qc(r),n&&Qc(n),i&&iu(i)):ir}function iv(t,r,n){if(Qi(t))return ar;if(!(1048576&t.flags)){var i=ov(t,r,n);return i===ir?void(n&&_v(n,t,!!(2&r))):i}var a,o=2&r?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",s=t[o];if(s)return s===ir?void 0:s;for(var c=0,u=t.types;c<u.length;c++){var l=ov(u[c],r,n);l===ir?n&&(_v(n,t,!!(2&r)),n=void 0):a=e.append(a,l)}var _=a?nv(a):ir;return t[o]=_,_===ir?void 0:_}function av(e,t){if(e===ir)return ir;if(e===ar)return ar;var r=e.yieldType,n=e.returnType,i=e.nextType;return rv(dh(r,t)||he,dh(n,t)||he,i)}function ov(e,t,r){if(Qi(e))return ar;var n;if(2&t&&(n=sv(e,cr)||uv(e,cr)))return n;if(1&t&&(n=sv(e,ur)||uv(e,ur))){if(!(2&t))return n;if(n!==ir)return e.iterationTypesOfAsyncIterable=av(n,r)}if(2&t&&(n=lv(e,cr,r))!==ir)return n;if(1&t&&(n=lv(e,ur,r))!==ir)return 2&t?e.iterationTypesOfAsyncIterable=n?av(n,r):ir:n;return ir}function sv(e,t){return e[t.iterableCacheKey]}function cv(e,t){var r=sv(e,t)||lv(e,t,void 0);return r===ir?sr:r}function uv(e,t){var r;if(Ia(e,r=t.getGlobalIterableType(!1))||Ia(e,r=t.getGlobalIterableIteratorType(!1))){var n=_c(e)[0],i=cv(r,t),a=i.returnType,o=i.nextType;return e[t.iterableCacheKey]=rv(n,a,o)}if(Ia(e,t.getGlobalGeneratorType(!1))){var s=_c(e);n=s[0],a=s[1],o=s[2];return e[t.iterableCacheKey]=rv(n,a,o)}}function lv(t,r,n){var i=vs(t,e.getPropertyNameForKnownSymbolName(r.iteratorSymbolName)),a=!i||16777216&i.flags?void 0:wa(i);if(Qi(a))return t[r.iterableCacheKey]=ar;var o=a?xs(a,0):void 0;if(!e.some(o))return t[r.iterableCacheKey]=ir;var s=dv(Qc(e.map(o,zs),2),r,n)||ir;return t[r.iterableCacheKey]=s}function _v(t,r,n){var i=n?e.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:e.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;Zr(t,!!uh(r),i,Ii(r))}function dv(e,t,r){if(Qi(e))return ar;var n=pv(e,t)||function(e,t){var r=t.getGlobalIterableIteratorType(!1);if(Ia(e,r)){var n=_c(e)[0],i=pv(r,t)||vv(r,t,void 0),a=i===ir?sr:i,o=a.returnType,s=a.nextType;return e[t.iteratorCacheKey]=rv(n,o,s)}if(Ia(e,t.getGlobalIteratorType(!1))||Ia(e,t.getGlobalGeneratorType(!1))){var c=_c(e);n=c[0],o=c[1],s=c[2];return e[t.iteratorCacheKey]=rv(n,o,s)}}(e,t)||vv(e,t,r);return n===ir?void 0:n}function pv(e,t){return e[t.iteratorCacheKey]}function fv(e,t){var r=Xi(e,"done")||Pe;return Fl(0===t?Pe:Ie,r)}function mv(e){return fv(e,0)}function gv(e){return fv(e,1)}function yv(e){if(Qi(e))return ar;var t,r=e.iterationTypesOfIteratorResult;if(r)return r;if(Ia(e,(t=!1,Ot||(Ot=Fc("IteratorYieldResult",1,t))||Qe))){var n=_c(e)[0];return e.iterationTypesOfIteratorResult=rv(n,void 0,void 0)}if(Ia(e,function(e){return Mt||(Mt=Fc("IteratorReturnResult",1,e))||Qe}(!1))){var i=_c(e)[0];return e.iterationTypesOfIteratorResult=rv(void 0,i,void 0)}var a=_p(e,mv),o=a!==Be?Xi(a,"value"):void 0,s=_p(e,gv),c=s!==Be?Xi(s,"value"):void 0;return e.iterationTypesOfIteratorResult=o||c?rv(o,c||Re,void 0):ir}function hv(t,r,n,i){var a=vs(t,n);if(a||"next"===n){var o=!a||"next"===n&&16777216&a.flags?void 0:"next"===n?wa(a):Hd(wa(a),2097152);if(Qi(o))return"next"===n?ar:or;var s,c,u,l,_,d=o?xs(o,0):e.emptyArray;if(0===d.length){if(i)Xr(i,"next"===n?r.mustHaveANextMethodDiagnostic:r.mustBeAMethodDiagnostic,n);return"next"===n?ar:void 0}for(var p=0,f=d;p<f.length;p++){var m=f[p];"throw"!==n&&e.some(m.parameters)&&(s=e.append(s,Mg(m,0))),c=e.append(c,zs(m))}if("throw"!==n){var g=s?Qc(s):De;if("next"===n)l=g;else if("return"===n){var y=r.resolveIterationType(g,i)||he;u=e.append(u,y)}}var h=c?Qc(c,2):Be,v=yv(r.resolveIterationType(h,i)||he);return v===ir?(i&&Xr(i,r.mustHaveAValueDiagnostic,n),_=he,u=e.append(u,he)):(_=v.yieldType,u=e.append(u,v.returnType)),rv(_,Qc(u),l)}}function vv(e,t,r){var n=nv([hv(e,t,"next",r),hv(e,t,"return",r),hv(e,t,"throw",r)]);return e[t.iteratorCacheKey]=n}function bv(e,t,r){if(!Qi(t)){var n=xv(t,r);return n&&n[O(e)]}}function xv(e,t){if(Qi(e))return ar;var r=t?cr:ur;return iv(e,t?2:1,void 0)||dv(e,r,void 0)}function Dv(t){xx(t)||function(t){var r=t;for(;r;){if(e.isFunctionLike(r))return vx(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(r.kind){case 237:if(t.label&&r.label.escapedText===t.label.escapedText)return!!(232===t.kind&&!e.isIterationStatement(r.statement,!0))&&vx(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);break;case 236:if(233===t.kind&&!t.label)return!1;break;default:if(e.isIterationStatement(r,!1)&&!t.label)return!1}r=r.parent}if(t.label){var n=233===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return vx(t,n)}n=233===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;vx(t,n)}(t)}function Sv(e,t){var r=!!(2&t);return!!(1&t)?bv(1,e,r)||xe:r?lh(e)||xe:e}function Tv(t,r){var n=Sv(r,e.getFunctionFlags(t));return!!n&&fy(n,16387)}function Ev(t){xx(t)||void 0===t.expression&&function(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!gx(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return jr.add(e.createFileDiagnostic(o,e.textSpanEnd(s),0,r,n,i,a)),!0}}(t,e.Diagnostics.Line_break_not_permitted_here),t.expression&&zy(t.expression)}function Cv(t){var r,n=ec(t.symbol,1),i=ec(t.symbol,0),a=Es(t,0),o=Es(t,1);if(a||o){e.forEach($o(t),(function(e){var r=wa(e);p(e,r,t,i,a,0),p(e,r,t,n,o,1)}));var s=t.symbol.valueDeclaration;if(1&e.getObjectFlags(t)&&e.isClassLike(s))for(var c=0,u=s.members;c<u.length;c++){var l=u[c];if(!e.hasModifier(l,32)&&go(l)){var _=ri(l),d=wa(_);p(_,d,t,i,a,0),p(_,d,t,n,o,1)}}}a&&o&&(!(r=n||i)&&2&e.getObjectFlags(t)&&(r=e.forEach(Wa(t),(function(e){return Es(e,0)&&Es(e,1)}))?void 0:t.symbol.declarations[0]));function p(t,r,n,i,a,o){if(a&&!e.isKnownSymbol(t)){var s=t.valueDeclaration,c=s&&e.getNameOfDeclaration(s);if(1!==o||(c?If(c):Mf(t.escapedName))){var u;if(s&&c&&(208===s.kind||153===c.kind||t.parent===n.symbol))u=s;else if(i)u=i;else if(2&e.getObjectFlags(n)){u=e.forEach(Wa(n),(function(e){return Zo(e,t.escapedName)&&Es(e,o)}))?void 0:n.symbol.declarations[0]}if(u&&!Fl(r,a))Xr(u,0===o?e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2:e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2,Pi(t),Ii(r),Ii(a))}}}r&&!Fl(o,a)&&Xr(r,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1,Ii(o),Ii(a))}function kv(e,t){switch(e.escapedText){case"any":case"unknown":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":Xr(e,t,e.escapedText)}}function Nv(t){if(t)for(var r=!1,n=0;n<t.length;n++){var i=t[n];if(Uy(i),a){i.default?(r=!0,Av(i.default,t,n)):r&&Xr(i,e.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);for(var o=0;o<n;o++)t[o].symbol===i.symbol&&Xr(i.name,e.Diagnostics.Duplicate_identifier_0,e.declarationNameToString(i.name))}}}function Av(t,r,n){!function t(i){if(168===i.kind){var a=Tc(i);if(262144&a.flags)for(var o=n;o<r.length;o++)a.symbol===ri(r[o])&&Xr(i,e.Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters)}e.forEachChild(i,t)}(t)}function Fv(t){if(1!==t.declarations.length){var r=_n(t);if(!r.typeParametersChecked){r.typeParametersChecked=!0;var n=function(t){return e.filter(t.declarations,(function(e){return 244===e.kind||245===e.kind}))}(t);if(n.length<=1)return;if(!function(t,r){for(var n=e.length(r),i=Os(r),a=0,o=t;a<o.length;a++){var s=o[a],c=e.getEffectiveTypeParameterDeclarations(s),u=c.length;if(u<i||u>n)return!1;for(var l=0;l<u;l++){var _=c[l],d=r[l];if(_.name.escapedText!==d.symbol.escapedName)return!1;var p=e.getEffectiveConstraintOfTypeParameter(_),f=p&&Yu(p),m=ns(d);if(f&&m&&!El(f,m))return!1;var g=_.default&&Yu(_.default),y=ps(d);if(g&&y&&!El(g,y))return!1}}return!0}(n,ro(t).localTypeParameters))for(var i=Pi(t),a=0,o=n;a<o.length;a++){Xr(o[a].name,e.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters,i)}}}}function Pv(t){!function(t){var r=e.getSourceFileOfNode(t);(function(t){var r=!1,n=!1;if(!Yb(t)&&t.heritageClauses)for(var i=0,a=t.heritageClauses;i<a.length;i++){var o=a[i];if(89===o.token){if(r)return yx(o,e.Diagnostics.extends_clause_already_seen);if(n)return yx(o,e.Diagnostics.extends_clause_must_precede_implements_clause);if(o.types.length>1)return yx(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);r=!0}else{if(e.Debug.assert(112===o.token),n)return yx(o,e.Diagnostics.implements_clause_already_seen);n=!0}nx(o)}})(t)||$b(t.typeParameters,r)}(t),vh(t),t.name&&(kv(t.name,e.Diagnostics.Class_name_cannot_be_0),jh(t,t.name),Kh(t,t.name),8388608&t.flags||function(t){1===J&&"Object"===t.escapedText&&z!==e.ModuleKind.ES2015&&z!==e.ModuleKind.ESNext&&Xr(t,e.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,e.ModuleKind[z])}(t.name)),Nv(e.getEffectiveTypeParameterDeclarations(t)),ch(t);var r=ri(t),n=ro(r),i=Do(n),o=wa(r);Fv(r),function(t){for(var r=e.createUnderscoreEscapedMap(),n=e.createUnderscoreEscapedMap(),i=0,a=t.members;i<a.length;i++){var o=a[i];if(161===o.kind)for(var s=0,c=o.parameters;s<c.length;s++){var u=c[s];e.isParameterPropertyDeclaration(u,o)&&!e.isBindingPattern(u.name)&&p(r,u.name,u.name.escapedText,3)}else{var l=e.hasModifier(o,32)?n:r,_=o.name,d=_&&e.getPropertyNameForPropertyNameNode(_);if(_&&d)switch(o.kind){case 162:p(l,_,d,1);break;case 163:p(l,_,d,2);break;case 158:p(l,_,d,3);break;case 160:p(l,_,d,8)}}}function p(t,r,n,i){var a=t.get(n);a?8&a?8!==i&&Xr(r,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(r)):a&i?Xr(r,e.Diagnostics.Duplicate_identifier_0,e.getTextOfNode(r)):t.set(n,a|i):t.set(n,i)}}(t),8388608&t.flags||function(t){for(var r=0,n=t.members;r<n.length;r++){var i=n[r],a=i.name;if(e.hasModifier(i,32)&&a){var o=e.getPropertyNameForPropertyNameNode(a);switch(o){case"name":case"length":case"caller":case"arguments":case"prototype":Xr(a,e.Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,o,zi(ri(t)))}}}}(t);var s=e.getEffectiveBaseTypeNode(t);if(s){e.forEach(s.typeArguments,Gv),J<2&&Gb(s.parent,1);var c=e.getClassExtendsHeritageElement(t);c&&c!==s&&zy(c.expression);var u=Wa(n);if(u.length&&a){var l=u[0],_=qa(n),d=ms(_);if(function(t,r){var n=xs(t,1);if(n.length){var i=n[0].declaration;if(i&&e.hasModifier(i,8)){var a=e.getClassLikeDeclarationOfSymbol(t.symbol);ab(r,a)||Xr(r,e.Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,jn(t.symbol))}}}(d,s),Gv(s.expression),e.some(s.typeArguments)){e.forEach(s.typeArguments,Gv);for(var p=0,f=Ua(d,s.typeArguments,s);p<f.length;p++){if(!eh(s,f[p].typeParameters))break}}if(Ol(i,x=Do(l,n.thisType),void 0)?Ol(o,Tl(d),t.name||t,e.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1):wv(t,i,x,e.Diagnostics.Class_0_incorrectly_extends_base_class_1),8650752&_.flags&&!Ka(o)&&Xr(t.name||t,e.Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any),!(d.symbol&&32&d.symbol.flags||8650752&_.flags)){var m=Va(d,s.typeArguments,s);e.forEach(m,(function(e){return!Sg(e.declaration)&&!El(zs(e),l)}))&&Xr(s.expression,e.Diagnostics.Base_constructors_must_all_have_the_same_return_type)}!function(t,r){var n=ts(r);e:for(var i=0,a=n;i<a.length;i++){var o=a[i],s=Iv(o);if(!(4194304&s.flags)){var c=Iv(Zo(t,s.escapedName)),u=e.getDeclarationModifierFlagsFromSymbol(s);if(e.Debug.assert(!!c,"derived should point to something, even if it is the base class' declaration."),c===s){var l=e.getClassLikeDeclarationOfSymbol(t.symbol);if(128&u&&(!l||!e.hasModifier(l,128))){for(var _=0,d=Wa(t);_<d.length;_++){var p=d[_];if(p!==r){var f=Zo(p,s.escapedName),m=f&&Iv(f);if(m&&m!==s)continue e}}213===l.kind?Xr(l,e.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,Pi(o),Ii(r)):Xr(l,e.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,Ii(t),Pi(o),Ii(r))}}else{var g=e.getDeclarationModifierFlagsFromSymbol(c);if(8&u||8&g)continue;var y=void 0,h=98308&s.flags,v=98308&c.flags;if(h&&v){if(!K.useDefineForClassFields||128&u&&!(s.valueDeclaration&&e.isPropertyDeclaration(s.valueDeclaration)&&s.valueDeclaration.initializer)||s.valueDeclaration&&245===s.valueDeclaration.parent.kind||c.valueDeclaration&&e.isBinaryExpression(c.valueDeclaration))continue;if(4!==h&&4===v)y=e.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property;else{if(4!==h||4===v){var b=e.find(c.declarations,(function(e){return 158===e.kind&&!e.initializer}));if(b&&!(33554432&c.flags)&&!(128&u)&&!(128&g)&&!c.declarations.some((function(e){return 8388608&e.flags}))){var x=ui(e.getClassLikeDeclarationOfSymbol(t.symbol)),D=b.name;if(b.exclamationToken||!x||!e.isIdentifier(D)||!V||!Mv(D,t,x)){var S=e.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;Xr(e.getNameOfDeclaration(c.valueDeclaration)||c.valueDeclaration,S,Pi(s),Ii(r))}}continue}y=e.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor}}else if(sm(s)){if(sm(c)||4&c.flags)continue;e.Debug.assert(!!(98304&c.flags)),y=e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else y=98304&s.flags?e.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:e.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;Xr(e.getNameOfDeclaration(c.valueDeclaration)||c.valueDeclaration,y,Ii(r),Pi(s),Ii(t))}}}}(n,l)}}var g=e.getClassImplementsHeritageClauseElements(t);if(g)for(var y=0,h=g;y<h.length;y++){var v=h[y];if(e.isEntityNameExpression(v.expression)||Xr(v.expression,e.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),rh(v),a){var b=Yu(v);if(b!==xe)if(Ga(b)){var x,D=b.symbol&&32&b.symbol.flags?e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:e.Diagnostics.Class_0_incorrectly_implements_interface_1;Ol(i,x=Do(b,n.thisType),void 0)||wv(t,i,x,D)}else Xr(v,e.Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}a&&(Cv(n),Hy(t),function(t){if(!V||!G||8388608&t.flags)return;for(var r=ui(t),n=0,i=t.members;n<i.length;n++){var a=i[n];if(!(2&e.getModifierFlags(a))&&Ov(a)){var o=a.name;if(e.isIdentifier(o)){var s=wa(ri(a));3&s.flags||32768&R_(s)||r&&Mv(o,s,r)||Xr(a.name,e.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,e.declarationNameToString(o))}}}}(t))}function wv(t,r,n,i){for(var a=!1,o=function(t){if(e.hasStaticModifier(t))return"continue";var i=t.name&&cb(t.name)||cb(t);if(i){var o=vs(r,i.escapedName),s=vs(n,i.escapedName);if(o&&s){Ol(wa(o),wa(s),t.name||t,void 0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,Pi(i),Ii(r),Ii(n))}))||(a=!0)}}},s=0,c=t.members;s<c.length;s++){o(c[s])}a||Ol(r,n,t.name||t,i)}function Iv(t){return 1&e.getCheckFlags(t)?t.target:t}function Ov(t){return 158===t.kind&&!e.hasModifier(t,160)&&!t.exclamationToken&&!t.initializer}function Mv(t,r,n){var i=e.createPropertyAccess(e.createThis(),t);return i.expression.parent=i,i.parent=n,i.flowNode=n.returnFlowNode,!(32768&R_(Op(i,r,z_(r))))}function Lv(t){if(Yb(t)||function(t){var r=!1;if(t.heritageClauses)for(var n=0,i=t.heritageClauses;n<i.length;n++){var a=i[n];if(89!==a.token)return e.Debug.assert(112===a.token),yx(a,e.Diagnostics.Interface_declaration_cannot_have_implements_clause);if(r)return yx(a,e.Diagnostics.extends_clause_already_seen);r=!0,nx(a)}}(t),Nv(t.typeParameters),a){kv(t.name,e.Diagnostics.Interface_name_cannot_be_0),ch(t);var r=ri(t);if(Fv(r),t===e.getDeclarationOfKind(r,245)){var n=ro(r),i=Do(n);if(function(t,r){var n=Wa(t);if(n.length<2)return!0;var i=e.createUnderscoreEscapedMap();e.forEach(lo(t).declaredProperties,(function(e){i.set(e.escapedName,{prop:e,containingType:t})}));for(var a=!0,o=0,s=n;o<s.length;o++)for(var c=s[o],u=0,l=ts(Do(c,t.thisType));u<l.length;u++){var _=l[u],d=i.get(_.escapedName);if(d){if(d.containingType!==t&&0===f_(d.prop,_,Cl)){a=!1;var p=Ii(d.containingType),f=Ii(c),m=e.chainDiagnosticMessages(void 0,e.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical,Pi(_),p,f);m=e.chainDiagnosticMessages(m,e.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2,Ii(t),p,f),jr.add(e.createDiagnosticForNodeFromMessageChain(r,m))}}else i.set(_.escapedName,{prop:_,containingType:c})}return a}(n,t.name)){for(var o=0,s=Wa(n);o<s.length;o++){Ol(i,Do(s[o],n.thisType),t.name,e.Diagnostics.Interface_0_incorrectly_extends_interface_1)}Cv(n)}}Gy(t)}e.forEach(e.getInterfaceBaseTypeNodes(t),(function(t){e.isEntityNameExpression(t.expression)||Xr(t.expression,e.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),rh(t)})),e.forEach(t.members,Gv),a&&(Hy(t),Dh(t))}function Rv(e){var t=dn(e);if(!(16384&t.flags)){t.flags|=16384;for(var r=0,n=0,i=e.members;n<i.length;n++){var a=i[n],o=Bv(a,r);dn(a).enumMemberValue=o,r="number"==typeof o?o+1:void 0}}}function Bv(t,r){if(Zi(t.name))Xr(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_enums);else{var n=e.getTextOfPropertyName(t.name);Mf(n)&&!Of(n)&&Xr(t.name,e.Diagnostics.An_enum_member_cannot_have_a_numeric_name)}return t.initializer?function(t){var r=Qa(ri(t.parent)),n=e.isEnumConst(t.parent),i=t.initializer,a=1!==r||Xa(t)?function r(n){switch(n.kind){case 206:var i=r(n.operand);if("number"==typeof i)switch(n.operator){case 39:return i;case 40:return-i;case 54:return~i}break;case 208:var a=r(n.left),s=r(n.right);if("number"==typeof a&&"number"==typeof s)switch(n.operatorToken.kind){case 51:return a|s;case 50:return a&s;case 48:return a>>s;case 49:return a>>>s;case 47:return a<<s;case 52:return a^s;case 41:return a*s;case 43:return a/s;case 39:return a+s;case 40:return a-s;case 44:return a%s;case 42:return Math.pow(a,s)}else if("string"==typeof a&&"string"==typeof s&&39===n.operatorToken.kind)return a+s;break;case 10:case 14:return n.text;case 8:return Dx(n),+n.text;case 199:return r(n.expression);case 75:var c=n;return Of(c.escapedText)?+c.escapedText:e.nodeIsMissing(n)?0:o(n,ri(t.parent),c.escapedText);case 194:case 193:var u=n;if(function t(r){return 75===r.kind||193===r.kind&&t(r.expression)||194===r.kind&&t(r.expression)&&e.isStringLiteralLike(r.argumentExpression)}(u)){var l=Ky(u.expression);if(l.symbol&&384&l.symbol.flags){var _=void 0;return _=193===u.kind?u.name.escapedText:e.escapeLeadingUnderscores(e.cast(u.argumentExpression,e.isLiteralExpression).text),o(n,l.symbol,_)}}}return}(i):void 0;if(void 0!==a)n&&"number"==typeof a&&!isFinite(a)&&Xr(i,isNaN(a)?e.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:e.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);else{if(1===r)return Xr(i,e.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members),0;n?Xr(i,e.Diagnostics.const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values):8388608&t.parent.flags?Xr(i,e.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):Ol(zy(i),ro(ri(t.parent)),i,void 0)}return a;function o(r,n,i){var a=n.exports.get(i);if(a){var o=a.valueDeclaration;if(o!==t)return mn(o,t)?Ib(o):(Xr(r,e.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),0)}}}(t):8388608&t.parent.flags&&!e.isEnumConst(t.parent)&&0===Qa(ri(t.parent))?void 0:void 0!==r?r:void Xr(t.name,e.Diagnostics.Enum_member_must_have_initializer)}function jv(t){if(a){var r=e.isGlobalScopeAugmentation(t),n=8388608&t.flags;r&&!n&&Xr(t.name,e.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);var i=e.isAmbientModule(t);if(Vv(t,i?e.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:e.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module))return;Yb(t)||n||10!==t.name.kind||vx(t.name,e.Diagnostics.Only_ambient_modules_can_use_quoted_names),e.isIdentifier(t.name)&&(jh(t,t.name),Kh(t,t.name)),ch(t);var o=ri(t);if(512&o.flags&&!n&&o.declarations.length>1&&F(t,!!K.preserveConstEnums||!!K.isolatedModules)){var s=function(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r];if((244===i.kind||243===i.kind&&e.nodeIsPresent(i.body))&&!(8388608&i.flags))return i}}(o);s&&(e.getSourceFileOfNode(t)!==e.getSourceFileOfNode(s)?Xr(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):t.pos<s.pos&&Xr(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged));var c=e.getDeclarationOfKind(o,244);c&&(_=t,d=c,p=e.getEnclosingBlockScopeContainer(_),f=e.getEnclosingBlockScopeContainer(d),pn(p)?pn(f):!pn(f)&&p===f)&&(dn(t).flags|=32768)}if(i)if(e.isExternalModuleAugmentation(t)){if((r||33554432&ri(t).flags)&&t.body)for(var u=0,l=t.body.statements;u<l.length;u++){Kv(l[u],r)}}else pn(t.parent)?r?Xr(t.name,e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):e.isExternalModuleNameRelative(e.getTextOfIdentifierOrLiteral(t.name))&&Xr(t.name,e.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name):Xr(t.name,r?e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:e.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}var _,d,p,f;t.body&&(Gv(t.body),e.isGlobalScopeAugmentation(t)||Dh(t))}function Kv(t,r){switch(t.kind){case 224:for(var n=0,i=t.declarationList.declarations;n<i.length;n++){Kv(i[n],r)}break;case 258:case 259:yx(t,e.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 252:case 253:yx(t,e.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 190:case 241:var a=t.name;if(e.isBindingPattern(a)){for(var o=0,s=a.elements;o<s.length;o++){Kv(s[o],r)}break}case 244:case 247:case 243:case 245:case 248:case 246:if(r)return;var c=ri(t);if(c){var u=!(33554432&c.flags);u||(u=!!c.parent&&e.isExternalModuleAugmentation(c.parent.declarations[0]))}}}function Jv(t){var r=e.getExternalModuleName(t);if(!r||e.nodeIsMissing(r))return!1;if(!e.isStringLiteral(r))return Xr(r,e.Diagnostics.String_literal_expected),!1;var n=249===t.parent.kind&&e.isAmbientModule(t.parent.parent);return 288===t.parent.kind||n?!(n&&e.isExternalModuleNameRelative(r.text)&&!ji(t))||(Xr(t,e.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1):(Xr(r,259===t.kind?e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace:e.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module),!1)}function zv(t){var r=ri(t),n=Mn(r);if(!(67108864&r.flags)&&n!==ge){var i=(1160127&(r=ti(r.exportSymbol||r)).flags?111551:0)|(788968&r.flags?788968:0)|(1920&r.flags?1920:0);if(n.flags&i)Xr(t,261===t.kind?e.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0:e.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0,Pi(r));!K.isolatedModules||261!==t.kind||111551&n.flags||8388608&t.flags||Xr(t,e.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided)}}function Uv(e){jh(e,e.name),Kh(e,e.name),zv(e)}function Vv(e,t){var r=288===e.parent.kind||249===e.parent.kind||248===e.parent.kind;return r||yx(e,t),!r}function qv(t){if(zv(t),e.getEmitDeclarations(K)&&Vi(t.propertyName||t.name,!0),!t.parent.parent.moduleSpecifier){var r=t.propertyName||t.name,n=gn(r,r.escapedText,2998271,void 0,void 0,!0);if(n&&(n===te||n===re||pn(Yi(n.declarations[0]))))Xr(r,e.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,e.idText(r));else{Ln(t);var i=n&&(2097152&n.flags?Mn(n):n);(!i||i===ge||111551&i.flags)&&ky(t.propertyName||t.name)}}}function Wv(t){var r=ri(t),n=_n(r);if(!n.exportsChecked){var i=r.exports.get("export=");if(i&&function(t){return e.forEachEntry(t.exports,(function(e,t){return"export="!==t}))}(r)){var a=En(i)||i.valueDeclaration;ji(a)||e.isInJSFile(a)||Xr(a,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}var o=$n(r);o&&o.forEach((function(t,r){var n=t.declarations,i=t.flags;if("__export"!==r&&!(1984&i)){var a=e.countWhere(n,k);if(!(524288&i&&a<=2)&&a>1)for(var o=0,s=n;o<s.length;o++){var c=s[o];P(c)&&jr.add(e.createDiagnosticForNode(c,e.Diagnostics.Cannot_redeclare_exported_variable_0,e.unescapeLeadingUnderscores(r)))}}})),n.exportsChecked=!0}}function Gv(t){if(t){var r=l;l=t,x=0,function(t){e.isInJSFile(t)&&e.forEach(t.jsDoc,(function(t){var r=t.tags;return e.forEach(r,Gv)}));var r=t.kind;if(o)switch(r){case 248:case 244:case 245:case 243:o.throwIfCancellationRequested()}r>=224&&r<=240&&t.flowNode&&!Fp(t.flowNode)&&$r(!1===K.allowUnreachableCode,t,e.Diagnostics.Unreachable_code_detected);switch(r){case 154:return Uy(t);case 155:return Vy(t);case 158:case 157:return Yy(t);case 169:case 170:case 164:case 165:case 166:return Wy(t);case 160:case 159:return function(t){dx(t)||ax(t.name),xh(t),e.hasModifier(t,128)&&160===t.kind&&t.body&&Xr(t,e.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,e.declarationNameToString(t.name))}(t);case 161:return Xy(t);case 162:case 163:return Qy(t);case 168:return rh(t);case 167:return function(t){var r=function(e){switch(e.parent.kind){case 201:case 164:case 243:case 200:case 169:case 160:case 159:var t=e.parent;if(e===t.type)return t}}(t);if(r){var n=Ls(r),i=Js(n);if(i){Gv(t.type);var a=t.parameterName;if(0===i.kind||2===i.kind)Hu(a);else if(i.parameterIndex>=0){if(M(n)&&i.parameterIndex===n.parameters.length-1)Xr(a,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);else if(i.type){Ol(i.type,wa(n.parameters[i.parameterIndex]),t.type,void 0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)}))}}else if(a){for(var o=!1,s=0,c=r.parameters;s<c.length;s++){var u=c[s].name;if(e.isBindingPattern(u)&&qy(u,a,i.parameterName)){o=!0;break}}o||Xr(t.parameterName,e.Diagnostics.Cannot_find_parameter_0,i.parameterName)}}}else Xr(t,e.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods)}(t);case 171:return function(e){Cc(e)}(t);case 172:return function(t){e.forEach(t.members,Gv),a&&(Cv(Ou(t)),Hy(t),Gy(t))}(t);case 173:return function(e){Gv(e.elementType)}(t);case 174:return function(t){for(var r=t.elementTypes,n=!1,i=0;i<r.length;i++){var a=r[i];if(176===a.kind){if(i!==r.length-1){vx(a,e.Diagnostics.A_rest_element_must_be_last_in_a_tuple_type);break}y_(Yu(a.type))||Xr(a,e.Diagnostics.A_rest_element_type_must_be_an_array_type)}else if(175===a.kind)n=!0;else if(n){vx(a,e.Diagnostics.A_required_element_cannot_follow_an_optional_element);break}}e.forEach(t.elementTypes,Gv)}(t);case 177:case 178:return function(t){e.forEach(t.types,Gv)}(t);case 181:case 175:case 176:return Gv(t.type);case 182:return function(e){Hu(e)}(t);case 183:return ih(t);case 179:return function(t){e.forEachChild(t,Gv)}(t);case 180:return function(t){e.findAncestor(t,(function(e){return e.parent&&179===e.parent.kind&&e.parent.extendsType===e}))||vx(t,e.Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),Gv(t.typeParameter),Dh(t)}(t);case 187:return function(e){Gv(e.argument),Yu(e)}(t);case 305:return function(t){var r=e.getJSDocHost(t);if(e.isClassDeclaration(r)||e.isClassExpression(r)){var n=e.getJSDocTags(r).filter(e.isJSDocAugmentsTag);e.Debug.assert(n.length>0),n.length>1&&Xr(n[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=bh(t.class.expression),a=e.getClassExtendsHeritageElement(r);if(a){var o=bh(a.expression);o&&i.escapedText!==o.escapedText&&Xr(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else Xr(r,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 315:case 308:case 309:return function(t){t.typeExpression||Xr(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&kv(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),Gv(t.typeExpression)}(t);case 314:return function(e){Gv(e.constraint);for(var t=0,r=e.typeParameters;t<r.length;t++){Gv(r[t])}}(t);case 313:return function(e){Gv(e.typeExpression)}(t);case 310:return function(t){if(Gv(t.typeExpression),!e.getParameterSymbolFromJSDoc(t)){var r=e.getHostSignatureFromJSDoc(t);if(r){var n=e.getJSDocTags(r).filter(e.isJSDocParameterTag).indexOf(t);if(n>-1&&n<r.parameters.length&&e.isBindingPattern(r.parameters[n].name))return;Bs(r)?e.findLast(e.getJSDocTags(r),e.isJSDocParameterTag)===t&&t.typeExpression&&t.typeExpression.type&&!y_(Yu(t.typeExpression.type))&&Xr(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,e.idText(152===t.name.kind?t.name.right:t.name)):e.isQualifiedName(t.name)?Xr(t.name,e.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,e.entityNameToString(t.name),e.entityNameToString(t.name.left)):Xr(t.name,e.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,e.idText(t.name))}}}(t);case 298:!function(t){!a||t.type||e.isJSDocConstructSignature(t)||id(t,he),Wy(t)}(t);case 296:case 295:case 293:case 294:case 302:return Hv(t),void e.forEachChild(t,Gv);case 299:return void function(t){Hv(t),Gv(t.type);var r=t.parent;if(e.isParameter(r)&&e.isJSDocFunctionType(r.parent))return void(e.last(r.parent.parameters)!==r&&Xr(t,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list));e.isJSDocTypeExpression(r)||Xr(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);var n=t.parent.parent;if(!e.isJSDocParameterTag(n))return void Xr(t,e.Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);var i=e.getParameterSymbolFromJSDoc(n);if(!i)return;var a=e.getHostSignatureFromJSDoc(n);a&&e.last(a.parameters).symbol===i||Xr(t,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list)}(t);case 292:return Gv(t.type);case 184:return function(e){Gv(e.objectType),Gv(e.indexType),nh(Eu(e),e)}(t);case 185:return function(t){Gv(t.typeParameter),Gv(t.type),t.type||id(t,he),Ol(zo(Cu(t)),qe,e.getEffectiveConstraintOfTypeParameter(t.typeParameter))}(t);case 243:return function(e){a&&(xh(e),ox(e),jh(e,e.name),Kh(e,e.name))}(t);case 222:case 249:return Mh(t);case 224:return Gh(t);case 225:return function(e){xx(e),zy(e.expression)}(t);case 226:return Hh(t);case 227:return function(e){xx(e),Gv(e.statement),Yh(e.expression)}(t);case 228:return function(e){xx(e),Yh(e.expression),Gv(e.statement)}(t);case 229:return function(t){xx(t)||t.initializer&&242===t.initializer.kind&&mx(t.initializer),t.initializer&&(242===t.initializer.kind?e.forEach(t.initializer.declarations,qh):zy(t.initializer)),t.condition&&Yh(t.condition),t.incrementor&&zy(t.incrementor),Gv(t.statement),t.locals&&Dh(t)}(t);case 230:return Xh(t);case 231:return function(t){if(ux(t),t.awaitModifier?2==(6&e.getFunctionFlags(e.getContainingFunction(t)))&&J<99&&Gb(t,32768):K.downlevelIteration&&J<2&&Gb(t,256),242===t.initializer.kind)Qh(t);else{var r=t.initializer,n=$h(t.expression,t.awaitModifier);if(191===r.kind||192===r.kind)xy(r,n||xe);else{var i=zy(r);dy(r,e.Diagnostics.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access,e.Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access),n&&Ml(n,i,r,t.expression)}}Gv(t.statement),t.locals&&Dh(t)}(t);case 232:case 233:return Dv(t);case 234:return function(t){if(!xx(t)){var r=e.getContainingFunction(t);if(r){var n=zs(Ls(r)),i=e.getFunctionFlags(r);if(V||t.expression||131072&n.flags){var a=t.expression?ky(t.expression):Se;if(163===r.kind)t.expression&&Xr(t,e.Diagnostics.Setters_cannot_return_a_value);else if(161===r.kind)t.expression&&!Ml(a,n,t,t.expression)&&Xr(t,e.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(Us(r)){var o=Sv(n,i),s=2&i?_h(a,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):a;o&&Ml(s,o,t,t.expression)}}else 161!==r.kind&&K.noImplicitReturns&&!Tv(r,n)&&Xr(t,e.Diagnostics.Not_all_code_paths_return_a_value)}else yx(t,e.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body)}}(t);case 235:return function(t){xx(t)||32768&t.flags&&yx(t,e.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block),zy(t.expression);var r=e.getSourceFileOfNode(t);if(!gx(r)){var n=e.getSpanOfTokenAtPosition(r,t.pos).start;hx(r,n,t.statement.pos-n,e.Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any)}}(t);case 236:return function(t){var r;xx(t);var n=!1,i=zy(t.expression),o=C_(i);e.forEach(t.caseBlock.clauses,(function(t){if(276!==t.kind||n||(void 0===r?r=t:(vx(t,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0)),a&&275===t.kind){var s=zy(t.expression),c=C_(s),u=i;c&&o||(s=c?k_(s):s,u=k_(i)),Dy(u,s)||Ul(s,u,t.expression,void 0)}e.forEach(t.statements,Gv),K.noFallthroughCasesInSwitch&&t.fallthroughFlowNode&&Fp(t.fallthroughFlowNode)&&Xr(t,e.Diagnostics.Fallthrough_case_in_switch)})),t.caseBlock.locals&&Dh(t.caseBlock)}(t);case 237:return function(t){xx(t)||e.findAncestor(t.parent,(function(r){return e.isFunctionLike(r)?"quit":237===r.kind&&r.label.escapedText===t.label.escapedText&&(vx(t.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNode(t.label)),!0)})),Gv(t.statement)}(t);case 238:return Ev(t);case 239:return function(t){xx(t),Mh(t.tryBlock);var r=t.catchClause;if(r){if(r.variableDeclaration)if(r.variableDeclaration.type)yx(r.variableDeclaration.type,e.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);else if(r.variableDeclaration.initializer)yx(r.variableDeclaration.initializer,e.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);else{var n=r.block.locals;n&&e.forEachKey(r.locals,(function(t){var r=n.get(t);r&&0!=(2&r.flags)&&vx(r.valueDeclaration,e.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause,t)}))}Mh(r.block)}t.finallyBlock&&Mh(t.finallyBlock)}(t);case 241:return qh(t);case 190:return Wh(t);case 244:return function(t){t.name||e.hasModifier(t,512)||yx(t,e.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name),Pv(t),e.forEach(t.members,Gv),Dh(t)}(t);case 245:return Lv(t);case 246:return function(t){Yb(t),kv(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),Nv(t.typeParameters),Gv(t.type),Dh(t)}(t);case 247:return function(t){if(a){Yb(t),kv(t.name,e.Diagnostics.Enum_name_cannot_be_0),jh(t,t.name),Kh(t,t.name),ch(t),Rv(t);var r=ri(t);if(t===e.getDeclarationOfKind(r,t.kind)){if(r.declarations.length>1){var n=e.isEnumConst(t);e.forEach(r.declarations,(function(t){e.isEnumDeclaration(t)&&e.isEnumConst(t)!==n&&Xr(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)}))}var i=!1;e.forEach(r.declarations,(function(t){if(247!==t.kind)return!1;var r=t;if(!r.members.length)return!1;var n=r.members[0];n.initializer||(i?Xr(n.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):i=!0)}))}}}(t);case 248:return jv(t);case 253:return function(t){if(!Vv(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_import_declaration_cannot_have_modifiers),Jv(t))){var r=t.importClause;if(r)if(r.name&&Uv(r),r.namedBindings)if(255===r.namedBindings.kind)Uv(r.namedBindings);else zn(t,t.moduleSpecifier)&&e.forEach(r.namedBindings.elements,Uv)}}(t);case 252:return function(t){if(!Vv(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(Yb(t),e.isInternalModuleImportEqualsDeclaration(t)||Jv(t)))if(Uv(t),e.hasModifier(t,1)&&Ln(t),263!==t.moduleReference.kind){var r=Mn(ri(t));if(r!==ge){if(111551&r.flags){var n=e.getFirstIdentifier(t.moduleReference);1920&Kn(n,112575).flags||Xr(n,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(n))}788968&r.flags&&kv(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else z>=e.ModuleKind.ES2015&&!(8388608&t.flags)&&vx(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 259:return function(t){if(!Vv(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||Jv(t)))if(t.exportClause){e.forEach(t.exportClause.elements,qv);var r=249===t.parent.kind&&e.isAmbientModule(t.parent.parent),n=!r&&249===t.parent.kind&&!t.moduleSpecifier&&8388608&t.flags;288===t.parent.kind||r||n||Xr(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var i=zn(t,t.moduleSpecifier);i&&Hn(i)&&Xr(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Pi(i)),z!==e.ModuleKind.System&&z!==e.ModuleKind.ES2015&&z!==e.ModuleKind.ESNext&&Gb(t,65536)}}(t);case 258:return function(t){if(!Vv(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var r=288===t.parent.kind?t.parent:t.parent.parent;if(248!==r.kind||e.isAmbientModule(r)){if(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),75===t.expression.kind){var n=t.expression,i=Kn(n,67108863,!0,!0,t);if(i){zp(i,n);var a=2097152&i.flags?Mn(i):i;(a===ge||111551&a.flags)&&ky(t.expression)}e.getEmitDeclarations(K)&&Vi(t.expression,!0)}else ky(t.expression);Wv(r),8388608&t.flags&&!e.isEntityNameExpression(t.expression)&&vx(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||8388608&t.flags||(z>=e.ModuleKind.ES2015?vx(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):z===e.ModuleKind.System&&vx(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))}else t.isExportEquals?Xr(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace):Xr(t,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 223:case 240:return void xx(t);case 262:(function(e){vh(e)})(t)}}(t),l=r}}function Hv(t){e.isInJSFile(t)||vx(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function Yv(t){var r=dn(e.getSourceFileOfNode(t));if(!(1&r.flags)){r.deferredNodes=r.deferredNodes||e.createMap();var n=""+N(t);r.deferredNodes.set(n,t)}}function Xv(t){var r=l;switch(l=t,x=0,t.kind){case 200:case 201:case 160:case 159:!function(t){e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t));var r=e.getFunctionFlags(t),n=Us(t);if(ny(t,n),t.body)if(e.getEffectiveReturnTypeNode(t)||zs(Ls(t)),222===t.body.kind)Gv(t.body);else{var i=zy(t.body),a=oy(n,r);if(a)if(2==(3&r))Ml(_h(i,t.body,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),a,t.body,t.body);else Ml(i,a,t.body,t.body)}}(t);break;case 162:case 163:Qy(t);break;case 213:!function(t){e.forEach(t.members,Gv),Dh(t)}(t);break;case 265:!function(e){rm(e)}(t);break;case 264:!function(e){rm(e.openingElement),zf(e.closingElement.tagName)?Gf(e.closingElement):zy(e.closingElement.tagName),Vf(e)}(t)}l=r}function Qv(t){e.performance.mark("beforeCheck"),function(t){var r=dn(t);if(!(1&r.flags)){if(e.skipTypeChecking(t,K,n))return;!function(t){!!(8388608&t.flags)&&function(t){for(var r=0,n=t.statements;r<n.length;r++){var i=n[r];if((e.isDeclaration(i)||224===i.kind)&&bx(i))return!0}}(t)}(t),e.clear(Lr),e.clear(Rr),e.forEach(t.statements,Gv),Gv(t.endOfFileToken),function(e){var t=dn(e);t.deferredNodes&&t.deferredNodes.forEach(Xv)}(t),e.isExternalOrCommonJsModule(t)&&Dh(t),t.isDeclarationFile||!K.noUnusedLocals&&!K.noUnusedParameters||Sh(Zv(t),(function(t,r,n){!e.containsParseError(t)&&$v(r)&&jr.add(n)})),e.isExternalOrCommonJsModule(t)&&Wv(t),Lr.length&&(e.forEach(Lr,Rh),e.clear(Lr)),Rr.length&&(e.forEach(Rr,Bh),e.clear(Rr)),r.flags|=1}}(t),e.performance.mark("afterCheck"),e.performance.measure("Check","beforeCheck","afterCheck")}function $v(t){switch(t){case 0:return!!K.noUnusedLocals;case 1:return!!K.noUnusedParameters;default:return e.Debug.assertNever(t)}}function Zv(t){return _r.get(t.path)||e.emptyArray}function eb(t,r){try{return o=r,function(t){if(tb(),t){var r=jr.getGlobalDiagnostics(),i=r.length;Qv(t);var a=jr.getDiagnostics(t.fileName),o=jr.getGlobalDiagnostics();if(o!==r){var s=e.relativeComplement(r,o,e.compareDiagnostics);return e.concatenate(s,a)}return 0===i&&o.length>0?e.concatenate(o,a):a}return e.forEach(n.getSourceFiles(),Qv),jr.getDiagnostics()}(t)}finally{o=void 0}}function tb(){if(!a)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function rb(e){switch(e.kind){case 154:case 244:case 245:case 246:case 247:return!0;default:return!1}}function nb(e){for(;152===e.parent.kind;)e=e.parent;return 168===e.parent.kind}function ib(t,r){for(var n;(t=e.getContainingClass(t))&&!(n=r(t)););return n}function ab(e,t){return!!ib(e,(function(e){return e===t}))}function ob(e){return void 0!==function(e){for(;152===e.parent.kind;)e=e.parent;return 252===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:258===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function sb(t){if(e.isDeclarationName(t))return ri(t.parent);if(e.isInJSFile(t)&&193===t.parent.kind&&t.parent===t.parent.parent.left){var r=function(t){switch(e.getAssignmentDeclarationKind(t.parent.parent)){case 1:case 3:return ri(t.parent);case 4:case 2:case 5:return ri(t.parent.parent)}}(t);if(r)return r}if(258===t.parent.kind&&e.isEntityNameExpression(t)){var n=Kn(t,2998271,!0);if(n&&n!==ge)return n}else if(!e.isPropertyAccessExpression(t)&&ob(t)){var i=e.getAncestor(t,252);return e.Debug.assert(void 0!==i),Bn(t,!0)}if(!e.isPropertyAccessExpression(t)){var a=function(t){for(var r=t.parent;e.isQualifiedName(r);)t=r,r=r.parent;if(r&&187===r.kind&&r.qualifier===t)return r}(t);if(a){Yu(a);var o=dn(t).resolvedSymbol;return o===ge?void 0:o}}for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;if(function(e){for(;193===e.parent.kind;)e=e.parent;return 215===e.parent.kind}(t)){var s=0;215===t.parent.kind?(s=788968,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(s|=111551)):s=1920,s|=2097152;var c=e.isEntityNameExpression(t)?Kn(t,s):void 0;if(c)return c}if(310===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(154===t.parent.kind&&314===t.parent.parent.kind){e.Debug.assert(!e.isInJSFile(t));var u=e.getTypeParameterFromJsDoc(t.parent);return u&&u.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(75===t.kind){if(e.isJSXTagName(t)&&zf(t)){var l=Gf(t.parent);return l===ge?void 0:l}return Kn(t,111551,!1,!0)}if(193===t.kind||152===t.kind){var _=dn(t);return _.resolvedSymbol?_.resolvedSymbol:(193===t.kind?hm(t):vm(t),_.resolvedSymbol)}}else if(nb(t)){return Kn(t,s=168===t.parent.kind?788968:1920,!1,!0)}return 167===t.parent.kind?Kn(t,1):void 0}function cb(t){if(288===t.kind)return e.isExternalModule(t)?ti(t.symbol):void 0;var r=t.parent,n=r.parent;if(!(16777216&t.flags)){if(w(t)){var i=ri(r);return e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t?Bf(i):i}if(e.isLiteralComputedPropertyDeclarationName(t))return ri(r.parent);if(75===t.kind){if(ob(t))return sb(t);if(190===r.kind&&188===n.kind&&t===r.propertyName){var a=vs(ub(n),t.escapedText);if(a)return a}}switch(t.kind){case 75:case 193:case 152:return sb(t);case 103:var o=e.getThisContainer(t,!1);if(e.isFunctionLike(o)){var s=Ls(o);if(s.thisParameter)return s.thisParameter}if(e.isInExpressionContext(t))return zy(t).symbol;case 182:return Hu(t).symbol;case 101:return zy(t).symbol;case 128:var c=t.parent;return c&&161===c.kind?c.parent.symbol:void 0;case 10:case 14:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(253===t.parent.kind||259===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJSFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent)||e.isLiteralTypeNode(t.parent)&&e.isLiteralImportTypeNode(t.parent.parent)&&t.parent.parent.argument===t.parent)return zn(t,t);if(e.isCallExpression(r)&&e.isBindableObjectDefinePropertyCall(r)&&r.arguments[1]===t)return ri(r);case 8:var u=e.isElementAccessExpression(r)?r.argumentExpression===t?Ky(r.expression):void 0:e.isLiteralTypeNode(r)&&e.isIndexedAccessTypeNode(n)?Yu(n.objectType):void 0;return u&&vs(u,e.escapeLeadingUnderscores(t.text));case 83:case 93:case 38:case 79:return ri(t.parent);case 187:return e.isLiteralImportTypeNode(t)?cb(t.argument.literal):void 0;case 88:return e.isExportAssignment(t.parent)?e.Debug.assertDefined(t.parent.symbol):void 0;default:return}}}function ub(t){if(16777216&t.flags)return xe;var r,n=e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments(t),i=n&&Ha(ri(n.class));if(e.isPartOfTypeNode(t)){var a=Yu(t);return i?Do(a,i.thisType):a}if(e.isExpressionNode(t))return _b(t);if(i&&!n.isImplements){var o=e.firstOrUndefined(Wa(i));return o?Do(o,i.thisType):xe}if(rb(t))return ro(r=ri(t));if(function(e){return 75===e.kind&&rb(e.parent)&&e.parent.name===e}(t))return(r=cb(t))?ro(r):xe;if(e.isDeclaration(t))return wa(r=ri(t));if(w(t))return(r=cb(t))?wa(r):xe;if(e.isBindingPattern(t))return ua(t.parent,!0)||xe;if(ob(t)&&(r=cb(t))){var s=ro(r);return s!==xe?s:wa(r)}return xe}function lb(t){if(e.Debug.assert(192===t.kind||191===t.kind),231===t.parent.kind)return xy(t,$h(t.parent.expression,t.parent.awaitModifier)||xe);if(208===t.parent.kind)return xy(t,Ky(t.parent.right)||xe);if(279===t.parent.kind){var r=e.cast(t.parent.parent,e.isObjectLiteralExpression);return vy(r,lb(r)||xe,e.indexOfNode(r.properties,t.parent))}var n=e.cast(t.parent,e.isArrayLiteralExpression),i=lb(n)||xe,a=Zh(65,i,Se,t.parent)||xe;return by(n,i,n.elements.indexOf(t),a)}function _b(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),Vu(Ky(t))}function db(t){var r=ri(t.parent);return e.hasModifier(t,32)?wa(r):ro(r)}function pb(t){var r=t.name;switch(r.kind){case 75:return Wu(e.idText(r));case 8:case 10:return Wu(r.text);case 153:var n=Lf(r);return my(n,12288)?n:Ne;default:return e.Debug.fail("Unsupported property name.")}}function fb(t){t=ms(t);var r=e.createSymbolTable(ts(t)),n=xs(t,0).length?lt:xs(t,1).length?_t:void 0;return n&&e.forEach(ts(n),(function(e){r.has(e.escapedName)||r.set(e.escapedName,e)})),gi(r)}function mb(t){return e.typeHasCallOrConstructSignatures(t,oe)}function gb(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r)return!(193===r.parent.kind&&r.parent.name===r)&&zb(r)===ie}return!1}function yb(t){var r=zn(t.parent,t);if(!r||e.isShorthandAmbientModuleSymbol(r))return!0;var n=Hn(r),i=_n(r=Wn(r));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=n?!!(111551&r.flags):e.forEachEntry($n(r),(function(e){return(e=On(e))&&!!(111551&e.flags)}))),i.exportsSomeValue}function hb(t,r){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var i=zb(n,function(t){return e.isModuleOrEnumDeclaration(t.parent)&&t===t.parent.name}(n));if(i){if(1048576&i.flags){var a=ti(i.exportSymbol);if(!r&&944&a.flags&&!(3&a.flags))return;i=a}var o=ni(i);if(o){if(512&o.flags&&288===o.valueDeclaration.kind){var s=o.valueDeclaration;return s!==e.getSourceFileOfNode(n)?void 0:s}return e.findAncestor(n.parent,(function(t){return e.isModuleOrEnumDeclaration(t)&&ri(t)===o}))}}}}function vb(t){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(In(n,111551))return En(n)}}function bb(t){if(418&t.flags&&!e.isSourceFile(t.valueDeclaration)){var r=_n(t);if(void 0===r.isDeclarationWithCollidingName){var n=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(n)||function(t){return e.isBindingElement(t.valueDeclaration)&&278===e.walkUpBindingElementsAndPatterns(t.valueDeclaration).parent.kind}(t)){var i=dn(t.valueDeclaration);if(gn(n.parent,t.escapedName,111551,void 0,void 0,!1))r.isDeclarationWithCollidingName=!0;else if(262144&i.flags){var a=524288&i.flags,o=e.isIterationStatement(n,!1),s=222===n.kind&&e.isIterationStatement(n.parent,!1);r.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(n)||a&&(o||s))}else r.isDeclarationWithCollidingName=!1}}return r.isDeclarationWithCollidingName}return!1}function xb(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(n&&bb(n))return n.valueDeclaration}}}function Db(t){var r=e.getParseTreeNode(t,e.isDeclaration);if(r){var n=ri(r);if(n)return bb(n)}return!1}function Sb(t){switch(t.kind){case 252:case 254:case 255:case 257:case 261:return Eb(ri(t)||ge);case 259:var r=t.exportClause;return!!r&&e.some(r.elements,Sb);case 258:return!t.expression||75!==t.expression.kind||Eb(ri(t)||ge)}return!1}function Tb(t){var r=e.getParseTreeNode(t,e.isImportEqualsDeclaration);return!(void 0===r||288!==r.parent.kind||!e.isInternalModuleImportEqualsDeclaration(r))&&(Eb(ri(r))&&r.moduleReference&&!e.nodeIsMissing(r.moduleReference))}function Eb(e){var t=Mn(e);return t===ge||!!(111551&t.flags)&&(K.preserveConstEnums||!Cb(t))}function Cb(e){return hy(e)||!!e.constEnumOnlyModule}function kb(t){if(e.nodeIsPresent(t.body)){if(e.isGetAccessor(t)||e.isSetAccessor(t))return!1;var r=js(ri(t));return r.length>1||1===r.length&&r[0].declaration!==t}return!1}function Nb(t){return!(!V||Ps(t)||e.isJSDocParameterTag(t)||!t.initializer||e.hasModifier(t,92))}function Ab(t){return V&&Ps(t)&&!t.initializer&&e.hasModifier(t,92)}function Fb(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return!1;var n=ri(r);return!!(n&&16&n.flags)&&!!e.forEachEntry(Qn(n),(function(t){return 111551&t.flags&&t.valueDeclaration&&e.isPropertyAccessExpression(t.valueDeclaration)}))}function Pb(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return e.emptyArray;var n=ri(r);return n&&ts(wa(n))||e.emptyArray}function wb(e){return dn(e).flags||0}function Ib(e){return Rv(e.parent),dn(e).enumMemberValue}function Ob(e){switch(e.kind){case 282:case 193:case 194:return!0}return!1}function Mb(t){if(282===t.kind)return Ib(t);var r=dn(t).resolvedSymbol;if(r&&8&r.flags){var n=r.valueDeclaration;if(e.isEnumConst(n.parent))return Ib(n)}}function Lb(e){return!!(524288&e.flags)&&xs(e,0).length>0}function Rb(t,r){var n=e.getParseTreeNode(t,e.isEntityName);if(!n)return e.TypeReferenceSerializationKind.Unknown;if(r&&!(r=e.getParseTreeNode(r)))return e.TypeReferenceSerializationKind.Unknown;var i=Kn(n,111551,!0,!1,r),a=Kn(n,788968,!0,!1,r);if(i&&i===a){var o=Oc(!1);if(o&&i===o)return e.TypeReferenceSerializationKind.Promise;var s=wa(i);if(s&&Ja(s))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!a)return e.TypeReferenceSerializationKind.Unknown;var c=ro(a);return c===xe?e.TypeReferenceSerializationKind.Unknown:3&c.flags?e.TypeReferenceSerializationKind.ObjectType:my(c,245760)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:my(c,528)?e.TypeReferenceSerializationKind.BooleanType:my(c,296)?e.TypeReferenceSerializationKind.NumberLikeType:my(c,2112)?e.TypeReferenceSerializationKind.BigIntLikeType:my(c,132)?e.TypeReferenceSerializationKind.StringLikeType:w_(c)?e.TypeReferenceSerializationKind.ArrayLikeType:my(c,12288)?e.TypeReferenceSerializationKind.ESSymbolType:Lb(c)?e.TypeReferenceSerializationKind.TypeWithCallSignature:y_(c)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function Bb(t,r,n,i,a){var o=e.getParseTreeNode(t,e.isVariableLikeOrAccessor);if(!o)return e.createToken(124);var s=ri(o),c=!s||133120&s.flags?xe:N_(wa(s));return 8192&c.flags&&c.symbol===s&&(n|=1048576),a&&(c=z_(c)),Z.typeToTypeNode(c,r,1024|n,i)}function jb(t,r,n,i){var a=e.getParseTreeNode(t,e.isFunctionLike);if(!a)return e.createToken(124);var o=Ls(a);return Z.typeToTypeNode(zs(o),r,1024|n,i)}function Kb(t,r,n,i){var a=e.getParseTreeNode(t,e.isExpression);if(!a)return e.createToken(124);var o=rd(_b(a));return Z.typeToTypeNode(o,r,1024|n,i)}function Jb(t){return ee.has(e.escapeLeadingUnderscores(t))}function zb(t,r){var n=dn(t).resolvedSymbol;if(n)return n;var i=t;if(r){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=Yi(a))}return gn(i,t.escapedText,3257279,void 0,void 0,!0)}function Ub(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(n)return si(n).valueDeclaration}}}function Vb(t){return!!(e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t))&&qu(wa(ri(t)))}function qb(t,r){return function(t,r,n){return(1024&t.flags?Z.symbolToExpression(t.symbol,111551,r,void 0,n):t===Ie?e.createTrue():t===Pe&&e.createFalse())||e.createLiteral(t.value)}(wa(ri(t)),t,r)}function Wb(t){var r=248===t.kind?e.tryCast(t.name,e.isStringLiteral):e.getExternalModuleName(t),n=Un(r,r,void 0);if(n)return e.getDeclarationOfKind(n,288)}function Gb(t,r){if((s&r)!==r&&K.importHelpers){var n=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(n,K)&&!(8388608&t.flags)){var i=function(t,r){u||(u=Vn(t,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,r)||ge);return u}(n,t);if(i!==ge)for(var a=r&~s,o=1;o<=131072;o<<=1)if(a&o){var c=Hb(o);fn(i.exports,e.escapeLeadingUnderscores(c),111551)||Xr(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,e.externalHelpersModuleNameText,c)}s|=r}}}function Hb(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__spreadArrays";case 4096:return"__await";case 8192:return"__asyncGenerator";case 16384:return"__asyncDelegator";case 32768:return"__asyncValues";case 65536:return"__exportStar";case 131072:return"__makeTemplateObject";default:return e.Debug.fail("Unrecognized helper")}}function Yb(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 160!==t.kind||e.nodeIsPresent(t.body)?yx(t,e.Diagnostics.Decorators_are_not_valid_here):yx(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(162===t.kind||163===t.kind){var r=e.getAllAccessorDeclarations(t.parent.members,t);if(r.firstAccessor.decorators&&t===r.secondAccessor)return yx(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var r,n,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 162:case 163:case 161:case 158:case 157:case 160:case 159:case 166:case 248:case 253:case 252:case 259:case 258:case 200:case 201:case 155:return!1;default:if(249===t.parent.kind||288===t.parent.kind)return!1;switch(t.kind){case 243:return Xb(t,125);case 244:return Xb(t,121);case 245:case 224:case 246:return!0;case 247:return Xb(t,80);default:return e.Debug.fail(),!1}}}(t)?yx(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,c=0,u=t.modifiers;c<u.length;c++){var l=u[c];if(137!==l.kind){if(157===t.kind||159===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_type_member,e.tokenToString(l.kind));if(166===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_an_index_signature,e.tokenToString(l.kind))}switch(l.kind){case 80:if(247!==t.kind)return vx(t,e.Diagnostics.A_class_member_cannot_have_the_0_keyword,e.tokenToString(80));break;case 118:case 117:case 116:var _=Bi(e.modifierToFlag(l.kind));if(28&s)return vx(l,e.Diagnostics.Accessibility_modifier_already_seen);if(32&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"static");if(64&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"readonly");if(256&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"async");if(249===t.parent.kind||288===t.parent.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element,_);if(128&s)return 116===l.kind?vx(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,_,"abstract"):vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,_,"abstract");s|=e.modifierToFlag(l.kind);break;case 119:if(32&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"static");if(64&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"static","readonly");if(256&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"static","async");if(249===t.parent.kind||288===t.parent.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(155===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"static");if(128&s)return vx(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");s|=32,r=l;break;case 137:if(64&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"readonly");if(158!==t.kind&&157!==t.kind&&166!==t.kind&&155!==t.kind)return vx(l,e.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);s|=64,a=l;break;case 88:if(1&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"export");if(2&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","declare");if(128&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","abstract");if(256&s)return vx(l,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","async");if(e.isClassLike(t.parent))return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"export");if(155===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"export");s|=1;break;case 83:var d=288===t.parent.kind?t.parent:t.parent.parent;if(248===d.kind&&!e.isAmbientModule(d))return vx(l,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);s|=512;break;case 129:if(2&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"declare");if(256&s)return vx(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(e.isClassLike(t.parent)&&!e.isPropertyDeclaration(t))return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"declare");if(155===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"declare");if(8388608&t.parent.flags&&249===t.parent.kind)return vx(l,e.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);s|=2,n=l;break;case 121:if(128&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"abstract");if(244!==t.kind){if(160!==t.kind&&158!==t.kind&&162!==t.kind&&163!==t.kind)return vx(l,e.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(244!==t.parent.kind||!e.hasModifier(t.parent,128))return vx(l,e.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);if(32&s)return vx(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(8&s)return vx(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,"private","abstract")}s|=128;break;case 125:if(256&s)return vx(l,e.Diagnostics._0_modifier_already_seen,"async");if(2&s||8388608&t.parent.flags)return vx(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(155===t.kind)return vx(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"async");s|=256,i=l}}if(161===t.kind)return 32&s?vx(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):128&s?vx(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"abstract"):256&s?vx(i,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):!!(64&s)&&vx(a,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"readonly");if((253===t.kind||252===t.kind)&&2&s)return vx(n,e.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare");if(155===t.kind&&92&s&&e.isBindingPattern(t.name))return vx(t,e.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);if(155===t.kind&&92&s&&t.dotDotDotToken)return vx(t,e.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);if(256&s)return function(t,r){switch(t.kind){case 160:case 243:case 200:case 201:return!1}return vx(r,e.Diagnostics._0_modifier_cannot_be_used_here,"async")}(t,i);return!1}(t)}function Xb(e,t){return e.modifiers.length>1||e.modifiers[0].kind!==t}function Qb(t,r){return void 0===r&&(r=e.Diagnostics.Trailing_comma_not_allowed),!(!t||!t.hasTrailingComma)&&hx(t[0],t.end-",".length,",".length,r)}function $b(t,r){if(t&&0===t.length){var n=t.pos-"<".length;return hx(r,n,e.skipTrivia(r.text,t.end)+">".length-n,e.Diagnostics.Type_parameter_list_cannot_be_empty)}return!1}function Zb(r){if(J>=3){var n=r.body&&e.isBlock(r.body)&&e.findUseStrictPrologue(r.body.statements);if(n){var i=(o=r.parameters,e.filter(o,(function(t){return!!t.initializer||e.isBindingPattern(t.name)||e.isRestParameter(t)})));if(e.length(i)){e.forEach(i,(function(t){e.addRelatedInfo(Xr(t,e.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive),e.createDiagnosticForNode(n,e.Diagnostics.use_strict_directive_used_here))}));var a=i.map((function(t,r){return 0===r?e.createDiagnosticForNode(t,e.Diagnostics.Non_simple_parameter_declared_here):e.createDiagnosticForNode(t,e.Diagnostics.and_here)}));return e.addRelatedInfo.apply(void 0,t([Xr(n,e.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)],a)),!0}}}var o;return!1}function ex(t){var r=e.getSourceFileOfNode(t);return Yb(t)||$b(t.typeParameters,r)||function(t){for(var r=!1,n=t.length,i=0;i<n;i++){var a=t[i];if(a.dotDotDotToken){if(i!==n-1)return vx(a.dotDotDotToken,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);if(8388608&a.flags||Qb(t,e.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),a.questionToken)return vx(a.questionToken,e.Diagnostics.A_rest_parameter_cannot_be_optional);if(a.initializer)return vx(a.name,e.Diagnostics.A_rest_parameter_cannot_have_an_initializer)}else if(a.questionToken){if(r=!0,a.initializer)return vx(a.name,e.Diagnostics.Parameter_cannot_have_question_mark_and_initializer)}else if(r&&!a.initializer)return vx(a.name,e.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter)}}(t.parameters)||function(t,r){if(!e.isArrowFunction(t))return!1;var n=t.equalsGreaterThanToken,i=e.getLineAndCharacterOfPosition(r,n.pos).line,a=e.getLineAndCharacterOfPosition(r,n.end).line;return i!==a&&vx(n,e.Diagnostics.Line_terminator_not_permitted_before_arrow)}(t,r)||e.isFunctionLikeDeclaration(t)&&Zb(t)}function tx(t,r){return Qb(r)||function(t,r){if(r&&0===r.length){var n=e.getSourceFileOfNode(t),i=r.pos-"<".length;return hx(n,i,e.skipTrivia(n.text,r.end)+">".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}return!1}(t,r)}function rx(t){return function(t){if(t)for(var r=0,n=t;r<n.length;r++){var i=n[r];if(214===i.kind)return hx(i,i.pos,0,e.Diagnostics.Argument_expression_expected)}return!1}(t)}function nx(t){var r=t.types;if(Qb(r))return!0;if(r&&0===r.length){var n=e.tokenToString(t.token);return hx(t,r.pos,0,e.Diagnostics._0_list_cannot_be_empty,n)}return e.some(r,ix)}function ix(e){return tx(e,e.typeArguments)}function ax(t){if(153!==t.kind)return!1;var r=t;return 208===r.expression.kind&&27===r.expression.operatorToken.kind&&vx(r.expression,e.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function ox(t){if(t.asteriskToken){if(e.Debug.assert(243===t.kind||200===t.kind||160===t.kind),8388608&t.flags)return vx(t.asteriskToken,e.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);if(!t.body)return vx(t.asteriskToken,e.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator)}}function sx(e,t){return!!e&&vx(e,t)}function cx(e,t){return!!e&&vx(e,t)}function ux(t){if(xx(t))return!0;if(231===t.kind&&t.awaitModifier&&0==(32768&t.flags)){if(!gx(e.getSourceFileOfNode(t))){var r=e.createDiagnosticForNode(t.awaitModifier,e.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator),n=e.getContainingFunction(t);if(n&&161!==n.kind){e.Debug.assert(0==(2&e.getFunctionFlags(n)),"Enclosing function should never be an async function.");var i=e.createDiagnosticForNode(n,e.Diagnostics.Did_you_mean_to_mark_this_function_as_async);e.addRelatedInfo(r,i)}return jr.add(r),!0}return!1}if(242===t.initializer.kind){var a=t.initializer;if(!mx(a)){var o=a.declarations;if(!o.length)return!1;if(o.length>1){r=230===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return yx(a.declarations[1],r)}var s=o[0];if(s.initializer){var r=230===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return vx(s.name,r)}if(s.type)return vx(s,r=230===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function lx(t){if(t.parameters.length===(162===t.kind?1:2))return e.getThisParameter(t)}function _x(t,r){if(function(t){return e.isDynamicName(t)&&!po(t)}(t))return vx(t,r)}function dx(t){if(ex(t))return!0;if(160===t.kind){if(192===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||125!==e.first(t.modifiers).kind))return yx(t,e.Diagnostics.Modifiers_cannot_appear_here);if(sx(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(cx(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===t.body)return hx(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(ox(t))return!0}if(e.isClassLike(t.parent)){if(8388608&t.flags)return _x(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(160===t.kind&&!t.body)return _x(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(245===t.parent.kind)return _x(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(172===t.parent.kind)return _x(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function px(t){return e.isStringOrNumericLiteralLike(t)||206===t.kind&&40===t.operator&&8===t.operand.kind}function fx(t){var r,n=t.initializer;if(n){var i=!(px(n)||function(t){if((e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)&&px(t.argumentExpression))&&e.isEntityNameExpression(t.expression))return!!(1024&ky(t).flags)}(n)||105===n.kind||90===n.kind||(r=n,9===r.kind||206===r.kind&&40===r.operator&&9===r.operand.kind)),a=e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t);if(!a||t.type)return vx(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);if(i)return vx(n,e.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference);if(!a||i)return vx(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}}function mx(t){var r=t.declarations;return!!Qb(t.declarations)||!t.declarations.length&&hx(t,r.pos,r.end-r.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty)}function gx(e){return e.parseDiagnostics.length>0}function yx(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!gx(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return jr.add(e.createFileDiagnostic(o,s.start,s.length,r,n,i,a)),!0}return!1}function hx(t,r,n,i,a,o,s){var c=e.getSourceFileOfNode(t);return!gx(c)&&(jr.add(e.createFileDiagnostic(c,r,n,i,a,o,s)),!0)}function vx(t,r,n,i,a){return!gx(e.getSourceFileOfNode(t))&&(jr.add(e.createDiagnosticForNode(t,r,n,i,a)),!0)}function bx(t){return 245!==t.kind&&246!==t.kind&&253!==t.kind&&252!==t.kind&&259!==t.kind&&258!==t.kind&&251!==t.kind&&!e.hasModifier(t,515)&&yx(t,e.Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function xx(t){if(8388608&t.flags){if(!dn(t).hasReportedStatementInAmbientContext&&(e.isFunctionLike(t.parent)||e.isAccessor(t.parent)))return dn(t).hasReportedStatementInAmbientContext=yx(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(222===t.parent.kind||249===t.parent.kind||288===t.parent.kind){var r=dn(t.parent);if(!r.hasReportedStatementInAmbientContext)return r.hasReportedStatementInAmbientContext=yx(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function Dx(t){if(32&t.numericLiteralFlags){var r=void 0;if(J>=1?r=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,186)?r=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,282)&&(r=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),r){var n=e.isPrefixUnaryExpression(t.parent)&&40===t.parent.operator,i=(n?"-":"")+"0o"+t.text;return vx(n?t.parent:t,r,i)}}return function(t){if(16&t.numericLiteralFlags||t.text.length<=15||-1!==t.text.indexOf("."))return;var r=+e.getTextOfNode(t);if(r<=Math.pow(2,53)-1&&r+1>r)return;Qr(!1,e.createDiagnosticForNode(t,e.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}(t),!1}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes",e.LibraryManagedAttributes="LibraryManagedAttributes"}(C||(C={})),e.signatureHasRestParameter=M,e.signatureHasLiteralTypes=L,e.signatureIsOptionalCall=R}(s||(s={})),function(e){function t(t){var r=e.createNode(t,-1,-1);return r.flags|=8,r}function r(t,r){return t!==r&&(dr(t,r),or(t,r),e.aggregateTransformFlags(t)),t}function n(t,r){if(t&&t!==e.emptyArray){if(e.isNodeArray(t))return t}else t=[];var n=t;return n.pos=-1,n.end=-1,n.hasTrailingComma=r,n}function i(e){if(void 0===e)return e;var r=t(e.kind);for(var n in r.flags|=e.flags,dr(r,e),e)!r.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(r[n]=e[n]);return r}function a(t,r){if("number"==typeof t)return o(t+"");if("object"===f(t)&&"base10Value"in t)return s(e.pseudoBigIntToString(t)+"n");if("boolean"==typeof t)return t?m():g();if(e.isString(t)){var n=c(t);return r&&(n.singleQuote=!0),n}return function(t){var r=c(e.getTextOfIdentifierOrLiteral(t));return r.textSourceNode=t,r}(t)}function o(e,r){void 0===r&&(r=0);var n=t(8);return n.text=e,n.numericLiteralFlags=r,n}function s(e){var r=t(9);return r.text=e,r}function c(e){var r=t(10);return r.text=e,r}function u(r,i){var a=t(75);return a.escapedText=e.escapeLeadingUnderscores(r),a.originalKeywordKind=r?e.stringToToken(r):0,a.autoGenerateFlags=0,a.autoGenerateId=0,i&&(a.typeArguments=n(i)),a}e.updateNode=r,e.createNodeArray=n,e.getSynthesizedClone=i,e.createLiteral=a,e.createNumericLiteral=o,e.createBigIntLiteral=s,e.createStringLiteral=c,e.createRegularExpressionLiteral=function(e){var r=t(13);return r.text=e,r},e.createIdentifier=u,e.updateIdentifier=function(t,n){return t.typeArguments!==n?r(u(e.idText(t),n),t):t};var l,_=0;function d(e){var t=u(e);return t.autoGenerateFlags=19,t.autoGenerateId=_,_++,t}function p(e){return t(e)}function m(){return t(105)}function g(){return t(90)}function y(e){return p(e)}function h(e,r){var n=t(152);return n.left=e,n.right=tr(r),n}function v(r){var n=t(153);return n.expression=function(t){return e.isCommaSequence(t)?ye(t):t}(r),n}function b(e,r,n){var i=t(154);return i.name=tr(e),i.constraint=r,i.default=n,i}function x(r,n,i,a,o,s,c){var u=t(155);return u.decorators=nr(r),u.modifiers=nr(n),u.dotDotDotToken=i,u.name=tr(a),u.questionToken=o,u.type=s,u.initializer=c?e.parenthesizeExpressionForList(c):void 0,u}function D(r){var n=t(156);return n.expression=e.parenthesizeForAccess(r),n}function S(e,r,n,i,a){var o=t(157);return o.modifiers=nr(e),o.name=tr(r),o.questionToken=n,o.type=i,o.initializer=a,o}function T(e,r,n,i,a,o){var s=t(158);return s.decorators=nr(e),s.modifiers=nr(r),s.name=tr(n),s.questionToken=void 0!==i&&57===i.kind?i:void 0,s.exclamationToken=void 0!==i&&53===i.kind?i:void 0,s.type=a,s.initializer=o,s}function E(e,t,r,n,i){var a=I(159,e,t,r);return a.name=tr(n),a.questionToken=i,a}function C(e,r,i,a,o,s,c,u,l){var _=t(160);return _.decorators=nr(e),_.modifiers=nr(r),_.asteriskToken=i,_.name=tr(a),_.questionToken=o,_.typeParameters=nr(s),_.parameters=n(c),_.type=u,_.body=l,_}function k(e,t,r){return function(e,t,r){return _e(ae(e,tr(t)),void 0,r)}(u(e),t,r)}function N(e,t,r){return!!r&&(e.push(Ut(t,r)),!0)}function A(e,r,i,a){var o=t(161);return o.decorators=nr(e),o.modifiers=nr(r),o.typeParameters=void 0,o.parameters=n(i),o.type=void 0,o.body=a,o}function F(e,r,i,a,o,s){var c=t(162);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=void 0,c.parameters=n(a),c.type=o,c.body=s,c}function P(e,r,i,a,o){var s=t(163);return s.decorators=nr(e),s.modifiers=nr(r),s.name=tr(i),s.typeParameters=void 0,s.parameters=n(a),s.body=o,s}function w(e,r,i,a){var o=t(166);return o.decorators=nr(e),o.modifiers=nr(r),o.parameters=n(i),o.type=a,o}function I(e,r,n,i,a){var o=t(e);return o.typeParameters=nr(r),o.parameters=nr(n),o.type=i,o.typeArguments=nr(a),o}function O(e,t,n,i){return e.typeParameters!==t||e.parameters!==n||e.type!==i?r(I(e.kind,t,n,i),e):e}function M(e,r,n){var i=t(167);return i.assertsModifier=e,i.parameterName=tr(r),i.type=n,i}function L(e,t,n,i){return e.assertsModifier!==t||e.parameterName!==n||e.type!==i?r(M(t,n,i),e):e}function R(r,n){var i=t(168);return i.typeName=tr(r),i.typeArguments=n&&e.parenthesizeTypeParameters(n),i}function B(e){var r=t(171);return r.exprName=e,r}function j(e){var r=t(172);return r.members=n(e),r}function K(r){var n=t(173);return n.elementType=e.parenthesizeArrayTypeMember(r),n}function J(e){var r=t(174);return r.elementTypes=n(e),r}function z(r){var n=t(175);return n.type=e.parenthesizeArrayTypeMember(r),n}function U(e){var r=t(176);return r.type=e,r}function V(r,n){var i=t(r);return i.types=e.parenthesizeElementTypeMembers(n),i}function q(e,t){return e.types!==t?r(V(e.kind,t),e):e}function W(r,n,i,a){var o=t(179);return o.checkType=e.parenthesizeConditionalTypeMember(r),o.extendsType=e.parenthesizeConditionalTypeMember(n),o.trueType=i,o.falseType=a,o}function G(e){var r=t(180);return r.typeParameter=e,r}function H(r,n,i,a){var o=t(187);return o.argument=r,o.qualifier=n,o.typeArguments=e.parenthesizeTypeParameters(i),o.isTypeOf=a,o}function Y(e){var r=t(181);return r.type=e,r}function X(r,n){var i=t(183);return i.operator="number"==typeof r?r:133,i.type=e.parenthesizeElementTypeMember("number"==typeof r?n:r),i}function Q(r,n){var i=t(184);return i.objectType=e.parenthesizeElementTypeMember(r),i.indexType=n,i}function $(e,r,n,i){var a=t(185);return a.readonlyToken=e,a.typeParameter=r,a.questionToken=n,a.type=i,a}function Z(e){var r=t(186);return r.literal=e,r}function ee(e){var r=t(188);return r.elements=n(e),r}function te(e){var r=t(189);return r.elements=n(e),r}function re(e,r,n,i){var a=t(190);return a.dotDotDotToken=e,a.propertyName=tr(r),a.name=tr(n),a.initializer=i,a}function ne(r,i){var a=t(191);return a.elements=e.parenthesizeListElements(n(r)),i&&(a.multiLine=!0),a}function ie(e,r){var i=t(192);return i.properties=n(e),r&&(i.multiLine=!0),i}function ae(r,n){var i=t(193);return i.expression=e.parenthesizeForAccess(r),i.name=tr(n),sr(i,131072),i}function oe(r,n,i){var a=t(193);return a.flags|=32,a.expression=e.parenthesizeForAccess(r),a.questionDotToken=n,a.name=tr(i),sr(a,131072),a}function se(t,n,i,a){return e.Debug.assert(!!(32&t.flags),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),t.expression!==n||t.questionDotToken!==i||t.name!==a?r(sr(oe(n,i,a),e.getEmitFlags(t)),t):t}function ce(r,n){var i=t(194);return i.expression=e.parenthesizeForAccess(r),i.argumentExpression=rr(n),i}function ue(r,n,i){var a=t(194);return a.flags|=32,a.expression=e.parenthesizeForAccess(r),a.questionDotToken=n,a.argumentExpression=rr(i),a}function le(t,n,i,a){return e.Debug.assert(!!(32&t.flags),"Cannot update an ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),t.expression!==n||t.questionDotToken!==i||t.argumentExpression!==a?r(ue(n,i,a),t):t}function _e(r,i,a){var o=t(195);return o.expression=e.parenthesizeForAccess(r),o.typeArguments=nr(i),o.arguments=e.parenthesizeListElements(n(a)),o}function de(r,i,a,o){var s=t(195);return s.flags|=32,s.expression=e.parenthesizeForAccess(r),s.questionDotToken=i,s.typeArguments=nr(a),s.arguments=e.parenthesizeListElements(n(o)),s}function pe(t,n,i,a,o){return e.Debug.assert(!!(32&t.flags),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),t.expression!==n||t.questionDotToken!==i||t.typeArguments!==a||t.arguments!==o?r(de(n,i,a,o),t):t}function fe(r,i,a){var o=t(196);return o.expression=e.parenthesizeForNew(r),o.typeArguments=nr(i),o.arguments=a?e.parenthesizeListElements(n(a)):void 0,o}function me(r,n,i){var a=t(197);return a.tag=e.parenthesizeForAccess(r),i?(a.typeArguments=nr(n),a.template=i):(a.typeArguments=void 0,a.template=n),a}function ge(r,n){var i=t(198);return i.type=r,i.expression=e.parenthesizePrefixOperand(n),i}function ye(e){var r=t(199);return r.expression=e,r}function he(e,r,i,a,o,s,c){var u=t(200);return u.modifiers=nr(e),u.asteriskToken=r,u.name=tr(i),u.typeParameters=nr(a),u.parameters=n(o),u.type=s,u.body=c,u}function ve(r,i,a,o,s,c){var u=t(201);return u.modifiers=nr(r),u.typeParameters=nr(i),u.parameters=n(a),u.type=o,u.equalsGreaterThanToken=s||p(38),u.body=e.parenthesizeConciseBody(c),u}function be(r){var n=t(202);return n.expression=e.parenthesizePrefixOperand(r),n}function xe(r){var n=t(203);return n.expression=e.parenthesizePrefixOperand(r),n}function De(r){var n=t(204);return n.expression=e.parenthesizePrefixOperand(r),n}function Se(r){var n=t(205);return n.expression=e.parenthesizePrefixOperand(r),n}function Te(r,n){var i=t(206);return i.operator=r,i.operand=e.parenthesizePrefixOperand(n),i}function Ee(r,n){var i=t(207);return i.operand=e.parenthesizePostfixOperand(r),i.operator=n,i}function Ce(r,n,i){var a,o=t(208),s="number"==typeof(a=n)?p(a):a,c=s.kind;return o.left=e.parenthesizeBinaryOperand(c,r,!0,void 0),o.operatorToken=s,o.right=e.parenthesizeBinaryOperand(c,i,!1,o.left),o}function ke(r,n,i,a,o){var s=t(209);return s.condition=e.parenthesizeForConditionalHead(r),s.questionToken=o?n:p(57),s.whenTrue=e.parenthesizeSubexpressionOfConditionalExpression(o?i:n),s.colonToken=o?a:p(58),s.whenFalse=e.parenthesizeSubexpressionOfConditionalExpression(o||i),s}function Ne(e,r){var i=t(210);return i.head=e,i.templateSpans=n(r),i}e.createTempVariable=function(e,t){var r=u("");return r.autoGenerateFlags=1,r.autoGenerateId=_,_++,e&&e(r),t&&(r.autoGenerateFlags|=8),r},e.createLoopVariable=function(){var e=u("");return e.autoGenerateFlags=2,e.autoGenerateId=_,_++,e},e.createUniqueName=function(e){var t=u(e);return t.autoGenerateFlags=3,t.autoGenerateId=_,_++,t},e.createOptimisticUniqueName=d,e.createFileLevelUniqueName=function(e){var t=d(e);return t.autoGenerateFlags|=32,t},e.getGeneratedNameForNode=function(t,r){var n=u(t&&e.isIdentifier(t)?e.idText(t):"");return n.autoGenerateFlags=4|r,n.autoGenerateId=_,n.original=t,_++,n},e.createToken=p,e.createSuper=function(){return t(101)},e.createThis=function(){return t(103)},e.createNull=function(){return t(99)},e.createTrue=m,e.createFalse=g,e.createModifier=y,e.createModifiersFromModifierFlags=function(e){var t=[];return 1&e&&t.push(y(88)),2&e&&t.push(y(129)),512&e&&t.push(y(83)),2048&e&&t.push(y(80)),4&e&&t.push(y(118)),8&e&&t.push(y(116)),16&e&&t.push(y(117)),128&e&&t.push(y(121)),32&e&&t.push(y(119)),64&e&&t.push(y(137)),256&e&&t.push(y(125)),t},e.createQualifiedName=h,e.updateQualifiedName=function(e,t,n){return e.left!==t||e.right!==n?r(h(t,n),e):e},e.createComputedPropertyName=v,e.updateComputedPropertyName=function(e,t){return e.expression!==t?r(v(t),e):e},e.createTypeParameterDeclaration=b,e.updateTypeParameterDeclaration=function(e,t,n,i){return e.name!==t||e.constraint!==n||e.default!==i?r(b(t,n,i),e):e},e.createParameter=x,e.updateParameter=function(e,t,n,i,a,o,s,c){return e.decorators!==t||e.modifiers!==n||e.dotDotDotToken!==i||e.name!==a||e.questionToken!==o||e.type!==s||e.initializer!==c?r(x(t,n,i,a,o,s,c),e):e},e.createDecorator=D,e.updateDecorator=function(e,t){return e.expression!==t?r(D(t),e):e},e.createPropertySignature=S,e.updatePropertySignature=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.questionToken!==i||e.type!==a||e.initializer!==o?r(S(t,n,i,a,o),e):e},e.createProperty=T,e.updateProperty=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.questionToken!==(void 0!==a&&57===a.kind?a:void 0)||e.exclamationToken!==(void 0!==a&&53===a.kind?a:void 0)||e.type!==o||e.initializer!==s?r(T(t,n,i,a,o,s),e):e},e.createMethodSignature=E,e.updateMethodSignature=function(e,t,n,i,a,o){return e.typeParameters!==t||e.parameters!==n||e.type!==i||e.name!==a||e.questionToken!==o?r(E(t,n,i,a,o),e):e},e.createMethod=C,e.createObjectDefinePropertyCall=function(e,t,r){return k("Object","defineProperty",[e,rr(t),r])},e.createPropertyDescriptor=function(t,r){var n=[];N(n,"enumerable",rr(t.enumerable)),N(n,"configurable",rr(t.configurable));var i=N(n,"writable",rr(t.writable));i=N(n,"value",t.value)||i;var a=N(n,"get",t.get);return a=N(n,"set",t.set)||a,e.Debug.assert(!(i&&a),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ie(n,!r)},e.updateMethod=function(e,t,n,i,a,o,s,c,u,l){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.questionToken!==o||e.typeParameters!==s||e.parameters!==c||e.type!==u||e.body!==l?r(C(t,n,i,a,o,s,c,u,l),e):e},e.createConstructor=A,e.updateConstructor=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.parameters!==i||e.body!==a?r(A(t,n,i,a),e):e},e.createGetAccessor=F,e.updateGetAccessor=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.type!==o||e.body!==s?r(F(t,n,i,a,o,s),e):e},e.createSetAccessor=P,e.updateSetAccessor=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.body!==o?r(P(t,n,i,a,o),e):e},e.createCallSignature=function(e,t,r){return I(164,e,t,r)},e.updateCallSignature=function(e,t,r,n){return O(e,t,r,n)},e.createConstructSignature=function(e,t,r){return I(165,e,t,r)},e.updateConstructSignature=function(e,t,r,n){return O(e,t,r,n)},e.createIndexSignature=w,e.updateIndexSignature=function(e,t,n,i,a){return e.parameters!==i||e.type!==a||e.decorators!==t||e.modifiers!==n?r(w(t,n,i,a),e):e},e.createSignatureDeclaration=I,e.createKeywordTypeNode=function(e){return t(e)},e.createTypePredicateNode=function(e,t){return M(void 0,e,t)},e.createTypePredicateNodeWithModifier=M,e.updateTypePredicateNode=function(e,t,r){return L(e,e.assertsModifier,t,r)},e.updateTypePredicateNodeWithModifier=L,e.createTypeReferenceNode=R,e.updateTypeReferenceNode=function(e,t,n){return e.typeName!==t||e.typeArguments!==n?r(R(t,n),e):e},e.createFunctionTypeNode=function(e,t,r){return I(169,e,t,r)},e.updateFunctionTypeNode=function(e,t,r,n){return O(e,t,r,n)},e.createConstructorTypeNode=function(e,t,r){return I(170,e,t,r)},e.updateConstructorTypeNode=function(e,t,r,n){return O(e,t,r,n)},e.createTypeQueryNode=B,e.updateTypeQueryNode=function(e,t){return e.exprName!==t?r(B(t),e):e},e.createTypeLiteralNode=j,e.updateTypeLiteralNode=function(e,t){return e.members!==t?r(j(t),e):e},e.createArrayTypeNode=K,e.updateArrayTypeNode=function(e,t){return e.elementType!==t?r(K(t),e):e},e.createTupleTypeNode=J,e.updateTupleTypeNode=function(e,t){return e.elementTypes!==t?r(J(t),e):e},e.createOptionalTypeNode=z,e.updateOptionalTypeNode=function(e,t){return e.type!==t?r(z(t),e):e},e.createRestTypeNode=U,e.updateRestTypeNode=function(e,t){return e.type!==t?r(U(t),e):e},e.createUnionTypeNode=function(e){return V(177,e)},e.updateUnionTypeNode=function(e,t){return q(e,t)},e.createIntersectionTypeNode=function(e){return V(178,e)},e.updateIntersectionTypeNode=function(e,t){return q(e,t)},e.createUnionOrIntersectionTypeNode=V,e.createConditionalTypeNode=W,e.updateConditionalTypeNode=function(e,t,n,i,a){return e.checkType!==t||e.extendsType!==n||e.trueType!==i||e.falseType!==a?r(W(t,n,i,a),e):e},e.createInferTypeNode=G,e.updateInferTypeNode=function(e,t){return e.typeParameter!==t?r(G(t),e):e},e.createImportTypeNode=H,e.updateImportTypeNode=function(e,t,n,i,a){return e.argument!==t||e.qualifier!==n||e.typeArguments!==i||e.isTypeOf!==a?r(H(t,n,i,a),e):e},e.createParenthesizedType=Y,e.updateParenthesizedType=function(e,t){return e.type!==t?r(Y(t),e):e},e.createThisTypeNode=function(){return t(182)},e.createTypeOperatorNode=X,e.updateTypeOperatorNode=function(e,t){return e.type!==t?r(X(e.operator,t),e):e},e.createIndexedAccessTypeNode=Q,e.updateIndexedAccessTypeNode=function(e,t,n){return e.objectType!==t||e.indexType!==n?r(Q(t,n),e):e},e.createMappedTypeNode=$,e.updateMappedTypeNode=function(e,t,n,i,a){return e.readonlyToken!==t||e.typeParameter!==n||e.questionToken!==i||e.type!==a?r($(t,n,i,a),e):e},e.createLiteralTypeNode=Z,e.updateLiteralTypeNode=function(e,t){return e.literal!==t?r(Z(t),e):e},e.createObjectBindingPattern=ee,e.updateObjectBindingPattern=function(e,t){return e.elements!==t?r(ee(t),e):e},e.createArrayBindingPattern=te,e.updateArrayBindingPattern=function(e,t){return e.elements!==t?r(te(t),e):e},e.createBindingElement=re,e.updateBindingElement=function(e,t,n,i,a){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==i||e.initializer!==a?r(re(t,n,i,a),e):e},e.createArrayLiteral=ne,e.updateArrayLiteral=function(e,t){return e.elements!==t?r(ne(t,e.multiLine),e):e},e.createObjectLiteral=ie,e.updateObjectLiteral=function(e,t){return e.properties!==t?r(ie(t,e.multiLine),e):e},e.createPropertyAccess=ae,e.updatePropertyAccess=function(t,n,i){return e.isOptionalChain(t)?se(t,n,t.questionDotToken,i):t.expression!==n||t.name!==i?r(sr(ae(n,i),e.getEmitFlags(t)),t):t},e.createPropertyAccessChain=oe,e.updatePropertyAccessChain=se,e.createElementAccess=ce,e.updateElementAccess=function(t,n,i){return e.isOptionalChain(t)?le(t,n,t.questionDotToken,i):t.expression!==n||t.argumentExpression!==i?r(ce(n,i),t):t},e.createElementAccessChain=ue,e.updateElementAccessChain=le,e.createCall=_e,e.updateCall=function(t,n,i,a){return e.isOptionalChain(t)?pe(t,n,t.questionDotToken,i,a):t.expression!==n||t.typeArguments!==i||t.arguments!==a?r(_e(n,i,a),t):t},e.createCallChain=de,e.updateCallChain=pe,e.createNew=fe,e.updateNew=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(fe(t,n,i),e):e},e.createTaggedTemplate=me,e.updateTaggedTemplate=function(e,t,n,i){return e.tag!==t||(i?e.typeArguments!==n||e.template!==i:void 0!==e.typeArguments||e.template!==n)?r(me(t,n,i),e):e},e.createTypeAssertion=ge,e.updateTypeAssertion=function(e,t,n){return e.type!==t||e.expression!==n?r(ge(t,n),e):e},e.createParen=ye,e.updateParen=function(e,t){return e.expression!==t?r(ye(t),e):e},e.createFunctionExpression=he,e.updateFunctionExpression=function(e,t,n,i,a,o,s,c){return e.name!==i||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==a||e.parameters!==o||e.type!==s||e.body!==c?r(he(t,n,i,a,o,s,c),e):e},e.createArrowFunction=ve,e.updateArrowFunction=function(e,t,n,i,a,o,s){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==i||e.type!==a||e.equalsGreaterThanToken!==o||e.body!==s?r(ve(t,n,i,a,o,s),e):e},e.createDelete=be,e.updateDelete=function(e,t){return e.expression!==t?r(be(t),e):e},e.createTypeOf=xe,e.updateTypeOf=function(e,t){return e.expression!==t?r(xe(t),e):e},e.createVoid=De,e.updateVoid=function(e,t){return e.expression!==t?r(De(t),e):e},e.createAwait=Se,e.updateAwait=function(e,t){return e.expression!==t?r(Se(t),e):e},e.createPrefix=Te,e.updatePrefix=function(e,t){return e.operand!==t?r(Te(e.operator,t),e):e},e.createPostfix=Ee,e.updatePostfix=function(e,t){return e.operand!==t?r(Ee(t,e.operator),e):e},e.createBinary=Ce,e.updateBinary=function(e,t,n,i){return e.left!==t||e.right!==n?r(Ce(t,i||e.operatorToken,n),e):e},e.createConditional=ke,e.updateConditional=function(e,t,n,i,a,o){return e.condition!==t||e.questionToken!==n||e.whenTrue!==i||e.colonToken!==a||e.whenFalse!==o?r(ke(t,n,i,a,o),e):e},e.createTemplateExpression=Ne,e.updateTemplateExpression=function(e,t,n){return e.head!==t||e.templateSpans!==n?r(Ne(t,n),e):e};var Ae,Fe,Pe={};function we(r,n,i){var a=t(r);if(a.text=n,void 0===i||n===i)a.rawText=i;else{var o=function(t,r){switch(l||(l=e.createScanner(99,!1,0)),t){case 14:l.setText("`"+r+"`");break;case 15:l.setText("`"+r+"${");break;case 16:l.setText("}"+r+"${");break;case 17:l.setText("}"+r+"`")}var n,i=l.scan();if(23===i&&(i=l.reScanTemplateToken()),l.isUnterminated())return l.setText(void 0),Pe;switch(i){case 14:case 15:case 16:case 17:n=l.getTokenValue()}return 1!==l.scan()?(l.setText(void 0),Pe):(l.setText(void 0),n)}(r,i);if("object"===f(o))return e.Debug.fail("Invalid raw text");e.Debug.assert(n===o,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."),a.rawText=i}return a}function Ie(e,r){var n=t(211);return n.asteriskToken=e&&41===e.kind?e:void 0,n.expression=e&&41!==e.kind?e:r,n}function Oe(r){var n=t(212);return n.expression=e.parenthesizeExpressionForList(r),n}function Me(e,r,i,a,o){var s=t(213);return s.decorators=void 0,s.modifiers=nr(e),s.name=tr(r),s.typeParameters=nr(i),s.heritageClauses=nr(a),s.members=n(o),s}function Le(r,n){var i=t(215);return i.expression=e.parenthesizeForAccess(n),i.typeArguments=nr(r),i}function Re(e,r){var n=t(216);return n.expression=e,n.type=r,n}function Be(r){var n=t(217);return n.expression=e.parenthesizeForAccess(r),n}function je(e,r){var n=t(218);return n.keywordToken=e,n.name=r,n}function Ke(e,r){var n=t(220);return n.expression=e,n.literal=r,n}function Je(e,r){var i=t(222);return i.statements=n(e),r&&(i.multiLine=r),i}function ze(r,n){var i=t(224);return i.decorators=void 0,i.modifiers=nr(r),i.declarationList=e.isArray(n)?st(n):n,i}function Ue(){return t(223)}function Ve(r){var n=t(225);return n.expression=e.parenthesizeExpressionForExpressionStatement(r),n}function qe(e,t){return e.expression!==t?r(Ve(t),e):e}function We(e,r,n){var i=t(226);return i.expression=e,i.thenStatement=ir(r),i.elseStatement=ir(n),i}function Ge(e,r){var n=t(227);return n.statement=ir(e),n.expression=r,n}function He(e,r){var n=t(228);return n.expression=e,n.statement=ir(r),n}function Ye(e,r,n,i){var a=t(229);return a.initializer=e,a.condition=r,a.incrementor=n,a.statement=ir(i),a}function Xe(e,r,n){var i=t(230);return i.initializer=e,i.expression=r,i.statement=ir(n),i}function Qe(r,n,i,a){var o=t(231);return o.awaitModifier=r,o.initializer=n,o.expression=e.isCommaSequence(i)?ye(i):i,o.statement=ir(a),o}function $e(e){var r=t(232);return r.label=tr(e),r}function Ze(e){var r=t(233);return r.label=tr(e),r}function et(e){var r=t(234);return r.expression=e,r}function tt(e,r){var n=t(235);return n.expression=e,n.statement=ir(r),n}function rt(r,n){var i=t(236);return i.expression=e.parenthesizeExpressionForList(r),i.caseBlock=n,i}function nt(e,r){var n=t(237);return n.label=tr(e),n.statement=ir(r),n}function it(e){var r=t(238);return r.expression=e,r}function at(e,r,n){var i=t(239);return i.tryBlock=e,i.catchClause=r,i.finallyBlock=n,i}function ot(r,n,i){var a=t(241);return a.name=tr(r),a.type=n,a.initializer=void 0!==i?e.parenthesizeExpressionForList(i):void 0,a}function st(e,r){void 0===r&&(r=0);var i=t(242);return i.flags|=3&r,i.declarations=n(e),i}function ct(e,r,i,a,o,s,c,u){var l=t(243);return l.decorators=nr(e),l.modifiers=nr(r),l.asteriskToken=i,l.name=tr(a),l.typeParameters=nr(o),l.parameters=n(s),l.type=c,l.body=u,l}function ut(e,r,i,a,o,s){var c=t(244);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=nr(a),c.heritageClauses=nr(o),c.members=n(s),c}function lt(e,r,i,a,o,s){var c=t(245);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=nr(a),c.heritageClauses=nr(o),c.members=n(s),c}function _t(e,r,n,i,a){var o=t(246);return o.decorators=nr(e),o.modifiers=nr(r),o.name=tr(n),o.typeParameters=nr(i),o.type=a,o}function dt(e,r,i,a){var o=t(247);return o.decorators=nr(e),o.modifiers=nr(r),o.name=tr(i),o.members=n(a),o}function pt(e,r,n,i,a){void 0===a&&(a=0);var o=t(248);return o.flags|=1044&a,o.decorators=nr(e),o.modifiers=nr(r),o.name=n,o.body=i,o}function ft(e){var r=t(249);return r.statements=n(e),r}function mt(e){var r=t(250);return r.clauses=n(e),r}function gt(e){var r=t(251);return r.name=tr(e),r}function yt(e,r,n,i){var a=t(252);return a.decorators=nr(e),a.modifiers=nr(r),a.name=tr(n),a.moduleReference=i,a}function ht(e,r,n,i){var a=t(253);return a.decorators=nr(e),a.modifiers=nr(r),a.importClause=n,a.moduleSpecifier=i,a}function vt(e,r){var n=t(254);return n.name=e,n.namedBindings=r,n}function bt(e){var r=t(255);return r.name=e,r}function xt(e){var r=t(256);return r.elements=n(e),r}function Dt(e,r){var n=t(257);return n.propertyName=e,n.name=r,n}function St(r,n,i,a){var o=t(258);return o.decorators=nr(r),o.modifiers=nr(n),o.isExportEquals=i,o.expression=i?e.parenthesizeBinaryOperand(62,a,!1,void 0):e.parenthesizeDefaultExpression(a),o}function Tt(e,r,n,i){var a=t(259);return a.decorators=nr(e),a.modifiers=nr(r),a.exportClause=n,a.moduleSpecifier=i,a}function Et(e){var r=t(260);return r.elements=n(e),r}function Ct(e,r){var n=t(261);return n.propertyName=tr(e),n.name=tr(r),n}function kt(e){var r=t(263);return r.expression=e,r}function Nt(e,r){var n=t(e);return n.tagName=u(r),n}function At(e,r,i){var a=t(264);return a.openingElement=e,a.children=n(r),a.closingElement=i,a}function Ft(e,r,n){var i=t(265);return i.tagName=e,i.typeArguments=nr(r),i.attributes=n,i}function Pt(e,r,n){var i=t(266);return i.tagName=e,i.typeArguments=nr(r),i.attributes=n,i}function wt(e){var r=t(267);return r.tagName=e,r}function It(e,r,i){var a=t(268);return a.openingFragment=e,a.children=n(r),a.closingFragment=i,a}function Ot(e,r){var n=t(11);return n.text=e,n.containsOnlyTriviaWhiteSpaces=!!r,n}function Mt(e,r){var n=t(271);return n.name=e,n.initializer=r,n}function Lt(e){var r=t(272);return r.properties=n(e),r}function Rt(e){var r=t(273);return r.expression=e,r}function Bt(e,r){var n=t(274);return n.dotDotDotToken=e,n.expression=r,n}function jt(r,i){var a=t(275);return a.expression=e.parenthesizeExpressionForList(r),a.statements=n(i),a}function Kt(e){var r=t(276);return r.statements=n(e),r}function Jt(e,r){var i=t(277);return i.token=e,i.types=n(r),i}function zt(r,n){var i=t(278);return i.variableDeclaration=e.isString(r)?ot(r):r,i.block=n,i}function Ut(r,n){var i=t(279);return i.name=tr(r),i.questionToken=void 0,i.initializer=e.parenthesizeExpressionForList(n),i}function Vt(r,n){var i=t(280);return i.name=tr(r),i.objectAssignmentInitializer=void 0!==n?e.parenthesizeExpressionForList(n):void 0,i}function qt(r){var n=t(281);return n.expression=e.parenthesizeExpressionForList(r),n}function Wt(r,n){var i=t(282);return i.name=tr(r),i.initializer=n&&e.parenthesizeExpressionForList(n),i}function Gt(e,r){var n=t(319);return n.expression=e,n.original=r,or(n,r),n}function Ht(t){if(e.nodeIsSynthesized(t)&&!e.isParseTreeNode(t)&&!t.original&&!t.emitNode&&!t.id){if(320===t.kind)return t.elements;if(e.isBinaryExpression(t)&&27===t.operatorToken.kind)return[t.left,t.right]}return t}function Yt(r){var i=t(320);return i.elements=n(e.sameFlatMap(r,Ht)),i}function Xt(e,r){var n=t(323);return n.expression=e,n.thisArg=r,n}function Qt(t,r){void 0===r&&(r=e.emptyArray);var n=e.createNode(289);return n.prepends=r,n.sourceFiles=t,n}function $t(){return Ae||(Ae=e.arrayToMap([e.valuesHelper,e.readHelper,e.spreadHelper,e.spreadArraysHelper,e.restHelper,e.decorateHelper,e.metadataHelper,e.paramHelper,e.awaiterHelper,e.assignHelper,e.awaitHelper,e.asyncGeneratorHelper,e.asyncDelegator,e.asyncValues,e.extendsHelper,e.templateObjectHelper,e.generatorHelper,e.importStarHelper,e.importDefaultHelper],(function(e){return e.name})))}function Zt(t,r){var n=e.createNode(function(t){switch(t){case"prologue":return 283;case"prepend":return 284;case"internal":return 286;case"text":return 285;case"emitHelpers":case"no-default-lib":case"reference":case"type":case"lib":return e.Debug.fail("BundleFileSectionKind: "+t+" not yet mapped to SyntaxKind");default:return e.Debug.assertNever(t)}}(t.kind),t.pos,t.end);return n.parent=r,n.data=t.data,n}function er(t,r){var n=e.createNode(287,t.pos,t.end);return n.parent=r,n.data=t.data,n.section=t,n}function tr(t){return e.isString(t)?u(t):t}function rr(e){return"string"==typeof e?c(e):"number"==typeof e?o(""+e):"boolean"==typeof e?e?m():g():e}function nr(e){return e?n(e):void 0}function ir(t){return t&&e.isNotEmittedStatement(t)?or(dr(Ue(),t),t):t}function ar(t){if(!t.emitNode){if(e.isParseTreeNode(t)){if(288===t.kind)return t.emitNode={annotatedNodes:[t]};ar(e.getSourceFileOfNode(e.getParseTreeNode(e.getSourceFileOfNode(t)))).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function or(e,t){return t&&(e.pos=t.pos,e.end=t.end),e}function sr(e,t){return ar(e).flags=t,e}function cr(e){var t=e.emitNode;return t&&t.leadingComments}function ur(e,t){return ar(e).leadingComments=t,e}function lr(e){var t=e.emitNode;return t&&t.trailingComments}function _r(e,t){return ar(e).trailingComments=t,e}function dr(t,r){if(t.original=r,r){var n=r.emitNode;n&&(t.emitNode=function(t,r){var n=t.flags,i=t.leadingComments,a=t.trailingComments,o=t.commentRange,s=t.sourceMapRange,c=t.tokenSourceMapRanges,u=t.constantValue,l=t.helpers,_=t.startsOnNewLine;r||(r={});i&&(r.leadingComments=e.addRange(i.slice(),r.leadingComments));a&&(r.trailingComments=e.addRange(a.slice(),r.trailingComments));n&&(r.flags=n);o&&(r.commentRange=o);s&&(r.sourceMapRange=s);c&&(r.tokenSourceMapRanges=function(e,t){t||(t=[]);for(var r in e)t[r]=e[r];return t}(c,r.tokenSourceMapRanges));void 0!==u&&(r.constantValue=u);l&&(r.helpers=e.addRange(r.helpers,l));void 0!==_&&(r.startsOnNewLine=_);return r}(n,t.emitNode))}return t}e.createTemplateHead=function(e,t){var r=we(15,e,t);return r.text=e,r},e.createTemplateMiddle=function(e,t){var r=we(16,e,t);return r.text=e,r},e.createTemplateTail=function(e,t){var r=we(17,e,t);return r.text=e,r},e.createNoSubstitutionTemplateLiteral=function(e,t){return we(14,e,t)},e.createYield=Ie,e.updateYield=function(e,t,n){return e.expression!==n||e.asteriskToken!==t?r(Ie(t,n),e):e},e.createSpread=Oe,e.updateSpread=function(e,t){return e.expression!==t?r(Oe(t),e):e},e.createClassExpression=Me,e.updateClassExpression=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==i||e.heritageClauses!==a||e.members!==o?r(Me(t,n,i,a,o),e):e},e.createOmittedExpression=function(){return t(214)},e.createExpressionWithTypeArguments=Le,e.updateExpressionWithTypeArguments=function(e,t,n){return e.typeArguments!==t||e.expression!==n?r(Le(t,n),e):e},e.createAsExpression=Re,e.updateAsExpression=function(e,t,n){return e.expression!==t||e.type!==n?r(Re(t,n),e):e},e.createNonNullExpression=Be,e.updateNonNullExpression=function(e,t){return e.expression!==t?r(Be(t),e):e},e.createMetaProperty=je,e.updateMetaProperty=function(e,t){return e.name!==t?r(je(e.keywordToken,t),e):e},e.createTemplateSpan=Ke,e.updateTemplateSpan=function(e,t,n){return e.expression!==t||e.literal!==n?r(Ke(t,n),e):e},e.createSemicolonClassElement=function(){return t(221)},e.createBlock=Je,e.updateBlock=function(e,t){return e.statements!==t?r(Je(t,e.multiLine),e):e},e.createVariableStatement=ze,e.updateVariableStatement=function(e,t,n){return e.modifiers!==t||e.declarationList!==n?r(ze(t,n),e):e},e.createEmptyStatement=Ue,e.createExpressionStatement=Ve,e.updateExpressionStatement=qe,e.createStatement=Ve,e.updateStatement=qe,e.createIf=We,e.updateIf=function(e,t,n,i){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==i?r(We(t,n,i),e):e},e.createDo=Ge,e.updateDo=function(e,t,n){return e.statement!==t||e.expression!==n?r(Ge(t,n),e):e},e.createWhile=He,e.updateWhile=function(e,t,n){return e.expression!==t||e.statement!==n?r(He(t,n),e):e},e.createFor=Ye,e.updateFor=function(e,t,n,i,a){return e.initializer!==t||e.condition!==n||e.incrementor!==i||e.statement!==a?r(Ye(t,n,i,a),e):e},e.createForIn=Xe,e.updateForIn=function(e,t,n,i){return e.initializer!==t||e.expression!==n||e.statement!==i?r(Xe(t,n,i),e):e},e.createForOf=Qe,e.updateForOf=function(e,t,n,i,a){return e.awaitModifier!==t||e.initializer!==n||e.expression!==i||e.statement!==a?r(Qe(t,n,i,a),e):e},e.createContinue=$e,e.updateContinue=function(e,t){return e.label!==t?r($e(t),e):e},e.createBreak=Ze,e.updateBreak=function(e,t){return e.label!==t?r(Ze(t),e):e},e.createReturn=et,e.updateReturn=function(e,t){return e.expression!==t?r(et(t),e):e},e.createWith=tt,e.updateWith=function(e,t,n){return e.expression!==t||e.statement!==n?r(tt(t,n),e):e},e.createSwitch=rt,e.updateSwitch=function(e,t,n){return e.expression!==t||e.caseBlock!==n?r(rt(t,n),e):e},e.createLabel=nt,e.updateLabel=function(e,t,n){return e.label!==t||e.statement!==n?r(nt(t,n),e):e},e.createThrow=it,e.updateThrow=function(e,t){return e.expression!==t?r(it(t),e):e},e.createTry=at,e.updateTry=function(e,t,n,i){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==i?r(at(t,n,i),e):e},e.createDebuggerStatement=function(){return t(240)},e.createVariableDeclaration=ot,e.updateVariableDeclaration=function(e,t,n,i){return e.name!==t||e.type!==n||e.initializer!==i?r(ot(t,n,i),e):e},e.createVariableDeclarationList=st,e.updateVariableDeclarationList=function(e,t){return e.declarations!==t?r(st(t,e.flags),e):e},e.createFunctionDeclaration=ct,e.updateFunctionDeclaration=function(e,t,n,i,a,o,s,c,u){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.typeParameters!==o||e.parameters!==s||e.type!==c||e.body!==u?r(ct(t,n,i,a,o,s,c,u),e):e},e.createClassDeclaration=ut,e.updateClassDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(ut(t,n,i,a,o,s),e):e},e.createInterfaceDeclaration=lt,e.updateInterfaceDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(lt(t,n,i,a,o,s),e):e},e.createTypeAliasDeclaration=_t,e.updateTypeAliasDeclaration=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.type!==o?r(_t(t,n,i,a,o),e):e},e.createEnumDeclaration=dt,e.updateEnumDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.members!==a?r(dt(t,n,i,a),e):e},e.createModuleDeclaration=pt,e.updateModuleDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.body!==a?r(pt(t,n,i,a,e.flags),e):e},e.createModuleBlock=ft,e.updateModuleBlock=function(e,t){return e.statements!==t?r(ft(t),e):e},e.createCaseBlock=mt,e.updateCaseBlock=function(e,t){return e.clauses!==t?r(mt(t),e):e},e.createNamespaceExportDeclaration=gt,e.updateNamespaceExportDeclaration=function(e,t){return e.name!==t?r(gt(t),e):e},e.createImportEqualsDeclaration=yt,e.updateImportEqualsDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.moduleReference!==a?r(yt(t,n,i,a),e):e},e.createImportDeclaration=ht,e.updateImportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.importClause!==i||e.moduleSpecifier!==a?r(ht(t,n,i,a),e):e},e.createImportClause=vt,e.updateImportClause=function(e,t,n){return e.name!==t||e.namedBindings!==n?r(vt(t,n),e):e},e.createNamespaceImport=bt,e.updateNamespaceImport=function(e,t){return e.name!==t?r(bt(t),e):e},e.createNamedImports=xt,e.updateNamedImports=function(e,t){return e.elements!==t?r(xt(t),e):e},e.createImportSpecifier=Dt,e.updateImportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(Dt(t,n),e):e},e.createExportAssignment=St,e.updateExportAssignment=function(e,t,n,i){return e.decorators!==t||e.modifiers!==n||e.expression!==i?r(St(t,n,e.isExportEquals,i),e):e},e.createExportDeclaration=Tt,e.updateExportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.exportClause!==i||e.moduleSpecifier!==a?r(Tt(t,n,i,a),e):e},e.createEmptyExports=function(){return Tt(void 0,void 0,Et([]),void 0)},e.createNamedExports=Et,e.updateNamedExports=function(e,t){return e.elements!==t?r(Et(t),e):e},e.createExportSpecifier=Ct,e.updateExportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(Ct(t,n),e):e},e.createExternalModuleReference=kt,e.updateExternalModuleReference=function(e,t){return e.expression!==t?r(kt(t),e):e},e.createJSDocTypeExpression=function(e){var r=t(292);return r.type=e,r},e.createJSDocTypeTag=function(e,t){var r=Nt(313,"type");return r.typeExpression=e,r.comment=t,r},e.createJSDocReturnTag=function(e,t){var r=Nt(311,"returns");return r.typeExpression=e,r.comment=t,r},e.createJSDocThisTag=function(e){var t=Nt(312,"this");return t.typeExpression=e,t},e.createJSDocParamTag=function(e,t,r,n){var i=Nt(310,"param");return i.typeExpression=r,i.name=e,i.isBracketed=t,i.comment=n,i},e.createJSDocComment=function(e,r){var n=t(301);return n.comment=e,n.tags=r,n},e.createJsxElement=At,e.updateJsxElement=function(e,t,n,i){return e.openingElement!==t||e.children!==n||e.closingElement!==i?r(At(t,n,i),e):e},e.createJsxSelfClosingElement=Ft,e.updateJsxSelfClosingElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(Ft(t,n,i),e):e},e.createJsxOpeningElement=Pt,e.updateJsxOpeningElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(Pt(t,n,i),e):e},e.createJsxClosingElement=wt,e.updateJsxClosingElement=function(e,t){return e.tagName!==t?r(wt(t),e):e},e.createJsxFragment=It,e.createJsxText=Ot,e.updateJsxText=function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?r(Ot(t,n),e):e},e.createJsxOpeningFragment=function(){return t(269)},e.createJsxJsxClosingFragment=function(){return t(270)},e.updateJsxFragment=function(e,t,n,i){return e.openingFragment!==t||e.children!==n||e.closingFragment!==i?r(It(t,n,i),e):e},e.createJsxAttribute=Mt,e.updateJsxAttribute=function(e,t,n){return e.name!==t||e.initializer!==n?r(Mt(t,n),e):e},e.createJsxAttributes=Lt,e.updateJsxAttributes=function(e,t){return e.properties!==t?r(Lt(t),e):e},e.createJsxSpreadAttribute=Rt,e.updateJsxSpreadAttribute=function(e,t){return e.expression!==t?r(Rt(t),e):e},e.createJsxExpression=Bt,e.updateJsxExpression=function(e,t){return e.expression!==t?r(Bt(e.dotDotDotToken,t),e):e},e.createCaseClause=jt,e.updateCaseClause=function(e,t,n){return e.expression!==t||e.statements!==n?r(jt(t,n),e):e},e.createDefaultClause=Kt,e.updateDefaultClause=function(e,t){return e.statements!==t?r(Kt(t),e):e},e.createHeritageClause=Jt,e.updateHeritageClause=function(e,t){return e.types!==t?r(Jt(e.token,t),e):e},e.createCatchClause=zt,e.updateCatchClause=function(e,t,n){return e.variableDeclaration!==t||e.block!==n?r(zt(t,n),e):e},e.createPropertyAssignment=Ut,e.updatePropertyAssignment=function(e,t,n){return e.name!==t||e.initializer!==n?r(Ut(t,n),e):e},e.createShorthandPropertyAssignment=Vt,e.updateShorthandPropertyAssignment=function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?r(Vt(t,n),e):e},e.createSpreadAssignment=qt,e.updateSpreadAssignment=function(e,t){return e.expression!==t?r(qt(t),e):e},e.createEnumMember=Wt,e.updateEnumMember=function(e,t,n){return e.name!==t||e.initializer!==n?r(Wt(t,n),e):e},e.updateSourceFileNode=function(e,i,a,o,s,c,u){if(e.statements!==i||void 0!==a&&e.isDeclarationFile!==a||void 0!==o&&e.referencedFiles!==o||void 0!==s&&e.typeReferenceDirectives!==s||void 0!==u&&e.libReferenceDirectives!==u||void 0!==c&&e.hasNoDefaultLib!==c){var l=t(288);return l.flags|=e.flags,l.statements=n(i),l.endOfFileToken=e.endOfFileToken,l.fileName=e.fileName,l.path=e.path,l.text=e.text,l.isDeclarationFile=void 0===a?e.isDeclarationFile:a,l.referencedFiles=void 0===o?e.referencedFiles:o,l.typeReferenceDirectives=void 0===s?e.typeReferenceDirectives:s,l.hasNoDefaultLib=void 0===c?e.hasNoDefaultLib:c,l.libReferenceDirectives=void 0===u?e.libReferenceDirectives:u,void 0!==e.amdDependencies&&(l.amdDependencies=e.amdDependencies),void 0!==e.moduleName&&(l.moduleName=e.moduleName),void 0!==e.languageVariant&&(l.languageVariant=e.languageVariant),void 0!==e.renamedDependencies&&(l.renamedDependencies=e.renamedDependencies),void 0!==e.languageVersion&&(l.languageVersion=e.languageVersion),void 0!==e.scriptKind&&(l.scriptKind=e.scriptKind),void 0!==e.externalModuleIndicator&&(l.externalModuleIndicator=e.externalModuleIndicator),void 0!==e.commonJsModuleIndicator&&(l.commonJsModuleIndicator=e.commonJsModuleIndicator),void 0!==e.identifiers&&(l.identifiers=e.identifiers),void 0!==e.nodeCount&&(l.nodeCount=e.nodeCount),void 0!==e.identifierCount&&(l.identifierCount=e.identifierCount),void 0!==e.symbolCount&&(l.symbolCount=e.symbolCount),void 0!==e.parseDiagnostics&&(l.parseDiagnostics=e.parseDiagnostics),void 0!==e.bindDiagnostics&&(l.bindDiagnostics=e.bindDiagnostics),void 0!==e.bindSuggestionDiagnostics&&(l.bindSuggestionDiagnostics=e.bindSuggestionDiagnostics),void 0!==e.lineMap&&(l.lineMap=e.lineMap),void 0!==e.classifiableNames&&(l.classifiableNames=e.classifiableNames),void 0!==e.resolvedModules&&(l.resolvedModules=e.resolvedModules),void 0!==e.resolvedTypeReferenceDirectiveNames&&(l.resolvedTypeReferenceDirectiveNames=e.resolvedTypeReferenceDirectiveNames),void 0!==e.imports&&(l.imports=e.imports),void 0!==e.moduleAugmentations&&(l.moduleAugmentations=e.moduleAugmentations),void 0!==e.pragmas&&(l.pragmas=e.pragmas),void 0!==e.localJsxFactory&&(l.localJsxFactory=e.localJsxFactory),void 0!==e.localJsxNamespace&&(l.localJsxNamespace=e.localJsxNamespace),r(l,e)}return e},e.getMutableClone=function(e){var t=i(e);return t.pos=e.pos,t.end=e.end,t.parent=e.parent,t},e.createNotEmittedStatement=function(e){var r=t(318);return r.original=e,or(r,e),r},e.createEndOfDeclarationMarker=function(e){var r=t(322);return r.emitNode={},r.original=e,r},e.createMergeDeclarationMarker=function(e){var r=t(321);return r.emitNode={},r.original=e,r},e.createPartiallyEmittedExpression=Gt,e.updatePartiallyEmittedExpression=function(e,t){return e.expression!==t?r(Gt(t,e.original),e):e},e.createCommaList=Yt,e.updateCommaList=function(e,t){return e.elements!==t?r(Yt(t),e):e},e.createSyntheticReferenceExpression=Xt,e.updateSyntheticReferenceExpression=function(e,t,n){return e.expression!==t||e.thisArg!==n?r(Xt(t,n),e):e},e.createBundle=Qt,e.createUnparsedSourceFile=function(t,r,n){var i,a,o=function(){var t=e.createNode(290);return t.prologues=e.emptyArray,t.referencedFiles=e.emptyArray,t.libReferenceDirectives=e.emptyArray,t.getLineAndCharacterOfPosition=function(r){return e.getLineAndCharacterOfPosition(t,r)},t}();if(e.isString(t))o.fileName="",o.text=t,o.sourceMapPath=r,o.sourceMapText=n;else if(e.Debug.assert("js"===r||"dts"===r),o.fileName=("js"===r?t.javascriptPath:t.declarationPath)||"",o.sourceMapPath="js"===r?t.javascriptMapPath:t.declarationMapPath,Object.defineProperties(o,{text:{get:function(){return"js"===r?t.javascriptText:t.declarationText}},sourceMapText:{get:function(){return"js"===r?t.javascriptMapText:t.declarationMapText}}}),t.buildInfo&&t.buildInfo.bundle&&(o.oldFileOfCurrentEmit=t.oldFileOfCurrentEmit,e.Debug.assert(void 0===n||"boolean"==typeof n),i=n,a="js"===r?t.buildInfo.bundle.js:t.buildInfo.bundle.dts,o.oldFileOfCurrentEmit))return function(t,r){var n,i;e.Debug.assert(!!t.oldFileOfCurrentEmit);for(var a=0,o=r.sections;a<o.length;a++){var s=o[a];switch(s.kind){case"internal":case"text":(n||(n=[])).push(Zt(s,t));break;case"no-default-lib":case"reference":case"type":case"lib":(i||(i=[])).push(er(s,t));break;case"prologue":case"emitHelpers":case"prepend":break;default:e.Debug.assertNever(s)}}t.texts=n||e.emptyArray,t.helpers=e.map(r.sources&&r.sources.helpers,(function(e){return $t().get(e)})),t.syntheticReferences=i}(o,e.Debug.assertDefined(a)),o;return e.Debug.assert(!o.oldFileOfCurrentEmit),function(t,r,n){for(var i,a,o,s,c,u,l=0,_=r?r.sections:e.emptyArray;l<_.length;l++){var d=_[l];switch(d.kind){case"prologue":(i||(i=[])).push(Zt(d,t));break;case"emitHelpers":(a||(a=[])).push($t().get(d.data));break;case"no-default-lib":t.hasNoDefaultLib=!0;break;case"reference":(o||(o=[])).push({pos:-1,end:-1,fileName:d.data});break;case"type":(s||(s=[])).push(d.data);break;case"lib":(c||(c=[])).push({pos:-1,end:-1,fileName:d.data});break;case"prepend":for(var p=Zt(d,t),f=void 0,m=0,g=d.texts;m<g.length;m++){var y=g[m];n&&"internal"===y.kind||(f||(f=[])).push(Zt(y,t))}p.texts=f||e.emptyArray,(u||(u=[])).push(p);break;case"internal":if(n){u||(u=[]);break}case"text":(u||(u=[])).push(Zt(d,t));break;default:e.Debug.assertNever(d)}}t.prologues=i||e.emptyArray,t.helpers=a,t.referencedFiles=o||e.emptyArray,t.typeReferenceDirectives=s,t.libReferenceDirectives=c||e.emptyArray,t.texts=u||[Zt({kind:"text",pos:0,end:t.text.length},t)]}(o,a,i),o},e.createInputFiles=function(t,r,n,i,a,o,s,c,u,l,_){var d=e.createNode(291);if(e.isString(t))d.javascriptText=t,d.javascriptMapPath=n,d.javascriptMapText=i,d.declarationText=r,d.declarationMapPath=a,d.declarationMapText=o,d.javascriptPath=s,d.declarationPath=c,d.buildInfoPath=u,d.buildInfo=l,d.oldFileOfCurrentEmit=_;else{var p,f=e.createMap(),m=function(e){if(void 0!==e){var r=f.get(e);return void 0===r&&(r=t(e),f.set(e,void 0!==r&&r)),!1!==r?r:void 0}},g=function(e){var t=m(e);return void 0!==t?t:"/* Input file "+e+" was missing */\r\n"};d.javascriptPath=r,d.javascriptMapPath=n,d.declarationPath=e.Debug.assertDefined(i),d.declarationMapPath=a,d.buildInfoPath=o,Object.defineProperties(d,{javascriptText:{get:function(){return g(r)}},javascriptMapText:{get:function(){return m(n)}},declarationText:{get:function(){return g(e.Debug.assertDefined(i))}},declarationMapText:{get:function(){return m(a)}},buildInfo:{get:function(){return function(t){if(void 0===p){var r=t();p=void 0!==r&&e.getBuildInfo(r)}return p||void 0}((function(){return m(o)}))}}})}return d},e.updateBundle=function(t,r,n){return void 0===n&&(n=e.emptyArray),t.sourceFiles!==r||t.prepends!==n?Qt(r,n):t},e.createImmediatelyInvokedFunctionExpression=function(e,t,r){return _e(he(void 0,void 0,void 0,void 0,t?[t]:[],void 0,Je(e,!0)),void 0,r?[r]:[])},e.createImmediatelyInvokedArrowFunction=function(e,t,r){return _e(ve(void 0,void 0,t?[t]:[],void 0,void 0,Je(e,!0)),void 0,r?[r]:[])},e.createComma=function(e,t){return Ce(e,27,t)},e.createLessThan=function(e,t){return Ce(e,29,t)},e.createAssignment=function(e,t){return Ce(e,62,t)},e.createStrictEquality=function(e,t){return Ce(e,36,t)},e.createStrictInequality=function(e,t){return Ce(e,37,t)},e.createAdd=function(e,t){return Ce(e,39,t)},e.createSubtract=function(e,t){return Ce(e,40,t)},e.createPostfixIncrement=function(e){return Ee(e,45)},e.createLogicalAnd=function(e,t){return Ce(e,55,t)},e.createLogicalOr=function(e,t){return Ce(e,56,t)},e.createNullishCoalesce=function(e,t){return Ce(e,60,t)},e.createLogicalNot=function(e){return Te(53,e)},e.createVoidZero=function(){return De(a(0))},e.createExportDefault=function(e){return St(void 0,void 0,!1,e)},e.createExternalModuleExport=function(e){return Tt(void 0,void 0,Et([Ct(void 0,e)]))},e.disposeEmitNodes=function(t){var r=(t=e.getSourceFileOfNode(e.getParseTreeNode(t)))&&t.emitNode,n=r&&r.annotatedNodes;if(n)for(var i=0,a=n;i<a.length;i++){a[i].emitNode=void 0}},e.getOrCreateEmitNode=ar,e.removeAllComments=function(e){var t=ar(e);return t.flags|=1536,t.leadingComments=void 0,t.trailingComments=void 0,e},e.setTextRange=or,e.setEmitFlags=sr,e.addEmitFlags=function(e,t){var r=ar(e);return r.flags=r.flags|t,e},e.getSourceMapRange=function(e){var t=e.emitNode;return t&&t.sourceMapRange||e},e.setSourceMapRange=function(e,t){return ar(e).sourceMapRange=t,e},e.createSourceMapSource=function(t,r,n){return new(Fe||(Fe=e.objectAllocator.getSourceMapSourceConstructor()))(t,r,n)},e.getTokenSourceMapRange=function(e,t){var r=e.emitNode,n=r&&r.tokenSourceMapRanges;return n&&n[t]},e.setTokenSourceMapRange=function(e,t,r){var n=ar(e);return(n.tokenSourceMapRanges||(n.tokenSourceMapRanges=[]))[t]=r,e},e.getStartsOnNewLine=function(e){var t=e.emitNode;return t&&t.startsOnNewLine},e.setStartsOnNewLine=function(e,t){return ar(e).startsOnNewLine=t,e},e.getCommentRange=function(e){var t=e.emitNode;return t&&t.commentRange||e},e.setCommentRange=function(e,t){return ar(e).commentRange=t,e},e.getSyntheticLeadingComments=cr,e.setSyntheticLeadingComments=ur,e.addSyntheticLeadingComment=function(t,r,n,i){return ur(t,e.append(cr(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:i,text:n}))},e.getSyntheticTrailingComments=lr,e.setSyntheticTrailingComments=_r,e.addSyntheticTrailingComment=function(t,r,n,i){return _r(t,e.append(lr(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:i,text:n}))},e.moveSyntheticComments=function(e,t){ur(e,cr(t)),_r(e,lr(t));var r=ar(t);return r.leadingComments=void 0,r.trailingComments=void 0,e},e.getConstantValue=function(e){var t=e.emitNode;return t&&t.constantValue},e.setConstantValue=function(e,t){return ar(e).constantValue=t,e},e.addEmitHelper=function(t,r){var n=ar(t);return n.helpers=e.append(n.helpers,r),t},e.addEmitHelpers=function(t,r){if(e.some(r))for(var n=ar(t),i=0,a=r;i<a.length;i++){var o=a[i];n.helpers=e.appendIfUnique(n.helpers,o)}return t},e.removeEmitHelper=function(t,r){var n=t.emitNode;if(n){var i=n.helpers;if(i)return e.orderedRemoveItem(i,r)}return!1},e.getEmitHelpers=function(e){var t=e.emitNode;return t&&t.helpers},e.moveEmitHelpers=function(t,r,n){var i=t.emitNode,a=i&&i.helpers;if(e.some(a)){for(var o=ar(r),s=0,c=0;c<a.length;c++){var u=a[c];n(u)?(s++,o.helpers=e.appendIfUnique(o.helpers,u)):s>0&&(a[c-s]=u)}s>0&&(a.length-=s)}},e.compareEmitHelpers=function(t,r){return t===r?0:t.priority===r.priority?0:void 0===t.priority?1:void 0===r.priority?-1:e.compareValues(t.priority,r.priority)},e.setOriginalNode=dr}(s||(s={})),function(e){function r(t,r,n){if(e.isComputedPropertyName(r))return e.setTextRange(e.createElementAccess(t,r.expression),n);var i=e.setTextRange(e.isIdentifier(r)?e.createPropertyAccess(t,r):e.createElementAccess(t,r),r);return e.getOrCreateEmitNode(i).flags|=64,i}function n(t,r){var n=e.createIdentifier(t||"React");return n.flags&=-9,n.parent=e.getParseTreeNode(r),n}function i(t,r,i){return t?function t(r,i){if(e.isQualifiedName(r)){var a=t(r.left,i),o=e.createIdentifier(e.idText(r.right));return o.escapedText=r.right.escapedText,e.createPropertyAccess(a,o)}return n(e.idText(r),i)}(t,i):e.createPropertyAccess(n(r,i),"createElement")}function a(t){return e.setEmitFlags(e.createIdentifier(t),4098)}function o(t,r){var n=e.skipParentheses(t);switch(n.kind){case 75:return r;case 103:case 8:case 9:case 10:return!1;case 191:return 0!==n.elements.length;case 192:return n.properties.length>0;default:return!0}}function s(t){return e.isIdentifier(t)?e.createLiteral(t):e.isComputedPropertyName(t)?e.getMutableClone(t.expression):e.getMutableClone(t)}function c(e,t,r){return u(e,t,r,8192)}function u(t,r,n,i){void 0===i&&(i=0);var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.getMutableClone(a);return i|=e.getEmitFlags(a),n||(i|=48),r||(i|=1536),i&&e.setEmitFlags(o,i),o}return e.getGeneratedNameForNode(t)}function l(t,r,n,i){var a=e.createPropertyAccess(t,e.nodeIsSynthesized(r)?r:e.getSynthesizedClone(r));e.setTextRange(a,r);var o=0;return i||(o|=48),n||(o|=1536),o&&e.setEmitFlags(a,o),a}function _(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function d(t,r,n){e.Debug.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=r.length;a<o;){var s=r[a];if(!e.isPrologueDirective(s))break;_(s)&&(i=!0),t.push(s),a++}return n&&!i&&t.push(C(e.createStatement(e.createLiteral("use strict")))),a}function p(t,r,n,i){for(var a=r.length;void 0!==n&&n<a;){var o=r[n];if(!(1048576&e.getEmitFlags(o)))break;e.append(t,i?e.visitNode(o,i,e.isStatement):o),n++}return n}function f(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!e.isPrologueDirective(i))break;if(_(i))return i}}function m(t){if(t=e.skipPartiallyEmittedExpressions(t),e.isLiteralKind(t.kind))return t.kind;if(208===t.kind&&39===t.operatorToken.kind){if(void 0!==t.cachedLiteralKind)return t.cachedLiteralKind;var r=m(t.left),n=e.isLiteralKind(r)&&r===m(t.right)?r:0;return t.cachedLiteralKind=n,n}return 0}function g(t){var r=e.skipPartiallyEmittedExpressions(t);return e.isLeftHandSideExpression(r)&&(196!==r.kind||r.arguments)?t:e.setTextRange(e.createParen(t),t)}function y(t){var r=e.skipPartiallyEmittedExpressions(t);return e.getExpressionPrecedence(r)>e.getOperatorPrecedence(208,27)?t:e.setTextRange(e.createParen(t),t)}function h(t){return 179===t.kind?e.createParenthesizedType(t):t}function v(t){switch(t.kind){case 177:case 178:case 169:case 170:return e.createParenthesizedType(t)}return h(t)}function b(e,t){for(;;){switch(e.kind){case 207:e=e.operand;continue;case 208:e=e.left;continue;case 209:e=e.condition;continue;case 197:e=e.tag;continue;case 195:if(t)return e;case 216:case 194:case 193:case 217:case 319:e=e.expression;continue}return e}}function x(e){return 208===e.kind&&27===e.operatorToken.kind||320===e.kind}function D(e,t){switch(void 0===t&&(t=7),e.kind){case 199:return 0!=(1&t);case 198:case 216:case 217:return 0!=(2&t);case 319:return 0!=(4&t)}return!1}function S(t,r){var n;void 0===r&&(r=7);do{n=t,1&r&&(t=e.skipParentheses(t)),2&r&&(t=T(t)),4&r&&(t=e.skipPartiallyEmittedExpressions(t))}while(n!==t);return t}function T(t){for(;e.isAssertionExpression(t)||217===t.kind;)t=t.expression;return t}function E(t,r,n){return void 0===n&&(n=7),t&&D(t,n)&&!function(t){return 199===t.kind&&e.nodeIsSynthesized(t)&&e.nodeIsSynthesized(e.getSourceMapRange(t))&&e.nodeIsSynthesized(e.getCommentRange(t))&&!e.some(e.getSyntheticLeadingComments(t))&&!e.some(e.getSyntheticTrailingComments(t))}(t)?function(t,r){switch(t.kind){case 199:return e.updateParen(t,r);case 198:return e.updateTypeAssertion(t,t.type,r);case 216:return e.updateAsExpression(t,r,t.type);case 217:return e.updateNonNullExpression(t,r);case 319:return e.updatePartiallyEmittedExpression(t,r)}}(t,E(t.expression,r)):r}function C(t){return e.setStartsOnNewLine(t,!0)}function k(t){var r=e.getOriginalNode(t,e.isSourceFile),n=r&&r.emitNode;return n&&n.externalHelpersModuleName}function N(t,r,n,i){if(r.importHelpers&&e.isEffectiveExternalModule(t,r)){var a=k(t);if(a)return a;var o=e.getEmitModuleKind(r),s=(n||r.esModuleInterop&&i)&&o!==e.ModuleKind.System&&o!==e.ModuleKind.ES2015&&o!==e.ModuleKind.ESNext;if(!s){var c=e.getEmitHelpers(t);if(c)for(var u=0,l=c;u<l.length;u++){if(!l[u].scoped){s=!0;break}}}if(s){var _=e.getOriginalNode(t,e.isSourceFile),d=e.getOrCreateEmitNode(_);return d.externalHelpersModuleName||(d.externalHelpersModuleName=e.createUniqueName(e.externalHelpersModuleNameText))}}}function A(t,r,n){if(t)return t.moduleName?e.createLiteral(t.moduleName):t.isDeclarationFile||!n.out&&!n.outFile?void 0:e.createLiteral(e.getExternalModuleNameFromPath(r,t.fileName))}function F(t){if(e.isDeclarationBindingElement(t))return t.name;if(!e.isObjectLiteralElementLike(t))return e.isAssignmentExpression(t,!0)?F(t.left):e.isSpreadElement(t)?F(t.expression):t;switch(t.kind){case 279:return F(t.initializer);case 280:return t.name;case 281:return F(t.expression)}}function P(e){var t=e.kind;return 10===t||8===t}function w(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpread(t.name),t),t);var r=R(t.name);return t.initializer?e.setOriginalNode(e.setTextRange(e.createAssignment(r,t.initializer),t),t):r}return e.Debug.assertNode(t,e.isExpression),t}function I(t){if(e.isBindingElement(t)){if(t.dotDotDotToken)return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){var r=R(t.name);return e.setOriginalNode(e.setTextRange(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(r,t.initializer):r),t),t)}return e.Debug.assertNode(t.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return e.Debug.assertNode(t,e.isObjectLiteralElementLike),t}function O(e){switch(e.kind){case 189:case 191:return L(e);case 188:case 192:return M(e)}}function M(t){return e.isObjectBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createObjectLiteral(e.map(t.elements,I)),t),t):(e.Debug.assertNode(t,e.isObjectLiteralExpression),t)}function L(t){return e.isArrayBindingPattern(t)?e.setOriginalNode(e.setTextRange(e.createArrayLiteral(e.map(t.elements,w)),t),t):(e.Debug.assertNode(t,e.isArrayLiteralExpression),t)}function R(t){return e.isBindingPattern(t)?O(t):(e.Debug.assertNode(t,e.isExpression),t)}e.nullTransformationContext={enableEmitNotification:e.noop,enableSubstitution:e.noop,endLexicalEnvironment:e.returnUndefined,getCompilerOptions:e.notImplemented,getEmitHost:e.notImplemented,getEmitResolver:e.notImplemented,hoistFunctionDeclaration:e.noop,hoistVariableDeclaration:e.noop,isEmitNotificationEnabled:e.notImplemented,isSubstitutionEnabled:e.notImplemented,onEmitNode:e.noop,onSubstituteNode:e.notImplemented,readEmitHelpers:e.notImplemented,requestEmitHelper:e.noop,resumeLexicalEnvironment:e.noop,startLexicalEnvironment:e.noop,suspendLexicalEnvironment:e.noop,addDiagnostic:e.noop},e.createTypeCheck=function(t,r){return"undefined"===r?e.createStrictEquality(t,e.createVoidZero()):e.createStrictEquality(e.createTypeOf(t),e.createLiteral(r))},e.createMemberAccessForPropertyName=r,e.createFunctionCall=function(r,n,i,a){return e.setTextRange(e.createCall(e.createPropertyAccess(r,"call"),void 0,t([n],i)),a)},e.createFunctionApply=function(t,r,n,i){return e.setTextRange(e.createCall(e.createPropertyAccess(t,"apply"),void 0,[r,n]),i)},e.createArraySlice=function(t,r){var n=[];return void 0!==r&&n.push("number"==typeof r?e.createLiteral(r):r),e.createCall(e.createPropertyAccess(t,"slice"),void 0,n)},e.createArrayConcat=function(t,r){return e.createCall(e.createPropertyAccess(t,"concat"),void 0,r)},e.createMathPow=function(t,r,n){return e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Math"),"pow"),void 0,[t,r]),n)},e.createExpressionForJsxElement=function(t,r,n,a,o,s,c){var u=[n];if(a&&u.push(a),o&&o.length>0)if(a||u.push(e.createNull()),o.length>1)for(var l=0,_=o;l<_.length;l++){var d=_[l];C(d),u.push(d)}else u.push(o[0]);return e.setTextRange(e.createCall(i(t,r,s),void 0,u),c)},e.createExpressionForJsxFragment=function(t,r,a,o,s){var c=[e.createPropertyAccess(n(r,o),"Fragment")];if(c.push(e.createNull()),a&&a.length>0)if(a.length>1)for(var u=0,l=a;u<l.length;u++){var _=l[u];C(_),c.push(_)}else c.push(a[0]);return e.setTextRange(e.createCall(i(t,r,o),void 0,c),s)},e.getUnscopedHelperName=a,e.valuesHelper={name:"typescript:values",importName:"__values",scoped:!1,text:'\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n };'},e.createValuesHelper=function(t,r,n){return t.requestEmitHelper(e.valuesHelper),e.setTextRange(e.createCall(a("__values"),void 0,[r]),n)},e.readHelper={name:"typescript:read",importName:"__read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},e.createReadHelper=function(t,r,n,i){return t.requestEmitHelper(e.readHelper),e.setTextRange(e.createCall(a("__read"),void 0,void 0!==n?[r,e.createLiteral(n)]:[r]),i)},e.spreadHelper={name:"typescript:spread",importName:"__spread",scoped:!1,text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"},e.createSpreadHelper=function(t,r,n){return t.requestEmitHelper(e.readHelper),t.requestEmitHelper(e.spreadHelper),e.setTextRange(e.createCall(a("__spread"),void 0,r),n)},e.spreadArraysHelper={name:"typescript:spreadArrays",importName:"__spreadArrays",scoped:!1,text:"\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };"},e.createSpreadArraysHelper=function(t,r,n){return t.requestEmitHelper(e.spreadArraysHelper),e.setTextRange(e.createCall(a("__spreadArrays"),void 0,r),n)},e.createForOfBindingStatement=function(t,r){if(e.isVariableDeclarationList(t)){var n=e.first(t.declarations),i=e.updateVariableDeclaration(n,n.name,void 0,r);return e.setTextRange(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}var a=e.setTextRange(e.createAssignment(t,r),t);return e.setTextRange(e.createStatement(a),t)},e.insertLeadingStatement=function(r,n){return e.isBlock(r)?e.updateBlock(r,e.setTextRange(e.createNodeArray(t([n],r.statements)),r.statements)):e.createBlock(e.createNodeArray([r,n]),!0)},e.restoreEnclosingLabel=function t(r,n,i){if(!n)return r;var a=e.updateLabel(n,n.label,237===n.statement.kind?t(r,n.statement):r);return i&&i(n),a},e.createCallBinding=function(t,r,n,i){void 0===i&&(i=!1);var a,s,c=S(t,7);if(e.isSuperProperty(c))a=e.createThis(),s=c;else if(101===c.kind)a=e.createThis(),s=n<2?e.setTextRange(e.createIdentifier("_super"),c):c;else if(4096&e.getEmitFlags(c))a=e.createVoidZero(),s=g(c);else switch(c.kind){case 193:o(c.expression,i)?(a=e.createTempVariable(r),s=e.createPropertyAccess(e.setTextRange(e.createAssignment(a,c.expression),c.expression),c.name),e.setTextRange(s,c)):(a=c.expression,s=c);break;case 194:o(c.expression,i)?(a=e.createTempVariable(r),s=e.createElementAccess(e.setTextRange(e.createAssignment(a,c.expression),c.expression),c.argumentExpression),e.setTextRange(s,c)):(a=c.expression,s=c);break;default:a=e.createVoidZero(),s=g(t)}return{target:s,thisArg:a}},e.inlineExpressions=function(t){return t.length>10?e.createCommaList(t):e.reduceLeft(t,e.createComma)},e.createExpressionFromEntityName=function t(r){if(e.isQualifiedName(r)){var n=t(r.left),i=e.getMutableClone(r.right);return e.setTextRange(e.createPropertyAccess(n,i),r)}return e.getMutableClone(r)},e.createExpressionForPropertyName=s,e.createExpressionForObjectLiteralElementLike=function(t,n,i){switch(n.kind){case 162:case 163:return function(t,r,n,i){var a=e.getAllAccessorDeclarations(t,r),o=a.firstAccessor,c=a.getAccessor,u=a.setAccessor;if(r===o){var l=[];if(c){var _=e.createFunctionExpression(c.modifiers,void 0,void 0,void 0,c.parameters,void 0,c.body);e.setTextRange(_,c),e.setOriginalNode(_,c);var d=e.createPropertyAssignment("get",_);l.push(d)}if(u){var p=e.createFunctionExpression(u.modifiers,void 0,void 0,void 0,u.parameters,void 0,u.body);e.setTextRange(p,u),e.setOriginalNode(p,u);var f=e.createPropertyAssignment("set",p);l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue())),l.push(e.createPropertyAssignment("configurable",e.createTrue()));var m=e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[n,s(r.name),e.createObjectLiteral(l,i)]),o);return e.aggregateTransformFlags(m)}return}(t.properties,n,i,!!t.multiLine);case 279:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),t.initializer),t),t))}(n,i);case 280:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),e.getSynthesizedClone(t.name)),t),t))}(n,i);case 160:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),e.setOriginalNode(e.setTextRange(e.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t))}(n,i)}},e.getInternalName=function(e,t,r){return u(e,t,r,49152)},e.isInternalName=function(t){return 0!=(32768&e.getEmitFlags(t))},e.getLocalName=function(e,t,r){return u(e,t,r,16384)},e.isLocalName=function(t){return 0!=(16384&e.getEmitFlags(t))},e.getExportName=c,e.isExportName=function(t){return 0!=(8192&e.getEmitFlags(t))},e.getDeclarationName=function(e,t,r){return u(e,t,r)},e.getExternalModuleOrNamespaceExportName=function(t,r,n,i){return t&&e.hasModifier(r,1)?l(t,u(r),n,i):c(r,n,i)},e.getNamespaceMemberName=l,e.convertToFunctionBody=function(t,r){return e.isBlock(t)?t:e.setTextRange(e.createBlock([e.setTextRange(e.createReturn(t),t)],r),t)},e.convertFunctionDeclarationToExpression=function(t){if(!t.body)return e.Debug.fail();var r=e.createFunctionExpression(t.modifiers,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);return e.setOriginalNode(r,t),e.setTextRange(r,t),e.getStartsOnNewLine(t)&&e.setStartsOnNewLine(r,!0),e.aggregateTransformFlags(r),r},e.addPrologue=function(e,t,r,n){return p(e,t,d(e,t,r),n)},e.addStandardPrologue=d,e.addCustomPrologue=p,e.findUseStrictPrologue=f,e.startsWithUseStrict=function(t){var r=e.firstOrUndefined(t);return void 0!==r&&e.isPrologueDirective(r)&&_(r)},e.ensureUseStrict=function(r){return f(r)?r:e.setTextRange(e.createNodeArray(t([C(e.createStatement(e.createLiteral("use strict")))],r)),r)},e.parenthesizeBinaryOperand=function(t,r,n,i){return 199===e.skipPartiallyEmittedExpressions(r).kind?r:function(t,r,n,i){var a=e.getOperatorPrecedence(208,t),o=e.getOperatorAssociativity(208,t),s=e.skipPartiallyEmittedExpressions(r);if(!n&&201===r.kind&&a>3)return!0;var c=e.getExpressionPrecedence(s);switch(e.compareValues(c,a)){case-1:return!(!n&&1===o&&211===r.kind);case 1:return!1;case 0:if(n)return 1===o;if(e.isBinaryExpression(s)&&s.operatorToken.kind===t){if(function(e){return 41===e||51===e||50===e||52===e}(t))return!1;if(39===t){var u=i?m(i):0;if(e.isLiteralKind(u)&&u===m(s))return!1}}return 0===e.getExpressionAssociativity(s)}}(t,r,n,i)?e.createParen(r):r},e.parenthesizeForConditionalHead=function(t){var r=e.getOperatorPrecedence(209,57),n=e.skipPartiallyEmittedExpressions(t),i=e.getExpressionPrecedence(n);return 1!==e.compareValues(i,r)?e.createParen(t):t},e.parenthesizeSubexpressionOfConditionalExpression=function(t){return x(e.skipPartiallyEmittedExpressions(t))?e.createParen(t):t},e.parenthesizeDefaultExpression=function(t){var r=e.skipPartiallyEmittedExpressions(t),n=x(r);if(!n)switch(b(r,!1).kind){case 213:case 200:n=!0}return n?e.createParen(t):t},e.parenthesizeForNew=function(t){var r=b(t,!0);switch(r.kind){case 195:return e.createParen(t);case 196:return r.arguments?t:e.createParen(t)}return g(t)},e.parenthesizeForAccess=g,e.parenthesizePostfixOperand=function(t){return e.isLeftHandSideExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizePrefixOperand=function(t){return e.isUnaryExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizeListElements=function(t){for(var r,n=0;n<t.length;n++){var i=y(t[n]);void 0===r&&i===t[n]||(void 0===r&&(r=t.slice(0,n)),r.push(i))}return void 0!==r?e.setTextRange(e.createNodeArray(r,t.hasTrailingComma),t):t},e.parenthesizeExpressionForList=y,e.parenthesizeExpressionForExpressionStatement=function(t){var r=e.skipPartiallyEmittedExpressions(t);if(e.isCallExpression(r)){var n=r.expression,i=e.skipPartiallyEmittedExpressions(n).kind;if(200===i||201===i){var a=e.getMutableClone(r);return a.expression=e.setTextRange(e.createParen(n),n),E(t,a,4)}}var o=b(r,!1).kind;return 192===o||200===o?e.setTextRange(e.createParen(t),t):t},e.parenthesizeConditionalTypeMember=h,e.parenthesizeElementTypeMember=v,e.parenthesizeArrayTypeMember=function(t){switch(t.kind){case 171:case 183:case 180:return e.createParenthesizedType(t)}return v(t)},e.parenthesizeElementTypeMembers=function(t){return e.createNodeArray(e.sameMap(t,v))},e.parenthesizeTypeParameters=function(t){if(e.some(t)){for(var r=[],n=0;n<t.length;++n){var i=t[n];r.push(0===n&&e.isFunctionOrConstructorTypeNode(i)&&i.typeParameters?e.createParenthesizedType(i):i)}return e.createNodeArray(r)}},e.getLeftmostExpression=b,e.parenthesizeConciseBody=function(t){return e.isBlock(t)||!x(t)&&192!==b(t,!1).kind?t:e.setTextRange(e.createParen(t),t)},e.isCommaSequence=x,function(e){e[e.Parentheses=1]="Parentheses",e[e.Assertions=2]="Assertions",e[e.PartiallyEmittedExpressions=4]="PartiallyEmittedExpressions",e[e.All=7]="All"}(e.OuterExpressionKinds||(e.OuterExpressionKinds={})),e.isOuterExpression=D,e.skipOuterExpressions=S,e.skipAssertions=T,e.recreateOuterExpressions=E,e.startOnNewLine=C,e.getExternalHelpersModuleName=k,e.hasRecordedExternalHelpers=function(t){var r=e.getOriginalNode(t,e.isSourceFile),n=r&&r.emitNode;return!(!n||!n.externalHelpersModuleName&&!n.externalHelpers)},e.createExternalHelpersImportDeclarationIfNeeded=function(t,r,n,i,o){if(r.importHelpers&&e.isEffectiveExternalModule(t,r)){var s=void 0,c=e.getEmitModuleKind(r);if(c>=e.ModuleKind.ES2015&&c<=e.ModuleKind.ESNext){var u=e.getEmitHelpers(t);if(u){for(var l=[],_=0,d=u;_<d.length;_++){var p=d[_];if(!p.scoped){var f=p.importName;f&&e.pushIfUnique(l,f)}}if(e.some(l)){l.sort(e.compareStringsCaseSensitive),s=e.createNamedImports(e.map(l,(function(r){return e.isFileLevelUniqueName(t,r)?e.createImportSpecifier(void 0,e.createIdentifier(r)):e.createImportSpecifier(e.createIdentifier(r),a(r))})));var m=e.getOriginalNode(t,e.isSourceFile);e.getOrCreateEmitNode(m).externalHelpers=!0}}}else{var g=N(t,r,n,i||o);g&&(s=e.createNamespaceImport(g))}if(s){var y=e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,s),e.createLiteral(e.externalHelpersModuleNameText));return e.addEmitFlags(y,67108864),y}}},e.getOrCreateExternalHelpersModuleNameIfNeeded=N,e.getLocalNameForExternalImport=function(t,r){var n=e.getNamespaceDeclarationNode(t);if(n&&!e.isDefaultImport(t)){var i=n.name;return e.isGeneratedIdentifier(i)?i:e.createIdentifier(e.getSourceTextOfNodeFromSourceFile(r,i)||e.idText(i))}return 253===t.kind&&t.importClause?e.getGeneratedNameForNode(t):259===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0},e.getExternalModuleNameLiteral=function(t,r,n,i,a){var o=e.getExternalModuleName(t);if(10===o.kind)return function(e,t,r,n){return A(r.getExternalModuleFileFromDeclaration(e),t,n)}(t,n,i,a)||function(t,r){var n=r.renamedDependencies&&r.renamedDependencies.get(t.text);return n&&e.createLiteral(n)}(o,r)||e.getSynthesizedClone(o)},e.tryGetModuleNameFromFile=A,e.getInitializerOfBindingOrAssignmentElement=function t(r){if(e.isDeclarationBindingElement(r))return r.initializer;if(e.isPropertyAssignment(r)){var n=r.initializer;return e.isAssignmentExpression(n,!0)?n.right:void 0}return e.isShorthandPropertyAssignment(r)?r.objectAssignmentInitializer:e.isAssignmentExpression(r,!0)?r.right:e.isSpreadElement(r)?t(r.expression):void 0},e.getTargetOfBindingOrAssignmentElement=F,e.getRestIndicatorOfBindingOrAssignmentElement=function(e){switch(e.kind){case 155:case 190:return e.dotDotDotToken;case 212:case 281:return e}},e.getPropertyNameOfBindingOrAssignmentElement=function(t){switch(t.kind){case 190:if(t.propertyName){var r=t.propertyName;return e.isComputedPropertyName(r)&&P(r.expression)?r.expression:r}break;case 279:if(t.name){r=t.name;return e.isComputedPropertyName(r)&&P(r.expression)?r.expression:r}break;case 281:return t.name}var n=F(t);if(n&&e.isPropertyName(n))return e.isComputedPropertyName(n)&&P(n.expression)?n.expression:n;e.Debug.fail("Invalid property name for binding element.")},e.getElementsOfBindingOrAssignmentPattern=function(e){switch(e.kind){case 188:case 189:case 191:return e.elements;case 192:return e.properties}},e.convertToArrayAssignmentElement=w,e.convertToObjectAssignmentElement=I,e.convertToAssignmentPattern=O,e.convertToObjectAssignmentPattern=M,e.convertToArrayAssignmentPattern=L,e.convertToAssignmentElementTarget=R}(s||(s={})),function(e){var t=e.or(e.isTypeNode,e.isTypeParameterDeclaration);function r(t,r,n,i){if(void 0===t||void 0===r)return t;e.aggregateTransformFlags(t);var a,o=r(t);return o===t?t:void 0!==o?(a=e.isArray(o)?(i||s)(o):o,e.Debug.assertNode(a,n),e.aggregateTransformFlags(a),a):void 0}function n(t,r,n,i,a){if(void 0===t||void 0===r)return t;var o,s=t.length;(void 0===i||i<0)&&(i=0),(void 0===a||a>s-i)&&(a=s-i),(i>0||a<s)&&(o=e.createNodeArray([],t.hasTrailingComma&&i+a===s));for(var c=0;c<a;c++){var u=t[c+i];e.aggregateTransformFlags(u);var l=void 0!==u?r(u):void 0;if((void 0!==o||void 0===l||l!==u)&&(void 0===o&&(o=e.createNodeArray(t.slice(0,c),t.hasTrailingComma),e.setTextRange(o,t)),l))if(e.isArray(l))for(var _=0,d=l;_<d.length;_++){var p=d[_];e.Debug.assertNode(p,n),e.aggregateTransformFlags(p),o.push(p)}else e.Debug.assertNode(l,n),e.aggregateTransformFlags(l),o.push(l)}return o||t}function i(t,r,i,a,o){return i.startLexicalEnvironment(),t=n(t,r,e.isStatement,a),o&&(t=e.ensureUseStrict(t)),e.mergeLexicalEnvironment(t,i.endLexicalEnvironment())}function a(t,r,i,a){void 0===a&&(a=n),i.startLexicalEnvironment();var o=a(t,r,e.isParameterDeclaration);return i.suspendLexicalEnvironment(),o}function o(t,n,i){i.resumeLexicalEnvironment();var a=r(t,n,e.isConciseBody),o=i.endLexicalEnvironment();if(e.some(o)){var s=e.convertToFunctionBody(a),c=e.mergeLexicalEnvironment(s.statements,o);return e.updateBlock(s,c)}return a}function s(t){return e.Debug.assert(t.length<=1,"Too many nodes written to output."),e.singleOrUndefined(t)}e.visitNode=r,e.visitNodes=n,e.visitLexicalEnvironment=i,e.visitParameterList=a,e.visitFunctionBody=o,e.visitEachChild=function(s,c,u,l,_){if(void 0===l&&(l=n),void 0!==s){var d=s.kind;if(d>0&&d<=151||182===d)return s;switch(d){case 75:return e.updateIdentifier(s,l(s.typeArguments,c,t));case 152:return e.updateQualifiedName(s,r(s.left,c,e.isEntityName),r(s.right,c,e.isIdentifier));case 153:return e.updateComputedPropertyName(s,r(s.expression,c,e.isExpression));case 154:return e.updateTypeParameterDeclaration(s,r(s.name,c,e.isIdentifier),r(s.constraint,c,e.isTypeNode),r(s.default,c,e.isTypeNode));case 155:return e.updateParameter(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.dotDotDotToken,_,e.isToken),r(s.name,c,e.isBindingName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 156:return e.updateDecorator(s,r(s.expression,c,e.isExpression));case 157:return e.updatePropertySignature(s,l(s.modifiers,c,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 158:return e.updateProperty(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),r(s.questionToken||s.exclamationToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 159:return e.updateMethodSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken));case 160:return e.updateMethod(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 161:return e.updateConstructor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),a(s.parameters,c,u,l),o(s.body,c,u));case 162:return e.updateGetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 163:return e.updateSetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),o(s.body,c,u));case 164:return e.updateCallSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 165:return e.updateConstructSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 166:return e.updateIndexSignature(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 167:return e.updateTypePredicateNodeWithModifier(s,r(s.assertsModifier,c),r(s.parameterName,c),r(s.type,c,e.isTypeNode));case 168:return e.updateTypeReferenceNode(s,r(s.typeName,c,e.isEntityName),l(s.typeArguments,c,e.isTypeNode));case 169:return e.updateFunctionTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 170:return e.updateConstructorTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 171:return e.updateTypeQueryNode(s,r(s.exprName,c,e.isEntityName));case 172:return e.updateTypeLiteralNode(s,l(s.members,c,e.isTypeElement));case 173:return e.updateArrayTypeNode(s,r(s.elementType,c,e.isTypeNode));case 174:return e.updateTupleTypeNode(s,l(s.elementTypes,c,e.isTypeNode));case 175:return e.updateOptionalTypeNode(s,r(s.type,c,e.isTypeNode));case 176:return e.updateRestTypeNode(s,r(s.type,c,e.isTypeNode));case 177:return e.updateUnionTypeNode(s,l(s.types,c,e.isTypeNode));case 178:return e.updateIntersectionTypeNode(s,l(s.types,c,e.isTypeNode));case 179:return e.updateConditionalTypeNode(s,r(s.checkType,c,e.isTypeNode),r(s.extendsType,c,e.isTypeNode),r(s.trueType,c,e.isTypeNode),r(s.falseType,c,e.isTypeNode));case 180:return e.updateInferTypeNode(s,r(s.typeParameter,c,e.isTypeParameterDeclaration));case 187:return e.updateImportTypeNode(s,r(s.argument,c,e.isTypeNode),r(s.qualifier,c,e.isEntityName),n(s.typeArguments,c,e.isTypeNode),s.isTypeOf);case 181:return e.updateParenthesizedType(s,r(s.type,c,e.isTypeNode));case 183:return e.updateTypeOperatorNode(s,r(s.type,c,e.isTypeNode));case 184:return e.updateIndexedAccessTypeNode(s,r(s.objectType,c,e.isTypeNode),r(s.indexType,c,e.isTypeNode));case 185:return e.updateMappedTypeNode(s,r(s.readonlyToken,_,e.isToken),r(s.typeParameter,c,e.isTypeParameterDeclaration),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode));case 186:return e.updateLiteralTypeNode(s,r(s.literal,c,e.isExpression));case 188:return e.updateObjectBindingPattern(s,l(s.elements,c,e.isBindingElement));case 189:return e.updateArrayBindingPattern(s,l(s.elements,c,e.isArrayBindingElement));case 190:return e.updateBindingElement(s,r(s.dotDotDotToken,_,e.isToken),r(s.propertyName,c,e.isPropertyName),r(s.name,c,e.isBindingName),r(s.initializer,c,e.isExpression));case 191:return e.updateArrayLiteral(s,l(s.elements,c,e.isExpression));case 192:return e.updateObjectLiteral(s,l(s.properties,c,e.isObjectLiteralElementLike));case 193:return 32&s.flags?e.updatePropertyAccessChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),r(s.name,c,e.isIdentifier)):e.updatePropertyAccess(s,r(s.expression,c,e.isExpression),r(s.name,c,e.isIdentifier));case 194:return 32&s.flags?e.updateElementAccessChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),r(s.argumentExpression,c,e.isExpression)):e.updateElementAccess(s,r(s.expression,c,e.isExpression),r(s.argumentExpression,c,e.isExpression));case 195:return 32&s.flags?e.updateCallChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression)):e.updateCall(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 196:return e.updateNew(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 197:return e.updateTaggedTemplate(s,r(s.tag,c,e.isExpression),n(s.typeArguments,c,e.isExpression),r(s.template,c,e.isTemplateLiteral));case 198:return e.updateTypeAssertion(s,r(s.type,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 199:return e.updateParen(s,r(s.expression,c,e.isExpression));case 200:return e.updateFunctionExpression(s,l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 201:return e.updateArrowFunction(s,l(s.modifiers,c,e.isModifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),r(s.equalsGreaterThanToken,c,e.isToken),o(s.body,c,u));case 202:return e.updateDelete(s,r(s.expression,c,e.isExpression));case 203:return e.updateTypeOf(s,r(s.expression,c,e.isExpression));case 204:return e.updateVoid(s,r(s.expression,c,e.isExpression));case 205:return e.updateAwait(s,r(s.expression,c,e.isExpression));case 206:return e.updatePrefix(s,r(s.operand,c,e.isExpression));case 207:return e.updatePostfix(s,r(s.operand,c,e.isExpression));case 208:return e.updateBinary(s,r(s.left,c,e.isExpression),r(s.right,c,e.isExpression),r(s.operatorToken,c,e.isToken));case 209:return e.updateConditional(s,r(s.condition,c,e.isExpression),r(s.questionToken,c,e.isToken),r(s.whenTrue,c,e.isExpression),r(s.colonToken,c,e.isToken),r(s.whenFalse,c,e.isExpression));case 210:return e.updateTemplateExpression(s,r(s.head,c,e.isTemplateHead),l(s.templateSpans,c,e.isTemplateSpan));case 211:return e.updateYield(s,r(s.asteriskToken,_,e.isToken),r(s.expression,c,e.isExpression));case 212:return e.updateSpread(s,r(s.expression,c,e.isExpression));case 213:return e.updateClassExpression(s,l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 215:return e.updateExpressionWithTypeArguments(s,l(s.typeArguments,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 216:return e.updateAsExpression(s,r(s.expression,c,e.isExpression),r(s.type,c,e.isTypeNode));case 217:return e.updateNonNullExpression(s,r(s.expression,c,e.isExpression));case 218:return e.updateMetaProperty(s,r(s.name,c,e.isIdentifier));case 220:return e.updateTemplateSpan(s,r(s.expression,c,e.isExpression),r(s.literal,c,e.isTemplateMiddleOrTemplateTail));case 222:return e.updateBlock(s,l(s.statements,c,e.isStatement));case 224:return e.updateVariableStatement(s,l(s.modifiers,c,e.isModifier),r(s.declarationList,c,e.isVariableDeclarationList));case 225:return e.updateExpressionStatement(s,r(s.expression,c,e.isExpression));case 226:return e.updateIf(s,r(s.expression,c,e.isExpression),r(s.thenStatement,c,e.isStatement,e.liftToBlock),r(s.elseStatement,c,e.isStatement,e.liftToBlock));case 227:return e.updateDo(s,r(s.statement,c,e.isStatement,e.liftToBlock),r(s.expression,c,e.isExpression));case 228:return e.updateWhile(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 229:return e.updateFor(s,r(s.initializer,c,e.isForInitializer),r(s.condition,c,e.isExpression),r(s.incrementor,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 230:return e.updateForIn(s,r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 231:return e.updateForOf(s,r(s.awaitModifier,c,e.isToken),r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 232:return e.updateContinue(s,r(s.label,c,e.isIdentifier));case 233:return e.updateBreak(s,r(s.label,c,e.isIdentifier));case 234:return e.updateReturn(s,r(s.expression,c,e.isExpression));case 235:return e.updateWith(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 236:return e.updateSwitch(s,r(s.expression,c,e.isExpression),r(s.caseBlock,c,e.isCaseBlock));case 237:return e.updateLabel(s,r(s.label,c,e.isIdentifier),r(s.statement,c,e.isStatement,e.liftToBlock));case 238:return e.updateThrow(s,r(s.expression,c,e.isExpression));case 239:return e.updateTry(s,r(s.tryBlock,c,e.isBlock),r(s.catchClause,c,e.isCatchClause),r(s.finallyBlock,c,e.isBlock));case 241:return e.updateVariableDeclaration(s,r(s.name,c,e.isBindingName),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 242:return e.updateVariableDeclarationList(s,l(s.declarations,c,e.isVariableDeclaration));case 243:return e.updateFunctionDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 244:return e.updateClassDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 245:return e.updateInterfaceDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isTypeElement));case 246:return e.updateTypeAliasDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),r(s.type,c,e.isTypeNode));case 247:return e.updateEnumDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.members,c,e.isEnumMember));case 248:return e.updateModuleDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.body,c,e.isModuleBody));case 249:return e.updateModuleBlock(s,l(s.statements,c,e.isStatement));case 250:return e.updateCaseBlock(s,l(s.clauses,c,e.isCaseOrDefaultClause));case 251:return e.updateNamespaceExportDeclaration(s,r(s.name,c,e.isIdentifier));case 252:return e.updateImportEqualsDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.moduleReference,c,e.isModuleReference));case 253:return e.updateImportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.importClause,c,e.isImportClause),r(s.moduleSpecifier,c,e.isExpression));case 254:return e.updateImportClause(s,r(s.name,c,e.isIdentifier),r(s.namedBindings,c,e.isNamedImportBindings));case 255:return e.updateNamespaceImport(s,r(s.name,c,e.isIdentifier));case 256:return e.updateNamedImports(s,l(s.elements,c,e.isImportSpecifier));case 257:return e.updateImportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 258:return e.updateExportAssignment(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.expression,c,e.isExpression));case 259:return e.updateExportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.exportClause,c,e.isNamedExports),r(s.moduleSpecifier,c,e.isExpression));case 260:return e.updateNamedExports(s,l(s.elements,c,e.isExportSpecifier));case 261:return e.updateExportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 263:return e.updateExternalModuleReference(s,r(s.expression,c,e.isExpression));case 264:return e.updateJsxElement(s,r(s.openingElement,c,e.isJsxOpeningElement),l(s.children,c,e.isJsxChild),r(s.closingElement,c,e.isJsxClosingElement));case 265:return e.updateJsxSelfClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 266:return e.updateJsxOpeningElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 267:return e.updateJsxClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression));case 268:return e.updateJsxFragment(s,r(s.openingFragment,c,e.isJsxOpeningFragment),l(s.children,c,e.isJsxChild),r(s.closingFragment,c,e.isJsxClosingFragment));case 271:return e.updateJsxAttribute(s,r(s.name,c,e.isIdentifier),r(s.initializer,c,e.isStringLiteralOrJsxExpression));case 272:return e.updateJsxAttributes(s,l(s.properties,c,e.isJsxAttributeLike));case 273:return e.updateJsxSpreadAttribute(s,r(s.expression,c,e.isExpression));case 274:return e.updateJsxExpression(s,r(s.expression,c,e.isExpression));case 275:return e.updateCaseClause(s,r(s.expression,c,e.isExpression),l(s.statements,c,e.isStatement));case 276:return e.updateDefaultClause(s,l(s.statements,c,e.isStatement));case 277:return e.updateHeritageClause(s,l(s.types,c,e.isExpressionWithTypeArguments));case 278:return e.updateCatchClause(s,r(s.variableDeclaration,c,e.isVariableDeclaration),r(s.block,c,e.isBlock));case 279:return e.updatePropertyAssignment(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 280:return e.updateShorthandPropertyAssignment(s,r(s.name,c,e.isIdentifier),r(s.objectAssignmentInitializer,c,e.isExpression));case 281:return e.updateSpreadAssignment(s,r(s.expression,c,e.isExpression));case 282:return e.updateEnumMember(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 288:return e.updateSourceFileNode(s,i(s.statements,c,u));case 319:return e.updatePartiallyEmittedExpression(s,r(s.expression,c,e.isExpression));case 320:return e.updateCommaList(s,l(s.elements,c,e.isExpression));default:return s}}}}(s||(s={})),function(e){function t(e,t,r){return e?t(r,e):r}function r(e,t,r){return e?t(r,e):r}function n(n,i,a,o){if(void 0===n)return i;var s=o?r:e.reduceLeft,c=o||a,u=n.kind;if(u>0&&u<=151)return i;if(u>=167&&u<=186)return i;var l=i;switch(n.kind){case 221:case 223:case 214:case 240:case 318:break;case 152:l=t(n.left,a,l),l=t(n.right,a,l);break;case 153:l=t(n.expression,a,l);break;case 155:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 156:l=t(n.expression,a,l);break;case 157:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.questionToken,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 158:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 160:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 161:l=s(n.modifiers,c,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 162:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 163:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 188:case 189:l=s(n.elements,c,l);break;case 190:l=t(n.propertyName,a,l),l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 191:l=s(n.elements,c,l);break;case 192:l=s(n.properties,c,l);break;case 193:l=t(n.expression,a,l),l=t(n.name,a,l);break;case 194:l=t(n.expression,a,l),l=t(n.argumentExpression,a,l);break;case 195:case 196:l=t(n.expression,a,l),l=s(n.typeArguments,c,l),l=s(n.arguments,c,l);break;case 197:l=t(n.tag,a,l),l=s(n.typeArguments,c,l),l=t(n.template,a,l);break;case 198:l=t(n.type,a,l),l=t(n.expression,a,l);break;case 200:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 201:l=s(n.modifiers,c,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 199:case 202:case 203:case 204:case 205:case 211:case 212:case 217:l=t(n.expression,a,l);break;case 206:case 207:l=t(n.operand,a,l);break;case 208:l=t(n.left,a,l),l=t(n.right,a,l);break;case 209:l=t(n.condition,a,l),l=t(n.whenTrue,a,l),l=t(n.whenFalse,a,l);break;case 210:l=t(n.head,a,l),l=s(n.templateSpans,c,l);break;case 213:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 215:l=t(n.expression,a,l),l=s(n.typeArguments,c,l);break;case 216:l=t(n.expression,a,l),l=t(n.type,a,l);break;case 220:l=t(n.expression,a,l),l=t(n.literal,a,l);break;case 222:l=s(n.statements,c,l);break;case 224:l=s(n.modifiers,c,l),l=t(n.declarationList,a,l);break;case 225:l=t(n.expression,a,l);break;case 226:l=t(n.expression,a,l),l=t(n.thenStatement,a,l),l=t(n.elseStatement,a,l);break;case 227:l=t(n.statement,a,l),l=t(n.expression,a,l);break;case 228:case 235:l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 229:l=t(n.initializer,a,l),l=t(n.condition,a,l),l=t(n.incrementor,a,l),l=t(n.statement,a,l);break;case 230:case 231:l=t(n.initializer,a,l),l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 234:case 238:l=t(n.expression,a,l);break;case 236:l=t(n.expression,a,l),l=t(n.caseBlock,a,l);break;case 237:l=t(n.label,a,l),l=t(n.statement,a,l);break;case 239:l=t(n.tryBlock,a,l),l=t(n.catchClause,a,l),l=t(n.finallyBlock,a,l);break;case 241:l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 242:l=s(n.declarations,c,l);break;case 243:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 244:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 247:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.members,c,l);break;case 248:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.body,a,l);break;case 249:l=s(n.statements,c,l);break;case 250:l=s(n.clauses,c,l);break;case 252:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.moduleReference,a,l);break;case 253:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.importClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 254:l=t(n.name,a,l),l=t(n.namedBindings,a,l);break;case 255:l=t(n.name,a,l);break;case 256:case 260:l=s(n.elements,c,l);break;case 257:case 261:l=t(n.propertyName,a,l),l=t(n.name,a,l);break;case 258:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.expression,a,l);break;case 259:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.exportClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 263:l=t(n.expression,a,l);break;case 264:l=t(n.openingElement,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingElement,a,l);break;case 268:l=t(n.openingFragment,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingFragment,a,l);break;case 265:case 266:l=t(n.tagName,a,l),l=s(n.typeArguments,a,l),l=t(n.attributes,a,l);break;case 272:l=s(n.properties,c,l);break;case 267:l=t(n.tagName,a,l);break;case 271:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 273:case 274:l=t(n.expression,a,l);break;case 275:l=t(n.expression,a,l);case 276:l=s(n.statements,c,l);break;case 277:l=s(n.types,c,l);break;case 278:l=t(n.variableDeclaration,a,l),l=t(n.block,a,l);break;case 279:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 280:l=t(n.name,a,l),l=t(n.objectAssignmentInitializer,a,l);break;case 281:l=t(n.expression,a,l);break;case 282:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 288:l=s(n.statements,c,l);break;case 319:l=t(n.expression,a,l);break;case 320:l=s(n.elements,c,l)}return l}function i(t){if(void 0===t)return 0;if(536870912&t.transformFlags)return t.transformFlags&~e.getTransformFlagsSubtreeExclusions(t.kind);var r=function(t){if(e.hasModifier(t,2)||e.isTypeNode(t)&&215!==t.kind)return 0;return n(t,0,a,o)}(t);return e.computeTransformFlagsForNode(t,r)}function a(e,t){return e|i(t)}function o(e,t){return e|function(e){if(void 0===e)return 0;for(var t=0,r=0,n=0,a=e;n<a.length;n++){var o=a[n];t|=i(o),r|=-536870913&o.transformFlags}return e.transformFlags=536870912|r,t}(t)}e.reduceEachChild=n,e.mergeLexicalEnvironment=function(t,r){return e.some(r)?e.isNodeArray(t)?e.setTextRange(e.createNodeArray(e.insertStatementsAfterStandardPrologue(t.slice(),r)),t):e.insertStatementsAfterStandardPrologue(t,r):t},e.liftToBlock=function(t){return e.Debug.assert(e.every(t,e.isStatement),"Cannot lift nodes to a Block."),e.singleOrUndefined(t)||e.createBlock(t)},e.aggregateTransformFlags=function(e){return i(e),e}}(s||(s={})),function(e){e.createSourceMapGenerator=function(t,r,n,i,o){var c,u,l=o.extendedDiagnostics?e.performance.createTimer("Source Map","beforeSourcemap","afterSourcemap"):e.performance.nullTimer,_=l.enter,d=l.exit,p=[],f=[],m=e.createMap(),g=[],y="",h=0,v=0,b=0,x=0,D=0,S=0,T=!1,E=0,C=0,k=0,N=0,A=0,F=0,P=!1,w=!1,I=!1;return{getSources:function(){return p},addSource:O,setSourceContent:M,addName:L,addMapping:R,appendSourceMap:function(t,r,n,i,o,s){e.Debug.assert(t>=E,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),_();for(var c,u=[],l=a(n.mappings),p=l.next();!p.done;p=l.next()){var f=p.value;if(s&&(f.generatedLine>s.line||f.generatedLine===s.line&&f.generatedCharacter>s.character))break;if(!o||!(f.generatedLine<o.line||o.line===f.generatedLine&&f.generatedCharacter<o.character)){var m=void 0,g=void 0,y=void 0,h=void 0;if(void 0!==f.sourceIndex){if(void 0===(m=u[f.sourceIndex])){var v=n.sources[f.sourceIndex],b=n.sourceRoot?e.combinePaths(n.sourceRoot,v):v,x=e.combinePaths(e.getDirectoryPath(i),b);u[f.sourceIndex]=m=O(x),n.sourcesContent&&"string"==typeof n.sourcesContent[f.sourceIndex]&&M(m,n.sourcesContent[f.sourceIndex])}g=f.sourceLine,y=f.sourceCharacter,n.names&&void 0!==f.nameIndex&&(c||(c=[]),void 0===(h=c[f.nameIndex])&&(c[f.nameIndex]=h=L(n.names[f.nameIndex])))}var D=f.generatedLine-(o?o.line:0),S=D+t,T=o&&o.line===f.generatedLine?f.generatedCharacter-o.character:f.generatedCharacter;R(S,0===D?T+r:T,m,g,y,h)}}d()},toJSON:j,toString:function(){return JSON.stringify(j())}};function O(r){_();var n=e.getRelativePathToDirectoryOrUrl(i,r,t.getCurrentDirectory(),t.getCanonicalFileName,!0),a=m.get(n);return void 0===a&&(a=f.length,f.push(n),p.push(r),m.set(n,a)),d(),a}function M(e,t){if(_(),null!==t){for(c||(c=[]);c.length<e;)c.push(null);c[e]=t}d()}function L(t){_(),u||(u=e.createMap());var r=u.get(t);return void 0===r&&(r=g.length,g.push(t),u.set(t,r)),d(),r}function R(t,r,n,i,a,o){e.Debug.assert(t>=E,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),e.Debug.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),e.Debug.assert(void 0===i||i>=0,"sourceLine cannot be negative"),e.Debug.assert(void 0===a||a>=0,"sourceCharacter cannot be negative"),_(),(function(e,t){return!P||E!==e||C!==t}(t,r)||function(e,t,r){return void 0!==e&&void 0!==t&&void 0!==r&&k===e&&(N>t||N===t&&A>r)}(n,i,a))&&(B(),E=t,C=r,w=!1,I=!1,P=!0),void 0!==n&&void 0!==i&&void 0!==a&&(k=n,N=i,A=a,w=!0,void 0!==o&&(F=o,I=!0)),d()}function B(){if(P&&(!T||h!==E||v!==C||b!==k||x!==N||D!==A||S!==F)){if(_(),h<E)do{y+=";",h++,v=0}while(h<E);else e.Debug.assertEqual(h,E,"generatedLine cannot backtrack"),T&&(y+=",");y+=s(C-v),v=C,w&&(y+=s(k-b),b=k,y+=s(N-x),x=N,y+=s(A-D),D=A,I&&(y+=s(F-S),S=F)),T=!0,d()}}function j(){return B(),{version:3,file:r,sourceRoot:n,sources:f,names:g,mappings:y,sourcesContent:c}}};var t=/^\/\/[@#] source[M]appingURL=(.+)\s*$/,r=/^\s*(\/\/[@#] .*)?$/;function n(e){return"string"==typeof e||null===e}function i(t){return null!==t&&"object"===f(t)&&3===t.version&&"string"==typeof t.file&&"string"==typeof t.mappings&&e.isArray(t.sources)&&e.every(t.sources,e.isString)&&(void 0===t.sourceRoot||null===t.sourceRoot||"string"==typeof t.sourceRoot)&&(void 0===t.sourcesContent||null===t.sourcesContent||e.isArray(t.sourcesContent)&&e.every(t.sourcesContent,n))&&(void 0===t.names||null===t.names||e.isArray(t.names)&&e.every(t.names,e.isString))}function a(e){var t,r=!1,n=0,i=0,a=0,o=0,s=0,c=0,u=0;return{get pos(){return n},get error(){return t},get state(){return l(!0,!0)},next:function(){for(;!r&&n<e.length;){var t=e.charCodeAt(n);if(59!==t){if(44!==t){var d=!1,y=!1;if(a+=g(),f())return _();if(a<0)return p("Invalid generatedCharacter found");if(!m()){if(d=!0,o+=g(),f())return _();if(o<0)return p("Invalid sourceIndex found");if(m())return p("Unsupported Format: No entries after sourceIndex");if(s+=g(),f())return _();if(s<0)return p("Invalid sourceLine found");if(m())return p("Unsupported Format: No entries after sourceLine");if(c+=g(),f())return _();if(c<0)return p("Invalid sourceCharacter found");if(!m()){if(y=!0,u+=g(),f())return _();if(u<0)return p("Invalid nameIndex found");if(!m())return p("Unsupported Error Format: Entries after nameIndex")}}return{value:l(d,y),done:r}}n++}else i++,a=0,n++}return _()}};function l(e,t){return{generatedLine:i,generatedCharacter:a,sourceIndex:e?o:void 0,sourceLine:e?s:void 0,sourceCharacter:e?c:void 0,nameIndex:t?u:void 0}}function _(){return r=!0,{value:void 0,done:!0}}function d(e){void 0===t&&(t=e)}function p(e){return d(e),_()}function f(){return void 0!==t}function m(){return n===e.length||44===e.charCodeAt(n)||59===e.charCodeAt(n)}function g(){for(var t,r=!0,i=0,a=0;r;n++){if(n>=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;var o=(t=e.charCodeAt(n))>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:43===t?62:47===t?63:-1;if(-1===o)return d("Invalid character in VLQ"),-1;r=0!=(32&o),a|=(31&o)<<i,i+=5}return 0==(1&a)?a>>=1:a=-(a>>=1),a}}function o(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function s(t){t<0?t=1+(-t<<1):t<<=1;var r,n="";do{var i=31&t;(t>>=5)>0&&(i|=32),n+=String.fromCharCode((r=i)>=0&&r<26?65+r:r>=26&&r<52?97+r-26:r>=52&&r<62?48+r-52:62===r?43:63===r?47:e.Debug.fail(r+": not a base64 value"))}while(t>0);return n}function c(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function u(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function l(t,r){return e.Debug.assert(t.sourceIndex===r.sourceIndex),e.compareValues(t.sourcePosition,r.sourcePosition)}function _(t,r){return e.compareValues(t.generatedPosition,r.generatedPosition)}function d(e){return e.sourcePosition}function p(e){return e.generatedPosition}e.getLineInfo=function(e,t){return{getLineCount:function(){return t.length},getLineText:function(r){return e.substring(t[r],t[r+1])}}},e.tryGetSourceMappingURL=function(e){for(var n=e.getLineCount()-1;n>=0;n--){var i=e.getLineText(n),a=t.exec(i);if(a)return a[1];if(!i.match(r))break}},e.isRawSourceMap=i,e.tryParseRawSourceMap=function(e){try{var t=JSON.parse(e);if(i(t))return t}catch(e){}},e.decodeMappings=a,e.sameMapping=function(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex},e.isSourceMapping=o,e.createDocumentPositionMapper=function(t,r,n){var i,s,f,m=e.getDirectoryPath(n),g=r.sourceRoot?e.getNormalizedAbsolutePath(r.sourceRoot,m):m,y=e.getNormalizedAbsolutePath(r.file,m),h=t.getSourceFileLike(y),v=r.sources.map((function(t){return e.getNormalizedAbsolutePath(t,g)})),b=e.createMapFromEntries(v.map((function(e,r){return[t.getCanonicalFileName(e),r]})));return{getSourcePosition:function(t){var r=T();if(!e.some(r))return t;var n=e.binarySearchKey(r,t.pos,p,e.compareValues);n<0&&(n=~n);var i=r[n];if(void 0===i||!c(i))return t;return{fileName:v[i.sourceIndex],pos:i.sourcePosition}},getGeneratedPosition:function(r){var n=b.get(t.getCanonicalFileName(r.fileName));if(void 0===n)return r;var i=S(n);if(!e.some(i))return r;var a=e.binarySearchKey(i,r.pos,d,e.compareValues);a<0&&(a=~a);var o=i[a];if(void 0===o||o.sourceIndex!==n)return r;return{fileName:y,pos:o.generatedPosition}}};function x(n){var i,a,s=void 0!==h?e.getPositionOfLineAndCharacter(h,n.generatedLine,n.generatedCharacter,!0):-1;if(o(n)){var c=t.getSourceFileLike(v[n.sourceIndex]);i=r.sources[n.sourceIndex],a=void 0!==c?e.getPositionOfLineAndCharacter(c,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:s,source:i,sourceIndex:n.sourceIndex,sourcePosition:a,nameIndex:n.nameIndex}}function D(){if(void 0===i){var n=a(r.mappings),o=e.arrayFrom(n,x);void 0!==n.error?(t.log&&t.log("Encountered error while decoding sourcemap: "+n.error),i=e.emptyArray):i=o}return i}function S(t){if(void 0===f){for(var r=[],n=0,i=D();n<i.length;n++){var a=i[n];if(c(a)){var o=r[a.sourceIndex];o||(r[a.sourceIndex]=o=[]),o.push(a)}}f=r.map((function(t){return e.sortAndDeduplicate(t,l,u)}))}return f[t]}function T(){if(void 0===s){for(var t=[],r=0,n=D();r<n.length;r++){var i=n[r];t.push(i)}s=e.sortAndDeduplicate(t,_,u)}return s}},e.identitySourceMapConsumer={getSourcePosition:e.identity,getGeneratedPosition:e.identity}}(s||(s={})),function(e){function t(t){return(t=e.getOriginalNode(t))?e.getNodeId(t):0}function r(e){return void 0!==e.propertyName&&"default"===e.propertyName.escapedText}function n(t){if(e.getNamespaceDeclarationNode(t))return!0;var n=t.importClause&&t.importClause.namedBindings;if(!n)return!1;if(!e.isNamedImports(n))return!1;for(var i=0,a=0,o=n.elements;a<o.length;a++){r(o[a])&&i++}return i>0&&i!==n.elements.length||!!(n.elements.length-i)&&e.isDefaultImport(t)}function i(t){return!n(t)&&(e.isDefaultImport(t)||!!t.importClause&&e.isNamedImports(t.importClause.namedBindings)&&function(t){return!!t&&(!!e.isNamedImports(t)&&e.some(t.elements,r))}(t.importClause.namedBindings))}function a(t,r,n){if(e.isBindingPattern(t.name))for(var i=0,o=t.name.elements;i<o.length;i++){var s=o[i];e.isOmittedExpression(s)||(n=a(s,r,n))}else if(!e.isGeneratedIdentifier(t.name)){var c=e.idText(t.name);r.get(c)||(r.set(c,!0),n=e.append(n,t.name))}return n}function o(e,t,r){var n=e[t];return n?n.push(r):e[t]=n=[r],n}function s(t){return e.isStringLiteralLike(t)||8===t.kind||e.isKeyword(t.kind)||e.isIdentifier(t)}e.getOriginalNodeId=t,e.chainBundle=function(t){return function(r){return 288===r.kind?t(r):function(r){return e.createBundle(e.map(r.sourceFiles,t),r.prepends)}(r)}},e.getImportNeedsImportStarHelper=n,e.getImportNeedsImportDefaultHelper=i,e.collectExternalModuleInfo=function(r,s,c){for(var u,l,_=[],d=e.createMultiMap(),p=[],f=e.createMap(),m=!1,g=!1,y=!1,h=!1,v=0,b=r.statements;v<b.length;v++){var x=b[v];switch(x.kind){case 253:_.push(x),!y&&n(x)&&(y=!0),!h&&i(x)&&(h=!0);break;case 252:263===x.moduleReference.kind&&_.push(x);break;case 259:if(x.moduleSpecifier)x.exportClause?_.push(x):(_.push(x),g=!0);else for(var D=0,S=x.exportClause.elements;D<S.length;D++){var T=S[D];if(!f.get(e.idText(T.name))){var E=T.propertyName||T.name;d.add(e.idText(E),T),(N=s.getReferencedImportDeclaration(E)||s.getReferencedValueDeclaration(E))&&o(p,t(N),T.name),f.set(e.idText(T.name),!0),u=e.append(u,T.name)}}break;case 258:x.isExportEquals&&!l&&(l=x);break;case 224:if(e.hasModifier(x,1))for(var C=0,k=x.declarationList.declarations;C<k.length;C++){var N;u=a(N=k[C],f,u)}break;case 243:if(e.hasModifier(x,1))if(e.hasModifier(x,512))m||(o(p,t(x),e.getDeclarationName(x)),m=!0);else{E=x.name;f.get(e.idText(E))||(o(p,t(x),E),f.set(e.idText(E),!0),u=e.append(u,E))}break;case 244:if(e.hasModifier(x,1))if(e.hasModifier(x,512))m||(o(p,t(x),e.getDeclarationName(x)),m=!0);else(E=x.name)&&!f.get(e.idText(E))&&(o(p,t(x),E),f.set(e.idText(E),!0),u=e.append(u,E))}}var A=e.createExternalHelpersImportDeclarationIfNeeded(r,c,g,y,h);return A&&_.unshift(A),{externalImports:_,exportSpecifiers:d,exportEquals:l,hasExportStarsToExportValues:g,exportedBindings:p,exportedNames:u,externalHelpersImportDeclaration:A}},e.isSimpleCopiableExpression=s,e.isSimpleInlineableExpression=function(t){return!e.isIdentifier(t)&&s(t)||e.isWellKnownSymbolSyntactically(t)},e.addPrologueDirectivesAndInitialSuperCall=function(t,r,n){if(t.body){var i=t.body.statements,a=e.addPrologue(r,i,!1,n);if(a===i.length)return a;var o=i[a];return 225===o.kind&&e.isSuperCall(o.expression)?(r.push(e.visitNode(o,n,e.isStatement)),a+1):a}return 0},e.helperString=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(r){for(var n="",i=0;i<t.length;i++)n+=e[i],n+=r(t[i]);return n+=e[e.length-1]}},e.getProperties=function(t,r,n){return e.filter(t.members,(function(t){return function(t,r,n){return e.isPropertyDeclaration(t)&&(!!t.initializer||!r)&&e.hasStaticModifier(t)===n}(t,r,n)}))},e.isInitializedProperty=function(t,r){return e.isPropertyDeclaration(t)&&(!!t.initializer||!r)}}(s||(s={})),function(e){function t(r,n){var i=e.getTargetOfBindingOrAssignmentElement(r);return e.isBindingOrAssignmentPattern(i)?function(r,n){for(var i=e.getElementsOfBindingOrAssignmentPattern(r),a=0,o=i;a<o.length;a++){if(t(o[a],n))return!0}return!1}(i,n):!!e.isIdentifier(i)&&i.escapedText===n}function r(t,a,o,s,c){if(!c){var u=e.visitNode(e.getInitializerOfBindingOrAssignmentElement(a),t.visitor,e.isExpression);u?o=o?function(t,r,n,a){return r=i(t,r,!0,a),e.createConditional(e.createTypeCheck(r,"undefined"),n,r)}(t,o,u,s):u:o||(o=e.createVoidZero())}var l=e.getTargetOfBindingOrAssignmentElement(a);e.isObjectBindingOrAssignmentPattern(l)?function(t,a,o,s,c){var u,l,d=e.getElementsOfBindingOrAssignmentPattern(o),p=d.length;if(1!==p){var f=!e.isDeclarationBindingElement(a)||0!==p;s=i(t,s,f,c)}for(var m=0;m<p;m++){var g=d[m];if(e.getRestIndicatorOfBindingOrAssignmentElement(g)){if(m===p-1){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);h=_(t.context,s,d,l,o);r(t,g,h,g)}}else{var y=e.getPropertyNameOfBindingOrAssignmentElement(g);if(!(t.level>=1)||12288&g.transformFlags||12288&e.getTargetOfBindingOrAssignmentElement(g).transformFlags||e.isComputedPropertyName(y)){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var h=n(t,s,y);e.isComputedPropertyName(y)&&(l=e.append(l,h.argumentExpression)),r(t,g,h,g)}else u=e.append(u,g)}}u&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o)}(t,a,l,o,s):e.isArrayBindingOrAssignmentPattern(l)?function(t,n,a,o,s){var c,u,l=e.getElementsOfBindingOrAssignmentPattern(a),_=l.length;if(t.level<1&&t.downlevelIteration)o=i(t,e.createReadHelper(t.context,o,_>0&&e.getRestIndicatorOfBindingOrAssignmentElement(l[_-1])?void 0:_,s),!1,s);else if(1!==_&&(t.level<1||0===_)||e.every(l,e.isOmittedExpression)){var d=!e.isDeclarationBindingElement(n)||0!==_;o=i(t,o,d,s)}for(var p=0;p<_;p++){var f=l[p];if(t.level>=1)if(8192&f.transformFlags){var m=e.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(m),u=e.append(u,[m,f]),c=e.append(c,t.createArrayBindingOrAssignmentElement(m))}else c=e.append(c,f);else{if(e.isOmittedExpression(f))continue;if(e.getRestIndicatorOfBindingOrAssignmentElement(f)){if(p===_-1){g=e.createArraySlice(o,p);r(t,f,g,f)}}else{var g=e.createElementAccess(o,p);r(t,f,g,f)}}}c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),o,s,a);if(u)for(var y=0,h=u;y<h.length;y++){var v=h[y],b=v[0];f=v[1];r(t,f,b,f)}}(t,a,l,o,s):t.emitBindingOrAssignment(l,o,s,a)}function n(t,r,n){if(e.isComputedPropertyName(n)){var a=i(t,e.visitNode(n.expression,t.visitor),!1,n);return e.createElementAccess(r,a)}if(e.isStringOrNumericLiteralLike(n))return(a=e.getSynthesizedClone(n)).text=a.text,e.createElementAccess(r,a);var o=e.createIdentifier(e.idText(n));return e.createPropertyAccess(r,o)}function i(t,r,n,i){if(e.isIdentifier(r)&&n)return r;var a=e.createTempVariable(void 0);return t.hoistTempVariables?(t.context.hoistVariableDeclaration(a),t.emitExpression(e.setTextRange(e.createAssignment(a,r),i))):t.emitBindingOrAssignment(a,r,i,void 0),a}function a(t){return e.Debug.assertEachNode(t,e.isArrayBindingElement),e.createArrayBindingPattern(t)}function o(t){return e.createArrayLiteral(e.map(t,e.convertToArrayAssignmentElement))}function s(t){return e.Debug.assertEachNode(t,e.isBindingElement),e.createObjectBindingPattern(t)}function c(t){return e.createObjectLiteral(e.map(t,e.convertToObjectAssignmentElement))}function u(t){return e.createBindingElement(void 0,void 0,t)}function l(e){return e}function _(t,r,n,i,a){t.requestEmitHelper(e.restHelper);for(var o=[],s=0,c=0;c<n.length-1;c++){var u=e.getPropertyNameOfBindingOrAssignmentElement(n[c]);if(u)if(e.isComputedPropertyName(u)){var l=i[s];s++,o.push(e.createConditional(e.createTypeCheck(l,"symbol"),l,e.createAdd(l,e.createLiteral(""))))}else o.push(e.createLiteral(u))}return e.createCall(e.getUnscopedHelperName("__rest"),void 0,[r,e.setTextRange(e.createArrayLiteral(o),a)])}!function(e){e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest"}(e.FlattenLevel||(e.FlattenLevel={})),e.flattenDestructuringAssignment=function(n,a,s,u,_,d){var p,f,m=n;if(e.isDestructuringAssignment(n))for(p=n.right;e.isEmptyArrayLiteral(n.left)||e.isEmptyObjectLiteral(n.left);){if(!e.isDestructuringAssignment(p))return e.visitNode(p,a,e.isExpression);m=n=p,p=n.right}var g={context:s,level:u,downlevelIteration:!!s.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:y,emitBindingOrAssignment:function(t,r,n,i){e.Debug.assertNode(t,d?e.isIdentifier:e.isExpression);var o=d?d(t,r,n):e.setTextRange(e.createAssignment(e.visitNode(t,a,e.isExpression),r),n);o.original=i,y(o)},createArrayBindingOrAssignmentPattern:o,createObjectBindingOrAssignmentPattern:c,createArrayBindingOrAssignmentElement:l,visitor:a};if(p&&(p=e.visitNode(p,a,e.isExpression),e.isIdentifier(p)&&t(n,p.escapedText)?p=i(g,p,!1,m):_?p=i(g,p,!0,m):e.nodeIsSynthesized(n)&&(m=p)),r(g,n,p,m,e.isDestructuringAssignment(n)),p&&_){if(!e.some(f))return p;f.push(p)}return e.aggregateTransformFlags(e.inlineExpressions(f))||e.createOmittedExpression();function y(t){e.setEmitFlags(t,64),e.aggregateTransformFlags(t),f=e.append(f,t)}},e.flattenDestructuringBinding=function(n,o,c,l,_,d,p){var f;void 0===d&&(d=!1);var m=[],g=[],y={context:c,level:l,downlevelIteration:!!c.getCompilerOptions().downlevelIteration,hoistTempVariables:d,emitExpression:function(t){f=e.append(f,t)},emitBindingOrAssignment:F,createArrayBindingOrAssignmentPattern:a,createObjectBindingOrAssignmentPattern:s,createArrayBindingOrAssignmentElement:u,visitor:o};if(e.isVariableDeclaration(n)){var h=e.getInitializerOfBindingOrAssignmentElement(n);h&&e.isIdentifier(h)&&t(n,h.escapedText)&&(h=i(y,h,!1,h),n=e.updateVariableDeclaration(n,n.name,n.type,h))}if(r(y,n,_,n,p),f){var v=e.createTempVariable(void 0);if(d){var b=e.inlineExpressions(f);f=void 0,F(v,b,void 0,void 0)}else{c.hoistVariableDeclaration(v);var x=e.last(m);x.pendingExpressions=e.append(x.pendingExpressions,e.createAssignment(v,x.value)),e.addRange(x.pendingExpressions,f),x.value=v}}for(var D=0,S=m;D<S.length;D++){var T=S[D],E=T.pendingExpressions,C=T.name,k=(b=T.value,T.location),N=T.original,A=e.createVariableDeclaration(C,void 0,E?e.inlineExpressions(e.append(E,b)):b);A.original=N,e.setTextRange(A,k),e.isIdentifier(C)&&e.setEmitFlags(A,64),e.aggregateTransformFlags(A),g.push(A)}return g;function F(t,r,n,i){e.Debug.assertNode(t,e.isBindingName),f&&(r=e.inlineExpressions(e.append(f,r)),f=void 0),m.push({pendingExpressions:f,name:t,value:r,location:n,original:i})}},e.restHelper={name:"typescript:rest",importName:"__rest",scoped:!1,text:'\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };'}}(s||(s={})),function(e){var t,r;function n(t,r,n,i,a,o){var s=[];return s.push(e.createArrayLiteral(r,!0)),s.push(n),i&&(s.push(i),a&&s.push(a)),t.requestEmitHelper(e.decorateHelper),e.setTextRange(e.createCall(e.getUnscopedHelperName("__decorate"),void 0,s),o)}function i(t,r,n){return t.requestEmitHelper(e.metadataHelper),e.createCall(e.getUnscopedHelperName("__metadata"),void 0,[e.createLiteral(r),n])}function a(t,r,n,i){return t.requestEmitHelper(e.paramHelper),e.setTextRange(e.createCall(e.getUnscopedHelperName("__param"),void 0,[e.createLiteral(n),r]),i)}!function(e){e[e.ClassAliases=1]="ClassAliases",e[e.NamespaceExports=2]="NamespaceExports",e[e.NonQualifiedEnumMembers=8]="NonQualifiedEnumMembers"}(t||(t={})),function(e){e[e.None=0]="None",e[e.HasStaticInitializedProperties=1]="HasStaticInitializedProperties",e[e.HasConstructorDecorators=2]="HasConstructorDecorators",e[e.HasMemberDecorators=4]="HasMemberDecorators",e[e.IsExportOfNamespace=8]="IsExportOfNamespace",e[e.IsNamedExternalExport=16]="IsNamedExternalExport",e[e.IsDefaultExternalExport=32]="IsDefaultExternalExport",e[e.IsDerivedClass=64]="IsDerivedClass",e[e.UseImmediatelyInvokedFunctionExpression=128]="UseImmediatelyInvokedFunctionExpression",e[e.HasAnyDecorators=6]="HasAnyDecorators",e[e.NeedsName=5]="NeedsName",e[e.MayNeedImmediatelyInvokedFunctionExpression=7]="MayNeedImmediatelyInvokedFunctionExpression",e[e.IsExported=56]="IsExported"}(r||(r={})),e.transformTypeScript=function(t){var r,o,s,c,u,l,_,d,p,f,m=t.startLexicalEnvironment,g=t.resumeLexicalEnvironment,y=t.endLexicalEnvironment,h=t.hoistVariableDeclaration,v=t.getEmitResolver(),b=t.getCompilerOptions(),x=e.getStrictOptionValue(b,"strictNullChecks"),D=e.getEmitScriptTarget(b),S=e.getEmitModuleKind(b),T=t.onEmitNode,E=t.onSubstituteNode;return t.onEmitNode=function(t,n,i){var a=f,o=r;e.isSourceFile(n)&&(r=n);2&d&&function(t){return 248===e.getOriginalNode(t).kind}(n)&&(f|=2);8&d&&function(t){return 247===e.getOriginalNode(t).kind}(n)&&(f|=8);T(t,n,i),f=a,r=o},t.onSubstituteNode=function(t,r){if(r=E(t,r),1===t)return function(t){switch(t.kind){case 75:return function(t){return function(t){if(1&d&&33554432&v.getNodeCheckFlags(t)){var r=v.getReferencedValueDeclaration(t);if(r){var n=p[r.id];if(n){var i=e.getSynthesizedClone(n);return e.setSourceMapRange(i,t),e.setCommentRange(i,t),i}}}return}(t)||Oe(t)||t}(t);case 193:case 194:return function(e){return Me(e)}(t)}return t}(r);if(e.isShorthandPropertyAssignment(r))return function(t){if(2&d){var r=t.name,n=Oe(r);if(n){if(t.objectAssignmentInitializer){var i=e.createAssignment(n,t.objectAssignmentInitializer);return e.setTextRange(e.createPropertyAssignment(r,i),t)}return e.setTextRange(e.createPropertyAssignment(r,n),t)}}return t}(r);return r},t.enableSubstitution(193),t.enableSubstitution(194),function(t){if(289===t.kind)return function(t){return e.createBundle(t.sourceFiles.map(C),e.mapDefined(t.prepends,(function(t){return 291===t.kind?e.createUnparsedSourceFile(t,"js"):t})))}(t);return C(t)};function C(n){if(n.isDeclarationFile)return n;r=n;var i=k(n,B);return e.addEmitHelpers(i,t.readEmitHelpers()),r=void 0,i}function k(t,r){var n=c,i=u,a=l,o=_;!function(t){switch(t.kind){case 288:case 250:case 249:case 222:c=t,u=void 0,l=void 0;break;case 244:case 243:if(e.hasModifier(t,2))break;t.name?me(t):e.Debug.assert(244===t.kind||e.hasModifier(t,512)),e.isClassDeclaration(t)&&(u=t)}}(t);var s=r(t);return c!==n&&(l=a),c=n,u=i,_=o,s}function N(e){return k(e,A)}function A(e){return 1&e.transformFlags?R(e):e}function F(e){return k(e,P)}function P(r){switch(r.kind){case 253:case 252:case 258:case 259:return function(r){if(e.getParseTreeNode(r)!==r)return 1&r.transformFlags?e.visitEachChild(r,N,t):r;switch(r.kind){case 253:return function(t){if(!t.importClause)return t;var r=e.visitNode(t.importClause,ve,e.isImportClause);return r?e.updateImportDeclaration(t,void 0,void 0,r,t.moduleSpecifier):void 0}(r);case 252:return Te(r);case 258:return function(r){return v.isValueAliasDeclaration(r)?e.visitEachChild(r,N,t):void 0}(r);case 259:return function(t){if(!t.exportClause)return b.isolatedModules||v.moduleExportsSomeValue(t.moduleSpecifier)?t:void 0;if(!v.isValueAliasDeclaration(t))return;var r=e.visitNode(t.exportClause,De,e.isNamedExports);return r?e.updateExportDeclaration(t,void 0,void 0,r,t.moduleSpecifier):void 0}(r);default:e.Debug.fail("Unhandled ellided statement")}}(r);default:return A(r)}}function w(e){return k(e,I)}function I(t){if(259!==t.kind&&253!==t.kind&&254!==t.kind&&(252!==t.kind||263!==t.moduleReference.kind))return 1&t.transformFlags||e.hasModifier(t,1)?R(t):t}function O(e){return k(e,M)}function M(t){switch(t.kind){case 161:return ue(t);case 158:return ce(t);case 166:case 162:case 163:case 160:return A(t);case 221:return t;default:return e.Debug.failBadSyntaxKind(t)}}function L(t){if(!(2270&e.modifierToFlag(t.kind)||o&&88===t.kind))return t}function R(i){if(e.isStatement(i)&&e.hasModifier(i,2))return e.createNotEmittedStatement(i);switch(i.kind){case 88:case 83:return o?void 0:i;case 118:case 116:case 117:case 121:case 80:case 129:case 137:case 173:case 174:case 175:case 176:case 172:case 167:case 154:case 124:case 147:case 127:case 142:case 139:case 136:case 109:case 143:case 170:case 169:case 171:case 168:case 177:case 178:case 179:case 181:case 182:case 183:case 184:case 185:case 186:case 166:case 156:case 246:return;case 158:return ce(i);case 251:return;case 161:return ue(i);case 245:return e.createNotEmittedStatement(i);case 244:return function(i){if(!(J(i)||o&&e.hasModifier(i,1)))return e.visitEachChild(i,N,t);var a=e.getProperties(i,!0,!0),s=function(t,r){var n=0;e.some(r)&&(n|=1);var i=e.getEffectiveBaseTypeNode(t);i&&99!==e.skipOuterExpressions(i.expression).kind&&(n|=64);(function(t){if(t.decorators&&t.decorators.length>0)return!0;var r=e.getFirstConstructorWithBody(t);if(r)return e.forEach(r.parameters,j);return!1})(t)&&(n|=2);e.childIsDecorated(t)&&(n|=4);Ee(t)?n|=8:!function(t){return Ce(t)&&e.hasModifier(t,512)}(t)?ke(t)&&(n|=16):n|=32;D<=1&&7&n&&(n|=128);return n}(i,a);128&s&&t.startLexicalEnvironment();var c=i.name||(5&s?e.getGeneratedNameForNode(i):void 0),u=2&s?function(r,n){var i=e.moveRangePastDecorators(r),a=function(r){if(16777216&v.getNodeCheckFlags(r)){0==(1&d)&&(d|=1,t.enableSubstitution(75),p=[]);var n=e.createUniqueName(r.name&&!e.isGeneratedIdentifier(r.name)?e.idText(r.name):"default");return p[e.getOriginalNodeId(r)]=n,h(n),n}}(r),o=e.getLocalName(r,!1,!0),s=e.visitNodes(r.heritageClauses,N,e.isHeritageClause),c=z(r),u=e.createClassExpression(void 0,n,void 0,s,c);e.aggregateTransformFlags(u),e.setOriginalNode(u,r),e.setTextRange(u,i);var l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(o,void 0,a?e.createAssignment(a,u):u)],1));return e.setOriginalNode(l,r),e.setTextRange(l,i),e.setCommentRange(l,r),l}(i,c):function(t,r,n){var i=128&n?void 0:e.visitNodes(t.modifiers,L,e.isModifier),a=e.createClassDeclaration(void 0,i,r,void 0,e.visitNodes(t.heritageClauses,N,e.isHeritageClause),z(t)),o=e.getEmitFlags(t);1&n&&(o|=32);return e.aggregateTransformFlags(a),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(i,c,s),l=[u];if(H(l,i,!1),H(l,i,!0),function(r,i){var a=function(r){var i=function(t){var r=t.decorators,n=q(e.getFirstConstructorWithBody(t));if(!r&&!n)return;return{decorators:r,parameters:n}}(r),a=G(r,r,i);if(!a)return;var o=p&&p[e.getOriginalNodeId(r)],s=e.getLocalName(r,!1,!0),c=n(t,a,s),u=e.createAssignment(s,o?e.createAssignment(o,c):c);return e.setEmitFlags(u,1536),e.setSourceMapRange(u,e.moveRangePastDecorators(r)),u}(i);a&&r.push(e.setOriginalNode(e.createExpressionStatement(a),i))}(l,i),128&s){var _=e.createTokenRange(e.skipTrivia(r.text,i.members.end),19),f=e.getInternalName(i),m=e.createPartiallyEmittedExpression(f);m.end=_.end,e.setEmitFlags(m,1536);var g=e.createReturn(m);g.pos=_.pos,e.setEmitFlags(g,1920),l.push(g),e.insertStatementsAfterStandardPrologue(l,t.endLexicalEnvironment());var y=e.createImmediatelyInvokedArrowFunction(l);e.setEmitFlags(y,33554432);var b=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(i,!1,!1),void 0,y)]));e.setOriginalNode(b,i),e.setCommentRange(b,i),e.setSourceMapRange(b,e.moveRangePastDecorators(i)),e.startOnNewLine(b),l=[b]}8&s?Ae(l,i):(128&s||2&s)&&(32&s?l.push(e.createExportDefault(e.getLocalName(i,!1,!0))):16&s&&l.push(e.createExternalModuleExport(e.getLocalName(i,!1,!0))));l.length>1&&(l.push(e.createEndOfDeclarationMarker(i)),e.setEmitFlags(u,4194304|e.getEmitFlags(u)));return e.singleOrMany(l)}(i);case 213:return function(r){if(!J(r))return e.visitEachChild(r,N,t);var n=e.createClassExpression(void 0,r.name,void 0,e.visitNodes(r.heritageClauses,N,e.isHeritageClause),z(r));return e.aggregateTransformFlags(n),e.setOriginalNode(n,r),e.setTextRange(n,r),n}(i);case 277:return function(r){if(112===r.token)return;return e.visitEachChild(r,N,t)}(i);case 215:return function(t){return e.updateExpressionWithTypeArguments(t,void 0,e.visitNode(t.expression,N,e.isLeftHandSideExpression))}(i);case 160:return function(r){if(!se(r))return;var n=e.updateMethod(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,oe(r),void 0,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 162:return function(r){if(!_e(r))return;var n=e.updateGetAccessor(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),oe(r),e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 163:return function(r){if(!_e(r))return;var n=e.updateSetAccessor(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),oe(r),e.visitParameterList(r.parameters,N,t),e.visitFunctionBody(r.body,N,t)||e.createBlock([]));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 243:return function(r){if(!se(r))return e.createNotEmittedStatement(r);var n=e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]));if(Ee(r)){var i=[n];return Ae(i,r),i}return n}(i);case 200:return function(r){if(!se(r))return e.createOmittedExpression();return e.updateFunctionExpression(r,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]))}(i);case 201:return function(r){return e.updateArrowFunction(r,e.visitNodes(r.modifiers,L,e.isModifier),void 0,e.visitParameterList(r.parameters,N,t),void 0,r.equalsGreaterThanToken,e.visitFunctionBody(r.body,N,t))}(i);case 155:return function(t){if(e.parameterIsThisKeyword(t))return;var r=e.updateParameter(t,void 0,void 0,t.dotDotDotToken,e.visitNode(t.name,N,e.isBindingName),void 0,void 0,e.visitNode(t.initializer,N,e.isExpression));r!==t&&(e.setCommentRange(r,t),e.setTextRange(r,e.moveRangePastModifiers(t)),e.setSourceMapRange(r,e.moveRangePastModifiers(t)),e.setEmitFlags(r.name,32));return r}(i);case 199:return function(n){var i=e.skipOuterExpressions(n.expression,-3);if(e.isAssertionExpression(i)){var a=e.visitNode(n.expression,N,e.isExpression);return e.length(e.getLeadingCommentRangesOfNode(a,r))?e.updateParen(n,a):e.createPartiallyEmittedExpression(a,n)}return e.visitEachChild(n,N,t)}(i);case 198:case 216:return function(t){var r=e.visitNode(t.expression,N,e.isExpression);return e.createPartiallyEmittedExpression(r,t)}(i);case 195:return function(t){return e.updateCall(t,e.visitNode(t.expression,N,e.isExpression),void 0,e.visitNodes(t.arguments,N,e.isExpression))}(i);case 196:return function(t){return e.updateNew(t,e.visitNode(t.expression,N,e.isExpression),void 0,e.visitNodes(t.arguments,N,e.isExpression))}(i);case 197:return function(t){return e.updateTaggedTemplate(t,e.visitNode(t.tag,N,e.isExpression),void 0,e.visitNode(t.template,N,e.isExpression))}(i);case 217:return function(t){var r=e.visitNode(t.expression,N,e.isLeftHandSideExpression);return e.createPartiallyEmittedExpression(r,t)}(i);case 247:return function(t){if(!function(t){return!e.isEnumConst(t)||b.preserveConstEnums||b.isolatedModules}(t))return e.createNotEmittedStatement(t);var n=[],i=2,a=ye(n,t);a&&(S===e.ModuleKind.System&&c===r||(i|=512));var o=we(t),u=Ie(t),l=e.hasModifier(t,1)?e.getExternalModuleOrNamespaceExportName(s,t,!1,!0):e.getLocalName(t,!1,!0),_=e.createLogicalOr(l,e.createAssignment(l,e.createObjectLiteral()));if(fe(t)){var d=e.getLocalName(t,!1,!0);_=e.createAssignment(d,_)}var p=e.createExpressionStatement(e.createCall(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,o)],void 0,function(t,r){var n=s;s=r;var i=[];m();var a=e.map(t.members,pe);return e.insertStatementsAfterStandardPrologue(i,y()),e.addRange(i,a),s=n,e.createBlock(e.setTextRange(e.createNodeArray(i),t.members),!0)}(t,u)),void 0,[_]));e.setOriginalNode(p,t),a&&(e.setSyntheticLeadingComments(p,void 0),e.setSyntheticTrailingComments(p,void 0));return e.setTextRange(p,t),e.addEmitFlags(p,i),n.push(p),n.push(e.createEndOfDeclarationMarker(t)),n}(i);case 224:return function(r){if(Ee(r)){var n=e.getInitializedVariables(r.declarationList);if(0===n.length)return;return e.setTextRange(e.createExpressionStatement(e.inlineExpressions(e.map(n,de))),r)}return e.visitEachChild(r,N,t)}(i);case 241:return function(t){return e.updateVariableDeclaration(t,e.visitNode(t.name,N,e.isBindingName),void 0,e.visitNode(t.initializer,N,e.isExpression))}(i);case 248:return he(i);case 252:return Te(i);default:return e.visitEachChild(i,N,t)}}function B(r){var n=e.getStrictOptionValue(b,"alwaysStrict")&&!(e.isExternalModule(r)&&S>=e.ModuleKind.ES2015)&&!e.isJsonSourceFile(r);return e.updateSourceFileNode(r,e.visitLexicalEnvironment(r.statements,F,t,0,n))}function j(e){return void 0!==e.decorators&&e.decorators.length>0}function K(e){return!!(1024&e.transformFlags)}function J(t){return e.some(t.decorators)||e.some(t.typeParameters)||e.some(t.heritageClauses,K)||e.some(t.members,K)}function z(t){var r=[],n=e.getFirstConstructorWithBody(t),i=n&&e.filter(n.parameters,(function(t){return e.isParameterPropertyDeclaration(t,n)}));if(i)for(var a=0,o=i;a<o.length;a++){var s=o[a];e.isIdentifier(s.name)&&r.push(e.aggregateTransformFlags(e.createProperty(void 0,void 0,s.name,void 0,void 0,void 0)))}return e.addRange(r,e.visitNodes(t.members,O,e.isClassElement)),e.setTextRange(e.createNodeArray(r),t.members)}function U(t,r){return e.filter(t.members,r?function(e){return V(e,!0,t)}:function(e){return V(e,!1,t)})}function V(t,r,n){return e.nodeOrChildIsDecorated(t,n)&&r===e.hasModifier(t,32)}function q(t){var r;if(t)for(var n=t.parameters,i=n.length>0&&e.parameterIsThisKeyword(n[0]),a=i?1:0,o=i?n.length-1:n.length,s=0;s<o;s++){var c=n[s+a];(r||c.decorators)&&(r||(r=new Array(o)),r[s]=c.decorators)}return r}function W(t,r){switch(r.kind){case 162:case 163:return function(t,r){if(!r.body)return;var n=e.getAllAccessorDeclarations(t.members,r),i=n.firstAccessor,a=n.secondAccessor,o=n.setAccessor,s=i.decorators?i:a&&a.decorators?a:void 0;if(!s||r!==s)return;var c=s.decorators,u=q(o);if(!c&&!u)return;return{decorators:c,parameters:u}}(t,r);case 160:return function(e){if(!e.body)return;var t=e.decorators,r=q(e);if(!t&&!r)return;return{decorators:t,parameters:r}}(r);case 158:return function(e){var t=e.decorators;if(!t)return;return{decorators:t}}(r);default:return}}function G(r,n,a){if(a){var o=[];return e.addRange(o,e.map(a.decorators,X)),e.addRange(o,e.flatMap(a.parameters,Q)),function(r,n,a){!function(r,n,a){b.emitDecoratorMetadata&&(function(e){var t=e.kind;return 160===t||162===t||163===t||158===t}(r)&&a.push(i(t,"design:type",$(r))),function(t){switch(t.kind){case 244:case 213:return void 0!==e.getFirstConstructorWithBody(t);case 160:case 162:case 163:return!0}return!1}(r)&&a.push(i(t,"design:paramtypes",function(t,r){var n=e.isClassLike(t)?e.getFirstConstructorWithBody(t):e.isFunctionLike(t)&&e.nodeIsPresent(t.body)?t:void 0,i=[];if(n)for(var a=function(t,r){if(r&&162===t.kind){var n=e.getAllAccessorDeclarations(r.members,t).setAccessor;if(n)return n.parameters}return t.parameters}(n,r),o=a.length,s=0;s<o;s++){var c=a[s];0===s&&e.isIdentifier(c.name)&&"this"===c.name.escapedText||(c.dotDotDotToken?i.push(Z(e.getRestParameterElementType(c.type))):i.push($(c)))}return e.createArrayLiteral(i)}(r,n))),function(e){return 160===e.kind}(r)&&a.push(i(t,"design:returntype",function(t){if(e.isFunctionLike(t)&&t.type)return Z(t.type);if(e.isAsyncFunction(t))return e.createIdentifier("Promise");return e.createVoidZero()}(r))))}(r,n,a)}(r,n,o),o}}function H(t,r,n){e.addRange(t,e.map(function(e,t){for(var r,n=U(e,t),i=0,a=n;i<a.length;i++){var o=a[i],s=Y(e,o);s&&(r?r.push(s):r=[s])}return r}(r,n),Ne))}function Y(r,i){var a=G(i,r,W(r,i));if(a){var o=function(t,r){return e.hasModifier(r,32)?e.getDeclarationName(t):function(t){return e.createPropertyAccess(e.getDeclarationName(t),"prototype")}(t)}(r,i),s=ae(i,!0),c=D>0?158===i.kind?e.createVoidZero():e.createNull():void 0,u=n(t,a,o,s,c,e.moveRangePastDecorators(i));return e.setEmitFlags(u,1536),u}}function X(t){return e.visitNode(t.expression,N,e.isExpression)}function Q(r,n){var i;if(r){i=[];for(var o=0,s=r;o<s.length;o++){var c=s[o],u=a(t,X(c),n,c.expression);e.setEmitFlags(u,1536),i.push(u)}}return i}function $(t){switch(t.kind){case 158:case 155:return Z(t.type);case 163:case 162:return Z(function(t){var r=v.getAllAccessorDeclarations(t);return r.setAccessor&&e.getSetAccessorTypeAnnotationNode(r.setAccessor)||r.getAccessor&&e.getEffectiveReturnTypeNode(r.getAccessor)}(t));case 244:case 213:case 160:return e.createIdentifier("Function");default:return e.createVoidZero()}}function Z(t){if(void 0===t)return e.createIdentifier("Object");switch(t.kind){case 109:case 145:case 99:case 136:return e.createVoidZero();case 181:return Z(t.type);case 169:case 170:return e.createIdentifier("Function");case 173:case 174:return e.createIdentifier("Array");case 167:case 127:return e.createIdentifier("Boolean");case 142:return e.createIdentifier("String");case 140:return e.createIdentifier("Object");case 186:switch(t.literal.kind){case 10:return e.createIdentifier("String");case 206:case 8:return e.createIdentifier("Number");case 9:return ie();case 105:case 90:return e.createIdentifier("Boolean");default:return e.Debug.failBadSyntaxKind(t.literal)}case 139:return e.createIdentifier("Number");case 150:return ie();case 143:return D<2?ne():e.createIdentifier("Symbol");case 168:return function(t){var r=v.getTypeReferenceSerializationKind(t.typeName,u||c);switch(r){case e.TypeReferenceSerializationKind.Unknown:if(e.findAncestor(t,(function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&(t.parent.trueType===t||t.parent.falseType===t)})))return e.createIdentifier("Object");var n=function t(r){if(75===r.kind){var n=re(r);return te(n,n)}if(75===r.left.kind)return te(re(r.left),re(r));var i=t(r.left);var a=e.createTempVariable(h);return e.createLogicalAnd(e.createLogicalAnd(i.left,e.createStrictInequality(e.createAssignment(a,i.right),e.createVoidZero())),e.createPropertyAccess(a,r.right))}(t.typeName),i=e.createTempVariable(h);return e.createConditional(e.createTypeCheck(e.createAssignment(i,n),"function"),i,e.createIdentifier("Object"));case e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue:return re(t.typeName);case e.TypeReferenceSerializationKind.VoidNullableOrNeverType:return e.createVoidZero();case e.TypeReferenceSerializationKind.BigIntLikeType:return ie();case e.TypeReferenceSerializationKind.BooleanType:return e.createIdentifier("Boolean");case e.TypeReferenceSerializationKind.NumberLikeType:return e.createIdentifier("Number");case e.TypeReferenceSerializationKind.StringLikeType:return e.createIdentifier("String");case e.TypeReferenceSerializationKind.ArrayLikeType:return e.createIdentifier("Array");case e.TypeReferenceSerializationKind.ESSymbolType:return D<2?ne():e.createIdentifier("Symbol");case e.TypeReferenceSerializationKind.TypeWithCallSignature:return e.createIdentifier("Function");case e.TypeReferenceSerializationKind.Promise:return e.createIdentifier("Promise");case e.TypeReferenceSerializationKind.ObjectType:return e.createIdentifier("Object");default:return e.Debug.assertNever(r)}}(t);case 178:case 177:return ee(t.types);case 179:return ee([t.trueType,t.falseType]);case 183:if(137===t.operator)return Z(t.type);break;case 171:case 184:case 185:case 172:case 124:case 147:case 182:case 187:break;default:return e.Debug.failBadSyntaxKind(t)}return e.createIdentifier("Object")}function ee(t){for(var r,n=0,i=t;n<i.length;n++){for(var a=i[n];181===a.kind;)a=a.type;if(136!==a.kind&&(x||99!==a.kind&&145!==a.kind)){var o=Z(a);if(e.isIdentifier(o)&&"Object"===o.escapedText)return o;if(r){if(!e.isIdentifier(r)||!e.isIdentifier(o)||r.escapedText!==o.escapedText)return e.createIdentifier("Object")}else r=o}}return r||e.createVoidZero()}function te(t,r){return e.createLogicalAnd(e.createStrictInequality(e.createTypeOf(t),e.createLiteral("undefined")),r)}function re(t){switch(t.kind){case 75:var r=e.getMutableClone(t);return r.flags&=-9,r.original=void 0,r.parent=e.getParseTreeNode(c),r;case 152:return function(t){return e.createPropertyAccess(re(t.left),t.right)}(t)}}function ne(){return e.createConditional(e.createTypeCheck(e.createIdentifier("Symbol"),"function"),e.createIdentifier("Symbol"),e.createIdentifier("Object"))}function ie(){return D<99?e.createConditional(e.createTypeCheck(e.createIdentifier("BigInt"),"function"),e.createIdentifier("BigInt"),e.createIdentifier("Object")):e.createIdentifier("BigInt")}function ae(t,r){var n=t.name;return e.isComputedPropertyName(n)?r&&!e.isSimpleInlineableExpression(n.expression)?e.getGeneratedNameForNode(n):n.expression:e.isIdentifier(n)?e.createLiteral(e.idText(n)):e.getSynthesizedClone(n)}function oe(t){var r=t.name;if(e.isComputedPropertyName(r)&&(!e.hasStaticModifier(t)&&_||e.some(t.decorators))){var n=e.visitNode(r.expression,N,e.isExpression),i=e.skipPartiallyEmittedExpressions(n);if(!e.isSimpleInlineableExpression(i)){var a=e.getGeneratedNameForNode(r);return h(a),e.updateComputedPropertyName(r,e.createAssignment(a,n))}}return e.visitNode(r,N,e.isPropertyName)}function se(t){return!e.nodeIsMissing(t.body)}function ce(t){var r=e.updateProperty(t,void 0,e.visitNodes(t.modifiers,N,e.isModifier),oe(t),void 0,void 0,e.visitNode(t.initializer,N));return r!==t&&(e.setCommentRange(r,t),e.setSourceMapRange(r,e.moveRangePastDecorators(t))),r}function ue(r){if(se(r))return e.updateConstructor(r,void 0,void 0,e.visitParameterList(r.parameters,N,t),function(r,n){var i=n&&e.filter(n.parameters,(function(t){return e.isParameterPropertyDeclaration(t,n)}));if(!e.some(i))return e.visitFunctionBody(r,N,t);var a,o=[];g(),a=e.addPrologueDirectivesAndInitialSuperCall(n,o,N),e.addRange(o,e.map(i,le)),e.addRange(o,e.visitNodes(r.statements,N,e.isStatement,a)),o=e.mergeLexicalEnvironment(o,y());var s=e.createBlock(e.setTextRange(e.createNodeArray(o),r.statements),!0);return e.setTextRange(s,r),e.setOriginalNode(s,r),s}(r.body,r))}function le(t){var r=t.name;if(e.isIdentifier(r)){var n=e.getMutableClone(r);e.setEmitFlags(n,1584);var i=e.getMutableClone(r);return e.setEmitFlags(i,1536),e.startOnNewLine(e.removeAllComments(e.setTextRange(e.setOriginalNode(e.createExpressionStatement(e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createThis(),n),t.name),i)),t),e.moveRangePos(t,-1))))}}function _e(t){return!(e.nodeIsMissing(t.body)&&e.hasModifier(t,128))}function de(r){var n=r.name;return e.isBindingPattern(n)?e.flattenDestructuringAssignment(r,N,t,0,!1,Fe):e.setTextRange(e.createAssignment(Pe(n),e.visitNode(r.initializer,N,e.isExpression)),r)}function pe(r){var n=ae(r,!1),i=function(r){var n=v.getConstantValue(r);return void 0!==n?e.createLiteral(n):(0==(8&d)&&(d|=8,t.enableSubstitution(75)),r.initializer?e.visitNode(r.initializer,N,e.isExpression):e.createVoidZero())}(r),a=e.createAssignment(e.createElementAccess(s,n),i),o=10===i.kind?a:e.createAssignment(e.createElementAccess(s,a),n);return e.setTextRange(e.createExpressionStatement(e.setTextRange(o,r)),r)}function fe(t){return Ee(t)||Ce(t)&&S!==e.ModuleKind.ES2015&&S!==e.ModuleKind.ESNext&&S!==e.ModuleKind.System}function me(t){l||(l=e.createUnderscoreEscapedMap());var r=ge(t);l.has(r)||l.set(r,t)}function ge(t){return e.Debug.assertNode(t.name,e.isIdentifier),t.name.escapedText}function ye(t,r){var n=e.createVariableStatement(e.visitNodes(r.modifiers,L,e.isModifier),e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(r,!1,!0))],288===c.kind?0:1));if(e.setOriginalNode(n,r),me(r),function(e){if(l){var t=ge(e);return l.get(t)===e}return!0}(r))return 247===r.kind?e.setSourceMapRange(n.declarationList,r):e.setSourceMapRange(n,r),e.setCommentRange(n,r),e.addEmitFlags(n,4195328),t.push(n),!0;var i=e.createMergeDeclarationMarker(n);return e.setEmitFlags(i,4195840),t.push(i),!1}function he(n){if(!function(t){return e.isInstantiatedModule(t,!!b.preserveConstEnums||!!b.isolatedModules)}(n))return e.createNotEmittedStatement(n);e.Debug.assertNode(n.name,e.isIdentifier,"A TypeScript namespace should have an Identifier name."),0==(2&d)&&(d|=2,t.enableSubstitution(75),t.enableSubstitution(280),t.enableEmitNotification(248));var i=[],a=2,u=ye(i,n);u&&(S===e.ModuleKind.System&&c===r||(a|=512));var _=we(n),p=Ie(n),f=e.hasModifier(n,1)?e.getExternalModuleOrNamespaceExportName(s,n,!1,!0):e.getLocalName(n,!1,!0),g=e.createLogicalOr(f,e.createAssignment(f,e.createObjectLiteral()));if(fe(n)){var h=e.getLocalName(n,!1,!0);g=e.createAssignment(h,g)}var v=e.createExpressionStatement(e.createCall(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,_)],void 0,function(t,r){var n=s,i=o,a=l;s=r,o=t,l=void 0;var c,u,_=[];m();var d=t.body;if(249===d.kind)k(d,(function(t){return e.addRange(_,e.visitNodes(t.statements,w,e.isStatement))})),c=d.statements,u=d;else{var p=he(d);p&&(e.isArray(p)?e.addRange(_,p):_.push(p));var f=function e(t){if(248===t.body.kind){return e(t.body)||t.body}}(t).body;c=e.moveRangePos(f.statements,-1)}e.insertStatementsAfterStandardPrologue(_,y()),s=n,o=i,l=a;var g=e.createBlock(e.setTextRange(e.createNodeArray(_),c),!0);e.setTextRange(g,u),249!==d.kind&&e.setEmitFlags(g,1536|e.getEmitFlags(g));return g}(n,p)),void 0,[g]));return e.setOriginalNode(v,n),u&&(e.setSyntheticLeadingComments(v,void 0),e.setSyntheticTrailingComments(v,void 0)),e.setTextRange(v,n),e.addEmitFlags(v,a),i.push(v),i.push(e.createEndOfDeclarationMarker(n)),i}function ve(t){var r=v.isReferencedAliasDeclaration(t)?t.name:void 0,n=e.visitNode(t.namedBindings,be,e.isNamedImportBindings);return r||n?e.updateImportClause(t,r,n):void 0}function be(t){if(255===t.kind)return v.isReferencedAliasDeclaration(t)?t:void 0;var r=e.visitNodes(t.elements,xe,e.isImportSpecifier);return e.some(r)?e.updateNamedImports(t,r):void 0}function xe(e){return v.isReferencedAliasDeclaration(e)?e:void 0}function De(t){var r=e.visitNodes(t.elements,Se,e.isExportSpecifier);return e.some(r)?e.updateNamedExports(t,r):void 0}function Se(e){return v.isValueAliasDeclaration(e)?e:void 0}function Te(n){if(e.isExternalModuleImportEqualsDeclaration(n))return v.isReferencedAliasDeclaration(n)?e.visitEachChild(n,N,t):void 0;if(function(t){return v.isReferencedAliasDeclaration(t)||!e.isExternalModule(r)&&v.isTopLevelValueImportEqualsWithEntityName(t)}(n)){var i,a,o,c=e.createExpressionFromEntityName(n.moduleReference);return e.setEmitFlags(c,3584),ke(n)||!Ee(n)?e.setOriginalNode(e.setTextRange(e.createVariableStatement(e.visitNodes(n.modifiers,L,e.isModifier),e.createVariableDeclarationList([e.setOriginalNode(e.createVariableDeclaration(n.name,void 0,c),n)])),n),n):e.setOriginalNode((i=n.name,a=c,o=n,e.setTextRange(e.createExpressionStatement(e.createAssignment(e.getNamespaceMemberName(s,i,!1,!0),a)),o)),n)}}function Ee(t){return void 0!==o&&e.hasModifier(t,1)}function Ce(t){return void 0===o&&e.hasModifier(t,1)}function ke(t){return Ce(t)&&!e.hasModifier(t,512)}function Ne(t){return e.createExpressionStatement(t)}function Ae(t,r){var n=e.createAssignment(e.getExternalModuleOrNamespaceExportName(s,r,!1,!0),e.getLocalName(r));e.setSourceMapRange(n,e.createRange(r.name?r.name.pos:r.pos,r.end));var i=e.createExpressionStatement(n);e.setSourceMapRange(i,e.createRange(-1,r.end)),t.push(i)}function Fe(t,r,n){return e.setTextRange(e.createAssignment(Pe(t),r),n)}function Pe(t){return e.getNamespaceMemberName(s,t,!1,!0)}function we(t){var r=e.getGeneratedNameForNode(t);return e.setSourceMapRange(r,t.name),r}function Ie(t){return e.getGeneratedNameForNode(t)}function Oe(t){if(d&f&&!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var r=v.getReferencedExportContainer(t,!1);if(r&&288!==r.kind)if(2&f&&248===r.kind||8&f&&247===r.kind)return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(r),t),t)}}function Me(t){var r=function(t){if(b.isolatedModules)return;return e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)?v.getConstantValue(t):void 0}(t);if(void 0!==r){e.setConstantValue(t,r);var n=e.createLiteral(r);if(!b.removeComments){var i=e.getOriginalNode(t,e.isAccessExpression),a=e.isPropertyAccessExpression(i)?e.declarationNameToString(i.name):e.getTextOfNode(i.argumentExpression);e.addSyntheticTrailingComment(n,3," "+a+" ")}return n}return t}},e.decorateHelper={name:"typescript:decorate",importName:"__decorate",scoped:!1,priority:2,text:'\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},e.metadataHelper={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},e.paramHelper={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"}}(s||(s={})),function(e){var r;!function(e){e[e.ClassAliases=1]="ClassAliases"}(r||(r={})),e.transformClassFields=function(r){var n,i,a,o,s=r.hoistVariableDeclaration,c=r.endLexicalEnvironment,u=r.resumeLexicalEnvironment,l=r.getEmitResolver(),_=r.onSubstituteNode;return r.onSubstituteNode=function(t,r){if(r=_(t,r),1===t)return function(t){switch(t.kind){case 75:return function(t){return function(t){if(1&n&&33554432&l.getNodeCheckFlags(t)){var r=l.getReferencedValueDeclaration(t);if(r){var a=i[r.id];if(a){var o=e.getSynthesizedClone(a);return e.setSourceMapRange(o,t),e.setCommentRange(o,t),o}}}return}(t)||t}(t)}return t}(r);return r},e.chainBundle((function(t){var n=r.getCompilerOptions();if(t.isDeclarationFile||n.useDefineForClassFields&&99===n.target)return t;var i=e.visitEachChild(t,d,r);return e.addEmitHelpers(i,r.readEmitHelpers()),i}));function d(c){if(!(1048576&c.transformFlags))return c;switch(c.kind){case 213:return function(t){if(!e.forEach(t.members,e.isPropertyDeclaration))return e.visitEachChild(t,d,r);var c=a;a=void 0;var u=e.isClassDeclaration(e.getOriginalNode(t)),_=e.getProperties(t,!0,!0),p=e.getEffectiveBaseTypeNode(t),y=!(!p||99===e.skipOuterExpressions(p.expression).kind),h=e.updateClassExpression(t,t.modifiers,t.name,void 0,e.visitNodes(t.heritageClauses,d,e.isHeritageClause),f(t,y));if(e.some(_)||e.some(a)){if(u)return e.Debug.assertDefined(o,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),o&&a&&e.some(a)&&o.push(e.createExpressionStatement(e.inlineExpressions(a))),a=c,o&&e.some(_)&&m(o,_,e.getInternalName(t)),h;var v=[],b=16777216&l.getNodeCheckFlags(t),x=e.createTempVariable(s,!!b);if(b){0==(1&n)&&(n|=1,r.enableSubstitution(75),i=[]);var D=e.getSynthesizedClone(x);D.autoGenerateFlags&=-9,i[e.getOriginalNodeId(t)]=D}return e.setEmitFlags(h,65536|e.getEmitFlags(h)),v.push(e.startOnNewLine(e.createAssignment(x,h))),e.addRange(v,e.map(a,e.startOnNewLine)),e.addRange(v,function(t,r){for(var n=[],i=0,a=t;i<a.length;i++){var o=a[i],s=g(o,r);e.startOnNewLine(s),e.setSourceMapRange(s,e.moveRangePastModifiers(o)),e.setCommentRange(s,o),e.setOriginalNode(s,o),n.push(s)}return n}(_,x)),v.push(e.startOnNewLine(x)),a=c,e.inlineExpressions(v)}return a=c,h}(c);case 244:return function(t){if(!e.forEach(t.members,e.isPropertyDeclaration))return e.visitEachChild(t,d,r);var n=a;a=void 0;var i=e.getEffectiveBaseTypeNode(t),o=!(!i||99===e.skipOuterExpressions(i.expression).kind),s=[e.updateClassDeclaration(t,void 0,t.modifiers,t.name,void 0,e.visitNodes(t.heritageClauses,d,e.isHeritageClause),f(t,o))];e.some(a)&&s.push(e.createExpressionStatement(e.inlineExpressions(a)));a=n;var c=e.getProperties(t,!0,!0);e.some(c)&&m(s,c,e.getInternalName(t));return s}(c);case 224:return function(n){var i=o;o=[];var a=e.visitEachChild(n,d,r),s=e.some(o)?t([a],o):a;return o=i,s}(c)}return e.visitEachChild(c,d,r)}function p(t){switch(t.kind){case 161:return;case 162:case 163:case 160:return e.visitEachChild(t,p,r);case 158:return function(t){e.Debug.assert(!e.some(t.decorators));var n=function(t,r){if(e.isComputedPropertyName(t)){var n=e.visitNode(t.expression,d,e.isExpression),i=e.skipPartiallyEmittedExpressions(n),a=e.isSimpleInlineableExpression(i);if(!(e.isAssignmentExpression(i)&&e.isGeneratedIdentifier(i.left))&&!a&&r){var o=e.getGeneratedNameForNode(t);return s(o),e.createAssignment(o,n)}return a||e.isIdentifier(i)?void 0:n}}(t.name,!!t.initializer||!!r.getCompilerOptions().useDefineForClassFields);n&&!e.isSimpleInlineableExpression(n)&&(a||(a=[])).push(n);return}(t);case 153:return function(t){var n=e.visitEachChild(t,d,r);if(e.some(a)){var i=a;i.push(t.expression),a=[],n=e.updateComputedPropertyName(n,e.inlineExpressions(i))}return n}(t);case 221:return t;default:return d(t)}}function f(t,n){var i=[],a=function(t,n){var i=e.visitNode(e.getFirstConstructorWithBody(t),d,e.isConstructorDeclaration);if(!e.forEach(t.members,(function(t){return e.isInitializedProperty(t,!r.getCompilerOptions().useDefineForClassFields)})))return i;var a=e.visitParameterList(i?i.parameters:void 0,d,r),o=function(t,n,i){var a=e.getProperties(t,!r.getCompilerOptions().useDefineForClassFields,!1);if(!n&&!e.some(a))return e.visitFunctionBody(void 0,d,r);u();var o=0,s=[];!n&&i&&s.push(e.createExpressionStatement(e.createCall(e.createSuper(),void 0,[e.createSpread(e.createIdentifier("arguments"))])));n&&(o=e.addPrologueDirectivesAndInitialSuperCall(n,s,d));if(n&&n.body){for(var l=0,_=o;_<n.body.statements.length&&e.isParameterPropertyDeclaration(e.getOriginalNode(n.body.statements[_]),n);_++)l++;l>0&&(e.addRange(s,e.visitNodes(n.body.statements,d,e.isStatement,o,l)),o+=l)}m(s,a,e.createThis()),n&&e.addRange(s,e.visitNodes(n.body.statements,d,e.isStatement,o));return s=e.mergeLexicalEnvironment(s,c()),e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(s),n?n.body.statements:t.members),!0),n?n.body:void 0)}(t,i,n);if(!o)return;return e.startOnNewLine(e.setOriginalNode(e.setTextRange(e.createConstructor(void 0,void 0,a,o),i||t),i))}(t,n);return a&&i.push(a),e.addRange(i,e.visitNodes(t.members,p,e.isClassElement)),e.setTextRange(e.createNodeArray(i),t.members)}function m(t,r,n){for(var i=0,a=r;i<a.length;i++){var o=a[i],s=e.createExpressionStatement(g(o,n));e.setSourceMapRange(s,e.moveRangePastModifiers(o)),e.setCommentRange(s,o),e.setOriginalNode(s,o),t.push(s)}}function g(t,n){var i=!r.getCompilerOptions().useDefineForClassFields,a=e.isComputedPropertyName(t.name)&&!e.isSimpleInlineableExpression(t.name.expression)?e.updateComputedPropertyName(t.name,e.getGeneratedNameForNode(t.name)):t.name,o=t.initializer||i?e.visitNode(t.initializer,d,e.isExpression):e.createVoidZero();if(i){var s=e.createMemberAccessForPropertyName(n,a,a);return e.createAssignment(s,o)}var c=e.isComputedPropertyName(a)?a.expression:e.isIdentifier(a)?e.createStringLiteral(e.unescapeLeadingUnderscores(a.escapedText)):a,u=e.createPropertyDescriptor({value:o,configurable:!0,writable:!0,enumerable:!0});return e.createObjectDefinePropertyCall(n,c,u)}}}(s||(s={})),function(e){var r;function n(t,r,n){var i=0!=(4096&t.getNodeCheckFlags(r)),a=[];return n.forEach((function(t,r){var n=e.unescapeLeadingUnderscores(r),o=[];o.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,e.setEmitFlags(e.createPropertyAccess(e.setEmitFlags(e.createSuper(),4),n),4)))),i&&o.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameter(void 0,void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(e.setEmitFlags(e.createPropertyAccess(e.setEmitFlags(e.createSuper(),4),n),4),e.createIdentifier("v"))))),a.push(e.createPropertyAssignment(n,e.createObjectLiteral(o)))})),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_super"),void 0,e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteral(a,!0)]))],2))}function i(t,r,n,i,a){t.requestEmitHelper(e.awaiterHelper);var o=e.createFunctionExpression(void 0,e.createToken(41),void 0,void 0,[],void 0,a);return(o.emitNode||(o.emitNode={})).flags|=786432,e.createCall(e.getUnscopedHelperName("__awaiter"),void 0,[r?e.createThis():e.createVoidZero(),n?e.createIdentifier("arguments"):e.createVoidZero(),i?e.createExpressionFromEntityName(i):e.createVoidZero(),o])}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(r||(r={})),e.transformES2017=function(r){var a,o,s,c,u,l=r.resumeLexicalEnvironment,_=r.endLexicalEnvironment,d=r.hoistVariableDeclaration,p=r.getEmitResolver(),f=r.getCompilerOptions(),m=e.getEmitScriptTarget(f),g=0,y=[],h=r.onEmitNode,v=r.onSubstituteNode;return r.onEmitNode=function(t,r,n){if(1&a&&function(e){var t=e.kind;return 244===t||161===t||160===t||162===t||163===t}(r)){var i=6144&p.getNodeCheckFlags(r);if(i!==g){var o=g;return g=i,h(t,r,n),void(g=o)}}else if(a&&y[e.getNodeId(r)]){o=g;return g=0,h(t,r,n),void(g=o)}h(t,r,n)},r.onSubstituteNode=function(r,n){if(n=v(r,n),1===r&&g)return function(r){switch(r.kind){case 193:return M(r);case 194:return L(r);case 195:return function(r){var n=r.expression;if(e.isSuperProperty(n)){var i=e.isPropertyAccessExpression(n)?M(n):L(n);return e.createCall(e.createPropertyAccess(i,"call"),void 0,t([e.createThis()],r.arguments))}return r}(r)}return r}(n);return n},e.chainBundle((function(t){if(t.isDeclarationFile)return t;u=e.isEffectiveStrictModeSourceFile(t,f);var n=e.visitEachChild(t,D,r);return e.addEmitHelpers(n,r.readEmitHelpers()),n}));function b(e,t){if(u){u=!1;var r=e(t);return u=!0,r}return e(t)}function x(t){return e.visitEachChild(t,D,r)}function D(t){if(0==(32&t.transformFlags))return t;switch(t.kind){case 125:return;case 205:return function(t){return e.setOriginalNode(e.setTextRange(e.createYield(void 0,e.visitNode(t.expression,D,e.isExpression)),t),t)}(t);case 160:return b(T,t);case 243:return b(E,t);case 200:return b(C,t);case 201:return function(t){return e.updateArrowFunction(t,e.visitNodes(t.modifiers,D,e.isModifier),void 0,e.visitParameterList(t.parameters,D,r),void 0,t.equalsGreaterThanToken,2&e.getFunctionFlags(t)?I(t):e.visitFunctionBody(t.body,D,r))}(t);case 193:return s&&e.isPropertyAccessExpression(t)&&101===t.expression.kind&&s.set(t.name.escapedText,!0),e.visitEachChild(t,D,r);case 194:return s&&101===t.expression.kind&&(c=!0),e.visitEachChild(t,D,r);case 162:case 163:case 161:case 244:case 213:return b(x,t);default:return e.visitEachChild(t,D,r)}}function S(t){if(e.isNodeWithPossibleHoistedDeclaration(t))switch(t.kind){case 224:return function(t){if(N(t.declarationList)){var n=A(t.declarationList,!1);return n?e.createExpressionStatement(n):void 0}return e.visitEachChild(t,D,r)}(t);case 229:return function(t){var r=t.initializer;return e.updateFor(t,N(r)?A(r,!1):e.visitNode(t.initializer,D,e.isForInitializer),e.visitNode(t.condition,D,e.isExpression),e.visitNode(t.incrementor,D,e.isExpression),e.visitNode(t.statement,S,e.isStatement,e.liftToBlock))}(t);case 230:return function(t){return e.updateForIn(t,N(t.initializer)?A(t.initializer,!0):e.visitNode(t.initializer,D,e.isForInitializer),e.visitNode(t.expression,D,e.isExpression),e.visitNode(t.statement,S,e.isStatement,e.liftToBlock))}(t);case 231:return function(t){return e.updateForOf(t,e.visitNode(t.awaitModifier,D,e.isToken),N(t.initializer)?A(t.initializer,!0):e.visitNode(t.initializer,D,e.isForInitializer),e.visitNode(t.expression,D,e.isExpression),e.visitNode(t.statement,S,e.isStatement,e.liftToBlock))}(t);case 278:return function(t){var n,i=e.createUnderscoreEscapedMap();if(k(t.variableDeclaration,i),i.forEach((function(t,r){o.has(r)&&(n||(n=e.cloneMap(o)),n.delete(r))})),n){var a=o;o=n;var s=e.visitEachChild(t,S,r);return o=a,s}return e.visitEachChild(t,S,r)}(t);case 222:case 236:case 250:case 275:case 276:case 239:case 227:case 228:case 226:case 235:case 237:return e.visitEachChild(t,S,r);default:return e.Debug.assertNever(t,"Unhandled node.")}return D(t)}function T(t){return e.updateMethod(t,void 0,e.visitNodes(t.modifiers,D,e.isModifier),t.asteriskToken,t.name,void 0,void 0,e.visitParameterList(t.parameters,D,r),void 0,2&e.getFunctionFlags(t)?I(t):e.visitFunctionBody(t.body,D,r))}function E(t){return e.updateFunctionDeclaration(t,void 0,e.visitNodes(t.modifiers,D,e.isModifier),t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,D,r),void 0,2&e.getFunctionFlags(t)?I(t):e.visitFunctionBody(t.body,D,r))}function C(t){return e.updateFunctionExpression(t,e.visitNodes(t.modifiers,D,e.isModifier),t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,D,r),void 0,2&e.getFunctionFlags(t)?I(t):e.visitFunctionBody(t.body,D,r))}function k(t,r){var n=t.name;if(e.isIdentifier(n))r.set(n.escapedText,!0);else for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||k(o,r)}}function N(t){return!!t&&e.isVariableDeclarationList(t)&&!(3&t.flags)&&t.declarations.some(w)}function A(t,r){!function(t){e.forEach(t.declarations,F)}(t);var n=e.getInitializedVariables(t);return 0===n.length?r?e.visitNode(e.convertToAssignmentElementTarget(t.declarations[0].name),D,e.isExpression):void 0:e.inlineExpressions(e.map(n,P))}function F(t){var r=t.name;if(e.isIdentifier(r))d(r);else for(var n=0,i=r.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||F(a)}}function P(t){var r=e.setSourceMapRange(e.createAssignment(e.convertToAssignmentElementTarget(t.name),t.initializer),t);return e.visitNode(r,D,e.isExpression)}function w(t){var r=t.name;if(e.isIdentifier(r))return o.has(r.escapedText);for(var n=0,i=r.elements;n<i.length;n++){var a=i[n];if(!e.isOmittedExpression(a)&&w(a))return!0}return!1}function I(t){l();var d=e.getOriginalNode(t,e.isFunctionLike).type,f=m<2?function(t){var r=t&&e.getEntityNameFromTypeNode(t);if(r&&e.isEntityName(r)){var n=p.getTypeReferenceSerializationKind(r);if(n===e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue||n===e.TypeReferenceSerializationKind.Unknown)return r}return}(d):void 0,g=201===t.kind,h=0!=(8192&p.getNodeCheckFlags(t)),v=o;o=e.createUnderscoreEscapedMap();for(var b=0,x=t.parameters;b<x.length;b++){k(x[b],o)}var S,T=s,E=c;if(g||(s=e.createUnderscoreEscapedMap(),c=!1),g){var C=i(r,!u,h,f,O(t.body)),N=_();if(e.some(N)){I=e.convertToFunctionBody(C);S=e.updateBlock(I,e.setTextRange(e.createNodeArray(e.concatenate(N,I.statements)),I.statements))}else S=C}else{var A=[],F=e.addPrologue(A,t.body.statements,!1,D);A.push(e.createReturn(i(r,!u,h,f,O(t.body,F)))),e.insertStatementsAfterStandardPrologue(A,_());var P=m>=2&&6144&p.getNodeCheckFlags(t);if(P&&(0==(1&a)&&(a|=1,r.enableSubstitution(195),r.enableSubstitution(193),r.enableSubstitution(194),r.enableEmitNotification(244),r.enableEmitNotification(160),r.enableEmitNotification(162),r.enableEmitNotification(163),r.enableEmitNotification(161),r.enableEmitNotification(224)),e.hasEntries(s))){var w=n(p,t,s);y[e.getNodeId(w)]=!0,e.insertStatementsAfterStandardPrologue(A,[w])}var I=e.createBlock(A,!0);e.setTextRange(I,t.body),P&&c&&(4096&p.getNodeCheckFlags(t)?e.addEmitHelper(I,e.advancedAsyncSuperHelper):2048&p.getNodeCheckFlags(t)&&e.addEmitHelper(I,e.asyncSuperHelper)),S=I}return o=v,g||(s=T,c=E),S}function O(t,r){return e.isBlock(t)?e.updateBlock(t,e.visitNodes(t.statements,S,e.isStatement,r)):e.convertToFunctionBody(e.visitNode(t,S,e.isConciseBody))}function M(t){return 101===t.expression.kind?e.setTextRange(e.createPropertyAccess(e.createFileLevelUniqueName("_super"),t.name),t):t}function L(t){return 101===t.expression.kind?(r=t.argumentExpression,n=t,4096&g?e.setTextRange(e.createPropertyAccess(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),"value"),n):e.setTextRange(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),n)):t;var r,n}},e.createSuperAccessVariableStatement=n,e.awaiterHelper={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:e.helperString(a(["\n const "," = name => super[name];"],["\n const "," = name => super[name];"]),"_superIndex")},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:e.helperString(a(["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"],["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"]),"_superIndex")}}(s||(s={})),function(e){var r;function n(t,r){return t.getCompilerOptions().target>=2?e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"assign"),void 0,r):(t.requestEmitHelper(e.assignHelper),e.createCall(e.getUnscopedHelperName("__assign"),void 0,r))}function i(t,r){return t.requestEmitHelper(e.awaitHelper),e.createCall(e.getUnscopedHelperName("__await"),void 0,[r])}function a(t,r,n){return t.requestEmitHelper(e.asyncValues),e.setTextRange(e.createCall(e.getUnscopedHelperName("__asyncValues"),void 0,[r]),n)}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(r||(r={})),e.transformES2018=function(r){var o=r.resumeLexicalEnvironment,s=r.endLexicalEnvironment,c=r.hoistVariableDeclaration,u=r.getEmitResolver(),l=r.getCompilerOptions(),_=e.getEmitScriptTarget(l),d=r.onEmitNode;r.onEmitNode=function(t,r,n){if(1&f&&function(e){var t=e.kind;return 244===t||161===t||160===t||162===t||163===t}(r)){var i=6144&u.getNodeCheckFlags(r);if(i!==b){var a=b;return b=i,d(t,r,n),void(b=a)}}else if(f&&x[e.getNodeId(r)]){a=b;return b=0,d(t,r,n),void(b=a)}d(t,r,n)};var p=r.onSubstituteNode;r.onSubstituteNode=function(r,n){if(n=p(r,n),1===r&&b)return function(r){switch(r.kind){case 193:return K(r);case 194:return J(r);case 195:return function(r){var n=r.expression;if(e.isSuperProperty(n)){var i=e.isPropertyAccessExpression(n)?K(n):J(n);return e.createCall(e.createPropertyAccess(i,"call"),void 0,t([e.createThis()],r.arguments))}return r}(r)}return r}(n);return n};var f,m,g,y,h,v=!1,b=0,x=[];return e.chainBundle((function(t){if(t.isDeclarationFile)return t;v=!1,g=e.isEffectiveStrictModeSourceFile(t,l);var n=e.visitEachChild(t,D,r);return e.addEmitHelpers(n,r.readEmitHelpers()),n}));function D(e){return k(e,!1)}function S(e){return k(e,!0)}function T(e){if(125!==e.kind)return e}function E(e,t){if(g){g=!1;var r=e(t);return g=!0,r}return e(t)}function C(t){return e.visitEachChild(t,D,r)}function k(o,s){if(0==(16&o.transformFlags))return o;switch(o.kind){case 205:return function(t){if(2&m&&1&m)return e.setOriginalNode(e.setTextRange(e.createYield(i(r,e.visitNode(t.expression,D,e.isExpression))),t),t);return e.visitEachChild(t,D,r)}(o);case 211:return function(t){if(2&m&&1&m){if(t.asteriskToken){var n=e.visitNode(t.expression,D,e.isExpression);return e.setOriginalNode(e.setTextRange(e.createYield(i(r,e.updateYield(t,t.asteriskToken,function(t,r,n){return t.requestEmitHelper(e.awaitHelper),t.requestEmitHelper(e.asyncDelegator),e.setTextRange(e.createCall(e.getUnscopedHelperName("__asyncDelegator"),void 0,[r]),n)}(r,a(r,n,n),n)))),t),t)}return e.setOriginalNode(e.setTextRange(e.createYield(F(t.expression?e.visitNode(t.expression,D,e.isExpression):e.createVoidZero())),t),t)}return e.visitEachChild(t,D,r)}(o);case 234:return function(t){if(2&m&&1&m)return e.updateReturn(t,F(t.expression?e.visitNode(t.expression,D,e.isExpression):e.createVoidZero()));return e.visitEachChild(t,D,r)}(o);case 237:return function(t){if(2&m){var n=e.unwrapInnermostStatementOfLabel(t);return 231===n.kind&&n.awaitModifier?A(n,t):e.restoreEnclosingLabel(e.visitEachChild(n,D,r),t)}return e.visitEachChild(t,D,r)}(o);case 192:return function(t){if(8192&t.transformFlags){var i=function(t){for(var r,n=[],i=0,a=t;i<a.length;i++){var o=a[i];if(281===o.kind){r&&(n.push(e.createObjectLiteral(r)),r=void 0);var s=o.expression;n.push(e.visitNode(s,D,e.isExpression))}else r=e.append(r,279===o.kind?e.createPropertyAssignment(o.name,e.visitNode(o.initializer,D,e.isExpression)):e.visitNode(o,D,e.isObjectLiteralElementLike))}r&&n.push(e.createObjectLiteral(r));return n}(t.properties);i.length&&192!==i[0].kind&&i.unshift(e.createObjectLiteral());var a=i[0];if(i.length>1){for(var o=1;o<i.length;o++)a=n(r,[a,i[o]]);return a}return n(r,i)}return e.visitEachChild(t,D,r)}(o);case 208:return function(t,n){if(e.isDestructuringAssignment(t)&&8192&t.left.transformFlags)return e.flattenDestructuringAssignment(t,D,r,1,!n);if(27===t.operatorToken.kind)return e.updateBinary(t,e.visitNode(t.left,S,e.isExpression),e.visitNode(t.right,n?S:D,e.isExpression));return e.visitEachChild(t,D,r)}(o,s);case 278:return function(n){if(n.variableDeclaration&&e.isBindingPattern(n.variableDeclaration.name)&&8192&n.variableDeclaration.name.transformFlags){var i=e.getGeneratedNameForNode(n.variableDeclaration.name),a=e.updateVariableDeclaration(n.variableDeclaration,n.variableDeclaration.name,void 0,i),o=e.flattenDestructuringBinding(a,D,r,1),s=e.visitNode(n.block,D,e.isBlock);return e.some(o)&&(s=e.updateBlock(s,t([e.createVariableStatement(void 0,o)],s.statements))),e.updateCatchClause(n,e.updateVariableDeclaration(n.variableDeclaration,i,void 0,void 0),s)}return e.visitEachChild(n,D,r)}(o);case 224:return function(t){if(e.hasModifier(t,1)){var n=v;v=!0;var i=e.visitEachChild(t,D,r);return v=n,i}return e.visitEachChild(t,D,r)}(o);case 241:return function(e){if(v){var t=v;v=!1;var r=N(e,!0);return v=t,r}return N(e,!1)}(o);case 231:return A(o,void 0);case 229:return function(t){return e.updateFor(t,e.visitNode(t.initializer,S,e.isForInitializer),e.visitNode(t.condition,D,e.isExpression),e.visitNode(t.incrementor,D,e.isExpression),e.visitNode(t.statement,D,e.isStatement))}(o);case 204:return function(t){return e.visitEachChild(t,S,r)}(o);case 161:return E(P,o);case 160:return E(O,o);case 162:return E(w,o);case 163:return E(I,o);case 243:return E(M,o);case 200:return E(L,o);case 201:return function(t){var n=m;m=e.getFunctionFlags(t);var i=e.updateArrowFunction(t,t.modifiers,void 0,e.visitParameterList(t.parameters,D,r),void 0,t.equalsGreaterThanToken,B(t));return m=n,i}(o);case 155:return function(t){if(8192&t.transformFlags)return e.updateParameter(t,void 0,void 0,t.dotDotDotToken,e.getGeneratedNameForNode(t),void 0,void 0,e.visitNode(t.initializer,D,e.isExpression));return e.visitEachChild(t,D,r)}(o);case 225:return function(t){return e.visitEachChild(t,S,r)}(o);case 199:return function(t,n){return e.visitEachChild(t,n?S:D,r)}(o,s);case 193:return y&&e.isPropertyAccessExpression(o)&&101===o.expression.kind&&y.set(o.name.escapedText,!0),e.visitEachChild(o,D,r);case 194:return y&&101===o.expression.kind&&(h=!0),e.visitEachChild(o,D,r);case 244:case 213:return E(C,o);default:return e.visitEachChild(o,D,r)}}function N(t,n){return e.isBindingPattern(t.name)&&8192&t.name.transformFlags?e.flattenDestructuringBinding(t,D,r,1,void 0,n):e.visitEachChild(t,D,r)}function A(t,n){return 8192&t.initializer.transformFlags&&(t=function(t){var r=e.skipParentheses(t.initializer);if(e.isVariableDeclarationList(r)||e.isAssignmentPattern(r)){var n=void 0,i=void 0,a=e.createTempVariable(void 0),o=[e.createForOfBindingStatement(r,a)];return e.isBlock(t.statement)?(e.addRange(o,t.statement.statements),n=t.statement,i=t.statement.statements):t.statement&&(e.append(o,t.statement),n=t.statement,i=t.statement),e.updateForOf(t,t.awaitModifier,e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(a),t.initializer)],1),t.initializer),t.expression,e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(o),i),!0),n))}return t}(t)),t.awaitModifier?function(t,n){var i=e.visitNode(t.expression,D,e.isExpression),o=e.isIdentifier(i)?e.getGeneratedNameForNode(i):e.createTempVariable(void 0),s=e.isIdentifier(i)?e.getGeneratedNameForNode(o):e.createTempVariable(void 0),u=e.createUniqueName("e"),l=e.getGeneratedNameForNode(u),_=e.createTempVariable(void 0),d=a(r,i,t.expression),p=e.createCall(e.createPropertyAccess(o,"next"),void 0,[]),f=e.createPropertyAccess(s,"done"),m=e.createPropertyAccess(s,"value"),g=e.createFunctionCall(_,o,[]);c(u),c(_);var y=e.setEmitFlags(e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(o,void 0,d),t.expression),e.createVariableDeclaration(s)]),t.expression),2097152),e.createComma(e.createAssignment(s,F(p)),e.createLogicalNot(f)),void 0,function(t,r){var n,i,a=e.createForOfBindingStatement(t.initializer,r),o=[e.visitNode(a,D,e.isStatement)],s=e.visitNode(t.statement,D,e.isStatement);e.isBlock(s)?(e.addRange(o,s.statements),n=s,i=s.statements):o.push(s);return e.setEmitFlags(e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(o),i),!0),n),432)}(t,m)),t),256);return e.createTry(e.createBlock([e.restoreEnclosingLabel(y,n)]),e.createCatchClause(e.createVariableDeclaration(l),e.setEmitFlags(e.createBlock([e.createExpressionStatement(e.createAssignment(u,e.createObjectLiteral([e.createPropertyAssignment("error",l)])))]),1)),e.createBlock([e.createTry(e.createBlock([e.setEmitFlags(e.createIf(e.createLogicalAnd(e.createLogicalAnd(s,e.createLogicalNot(f)),e.createAssignment(_,e.createPropertyAccess(o,"return"))),e.createExpressionStatement(F(g))),1)]),void 0,e.setEmitFlags(e.createBlock([e.setEmitFlags(e.createIf(u,e.createThrow(e.createPropertyAccess(u,"error"))),1)]),1))]))}(t,n):e.restoreEnclosingLabel(e.visitEachChild(t,D,r),n)}function F(t){return 1&m?e.createYield(void 0,i(r,t)):e.createAwait(t)}function P(t){var n=m;m=0;var i=e.updateConstructor(t,void 0,t.modifiers,e.visitParameterList(t.parameters,D,r),B(t));return m=n,i}function w(t){var n=m;m=0;var i=e.updateGetAccessor(t,void 0,t.modifiers,e.visitNode(t.name,D,e.isPropertyName),e.visitParameterList(t.parameters,D,r),void 0,B(t));return m=n,i}function I(t){var n=m;m=0;var i=e.updateSetAccessor(t,void 0,t.modifiers,e.visitNode(t.name,D,e.isPropertyName),e.visitParameterList(t.parameters,D,r),B(t));return m=n,i}function O(t){var n=m;m=e.getFunctionFlags(t);var i=e.updateMethod(t,void 0,1&m?e.visitNodes(t.modifiers,T,e.isModifier):t.modifiers,2&m?void 0:t.asteriskToken,e.visitNode(t.name,D,e.isPropertyName),e.visitNode(void 0,D,e.isToken),void 0,e.visitParameterList(t.parameters,D,r),void 0,2&m&&1&m?R(t):B(t));return m=n,i}function M(t){var n=m;m=e.getFunctionFlags(t);var i=e.updateFunctionDeclaration(t,void 0,1&m?e.visitNodes(t.modifiers,T,e.isModifier):t.modifiers,2&m?void 0:t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,D,r),void 0,2&m&&1&m?R(t):B(t));return m=n,i}function L(t){var n=m;m=e.getFunctionFlags(t);var i=e.updateFunctionExpression(t,1&m?e.visitNodes(t.modifiers,T,e.isModifier):t.modifiers,2&m?void 0:t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,D,r),void 0,2&m&&1&m?R(t):B(t));return m=n,i}function R(t){o();var n=[],i=e.addPrologue(n,t.body.statements,!1,D);j(n,t);var a=y,c=h;y=e.createUnderscoreEscapedMap(),h=!1;var l=e.createReturn(function(t,r,n){return t.requestEmitHelper(e.awaitHelper),t.requestEmitHelper(e.asyncGeneratorHelper),(r.emitNode||(r.emitNode={})).flags|=262144,e.createCall(e.getUnscopedHelperName("__asyncGenerator"),void 0,[n?e.createThis():e.createVoidZero(),e.createIdentifier("arguments"),r])}(r,e.createFunctionExpression(void 0,e.createToken(41),t.name&&e.getGeneratedNameForNode(t.name),void 0,[],void 0,e.updateBlock(t.body,e.visitLexicalEnvironment(t.body.statements,D,r,i))),!g)),d=_>=2&&6144&u.getNodeCheckFlags(t);if(d){0==(1&f)&&(f|=1,r.enableSubstitution(195),r.enableSubstitution(193),r.enableSubstitution(194),r.enableEmitNotification(244),r.enableEmitNotification(160),r.enableEmitNotification(162),r.enableEmitNotification(163),r.enableEmitNotification(161),r.enableEmitNotification(224));var p=e.createSuperAccessVariableStatement(u,t,y);x[e.getNodeId(p)]=!0,e.insertStatementsAfterStandardPrologue(n,[p])}n.push(l),e.insertStatementsAfterStandardPrologue(n,s());var m=e.updateBlock(t.body,n);return d&&h&&(4096&u.getNodeCheckFlags(t)?e.addEmitHelper(m,e.advancedAsyncSuperHelper):2048&u.getNodeCheckFlags(t)&&e.addEmitHelper(m,e.asyncSuperHelper)),y=a,h=c,m}function B(t){o();var r=0,n=[],i=e.visitNode(t.body,D,e.isConciseBody);e.isBlock(i)&&(r=e.addPrologue(n,i.statements,!1,D)),e.addRange(n,j(void 0,t));var a=s();if(r>0||e.some(n)||e.some(a)){var c=e.convertToFunctionBody(i,!0);return e.insertStatementsAfterStandardPrologue(n,a),e.addRange(n,c.statements.slice(r)),e.updateBlock(c,e.setTextRange(e.createNodeArray(n),c.statements))}return i}function j(t,n){for(var i=0,a=n.parameters;i<a.length;i++){var o=a[i];if(8192&o.transformFlags){var s=e.getGeneratedNameForNode(o),c=e.flattenDestructuringBinding(o,D,r,1,s,!1,!0);if(e.some(c)){var u=e.createVariableStatement(void 0,e.createVariableDeclarationList(c));e.setEmitFlags(u,1048576),t=e.append(t,u)}}}return t}function K(t){return 101===t.expression.kind?e.setTextRange(e.createPropertyAccess(e.createFileLevelUniqueName("_super"),t.name),t):t}function J(t){return 101===t.expression.kind?(r=t.argumentExpression,n=t,4096&b?e.setTextRange(e.createPropertyAccess(e.createCall(e.createIdentifier("_superIndex"),void 0,[r]),"value"),n):e.setTextRange(e.createCall(e.createIdentifier("_superIndex"),void 0,[r]),n)):t;var r,n}},e.assignHelper={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:"\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"},e.createAssignHelper=n,e.awaitHelper={name:"typescript:await",importName:"__await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"},e.asyncGeneratorHelper={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},e.asyncDelegator={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }\n };'},e.asyncValues={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'}}(s||(s={})),function(e){e.transformES2019=function(t){return e.chainBundle((function(n){if(n.isDeclarationFile)return n;return e.visitEachChild(n,r,t)}));function r(n){if(0==(8&n.transformFlags))return n;switch(n.kind){case 278:return function(n){if(!n.variableDeclaration)return e.updateCatchClause(n,e.createVariableDeclaration(e.createTempVariable(void 0)),e.visitNode(n.block,r,e.isBlock));return e.visitEachChild(n,r,t)}(n);default:return e.visitEachChild(n,r,t)}}}}(s||(s={})),function(e){e.transformESNext=function(t){var r=t.hoistVariableDeclaration;return e.chainBundle((function(r){if(r.isDeclarationFile)return r;return e.visitEachChild(r,n,t)}));function n(i){if(0==(4&i.transformFlags))return i;switch(i.kind){case 193:case 194:case 195:if(32&i.flags){var o=a(i,!1);return e.Debug.assertNotNode(o,e.isSyntheticReference),o}return e.visitEachChild(i,n,t);case 208:return 60===i.operatorToken.kind?function(t){var i=[],a=e.visitNode(t.left,n,e.isExpression);if(!e.isIdentifier(a)){var o=e.createTempVariable(r);i.push(e.createAssignment(o,a)),a=o}return i.push(e.createParen(e.createConditional(function(t){return e.createBinary(e.createBinary(t,e.createToken(37),e.createNull()),e.createToken(55),e.createBinary(t,e.createToken(37),e.createVoidZero()))}(a),a,e.visitNode(t.right,n,e.isExpression)))),e.inlineExpressions(i)}(i):e.visitEachChild(i,n,t);default:return e.visitEachChild(i,n,t)}}function i(o,s){switch(o.kind){case 199:return function(t,r){var n=i(t.expression,r);return e.isSyntheticReference(n)?e.createSyntheticReferenceExpression(e.updateParen(t,n.expression),n.thisArg):e.updateParen(t,n)}(o,s);case 193:return function(t,i){if(e.isOptionalChain(t))return a(t,i);var o,s=e.visitNode(t.expression,n,e.isExpression);return e.Debug.assertNotNode(s,e.isSyntheticReference),i&&(o=e.createTempVariable(r),s=e.createParen(e.createAssignment(o,s))),s=e.updatePropertyAccess(t,s,e.visitNode(t.name,n,e.isIdentifier)),o?e.createSyntheticReferenceExpression(s,o):s}(o,s);case 194:return function(t,i){if(e.isOptionalChain(t))return a(t,i);var o,s=e.visitNode(t.expression,n,e.isExpression);return e.Debug.assertNotNode(s,e.isSyntheticReference),i&&(o=e.createTempVariable(r),s=e.createParen(e.createAssignment(o,s))),s=e.updateElementAccess(t,s,e.visitNode(t.argumentExpression,n,e.isExpression)),o?e.createSyntheticReferenceExpression(s,o):s}(o,s);case 195:return function(r,i){return e.isOptionalChain(r)?a(r,i):e.visitEachChild(r,n,t)}(o,s);default:return e.visitNode(o,n,e.isExpression)}}function a(t,a){for(var o,s=function(t){for(var r=[t];!t.questionDotToken&&!e.isTaggedTemplateExpression(t);)t=e.cast(t.expression,e.isOptionalChain),r.unshift(t);return{expression:t.expression,chain:r}}(t),c=s.expression,u=s.chain,l=i(c,e.isCallChain(u[0])),_=e.createTempVariable(r),d=e.isSyntheticReference(l)?l.thisArg:void 0,p=e.isSyntheticReference(l)?l.expression:l,f=_,m=0;m<u.length;m++){var g=u[m];switch(g.kind){case 193:m===u.length-1&&a&&(o=e.createTempVariable(r),f=e.createParen(e.createAssignment(o,f))),f=e.createPropertyAccess(f,e.visitNode(g.name,n,e.isIdentifier));break;case 194:m===u.length-1&&a&&(o=e.createTempVariable(r),f=e.createParen(e.createAssignment(o,f))),f=e.createElementAccess(f,e.visitNode(g.argumentExpression,n,e.isExpression));break;case 195:f=0===m&&d?e.createFunctionCall(f,d,e.visitNodes(g.arguments,n,e.isExpression)):e.createCall(f,void 0,e.visitNodes(g.arguments,n,e.isExpression))}e.setOriginalNode(f,g)}var y=e.createConditional(e.createLogicalOr(e.createStrictEquality(e.createAssignment(_,p),e.createNull()),e.createStrictEquality(_,e.createVoidZero())),e.createVoidZero(),f);return o?e.createSyntheticReferenceExpression(y,o):y}}}(s||(s={})),function(e){e.transformJsx=function(r){var n,i=r.getCompilerOptions();return e.chainBundle((function(t){if(t.isDeclarationFile)return t;n=t;var i=e.visitEachChild(t,a,r);return e.addEmitHelpers(i,r.readEmitHelpers()),i}));function a(t){return 2&t.transformFlags?function(t){switch(t.kind){case 264:return s(t,!1);case 265:return c(t,!1);case 268:return u(t,!1);case 274:return m(t);default:return e.visitEachChild(t,a,r)}}(t):t}function o(t){switch(t.kind){case 11:return function(t){var r=function(t){for(var r,n=0,i=-1,a=0;a<t.length;a++){var o=t.charCodeAt(a);e.isLineBreak(o)?(-1!==n&&-1!==i&&(r=p(r,t.substr(n,i-n+1))),n=-1):e.isWhiteSpaceSingleLine(o)||(i=a,-1===n&&(n=a))}return-1!==n?p(r,t.substr(n)):r}(t.text);return void 0===r?void 0:e.createLiteral(r)}(t);case 274:return m(t);case 264:return s(t,!0);case 265:return c(t,!0);case 268:return u(t,!0);default:return e.Debug.failBadSyntaxKind(t)}}function s(e,t){return l(e.openingElement,e.children,t,e)}function c(e,t){return l(e,void 0,t,e)}function u(t,a){return function(t,a,s,c){var u=e.createExpressionForJsxFragment(r.getEmitResolver().getJsxFactoryEntity(n),i.reactNamespace,e.mapDefined(a,o),t,c);s&&e.startOnNewLine(u);return u}(t.openingFragment,t.children,a,t)}function l(t,a,s,c){var u,l=function t(r){if(264===r.kind)return t(r.openingElement);var n=r.tagName;return e.isIdentifier(n)&&e.isIntrinsicJsxName(n.escapedText)?e.createLiteral(e.idText(n)):e.createExpressionFromEntityName(n)}(t),p=t.attributes.properties;if(0===p.length)u=e.createNull();else{var f=e.flatten(e.spanMap(p,e.isJsxSpreadAttribute,(function(t,r){return r?e.map(t,_):e.createObjectLiteral(e.map(t,d))})));e.isJsxSpreadAttribute(p[0])&&f.unshift(e.createObjectLiteral()),(u=e.singleOrUndefined(f))||(u=e.createAssignHelper(r,f))}var m=e.createExpressionForJsxElement(r.getEmitResolver().getJsxFactoryEntity(n),i.reactNamespace,l,u,e.mapDefined(a,o),t,c);return s&&e.startOnNewLine(m),m}function _(t){return e.visitNode(t.expression,a,e.isExpression)}function d(t){var r=function(t){var r=t.name,n=e.idText(r);return/^[A-Za-z_]\w*$/.test(n)?r:e.createLiteral(n)}(t),i=function(t){if(void 0===t)return e.createTrue();if(10===t.kind){var r=e.createLiteral((i=t.text,((a=f(i))===i?void 0:a)||t.text));return r.singleQuote=void 0!==t.singleQuote?t.singleQuote:!e.isStringDoubleQuoted(t,n),e.setTextRange(r,t)}return 274===t.kind?void 0===t.expression?e.createTrue():m(t):e.Debug.failBadSyntaxKind(t);var i,a}(t.initializer);return e.createPropertyAssignment(r,i)}function p(e,t){var r=f(t);return void 0===e?r:e+" "+r}function f(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,(function(e,r,n,i,a,o,s){if(a)return String.fromCharCode(parseInt(a,10));if(o)return String.fromCharCode(parseInt(o,16));var c=t.get(s);return c?String.fromCharCode(c):e}))}function m(t){return e.visitNode(t.expression,a,e.isExpression)}};var t=e.createMapFromTemplate({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830})}(s||(s={})),function(e){e.transformES2016=function(t){var r=t.hoistVariableDeclaration;return e.chainBundle((function(r){if(r.isDeclarationFile)return r;return e.visitEachChild(r,n,t)}));function n(i){if(0==(64&i.transformFlags))return i;switch(i.kind){case 208:return function(i){switch(i.operatorToken.kind){case 66:return function(t){var i,a,o=e.visitNode(t.left,n,e.isExpression),s=e.visitNode(t.right,n,e.isExpression);if(e.isElementAccessExpression(o)){var c=e.createTempVariable(r),u=e.createTempVariable(r);i=e.setTextRange(e.createElementAccess(e.setTextRange(e.createAssignment(c,o.expression),o.expression),e.setTextRange(e.createAssignment(u,o.argumentExpression),o.argumentExpression)),o),a=e.setTextRange(e.createElementAccess(c,u),o)}else if(e.isPropertyAccessExpression(o)){c=e.createTempVariable(r);i=e.setTextRange(e.createPropertyAccess(e.setTextRange(e.createAssignment(c,o.expression),o.expression),o.name),o),a=e.setTextRange(e.createPropertyAccess(c,o.name),o)}else i=o,a=o;return e.setTextRange(e.createAssignment(i,e.createMathPow(a,s,t)),t)}(i);case 42:return function(t){var r=e.visitNode(t.left,n,e.isExpression),i=e.visitNode(t.right,n,e.isExpression);return e.createMathPow(r,i,t)}(i);default:return e.visitEachChild(i,n,t)}}(i);default:return e.visitEachChild(i,n,t)}}}}(s||(s={})),function(e){var r,n,i,a,o;!function(e){e[e.CapturedThis=1]="CapturedThis",e[e.BlockScopedBindings=2]="BlockScopedBindings"}(r||(r={})),function(e){e[e.Body=1]="Body",e[e.Initializer=2]="Initializer"}(n||(n={})),function(e){e[e.ToOriginal=0]="ToOriginal",e[e.ToOutParameter=1]="ToOutParameter"}(i||(i={})),function(e){e[e.Break=2]="Break",e[e.Continue=4]="Continue",e[e.Return=8]="Return"}(a||(a={})),function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.ArrowFunction=2]="ArrowFunction",e[e.AsyncFunctionBody=4]="AsyncFunctionBody",e[e.NonStaticClassElement=8]="NonStaticClassElement",e[e.CapturesThis=16]="CapturesThis",e[e.ExportedVariableStatement=32]="ExportedVariableStatement",e[e.TopLevel=64]="TopLevel",e[e.Block=128]="Block",e[e.IterationStatement=256]="IterationStatement",e[e.IterationStatementBlock=512]="IterationStatementBlock",e[e.IterationContainer=1024]="IterationContainer",e[e.ForStatement=2048]="ForStatement",e[e.ForInOrForOfStatement=4096]="ForInOrForOfStatement",e[e.ConstructorWithCapturedSuper=8192]="ConstructorWithCapturedSuper",e[e.AncestorFactsMask=16383]="AncestorFactsMask",e[e.BlockScopeIncludes=0]="BlockScopeIncludes",e[e.BlockScopeExcludes=7104]="BlockScopeExcludes",e[e.SourceFileIncludes=64]="SourceFileIncludes",e[e.SourceFileExcludes=8064]="SourceFileExcludes",e[e.FunctionIncludes=65]="FunctionIncludes",e[e.FunctionExcludes=16286]="FunctionExcludes",e[e.AsyncFunctionBodyIncludes=69]="AsyncFunctionBodyIncludes",e[e.AsyncFunctionBodyExcludes=16278]="AsyncFunctionBodyExcludes",e[e.ArrowFunctionIncludes=66]="ArrowFunctionIncludes",e[e.ArrowFunctionExcludes=15232]="ArrowFunctionExcludes",e[e.ConstructorIncludes=73]="ConstructorIncludes",e[e.ConstructorExcludes=16278]="ConstructorExcludes",e[e.DoOrWhileStatementIncludes=1280]="DoOrWhileStatementIncludes",e[e.DoOrWhileStatementExcludes=0]="DoOrWhileStatementExcludes",e[e.ForStatementIncludes=3328]="ForStatementIncludes",e[e.ForStatementExcludes=5056]="ForStatementExcludes",e[e.ForInOrForOfStatementIncludes=5376]="ForInOrForOfStatementIncludes",e[e.ForInOrForOfStatementExcludes=3008]="ForInOrForOfStatementExcludes",e[e.BlockIncludes=128]="BlockIncludes",e[e.BlockExcludes=6976]="BlockExcludes",e[e.IterationStatementBlockIncludes=512]="IterationStatementBlockIncludes",e[e.IterationStatementBlockExcludes=7104]="IterationStatementBlockExcludes",e[e.NewTarget=16384]="NewTarget",e[e.CapturedLexicalThis=32768]="CapturedLexicalThis",e[e.SubtreeFactsMask=-16384]="SubtreeFactsMask",e[e.ArrowFunctionSubtreeExcludes=0]="ArrowFunctionSubtreeExcludes",e[e.FunctionSubtreeExcludes=49152]="FunctionSubtreeExcludes"}(o||(o={})),e.transformES2015=function(r){var n,i,a,o,s,c,u=r.startLexicalEnvironment,l=r.resumeLexicalEnvironment,_=r.endLexicalEnvironment,d=r.hoistVariableDeclaration,p=r.getCompilerOptions(),f=r.getEmitResolver(),m=r.onSubstituteNode,g=r.onEmitNode;return r.onEmitNode=function(t,r,n){if(1&c&&e.isFunctionLike(r)){var i=y(16286,8&e.getEmitFlags(r)?81:65);return g(t,r,n),void h(i,0,0)}g(t,r,n)},r.onSubstituteNode=function(t,r){if(r=m(t,r),1===t)return function(t){switch(t.kind){case 75:return function(t){if(2&c&&!e.isInternalName(t)){var r=f.getReferencedDeclarationWithCollidingName(t);if(r&&(!e.isClassLike(r)||!function(t,r){var n=e.getParseTreeNode(r);if(!n||n===t||n.end<=t.pos||n.pos>=t.end)return!1;var i=e.getEnclosingBlockScopeContainer(t);for(;n;){if(n===i||n===t)return!1;if(e.isClassElement(n)&&n.parent===t)return!0;n=n.parent}return!1}(r,t)))return e.setTextRange(e.getGeneratedNameForNode(e.getNameOfDeclaration(r)),t)}return t}(t);case 103:return function(t){if(1&c&&16&a)return e.setTextRange(e.createFileLevelUniqueName("_this"),t);return t}(t)}return t}(r);if(e.isIdentifier(r))return function(t){if(2&c&&!e.isInternalName(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r&&function(e){switch(e.parent.kind){case 190:case 244:case 247:case 241:return e.parent.name===e&&f.isDeclarationWithCollidingName(e.parent)}return!1}(r))return e.setTextRange(e.getGeneratedNameForNode(r),t)}return t}(r);return r},e.chainBundle((function(t){if(t.isDeclarationFile)return t;n=t,i=t.text;var s=function(t){var r=y(8064,64),n=[],i=[];u();var a=e.addStandardPrologue(n,t.statements,!1);a=e.addCustomPrologue(n,t.statements,a,b),e.addRange(i,e.visitNodes(t.statements,b,e.isStatement,a)),o&&i.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(o)));return e.mergeLexicalEnvironment(n,_()),P(n,t),h(r,0,0),e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(e.concatenate(n,i)),t.statements))}(t);return e.addEmitHelpers(s,r.readEmitHelpers()),n=void 0,i=void 0,o=void 0,a=0,s}));function y(e,t){var r=a;return a=16383&(a&~e|t),r}function h(e,t,r){a=-16384&(a&~t|r)|e}function v(e){return 0!=(8192&a)&&234===e.kind&&!e.expression}function b(i){return function(t){return 0!=(128&t.transformFlags)||void 0!==s||8192&a&&(e.isStatement(t)||222===t.kind)||e.isIterationStatement(t,!1)&&ie(t)||0!=(33554432&e.getEmitFlags(t))}(i)?function(i){switch(i.kind){case 119:return;case 244:return function(t){var r=e.createVariableDeclaration(e.getLocalName(t,!0),void 0,S(t));e.setOriginalNode(r,t);var n=[],i=e.createVariableStatement(void 0,e.createVariableDeclarationList([r]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),n.push(i),e.hasModifier(t,1)){var a=e.hasModifier(t,512)?e.createExportDefault(e.getLocalName(t)):e.createExternalModuleExport(e.getLocalName(t));e.setOriginalNode(a,i),n.push(a)}var o=e.getEmitFlags(t);0==(4194304&o)&&(n.push(e.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o));return e.singleOrMany(n)}(i);case 213:return function(e){return S(e)}(i);case 155:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,e.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(i);case 243:return function(t){var n=s;s=void 0;var i=y(16286,65),o=e.visitParameterList(t.parameters,b,r),c=j(t),u=16384&a?e.getLocalName(t):t.name;return h(i,49152,0),s=n,e.updateFunctionDeclaration(t,void 0,e.visitNodes(t.modifiers,b,e.isModifier),t.asteriskToken,u,void 0,o,void 0,c)}(i);case 201:return function(t){2048&t.transformFlags&&(a|=32768);var n=s;s=void 0;var i=y(15232,66),o=e.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(t.parameters,b,r),void 0,j(t));e.setTextRange(o,t),e.setOriginalNode(o,t),e.setEmitFlags(o,8),32768&a&&Ne();return h(i,0,0),s=n,o}(i);case 200:return function(t){var n=262144&e.getEmitFlags(t)?y(16278,69):y(16286,65),i=s;s=void 0;var o=e.visitParameterList(t.parameters,b,r),c=j(t),u=16384&a?e.getLocalName(t):t.name;return h(n,49152,0),s=i,e.updateFunctionExpression(t,void 0,t.asteriskToken,u,void 0,o,void 0,c)}(i);case 241:return U(i);case 75:return function(t){if(!s)return t;if(e.isGeneratedIdentifier(t))return t;if("arguments"!==t.escapedText||!f.isArgumentsLocalBinding(t))return t;return s.argumentsName||(s.argumentsName=e.createUniqueName("arguments"))}(i);case 242:return function(t){if(3&t.flags||65536&t.transformFlags){3&t.flags&&ke();var n=e.flatMap(t.declarations,1&t.flags?z:U),i=e.createVariableDeclarationList(n);return e.setOriginalNode(i,t),e.setTextRange(i,t),e.setCommentRange(i,t),65536&t.transformFlags&&(e.isBindingPattern(t.declarations[0].name)||e.isBindingPattern(e.last(t.declarations).name))&&e.setSourceMapRange(i,function(t){for(var r=-1,n=-1,i=0,a=t;i<a.length;i++){var o=a[i];r=-1===r?o.pos:-1===o.pos?r:Math.min(r,o.pos),n=Math.max(n,o.end)}return e.createRange(r,n)}(n)),i}return e.visitEachChild(t,b,r)}(i);case 236:return function(t){if(void 0!==s){var n=s.allowedNonLabeledJumps;s.allowedNonLabeledJumps|=2;var i=e.visitEachChild(t,b,r);return s.allowedNonLabeledJumps=n,i}return e.visitEachChild(t,b,r)}(i);case 250:return function(t){var n=y(7104,0),i=e.visitEachChild(t,b,r);return h(n,0,0),i}(i);case 222:return function(t,n){if(n)return e.visitEachChild(t,b,r);var i=256&a?y(7104,512):y(6976,128),o=e.visitEachChild(t,b,r);return h(i,0,0),o}(i,!1);case 233:case 232:return function(t){if(s){var n=233===t.kind?2:4;if(!(t.label&&s.labels&&s.labels.get(e.idText(t.label))||!t.label&&s.allowedNonLabeledJumps&n)){var i=void 0,a=t.label;a?233===t.kind?(i="break-"+a.escapedText,_e(s,!0,e.idText(a),i)):(i="continue-"+a.escapedText,_e(s,!1,e.idText(a),i)):233===t.kind?(s.nonLocalJumps|=2,i="break"):(s.nonLocalJumps|=4,i="continue");var o=e.createLiteral(i);if(s.loopOutParameters.length){for(var c=s.loopOutParameters,u=void 0,l=0;l<c.length;l++){var _=ue(c[l],1);u=0===l?_:e.createBinary(u,27,_)}o=e.createBinary(u,27,o)}return e.createReturn(o)}}return e.visitEachChild(t,b,r)}(i);case 237:return function(t){s&&!s.labels&&(s.labels=e.createMap());var r=e.unwrapInnermostStatementOfLabel(t,s&&V);return e.isIterationStatement(r,!1)?function(e,t){switch(e.kind){case 227:case 228:return G(e,t);case 229:return H(e,t);case 230:return Y(e,t);case 231:return X(e,t)}}(r,t):e.restoreEnclosingLabel(e.visitNode(r,b,e.isStatement,e.liftToBlock),t,s&&q)}(i);case 227:case 228:return G(i,void 0);case 229:return H(i,void 0);case 230:return Y(i,void 0);case 231:return X(i,void 0);case 225:return function(t){switch(t.expression.kind){case 199:return e.updateExpressionStatement(t,K(t.expression,!1));case 208:return e.updateExpressionStatement(t,J(t.expression,!1))}return e.visitEachChild(t,b,r)}(i);case 192:return function(t){for(var n=t.properties,i=n.length,o=i,s=i,c=0;c<i;c++){var u=n[c];if(131072&u.transformFlags&&4&a&&c<s&&(s=c),153===u.name.kind){o=c;break}}if(o!==i){s<o&&(o=s);var l=e.createTempVariable(d),_=[],p=e.createAssignment(l,e.setEmitFlags(e.createObjectLiteral(e.visitNodes(n,b,e.isObjectLiteralElementLike,0,o),t.multiLine),65536));return t.multiLine&&e.startOnNewLine(p),_.push(p),function(t,r,n,i){for(var a=r.properties,o=a.length,s=i;s<o;s++){var c=a[s];switch(c.kind){case 162:case 163:var u=e.getAllAccessorDeclarations(r.properties,c);c===u.firstAccessor&&t.push(R(n,u,r,!!r.multiLine));break;case 160:t.push(ge(c,n,r,r.multiLine));break;case 279:t.push(fe(c,n,r.multiLine));break;case 280:t.push(me(c,n,r.multiLine));break;default:e.Debug.failBadSyntaxKind(r)}}}(_,t,l,o),_.push(t.multiLine?e.startOnNewLine(e.getMutableClone(l)):l),e.inlineExpressions(_)}return e.visitEachChild(t,b,r)}(i);case 278:return function(n){var i,a=y(7104,0);if(e.Debug.assert(!!n.variableDeclaration,"Catch clause variable should always be present when downleveling ES2015."),e.isBindingPattern(n.variableDeclaration.name)){var o=e.createTempVariable(void 0),s=e.createVariableDeclaration(o);e.setTextRange(s,n.variableDeclaration);var c=e.flattenDestructuringBinding(n.variableDeclaration,b,r,0,o),u=e.createVariableDeclarationList(c);e.setTextRange(u,n.variableDeclaration);var l=e.createVariableStatement(void 0,u);i=e.updateCatchClause(n,s,(_=n.block,d=l,p=e.visitNodes(_.statements,b,e.isStatement),e.updateBlock(_,t([d],p))))}else i=e.visitEachChild(n,b,r);var _,d,p;return h(a,0,0),i}(i);case 280:return function(t){return e.setTextRange(e.createPropertyAssignment(t.name,e.getSynthesizedClone(t.name)),t)}(i);case 153:return function(t){return e.visitEachChild(t,b,r)}(i);case 191:return function(t){if(e.some(t.elements,e.isSpreadElement))return he(t.elements,!0,!!t.multiLine,!!t.elements.hasTrailingComma);return e.visitEachChild(t,b,r)}(i);case 195:return function(t){if(33554432&e.getEmitFlags(t))return function(t){var r=e.cast(e.cast(e.skipOuterExpressions(t.expression),e.isArrowFunction).body,e.isBlock),n=function(t){return e.isVariableStatement(t)&&!!e.first(t.declarationList.declarations).initializer},i=e.visitNodes(r.statements,b,e.isStatement),a=e.filter(i,n),o=e.filter(i,(function(e){return!n(e)})),s=e.cast(e.first(a),e.isVariableStatement).declarationList.declarations[0],c=e.skipOuterExpressions(s.initializer),u=e.tryCast(c,e.isAssignmentExpression),l=e.cast(u?e.skipOuterExpressions(u.right):c,e.isCallExpression),_=e.cast(e.skipOuterExpressions(l.expression),e.isFunctionExpression),d=_.body.statements,p=0,f=-1,m=[];if(u){var g=e.tryCast(d[p],e.isExpressionStatement);g&&(m.push(g),p++),m.push(d[p]),p++,m.push(e.createExpressionStatement(e.createAssignment(u.left,e.cast(s.name,e.isIdentifier))))}for(;!e.isReturnStatement(e.elementAt(d,f));)f--;e.addRange(m,d,p,f),f<-1&&e.addRange(m,d,f+1);return e.addRange(m,o),e.addRange(m,a,1),e.recreateOuterExpressions(t.expression,e.recreateOuterExpressions(s.initializer,e.recreateOuterExpressions(u&&u.right,e.updateCall(l,e.recreateOuterExpressions(l.expression,e.updateFunctionExpression(_,void 0,void 0,void 0,void 0,_.parameters,void 0,e.updateBlock(_.body,m))),void 0,l.arguments))))}(t);var r=e.skipOuterExpressions(t.expression);if(101===r.kind||e.isSuperProperty(r)||e.some(t.arguments,e.isSpreadElement))return ye(t,!0);return e.updateCall(t,e.visitNode(t.expression,x,e.isExpression),void 0,e.visitNodes(t.arguments,b,e.isExpression))}(i);case 196:return function(n){if(e.some(n.arguments,e.isSpreadElement)){var i=e.createCallBinding(e.createPropertyAccess(n.expression,"bind"),d),a=i.target,o=i.thisArg;return e.createNew(e.createFunctionApply(e.visitNode(a,b,e.isExpression),o,he(e.createNodeArray(t([e.createVoidZero()],n.arguments)),!1,!1,!1)),void 0,[])}return e.visitEachChild(n,b,r)}(i);case 199:return K(i,!0);case 208:return J(i,!0);case 14:case 15:case 16:case 17:return function(t){return e.setTextRange(e.createLiteral(t.text),t)}(i);case 10:return function(t){if(t.hasExtendedUnicodeEscape)return e.setTextRange(e.createLiteral(t.text),t);return t}(i);case 8:return function(t){if(384&t.numericLiteralFlags)return e.setTextRange(e.createNumericLiteral(t.text),t);return t}(i);case 197:return function(t){var i=e.visitNode(t.tag,b,e.isExpression),a=[void 0],s=[],c=[],u=t.template;if(e.isNoSubstitutionTemplateLiteral(u))s.push(e.createLiteral(u.text)),c.push(Ee(u));else{s.push(e.createLiteral(u.head.text)),c.push(Ee(u.head));for(var l=0,_=u.templateSpans;l<_.length;l++){var d=_[l];s.push(e.createLiteral(d.literal.text)),c.push(Ee(d.literal)),a.push(e.visitNode(d.expression,b,e.isExpression))}}var p=function(t,r,n){return t.requestEmitHelper(e.templateObjectHelper),e.createCall(e.getUnscopedHelperName("__makeTemplateObject"),void 0,[r,n])}(r,e.createArrayLiteral(s),e.createArrayLiteral(c));if(e.isExternalModule(n)){var f=e.createUniqueName("templateObject");m=f,o=e.append(o,e.createVariableDeclaration(m)),a[0]=e.createLogicalOr(f,e.createAssignment(f,p))}else a[0]=p;var m;return e.createCall(i,void 0,a)}(i);case 210:return function(t){var r=[];(function(t,r){if(!function(t){return e.Debug.assert(0!==t.templateSpans.length),0!==t.head.text.length||0===t.templateSpans[0].literal.text.length}(r))return;t.push(e.createLiteral(r.head.text))})(r,t),function(t,r){for(var n=0,i=r.templateSpans;n<i.length;n++){var a=i[n];t.push(e.visitNode(a.expression,b,e.isExpression)),0!==a.literal.text.length&&t.push(e.createLiteral(a.literal.text))}}(r,t);var n=e.reduceLeft(r,e.createAdd);e.nodeIsSynthesized(n)&&(n.pos=t.pos,n.end=t.end);return n}(i);case 211:return function(t){return e.visitEachChild(t,b,r)}(i);case 212:return function(t){return e.visitNode(t.expression,b,e.isExpression)}(i);case 101:return Ce(!1);case 103:return function(t){2&a&&(a|=32768);if(s)return 2&a?(s.containsLexicalThis=!0,t):s.thisName||(s.thisName=e.createUniqueName("this"));return t}(i);case 218:return function(t){if(98===t.keywordToken&&"target"===t.name.escapedText)return a|=16384,e.createFileLevelUniqueName("_newTarget");return t}(i);case 160:return function(t){e.Debug.assert(!e.isComputedPropertyName(t.name));var r=B(t,e.moveRangePos(t,-1),void 0,void 0);return e.setEmitFlags(r,512|e.getEmitFlags(r)),e.setTextRange(e.createPropertyAssignment(t.name,r),t)}(i);case 162:case 163:return function(t){e.Debug.assert(!e.isComputedPropertyName(t.name));var n=s;s=void 0;var i,a=y(16286,65),o=e.visitParameterList(t.parameters,b,r),c=j(t);i=162===t.kind?e.updateGetAccessor(t,t.decorators,t.modifiers,t.name,o,t.type,c):e.updateSetAccessor(t,t.decorators,t.modifiers,t.name,o,c);return h(a,49152,0),s=n,i}(i);case 224:return function(t){var n,i=y(0,e.hasModifier(t,1)?32:0);if(s&&0==(3&t.declarationList.flags)){for(var a=void 0,o=0,c=t.declarationList.declarations;o<c.length;o++){var u=c[o];if(oe(s,u),u.initializer){var l=void 0;e.isBindingPattern(u.name)?l=e.flattenDestructuringAssignment(u,b,r,0):(l=e.createBinary(u.name,62,e.visitNode(u.initializer,b,e.isExpression)),e.setTextRange(l,u)),a=e.append(a,l)}}n=a?e.setTextRange(e.createExpressionStatement(e.inlineExpressions(a)),t):void 0}else n=e.visitEachChild(t,b,r);return h(i,0,0),n}(i);case 234:return function(t){if(s)return s.nonLocalJumps|=8,v(t)&&(t=D(t)),e.createReturn(e.createObjectLiteral([e.createPropertyAssignment(e.createIdentifier("value"),t.expression?e.visitNode(t.expression,b,e.isExpression):e.createVoidZero())]));if(v(t))return D(t);return e.visitEachChild(t,b,r)}(i);default:return e.visitEachChild(i,b,r)}}(i):i}function x(e){return 101===e.kind?Ce(!0):b(e)}function D(t){return e.setOriginalNode(e.createReturn(e.createFileLevelUniqueName("_this")),t)}function S(t){t.name&&ke();var o=e.getClassExtendsHeritageElement(t),c=e.createFunctionExpression(void 0,void 0,void 0,void 0,o?[e.createParameter(void 0,void 0,void 0,e.createFileLevelUniqueName("_super"))]:[],void 0,function(t,o){var c=[];u(),function(t,n,i){i&&t.push(e.setTextRange(e.createExpressionStatement(function(t,r){return t.requestEmitHelper(e.extendsHelper),e.createCall(e.getUnscopedHelperName("__extends"),void 0,[r,e.createFileLevelUniqueName("_super")])}(r,e.getInternalName(n))),i))}(c,t,o),function(t,n,i){var o=s;s=void 0;var c=y(16278,73),u=e.getFirstConstructorWithBody(n),d=function(t,r){if(!t||!r)return!1;if(e.some(t.parameters))return!1;var n=e.firstOrUndefined(t.body.statements);if(!n||!e.nodeIsSynthesized(n)||225!==n.kind)return!1;var i=n.expression;if(!e.nodeIsSynthesized(i)||195!==i.kind)return!1;var a=i.expression;if(!e.nodeIsSynthesized(a)||101!==a.kind)return!1;var o=e.singleOrUndefined(i.arguments);if(!o||!e.nodeIsSynthesized(o)||212!==o.kind)return!1;var s=o.expression;return e.isIdentifier(s)&&"arguments"===s.escapedText}(u,void 0!==i),p=e.createFunctionDeclaration(void 0,void 0,void 0,e.getInternalName(n),void 0,function(t,n){return e.visitParameterList(t&&!n?t.parameters:void 0,b,r)||[]}(u,d),void 0,function(t,r,n,i){var o=!!n&&99!==e.skipOuterExpressions(n.expression).kind;if(!t)return function(t,r){var n=[];l(),e.mergeLexicalEnvironment(n,_()),r&&n.push(e.createReturn(E()));var i=e.createNodeArray(n);e.setTextRange(i,t.members);var a=e.createBlock(i,!0);return e.setTextRange(a,t),e.setEmitFlags(a,1536),a}(r,o);var s=[],c=[];l();var u,d=0;i||(d=e.addStandardPrologue(s,t.body.statements,!1));k(c,t),F(c,t,i),i||(d=e.addCustomPrologue(c,t.body.statements,d,b));if(i)u=E();else if(o&&d<t.body.statements.length){var p=t.body.statements[d];e.isExpressionStatement(p)&&e.isSuperCall(p.expression)&&(u=function(e){return ye(e,!1)}(p.expression))}u&&(a|=8192,d++);if(e.addRange(c,e.visitNodes(t.body.statements,b,e.isStatement,d)),e.mergeLexicalEnvironment(s,_()),I(s,t,!1),o)if(!u||d!==t.body.statements.length||2048&t.body.transformFlags)w(c,t,u||T()),function t(r){if(234===r.kind)return!0;if(226===r.kind){var n=r;if(n.elseStatement)return t(n.thenStatement)&&t(n.elseStatement)}else if(222===r.kind){var i=e.lastOrUndefined(r.statements);if(i&&t(i))return!0}return!1}(t.body)||c.push(e.createReturn(e.createFileLevelUniqueName("_this")));else{var f=e.cast(e.cast(u,e.isBinaryExpression).left,e.isCallExpression),m=e.createReturn(u);e.setCommentRange(m,e.getCommentRange(f)),e.setEmitFlags(f,1536),c.push(m)}else P(s,t);var g=e.createBlock(e.setTextRange(e.createNodeArray(e.concatenate(s,c)),t.body.statements),!0);return e.setTextRange(g,t.body),g}(u,n,i,d));e.setTextRange(p,u||n),i&&e.setEmitFlags(p,8);t.push(p),h(c,49152,0),s=o}(c,t,o),function(t,r){for(var i=0,a=r.members;i<a.length;i++){var o=a[i];switch(o.kind){case 221:t.push(O(o));break;case 160:t.push(M(Ae(r,o),o,r));break;case 162:case 163:var s=e.getAllAccessorDeclarations(r.members,o);o===s.firstAccessor&&t.push(L(Ae(r,o),s,r));break;case 161:break;default:e.Debug.failBadSyntaxKind(o,n&&n.fileName)}}}(c,t);var d=e.createTokenRange(e.skipTrivia(i,t.members.end),19),p=e.getInternalName(t),f=e.createPartiallyEmittedExpression(p);f.end=d.end,e.setEmitFlags(f,1536);var m=e.createReturn(f);m.pos=d.pos,e.setEmitFlags(m,1920),c.push(m),e.insertStatementsAfterStandardPrologue(c,_());var g=e.createBlock(e.setTextRange(e.createNodeArray(c),t.members),!0);return e.setEmitFlags(g,1536),g}(t,o));e.setEmitFlags(c,65536&e.getEmitFlags(t)|524288);var d=e.createPartiallyEmittedExpression(c);d.end=t.end,e.setEmitFlags(d,1536);var p=e.createPartiallyEmittedExpression(d);p.end=e.skipTrivia(i,t.pos),e.setEmitFlags(p,1536);var f=e.createParen(e.createCall(p,void 0,o?[e.visitNode(o.expression,b,e.isExpression)]:[]));return e.addSyntheticLeadingComment(f,3,"* @class "),f}function T(){return e.setEmitFlags(e.createThis(),4)}function E(){return e.createLogicalOr(e.createLogicalAnd(e.createStrictInequality(e.createFileLevelUniqueName("_super"),e.createNull()),e.createFunctionApply(e.createFileLevelUniqueName("_super"),T(),e.createIdentifier("arguments"))),T())}function C(t){return void 0!==t.initializer||e.isBindingPattern(t.name)}function k(t,r){if(!e.some(r.parameters,C))return!1;for(var n=!1,i=0,a=r.parameters;i<a.length;i++){var o=a[i],s=o.name,c=o.initializer;o.dotDotDotToken||(e.isBindingPattern(s)?n=N(t,o,s,c)||n:c&&(A(t,o,s,c),n=!0))}return n}function N(t,n,i,a){return i.elements.length>0?(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(n,b,r,0,e.getGeneratedNameForNode(n)))),1048576)),!0):!!a&&(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(e.createExpressionStatement(e.createAssignment(e.getGeneratedNameForNode(n),e.visitNode(a,b,e.isExpression))),1048576)),!0)}function A(t,r,n,i){i=e.visitNode(i,b,e.isExpression);var a=e.createIf(e.createTypeCheck(e.getSynthesizedClone(n),"undefined"),e.setEmitFlags(e.setTextRange(e.createBlock([e.createExpressionStatement(e.setEmitFlags(e.setTextRange(e.createAssignment(e.setEmitFlags(e.getMutableClone(n),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),r),1536))]),r),1953));e.startOnNewLine(a),e.setTextRange(a,r),e.setEmitFlags(a,1050528),e.insertStatementAfterCustomPrologue(t,a)}function F(t,n,i){var a=[],o=e.lastOrUndefined(n.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(o,i))return!1;var s=75===o.name.kind?e.getMutableClone(o.name):e.createTempVariable(void 0);e.setEmitFlags(s,48);var c=75===o.name.kind?e.getSynthesizedClone(o.name):s,u=n.parameters.length-1,l=e.createLoopVariable();a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(s,void 0,e.createArrayLiteral([]))])),o),1048576));var _=e.createFor(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(l,void 0,e.createLiteral(u))]),o),e.setTextRange(e.createLessThan(l,e.createPropertyAccess(e.createIdentifier("arguments"),"length")),o),e.setTextRange(e.createPostfixIncrement(l),o),e.createBlock([e.startOnNewLine(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.createElementAccess(c,0===u?l:e.createSubtract(l,e.createLiteral(u))),e.createElementAccess(e.createIdentifier("arguments"),l))),o))]));return e.setEmitFlags(_,1048576),e.startOnNewLine(_),a.push(_),75!==o.name.kind&&a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(o,b,r,0,c))),o),1048576)),e.insertStatementsAfterCustomPrologue(t,a),!0}function P(t,r){return!!(32768&a&&201!==r.kind)&&(w(t,r,e.createThis()),!0)}function w(t,r,n){Ne();var i=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_this"),void 0,n)]));e.setEmitFlags(i,1050112),e.setSourceMapRange(i,r),e.insertStatementAfterCustomPrologue(t,i)}function I(t,r,n){if(16384&a){var i=void 0;switch(r.kind){case 201:return t;case 160:case 162:case 163:i=e.createVoidZero();break;case 161:i=e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor");break;case 243:case 200:i=e.createConditional(e.createLogicalAnd(e.setEmitFlags(e.createThis(),4),e.createBinary(e.setEmitFlags(e.createThis(),4),97,e.getLocalName(r))),e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor"),e.createVoidZero());break;default:return e.Debug.failBadSyntaxKind(r)}var o=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_newTarget"),void 0,i)]));e.setEmitFlags(o,1050112),n&&(t=t.slice()),e.insertStatementAfterCustomPrologue(t,o)}return t}function O(t){return e.setTextRange(e.createEmptyStatement(),t)}function M(t,n,i){var a,o=e.getCommentRange(n),s=e.getSourceMapRange(n),c=B(n,n,void 0,i);if(r.getCompilerOptions().useDefineForClassFields){var u=e.visitNode(n.name,b,e.isPropertyName),l=e.isComputedPropertyName(u)?u.expression:e.isIdentifier(u)?e.createStringLiteral(e.unescapeLeadingUnderscores(u.escapedText)):u;a=e.createObjectDefinePropertyCall(t,l,e.createPropertyDescriptor({value:c,enumerable:!1,writable:!0,configurable:!0}))}else{var _=e.createMemberAccessForPropertyName(t,e.visitNode(n.name,b,e.isPropertyName),n.name);a=e.createAssignment(_,c)}e.setEmitFlags(c,1536),e.setSourceMapRange(c,s);var d=e.setTextRange(e.createExpressionStatement(a),n);return e.setOriginalNode(d,n),e.setCommentRange(d,o),e.setEmitFlags(d,48),d}function L(t,r,n){var i=e.createExpressionStatement(R(t,r,n,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(r.firstAccessor)),i}function R(t,r,n,i){var a=r.firstAccessor,o=r.getAccessor,s=r.setAccessor,c=e.getMutableClone(t);e.setEmitFlags(c,1568),e.setSourceMapRange(c,a.name);var u=e.createExpressionForPropertyName(e.visitNode(a.name,b,e.isPropertyName));e.setEmitFlags(u,1552),e.setSourceMapRange(u,a.name);var l=[];if(o){var _=B(o,void 0,void 0,n);e.setSourceMapRange(_,e.getSourceMapRange(o)),e.setEmitFlags(_,512);var d=e.createPropertyAssignment("get",_);e.setCommentRange(d,e.getCommentRange(o)),l.push(d)}if(s){var p=B(s,void 0,void 0,n);e.setSourceMapRange(p,e.getSourceMapRange(s)),e.setEmitFlags(p,512);var f=e.createPropertyAssignment("set",p);e.setCommentRange(f,e.getCommentRange(s)),l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue()),e.createPropertyAssignment("configurable",e.createTrue()));var m=e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[c,u,e.createObjectLiteral(l,!0)]);return i&&e.startOnNewLine(m),m}function B(t,n,i,o){var c=s;s=void 0;var u=o&&e.isClassLike(o)&&!e.hasModifier(t,32)?y(16286,73):y(16286,65),l=e.visitParameterList(t.parameters,b,r),_=j(t);return 16384&a&&!i&&(243===t.kind||200===t.kind)&&(i=e.getGeneratedNameForNode(t)),h(u,49152,0),s=c,e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,t.asteriskToken,i,void 0,l,void 0,_),n),t)}function j(t){var r,i,a,o=!1,s=!1,c=[],u=[],d=t.body;if(l(),e.isBlock(d)&&(a=e.addStandardPrologue(c,d.statements,!1)),o=k(u,t)||o,o=F(u,t,!1)||o,e.isBlock(d))a=e.addCustomPrologue(u,d.statements,a,b),r=d.statements,e.addRange(u,e.visitNodes(d.statements,b,e.isStatement,a)),!o&&d.multiLine&&(o=!0);else{e.Debug.assert(201===t.kind),r=e.moveRangeEnd(d,-1);var p=t.equalsGreaterThanToken;e.nodeIsSynthesized(p)||e.nodeIsSynthesized(d)||(e.rangeEndIsOnSameLineAsRangeStart(p,d,n)?s=!0:o=!0);var f=e.visitNode(d,b,e.isExpression),m=e.createReturn(f);e.setTextRange(m,d),e.moveSyntheticComments(m,d),e.setEmitFlags(m,1440),u.push(m),i=d}if(e.mergeLexicalEnvironment(c,_()),I(c,t,!1),P(c,t),e.some(c)&&(o=!0),u.unshift.apply(u,c),e.isBlock(d)&&e.arrayIsEqualTo(u,d.statements))return d;var g=e.createBlock(e.setTextRange(e.createNodeArray(u),r),o);return e.setTextRange(g,t.body),!o&&s&&e.setEmitFlags(g,1),i&&e.setTokenSourceMapRange(g,19,i),e.setOriginalNode(g,t.body),g}function K(t,n){if(!n)switch(t.expression.kind){case 199:return e.updateParen(t,K(t.expression,!1));case 208:return e.updateParen(t,J(t.expression,!1))}return e.visitEachChild(t,b,r)}function J(t,n){return e.isDestructuringAssignment(t)?e.flattenDestructuringAssignment(t,b,r,0,n):e.visitEachChild(t,b,r)}function z(t){var n=t.name;if(e.isBindingPattern(n))return U(t);if(!t.initializer&&function(e){var t=f.getNodeCheckFlags(e),r=262144&t,n=524288&t;return!(0!=(64&a)||r&&n&&0!=(512&a))&&0==(4096&a)&&(!f.isDeclarationWithCollidingName(e)||n&&!r&&0==(6144&a))}(t)){var i=e.getMutableClone(t);return i.initializer=e.createVoidZero(),i}return e.visitEachChild(t,b,r)}function U(t){var n,i=y(32,0);return n=e.isBindingPattern(t.name)?e.flattenDestructuringBinding(t,b,r,0,void 0,0!=(32&i)):e.visitEachChild(t,b,r),h(i,0,0),n}function V(t){s.labels.set(e.idText(t.label),!0)}function q(t){s.labels.set(e.idText(t.label),!1)}function W(t,n,i,o,c){var l=y(t,n),d=function(t,n,i,o){if(!ie(t)){var c=void 0;s&&(c=s.allowedNonLabeledJumps,s.allowedNonLabeledJumps=6);var l=o?o(t,n,void 0,i):e.restoreEnclosingLabel(e.visitEachChild(t,b,r),n,s&&q);return s&&(s.allowedNonLabeledJumps=c),l}var d=function(t){var r;switch(t.kind){case 229:case 230:case 231:var n=t.initializer;n&&242===n.kind&&(r=n)}var i=[],a=[];if(r&&3&e.getCombinedNodeFlags(r))for(var o=re(t),c=0,u=r.declarations;c<u.length;c++){var l=u[c];pe(t,l,i,a,o)}var _={loopParameters:i,loopOutParameters:a};s&&(s.argumentsName&&(_.argumentsName=s.argumentsName),s.thisName&&(_.thisName=s.thisName),s.hoistedLocalVariables&&(_.hoistedLocalVariables=s.hoistedLocalVariables));return _}(t),p=[],f=s;s=d;var m,g=re(t)?function(t,r){var n=e.createUniqueName("_loop_init"),i=0!=(131072&t.initializer.transformFlags),o=0;r.containsLexicalThis&&(o|=8);i&&4&a&&(o|=262144);var s=[];s.push(e.createVariableStatement(void 0,t.initializer)),le(r.loopOutParameters,2,1,s);var c=e.createVariableStatement(void 0,e.setEmitFlags(e.createVariableDeclarationList([e.createVariableDeclaration(n,void 0,e.setEmitFlags(e.createFunctionExpression(void 0,i?e.createToken(41):void 0,void 0,void 0,void 0,void 0,e.visitNode(e.createBlock(s,!0),b,e.isBlock)),o))]),2097152)),u=e.createVariableDeclarationList(e.map(r.loopOutParameters,ce));return{functionName:n,containsYield:i,functionDeclaration:c,part:u}}(t,d):void 0,y=ae(t)?function(t,r,n){var i=e.createUniqueName("_loop");u();var o=e.visitNode(t.statement,b,e.isStatement,e.liftToBlock),s=_(),c=[];(ne(t)||function(t){return e.isForStatement(t)&&!!t.incrementor&&te(t.incrementor)}(t))&&(r.conditionVariable=e.createUniqueName("inc"),c.push(e.createIf(r.conditionVariable,e.createStatement(e.visitNode(t.incrementor,b,e.isExpression)),e.createStatement(e.createAssignment(r.conditionVariable,e.createTrue())))),ne(t)&&c.push(e.createIf(e.createPrefix(53,e.visitNode(t.condition,b,e.isExpression)),e.visitNode(e.createBreak(),b,e.isStatement))));e.isBlock(o)?e.addRange(c,o.statements):c.push(o);le(r.loopOutParameters,1,1,c),e.insertStatementsAfterStandardPrologue(c,s);var l=e.createBlock(c,!0);e.isBlock(o)&&e.setOriginalNode(l,o);var d=0!=(131072&t.statement.transformFlags),p=0;r.containsLexicalThis&&(p|=8);d&&0!=(4&a)&&(p|=262144);var f=e.createVariableStatement(void 0,e.setEmitFlags(e.createVariableDeclarationList([e.createVariableDeclaration(i,void 0,e.setEmitFlags(e.createFunctionExpression(void 0,d?e.createToken(41):void 0,void 0,void 0,r.loopParameters,void 0,l),p))]),2097152)),m=function(t,r,n,i){var a=[],o=!(-5&r.nonLocalJumps||r.labeledNonLocalBreaks||r.labeledNonLocalContinues),s=e.createCall(t,void 0,e.map(r.loopParameters,(function(e){return e.name}))),c=i?e.createYield(e.createToken(41),e.setEmitFlags(s,8388608)):s;if(o)a.push(e.createExpressionStatement(c)),le(r.loopOutParameters,1,0,a);else{var u=e.createUniqueName("state"),l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(u,void 0,c)]));if(a.push(l),le(r.loopOutParameters,1,0,a),8&r.nonLocalJumps){var _=void 0;n?(n.nonLocalJumps|=8,_=e.createReturn(u)):_=e.createReturn(e.createPropertyAccess(u,"value")),a.push(e.createIf(e.createBinary(e.createTypeOf(u),36,e.createLiteral("object")),_))}if(2&r.nonLocalJumps&&a.push(e.createIf(e.createBinary(u,36,e.createLiteral("break")),e.createBreak())),r.labeledNonLocalBreaks||r.labeledNonLocalContinues){var d=[];de(r.labeledNonLocalBreaks,!0,u,n,d),de(r.labeledNonLocalContinues,!1,u,n,d),a.push(e.createSwitch(u,e.createCaseBlock(d)))}}return a}(i,r,n,d);return{functionName:i,containsYield:d,functionDeclaration:f,part:m}}(t,d,f):void 0;s=f,g&&p.push(g.functionDeclaration);y&&p.push(y.functionDeclaration);(function(t,r,n){var i;r.argumentsName&&(n?n.argumentsName=r.argumentsName:(i||(i=[])).push(e.createVariableDeclaration(r.argumentsName,void 0,e.createIdentifier("arguments"))));r.thisName&&(n?n.thisName=r.thisName:(i||(i=[])).push(e.createVariableDeclaration(r.thisName,void 0,e.createIdentifier("this"))));if(r.hoistedLocalVariables)if(n)n.hoistedLocalVariables=r.hoistedLocalVariables;else{i||(i=[]);for(var a=0,o=r.hoistedLocalVariables;a<o.length;a++){var s=o[a];i.push(e.createVariableDeclaration(s))}}if(r.loopOutParameters.length){i||(i=[]);for(var c=0,u=r.loopOutParameters;c<u.length;c++){var l=u[c];i.push(e.createVariableDeclaration(l.outParamName))}}r.conditionVariable&&(i||(i=[]),i.push(e.createVariableDeclaration(r.conditionVariable,void 0,e.createFalse())));i&&t.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(i)))})(p,d,f),g&&p.push((h=g.functionName,v=g.containsYield,x=e.createCall(h,void 0,[]),D=v?e.createYield(e.createToken(41),e.setEmitFlags(x,8388608)):x,e.createStatement(D)));var h,v,x,D;if(y)if(o)m=o(t,n,y.part,i);else{var S=se(t,g,e.createBlock(y.part,!0));e.aggregateTransformFlags(S),m=e.restoreEnclosingLabel(S,n,s&&q)}else{var T=se(t,g,e.visitNode(t.statement,b,e.isStatement,e.liftToBlock));e.aggregateTransformFlags(T),m=e.restoreEnclosingLabel(T,n,s&&q)}return p.push(m),p}(i,o,l,c);return h(l,0,0),d}function G(e,t){return W(0,1280,e,t)}function H(e,t){return W(5056,3328,e,t)}function Y(e,t){return W(3008,5376,e,t)}function X(e,t){return W(3008,5376,e,t,p.downlevelIteration?ee:Z)}function Q(t,n,i){var a=[],o=t.initializer;if(e.isVariableDeclarationList(o)){3&t.initializer.flags&&ke();var s=e.firstOrUndefined(o.declarations);if(s&&e.isBindingPattern(s.name)){var c=e.flattenDestructuringBinding(s,b,r,0,n),u=e.setTextRange(e.createVariableDeclarationList(c),t.initializer);e.setOriginalNode(u,t.initializer),e.setSourceMapRange(u,e.createRange(c[0].pos,e.last(c).end)),a.push(e.createVariableStatement(void 0,u))}else a.push(e.setTextRange(e.createVariableStatement(void 0,e.setOriginalNode(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(s?s.name:e.createTempVariable(void 0),void 0,n)]),e.moveRangePos(o,-1)),o)),e.moveRangeEnd(o,-1)))}else{var l=e.createAssignment(o,n);e.isDestructuringAssignment(l)?(e.aggregateTransformFlags(l),a.push(e.createExpressionStatement(J(l,!1)))):(l.end=o.end,a.push(e.setTextRange(e.createExpressionStatement(e.visitNode(l,b,e.isExpression)),e.moveRangeEnd(o,-1))))}if(i)return $(e.addRange(a,i));var _=e.visitNode(t.statement,b,e.isStatement,e.liftToBlock);return e.isBlock(_)?e.updateBlock(_,e.setTextRange(e.createNodeArray(e.concatenate(a,_.statements)),_.statements)):(a.push(_),$(a))}function $(t){return e.setEmitFlags(e.createBlock(e.createNodeArray(t),!0),432)}function Z(t,r,n){var i=e.visitNode(t.expression,b,e.isExpression),a=e.createLoopVariable(),o=e.isIdentifier(i)?e.getGeneratedNameForNode(i):e.createTempVariable(void 0);e.setEmitFlags(i,48|e.getEmitFlags(i));var c=e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(a,void 0,e.createLiteral(0)),e.moveRangePos(t.expression,-1)),e.setTextRange(e.createVariableDeclaration(o,void 0,i),t.expression)]),t.expression),2097152),e.setTextRange(e.createLessThan(a,e.createPropertyAccess(o,"length")),t.expression),e.setTextRange(e.createPostfixIncrement(a),t.expression),Q(t,e.createElementAccess(o,a),n)),t);return e.setEmitFlags(c,256),e.setTextRange(c,t),e.restoreEnclosingLabel(c,r,s&&q)}function ee(t,n,i,a){var o=e.visitNode(t.expression,b,e.isExpression),c=e.isIdentifier(o)?e.getGeneratedNameForNode(o):e.createTempVariable(void 0),u=e.isIdentifier(o)?e.getGeneratedNameForNode(c):e.createTempVariable(void 0),l=e.createUniqueName("e"),_=e.getGeneratedNameForNode(l),p=e.createTempVariable(void 0),f=e.createValuesHelper(r,o,t.expression),m=e.createCall(e.createPropertyAccess(c,"next"),void 0,[]);d(l),d(p);var g=1024&a?e.inlineExpressions([e.createAssignment(l,e.createVoidZero()),f]):f,y=e.setEmitFlags(e.setTextRange(e.createFor(e.setEmitFlags(e.setTextRange(e.createVariableDeclarationList([e.setTextRange(e.createVariableDeclaration(c,void 0,g),t.expression),e.createVariableDeclaration(u,void 0,m)]),t.expression),2097152),e.createLogicalNot(e.createPropertyAccess(u,"done")),e.createAssignment(u,m),Q(t,e.createPropertyAccess(u,"value"),i)),t),256);return e.createTry(e.createBlock([e.restoreEnclosingLabel(y,n,s&&q)]),e.createCatchClause(e.createVariableDeclaration(_),e.setEmitFlags(e.createBlock([e.createExpressionStatement(e.createAssignment(l,e.createObjectLiteral([e.createPropertyAssignment("error",_)])))]),1)),e.createBlock([e.createTry(e.createBlock([e.setEmitFlags(e.createIf(e.createLogicalAnd(e.createLogicalAnd(u,e.createLogicalNot(e.createPropertyAccess(u,"done"))),e.createAssignment(p,e.createPropertyAccess(c,"return"))),e.createExpressionStatement(e.createFunctionCall(p,c,[]))),1)]),void 0,e.setEmitFlags(e.createBlock([e.setEmitFlags(e.createIf(l,e.createThrow(e.createPropertyAccess(l,"error"))),1)]),1))]))}function te(e){return 0!=(131072&f.getNodeCheckFlags(e))}function re(t){return e.isForStatement(t)&&!!t.initializer&&te(t.initializer)}function ne(t){return e.isForStatement(t)&&!!t.condition&&te(t.condition)}function ie(e){return ae(e)||re(e)}function ae(e){return 0!=(65536&f.getNodeCheckFlags(e))}function oe(t,r){t.hoistedLocalVariables||(t.hoistedLocalVariables=[]),function r(n){if(75===n.kind)t.hoistedLocalVariables.push(n);else for(var i=0,a=n.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||r(o.name)}}(r.name)}function se(t,r,n){switch(t.kind){case 229:return function(t,r,n){var i=t.condition&&te(t.condition),a=i||t.incrementor&&te(t.incrementor);return e.updateFor(t,e.visitNode(r?r.part:t.initializer,b,e.isForInitializer),e.visitNode(i?void 0:t.condition,b,e.isExpression),e.visitNode(a?void 0:t.incrementor,b,e.isExpression),n)}(t,r,n);case 230:return function(t,r){return e.updateForIn(t,e.visitNode(t.initializer,b,e.isForInitializer),e.visitNode(t.expression,b,e.isExpression),r)}(t,n);case 231:return function(t,r){return e.updateForOf(t,void 0,e.visitNode(t.initializer,b,e.isForInitializer),e.visitNode(t.expression,b,e.isExpression),r)}(t,n);case 227:return function(t,r){return e.updateDo(t,r,e.visitNode(t.expression,b,e.isExpression))}(t,n);case 228:return function(t,r){return e.updateWhile(t,e.visitNode(t.expression,b,e.isExpression),r)}(t,n);default:return e.Debug.failBadSyntaxKind(t,"IterationStatement expected")}}function ce(t){return e.createVariableDeclaration(t.originalName,void 0,t.outParamName)}function ue(t,r){var n=0===r?t.outParamName:t.originalName,i=0===r?t.originalName:t.outParamName;return e.createBinary(i,62,n)}function le(t,r,n,i){for(var a=0,o=t;a<o.length;a++){var s=o[a];s.flags&r&&i.push(e.createExpressionStatement(ue(s,n)))}}function _e(t,r,n,i){r?(t.labeledNonLocalBreaks||(t.labeledNonLocalBreaks=e.createMap()),t.labeledNonLocalBreaks.set(n,i)):(t.labeledNonLocalContinues||(t.labeledNonLocalContinues=e.createMap()),t.labeledNonLocalContinues.set(n,i))}function de(t,r,n,i,a){t&&t.forEach((function(t,o){var s=[];if(!i||i.labels&&i.labels.get(o)){var c=e.createIdentifier(o);s.push(r?e.createBreak(c):e.createContinue(c))}else _e(i,r,o,t),s.push(e.createReturn(n));a.push(e.createCaseClause(e.createLiteral(t),s))}))}function pe(t,r,n,i,a){var o=r.name;if(e.isBindingPattern(o))for(var s=0,c=o.elements;s<c.length;s++){var u=c[s];e.isOmittedExpression(u)||pe(t,u,n,i,a)}else{n.push(e.createParameter(void 0,void 0,void 0,o));var l=f.getNodeCheckFlags(r);if(4194304&l||a){var _=e.createUniqueName("out_"+e.idText(o)),d=0;4194304&l&&(d|=1),e.isForStatement(t)&&t.initializer&&f.isBindingCapturedByNode(t.initializer,r)&&(d|=2),i.push({flags:d,originalName:o,outParamName:_})}}}function fe(t,r,n){var i=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,b,e.isPropertyName)),e.visitNode(t.initializer,b,e.isExpression));return e.setTextRange(i,t),n&&e.startOnNewLine(i),i}function me(t,r,n){var i=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,b,e.isPropertyName)),e.getSynthesizedClone(t.name));return e.setTextRange(i,t),n&&e.startOnNewLine(i),i}function ge(t,r,n,i){var a=e.createAssignment(e.createMemberAccessForPropertyName(r,e.visitNode(t.name,b,e.isPropertyName)),B(t,t,void 0,n));return e.setTextRange(a,t),i&&e.startOnNewLine(a),a}function ye(t,n){if(4096&t.transformFlags||101===t.expression.kind||e.isSuperProperty(e.skipOuterExpressions(t.expression))){var i=e.createCallBinding(t.expression,d),a=i.target,o=i.thisArg;101===t.expression.kind&&e.setEmitFlags(o,4);var s=void 0;if(s=4096&t.transformFlags?e.createFunctionApply(e.visitNode(a,x,e.isExpression),101===t.expression.kind?o:e.visitNode(o,b,e.isExpression),he(t.arguments,!1,!1,!1)):e.createFunctionCall(e.visitNode(a,x,e.isExpression),101===t.expression.kind?o:e.visitNode(o,b,e.isExpression),e.visitNodes(t.arguments,b,e.isExpression),t),101===t.expression.kind){var c=e.createLogicalOr(s,T());s=n?e.createAssignment(e.createFileLevelUniqueName("_this"),c):c}return e.setOriginalNode(s,t)}return e.visitEachChild(t,b,r)}function he(t,n,i,a){var o=t.length,s=e.flatten(e.spanMap(t,xe,(function(e,t,r,n){return t(e,i,a&&n===o)})));if(p.downlevelIteration){if(1===s.length)if(be(c=s[0],"___spread"))return s[0];return e.createSpreadHelper(r,s)}if(1===s.length){var c=s[0];if(!n||function(t){return e.isArrayLiteralExpression(t)&&e.every(t.elements,ve)}(c)||be(c,"___spreadArrays"))return s[0]}return e.createSpreadArraysHelper(r,s)}function ve(t){return!e.isOmittedExpression(t)}function be(t,r){return e.isCallExpression(t)&&e.isIdentifier(t.expression)&&4096&e.getEmitFlags(t.expression)&&t.expression.escapedText===r}function xe(t){return e.isSpreadElement(t)?De:Se}function De(t){return e.map(t,Te)}function Se(t,r,n){return e.createArrayLiteral(e.visitNodes(e.createNodeArray(t,n),b,e.isExpression),r)}function Te(t){return e.visitNode(t.expression,b,e.isExpression)}function Ee(t){var r=t.rawText;if(void 0===r){r=e.getSourceTextOfNodeFromSourceFile(n,t);var i=14===t.kind||17===t.kind;r=r.substring(1,r.length-(i?1:2))}return r=r.replace(/\r\n?/g,"\n"),e.setTextRange(e.createLiteral(r),t)}function Ce(t){return 8&a&&!t?e.createPropertyAccess(e.createFileLevelUniqueName("_super"),"prototype"):e.createFileLevelUniqueName("_super")}function ke(){0==(2&c)&&(c|=2,r.enableSubstitution(75))}function Ne(){0==(1&c)&&(c|=1,r.enableSubstitution(103),r.enableEmitNotification(161),r.enableEmitNotification(160),r.enableEmitNotification(162),r.enableEmitNotification(163),r.enableEmitNotification(201),r.enableEmitNotification(200),r.enableEmitNotification(243))}function Ae(t,r){return e.hasModifier(r,32)?e.getInternalName(t):e.createPropertyAccess(e.getInternalName(t),"prototype")}},e.extendsHelper={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:"\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"},e.templateObjectHelper={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:'\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };'}}(s||(s={})),function(e){e.transformES5=function(t){var r,n,i=t.getCompilerOptions();1!==i.jsx&&3!==i.jsx||(r=t.onEmitNode,t.onEmitNode=function(t,i,a){switch(i.kind){case 266:case 267:case 265:var o=i.tagName;n[e.getOriginalNodeId(o)]=!0}r(t,i,a)},t.enableEmitNotification(266),t.enableEmitNotification(267),t.enableEmitNotification(265),n=[]);var a=t.onSubstituteNode;return t.onSubstituteNode=function(t,r){if(r.id&&n&&n[r.id])return a(t,r);if(r=a(t,r),e.isPropertyAccessExpression(r))return function(t){var r=o(t.name);if(r)return e.setTextRange(e.createElementAccess(t.expression,r),t);return t}(r);if(e.isPropertyAssignment(r))return function(t){var r=e.isIdentifier(t.name)&&o(t.name);if(r)return e.updatePropertyAssignment(t,r,t.initializer);return t}(r);return r},t.enableSubstitution(193),t.enableSubstitution(279),e.chainBundle((function(e){return e}));function o(t){var r=t.originalKeywordKind||(e.nodeIsSynthesized(t)?e.stringToToken(e.idText(t)):void 0);if(void 0!==r&&r>=76&&r<=111)return e.setTextRange(e.createLiteral(t),t)}}}(s||(s={})),function(e){var r,n,i,a,o;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(r||(r={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(n||(n={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(i||(i={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(a||(a={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(o||(o={})),e.transformGenerators=function(r){var n,i,a,o,s,c,u,l,_,d,p=r.resumeLexicalEnvironment,f=r.endLexicalEnvironment,m=r.hoistFunctionDeclaration,g=r.hoistVariableDeclaration,y=r.getCompilerOptions(),h=e.getEmitScriptTarget(y),v=r.getEmitResolver(),b=r.onSubstituteNode;r.onSubstituteNode=function(t,r){if(r=b(t,r),1===t)return function(t){if(e.isIdentifier(t))return function(t){if(!e.isGeneratedIdentifier(t)&&n&&n.has(e.idText(t))){var r=e.getOriginalNode(t);if(e.isIdentifier(r)&&r.parent){var a=v.getReferencedValueDeclaration(r);if(a){var o=i[e.getOriginalNodeId(a)];if(o){var s=e.getMutableClone(o);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t);return t}(r);return r};var x,D,S,T,E,C,k,N,A,F,P,w,I=1,O=0,M=0;return e.chainBundle((function(t){if(t.isDeclarationFile||0==(256&t.transformFlags))return t;var n=e.visitEachChild(t,L,r);return e.addEmitHelpers(n,r.readEmitHelpers()),n}));function L(t){var n=t.transformFlags;return o?function(t){switch(t.kind){case 227:case 228:return function(t){return o?(ne(),t=e.visitEachChild(t,L,r),ae(),t):e.visitEachChild(t,L,r)}(t);case 236:return function(t){o&&Z({kind:2,isScript:!0,breakLabel:-1});t=e.visitEachChild(t,L,r),o&&oe();return t}(t);case 237:return function(t){o&&Z({kind:4,isScript:!0,labelText:e.idText(t.label),breakLabel:-1});t=e.visitEachChild(t,L,r),o&&se();return t}(t);default:return R(t)}}(t):a?R(t):e.isFunctionLikeDeclaration(t)&&t.asteriskToken?function(t){switch(t.kind){case 243:return B(t);case 200:return j(t);default:return e.Debug.failBadSyntaxKind(t)}}(t):256&n?e.visitEachChild(t,L,r):t}function R(t){switch(t.kind){case 243:return B(t);case 200:return j(t);case 162:case 163:return function(t){var n=a,i=o;return a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i,t}(t);case 224:return function(t){if(131072&t.transformFlags)return void q(t.declarationList);if(1048576&e.getEmitFlags(t))return t;for(var r=0,n=t.declarationList.declarations;r<n.length;r++){var i=n[r];g(i.name)}var a=e.getInitializedVariables(t.declarationList);if(0===a.length)return;return e.setSourceMapRange(e.createExpressionStatement(e.inlineExpressions(e.map(a,W))),t)}(t);case 229:return function(t){o&&ne();var n=t.initializer;if(n&&e.isVariableDeclarationList(n)){for(var i=0,a=n.declarations;i<a.length;i++){var s=a[i];g(s.name)}var c=e.getInitializedVariables(n);t=e.updateFor(t,c.length>0?e.inlineExpressions(e.map(c,W)):void 0,e.visitNode(t.condition,L,e.isExpression),e.visitNode(t.incrementor,L,e.isExpression),e.visitNode(t.statement,L,e.isStatement,e.liftToBlock))}else t=e.visitEachChild(t,L,r);o&&ae();return t}(t);case 230:return function(t){o&&ne();var n=t.initializer;if(e.isVariableDeclarationList(n)){for(var i=0,a=n.declarations;i<a.length;i++){var s=a[i];g(s.name)}t=e.updateForIn(t,n.declarations[0].name,e.visitNode(t.expression,L,e.isExpression),e.visitNode(t.statement,L,e.isStatement,e.liftToBlock))}else t=e.visitEachChild(t,L,r);o&&ae();return t}(t);case 233:return function(t){if(o){var n=de(t.label&&e.idText(t.label));if(n>0)return ge(n,t)}return e.visitEachChild(t,L,r)}(t);case 232:return function(t){if(o){var n=pe(t.label&&e.idText(t.label));if(n>0)return ge(n,t)}return e.visitEachChild(t,L,r)}(t);case 234:return function(t){return r=e.visitNode(t.expression,L,e.isExpression),n=t,e.setTextRange(e.createReturn(e.createArrayLiteral(r?[me(2),r]:[me(2)])),n);var r,n}(t);default:return 131072&t.transformFlags?function(t){switch(t.kind){case 208:return function(t){var n=e.getExpressionAssociativity(t);switch(n){case 0:return function(t){if(G(t.right)){if(e.isLogicalOperator(t.operatorToken.kind))return function(t){var r=Q(),n=X();ve(n,e.visitNode(t.left,L,e.isExpression),t.left),55===t.operatorToken.kind?De(r,n,t.left):xe(r,n,t.left);return ve(n,e.visitNode(t.right,L,e.isExpression),t.right),$(r),n}(t);if(27===t.operatorToken.kind)return function(t){var r=[];return n(t.left),n(t.right),e.inlineExpressions(r);function n(t){e.isBinaryExpression(t)&&27===t.operatorToken.kind?(n(t.left),n(t.right)):(G(t)&&r.length>0&&(Se(1,[e.createExpressionStatement(e.inlineExpressions(r))]),r=[]),r.push(e.visitNode(t,L,e.isExpression)))}}(t);var n=e.getMutableClone(t);return n.left=Y(e.visitNode(t.left,L,e.isExpression)),n.right=e.visitNode(t.right,L,e.isExpression),n}return e.visitEachChild(t,L,r)}(t);case 1:return function(t){var n=t.left,i=t.right;if(G(i)){var a=void 0;switch(n.kind){case 193:a=e.updatePropertyAccess(n,Y(e.visitNode(n.expression,L,e.isLeftHandSideExpression)),n.name);break;case 194:a=e.updateElementAccess(n,Y(e.visitNode(n.expression,L,e.isLeftHandSideExpression)),Y(e.visitNode(n.argumentExpression,L,e.isExpression)));break;default:a=e.visitNode(n,L,e.isExpression)}var o=t.operatorToken.kind;return(s=o)>=63&&s<=74?e.setTextRange(e.createAssignment(a,e.setTextRange(e.createBinary(Y(a),function(e){switch(e){case 63:return 39;case 64:return 40;case 65:return 41;case 66:return 42;case 67:return 43;case 68:return 44;case 69:return 47;case 70:return 48;case 71:return 49;case 72:return 50;case 73:return 51;case 74:return 52}}(o),e.visitNode(i,L,e.isExpression)),t)),t):e.updateBinary(t,a,e.visitNode(i,L,e.isExpression))}var s;return e.visitEachChild(t,L,r)}(t);default:return e.Debug.assertNever(n)}}(t);case 209:return function(t){if(G(t.whenTrue)||G(t.whenFalse)){var n=Q(),i=Q(),a=X();return De(n,e.visitNode(t.condition,L,e.isExpression),t.condition),ve(a,e.visitNode(t.whenTrue,L,e.isExpression),t.whenTrue),be(i),$(n),ve(a,e.visitNode(t.whenFalse,L,e.isExpression),t.whenFalse),$(i),a}return e.visitEachChild(t,L,r)}(t);case 211:return function(t){var n=Q(),i=e.visitNode(t.expression,L,e.isExpression);if(t.asteriskToken){!function(e,t){Se(7,[e],t)}(0==(8388608&e.getEmitFlags(t.expression))?e.createValuesHelper(r,i,t):i,t)}else!function(e,t){Se(6,[e],t)}(i,t);return $(n),function(t){return e.setTextRange(e.createCall(e.createPropertyAccess(T,"sent"),void 0,[]),t)}(t)}(t);case 191:return function(e){return J(e.elements,void 0,void 0,e.multiLine)}(t);case 192:return function(t){var r=t.properties,n=t.multiLine,i=H(r),a=X();ve(a,e.createObjectLiteral(e.visitNodes(r,L,e.isObjectLiteralElementLike,0,i),n));var o=e.reduceLeft(r,(function(r,i){G(i)&&r.length>0&&(he(e.createExpressionStatement(e.inlineExpressions(r))),r=[]);var o=e.createExpressionForObjectLiteralElementLike(t,i,a),s=e.visitNode(o,L,e.isExpression);s&&(n&&e.startOnNewLine(s),r.push(s));return r}),[],i);return o.push(n?e.startOnNewLine(e.getMutableClone(a)):a),e.inlineExpressions(o)}(t);case 194:return function(t){if(G(t.argumentExpression)){var n=e.getMutableClone(t);return n.expression=Y(e.visitNode(t.expression,L,e.isLeftHandSideExpression)),n.argumentExpression=e.visitNode(t.argumentExpression,L,e.isExpression),n}return e.visitEachChild(t,L,r)}(t);case 195:return function(t){if(!e.isImportCall(t)&&e.forEach(t.arguments,G)){var n=e.createCallBinding(t.expression,g,h,!0),i=n.target,a=n.thisArg;return e.setOriginalNode(e.createFunctionApply(Y(e.visitNode(i,L,e.isLeftHandSideExpression)),a,J(t.arguments),t),t)}return e.visitEachChild(t,L,r)}(t);case 196:return function(t){if(e.forEach(t.arguments,G)){var n=e.createCallBinding(e.createPropertyAccess(t.expression,"bind"),g),i=n.target,a=n.thisArg;return e.setOriginalNode(e.setTextRange(e.createNew(e.createFunctionApply(Y(e.visitNode(i,L,e.isExpression)),a,J(t.arguments,e.createVoidZero())),void 0,[]),t),t)}return e.visitEachChild(t,L,r)}(t);default:return e.visitEachChild(t,L,r)}}(t):262400&t.transformFlags?e.visitEachChild(t,L,r):t}}function B(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,t.modifiers,void 0,t.name,void 0,e.visitParameterList(t.parameters,L,r),void 0,K(t.body)),t),t);else{var n=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i}return a?void m(t):t}function j(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,void 0,t.name,void 0,e.visitParameterList(t.parameters,L,r),void 0,K(t.body)),t),t);else{var n=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i}return t}function K(t){var r=[],n=a,i=o,m=s,g=c,y=u,h=l,v=_,b=d,E=I,C=x,k=D,N=S,A=T;a=!0,o=!1,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,d=void 0,I=1,x=void 0,D=void 0,S=void 0,T=e.createTempVariable(void 0),p();var F=e.addPrologue(r,t.statements,!1,L);z(t.statements,F);var P=Te();return e.insertStatementsAfterStandardPrologue(r,f()),r.push(e.createReturn(P)),a=n,o=i,s=m,c=g,u=y,l=h,_=v,d=b,I=E,x=C,D=k,S=N,T=A,e.setTextRange(e.createBlock(r,t.multiLine),t)}function J(r,n,i,a){var o,s=H(r);if(s>0){o=X();var c=e.visitNodes(r,L,e.isExpression,0,s);ve(o,e.createArrayLiteral(n?t([n],c):c)),n=void 0}var u=e.reduceLeft(r,(function(r,i){if(G(i)&&r.length>0){var s=void 0!==o;o||(o=X()),ve(o,s?e.createArrayConcat(o,[e.createArrayLiteral(r,a)]):e.createArrayLiteral(n?t([n],r):r,a)),n=void 0,r=[]}return r.push(e.visitNode(i,L,e.isExpression)),r}),[],s);return o?e.createArrayConcat(o,[e.createArrayLiteral(u,a)]):e.setTextRange(e.createArrayLiteral(n?t([n],u):u,a),i)}function z(e,t){void 0===t&&(t=0);for(var r=e.length,n=t;n<r;n++)V(e[n])}function U(t){e.isBlock(t)?z(t.statements):V(t)}function V(t){var a=o;o||(o=G(t)),function(t){switch(t.kind){case 222:return function(t){G(t)?z(t.statements):he(e.visitNode(t,L,e.isStatement))}(t);case 225:return function(t){he(e.visitNode(t,L,e.isStatement))}(t);case 226:return function(t){if(G(t))if(G(t.thenStatement)||G(t.elseStatement)){var r=Q(),n=t.elseStatement?Q():void 0;De(t.elseStatement?n:r,e.visitNode(t.expression,L,e.isExpression),t.expression),U(t.thenStatement),t.elseStatement&&(be(r),$(n),U(t.elseStatement)),$(r)}else he(e.visitNode(t,L,e.isStatement));else he(e.visitNode(t,L,e.isStatement))}(t);case 227:return function(t){if(G(t)){var r=Q(),n=Q();ie(r),$(n),U(t.statement),$(r),xe(n,e.visitNode(t.expression,L,e.isExpression)),ae()}else he(e.visitNode(t,L,e.isStatement))}(t);case 228:return function(t){if(G(t)){var r=Q(),n=ie(r);$(r),De(n,e.visitNode(t.expression,L,e.isExpression)),U(t.statement),be(r),ae()}else he(e.visitNode(t,L,e.isStatement))}(t);case 229:return function(t){if(G(t)){var r=Q(),n=Q(),i=ie(n);if(t.initializer){var a=t.initializer;e.isVariableDeclarationList(a)?q(a):he(e.setTextRange(e.createExpressionStatement(e.visitNode(a,L,e.isExpression)),a))}$(r),t.condition&&De(i,e.visitNode(t.condition,L,e.isExpression)),U(t.statement),$(n),t.incrementor&&he(e.setTextRange(e.createExpressionStatement(e.visitNode(t.incrementor,L,e.isExpression)),t.incrementor)),be(r),ae()}else he(e.visitNode(t,L,e.isStatement))}(t);case 230:return function(t){if(G(t)){var r=X(),n=X(),i=e.createLoopVariable(),a=t.initializer;g(i),ve(r,e.createArrayLiteral()),he(e.createForIn(n,e.visitNode(t.expression,L,e.isExpression),e.createExpressionStatement(e.createCall(e.createPropertyAccess(r,"push"),void 0,[n])))),ve(i,e.createLiteral(0));var o=Q(),s=Q(),c=ie(s);$(o),De(c,e.createLessThan(i,e.createPropertyAccess(r,"length")));var u=void 0;if(e.isVariableDeclarationList(a)){for(var l=0,_=a.declarations;l<_.length;l++){var d=_[l];g(d.name)}u=e.getSynthesizedClone(a.declarations[0].name)}else u=e.visitNode(a,L,e.isExpression),e.Debug.assert(e.isLeftHandSideExpression(u));ve(u,e.createElementAccess(r,i)),U(t.statement),$(s),he(e.createExpressionStatement(e.createPostfixIncrement(i))),be(o),ae()}else he(e.visitNode(t,L,e.isStatement))}(t);case 232:return function(t){var r=pe(t.label?e.idText(t.label):void 0);r>0?be(r,t):he(t)}(t);case 233:return function(t){var r=de(t.label?e.idText(t.label):void 0);r>0?be(r,t):he(t)}(t);case 234:return function(t){r=e.visitNode(t.expression,L,e.isExpression),n=t,Se(8,[r],n);var r,n}(t);case 235:return function(t){G(t)?(r=Y(e.visitNode(t.expression,L,e.isExpression)),n=Q(),i=Q(),$(n),Z({kind:1,expression:r,startLabel:n,endLabel:i}),U(t.statement),e.Debug.assert(1===re()),$(ee().endLabel)):he(e.visitNode(t,L,e.isStatement));var r,n,i}(t);case 236:return function(t){if(G(t.caseBlock)){for(var r=t.caseBlock,n=r.clauses.length,i=(Z({kind:2,isScript:!1,breakLabel:p=Q()}),p),a=Y(e.visitNode(t.expression,L,e.isExpression)),o=[],s=-1,c=0;c<n;c++){var u=r.clauses[c];o.push(Q()),276===u.kind&&-1===s&&(s=c)}for(var l=0,_=[];l<n;){var d=0;for(c=l;c<n;c++){if(275===(u=r.clauses[c]).kind){if(G(u.expression)&&_.length>0)break;_.push(e.createCaseClause(e.visitNode(u.expression,L,e.isExpression),[ge(o[c],u.expression)]))}else d++}_.length&&(he(e.createSwitch(a,e.createCaseBlock(_))),l+=_.length,_=[]),d>0&&(l+=d,d=0)}be(s>=0?o[s]:i);for(c=0;c<n;c++)$(o[c]),z(r.clauses[c].statements);oe()}else he(e.visitNode(t,L,e.isStatement));var p}(t);case 237:return function(t){G(t)?(r=e.idText(t.label),n=Q(),Z({kind:4,isScript:!1,labelText:r,breakLabel:n}),U(t.statement),se()):he(e.visitNode(t,L,e.isStatement));var r,n}(t);case 238:return function(t){r=e.visitNode(t.expression,L,e.isExpression),n=t,Se(9,[r],n);var r,n}(t);case 239:return function(t){G(t)?(a=Q(),o=Q(),$(a),Z({kind:0,state:0,startLabel:a,endLabel:o}),ye(),U(t.tryBlock),t.catchClause&&(!function(t){var a;if(e.Debug.assert(0===re()),e.isGeneratedIdentifier(t.name))a=t.name,g(t.name);else{var o=e.idText(t.name);a=X(o),n||(n=e.createMap(),i=[],r.enableSubstitution(75)),n.set(o,!0),i[e.getOriginalNodeId(t)]=a}var s=te();e.Debug.assert(s.state<1),be(s.endLabel);var c=Q();$(c),s.state=1,s.catchVariable=a,s.catchLabel=c,ve(a,e.createCall(e.createPropertyAccess(T,"sent"),void 0,[])),ye()}(t.catchClause.variableDeclaration),U(t.catchClause.block)),t.finallyBlock&&(!function(){e.Debug.assert(0===re());var t=te();e.Debug.assert(t.state<2),be(t.endLabel);var r=Q();$(r),t.state=2,t.finallyLabel=r}(),U(t.finallyBlock)),function(){e.Debug.assert(0===re());var t=ee();t.state<2?be(t.endLabel):Se(10);$(t.endLabel),ye(),t.state=3}()):he(e.visitEachChild(t,L,r));var a,o}(t);default:he(e.visitNode(t,L,e.isStatement))}}(t),o=a}function q(t){for(var r=0,n=t.declarations;r<n.length;r++){var i=n[r],a=e.getSynthesizedClone(i.name);e.setCommentRange(a,i.name),g(a)}for(var o=e.getInitializedVariables(t),s=o.length,c=0,u=[];c<s;){for(var l=c;l<s;l++){if(G((i=o[l]).initializer)&&u.length>0)break;u.push(W(i))}u.length&&(he(e.createExpressionStatement(e.inlineExpressions(u))),c+=u.length,u=[])}}function W(t){return e.setSourceMapRange(e.createAssignment(e.setSourceMapRange(e.getSynthesizedClone(t.name),t.name),e.visitNode(t.initializer,L,e.isExpression)),t)}function G(e){return!!e&&0!=(131072&e.transformFlags)}function H(e){for(var t=e.length,r=0;r<t;r++)if(G(e[r]))return r;return-1}function Y(t){if(e.isGeneratedIdentifier(t)||4096&e.getEmitFlags(t))return t;var r=e.createTempVariable(g);return ve(r,t,t),r}function X(t){var r=t?e.createUniqueName(t):e.createTempVariable(void 0);return g(r),r}function Q(){_||(_=[]);var e=I;return I++,_[e]=-1,e}function $(t){e.Debug.assert(void 0!==_,"No labels were defined."),_[t]=x?x.length:0}function Z(e){s||(s=[],u=[],c=[],l=[]);var t=u.length;return u[t]=0,c[t]=x?x.length:0,s[t]=e,l.push(e),t}function ee(){var t=te();if(void 0===t)return e.Debug.fail("beginBlock was never called.");var r=u.length;return u[r]=1,c[r]=x?x.length:0,s[r]=t,l.pop(),t}function te(){return e.lastOrUndefined(l)}function re(){var e=te();return e&&e.kind}function ne(){Z({kind:3,isScript:!0,breakLabel:-1,continueLabel:-1})}function ie(e){var t=Q();return Z({kind:3,isScript:!1,breakLabel:t,continueLabel:e}),t}function ae(){e.Debug.assert(3===re());var t=ee(),r=t.breakLabel;t.isScript||$(r)}function oe(){e.Debug.assert(2===re());var t=ee(),r=t.breakLabel;t.isScript||$(r)}function se(){e.Debug.assert(4===re());var t=ee();t.isScript||$(t.breakLabel)}function ce(e){return 2===e.kind||3===e.kind}function ue(e){return 4===e.kind}function le(e){return 3===e.kind}function _e(e,t){for(var r=t;r>=0;r--){var n=l[r];if(!ue(n))break;if(n.labelText===e)return!0}return!1}function de(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(ue(r=l[t])&&r.labelText===e)return r.breakLabel;if(ce(r)&&_e(e,t-1))return r.breakLabel}else for(t=l.length-1;t>=0;t--){var r;if(ce(r=l[t]))return r.breakLabel}return 0}function pe(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(le(r=l[t])&&_e(e,t-1))return r.continueLabel}else for(t=l.length-1;t>=0;t--){var r;if(le(r=l[t]))return r.continueLabel}return 0}function fe(t){if(void 0!==t&&t>0){void 0===d&&(d=[]);var r=e.createLiteral(-1);return void 0===d[t]?d[t]=[r]:d[t].push(r),r}return e.createOmittedExpression()}function me(t){var r=e.createLiteral(t);return e.addSyntheticTrailingComment(r,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(t)),r}function ge(t,r){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),r)}function ye(){Se(0)}function he(e){e?Se(1,[e]):ye()}function ve(e,t,r){Se(2,[e,t],r)}function be(e,t){Se(3,[e],t)}function xe(e,t,r){Se(4,[e,t],r)}function De(e,t,r){Se(5,[e,t],r)}function Se(e,t,r){void 0===x&&(x=[],D=[],S=[]),void 0===_&&$(Q());var n=x.length;x[n]=e,D[n]=t,S[n]=r}function Te(){O=0,M=0,E=void 0,C=!1,k=!1,N=void 0,A=void 0,F=void 0,P=void 0,w=void 0;var t=function(){if(x){for(var t=0;t<x.length;t++)Ne(t);Ee(x.length)}else Ee(0);if(N){var r=e.createPropertyAccess(T,"label"),n=e.createSwitch(r,e.createCaseBlock(N));return[e.startOnNewLine(n)]}if(A)return A;return[]}();return function(t,r){return t.requestEmitHelper(e.generatorHelper),e.createCall(e.getUnscopedHelperName("__generator"),void 0,[e.createThis(),r])}(r,e.setEmitFlags(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,T)],void 0,e.createBlock(t,t.length>0)),524288))}function Ee(e){(function(e){if(!k)return!0;if(!_||!d)return!1;for(var t=0;t<_.length;t++)if(_[t]===e&&d[t])return!0;return!1})(e)&&(ke(e),w=void 0,Fe(void 0,void 0)),A&&N&&Ce(!1),function(){if(void 0!==d&&void 0!==E)for(var e=0;e<E.length;e++){var t=E[e];if(void 0!==t)for(var r=0,n=t;r<n.length;r++){var i=n[r],a=d[i];if(void 0!==a)for(var o=0,s=a;o<s.length;o++){s[o].text=String(e)}}}}()}function Ce(t){if(N||(N=[]),A){if(w)for(var r=w.length-1;r>=0;r--){var n=w[r];A=[e.createWith(n.expression,e.createBlock(A))]}if(P){var i=P.startLabel,a=P.catchLabel,o=P.finallyLabel,s=P.endLabel;A.unshift(e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createPropertyAccess(T,"trys"),"push"),void 0,[e.createArrayLiteral([fe(i),fe(a),fe(o),fe(s)])]))),P=void 0}t&&A.push(e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(T,"label"),e.createLiteral(M+1))))}N.push(e.createCaseClause(e.createLiteral(M),A||[])),A=void 0}function ke(e){if(_)for(var t=0;t<_.length;t++)_[t]===e&&(A&&(Ce(!C),C=!1,k=!1,M++),void 0===E&&(E=[]),void 0===E[M]?E[M]=[t]:E[M].push(t))}function Ne(t){if(ke(t),function(e){if(s)for(;O<u.length&&c[O]<=e;O++){var t=s[O],r=u[O];switch(t.kind){case 0:0===r?(F||(F=[]),A||(A=[]),F.push(P),P=t):1===r&&(P=F.pop());break;case 1:0===r?(w||(w=[]),w.push(t)):1===r&&w.pop()}}}(t),!C){C=!1,k=!1;var r=x[t];if(0!==r){if(10===r)return C=!0,void Ae(e.createReturn(e.createArrayLiteral([me(7)])));var n=D[t];if(1===r)return Ae(n[0]);var i,a,o,l=S[t];switch(r){case 2:return i=n[0],a=n[1],o=l,void Ae(e.setTextRange(e.createExpressionStatement(e.createAssignment(i,a)),o));case 3:return function(t,r){C=!0,Ae(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),r),384))}(n[0],l);case 4:return function(t,r,n){Ae(e.setEmitFlags(e.createIf(r,e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),n),384)),1))}(n[0],n[1],l);case 5:return function(t,r,n){Ae(e.setEmitFlags(e.createIf(e.createLogicalNot(r),e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),n),384)),1))}(n[0],n[1],l);case 6:return function(t,r){C=!0,Ae(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral(t?[me(4),t]:[me(4)])),r),384))}(n[0],l);case 7:return function(t,r){C=!0,Ae(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral([me(5),t])),r),384))}(n[0],l);case 8:return Fe(n[0],l);case 9:return function(t,r){C=!0,k=!0,Ae(e.setTextRange(e.createThrow(t),r))}(n[0],l)}}}}function Ae(e){e&&(A?A.push(e):A=[e])}function Fe(t,r){C=!0,k=!0,Ae(e.setEmitFlags(e.setTextRange(e.createReturn(e.createArrayLiteral(t?[me(2),t]:[me(2)])),r),384))}},e.generatorHelper={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:'\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'}}(s||(s={})),function(e){e.transformModule=function(i){var a=i.startLexicalEnvironment,o=i.endLexicalEnvironment,s=i.hoistVariableDeclaration,c=i.getCompilerOptions(),u=i.getEmitResolver(),l=i.getEmitHost(),_=e.getEmitScriptTarget(c),d=e.getEmitModuleKind(c),p=i.onSubstituteNode,f=i.onEmitNode;i.onSubstituteNode=function(t,r){if((r=p(t,r)).id&&y[r.id])return r;if(1===t)return function(t){switch(t.kind){case 75:return H(t);case 208:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=Y(t.left);if(r){for(var n=t,i=0,a=r;i<a.length;i++){var o=a[i];y[e.getNodeId(n)]=!0,n=W(o,n,t)}return n}}return t}(t);case 207:case 206:return function(t){if((45===t.operator||46===t.operator)&&e.isIdentifier(t.operand)&&!e.isGeneratedIdentifier(t.operand)&&!e.isLocalName(t.operand)&&!e.isDeclarationNameOfEnumOrNamespace(t.operand)){var r=Y(t.operand);if(r){for(var n=207===t.kind?e.setTextRange(e.createBinary(t.operand,e.createToken(45===t.operator?63:64),e.createLiteral(1)),t):t,i=0,a=r;i<a.length;i++){var o=a[i];y[e.getNodeId(n)]=!0,n=W(o,n)}return n}}return t}(t)}return t}(r);if(e.isShorthandPropertyAssignment(r))return function(t){var r=t.name,n=H(r);if(n!==r){if(t.objectAssignmentInitializer){var i=e.createAssignment(n,t.objectAssignmentInitializer);return e.setTextRange(e.createPropertyAssignment(r,i),t)}return e.setTextRange(e.createPropertyAssignment(r,n),t)}return t}(r);return r},i.onEmitNode=function(t,r,n){288===r.kind?(m=r,g=v[e.getOriginalNodeId(m)],y=[],f(t,r,n),m=void 0,g=void 0,y=void 0):f(t,r,n)},i.enableSubstitution(75),i.enableSubstitution(208),i.enableSubstitution(206),i.enableSubstitution(207),i.enableSubstitution(280),i.enableEmitNotification(288);var m,g,y,h,v=[],b=[];return e.chainBundle((function(t){if(t.isDeclarationFile||!(e.isEffectiveExternalModule(t,c)||524288&t.transformFlags||e.isJsonSourceFile(t)&&e.hasJsonModuleEmitEnabled(c)&&(c.out||c.outFile)))return t;m=t,g=e.collectExternalModuleInfo(t,u,c),v[e.getOriginalNodeId(t)]=g;var r=function(t){switch(t){case e.ModuleKind.AMD:return S;case e.ModuleKind.UMD:return T;default:return D}}(d)(t);return m=void 0,g=void 0,h=!1,e.aggregateTransformFlags(r)}));function x(){return!(g.exportEquals||!e.isExternalModule(m))}function D(t){a();var n=[],s=e.getStrictOptionValue(c,"alwaysStrict")||!c.noImplicitUseStrict&&e.isExternalModule(m),u=e.addPrologue(n,t.statements,s,A);x()&&e.append(n,q()),e.append(n,e.visitNode(g.externalHelpersImportDeclaration,A,e.isStatement)),e.addRange(n,e.visitNodes(t.statements,A,e.isStatement,u)),N(n,!1),e.insertStatementsAfterStandardPrologue(n,o());var l=e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(n),t.statements));return g.hasExportStarsToExportValues&&!c.importHelpers&&e.addEmitHelper(l,r),e.addEmitHelpers(l,i.readEmitHelpers()),l}function S(r){var n=e.createIdentifier("define"),a=e.tryGetModuleNameFromFile(r,l,c),o=e.isJsonSourceFile(r)&&r,s=E(r,!0),u=s.aliasedModuleNames,_=s.unaliasedModuleNames,d=s.importAliasNames,p=e.updateSourceFileNode(r,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(n,void 0,t(a?[a]:[],[e.createArrayLiteral(o?e.emptyArray:t([e.createLiteral("require"),e.createLiteral("exports")],u,_)),o?o.statements.length?o.statements[0].expression:e.createObjectLiteral():e.createFunctionExpression(void 0,void 0,void 0,void 0,t([e.createParameter(void 0,void 0,void 0,"require"),e.createParameter(void 0,void 0,void 0,"exports")],d),void 0,k(r))])))]),r.statements));return e.addEmitHelpers(p,i.readEmitHelpers()),p}function T(r){var n=E(r,!1),a=n.aliasedModuleNames,o=n.unaliasedModuleNames,s=n.importAliasNames,u=e.tryGetModuleNameFromFile(r,l,c),_=e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,"factory")],void 0,e.setTextRange(e.createBlock([e.createIf(e.createLogicalAnd(e.createTypeCheck(e.createIdentifier("module"),"object"),e.createTypeCheck(e.createPropertyAccess(e.createIdentifier("module"),"exports"),"object")),e.createBlock([e.createVariableStatement(void 0,[e.createVariableDeclaration("v",void 0,e.createCall(e.createIdentifier("factory"),void 0,[e.createIdentifier("require"),e.createIdentifier("exports")]))]),e.setEmitFlags(e.createIf(e.createStrictInequality(e.createIdentifier("v"),e.createIdentifier("undefined")),e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(e.createIdentifier("module"),"exports"),e.createIdentifier("v")))),1)]),e.createIf(e.createLogicalAnd(e.createTypeCheck(e.createIdentifier("define"),"function"),e.createPropertyAccess(e.createIdentifier("define"),"amd")),e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("define"),void 0,t(u?[u]:[],[e.createArrayLiteral(t([e.createLiteral("require"),e.createLiteral("exports")],a,o)),e.createIdentifier("factory")])))])))],!0),void 0)),d=e.updateSourceFileNode(r,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(_,void 0,[e.createFunctionExpression(void 0,void 0,void 0,void 0,t([e.createParameter(void 0,void 0,void 0,"require"),e.createParameter(void 0,void 0,void 0,"exports")],s),void 0,k(r))]))]),r.statements));return e.addEmitHelpers(d,i.readEmitHelpers()),d}function E(t,r){for(var n=[],i=[],a=[],o=0,s=t.amdDependencies;o<s.length;o++){var _=s[o];_.name?(n.push(e.createLiteral(_.path)),a.push(e.createParameter(void 0,void 0,void 0,_.name))):i.push(e.createLiteral(_.path))}for(var d=0,p=g.externalImports;d<p.length;d++){var f=p[d],y=e.getExternalModuleNameLiteral(f,m,l,u,c),h=e.getLocalNameForExternalImport(f,m);y&&(r&&h?(e.setEmitFlags(h,4),n.push(y),a.push(e.createParameter(void 0,void 0,void 0,h))):i.push(y))}return{aliasedModuleNames:n,unaliasedModuleNames:i,importAliasNames:a}}function C(t){if(!e.isImportEqualsDeclaration(t)&&!e.isExportDeclaration(t)&&e.getExternalModuleNameLiteral(t,m,l,u,c)){var r=e.getLocalNameForExternalImport(t,m),n=I(t,r);if(n!==r)return e.createExpressionStatement(e.createAssignment(r,n))}}function k(t){a();var i=[],s=e.addPrologue(i,t.statements,!c.noImplicitUseStrict,A);x()&&e.append(i,q()),e.append(i,e.visitNode(g.externalHelpersImportDeclaration,A,e.isStatement)),d===e.ModuleKind.AMD&&e.addRange(i,e.mapDefined(g.externalImports,C)),e.addRange(i,e.visitNodes(t.statements,A,e.isStatement,s)),N(i,!0),e.insertStatementsAfterStandardPrologue(i,o());var u=e.createBlock(i,!0);return g.hasExportStarsToExportValues&&!c.importHelpers&&e.addEmitHelper(u,r),h&&e.addEmitHelper(u,n),u}function N(t,r){if(g.exportEquals){var n=e.visitNode(g.exportEquals.expression,F);if(n)if(r){var i=e.createReturn(n);e.setTextRange(i,g.exportEquals),e.setEmitFlags(i,1920),t.push(i)}else{i=e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(e.createIdentifier("module"),"exports"),n));e.setTextRange(i,g.exportEquals),e.setEmitFlags(i,1536),t.push(i)}}}function A(t){switch(t.kind){case 253:return function(t){var r,n=e.getNamespaceDeclarationNode(t);if(d!==e.ModuleKind.AMD){if(!t.importClause)return e.setOriginalNode(e.setTextRange(e.createExpressionStatement(O(t)),t),t);var i=[];n&&!e.isDefaultImport(t)?i.push(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,I(t,O(t)))):(i.push(e.createVariableDeclaration(e.getGeneratedNameForNode(t),void 0,I(t,O(t)))),n&&e.isDefaultImport(t)&&i.push(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)))),r=e.append(r,e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList(i,_>=2?2:0)),t),t))}else n&&e.isDefaultImport(t)&&(r=e.append(r,e.createVariableStatement(void 0,e.createVariableDeclarationList([e.setOriginalNode(e.setTextRange(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)),t),t)],_>=2?2:0))));if(R(t)){var a=e.getOriginalNodeId(t);b[a]=B(b[a],t)}else r=B(r,t);return e.singleOrMany(r)}(t);case 252:return function(t){var r;e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),d!==e.ModuleKind.AMD?r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(W(t.name,O(t))),t),t)):e.append(r,e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedClone(t.name),void 0,O(t))],_>=2?2:0)),t),t)):e.hasModifier(t,1)&&(r=e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(W(e.getExportName(t),e.getLocalName(t))),t),t)));if(R(t)){var n=e.getOriginalNodeId(t);b[n]=j(b[n],t)}else r=j(r,t);return e.singleOrMany(r)}(t);case 259:return function(t){if(!t.moduleSpecifier)return;var r=e.getGeneratedNameForNode(t);if(t.exportClause){var n=[];d!==e.ModuleKind.AMD&&n.push(e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,O(t))])),t),t));for(var a=0,o=t.exportClause.elements;a<o.length;a++){var s=o[a],c=e.createPropertyAccess(r,s.propertyName||s.name);n.push(e.setOriginalNode(e.setTextRange(e.createExpressionStatement(W(e.getExportName(s),c)),s),s))}return e.singleOrMany(n)}return e.setOriginalNode(e.setTextRange(e.createExpressionStatement(function(t,r){return t.getCompilerOptions().importHelpers?e.createCall(e.getUnscopedHelperName("__exportStar"),void 0,[r,e.createIdentifier("exports")]):e.createCall(e.createIdentifier("__export"),void 0,[r])}(i,d!==e.ModuleKind.AMD?O(t):r)),t),t)}(t);case 258:return function(t){if(t.isExportEquals)return;var r,n=t.original;if(n&&R(n)){var i=e.getOriginalNodeId(t);b[i]=V(b[i],e.createIdentifier("default"),e.visitNode(t.expression,F),t,!0)}else r=V(r,e.createIdentifier("default"),e.visitNode(t.expression,F),t,!0);return e.singleOrMany(r)}(t);case 224:return function(t){var r,n,a;if(e.hasModifier(t,1)){for(var o=void 0,s=0,c=t.declarationList.declarations;s<c.length;s++){var u=c[s];e.isIdentifier(u.name)&&e.isLocalName(u.name)?(o||(o=e.visitNodes(t.modifiers,G,e.isModifier)),n=e.append(n,u)):u.initializer&&(a=e.append(a,L(u)))}n&&(r=e.append(r,e.updateVariableStatement(t,o,e.updateVariableDeclarationList(t.declarationList,n)))),a&&(r=e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(e.inlineExpressions(a)),t),t)))}else r=e.append(r,e.visitEachChild(t,F,i));if(R(t)){var l=e.getOriginalNodeId(t);b[l]=K(b[l],t)}else r=K(r,t);return e.singleOrMany(r)}(t);case 243:return function(t){var r;r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,e.visitNodes(t.modifiers,G,e.isModifier),t.asteriskToken,e.getDeclarationName(t,!0,!0),void 0,e.visitNodes(t.parameters,F),void 0,e.visitEachChild(t.body,F,i)),t),t)):e.append(r,e.visitEachChild(t,F,i));if(R(t)){var n=e.getOriginalNodeId(t);b[n]=z(b[n],t)}else r=z(r,t);return e.singleOrMany(r)}(t);case 244:return function(t){var r;r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createClassDeclaration(void 0,e.visitNodes(t.modifiers,G,e.isModifier),e.getDeclarationName(t,!0,!0),void 0,e.visitNodes(t.heritageClauses,F),e.visitNodes(t.members,F)),t),t)):e.append(r,e.visitEachChild(t,F,i));if(R(t)){var n=e.getOriginalNodeId(t);b[n]=z(b[n],t)}else r=z(r,t);return e.singleOrMany(r)}(t);case 321:return function(t){if(R(t)&&224===t.original.kind){var r=e.getOriginalNodeId(t);b[r]=K(b[r],t.original)}return t}(t);case 322:return function(t){var r=e.getOriginalNodeId(t),n=b[r];if(n)return delete b[r],e.append(n,t);return t}(t);default:return e.visitEachChild(t,F,i)}}function F(t){return 524288&t.transformFlags||512&t.transformFlags?e.isImportCall(t)?function(t){var r=e.visitNode(e.firstOrUndefined(t.arguments),F),n=!!(2048&t.transformFlags);switch(c.module){case e.ModuleKind.AMD:return P(r,n);case e.ModuleKind.UMD:return function(t,r){if(h=!0,e.isSimpleCopiableExpression(t)){var n=e.isGeneratedIdentifier(t)?t:e.isStringLiteral(t)?e.createLiteral(t):e.setEmitFlags(e.setTextRange(e.getSynthesizedClone(t),t),1536);return e.createConditional(e.createIdentifier("__syncRequire"),w(t,r),P(n,r))}var i=e.createTempVariable(s);return e.createComma(e.createAssignment(i,t),e.createConditional(e.createIdentifier("__syncRequire"),w(i,r),P(i,r)))}(r,n);case e.ModuleKind.CommonJS:default:return w(r,n)}}(t):e.isDestructuringAssignment(t)?function(t){if(function t(r){if(e.isObjectLiteralExpression(r))for(var n=0,i=r.properties;n<i.length;n++){switch((s=i[n]).kind){case 279:if(t(s.initializer))return!0;break;case 280:if(t(s.name))return!0;break;case 281:if(t(s.expression))return!0;break;case 160:case 162:case 163:return!1;default:e.Debug.assertNever(s,"Unhandled object member kind")}}else if(e.isArrayLiteralExpression(r))for(var a=0,o=r.elements;a<o.length;a++){var s=o[a];if(e.isSpreadElement(s)){if(t(s.expression))return!0}else if(t(s))return!0}else if(e.isIdentifier(r))return e.length(Y(r))>(e.isExportName(r)?1:0);return!1}(t.left))return e.flattenDestructuringAssignment(t,F,i,0,!1,M);return e.visitEachChild(t,F,i)}(t):e.visitEachChild(t,F,i):t}function P(t,r){var n,a=e.createUniqueName("resolve"),o=e.createUniqueName("reject"),s=[e.createParameter(void 0,void 0,void 0,a),e.createParameter(void 0,void 0,void 0,o)],u=e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("require"),void 0,[e.createArrayLiteral([t||e.createOmittedExpression()]),a,o]))]);_>=2?n=e.createArrowFunction(void 0,void 0,s,void 0,void 0,u):(n=e.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,u),r&&e.setEmitFlags(n,8));var l=e.createNew(e.createIdentifier("Promise"),void 0,[n]);return c.esModuleInterop?(i.requestEmitHelper(e.importStarHelper),e.createCall(e.createPropertyAccess(l,e.createIdentifier("then")),void 0,[e.getUnscopedHelperName("__importStar")])):l}function w(t,r){var n,a=e.createCall(e.createPropertyAccess(e.createIdentifier("Promise"),"resolve"),void 0,[]),o=e.createCall(e.createIdentifier("require"),void 0,t?[t]:[]);return c.esModuleInterop&&(i.requestEmitHelper(e.importStarHelper),o=e.createCall(e.getUnscopedHelperName("__importStar"),void 0,[o])),_>=2?n=e.createArrowFunction(void 0,void 0,[],void 0,void 0,o):(n=e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock([e.createReturn(o)])),r&&e.setEmitFlags(n,8)),e.createCall(e.createPropertyAccess(a,"then"),void 0,[n])}function I(t,r){return!c.esModuleInterop||67108864&e.getEmitFlags(t)?r:e.getImportNeedsImportStarHelper(t)?(i.requestEmitHelper(e.importStarHelper),e.createCall(e.getUnscopedHelperName("__importStar"),void 0,[r])):e.getImportNeedsImportDefaultHelper(t)?(i.requestEmitHelper(e.importDefaultHelper),e.createCall(e.getUnscopedHelperName("__importDefault"),void 0,[r])):r}function O(t){var r=e.getExternalModuleNameLiteral(t,m,l,u,c),n=[];return r&&n.push(r),e.createCall(e.createIdentifier("require"),void 0,n)}function M(t,r,n){var i=Y(t);if(i){for(var a=e.isExportName(t)?r:e.createAssignment(t,r),o=0,s=i;o<s.length;o++){var c=s[o];e.setEmitFlags(a,4),a=W(c,a,n)}return a}return e.createAssignment(t,r)}function L(t){return e.isBindingPattern(t.name)?e.flattenDestructuringAssignment(e.visitNode(t,F),void 0,i,0,!1,M):e.createAssignment(e.setTextRange(e.createPropertyAccess(e.createIdentifier("exports"),t.name),t.name),e.visitNode(t.initializer,F))}function R(t){return 0!=(4194304&e.getEmitFlags(t))}function B(e,t){if(g.exportEquals)return e;var r=t.importClause;if(!r)return e;r.name&&(e=U(e,r));var n=r.namedBindings;if(n)switch(n.kind){case 255:e=U(e,n);break;case 256:for(var i=0,a=n.elements;i<a.length;i++){e=U(e,a[i])}}return e}function j(e,t){return g.exportEquals?e:U(e,t)}function K(e,t){if(g.exportEquals)return e;for(var r=0,n=t.declarationList.declarations;r<n.length;r++){e=J(e,n[r])}return e}function J(t,r){if(g.exportEquals)return t;if(e.isBindingPattern(r.name))for(var n=0,i=r.name.elements;n<i.length;n++){var a=i[n];e.isOmittedExpression(a)||(t=J(t,a))}else e.isGeneratedIdentifier(r.name)||(t=U(t,r));return t}function z(t,r){if(g.exportEquals)return t;e.hasModifier(r,1)&&(t=V(t,e.hasModifier(r,512)?e.createIdentifier("default"):e.getDeclarationName(r),e.getLocalName(r),r));return r.name&&(t=U(t,r)),t}function U(t,r){var n=e.getDeclarationName(r),i=g.exportSpecifiers.get(e.idText(n));if(i)for(var a=0,o=i;a<o.length;a++){var s=o[a];t=V(t,s.name,n,s.name)}return t}function V(t,r,n,i,a){return t=e.append(t,function(t,r,n,i){var a=e.setTextRange(e.createExpressionStatement(W(t,r)),n);e.startOnNewLine(a),i||e.setEmitFlags(a,1536);return a}(r,n,i,a))}function q(){var t;return t=0===_?e.createExpressionStatement(W(e.createIdentifier("__esModule"),e.createLiteral(!0))):e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[e.createIdentifier("exports"),e.createLiteral("__esModule"),e.createObjectLiteral([e.createPropertyAssignment("value",e.createLiteral(!0))])])),e.setEmitFlags(t,1048576),t}function W(t,r,n){return e.setTextRange(e.createAssignment(e.createPropertyAccess(e.createIdentifier("exports"),e.getSynthesizedClone(t)),r),n)}function G(e){switch(e.kind){case 88:case 83:return}return e}function H(t){if(4096&e.getEmitFlags(t)){var r=e.getExternalHelpersModuleName(m);return r?e.createPropertyAccess(r,t):t}if(!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var n=u.getReferencedExportContainer(t,e.isExportName(t));if(n&&288===n.kind)return e.setTextRange(e.createPropertyAccess(e.createIdentifier("exports"),e.getSynthesizedClone(t)),t);var i=u.getReferencedImportDeclaration(t);if(i){if(e.isImportClause(i))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(i.parent),e.createIdentifier("default")),t);if(e.isImportSpecifier(i)){var a=i.propertyName||i.name;return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(i.parent.parent.parent),e.getSynthesizedClone(a)),t)}}}return t}function Y(t){if(!e.isGeneratedIdentifier(t)){var r=u.getReferencedImportDeclaration(t)||u.getReferencedValueDeclaration(t);if(r)return g&&g.exportedBindings[e.getOriginalNodeId(r)]}}};var r={name:"typescript:export-star",scoped:!0,text:"\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }"};var n={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};e.importStarHelper={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,text:'\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result["default"] = mod;\n return result;\n};'},e.importDefaultHelper={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:'\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};'}}(s||(s={})),function(e){e.transformSystemModule=function(t){var r=t.startLexicalEnvironment,n=t.endLexicalEnvironment,i=t.hoistVariableDeclaration,a=t.getCompilerOptions(),o=t.getEmitResolver(),s=t.getEmitHost(),c=t.onSubstituteNode,u=t.onEmitNode;t.onSubstituteNode=function(t,r){if(function(e){return g&&e.id&&g[e.id]}(r=c(t,r)))return r;if(1===t)return function(t){switch(t.kind){case 75:return function(t){if(4096&e.getEmitFlags(t)){var r=e.getExternalHelpersModuleName(l);return r?e.createPropertyAccess(r,t):t}if(!e.isGeneratedIdentifier(t)&&!e.isLocalName(t)){var n=o.getReferencedImportDeclaration(t);if(n){if(e.isImportClause(n))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(n.parent),e.createIdentifier("default")),t);if(e.isImportSpecifier(n))return e.setTextRange(e.createPropertyAccess(e.getGeneratedNameForNode(n.parent.parent.parent),e.getSynthesizedClone(n.propertyName||n.name)),t)}}return t}(t);case 208:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=W(t.left);if(r){for(var n=t,i=0,a=r;i<a.length;i++){var o=a[i];n=K(o,G(n))}return n}}return t}(t);case 206:case 207:return function(t){if((45===t.operator||46===t.operator)&&e.isIdentifier(t.operand)&&!e.isGeneratedIdentifier(t.operand)&&!e.isLocalName(t.operand)&&!e.isDeclarationNameOfEnumOrNamespace(t.operand)){var r=W(t.operand);if(r){for(var n=207===t.kind?e.setTextRange(e.createPrefix(t.operator,t.operand),t):t,i=0,a=r;i<a.length;i++){var o=a[i];n=K(o,G(n))}return 207===t.kind&&(n=45===t.operator?e.createSubtract(G(n),e.createLiteral(1)):e.createAdd(G(n),e.createLiteral(1))),n}}return t}(t);case 218:return function(t){if(e.isImportMeta(t))return e.createPropertyAccess(p,e.createIdentifier("meta"));return t}(t)}return t}(r);if(4===t)return function(t){switch(t.kind){case 280:return function(t){var r=t.name;if(!e.isGeneratedIdentifier(r)&&!e.isLocalName(r)){var n=o.getReferencedImportDeclaration(r);if(n){if(e.isImportClause(n))return e.setTextRange(e.createPropertyAssignment(e.getSynthesizedClone(r),e.createPropertyAccess(e.getGeneratedNameForNode(n.parent),e.createIdentifier("default"))),t);if(e.isImportSpecifier(n))return e.setTextRange(e.createPropertyAssignment(e.getSynthesizedClone(r),e.createPropertyAccess(e.getGeneratedNameForNode(n.parent.parent.parent),e.getSynthesizedClone(n.propertyName||n.name))),t)}}return t}(t)}return t}(r);return r},t.onEmitNode=function(t,r,n){if(288===r.kind){var i=e.getOriginalNodeId(r);l=r,_=y[i],d=v[i],g=b[i],p=x[i],g&&delete b[i],u(t,r,n),l=void 0,_=void 0,d=void 0,p=void 0,g=void 0}else u(t,r,n)},t.enableSubstitution(75),t.enableSubstitution(280),t.enableSubstitution(208),t.enableSubstitution(206),t.enableSubstitution(207),t.enableSubstitution(218),t.enableEmitNotification(288);var l,_,d,p,f,m,g,y=[],h=[],v=[],b=[],x=[];return e.chainBundle((function(t){if(t.isDeclarationFile||!(e.isEffectiveExternalModule(t,a)||524288&t.transformFlags))return t;var i=e.getOriginalNodeId(t);l=t,m=t,_=y[i]=e.collectExternalModuleInfo(t,o,a),d=e.createUniqueName("exports"),v[i]=d,p=x[i]=e.createUniqueName("context");var c=function(t){for(var r=e.createMap(),n=[],i=0,c=t;i<c.length;i++){var u=c[i],_=e.getExternalModuleNameLiteral(u,l,s,o,a);if(_){var d=_.text,p=r.get(d);void 0!==p?n[p].externalImports.push(u):(r.set(d,n.length),n.push({name:_,externalImports:[u]}))}}return n}(_.externalImports),u=function(t,i){var o=[];r();var s=e.getStrictOptionValue(a,"alwaysStrict")||!a.noImplicitUseStrict&&e.isExternalModule(l),c=e.addPrologue(o,t.statements,s,T);o.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration("__moduleName",void 0,e.createLogicalAnd(p,e.createPropertyAccess(p,"id")))]))),e.visitNode(_.externalHelpersImportDeclaration,T,e.isStatement);var u=e.visitNodes(t.statements,T,e.isStatement,c);e.addRange(o,f),e.insertStatementsAfterStandardPrologue(o,n());var d=function(t){if(!_.hasExportStarsToExportValues)return;if(!_.exportedNames&&0===_.exportSpecifiers.size){for(var r=!1,n=0,i=_.externalImports;n<i.length;n++){if(259===(p=i[n]).kind&&p.exportClause){r=!0;break}}if(!r){var a=D(void 0);return t.push(a),a.name}}var o=[];if(_.exportedNames)for(var s=0,c=_.exportedNames;s<c.length;s++){var u=c[s];"default"!==u.escapedText&&o.push(e.createPropertyAssignment(e.createLiteral(u),e.createTrue()))}for(var l=0,d=_.externalImports;l<d.length;l++){var p;if(259===(p=d[l]).kind&&p.exportClause)for(var f=0,m=p.exportClause.elements;f<m.length;f++){var g=m[f];o.push(e.createPropertyAssignment(e.createLiteral(e.idText(g.name||g.propertyName)),e.createTrue()))}}var y=e.createUniqueName("exportedNames");t.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(y,void 0,e.createObjectLiteral(o,!0))])));var h=D(y);return t.push(h),h.name}(o),m=e.createObjectLiteral([e.createPropertyAssignment("setters",S(d,i)),e.createPropertyAssignment("execute",e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock(u,!0)))]);return m.multiLine=!0,o.push(e.createReturn(m)),e.createBlock(o,!0)}(t,c),h=e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,d),e.createParameter(void 0,void 0,void 0,p)],void 0,u),E=e.tryGetModuleNameFromFile(t,s,a),C=e.createArrayLiteral(e.map(c,(function(e){return e.name}))),k=e.setEmitFlags(e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray([e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createIdentifier("System"),"register"),void 0,E?[E,C,h]:[C,h]))]),t.statements)),1024);a.outFile||a.out||e.moveEmitHelpers(k,u,(function(e){return!e.scoped}));g&&(b[i]=g,g=void 0);return l=void 0,_=void 0,d=void 0,p=void 0,f=void 0,m=void 0,e.aggregateTransformFlags(k)}));function D(t){var r=e.createUniqueName("exportStar"),n=e.createIdentifier("m"),i=e.createIdentifier("n"),a=e.createIdentifier("exports"),o=e.createStrictInequality(i,e.createLiteral("default"));return t&&(o=e.createLogicalAnd(o,e.createLogicalNot(e.createCall(e.createPropertyAccess(t,"hasOwnProperty"),void 0,[i])))),e.createFunctionDeclaration(void 0,void 0,void 0,r,void 0,[e.createParameter(void 0,void 0,void 0,n)],void 0,e.createBlock([e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(a,void 0,e.createObjectLiteral([]))])),e.createForIn(e.createVariableDeclarationList([e.createVariableDeclaration(i,void 0)]),n,e.createBlock([e.setEmitFlags(e.createIf(o,e.createExpressionStatement(e.createAssignment(e.createElementAccess(a,i),e.createElementAccess(n,i)))),1)])),e.createExpressionStatement(e.createCall(d,void 0,[a]))],!0))}function S(t,r){for(var n=[],i=0,a=r;i<a.length;i++){for(var o=a[i],s=e.forEach(o.externalImports,(function(t){return e.getLocalNameForExternalImport(t,l)})),c=s?e.getGeneratedNameForNode(s):e.createUniqueName(""),u=[],_=0,p=o.externalImports;_<p.length;_++){var f=p[_],m=e.getLocalNameForExternalImport(f,l);switch(f.kind){case 253:if(!f.importClause)break;case 252:e.Debug.assert(void 0!==m),u.push(e.createExpressionStatement(e.createAssignment(m,c)));break;case 259:if(e.Debug.assert(void 0!==m),f.exportClause){for(var g=[],y=0,h=f.exportClause.elements;y<h.length;y++){var v=h[y];g.push(e.createPropertyAssignment(e.createLiteral(e.idText(v.name)),e.createElementAccess(c,e.createLiteral(e.idText(v.propertyName||v.name)))))}u.push(e.createExpressionStatement(e.createCall(d,void 0,[e.createObjectLiteral(g,!0)])))}else u.push(e.createExpressionStatement(e.createCall(t,void 0,[c])))}}n.push(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,c)],void 0,e.createBlock(u,!0)))}return e.createArrayLiteral(n,!0)}function T(t){switch(t.kind){case 253:return function(t){var r;t.importClause&&i(e.getLocalNameForExternalImport(t,l));if(P(t)){var n=e.getOriginalNodeId(t);h[n]=w(h[n],t)}else r=w(r,t);return e.singleOrMany(r)}(t);case 252:return function(t){var r;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),i(e.getLocalNameForExternalImport(t,l)),P(t)){var n=e.getOriginalNodeId(t);h[n]=I(h[n],t)}else r=I(r,t);return e.singleOrMany(r)}(t);case 259:return;case 258:return function(t){if(t.isExportEquals)return;var r=e.visitNode(t.expression,U,e.isExpression),n=t.original;if(!n||!P(n))return j(e.createIdentifier("default"),r,!0);var i=e.getOriginalNodeId(t);h[i]=B(h[i],e.createIdentifier("default"),r,!0)}(t);default:return J(t)}}function E(t){if(e.isBindingPattern(t.name))for(var r=0,n=t.name.elements;r<n.length;r++){var a=n[r];e.isOmittedExpression(a)||E(a)}else i(e.getSynthesizedClone(t.name))}function C(t){return 0==(2097152&e.getEmitFlags(t))&&(288===m.kind||0==(3&e.getOriginalNode(t).flags))}function k(r,n){var i=n?N:A;return e.isBindingPattern(r.name)?e.flattenDestructuringAssignment(r,U,t,0,!1,i):r.initializer?i(r.name,e.visitNode(r.initializer,U,e.isExpression)):r.name}function N(e,t,r){return F(e,t,r,!0)}function A(e,t,r){return F(e,t,r,!1)}function F(t,r,n,a){return i(e.getSynthesizedClone(t)),a?K(t,G(e.setTextRange(e.createAssignment(t,r),n))):G(e.setTextRange(e.createAssignment(t,r),n))}function P(t){return 0!=(4194304&e.getEmitFlags(t))}function w(e,t){if(_.exportEquals)return e;var r=t.importClause;if(!r)return e;r.name&&(e=R(e,r));var n=r.namedBindings;if(n)switch(n.kind){case 255:e=R(e,n);break;case 256:for(var i=0,a=n.elements;i<a.length;i++){e=R(e,a[i])}}return e}function I(e,t){return _.exportEquals?e:R(e,t)}function O(e,t,r){if(_.exportEquals)return e;for(var n=0,i=t.declarationList.declarations;n<i.length;n++){var a=i[n];(a.initializer||r)&&(e=M(e,a,r))}return e}function M(t,r,n){if(_.exportEquals)return t;if(e.isBindingPattern(r.name))for(var i=0,a=r.name.elements;i<a.length;i++){var o=a[i];e.isOmittedExpression(o)||(t=M(t,o,n))}else if(!e.isGeneratedIdentifier(r.name)){var s=void 0;n&&(t=B(t,r.name,e.getLocalName(r)),s=e.idText(r.name)),t=R(t,r,s)}return t}function L(t,r){if(_.exportEquals)return t;var n;if(e.hasModifier(r,1)){var i=e.hasModifier(r,512)?e.createLiteral("default"):r.name;t=B(t,i,e.getLocalName(r)),n=e.getTextOfIdentifierOrLiteral(i)}return r.name&&(t=R(t,r,n)),t}function R(t,r,n){if(_.exportEquals)return t;var i=e.getDeclarationName(r),a=_.exportSpecifiers.get(e.idText(i));if(a)for(var o=0,s=a;o<s.length;o++){var c=s[o];c.name.escapedText!==n&&(t=B(t,c.name,i))}return t}function B(t,r,n,i){return t=e.append(t,j(r,n,i))}function j(t,r,n){var i=e.createExpressionStatement(K(t,r));return e.startOnNewLine(i),n||e.setEmitFlags(i,1536),i}function K(t,r){var n=e.isIdentifier(t)?e.createLiteral(t):t;return e.setEmitFlags(r,1536|e.getEmitFlags(r)),e.setCommentRange(e.createCall(d,void 0,[n,r]),r)}function J(r){switch(r.kind){case 224:return function(t){if(!C(t.declarationList))return e.visitNode(t,U,e.isStatement);for(var r,n,i=e.hasModifier(t,1),a=P(t),o=0,s=t.declarationList.declarations;o<s.length;o++){var c=s[o];c.initializer?r=e.append(r,k(c,i&&!a)):E(c)}if(r&&(n=e.append(n,e.setTextRange(e.createExpressionStatement(e.inlineExpressions(r)),t))),a){var u=e.getOriginalNodeId(t);h[u]=O(h[u],t,i)}else n=O(n,t,!1);return e.singleOrMany(n)}(r);case 243:return function(r){if(f=e.hasModifier(r,1)?e.append(f,e.updateFunctionDeclaration(r,r.decorators,e.visitNodes(r.modifiers,q,e.isModifier),r.asteriskToken,e.getDeclarationName(r,!0,!0),void 0,e.visitNodes(r.parameters,U,e.isParameterDeclaration),void 0,e.visitNode(r.body,U,e.isBlock))):e.append(f,e.visitEachChild(r,U,t)),P(r)){var n=e.getOriginalNodeId(r);h[n]=L(h[n],r)}else f=L(f,r)}(r);case 244:return function(t){var r,n=e.getLocalName(t);if(i(n),r=e.append(r,e.setTextRange(e.createExpressionStatement(e.createAssignment(n,e.setTextRange(e.createClassExpression(void 0,t.name,void 0,e.visitNodes(t.heritageClauses,U,e.isHeritageClause),e.visitNodes(t.members,U,e.isClassElement)),t))),t)),P(t)){var a=e.getOriginalNodeId(t);h[a]=L(h[a],t)}else r=L(r,t);return e.singleOrMany(r)}(r);case 229:return function(t){var r=m;return m=t,t=e.updateFor(t,t.initializer&&z(t.initializer),e.visitNode(t.condition,U,e.isExpression),e.visitNode(t.incrementor,U,e.isExpression),e.visitNode(t.statement,J,e.isStatement)),m=r,t}(r);case 230:return function(t){var r=m;return m=t,t=e.updateForIn(t,z(t.initializer),e.visitNode(t.expression,U,e.isExpression),e.visitNode(t.statement,J,e.isStatement,e.liftToBlock)),m=r,t}(r);case 231:return function(t){var r=m;return m=t,t=e.updateForOf(t,t.awaitModifier,z(t.initializer),e.visitNode(t.expression,U,e.isExpression),e.visitNode(t.statement,J,e.isStatement,e.liftToBlock)),m=r,t}(r);case 227:return function(t){return e.updateDo(t,e.visitNode(t.statement,J,e.isStatement,e.liftToBlock),e.visitNode(t.expression,U,e.isExpression))}(r);case 228:return function(t){return e.updateWhile(t,e.visitNode(t.expression,U,e.isExpression),e.visitNode(t.statement,J,e.isStatement,e.liftToBlock))}(r);case 237:return function(t){return e.updateLabel(t,t.label,e.visitNode(t.statement,J,e.isStatement,e.liftToBlock))}(r);case 235:return function(t){return e.updateWith(t,e.visitNode(t.expression,U,e.isExpression),e.visitNode(t.statement,J,e.isStatement,e.liftToBlock))}(r);case 236:return function(t){return e.updateSwitch(t,e.visitNode(t.expression,U,e.isExpression),e.visitNode(t.caseBlock,J,e.isCaseBlock))}(r);case 250:return function(t){var r=m;return m=t,t=e.updateCaseBlock(t,e.visitNodes(t.clauses,J,e.isCaseOrDefaultClause)),m=r,t}(r);case 275:return function(t){return e.updateCaseClause(t,e.visitNode(t.expression,U,e.isExpression),e.visitNodes(t.statements,J,e.isStatement))}(r);case 276:case 239:return function(r){return e.visitEachChild(r,J,t)}(r);case 278:return function(t){var r=m;return m=t,t=e.updateCatchClause(t,t.variableDeclaration,e.visitNode(t.block,J,e.isBlock)),m=r,t}(r);case 222:return function(r){var n=m;return m=r,r=e.visitEachChild(r,J,t),m=n,r}(r);case 321:return function(t){if(P(t)&&224===t.original.kind){var r=e.getOriginalNodeId(t),n=e.hasModifier(t.original,1);h[r]=O(h[r],t.original,n)}return t}(r);case 322:return function(t){var r=e.getOriginalNodeId(t),n=h[r];if(n)return delete h[r],e.append(n,t);var i=e.getOriginalNode(t);return e.isModuleOrEnumDeclaration(i)?e.append(R(n,i),t):t}(r);default:return U(r)}}function z(r){if(function(t){return e.isVariableDeclarationList(t)&&C(t)}(r)){for(var n=void 0,i=0,a=r.declarations;i<a.length;i++){var o=a[i];n=e.append(n,k(o,!1)),o.initializer||E(o)}return n?e.inlineExpressions(n):e.createOmittedExpression()}return e.visitEachChild(r,J,t)}function U(r){return e.isDestructuringAssignment(r)?function(r){if(V(r.left))return e.flattenDestructuringAssignment(r,U,t,0,!0);return e.visitEachChild(r,U,t)}(r):e.isImportCall(r)?function(t){return e.createCall(e.createPropertyAccess(p,e.createIdentifier("import")),void 0,e.some(t.arguments)?[e.visitNode(t.arguments[0],U)]:[])}(r):512&r.transformFlags||524288&r.transformFlags?e.visitEachChild(r,U,t):r}function V(t){if(e.isAssignmentExpression(t,!0))return V(t.left);if(e.isSpreadElement(t))return V(t.expression);if(e.isObjectLiteralExpression(t))return e.some(t.properties,V);if(e.isArrayLiteralExpression(t))return e.some(t.elements,V);if(e.isShorthandPropertyAssignment(t))return V(t.name);if(e.isPropertyAssignment(t))return V(t.initializer);if(e.isIdentifier(t)){var r=o.getReferencedExportContainer(t);return void 0!==r&&288===r.kind}return!1}function q(e){switch(e.kind){case 88:case 83:return}return e}function W(t){var r;if(!e.isGeneratedIdentifier(t)){var n=o.getReferencedImportDeclaration(t)||o.getReferencedValueDeclaration(t);if(n){var i=o.getReferencedExportContainer(t,!1);i&&288===i.kind&&(r=e.append(r,e.getDeclarationName(n))),r=e.addRange(r,_&&_.exportedBindings[e.getOriginalNodeId(n)])}}return r}function G(t){return void 0===g&&(g=[]),g[e.getNodeId(t)]=!0,t}}}(s||(s={})),function(e){e.transformES2015Module=function(t){var r,n=t.getCompilerOptions(),i=t.onEmitNode,a=t.onSubstituteNode;return t.onEmitNode=function(t,n,a){e.isSourceFile(n)?(r=e.createMap(),i(t,n,a),r=void 0):i(t,n,a)},t.onSubstituteNode=function(t,n){if(n=a(t,n),r&&e.isIdentifier(n)&&4096&e.getEmitFlags(n))return function(t){var n=e.idText(t),i=r.get(n);i||r.set(n,i=e.createFileLevelUniqueName(n));return i}(n);return n},t.enableEmitNotification(288),t.enableSubstitution(75),e.chainBundle((function(r){if(r.isDeclarationFile)return r;if(e.isExternalModule(r)||n.isolatedModules){var i=e.createExternalHelpersImportDeclarationIfNeeded(r,n);if(i){var a=[],s=e.addPrologue(a,r.statements);return e.append(a,i),e.addRange(a,e.visitNodes(r.statements,o,e.isStatement,s)),e.updateSourceFileNode(r,e.setTextRange(e.createNodeArray(a),r.statements))}return e.visitEachChild(r,o,t)}return r}));function o(e){switch(e.kind){case 252:return;case 258:return function(e){return e.isExportEquals?void 0:e}(e)}return e}}}(s||(s={})),function(e){function t(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isPropertyAccessExpression(t)||e.isBindingElement(t)||e.isConstructorDeclaration(t)?r:e.isSetAccessor(t)||e.isGetAccessor(t)?function(r){var n;n=163===t.kind?e.hasModifier(t,32)?r.errorModuleName?e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1;return{diagnosticMessage:n,errorNode:t.name,typeName:t.name}}:e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isIndexSignatureDeclaration(t)?function(r){var n;switch(t.kind){case 165:n=r.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 164:n=r.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 166:n=r.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 160:case 159:n=e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:244===t.parent.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:r.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 243:n=r.errorModuleName?2===r.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return e.Debug.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:n,errorNode:t.name||t}}:e.isParameter(t)?e.isParameterPropertyDeclaration(t,t.parent)&&e.hasModifier(t.parent,8)?r:function(r){var n=function(r){switch(t.parent.kind){case 161:return r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 165:case 170:return r.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 164:return r.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 166:return r.errorModuleName?e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 160:case 159:return e.hasModifier(t.parent,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:244===t.parent.parent.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 243:case 169:return r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 163:case 162:return r.errorModuleName?2===r.accessibility?e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return e.Debug.fail("Unknown parent for parameter: "+e.SyntaxKind[t.parent.kind])}}(r);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}:e.isTypeParameterDeclaration(t)?function(){var r;switch(t.parent.kind){case 244:r=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 245:r=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 185:r=e.Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 170:case 165:r=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 164:r=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 160:case 159:r=e.hasModifier(t.parent,32)?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:244===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 169:case 243:r=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 246:r=e.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return e.Debug.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:r,errorNode:t,typeName:t.name}}:e.isExpressionWithTypeArguments(t)?function(){var r;r=244===t.parent.parent.kind?e.isHeritageClause(t.parent)&&112===t.parent.token?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;return{diagnosticMessage:r,errorNode:t,typeName:e.getNameOfDeclaration(t.parent.parent)}}:e.isImportEqualsDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}:e.isTypeAliasDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}:e.Debug.assertNever(t,"Attempted to set a declaration diagnostic context for unhandled node kind: "+e.SyntaxKind[t.kind]);function r(r){var n=function(r){return 241===t.kind||190===t.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:158===t.kind||193===t.kind||157===t.kind||155===t.kind&&e.hasModifier(t.parent,8)?e.hasModifier(t,32)?r.errorModuleName?2===r.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:244===t.parent.kind||155===t.kind?r.errorModuleName?2===r.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:r.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(r);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}}e.canProduceDiagnostics=function(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isBindingElement(t)||e.isSetAccessor(t)||e.isGetAccessor(t)||e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isParameter(t)||e.isTypeParameterDeclaration(t)||e.isExpressionWithTypeArguments(t)||e.isImportEqualsDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isConstructorDeclaration(t)||e.isIndexSignatureDeclaration(t)||e.isPropertyAccessExpression(t)},e.createGetSymbolAccessibilityDiagnosticForNodeName=function(r){return e.isSetAccessor(r)||e.isGetAccessor(r)?function(t){var n=function(t){return e.hasModifier(r,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:244===r.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:r,typeName:r.name}:void 0}:e.isMethodSignature(r)||e.isMethodDeclaration(r)?function(t){var n=function(t){return e.hasModifier(r,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:244===r.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:r,typeName:r.name}:void 0}:t(r)},e.createGetSymbolAccessibilityDiagnosticForNode=t}(s||(s={})),function(e){function n(t,r){var n=r.text.substring(t.pos,t.end);return e.stringContains(n,"@internal")}function i(t,r){var i=e.getParseTreeNode(t);if(i&&155===i.kind){var a=i.parent.parameters.indexOf(i),o=a>0?i.parent.parameters[a-1]:void 0,s=r.text,c=o?e.concatenate(e.getTrailingCommentRanges(s,e.skipTrivia(s,o.end+1,!1,!0)),e.getLeadingCommentRanges(s,t.pos)):e.getTrailingCommentRanges(s,e.skipTrivia(s,t.pos,!1,!0));return c&&c.length&&n(e.last(c),r)}var u=i&&e.getLeadingCommentRangesOfNode(i,r);return!!e.forEach(u,(function(e){return n(e,r)}))}e.getDeclarationDiagnostics=function(t,r,n){var i=t.getCompilerOptions();return e.transformNodes(r,t,i,n?[n]:t.getSourceFiles(),[o],!1).diagnostics},e.isInternalDeclaration=i;var a=531469;function o(n){var o,u,l,_,d,p,f,m,g,y,h,v=function(){return e.Debug.fail("Diagnostic emitted without context")},b=v,x=!0,D=!1,S=!1,T=!1,E=!1,C=n.getEmitHost(),k={trackSymbol:function(e,t,r){if(262144&e.flags)return;I(N.isSymbolAccessible(e,t,r,!0)),w(N.getTypeReferenceDirectivesForSymbol(e,r))},reportInaccessibleThisError:function(){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(f),"this"))},reportInaccessibleUniqueSymbolError:function(){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(f),"unique symbol"))},reportPrivateInBaseOfClassExpression:function(t){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,e.declarationNameToString(f),t))},moduleResolverHost:C,trackReferencedAmbientModule:function(t,r){var n=N.getTypeReferenceDirectivesForSymbol(r,67108863);if(e.length(n))return w(n);var i=e.getSourceFileOfNode(t);g.set(""+e.getOriginalNodeId(i),i)},trackExternalModuleSymbolOfImportTypeNode:function(e){D||(p||(p=[])).push(e)}},N=n.getEmitResolver(),A=n.getCompilerOptions(),F=A.noResolve,P=A.stripInternal;return function(i){if(288===i.kind&&i.isDeclarationFile)return i;if(289===i.kind){D=!0,g=e.createMap(),y=e.createMap();var a=!1,s=e.createBundle(e.map(i.sourceFiles,(function(t){if(!t.isDeclarationFile){if(a=a||t.hasNoDefaultLib,m=t,o=t,l=void 0,d=!1,_=e.createMap(),b=v,T=!1,E=!1,M(t,g),L(t,y),e.isExternalOrCommonJsModule(t)||e.isJsonSourceFile(t)){S=!1,x=!1;var r=e.isSourceFileJS(t)?e.createNodeArray(O(t,!0)):e.visitNodes(t.statements,$);return e.updateSourceFileNode(t,[e.createModuleDeclaration([],[e.createModifier(129)],e.createLiteral(e.getResolvedExternalModuleName(n.getEmitHost(),t)),e.createModuleBlock(e.setTextRange(e.createNodeArray(X(r)),t.statements)))],!0,[],[],!1,[])}x=!0;var i=e.isSourceFileJS(t)?e.createNodeArray(O(t)):e.visitNodes(t.statements,$);return e.updateSourceFileNode(t,X(i),!0,[],[],!1,[])}})),e.mapDefined(i.prepends,(function(t){if(291===t.kind){var r=e.createUnparsedSourceFile(t,"dts",P);return a=a||!!r.hasNoDefaultLib,M(r,g),w(r.typeReferenceDirectives),L(r,y),r}return t})));s.syntheticFileReferences=[],s.syntheticTypeReferences=K(),s.syntheticLibReferences=j(),s.hasNoDefaultLib=a;var c=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(i,C,!0).declarationFilePath)),f=z(s.syntheticFileReferences,c);return g.forEach(f),s}x=!0,T=!1,E=!1,o=i,m=i,b=v,D=!1,S=!1,d=!1,l=void 0,_=e.createMap(),u=void 0,g=M(m,e.createMap()),y=L(m,e.createMap());var k,N=[],F=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(i,C,!0).declarationFilePath)),I=z(N,F);if(e.isSourceFileJS(m))k=e.createNodeArray(O(i)),g.forEach(I),h=e.filter(k,e.isAnyImportSyntax);else{var R=e.visitNodes(i.statements,$);k=e.setTextRange(e.createNodeArray(X(R)),i.statements),g.forEach(I),h=e.filter(k,e.isAnyImportSyntax),e.isExternalModule(i)&&(!S||T&&!E)&&(k=e.setTextRange(e.createNodeArray(t(k,[e.createEmptyExports()])),k))}var B=e.updateSourceFileNode(i,k,!0,N,K(),i.hasNoDefaultLib,j());return B.exportedModulesFromDeclarationEmit=p,B;function j(){return e.map(e.arrayFrom(y.keys()),(function(e){return{fileName:e,pos:-1,end:-1}}))}function K(){return u?e.mapDefined(e.arrayFrom(u.keys()),J):[]}function J(t){if(h)for(var r=0,n=h;r<n.length;r++){var i=n[r];if(e.isImportEqualsDeclaration(i)&&e.isExternalModuleReference(i.moduleReference)){var a=i.moduleReference.expression;if(e.isStringLiteralLike(a)&&a.text===t)return}else if(e.isImportDeclaration(i)&&e.isStringLiteral(i.moduleSpecifier)&&i.moduleSpecifier.text===t)return}return{fileName:t,pos:-1,end:-1}}function z(t,n){return function(a){var o;if(a.isDeclarationFile)o=a.fileName;else{if(D&&e.contains(i.sourceFiles,a))return;var s=e.getOutputPathsFor(a,C,!0);o=s.declarationFilePath||s.jsFilePath||a.fileName}if(o){var c=e.moduleSpecifiers.getModuleSpecifier(r(r({},A),{baseUrl:A.baseUrl&&e.toPath(A.baseUrl,C.getCurrentDirectory(),C.getCanonicalFileName)}),m,e.toPath(n,C.getCurrentDirectory(),C.getCanonicalFileName),e.toPath(o,C.getCurrentDirectory(),C.getCanonicalFileName),C,C.getSourceFiles(),void 0,C.redirectTargetsMap);if(!e.pathIsRelative(c))return void w([c]);var u=e.getRelativePathToDirectoryOrUrl(n,o,C.getCurrentDirectory(),C.getCanonicalFileName,!1);if(e.startsWith(u,"./")&&e.hasExtension(u)&&(u=u.substring(2)),e.startsWith(u,"node_modules/")||-1!==u.indexOf("/node_modules/"))return;t.push({pos:-1,end:-1,fileName:u})}}}};function w(t){if(t){u=u||e.createMap();for(var r=0,n=t;r<n.length;r++){var i=n[r];u.set(i,!0)}}}function I(t){if(0===t.accessibility){if(t&&t.aliasesToMakeVisible)if(l)for(var r=0,i=t.aliasesToMakeVisible;r<i.length;r++){var a=i[r];e.pushIfUnique(l,a)}else l=t.aliasesToMakeVisible}else{var o=b(t);o&&(o.typeName?n.addDiagnostic(e.createDiagnosticForNode(t.errorNode||o.errorNode,o.diagnosticMessage,e.getTextOfNode(o.typeName),t.errorSymbolName,t.errorModuleName)):n.addDiagnostic(e.createDiagnosticForNode(t.errorNode||o.errorNode,o.diagnosticMessage,t.errorSymbolName,t.errorModuleName)))}}function O(t,r){var n=b;b=function(r){return{diagnosticMessage:r.errorModuleName?e.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:e.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:r.errorNode||t}};var i=N.getDeclarationStatementsForSourceFile(t,a,k,r);return b=n,i}function M(t,r){return F||!e.isUnparsedSource(t)&&e.isSourceFileJS(t)?r:(e.forEach(t.referencedFiles,(function(n){var i=C.getSourceFileFromReference(t,n);i&&r.set(""+e.getOriginalNodeId(i),i)})),r)}function L(t,r){return e.forEach(t.libReferenceDirectives,(function(e){C.getLibFileFromReference(e)&&r.set(e.fileName.toLocaleLowerCase(),!0)})),r}function R(t,r,n){var i;d||(i=b,b=e.createGetSymbolAccessibilityDiagnosticForNode(t));var a=e.updateParameter(t,void 0,function(t,r,n){return e.createModifiersFromModifierFlags(s(t,r,n))}(t,r),t.dotDotDotToken,function t(r){return 75===r.kind?r:189===r.kind?e.updateArrayBindingPattern(r,e.visitNodes(r.elements,n)):e.updateObjectBindingPattern(r,e.visitNodes(r.elements,n));function n(r){return 214===r.kind?r:e.updateBindingElement(r,r.dotDotDotToken,r.propertyName,t(r.name),B(r)?r.initializer:void 0)}}(t.name),N.isOptionalParameter(t)?t.questionToken||e.createToken(57):void 0,K(t,n||t.type,!0),j(t));return d||(b=i),a}function B(t){return function(t){switch(t.kind){case 158:case 157:return!e.hasModifier(t,8);case 155:case 241:return!0}return!1}(t)&&N.isLiteralConstDeclaration(e.getParseTreeNode(t))}function j(t){if(B(t))return N.createLiteralConstValue(e.getParseTreeNode(t),k)}function K(t,r,n){if((n||!e.hasModifier(t,8))&&!B(t)){var i,s=155===t.kind&&(N.isRequiredInitializedParameter(t)||N.isOptionalUninitializedParameterProperty(t));return r&&!s?e.visitNode(r,Q):e.getParseTreeNode(t)?163===t.kind?e.createKeywordTypeNode(124):(f=t.name,d||(i=b,b=e.createGetSymbolAccessibilityDiagnosticForNode(t)),241===t.kind||190===t.kind?c(N.createTypeOfDeclaration(t,o,a,k)):155===t.kind||158===t.kind||157===t.kind?t.initializer?c(N.createTypeOfDeclaration(t,o,a,k,s)||N.createTypeOfExpression(t.initializer,o,a,k)):c(N.createTypeOfDeclaration(t,o,a,k,s)):c(N.createReturnTypeOfSignatureDeclaration(t,o,a,k))):r?e.visitNode(r,Q):e.createKeywordTypeNode(124)}function c(t){return f=void 0,d||(b=i),t||e.createKeywordTypeNode(124)}}function J(t){switch((t=e.getParseTreeNode(t)).kind){case 243:case 248:case 245:case 244:case 246:case 247:return!N.isDeclarationVisible(t);case 241:return!z(t);case 252:case 253:case 259:case 258:return!1}return!1}function z(t){return!e.isOmittedExpression(t)&&(e.isBindingPattern(t.name)?e.some(t.name.elements,z):N.isDeclarationVisible(t))}function U(t,r,n){if(!e.hasModifier(t,8)){var i=e.map(r,(function(e){return R(e,n)}));if(i)return e.createNodeArray(i,r.hasTrailingComma)}}function V(t,r){var n;if(!r){var i=e.getThisParameter(t);i&&(n=[R(i)])}if(e.isSetAccessorDeclaration(t)){var a=void 0;if(!r){var o=e.getSetAccessorValueParameter(t);if(o)a=R(o,void 0,ae(t,N.getAllAccessorDeclarations(t)))}a||(a=e.createParameter(void 0,void 0,void 0,"value")),n=e.append(n,a)}return e.createNodeArray(n||e.emptyArray)}function q(t,r){return e.hasModifier(t,8)?void 0:e.visitNodes(r,Q)}function W(t){return e.isSourceFile(t)||e.isTypeAliasDeclaration(t)||e.isModuleDeclaration(t)||e.isClassDeclaration(t)||e.isInterfaceDeclaration(t)||e.isFunctionLike(t)||e.isIndexSignatureDeclaration(t)||e.isMappedTypeNode(t)}function G(e,t){I(N.isEntityNameVisible(e,t)),w(N.getTypeReferenceDirectivesForEntityName(e))}function H(t,r){return e.hasJSDocNodes(t)&&e.hasJSDocNodes(r)&&(t.jsDoc=r.jsDoc),e.setCommentRange(t,e.getCommentRange(r))}function Y(t,r){if(r){if(S=S||248!==t.kind&&187!==t.kind,e.isStringLiteralLike(r))if(D){var i=e.getExternalModuleNameFromDeclaration(n.getEmitHost(),N,t);if(i)return e.createLiteral(i)}else{var a=N.getSymbolOfExternalModuleSpecifier(r);a&&(p||(p=[])).push(a)}return r}}function X(t){for(;e.length(l);){var r=l.shift();if(!e.isLateVisibilityPaintedStatement(r))return e.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "+(e.SyntaxKind?e.SyntaxKind[r.kind]:r.kind));var n=x;x=r.parent&&e.isSourceFile(r.parent)&&!(e.isExternalModule(r.parent)&&D);var i=ee(r);x=n,_.set(""+e.getOriginalNodeId(r),i)}return e.visitNodes(t,(function(t){if(e.isLateVisibilityPaintedStatement(t)){var r=""+e.getOriginalNodeId(t);if(_.has(r)){var n=_.get(r);return _.delete(r),n&&((e.isArray(n)?e.some(n,e.needsScopeMarker):e.needsScopeMarker(n))&&(T=!0),e.isSourceFile(t.parent)&&(e.isArray(n)?e.some(n,e.isExternalModuleIndicator):e.isExternalModuleIndicator(n))&&(S=!0)),n}}return t}))}function Q(t){if(!re(t)){if(e.isDeclaration(t)){if(J(t))return;if(e.hasDynamicName(t)&&!N.isLateBound(e.getParseTreeNode(t)))return}if(!(e.isFunctionLike(t)&&N.isImplementationOfOverload(t)||e.isSemicolonClassElement(t))){var r;W(t)&&(r=o,o=t);var i=b,a=e.canProduceDiagnostics(t),s=d,c=(172===t.kind||185===t.kind)&&246!==t.parent.kind;if((e.isMethodDeclaration(t)||e.isMethodSignature(t))&&e.hasModifier(t,8)){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations[0]!==t)return;return D(e.createProperty(void 0,ie(t),t.name,void 0,void 0,void 0))}if(a&&!d&&(b=e.createGetSymbolAccessibilityDiagnosticForNode(t)),e.isTypeQueryNode(t)&&G(t.exprName,o),c&&(d=!0),function(e){switch(e.kind){case 165:case 161:case 160:case 162:case 163:case 158:case 157:case 159:case 164:case 166:case 241:case 154:case 215:case 168:case 179:case 169:case 170:case 187:return!0}return!1}(t))switch(t.kind){case 215:(e.isEntityName(t.expression)||e.isEntityNameExpression(t.expression))&&G(t.expression,o);var u=e.visitEachChild(t,Q,n);return D(e.updateExpressionWithTypeArguments(u,e.parenthesizeTypeParameters(u.typeArguments),u.expression));case 168:G(t.typeName,o);u=e.visitEachChild(t,Q,n);return D(e.updateTypeReferenceNode(u,u.typeName,e.parenthesizeTypeParameters(u.typeArguments)));case 165:return D(e.updateConstructSignature(t,q(t,t.typeParameters),U(t,t.parameters),K(t,t.type)));case 161:var l=e.hasModifier(t,8),_=e.createSignatureDeclaration(161,l?void 0:q(t,t.typeParameters),l?void 0:U(t,t.parameters,0),void 0);return _.modifiers=e.createNodeArray(ie(t)),D(_);case 160:var p=e.createSignatureDeclaration(159,q(t,t.typeParameters),U(t,t.parameters),K(t,t.type));return p.name=t.name,p.modifiers=e.createNodeArray(ie(t)),p.questionToken=t.questionToken,D(p);case 162:l=e.hasModifier(t,8);var m=ae(t,N.getAllAccessorDeclarations(t));return D(e.updateGetAccessor(t,void 0,ie(t),t.name,V(t,l),l?void 0:K(t,m),void 0));case 163:return D(e.updateSetAccessor(t,void 0,ie(t),t.name,V(t,e.hasModifier(t,8)),void 0));case 158:return D(e.updateProperty(t,void 0,ie(t),t.name,t.questionToken,e.hasModifier(t,8)?void 0:K(t,t.type),j(t)));case 157:return D(e.updatePropertySignature(t,ie(t),t.name,t.questionToken,e.hasModifier(t,8)?void 0:K(t,t.type),j(t)));case 159:return D(e.updateMethodSignature(t,q(t,t.typeParameters),U(t,t.parameters),K(t,t.type),t.name,t.questionToken));case 164:return D(e.updateCallSignature(t,q(t,t.typeParameters),U(t,t.parameters),K(t,t.type)));case 166:return D(e.updateIndexSignature(t,void 0,ie(t),U(t,t.parameters),e.visitNode(t.type,Q)||e.createKeywordTypeNode(124)));case 241:return e.isBindingPattern(t.name)?te(t.name):(c=!0,d=!0,D(e.updateVariableDeclaration(t,t.name,K(t,t.type),j(t))));case 154:return function(t){return 160===t.parent.kind&&e.hasModifier(t.parent,8)}(t)&&(t.default||t.constraint)?D(e.updateTypeParameterDeclaration(t,t.name,void 0,void 0)):D(e.visitEachChild(t,Q,n));case 179:var g=e.visitNode(t.checkType,Q),y=e.visitNode(t.extendsType,Q),h=o;o=t.trueType;var v=e.visitNode(t.trueType,Q);o=h;var x=e.visitNode(t.falseType,Q);return D(e.updateConditionalTypeNode(t,g,y,v,x));case 169:return D(e.updateFunctionTypeNode(t,e.visitNodes(t.typeParameters,Q),U(t,t.parameters),e.visitNode(t.type,Q)));case 170:return D(e.updateConstructorTypeNode(t,e.visitNodes(t.typeParameters,Q),U(t,t.parameters),e.visitNode(t.type,Q)));case 187:return e.isLiteralImportTypeNode(t)?D(e.updateImportTypeNode(t,e.updateLiteralTypeNode(t.argument,Y(t,t.argument.literal)),t.qualifier,e.visitNodes(t.typeArguments,Q,e.isTypeNode),t.isTypeOf)):D(t);default:e.Debug.assertNever(t,"Attempted to process unhandled node kind: "+e.SyntaxKind[t.kind])}return D(e.visitEachChild(t,Q,n))}}function D(n){return n&&a&&e.hasDynamicName(t)&&function(t){var r;d||(r=b,b=e.createGetSymbolAccessibilityDiagnosticForNodeName(t));f=t.name,e.Debug.assert(N.isLateBound(e.getParseTreeNode(t))),G(t.name.expression,o),d||(b=r);f=void 0}(t),W(t)&&(o=r),a&&!d&&(b=i),c&&(d=s),n===t?n:n&&e.setOriginalNode(H(n,t),t)}}function $(t){if(function(e){switch(e.kind){case 243:case 248:case 252:case 245:case 244:case 246:case 247:case 224:case 253:case 259:case 258:return!0}return!1}(t)&&!re(t)){switch(t.kind){case 259:return e.isSourceFile(t.parent)&&(S=!0),E=!0,e.updateExportDeclaration(t,void 0,t.modifiers,t.exportClause,Y(t,t.moduleSpecifier));case 258:if(e.isSourceFile(t.parent)&&(S=!0),E=!0,75===t.expression.kind)return t;var r=e.createOptimisticUniqueName("_default");b=function(){return{diagnosticMessage:e.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:t}};var n=e.createVariableDeclaration(r,N.createTypeOfExpression(t.expression,t,a,k),void 0);return[e.createVariableStatement(x?[e.createModifier(129)]:[],e.createVariableDeclarationList([n],2)),e.updateExportAssignment(t,t.decorators,t.modifiers,r)]}var i=ee(t);return _.set(""+e.getOriginalNodeId(t),i),t}}function Z(t){if(e.isImportEqualsDeclaration(t)||e.hasModifier(t,512))return t;var r=e.getMutableClone(t),n=e.createModifiersFromModifierFlags(3070&e.getModifierFlags(t));return r.modifiers=n.length?e.createNodeArray(n):void 0,r}function ee(r){if(!re(r)){switch(r.kind){case 252:return function(t){if(N.isDeclarationVisible(t)){if(263===t.moduleReference.kind){var r=e.getExternalModuleImportEqualsDeclarationExpression(t);return e.updateImportEqualsDeclaration(t,void 0,t.modifiers,t.name,e.updateExternalModuleReference(t.moduleReference,Y(t,r)))}var n=b;return b=e.createGetSymbolAccessibilityDiagnosticForNode(t),G(t.moduleReference,o),b=n,t}}(r);case 253:return function(t){if(!t.importClause)return e.updateImportDeclaration(t,void 0,t.modifiers,t.importClause,Y(t,t.moduleSpecifier));var r=t.importClause&&t.importClause.name&&N.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return r&&e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,void 0),Y(t,t.moduleSpecifier));if(255===t.importClause.namedBindings.kind){var n=N.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return r||n?e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,n),Y(t,t.moduleSpecifier)):void 0}var i=e.mapDefined(t.importClause.namedBindings.elements,(function(e){return N.isDeclarationVisible(e)?e:void 0}));return i&&i.length||r?e.updateImportDeclaration(t,void 0,t.modifiers,e.updateImportClause(t.importClause,r,i&&i.length?e.updateNamedImports(t.importClause.namedBindings,i):void 0),Y(t,t.moduleSpecifier)):void 0}(r)}if(!(e.isDeclaration(r)&&J(r)||e.isFunctionLike(r)&&N.isImplementationOfOverload(r))){var n;W(r)&&(n=o,o=r);var i=e.canProduceDiagnostics(r),s=b;i&&(b=e.createGetSymbolAccessibilityDiagnosticForNode(r));var c=x;switch(r.kind){case 246:return ce(e.updateTypeAliasDeclaration(r,void 0,ie(r),r.name,e.visitNodes(r.typeParameters,Q,e.isTypeParameterDeclaration),e.visitNode(r.type,Q,e.isTypeNode)));case 245:return ce(e.updateInterfaceDeclaration(r,void 0,ie(r),r.name,q(r,r.typeParameters),oe(r.heritageClauses),e.visitNodes(r.members,Q)));case 243:var u=ce(e.updateFunctionDeclaration(r,void 0,ie(r),void 0,r.name,q(r,r.typeParameters),U(r,r.parameters),K(r,r.type),void 0));if(u&&N.isExpandoFunctionDeclaration(r)){var l=N.getPropertiesOfContainerFunction(r),d=e.createModuleDeclaration(void 0,void 0,u.name||e.createIdentifier("_default"),e.createModuleBlock([]),16);d.flags^=8,d.parent=o,d.locals=e.createSymbolTable(l),d.symbol=l[0].parent;var p=e.mapDefined(l,(function(t){if(e.isPropertyAccessExpression(t.valueDeclaration)){b=e.createGetSymbolAccessibilityDiagnosticForNode(t.valueDeclaration);var r=N.createTypeOfDeclaration(t.valueDeclaration,d,a,k);b=s;var n=e.createVariableDeclaration(e.unescapeLeadingUnderscores(t.escapedName),r,void 0);return e.createVariableStatement(void 0,e.createVariableDeclarationList([n]))}})),f=e.createModuleDeclaration(void 0,ie(r),r.name,e.createModuleBlock(p),16);if(!e.hasModifier(u,512))return[u,f];var m=e.createModifiersFromModifierFlags(-514&e.getModifierFlags(u)|2),g=e.updateFunctionDeclaration(u,void 0,m,void 0,u.name,u.typeParameters,u.parameters,u.type,void 0),y=e.updateModuleDeclaration(f,void 0,m,f.name,f.body),h=e.createExportAssignment(void 0,void 0,!1,f.name);return e.isSourceFile(r.parent)&&(S=!0),E=!0,[g,y,h]}return u;case 248:x=!1;var v=r.body;if(v&&249===v.kind){var D=T,C=E;E=!1,T=!1;var A=X(e.visitNodes(v.statements,$));8388608&r.flags&&(T=!1),e.isGlobalScopeAugmentation(r)||function(t){return e.some(t,ne)}(A)||E||(A=T?e.createNodeArray(t(A,[e.createEmptyExports()])):e.visitNodes(A,Z));var F=e.updateModuleBlock(v,A);x=c,T=D,E=C;var P=ie(r);return ce(e.updateModuleDeclaration(r,void 0,P,e.isExternalModuleAugmentation(r)?Y(r,r.name):r.name,F))}x=c;P=ie(r);x=!1,e.visitNode(v,$);var w=""+e.getOriginalNodeId(v);F=_.get(w);return _.delete(w),ce(e.updateModuleDeclaration(r,void 0,P,r.name,F));case 244:m=e.createNodeArray(ie(r));var I=q(r,r.typeParameters),O=e.getFirstConstructorWithBody(r),M=void 0;if(O){var L=b;M=e.compact(e.flatMap(O.parameters,(function(t){if(e.hasModifier(t,92)&&!re(t))return b=e.createGetSymbolAccessibilityDiagnosticForNode(t),75===t.name.kind?H(e.createProperty(void 0,ie(t),t.name,t.questionToken,K(t,t.type),j(t)),t):function r(n){var i;for(var a=0,o=n.elements;a<o.length;a++){var s=o[a];e.isOmittedExpression(s)||(e.isBindingPattern(s.name)&&(i=e.concatenate(i,r(s.name))),(i=i||[]).push(e.createProperty(void 0,ie(t),s.name,void 0,K(s,void 0),void 0)))}return i}(t.name)}))),b=L}var R=e.createNodeArray(e.concatenate(M,e.visitNodes(r.members,Q))),B=e.getEffectiveBaseTypeNode(r);if(B&&!e.isEntityNameExpression(B.expression)&&99!==B.expression.kind){var V=r.name?e.unescapeLeadingUnderscores(r.name.escapedText):"default",ee=e.createOptimisticUniqueName(V+"_base");b=function(){return{diagnosticMessage:e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:B,typeName:r.name}};var te=e.createVariableDeclaration(ee,N.createTypeOfExpression(B.expression,r,a,k),void 0),ae=e.createVariableStatement(x?[e.createModifier(129)]:[],e.createVariableDeclarationList([te],2)),se=e.createNodeArray(e.map(r.heritageClauses,(function(t){if(89===t.token){var r=b;b=e.createGetSymbolAccessibilityDiagnosticForNode(t.types[0]);var n=e.updateHeritageClause(t,e.map(t.types,(function(t){return e.updateExpressionWithTypeArguments(t,e.visitNodes(t.typeArguments,Q),ee)})));return b=r,n}return e.updateHeritageClause(t,e.visitNodes(e.createNodeArray(e.filter(t.types,(function(t){return e.isEntityNameExpression(t.expression)||99===t.expression.kind}))),Q))})));return[ae,ce(e.updateClassDeclaration(r,void 0,m,r.name,I,se,R))]}se=oe(r.heritageClauses);return ce(e.updateClassDeclaration(r,void 0,m,r.name,I,se,R));case 224:return ce(function(t){if(!e.forEach(t.declarationList.declarations,z))return;var r=e.visitNodes(t.declarationList.declarations,Q);if(!e.length(r))return;return e.updateVariableStatement(t,e.createNodeArray(ie(t)),e.updateVariableDeclarationList(t.declarationList,r))}(r));case 247:return ce(e.updateEnumDeclaration(r,void 0,e.createNodeArray(ie(r)),r.name,e.createNodeArray(e.mapDefined(r.members,(function(t){if(!re(t)){var r=N.getConstantValue(t);return H(e.updateEnumMember(t,t.name,void 0!==r?e.createLiteral(r):void 0),t)}})))))}return e.Debug.assertNever(r,"Unhandled top-level node in declaration emit: "+e.SyntaxKind[r.kind])}}function ce(t){return W(r)&&(o=n),i&&(b=s),248===r.kind&&(x=c),t===r?t:t&&e.setOriginalNode(H(t,r),r)}}function te(t){return e.flatten(e.mapDefined(t.elements,(function(t){return function(t){if(214===t.kind)return;if(t.name){if(!z(t))return;return e.isBindingPattern(t.name)?te(t.name):e.createVariableDeclaration(t.name,K(t,void 0),void 0)}}(t)})))}function re(e){return!!P&&!!e&&i(e,m)}function ne(t){return e.isExportAssignment(t)||e.isExportDeclaration(t)}function ie(t){var r=e.getModifierFlags(t),n=function(t){var r=2811,n=x&&!function(e){if(245===e.kind)return!0;return!1}(t)?2:0,i=288===t.parent.kind;(!i||D&&i&&e.isExternalModule(t.parent))&&(r^=2,n=0);return s(t,r,n)}(t);return r===n?t.modifiers:e.createModifiersFromModifierFlags(n)}function ae(t,r){var n=c(t);return n||t===r.firstAccessor||(n=c(r.firstAccessor),b=e.createGetSymbolAccessibilityDiagnosticForNode(r.firstAccessor)),!n&&r.secondAccessor&&t!==r.secondAccessor&&(n=c(r.secondAccessor),b=e.createGetSymbolAccessibilityDiagnosticForNode(r.secondAccessor)),n}function oe(t){return e.createNodeArray(e.filter(e.map(t,(function(t){return e.updateHeritageClause(t,e.visitNodes(e.createNodeArray(e.filter(t.types,(function(r){return e.isEntityNameExpression(r.expression)||89===t.token&&99===r.expression.kind}))),Q))})),(function(e){return e.types&&!!e.types.length})))}}function s(t,r,n){void 0===r&&(r=3067),void 0===n&&(n=0);var i=e.getModifierFlags(t)&r|n;return 512&i&&!(1&i)&&(i^=1),512&i&&2&i&&(i^=2),i}function c(e){if(e)return 162===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}e.transformDeclarations=o}(s||(s={})),function(e){var r,n;function i(t,r,n){if(n)return e.emptyArray;var i=t.jsx,a=e.getEmitScriptTarget(t),o=e.getEmitModuleKind(t),c=[];return e.addRange(c,r&&e.map(r.before,s)),c.push(e.transformTypeScript),c.push(e.transformClassFields),2===i&&c.push(e.transformJsx),a<99&&c.push(e.transformESNext),a<6&&c.push(e.transformES2019),a<5&&c.push(e.transformES2018),a<4&&c.push(e.transformES2017),a<3&&c.push(e.transformES2016),a<2&&(c.push(e.transformES2015),c.push(e.transformGenerators)),c.push(function(t){switch(t){case e.ModuleKind.ESNext:case e.ModuleKind.ES2015:return e.transformES2015Module;case e.ModuleKind.System:return e.transformSystemModule;default:return e.transformModule}}(o)),a<1&&c.push(e.transformES5),e.addRange(c,r&&e.map(r.after,s)),c}function a(t){var r=[];return r.push(e.transformDeclarations),e.addRange(r,t&&e.map(t.afterDeclarations,c)),r}function o(t,r){return function(n){var i=t(n);return"function"==typeof i?r(i):function(t){return function(r){return e.isBundle(r)?t.transformBundle(r):t.transformSourceFile(r)}}(i)}}function s(t){return o(t,e.chainBundle)}function c(t){return o(t,e.identity)}function u(e,t){return t}function l(e,t,r){r(e,t)}!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Completed=2]="Completed",e[e.Disposed=3]="Disposed"}(r||(r={})),function(e){e[e.Substitution=1]="Substitution",e[e.EmitNotifications=2]="EmitNotifications"}(n||(n={})),e.noTransformers={scriptTransformers:e.emptyArray,declarationTransformers:e.emptyArray},e.getTransformers=function(e,t,r){return{scriptTransformers:i(e,t,r),declarationTransformers:a(t)}},e.noEmitSubstitution=u,e.noEmitNotification=l,e.transformNodes=function(r,n,i,a,o,s){for(var c,_,d,p=new Array(324),f=[],m=[],g=0,y=!1,h=u,v=l,b=0,x=[],D={getCompilerOptions:function(){return i},getEmitResolver:function(){return r},getEmitHost:function(){return n},startLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is suspended."),f[g]=c,m[g]=_,g++,c=void 0,_=void 0},suspendLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is already suspended."),y=!0},resumeLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(y,"Lexical environment is not suspended."),y=!1},endLexicalEnvironment:function(){var r;if(e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is suspended."),(c||_)&&(_&&(r=t(_)),c)){var n=e.createVariableStatement(void 0,e.createVariableDeclarationList(c));e.setEmitFlags(n,1048576),r?r.push(n):r=[n]}c=f[--g],_=m[g],0===g&&(f=[],m=[]);return r},hoistVariableDeclaration:function(t){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed.");var r=e.setEmitFlags(e.createVariableDeclaration(t),64);c?c.push(r):c=[r]},hoistFunctionDeclaration:function(t){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),_?_.push(t):_=[t]},requestEmitHelper:function(t){e.Debug.assert(b>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!t.scoped,"Cannot request a scoped emit helper."),d=e.append(d,t)},readEmitHelpers:function(){e.Debug.assert(b>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed.");var t=d;return d=void 0,t},enableSubstitution:function(t){e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),p[t]|=1},enableEmitNotification:function(t){e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),p[t]|=2},isSubstitutionEnabled:A,isEmitNotificationEnabled:F,get onSubstituteNode(){return h},set onSubstituteNode(t){e.Debug.assert(b<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),h=t},get onEmitNode(){return v},set onEmitNode(t){e.Debug.assert(b<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),v=t},addDiagnostic:function(e){x.push(e)}},S=0,T=a;S<T.length;S++){var E=T[S];e.disposeEmitNodes(e.getSourceFileOfNode(e.getParseTreeNode(E)))}e.performance.mark("beforeTransform");var C=o.map((function(e){return e(D)})),k=function(e){for(var t=0,r=C;t<r.length;t++){e=(0,r[t])(e)}return e};b=1;var N=e.map(a,s?k:function(t){return!t||e.isSourceFile(t)&&t.isDeclarationFile?t:k(t)});return b=2,e.performance.mark("afterTransform"),e.performance.measure("transformTime","beforeTransform","afterTransform"),{transformed:N,substituteNode:function(t,r){return e.Debug.assert(b<3,"Cannot substitute a node after the result is disposed."),r&&A(r)&&h(t,r)||r},emitNodeWithNotification:function(t,r,n){e.Debug.assert(b<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),r&&(F(r)?v(t,r,n):n(t,r))},dispose:function(){if(b<3){for(var t=0,r=a;t<r.length;t++){var n=r[t];e.disposeEmitNodes(e.getSourceFileOfNode(e.getParseTreeNode(n)))}c=void 0,f=void 0,_=void 0,m=void 0,h=void 0,v=void 0,d=void 0,b=3}},diagnostics:x};function A(t){return 0!=(1&p[t.kind])&&0==(4&e.getEmitFlags(t))}function F(t){return 0!=(2&p[t.kind])||0!=(2&e.getEmitFlags(t))}}}(s||(s={})),function(e){var r,n,i=function(){var e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}(),a={pos:-1,end:-1};function o(t,r,n,i,a,o){void 0===i&&(i=!1);var c=e.isArray(n)?n:e.getSourceFilesToEmit(t,n),l=t.getCompilerOptions();if(l.outFile||l.out){var _=t.getPrependNodes();if(c.length||_.length){var d=e.createBundle(c,_);if(m=r(u(d,t,i),d))return m}}else{if(!a)for(var p=0,f=c;p<f.length;p++){var m,g=f[p];if(m=r(u(g,t,i),g))return m}if(o){var y=s(t.getCompilerOptions());if(y)return r({buildInfoPath:y},void 0)}}}function s(t){var r=t.configFilePath;if(e.isIncrementalCompilation(t)){if(t.tsBuildInfoFile)return t.tsBuildInfoFile;var n,i=t.outFile||t.out;if(i)n=e.removeFileExtension(i);else{if(!r)return;var a=e.removeFileExtension(r);n=t.outDir?t.rootDir?e.resolvePath(t.outDir,e.getRelativePathFromDirectory(t.rootDir,a,!0)):e.combinePaths(t.outDir,e.getBaseFileName(a)):a}return n+".tsbuildinfo"}}function c(t,r){var n=t.outFile||t.out,i=t.emitDeclarationOnly?void 0:n,a=i&&l(i,t),o=r||e.getEmitDeclarations(t)?e.removeFileExtension(n)+".d.ts":void 0;return{jsFilePath:i,sourceMapFilePath:a,declarationFilePath:o,declarationMapPath:o&&e.getAreDeclarationMapsEnabled(t)?o+".map":void 0,buildInfoPath:s(t)}}function u(t,r,n){var i=r.getCompilerOptions();if(289===t.kind)return c(i,n);var a=e.getOwnEmitOutputFilePath(t.fileName,r,_(t,i)),o=e.isJsonSourceFile(t)&&0===e.comparePaths(t.fileName,a,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames()),s=i.emitDeclarationOnly||o?void 0:a,u=!s||e.isJsonSourceFile(t)?void 0:l(s,i),d=n||e.getEmitDeclarations(i)?e.getDeclarationEmitOutputFilePath(t.fileName,r):void 0;return{jsFilePath:s,sourceMapFilePath:u,declarationFilePath:d,declarationMapPath:d&&e.getAreDeclarationMapsEnabled(i)?d+".map":void 0,buildInfoPath:void 0}}function l(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function _(t,r){if(e.isJsonSourceFile(t))return".json";if(1===r.jsx)if(e.isSourceFileJS(t)){if(e.fileExtensionIs(t.fileName,".jsx"))return".jsx"}else if(1===t.languageVariant)return".jsx";return".js"}function d(t,r,n,i){return i?e.resolvePath(i,e.getRelativePathFromDirectory(function(t){return t.options.rootDir||e.getDirectoryPath(e.Debug.assertDefined(t.options.configFilePath))}(r),t,n)):t}function p(t,r,n){return e.Debug.assert(!e.fileExtensionIs(t,".d.ts")),e.changeExtension(d(t,r,n,r.options.declarationDir||r.options.outDir),".d.ts")}function f(t,r,n){if(!r.options.emitDeclarationOnly){var i=e.fileExtensionIs(t,".json"),a=e.changeExtension(d(t,r,n,r.options.outDir),i?".json":e.fileExtensionIs(t,".tsx")&&1===r.options.jsx?".jsx":".js");return i&&0===e.comparePaths(t,a,e.Debug.assertDefined(r.options.configFilePath),n)?void 0:a}}function m(){var t;return{addOutput:function(e){e&&(t||(t=[])).push(e)},getOutputs:function(){return t||e.emptyArray}}}function g(e,t){var r=c(e.options,!1),n=r.jsFilePath,i=r.sourceMapFilePath,a=r.declarationFilePath,o=r.declarationMapPath,s=r.buildInfoPath;t(n),t(i),t(a),t(o),t(s)}function y(t,r,n,i){if(!e.fileExtensionIs(r,".d.ts")){var a=f(r,t,n);if(i(a),!e.fileExtensionIs(r,".json")&&(a&&t.options.sourceMap&&i(a+".map"),e.getEmitDeclarations(t.options))){var o=p(r,t,n);i(o),t.options.declarationMap&&i(o+".map")}}}function h(t,r,n,i,a,s,c){var u,l,_=i.scriptTransformers,d=i.declarationTransformers,p=r.getCompilerOptions(),f=p.sourceMap||p.inlineSourceMap||e.getAreDeclarationMapsEnabled(p)?[]:void 0,m=p.listEmittedFiles?[]:void 0,g=e.createDiagnosticCollection(),y=e.getNewLineCharacter(p,(function(){return r.getNewLine()})),h=e.createTextWriter(y),b=e.performance.createTimer("printTime","beforePrint","afterPrint"),D=b.enter,S=b.exit,T=!1;return D(),o(r,(function(i,o){var s,f=i.jsFilePath,y=i.sourceMapFilePath,h=i.declarationFilePath,b=i.declarationMapPath,D=i.buildInfoPath;D&&o&&e.isBundle(o)&&(s=e.getDirectoryPath(e.getNormalizedAbsolutePath(D,r.getCurrentDirectory())),u={commonSourceDirectory:S(r.getCommonSourceDirectory()),sourceFiles:o.sourceFiles.map((function(t){return S(e.getNormalizedAbsolutePath(t.fileName,r.getCurrentDirectory()))}))});(function(n,i,o,s){if(!n||a||!i)return;if(i&&r.isEmitBlocked(i)||p.noEmit)return void(T=!0);var c=e.transformNodes(t,r,p,[n],_,!1),l=x({removeComments:p.removeComments,newLine:p.newLine,noEmitHelpers:p.noEmitHelpers,module:p.module,target:p.target,sourceMap:p.sourceMap,inlineSourceMap:p.inlineSourceMap,inlineSources:p.inlineSources,extendedDiagnostics:p.extendedDiagnostics,writeBundleFileInfo:!!u,relativeToBuildInfo:s},{hasGlobalName:t.hasGlobalName,onEmitNode:c.emitNodeWithNotification,substituteNode:c.substituteNode});e.Debug.assert(1===c.transformed.length,"Should only see one output from the transform"),C(i,o,c.transformed[0],l,p),c.dispose(),u&&(u.js=l.bundleFileInfo)})(o,f,y,S),function(n,i,o,s){if(!n)return;if(!i)return void((a||p.emitDeclarationOnly)&&(T=!0));var _=e.isSourceFile(n)?[n]:n.sourceFiles,f=p.outFile||p.out?[e.createBundle(_,e.isSourceFile(n)?void 0:n.prepends)]:_;a&&!e.getEmitDeclarations(p)&&_.forEach(E);var m=e.transformNodes(t,r,p,f,d,!1);if(e.length(m.diagnostics))for(var y=0,h=m.diagnostics;y<h.length;y++){var v=h[y];g.add(v)}var b=x({removeComments:p.removeComments,newLine:p.newLine,noEmitHelpers:!0,module:p.module,target:p.target,sourceMap:p.sourceMap,inlineSourceMap:p.inlineSourceMap,extendedDiagnostics:p.extendedDiagnostics,onlyPrintJsDocStyle:!0,writeBundleFileInfo:!!u,recordInternalSection:!!u,relativeToBuildInfo:s},{hasGlobalName:t.hasGlobalName,onEmitNode:m.emitNodeWithNotification,substituteNode:m.substituteNode}),D=!!m.diagnostics&&!!m.diagnostics.length||!!r.isEmitBlocked(i)||!!p.noEmit;if(T=T||D,(!D||c)&&(e.Debug.assert(1===m.transformed.length,"Should only see one output from the decl transform"),C(i,o,m.transformed[0],b,{sourceMap:p.declarationMap,sourceRoot:p.sourceRoot,mapRoot:p.mapRoot,extendedDiagnostics:p.extendedDiagnostics}),c&&288===m.transformed[0].kind)){var S=m.transformed[0];l=S.exportedModulesFromDeclarationEmit}m.dispose(),u&&(u.dts=b.bundleFileInfo)}(o,h,b,S),function(t,i){if(!i||n||T)return;var a=r.getProgramBuildInfo();if(r.isEmitBlocked(i)||p.noEmit)return void(T=!0);e.writeFile(r,g,i,v({bundle:t,program:a,version:e.version}),!1)}(u,D),!T&&m&&(a||(f&&m.push(f),y&&m.push(y),D&&m.push(D)),h&&m.push(h),b&&m.push(b));function S(t){return e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(s,t,r.getCanonicalFileName))}}),e.getSourceFilesToEmit(r,n),c,s,!n),S(),{emitSkipped:T,diagnostics:g.getDiagnostics(),emittedFiles:m,sourceMaps:f,exportedModulesFromDeclarationEmit:l};function E(r){e.isExportAssignment(r)?75===r.expression.kind&&t.collectLinkedAliases(r.expression,!0):e.isExportSpecifier(r)?t.collectLinkedAliases(r.propertyName||r.name,!0):e.forEachChild(r,E)}function C(t,n,i,a,o){var s,c=289===i.kind?i:void 0,u=288===i.kind?i:void 0,l=c?c.sourceFiles:[u];if(function(t,r){return(t.sourceMap||t.inlineSourceMap)&&(288!==r.kind||!e.fileExtensionIs(r.fileName,".json"))}(o,i)&&(s=e.createSourceMapGenerator(r,e.getBaseFileName(e.normalizeSlashes(t)),function(t){var r=e.normalizeSlashes(t.sourceRoot||"");return r?e.ensureTrailingDirectorySeparator(r):r}(o),function(t,n,i){if(t.sourceRoot)return r.getCommonSourceDirectory();if(t.mapRoot){var a=e.normalizeSlashes(t.mapRoot);return i&&(a=e.getDirectoryPath(e.getSourceFilePathInNewDir(i.fileName,r,a))),0===e.getRootLength(a)&&(a=e.combinePaths(r.getCommonSourceDirectory(),a)),a}return e.getDirectoryPath(e.normalizePath(n))}(o,t,u),o)),c?a.writeBundle(c,h,s):a.writeFile(u,h,s),s){f&&f.push({inputSourceFileNames:s.getSources(),sourceMap:s.toJSON()});var _=function(t,n,i,a,o){if(t.inlineSourceMap){var s=n.toString();return"data:application/json;base64,"+e.base64encode(e.sys,s)}var c=e.getBaseFileName(e.normalizeSlashes(e.Debug.assertDefined(a)));if(t.mapRoot){var u=e.normalizeSlashes(t.mapRoot);return o&&(u=e.getDirectoryPath(e.getSourceFilePathInNewDir(o.fileName,r,u))),0===e.getRootLength(u)?(u=e.combinePaths(r.getCommonSourceDirectory(),u),e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizePath(i)),e.combinePaths(u,c),r.getCurrentDirectory(),r.getCanonicalFileName,!0)):e.combinePaths(u,c)}return c}(o,s,t,n,u);if(_&&(h.isAtStartOfLine()||h.rawWrite(y),h.writeComment("//# sourceMappingURL="+_)),n){var d=s.toString();e.writeFile(r,g,n,d,!1,l)}}else h.writeLine();e.writeFile(r,g,t,h.getText(),!!p.emitBOM,l),h.clear()}}function v(e){return JSON.stringify(e,void 0,2)}function b(e){return JSON.parse(e)}function x(t,r){void 0===t&&(t={}),void 0===r&&(r={});var n,o,s,c,u,l,_,d,p,f,m,g,y,h,v,b,x,D=r.hasGlobalName,S=r.onEmitNode,T=void 0===S?e.noEmitNotification:S,E=r.substituteNode,C=void 0===E?e.noEmitSubstitution:E,k=r.onBeforeEmitNodeArray,N=r.onAfterEmitNodeArray,A=r.onBeforeEmitToken,F=r.onAfterEmitToken,P=!!t.extendedDiagnostics,w=e.getNewLineCharacter(t),I=e.getEmitModuleKind(t),O=e.createMap(),M=function(e){p.write(e)},L=t.writeBundleFileInfo?{sections:[]}:void 0,R=L?e.Debug.assertDefined(t.relativeToBuildInfo):void 0,B=t.recordInternalSection,j=0,K="text",J=!0,z=-1,U=-1,V=-1,q=-1,W=!1,G=!!t.removeComments,H=e.performance.createTimerIf(P,"commentTime","beforeComment","afterComment"),Y=H.enter,X=H.exit;return pe(),{printNode:function(t,r,n){switch(t){case 0:e.Debug.assert(e.isSourceFile(r),"Expected a SourceFile node.");break;case 2:e.Debug.assert(e.isIdentifier(r),"Expected an Identifier node.");break;case 1:e.Debug.assert(e.isExpression(r),"Expected an Expression node.")}switch(r.kind){case 288:return $(r);case 289:return Q(r);case 290:return function(e,t){var r=p;de(t,void 0),le(4,e,void 0),pe(),p=r}(r,ce()),ue()}return Z(t,r,n,ce()),ue()},printList:function(e,t,r){return ee(e,t,r,ce()),ue()},printFile:$,printBundle:Q,writeNode:Z,writeList:ee,writeFile:se,writeBundle:oe,bundleFileInfo:L};function Q(e){return oe(e,ce(),void 0),ue()}function $(e){return se(e,ce(),void 0),ue()}function Z(e,t,r,n){var i=p;de(n,void 0),le(e,t,r),pe(),p=i}function ee(e,t,r,n){var i=p;de(n,void 0),r&&_e(r),gt(a,t,e),pe(),p=i}function te(){return p.getTextPosWithWriteLine?p.getTextPosWithWriteLine():p.getTextPos()}function re(t,r,n){var i=e.lastOrUndefined(L.sections);i&&i.kind===n?i.end=r:L.sections.push({pos:t,end:r,kind:n})}function ne(t){if(B&&L&&n&&(e.isDeclaration(t)||e.isVariableStatement(t))&&e.isInternalDeclaration(t,n)&&"internal"!==K){var r=K;return ae(p.getTextPos()),j=te(),K="internal",r}}function ie(e){e&&(ae(p.getTextPos()),j=te(),K=e)}function ae(e){return j<e&&(re(j,e,K),!0)}function oe(r,n,i){var a;m=!1;var o=p;de(n,i),nt(r),rt(r),Te(r),function(t){$e(!!t.hasNoDefaultLib,t.syntheticFileReferences||[],t.syntheticTypeReferences||[],t.syntheticLibReferences||[]);for(var r=0,n=t.prepends;r<n.length;r++){var i=n[r];if(e.isUnparsedSource(i)&&i.syntheticReferences)for(var a=0,o=i.syntheticReferences;a<o.length;a++){me(o[a]),At()}}}(r);for(var s=0,c=r.prepends;s<c.length;s++){var u=c[s];At();var l=p.getTextPos(),_=L&&L.sections;if(_&&(L.sections=[]),le(4,u,void 0),L){var d=L.sections;L.sections=_,u.oldFileOfCurrentEmit?(a=L.sections).push.apply(a,d):(d.forEach((function(t){return e.Debug.assert(e.isBundleFileTextLike(t))})),L.sections.push({pos:l,end:p.getTextPos(),kind:"prepend",data:R(u.fileName),texts:d}))}}j=te();for(var f=0,g=r.sourceFiles;f<g.length;f++){var y=g[f];le(0,y,y)}if(L&&r.sourceFiles.length&&ae(p.getTextPos())){var h=function(t){for(var r,n=e.createMap(),i=0;i<t.sourceFiles.length;i++){for(var a=t.sourceFiles[i],o=void 0,s=0,c=0,u=a.statements;c<u.length;c++){var l=u[c];if(!e.isPrologueDirective(l))break;n.has(l.expression.text)||(n.set(l.expression.text,!0),(o||(o=[])).push({pos:l.pos,end:l.end,expression:{pos:l.expression.pos,end:l.expression.end,text:l.expression.text}}),s=s<l.end?l.end:s)}o&&(r||(r=[])).push({file:i,text:a.text.substring(0,s),directives:o})}return r}(r);h&&(L.sources||(L.sources={}),L.sources.prologues=h);var v=function(r){var n;if(I===e.ModuleKind.None||t.noEmitHelpers)return;for(var i=e.createMap(),a=0,o=r.sourceFiles;a<o.length;a++){var s=o[a],c=void 0!==e.getExternalHelpersModuleName(s),u=Ee(s);if(u)for(var l=0,_=u;l<_.length;l++){var d=_[l];d.scoped||c||i.get(d.name)||(i.set(d.name,!0),(n||(n=[])).push(d.name))}}return n}(r);v&&(L.sources||(L.sources={}),L.sources.helpers=v)}pe(),p=o}function se(e,t,r){m=!0;var n=p;de(t,r),nt(e),rt(e),le(0,e,e),pe(),p=n}function ce(){return f||(f=e.createTextWriter(w))}function ue(){var e=f.getText();return f.clear(),e}function le(e,t,r){r&&_e(r),he(e,t)}function _e(e){n=e,h=void 0,v=void 0,e&&kr(e)}function de(r,n){r&&t.omitTrailingSemicolon&&(r=e.getTrailingSemicolonDeferringWriter(r)),g=n,J=!(p=r)||!g}function pe(){o=[],s=[],c=e.createMap(),u=[],l=0,_=[],n=void 0,h=void 0,v=void 0,b=void 0,x=void 0,de(void 0,void 0)}function fe(){return h||(h=e.getLineStarts(n))}function me(e){if(void 0!==e){var t=ne(e),r=he(4,e);return ie(t),r}}function ge(e){if(void 0!==e)return he(2,e)}function ye(e){if(void 0!==e)return he(1,e)}function he(t,r){var n=b,i=x;b=r,x=void 0,ve(0,r)(t,r),e.Debug.assert(b===r);var a=x;return b=n,x=i,a||r}function ve(t,r){switch(t){case 0:if(T!==e.noEmitNotification)return xe;case 1:if(C!==e.noEmitSubstitution)return Se;case 2:if(!G&&288!==r.kind)return sr;case 3:if(!J&&288!==r.kind&&!e.isInJsonFile(r))return Sr;case 4:return De;default:return e.Debug.assertNever(t)}}function be(e,t){return ve(e+1,t)}function xe(t,r){e.Debug.assert(b===r);var n=be(0,r);T(t,r,n),e.Debug.assert(b===r)}function De(t,r){if(e.Debug.assert(b===r||x===r),0===t)return function(t){At();var r=t.statements;if(_r){if(0===r.length||!e.isPrologueDirective(r[0])||e.nodeIsSynthesized(r[0]))return void _r(t,r,Ze)}Ze(t)}(e.cast(r,e.isSourceFile));if(2===t)return Ne(e.cast(r,e.isIdentifier));if(3===t)return function(e){me(e.name),kt(),St("in"),kt(),me(e.constraint)}(e.cast(r,e.isTypeParameterDeclaration));if(5===t)return e.Debug.assertNode(r,e.isEmptyStatement),Pe(!0);if(4===t){if(e.isKeyword(r.kind))return It(r,St);switch(r.kind){case 15:case 16:case 17:return Ce(r);case 290:case 284:return function(e){for(var t=0,r=e.texts;t<r.length;t++){var n=r[t];At(),me(n)}}(r);case 283:return ke(r);case 285:case 286:return o=r,s=te(),ke(o),void(L&&re(s,p.getTextPos(),285===o.kind?"text":"internal"));case 287:return function(t){var r=te();if(ke(t),L){var n=e.clone(t.section);n.pos=r,n.end=p.getTextPos(),L.sections.push(n)}}(r);case 75:return Ne(r);case 152:return function(e){(function(e){75===e.kind?ye(e):me(e)})(e.left),xt("."),me(e.right)}(r);case 153:return function(e){xt("["),ye(e.expression),xt("]")}(r);case 154:return function(e){me(e.name),e.constraint&&(kt(),St("extends"),kt(),me(e.constraint));e.default&&(kt(),Tt("="),kt(),me(e.default))}(r);case 155:return function(e){_t(e,e.decorators),at(e,e.modifiers),me(e.dotDotDotToken),it(e.name,Et),me(e.questionToken),e.parent&&298===e.parent.kind&&!e.name?me(e.type):ot(e.type);st(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.decorators?e.decorators.end:e.pos,e)}(r);case 156:return a=r,xt("@"),void ye(a.expression);case 157:return function(e){_t(e,e.decorators),at(e,e.modifiers),it(e.name,Nt),me(e.questionToken),ot(e.type),Dt()}(r);case 158:return function(e){_t(e,e.decorators),at(e,e.modifiers),me(e.name),me(e.questionToken),me(e.exclamationToken),ot(e.type),st(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),Dt()}(r);case 159:return function(e){Ht(e),_t(e,e.decorators),at(e,e.modifiers),me(e.name),me(e.questionToken),pt(e,e.typeParameters),ft(e,e.parameters),ot(e.type),Dt(),Yt(e)}(r);case 160:return function(e){_t(e,e.decorators),at(e,e.modifiers),me(e.asteriskToken),me(e.name),me(e.questionToken),Re(e,Be)}(r);case 161:return function(e){at(e,e.modifiers),St("constructor"),Re(e,Be)}(r);case 162:case 163:return function(e){_t(e,e.decorators),at(e,e.modifiers),St(162===e.kind?"get":"set"),kt(),me(e.name),Re(e,Be)}(r);case 164:return function(e){Ht(e),_t(e,e.decorators),at(e,e.modifiers),pt(e,e.typeParameters),ft(e,e.parameters),ot(e.type),Dt(),Yt(e)}(r);case 165:return function(e){Ht(e),_t(e,e.decorators),at(e,e.modifiers),St("new"),kt(),pt(e,e.typeParameters),ft(e,e.parameters),ot(e.type),Dt(),Yt(e)}(r);case 166:return function(e){_t(e,e.decorators),at(e,e.modifiers),t=e,r=e.parameters,gt(t,r,8848),ot(e.type),Dt();var t,r}(r);case 167:return function(e){e.assertsModifier&&(me(e.assertsModifier),kt());me(e.parameterName),e.type&&(kt(),St("is"),kt(),me(e.type))}(r);case 168:return function(e){me(e.typeName),dt(e,e.typeArguments)}(r);case 169:return function(e){Ht(e),pt(e,e.typeParameters),mt(e,e.parameters),kt(),xt("=>"),kt(),me(e.type),Yt(e)}(r);case 298:return function(e){St("function"),ft(e,e.parameters),xt(":"),me(e.type)}(r);case 170:return function(e){Ht(e),St("new"),kt(),pt(e,e.typeParameters),ft(e,e.parameters),kt(),xt("=>"),kt(),me(e.type),Yt(e)}(r);case 171:return function(e){St("typeof"),kt(),me(e.exprName)}(r);case 172:return function(t){xt("{");var r=1&e.getEmitFlags(t)?768:32897;gt(t,t.members,524288|r),xt("}")}(r);case 173:return function(e){me(e.elementType),xt("["),xt("]")}(r);case 174:return function(e){xt("["),gt(e,e.elementTypes,528),xt("]")}(r);case 175:return function(e){me(e.type),xt("?")}(r);case 177:return function(e){gt(e,e.types,516)}(r);case 178:return function(e){gt(e,e.types,520)}(r);case 179:return function(e){me(e.checkType),kt(),St("extends"),kt(),me(e.extendsType),kt(),xt("?"),kt(),me(e.trueType),kt(),xt(":"),kt(),me(e.falseType)}(r);case 180:return function(e){St("infer"),kt(),me(e.typeParameter)}(r);case 181:return function(e){xt("("),me(e.type),xt(")")}(r);case 215:return function(e){ye(e.expression),dt(e,e.typeArguments)}(r);case 182:return void St("this");case 183:return function(e){Ot(e.operator,St),kt(),me(e.type)}(r);case 184:return function(e){me(e.objectType),xt("["),me(e.indexType),xt("]")}(r);case 185:return function(t){var r=e.getEmitFlags(t);xt("{"),1&r?kt():(At(),Ft());t.readonlyToken&&(me(t.readonlyToken),137!==t.readonlyToken.kind&&St("readonly"),kt());xt("["),he(3,t.typeParameter),xt("]"),t.questionToken&&(me(t.questionToken),57!==t.questionToken.kind&&xt("?"));xt(":"),kt(),me(t.type),Dt(),1&r?kt():(At(),Pt());xt("}")}(r);case 186:return function(e){ye(e.literal)}(r);case 187:return function(e){e.isTypeOf&&(St("typeof"),kt());St("import"),xt("("),me(e.argument),xt(")"),e.qualifier&&(xt("."),me(e.qualifier));dt(e,e.typeArguments)}(r);case 293:return void xt("*");case 294:return void xt("?");case 295:return function(e){xt("?"),me(e.type)}(r);case 296:return function(e){xt("!"),me(e.type)}(r);case 297:return function(e){me(e.type),xt("=")}(r);case 176:case 299:return function(e){xt("..."),me(e.type)}(r);case 188:return function(e){xt("{"),gt(e,e.elements,525136),xt("}")}(r);case 189:return function(e){xt("["),gt(e,e.elements,524880),xt("]")}(r);case 190:return function(e){me(e.dotDotDotToken),e.propertyName&&(me(e.propertyName),xt(":"),kt());me(e.name),st(e.initializer,e.name.end,e)}(r);case 220:return function(e){ye(e.expression),me(e.literal)}(r);case 221:return void Dt();case 222:return function(e){Fe(e,!e.multiLine&&Vt(e))}(r);case 224:return function(e){at(e,e.modifiers),me(e.declarationList),Dt()}(r);case 223:return Pe(!1);case 225:return function(t){ye(t.expression),(!e.isJsonSourceFile(n)||e.nodeIsSynthesized(t.expression))&&Dt()}(r);case 226:return function(e){var t=Oe(94,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.thenStatement),e.elseStatement&&(Mt(e),Oe(86,e.thenStatement.end,St,e),226===e.elseStatement.kind?(kt(),me(e.elseStatement)):lt(e,e.elseStatement))}(r);case 227:return function(t){Oe(85,t.pos,St,t),lt(t,t.statement),e.isBlock(t.statement)?kt():Mt(t);we(t,t.statement.end),Dt()}(r);case 228:return function(e){we(e,e.pos),lt(e,e.statement)}(r);case 229:return function(e){var t=Oe(92,e.pos,St,e);kt();var r=Oe(20,t,xt,e);Ie(e.initializer),r=Oe(26,e.initializer?e.initializer.end:r,xt,e),ut(e.condition),r=Oe(26,e.condition?e.condition.end:r,xt,e),ut(e.incrementor),Oe(21,e.incrementor?e.incrementor.end:r,xt,e),lt(e,e.statement)}(r);case 230:return function(e){var t=Oe(92,e.pos,St,e);kt(),Oe(20,t,xt,e),Ie(e.initializer),kt(),Oe(96,e.initializer.end,St,e),kt(),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 231:return function(e){var t=Oe(92,e.pos,St,e);kt(),function(e){e&&(me(e),kt())}(e.awaitModifier),Oe(20,t,xt,e),Ie(e.initializer),kt(),Oe(151,e.initializer.end,St,e),kt(),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 232:return function(e){Oe(81,e.pos,St,e),ct(e.label),Dt()}(r);case 233:return function(e){Oe(76,e.pos,St,e),ct(e.label),Dt()}(r);case 234:return function(e){Oe(100,e.pos,St,e),ut(e.expression),Dt()}(r);case 235:return function(e){var t=Oe(111,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 236:return function(e){var t=Oe(102,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),kt(),me(e.caseBlock)}(r);case 237:return function(e){me(e.label),Oe(58,e.label.end,xt,e),kt(),me(e.statement)}(r);case 238:return function(e){Oe(104,e.pos,St,e),ut(e.expression),Dt()}(r);case 239:return function(e){Oe(106,e.pos,St,e),kt(),me(e.tryBlock),e.catchClause&&(Mt(e),me(e.catchClause));e.finallyBlock&&(Mt(e),Oe(91,(e.catchClause||e.tryBlock).end,St,e),kt(),me(e.finallyBlock))}(r);case 240:return function(e){wt(82,e.pos,St),Dt()}(r);case 241:return function(e){me(e.name),ot(e.type),st(e.initializer,e.type?e.type.end:e.name.end,e)}(r);case 242:return function(t){St(e.isLet(t)?"let":e.isVarConst(t)?"const":"var"),kt(),gt(t,t.declarations,528)}(r);case 243:return function(e){Me(e)}(r);case 244:return function(e){ze(e)}(r);case 245:return function(e){_t(e,e.decorators),at(e,e.modifiers),St("interface"),kt(),me(e.name),pt(e,e.typeParameters),gt(e,e.heritageClauses,512),kt(),xt("{"),gt(e,e.members,129),xt("}")}(r);case 246:return function(e){_t(e,e.decorators),at(e,e.modifiers),St("type"),kt(),me(e.name),pt(e,e.typeParameters),kt(),xt("="),kt(),me(e.type),Dt()}(r);case 247:return function(e){at(e,e.modifiers),St("enum"),kt(),me(e.name),kt(),xt("{"),gt(e,e.members,145),xt("}")}(r);case 248:return function(e){at(e,e.modifiers),1024&~e.flags&&(St(16&e.flags?"namespace":"module"),kt());me(e.name);var t=e.body;if(!t)return Dt();for(;248===t.kind;)xt("."),me(t.name),t=t.body;kt(),me(t)}(r);case 249:return function(t){Ht(t),e.forEach(t.statements,Qt),Fe(t,Vt(t)),Yt(t)}(r);case 250:return function(e){Oe(18,e.pos,xt,e),gt(e,e.clauses,129),Oe(19,e.clauses.end,xt,e,!0)}(r);case 251:return function(e){var t=Oe(88,e.pos,St,e);kt(),t=Oe(122,t,St,e),kt(),t=Oe(135,t,St,e),kt(),me(e.name),Dt()}(r);case 252:return function(e){at(e,e.modifiers),Oe(95,e.modifiers?e.modifiers.end:e.pos,St,e),kt(),me(e.name),kt(),Oe(62,e.name.end,xt,e),kt(),function(e){75===e.kind?ye(e):me(e)}(e.moduleReference),Dt()}(r);case 253:return function(e){at(e,e.modifiers),Oe(95,e.modifiers?e.modifiers.end:e.pos,St,e),kt(),e.importClause&&(me(e.importClause),kt(),Oe(148,e.importClause.end,St,e),kt());ye(e.moduleSpecifier),Dt()}(r);case 254:return function(e){me(e.name),e.name&&e.namedBindings&&(Oe(27,e.name.end,xt,e),kt());me(e.namedBindings)}(r);case 255:return function(e){var t=Oe(41,e.pos,xt,e);kt(),Oe(122,t,St,e),kt(),me(e.name)}(r);case 256:return function(e){Ue(e)}(r);case 257:return function(e){Ve(e)}(r);case 258:return function(e){var t=Oe(88,e.pos,St,e);kt(),e.isExportEquals?Oe(62,t,Tt,e):Oe(83,t,St,e);kt(),ye(e.expression),Dt()}(r);case 259:return function(e){var t=Oe(88,e.pos,St,e);kt(),e.exportClause?me(e.exportClause):t=Oe(41,t,xt,e);if(e.moduleSpecifier){kt(),Oe(148,e.exportClause?e.exportClause.end:t,St,e),kt(),ye(e.moduleSpecifier)}Dt()}(r);case 260:return function(e){Ue(e)}(r);case 261:return function(e){Ve(e)}(r);case 262:return;case 263:return function(e){St("require"),xt("("),ye(e.expression),xt(")")}(r);case 11:return function(e){p.writeLiteral(e.text)}(r);case 266:case 269:return function(t){xt("<"),e.isJsxOpeningElement(t)&&(qe(t.tagName),dt(t,t.typeArguments),t.attributes.properties&&t.attributes.properties.length>0&&kt(),me(t.attributes));xt(">")}(r);case 267:case 270:return function(t){xt("</"),e.isJsxClosingElement(t)&&qe(t.tagName);xt(">")}(r);case 271:return function(e){me(e.name),function(e,t,r,n){r&&(t(e),n(r))}("=",xt,e.initializer,me)}(r);case 272:return function(e){gt(e,e.properties,262656)}(r);case 273:return function(e){xt("{..."),ye(e.expression),xt("}")}(r);case 274:return function(e){e.expression&&(xt("{"),me(e.dotDotDotToken),ye(e.expression),xt("}"))}(r);case 275:return function(e){Oe(77,e.pos,St,e),kt(),ye(e.expression),We(e,e.statements,e.expression.end)}(r);case 276:return function(e){var t=Oe(83,e.pos,St,e);We(e,e.statements,t)}(r);case 277:return function(e){kt(),Ot(e.token,St),kt(),gt(e,e.types,528)}(r);case 278:return function(e){var t=Oe(78,e.pos,St,e);kt(),e.variableDeclaration&&(Oe(20,t,xt,e),me(e.variableDeclaration),Oe(21,e.variableDeclaration.end,xt,e),kt());me(e.block)}(r);case 279:return function(t){me(t.name),xt(":"),kt();var r=t.initializer;if(hr&&0==(512&e.getEmitFlags(r))){hr(e.getCommentRange(r).pos)}ye(r)}(r);case 280:return function(e){me(e.name),e.objectAssignmentInitializer&&(kt(),xt("="),kt(),ye(e.objectAssignmentInitializer))}(r);case 281:return function(e){e.expression&&(Oe(25,e.pos,xt,e),ye(e.expression))}(r);case 282:return function(e){me(e.name),st(e.initializer,e.name.end,e)}(r);case 310:case 316:return function(e){Ye(e.tagName),Qe(e.typeExpression),kt(),e.isBracketed&&xt("[");me(e.name),e.isBracketed&&xt("]");Xe(e.comment)}(r);case 311:case 313:case 312:case 309:return Ye((i=r).tagName),Qe(i.typeExpression),void Xe(i.comment);case 305:return function(e){Ye(e.tagName),kt(),xt("{"),me(e.class),xt("}"),Xe(e.comment)}(r);case 314:return function(e){Ye(e.tagName),Qe(e.constraint),kt(),gt(e,e.typeParameters,528),Xe(e.comment)}(r);case 315:return function(e){Ye(e.tagName),e.typeExpression&&(292===e.typeExpression.kind?Qe(e.typeExpression):(kt(),xt("{"),M("Object"),e.typeExpression.isArrayType&&(xt("["),xt("]")),xt("}")));e.fullName&&(kt(),me(e.fullName));Xe(e.comment),e.typeExpression&&302===e.typeExpression.kind&&Ge(e.typeExpression)}(r);case 308:return function(e){Ye(e.tagName),e.name&&(kt(),me(e.name));Xe(e.comment),He(e.typeExpression)}(r);case 303:return He(r);case 302:return Ge(r);case 307:case 304:return function(e){Ye(e.tagName),Xe(e.comment)}(r);case 301:return function(e){if(M("/**"),e.comment)for(var t=e.comment.split(/\r\n?|\n/g),r=0,n=t;r<n.length;r++){var i=n[r];At(),kt(),xt("*"),kt(),M(i)}e.tags&&(1!==e.tags.length||313!==e.tags[0].kind||e.comment?gt(e,e.tags,33):(kt(),me(e.tags[0])));kt(),M("*/")}(r)}if(e.isExpression(r))t=1,C!==e.noEmitSubstitution&&(x=r=C(t,r));else if(e.isToken(r))return It(r,xt)}var i,a,o,s;if(1===t)switch(r.kind){case 8:case 9:return function(e){Ce(e)}(r);case 10:case 13:case 14:return Ce(r);case 75:return Ne(r);case 90:case 99:case 101:case 105:case 103:case 95:return void It(r,St);case 191:return function(e){var t=e.elements,r=e.multiLine?65536:0;yt(e,t,8914|r)}(r);case 192:return function(t){e.forEach(t.properties,$t);var r=65536&e.getEmitFlags(t);r&&Ft();var i=t.multiLine?65536:0,a=n.languageVersion>=1&&!e.isJsonSourceFile(n)?64:0;gt(t,t.properties,526226|a|i),r&&Pt()}(r);case 193:return function(t){var r=e.cast(ye(t.expression),e.isExpression),n=e.getDotOrQuestionDotToken(t),i=Ut(t,t.expression,n),a=Ut(t,n,t.name);Rt(i,!1),28===n.kind||!function(t){if(t=e.skipPartiallyEmittedExpressions(t),e.isNumericLiteral(t)){var r=Gt(t,!0);return!t.numericLiteralFlags&&!e.stringContains(r,e.tokenToString(24))}if(e.isAccessExpression(t)){var n=e.getConstantValue(t);return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}}(r)||p.hasTrailingComment()||p.hasTrailingWhitespace()||xt(".");Oe(n.kind,t.expression.end,xt,t),Rt(a,!1),me(t.name),Bt(i,a)}(r);case 194:return function(e){ye(e.expression),me(e.questionDotToken),Oe(22,e.expression.end,xt,e),ye(e.argumentExpression),Oe(23,e.argumentExpression.end,xt,e)}(r);case 195:return function(e){ye(e.expression),me(e.questionDotToken),dt(e,e.typeArguments),yt(e,e.arguments,2576)}(r);case 196:return function(e){Oe(98,e.pos,St,e),kt(),ye(e.expression),dt(e,e.typeArguments),yt(e,e.arguments,18960)}(r);case 197:return function(e){ye(e.tag),dt(e,e.typeArguments),kt(),ye(e.template)}(r);case 198:return function(e){xt("<"),me(e.type),xt(">"),ye(e.expression)}(r);case 199:return function(e){var t=Oe(20,e.pos,xt,e);ye(e.expression),Oe(21,e.expression?e.expression.end:t,xt,e)}(r);case 200:return function(e){Zt(e.name),Me(e)}(r);case 201:return function(e){_t(e,e.decorators),at(e,e.modifiers),Re(e,Ae)}(r);case 202:return function(e){Oe(84,e.pos,St,e),kt(),ye(e.expression)}(r);case 203:return function(e){Oe(107,e.pos,St,e),kt(),ye(e.expression)}(r);case 204:return function(e){Oe(109,e.pos,St,e),kt(),ye(e.expression)}(r);case 205:return function(e){Oe(126,e.pos,St,e),kt(),ye(e.expression)}(r);case 206:return function(e){Ot(e.operator,Tt),function(e){var t=e.operand;return 206===t.kind&&(39===e.operator&&(39===t.operator||45===t.operator)||40===e.operator&&(40===t.operator||46===t.operator))}(e)&&kt();ye(e.operand)}(r);case 207:return function(e){ye(e.operand),Ot(e.operator,Tt)}(r);case 208:return function(e){var t=27!==e.operatorToken.kind,r=Ut(e,e.left,e.operatorToken),n=Ut(e,e.operatorToken,e.right);ye(e.left),Rt(r,t),gr(e.operatorToken.pos),It(e.operatorToken,96===e.operatorToken.kind?St:Tt),hr(e.operatorToken.end,!0),Rt(n,!0),ye(e.right),Bt(r,n)}(r);case 209:return function(e){var t=Ut(e,e.condition,e.questionToken),r=Ut(e,e.questionToken,e.whenTrue),n=Ut(e,e.whenTrue,e.colonToken),i=Ut(e,e.colonToken,e.whenFalse);ye(e.condition),Rt(t,!0),me(e.questionToken),Rt(r,!0),ye(e.whenTrue),Bt(t,r),Rt(n,!0),me(e.colonToken),Rt(i,!0),ye(e.whenFalse),Bt(n,i)}(r);case 210:return function(e){me(e.head),gt(e,e.templateSpans,262144)}(r);case 211:return function(e){Oe(120,e.pos,St,e),me(e.asteriskToken),ut(e.expression)}(r);case 212:return function(e){Oe(25,e.pos,xt,e),ye(e.expression)}(r);case 213:return function(e){Zt(e.name),ze(e)}(r);case 214:return;case 216:return function(e){ye(e.expression),e.type&&(kt(),St("as"),kt(),me(e.type))}(r);case 217:return function(e){ye(e.expression),Tt("!")}(r);case 218:return function(e){wt(e.keywordToken,e.pos,xt),xt("."),me(e.name)}(r);case 264:return function(e){me(e.openingElement),gt(e,e.children,262144),me(e.closingElement)}(r);case 265:return function(e){xt("<"),qe(e.tagName),dt(e,e.typeArguments),kt(),me(e.attributes),xt("/>")}(r);case 268:return function(e){me(e.openingFragment),gt(e,e.children,262144),me(e.closingFragment)}(r);case 319:return function(e){ye(e.expression)}(r);case 320:return function(e){yt(e,e.elements,528)}(r)}}function Se(t,r){e.Debug.assert(b===r||x===r),be(1,r)(t,x=C(t,r)),e.Debug.assert(b===r||x===r)}function Te(r){var i=!1,a=289===r.kind?r:void 0;if(!a||I!==e.ModuleKind.None){for(var o=a?a.prepends.length:0,s=a?a.sourceFiles.length+o:1,c=0;c<s;c++){var u=a?c<o?a.prepends[c]:a.sourceFiles[c-o]:r,l=e.isSourceFile(u)?u:e.isUnparsedSource(u)?void 0:n,_=t.noEmitHelpers||!!l&&e.hasRecordedExternalHelpers(l),d=(e.isSourceFile(u)||e.isUnparsedSource(u))&&!m,f=e.isUnparsedSource(u)?u.helpers:Ee(u);if(f)for(var g=0,y=f;g<y.length;g++){var h=y[g];if(h.scoped){if(a)continue}else{if(_)continue;if(d){if(O.get(h.name))continue;O.set(h.name,!0)}}var v=te();"string"==typeof h.text?Lt(h.text):Lt(h.text(or)),L&&L.sections.push({pos:v,end:p.getTextPos(),kind:"emitHelpers",data:h.name}),i=!0}}return i}}function Ee(t){var r=e.getEmitHelpers(t);return r&&e.stableSort(r,e.compareEmitHelpers)}function Ce(r){var n=Gt(r,t.neverAsciiEscape);!t.sourceMap&&!t.inlineSourceMap||10!==r.kind&&!e.isTemplateLiteralKind(r.kind)?function(e){p.writeStringLiteral(e)}(n):function(e){p.writeLiteral(e)}(n)}function ke(e){p.rawWrite(e.parent.text.substring(e.pos,e.end))}function Ne(e){(e.symbol?bt:M)(Wt(e,!1),e.symbol),gt(e,e.typeArguments,53776)}function Ae(e){pt(e,e.typeParameters),mt(e,e.parameters),ot(e.type),kt(),me(e.equalsGreaterThanToken)}function Fe(t,r){Oe(18,t.pos,xt,t);var n=r||1&e.getEmitFlags(t)?768:129;gt(t,t.statements,n),Oe(19,t.statements.end,xt,t,!!(1&n))}function Pe(e){e?xt(";"):Dt()}function we(e,t){var r=Oe(110,t,St,e);kt(),Oe(20,r,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e)}function Ie(e){void 0!==e&&(242===e.kind?me(e):ye(e))}function Oe(t,r,i,a,o){var s=e.getParseTreeNode(a),c=s&&s.kind===a.kind,u=r;if(c&&(r=e.skipTrivia(n.text,r)),gr&&c&&a.pos!==u){var l=o&&!e.positionsAreOnSameLine(u,r,n);l&&Ft(),gr(u),l&&Pt()}return r=Ot(t,i,r),hr&&c&&a.end!==r&&hr(r,!0),r}function Me(e){_t(e,e.decorators),at(e,e.modifiers),St("function"),me(e.asteriskToken),kt(),ge(e.name),Re(e,Be)}function Le(e,t){je(t)}function Re(t,r){var n=t.body;if(n)if(e.isBlock(n)){var i=65536&e.getEmitFlags(t);i&&Ft(),Ht(t),e.forEach(t.parameters,Qt),Qt(t.body),r(t),T?T(4,n,Le):je(n),Yt(t),i&&Pt()}else r(t),kt(),ye(n);else r(t),Dt()}function Be(e){pt(e,e.typeParameters),ft(e,e.parameters),ot(e.type)}function je(t){kt(),xt("{"),Ft();var r=function(t){if(1&e.getEmitFlags(t))return!0;if(t.multiLine)return!1;if(!e.nodeIsSynthesized(t)&&!e.rangeIsOnSingleLine(t,n))return!1;if(jt(t,t.statements,2)||Jt(t,t.statements,2))return!1;for(var r,i=0,a=t.statements;i<a.length;i++){var o=a[i];if(Kt(r,o,2))return!1;r=o}return!0}(t)?Ke:Je;_r?_r(t,t.statements,r):r(t),Pt(),wt(19,t.statements.end,xt,t)}function Ke(e){Je(e,!0)}function Je(e,t){var r=et(e.statements),n=p.getTextPos();Te(e),0===r&&n===p.getTextPos()&&t?(Pt(),gt(e,e.statements,768),Ft()):gt(e,e.statements,1,r)}function ze(t){e.forEach(t.members,$t),_t(t,t.decorators),at(t,t.modifiers),St("class"),t.name&&(kt(),ge(t.name));var r=65536&e.getEmitFlags(t);r&&Ft(),pt(t,t.typeParameters),gt(t,t.heritageClauses,0),kt(),xt("{"),gt(t,t.members,129),xt("}"),r&&Pt()}function Ue(e){xt("{"),gt(e,e.elements,525136),xt("}")}function Ve(e){e.propertyName&&(me(e.propertyName),kt(),Oe(122,e.propertyName.end,St,e),kt()),me(e.name)}function qe(e){75===e.kind?ye(e):me(e)}function We(t,r,i){var a=163969;1===r.length&&(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r[0])||e.rangeStartPositionsAreOnSameLine(t,r[0],n))?(wt(58,i,xt,t),kt(),a&=-130):Oe(58,i,xt,t),gt(t,r,a)}function Ge(t){gt(t,e.createNodeArray(t.jsDocPropertyTags),33)}function He(t){t.typeParameters&&gt(t,e.createNodeArray(t.typeParameters),33),t.parameters&&gt(t,e.createNodeArray(t.parameters),33),t.type&&(At(),kt(),xt("*"),kt(),me(t.type))}function Ye(e){xt("@"),me(e)}function Xe(e){e&&(kt(),M(e))}function Qe(e){e&&(kt(),xt("{"),me(e.type),xt("}"))}function $e(e,t,r,i){if(e){var a=p.getTextPos();Ct('/// <reference no-default-lib="true"/>'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"no-default-lib"}),At()}if(n&&n.moduleName&&(Ct('/// <amd-module name="'+n.moduleName+'" />'),At()),n&&n.amdDependencies)for(var o=0,s=n.amdDependencies;o<s.length;o++){var c=s[o];c.name?Ct('/// <amd-dependency name="'+c.name+'" path="'+c.path+'" />'):Ct('/// <amd-dependency path="'+c.path+'" />'),At()}for(var u=0,l=t;u<l.length;u++){var _=l[u];a=p.getTextPos();Ct('/// <reference path="'+_.fileName+'" />'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"reference",data:_.fileName}),At()}for(var d=0,f=r;d<f.length;d++){_=f[d],a=p.getTextPos();Ct('/// <reference types="'+_.fileName+'" />'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"type",data:_.fileName}),At()}for(var m=0,g=i;m<g.length;m++){_=g[m],a=p.getTextPos();Ct('/// <reference lib="'+_.fileName+'" />'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"lib",data:_.fileName}),At()}}function Ze(t){var r=t.statements;Ht(t),e.forEach(t.statements,Qt),Te(t);var n=e.findIndex(r,(function(t){return!e.isPrologueDirective(t)}));!function(e){e.isDeclarationFile&&$e(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(t),gt(t,r,1,-1===n?r.length:n),Yt(t)}function et(t,r,n,i){for(var a=!!r,o=0;o<t.length;o++){var s=t[o];if(!e.isPrologueDirective(s))return o;if(!n||!n.has(s.expression.text)){a&&(a=!1,_e(r)),At();var c=p.getTextPos();me(s),i&&L&&L.sections.push({pos:c,end:p.getTextPos(),kind:"prologue",data:s.expression.text}),n&&n.set(s.expression.text,!0)}}return t.length}function tt(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!t.has(i.data)){At();var a=p.getTextPos();me(i),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"prologue",data:i.data}),t&&t.set(i.data,!0)}}}function rt(t){if(e.isSourceFile(t))et(t.statements,t);else{for(var r=e.createMap(),n=0,i=t.prepends;n<i.length;n++){tt(i[n].prologues,r)}for(var a=0,o=t.sourceFiles;a<o.length;a++){var s=o[a];et(s.statements,s,r,!0)}_e(void 0)}}function nt(t){if(e.isSourceFile(t)||e.isUnparsedSource(t)){var r=e.getShebang(t.text);if(r)return Ct(r),At(),!0}else{for(var n=0,i=t.prepends;n<i.length;n++){var a=i[n];if(e.Debug.assertNode(a,e.isUnparsedSource),nt(a))return!0}for(var o=0,s=t.sourceFiles;o<s.length;o++){if(nt(s[o]))return!0}}}function it(e,t){if(e){var r=M;M=t,me(e),M=r}}function at(e,t){t&&t.length&&(gt(e,t,262656),kt())}function ot(e){e&&(xt(":"),kt(),me(e))}function st(e,t,r){e&&(kt(),Oe(62,t,Tt,r),kt(),ye(e))}function ct(e){e&&(kt(),me(e))}function ut(e){e&&(kt(),ye(e))}function lt(t,r){e.isBlock(r)||1&e.getEmitFlags(t)?(kt(),me(r)):(At(),Ft(),e.isEmptyStatement(r)?he(5,r):me(r),Pt())}function _t(e,t){gt(e,t,49153)}function dt(e,t){gt(e,t,53776)}function pt(t,r){if(e.isFunctionLike(t)&&t.typeArguments)return dt(t,t.typeArguments);gt(t,r,53776)}function ft(e,t){gt(e,t,2576)}function mt(t,r){!function(t,r){var n=e.singleOrUndefined(r);return n&&n.pos===t.pos&&e.isArrowFunction(t)&&!t.type&&!e.some(t.decorators)&&!e.some(t.modifiers)&&!e.some(t.typeParameters)&&!e.some(n.decorators)&&!e.some(n.modifiers)&&!n.dotDotDotToken&&!n.questionToken&&!n.type&&!n.initializer&&e.isIdentifier(n.name)}(t,r)?ft(t,r):gt(t,r,528)}function gt(e,t,r,n,i){vt(me,e,t,r,n,i)}function yt(e,t,r,n,i){vt(ye,e,t,r,n,i)}function ht(e){switch(60&e){case 0:break;case 16:xt(",");break;case 4:kt(),xt("|");break;case 32:kt(),xt("*"),kt();break;case 8:kt(),xt("&")}}function vt(t,r,n,a,o,s){void 0===o&&(o=0),void 0===s&&(s=n?n.length-o:0);var c=void 0===n;if(!(c&&16384&a)){var u=void 0===n||o>=n.length||0===s;if(u&&32768&a)return k&&k(n),void(N&&N(n));if(15360&a&&(xt(function(e){return i[15360&e][0]}(a)),u&&!c&&hr(n.pos,!0)),k&&k(n),u)1&a?At():256&a&&!(524288&a)&&kt();else{var l=0==(262144&a),_=l;jt(r,n,a)?(At(),_=!1):256&a&&kt(),128&a&&Ft();for(var d=void 0,p=void 0,f=!1,m=0;m<s;m++){var g=n[o+m];if(32&a?(At(),ht(a)):d&&(60&a&&d.end!==r.end&&gr(d.end),ht(a),ie(p),Kt(d,g,a)?(0==(131&a)&&(Ft(),f=!0),At(),_=!1):d&&512&a&&kt()),p=ne(g),_){if(hr)hr(e.getCommentRange(g).pos)}else _=l;t(g),f&&(Pt(),f=!1),d=g}var y=64&a&&n.hasTrailingComma;16&a&&y&&xt(","),d&&60&a&&d.end!==r.end&&!(1024&e.getEmitFlags(d))&&gr(d.end),128&a&&Pt(),ie(p),Jt(r,n,a)?At():256&a&&kt()}N&&N(n),15360&a&&(u&&!c&&gr(n.end),xt(function(e){return i[15360&e][1]}(a)))}}function bt(e,t){p.writeSymbol(e,t)}function xt(e){p.writePunctuation(e)}function Dt(){p.writeTrailingSemicolon(";")}function St(e){p.writeKeyword(e)}function Tt(e){p.writeOperator(e)}function Et(e){p.writeParameter(e)}function Ct(e){p.writeComment(e)}function kt(){p.writeSpace(" ")}function Nt(e){p.writeProperty(e)}function At(){p.writeLine()}function Ft(){p.increaseIndent()}function Pt(){p.decreaseIndent()}function wt(t,r,n,i){return J?Ot(t,n,r):function(t,r,n,i,a){if(J||t&&e.isInJsonFile(t))return a(r,n,i);var o=t&&t.emitNode,s=o&&o.flags||0,c=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[r],u=c&&c.source||y;i=Tr(u,c?c.pos:i),0==(128&s)&&i>=0&&Cr(u,i);i=a(r,n,i),c&&(i=c.end);0==(256&s)&&i>=0&&Cr(u,i);return i}(i,t,n,r,Ot)}function It(t,r){A&&A(t),r(e.tokenToString(t.kind)),F&&F(t)}function Ot(t,r,n){var i=e.tokenToString(t);return r(i),n<0?n:n+i.length}function Mt(t){1&e.getEmitFlags(t)?kt():At()}function Lt(t){for(var r=t.split(/\r\n?|\n/g),n=e.guessIndentation(r),i=0,a=r;i<a.length;i++){var o=a[i],s=n?o.slice(n):o;s.length&&(At(),M(s))}}function Rt(e,t){e?(Ft(),At()):t&&kt()}function Bt(e,t){e&&Pt(),t&&Pt()}function jt(t,r,i){if(1&i)return!0;if(2&i){if(65536&i)return!0;var a=r[0];return void 0===a?!e.rangeIsOnSingleLine(t,n):e.positionIsSynthesized(t.pos)||e.nodeIsSynthesized(a)?zt(a,i):!e.rangeStartPositionsAreOnSameLine(t,a,n)}return!1}function Kt(t,r,i){return!!(1&i)||(2&i?void 0!==t&&void 0!==r&&(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r)?zt(t,i)||zt(r,i):!e.rangeEndIsOnSameLineAsRangeStart(t,r,n)):e.getStartsOnNewLine(r))}function Jt(t,r,i){if(1&i)return 0==(131072&i);if(2&i){if(65536&i)return!0;var a=e.lastOrUndefined(r);return void 0===a?!e.rangeIsOnSingleLine(t,n):e.positionIsSynthesized(t.pos)||e.nodeIsSynthesized(a)?zt(a,i):!e.rangeEndPositionsAreOnSameLine(t,a,n)}return!1}function zt(t,r){if(e.nodeIsSynthesized(t)){var n=e.getStartsOnNewLine(t);return void 0===n?0!=(65536&r):n}return 0!=(65536&r)}function Ut(t,r,i){return!(131072&e.getEmitFlags(t))&&(t=qt(t),r=qt(r),i=qt(i),!!e.getStartsOnNewLine(i)||!(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(r)||e.nodeIsSynthesized(i)||e.rangeEndIsOnSameLineAsRangeStart(r,i,n)))}function Vt(t){return 0===t.statements.length&&e.rangeEndIsOnSameLineAsRangeStart(t,t,n)}function qt(t){for(;199===t.kind&&e.nodeIsSynthesized(t);)t=t.expression;return t}function Wt(t,r){return e.isGeneratedIdentifier(t)?er(t):e.isIdentifier(t)&&(e.nodeIsSynthesized(t)||!t.parent||!n||t.parent&&n&&e.getSourceFileOfNode(t)!==e.getOriginalNode(n))?e.idText(t):10===t.kind&&t.textSourceNode?Wt(t.textSourceNode,r):!e.isLiteralExpression(t)||!e.nodeIsSynthesized(t)&&t.parent?e.getSourceTextOfNodeFromSourceFile(n,t,r):t.text}function Gt(t,r){if(10===t.kind&&t.textSourceNode){var i=t.textSourceNode;return e.isIdentifier(i)?r||16777216&e.getEmitFlags(t)?'"'+e.escapeString(Wt(i))+'"':'"'+e.escapeNonAsciiString(Wt(i))+'"':Gt(i,r)}return e.getLiteralText(t,n,r)}function Ht(t){t&&524288&e.getEmitFlags(t)||(u.push(l),l=0,_.push(d))}function Yt(t){t&&524288&e.getEmitFlags(t)||(l=u.pop(),d=_.pop())}function Xt(t){d&&d!==e.lastOrUndefined(_)||(d=e.createMap()),d.set(t,!0)}function Qt(t){if(t)switch(t.kind){case 222:e.forEach(t.statements,Qt);break;case 237:case 235:case 227:case 228:Qt(t.statement);break;case 226:Qt(t.thenStatement),Qt(t.elseStatement);break;case 229:case 231:case 230:Qt(t.initializer),Qt(t.statement);break;case 236:Qt(t.caseBlock);break;case 250:e.forEach(t.clauses,Qt);break;case 275:case 276:e.forEach(t.statements,Qt);break;case 239:Qt(t.tryBlock),Qt(t.catchClause),Qt(t.finallyBlock);break;case 278:Qt(t.variableDeclaration),Qt(t.block);break;case 224:Qt(t.declarationList);break;case 242:e.forEach(t.declarations,Qt);break;case 241:case 155:case 190:case 244:Zt(t.name);break;case 243:Zt(t.name),524288&e.getEmitFlags(t)&&(e.forEach(t.parameters,Qt),Qt(t.body));break;case 188:case 189:e.forEach(t.elements,Qt);break;case 253:Qt(t.importClause);break;case 254:Zt(t.name),Qt(t.namedBindings);break;case 255:Zt(t.name);break;case 256:e.forEach(t.elements,Qt);break;case 257:Zt(t.propertyName||t.name)}}function $t(e){if(e)switch(e.kind){case 279:case 280:case 158:case 160:case 162:case 163:Zt(e.name)}}function Zt(t){t&&(e.isGeneratedIdentifier(t)?er(t):e.isBindingPattern(t)&&Qt(t))}function er(t){if(4==(7&t.autoGenerateFlags))return tr(function(t){var r=t.autoGenerateId,n=t,i=n.original;for(;i&&(n=i,!(e.isIdentifier(n)&&4&n.autoGenerateFlags&&n.autoGenerateId!==r));)i=n.original;return n}(t),t.autoGenerateFlags);var r=t.autoGenerateId;return s[r]||(s[r]=function(t){switch(7&t.autoGenerateFlags){case 1:return ir(0,!!(8&t.autoGenerateFlags));case 2:return ir(268435456,!!(8&t.autoGenerateFlags));case 3:return ar(e.idText(t),32&t.autoGenerateFlags?nr:rr,!!(16&t.autoGenerateFlags),!!(8&t.autoGenerateFlags))}return e.Debug.fail("Unsupported GeneratedIdentifierKind.")}(t))}function tr(t,r){var n=e.getNodeId(t);return o[n]||(o[n]=function(t,r){switch(t.kind){case 75:return ar(Wt(t),rr,!!(16&r),!!(8&r));case 248:case 247:return function(t){var r=Wt(t.name);return function(t,r){for(var n=r;e.isNodeDescendantOf(n,r);n=n.nextContainer)if(n.locals){var i=n.locals.get(e.escapeLeadingUnderscores(t));if(i&&3257279&i.flags)return!1}return!0}(r,t)?r:ar(r)}(t);case 253:case 259:return function(t){var r=e.getExternalModuleName(t);return ar(e.isStringLiteral(r)?e.makeIdentifierFromModuleName(r.text):"module")}(t);case 243:case 244:case 258:return ar("default");case 213:return ar("class");case 160:case 162:case 163:return function(t){if(e.isIdentifier(t.name))return tr(t.name);return ir(0)}(t);case 153:return ir(0,!0);default:return ir(0)}}(t,r))}function rr(e){return nr(e)&&!c.has(e)&&!(d&&d.has(e))}function nr(t){return!n||e.isFileLevelUniqueName(n,t,D)}function ir(e,t){if(e&&!(l&e)&&rr(r=268435456===e?"_i":"_n"))return l|=e,t&&Xt(r),r;for(;;){var r,n=268435455&l;if(l++,8!==n&&13!==n)if(rr(r=n<26?"_"+String.fromCharCode(97+n):"_"+(n-26)))return t&&Xt(r),r}}function ar(e,t,r,n){if(void 0===t&&(t=rr),r&&t(e))return n?Xt(e):c.set(e,!0),e;95!==e.charCodeAt(e.length-1)&&(e+="_");for(var i=1;;){var a=e+i;if(t(a))return n?Xt(a):c.set(a,!0),a;i++}}function or(e){return ar(e,nr,!0)}function sr(t,r){e.Debug.assert(b===r||x===r),Y(),W=!1;var n=e.getEmitFlags(r),i=e.getCommentRange(r),a=i.pos,o=i.end,s=318!==r.kind,c=a<0||0!=(512&n)||11===r.kind,u=o<0||0!=(1024&n)||11===r.kind,l=U,_=V,d=q;(a>0||o>0)&&a!==o&&(c||dr(a,s),(!c||a>=0&&0!=(512&n))&&(U=a),(!u||o>=0&&0!=(1024&n))&&(V=o,242===r.kind&&(q=o))),e.forEach(e.getSyntheticLeadingComments(r),cr),X();var p=be(2,r);2048&n?(G=!0,p(t,r),G=!1):p(t,r),Y(),e.forEach(e.getSyntheticTrailingComments(r),ur),(a>0||o>0)&&a!==o&&(U=l,V=_,q=d,!u&&s&&function(e){xr(e,yr)}(o)),X(),e.Debug.assert(b===r||x===r)}function cr(e){2===e.kind&&p.writeLine(),lr(e),e.hasTrailingNewLine||2===e.kind?p.writeLine():p.writeSpace(" ")}function ur(e){p.isAtStartOfLine()||p.writeSpace(" "),lr(e),e.hasTrailingNewLine&&p.writeLine()}function lr(t){var r=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),n=3===t.kind?e.computeLineStarts(r):void 0;e.writeCommentRange(r,n,p,0,r.length,w)}function _r(t,r,i){Y();var a=r.pos,o=r.end,s=e.getEmitFlags(t),c=G||o<0||0!=(1024&s);a<0||0!=(512&s)||function(t){var r=e.emitDetachedComments(n.text,fe(),p,Dr,t,w,G);r&&(v?v.push(r):v=[r])}(r),X(),2048&s&&!G?(G=!0,i(t),G=!1):i(t),Y(),c||(dr(r.end,!0),W&&!p.isAtStartOfLine()&&p.writeLine()),X()}function dr(e,t){W=!1,t?br(e,mr):0===e&&br(e,pr)}function pr(t,r,i,a,o){(function(t,r){return e.isRecognizedTripleSlashComment(n.text,t,r)})(t,r)&&mr(t,r,i,a,o)}function fr(r,n){return!t.onlyPrintJsDocStyle||(e.isJSDocLikeText(r,n)||e.isPinnedComment(r,n))}function mr(t,r,i,a,o){fr(n.text,t)&&(W||(e.emitNewLineBeforeLeadingCommentOfPosition(fe(),p,o,t),W=!0),Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a?p.writeLine():3===i&&p.writeSpace(" "))}function gr(e){G||-1===e||dr(e,!0)}function yr(t,r,i,a){fr(n.text,t)&&(p.isAtStartOfLine()||p.writeSpace(" "),Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a&&p.writeLine())}function hr(e,t){G||(Y(),xr(e,t?yr:vr),X())}function vr(t,r,i,a){Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a?p.writeLine():p.writeSpace(" ")}function br(t,r){!n||-1!==U&&t===U||(function(t){return void 0!==v&&e.last(v).nodePos===t}(t)?function(t){var r=e.last(v).detachedCommentEndPos;v.length-1?v.pop():v=void 0;e.forEachLeadingCommentRange(n.text,r,t,r)}(r):e.forEachLeadingCommentRange(n.text,t,r,t))}function xr(t,r){n&&(-1===V||t!==V&&t!==q)&&e.forEachTrailingCommentRange(n.text,t,r)}function Dr(t,r,i,a,o,s){fr(n.text,a)&&(Er(a),e.writeCommentRange(t,r,i,a,o,s),Er(o))}function Sr(t,r){e.Debug.assert(b===r||x===r);var n=be(3,r);if(e.isUnparsedSource(r)||e.isUnparsedPrepend(r))n(t,r);else if(e.isUnparsedNode(r)){var i=function(t){return void 0===t.parsedSourceMap&&void 0!==t.sourceMapText&&(t.parsedSourceMap=e.tryParseRawSourceMap(t.sourceMapText)||!1),t.parsedSourceMap||void 0}(r.parent);i&&g&&g.appendSourceMap(p.getLine(),p.getColumn(),i,r.parent.sourceMapPath,r.parent.getLineAndCharacterOfPosition(r.pos),r.parent.getLineAndCharacterOfPosition(r.end)),n(t,r)}else{var a=e.getSourceMapRange(r),o=a.pos,s=a.end,c=a.source,u=void 0===c?y:c,l=e.getEmitFlags(r);318!==r.kind&&0==(16&l)&&o>=0&&Cr(u,Tr(u,o)),64&l?(J=!0,n(t,r),J=!1):n(t,r),318!==r.kind&&0==(32&l)&&s>=0&&Cr(u,s)}e.Debug.assert(b===r||x===r)}function Tr(t,r){return t.skipTrivia?t.skipTrivia(r):e.skipTrivia(t.text,r)}function Er(t){if(!(J||e.positionIsSynthesized(t)||Nr(y))){var r=e.getLineAndCharacterOfPosition(y,t),n=r.line,i=r.character;g.addMapping(p.getLine(),p.getColumn(),z,n,i,void 0)}}function Cr(e,t){if(e!==y){var r=y;kr(e),Er(t),kr(r)}else Er(t)}function kr(e){J||(y=e,Nr(e)||(z=g.addSource(e.fileName),t.inlineSources&&g.setSourceContent(z,e.text)))}function Nr(t){return e.fileExtensionIs(t.fileName,".json")}}e.isBuildInfoFile=function(t){return e.fileExtensionIs(t,".tsbuildinfo")},e.forEachEmittedFile=o,e.getTsBuildInfoEmitOutputFilePath=s,e.getOutputPathsForBundle=c,e.getOutputPathsFor=u,e.getOutputExtension=_,e.getOutputDeclarationFileName=p,e.getAllProjectOutputs=function(e,t){var r=m(),n=r.addOutput,i=r.getOutputs;if(e.options.outFile||e.options.out)g(e,n);else{for(var a=0,o=e.fileNames;a<o.length;a++){y(e,o[a],t,n)}n(s(e.options))}return i()},e.getOutputFileNames=function(t,r,n){r=e.normalizePath(r),e.Debug.assert(e.contains(t.fileNames,r),"Expected fileName to be present in command line");var i=m(),a=i.addOutput,o=i.getOutputs;return t.options.outFile||t.options.out?g(t,a):y(t,r,n,a),o()},e.getFirstProjectOutput=function(t,r){if(t.options.outFile||t.options.out){var n=c(t.options,!1).jsFilePath;return e.Debug.assertDefined(n,"project "+t.options.configFilePath+" expected to have at least one output")}for(var i=0,a=t.fileNames;i<a.length;i++){var o=a[i];if(!e.fileExtensionIs(o,".d.ts")){if(n=f(o,t,r))return n;if(!e.fileExtensionIs(o,".json")&&e.getEmitDeclarations(t.options))return p(o,t,r)}}var u=s(t.options);return u||e.Debug.fail("project "+t.options.configFilePath+" expected to have at least one output")},e.emitFiles=h,e.getBuildInfoText=v,e.getBuildInfo=b,e.notImplementedResolver={hasGlobalName:e.notImplemented,getReferencedExportContainer:e.notImplemented,getReferencedImportDeclaration:e.notImplemented,getReferencedDeclarationWithCollidingName:e.notImplemented,isDeclarationWithCollidingName:e.notImplemented,isValueAliasDeclaration:e.notImplemented,isReferencedAliasDeclaration:e.notImplemented,isTopLevelValueImportEqualsWithEntityName:e.notImplemented,getNodeCheckFlags:e.notImplemented,isDeclarationVisible:e.notImplemented,isLateBound:function(e){return!1},collectLinkedAliases:e.notImplemented,isImplementationOfOverload:e.notImplemented,isRequiredInitializedParameter:e.notImplemented,isOptionalUninitializedParameterProperty:e.notImplemented,isExpandoFunctionDeclaration:e.notImplemented,getPropertiesOfContainerFunction:e.notImplemented,createTypeOfDeclaration:e.notImplemented,createReturnTypeOfSignatureDeclaration:e.notImplemented,createTypeOfExpression:e.notImplemented,createLiteralConstValue:e.notImplemented,isSymbolAccessible:e.notImplemented,isEntityNameVisible:e.notImplemented,getConstantValue:e.notImplemented,getReferencedValueDeclaration:e.notImplemented,getTypeReferenceSerializationKind:e.notImplemented,isOptionalParameter:e.notImplemented,moduleExportsSomeValue:e.notImplemented,isArgumentsLocalBinding:e.notImplemented,getExternalModuleFileFromDeclaration:e.notImplemented,getTypeReferenceDirectivesForEntityName:e.notImplemented,getTypeReferenceDirectivesForSymbol:e.notImplemented,isLiteralConstDeclaration:e.notImplemented,getJsxFactoryEntity:e.notImplemented,getAllAccessorDeclarations:e.notImplemented,getSymbolOfExternalModuleSpecifier:e.notImplemented,isBindingCapturedByNode:e.notImplemented,getDeclarationStatementsForSourceFile:e.notImplemented},e.emitUsingBuildInfo=function(r,n,i,a){var o=c(r.options,!1),s=o.buildInfoPath,u=o.jsFilePath,l=o.sourceMapFilePath,_=o.declarationFilePath,d=o.declarationMapPath,p=n.readFile(e.Debug.assertDefined(s));if(!p)return s;var f=n.readFile(e.Debug.assertDefined(u));if(!f)return u;var m=l&&n.readFile(l);if(l&&!m||r.options.inlineSourceMap)return l||"inline sourcemap decoding";var g=_&&n.readFile(_);if(_&&!g)return _;var y=d&&n.readFile(d);if(d&&!y||r.options.inlineSourceMap)return d||"inline sourcemap decoding";var x=b(p);if(!x.bundle||!x.bundle.js||g&&!x.bundle.dts)return s;var D=e.getDirectoryPath(e.getNormalizedAbsolutePath(s,n.getCurrentDirectory())),S=e.createInputFiles(f,g,l,m,d,y,u,_,s,x,!0),T=[],E=e.createPrependNodes(r.projectReferences,i,(function(e){return n.readFile(e)})),C=function(t,r,n){var i=t.sourceFiles.map((function(t){var i=e.createNode(288,0,0);return i.fileName=e.getRelativePathFromDirectory(n.getCurrentDirectory(),e.getNormalizedAbsolutePath(t,r),!n.useCaseSensitiveFileNames()),i.text="",i.statements=e.createNodeArray(),i})),a=e.Debug.assertDefined(t.js);return e.forEach(a.sources&&a.sources.prologues,(function(t){var r=i[t.file];r.text=t.text,r.end=t.text.length,r.statements=e.createNodeArray(t.directives.map((function(t){var r=e.createNode(225,t.pos,t.end);return r.expression=e.createNode(10,t.expression.pos,t.expression.end),r.expression.text=t.expression.text,r})))})),i}(x.bundle,D,n),k={getPrependNodes:e.memoize((function(){return t(E,[S])})),getCanonicalFileName:n.getCanonicalFileName,getCommonSourceDirectory:function(){return e.getNormalizedAbsolutePath(x.bundle.commonSourceDirectory,D)},getCompilerOptions:function(){return r.options},getCurrentDirectory:function(){return n.getCurrentDirectory()},getNewLine:function(){return n.getNewLine()},getSourceFile:e.returnUndefined,getSourceFileByPath:e.returnUndefined,getSourceFiles:function(){return C},getLibFileFromReference:e.notImplemented,isSourceFileFromExternalLibrary:e.returnFalse,getResolvedProjectReferenceToRedirect:e.returnUndefined,writeFile:function(t,r,n){switch(t){case u:if(f===r)return;break;case l:if(m===r)return;break;case s:var i=b(r);i.program=x.program;var a=x.bundle,o=a.js,c=a.dts,p=a.sourceFiles;return i.bundle.js.sources=o.sources,c&&(i.bundle.dts.sources=c.sources),i.bundle.sourceFiles=p,void T.push({name:t,text:v(i),writeByteOrderMark:n});case _:if(g===r)return;break;case d:if(y===r)return;break;default:e.Debug.fail("Unexpected path: "+t)}T.push({name:t,text:r,writeByteOrderMark:n})},isEmitBlocked:e.returnFalse,readFile:function(e){return n.readFile(e)},fileExists:function(e){return n.fileExists(e)},directoryExists:n.directoryExists&&function(e){return n.directoryExists(e)},useCaseSensitiveFileNames:function(){return n.useCaseSensitiveFileNames()},getProgramBuildInfo:e.returnUndefined,getSourceFileFromReference:e.returnUndefined,redirectTargetsMap:e.createMultiMap()};return h(e.notImplementedResolver,k,void 0,e.getTransformers(r.options,a)),T},function(e){e[e.Notification=0]="Notification",e[e.Substitution=1]="Substitution",e[e.Comments=2]="Comments",e[e.SourceMaps=3]="SourceMaps",e[e.Emit=4]="Emit"}(r||(r={})),e.createPrinter=x,function(e){e[e.Auto=0]="Auto",e[e.CountMask=268435455]="CountMask",e[e._i=268435456]="_i"}(n||(n={}))}(s||(s={})),function(e){var t;function r(e,t,r,n){return e.watchFile(t,r,n)}function n(e,t,r,n){return e.watchDirectory(t,r,0!=(1&n))}function i(e,r){switch(e){case t.None:return r;case t.TriggerOnly:return s;case t.Verbose:return r===n?o:a}}function a(e,t,r,n,i,a,o,u,l,_,d){l(_+":: Added:: "+c(t,n,a,o,d));var p=s(e,t,r,n,i,a,o,u,l,_,d);return{close:function(){l(_+":: Close:: "+c(t,n,a,o,d)),p.close()}}}function o(t,r,n,i,a,o,u,l,_,d,p){var f=d+":: Added:: "+c(r,i,o,u,p);_(f);var m=e.timestamp(),g=s(t,r,n,i,a,o,u,l,_,d,p),y=e.timestamp()-m;return _("Elapsed:: "+y+"ms "+f),{close:function(){var t=d+":: Close:: "+c(r,i,o,u,p);_(t);var n=e.timestamp();g.close();var a=e.timestamp()-n;_("Elapsed:: "+a+"ms "+t)}}}function s(t,r,n,i,a,o,s,u,l,_,d){return u(t,r,(function(t,u){var p=_+":: Triggered with "+t+" "+(void 0!==u?u:"")+":: "+c(r,i,o,s,d);l(p);var f=e.timestamp();n(t,u,a);var m=e.timestamp()-f;l("Elapsed:: "+m+"ms "+p)}),i)}function c(e,t,r,n,i){return"WatchInfo: "+e+" "+t+" "+(i?i(r,n):void 0===n?r:r+" "+n)}function u(e){e.watcher.close()}e.createCachedDirectoryStructureHost=function(t,r,n){if(t.getDirectories&&t.readDirectory){var i=e.createMap(),a=e.createGetCanonicalFileName(n);return{useCaseSensitiveFileNames:n,fileExists:function(e){var r=c(o(e));return r&&d(r.files,u(e))||t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:t.directoryExists&&function(r){var n=o(r);return i.has(e.ensureTrailingDirectorySeparator(n))||t.directoryExists(r)},getDirectories:function(e){var r=o(e),n=l(e,r);if(n)return n.directories.slice();return t.getDirectories(e)},readDirectory:function(i,a,s,c,u){var _=o(i),d=l(i,_);if(d)return e.matchFiles(i,a,s,c,n,r,u,(function(t){var r=o(t);if(r===_)return d;return l(t,r)||e.emptyFileSystemEntries}),f);return t.readDirectory(i,a,s,c,u)},createDirectory:t.createDirectory&&function(e){var r=c(o(e)),n=u(e);r&&p(r.directories,n,!0);t.createDirectory(e)},writeFile:t.writeFile&&function(e,r,n){var i=c(o(e));i&&m(i,u(e),!0);return t.writeFile(e,r,n)},addOrDeleteFileOrDirectory:function(e,r){if(s(r))return void g();var n=c(r);if(!n)return;if(!t.directoryExists)return void g();var i=u(e),a={fileExists:t.fileExists(r),directoryExists:t.directoryExists(r)};a.directoryExists||d(n.directories,i)?g():m(n,i,a.fileExists);return a},addOrDeleteFile:function(t,r,n){if(n===e.FileWatcherEventKind.Changed)return;var i=c(r);i&&m(i,u(t),n===e.FileWatcherEventKind.Created)},clearCache:g,realpath:t.realpath&&f}}function o(t){return e.toPath(t,r,a)}function s(t){return i.get(e.ensureTrailingDirectorySeparator(t))}function c(t){return s(e.getDirectoryPath(t))}function u(t){return e.getBaseFileName(e.normalizePath(t))}function l(r,n){var a=s(n=e.ensureTrailingDirectorySeparator(n));if(a)return a;try{return function(r,n){var a={files:e.map(t.readDirectory(r,void 0,void 0,["*.*"]),u)||[],directories:t.getDirectories(r)||[]};return i.set(e.ensureTrailingDirectorySeparator(n),a),a}(r,n)}catch(t){return void e.Debug.assert(!i.has(e.ensureTrailingDirectorySeparator(n)))}}function _(e,t){return a(e)===a(t)}function d(t,r){return e.some(t,(function(e){return _(e,r)}))}function p(t,r,n){if(d(t,r)){if(!n)return e.filterMutate(t,(function(e){return!_(e,r)}))}else if(n)return t.push(r)}function f(e){return t.realpath?t.realpath(e):e}function m(e,t,r){p(e.files,t,r)}function g(){i.clear()}},function(e){e[e.None=0]="None",e[e.Partial=1]="Partial",e[e.Full=2]="Full"}(e.ConfigFileProgramReloadLevel||(e.ConfigFileProgramReloadLevel={})),e.updateMissingFilePathsWatch=function(t,r,n){var i=t.getMissingFilePaths(),a=e.arrayToSet(i);e.mutateMap(r,a,{createNewValue:n,onDeleteValue:e.closeFileWatcher})},e.updateWatchingWildcardDirectories=function(t,r,n){function i(e,t){return{watcher:n(e,t),flags:t}}e.mutateMap(t,r,{createNewValue:i,onDeleteValue:u,onExistingValue:function(e,r,n){if(e.flags===r)return;e.watcher.close(),t.set(n,i(n,r))}})},e.isEmittedFileOfProgram=function(e,t){return!!e&&e.isEmittedFile(t)},function(e){e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose"}(t=e.WatchLogLevel||(e.WatchLogLevel={})),e.getWatchFactory=function(a,o,s){return function(r,n,a,o,s){var c=i(r,o),u=r===t.None?function(e,t,r,n,i){return o(e,t,(function(e,t){return r(e,t,i)}),n)}:c,l=i(r,s);r===t.Verbose&&e.sysLog===e.noop&&(e.sysLog=function(e){return n(e)});return{watchFile:function(e,t,r,i,s,u){return c(e,t,r,i,void 0,s,u,o,n,"FileWatcher",a)},watchFilePath:function(e,t,r,i,s,c,l){return u(e,t,r,i,s,c,l,o,n,"FileWatcher",a)},watchDirectory:function(e,t,r,i,o,c){return l(e,t,r,i,void 0,o,c,s,n,"DirectoryWatcher",a)}}}(a,o,s,r,n)},e.closeFileWatcherOf=u}(s||(s={})),function(e){var n,i=/(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;function a(t,r){var n=e.getDirectoryPath(r),i=e.isRootedDiskPath(t)?t:e.combinePaths(n,t);return e.normalizePath(i)}function o(t,r,n){var i;return e.forEach(t,(function(t){var a=e.getNormalizedPathComponents(t,r);if(a.pop(),i){for(var o=Math.min(i.length,a.length),s=0;s<o;s++)if(n(i[s])!==n(a[s])){if(0===s)return!0;i.length=s;break}a.length<i.length&&(i.length=a.length)}else i=a}))?"":i?e.getPathFromPathComponents(i):r}function s(e,t){return c(e,t)}function c(t,r,n){void 0===n&&(n=e.sys);var i,a=e.createMap(),o=e.createGetCanonicalFileName(n.useCaseSensitiveFileNames);function s(t){t.length>e.getRootLength(t)&&!function(e){return!!a.has(e)||!!n.directoryExists(e)&&(a.set(e,!0),!0)}(t)&&(s(e.getDirectoryPath(t)),_.createDirectory?_.createDirectory(t):n.createDirectory(t))}function c(){return e.getDirectoryPath(e.normalizePath(n.getExecutingFilePath()))}var u=e.getNewLineCharacter(t,(function(){return n.newLine})),l=n.realpath&&function(e){return n.realpath(e)},_={getSourceFile:function(t,n,i){var a;try{e.performance.mark("beforeIORead"),a=_.readFile(t),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),a=""}return void 0!==a?e.createSourceFile(t,a,n,r):void 0},getDefaultLibLocation:c,getDefaultLibFileName:function(t){return e.combinePaths(c(),e.getDefaultLibFileName(t))},writeFile:function(r,a,o,c){try{e.performance.mark("beforeIOWrite"),s(e.getDirectoryPath(e.normalizePath(r))),e.isWatchSet(t)&&n.createHash&&n.getModifiedTime?function(t,r,a){i||(i=e.createMap());var o=n.createHash(r),s=n.getModifiedTime(t);if(s){var c=i.get(t);if(c&&c.byteOrderMark===a&&c.hash===o&&c.mtime.getTime()===s.getTime())return}n.writeFile(t,r,a);var u=n.getModifiedTime(t)||e.missingFileModifiedTime;i.set(t,{hash:o,byteOrderMark:a,mtime:u})}(r,a,o):n.writeFile(r,a,o),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){c&&c(e.message)}},getCurrentDirectory:e.memoize((function(){return n.getCurrentDirectory()})),useCaseSensitiveFileNames:function(){return n.useCaseSensitiveFileNames},getCanonicalFileName:o,getNewLine:function(){return u},fileExists:function(e){return n.fileExists(e)},readFile:function(e){return n.readFile(e)},trace:function(e){return n.write(e+u)},directoryExists:function(e){return n.directoryExists(e)},getEnvironmentVariable:function(e){return n.getEnvironmentVariable?n.getEnvironmentVariable(e):""},getDirectories:function(e){return n.getDirectories(e)},realpath:l,readDirectory:function(e,t,r,i,a){return n.readDirectory(e,t,r,i,a)},createDirectory:function(e){return n.createDirectory(e)},createHash:e.maybeBind(n,n.createHash)};return _}function u(t,r){var n=e.diagnosticCategoryName(t)+" TS"+t.code+": "+D(t.messageText,r.getNewLine())+r.getNewLine();if(t.file){var i=e.getLineAndCharacterOfPosition(t.file,t.start),a=i.line,o=i.character,s=t.file.fileName;return e.convertToRelativePath(s,r.getCurrentDirectory(),(function(e){return r.getCanonicalFileName(e)}))+"("+(a+1)+","+(o+1)+"): "+n}return n}e.findConfigFile=function(t,r,n){return void 0===n&&(n="tsconfig.json"),e.forEachAncestorDirectory(t,(function(t){var i=e.combinePaths(t,n);return r(i)?i:void 0}))},e.resolveTripleslashReference=a,e.computeCommonSourceDirectoryOfFilenames=o,e.createCompilerHost=s,e.createCompilerHostWorker=c,e.changeCompilerHostLikeToUseCache=function(t,r,n){var i=t.readFile,a=t.fileExists,o=t.directoryExists,s=t.createDirectory,c=t.writeFile,u=e.createMap(),l=e.createMap(),_=e.createMap(),d=e.createMap(),p=function(e,r){var n=i.call(t,r);return u.set(e,void 0!==n&&n),n};t.readFile=function(n){var a=r(n),o=u.get(a);return void 0!==o?!1!==o?o:void 0:e.fileExtensionIs(n,".json")||e.isBuildInfoFile(n)?p(a,n):i.call(t,n)};var f=n?function(t,i,a,o){var s=r(t),c=d.get(s);if(c)return c;var u=n(t,i,a,o);return u&&(e.isDeclarationFileName(t)||e.fileExtensionIs(t,".json"))&&d.set(s,u),u}:void 0;return t.fileExists=function(e){var n=r(e),i=l.get(n);if(void 0!==i)return i;var o=a.call(t,e);return l.set(n,!!o),o},c&&(t.writeFile=function(e,n,i,a,o){var s=r(e);l.delete(s);var _=u.get(s);if(void 0!==_&&_!==n)u.delete(s),d.delete(s);else if(f){var p=d.get(s);p&&p.text!==n&&d.delete(s)}c.call(t,e,n,i,a,o)}),o&&s&&(t.directoryExists=function(e){var n=r(e),i=_.get(n);if(void 0!==i)return i;var a=o.call(t,e);return _.set(n,!!a),a},t.createDirectory=function(e){var n=r(e);_.delete(n),s.call(t,e)}),{originalReadFile:i,originalFileExists:a,originalDirectoryExists:o,originalCreateDirectory:s,originalWriteFile:c,getSourceFileWithCache:f,readFileWithCache:function(e){var t=r(e),n=u.get(t);return void 0!==n?!1!==n?n:void 0:p(t,e)}}},e.getPreEmitDiagnostics=function(r,n,i){var a=t(r.getConfigFileParsingDiagnostics(),r.getOptionsDiagnostics(i),r.getSyntacticDiagnostics(n,i),r.getGlobalDiagnostics(i),r.getSemanticDiagnostics(n,i));return e.getEmitDeclarations(r.getCompilerOptions())&&e.addRange(a,r.getDeclarationDiagnostics(n,i)),e.sortAndDeduplicateDiagnostics(a)},e.formatDiagnostics=function(e,t){for(var r="",n=0,i=e;n<i.length;n++){r+=u(i[n],t)}return r},e.formatDiagnostic=u,function(e){e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan=""}(n=e.ForegroundColorEscapeSequences||(e.ForegroundColorEscapeSequences={}));var l="",_=" ",d="",p="...",m=" ",g=" ";function y(t){switch(t){case e.DiagnosticCategory.Error:return n.Red;case e.DiagnosticCategory.Warning:return n.Yellow;case e.DiagnosticCategory.Suggestion:return e.Debug.fail("Should never get an Info diagnostic on the command line.");case e.DiagnosticCategory.Message:return n.Blue}}function h(e,t){return t+e+d}function v(e,t){for(;e.length<t;)e=" "+e;return e}function b(t,r,n,i,a,o){var s=e.getLineAndCharacterOfPosition(t,r),c=s.line,u=s.character,f=e.getLineAndCharacterOfPosition(t,r+n),m=f.line,g=f.character,y=e.getLineAndCharacterOfPosition(t,t.text.length).line,b=m-c>=4,x=(m+1+"").length;b&&(x=Math.max(p.length,x));for(var D="",S=c;S<=m;S++){D+=o.getNewLine(),b&&c+1<S&&S<m-1&&(D+=i+h(v(p,x),l)+_+o.getNewLine(),S=m-1);var T=e.getPositionOfLineAndCharacter(t,S,0),E=S<y?e.getPositionOfLineAndCharacter(t,S+1,0):t.text.length,C=t.text.slice(T,E);if(C=(C=C.replace(/\s+$/g,"")).replace("\t"," "),D+=i+h(v(S+1+"",x),l)+_,D+=C+o.getNewLine(),D+=i+h(v("",x),l)+_,D+=a,S===c){var k=S===m?g:void 0;D+=C.slice(0,u).replace(/\S/g," "),D+=C.slice(u,k).replace(/./g,"~")}else D+=S===m?C.slice(0,g).replace(/./g,"~"):C.replace(/./g,"~");D+=d}return D}function x(t,r,i,a){void 0===a&&(a=h);var o=e.getLineAndCharacterOfPosition(t,r),s=o.line,c=o.character,u="";return u+=a(i?e.convertToRelativePath(t.fileName,i.getCurrentDirectory(),(function(e){return i.getCanonicalFileName(e)})):t.fileName,n.Cyan),u+=":",u+=a(""+(s+1),n.Yellow),u+=":",u+=a(""+(c+1),n.Yellow)}function D(t,r,n){if(void 0===n&&(n=0),e.isString(t))return t;if(void 0===t)return"";var i="";if(n){i+=r;for(var a=0;a<n;a++)i+=" "}if(i+=t.messageText,n++,t.next)for(var o=0,s=t.next;o<s.length;o++){i+=D(s[o],r,n)}return i}function S(t,r,n,i){if(0===t.length)return[];for(var a=[],o=e.createMap(),s=0,c=t;s<c.length;s++){var u=c[s],l=void 0;o.has(u)?l=o.get(u):o.set(u,l=i(u,r,n)),a.push(l)}return a}function T(t,r){return void 0===r&&(r=t),{fileExists:function(e){return r.fileExists(e)},readDirectory:function(t,n,i,a,o){return e.Debug.assertDefined(r.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),r.readDirectory(t,n,i,a,o)},readFile:function(e){return r.readFile(e)},useCaseSensitiveFileNames:t.useCaseSensitiveFileNames(),getCurrentDirectory:function(){return t.getCurrentDirectory()},onUnRecoverableConfigFileDiagnostic:t.onUnRecoverableConfigFileDiagnostic||e.returnUndefined,trace:t.trace?function(e){return t.trace(e)}:void 0}}function E(t,r,n){if(!t)return e.emptyArray;for(var i,a=0;a<t.length;a++){var o=t[a],s=r(o,a);if(o.prepend&&s&&s.options){if(!(s.options.outFile||s.options.out))continue;var c=e.getOutputPathsForBundle(s.options,!0),u=c.jsFilePath,l=c.sourceMapFilePath,_=c.declarationFilePath,d=c.declarationMapPath,p=c.buildInfoPath,f=e.createInputFiles(n,u,l,_,d,p);(i||(i=[])).push(f)}}return i||e.emptyArray}function C(t,r){var n=r||t;return e.resolveConfigFileProjectName(n.path)}function k(t,r){switch(r.extension){case".ts":case".d.ts":return;case".tsx":return n();case".jsx":return n()||i();case".js":return i();case".json":return t.resolveJsonModule?void 0:e.Diagnostics.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used}function n(){return t.jsx?void 0:e.Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return t.allowJs||!e.getStrictOptionValue(t,"noImplicitAny")?void 0:e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function N(e){for(var t=e.imports,r=e.moduleAugmentations,n=t.map((function(e){return e.text})),i=0,a=r;i<a.length;i++){var o=a[i];10===o.kind&&n.push(o.text)}return n}e.formatColorAndReset=h,e.formatLocation=x,e.formatDiagnosticsWithColorAndContext=function(t,r){for(var i="",a=0,o=t;a<o.length;a++){var s=o[a];if(s.file)i+=x(_=s.file,d=s.start,r),i+=" - ";if(i+=h(e.diagnosticCategoryName(s),y(s.category)),i+=h(" TS"+s.code+": ",n.Grey),i+=D(s.messageText,r.getNewLine()),s.file&&(i+=r.getNewLine(),i+=b(s.file,s.start,s.length,"",y(s.category),r),s.relatedInformation)){i+=r.getNewLine();for(var c=0,u=s.relatedInformation;c<u.length;c++){var l=u[c],_=l.file,d=l.start,p=l.length,f=l.messageText;_&&(i+=r.getNewLine(),i+=m+x(_,d,r),i+=b(_,d,p,g,n.Cyan,r)),i+=r.getNewLine(),i+=g+D(f,r.getNewLine())}}i+=r.getNewLine()}return i},e.flattenDiagnosticMessageText=D,e.loadWithLocalCache=S,e.inferredTypesContainingFile="__inferred type names__.ts",e.isProgramUptoDate=function(t,r,n,i,a,o,s,c){if(!t||s)return!1;if(t.getRootFileNames().length!==r.length)return!1;var u;if(!e.arrayIsEqualTo(t.getProjectReferences(),c,(function(r,n,i){if(!e.projectReferenceIsEqualTo(r,n))return!1;return function t(r,n){if(r)return!!e.contains(u,r)||!!_(r.sourceFile)&&((u||(u=[])).push(r),!e.forEach(r.references,(function(e,n){return!t(e,r.commandLine.projectReferences[n])})));return!a(C(n))}(t.getResolvedProjectReferences()[i],r)})))return!1;if(t.getSourceFiles().some((function(e){return!_(e)||o(e.path)})))return!1;if(t.getMissingFilePaths().some(a))return!1;var l=t.getCompilerOptions();return!!e.compareDataObjects(l,n)&&(!l.configFile||!n.configFile||l.configFile.text===n.configFile.text);function _(e){return e.version===i(e.resolvedPath)}},e.getConfigFileParsingDiagnostics=function(e){return e.options.configFile?t(e.options.configFile.parseDiagnostics,e.errors):e.errors},e.createProgram=function(n,c,u,l,_){var d,p,m,g,y,h,v,b,x,D=e.isArray(n)?function(e,t,r,n,i){return{rootNames:e,options:t,host:r,oldProgram:n,configFileParsingDiagnostics:i}}(n,c,u,l,_):n,A=D.rootNames,F=D.options,P=D.configFileParsingDiagnostics,w=D.projectReferences,I=D.oldProgram,O=e.createMap(),M={},L={},R=e.createMap(),B=e.createDiagnosticCollection(),j="number"==typeof F.maxNodeModuleJsDepth?F.maxNodeModuleJsDepth:0,K=0,J=e.createMap(),z=e.createMap();e.performance.mark("beforeProgram");var U,V,q,W,G=D.host||s(F),H=T(G),Y=F.noLib,X=e.memoize((function(){return G.getDefaultLibFileName(F)})),Q=G.getDefaultLibLocation?G.getDefaultLibLocation():e.getDirectoryPath(X()),$=e.createDiagnosticCollection(),Z=G.getCurrentDirectory(),ee=e.getSupportedExtensions(F),te=e.getSuppoertedExtensionsWithJsonIfResolveJsonModule(F,ee),re=e.createMap(),ne=G.hasInvalidatedResolution||e.returnFalse;if(G.resolveModuleNames)q=function(t,r,n,i){return G.resolveModuleNames(e.Debug.assertEachDefined(t),r,n,i,F).map((function(t){if(!t||void 0!==t.extension)return t;var r=e.clone(t);return r.extension=e.extensionFromPath(t.resolvedFileName),r}))};else{V=e.createModuleResolutionCache(Z,(function(e){return G.getCanonicalFileName(e)}),F);var ie=function(t,r,n){return e.resolveModuleName(t,r,F,G,V,n).resolvedModule};q=function(t,r,n,i){return S(e.Debug.assertEachDefined(t),r,i,ie)}}if(G.resolveTypeReferenceDirectives)W=function(t,r,n){return G.resolveTypeReferenceDirectives(e.Debug.assertEachDefined(t),r,n,F)};else{var ae=function(t,r,n){return e.resolveTypeReferenceDirective(t,r,F,G,n).resolvedTypeReferenceDirective};W=function(t,r,n){return S(e.Debug.assertEachDefined(t),r,n,ae)}}var oe,se,ce,ue,le,_e,de=e.createMap(),pe=e.createMap(),fe=e.createMultiMap(),me=e.createMap(),ge=G.useCaseSensitiveFileNames()?e.createMap():void 0,ye=!!G.useSourceOfProjectReferenceRedirect&&G.useSourceOfProjectReferenceRedirect(),he=function(t,r){if(!t)return!1;var n=t.getCompilerOptions();return!!e.sourceFileAffectingCompilerOptions.some((function(t){return!e.isJsonEqual(e.getCompilerOptionValue(n,t),e.getCompilerOptionValue(r,t))}))}(I,F);if(2!==(_e=function(){if(!I)return 0;var t=I.getCompilerOptions();if(e.changesAffectModuleResolution(t,F))return I.structureIsReused=0;e.Debug.assert(!(3&I.structureIsReused));var r=I.getRootFileNames();if(!e.arrayIsEqualTo(r,A))return I.structureIsReused=0;if(!e.arrayIsEqualTo(F.types,t.types))return I.structureIsReused=0;if(Et(I.getProjectReferences(),I.getResolvedProjectReferences(),(function(e,t,r){var n=Mt((r?r.commandLine.projectReferences:w)[t]);return e?!n||n.sourceFile!==e.sourceFile:void 0!==n}),(function(t,r){var n=r?Ct(r.sourceFile.path).commandLine.projectReferences:w;return!e.arrayIsEqualTo(t,n,e.projectReferenceIsEqualTo)})))return I.structureIsReused=0;w&&(se=w.map(Mt),G.setResolvedProjectReferenceCallbacks&&G.setResolvedProjectReferenceCallbacks({getSourceOfProjectReferenceRedirect:St,forEachResolvedProjectReference:Dt}));var n=[],i=[];if(I.structureIsReused=2,I.getMissingFilePaths().some((function(e){return G.fileExists(e)})))return I.structureIsReused=0;var a,o=I.getSourceFiles();!function(e){e[e.Exists=0]="Exists",e[e.Modified=1]="Modified"}(a||(a={}));for(var s=e.createMap(),c=0,u=o;c<u.length;c++){var l=u[c];if(!(k=G.getSourceFileByPath?G.getSourceFileByPath(l.fileName,l.resolvedPath,F.target,void 0,he):G.getSourceFile(l.fileName,F.target,void 0,he)))return I.structureIsReused=0;e.Debug.assert(!k.redirectInfo,"Host should not return a redirect source file from `getSourceFile`");var _=void 0;if(l.redirectInfo){if(k!==l.redirectInfo.unredirected)return I.structureIsReused=0;_=!1,k=l}else if(I.redirectTargetsMap.has(l.path)){if(k!==l)return I.structureIsReused=0;_=!1}else _=k!==l;k.path=l.path,k.originalFileName=l.originalFileName,k.resolvedPath=l.resolvedPath,k.fileName=l.fileName;var d=I.sourceFileToPackageName.get(l.path);if(void 0!==d){var p=s.get(d),f=_?1:0;if(void 0!==p&&1===f||1===p)return I.structureIsReused=0;s.set(d,f)}if(_){if(!e.arrayIsEqualTo(l.libReferenceDirectives,k.libReferenceDirectives,ut))return I.structureIsReused=0;l.hasNoDefaultLib!==k.hasNoDefaultLib&&(I.structureIsReused=1),e.arrayIsEqualTo(l.referencedFiles,k.referencedFiles,ut)||(I.structureIsReused=1),_t(k),e.arrayIsEqualTo(l.imports,k.imports,lt)||(I.structureIsReused=1),e.arrayIsEqualTo(l.moduleAugmentations,k.moduleAugmentations,lt)||(I.structureIsReused=1),(3145728&l.flags)!=(3145728&k.flags)&&(I.structureIsReused=1),e.arrayIsEqualTo(l.typeReferenceDirectives,k.typeReferenceDirectives,ut)||(I.structureIsReused=1),i.push({oldFile:l,newFile:k})}else ne(l.path)&&(I.structureIsReused=1,i.push({oldFile:l,newFile:k}));n.push(k)}if(2!==I.structureIsReused)return I.structureIsReused;for(var g=i.map((function(e){return e.oldFile})),y=0,h=o;y<h.length;y++){var v=h[y];if(!e.contains(g,v))for(var b=0,D=v.ambientModuleNames;b<D.length;b++){var S=D[b];O.set(S,v.fileName)}}for(var T=0,E=i;T<E.length;T++){var C=E[T],k=(l=C.oldFile,C.newFile),P=e.getNormalizedAbsolutePath(k.originalFileName,Z),M=N(k),L=Ue(M,P,k);if(e.hasChangesInResolutions(M,L,l.resolvedModules,e.moduleResolutionIsEqualTo)?(I.structureIsReused=1,k.resolvedModules=e.zipToMap(M,L)):k.resolvedModules=l.resolvedModules,W){var j=e.map(k.typeReferenceDirectives,(function(e){return e.fileName.toLocaleLowerCase()})),K=W(j,P,xt(k.originalFileName));e.hasChangesInResolutions(j,K,l.resolvedTypeReferenceDirectiveNames,e.typeDirectiveIsEqualTo)?(I.structureIsReused=1,k.resolvedTypeReferenceDirectiveNames=e.zipToMap(j,K)):k.resolvedTypeReferenceDirectiveNames=l.resolvedTypeReferenceDirectiveNames}}if(2!==I.structureIsReused)return I.structureIsReused;if(G.hasChangedAutomaticTypeDirectiveNames)return I.structureIsReused=1;oe=I.getMissingFilePaths(),x=I.getRefFileMap();for(var J=0,U=n;J<U.length;J++){var V=(k=U[J]).path;if(yt(k,V,k.resolvedPath),ye){var q=vt(k.fileName);if(q&&!q.commandLine.options.outFile&&!q.commandLine.options.out){var H=bt(q,k.fileName);yt(k,Ke(H),void 0)}}I.isSourceFileFromExternalLibrary(I.getSourceFileByPath(k.resolvedPath))&&z.set(V,!0)}m=n,B=I.getFileProcessingDiagnostics();for(var Y=0,X=i;Y<X.length;Y++){var Q=X[Y];B.reattachFileDiagnostics(Q.newFile)}return R=I.getResolvedTypeReferenceDirectives(),pe=I.sourceFileToPackageName,fe=I.redirectTargetsMap,I.structureIsReused=2}())){if(d=[],p=[],w&&(se||(se=w.map(Mt)),G.setResolvedProjectReferenceCallbacks&&G.setResolvedProjectReferenceCallbacks({getSourceOfProjectReferenceRedirect:St,forEachResolvedProjectReference:Dt}),A.length))for(var ve=0,be=se;ve<be.length;ve++){var xe=be[ve];if(xe){var De=xe.commandLine.options.outFile||xe.commandLine.options.out;if(ye){if(De||e.getEmitModuleKind(xe.commandLine.options)===e.ModuleKind.None)for(var Se=0,Te=xe.commandLine.fileNames;Se<Te.length;Se++){pt(ke=Te[Se],!1,!1,void 0)}}else if(De)pt(e.changeExtension(De,".d.ts"),!1,!1,void 0);else if(e.getEmitModuleKind(xe.commandLine.options)===e.ModuleKind.None)for(var Ee=0,Ce=xe.commandLine.fileNames;Ee<Ce.length;Ee++){var ke=Ce[Ee];e.fileExtensionIs(ke,".d.ts")||pt(e.getOutputDeclarationFileName(ke,xe.commandLine,!G.useCaseSensitiveFileNames()),!1,!1,void 0)}}}e.forEach(A,(function(e){return ct(e,!1,!1)}));var Ne=A.length?e.getAutomaticTypeDirectiveNames(F,G):e.emptyArray;if(Ne.length)for(var Ae=F.configFilePath?e.getDirectoryPath(F.configFilePath):G.getCurrentDirectory(),Fe=e.combinePaths(Ae,e.inferredTypesContainingFile),Pe=W(Ne,Fe),we=0;we<Ne.length;we++)At(Ne[we],Pe[we]);if(A.length&&!Y){var Ie=X();!F.lib&&Ie?ct(Ie,!0,!1):e.forEach(F.lib,(function(t){ct(e.combinePaths(Q,t),!0,!1)}))}oe=e.arrayFrom(e.mapDefinedIterator(me.entries(),(function(e){var t=e[0];return void 0===e[1]?t:void 0}))),m=e.stableSort(d,(function(t,r){return e.compareValues(je(t),je(r))})).concat(p),d=void 0,p=void 0}if(e.Debug.assert(!!oe),I&&G.onReleaseOldSourceFile){for(var Oe=0,Me=I.getSourceFiles();Oe<Me.length;Oe++){var Le=Me[Oe],Re=Qe(Le.resolvedPath);(he||!Re||Le.resolvedPath===Le.path&&Re.resolvedPath!==Le.path)&&G.onReleaseOldSourceFile(Le,I.getCompilerOptions(),!!Qe(Le.path))}I.forEachResolvedProjectReference((function(e,t){e&&!Ct(t)&&G.onReleaseOldSourceFile(e.sourceFile,I.getCompilerOptions(),!1)}))}I=void 0;var Be={getRootFileNames:function(){return A},getSourceFile:Xe,getSourceFileByPath:Qe,getSourceFiles:function(){return m},getMissingFilePaths:function(){return oe},getRefFileMap:function(){return x},getCompilerOptions:function(){return F},getSyntacticDiagnostics:function(e,t){return $e(e,Ze,t)},getOptionsDiagnostics:function(){return e.sortAndDeduplicateDiagnostics(e.concatenate(B.getGlobalDiagnostics(),e.concatenate($.getGlobalDiagnostics(),function(){if(!F.configFile)return e.emptyArray;var t=$.getDiagnostics(F.configFile.fileName);return Dt((function(r){r&&(t=e.concatenate(t,$.getDiagnostics(r.sourceFile.fileName)))})),t}())))},getGlobalDiagnostics:function(){return A.length?e.sortAndDeduplicateDiagnostics(Ge().getGlobalDiagnostics().slice()):e.emptyArray},getSemanticDiagnostics:function(e,t){return $e(e,tt,t)},getSuggestionDiagnostics:function(e,t){return et((function(){return Ge().getSuggestionDiagnostics(e,t)}))},getDeclarationDiagnostics:function(e,t){var r=Be.getCompilerOptions();return!e||r.out||r.outFile?it(e,t):$e(e,st,t)},getTypeChecker:He,getClassifiableNames:function(){if(!b){He(),b=e.createUnderscoreEscapedMap();for(var t=0,r=m;t<r.length;t++){var n=r[t];e.copyEntries(n.classifiableNames,b)}}return b},getDiagnosticsProducingTypeChecker:Ge,getCommonSourceDirectory:ze,emit:function(r,n,i,a,o,s){return et((function(){return function(r,n,i,a,o,s,c){var u=[];if(!c){if(F.noEmit)return{diagnostics:u,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};if(F.noEmitOnError){var l=t(r.getOptionsDiagnostics(a),r.getSyntacticDiagnostics(n,a),r.getGlobalDiagnostics(a),r.getSemanticDiagnostics(n,a));if(0===l.length&&e.getEmitDeclarations(r.getCompilerOptions())&&(u=r.getDeclarationDiagnostics(void 0,a)),l.length>0||u.length>0)return{diagnostics:e.concatenate(l,u),sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0}}}var _=Ge().getEmitResolver(F.outFile||F.out?void 0:n,a);e.performance.mark("beforeEmit");var d=e.emitFiles(_,Ve(i),n,e.getTransformers(F,s,o),o,!1,c);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),d}(Be,r,n,i,a,o,s)}))},getCurrentDirectory:function(){return Z},getNodeCount:function(){return Ge().getNodeCount()},getIdentifierCount:function(){return Ge().getIdentifierCount()},getSymbolCount:function(){return Ge().getSymbolCount()},getTypeCount:function(){return Ge().getTypeCount()},getRelationCacheSizes:function(){return Ge().getRelationCacheSizes()},getFileProcessingDiagnostics:function(){return B},getResolvedTypeReferenceDirectives:function(){return R},isSourceFileFromExternalLibrary:We,isSourceFileDefaultLibrary:function(t){if(t.hasNoDefaultLib)return!0;if(!F.noLib)return!1;var r=G.useCaseSensitiveFileNames()?e.equateStringsCaseSensitive:e.equateStringsCaseInsensitive;return F.lib?e.some(F.lib,(function(n){return r(t.fileName,e.combinePaths(Q,n))})):r(t.fileName,X())},dropDiagnosticsProducingTypeChecker:function(){h=void 0},getSourceFileFromReference:function(e,t){return dt(a(t.fileName,e.fileName),(function(e){return me.get(Ke(e))||void 0}))},getLibFileFromReference:function(t){var r=t.fileName.toLocaleLowerCase(),n=e.libMap.get(r);if(n)return Xe(e.combinePaths(Q,n))},sourceFileToPackageName:pe,redirectTargetsMap:fe,isEmittedFile:function(t){if(F.noEmit)return!1;var r=Ke(t);if(Qe(r))return!1;var n=F.outFile||F.out;if(n)return Gt(r,n)||Gt(r,e.removeFileExtension(n)+".d.ts");if(F.declarationDir&&e.containsPath(F.declarationDir,r,Z,!G.useCaseSensitiveFileNames()))return!0;if(F.outDir)return e.containsPath(F.outDir,r,Z,!G.useCaseSensitiveFileNames());if(e.fileExtensionIsOneOf(r,e.supportedJSExtensions)||e.fileExtensionIs(r,".d.ts")){var i=e.removeFileExtension(r);return!!Qe(i+".ts")||!!Qe(i+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return P||e.emptyArray},getResolvedModuleWithFailedLookupLocationsFromCache:function(t,r){return V&&e.resolveModuleNameFromCache(t,r,V)},getProjectReferences:function(){return w},getResolvedProjectReferences:function(){return se},getProjectReferenceRedirect:ht,getResolvedProjectReferenceToRedirect:xt,getResolvedProjectReferenceByPath:Ct,forEachResolvedProjectReference:Dt,isSourceOfProjectReferenceRedirect:Tt,emitBuildInfo:function(t){e.Debug.assert(!F.out&&!F.outFile),e.performance.mark("beforeEmit");var r=e.emitFiles(e.notImplementedResolver,Ve(t),void 0,e.noTransformers,!1,!0);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),r},getProbableSymlinks:Ht};return function(){F.strictPropertyInitialization&&!e.getStrictOptionValue(F,"strictNullChecks")&&Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks");F.isolatedModules&&(F.out&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","isolatedModules"),F.outFile&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"outFile","isolatedModules"));F.inlineSourceMap&&(F.sourceMap&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),F.mapRoot&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap"));F.paths&&void 0===F.baseUrl&&Kt(e.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option,"paths");F.composite&&(!1===F.declaration&&Kt(e.Diagnostics.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===F.incremental&&Kt(e.Diagnostics.Composite_projects_may_not_disable_incremental_compilation,"declaration"));F.tsBuildInfoFile?e.isIncrementalCompilation(F)||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite"):!F.incremental||F.outFile||F.out||F.configFilePath||$.add(e.createCompilerDiagnostic(e.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));if(function(){var t=F.noEmit||F.suppressOutputPathCheck?void 0:e.getTsBuildInfoEmitOutputFilePath(F);Et(w,se,(function(r,n,i){var a=(i?i.commandLine.projectReferences:w)[n],o=i&&i.sourceFile;if(r){var s=r.commandLine.options;if(!s.composite)(i?i.commandLine.fileNames:A).length&&zt(o,n,e.Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true,a.path);if(a.prepend){var c=s.outFile||s.out;c?G.fileExists(c)||zt(o,n,e.Diagnostics.Output_file_0_from_project_1_does_not_exist,c,a.path):zt(o,n,e.Diagnostics.Cannot_prepend_project_0_because_it_does_not_have_outFile_set,a.path)}!i&&t&&t===e.getTsBuildInfoEmitOutputFilePath(s)&&(zt(o,n,e.Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,t,a.path),re.set(Ke(t),!0))}else zt(o,n,e.Diagnostics.File_0_not_found,a.path)}))}(),F.composite)for(var t=e.arrayToSet(A,Ke),r=0,n=m;r<n.length;r++){var i=n[r];Je(i)&&!t.has(i.path)&&Lt(i,t,e.Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,i.fileName,F.configFilePath||"")}if(F.paths)for(var a in F.paths)if(e.hasProperty(F.paths,a))if(e.hasZeroOrOneAsteriskCharacter(a)||Bt(!0,a,e.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,a),e.isArray(F.paths[a])){var o=F.paths[a].length;0===o&&Bt(!1,a,e.Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,a);for(var s=0;s<o;s++){var c=F.paths[a][s],u=f(c);"string"===u?e.hasZeroOrOneAsteriskCharacter(c)||Rt(a,s,e.Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character,c,a):Rt(a,s,e.Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2,c,a,u)}}else Bt(!1,a,e.Diagnostics.Substitutions_for_pattern_0_should_be_an_array,a);F.sourceMap||F.inlineSourceMap||(F.inlineSources&&Kt(e.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"inlineSources"),F.sourceRoot&&Kt(e.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"sourceRoot"));F.out&&F.outFile&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","outFile");!F.mapRoot||F.sourceMap||F.declarationMap||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"mapRoot","sourceMap","declarationMap");F.declarationDir&&(e.getEmitDeclarations(F)||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationDir","declaration","composite"),(F.out||F.outFile)&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"declarationDir",F.out?"out":"outFile"));F.declarationMap&&!e.getEmitDeclarations(F)&&Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationMap","declaration","composite");F.lib&&F.noLib&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"lib","noLib");F.noImplicitUseStrict&&e.getStrictOptionValue(F,"alwaysStrict")&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"noImplicitUseStrict","alwaysStrict");var l=F.target||0,_=F.outFile||F.out,d=e.find(m,(function(t){return e.isExternalModule(t)&&!t.isDeclarationFile}));if(F.isolatedModules){F.module===e.ModuleKind.None&&l<2&&Kt(e.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target");var p=e.find(m,(function(t){return!e.isExternalModule(t)&&!e.isSourceFileJS(t)&&!t.isDeclarationFile&&6!==t.scriptKind}));if(p){var g=e.getErrorSpanForNode(p,p);$.add(e.createFileDiagnostic(p,g.start,g.length,e.Diagnostics.All_files_must_be_modules_when_the_isolatedModules_flag_is_provided))}}else if(d&&l<2&&F.module===e.ModuleKind.None){g=e.getErrorSpanForNode(d,d.externalModuleIndicator);$.add(e.createFileDiagnostic(d,g.start,g.length,e.Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(_&&!F.emitDeclarationOnly)if(F.module&&F.module!==e.ModuleKind.AMD&&F.module!==e.ModuleKind.System)Kt(e.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0,F.out?"out":"outFile","module");else if(void 0===F.module&&d){g=e.getErrorSpanForNode(d,d.externalModuleIndicator);$.add(e.createFileDiagnostic(d,g.start,g.length,e.Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,F.out?"out":"outFile"))}F.resolveJsonModule&&(e.getEmitModuleResolutionKind(F)!==e.ModuleResolutionKind.NodeJs?Kt(e.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy,"resolveJsonModule"):e.hasJsonModuleEmitEnabled(F)||Kt(e.Diagnostics.Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext,"resolveJsonModule","module"));if(F.outDir||F.sourceRoot||F.mapRoot){var y=ze();F.outDir&&""===y&&m.some((function(t){return e.getRootLength(t.fileName)>1}))&&Kt(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}F.useDefineForClassFields&&0===l&&Kt(e.Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3,"useDefineForClassFields");F.checkJs&&!F.allowJs&&$.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"));F.emitDeclarationOnly&&(e.getEmitDeclarations(F)||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),F.noEmit&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit"));F.emitDecoratorMetadata&&!F.experimentalDecorators&&Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators");F.jsxFactory?(F.reactNamespace&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),e.parseIsolatedEntityName(F.jsxFactory,l)||Jt("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,F.jsxFactory)):F.reactNamespace&&!e.isIdentifierText(F.reactNamespace,l)&&Jt("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,F.reactNamespace);if(!F.noEmit&&!F.suppressOutputPathCheck){var h=Ve(),v=e.createMap();e.forEachEmittedFile(h,(function(e){F.emitDeclarationOnly||b(e.jsFilePath,v),b(e.declarationFilePath,v)}))}function b(t,r){if(t){var n=Ke(t);if(me.has(n)){var i=void 0;F.configFilePath||(i=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),i=e.chainDiagnosticMessages(i,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),Wt(t,e.createCompilerDiagnosticFromMessageChain(i))}var a=G.useCaseSensitiveFileNames()?n:n.toLocaleLowerCase();r.has(a)?Wt(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):r.set(a,!0)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),Be;function je(t){if(e.containsPath(Q,t.fileName,!1)){var r=e.getBaseFileName(t.fileName);if("lib.d.ts"===r||"lib.es6.d.ts"===r)return 0;var n=e.removeSuffix(e.removePrefix(r,"lib."),".d.ts"),i=e.libs.indexOf(n);if(-1!==i)return i+1}return e.libs.length+2}function Ke(t){return e.toPath(t,Z,wt)}function Je(t){return e.sourceFileMayBeEmitted(t,F,We,xt)&&!Tt(t.fileName)}function ze(){if(void 0===y){var t=e.filter(m,(function(e){return Je(e)}));F.rootDir&&Ot(t,F.rootDir)?y=e.getNormalizedAbsolutePath(F.rootDir,Z):F.composite&&F.configFilePath?Ot(t,y=e.getDirectoryPath(e.normalizeSlashes(F.configFilePath))):(r=t,y=o(e.mapDefined(r,(function(e){return e.isDeclarationFile?void 0:e.fileName})),Z,wt)),y&&y[y.length-1]!==e.directorySeparator&&(y+=e.directorySeparator)}var r;return y}function Ue(t,r,n){if(0===_e&&!n.ambientModuleNames.length)return q(t,r,void 0,xt(n.originalFileName));var i,a,o,s=I&&I.getSourceFile(r);if(s!==n&&n.resolvedModules){for(var c=[],u=0,l=t;u<l.length;u++){var _=l[u],d=n.resolvedModules.get(_);c.push(d)}return c}for(var p={},f=0;f<t.length;f++){_=t[f];if(n===s&&!ne(s.path)){var m=s&&s.resolvedModules.get(_);if(m){e.isTraceEnabled(F,G)&&e.trace(G,e.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program,_,r),(a||(a=new Array(t.length)))[f]=m,(o||(o=[])).push(_);continue}}var g=!1;e.contains(n.ambientModuleNames,_)?(g=!0,e.isTraceEnabled(F,G)&&e.trace(G,e.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1,_,r)):g=v(_),g?(a||(a=new Array(t.length)))[f]=p:(i||(i=[])).push(_)}var y=i&&i.length?q(i,r,o,xt(n.originalFileName)):e.emptyArray;if(!a)return e.Debug.assert(y.length===t.length),y;var h=0;for(f=0;f<a.length;f++)a[f]?a[f]===p&&(a[f]=void 0):(a[f]=y[h],h++);return e.Debug.assert(h===y.length),a;function v(t){var r=e.getResolvedModule(s,t),n=r&&I.getSourceFile(r.resolvedFileName);if(r&&n)return!1;var i=O.get(t);return!!i&&(e.isTraceEnabled(F,G)&&e.trace(G,e.Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified,t,i),!0)}}function Ve(t){return r(r({getPrependNodes:qe,getCanonicalFileName:wt,getCommonSourceDirectory:Be.getCommonSourceDirectory,getCompilerOptions:Be.getCompilerOptions,getCurrentDirectory:function(){return Z},getNewLine:function(){return G.getNewLine()},getSourceFile:Be.getSourceFile,getSourceFileByPath:Be.getSourceFileByPath,getSourceFiles:Be.getSourceFiles,getLibFileFromReference:Be.getLibFileFromReference,isSourceFileFromExternalLibrary:We,getResolvedProjectReferenceToRedirect:xt,getProbableSymlinks:Ht,writeFile:t||function(e,t,r,n,i){return G.writeFile(e,t,r,n,i)},isEmitBlocked:Ye,readFile:function(e){return G.readFile(e)},fileExists:function(t){var r=Ke(t);return!!Qe(r)||!e.contains(oe,r)&&G.fileExists(t)}},G.directoryExists?{directoryExists:function(e){return G.directoryExists(e)}}:{}),{useCaseSensitiveFileNames:function(){return G.useCaseSensitiveFileNames()},getProgramBuildInfo:function(){return Be.getProgramBuildInfo&&Be.getProgramBuildInfo()},getSourceFileFromReference:function(e,t){return Be.getSourceFileFromReference(e,t)},redirectTargetsMap:fe})}function qe(){return E(w,(function(e,t){return se[t].commandLine}),(function(e){var t=Ke(e),r=Qe(t);return r?r.text:me.has(t)?void 0:G.readFile(t)}))}function We(e){return!!z.get(e.path)}function Ge(){return h||(h=e.createTypeChecker(Be,!0))}function He(){return v||(v=e.createTypeChecker(Be,!1))}function Ye(e){return re.has(Ke(e))}function Xe(e){return Qe(Ke(e))}function Qe(e){return me.get(e)||void 0}function $e(t,r,n){return t?r(t,n):e.sortAndDeduplicateDiagnostics(e.flatMap(Be.getSourceFiles(),(function(e){return n&&n.throwIfCancellationRequested(),r(e,n)})))}function Ze(t){return e.isSourceFileJS(t)?(t.additionalSyntacticDiagnostics||(t.additionalSyntacticDiagnostics=function(t){return et((function(){var r=[],n=t;return i(t),r;function i(t){switch(n.kind){case 155:case 158:case 160:if(n.questionToken===t)return void r.push(s(t,e.Diagnostics._0_can_only_be_used_in_a_ts_file,"?"));case 159:case 161:case 162:case 163:case 200:case 243:case 201:case 241:if(n.type===t)return void r.push(s(t,e.Diagnostics.types_can_only_be_used_in_a_ts_file))}switch(t.kind){case 252:return void r.push(s(t,e.Diagnostics.import_can_only_be_used_in_a_ts_file));case 258:if(t.isExportEquals)return void r.push(s(t,e.Diagnostics.export_can_only_be_used_in_a_ts_file));break;case 277:if(112===t.token)return void r.push(s(t,e.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file));break;case 245:return void r.push(s(t,e.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file));case 248:return void r.push(s(t,e.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file));case 246:return void r.push(s(t,e.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file));case 247:return void r.push(s(t,e.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file));case 217:return void r.push(s(t,e.Diagnostics.non_null_assertions_can_only_be_used_in_a_ts_file));case 216:return void r.push(s(t.type,e.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file));case 198:e.Debug.fail()}var o=n;n=t,e.forEachChild(t,i,a),n=o}function a(t){switch(n.decorators!==t||F.experimentalDecorators||r.push(s(n,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)),n.kind){case 244:case 213:case 160:case 161:case 162:case 163:case 200:case 243:case 201:if(t===n.typeParameters)return void r.push(o(t,e.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file));case 224:if(t===n.modifiers)return function(t,n){for(var i=0,a=t;i<a.length;i++){var o=a[i];switch(o.kind){case 80:if(n)continue;case 118:case 116:case 117:case 137:case 129:case 121:r.push(s(o,e.Diagnostics._0_can_only_be_used_in_a_ts_file,e.tokenToString(o.kind)))}}}(n.modifiers,224===n.kind);break;case 158:if(t===n.modifiers){for(var a=0,c=t;a<c.length;a++){var u=c[a];119!==u.kind&&r.push(s(u,e.Diagnostics._0_can_only_be_used_in_a_ts_file,e.tokenToString(u.kind)))}return}break;case 155:if(t===n.modifiers)return void r.push(o(t,e.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file));break;case 195:case 196:case 215:case 265:case 266:case 197:if(t===n.typeArguments)return void r.push(o(t,e.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file))}for(var l=0,_=t;l<_.length;l++){i(_[l])}}function o(r,n,i,a,o){var s=r.pos;return e.createFileDiagnostic(t,s,r.end-s,n,i,a,o)}function s(r,n,i,a,o){return e.createDiagnosticForNodeInSourceFile(t,r,n,i,a,o)}}))}(t)),e.concatenate(t.additionalSyntacticDiagnostics,t.parseDiagnostics)):t.parseDiagnostics}function et(t){try{return t()}catch(t){throw t instanceof e.OperationCanceledException&&(v=void 0,h=void 0),t}}function tt(e,t){return ot(e,t,M,rt)}function rt(t,r){return et((function(){if(e.skipTypeChecking(t,F,Be))return e.emptyArray;var n=Ge();e.Debug.assert(!!t.bindDiagnostics);for(var i,a=e.isCheckJsEnabledForFile(t,F),o=!(!!t.checkJsDirective&&!1===t.checkJsDirective.enabled)&&(3===t.scriptKind||4===t.scriptKind||5===t.scriptKind||a||7===t.scriptKind),s=0,c=[o?t.bindDiagnostics:e.emptyArray,o?n.getDiagnostics(t,r):e.emptyArray,B.getDiagnostics(t.fileName),$.getDiagnostics(t.fileName),a?t.jsDocDiagnostics:void 0];s<c.length;s++){var u=c[s];if(u)for(var l=0,_=u;l<_.length;l++){var d=_[l];nt(d)&&(i=e.append(i,d))}}return i}))}function nt(t){var r=t.file,n=t.start;if(r)for(var a=e.getLineStarts(r),o=e.computeLineAndCharacterOfPosition(a,n).line;o>0;){var s=r.text.slice(a[o-1],a[o]),c=i.exec(s);if(!c)return!0;if(c[3])return!1;o--}return!0}function it(e,t){return ot(e,t,L,at)}function at(t,r){return et((function(){var n=Ge().getEmitResolver(t,r);return e.getDeclarationDiagnostics(Ve(e.noop),n,t)}))}function ot(t,r,n,i){var a=t?n.perFile&&n.perFile.get(t.path):n.allDiagnostics;if(a)return a;var o=i(t,r)||e.emptyArray;return t?(n.perFile||(n.perFile=e.createMap()),n.perFile.set(t.path,o)):n.allDiagnostics=o,o}function st(e,t){return e.isDeclarationFile?[]:it(e,t)}function ct(t,r,n){pt(e.normalizePath(t),r,n,void 0)}function ut(e,t){return e.fileName===t.fileName}function lt(e,t){return 75===e.kind?75===t.kind&&e.escapedText===t.escapedText:10===t.kind&&e.text===t.text}function _t(t){if(!t.imports){var r,n,i,a=e.isSourceFileJS(t),o=e.isExternalModule(t);if(F.importHelpers&&(F.isolatedModules||o)&&!t.isDeclarationFile){var s=e.createLiteral(e.externalHelpersModuleNameText),c=e.createImportDeclaration(void 0,void 0,void 0,s);e.addEmitFlags(c,67108864),s.parent=c,c.parent=t,r=[s]}for(var u=0,l=t.statements;u<l.length;u++){_(l[u],!1)}return(1048576&t.flags||a)&&function(t){var n=/import|require/g;for(;null!==n.exec(t.text);){var i=d(t,n.lastIndex);e.isRequireCall(i,!0)?r=e.append(r,i.arguments[0]):e.isImportCall(i)&&1===i.arguments.length&&e.isStringLiteralLike(i.arguments[0])?r=e.append(r,i.arguments[0]):e.isLiteralImportTypeNode(i)&&(r=e.append(r,i.argument.literal))}}(t),t.imports=r||e.emptyArray,t.moduleAugmentations=n||e.emptyArray,void(t.ambientModuleNames=i||e.emptyArray)}function _(a,s){if(e.isAnyImportOrReExport(a)){var c=e.getExternalModuleName(a);!(c&&e.isStringLiteral(c)&&c.text)||s&&e.isExternalModuleNameRelative(c.text)||(r=e.append(r,c))}else if(e.isModuleDeclaration(a)&&e.isAmbientModule(a)&&(s||e.hasModifier(a,2)||t.isDeclarationFile)){var u=e.getTextOfIdentifierOrLiteral(a.name);if(o||s&&!e.isExternalModuleNameRelative(u))(n||(n=[])).push(a.name);else if(!s){t.isDeclarationFile&&(i||(i=[])).push(u);var l=a.body;if(l)for(var d=0,p=l.statements;d<p.length;d++){_(p[d],!0)}}}}function d(t,r){for(var n=t,i=function(e){if(e.pos<=r&&(r<e.end||r===e.end&&1===e.kind))return e};;){var o=a&&e.hasJSDocNodes(n)&&e.forEach(n.jsDoc,i)||e.forEachChild(n,i);if(!o)return n;n=o}}}function dt(t,r,n,i){if(e.hasExtension(t)){if(!F.allowNonTsExtensions&&!e.forEach(te,(function(r){return e.fileExtensionIs(G.getCanonicalFileName(t),r)})))return void(n&&n(e.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1,t,"'"+ee.join("', '")+"'"));var a=r(t);if(n)if(a)i&&G.getCanonicalFileName(t)===G.getCanonicalFileName(i.fileName)&&n(e.Diagnostics.A_file_cannot_have_a_reference_to_itself);else{var o=ht(t);o?n(e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,o,t):n(e.Diagnostics.File_0_not_found,t)}return a}var s=F.allowNonTsExtensions&&r(t);if(s)return s;if(!n||!F.allowNonTsExtensions){var c=e.forEach(ee,(function(e){return r(t+e)}));return n&&!c&&n(e.Diagnostics.File_0_not_found,t+".ts"),c}n(e.Diagnostics.File_0_not_found,t)}function pt(e,r,n,i,a){dt(e,(function(e){return mt(e,Ke(e),r,n,a,i)}),(function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return B.add(Pt.apply(void 0,t([a,e],r)))}),a&&a.file)}function ft(t,r,n){B.add(Pt(n,e.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing,t,r))}function mt(t,r,n,i,a,o){if(ye){var s=St(t);if(!s&&G.realpath&&F.preserveSymlinks&&e.isDeclarationFileName(t)&&e.stringContains(t,e.nodeModulesPathPart)){var c=G.realpath(t);c!==t&&(s=St(c))}if(s){var u=e.isString(s)?mt(s,Ke(s),n,i,a,o):void 0;return u&&yt(u,r,void 0),u}}var l,_=t;if(me.has(r)){var f=me.get(r);if(f&&F.forceConsistentCasingInFileNames){var m=t,g=f.fileName;Ke(g)!==Ke(m)&&(m=ht(t)||t),e.getNormalizedAbsolutePathWithoutRoot(g,Z)!==e.getNormalizedAbsolutePathWithoutRoot(m,Z)&&ft(m,g,a)}return f&&z.get(f.path)&&0===K?(z.set(f.path,!1),F.noResolve||(kt(f,n),Nt(f)),F.noLib||Ft(f),J.set(f.path,!1),It(f)):f&&J.get(f.path)&&K<j&&(J.set(f.path,!1),It(f)),gt(f||void 0,a),f||void 0}if(a&&!ye){var y=vt(t);if(y){if(y.commandLine.options.outFile||y.commandLine.options.out)return;var h=bt(y,t);t=h,l=Ke(h)}}var v=G.getSourceFile(t,F.target,(function(r){return B.add(Pt(a,e.Diagnostics.Cannot_read_file_0_Colon_1,t,r))}),he);if(o){var b=e.packageIdToString(o),x=de.get(b);if(x){var D=function(e,t,r,n,i,a){var o=Object.create(e);return o.fileName=r,o.path=n,o.resolvedPath=i,o.originalFileName=a,o.redirectInfo={redirectTarget:e,unredirected:t},z.set(n,K>0),Object.defineProperties(o,{id:{get:function(){return this.redirectInfo.redirectTarget.id},set:function(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get:function(){return this.redirectInfo.redirectTarget.symbol},set:function(e){this.redirectInfo.redirectTarget.symbol=e}}}),o}(x,v,t,r,Ke(t),_);return fe.add(x.path,t),yt(D,r,l),pe.set(r,o.name),p.push(D),D}v&&(de.set(b,v),pe.set(r,o.name))}if(yt(v,r,l),v){if(z.set(r,K>0),v.path=r,v.resolvedPath=Ke(t),v.originalFileName=_,G.useCaseSensitiveFileNames()){var S=r.toLowerCase(),T=ge.get(S);T?ft(t,T.fileName,a):ge.set(S,v)}Y=Y||v.hasNoDefaultLib&&!i,F.noResolve||(kt(v,n),Nt(v)),F.noLib||Ft(v),It(v),n?d.push(v):p.push(v)}return gt(v,a),v}function gt(t,r){r&&t&&(x||(x=e.createMultiMap())).add(t.path,{kind:r.kind,index:r.index,file:r.file.path})}function yt(e,t,r){r?(me.set(r,e),me.set(t,e||!1)):me.set(t,e)}function ht(e){var t=vt(e);return t&&bt(t,e)}function vt(t){if(se&&se.length&&!e.fileExtensionIs(t,".d.ts"))return xt(t)}function bt(t,r){var n=t.commandLine.options.outFile||t.commandLine.options.out;return n?e.changeExtension(n,".d.ts"):e.getOutputDeclarationFileName(r,t.commandLine,!G.useCaseSensitiveFileNames())}function xt(t){void 0===ue&&(ue=e.createMap(),Dt((function(e,t){e&&Ke(F.configFilePath)!==t&&e.commandLine.fileNames.forEach((function(e){return ue.set(Ke(e),t)}))})));var r=ue.get(Ke(t));return r&&Ct(r)}function Dt(e){return Et(w,se,(function(t,r,n){var i=Ke(C((n?n.commandLine.projectReferences:w)[r]));return e(t,i)}))}function St(t){if(e.isDeclarationFileName(t))return void 0===le&&(le=e.createMap(),Dt((function(t){if(t){var r=t.commandLine.options.outFile||t.commandLine.options.out;if(r){var n=e.changeExtension(r,".d.ts");le.set(Ke(n),!0)}else e.forEach(t.commandLine.fileNames,(function(r){if(!e.fileExtensionIs(r,".d.ts")){var n=e.getOutputDeclarationFileName(r,t.commandLine,G.useCaseSensitiveFileNames());le.set(Ke(n),r)}}))}}))),le.get(Ke(t))}function Tt(e){return ye&&!!xt(e)}function Et(t,r,n,i){var a;return function t(r,n,i,o,s){if(s){var c=s(r,i);if(c)return c}return e.forEach(n,(function(r,n){if(!e.contains(a,r)){var c=o(r,n,i);if(c)return c;if(r)return(a||(a=[])).push(r),t(r.commandLine.projectReferences,r.references,r,o,s)}}))}(t,r,void 0,n,i)}function Ct(e){if(ce)return ce.get(e)||void 0}function kt(t,r){e.forEach(t.referencedFiles,(function(n,i){pt(a(n.fileName,t.originalFileName),r,!1,void 0,{kind:e.RefFileKind.ReferenceFile,index:i,file:t,pos:n.pos,end:n.end})}))}function Nt(t){var r=e.map(t.typeReferenceDirectives,(function(e){return e.fileName.toLocaleLowerCase()}));if(r)for(var n=W(r,t.originalFileName,xt(t.originalFileName)),i=0;i<r.length;i++){var a=t.typeReferenceDirectives[i],o=n[i],s=a.fileName.toLocaleLowerCase();e.setResolvedTypeReferenceDirective(t,s,o),At(s,o,{kind:e.RefFileKind.TypeReferenceDirective,index:i,file:t,pos:a.pos,end:a.end})}}function At(t,r,n){var i=R.get(t);if(!i||!i.primary){var a=!0;if(r){if(r.isExternalLibraryImport&&K++,r.primary)pt(r.resolvedFileName,!1,!1,r.packageId,n);else if(i){if(r.resolvedFileName!==i.resolvedFileName)G.readFile(r.resolvedFileName)!==Xe(i.resolvedFileName).text&&B.add(Pt(n,e.Diagnostics.Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict,t,r.resolvedFileName,i.resolvedFileName));a=!1}else pt(r.resolvedFileName,!1,!1,r.packageId,n);r.isExternalLibraryImport&&K--}else B.add(Pt(n,e.Diagnostics.Cannot_find_type_definition_file_for_0,t));a&&R.set(t,r)}}function Ft(t){e.forEach(t.libReferenceDirectives,(function(r){var n=r.fileName.toLocaleLowerCase(),i=e.libMap.get(n);if(i)ct(e.combinePaths(Q,i),!0,!0);else{var a=e.removeSuffix(e.removePrefix(n,"lib."),".d.ts"),o=e.getSpellingSuggestion(a,e.libs,e.identity),s=o?e.Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1:e.Diagnostics.Cannot_find_lib_definition_for_0;B.add(e.createFileDiagnostic(t,r.pos,r.end-r.pos,s,n,o))}}))}function Pt(r,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return r?e.createFileDiagnostic.apply(void 0,t([r.file,r.pos,r.end-r.pos,n],i)):e.createCompilerDiagnostic.apply(void 0,t([n],i))}function wt(e){return G.getCanonicalFileName(e)}function It(t){if(_t(t),t.imports.length||t.moduleAugmentations.length){var r=N(t),n=Ue(r,e.getNormalizedAbsolutePath(t.originalFileName,Z),t);e.Debug.assert(n.length===r.length);for(var i=0;i<r.length;i++){var a=n[i];if(e.setResolvedModule(t,r[i],a),a){var o=a.isExternalLibraryImport,s=!e.resolutionExtensionIsTSOrJson(a.extension),c=o&&s,u=a.resolvedFileName;o&&K++;var l=c&&K>j,_=u&&!k(F,a)&&!F.noResolve&&i<t.imports.length&&!l&&!(s&&!F.allowJs)&&(e.isInJSFile(t.imports[i])||!(4194304&t.imports[i].flags));if(l)J.set(t.path,!0);else if(_){var d=Ke(u),p=e.skipTrivia(t.text,t.imports[i].pos);mt(u,d,!1,!1,{kind:e.RefFileKind.Import,index:i,file:t,pos:p,end:t.imports[i].end},a.packageId)}o&&K--}}}else t.resolvedModules=void 0}function Ot(t,r){for(var n,i=!0,a=G.getCanonicalFileName(e.getNormalizedAbsolutePath(r,Z)),o=0,s=t;o<s.length;o++){var c=s[o];if(!c.isDeclarationFile)0!==G.getCanonicalFileName(e.getNormalizedAbsolutePath(c.fileName,Z)).indexOf(a)&&(n||(n=e.arrayToSet(A,Ke)),Lt(c,n,e.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,c.fileName,r),i=!1)}return i}function Mt(t){ce||(ce=e.createMap());var r,n,i=C(t),a=Ke(i),o=ce.get(a);if(void 0!==o)return o||void 0;if(G.getParsedCommandLine){if(!(r=G.getParsedCommandLine(i)))return yt(void 0,a,void 0),void ce.set(a,!1);n=e.Debug.assertDefined(r.options.configFile),e.Debug.assert(!n.path||n.path===a),yt(n,a,void 0)}else{var s=e.getNormalizedAbsolutePath(e.getDirectoryPath(i),G.getCurrentDirectory());if(yt(n=G.getSourceFile(i,100),a,void 0),void 0===n)return void ce.set(a,!1);r=e.parseJsonSourceFileConfigFileContent(n,H,s,void 0,i)}n.path=a,n.resolvedPath=a,n.originalFileName=i;var c={commandLine:r,sourceFile:n};return ce.set(a,c),r.projectReferences&&(c.references=r.projectReferences.map(Mt)),c}function Lt(r,n,i){for(var a,o,s=[],c=3;c<arguments.length;c++)s[c-3]=arguments[c];var u=x&&x.get(r.path),l=e.forEach(u,(function(e){return n.has(e.file)?e:void 0}))||e.elementAt(u,0);if(l){var _=e.Debug.assertDefined(Qe(l.file)),d=l.kind,p=l.index,f=void 0,m=void 0;switch(d){case e.RefFileKind.Import:f=e.skipTrivia(_.text,_.imports[p].pos),m=_.imports[p].end;break;case e.RefFileKind.ReferenceFile:f=(a=_.referencedFiles[p]).pos,m=a.end;break;case e.RefFileKind.TypeReferenceDirective:f=(o=_.typeReferenceDirectives[p]).pos,m=o.end;break;default:return e.Debug.assertNever(d)}$.add(e.createFileDiagnostic.apply(void 0,t([_,f,m-f,i],s)))}else $.add(e.createCompilerDiagnostic.apply(void 0,t([i],s)))}function Rt(t,r,n,i,a,o){for(var s=!0,c=0,u=jt();c<u.length;c++){var l=u[c];if(e.isObjectLiteralExpression(l.initializer))for(var _=0,d=e.getPropertyAssignment(l.initializer,t);_<d.length;_++){var p=d[_].initializer;e.isArrayLiteralExpression(p)&&p.elements.length>r&&($.add(e.createDiagnosticForNodeInSourceFile(F.configFile,p.elements[r],n,i,a,o)),s=!1)}}s&&$.add(e.createCompilerDiagnostic(n,i,a,o))}function Bt(t,r,n,i){for(var a=!0,o=0,s=jt();o<s.length;o++){var c=s[o];e.isObjectLiteralExpression(c.initializer)&&qt(c.initializer,t,r,void 0,n,i)&&(a=!1)}a&&$.add(e.createCompilerDiagnostic(n,i))}function jt(){return function(t){var r=Vt();if(r)return e.getPropertyAssignment(r,t)}("paths")||e.emptyArray}function Kt(e,t,r,n){Ut(!0,t,r,e,t,r,n)}function Jt(e,t,r){Ut(!1,e,void 0,t,r)}function zt(t,r,n,i,a){var o=e.firstDefined(e.getTsConfigPropArray(t||F.configFile,"references"),(function(t){return e.isArrayLiteralExpression(t.initializer)?t.initializer:void 0}));o&&o.elements.length>r?$.add(e.createDiagnosticForNodeInSourceFile(t||F.configFile,o.elements[r],n,i,a)):$.add(e.createCompilerDiagnostic(n,i,a))}function Ut(t,r,n,i,a,o,s){var c=Vt();(!c||!qt(c,t,r,n,i,a,o,s))&&$.add(e.createCompilerDiagnostic(i,a,o,s))}function Vt(){if(void 0===U){U=null;var t=e.getTsConfigObjectLiteralExpression(F.configFile);if(t)for(var r=0,n=e.getPropertyAssignment(t,"compilerOptions");r<n.length;r++){var i=n[r];if(e.isObjectLiteralExpression(i.initializer)){U=i.initializer;break}}}return U}function qt(t,r,n,i,a,o,s,c){for(var u=e.getPropertyAssignment(t,n,i),l=0,_=u;l<_.length;l++){var d=_[l];$.add(e.createDiagnosticForNodeInSourceFile(F.configFile,r?d.name:d.initializer,a,o,s,c))}return!!u.length}function Wt(e,t){re.set(Ke(e),!0),$.add(t)}function Gt(t,r){return 0===e.comparePaths(t,r,Z,!G.useCaseSensitiveFileNames())}function Ht(){return G.getSymlinks?G.getSymlinks():g||(g=e.discoverProbableSymlinks(m,wt,G.getCurrentDirectory()))}},e.parseConfigHostFromCompilerHostLike=T,e.createPrependNodes=E,e.resolveProjectReferencePath=C,e.getResolutionDiagnostic=k}(s||(s={})),function(e){e.getFileEmitOutput=function(e,t,r,n,i,a){var o=[],s=e.emit(t,(function(e,t,r){o.push({name:e,writeByteOrderMark:r,text:t})}),n,r,i,a);return{outputFiles:o,emitSkipped:s.emitSkipped,exportedModulesFromDeclarationEmit:s.exportedModulesFromDeclarationEmit}},e.cloneMapOrUndefined=function(t){return t?e.cloneMap(t):void 0}}(s||(s={})),function(e){!function(t){function n(t){if(t.declarations&&t.declarations[0]){var r=e.getSourceFileOfNode(t.declarations[0]);return r&&r.resolvedPath}}function i(e,t){var r=e.getSymbolAtLocation(t);return r&&n(r)}function a(t,r,n,i){return e.toPath(t.getProjectReferenceRedirect(r)||r,n,i)}function o(t,r,n){var o;if(r.imports&&r.imports.length>0)for(var s=t.getTypeChecker(),c=0,u=r.imports;c<u.length;c++){var l=i(s,u[c]);l&&S(l)}var _=e.getDirectoryPath(r.path);if(r.referencedFiles&&r.referencedFiles.length>0)for(var d=0,p=r.referencedFiles;d<p.length;d++){var f=p[d];S(a(t,f.fileName,_,n))}if(r.resolvedTypeReferenceDirectiveNames&&r.resolvedTypeReferenceDirectiveNames.forEach((function(e){if(e){var r=e.resolvedFileName;S(a(t,r,_,n))}})),r.moduleAugmentations.length){s=t.getTypeChecker();for(var m=0,g=r.moduleAugmentations;m<g.length;m++){var y=g[m];if(e.isStringLiteral(y)){var h=s.getSymbolAtLocation(y);h&&D(h)}}}for(var v=0,b=t.getTypeChecker().getAmbientModules();v<b.length;v++){var x=b[v];x.declarations.length>1&&D(x)}return o;function D(t){for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n],o=e.getSourceFileOfNode(a);o&&o!==r&&S(o.resolvedPath)}}function S(t){o||(o=e.createMap()),o.set(t,!0)}}function s(e,t){return t&&!t.referencedMap==!e}function c(e,t){t.forEach((function(t,r){e.fileInfos.get(r).signature=t,e.hasCalledUpdateShapeSignature.set(r,!0)}))}function u(t,r,i,a,o,s,c){if(e.Debug.assert(!!i),e.Debug.assert(!c||!!t.exportedModulesMap,"Compute visible to outside map only if visibleToOutsideReferencedMap present in the state"),t.hasCalledUpdateShapeSignature.has(i.path)||a.has(i.path))return!1;var u=t.fileInfos.get(i.path);if(!u)return e.Debug.fail();var l,_=u.signature;if(i.isDeclarationFile){if(l=i.version,c&&l!==_){var d=t.referencedMap?t.referencedMap.get(i.path):void 0;c.set(i.path,d||!1)}}else{var p=e.getFileEmitOutput(r,i,!0,o,void 0,!0),f=p.outputFiles&&r.getCompilerOptions().declarationMap?p.outputFiles.length>1?p.outputFiles[1]:void 0:p.outputFiles.length>0?p.outputFiles[0]:void 0;f?(e.Debug.assert(e.fileExtensionIs(f.name,".d.ts"),"File extension for signature expected to be dts",(function(){return"Found: "+e.getAnyExtensionFromPath(f.name)+" for "+f.name+":: All output files: "+JSON.stringify(p.outputFiles.map((function(e){return e.name})))})),l=s(f.text),c&&l!==_&&function(t,r,i){if(!r)return void i.set(t.path,!1);var a;r.forEach((function(t){var r;(r=n(t))&&(a||(a=e.createMap()),a.set(r,!0))})),i.set(t.path,a||!1)}(i,p.exportedModulesFromDeclarationEmit,c)):l=_}return a.set(i.path,l),!_||l!==_}function l(t,r){if(!t.allFileNames){var n=r.getSourceFiles();t.allFileNames=n===e.emptyArray?e.emptyArray:n.map((function(e){return e.fileName}))}return t.allFileNames}function _(t,r){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),(function(e){var t=e[0];return e[1].has(r)?t:void 0})))}function d(t){return function(t){return e.some(t.moduleAugmentations,(function(t){return e.isGlobalScopeAugmentation(t.parent)}))}(t)||!e.isExternalModule(t)&&!function(t){for(var r=0,n=t.statements;r<n.length;r++){var i=n[r];if(!e.isModuleWithStringLiteralName(i))return!1}return!0}(t)}function p(t,r,n){if(t.allFilesExcludingDefaultLibraryFile)return t.allFilesExcludingDefaultLibraryFile;var i;c(n);for(var a=0,o=r.getSourceFiles();a<o.length;a++){var s=o[a];s!==n&&c(s)}return t.allFilesExcludingDefaultLibraryFile=i||e.emptyArray,t.allFilesExcludingDefaultLibraryFile;function c(e){r.isSourceFileDefaultLibrary(e)||(i||(i=[])).push(e)}}function f(e,t,r){var n=t.getCompilerOptions();return n&&(n.out||n.outFile)?[r]:p(e,t,r)}function m(t,r,n,i,a,o,s){if(d(n))return p(t,r,n);var c=r.getCompilerOptions();if(c&&(c.isolatedModules||c.out||c.outFile))return[n];var l=e.createMap();l.set(n.path,n);for(var f=_(t,n.resolvedPath);f.length>0;){var m=f.pop();if(!l.has(m)){var g=r.getSourceFileByPath(m);l.set(m,g),g&&u(t,r,g,i,a,o,s)&&f.push.apply(f,_(t,g.resolvedPath))}}return e.arrayFrom(e.mapDefinedIterator(l.values(),(function(e){return e})))}t.canReuseOldState=s,t.create=function(t,r,n){for(var i=e.createMap(),a=t.getCompilerOptions().module!==e.ModuleKind.None?e.createMap():void 0,c=a?e.createMap():void 0,u=e.createMap(),l=s(a,n),_=0,d=t.getSourceFiles();_<d.length;_++){var p=d[_],f=e.Debug.assertDefined(p.version,"Program intended to be used with Builder should have source files with versions set"),m=l?n.fileInfos.get(p.path):void 0;if(a){var g=o(t,p,r);if(g&&a.set(p.path,g),l){var y=n.exportedModulesMap.get(p.path);y&&c.set(p.path,y)}}i.set(p.path,{version:f,signature:m&&m.signature})}return{fileInfos:i,referencedMap:a,exportedModulesMap:c,hasCalledUpdateShapeSignature:u}},t.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},t.clone=function(t){var n=e.createMap();return t.fileInfos.forEach((function(e,t){n.set(t,r({},e))})),{fileInfos:n,referencedMap:e.cloneMapOrUndefined(t.referencedMap),exportedModulesMap:e.cloneMapOrUndefined(t.exportedModulesMap),hasCalledUpdateShapeSignature:e.cloneMap(t.hasCalledUpdateShapeSignature)}},t.getFilesAffectedBy=function(t,r,n,i,a,o,s){var l=o||e.createMap(),_=r.getSourceFileByPath(n);if(!_)return e.emptyArray;if(!u(t,r,_,l,i,a,s))return[_];var d=(t.referencedMap?m:f)(t,r,_,l,i,a,s);return o||c(t,l),d},t.updateSignaturesFromCache=c,t.updateShapeSignature=u,t.updateExportedFilesMapFromCache=function(t,r){r&&(e.Debug.assert(!!t.exportedModulesMap),r.forEach((function(e,r){e?t.exportedModulesMap.set(r,e):t.exportedModulesMap.delete(r)})))},t.getAllDependencies=function(t,r,n){var i=r.getCompilerOptions();if(i.outFile||i.out)return l(t,r);if(!t.referencedMap||d(n))return l(t,r);for(var a=e.createMap(),o=[n.path];o.length;){var s=o.pop();if(!a.has(s)){a.set(s,!0);var c=t.referencedMap.get(s);if(c)for(var u=c.keys(),_=u.next();!_.done;_=u.next())o.push(_.value)}}return e.arrayFrom(e.mapDefinedIterator(a.keys(),(function(e){var t=r.getSourceFileByPath(e);return t?t.fileName:e})))},t.getReferencedByPaths=_}(e.BuilderState||(e.BuilderState={}))}(s||(s={})),function(e){var t;function n(t,r,n){var a=e.BuilderState.create(t,r,n);a.program=t;var o=t.getCompilerOptions();a.compilerOptions=o,o.outFile||o.out||(a.semanticDiagnosticsPerFile=e.createMap()),a.changedFilesSet=e.createMap();var s=e.BuilderState.canReuseOldState(a.referencedMap,n),c=s?n.compilerOptions:void 0,u=s&&n.semanticDiagnosticsPerFile&&!!a.semanticDiagnosticsPerFile&&!e.compilerOptionsAffectSemanticDiagnostics(o,c);if(s){if(!n.currentChangedFilePath){var l=n.currentAffectedFilesSignatures;e.Debug.assert(!(n.affectedFiles||l&&l.size),"Cannot reuse if only few affected files of currentChangedFile were iterated")}var _=n.changedFilesSet;u&&e.Debug.assert(!_||!e.forEachKey(_,(function(e){return n.semanticDiagnosticsPerFile.has(e)})),"Semantic diagnostics shouldnt be available for changed files"),_&&e.copyEntries(_,a.changedFilesSet),o.outFile||o.out||!n.affectedFilesPendingEmit||(a.affectedFilesPendingEmit=n.affectedFilesPendingEmit.slice(),a.affectedFilesPendingEmitKind=e.cloneMapOrUndefined(n.affectedFilesPendingEmitKind),a.affectedFilesPendingEmitIndex=n.affectedFilesPendingEmitIndex)}var d=a.referencedMap,p=s?n.referencedMap:void 0,f=u&&!o.skipLibCheck==!c.skipLibCheck,m=f&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;return a.fileInfos.forEach((function(o,c){var l,_,g,y;if(!s||!(l=n.fileInfos.get(c))||l.version!==o.version||(g=_=d&&d.get(c),y=p&&p.get(c),g!==y&&(void 0===g||void 0===y||g.size!==y.size||e.forEachKey(g,(function(e){return!y.has(e)}))))||_&&e.forEachKey(_,(function(e){return!a.fileInfos.has(e)&&n.fileInfos.has(e)})))a.changedFilesSet.set(c,!0);else if(u){var h=t.getSourceFileByPath(c);if(h.isDeclarationFile&&!f)return;if(h.hasNoDefaultLib&&!m)return;var v=n.semanticDiagnosticsPerFile.get(c);v&&(a.semanticDiagnosticsPerFile.set(c,n.hasReusableDiagnostic?function(t,r,n){if(!t.length)return e.emptyArray;var a=e.getDirectoryPath(e.getNormalizedAbsolutePath(e.getTsBuildInfoEmitOutputFilePath(r.getCompilerOptions()),r.getCurrentDirectory()));return t.map((function(t){var n=i(t,r,o);n.reportsUnnecessary=t.reportsUnnecessary,n.source=t.source;var a=t.relatedInformation;return n.relatedInformation=a?a.length?a.map((function(e){return i(e,r,o)})):e.emptyArray:void 0,n}));function o(t){return e.toPath(t,a,n)}}(v,t,r):v),a.semanticDiagnosticsFromOldState||(a.semanticDiagnosticsFromOldState=e.createMap()),a.semanticDiagnosticsFromOldState.set(c,!0))}})),c&&e.compilerOptionsAffectEmit(o,c)&&(t.getSourceFiles().forEach((function(e){return v(a,e.path,1)})),e.Debug.assert(void 0===a.seenAffectedFiles),a.seenAffectedFiles=e.createMap()),a.emittedBuildInfo=!a.changedFilesSet.size&&!a.affectedFilesPendingEmit,a}function i(e,t,n){var i=e.file;return r(r({},e),{file:i?t.getSourceFileByPath(n(i)):void 0})}function a(t,r){e.Debug.assert(!r||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==r||!t.semanticDiagnosticsPerFile.has(r.path))}function o(t,r,n){for(;;){var i=t.affectedFiles;if(i){for(var a=t.seenAffectedFiles,o=t.affectedFilesIndex;o<i.length;){var c=i[o];if(!a.has(c.path))return t.affectedFilesIndex=o,s(t,c,r,n),c;o++}t.changedFilesSet.delete(t.currentChangedFilePath),t.currentChangedFilePath=void 0,e.BuilderState.updateSignaturesFromCache(t,t.currentAffectedFilesSignatures),t.currentAffectedFilesSignatures.clear(),e.BuilderState.updateExportedFilesMapFromCache(t,t.currentAffectedFilesExportedModulesMap),t.affectedFiles=void 0}var u=t.changedFilesSet.keys().next();if(u.done)return;var l=e.Debug.assertDefined(t.program),_=l.getCompilerOptions();if(_.outFile||_.out)return e.Debug.assert(!t.semanticDiagnosticsPerFile),l;t.currentAffectedFilesSignatures=t.currentAffectedFilesSignatures||e.createMap(),t.exportedModulesMap&&(t.currentAffectedFilesExportedModulesMap=t.currentAffectedFilesExportedModulesMap||e.createMap()),t.affectedFiles=e.BuilderState.getFilesAffectedBy(t,l,u.value,r,n,t.currentAffectedFilesSignatures,t.currentAffectedFilesExportedModulesMap),t.currentChangedFilePath=u.value,t.affectedFilesIndex=0,t.seenAffectedFiles=t.seenAffectedFiles||e.createMap()}}function s(t,r,n,i){if(c(t,r.path),t.allFilesExcludingDefaultLibraryFile!==t.affectedFiles)!function(t,r,n){if(!t.exportedModulesMap||!t.changedFilesSet.has(r.path))return;if(!u(t,r.path))return;if(t.compilerOptions.isolatedModules){var i=e.createMap();i.set(r.path,!0);for(var a=e.BuilderState.getReferencedByPaths(t,r.resolvedPath);a.length>0;){var o=a.pop();if(!i.has(o))if(i.set(o,!0),n(t,o)&&u(t,o)){var s=e.Debug.assertDefined(t.program).getSourceFileByPath(o);a.push.apply(a,e.BuilderState.getReferencedByPaths(t,s.resolvedPath))}}}e.Debug.assert(!!t.currentAffectedFilesExportedModulesMap);var c=e.createMap();if(e.forEachEntry(t.currentAffectedFilesExportedModulesMap,(function(e,i){return e&&e.has(r.path)&&l(t,i,c,n)})))return;e.forEachEntry(t.exportedModulesMap,(function(e,i){return!t.currentAffectedFilesExportedModulesMap.has(i)&&e.has(r.path)&&l(t,i,c,n)}))}(t,r,(function(t,r){return function(t,r,n,i){if(c(t,r),!t.changedFilesSet.has(r)){var a=e.Debug.assertDefined(t.program),o=a.getSourceFileByPath(r);o&&(e.BuilderState.updateShapeSignature(t,a,o,e.Debug.assertDefined(t.currentAffectedFilesSignatures),n,i,t.currentAffectedFilesExportedModulesMap),e.getEmitDeclarations(t.compilerOptions)&&v(t,r,0))}return!1}(t,r,n,i)}));else if(!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;var a=e.Debug.assertDefined(t.program),o=a.getCompilerOptions();e.forEach(a.getSourceFiles(),(function(r){return a.isSourceFileDefaultLibrary(r)&&!e.skipTypeChecking(r,o,a)&&c(t,r.path)}))}}function c(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function u(t,r){return e.Debug.assertDefined(t.currentAffectedFilesSignatures).get(r)!==e.Debug.assertDefined(t.fileInfos.get(r)).signature}function l(t,r,n,i){return e.forEachEntry(t.referencedMap,(function(a,o){return a.has(r)&&function t(r,n,i,a){if(!e.addToSeen(i,n))return!1;if(a(r,n))return!0;e.Debug.assert(!!r.currentAffectedFilesExportedModulesMap);if(e.forEachEntry(r.currentAffectedFilesExportedModulesMap,(function(e,o){return e&&e.has(n)&&t(r,o,i,a)})))return!0;if(e.forEachEntry(r.exportedModulesMap,(function(e,o){return!r.currentAffectedFilesExportedModulesMap.has(o)&&e.has(n)&&t(r,o,i,a)})))return!0;return!!e.forEachEntry(r.referencedMap,(function(e,t){return e.has(n)&&!i.has(t)&&a(r,t)}))}(t,o,n,i)}))}function _(t,r,n,i,a){a?t.emittedBuildInfo=!0:r===t.program?(t.changedFilesSet.clear(),t.programEmitComplete=!0):(t.seenAffectedFiles.set(r.path,!0),void 0!==n&&(t.seenEmittedFiles||(t.seenEmittedFiles=e.createMap())).set(r.path,n),i?t.affectedFilesPendingEmitIndex++:t.affectedFilesIndex++)}function d(e,t,r){return _(e,r),{result:t,affected:r}}function p(e,t,r,n,i,a){return _(e,r,n,i,a),{result:t,affected:r}}function f(t,r,n){var i=r.path;if(t.semanticDiagnosticsPerFile){var a=t.semanticDiagnosticsPerFile.get(i);if(a)return a}var o=e.Debug.assertDefined(t.program).getSemanticDiagnostics(r,n);return t.semanticDiagnosticsPerFile&&t.semanticDiagnosticsPerFile.set(i,o),o}function m(t,r){var n={},i=e.getOptionNameMap().optionNameMap;for(var a in t)e.hasProperty(t,a)&&(n[a]=g(i.get(a.toLowerCase()),t[a],r));return n.configFilePath&&(n.configFilePath=r(n.configFilePath)),n}function g(e,t,r){if(e)if("list"===e.type){var n=t;if(e.element.isFilePath&&n.length)return n.map(r)}else if(e.isFilePath)return r(t);return t}function y(t,r){return e.Debug.assert(!!t.length),t.map((function(t){var n=h(t,r);n.reportsUnnecessary=t.reportsUnnecessary,n.source=t.source;var i=t.relatedInformation;return n.relatedInformation=i?i.length?i.map((function(e){return h(e,r)})):e.emptyArray:void 0,n}))}function h(e,t){var n=e.file;return r(r({},e),{file:n?t(n.path):void 0})}function v(t,r,n){t.affectedFilesPendingEmit||(t.affectedFilesPendingEmit=[]),t.affectedFilesPendingEmitKind||(t.affectedFilesPendingEmitKind=e.createMap());var i=t.affectedFilesPendingEmitKind.get(r);t.affectedFilesPendingEmit.push(r),t.affectedFilesPendingEmitKind.set(r,i||n),void 0===t.affectedFilesPendingEmitIndex&&(t.affectedFilesPendingEmitIndex=0)}function b(t,r){if(t){var n=e.createMap();for(var i in t)e.hasProperty(t,i)&&n.set(r(i),e.arrayToSet(t[i],r));return n}}function x(t,r){return{getState:e.notImplemented,backupState:e.noop,restoreState:e.noop,getProgram:n,getProgramOrUndefined:function(){return t.program},releaseProgram:function(){return t.program=void 0},getCompilerOptions:function(){return t.compilerOptions},getSourceFile:function(e){return n().getSourceFile(e)},getSourceFiles:function(){return n().getSourceFiles()},getOptionsDiagnostics:function(e){return n().getOptionsDiagnostics(e)},getGlobalDiagnostics:function(e){return n().getGlobalDiagnostics(e)},getConfigFileParsingDiagnostics:function(){return r},getSyntacticDiagnostics:function(e,t){return n().getSyntacticDiagnostics(e,t)},getDeclarationDiagnostics:function(e,t){return n().getDeclarationDiagnostics(e,t)},getSemanticDiagnostics:function(e,t){return n().getSemanticDiagnostics(e,t)},emit:function(e,t,r,i,a){return n().emit(e,t,r,i,a)},getAllDependencies:e.notImplemented,getCurrentDirectory:function(){return n().getCurrentDirectory()}};function n(){return e.Debug.assertDefined(t.program)}}!function(e){e[e.DtsOnly=0]="DtsOnly",e[e.Full=1]="Full"}(e.BuilderFileEmit||(e.BuilderFileEmit={})),function(e){e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram"}(t=e.BuilderProgramKind||(e.BuilderProgramKind={})),e.getBuilderCreationParameters=function(t,r,n,i,a,o){var s,c,u;return void 0===t?(e.Debug.assert(void 0===r),s=n,u=i,e.Debug.assert(!!u),c=u.getProgram()):e.isArray(t)?(u=i,c=e.createProgram({rootNames:t,options:r,host:n,oldProgram:u&&u.getProgramOrUndefined(),configFileParsingDiagnostics:a,projectReferences:o}),s=n):(c=t,s=r,u=n,a=i),{host:s,newProgram:c,oldProgram:u,configFileParsingDiagnostics:a||e.emptyArray}},e.createBuilderProgram=function(r,i){var s=i.newProgram,c=i.host,u=i.oldProgram,l=i.configFileParsingDiagnostics,g=u&&u.getState();if(g&&s===g.program&&l===s.getConfigFileParsingDiagnostics())return s=void 0,g=void 0,u;var h,b=e.createGetCanonicalFileName(c.useCaseSensitiveFileNames()),D=c.createHash||e.generateDjb2Hash,S=n(s,b,g);s.getProgramBuildInfo=function(){return function(t,r){if(!t.compilerOptions.outFile&&!t.compilerOptions.out){var n=e.Debug.assertDefined(t.program).getCurrentDirectory(),i=e.getDirectoryPath(e.getNormalizedAbsolutePath(e.getTsBuildInfoEmitOutputFilePath(t.compilerOptions),n)),a={};t.fileInfos.forEach((function(e,r){var n=t.currentAffectedFilesSignatures&&t.currentAffectedFilesSignatures.get(r);a[l(r)]=void 0===n?e:{version:e.version,signature:n}}));var o={fileInfos:a,options:m(t.compilerOptions,(function(t){return l(e.getNormalizedAbsolutePath(t,n))}))};if(t.referencedMap){var s={};t.referencedMap.forEach((function(t,r){s[l(r)]=e.arrayFrom(t.keys(),l)})),o.referencedMap=s}if(t.exportedModulesMap){var c={};t.exportedModulesMap.forEach((function(r,n){var i=t.currentAffectedFilesExportedModulesMap&&t.currentAffectedFilesExportedModulesMap.get(n);void 0===i?c[l(n)]=e.arrayFrom(r.keys(),l):i&&(c[l(n)]=e.arrayFrom(i.keys(),l))})),o.exportedModulesMap=c}if(t.semanticDiagnosticsPerFile){var u=[];t.semanticDiagnosticsPerFile.forEach((function(e,r){return u.push(e.length?[l(r),t.hasReusableDiagnostic?e:y(e,l)]:l(r))})),o.semanticDiagnosticsPerFile=u}return o}function l(t){return e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(i,t,r))}}(S,b)},s=void 0,u=void 0,g=void 0;var T=x(S,l);return T.getState=function(){return S},T.backupState=function(){e.Debug.assert(void 0===h),h=function(t){var r=e.BuilderState.clone(t);return r.semanticDiagnosticsPerFile=e.cloneMapOrUndefined(t.semanticDiagnosticsPerFile),r.changedFilesSet=e.cloneMap(t.changedFilesSet),r.affectedFiles=t.affectedFiles,r.affectedFilesIndex=t.affectedFilesIndex,r.currentChangedFilePath=t.currentChangedFilePath,r.currentAffectedFilesSignatures=e.cloneMapOrUndefined(t.currentAffectedFilesSignatures),r.currentAffectedFilesExportedModulesMap=e.cloneMapOrUndefined(t.currentAffectedFilesExportedModulesMap),r.seenAffectedFiles=e.cloneMapOrUndefined(t.seenAffectedFiles),r.cleanedDiagnosticsOfLibFiles=t.cleanedDiagnosticsOfLibFiles,r.semanticDiagnosticsFromOldState=e.cloneMapOrUndefined(t.semanticDiagnosticsFromOldState),r.program=t.program,r.compilerOptions=t.compilerOptions,r.affectedFilesPendingEmit=t.affectedFilesPendingEmit&&t.affectedFilesPendingEmit.slice(),r.affectedFilesPendingEmitKind=e.cloneMapOrUndefined(t.affectedFilesPendingEmitKind),r.affectedFilesPendingEmitIndex=t.affectedFilesPendingEmitIndex,r.seenEmittedFiles=e.cloneMapOrUndefined(t.seenEmittedFiles),r.programEmitComplete=t.programEmitComplete,r}(S)},T.restoreState=function(){S=e.Debug.assertDefined(h),h=void 0},T.getAllDependencies=function(t){return e.BuilderState.getAllDependencies(S,e.Debug.assertDefined(S.program),t)},T.getSemanticDiagnostics=function(t,r){a(S,t);var n,i=e.Debug.assertDefined(S.program).getCompilerOptions();if(i.outFile||i.out)return e.Debug.assert(!S.semanticDiagnosticsPerFile),e.Debug.assertDefined(S.program).getSemanticDiagnostics(t,r);if(t)return f(S,t,r);for(;C(r););for(var o=0,s=e.Debug.assertDefined(S.program).getSourceFiles();o<s.length;o++){var c=s[o];n=e.addRange(n,f(S,c,r))}return n||e.emptyArray},T.emit=function(n,i,o,s,u){if(r===t.EmitAndSemanticDiagnosticsBuilderProgram&&(a(S,n),!n)){for(var l=[],_=!1,d=void 0,p=[],f=void 0;f=E(i,o,s,u);)_=_||f.result.emitSkipped,d=e.addRange(d,f.result.diagnostics),p=e.addRange(p,f.result.emittedFiles),l=e.addRange(l,f.result.sourceMaps);return{emitSkipped:_,diagnostics:d||e.emptyArray,emittedFiles:p,sourceMaps:l}}return e.Debug.assertDefined(S.program).emit(n,i||e.maybeBind(c,c.writeFile),o,s,u)},T.releaseProgram=function(){!function(t){e.BuilderState.releaseCache(t),t.program=void 0}(S),h=void 0},r===t.SemanticDiagnosticsBuilderProgram?T.getSemanticDiagnosticsOfNextAffectedFile=C:r===t.EmitAndSemanticDiagnosticsBuilderProgram?(T.getSemanticDiagnosticsOfNextAffectedFile=C,T.emitNextAffectedFile=E):e.notImplemented(),T;function E(t,r,n,i){var a=o(S,r,D),s=1,u=!1;if(!a)if(S.compilerOptions.out||S.compilerOptions.outFile){var l=e.Debug.assertDefined(S.program);if(S.programEmitComplete||!e.some(l.getProjectReferences(),(function(e){return!!e.prepend})))return void(S.programEmitComplete=!0);a=l}else{var _=function(t){var r=t.affectedFilesPendingEmit;if(r){for(var n=t.seenEmittedFiles||(t.seenEmittedFiles=e.createMap()),i=t.affectedFilesPendingEmitIndex;i<r.length;i++){var a=e.Debug.assertDefined(t.program).getSourceFileByPath(r[i]);if(a){var o=n.get(a.path),s=e.Debug.assertDefined(e.Debug.assertDefined(t.affectedFilesPendingEmitKind).get(a.path));if(void 0===o||o<s)return t.affectedFilesPendingEmitIndex=i,{affectedFile:a,emitKind:s}}}t.affectedFilesPendingEmit=void 0,t.affectedFilesPendingEmitKind=void 0,t.affectedFilesPendingEmitIndex=void 0}}(S);if(!_){if(S.emittedBuildInfo)return;var d=e.Debug.assertDefined(S.program);return p(S,d.emitBuildInfo(t||e.maybeBind(c,c.writeFile),r),d,1,!1,!0)}a=_.affectedFile,s=_.emitKind,u=!0}return p(S,e.Debug.assertDefined(S.program).emit(a===S.program?void 0:a,t||e.maybeBind(c,c.writeFile),r,n||0===s,i),a,s,u)}function C(e,n){for(;;){var i=o(S,e,D);if(!i)return;if(i===S.program)return d(S,S.program.getSemanticDiagnostics(void 0,e),i);if(r===t.EmitAndSemanticDiagnosticsBuilderProgram&&v(S,i.path,1),!n||!n(i))return d(S,f(S,i,e),i);_(S,i)}}},e.createBuildProgramUsingProgramBuildInfo=function(t,r,n){var i=e.getDirectoryPath(e.getNormalizedAbsolutePath(r,n.getCurrentDirectory())),a=e.createGetCanonicalFileName(n.useCaseSensitiveFileNames()),o=e.createMap();for(var s in t.fileInfos)e.hasProperty(t.fileInfos,s)&&o.set(u(s),t.fileInfos[s]);var c={fileInfos:o,compilerOptions:e.convertToOptionsWithAbsolutePaths(t.options,(function(t){return e.getNormalizedAbsolutePath(t,i)})),referencedMap:b(t.referencedMap,u),exportedModulesMap:b(t.exportedModulesMap,u),semanticDiagnosticsPerFile:t.semanticDiagnosticsPerFile&&e.arrayToMap(t.semanticDiagnosticsPerFile,(function(t){return u(e.isString(t)?t:t[0])}),(function(t){return e.isString(t)?e.emptyArray:t[1]})),hasReusableDiagnostic:!0};return{getState:function(){return c},backupState:e.noop,restoreState:e.noop,getProgram:e.notImplemented,getProgramOrUndefined:e.returnUndefined,releaseProgram:e.noop,getCompilerOptions:function(){return c.compilerOptions},getSourceFile:e.notImplemented,getSourceFiles:e.notImplemented,getOptionsDiagnostics:e.notImplemented,getGlobalDiagnostics:e.notImplemented,getConfigFileParsingDiagnostics:e.notImplemented,getSyntacticDiagnostics:e.notImplemented,getDeclarationDiagnostics:e.notImplemented,getSemanticDiagnostics:e.notImplemented,emit:e.notImplemented,getAllDependencies:e.notImplemented,getCurrentDirectory:e.notImplemented,emitNextAffectedFile:e.notImplemented,getSemanticDiagnosticsOfNextAffectedFile:e.notImplemented};function u(t){return e.toPath(t,i,a)}},e.createRedirectedBuilderProgram=x}(s||(s={})),function(e){e.createSemanticDiagnosticsBuilderProgram=function(t,r,n,i,a,o){return e.createBuilderProgram(e.BuilderProgramKind.SemanticDiagnosticsBuilderProgram,e.getBuilderCreationParameters(t,r,n,i,a,o))},e.createEmitAndSemanticDiagnosticsBuilderProgram=function(t,r,n,i,a,o){return e.createBuilderProgram(e.BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram,e.getBuilderCreationParameters(t,r,n,i,a,o))},e.createAbstractBuilder=function(t,r,n,i,a,o){var s=e.getBuilderCreationParameters(t,r,n,i,a,o),c=s.newProgram,u=s.configFileParsingDiagnostics;return e.createRedirectedBuilderProgram({program:c,compilerOptions:c.getCompilerOptions()},u)}}(s||(s={})),function(e){function t(t){return e.some(e.ignoredPaths,(function(r){return e.stringContains(t,r)}))}function r(t){var r=e.getRootLength(t);if(t.length===r)return!1;var n=t.indexOf(e.directorySeparator,r);if(-1===n)return!1;var i=t.substring(r,n+1),a=r>1||47!==t.charCodeAt(0);if(a&&0!==t.search(/[a-zA-Z]:/)&&0===i.search(/[a-zA-z]\$\//)){if(-1===(n=t.indexOf(e.directorySeparator,n+1)))return!1;i=t.substring(r+i.length,n+1)}if(a&&0!==i.search(/users\//i))return!0;for(var o=n+1,s=2;s>0;s--)if(0===(o=t.indexOf(e.directorySeparator,o)+1))return!1;return!0}e.isPathIgnored=t,e.canWatchDirectory=r,e.maxNumberOfFilesToIterateForInvalidation=256,e.createResolutionCache=function(n,i,a){var o,s,c,u=!1,l=e.createMultiMap(),_=e.memoize((function(){return n.getCurrentDirectory()})),d=n.getCachedDirectoryStructureHost(),p=e.createMap(),f=e.createCacheWithRedirects(),m=e.createCacheWithRedirects(),g=e.createModuleResolutionCacheWithMaps(f,m,_(),n.getCanonicalFileName),y=e.createMap(),h=e.createCacheWithRedirects(),v=[".ts",".tsx",".js",".jsx",".json"],b=e.createMap(),x=e.createMap(),D=i&&e.removeTrailingDirectorySeparator(e.getNormalizedAbsolutePath(i,_())),S=D&&n.toPath(D),T=e.createMap();return{startRecordingFilesWithChangedResolutions:function(){o=[]},finishRecordingFilesWithChangedResolutions:function(){var e=o;return o=void 0,e},startCachingPerDirectoryResolution:A,finishCachingPerDirectoryResolution:function(){u=!1,c=void 0,A(),x.forEach((function(e,t){0===e.refCount&&(x.delete(t),e.watcher.close())}))},resolveModuleNames:function(t,r,n,i){return P(t,r,i,p,f,F,E,(function(t){return!t.resolvedModule||!e.resolutionExtensionIsTSOrJson(t.resolvedModule.extension)}),n,a)},getResolvedModuleWithFailedLookupLocationsFromCache:function(e,t){var r=p.get(n.toPath(t));return r&&r.get(e)},resolveTypeReferenceDirectives:function(t,r,n){return P(t,r,n,y,h,e.resolveTypeReferenceDirective,C,(function(e){return void 0===e.resolvedTypeReferenceDirective}),void 0,!1)},removeResolutionsFromProjectReferenceRedirects:function(t){if(!e.fileExtensionIs(t,".json"))return;var r=n.getCurrentProgram();if(!r)return;var i=r.getResolvedProjectReferenceByPath(t);if(!i)return;i.commandLine.fileNames.forEach((function(e){return W(n.toPath(e))}))},removeResolutionsOfFile:W,invalidateResolutionOfFile:function(e){W(e),H((function(t,r){var i=r(t);return!!i&&n.toPath(i.resolvedFileName)===e}))},setFilesWithInvalidatedNonRelativeUnresolvedImports:function(t){e.Debug.assert(c===t||void 0===c),c=t},createHasInvalidatedResolution:function(t){if(u||t)return s=void 0,e.returnTrue;var r=s;return s=void 0,function(e){return!!r&&r.has(e)||N(e)}},updateTypeRootsWatch:function(){var t=n.getCompilationSettings();if(t.types)return void X();var r=e.getEffectiveTypeRoots(t,{directoryExists:$,getCurrentDirectory:_});r?e.mutateMap(T,e.arrayToMap(r,(function(e){return n.toPath(e)})),{createNewValue:Q,onDeleteValue:e.closeFileWatcher}):X()},closeTypeRootsWatch:X,clear:function(){e.clearMap(x,e.closeFileWatcherOf),b.clear(),l.clear(),X(),p.clear(),y.clear(),u=!1,A()}};function E(e){return e.resolvedModule}function C(e){return e.resolvedTypeReferenceDirective}function k(t,r){return!(void 0===t||r.length<=t.length)&&(e.startsWith(r,t)&&r[t.length]===e.directorySeparator)}function N(e){if(!c)return!1;var t=c.get(e);return!!t&&!!t.length}function A(){f.clear(),m.clear(),h.clear(),l.forEach(K),l.clear()}function F(t,r,i,a,o){var s=e.resolveModuleName(t,r,i,a,g,o);if(!n.getGlobalCache)return s;var c=n.getGlobalCache();if(!(void 0===c||e.isExternalModuleNameRelative(t)||s.resolvedModule&&e.extensionIsTS(s.resolvedModule.extension))){var u=e.loadModuleFromGlobalCache(e.Debug.assertDefined(n.globalCacheResolutionModuleName)(t),n.projectName,i,a,c),l=u.resolvedModule,_=u.failedLookupLocations;if(l)return{resolvedModule:l,failedLookupLocations:e.addRange(s.failedLookupLocations,_)}}return s}function P(t,r,i,a,s,c,l,_,d,p){var f=n.toPath(r),m=a.get(f)||a.set(f,e.createMap()).get(f),g=e.getDirectoryPath(f),y=s.getOrCreateMapOfCacheRedirects(i),h=y.get(g);h||(h=e.createMap(),y.set(g,h));for(var v=[],b=n.getCompilationSettings(),x=p&&N(f),D=n.getCurrentProgram(),S=D&&D.getResolvedProjectReferenceToRedirect(r),T=S?!i||i.sourceFile.path!==S.sourceFile.path:!!i,E=e.createMap(),C=0,k=t;C<k.length;C++){var A=k[C],F=m.get(A);if(!E.has(A)&&u||T||!F||F.isInvalidated||x&&!e.isExternalModuleNameRelative(A)&&_(F)){var P=F,w=h.get(A);w?F=w:(F=c(A,r,b,n,i),h.set(A,F)),m.set(A,F),R(A,F),P&&z(P),p&&o&&!I(P,F)&&(o.push(f),p=!1)}e.Debug.assert(void 0!==F&&!F.isInvalidated),E.set(A,!0),v.push(l(F))}return m.forEach((function(t,r){E.has(r)||e.contains(d,r)||(z(t),m.delete(r))})),v;function I(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=l(e),n=l(t);return r===n||!(!r||!n)&&r.resolvedFileName===n.resolvedFileName}}function w(t){return e.endsWith(t,"/node_modules")}function I(t){return e.endsWith(t,"/node_modules/@types")}function O(t,r){if(k(S,r)){t=e.isRootedDiskPath(t)?e.normalizePath(t):e.getNormalizedAbsolutePath(t,_()),e.Debug.assert(t.length===r.length,"FailedLookup: "+t+" failedLookupLocationPath: "+r);var n=r.indexOf(e.directorySeparator,S.length+1);return-1!==n?{dir:t.substr(0,n),dirPath:r.substr(0,n)}:{dir:D,dirPath:S,nonRecursive:!1}}return M(e.getDirectoryPath(e.getNormalizedAbsolutePath(t,_())),e.getDirectoryPath(r))}function M(t,n){for(;e.pathContainsNodeModules(n);)t=e.getDirectoryPath(t),n=e.getDirectoryPath(n);if(w(n))return r(e.getDirectoryPath(n))?{dir:t,dirPath:n}:void 0;var i,a,o=!0;if(void 0!==S)for(;!k(n,S);){var s=e.getDirectoryPath(n);if(s===n)break;o=!1,i=n,a=t,n=s,t=e.getDirectoryPath(t)}return r(n)?{dir:a||t,dirPath:i||n,nonRecursive:o}:void 0}function L(t){return e.fileExtensionIsOneOf(t,v)}function R(t,r){r.failedLookupLocations&&r.failedLookupLocations.length&&(r.refCount?r.refCount++:(r.refCount=1,e.isExternalModuleNameRelative(t)?B(r):l.add(t,r)))}function B(t){e.Debug.assert(!!t.refCount);for(var r=!1,i=0,a=t.failedLookupLocations;i<a.length;i++){var o=a[i],s=n.toPath(o),c=O(o,s);if(c){var u=c.dir,l=c.dirPath,_=c.nonRecursive;if(!L(s)){var d=b.get(s)||0;b.set(s,d+1)}l===S?(e.Debug.assert(!_),r=!0):J(u,l,_)}}r&&J(D,S,!0)}function j(e){e.refCount=void 0}function K(e,t){var r=n.getCurrentProgram(),i=r&&r.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(t)?j:B;e.forEach(i)}function J(t,r,n){var i=x.get(r);i?(e.Debug.assert(!!n==!!i.nonRecursive),i.refCount++):x.set(r,{watcher:V(t,r,n),refCount:1,nonRecursive:n})}function z(t){if(t.refCount&&(t.refCount--,!t.refCount)){for(var r=!1,i=0,a=t.failedLookupLocations;i<a.length;i++){var o=a[i],s=n.toPath(o),c=O(o,s);if(c){var u=c.dirPath,l=b.get(s);l&&(1===l?b.delete(s):(e.Debug.assert(l>1),b.set(s,l-1))),u===S?r=!0:U(u)}}r&&U(S)}}function U(e){x.get(e).refCount--}function V(e,t,r){return n.watchDirectoryOfFailedLookupLocation(e,(function(e){var r=n.toPath(e);d&&d.addOrDeleteFileOrDirectory(e,r),!u&&Y(r,t===r)&&n.onInvalidatedResolution()}),r?0:1)}function q(e,t){var r=e.get(t);r&&(r.forEach(z),e.delete(t))}function W(e){q(p,e),q(y,e)}function G(t,r,i){var a=e.createMap();t.forEach((function(t,o){var c=e.getDirectoryPath(o),u=a.get(c);u||(u=e.createMap(),a.set(c,u)),t.forEach((function(t,a){u.has(a)||(u.set(a,!0),!t.isInvalidated&&r(t,i)&&(t.isInvalidated=!0,(s||(s=e.createMap())).set(o,!0),o.endsWith(e.inferredTypesContainingFile)&&n.onChangedAutomaticTypeDirectiveNames()))}))}))}function H(t){var r;(r=n.maxNumberOfFilesToIterateForInvalidation||e.maxNumberOfFilesToIterateForInvalidation,p.size>r||y.size>r)?u=!0:(G(p,t,E),G(y,t,C))}function Y(r,i){var a;if(i)a=function(e){return k(r,n.toPath(e))};else{if(t(r))return!1;if(n.fileIsOpen(r))return!1;var o=e.getDirectoryPath(r);if(I(r)||w(r)||I(o)||w(o))a=function(t){return n.toPath(t)===r||e.startsWith(n.toPath(t),r)};else{if(!L(r)&&!b.has(r))return!1;if(e.isEmittedFileOfProgram(n.getCurrentProgram(),r))return!1;a=function(e){return n.toPath(e)===r}}}var c=s&&s.size;return H((function(t){return e.some(t.failedLookupLocations,a)})),u||s&&s.size!==c}function X(){e.clearMap(T,e.closeFileWatcher)}function Q(e,t){return n.watchTypeRootsDirectory(t,(function(r){var i=n.toPath(r);d&&d.addOrDeleteFileOrDirectory(r,i),n.onChangedAutomaticTypeDirectiveNames();var a=function(e,t){if(!u){if(k(S,t))return S;var r=M(e,t);return r&&x.has(r.dirPath)?r.dirPath:void 0}}(t,e);a&&Y(i,a===i)&&n.onInvalidatedResolution()}),1)}function $(t){var i=e.getDirectoryPath(e.getDirectoryPath(t)),a=n.toPath(i);return a===S||r(a)}}}(s||(s={})),function(e){!function(r){var n,i;function a(t,r,n){var i=t.importModuleSpecifierPreference,a=t.importModuleSpecifierEnding;return{relativePreference:"relative"===i?0:"non-relative"===i?1:2,ending:function(){switch(a){case"minimal":return 0;case"index":return 1;case"js":return 2;default:return function(t){var r=t.imports;return e.firstDefined(r,(function(t){var r=t.text;return e.pathIsRelative(r)?e.hasJSOrJsonFileExtension(r):void 0}))||!1}(n)?2:e.getEmitModuleResolutionKind(r)!==e.ModuleResolutionKind.NodeJs?1:0}}()}}function o(t,r,n,i,a,o,u){var l=s(r,i),_=d(a,r,n,l.getCanonicalFileName,i,o);return e.firstDefined(_,(function(e){return f(e,l,i,t)}))||c(n,l,t,u)}function s(t,r){return{getCanonicalFileName:e.createGetCanonicalFileName(!r.useCaseSensitiveFileNames||r.useCaseSensitiveFileNames()),sourceDirectory:e.getDirectoryPath(t)}}function c(t,r,n,i){var a=r.getCanonicalFileName,o=r.sourceDirectory,s=i.ending,c=i.relativePreference,l=n.baseUrl,_=n.paths,d=n.rootDirs,f=d&&function(t,r,n,i,a,o){var s=m(r,t,i);if(void 0===s)return;var c=m(n,t,i),u=void 0!==c?e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(c,s,i)):s;return e.getEmitModuleResolutionKind(o)===e.ModuleResolutionKind.NodeJs?g(u,a,o):e.removeFileExtension(u)}(d,t,o,a,s,n)||g(e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(o,t,a)),s,n);if(!l||0===c)return f;var v=y(t,l,a);if(!v)return f;var b=g(v,s,n),x=_&&p(e.removeFileExtension(v),b,_),D=void 0===x?b:x;return 1===c?D:(2!==c&&e.Debug.assertNever(c),h(D)||u(f)<u(D)?f:D)}function u(t){for(var r=0,n=e.startsWith(t,"./")?2:0;n<t.length;n++)47===t.charCodeAt(n)&&r++;return r}function l(e){var t=e.match(/\//g);return t?t.length:0}function _(t,r){return e.compareValues(l(t),l(r))}function d(r,n,i,a,o,s){var c=s.get(i),u=c?t(c,[i]):[i],l=o.getCurrentDirectory?o.getCurrentDirectory():"",d=u.map((function(t){return e.getNormalizedAbsolutePath(t,l)})),p=o.getProbableSymlinks?o.getProbableSymlinks(r):e.discoverProbableSymlinks(r,a,l),f=[],m=!o.useCaseSensitiveFileNames||o.useCaseSensitiveFileNames()?e.compareStringsCaseSensitive:e.compareStringsCaseInsensitive;if(p.forEach((function(t,r){if(!e.startsWithDirectory(n,t,a)){var i=e.find(d,(function(e){return 0===m(e.slice(0,t.length+1),t+"/")}));if(void 0!==i){var s=e.getRelativePathFromDirectory(t,i,a),c=e.resolvePath(r,s);o.fileExists&&!o.fileExists(c)||f.push(c)}}})),f.push.apply(f,d),f.length<2)return f;for(var g=e.arrayToMap(f,e.identity,a),y=[],h=function(t){var r,n=e.ensureTrailingDirectorySeparator(t);g.forEach((function(t,i){e.startsWith(t,n)&&((r||(r=[])).push(i),g.delete(i))})),r&&(r.length>1&&r.sort(_),y.push.apply(y,r))},v=e.getDirectoryPath(e.toPath(n,l,a));0!==g.size;v=e.getDirectoryPath(v))h(v);return y}function p(t,r,n){for(var i in n)for(var a=0,o=n[i];a<o.length;a++){var s=o[a],c=e.removeFileExtension(e.normalizePath(s)),u=c.indexOf("*");if(-1!==u){var l=c.substr(0,u),_=c.substr(u+1);if(r.length>=l.length+_.length&&e.startsWith(r,l)&&e.endsWith(r,_)||!_&&r===e.removeTrailingDirectorySeparator(l)){var d=r.substr(l.length,r.length-_.length);return i.replace("*",d)}}else if(c===r||c===t)return i}}function f(t,r,n,i,a){var o=r.getCanonicalFileName,s=r.sourceDirectory;if(n.fileExists&&n.readFile){var c=function(t){var r,n,i=0,a=0,o=0;!function(e){e[e.BeforeNodeModules=0]="BeforeNodeModules",e[e.NodeModules=1]="NodeModules",e[e.Scope=2]="Scope",e[e.PackageContent=3]="PackageContent"}(n||(n={}));var s=0,c=0,u=0;for(;c>=0;)switch(s=c,c=t.indexOf("/",s+1),u){case 0:t.indexOf(e.nodeModulesPathPart,s)===s&&(i=s,a=c,u=1);break;case 1:case 2:1===u&&"@"===t.charAt(s+1)?u=2:(o=c,u=3);break;case 3:u=t.indexOf(e.nodeModulesPathPart,s)===s?1:3}return r=s,u>1?{topLevelNodeModulesIndex:i,topLevelPackageNameIndex:a,packageRootIndex:o,fileNameIndex:r}:void 0}(t);if(c){var u,l=t.substring(0,c.packageRootIndex);if(!a){var _=e.combinePaths(l,"package.json"),d=(u=n.fileExists(_)?JSON.parse(n.readFile(_)):void 0)&&u.typesVersions?e.getPackageJsonTypesVersionsPaths(u.typesVersions):void 0;if(d){var f=t.slice(c.packageRootIndex+1),m=p(e.removeFileExtension(f),g(f,0,i),d.paths);void 0!==m&&(t=e.combinePaths(t.slice(0,c.packageRootIndex),m))}}var y=a?t:function(t){if(u){var r=u.typings||u.types||u.main;if(r){var i=e.toPath(r,l,o);if(e.removeFileExtension(i)===e.removeFileExtension(o(t)))return l}}var a=e.removeFileExtension(t);if("/index"===o(a.substring(c.fileNameIndex))&&!function(t,r){if(!t.fileExists)return;for(var n=e.getSupportedExtensions({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]),i=0,a=n;i<a.length;i++){var o=a[i],s=r+o;if(t.fileExists(s))return s}}(n,a.substring(0,c.fileNameIndex)))return a.substring(0,c.fileNameIndex);return a}(t),h=n.getGlobalTypingsCacheLocation&&n.getGlobalTypingsCacheLocation(),v=o(y.substring(0,c.topLevelNodeModulesIndex));if(e.startsWith(s,v)||h&&e.startsWith(o(h),v)){var b=y.substring(c.topLevelPackageNameIndex+1),x=e.getPackageNameFromTypesPackageName(b);return e.getEmitModuleResolutionKind(i)!==e.ModuleResolutionKind.NodeJs&&x===b?void 0:x}}}}function m(t,r,n){return e.firstDefined(r,(function(e){var r=y(t,e,n);return h(r)?void 0:r}))}function g(t,r,n){if(e.fileExtensionIs(t,".json"))return t;var i=e.removeFileExtension(t);switch(r){case 0:return e.removeSuffix(i,"/index");case 1:return i;case 2:return i+function(t,r){var n=e.extensionFromPath(t);switch(n){case".ts":case".d.ts":return".js";case".tsx":return 1===r.jsx?".jsx":".js";case".js":case".jsx":case".json":return n;case".tsbuildinfo":return e.Debug.fail("Extension .tsbuildinfo is unsupported:: FileName:: "+t);default:return e.Debug.assertNever(n)}}(t,n);default:return e.Debug.assertNever(r)}}function y(t,r,n){var i=e.getRelativePathToDirectoryOrUrl(r,t,r,n,!1);return e.isRootedDiskPath(i)?void 0:i}function h(t){return e.startsWith(t,"..")}!function(e){e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Auto=2]="Auto"}(n||(n={})),function(e){e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension"}(i||(i={})),r.updateModuleSpecifier=function(t,r,n,i,a,s,c){var u=o(t,r,n,i,a,s,function(t,r){return{relativePreference:e.isExternalModuleNameRelative(r)?0:1,ending:e.hasJSOrJsonFileExtension(r)?2:e.getEmitModuleResolutionKind(t)!==e.ModuleResolutionKind.NodeJs||e.endsWith(r,"index")?1:0}}(t,c));if(u!==c)return u},r.getModuleSpecifier=function(e,t,r,n,i,s,c,u){return void 0===c&&(c={}),o(e,r,n,i,s,u,a(c,e,t))},r.getNodeModulesPackageName=function(t,r,n,i,a,o){var c=s(r,i),u=d(a,r,n,c.getCanonicalFileName,i,o);return e.firstDefined(u,(function(e){return f(e,c,i,t,!0)}))},r.getModuleSpecifiers=function(t,r,n,i,o,u,l){var _=function(t){var r=e.find(t.declarations,(function(t){return e.isNonGlobalAmbientModule(t)&&(!e.isExternalModuleAugmentation(t)||!e.isExternalModuleNameRelative(e.getTextOfIdentifierOrLiteral(t.name)))}));if(r)return r.name.text}(t);if(_)return[_];var p=s(n.path,i),m=e.getSourceFileOfNode(t.valueDeclaration||e.getNonAugmentationDeclaration(t)),g=d(o,n.path,m.originalFileName,p.getCanonicalFileName,i,l),y=a(u,r,n),h=e.mapDefined(g,(function(e){return f(e,p,i,r)}));return h.length?h:g.map((function(e){return c(e,p,r,y)}))},r.countPathComponents=u}(e.moduleSpecifiers||(e.moduleSpecifiers={}))}(s||(s={})),function(e){var r=e.sys?{getCurrentDirectory:function(){return e.sys.getCurrentDirectory()},getNewLine:function(){return e.sys.newLine},getCanonicalFileName:e.createGetCanonicalFileName(e.sys.useCaseSensitiveFileNames)}:void 0;function n(t,n){var i=t===e.sys?r:{getCurrentDirectory:function(){return t.getCurrentDirectory()},getNewLine:function(){return t.newLine},getCanonicalFileName:e.createGetCanonicalFileName(t.useCaseSensitiveFileNames)};if(!n)return function(r){return t.write(e.formatDiagnostic(r,i))};var a=new Array(1);return function(r){a[0]=r,t.write(e.formatDiagnosticsWithColorAndContext(a,i)+i.getNewLine()),a[0]=void 0}}function i(t,r,n){return!(!t.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!e.contains(e.screenStartingMessageCodes,r.code))&&(t.clearScreen(),!0)}function a(e){return e.now?e.now().toLocaleTimeString("en-US",{timeZone:"UTC"}):(new Date).toLocaleTimeString()}function o(t,r){return r?function(r,n,o){i(t,r,o);var s="["+e.formatColorAndReset(a(t),e.ForegroundColorEscapeSequences.Grey)+"] ";s+=""+e.flattenDiagnosticMessageText(r.messageText,t.newLine)+(n+n),t.write(s)}:function(r,n,o){var s="";i(t,r,o)||(s+=n),s+=a(t)+" - ",s+=""+e.flattenDiagnosticMessageText(r.messageText,t.newLine)+function(t,r){return e.contains(e.screenStartingMessageCodes,t.code)?r+r:r}(r,n),t.write(s)}}function s(t){return e.countWhere(t,(function(t){return t.category===e.DiagnosticCategory.Error}))}function c(t){return 1===t?e.Diagnostics.Found_1_error_Watching_for_file_changes:e.Diagnostics.Found_0_errors_Watching_for_file_changes}function u(t,r){if(0===t)return"";var n=e.createCompilerDiagnostic(1===t?e.Diagnostics.Found_1_error:e.Diagnostics.Found_0_errors,t);return""+r+e.flattenDiagnosticMessageText(n.messageText,r)+r+r}function l(t,r){(t.getCompilerOptions().listFiles||t.getCompilerOptions().listFilesOnly)&&e.forEach(t.getSourceFiles(),(function(e){r(e.fileName)}))}function _(t,r,n,i,a,o,c,u){var _=!!t.getCompilerOptions().listFilesOnly,d=t.getConfigFileParsingDiagnostics().slice(),p=d.length;e.addRange(d,t.getSyntacticDiagnostics(void 0,o)),d.length===p&&(e.addRange(d,t.getOptionsDiagnostics(o)),_||(e.addRange(d,t.getGlobalDiagnostics(o)),d.length===p&&e.addRange(d,t.getSemanticDiagnostics(void 0,o))));var f=_?{emitSkipped:!0,diagnostics:e.emptyArray}:t.emit(void 0,a,o,c,u),m=f.emittedFiles,g=f.diagnostics;if(e.addRange(d,g),e.sortAndDeduplicateDiagnostics(d).forEach(r),n){var y=t.getCurrentDirectory();e.forEach(m,(function(t){var r=e.getNormalizedAbsolutePath(t,y);n("TSFILE: "+r)})),l(t,n)}return i&&i(s(d)),{emitResult:f,diagnostics:d}}function d(t,r,n,i,a,o,s,c){var u=_(t,r,n,i,a,o,s,c),l=u.emitResult,d=u.diagnostics;return l.emitSkipped&&d.length>0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:d.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}function p(t,r){return void 0===t&&(t=e.sys),{onWatchStatusChange:r||o(t),watchFile:e.maybeBind(t,t.watchFile)||function(){return e.noopFileWatcher},watchDirectory:e.maybeBind(t,t.watchDirectory)||function(){return e.noopFileWatcher},setTimeout:e.maybeBind(t,t.setTimeout)||e.noop,clearTimeout:e.maybeBind(t,t.clearTimeout)||e.noop}}function f(t,r){var n=e.memoize((function(){return e.getDirectoryPath(e.normalizePath(t.getExecutingFilePath()))}));return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),getDefaultLibLocation:n,getDefaultLibFileName:function(t){return e.combinePaths(n(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,r,n,i,a){return t.readDirectory(e,r,n,i,a)},realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable),trace:function(e){return t.write(e+t.newLine)},createDirectory:function(e){return t.createDirectory(e)},writeFile:function(e,r,n){return t.writeFile(e,r,n)},onCachedDirectoryStructureHostCreate:function(e){return e||t},createHash:e.maybeBind(t,t.createHash),createProgram:r||e.createEmitAndSemanticDiagnosticsBuilderProgram}}function m(t,r,n,i){void 0===t&&(t=e.sys);var a=function(e){return t.write(e+t.newLine)},o=f(t,r);return e.copyProperties(o,p(t,i)),o.afterProgramCreate=function(r){var i=r.getCompilerOptions(),s=e.getNewLineCharacter(i,(function(){return t.newLine}));_(r,n,a,(function(t){return o.onWatchStatusChange(e.createCompilerDiagnostic(c(t),t),s,i,t)}))},o}function g(t,r,n){r(n),t.exit(e.ExitStatus.DiagnosticsPresent_OutputsSkipped)}e.createDiagnosticReporter=n,e.screenStartingMessageCodes=[e.Diagnostics.Starting_compilation_in_watch_mode.code,e.Diagnostics.File_change_detected_Starting_incremental_compilation.code],e.getLocaleTimeString=a,e.createWatchStatusReporter=o,e.parseConfigFileWithSystem=function(t,r,n,i){var a=n;a.onUnRecoverableConfigFileDiagnostic=function(e){return g(n,i,e)};var o=e.getParsedCommandLineOfConfigFile(t,r,a);return a.onUnRecoverableConfigFileDiagnostic=void 0,o},e.getErrorCountForSummary=s,e.getWatchErrorSummaryDiagnosticMessage=c,e.getErrorSummaryText=u,e.listFiles=l,e.emitFilesAndReportErrors=_,e.emitFilesAndReportErrorsAndGetExitStatus=d,e.noopFileWatcher={close:e.noop},e.createWatchHost=p,function(e){e.ConfigFile="Config file",e.SourceFile="Source file",e.MissingFile="Missing file",e.WildcardDirectory="Wild card directory",e.FailedLookupLocations="Failed Lookup Locations",e.TypeRoots="Type roots"}(e.WatchType||(e.WatchType={})),e.createWatchFactory=function(t,r){var n=t.trace?r.extendedDiagnostics?e.WatchLogLevel.Verbose:r.diagnostics?e.WatchLogLevel.TriggerOnly:e.WatchLogLevel.None:e.WatchLogLevel.None,i=n!==e.WatchLogLevel.None?function(e){return t.trace(e)}:e.noop,a=e.getWatchFactory(n,i);return a.writeLog=i,a},e.createCompilerHostFromProgramHost=function(t,r,n){void 0===n&&(n=t);var i=t.useCaseSensitiveFileNames(),a=e.memoize((function(){return t.getNewLine()}));return{getSourceFile:function(n,i,a){var o;try{e.performance.mark("beforeIORead"),o=t.readFile(n,r().charset),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){a&&a(e.message),o=""}return void 0!==o?e.createSourceFile(n,o,i):void 0},getDefaultLibLocation:e.maybeBind(t,t.getDefaultLibLocation),getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:function(r,n,i,a){try{e.performance.mark("beforeIOWrite"),function r(n){if(n.length>e.getRootLength(n)&&!t.directoryExists(n)){var i=e.getDirectoryPath(n);r(i),t.createDirectory&&t.createDirectory(n)}}(e.getDirectoryPath(e.normalizePath(r))),t.writeFile(r,n,i),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),useCaseSensitiveFileNames:function(){return i},getCanonicalFileName:e.createGetCanonicalFileName(i),getNewLine:function(){return e.getNewLineCharacter(r(),a)},fileExists:function(e){return t.fileExists(e)},readFile:function(e){return t.readFile(e)},trace:e.maybeBind(t,t.trace),directoryExists:e.maybeBind(n,n.directoryExists),getDirectories:e.maybeBind(n,n.getDirectories),realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable)||function(){return""},createHash:e.maybeBind(t,t.createHash),readDirectory:e.maybeBind(t,t.readDirectory)}},e.setGetSourceFileAsHashVersioned=function(r,n){var i=r.getSourceFile,a=n.createHash||e.generateDjb2Hash;r.getSourceFile=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var s=i.call.apply(i,t([r],e));return s&&(s.version=a.call(n,s.text)),s}},e.createProgramHost=f,e.createWatchCompilerHostOfConfigFile=function(e,t,r,i,a,o){var s=a||n(r),c=m(r,i,s,o);return c.onUnRecoverableConfigFileDiagnostic=function(e){return g(r,s,e)},c.configFileName=e,c.optionsToExtend=t,c},e.createWatchCompilerHostOfFilesAndCompilerOptions=function(e,t,r,i,a,o,s){var c=m(r,i,a||n(r),o);return c.rootFiles=e,c.options=t,c.projectReferences=s,c},e.performIncrementalCompilation=function(t){var r=t.system||e.sys,i=t.host||(t.host=e.createIncrementalCompilerHost(t.options,r)),a=e.createIncrementalProgram(t),o=d(a,t.reportDiagnostic||n(r),(function(e){return i.trace&&i.trace(e)}),t.reportErrorSummary||t.options.pretty?function(e){return r.write(u(e,r.newLine))}:void 0);return t.afterProgramEmitAndDiagnostics&&t.afterProgramEmitAndDiagnostics(a),o}}(s||(s={})),function(e){function r(t,r){if(!t.out&&!t.outFile){var n=e.getTsBuildInfoEmitOutputFilePath(t);if(n){var i=r.readFile(n);if(i){var a=e.getBuildInfo(i);if(a.version===e.version&&a.program)return e.createBuildProgramUsingProgramBuildInfo(a.program,n,r)}}}}function n(t,r){void 0===r&&(r=e.sys);var n=e.createCompilerHostWorker(t,void 0,r);return n.createHash=e.maybeBind(r,r.createHash),e.setGetSourceFileAsHashVersioned(n,r),e.changeCompilerHostLikeToUseCache(n,(function(t){return e.toPath(t,n.getCurrentDirectory(),n.getCanonicalFileName)})),n}e.readBuilderProgram=r,e.createIncrementalCompilerHost=n,e.createIncrementalProgram=function(t){var i=t.rootNames,a=t.options,o=t.configFileParsingDiagnostics,s=t.projectReferences,c=t.host,u=t.createProgram;return c=c||n(a),(u=u||e.createEmitAndSemanticDiagnosticsBuilderProgram)(i,a,c,r(a,c),o,s)},e.createWatchCompilerHost=function(t,r,n,i,a,o,s){return e.isArray(t)?e.createWatchCompilerHostOfFilesAndCompilerOptions(t,r,n,i,a,o,s):e.createWatchCompilerHostOfConfigFile(t,r,n,i,a,o)},e.createWatchProgram=function(n){var i,a,o,s,c,u,l,_,d=e.createMap(),p=!1,f=!1,m=n.useCaseSensitiveFileNames(),g=n.getCurrentDirectory(),y=n.configFileName,h=n.optionsToExtend,v=void 0===h?{}:h,b=n.createProgram,x=n.rootFiles,D=n.options,S=n.projectReferences,T=!1,E=!1,C=void 0===y?void 0:e.createCachedDirectoryStructureHost(n,g,m);C&&n.onCachedDirectoryStructureHostCreate&&n.onCachedDirectoryStructureHostCreate(C);var k=C||n,N=e.parseConfigHostFromCompilerHostLike(n,k),A=q();y&&n.configFileParsingResult&&(re(n.configFileParsingResult),A=q()),$(e.Diagnostics.Starting_compilation_in_watch_mode),y&&!n.configFileParsingResult&&(A=e.getNewLineCharacter(v,(function(){return n.getNewLine()})),e.Debug.assert(!x),te(),A=q());var F,P=e.createWatchFactory(n,D),w=P.watchFile,I=P.watchFilePath,O=P.watchDirectory,M=P.writeLog,L=e.createGetCanonicalFileName(m);M("Current directory: "+g+" CaseSensitiveFileNames: "+m),y&&(F=w(n,y,(function(){e.Debug.assert(!!y),a=e.ConfigFileProgramReloadLevel.Full,Z()}),e.PollingInterval.High,"Config file"));var R=e.createCompilerHostFromProgramHost(n,(function(){return D}),k);e.setGetSourceFileAsHashVersioned(R,n);var B=R.getSourceFile;R.getSourceFile=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return Y.apply(void 0,t([e,W(e)],r))},R.getSourceFileByPath=Y,R.getNewLine=function(){return A},R.fileExists=H,R.onReleaseOldSourceFile=function(e,t,r){var n=d.get(e.resolvedPath);void 0!==n&&(G(n)?(u||(u=[])).push(e.path):n.sourceFile===e&&(n.fileWatcher&&n.fileWatcher.close(),d.delete(e.resolvedPath),r||j.removeResolutionsOfFile(e.path)))},R.toPath=W,R.getCompilationSettings=function(){return D},R.watchDirectoryOfFailedLookupLocation=function(e,t,r){return O(n,e,t,r,"Failed Lookup Locations")},R.watchTypeRootsDirectory=function(e,t,r){return O(n,e,t,r,"Type roots")},R.getCachedDirectoryStructureHost=function(){return C},R.onInvalidatedResolution=Z,R.onChangedAutomaticTypeDirectiveNames=function(){f=!0,Z()},R.fileIsOpen=e.returnFalse,R.maxNumberOfFilesToIterateForInvalidation=n.maxNumberOfFilesToIterateForInvalidation,R.getCurrentProgram=U,R.writeLog=M;var j=e.createResolutionCache(R,y?e.getDirectoryPath(e.getNormalizedAbsolutePath(y,g)):g,!1);R.resolveModuleNames=n.resolveModuleNames?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.resolveModuleNames.apply(n,e)}:function(e,t,r,n){return j.resolveModuleNames(e,t,r,n)},R.resolveTypeReferenceDirectives=n.resolveTypeReferenceDirectives?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.resolveTypeReferenceDirectives.apply(n,e)}:function(e,t,r){return j.resolveTypeReferenceDirectives(e,t,r)};var K=!!n.resolveModuleNames||!!n.resolveTypeReferenceDirectives;return i=r(D,R),V(),se(),y?{getCurrentProgram:z,getProgram:V,close:J}:{getCurrentProgram:z,getProgram:V,updateRootFileNames:function(t){e.Debug.assert(!y,"Cannot update root file names with config file watch mode"),x=t,Z()},close:J};function J(){j.clear(),e.clearMap(d,(function(e){e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)})),F&&(F.close(),F=void 0),s&&(e.clearMap(s,e.closeFileWatcherOf),s=void 0),o&&(e.clearMap(o,e.closeFileWatcher),o=void 0)}function z(){return i}function U(){return i&&i.getProgramOrUndefined()}function V(){M("Synchronizing program");var t=z();p&&(A=q(),t&&e.changesAffectModuleResolution(t.getCompilerOptions(),D)&&j.clear());var r=j.createHasInvalidatedResolution(K);return e.isProgramUptoDate(U(),x,D,Q,H,r,f,S)?E&&(i=b(void 0,void 0,R,i,_,S),E=!1):function(t){M("CreatingProgramWith::"),M(" roots: "+JSON.stringify(x)),M(" options: "+JSON.stringify(D));var r=p||!U();p=!1,E=!1,j.startCachingPerDirectoryResolution(),R.hasInvalidatedResolution=t,R.hasChangedAutomaticTypeDirectiveNames=f,i=b(x,D,R,i,_,S),j.finishCachingPerDirectoryResolution(),e.updateMissingFilePathsWatch(i.getProgram(),o||(o=e.createMap()),ae),r&&j.updateTypeRootsWatch();if(u){for(var n=0,a=u;n<a.length;n++){var s=a[n];o.has(s)||d.delete(s)}u=void 0}}(r),n.afterProgramCreate&&n.afterProgramCreate(i),i}function q(){return e.getNewLineCharacter(D||v,(function(){return n.getNewLine()}))}function W(t){return e.toPath(t,g,L)}function G(e){return"boolean"==typeof e}function H(e){var t=W(e);return!!G(d.get(t))||k.fileExists(e)}function Y(t,r,i,a,o){var s=d.get(r);if(!G(s)){if(void 0===s||o||function(e){return"boolean"==typeof e.version}(s)){var c=B(t,i,a);if(s)c?(s.sourceFile=c,s.version=c.version,s.fileWatcher||(s.fileWatcher=I(n,t,ne,e.PollingInterval.Low,r,"Source file"))):(s.fileWatcher&&s.fileWatcher.close(),d.set(r,!1));else if(c){var u=I(n,t,ne,e.PollingInterval.Low,r,"Source file");d.set(r,{sourceFile:c,version:c.version,fileWatcher:u})}else d.set(r,!1);return c}return s.sourceFile}}function X(e){var t=d.get(e);void 0!==t&&(G(t)?d.set(e,{version:!1}):t.version=!1)}function Q(e){var t=d.get(e);return t&&t.version?t.version:void 0}function $(t){n.onWatchStatusChange&&n.onWatchStatusChange(e.createCompilerDiagnostic(t),A,D||v)}function Z(){n.setTimeout&&n.clearTimeout&&(c&&n.clearTimeout(c),M("Scheduling update"),c=n.setTimeout(ee,250))}function ee(){switch(c=void 0,$(e.Diagnostics.File_change_detected_Starting_incremental_compilation),a){case e.ConfigFileProgramReloadLevel.Partial:e.perfLogger.logStartUpdateProgram("PartialConfigReload"),function(){M("Reloading new file names and options");var t=e.getFileNamesFromConfigSpecs(l,e.getDirectoryPath(y),D,N);e.updateErrorForNoInputFiles(t,y,l,_,T)&&(E=!0);x=t.fileNames,V()}();break;case e.ConfigFileProgramReloadLevel.Full:e.perfLogger.logStartUpdateProgram("FullConfigReload"),function(){M("Reloading config file: "+y),a=e.ConfigFileProgramReloadLevel.None,C&&C.clearCache();te(),p=!0,V(),se()}();break;default:e.perfLogger.logStartUpdateProgram("SynchronizeProgram"),V()}e.perfLogger.logStopUpdateProgram("Done")}function te(){re(e.getParsedCommandLineOfConfigFile(y,v,N))}function re(t){x=t.fileNames,D=t.options,l=t.configFileSpecs,S=t.projectReferences,_=e.getConfigFileParsingDiagnostics(t).slice(),T=e.canJsonReportNoInutFiles(t.raw),E=!0}function ne(t,r,n){ie(t,n,r),r===e.FileWatcherEventKind.Deleted&&d.has(n)&&j.invalidateResolutionOfFile(n),j.removeResolutionsFromProjectReferenceRedirects(n),X(n),Z()}function ie(e,t,r){C&&C.addOrDeleteFile(e,t,r)}function ae(t){return I(n,t,oe,e.PollingInterval.Medium,t,"Missing file")}function oe(t,r,n){ie(t,n,r),r===e.FileWatcherEventKind.Created&&o.has(n)&&(o.get(n).close(),o.delete(n),X(n),Z())}function se(){l?e.updateWatchingWildcardDirectories(s||(s=e.createMap()),e.createMapFromTemplate(l.wildcardDirectories),ce):s&&e.clearMap(s,e.closeFileWatcherOf)}function ce(t,r){return O(n,t,(function(r){e.Debug.assert(!!y);var n=W(r);C&&C.addOrDeleteFileOrDirectory(r,n),X(n),e.isPathIgnored(n)||(n===t||!e.hasExtension(n)||e.isSupportedSourceFileName(r,D)?a!==e.ConfigFileProgramReloadLevel.Full&&(a=e.ConfigFileProgramReloadLevel.Partial,Z()):M("Project: "+y+" Detected file add/remove of non supported extension: "+r))}),r,"Wild card directory")}}}(s||(s={})),function(e){!function(e){e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutOfDateWithPrepend=3]="OutOfDateWithPrepend",e[e.OutputMissing=4]="OutputMissing",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.UpstreamOutOfDate=7]="UpstreamOutOfDate",e[e.UpstreamBlocked=8]="UpstreamBlocked",e[e.ComputingUpstream=9]="ComputingUpstream",e[e.TsVersionOutputOfDate=10]="TsVersionOutputOfDate",e[e.ContainerOnly=11]="ContainerOnly"}(e.UpToDateStatusType||(e.UpToDateStatusType={})),e.resolveConfigFileProjectName=function(t){return e.fileExtensionIs(t,".json")?t:e.combinePaths(t,"tsconfig.json")}}(s||(s={})),function(e){var r,n,i=new Date(-864e13),a=new Date(864e13);function o(){return e.createMap()}function s(t,r){return function(e,t,r){var n,i=e.get(t);return i||(n=r(),e.set(t,n)),i||n}(t,r,e.createMap)}function c(e,t){return t>e?t:e}function u(t){return e.fileExtensionIs(t,".d.ts")}function l(e){return!!e&&!!e.buildOrder}function _(e){return l(e)?e.buildOrder:e}function d(t,r){return function(n){var i=r?"["+e.formatColorAndReset(e.getLocaleTimeString(t),e.ForegroundColorEscapeSequences.Grey)+"] ":e.getLocaleTimeString(t)+" - ";i+=""+e.flattenDiagnosticMessageText(n.messageText,t.newLine)+(t.newLine+t.newLine),t.write(i)}}function p(t,r,n,i){var a=e.createProgramHost(t,r);return a.getModifiedTime=t.getModifiedTime?function(e){return t.getModifiedTime(e)}:e.returnUndefined,a.setModifiedTime=t.setModifiedTime?function(e,r){return t.setModifiedTime(e,r)}:e.noop,a.deleteFile=t.deleteFile?function(e){return t.deleteFile(e)}:e.noop,a.reportDiagnostic=n||e.createDiagnosticReporter(t),a.reportSolutionBuilderStatus=i||d(t),a}function f(t,r,n,i){var a,s,c=r,u=r,l=c.getCurrentDirectory(),_=e.createGetCanonicalFileName(c.useCaseSensitiveFileNames()),d=(a=i,s={},e.commonOptionsWithBuild.forEach((function(t){e.hasProperty(a,t.name)&&(s[t.name]=a[t.name])})),s),p=e.createCompilerHostFromProgramHost(c,(function(){return S.projectCompilerOptions}));e.setGetSourceFileAsHashVersioned(p,c),p.getParsedCommandLine=function(e){return h(S,e,g(S,e))},p.resolveModuleNames=e.maybeBind(c,c.resolveModuleNames),p.resolveTypeReferenceDirectives=e.maybeBind(c,c.resolveTypeReferenceDirectives);var f=p.resolveModuleNames?void 0:e.createModuleResolutionCache(l,_);if(!p.resolveModuleNames){var m=function(t,r,n){return e.resolveModuleName(t,r,S.projectCompilerOptions,p,f,n).resolvedModule};p.resolveModuleNames=function(t,r,n,i){return e.loadWithLocalCache(e.Debug.assertEachDefined(t),r,i,m)}}var y=e.createWatchFactory(u,i),v=y.watchFile,b=y.watchFilePath,x=y.watchDirectory,D=y.writeLog,S={host:c,hostWithWatch:u,currentDirectory:l,getCanonicalFileName:_,parseConfigFileHost:e.parseConfigHostFromCompilerHostLike(c),writeFileName:c.trace?function(e){return c.trace(e)}:void 0,options:i,baseCompilerOptions:d,rootNames:n,resolvedConfigFilePaths:e.createMap(),configFileCache:o(),projectStatus:o(),buildInfoChecked:o(),extendedConfigCache:e.createMap(),builderPrograms:o(),diagnostics:o(),projectPendingBuild:o(),projectErrorsReported:o(),compilerHost:p,moduleResolutionCache:f,buildOrder:void 0,readFileWithCache:function(e){return c.readFile(e)},projectCompilerOptions:d,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:t,currentInvalidatedProject:void 0,watch:t,allWatchedWildcardDirectories:o(),allWatchedInputFiles:o(),allWatchedConfigFiles:o(),timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:v,watchFilePath:b,watchDirectory:x,writeLog:D};return S}function m(t,r){return e.toPath(r,t.currentDirectory,t.getCanonicalFileName)}function g(e,t){var r=e.resolvedConfigFilePaths,n=r.get(t);if(void 0!==n)return n;var i=m(e,t);return r.set(t,i),i}function y(e){return!!e.options}function h(t,r,n){var i,a=t.configFileCache,o=a.get(n);if(o)return y(o)?o:void 0;var s,c=t.parseConfigFileHost,u=t.baseCompilerOptions,l=t.extendedConfigCache,_=t.host;return _.getParsedCommandLine?(s=_.getParsedCommandLine(r))||(i=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,r)):(c.onUnRecoverableConfigFileDiagnostic=function(e){return i=e},s=e.getParsedCommandLineOfConfigFile(r,u,c,l),c.onUnRecoverableConfigFileDiagnostic=e.noop),a.set(n,s||i),s}function v(t,r){return e.resolveConfigFileProjectName(e.resolvePath(t.currentDirectory,r))}function b(t,r){for(var n,i,a=e.createMap(),o=e.createMap(),s=[],c=0,u=r;c<u.length;c++){l(u[c])}return i?{buildOrder:n||e.emptyArray,circularDiagnostics:i}:n||e.emptyArray;function l(r,c){var u=g(t,r);if(!o.has(u))if(a.has(u))c||(i||(i=[])).push(e.createCompilerDiagnostic(e.Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,s.join("\r\n")));else{a.set(u,!0),s.push(r);var _=h(t,r,u);if(_&&_.projectReferences)for(var d=0,p=_.projectReferences;d<p.length;d++){var f=p[d];l(v(t,f.path),c||f.circular)}s.pop(),o.set(u,!0),(n||(n=[])).push(r)}}}function x(t){return t.buildOrder||function(t){var r=b(t,t.rootNames.map((function(e){return v(t,e)})));t.resolvedConfigFilePaths.clear();var n=e.arrayToSet(_(r),(function(e){return g(t,e)})),i={onDeleteValue:e.noop};e.mutateMapSkippingNewValues(t.configFileCache,n,i),e.mutateMapSkippingNewValues(t.projectStatus,n,i),e.mutateMapSkippingNewValues(t.buildInfoChecked,n,i),e.mutateMapSkippingNewValues(t.builderPrograms,n,i),e.mutateMapSkippingNewValues(t.diagnostics,n,i),e.mutateMapSkippingNewValues(t.projectPendingBuild,n,i),e.mutateMapSkippingNewValues(t.projectErrorsReported,n,i),t.watch&&(e.mutateMapSkippingNewValues(t.allWatchedConfigFiles,n,{onDeleteValue:e.closeFileWatcher}),e.mutateMapSkippingNewValues(t.allWatchedWildcardDirectories,n,{onDeleteValue:function(t){return t.forEach(e.closeFileWatcherOf)}}),e.mutateMapSkippingNewValues(t.allWatchedInputFiles,n,{onDeleteValue:function(t){return t.forEach(e.closeFileWatcher)}}));return t.buildOrder=r}(t)}function D(t,r,n){var i=r&&v(t,r),a=x(t);if(l(a))return a;if(i){var o=g(t,i);if(-1===e.findIndex(a,(function(e){return g(t,e)===o})))return}var s=i?b(t,[i]):a;return e.Debug.assert(!l(s)),e.Debug.assert(!n||void 0!==i),e.Debug.assert(!n||s[s.length-1]===i),n?s.slice(0,s.length-1):s}function S(r){r.cache&&T(r);var n=r.compilerHost,i=r.host,a=r.readFileWithCache,o=n.getSourceFile,s=e.changeCompilerHostLikeToUseCache(i,(function(e){return m(r,e)}),(function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return o.call.apply(o,t([n],e))})),c=s.originalReadFile,u=s.originalFileExists,l=s.originalDirectoryExists,_=s.originalCreateDirectory,d=s.originalWriteFile,p=s.getSourceFileWithCache,f=s.readFileWithCache;r.readFileWithCache=f,n.getSourceFile=p,r.cache={originalReadFile:c,originalFileExists:u,originalDirectoryExists:l,originalCreateDirectory:_,originalWriteFile:d,originalReadFileWithCache:a,originalGetSourceFile:o}}function T(e){if(e.cache){var t=e.cache,r=e.host,n=e.compilerHost,i=e.extendedConfigCache,a=e.moduleResolutionCache;r.readFile=t.originalReadFile,r.fileExists=t.originalFileExists,r.directoryExists=t.originalDirectoryExists,r.createDirectory=t.originalCreateDirectory,r.writeFile=t.originalWriteFile,n.getSourceFile=t.originalGetSourceFile,e.readFileWithCache=t.originalReadFileWithCache,i.clear(),a&&(a.directoryToModuleNameMap.clear(),a.moduleNameToDirectoryMap.clear()),e.cache=void 0}}function E(e,t){e.projectStatus.delete(t),e.diagnostics.delete(t)}function C(e,t,r){var n=e.projectPendingBuild,i=n.get(t);void 0===i?n.set(t,r):i<r&&n.set(t,r)}function k(t,r){t.allProjectBuildPending&&(t.allProjectBuildPending=!1,t.options.watch&&ee(t,e.Diagnostics.Starting_compilation_in_watch_mode),S(t),_(x(t)).forEach((function(r){return t.projectPendingBuild.set(g(t,r),e.ConfigFileProgramReloadLevel.None)})),r&&r.throwIfCancellationRequested())}function N(t,r){return t.projectPendingBuild.delete(r),t.currentInvalidatedProject=void 0,t.diagnostics.has(r)?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:e.ExitStatus.Success}function A(e,t,r,i,a){var o=!0;return{kind:n.UpdateOutputFileStamps,project:t,projectPath:r,buildOrder:a,getCompilerOptions:function(){return i.options},getCurrentDirectory:function(){return e.currentDirectory},updateOutputFileStatmps:function(){j(e,i,r),o=!1},done:function(){return o&&j(e,i,r),N(e,r)}}}function F(o,s,l,_,d,p,f){var y;!function(e){e[e.CreateProgram=0]="CreateProgram",e[e.SyntaxDiagnostics=1]="SyntaxDiagnostics",e[e.SemanticDiagnostics=2]="SemanticDiagnostics",e[e.Emit=3]="Emit",e[e.EmitBundle=4]="EmitBundle",e[e.BuildInvalidatedProjectOfBundle=5]="BuildInvalidatedProjectOfBundle",e[e.QueueReferencingProjects=6]="QueueReferencingProjects",e[e.Done=7]="Done"}(y||(y={}));var b,x,D,S=o===n.Build?y.CreateProgram:y.EmitBundle;return o===n.Build?{kind:o,project:l,projectPath:_,buildOrder:f,getCompilerOptions:function(){return p.options},getCurrentDirectory:function(){return s.currentDirectory},getBuilderProgram:function(){return E(e.identity)},getProgram:function(){return E((function(e){return e.getProgramOrUndefined()}))},getSourceFile:function(e){return E((function(t){return t.getSourceFile(e)}))},getSourceFiles:function(){return C((function(e){return e.getSourceFiles()}))},getOptionsDiagnostics:function(e){return C((function(t){return t.getOptionsDiagnostics(e)}))},getGlobalDiagnostics:function(e){return C((function(t){return t.getGlobalDiagnostics(e)}))},getConfigFileParsingDiagnostics:function(){return C((function(e){return e.getConfigFileParsingDiagnostics()}))},getSyntacticDiagnostics:function(e,t){return C((function(r){return r.getSyntacticDiagnostics(e,t)}))},getAllDependencies:function(e){return C((function(t){return t.getAllDependencies(e)}))},getSemanticDiagnostics:function(e,t){return C((function(r){return r.getSemanticDiagnostics(e,t)}))},getSemanticDiagnosticsOfNextAffectedFile:function(e,t){return E((function(r){return r.getSemanticDiagnosticsOfNextAffectedFile&&r.getSemanticDiagnosticsOfNextAffectedFile(e,t)}))},emit:function(e,t,r,n,i){return e||n?E((function(a){return a.emit(e,t,r,n,i)})):(J(y.SemanticDiagnostics,r),S===y.Emit?L(t,r,i):void 0)},done:T}:{kind:o,project:l,projectPath:_,buildOrder:f,getCompilerOptions:function(){return p.options},getCurrentDirectory:function(){return s.currentDirectory},emit:function(e,t){return S!==y.EmitBundle?D:j(e,t)},done:T};function T(e,t,r){return J(y.Done,e,t,r),N(s,_)}function E(e){return J(y.CreateProgram),b&&e(b)}function C(t){return E(t)||e.emptyArray}function k(){if(e.Debug.assert(void 0===b),s.options.dry)return Z(s,e.Diagnostics.A_non_dry_build_would_build_project_0,l),x=r.Success,void(S=y.QueueReferencingProjects);if(s.options.verbose&&Z(s,e.Diagnostics.Building_project_0,l),0===p.fileNames.length)return re(s,_,p.errors),x=r.None,void(S=y.QueueReferencingProjects);var t=s.host,n=s.compilerHost;s.projectCompilerOptions=p.options,function(t,r,n){if(!t.moduleResolutionCache)return;var i=t.moduleResolutionCache,a=m(t,r);if(0===i.directoryToModuleNameMap.redirectsMap.size)e.Debug.assert(0===i.moduleNameToDirectoryMap.redirectsMap.size),i.directoryToModuleNameMap.redirectsMap.set(a,i.directoryToModuleNameMap.ownMap),i.moduleNameToDirectoryMap.redirectsMap.set(a,i.moduleNameToDirectoryMap.ownMap);else{e.Debug.assert(i.moduleNameToDirectoryMap.redirectsMap.size>0);var o={sourceFile:n.options.configFile,commandLine:n};i.directoryToModuleNameMap.setOwnMap(i.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(o)),i.moduleNameToDirectoryMap.setOwnMap(i.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(o))}i.directoryToModuleNameMap.setOwnOptions(n.options),i.moduleNameToDirectoryMap.setOwnOptions(n.options)}(s,l,p),b=t.createProgram(p.fileNames,p.options,n,function(t,r,n){var i=t.options,a=t.builderPrograms,o=t.compilerHost;if(i.force)return;var s=a.get(r);return s||e.readBuilderProgram(n.options,o)}(s,_,p),p.errors,p.projectReferences),S++}function A(e,t,r){e.length?(x=M(s,_,b,e,t,r),S=y.QueueReferencingProjects):S++}function P(n){e.Debug.assertDefined(b),A(t(b.getConfigFileParsingDiagnostics(),b.getOptionsDiagnostics(n),b.getGlobalDiagnostics(n),b.getSyntacticDiagnostics(void 0,n)),r.SyntaxErrors,"Syntactic")}function w(t){A(e.Debug.assertDefined(b).getSemanticDiagnostics(void 0,t),r.TypeErrors,"Semantic")}function L(t,n,a){var o;e.Debug.assertDefined(b),e.Debug.assert(S===y.Emit),b.backupState();var l=[],d=e.emitFilesAndReportErrors(b,(function(e){return(o||(o=[])).push(e)}),void 0,void 0,(function(e,t,r){return l.push({name:e,text:t,writeByteOrderMark:r})}),n,!1,a).emitResult;if(o)return b.restoreState(),x=M(s,_,b,o,r.DeclarationEmitErrors,"Declaration file"),S=y.QueueReferencingProjects,{emitSkipped:!0,diagnostics:d.diagnostics};var f=s.host,g=s.compilerHost,h=r.DeclarationOutputUnchanged,v=i,D=!1,T=e.createDiagnosticCollection(),E=e.createMap();return l.forEach((function(n){var i,a=n.name,o=n.text,l=n.writeByteOrderMark;!D&&u(a)&&(f.fileExists(a)&&s.readFileWithCache(a)===o?i=f.getModifiedTime(a):(h&=~r.DeclarationOutputUnchanged,D=!0)),E.set(m(s,a),a),e.writeFile(t?{writeFile:t}:g,T,a,o,l),void 0!==i&&(v=c(i,v))})),R(T,E,v,D,l.length?l[0].name:e.getFirstProjectOutput(p,!f.useCaseSensitiveFileNames()),h),d}function R(t,n,i,o,c,u){var l=t.getDiagnostics();if(l.length)return x=M(s,_,b,l,r.EmitErrors,"Emit"),S=y.QueueReferencingProjects,l;s.writeFileName&&(n.forEach((function(e){return I(s,p,e)})),b&&e.listFiles(b,s.writeFileName));var d=B(s,p,i,e.Diagnostics.Updating_unchanged_output_timestamps_of_project_0,n);return s.diagnostics.delete(_),s.projectStatus.set(_,{type:e.UpToDateStatusType.UpToDate,newestDeclarationFileContentChangedTime:o?a:d,oldestOutputFileName:c}),b&&O(s,_,b),s.projectCompilerOptions=s.baseCompilerOptions,S=y.QueueReferencingProjects,x=u,l}function j(t,a){if(e.Debug.assert(o===n.UpdateBundle),s.options.dry)return Z(s,e.Diagnostics.A_non_dry_build_would_update_output_of_project_0,l),x=r.Success,void(S=y.QueueReferencingProjects);s.options.verbose&&Z(s,e.Diagnostics.Updating_output_of_project_0,l);var c=s.compilerHost;s.projectCompilerOptions=p.options;var u=e.emitUsingBuildInfo(p,c,(function(e){var t=v(s,e.path);return h(s,t,g(s,t))}),a);if(e.isString(u))return Z(s,e.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1,l,$(s,u)),S=y.BuildInvalidatedProjectOfBundle,D=F(n.Build,s,l,_,d,p,f);e.Debug.assert(!!u.length);var b=e.createDiagnosticCollection(),T=e.createMap();return u.forEach((function(r){var n=r.name,i=r.text,a=r.writeByteOrderMark;T.set(m(s,n),n),e.writeFile(t?{writeFile:t}:c,b,n,i,a)})),{emitSkipped:!1,diagnostics:R(b,T,i,!1,u[0].name,r.DeclarationOutputUnchanged)}}function J(t,r,n,i){for(;S<=t&&S<y.Done;){var a=S;switch(S){case y.CreateProgram:k();break;case y.SyntaxDiagnostics:P(r);break;case y.SemanticDiagnostics:w(r);break;case y.Emit:L(n,r,i);break;case y.EmitBundle:j(n,i);break;case y.BuildInvalidatedProjectOfBundle:e.Debug.assertDefined(D).done(r),S=y.Done;break;case y.QueueReferencingProjects:K(s,l,_,d,p,f,e.Debug.assertDefined(x)),S++;break;case y.Done:default:e.assertType(S)}e.Debug.assert(S>a)}}}function P(t,r,n){var i=t.options;return!(r.type===e.UpToDateStatusType.OutOfDateWithPrepend&&!i.force)||(0===n.fileNames.length||!!n.errors.length||!e.isIncrementalCompilation(n.options))}function w(t,r,i){if(t.projectPendingBuild.size&&!l(r)){if(t.currentInvalidatedProject)return e.arrayIsEqualTo(t.currentInvalidatedProject.buildOrder,r)?t.currentInvalidatedProject:void 0;for(var a=t.options,o=t.projectPendingBuild,s=0;s<r.length;s++){var c=r[s],u=g(t,c),_=t.projectPendingBuild.get(u);if(void 0!==_){i&&(i=!1,ae(t,r));var d=h(t,c,u);if(d){if(_===e.ConfigFileProgramReloadLevel.Full)G(t,c,u),Y(t,c,u,d),X(t,c,u,d);else if(_===e.ConfigFileProgramReloadLevel.Partial){var p=e.getFileNamesFromConfigSpecs(d.configFileSpecs,e.getDirectoryPath(c),d.options,t.parseConfigFileHost);e.updateErrorForNoInputFiles(p,c,d.configFileSpecs,d.errors,e.canJsonReportNoInutFiles(d.raw)),d.fileNames=p.fileNames,X(t,c,u,d)}var f=R(t,d,u);if(oe(t,c,f),!a.force){if(f.type===e.UpToDateStatusType.UpToDate){re(t,u,d.errors),o.delete(u),a.dry&&Z(t,e.Diagnostics.Project_0_is_up_to_date,c);continue}if(f.type===e.UpToDateStatusType.UpToDateWithUpstreamTypes)return re(t,u,d.errors),A(t,c,u,d,r)}if(f.type!==e.UpToDateStatusType.UpstreamBlocked){if(f.type!==e.UpToDateStatusType.ContainerOnly)return F(P(t,f,d)?n.Build:n.UpdateBundle,t,c,u,s,d,r);re(t,u,d.errors),o.delete(u)}else re(t,u,d.errors),o.delete(u),a.verbose&&Z(t,f.upstreamProjectBlocked?e.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built:e.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,c,f.upstreamProjectName)}else ne(t,u),o.delete(u)}}}}function I(e,t,r){var n=e.writeFileName;n&&t.options.listEmittedFiles&&n("TSFILE: "+r)}function O(e,t,r){var n=e.host,i=e.watch,a=e.builderPrograms;n.afterProgramEmitAndDiagnostics&&n.afterProgramEmitAndDiagnostics(r),i&&(r.releaseProgram(),a.set(t,r))}function M(t,r,n,i,a,o){return re(t,r,i),n&&t.writeFileName&&e.listFiles(n,t.writeFileName),t.projectStatus.set(r,{type:e.UpToDateStatusType.Unbuildable,reason:o+" errors"}),n&&O(t,r,n),t.projectCompilerOptions=t.baseCompilerOptions,a}function L(t,r,n,i){if(n<(t.host.getModifiedTime(r)||e.missingFileModifiedTime))return{type:e.UpToDateStatusType.OutOfDateWithSelf,outOfDateOutputFileName:i,newerInputFileName:r}}function R(t,r,n){if(void 0===r)return{type:e.UpToDateStatusType.Unbuildable,reason:"File deleted mid-build"};var o=t.projectStatus.get(n);if(void 0!==o)return o;var s=function(t,r,n){for(var o=void 0,s=i,l=t.host,_=0,d=r.fileNames;_<d.length;_++){var p=d[_];if(!l.fileExists(p))return{type:e.UpToDateStatusType.Unbuildable,reason:p+" does not exist"};var f=l.getModifiedTime(p)||e.missingFileModifiedTime;f>s&&(o=p,s=f)}if(!r.fileNames.length&&!e.canJsonReportNoInutFiles(r.raw))return{type:e.UpToDateStatusType.ContainerOnly};for(var m,y=e.getAllProjectOutputs(r,!l.useCaseSensitiveFileNames()),v="(none)",b=a,x="(none)",D=i,S=i,T=!1,E=0,C=y;E<C.length;E++){var k=C[E];if(!l.fileExists(k)){m=k;break}var N=l.getModifiedTime(k)||e.missingFileModifiedTime;if(N<b&&(b=N,v=k),N<s){T=!0;break}if(N>D&&(D=N,x=k),u(k))S=c(S,l.getModifiedTime(k)||e.missingFileModifiedTime)}var A,F=!1,P=!1;if(r.projectReferences){t.projectStatus.set(n,{type:e.UpToDateStatusType.ComputingUpstream});for(var w=0,I=r.projectReferences;w<I.length;w++){var O=I[w];P=P||!!O.prepend;var M=e.resolveProjectReferencePath(O),B=g(t,M),j=R(t,h(t,M,B),B);if(j.type!==e.UpToDateStatusType.ComputingUpstream&&j.type!==e.UpToDateStatusType.ContainerOnly){if(j.type===e.UpToDateStatusType.Unbuildable||j.type===e.UpToDateStatusType.UpstreamBlocked)return{type:e.UpToDateStatusType.UpstreamBlocked,upstreamProjectName:O.path,upstreamProjectBlocked:j.type===e.UpToDateStatusType.UpstreamBlocked};if(j.type!==e.UpToDateStatusType.UpToDate)return{type:e.UpToDateStatusType.UpstreamOutOfDate,upstreamProjectName:O.path};if(!m){if(j.newestInputFileTime&&j.newestInputFileTime<=b)continue;if(j.newestDeclarationFileContentChangedTime&&j.newestDeclarationFileContentChangedTime<=b){F=!0,A=O.path;continue}return e.Debug.assert(void 0!==v,"Should have an oldest output filename here"),{type:e.UpToDateStatusType.OutOfDateWithUpstream,outOfDateOutputFileName:v,newerProjectName:O.path}}}}}if(void 0!==m)return{type:e.UpToDateStatusType.OutputMissing,missingOutputFileName:m};if(T)return{type:e.UpToDateStatusType.OutOfDateWithSelf,outOfDateOutputFileName:v,newerInputFileName:o};var K=L(t,r.options.configFilePath,b,v);if(K)return K;var J=e.forEach(r.options.configFile.extendedSourceFiles||e.emptyArray,(function(e){return L(t,e,b,v)}));if(J)return J;if(!t.buildInfoChecked.has(n)){t.buildInfoChecked.set(n,!0);var z=e.getTsBuildInfoEmitOutputFilePath(r.options);if(z){var U=t.readFileWithCache(z),V=U&&e.getBuildInfo(U);if(V&&(V.bundle||V.program)&&V.version!==e.version)return{type:e.UpToDateStatusType.TsVersionOutputOfDate,version:V.version}}}return P&&F?{type:e.UpToDateStatusType.OutOfDateWithPrepend,outOfDateOutputFileName:v,newerProjectName:A}:{type:F?e.UpToDateStatusType.UpToDateWithUpstreamTypes:e.UpToDateStatusType.UpToDate,newestDeclarationFileContentChangedTime:S,newestInputFileTime:s,newestOutputFileTime:D,newestInputFileName:o,newestOutputFileName:x,oldestOutputFileName:v}}(t,r,n);return t.projectStatus.set(n,s),s}function B(t,r,n,i,a){var o=t.host,s=e.getAllProjectOutputs(r,!o.useCaseSensitiveFileNames());if(!a||s.length!==a.size)for(var l=!!t.options.verbose,_=o.now?o.now():new Date,d=0,p=s;d<p.length;d++){var f=p[d];a&&a.has(m(t,f))||(l&&(l=!1,Z(t,i,r.options.configFilePath)),u(f)&&(n=c(n,o.getModifiedTime(f)||e.missingFileModifiedTime)),o.setModifiedTime(f,_),I(t,r,f))}return n}function j(t,r,n){if(t.options.dry)return Z(t,e.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0,r.options.configFilePath);var a=B(t,r,i,e.Diagnostics.Updating_output_timestamps_of_project_0);t.projectStatus.set(n,{type:e.UpToDateStatusType.UpToDate,newestDeclarationFileContentChangedTime:a,oldestOutputFileName:e.getFirstProjectOutput(r,!t.host.useCaseSensitiveFileNames())})}function K(t,n,i,a,o,s,c){if(!(c&r.AnyErrors)&&o.options.composite)for(var u=a+1;u<s.length;u++){var l=s[u],_=g(t,l);if(!t.projectPendingBuild.has(_)){var d=h(t,l,_);if(d&&d.projectReferences)for(var p=0,f=d.projectReferences;p<f.length;p++){var m=f[p];if(g(t,v(t,m.path))===i){var y=t.projectStatus.get(_);if(y)switch(y.type){case e.UpToDateStatusType.UpToDate:if(c&r.DeclarationOutputUnchanged){m.prepend?t.projectStatus.set(_,{type:e.UpToDateStatusType.OutOfDateWithPrepend,outOfDateOutputFileName:y.oldestOutputFileName,newerProjectName:n}):y.type=e.UpToDateStatusType.UpToDateWithUpstreamTypes;break}case e.UpToDateStatusType.UpToDateWithUpstreamTypes:case e.UpToDateStatusType.OutOfDateWithPrepend:c&r.DeclarationOutputUnchanged||t.projectStatus.set(_,{type:e.UpToDateStatusType.OutOfDateWithUpstream,outOfDateOutputFileName:y.type===e.UpToDateStatusType.OutOfDateWithPrepend?y.outOfDateOutputFileName:y.oldestOutputFileName,newerProjectName:n});break;case e.UpToDateStatusType.UpstreamBlocked:g(t,v(t,y.upstreamProjectName))===i&&E(t,_)}C(t,_,e.ConfigFileProgramReloadLevel.None);break}}}}}function J(t,r,n,i){var a=D(t,r,i);if(!a)return e.ExitStatus.InvalidProject_OutputsSkipped;k(t,n);for(var o=!0,s=0;;){var c=w(t,a,o);if(!c)break;o=!1,c.done(n),t.diagnostics.has(c.projectPath)||s++}return T(t),ie(t,a),function(e,t){if(!e.watchAllProjectsPending)return;e.watchAllProjectsPending=!1;for(var r=0,n=_(t);r<n.length;r++){var i=n[r],a=g(e,i);G(e,i,a);var o=h(e,i,a);o&&(Y(e,i,a,o),X(e,i,a,o))}}(t,a),l(a)?e.ExitStatus.ProjectReferenceCycle_OutputsSkipped:a.some((function(e){return t.diagnostics.has(g(t,e))}))?s?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.DiagnosticsPresent_OutputsSkipped:e.ExitStatus.Success}function z(t,r,n){var i=D(t,r,n);if(!i)return e.ExitStatus.InvalidProject_OutputsSkipped;if(l(i))return te(t,i.circularDiagnostics),e.ExitStatus.ProjectReferenceCycle_OutputsSkipped;for(var a=t.options,o=t.host,s=a.dry?[]:void 0,c=0,u=i;c<u.length;c++){var _=u[c],d=g(t,_),p=h(t,_,d);if(void 0!==p)for(var f=0,m=e.getAllProjectOutputs(p,!o.useCaseSensitiveFileNames());f<m.length;f++){var y=m[f];o.fileExists(y)&&(s?s.push(y):(o.deleteFile(y),U(t,d,e.ConfigFileProgramReloadLevel.None)))}else ne(t,d)}return s&&Z(t,e.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0,s.map((function(e){return"\r\n * "+e})).join("")),e.ExitStatus.Success}function U(t,r,n){t.host.getParsedCommandLine&&n===e.ConfigFileProgramReloadLevel.Partial&&(n=e.ConfigFileProgramReloadLevel.Full),n===e.ConfigFileProgramReloadLevel.Full&&(t.configFileCache.delete(r),t.buildOrder=void 0),t.needsSummary=!0,E(t,r),C(t,r,n),S(t)}function V(e,t,r){e.reportFileChangeDetected=!0,U(e,t,r),q(e)}function q(e){var t=e.hostWithWatch;t.setTimeout&&t.clearTimeout&&(e.timerToBuildInvalidatedProject&&t.clearTimeout(e.timerToBuildInvalidatedProject),e.timerToBuildInvalidatedProject=t.setTimeout(W,250,e))}function W(t){t.timerToBuildInvalidatedProject=void 0,t.reportFileChangeDetected&&(t.reportFileChangeDetected=!1,t.projectErrorsReported.clear(),ee(t,e.Diagnostics.File_change_detected_Starting_incremental_compilation));var r=x(t),n=w(t,r,!1);n&&(n.done(),t.projectPendingBuild.size)?t.watch&&!t.timerToBuildInvalidatedProject&&q(t):(T(t),ie(t,r))}function G(t,r,n){t.watch&&!t.allWatchedConfigFiles.has(n)&&t.allWatchedConfigFiles.set(n,t.watchFile(t.hostWithWatch,r,(function(){V(t,n,e.ConfigFileProgramReloadLevel.Full)}),e.PollingInterval.High,"Config file",r))}function H(t,r,n){return 0===e.comparePaths(r,n,t.currentDirectory,!t.host.useCaseSensitiveFileNames())}function Y(t,r,n,i){t.watch&&e.updateWatchingWildcardDirectories(s(t.allWatchedWildcardDirectories,n),e.createMapFromTemplate(i.configFileSpecs.wildcardDirectories),(function(a,o){return t.watchDirectory(t.hostWithWatch,a,(function(o){var s=m(t,o);s===m(t,a)||!e.hasExtension(s)||e.isSupportedSourceFileName(o,i.options)?!function(t,r,n){if(n.options.noEmit)return!1;if(!e.fileExtensionIs(r,".d.ts")&&(e.fileExtensionIs(r,".ts")||e.fileExtensionIs(r,".tsx")))return!1;var i=n.options.outFile||n.options.out;return!(!i||!H(t,r,i)&&!H(t,r,e.removeFileExtension(i)+".d.ts"))||(!(!n.options.declarationDir||!e.containsPath(n.options.declarationDir,r,t.currentDirectory,!t.host.useCaseSensitiveFileNames()))||(!(!n.options.outDir||!e.containsPath(n.options.outDir,r,t.currentDirectory,!t.host.useCaseSensitiveFileNames()))||!e.forEach(n.fileNames,(function(e){return H(t,r,e)}))))}(t,o,i)?V(t,n,e.ConfigFileProgramReloadLevel.Partial):t.writeLog(o+" is output file"):t.writeLog("Project: "+r+" Detected file add/remove of non supported extension: "+o)}),o,"Wild card directory",r)}))}function X(t,r,n,i){t.watch&&e.mutateMap(s(t.allWatchedInputFiles,n),e.arrayToMap(i.fileNames,(function(e){return m(t,e)})),{createNewValue:function(i,a){return t.watchFilePath(t.hostWithWatch,a,(function(){return V(t,n,e.ConfigFileProgramReloadLevel.None)}),e.PollingInterval.Low,i,"Source file",r)},onDeleteValue:e.closeFileWatcher})}function Q(t,r,n,i){var a=f(t,r,n,i);return{build:function(e,t){return J(a,e,t)},clean:function(e){return z(a,e)},buildReferences:function(e,t){return J(a,e,t,!0)},cleanReferences:function(e){return z(a,e,!0)},getNextInvalidatedProject:function(e){return k(a,e),w(a,x(a),!1)},getBuildOrder:function(){return x(a)},getUpToDateStatusOfProject:function(e){var t=v(a,e),r=g(a,t);return R(a,h(a,t,r),r)},invalidateProject:function(t,r){return U(a,t,r||e.ConfigFileProgramReloadLevel.None)},buildNextInvalidatedProject:function(){return W(a)},getAllParsedConfigs:function(){return e.arrayFrom(e.mapDefinedIterator(a.configFileCache.values(),(function(e){return y(e)?e:void 0})))}}}function $(t,r){return e.convertToRelativePath(r,t.currentDirectory,(function(e){return t.getCanonicalFileName(e)}))}function Z(r,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];r.host.reportSolutionBuilderStatus(e.createCompilerDiagnostic.apply(void 0,t([n],i)))}function ee(r,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];r.hostWithWatch.onWatchStatusChange&&r.hostWithWatch.onWatchStatusChange(e.createCompilerDiagnostic.apply(void 0,t([n],i)),r.host.getNewLine(),r.baseCompilerOptions)}function te(e,t){var r=e.host;t.forEach((function(e){return r.reportDiagnostic(e)}))}function re(e,t,r){te(e,r),e.projectErrorsReported.set(t,!0),r.length&&e.diagnostics.set(t,r)}function ne(e,t){re(e,t,[e.configFileCache.get(t)])}function ie(t,r){if(t.needsSummary){t.needsSummary=!1;var n=t.watch||!!t.host.reportErrorSummary,i=t.diagnostics,a=0;l(r)?(ae(t,r.buildOrder),te(t,r.circularDiagnostics),n&&(a+=e.getErrorCountForSummary(r.circularDiagnostics))):(r.forEach((function(r){var n=g(t,r);t.projectErrorsReported.has(n)||te(t,i.get(n)||e.emptyArray)})),n&&i.forEach((function(t){return a+=e.getErrorCountForSummary(t)}))),t.watch?ee(t,e.getWatchErrorSummaryDiagnosticMessage(a),a):t.host.reportErrorSummary&&t.host.reportErrorSummary(a)}}function ae(t,r){t.options.verbose&&Z(t,e.Diagnostics.Projects_in_this_build_Colon_0,r.map((function(e){return"\r\n * "+$(t,e)})).join(""))}function oe(t,r,n){t.options.verbose&&function(t,r,n){switch(n.type){case e.UpToDateStatusType.OutOfDateWithSelf:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2,$(t,r),$(t,n.outOfDateOutputFileName),$(t,n.newerInputFileName));case e.UpToDateStatusType.OutOfDateWithUpstream:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2,$(t,r),$(t,n.outOfDateOutputFileName),$(t,n.newerProjectName));case e.UpToDateStatusType.OutputMissing:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist,$(t,r),$(t,n.missingOutputFileName));case e.UpToDateStatusType.UpToDate:if(void 0!==n.newestInputFileTime)return Z(t,e.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2,$(t,r),$(t,n.newestInputFileName||""),$(t,n.oldestOutputFileName||""));break;case e.UpToDateStatusType.OutOfDateWithPrepend:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed,$(t,r),$(t,n.newerProjectName));case e.UpToDateStatusType.UpToDateWithUpstreamTypes:return Z(t,e.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,$(t,r));case e.UpToDateStatusType.UpstreamOutOfDate:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,$(t,r),$(t,n.upstreamProjectName));case e.UpToDateStatusType.UpstreamBlocked:return Z(t,n.upstreamProjectBlocked?e.Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:e.Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,$(t,r),$(t,n.upstreamProjectName));case e.UpToDateStatusType.Unbuildable:return Z(t,e.Diagnostics.Failed_to_parse_file_0_Colon_1,$(t,r),n.reason);case e.UpToDateStatusType.TsVersionOutputOfDate:return Z(t,e.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,$(t,r),n.version,e.version);case e.UpToDateStatusType.ContainerOnly:case e.UpToDateStatusType.ComputingUpstream:break;default:e.assertType(n)}}(t,r,n)}!function(e){e[e.None=0]="None",e[e.Success=1]="Success",e[e.DeclarationOutputUnchanged=2]="DeclarationOutputUnchanged",e[e.ConfigFileErrors=4]="ConfigFileErrors",e[e.SyntaxErrors=8]="SyntaxErrors",e[e.TypeErrors=16]="TypeErrors",e[e.DeclarationEmitErrors=32]="DeclarationEmitErrors",e[e.EmitErrors=64]="EmitErrors",e[e.AnyErrors=124]="AnyErrors"}(r||(r={})),e.isCircularBuildOrder=l,e.getBuildOrderFromAnyBuildOrder=_,e.createBuilderStatusReporter=d,e.createSolutionBuilderHost=function(t,r,n,i,a){void 0===t&&(t=e.sys);var o=p(t,r,n,i);return o.reportErrorSummary=a,o},e.createSolutionBuilderWithWatchHost=function(t,r,n,i,a){void 0===t&&(t=e.sys);var o=p(t,r,n,i),s=e.createWatchHost(t,a);return e.copyProperties(o,s),o},e.createSolutionBuilder=function(e,t,r){return Q(!1,e,t,r)},e.createSolutionBuilderWithWatch=function(e,t,r){return Q(!0,e,t,r)},function(e){e[e.Build=0]="Build",e[e.UpdateBundle=1]="UpdateBundle",e[e.UpdateOutputFileStamps=2]="UpdateOutputFileStamps"}(n=e.InvalidatedProjectKind||(e.InvalidatedProjectKind={}))}(s||(s={})),function(e){!function(t){t.ActionSet="action::set",t.ActionInvalidate="action::invalidate",t.ActionPackageInstalled="action::packageInstalled",t.EventTypesRegistry="event::typesRegistry",t.EventBeginInstallTypes="event::beginInstallTypes",t.EventEndInstallTypes="event::endInstallTypes",t.EventInitializationFailed="event::initializationFailed",function(e){e.GlobalCacheLocation="--globalTypingsCacheLocation",e.LogFile="--logFile",e.EnableTelemetry="--enableTelemetry",e.TypingSafeListLocation="--typingSafeListLocation",e.TypesMapLocation="--typesMapLocation",e.NpmLocation="--npmLocation",e.ValidateDefaultNpmLocation="--validateDefaultNpmLocation"}(t.Arguments||(t.Arguments={})),t.hasArgument=function(t){return e.sys.args.indexOf(t)>=0},t.findArgument=function(t){var r=e.sys.args.indexOf(t);return r>=0&&r<e.sys.args.length-1?e.sys.args[r+1]:void 0},t.nowString=function(){var e=new Date;return e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()+"."+e.getMilliseconds()}}(e.server||(e.server={}))}(s||(s={})),function(e){!function(t){function r(t,r){return new e.Version(e.getProperty(r,"ts"+e.versionMajorMinor)||e.getProperty(r,"latest")).compareTo(t.version)<=0}function n(e){return t.nodeCoreModules.has(e)?"node":e}t.isTypingUpToDate=r,t.nodeCoreModuleList=["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","http2","inspector","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"],t.nodeCoreModules=e.arrayToSet(t.nodeCoreModuleList),t.nonRelativeModuleNameForTypingCache=n,t.loadSafeList=function(t,r){var n=e.readConfigFile(r,(function(e){return t.readFile(e)}));return e.createMapFromTemplate(n.config)},t.loadTypesMap=function(t,r){var n=e.readConfigFile(r,(function(e){return t.readFile(e)}));if(n.config)return e.createMapFromTemplate(n.config.simpleMap)},t.discoverTypings=function(t,i,a,o,s,c,u,l,_){if(!u||!u.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};var d=e.createMap();a=e.mapDefined(a,(function(t){var r=e.normalizePath(t);if(e.hasJSFileExtension(r))return r}));var p=[];u.include&&S(u.include,"Explicitly included types");var f=u.exclude||[],m=e.arrayToSet(a,e.getDirectoryPath);m.set(o,!0),m.forEach((function(t,r){T(e.combinePaths(r,"package.json"),p),T(e.combinePaths(r,"bower.json"),p),E(e.combinePaths(r,"bower_components"),p),E(e.combinePaths(r,"node_modules"),p)})),function(t){var r=e.mapDefined(t,(function(t){if(e.hasJSFileExtension(t)){var r=e.removeFileExtension(e.getBaseFileName(t.toLowerCase())),n=e.removeMinAndVersionNumbers(r);return s.get(n)}}));r.length&&S(r,"Inferred typings from file names");e.some(t,(function(t){return e.fileExtensionIs(t,".jsx")}))&&(i&&i("Inferred 'react' typings due to presence of '.jsx' extension"),D("react"))}(a),l&&S(e.deduplicate(l.map(n),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive),"Inferred typings from unresolved imports"),c.forEach((function(e,t){var n=_.get(t);d.has(t)&&void 0===d.get(t)&&void 0!==n&&r(e,n)&&d.set(t,e.typingLocation)}));for(var g=0,y=f;g<y.length;g++){var h=y[g];d.delete(h)&&i&&i("Typing for "+h+" is in exclude list, will be ignored.")}var v=[],b=[];d.forEach((function(e,t){void 0!==e?b.push(e):v.push(t)}));var x={cachedTypingPaths:b,newTypingNames:v,filesToWatch:p};return i&&i("Result: "+JSON.stringify(x)),x;function D(e){d.has(e)||d.set(e,void 0)}function S(t,r){i&&i(r+": "+JSON.stringify(t)),e.forEach(t,D)}function T(r,n){if(t.fileExists(r)){n.push(r);var i=e.readConfigFile(r,(function(e){return t.readFile(e)})).config;S(e.flatMap([i.dependencies,i.devDependencies,i.optionalDependencies,i.peerDependencies],e.getOwnKeys),"Typing names in '"+r+"' dependencies")}}function E(r,n){if(n.push(r),t.directoryExists(r)){var a=t.readDirectory(r,[".json"],void 0,void 0,2);i&&i("Searching for typing names in "+r+"; all files: "+JSON.stringify(a));for(var o=[],s=0,c=a;s<c.length;s++){var u=c[s],l=e.normalizePath(u),_=e.getBaseFileName(l);if("package.json"===_||"bower.json"===_){var p=e.readConfigFile(l,(function(e){return t.readFile(e)})).config;if(("package.json"!==_||!p._requiredBy||0!==e.filter(p._requiredBy,(function(e){return"#"===e[0]||"/"===e})).length)&&p.name){var f=p.types||p.typings;if(f){var m=e.getNormalizedAbsolutePath(f,e.getDirectoryPath(l));i&&i(" Package '"+p.name+"' provides its own types."),d.set(p.name,m)}else o.push(p.name)}}}S(o," Found package names")}}},function(e){e[e.Ok=0]="Ok",e[e.EmptyName=1]="EmptyName",e[e.NameTooLong=2]="NameTooLong",e[e.NameStartsWithDot=3]="NameStartsWithDot",e[e.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters"}(t.NameValidationResult||(t.NameValidationResult={}));var i=214;function a(t,r,n,a){var o=a?"Scope":"Package";switch(r){case 1:return"'"+t+"':: "+o+" name '"+n+"' cannot be empty";case 2:return"'"+t+"':: "+o+" name '"+n+"' should be less than "+i+" characters";case 3:return"'"+t+"':: "+o+" name '"+n+"' cannot start with '.'";case 4:return"'"+t+"':: "+o+" name '"+n+"' cannot start with '_'";case 5:return"'"+t+"':: "+o+" name '"+n+"' contains non URI safe characters";case 0:return e.Debug.fail();default:throw e.Debug.assertNever(r)}}t.validatePackageName=function(e){return function e(t,r){if(!t)return 1;if(t.length>i)return 2;if(46===t.charCodeAt(0))return 3;if(95===t.charCodeAt(0))return 4;if(r){var n=/^@([^/]+)\/([^/]+)$/.exec(t);if(n){var a=e(n[1],!1);if(0!==a)return{name:n[1],isScopeName:!0,result:a};var o=e(n[2],!1);return 0!==o?{name:n[2],isScopeName:!1,result:o}:0}}if(encodeURIComponent(t)!==t)return 5;return 0}(e,!0)},t.renderPackageNameValidationFailure=function(e,t){return"object"===f(e)?a(t,e.result,e.name,e.isScopeName):a(t,e,t,!1)}}(e.JsTyping||(e.JsTyping={}))}(s||(s={})),function(e){var t,r;function n(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:t.Smart,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:r.Ignore}}!function(e){var t=function(){function e(e){this.text=e}return e.prototype.getText=function(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)},e.prototype.getLength=function(){return this.text.length},e.prototype.getChangeRange=function(){},e}();e.fromString=function(e){return new t(e)}}(e.ScriptSnapshot||(e.ScriptSnapshot={})),function(e){e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All"}(e.PackageJsonDependencyGroup||(e.PackageJsonDependencyGroup={})),e.emptyOptions={},function(e){e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference"}(e.HighlightSpanKind||(e.HighlightSpanKind={})),function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(t=e.IndentStyle||(e.IndentStyle={})),function(e){e.Ignore="ignore",e.Insert="insert",e.Remove="remove"}(r=e.SemicolonPreference||(e.SemicolonPreference={})),e.getDefaultFormatCodeSettings=n,e.testFormatSettings=n("\n"),function(e){e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={})),function(e){e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports"}(e.OutliningSpanKind||(e.OutliningSpanKind={})),function(e){e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration"}(e.OutputFileType||(e.OutputFileType={})),function(e){e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition"}(e.EndOfLineState||(e.EndOfLineState={})),function(e){e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral"}(e.TokenClass||(e.TokenClass={})),function(e){e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string"}(e.ScriptElementKind||(e.ScriptElementKind={})),function(e){e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json"}(e.ScriptElementKindModifier||(e.ScriptElementKindModifier={})),function(e){e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value"}(e.ClassificationTypeNames||(e.ClassificationTypeNames={})),function(e){e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral"}(e.ClassificationType||(e.ClassificationType={}))}(s||(s={})),function(e){function t(t){switch(t.kind){case 241:return e.isInJSFile(t)&&e.getJSDocEnumTag(t)?7:1;case 155:case 190:case 158:case 157:case 279:case 280:case 160:case 159:case 161:case 162:case 163:case 243:case 200:case 201:case 278:case 271:return 1;case 154:case 245:case 246:case 172:return 2;case 315:return void 0===t.name?3:2;case 282:case 244:return 3;case 248:return e.isAmbientModule(t)?5:1===e.getModuleInstanceState(t)?5:4;case 247:case 256:case 257:case 252:case 253:case 258:case 259:return 7;case 288:return 5}return 7}function r(t){for(;152===t.parent.kind;)t=t.parent;return e.isInternalModuleImportEqualsDeclaration(t.parent)&&t.parent.moduleReference===t}function n(e,t){var r=i(e);return!!r&&!!r.parent&&t(r.parent)&&r.parent.expression===r}function i(e){return s(e)?e.parent:e}function a(t){return 75===t.kind&&e.isBreakOrContinueStatement(t.parent)&&t.parent.label===t}function o(t){return 75===t.kind&&e.isLabeledStatement(t.parent)&&t.parent.label===t}function s(e){return e&&e.parent&&193===e.parent.kind&&e.parent.name===e}e.scanner=e.createScanner(99,!0),function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All"}(e.SemanticMeaning||(e.SemanticMeaning={})),e.getMeaningFromDeclaration=t,e.getMeaningFromLocation=function(n){return 288===n.kind?1:258===n.parent.kind||263===n.parent.kind?7:r(n)?function(t){var r=152===t.kind?t:e.isQualifiedName(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&252===r.parent.kind?7:4}(n):e.isDeclarationName(n)?t(n.parent):function(t){e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent);switch(t.kind){case 103:return!e.isExpressionNode(t);case 182:return!0}switch(t.parent.kind){case 168:return!0;case 187:return!t.parent.isTypeOf;case 215:return!e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)}return!1}(n)?2:function(e){return function(e){var t=e,r=!0;if(152===t.parent.kind){for(;t.parent&&152===t.parent.kind;)t=t.parent;r=t.right===e}return 168===t.parent.kind&&!r}(e)||function(e){var t=e,r=!0;if(193===t.parent.kind){for(;t.parent&&193===t.parent.kind;)t=t.parent;r=t.name===e}if(!r&&215===t.parent.kind&&277===t.parent.parent.kind){var n=t.parent.parent.parent;return 244===n.kind&&112===t.parent.parent.token||245===n.kind&&89===t.parent.parent.token}return!1}(e)}(n)?4:e.isTypeParameterDeclaration(n.parent)?(e.Debug.assert(e.isJSDocTemplateTag(n.parent.parent)),2):e.isLiteralTypeNode(n.parent)?3:1},e.isInRightSideOfInternalImportEqualsDeclaration=r,e.isCallExpressionTarget=function(t){return n(t,e.isCallExpression)},e.isNewExpressionTarget=function(t){return n(t,e.isNewExpression)},e.isCallOrNewExpressionTarget=function(t){return n(t,e.isCallOrNewExpression)},e.climbPastPropertyAccess=i,e.getTargetLabel=function(e,t){for(;e;){if(237===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}},e.hasPropertyAccessExpressionWithName=function(t,r){return!!e.isPropertyAccessExpression(t.expression)&&t.expression.name.text===r},e.isJumpStatementTarget=a,e.isLabelOfLabeledStatement=o,e.isLabelName=function(e){return o(e)||a(e)},e.isTagName=function(t){return e.isJSDocTag(t.parent)&&t.parent.tagName===t},e.isRightSideOfQualifiedName=function(e){return 152===e.parent.kind&&e.parent.right===e},e.isRightSideOfPropertyAccess=s,e.isNameOfModuleDeclaration=function(e){return 248===e.parent.kind&&e.parent.name===e},e.isNameOfFunctionDeclaration=function(t){return 75===t.kind&&e.isFunctionLike(t.parent)&&t.parent.name===t},e.isLiteralNameOfPropertyDeclarationOrIndexAccess=function(t){switch(t.parent.kind){case 158:case 157:case 279:case 282:case 160:case 159:case 162:case 163:case 248:return e.getNameOfDeclaration(t.parent)===t;case 194:return t.parent.argumentExpression===t;case 153:return!0;case 186:return 184===t.parent.parent.kind;default:return!1}},e.isExpressionOfExternalModuleImportEqualsDeclaration=function(t){return e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t},e.getContainerNode=function(t){for(e.isJSDocTypeAlias(t)&&(t=t.parent.parent);;){if(!(t=t.parent))return;switch(t.kind){case 288:case 160:case 159:case 243:case 200:case 162:case 163:case 244:case 245:case 247:case 248:return t}}},e.getNodeKind=function t(r){switch(r.kind){case 288:return e.isExternalModule(r)?"module":"script";case 248:return"module";case 244:case 213:return"class";case 245:return"interface";case 246:case 308:case 315:return"type";case 247:return"enum";case 241:return s(r);case 190:return s(e.getRootDeclaration(r));case 201:case 243:case 200:return"function";case 162:return"getter";case 163:return"setter";case 160:case 159:return"method";case 279:var n=r.initializer;return e.isFunctionLike(n)?"method":"property";case 158:case 157:case 280:case 281:return"property";case 166:return"index";case 165:return"construct";case 164:return"call";case 161:return"constructor";case 154:return"type parameter";case 282:return"enum member";case 155:return e.hasModifier(r,92)?"property":"parameter";case 252:case 257:case 261:case 255:return"alias";case 208:var i=e.getAssignmentDeclarationKind(r),a=r.right;switch(i){case 7:case 8:case 9:case 0:return"";case 1:case 2:var o=t(a);return""===o?"const":o;case 3:return e.isFunctionExpression(a)?"method":"property";case 4:return"property";case 5:return e.isFunctionExpression(a)?"method":"property";case 6:return"local class";default:return e.assertType(i),""}case 75:return e.isImportClause(r.parent)?"alias":"";default:return""}function s(t){return e.isVarConst(t)?"const":e.isLet(t)?"let":"var"}},e.isThis=function(t){switch(t.kind){case 103:return!0;case 75:return e.identifierIsThisKeyword(t)&&155===t.parent.kind;default:return!1}};var c=/^\/\/\/\s*</;function u(e,t){return _(e.pos,e.end,t)}function l(e,t){return e.pos<t&&t<e.end}function _(e,t,r){return e<=r.pos&&t>=r.end}function d(e,t,r,n){return Math.max(e,r)<Math.min(t,n)}function p(t,r,n){var i=t.getChildren(n);if(i.length){var a=e.last(i);if(a.kind===r)return!0;if(26===a.kind&&1!==i.length)return i[i.length-2].kind===r}return!1}function f(e,t,r){return!!m(e,t,r)}function m(t,r,n){return e.find(t.getChildren(n),(function(e){return e.kind===r}))}function g(t){var r=e.find(t.parent.getChildren(),(function(r){return e.isSyntaxList(r)&&u(r,t)}));return e.Debug.assert(!r||e.contains(r.getChildren(),t)),r}function y(e,t,r){return v(e,t,!1,r,!1)}function h(e,t){return v(e,t,!0,void 0,!1)}function v(e,t,r,n,i){var a=e;e:for(;;){for(var o=0,s=a.getChildren(e);o<s.length;o++){var c=s[o];if((r?c.getFullStart():c.getStart(e,!0))>t)break;var u=c.getEnd();if(t<u||t===u&&(1===c.kind||i)){a=c;continue e}if(n&&u===t){var l=b(t,e,c);if(l&&n(l))return l}}return a}}function b(t,r,n,i){var a=function a(o){if(x(o)&&1!==o.kind)return o;var s=o.getChildren(r);for(var c=0;c<s.length;c++){var u=s[c];if(t<u.end){if(u.getStart(r,!i)>=t||!F(u,r)||T(u)){var l=S(s,c,r);return l&&D(l,r)}return a(u)}}e.Debug.assert(void 0!==n||288===o.kind||1===o.kind||e.isJSDocCommentContainingNode(o));var _=S(s,s.length,r);return _&&D(_,r)}(n||r);return e.Debug.assert(!(a&&T(a))),a}function x(t){return e.isToken(t)&&!T(t)}function D(e,t){if(x(e))return e;var r=e.getChildren(t),n=S(r,r.length,t);return n&&D(n,t)}function S(t,r,n){for(var i=r-1;i>=0;i--){if(T(t[i]))e.Debug.assert(i>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(F(t[i],n))return t[i]}}function T(t){return e.isJsxText(t)&&t.containsOnlyTriviaWhiteSpaces}function E(e,t,r){for(var n=e.kind,i=0;;){var a=b(e.getFullStart(),r);if(!a)return;if((e=a).kind===t){if(0===i)return e;i--}else e.kind===n&&i++}}function C(e,t,r){return t?e.getNonNullableType():r?e.getNonOptionalType():e}function k(t,r,n){var i=n.getTypeAtLocation(t);return e.isOptionalChain(t.parent)&&(i=C(i,!!t.parent.questionDotToken,!0)),(e.isNewExpression(t.parent)?i.getConstructSignatures():i.getCallSignatures()).filter((function(e){return!!e.typeParameters&&e.typeParameters.length>=r}))}function N(t,r){for(var n=t,i=0,a=0;n;){switch(n.kind){case 29:if((n=b(n.getFullStart(),r))&&28===n.kind&&(n=b(n.getFullStart(),r)),!n||!e.isIdentifier(n))return;if(!i)return e.isDeclarationName(n)?void 0:{called:n,nTypeArguments:a};i--;break;case 49:i=3;break;case 48:i=2;break;case 31:i++;break;case 19:if(!(n=E(n,18,r)))return;break;case 21:if(!(n=E(n,20,r)))return;break;case 23:if(!(n=E(n,22,r)))return;break;case 27:a++;break;case 38:case 75:case 10:case 8:case 9:case 105:case 90:case 107:case 89:case 133:case 24:case 51:case 57:case 58:break;default:if(e.isTypeNode(n))break;return}n=b(n.getFullStart(),r)}}function A(t,r,n){return e.formatting.getRangeOfEnclosingComment(t,r,void 0,n)}function F(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function P(e,t,r){var n=A(e,t,void 0);return!!n&&r===c.test(e.text.substring(n.pos,n.end))}function w(e,t){return{span:e,newText:t}}function I(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function O(t,r,n,i){return e.createImportDeclaration(void 0,void 0,t||r?e.createImportClause(t,r&&r.length?e.createNamedImports(r):void 0):void 0,"string"==typeof n?M(n,i):n)}function M(t,r){return e.createLiteral(t,0===r)}function L(t,r){return e.isStringDoubleQuoted(t,r)?1:0}function R(t){return"default"!==t.escapedName?t.escapedName:e.firstDefined(t.declarations,(function(t){var r=e.getNameOfDeclaration(t);return r&&75===r.kind?r.escapedText:void 0}))}function B(t,r,n,i){var a=e.createMap();return function t(o){if(!(96&o.flags&&e.addToSeen(a,e.getSymbolId(o))))return;return e.firstDefined(o.declarations,(function(a){return e.firstDefined(e.getAllSuperTypeNodes(a),(function(a){var o=n.getTypeAtLocation(a),s=o&&o.symbol&&n.getPropertyOfType(o,r);return o&&s&&(e.firstDefined(n.getRootSymbols(s),i)||t(o.symbol))}))}))}(t)}function j(t,r,n){return e.textSpanContainsPosition(t,r.getStart(n))&&r.getEnd()<=e.textSpanEnd(t)}function K(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}e.getLineStartPositionForPosition=function(t,r){return e.getLineStarts(r)[r.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=u,e.rangeContainsRangeExclusive=function(e,t){return l(e,t.pos)&&l(e,t.end)},e.rangeContainsPosition=function(e,t){return e.pos<=t&&t<=e.end},e.rangeContainsPositionExclusive=l,e.startEndContainsRange=_,e.rangeContainsStartEnd=function(e,t,r){return e.pos<=t&&e.end>=r},e.rangeOverlapsWithStartEnd=function(e,t,r){return d(e.pos,e.end,t,r)},e.nodeOverlapsWithStartEnd=function(e,t,r,n){return d(e.getStart(t),e.end,r,n)},e.startEndOverlapsWithStartEnd=d,e.positionBelongsToNode=function(t,r,n){return e.Debug.assert(t.pos<=r),r<t.end||!function t(r,n){if(void 0===r||e.nodeIsMissing(r))return!1;switch(r.kind){case 244:case 245:case 247:case 192:case 188:case 172:case 222:case 249:case 250:case 256:case 260:return p(r,19,n);case 278:return t(r.block,n);case 196:if(!r.arguments)return!0;case 195:case 199:case 181:return p(r,21,n);case 169:case 170:return t(r.type,n);case 161:case 162:case 163:case 243:case 200:case 160:case 159:case 165:case 164:case 201:return r.body?t(r.body,n):r.type?t(r.type,n):f(r,21,n);case 248:return!!r.body&&t(r.body,n);case 226:return r.elseStatement?t(r.elseStatement,n):t(r.thenStatement,n);case 225:return t(r.expression,n)||f(r,26,n);case 191:case 189:case 194:case 153:case 174:return p(r,23,n);case 166:return r.type?t(r.type,n):f(r,23,n);case 275:case 276:return!1;case 229:case 230:case 231:case 228:return t(r.statement,n);case 227:return f(r,110,n)?p(r,21,n):t(r.statement,n);case 171:return t(r.exprName,n);case 203:case 202:case 204:case 211:case 212:return t(r.expression,n);case 197:return t(r.template,n);case 210:var i=e.lastOrUndefined(r.templateSpans);return t(i,n);case 220:return e.nodeIsPresent(r.literal);case 259:case 253:return e.nodeIsPresent(r.moduleSpecifier);case 206:return t(r.operand,n);case 208:return t(r.right,n);case 209:return t(r.whenFalse,n);default:return!0}}(t,n)},e.findListItemInfo=function(t){var r=g(t);if(r){var n=r.getChildren();return{listItemIndex:e.indexOfNode(n,t),list:r}}},e.hasChildOfKind=f,e.findChildOfKind=m,e.findContainingList=g,e.getTouchingPropertyName=function(t,r){return y(t,r,(function(t){return e.isPropertyNameLiteral(t)||e.isKeyword(t.kind)}))},e.getTouchingToken=y,e.getTokenAtPosition=h,e.findTokenOnLeftOfPosition=function(t,r){var n=h(t,r);return e.isToken(n)&&r>n.getStart(t)&&r<n.getEnd()?n:b(r,t)},e.findNextToken=function(t,r,n){return function r(i){if(e.isToken(i)&&i.pos===t.end)return i;return e.firstDefined(i.getChildren(n),(function(e){return(e.pos<=t.pos&&e.end>t.end||e.pos===t.end)&&F(e,n)?r(e):void 0}))}(r)},e.findPrecedingToken=b,e.isInString=function(t,r,n){if(void 0===n&&(n=b(r,t)),n&&e.isStringTextContainingNode(n)){var i=n.getStart(t),a=n.getEnd();if(i<r&&r<a)return!0;if(r===a)return!!n.isUnterminated}return!1},e.isInsideJsxElementOrAttribute=function(e,t){var r=h(e,t);return!!r&&(11===r.kind||(29===r.kind&&11===r.parent.kind||(29===r.kind&&274===r.parent.kind||(!(!r||19!==r.kind||274!==r.parent.kind)||29===r.kind&&267===r.parent.kind))))},e.isInTemplateString=function(t,r){var n=h(t,r);return e.isTemplateLiteralKind(n.kind)&&r>n.getStart(t)},e.isInJSXText=function(t,r){var n=h(t,r);return!!e.isJsxText(n)||(!(18!==n.kind||!e.isJsxExpression(n.parent)||!e.isJsxElement(n.parent.parent))||!(29!==n.kind||!e.isJsxOpeningLikeElement(n.parent)||!e.isJsxElement(n.parent.parent)))},e.findPrecedingMatchingToken=E,e.removeOptionality=C,e.isPossiblyTypeArgumentPosition=function t(r,n,i){var a=N(r,n);return void 0!==a&&(e.isPartOfTypeNode(a.called)||0!==k(a.called,a.nTypeArguments,i).length||t(a.called,n,i))},e.getPossibleGenericSignatures=k,e.getPossibleTypeArgumentsInfo=N,e.isInComment=A,e.hasDocComment=function(t,r){var n=h(t,r);return!!e.findAncestor(n,e.isJSDoc)},e.getNodeModifiers=function(t){var r=e.isDeclaration(t)?e.getCombinedModifierFlags(t):0,n=[];return 8&r&&n.push("private"),16&r&&n.push("protected"),4&r&&n.push("public"),32&r&&n.push("static"),128&r&&n.push("abstract"),1&r&&n.push("export"),8388608&t.flags&&n.push("declare"),n.length>0?n.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 168===t.kind||195===t.kind?t.typeArguments:e.isFunctionLike(t)||244===t.kind||245===t.kind?t.typeParameters:void 0},e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(10!==t&&13!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 18<=e&&e<=74},e.isInsideTemplateLiteral=function(t,r,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart(n)<r&&r<t.end||!!t.isUnterminated&&r===t.end},e.isAccessibilityModifier=function(e){switch(e){case 118:case 116:case 117:return!0}return!1},e.cloneCompilerOptions=function(t){var r=e.clone(t);return e.setConfigFileInOptions(r,t&&t.configFile),r},e.isArrayLiteralOrObjectLiteralDestructuringPattern=function e(t){if(191===t.kind||192===t.kind){if(208===t.parent.kind&&t.parent.left===t&&62===t.parent.operatorToken.kind)return!0;if(231===t.parent.kind&&t.parent.initializer===t)return!0;if(e(279===t.parent.kind?t.parent.parent:t.parent))return!0}return!1},e.isInReferenceComment=function(e,t){return P(e,t,!0)},e.isInNonReferenceComment=function(e,t){return P(e,t,!1)},e.createTextSpanFromNode=function(t,r,n){return e.createTextSpanFromBounds(t.getStart(r),(n||t).getEnd())},e.createTextRangeFromNode=function(t,r){return e.createRange(t.getStart(r),t.end)},e.createTextSpanFromRange=function(t){return e.createTextSpanFromBounds(t.pos,t.end)},e.createTextRangeFromSpan=function(t){return e.createRange(t.start,t.start+t.length)},e.createTextChangeFromStartLength=function(t,r,n){return w(e.createTextSpan(t,r),n)},e.createTextChange=w,e.typeKeywords=[124,150,127,90,133,136,99,139,140,137,142,143,105,109,145,146,147],e.isTypeKeyword=function(t){return e.contains(e.typeKeywords,t)},e.isExternalModuleSymbol=function(e){return!!(1536&e.flags)&&34===e.name.charCodeAt(0)},e.nodeSeenTracker=function(){var t=[];return function(r){var n=e.getNodeId(r);return!t[n]&&(t[n]=!0)}},e.getSnapshotText=function(e){return e.getText(0,e.getLength())},e.repeatString=function(e,t){for(var r="",n=0;n<t;n++)r+=e;return r},e.skipConstraint=function(e){return e.isTypeParameter()&&e.getConstraint()||e},e.getNameFromPropertyName=function(t){return 153===t.kind?e.isStringOrNumericLiteralLike(t.expression)?t.expression.text:void 0:e.getTextOfIdentifierOrLiteral(t)},e.programContainsEs6Modules=function(e){return e.getSourceFiles().some((function(t){return!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator}))},e.compilerOptionsIndicateEs6Modules=function(e){return!!e.module||e.target>=2||!!e.noEmit},e.hostUsesCaseSensitiveFileNames=I,e.hostGetCanonicalFileName=function(t){return e.createGetCanonicalFileName(I(t))},e.makeImportIfNecessary=function(e,t,r,n){return e||t&&t.length?O(e,t,r,n):void 0},e.makeImport=O,e.makeStringLiteral=M,function(e){e[e.Single=0]="Single",e[e.Double=1]="Double"}(e.QuotePreference||(e.QuotePreference={})),e.quotePreferenceFromString=L,e.getQuotePreference=function(t,r){if(r.quotePreference&&"auto"!==r.quotePreference)return"single"===r.quotePreference?0:1;var n=t.imports&&e.find(t.imports,e.isStringLiteral);return n?L(n,t):1},e.getQuoteFromPreference=function(t){switch(t){case 0:return"'";case 1:return'"';default:return e.Debug.assertNever(t)}},e.symbolNameNoDefault=function(t){var r=R(t);return void 0===r?void 0:e.unescapeLeadingUnderscores(r)},e.symbolEscapedNameNoDefault=R,e.isObjectBindingElementWithoutPropertyName=function(t){return e.isBindingElement(t)&&e.isObjectBindingPattern(t.parent)&&e.isIdentifier(t.name)&&!t.propertyName},e.getPropertySymbolFromBindingElement=function(e,t){var r=e.getTypeAtLocation(t.parent);return r&&e.getPropertyOfType(r,t.name.text)},e.getPropertySymbolsFromBaseTypes=B,e.isMemberSymbolInBaseType=function(e,t){return B(e.parent,e.name,t,(function(e){return!0}))||!1},e.getParentNodeInSpan=function(t,r,n){if(t)for(;t.parent;){if(e.isSourceFile(t.parent)||!j(n,t.parent,r))return t;t=t.parent}},e.findModifier=function(t,r){return t.modifiers&&e.find(t.modifiers,(function(e){return e.kind===r}))},e.insertImport=function(t,r,n){var i=e.findLast(r.statements,e.isAnyImportSyntax);i?t.insertNodeAfter(r,i,n):t.insertNodeAtTopOfFile(r,n,!0)},e.textSpansEqual=K,e.documentSpansEqual=function(e,t){return e.fileName===t.fileName&&K(e.textSpan,t.textSpan)},e.forEachUnique=function(e,t){if(e)for(var r=0;r<e.length;r++)if(e.indexOf(e[r])===r){var n=t(e[r],r);if(n)return n}}}(s||(s={})),function(e){function t(e){return e.declarations&&e.declarations.length>0&&155===e.declarations[0].kind}e.isFirstDeclarationOfSymbolParameter=t;var n=function(){var t,r,n,o,s=10*e.defaultMaximumTruncationLength;d();var c=function(t){return _(t,e.SymbolDisplayPartKind.text)};return{displayParts:function(){var r=t.length&&t[t.length-1].text;return o>s&&r&&"..."!==r&&(e.isWhiteSpaceLike(r.charCodeAt(r.length-1))||t.push(a(" ",e.SymbolDisplayPartKind.space)),t.push(a("...",e.SymbolDisplayPartKind.punctuation))),t},writeKeyword:function(t){return _(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return _(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeTrailingSemicolon:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return _(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return _(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return _(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,r){if(o>s)return;l(),o+=e.length,t.push(i(e,r))},writeLine:function(){if(o>s)return;o+=1,t.push(u()),r=!0},write:c,writeComment:c,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},hasTrailingWhitespace:function(){return!1},hasTrailingComment:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return n},increaseIndent:function(){n++},decreaseIndent:function(){n--},clear:d,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function l(){if(!(o>s)&&r){var i=e.getIndentString(n);i&&(o+=i.length,t.push(a(i,e.SymbolDisplayPartKind.space))),r=!1}}function _(e,r){o>s||(l(),o+=e.length,t.push(a(e,r)))}function d(){t=[],r=!0,n=0,o=0}}();function i(r,n){return a(r,function(r){var n=r.flags;if(3&n)return t(r)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName;if(4&n)return e.SymbolDisplayPartKind.propertyName;if(32768&n)return e.SymbolDisplayPartKind.propertyName;if(65536&n)return e.SymbolDisplayPartKind.propertyName;if(8&n)return e.SymbolDisplayPartKind.enumMemberName;if(16&n)return e.SymbolDisplayPartKind.functionName;if(32&n)return e.SymbolDisplayPartKind.className;if(64&n)return e.SymbolDisplayPartKind.interfaceName;if(384&n)return e.SymbolDisplayPartKind.enumName;if(1536&n)return e.SymbolDisplayPartKind.moduleName;if(8192&n)return e.SymbolDisplayPartKind.methodName;if(262144&n)return e.SymbolDisplayPartKind.typeParameterName;if(524288&n)return e.SymbolDisplayPartKind.aliasName;if(2097152&n)return e.SymbolDisplayPartKind.aliasName;return e.SymbolDisplayPartKind.text}(n))}function a(t,r){return{text:t,kind:e.SymbolDisplayPartKind[r]}}function o(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function s(t){return a(t,e.SymbolDisplayPartKind.text)}e.symbolPart=i,e.displayPart=a,e.spacePart=function(){return a(" ",e.SymbolDisplayPartKind.space)},e.keywordPart=o,e.punctuationPart=function(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)},e.operatorPart=function(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.operator)},e.textOrKeywordPart=function(t){var r=e.stringToToken(t);return void 0===r?s(t):o(r)},e.textPart=s;var c="\r\n";function u(){return a("\n",e.SymbolDisplayPartKind.lineBreak)}function l(e){try{return e(n),n.displayParts()}finally{n.clear()}}function _(t,r){return e.ensureScriptKind(t,r&&r.getScriptKind&&r.getScriptKind(t))}function d(e){return 0!=(33554432&e.flags)}function p(e){return 0!=(2097152&e.flags)}function f(e,t){void 0===t&&(t=!0);var r=e&&g(e);return r&&!t&&y(r),r}function m(t,r,n,i,a){var o;if(void 0===r&&(r=!0),n&&i&&e.isBindingElement(t)&&e.isIdentifier(t.name)&&e.isObjectBindingPattern(t.parent))(c=(s=i.getSymbolAtLocation(t.name))&&n.get(String(e.getSymbolId(s))))&&c.text!==(t.name||t.propertyName).getText()&&(o=e.createBindingElement(t.dotDotDotToken,t.propertyName||t.name,c,t.initializer));else if(n&&i&&e.isIdentifier(t)){var s,c;(c=(s=i.getSymbolAtLocation(t))&&n.get(String(e.getSymbolId(s))))&&(o=e.createIdentifier(c.text))}return o||(o=g(t,n,i,a)),o&&!r&&y(o),a&&o&&a(t,o),o}function g(t,r,n,i){var a=r||n||i?e.visitEachChild(t,(function(e){return m(e,!0,r,n,i)}),e.nullTransformationContext):e.visitEachChild(t,f,e.nullTransformationContext);if(a===t){var o=e.getSynthesizedClone(t);return e.isStringLiteral(o)?o.textSourceNode=t:e.isNumericLiteral(o)&&(o.numericLiteralFlags=t.numericLiteralFlags),e.setTextRange(o,t)}return a.parent=void 0,a}function y(e){h(e),v(e)}function h(e){b(e,512,x)}function v(t){b(t,1024,e.getLastChild)}function b(t,r,n){e.addEmitFlags(t,r);var i=n(t);i&&b(i,r,n)}function x(e){return e.forEachChild((function(e){return e}))}function D(e,t,r,n,i){return function(a,o,s,c){3===s?(a+=2,o-=2):a+=2,i(e,r||s,t.text.slice(a,o),void 0!==n?n:c)}}function S(t,r){if(e.startsWith(t,r))return 0;var n=t.indexOf(" "+r);return-1===n&&(n=t.indexOf("."+r)),-1===n&&(n=t.indexOf('"'+r)),-1===n?-1:n+1}function T(e){switch(e){case 36:case 34:case 37:case 35:return!0;default:return!1}}function E(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}function C(e){return 164===e||165===e||166===e||157===e||159===e}function k(e){return 243===e||161===e||160===e||162===e||163===e}function N(e){return 248===e}function A(e){return 224===e||225===e||227===e||232===e||233===e||234===e||238===e||240===e||158===e||246===e||253===e||252===e||259===e||251===e||258===e}function F(e,t){return w(e,e.fileExists,t)}function P(e){try{return e()}catch(e){return}}function w(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return P((function(){return t&&t.apply(e,r)}))}function I(t,n){if(n.readFile){var i=n.readFile(t),a=i&&function(e){try{return JSON.parse(e)}catch(e){return}}(i);if(a){for(var o={},s=0,c=["dependencies","devDependencies","optionalDependencies","peerDependencies"];s<c.length;s++){var u=c[s],l=a[u];if(l){var _=e.createMap();for(var d in l)_.set(d,l[d]);o[u]=_}}var p=[[1,o.dependencies],[2,o.devDependencies],[8,o.optionalDependencies],[4,o.peerDependencies]];return r(r({},o),{fileName:t,get:f,has:function(e,t){return!!f(e,t)}})}}function f(e,t){void 0===t&&(t=15);for(var r=0,n=p;r<n.length;r++){var i=n[r],a=i[0],o=i[1];if(o&&t&a){var s=o.get(e);if(void 0!==s)return s}}}}e.getNewLineOrDefaultFromHost=function(e,t){return t&&t.newLineCharacter||e.getNewLine&&e.getNewLine()||c},e.lineBreakPart=u,e.mapToDisplayParts=l,e.typeToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),l((function(i){e.writeType(t,r,17408|n,i)}))},e.symbolToDisplayParts=function(e,t,r,n,i){return void 0===i&&(i=0),l((function(a){e.writeSymbol(t,r,n,8|i,a)}))},e.signatureToDisplayParts=function(e,t,r,n){return void 0===n&&(n=0),n|=25632,l((function(i){e.writeSignature(t,r,n,void 0,i)}))},e.isImportOrExportSpecifierName=function(t){return!!t.parent&&e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t},e.scriptKindIs=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=_(t,r);return e.some(n,(function(e){return e===a}))},e.getScriptKind=_,e.getSymbolTarget=function(t,r){for(var n=t;p(n)||d(n)&&n.target;)n=d(n)&&n.target?n.target:e.skipAlias(n,r);return n},e.getUniqueSymbolId=function(t,r){return e.getSymbolId(e.skipAlias(t,r))},e.getFirstNonSpaceCharacterPosition=function(t,r){for(;e.isWhiteSpaceLike(t.charCodeAt(r));)r+=1;return r},e.getPrecedingNonSpaceCharacterPosition=function(t,r){for(;r>-1&&e.isWhiteSpaceSingleLine(t.charCodeAt(r));)r-=1;return r+1},e.getSynthesizedDeepClone=f,e.getSynthesizedDeepCloneWithRenames=m,e.getSynthesizedDeepClones=function(t,r){return void 0===r&&(r=!0),t&&e.createNodeArray(t.map((function(e){return f(e,r)})),t.hasTrailingComma)},e.suppressLeadingAndTrailingTrivia=y,e.suppressLeadingTrivia=h,e.suppressTrailingTrivia=v,e.getUniqueName=function(t,r){for(var n=t,i=1;!e.isFileLevelUniqueName(r,n);i++)n=t+"_"+i;return n},e.getRenameLocation=function(t,r,n,i){for(var a=0,o=-1,s=0,c=t;s<c.length;s++){var u=c[s],l=u.fileName,_=u.textChanges;e.Debug.assert(l===r);for(var d=0,p=_;d<p.length;d++){var f=p[d],m=f.span,g=f.newText,y=S(g,n);if(-1!==y&&(o=m.start+a+y,!i))return o;a+=g.length-m.length}}return e.Debug.assert(i),e.Debug.assert(o>=0),o},e.copyLeadingComments=function(t,r,n,i,a){e.forEachLeadingCommentRange(n.text,t.pos,D(r,n,i,a,e.addSyntheticLeadingComment))},e.copyTrailingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.end,D(r,n,i,a,e.addSyntheticTrailingComment))},e.copyTrailingAsLeadingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.pos,D(r,n,i,a,e.addSyntheticLeadingComment))},e.getContextualTypeFromParent=function(e,t){var r=e.parent;switch(r.kind){case 196:return t.getContextualType(r);case 208:var n=r,i=n.left,a=n.operatorToken,o=n.right;return T(a.kind)?t.getTypeAtLocation(e===o?i:o):t.getContextualType(e);case 275:return r.expression===e?E(r,t):void 0;default:return t.getContextualType(e)}},e.quote=function(t,r){if(/^\d+$/.test(t))return t;var n=r.quotePreference||"auto",i=JSON.stringify(t);switch(n){case"auto":case"double":return i;case"single":return"'"+e.stripQuotes(i).replace("'","\\'").replace('\\"','"')+"'";default:return e.Debug.assertNever(n)}},e.isEqualityOperatorKind=T,e.isStringLiteralOrTemplate=function(e){switch(e.kind){case 10:case 14:case 210:case 197:return!0;default:return!1}},e.hasIndexSignature=function(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()},e.getSwitchedType=E,e.getTypeNodeIfAccessible=function(e,t,r,n){var i=r.getTypeChecker(),a=!0,o=function(){a=!1},s=i.typeToTypeNode(e,t,void 0,{trackSymbol:function(e,t,r){a=a&&0===i.isSymbolAccessible(e,t,r,!1).accessibility},reportInaccessibleThisError:o,reportPrivateInBaseOfClassExpression:o,reportInaccessibleUniqueSymbolError:o,moduleResolverHost:{readFile:n.readFile,fileExists:n.fileExists,directoryExists:n.directoryExists,getSourceFiles:r.getSourceFiles,getCurrentDirectory:r.getCurrentDirectory,getCommonSourceDirectory:r.getCommonSourceDirectory}});return a?s:void 0},e.syntaxRequiresTrailingCommaOrSemicolonOrASI=C,e.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI=k,e.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI=N,e.syntaxRequiresTrailingSemicolonOrASI=A,e.syntaxMayBeASICandidate=e.or(C,k,N,A),e.isASICandidate=function(t,r){var n=t.getLastToken(r);if(n&&26===n.kind)return!1;if(C(t.kind)){if(n&&27===n.kind)return!1}else if(N(t.kind)){if((i=e.last(t.getChildren(r)))&&e.isModuleBlock(i))return!1}else if(k(t.kind)){var i;if((i=e.last(t.getChildren(r)))&&e.isFunctionBlock(i))return!1}else if(!A(t.kind))return!1;if(227===t.kind)return!0;var a=e.findAncestor(t,(function(e){return!e.parent})),o=e.findNextToken(t,a,r);return!o||19===o.kind||r.getLineAndCharacterOfPosition(t.getEnd()).line!==r.getLineAndCharacterOfPosition(o.getStart(r)).line},e.probablyUsesSemicolons=function(t){var r=0,n=0;return e.forEachChild(t,(function i(a){if(A(a.kind)){var o=a.getLastToken(t);o&&26===o.kind?r++:n++}return r+n>=5||e.forEachChild(a,i)})),0===r&&n<=1||r/n>.2},e.tryGetDirectories=function(e,t){return w(e,e.getDirectories,t)||[]},e.tryReadDirectory=function(t,r,n,i,a){return w(t,t.readDirectory,r,n,i,a)||e.emptyArray},e.tryFileExists=F,e.tryDirectoryExists=function(t,r){return P((function(){return e.directoryProbablyExists(r,t)}))||!1},e.tryAndIgnoreErrors=P,e.tryIOAndConsumeErrors=w,e.findPackageJsons=function(t,r,n){var i=[];return e.forEachAncestorDirectory(t,(function(t){if(t===n)return!0;var a=e.combinePaths(t,"package.json");F(r,a)&&i.push(a)})),i},e.findPackageJson=function(t,r){var n;return e.forEachAncestorDirectory(t,(function(t){return"node_modules"===t||(!!(n=e.findConfigFile(t,(function(e){return F(r,e)}),"package.json"))||void 0)})),n},e.getPackageJsonsVisibleToFile=function(t,r){if(!r.fileExists)return[];var n=[];return e.forEachAncestorDirectory(e.getDirectoryPath(t),(function(t){var i=e.combinePaths(t,"package.json");if(r.fileExists(i)){var a=I(i,r);a&&n.push(a)}})),n},e.createPackageJsonInfo=I,e.consumesNodeCoreModules=function(t){return e.some(t.imports,(function(t){var r=t.text;return e.JsTyping.nodeCoreModules.has(r)}))},e.isInsideNodeModules=function(t){return e.contains(e.getPathComponents(t),"node_modules")}}(s||(s={})),function(e){e.createClassifier=function(){var o=e.createScanner(99,!1);function s(i,s,c){var u=0,l=0,_=[],d=function(t){switch(t){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return e.Debug.assertNever(t)}}(s),p=d.prefix,f=d.pushTemplate;i=p+i;var m=p.length;f&&_.push(15),o.setText(i);var g=0,y=[],h=0;do{u=o.scan(),e.isTrivia(u)||(x(),l=u);var v=o.getTextPos();if(n(o.getTokenPos(),v,m,a(u),y),v>=i.length){var b=r(o,u,e.lastOrUndefined(_));void 0!==b&&(g=b)}}while(1!==u);function x(){switch(u){case 43:case 67:t[l]||13!==o.reScanSlashToken()||(u=13);break;case 29:75===l&&h++;break;case 31:h>0&&h--;break;case 124:case 142:case 139:case 127:case 143:h>0&&!c&&(u=75);break;case 15:_.push(u);break;case 18:_.length>0&&_.push(u);break;case 19:if(_.length>0){var r=e.lastOrUndefined(_);15===r?17===(u=o.reScanTemplateToken())?_.pop():e.Debug.assertEqual(u,16,"Should have been a template middle."):(e.Debug.assertEqual(r,18,"Should have been an open brace"),_.pop())}break;default:if(!e.isKeyword(u))break;24===l?u=75:e.isKeyword(l)&&e.isKeyword(u)&&!function(t,r){if(!e.isAccessibilityModifier(t))return!0;switch(r){case 130:case 141:case 128:case 119:return!0;default:return!1}}(l,u)&&(u=75)}}return{endOfLineState:g,spans:y}}return{getClassificationsForLine:function(t,r,n){return function(t,r){for(var n=[],a=t.spans,o=0,s=0;s<a.length;s+=3){var c=a[s],u=a[s+1],l=a[s+2];if(o>=0){var _=c-o;_>0&&n.push({length:_,classification:e.TokenClass.Whitespace})}n.push({length:u,classification:i(l)}),o=c+u}var d=r.length-o;d>0&&n.push({length:d,classification:e.TokenClass.Whitespace});return{entries:n,finalLexState:t.endOfLineState}}(s(t,r,n),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([75,10,8,9,13,103,45,46,21,23,19,105,90],(function(e){return e}),(function(){return!0}));function r(t,r,n){switch(r){case 10:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(r)){if(!t.isUnterminated())return;switch(r){case 17:return 5;case 14:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return 15===n?6:void 0}}function n(e,t,r,n,i){if(8!==n){0===e&&r>0&&(e+=r);var a=t-e;a>0&&i.push(e-r,a,n)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 25:return e.TokenClass.BigIntLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier;default:return}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 41:case 43:case 44:case 39:case 40:case 47:case 48:case 49:case 29:case 31:case 32:case 33:case 97:case 96:case 122:case 34:case 35:case 36:case 37:case 50:case 52:case 51:case 55:case 56:case 73:case 72:case 74:case 69:case 70:case 71:case 63:case 64:case 65:case 67:case 68:case 62:case 27:case 60:return!0;default:return!1}}(t)||function(e){switch(e){case 39:case 40:case 54:case 53:case 45:case 46:return!0;default:return!1}}(t))return 5;if(t>=18&&t<=74)return 10;switch(t){case 8:return 4;case 9:return 25;case 10:return 6;case 13:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 75:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 248:case 244:case 245:case 243:e.throwIfCancellationRequested()}}function s(t,r,n,i,a){var s=[];return n.forEachChild((function c(u){if(u&&e.textSpanIntersectsWith(a,u.pos,u.getFullWidth())){if(o(r,u.kind),e.isIdentifier(u)&&!e.nodeIsMissing(u)&&i.has(u.escapedText)){var l=t.getSymbolAtLocation(u),_=l&&function t(r,n,i){var a=r.getFlags();return 0==(2885600&a)?void 0:32&a?11:384&a?12:524288&a?16:1536&a?4&n||1&n&&function(t){return e.some(t.declarations,(function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)}))}(r)?14:void 0:2097152&a?t(i.getAliasedSymbol(r),n,i):2&n?64&a?13:262144&a?15:void 0:void 0}(l,e.getMeaningFromLocation(u),t);_&&function(t,r,n){var i=r-t;e.Debug.assert(i>0,"Classification had non-positive length of "+i),s.push(t),s.push(i),s.push(n)}(u.getStart(n),u.getEnd(),_)}u.forEachChild(c)}})),{spans:s,endOfLineState:0}}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function u(t){e.Debug.assert(t.spans.length%3==0);for(var r=t.spans,n=[],i=0;i<r.length;i+=3)n.push({textSpan:e.createTextSpan(r[i],r[i+1]),classificationType:c(r[i+2])});return n}function l(t,r,n){var i=n.start,a=n.length,s=e.createScanner(99,!1,r.languageVariant,r.text),c=e.createScanner(99,!1,r.languageVariant,r.text),u=[];return h(r),{spans:u,endOfLineState:0};function l(e,t,r){u.push(e),u.push(t),u.push(r)}function _(t,n,i,a){if(3===n){var o=e.parseIsolatedJSDocComment(r.text,i,a);if(o&&o.jsDoc)return o.jsDoc.parent=t,void function(e){var t=e.pos;if(e.tags)for(var r=0,n=e.tags;r<n.length;r++){var i=n[r];switch(i.pos!==t&&d(t,i.pos-t),l(i.pos,1,10),l(i.tagName.pos,i.tagName.end-i.tagName.pos,18),t=i.tagName.end,i.kind){case 310:a(i);break;case 314:p(i),t=i.end;break;case 313:case 311:h(i.typeExpression),t=i.end}}t!==e.end&&d(t,e.end-t);return;function a(e){e.isNameFirst&&(d(t,e.name.pos-t),l(e.name.pos,e.name.end-e.name.pos,17),t=e.name.end),e.typeExpression&&(d(t,e.typeExpression.pos-t),h(e.typeExpression),t=e.typeExpression.end),e.isNameFirst||(d(t,e.name.pos-t),l(e.name.pos,e.name.end-e.name.pos,17),t=e.name.end)}}(o.jsDoc)}else if(2===n&&function(t,n){var i=/(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/gim,a=r.text.substr(t,n),o=/^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im.exec(a);if(!o)return!1;if(!(o[3]&&o[3]in e.commentPragmas))return!1;var s=t;d(s,o[1].length),l(s+=o[1].length,o[2].length,10),l(s+=o[2].length,o[3].length,21),s+=o[3].length;var c=o[4],u=s;for(;;){var _=i.exec(c);if(!_)break;var p=s+_.index;p>u&&(d(u,p-u),u=p),l(u,_[1].length,22),u+=_[1].length,_[2].length&&(d(u,_[2].length),u+=_[2].length),l(u,_[3].length,5),u+=_[3].length,_[4].length&&(d(u,_[4].length),u+=_[4].length),l(u,_[5].length,24),u+=_[5].length}(s+=o[4].length)>u&&d(u,s-u);o[5]&&(l(s,o[5].length,10),s+=o[5].length);var f=t+n;s<f&&d(s,f-s);return!0}(i,a))return;d(i,a)}function d(e,t){l(e,t,1)}function p(e){for(var t=0,r=e.getChildren();t<r.length;t++){h(r[t])}}function f(t,r,n){var i;for(i=r;i<n&&!e.isLineBreak(t.charCodeAt(i));i++);for(l(r,i-r,1),c.setTextPos(i);c.getTextPos()<n;)m()}function m(){var e=c.getTextPos(),t=c.scan(),r=c.getTextPos(),n=y(t);n&&l(e,r-e,n)}function g(t){if(e.isJSDoc(t))return!0;if(e.nodeIsMissing(t))return!0;var n=function(e){switch(e.parent&&e.parent.kind){case 266:if(e.parent.tagName===e)return 19;break;case 267:if(e.parent.tagName===e)return 20;break;case 265:if(e.parent.tagName===e)return 21;break;case 271:if(e.parent.name===e)return 22}return}(t);if(!e.isToken(t)&&11!==t.kind&&void 0===n)return!1;var i=11===t.kind?t.pos:function(t){for(s.setTextPos(t.pos);;){var n=s.getTextPos();if(!e.couldStartTrivia(r.text,n))return n;var i=s.scan(),a=s.getTextPos(),o=a-n;if(!e.isTrivia(i))return n;switch(i){case 4:case 5:continue;case 2:case 3:_(t,i,n,o),s.setTextPos(a);continue;case 7:var c=r.text,u=c.charCodeAt(n);if(60===u||62===u){l(n,o,1);continue}e.Debug.assert(124===u||61===u),f(c,n,a);break;case 6:break;default:e.Debug.assertNever(i)}}}(t),a=t.end-i;if(e.Debug.assert(a>=0),a>0){var o=n||y(t.kind,t);o&&l(i,a,o)}return!0}function y(t,r){if(e.isKeyword(t))return 3;if((29===t||31===t)&&r&&e.getTypeArgumentOrTypeParameterList(r.parent))return 10;if(e.isPunctuation(t)){if(r){var n=r.parent;if(62===t&&(241===n.kind||158===n.kind||155===n.kind||271===n.kind))return 5;if(208===n.kind||206===n.kind||207===n.kind||209===n.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 25;if(10===t)return r&&271===r.parent.kind?24:6;if(13===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(11===t)return 23;if(75===t){if(r)switch(r.parent.kind){case 244:return r.parent.name===r?11:void 0;case 154:return r.parent.name===r?15:void 0;case 245:return r.parent.name===r?13:void 0;case 247:return r.parent.name===r?12:void 0;case 248:return r.parent.name===r?14:void 0;case 155:return r.parent.name===r?e.isThisIdentifier(r)?3:17:void 0}return 2}}function h(n){if(n&&e.decodedTextSpanIntersectsWith(i,a,n.pos,n.getFullWidth())){o(t,n.kind);for(var s=0,c=n.getChildren(r);s<c.length;s++){var u=c[s];g(u)||h(u)}}}}e.getSemanticClassifications=function(e,t,r,n,i){return u(s(e,t,r,n,i))},e.getEncodedSemanticClassifications=s,e.getSyntacticClassifications=function(e,t,r){return u(l(e,t,r))},e.getEncodedSyntacticClassifications=l}(s||(s={})),function(e){!function(r){!function(n){function i(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map((function(e){var t=e.name,n=e.kind,i=e.span;return{name:t,kind:n,kindModifiers:a(e.extension),sortText:r.SortText.LocationPriority,replacementSpan:i}}))}}function a(t){switch(t){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".tsbuildinfo":return e.Debug.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return e.Debug.assertNever(t)}}var o;function s(t,r,n,i,a,o){var s,l,_=r.parent;switch(_.kind){case 186:switch(_.parent.kind){case 168:return{kind:2,types:u(i.getTypeArgumentConstraint(_)),isNewIdentifier:!1};case 184:return c(i.getTypeFromTypeNode(_.parent.objectType));case 187:return{kind:0,paths:p(t,r,a,o,i)};case 177:if(!e.isTypeReferenceNode(_.parent.parent))return;var d=(s=_.parent,l=_,e.mapDefined(s.types,(function(t){return t!==l&&e.isLiteralTypeNode(t)&&e.isStringLiteral(t.literal)?t.literal.text:void 0})));return{kind:2,types:u(i.getTypeArgumentConstraint(_.parent)).filter((function(t){return!e.contains(d,t.value)})),isNewIdentifier:!1};default:return}case 279:return e.isObjectLiteralExpression(_.parent)&&_.name===r?c(i.getContextualType(_.parent)):h();case 194:var f=_,m=f.expression,g=f.argumentExpression;return r===g?c(i.getTypeAtLocation(m)):void 0;case 195:case 196:if(!e.isRequireCall(_,!1)&&!e.isImportCall(_)){var y=e.SignatureHelp.getArgumentInfoForCompletions(r,n,t);return y?function(t,r){var n=!1,i=e.createMap(),a=[];return r.getResolvedSignature(t.invocation,a,t.argumentCount),{kind:2,types:e.flatMap(a,(function(a){if(e.signatureHasRestParameter(a)||!(t.argumentCount>a.parameters.length)){var o=r.getParameterType(a,t.argumentIndex);return n=n||!!(4&o.flags),u(o,i)}})),isNewIdentifier:n}}(y,i):h()}case 253:case 259:case 263:return{kind:0,paths:p(t,r,a,o,i)};default:return h()}function h(){return{kind:2,types:u(e.getContextualTypeFromParent(r,i)),isNewIdentifier:!1}}}function c(t){return t&&{kind:1,symbols:t.getApparentProperties(),hasIndexSignature:e.hasIndexSignature(t)}}function u(t,r){return void 0===r&&(r=e.createMap()),t?(t=e.skipConstraint(t)).isUnion()?e.flatMap(t.types,(function(e){return u(e,r)})):!t.isStringLiteral()||1024&t.flags||!e.addToSeen(r,t.value)?e.emptyArray:[t]:e.emptyArray}function l(e,t,r){return{name:e,kind:t,extension:r}}function _(e){return l(e,"directory",void 0)}function d(t,r,n){var i=function(t,r){var n=Math.max(t.lastIndexOf(e.directorySeparator),t.lastIndexOf("\\")),i=-1!==n?n+1:0,a=t.length-i;return 0===a||e.isIdentifierText(t.substr(i,a),99)?void 0:e.createTextSpan(r+i,a)}(t,r);return n.map((function(e){return{name:e.name,kind:e.kind,extension:e.extension,span:i}}))}function p(r,n,i,a,o){return d(n.text,n.getStart(r)+1,function(r,n,i,a,o){var s=e.normalizeSlashes(n.text),c=r.path,u=e.getDirectoryPath(c);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,r=e.charCodeAt(t);return 47===r||92===r}return!1}(s)||!i.baseUrl&&(e.isRootedDiskPath(s)||e.isUrl(s))?function(r,n,i,a,o){var s=m(i);return i.rootDirs?function(r,n,i,a,o,s,c){var u=o.project||s.getCurrentDirectory(),l=!(s.useCaseSensitiveFileNames&&s.useCaseSensitiveFileNames()),_=function(r,n,i,a){r=r.map((function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(n,t))}));var o=e.firstDefined(r,(function(t){return e.containsPath(t,i,n,a)?i.substr(t.length):void 0}));return e.deduplicate(t(r.map((function(t){return e.combinePaths(t,o)})),[i]),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(r,u,i,l);return e.flatMap(_,(function(e){return y(n,e,a,s,c)}))}(i.rootDirs,r,n,s,i,a,o):y(r,n,s,a,o)}(s,u,i,a,c):function(t,r,n,i,a){var o=n.baseUrl,s=n.paths,c=[],u=m(n);if(o){var _=n.project||i.getCurrentDirectory(),d=e.normalizePath(e.combinePaths(_,o));y(t,d,u,i,void 0,c),s&&h(c,t,d,u.extensions,s,i)}for(var p=v(t),f=0,g=function(t,r,n){var i=n.getAmbientModules().map((function(t){return e.stripQuotes(t.name)})).filter((function(r){return e.startsWith(r,t)}));if(void 0!==r){var a=e.ensureTrailingDirectorySeparator(r);return i.map((function(t){return e.removePrefix(t,a)}))}return i}(t,p,a);f<g.length;f++){var b=g[f];c.push(l(b,"external module name",void 0))}if(x(i,n,r,p,u,c),e.getEmitModuleResolutionKind(n)===e.ModuleResolutionKind.NodeJs){var D=!1;if(void 0===p)for(var T=function(e){c.some((function(t){return t.name===e}))||(D=!0,c.push(l(e,"external module name",void 0)))},E=0,C=function(t,r){if(!t.readFile||!t.fileExists)return e.emptyArray;for(var n=[],i=0,a=e.findPackageJsons(r,t);i<a.length;i++)for(var o=a[i],s=e.readJson(o,t),c=0,u=S;c<u.length;c++){var l=u[c],_=s[l];if(_)for(var d in _)_.hasOwnProperty(d)&&!e.startsWith(d,"@types/")&&n.push(d)}return n}(i,r);E<C.length;E++){var k=C[E];T(k)}D||e.forEachAncestorDirectory(r,(function(r){var n=e.combinePaths(r,"node_modules");e.tryDirectoryExists(i,n)&&y(t,n,u,i,void 0,c)}))}return c}(s,u,i,a,o)}(r,n,i,a,o))}function m(e,t){return void 0===t&&(t=!1),{extensions:g(e),includeExtensions:t}}function g(t){var r=e.getSupportedExtensions(t);return t.resolveJsonModule&&e.getEmitModuleResolutionKind(t)===e.ModuleResolutionKind.NodeJs?r.concat(".json"):r}function y(t,r,n,i,a,o){var s=n.extensions,c=n.includeExtensions;void 0===o&&(o=[]),void 0===t&&(t=""),t=e.normalizeSlashes(t),e.hasTrailingDirectorySeparator(t)||(t=e.getDirectoryPath(t)),""===t&&(t="."+e.directorySeparator),t=e.ensureTrailingDirectorySeparator(t);var u=e.resolvePath(r,t),d=e.hasTrailingDirectorySeparator(u)?u:e.getDirectoryPath(u),p=!(i.useCaseSensitiveFileNames&&i.useCaseSensitiveFileNames());if(!e.tryDirectoryExists(i,d))return o;var m=e.tryReadDirectory(i,d,s,void 0,["./*"]);if(m){for(var g=e.createMap(),y=0,v=m;y<v.length;y++){var b=v[y];if(b=e.normalizePath(b),!a||0!==e.comparePaths(b,a,r,p)){var x=c||e.fileExtensionIs(b,".json")?e.getBaseFileName(b):e.removeFileExtension(e.getBaseFileName(b));g.set(x,e.tryGetExtensionFromPath(b))}}g.forEach((function(e,t){o.push(l(t,"script",e))}))}var D=e.tryGetDirectories(i,d);if(D)for(var S=0,T=D;S<T.length;S++){var E=T[S],C=e.getBaseFileName(e.normalizePath(E));"@types"!==C&&o.push(_(C))}var k=e.findPackageJson(d,i);if(k){var N=e.readJson(k,i).typesVersions;if("object"===f(N)){var A=e.getPackageJsonTypesVersionsPaths(N),F=A&&A.paths,P=u.slice(e.ensureTrailingDirectorySeparator(d).length);F&&h(o,P,d,s,F,i)}}return o}function h(t,r,n,i,a,o){for(var s in a)if(e.hasProperty(a,s)){var c=a[s];if(c)for(var u=function(e,r,n){t.some((function(t){return t.name===e}))||t.push(l(e,r,n))},_=0,d=b(s,c,r,n,i,o);_<d.length;_++){var p=d[_];u(p.name,p.kind,p.extension)}}}function v(t){return T(t)?e.hasTrailingDirectorySeparator(t)?t:e.getDirectoryPath(t):void 0}function b(r,n,i,a,o,s){if(!e.endsWith(r,"*"))return e.stringContains(r,"*")?e.emptyArray:d(r);var c=r.slice(0,r.length-1),u=e.tryRemovePrefix(i,c);return void 0===u?d(c):e.flatMap(n,(function(r){return function(r,n,i,a,o){if(!o.readDirectory)return;var s=e.hasZeroOrOneAsteriskCharacter(i)?e.tryParsePattern(i):void 0;if(!s)return;var c=e.resolvePath(s.prefix),u=e.hasTrailingDirectorySeparator(s.prefix)?c:e.getDirectoryPath(c),d=e.hasTrailingDirectorySeparator(s.prefix)?"":e.getBaseFileName(c),p=T(r),f=p?e.hasTrailingDirectorySeparator(r)?r:e.getDirectoryPath(r):void 0,m=p?e.combinePaths(u,d+f):u,g=e.normalizePath(s.suffix),y=e.normalizePath(e.combinePaths(n,m)),h=p?y:e.ensureTrailingDirectorySeparator(y)+d,v=g?"**/*":"./*",b=e.mapDefined(e.tryReadDirectory(o,y,a,void 0,[v]),(function(t){var r=e.tryGetExtensionFromPath(t),n=D(t);return void 0===n?void 0:l(e.removeFileExtension(n),"script",r)})),x=e.mapDefined(e.tryGetDirectories(o,y).map((function(t){return e.combinePaths(y,t)})),(function(e){var t=D(e);return void 0===t?void 0:_(t)}));return t(b,x);function D(t){var r=function(t,r,n){return e.startsWith(t,r)&&e.endsWith(t,n)?t.slice(r.length,t.length-n.length):void 0}(e.normalizePath(t),h,g);return void 0===r?void 0:function(t){return t[0]===e.directorySeparator?t.slice(1):t}(r)}}(u,a,r,o,s)}));function d(t){return e.startsWith(t,i)?[_(t)]:e.emptyArray}}function x(t,r,n,i,a,o){void 0===o&&(o=[]);for(var s=e.createMap(),c=0,u=e.tryAndIgnoreErrors((function(){return e.getEffectiveTypeRoots(r,t)}))||e.emptyArray;c<u.length;c++){f(u[c])}for(var _=0,d=e.findPackageJsons(n,t);_<d.length;_++){var p=d[_];f(e.combinePaths(e.getDirectoryPath(p),"node_modules/@types"))}return o;function f(n){if(e.tryDirectoryExists(t,n))for(var c=0,u=e.tryGetDirectories(t,n);c<u.length;c++){var _=u[c],d=e.unmangleScopedPackageName(_);if(!r.types||e.contains(r.types,d))if(void 0===i)s.has(d)||(o.push(l(d,"external module name",void 0)),s.set(d,!0));else{var p=e.combinePaths(n,_),f=e.tryRemoveDirectoryPrefix(i,d,e.hostGetCanonicalFileName(t));void 0!==f&&y(f,p,a,t,void 0,o)}}}}n.getStringLiteralCompletions=function(t,n,a,o,c,u,l,_){if(e.isInReferenceComment(t,n)){var p=function(t,r,n,i){var a=e.getTokenAtPosition(t,r),o=e.getLeadingCommentRanges(t.text,a.pos),s=o&&e.find(o,(function(e){return r>=e.pos&&r<=e.end}));if(!s)return;var c=t.text.slice(s.pos,r),u=D.exec(c);if(!u)return;var l=u[1],_=u[2],p=u[3],f=e.getDirectoryPath(t.path),g="path"===_?y(p,f,m(n,!0),i,t.path):"types"===_?x(i,n,f,v(p),m(n)):e.Debug.fail();return d(p,s.pos+l.length,g)}(t,n,c,u);return p&&i(p)}if(e.isInString(t,n,a))return a&&e.isStringLiteralLike(a)?function(t,n,a,o,s){if(void 0===t)return;switch(t.kind){case 0:return i(t.paths);case 1:var c=[];return r.getCompletionEntriesFromSymbols(t.symbols,c,n,n,a,99,o,4,s),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:t.hasIndexSignature,entries:c};case 2:c=t.types.map((function(e){return{name:e.value,kindModifiers:"",kind:"string",sortText:"0"}}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t.isNewIdentifier,entries:c};default:return e.Debug.assertNever(t)}}(s(t,a,n,o,c,u),t,o,l,_):void 0},n.getStringLiteralCompletionDetails=function(t,n,i,o,c,u,l,_){if(o&&e.isStringLiteralLike(o)){var d=s(n,o,i,c,u,l);return d&&function(t,n,i,o,s,c){switch(i.kind){case 0:return(u=e.find(i.paths,(function(e){return e.name===t})))&&r.createCompletionDetails(t,a(u.extension),u.kind,[e.textPart(t)]);case 1:var u;return(u=e.find(i.symbols,(function(e){return e.name===t})))&&r.createCompletionDetailsForSymbol(u,s,o,n,c);case 2:return e.find(i.types,(function(e){return e.value===t}))?r.createCompletionDetails(t,"","type",[e.textPart(t)]):void 0;default:return e.Debug.assertNever(i)}}(t,o,d,n,c,_)}},function(e){e[e.Paths=0]="Paths",e[e.Properties=1]="Properties",e[e.Types=2]="Types"}(o||(o={}));var D=/^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/,S=["dependencies","devDependencies","peerDependencies","optionalDependencies"];function T(t){return e.stringContains(t,e.directorySeparator)}}(r.StringCompletions||(r.StringCompletions={}))}(e.Completions||(e.Completions={}))}(s||(s={})),function(e){!function(t){var r,n,i,a;function o(e){return!!(4&e.kind)}function s(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function c(t,r){return e.isSourceFileJS(t)&&!e.isCheckJsEnabledForFile(t,r)}function u(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}!function(e){e.LocationPriority="0",e.OptionalMember="1",e.MemberDeclaredBySpreadAssignment="2",e.SuggestedClassMembers="3",e.GlobalsOrKeywords="4",e.AutoImportSuggestions="5",e.JavascriptIdentifiers="6"}(r=t.SortText||(t.SortText={})),function(e){e[e.ThisType=1]="ThisType",e[e.SymbolMember=2]="SymbolMember",e[e.Export=4]="Export",e[e.Promise=8]="Promise",e[e.Nullable=16]="Nullable",e[e.SymbolMemberNoExport=2]="SymbolMemberNoExport",e[e.SymbolMemberExport=6]="SymbolMemberExport"}(n||(n={})),function(e){e[e.None=0]="None",e[e.All=1]="All",e[e.ClassElementKeywords=2]="ClassElementKeywords",e[e.InterfaceElementKeywords=3]="InterfaceElementKeywords",e[e.ConstructorParameterKeywords=4]="ConstructorParameterKeywords",e[e.FunctionLikeBodyKeywords=5]="FunctionLikeBodyKeywords",e[e.TypeAssertionKeywords=6]="TypeAssertionKeywords",e[e.TypeKeywords=7]="TypeKeywords",e[e.Last=7]="Last"}(i||(i={})),function(e){e[e.Continue=0]="Continue",e[e.Success=1]="Success",e[e.Fail=2]="Fail"}(a||(a={})),t.createImportSuggestionsForFileCache=function(){var t,r,n;return{isEmpty:function(){return!t},clear:function(){t=void 0,n=void 0,r=void 0},set:function(e,i,a){t=i,n=e,a&&(r=a)},get:function(i,a,o){if(i===n)return o?r===o?t:void 0:(e.forEach(t,(function(e){e.symbol.declarations&&(e.symbol=a.getMergedSymbol(e.origin.isDefaultExport&&e.symbol.declarations[0].localSymbol||e.symbol.declarations[0].symbol)),e.origin.moduleSymbol.declarations&&(e.origin.moduleSymbol=a.getMergedSymbol(e.origin.moduleSymbol.declarations[0].symbol))})),t)}}},t.getCompletionsAtPosition=function(n,i,a,o,l,_,p){var f=i.getTypeChecker(),m=i.getCompilerOptions(),g=e.findPrecedingToken(l,o);if(!p||e.isInString(o,l,g)||function(t,r,n,i){switch(r){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&e.isStringLiteralOrTemplate(n)&&i===n.getStart(t)+1;case"<":return!!n&&29===n.kind&&(!e.isBinaryExpression(n.parent)||R(n.parent));case"/":return!!n&&(e.isStringLiteralLike(n)?!!e.tryGetImportFromModuleSpecifier(n):43===n.kind&&e.isJsxClosingElement(n.parent));default:return e.Debug.assertNever(r)}}(o,p,g,l)){var y=t.StringCompletions.getStringLiteralCompletions(o,l,g,f,m,n,a,_);if(y)return y;if(g&&e.isBreakOrContinueStatement(g.parent)&&(76===g.kind||81===g.kind||75===g.kind))return function(t){var n=function(t){var n=[],i=e.createMap(),a=t;for(;a&&!e.isFunctionLike(a);){if(e.isLabeledStatement(a)){var o=a.label.text;i.has(o)||(i.set(o,!0),n.push({name:o,kindModifiers:"",kind:"label",sortText:r.LocationPriority}))}a=a.parent}return n}(t);if(n.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:n}}(g.parent);var v=E(i,a,o,c(o,m),l,_,void 0,n);if(v)switch(v.kind){case 0:return function(t,n,i,a,o,s){var l=o.symbols,_=o.completionKind,p=o.isInSnippetScope,f=o.isNewIdentifierLocation,m=o.location,g=o.propertyAccessToConvert,y=o.keywordFilters,v=o.literals,b=o.symbolToOriginInfoMap,x=o.recommendedCompletion,D=o.isJsxInitializer,S=o.insideJsDocTagTypeExpression,T=o.symbolToSortTextMap;if(m&&m.parent&&e.isJsxClosingElement(m.parent)){var E=m.parent.parent.openingElement.tagName,C=!!e.findChildOfKind(m.parent,31,t);return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,entries:[{name:E.getFullText(t)+(C?"":">"),kind:"class",kindModifiers:void 0,sortText:r.LocationPriority}]}}var N=[];if(c(t,i)){var F=h(l,N,m,t,n,i.target,a,_,s,g,D,x,b,T);!function(t,n,i,a,o){e.getNameTable(t).forEach((function(t,s){if(t!==n){var c=e.unescapeLeadingUnderscores(s);e.addToSeen(i,c)&&e.isIdentifierText(c,a)&&o.push({name:c,kind:"warning",kindModifiers:"",sortText:r.JavascriptIdentifiers})}}))}(t,m.pos,F,i.target,N)}else{if(!(f||l&&0!==l.length||0!==y))return;h(l,N,m,t,n,i.target,a,_,s,g,D,x,b,T)}if(0!==y)for(var P=e.arrayToSet(N,(function(e){return e.name})),w=0,I=function(t,r){if(!r)return A(t);var n=t+7+1;return k[n]||(k[n]=A(t).filter((function(t){return!function(e){switch(e){case 121:case 124:case 150:case 127:case 129:case 87:case 149:case 112:case 131:case 113:case 132:case 133:case 134:case 135:case 136:case 139:case 140:case 116:case 117:case 118:case 137:case 142:case 143:case 144:case 146:case 147:return!0;default:return!1}}(e.stringToToken(t.name))})))}(y,!S&&e.isSourceFileJS(t));w<I.length;w++){var O=I[w];P.has(O.name)||N.push(O)}for(var M=0,L=v;M<L.length;M++){var R=L[M];N.push(d(R))}return{isGlobalCompletion:p,isMemberCompletion:u(_),isNewIdentifierLocation:f,entries:N}}(o,f,m,a,v,_);case 1:return s(e.JsDoc.getJSDocTagNameCompletions());case 2:return s(e.JsDoc.getJSDocTagCompletions());case 3:return s(e.JsDoc.getJSDocParameterNameCompletions(v.tag));default:return e.Debug.assertNever(v)}}};var l,_=function(t){return"object"===f(t)?e.pseudoBigIntToString(t)+"n":JSON.stringify(t)};function d(e){return{name:_(e),kind:"string",kindModifiers:"",sortText:r.LocationPriority}}function p(t,r,n,i,a,s,c,u,l,_,d,p){var f,h,v=u&&function(e){return!!(16&e.kind)}(u),b=u&&function(e){return!!(2&e.kind)}(u)||c;if(u&&function(e){return!!(1&e.kind)}(u))f=c?"this"+(v?"?.":"")+"["+e.quote(s,p)+"]":"this"+(v?"?.":".")+s;else if((b||v)&&_){f=b?c?"["+e.quote(s,p)+"]":"["+s+"]":s,(v||_.questionDotToken)&&(f="?."+f);var x=e.findChildOfKind(_,24,i)||e.findChildOfKind(_,28,i);if(!x)return;var D=e.startsWith(s,_.name.text)?_.name.end:x.end;h=e.createTextSpanFromBounds(x.getStart(i),D)}if(d&&(void 0===f&&(f=s),f="{"+f+"}","boolean"!=typeof d&&(h=e.createTextSpanFromNode(d,i))),u&&function(e){return!!(8&e.kind)}(u)&&_){void 0===f&&(f=s);var S="(await "+_.expression.getText()+")";f=c?""+S+f:S+(v?"?.":".")+f,h=e.createTextSpanFromBounds(_.getStart(i),_.end)}if(void 0===f||p.includeCompletionsWithInsertText)return{name:s,kind:e.SymbolDisplay.getSymbolKind(a,t,n),kindModifiers:e.SymbolDisplay.getSymbolModifiers(t),sortText:r,source:y(u),hasAction:g(!!u&&o(u)),isRecommended:g(m(t,l,a)),insertText:f,replacementSpan:h}}function m(e,t,r){return e===t||!!(1048576&e.flags)&&r.getExportSymbolOfSymbol(e)===t}function g(e){return!!e||void 0}function y(t){return t&&o(t)?e.stripQuotes(t.moduleSymbol.name):void 0}function h(t,n,i,a,o,s,c,u,l,_,d,f,m,g){for(var y=e.timestamp(),h=e.createMap(),v=0,b=t;v<b.length;v++){var x=b[v],D=m?m[e.getSymbolId(x)]:void 0,S=C(x,s,D,u);if(S){var T=S.name,E=S.needsConvertPropertyAccess;if(!h.has(T)){var k=p(x,g&&g[e.getSymbolId(x)]||r.LocationPriority,i,a,o,T,E,D,f,_,d,l);k&&(D||void 0===x.parent&&!e.some(x.declarations,(function(e){return e.getSourceFile()===i.getSourceFile()}))||h.set(T,!0),n.push(k))}}}return c("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(e.timestamp()-y)),h}function v(t,r,n,i,a,o){var s=t.getCompilerOptions(),u=E(t,r,n,c(n,s),i,{includeCompletionsForModuleExports:!0,includeCompletionsWithInsertText:!0},a,o);if(!u)return{type:"none"};if(0!==u.kind)return{type:"request",request:u};var l=u.symbols,d=u.literals,p=u.location,f=u.completionKind,m=u.symbolToOriginInfoMap,g=u.previousToken,h=u.isJsxInitializer,v=e.find(d,(function(e){return _(e)===a.name}));return void 0!==v?{type:"literal",literal:v}:e.firstDefined(l,(function(t){var r=m[e.getSymbolId(t)],n=C(t,s.target,r,f);return n&&n.name===a.name&&y(r)===a.source?{type:"symbol",symbol:t,location:p,symbolToOriginInfoMap:m,previousToken:g,isJsxInitializer:h}:void 0}))||{type:"none"}}function b(t,r,n){return r&&o(r)&&(r.isDefaultExport&&"default"===t.escapedName||"export="===t.escapedName)?e.firstDefined(t.declarations,(function(t){return e.isExportAssignment(t)&&e.isIdentifier(t.expression)?t.expression.text:void 0}))||e.codefix.moduleSymbolToValidIdentifier(r.moduleSymbol,n):t.name}function x(t,r,n){return S(t,"",r,[e.displayPart(t,n)])}function D(t,r,n,i,a,o,s){var c=r.runWithCancellationToken(a,(function(r){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(r,t,n,i,i,7)})),u=c.displayParts,l=c.documentation,_=c.symbolKind,d=c.tags;return S(t.name,e.SymbolDisplay.getSymbolModifiers(t),_,u,l,d,o,s)}function S(e,t,r,n,i,a,o,s){return{name:e,kindModifiers:t,kind:r,displayParts:n,documentation:i,tags:a,codeActions:o,source:s}}function T(t,r,n){var i=n.getAccessibleSymbolChain(t,r,67108863,!1);return i?e.first(i):t.parent&&(function(e){return e.declarations.some((function(e){return 288===e.kind}))}(t.parent)?t:T(t.parent,r,n))}function E(t,n,i,a,o,s,c,u){var l=t.getTypeChecker(),_=e.timestamp(),d=e.getTokenAtPosition(i,o);n("getCompletionData: Get current token: "+(e.timestamp()-_)),_=e.timestamp();var p=e.isInComment(i,o,d);n("getCompletionData: Is inside comment: "+(e.timestamp()-_));var f=!1,m=!1;if(p){if(e.hasDocComment(i,o)){if(64===i.text.charCodeAt(o-1))return{kind:1};var g=e.getLineStartPositionForPosition(o,i);if(!i.text.substring(g,o).match(/[^\*|\s|(/\*\*)]/))return{kind:2}}var y=function(t,r){var n=e.findAncestor(t,e.isJSDoc);return n&&n.tags&&(e.rangeContainsPosition(n,r)?e.findLast(n.tags,(function(e){return e.pos<r})):void 0)}(d,o);if(y){if(y.tagName.pos<=o&&o<=y.tagName.end)return{kind:1};if(function(e){switch(e.kind){case 310:case 316:case 311:case 313:case 315:return!0;default:return!1}}(y)&&y.typeExpression&&292===y.typeExpression.kind&&((d=e.getTokenAtPosition(i,o))&&(e.isDeclarationName(d)||316===d.parent.kind&&d.parent.name===d)||(f=ue(y.typeExpression))),e.isJSDocParameterTag(y)&&(e.nodeIsMissing(y.name)||y.name.pos<=o&&o<=y.name.end))return{kind:3,tag:y}}if(!f)return void n("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}_=e.timestamp();var h=e.findPrecedingToken(o,i,void 0);n("getCompletionData: Get previous token 1: "+(e.timestamp()-_));var v=h;if(v&&o<=v.end&&(e.isIdentifier(v)||e.isKeyword(v.kind))){var x=e.timestamp();v=e.findPrecedingToken(v.getFullStart(),i,void 0),n("getCompletionData: Get previous token 2: "+(e.timestamp()-x))}var D,S=d,E=!1,C=!1,k=!1,N=!1,A=!1,w=e.getTouchingPropertyName(i,o);if(v){if(function(t){var r=e.timestamp(),i=function(t){return(e.isRegularExpressionLiteral(t)||e.isStringTextContainingNode(t))&&(e.rangeContainsPositionExclusive(e.createTextRangeFromSpan(e.createTextSpanFromNode(t)),o)||o===t.end&&(!!t.isUnterminated||e.isRegularExpressionLiteral(t)))}(t)||function(t){var r=t.parent,n=r.kind;switch(t.kind){case 27:return 241===n||242===n||224===n||247===n||ae(n)||245===n||189===n||246===n||e.isClassLike(r)&&!!r.typeParameters&&r.typeParameters.end>=t.pos;case 24:return 189===n;case 58:return 190===n;case 22:return 189===n;case 20:return 278===n||ae(n);case 18:return 247===n;case 29:return 244===n||213===n||245===n||246===n||e.isFunctionLikeKind(n);case 119:return 158===n&&!e.isClassLike(r.parent);case 25:return 155===n||!!r.parent&&189===r.parent.kind;case 118:case 116:case 117:return 155===n&&!e.isConstructorDeclaration(r.parent);case 122:return 257===n||261===n||255===n;case 130:case 141:return!L(t);case 79:case 87:case 113:case 93:case 108:case 95:case 114:case 80:case 120:case 144:return!0;case 41:return e.isFunctionLike(t.parent)&&!e.isMethodDeclaration(t.parent)}if(P(I(t))&&L(t))return!1;if(ie(t)&&(!e.isIdentifier(t)||e.isParameterPropertyModifier(I(t))||ue(t)))return!1;switch(I(t)){case 121:case 79:case 80:case 129:case 87:case 93:case 113:case 114:case 116:case 117:case 118:case 119:case 108:case 120:return!0;case 125:return e.isPropertyDeclaration(t.parent)}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==h||o>h.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(11===e.kind)return!0;if(31===e.kind&&e.parent){if(266===e.parent.kind)return!0;if(267===e.parent.kind||265===e.parent.kind)return!!e.parent.parent&&264===e.parent.parent.kind}return!1}(t);return n("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-r)),i}(v))return void n("Returning an empty list because completion was requested in an invalid position.");var B=v.parent;if(24===v.kind||28===v.kind)switch(E=24===v.kind,C=28===v.kind,B.kind){case 193:if((S=(D=B).expression).end===v.pos&&e.isCallExpression(S)&&S.getChildCount(i)&&21!==e.last(S.getChildren(i)).kind)return;break;case 152:S=B.left;break;case 248:S=B.name;break;case 187:case 218:S=B;break;default:return}else if(1===i.languageVariant){if(B&&193===B.kind&&(v=B,B=B.parent),d.parent===w)switch(d.kind){case 31:264!==d.parent.kind&&266!==d.parent.kind||(w=d);break;case 43:265===d.parent.kind&&(w=d)}switch(B.kind){case 267:43===v.kind&&(N=!0,w=v);break;case 208:if(!R(B))break;case 265:case 264:case 266:29===v.kind&&(k=!0,w=v);break;case 271:switch(h.kind){case 62:A=!0;break;case 75:B!==h.parent&&!B.initializer&&e.findChildOfKind(B,62,i)&&(A=h)}}}}var j=e.timestamp(),K=5,J=!1,z=0,U=[],V=[],q=[],W=u.getImportSuggestionsCache&&u.getImportSuggestionsCache();if(E||C)!function(){K=2;var t=e.isLiteralImportTypeNode(S),r=f||t&&!S.isTypeOf||e.isPartOfTypeNode(S.parent)||e.isPossiblyTypeArgumentPosition(v,i,l),n=e.isInRightSideOfInternalImportEqualsDeclaration(S);if(e.isEntityName(S)||t){var a=e.isModuleDeclaration(S.parent);a&&(J=!0);var o=l.getSymbolAtLocation(S);if(o&&1920&(o=e.skipAlias(o,l)).flags){for(var c=e.Debug.assertEachDefined(l.getExportsOfModule(o),"getExportsOfModule() should all be defined"),u=function(e){return l.isValidPropertyAccess(t?S:S.parent,e.name)},_=function(e){return ne(e)},d=a?function(e){return!!(1920&e.flags)&&!e.declarations.every((function(e){return e.parent===S.parent}))}:n?function(e){return _(e)||u(e)}:r?_:u,p=0,m=c;p<m.length;p++){var g=m[p];d(g)&&U.push(g)}if(!r&&o.declarations&&o.declarations.some((function(e){return 288!==e.kind&&248!==e.kind&&247!==e.kind}))){var y=l.getTypeOfSymbolAtLocation(o,S).getNonOptionalType(),h=!1;if(y.isNullableType())((x=E&&!C&&!1!==s.includeAutomaticOptionalChainCompletions)||C)&&(y=y.getNonNullableType(),x&&(h=!0));Z(y,!!(32768&S.flags),h)}return}}if(e.isMetaProperty(S)&&(98===S.keywordToken||95===S.keywordToken)){var b=98===S.keywordToken?"target":"meta";return void U.push(l.createSymbol(4,e.escapeLeadingUnderscores(b)))}if(!r){var x;y=l.getTypeAtLocation(S).getNonOptionalType(),h=!1;if(y.isNullableType())((x=E&&!C&&!1!==s.includeAutomaticOptionalChainCompletions)||C)&&(y=y.getNonNullableType(),x&&(h=!0));Z(y,!!(32768&S.flags),h)}}();else if(k){var G=e.Debug.assertEachDefined(l.getJsxIntrinsicTagNamesAt(w),"getJsxIntrinsicTagNames() should all be defined");te(),U=G.concat(U),K=3,z=0}else if(N){var H=v.parent.parent.openingElement.tagName,Y=l.getSymbolAtLocation(H);Y&&(U=[Y]),K=3,z=0}else if(!te())return;n("getCompletionData: Semantic work: "+(e.timestamp()-j));var X=h&&function(t,r,n,i){var a=t.parent;switch(t.kind){case 75:return e.getContextualTypeFromParent(t,i);case 62:switch(a.kind){case 241:return i.getContextualType(a.initializer);case 208:return i.getTypeAtLocation(a.left);case 271:return i.getContextualTypeForJsxAttribute(a);default:return}case 98:return i.getContextualType(a);case 77:return e.getSwitchedType(e.cast(a,e.isCaseClause),i);case 18:return e.isJsxExpression(a)&&264!==a.parent.kind?i.getContextualTypeForJsxAttribute(a.parent):void 0;default:var o=e.SignatureHelp.getArgumentInfoForCompletions(t,r,n);return o?i.getContextualTypeForArgumentAtIndex(o.invocation,o.argumentIndex+(27===t.kind?1:0)):e.isEqualityOperatorKind(t.kind)&&e.isBinaryExpression(a)&&e.isEqualityOperatorKind(a.operatorToken.kind)?i.getTypeAtLocation(a.left):i.getContextualType(t)}}(h,o,i,l),Q=e.mapDefined(X&&(X.isUnion()?X.types:[X]),(function(e){return e.isLiteral()?e.value:void 0})),$=h&&X&&function(t,r,n){return e.firstDefined(r&&(r.isUnion()?r.types:[r]),(function(r){var i=r&&r.symbol;return i&&424&i.flags&&!e.isAbstractConstructorSymbol(i)?T(i,t,n):void 0}))}(h,X,l);return{kind:0,symbols:U,completionKind:K,isInSnippetScope:m,propertyAccessToConvert:D,isNewIdentifierLocation:J,location:w,keywordFilters:z,literals:Q,symbolToOriginInfoMap:V,recommendedCompletion:$,previousToken:h,isJsxInitializer:A,insideJsDocTagTypeExpression:f,symbolToSortTextMap:q};function Z(t,r,n){J=!!t.getStringIndexType(),C&&e.some(t.getCallSignatures())&&(J=!0);var i=187===S.kind?S:S.parent;if(a)U.push.apply(U,M(t,l));else for(var o=0,c=t.getApparentProperties();o<c.length;o++){var u=c[o];l.isValidPropertyAccessForCompletions(i,t,u)&&ee(u,!1,n)}if(r&&s.includeCompletionsWithInsertText){var _=l.getPromisedTypeOfPromise(t);if(_)for(var d=0,p=_.getApparentProperties();d<p.length;d++){u=p[d];l.isValidPropertyAccessForCompletions(i,_,u)&&ee(u,!0,n)}}}function ee(t,r,n){var i=e.firstDefined(t.declarations,(function(t){return e.tryCast(e.getNameOfDeclaration(t),e.isComputedPropertyName)}));if(i){var a=function t(r){return e.isIdentifier(r)?r:e.isPropertyAccessExpression(r)?t(r.expression):void 0}(i.expression),o=a&&l.getSymbolAtLocation(a),c=o&&T(o,v,l);if(c&&!V[e.getSymbolId(c)]){U.push(c);var u=c.parent;V[e.getSymbolId(c)]=u&&e.isExternalModuleSymbol(u)?{kind:d(6),moduleSymbol:u,isDefaultExport:!1}:{kind:d(2)}}else s.includeCompletionsWithInsertText&&(_(t),U.push(t))}else _(t),U.push(t);function _(t){s.includeCompletionsWithInsertText&&(r&&!V[e.getSymbolId(t)]?V[e.getSymbolId(t)]={kind:d(8)}:n&&(V[e.getSymbolId(t)]={kind:16}))}function d(e){return n?16|e:e}}function te(){var a,_;return 1===(function(){var t,r,n=function(t){if(t){var r=t.parent;switch(t.kind){case 18:case 27:if(e.isObjectLiteralExpression(r)||e.isObjectBindingPattern(r))return r;break;case 41:return e.isMethodDeclaration(r)?e.tryCast(r.parent,e.isObjectLiteralExpression):void 0;case 75:return"async"===t.text&&e.isShorthandPropertyAssignment(t.parent)?t.parent.parent:void 0}}return}(v);if(!n)return 0;if(K=0,192===n.kind){if(!(o=l.getContextualType(n,4)))return 2;J=e.hasIndexSignature(o),t=O(o,n,l),r=n.properties}else{e.Debug.assert(188===n.kind),J=!1;var i=e.getRootDeclaration(n.parent);if(!e.isVariableLike(i))return e.Debug.fail("Root declaration is not variable-like.");var a=e.hasInitializer(i)||e.hasType(i)||231===i.parent.parent.kind;if(a||155!==i.kind||(e.isExpression(i.parent)?a=!!l.getContextualType(i.parent):160!==i.parent.kind&&163!==i.parent.kind||(a=e.isExpression(i.parent.parent)&&!!l.getContextualType(i.parent.parent))),a){var o;if(!(o=l.getTypeAtLocation(n)))return 2;t=l.getPropertiesOfType(o).filter((function(t){return!(24&e.getDeclarationModifierFlagsFromSymbol(t))})),r=n.elements}}t&&t.length>0&&(U=function(t,r){if(0===r.length)return t;for(var n=e.createMap(),i=e.createUnderscoreEscapedMap(),a=0,o=r;a<o.length;a++){var s=o[a];if((279===s.kind||280===s.kind||190===s.kind||160===s.kind||162===s.kind||163===s.kind||281===s.kind)&&!ue(s)){var c=void 0;if(e.isSpreadAssignment(s))oe(s,n);else if(e.isBindingElement(s)&&s.propertyName)75===s.propertyName.kind&&(c=s.propertyName.escapedText);else{var u=e.getNameOfDeclaration(s);c=u&&e.isPropertyNameLiteral(u)?e.getEscapedTextOfIdentifierOrLiteral(u):void 0}i.set(c,!0)}}var l=t.filter((function(e){return!i.get(e.escapedName)}));return ce(n,l),l}(t,e.Debug.assertDefined(r)));return se(),1}()||function(){var t=!v||18!==v.kind&&27!==v.kind?void 0:e.tryCast(v.parent,e.isNamedImportsOrExports);if(!t)return 0;var r=(256===t.kind?t.parent.parent:t.parent).moduleSpecifier,n=l.getSymbolAtLocation(r);if(!n)return 2;K=3,J=!1;var i=l.getExportsAndPropertiesOfModule(n),a=e.arrayToSet(t.elements,(function(e){return ue(e)?void 0:(e.propertyName||e.name).escapedText}));return U=i.filter((function(e){return"default"!==e.escapedName&&!a.get(e.escapedName)})),1}()||(function(t){if(t){var r=t.parent;switch(t.kind){case 20:case 27:return e.isConstructorDeclaration(t.parent)?t.parent:void 0;default:if(ie(t))return r.parent}}}(v)?(K=5,J=!0,z=4,1):0)||function(){var t=function(t,r,n,i){switch(n.kind){case 317:return e.tryCast(n.parent,e.isObjectTypeDeclaration);case 1:var a=e.tryCast(e.lastOrUndefined(e.cast(n.parent,e.isSourceFile).statements),e.isObjectTypeDeclaration);if(a&&!e.findChildOfKind(a,19,t))return a;break;case 75:if(L(n))return e.findAncestor(n,e.isObjectTypeDeclaration)}if(!r)return;switch(r.kind){case 26:case 19:return L(n)&&n.parent.name===n?n.parent.parent:e.tryCast(n,e.isObjectTypeDeclaration);case 18:case 27:return e.tryCast(r.parent,e.isObjectTypeDeclaration);default:if(!L(r))return e.getLineAndCharacterOfPosition(t,r.getEnd()).line!==e.getLineAndCharacterOfPosition(t,i).line&&e.isObjectTypeDeclaration(n)?n:void 0;var o=e.isClassLike(r.parent.parent)?P:F;return o(r.kind)||41===r.kind||e.isIdentifier(r)&&o(e.stringToToken(r.text))?r.parent.parent:void 0}}(i,v,w,o);if(!t)return 0;if(K=3,J=!0,z=41===v.kind?0:e.isClassLike(t)?2:3,!e.isClassLike(t))return 1;var r=26===v.kind?v.parent.parent:v.parent,n=e.isClassElement(r)?e.getModifierFlags(r):0;if(75===v.kind&&!ue(v))switch(v.getText()){case"private":n|=8;break;case"static":n|=32}if(!(8&n)){var a=e.flatMap(e.getAllSuperTypeNodes(t),(function(e){var r=l.getTypeAtLocation(e);return r&&l.getPropertiesOfType(32&n?l.getTypeOfSymbolAtLocation(r.symbol,t):r)}));U=function(t,r,n){for(var i=e.createUnderscoreEscapedMap(),a=0,o=r;a<o.length;a++){var s=o[a];if((158===s.kind||160===s.kind||162===s.kind||163===s.kind)&&(!ue(s)&&!e.hasModifier(s,8)&&e.hasModifier(s,32)===!!(32&n))){var c=e.getPropertyNameForPropertyNameNode(s.name);c&&i.set(c,!0)}}return t.filter((function(t){return!(i.has(t.escapedName)||!t.declarations||8&e.getDeclarationModifierFlagsFromSymbol(t))}))}(a,t.members,n)}return 1}()||(a=function(t){if(t){var r=t.parent;switch(t.kind){case 31:case 30:case 43:case 75:case 193:case 272:case 271:case 273:if(r&&(265===r.kind||266===r.kind)){if(31===t.kind){var n=e.findPrecedingToken(t.pos,i,void 0);if(!r.typeArguments||n&&43===n.kind)break}return r}if(271===r.kind)return r.parent.parent;break;case 10:if(r&&(271===r.kind||273===r.kind))return r.parent.parent;break;case 19:if(r&&274===r.kind&&r.parent&&271===r.parent.kind)return r.parent.parent.parent;if(r&&273===r.kind)return r.parent.parent}}}(v),(_=a&&l.getContextualType(a.attributes))?(U=function(t,r){for(var n=e.createUnderscoreEscapedMap(),i=e.createMap(),a=0,o=r;a<o.length;a++){var s=o[a];ue(s)||(271===s.kind?n.set(s.name.escapedText,!0):e.isJsxSpreadAttribute(s)&&oe(s,i))}var c=t.filter((function(e){return!n.get(e.escapedName)}));return ce(i,c),c}(O(_,a.attributes,l),a.attributes.properties),se(),K=3,J=!1,1):0)||(function(){z=function(t){if(t){var r,n=e.findAncestor(t.parent,(function(t){return e.isClassLike(t)?"quit":!(!e.isFunctionLikeDeclaration(t)||r!==t.body)||(r=t,!1)}));return n&&n}}(v)?5:1,K=1,J=function(e){if(e){var t=e.parent.kind;switch(I(e)){case 27:return 195===t||161===t||196===t||191===t||208===t||169===t;case 20:return 195===t||161===t||196===t||199===t||181===t;case 22:return 191===t||166===t||153===t;case 134:case 135:return!0;case 24:return 248===t;case 18:return 244===t;case 62:return 241===t||208===t;case 15:return 210===t;case 16:return 220===t;case 118:case 116:case 117:return 158===t}}return!1}(v),h!==v&&e.Debug.assert(!!h,"Expected 'contextToken' to be defined when different from 'previousToken'.");var a=h!==v?h.getStart():o,_=function(t,r,n){var i=t;for(;i&&!e.positionBelongsToNode(i,r,n);)i=i.parent;return i}(v,a,i)||i;m=function(t){switch(t.kind){case 288:case 210:case 274:case 222:return!0;default:return e.isStatement(t)}}(_);var d=2887656|(re()?0:111551);U=e.Debug.assertEachDefined(l.getSymbolsInScope(_,d),"getSymbolsInScope() should all be defined");for(var p=0,f=U;p<f.length;p++){var g=f[p];l.isArgumentsSymbol(g)||e.some(g.declarations,(function(e){return e.getSourceFile()===i}))||(q[e.getSymbolId(g)]=r.GlobalsOrKeywords)}if(s.includeCompletionsWithInsertText&&288!==_.kind){var y=l.tryGetThisTypeAt(_,!1);if(y)for(var x=0,D=M(y,l);x<D.length;x++){g=D[x];V[e.getSymbolId(g)]={kind:1},U.push(g),q[e.getSymbolId(g)]=r.SuggestedClassMembers}}if(s.includeCompletionsForModuleExports&&(i.externalModuleIndicator||!i.commonJsModuleIndicator&&(e.compilerOptionsIndicateEs6Modules(t.getCompilerOptions())||e.programContainsEs6Modules(t)))){var S=h&&e.isIdentifier(h)?h.text.toLowerCase():"",T=function(r,a){var o=W&&W.get(i.fileName,l,c&&a.getProjectVersion?a.getProjectVersion():void 0);if(o)return n("getSymbolsFromOtherSourceFileExports: Using cached list"),o;var s=e.timestamp();n("getSymbolsFromOtherSourceFileExports: Recomputing list"+(c?" for details entry":""));var u=e.createMap(),_=e.createMap(),d=e.createMap(),p=[],f=e.createMap();return e.codefix.forEachExternalModuleToImportFrom(t,a,i,!c,(function(t){if(!c||!c.source||e.stripQuotes(t.name)===c.source){var r=l.resolveExternalModuleSymbol(t);if(e.addToSeen(u,e.getSymbolId(r))){r!==t&&e.every(r.declarations,(function(t){return!!t.getSourceFile().externalModuleIndicator&&!e.findAncestor(t,e.isGlobalScopeAugmentation)}))&&m(r,t,!0);for(var n=0,i=l.getExportsOfModule(t);n<i.length;n++){var a=i[n];if(!e.some(a.declarations,(function(t){return e.isExportSpecifier(t)&&!!t.propertyName&&e.isIdentifierANonContextualKeyword(t.name)}))){var o=e.getSymbolId(a).toString(),s=l.getMergedSymbol(a.parent)!==r;if(s||e.some(a.declarations,(function(t){return e.isExportSpecifier(t)&&!t.propertyName&&!!t.parent.parent.moduleSpecifier}))){var p=s?a:function(e,t,r){var n=t;for(;2097152&n.flags&&(n=e.getImmediateAliasedSymbol(n));)if(r(n))return n}(l,a,(function(t){return e.some(t.declarations,(function(t){return e.isExportSpecifier(t)||!!t.localSymbol}))}));if(!p)continue;var g=e.getSymbolId(p).toString();f.has(g)||_.has(g)?e.addToSeen(_,o):(d.set(g,{alias:a,moduleSymbol:t}),_.set(o,!0))}else d.delete(o),m(a,t)}}}}})),d.forEach((function(e){return m(e.alias,e.moduleSymbol)})),n("getSymbolsFromOtherSourceFileExports: "+(e.timestamp()-s)),p;function m(t,n,i){void 0===i&&(i=!1);var a="default"===t.escapedName;a&&(t=e.getLocalSymbolForExportDefault(t)||t),e.addToSeen(f,e.getSymbolId(t));var o={kind:4,moduleSymbol:n,isDefaultExport:a};p.push({symbol:t,symbolName:b(t,o,r),origin:o,skipFilter:i})}}(t.getCompilerOptions().target,u);!c&&W&&W.set(i.fileName,T,u.getProjectVersion&&u.getProjectVersion()),T.forEach((function(t){var n=t.symbol,i=t.symbolName,a=t.skipFilter,o=t.origin;if(c){if(c.source&&e.stripQuotes(o.moduleSymbol.name)!==c.source)return}else if(!a&&!function(e,t){if(0===t.length)return!0;for(var r=0,n=0;n<e.length;n++)if(e.charCodeAt(n)===t.charCodeAt(r)&&++r===t.length)return!0;return!1}(i.toLowerCase(),S))return;var s=e.getSymbolId(n);U.push(n),V[s]=o,q[s]=r.AutoImportSuggestions}))}!function(t){var r=re();r&&(z=e.isAssertionExpression(v.parent)?6:7);e.filterMutate(t,(function(t){if(!e.isSourceFile(w)){if(e.isExportAssignment(w.parent))return!0;if(t=e.skipAlias(t,l),e.isInRightSideOfInternalImportEqualsDeclaration(w))return!!(1920&t.flags);if(r)return ne(t)}return!!(111551&e.getCombinedLocalAndExportSymbolFlags(t))}))}(U)}(),1))}function re(){return f||!function(t){return t&&107===t.kind&&(171===t.parent.kind||e.isTypeOfExpression(t.parent))}(v)&&(e.isPossiblyTypeArgumentPosition(v,i,l)||e.isPartOfTypeNode(w)||function(t){if(t){var r=t.parent.kind;switch(t.kind){case 58:return 158===r||157===r||155===r||241===r||e.isFunctionLikeKind(r);case 62:return 246===r;case 122:return 216===r;case 29:return 168===r||198===r;case 89:return 154===r}}return!1}(v))}function ne(t,r){void 0===r&&(r=e.createMap());var n=e.skipAlias(t.exportSymbol||t,l);return!!(788968&n.flags)||!!(1536&n.flags)&&e.addToSeen(r,e.getSymbolId(n))&&l.getExportsOfModule(n).some((function(e){return ne(e,r)}))}function ie(t){return!!t.parent&&e.isParameter(t.parent)&&e.isConstructorDeclaration(t.parent.parent)&&(e.isParameterPropertyModifier(t.kind)||e.isDeclarationName(t))}function ae(t){return e.isFunctionLikeKind(t)&&161!==t}function oe(e,t){var r=e.expression,n=l.getSymbolAtLocation(r),i=n&&l.getTypeOfSymbolAtLocation(n,r),a=i&&i.properties;a&&a.forEach((function(e){t.set(e.name,!0)}))}function se(){U.forEach((function(t){16777216&t.flags&&(q[e.getSymbolId(t)]=q[e.getSymbolId(t)]||r.OptionalMember)}))}function ce(t,n){if(0!==t.size)for(var i=0,a=n;i<a.length;i++){var o=a[i];t.has(o.name)&&(q[e.getSymbolId(o)]=r.MemberDeclaredBySpreadAssignment)}}function ue(e){return e.getStart(i)<=o&&o<=e.getEnd()}}function C(t,r,n,i){var a=b(t,n,r);if(!(void 0===a||1536&t.flags&&e.isSingleOrDoubleQuote(a.charCodeAt(0))||e.isKnownSymbol(t))){var o={name:a,needsConvertPropertyAccess:!1};if(e.isIdentifierText(a,r))return o;switch(i){case 3:return;case 0:return{name:JSON.stringify(a),needsConvertPropertyAccess:!1};case 2:case 1:return 32===a.charCodeAt(0)?void 0:{name:a,needsConvertPropertyAccess:!0};case 5:case 4:return o;default:e.Debug.assertNever(i)}}}t.getCompletionEntriesFromSymbols=h,t.getCompletionEntryDetails=function(r,n,i,a,s,c,u,l,d){var p=r.getTypeChecker(),f=r.getCompilerOptions(),m=s.name,g=e.findPrecedingToken(a,i);if(e.isInString(i,a,g))return t.StringCompletions.getStringLiteralCompletionDetails(m,i,a,g,p,f,c,d);var y=v(r,n,i,a,s,c);switch(y.type){case"request":var h=y.request;switch(h.kind){case 1:return e.JsDoc.getJSDocTagNameCompletionDetails(m);case 2:return e.JsDoc.getJSDocTagCompletionDetails(m);case 3:return e.JsDoc.getJSDocParameterNameCompletionDetails(m);default:return e.Debug.assertNever(h)}case"symbol":var S=y.symbol,T=y.location,E=function(t,r,n,i,a,s,c,u,l,_,d){var p=t[e.getSymbolId(r)];if(!p||!o(p))return{codeActions:void 0,sourceDisplay:void 0};var f=p.moduleSymbol,m=i.getMergedSymbol(e.skipAlias(r.exportSymbol||r,i)),g=e.codefix.getImportCompletionAction(m,f,c,b(r,p,s.target),a,n,_,l&&e.isIdentifier(l)?l.getStart(c):u,d),y=g.moduleSpecifier,h=g.codeAction;return{sourceDisplay:[e.textPart(y)],codeActions:[h]}}(y.symbolToOriginInfoMap,S,r,p,c,f,i,a,y.previousToken,u,l);return D(S,p,i,T,d,E.codeActions,E.sourceDisplay);case"literal":var C=y.literal;return x(_(C),"string","string"==typeof C?e.SymbolDisplayPartKind.stringLiteral:e.SymbolDisplayPartKind.numericLiteral);case"none":return N().some((function(e){return e.name===m}))?x(m,"keyword",e.SymbolDisplayPartKind.keyword):void 0;default:e.Debug.assertNever(y)}},t.createCompletionDetailsForSymbol=D,t.createCompletionDetails=S,t.getCompletionEntrySymbol=function(e,t,r,n,i,a){var o=v(e,t,r,n,i,a);return"symbol"===o.type?o.symbol:void 0},function(e){e[e.Data=0]="Data",e[e.JsDocTagName=1]="JsDocTagName",e[e.JsDocTag=2]="JsDocTag",e[e.JsDocParameterName=3]="JsDocParameterName"}(l||(l={})),function(e){e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None"}(t.CompletionKind||(t.CompletionKind={}));var k=[],N=e.memoize((function(){for(var t=[],n=76;n<=151;n++)t.push({name:e.tokenToString(n),kind:"keyword",kindModifiers:"",sortText:r.GlobalsOrKeywords});return t}));function A(t){return k[t]||(k[t]=N().filter((function(r){var n=e.stringToToken(r.name);switch(t){case 0:return!1;case 1:return w(n)||129===n||134===n||144===n||135===n||e.isTypeKeyword(n)&&145!==n;case 5:return w(n);case 2:return P(n);case 3:return F(n);case 4:return e.isParameterPropertyModifier(n);case 6:return e.isTypeKeyword(n)||80===n;case 7:return e.isTypeKeyword(n);default:return e.Debug.assertNever(t)}})))}function F(e){return 137===e}function P(t){switch(t){case 121:case 128:case 130:case 141:case 125:return!0;default:return e.isClassMemberModifier(t)}}function w(t){return 125===t||126===t||!e.isContextualKeyword(t)&&!P(t)}function I(t){return e.isIdentifier(t)?t.originalKeywordKind||0:t.kind}function O(t,r,n){return t.isUnion()?n.getAllPossiblePropertiesOfTypes(t.types.filter((function(t){return!(131068&t.flags||n.isArrayLikeType(t)||e.typeHasCallOrConstructSignatures(t,n)||n.isTypeInvalidDueToUnionDiscriminant(t,r))}))):t.getApparentProperties()}function M(t,r){return t.isUnion()?e.Debug.assertEachDefined(r.getAllPossiblePropertiesOfTypes(t.types),"getAllPossiblePropertiesOfTypes() should all be defined"):e.Debug.assertEachDefined(t.getApparentProperties(),"getApparentProperties() should all be defined")}function L(t){return t.parent&&e.isClassOrTypeElement(t.parent)&&e.isObjectTypeDeclaration(t.parent.parent)}function R(t){var r=t.left;return e.nodeIsMissing(r)}}(e.Completions||(e.Completions={}))}(s||(s={})),function(e){!function(r){function n(t,r){return{fileName:r.fileName,textSpan:e.createTextSpanFromNode(t,r),kind:"none"}}function i(t){return e.isThrowStatement(t)?[t]:e.isTryStatement(t)?e.concatenate(t.catchClause?i(t.catchClause):t.tryBlock&&i(t.tryBlock),t.finallyBlock&&i(t.finallyBlock)):e.isFunctionLike(t)?void 0:o(t,i)}function a(t){return e.isBreakOrContinueStatement(t)?[t]:e.isFunctionLike(t)?void 0:o(t,a)}function o(t,r){var n=[];return t.forEachChild((function(t){var i=r(t);void 0!==i&&n.push.apply(n,e.toArray(i))})),n}function s(e,t){var r=c(t);return!!r&&r===e}function c(t){return e.findAncestor(t,(function(r){switch(r.kind){case 236:if(232===t.kind)return!1;case 229:case 230:case 231:case 228:case 227:return!t.label||function(t,r){return!!e.findAncestor(t.parent,(function(t){return e.isLabeledStatement(t)?t.label.escapedText===r:"quit"}))}(r,t.label.escapedText);default:return e.isFunctionLike(r)&&"quit"}}))}function u(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return!(!r||!e.contains(n,r.kind))&&(t.push(r),!0)}function l(t){var r=[];if(u(r,t.getFirstToken(),92,110,85)&&227===t.kind)for(var n=t.getChildren(),i=n.length-1;i>=0&&!u(r,n[i],110);i--);return e.forEach(a(t.statement),(function(e){s(t,e)&&u(r,e.getFirstToken(),76,81)})),r}function _(e){var t=c(e);if(t)switch(t.kind){case 229:case 230:case 231:case 227:case 228:return l(t);case 236:return d(t)}}function d(t){var r=[];return u(r,t.getFirstToken(),102),e.forEach(t.caseBlock.clauses,(function(n){u(r,n.getFirstToken(),77,83),e.forEach(a(n),(function(e){s(t,e)&&u(r,e.getFirstToken(),76)}))})),r}function p(t,r){var n=[];(u(n,t.getFirstToken(),106),t.catchClause&&u(n,t.catchClause.getFirstToken(),78),t.finallyBlock)&&u(n,e.findChildOfKind(t,91,r),91);return n}function f(t,r){var n=function(t){for(var r=t;r.parent;){var n=r.parent;if(e.isFunctionBlock(n)||288===n.kind)return n;if(e.isTryStatement(n)&&n.tryBlock===r&&n.catchClause)return r;r=n}}(t);if(n){var a=[];return e.forEach(i(n),(function(t){a.push(e.findChildOfKind(t,104,r))})),e.isFunctionBlock(n)&&e.forEachReturnStatement(n,(function(t){a.push(e.findChildOfKind(t,100,r))})),a}}function m(t,r){var n=e.getContainingFunction(t);if(n){var a=[];return e.forEachReturnStatement(e.cast(n.body,e.isBlock),(function(t){a.push(e.findChildOfKind(t,100,r))})),e.forEach(i(n.body),(function(t){a.push(e.findChildOfKind(t,104,r))})),a}}function g(t){var r=e.getContainingFunction(t);if(r){var n=[];return r.modifiers&&r.modifiers.forEach((function(e){u(n,e,125)})),e.forEachChild(r,(function(t){y(t,(function(t){e.isAwaitExpression(t)&&u(n,t.getFirstToken(),126)}))})),n}}function y(t,r){r(t),e.isFunctionLike(t)||e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isModuleDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isTypeNode(t)||e.forEachChild(t,(function(e){return y(e,r)}))}r.getDocumentHighlights=function(r,i,a,o,s){var c=e.getTouchingPropertyName(a,o);if(c.parent&&(e.isJsxOpeningElement(c.parent)&&c.parent.tagName===c||e.isJsxClosingElement(c.parent))){var h=c.parent.parent,v=[h.openingElement,h.closingElement].map((function(e){return n(e.tagName,a)}));return[{fileName:a.fileName,highlightSpans:v}]}return function(t,r,n,i,a){var o=e.arrayToSet(a,(function(e){return e.fileName})),s=e.FindAllReferences.getReferenceEntriesForNode(t,r,n,a,i,void 0,o);if(!s)return;var c=e.arrayToMultiMap(s.map(e.FindAllReferences.toHighlightSpan),(function(e){return e.fileName}),(function(e){return e.span}));return e.arrayFrom(c.entries(),(function(t){var r=t[0],i=t[1];if(!o.has(r)){e.Debug.assert(n.redirectTargetsMap.has(r));var s=n.getSourceFile(r);r=e.find(a,(function(e){return!!e.redirectInfo&&e.redirectInfo.redirectTarget===s})).fileName,e.Debug.assert(o.has(r))}return{fileName:r,highlightSpans:i}}))}(o,c,r,i,s)||function(r,i){var a=function(r,i){switch(r.kind){case 94:case 86:return e.isIfStatement(r.parent)?function(t,r){for(var i=function(t,r){var n=[];for(;e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(r);u(n,i[0],94);for(var a=i.length-1;a>=0&&!u(n,i[a],86);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return n}(t,r),a=[],o=0;o<i.length;o++){if(86===i[o].kind&&o<i.length-1){for(var s=i[o],c=i[o+1],l=!0,_=c.getStart(r)-1;_>=s.end;_--)if(!e.isWhiteSpaceSingleLine(r.text.charCodeAt(_))){l=!1;break}if(l){a.push({fileName:r.fileName,textSpan:e.createTextSpanFromBounds(s.getStart(),c.end),kind:"reference"}),o++;continue}}a.push(n(i[o],r))}return a}(r.parent,i):void 0;case 100:return c(r.parent,e.isReturnStatement,m);case 104:return c(r.parent,e.isThrowStatement,f);case 106:case 78:case 91:return c(78===r.kind?r.parent.parent:r.parent,e.isTryStatement,p);case 102:return c(r.parent,e.isSwitchStatement,d);case 77:case 83:return c(r.parent.parent.parent,e.isSwitchStatement,d);case 76:case 81:return c(r.parent,e.isBreakOrContinueStatement,_);case 92:case 110:case 85:return c(r.parent,(function(t){return e.isIterationStatement(t,!0)}),l);case 128:return s(e.isConstructorDeclaration,[128]);case 130:case 141:return s(e.isAccessor,[130,141]);case 126:return c(r.parent,e.isAwaitExpression,g);case 125:return h(g(r));case 120:return h(function(t){var r=e.getContainingFunction(t);if(!r)return;var n=[];return e.forEachChild(r,(function(t){y(t,(function(t){e.isYieldExpression(t)&&u(n,t.getFirstToken(),120)}))})),n}(r));default:return e.isModifierKind(r.kind)&&(e.isDeclaration(r.parent)||e.isVariableStatement(r.parent))?h((a=r.kind,o=r.parent,e.mapDefined(function(r,n){var i=r.parent;switch(i.kind){case 249:case 288:case 222:case 275:case 276:return 128&n&&e.isClassDeclaration(r)?t(r.members,[r]):i.statements;case 161:case 160:case 243:return t(i.parameters,e.isClassLike(i.parent)?i.parent.members:[]);case 244:case 213:case 245:case 172:var a=i.members;if(92&n){var o=e.find(i.members,e.isConstructorDeclaration);if(o)return t(a,o.parameters)}else if(128&n)return t(a,[i]);return a;default:e.Debug.assertNever(i,"Invalid container kind.")}}(o,e.modifierToFlag(a)),(function(t){return e.findModifier(t,a)})))):void 0}var a,o;function s(t,n){return c(r.parent,t,(function(r){return e.mapDefined(r.symbol.declarations,(function(r){return t(r)?e.find(r.getChildren(i),(function(t){return e.contains(n,t.kind)})):void 0}))}))}function c(e,t,r){return t(e)?h(r(e,i)):void 0}function h(e){return e&&e.map((function(e){return n(e,i)}))}}(r,i);return a&&[{fileName:i.fileName,highlightSpans:a}]}(c,a)}}(e.DocumentHighlights||(e.DocumentHighlights={}))}(s||(s={})),function(e){function t(t,n,i){void 0===n&&(n="");var a=e.createMap(),o=e.createGetCanonicalFileName(!!t);function s(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!0,o)}function c(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!1,o)}function u(t,r,n,o,s,c,u,l){var _=e.getOrUpdate(a,o,e.createMap),d=_.get(r),p=6===l?100:n.target||1;!d&&i&&((f=i.getDocument(o,r))&&(e.Debug.assert(u),d={sourceFile:f,languageServiceRefCount:0},_.set(r,d)));if(d)d.sourceFile.version!==c&&(d.sourceFile=e.updateLanguageServiceSourceFile(d.sourceFile,s,c,s.getChangeRange(d.sourceFile.scriptSnapshot)),i&&i.setDocument(o,r,d.sourceFile)),u&&d.languageServiceRefCount++;else{var f=e.createLanguageServiceSourceFile(t,s,p,c,!1,l);i&&i.setDocument(o,r,f),d={sourceFile:f,languageServiceRefCount:1},_.set(r,d)}return e.Debug.assert(0!==d.languageServiceRefCount),d.sourceFile}function l(t,r){var n=e.Debug.assertDefined(a.get(r)),i=n.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&n.delete(t)}return{acquireDocument:function(t,i,a,c,u){return s(t,e.toPath(t,n,o),i,r(i),a,c,u)},acquireDocumentWithKey:s,updateDocument:function(t,i,a,s,u){return c(t,e.toPath(t,n,o),i,r(i),a,s,u)},updateDocumentWithKey:c,releaseDocument:function(t,i){return l(e.toPath(t,n,o),r(i))},releaseDocumentWithKey:l,getLanguageServiceRefCounts:function(t){return e.arrayFrom(a.entries(),(function(e){var r=e[0],n=e[1].get(t);return[r,n&&n.languageServiceRefCount]}))},reportStats:function(){var t=e.arrayFrom(a.keys()).filter((function(e){return e&&"_"===e.charAt(0)})).map((function(e){var t=a.get(e),r=[];return t.forEach((function(e,t){r.push({name:t,refCount:e.languageServiceRefCount})})),r.sort((function(e,t){return t.refCount-e.refCount})),{bucket:e,sourceFiles:r}}));return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:r}}function r(t){return e.sourceFileAffectingCompilerOptions.map((function(r){return e.getCompilerOptionValue(t,r)})).join("|")}e.createDocumentRegistry=function(e,r){return t(e,r)},e.createDocumentRegistryInternal=t}(s||(s={})),function(e){!function(t){function n(t,r){return e.forEach(288===t.kind?t.statements:t.body.statements,(function(t){return r(t)||c(t)&&e.forEach(t.body&&t.body.statements,r)}))}function i(t,r){if(t.externalModuleIndicator||void 0!==t.imports)for(var i=0,a=t.imports;i<a.length;i++){var o=a[i];r(e.importFromModuleSpecifier(o),o)}else n(t,(function(t){switch(t.kind){case 259:case 253:(n=t).moduleSpecifier&&e.isStringLiteral(n.moduleSpecifier)&&r(n,n.moduleSpecifier);break;case 252:var n;u(n=t)&&r(n,n.moduleReference.expression)}}))}function a(t,r,n){var i=t.parent;if(i){var a=n.getMergedSymbol(i);return e.isExternalModuleSymbol(a)?{exportingModuleSymbol:a,exportKind:r}:void 0}}function o(e,t){return t.getMergedSymbol(s(e).symbol)}function s(t){if(195===t.kind)return t.getSourceFile();var r=t.parent;return 288===r.kind?r:(e.Debug.assert(249===r.kind),e.cast(r.parent,c))}function c(e){return 248===e.kind&&10===e.name.kind}function u(e){return 263===e.moduleReference.kind&&10===e.moduleReference.expression.kind}t.createImportTracker=function(t,a,c,l){var _=function(t,r,n){for(var a=e.createMap(),o=0,s=t;o<s.length;o++){var c=s[o];n&&n.throwIfCancellationRequested(),i(c,(function(t,n){var i=r.getSymbolAtLocation(n);if(i){var o=e.getSymbolId(i).toString(),s=a.get(o);s||a.set(o,s=[]),s.push(t)}}))}return a}(t,c,l);return function(i,d,p){var f=function(t,r,i,a,c,u){var l=a.exportingModuleSymbol,_=a.exportKind,d=e.nodeSeenTracker(),p=e.nodeSeenTracker(),f=[],m=!!l.globalExports,g=m?void 0:[];return function t(r){var n=v(r);if(n)for(var i=0,a=n;i<a.length;i++){var l=a[i];if(d(l))switch(u&&u.throwIfCancellationRequested(),l.kind){case 195:if(!m){var p=l.parent;if(2===_&&241===p.kind){var g=p.name;if(75===g.kind){f.push(g);break}}h(l.getSourceFile())}break;case 75:break;case 252:y(l,l.name,e.hasModifier(l,1),!1);break;case 253:f.push(l);var b=l.importClause&&l.importClause.namedBindings;b&&255===b.kind?y(l,b.name,!1,!0):!m&&e.isDefaultImport(l)&&h(s(l));break;case 259:l.exportClause?f.push(l):t(o(l,c));break;case 187:f.push(l);break;default:e.Debug.failBadSyntaxKind(l,"Unexpected import kind.")}}}(l),{directImports:f,indirectUsers:function(){if(m)return t;for(var n=0,i=l.declarations;n<i.length;n++){var a=i[n];e.isExternalModuleAugmentation(a)&&r.has(a.getSourceFile().fileName)&&h(a)}return g.map(e.getSourceFileOfNode)}()};function y(t,r,i,a){if(2===_)a||f.push(t);else if(!m){var o=s(t);e.Debug.assert(288===o.kind||248===o.kind),i||function(t,r,i){var a=i.getSymbolAtLocation(r);return!!n(t,(function(t){if(e.isExportDeclaration(t)){var r=t.exportClause;return!t.moduleSpecifier&&r&&r.elements.some((function(e){return i.getExportSpecifierLocalTargetSymbol(e)===a}))}}))}(o,r,c)?function t(r){if(!h(r))return;var n=c.getMergedSymbol(r.symbol);e.Debug.assert(!!(1536&n.flags));var i=v(n);if(i)for(var a=0,o=i;a<o.length;a++){var u=o[a];t(s(u))}}(o):h(o)}}function h(t){e.Debug.assert(!m);var r=p(t);return r&&g.push(t),r}function v(t){return i.get(e.getSymbolId(t).toString())}}(t,a,_,d,c,l),m=f.directImports,g=f.indirectUsers;return r({indirectUsers:g},function(t,r,n,i,a){var o=[],s=[];function c(e,t){o.push([e,t])}if(t)for(var l=0,_=t;l<_.length;l++){d(_[l])}return{importSearches:o,singleReferences:s};function d(t){if(252!==t.kind)if(75!==t.kind)if(187!==t.kind){if(10===t.moduleSpecifier.kind)if(259!==t.kind){var o=t.importClause||{name:void 0,namedBindings:void 0},l=o.name,_=o.namedBindings;if(_)switch(_.kind){case 255:p(_.name);break;case 256:0!==n&&1!==n||f(_);break;default:e.Debug.assertNever(_)}if(l&&(1===n||2===n)&&(!a||l.escapedText===e.symbolEscapedNameNoDefault(r)))c(l,i.getSymbolAtLocation(l))}else f(t.exportClause)}else t.qualifier?e.isIdentifier(t.qualifier)&&t.qualifier.escapedText===e.symbolName(r)&&s.push(t.qualifier):2===n&&s.push(t.argument.literal);else p(t);else u(t)&&p(t.name)}function p(e){2!==n||a&&!m(e.escapedText)||c(e,i.getSymbolAtLocation(e))}function f(e){if(e)for(var t=0,n=e.elements;t<n.length;t++){var o=n[t],u=o.name,l=o.propertyName;if(m((l||u).escapedText))if(l)s.push(l),a&&u.escapedText!==r.escapedName||c(u,i.getSymbolAtLocation(u));else c(u,261===o.kind&&o.propertyName?i.getExportSpecifierLocalTargetSymbol(o):i.getSymbolAtLocation(u))}}function m(e){return e===r.escapedName||0!==n&&"default"===e}}(m,i,d.exportKind,c,p))}},function(e){e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals"}(t.ExportKind||(t.ExportKind={})),function(e){e[e.Import=0]="Import",e[e.Export=1]="Export"}(t.ImportExport||(t.ImportExport={})),t.findModuleReferences=function(e,t,r){for(var n=[],a=e.getTypeChecker(),o=0,s=t;o<s.length;o++){var c=s[o],u=r.valueDeclaration;if(288===u.kind){for(var l=0,_=c.referencedFiles;l<_.length;l++){var d=_[l];e.getSourceFileFromReference(c,d)===u&&n.push({kind:"reference",referencingFile:c,ref:d})}for(var p=0,f=c.typeReferenceDirectives;p<f.length;p++){d=f[p];var m=e.getResolvedTypeReferenceDirectives().get(d.fileName);void 0!==m&&m.resolvedFileName===u.fileName&&n.push({kind:"reference",referencingFile:c,ref:d})}}i(c,(function(e,t){a.getSymbolAtLocation(t)===r&&n.push({kind:"import",literal:t})}))}return n},t.getImportOrExportSymbol=function(t,r,n,i){return i?o():o()||function(){if(!function(t){var r=t.parent;switch(r.kind){case 252:return r.name===t&&u(r);case 257:return!r.propertyName;case 254:case 255:return e.Debug.assert(r.name===t),!0;default:return!1}}(t))return;var i=n.getImmediateAliasedSymbol(r);if(!i)return;"export="===(i=function(t,r){if(t.declarations)for(var n=0,i=t.declarations;n<i.length;n++){var a=i[n];if(e.isExportSpecifier(a)&&!a.propertyName&&!a.parent.parent.moduleSpecifier)return r.getExportSpecifierLocalTargetSymbol(a)}return t}(i,n)).escapedName&&(i=function(t,r){if(2097152&t.flags)return e.Debug.assertDefined(r.getImmediateAliasedSymbol(t));var n=t.valueDeclaration;if(e.isExportAssignment(n))return e.Debug.assertDefined(n.expression.symbol);if(e.isBinaryExpression(n))return e.Debug.assertDefined(n.right.symbol);if(e.isSourceFile(n))return e.Debug.assertDefined(n.symbol);return e.Debug.fail()}(i,n));var a=e.symbolEscapedNameNoDefault(i);if(void 0===a||"default"===a||a===r.escapedName)return{kind:0,symbol:i}}();function o(){var a=t.parent,o=a.parent;if(r.exportSymbol)return 193===a.kind?r.declarations.some((function(e){return e===a}))&&e.isBinaryExpression(o)?_(o,!1):void 0:s(r.exportSymbol,c(a));var u=function(t,r){var n=e.isVariableDeclaration(t)?t:e.isBindingElement(t)?e.walkUpBindingElementsAndPatterns(t):void 0;return n?t.name!==r?void 0:e.isCatchClause(n.parent)?void 0:e.isVariableStatement(n.parent.parent)?n.parent.parent:void 0:t}(a,t);if(u&&e.hasModifier(u,1)){if(e.isImportEqualsDeclaration(u)&&u.moduleReference===t){if(i)return;return{kind:0,symbol:n.getSymbolAtLocation(u.name)}}return s(r,c(u))}if(e.isExportAssignment(a))return l(a);if(e.isExportAssignment(o))return l(o);if(e.isBinaryExpression(a))return _(a,!0);if(e.isBinaryExpression(o))return _(o,!0);if(e.isJSDocTypedefTag(a))return s(r,0);function l(t){var n=e.Debug.assertDefined(t.symbol.parent,"Expected export symbol to have a parent"),i=t.isExportEquals?2:1;return{kind:1,symbol:r,exportInfo:{exportingModuleSymbol:n,exportKind:i}}}function _(t,i){var a;switch(e.getAssignmentDeclarationKind(t)){case 1:a=0;break;case 2:a=2;break;default:return}var o=i?n.getSymbolAtLocation(e.cast(t.left,e.isPropertyAccessExpression).name):r;return!o||1536&n.getMergedSymbol(o.parent).flags||e.Debug.fail("Special property assignment kind does not have a module as its parent. Assignment is "+e.Debug.formatSymbol(o)+", parent is "+e.Debug.formatSymbol(o.parent)),o&&s(o,a)}}function s(e,t){var r=a(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function c(t){return e.hasModifier(t,512)?1:0}},t.getExportInfo=a}(e.FindAllReferences||(e.FindAllReferences={}))}(s||(s={})),function(e){!function(t){function n(e,t){return void 0===t&&(t=1),{kind:t,node:e.name||e,context:a(e)}}function i(e){return e&&void 0===e.kind}function a(t){if(e.isDeclaration(t))return o(t);if(t.parent){if(!e.isDeclaration(t.parent)&&!e.isExportAssignment(t.parent)){if(e.isInJSFile(t)){var r=e.isBinaryExpression(t.parent)?t.parent:e.isAccessExpression(t.parent)&&e.isBinaryExpression(t.parent.parent)&&t.parent.parent.left===t.parent?t.parent.parent:void 0;if(r&&0!==e.getAssignmentDeclarationKind(r))return o(r)}if(e.isJsxOpeningElement(t.parent)||e.isJsxClosingElement(t.parent))return t.parent.parent;if(e.isJsxSelfClosingElement(t.parent)||e.isLabeledStatement(t.parent)||e.isBreakOrContinueStatement(t.parent))return t.parent;if(e.isStringLiteralLike(t)){var n=e.tryGetImportFromModuleSpecifier(t);if(n){var i=e.findAncestor(n,(function(t){return e.isDeclaration(t)||e.isStatement(t)||e.isJSDocTag(t)}));return e.isDeclaration(i)?o(i):i}}var a=e.findAncestor(t,e.isComputedPropertyName);return a?o(a.parent):void 0}return t.parent.name===t||e.isConstructorDeclaration(t.parent)||e.isExportAssignment(t.parent)||(e.isImportOrExportSpecifier(t.parent)||e.isBindingElement(t.parent))&&t.parent.propertyName===t||83===t.kind&&e.hasModifier(t.parent,513)?o(t.parent):void 0}}function o(t){if(t)switch(t.kind){case 241:return e.isVariableDeclarationList(t.parent)&&1===t.parent.declarations.length?e.isVariableStatement(t.parent.parent)?t.parent.parent:e.isForInOrOfStatement(t.parent.parent)?o(t.parent.parent):t.parent:t;case 190:return o(t.parent.parent);case 257:return t.parent.parent.parent;case 261:case 255:return t.parent.parent;case 254:return t.parent;case 208:return e.isExpressionStatement(t.parent)?t.parent:t;case 231:case 230:return{start:t.initializer,end:t.expression};case 279:case 280:return e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)?o(e.findAncestor(t.parent,(function(t){return e.isBinaryExpression(t)||e.isForInOrOfStatement(t)}))):t;default:return t}}function s(e,t,r){if(r){var n=i(r)?p(r.start,t,r.end):p(r,t);return n.start!==e.start||n.length!==e.length?{contextSpan:n}:void 0}}function c(r,n,i,a,o,s,c){return void 0===s&&(s={}),void 0===c&&(c=e.arrayToSet(a,(function(e){return e.fileName}))),u(t.Core.getReferencedSymbolsForNode(r,n,i,a,o,s,c))}function u(t){return t&&e.flatMap(t,(function(e){return e.references}))}function l(r,n,i){var a=t.Core.getIntersectingMeaningFromDeclarations(i,r),o=r.declarations&&e.firstOrUndefined(r.declarations)||i,s=e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(n,r,o.getSourceFile(),o,o,a);return{displayParts:s.displayParts,kind:s.symbolKind}}function _(t){var n=d(t);if(0===t.kind)return r(r({},n),{isWriteAccess:!1,isDefinition:!1});var i=t.kind,a=t.node;return r(r({},n),{isWriteAccess:f(a),isDefinition:83===a.kind||!!e.getDeclarationFromName(a)||e.isLiteralComputedPropertyDeclarationName(a),isInString:2===i||void 0})}function d(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};var t=e.node.getSourceFile(),n=p(e.node,t);return r({textSpan:n,fileName:t.fileName},s(n,t,e.context))}function p(t,r,n){var i=t.getStart(r),a=(n||t).getEnd();return e.isStringLiteralLike(t)&&(e.Debug.assert(void 0===n),i+=1,a-=1),e.createTextSpanFromBounds(i,a)}function f(t){var r=e.getDeclarationFromName(t);return!!r&&function(t){if(8388608&t.flags)return!0;switch(t.kind){case 208:case 190:case 244:case 213:case 83:case 247:case 282:case 261:case 254:case 252:case 257:case 245:case 308:case 315:case 271:case 248:case 251:case 255:case 155:case 280:case 246:case 154:return!0;case 279:return!e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent);case 243:case 200:case 161:case 160:case 162:case 163:return!!t.body;case 241:case 158:return!!t.initializer||e.isCatchClause(t.parent);case 159:case 157:case 316:case 310:return!1;default:return e.Debug.failBadSyntaxKind(t)}}(r)||83===t.kind||e.isWriteAccess(t)}!function(e){e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String"}(t.DefinitionKind||(t.DefinitionKind={})),function(e){e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal"}(t.EntryKind||(t.EntryKind={})),t.nodeEntry=n,t.isContextWithStartAndEndNode=i,t.getContextNode=o,t.toContextSpan=s,t.findReferencedSymbols=function(n,i,a,c,u){var d=e.getTouchingPropertyName(c,u),f=t.Core.getReferencedSymbolsForNode(u,d,n,a,i),m=n.getTypeChecker();return f&&f.length?e.mapDefined(f,(function(t){var n=t.definition,a=t.references;return n&&{definition:m.runWithCancellationToken(i,(function(t){return function(t,n,i){var a=function(){switch(t.type){case 0:var r=l(f=t.symbol,n,i),a=r.displayParts,s=r.kind,c=a.map((function(e){return e.text})).join(""),u=f.declarations?e.first(f.declarations):void 0;return{node:u?e.getNameOfDeclaration(u)||u:i,name:c,kind:s,displayParts:a,context:o(u)};case 1:var _=t.node;return{node:_,name:_.text,kind:"label",displayParts:[e.displayPart(_.text,e.SymbolDisplayPartKind.text)]};case 2:var d=t.node,p=e.tokenToString(d.kind);return{node:d,name:p,kind:"keyword",displayParts:[{text:p,kind:"keyword"}]};case 3:var f,m=t.node,g=(f=n.getSymbolAtLocation(m))&&e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(n,f,m.getSourceFile(),e.getContainerNode(m),m).displayParts||[e.textPart("this")];return{node:m,name:"this",kind:"var",displayParts:g};case 4:var y=t.node;return{node:y,name:y.text,kind:"var",displayParts:[e.displayPart(e.getTextOfNode(y),e.SymbolDisplayPartKind.stringLiteral)]};default:return e.Debug.assertNever(t)}}(),c=a.node,u=a.name,_=a.kind,d=a.displayParts,f=a.context,m=c.getSourceFile(),g=p(e.isComputedPropertyName(c)?c.expression:c,m);return r({containerKind:"",containerName:"",fileName:m.fileName,kind:_,name:u,textSpan:g,displayParts:d},s(g,m,f))}(n,t,d)})),references:a.map(_)}})):void 0},t.getImplementationsAtPosition=function(i,a,o,s,u){var _=function(r,i,a,o,s){if(288===o.kind)return;var u=r.getTypeChecker();if(280===o.parent.kind){var l=[];return t.Core.getReferenceEntriesForShorthandPropertyAssignment(o,u,(function(e){return l.push(n(e))})),l}if(101===o.kind||e.isSuperProperty(o.parent)){var _=u.getSymbolAtLocation(o);return _.valueDeclaration&&[n(_.valueDeclaration)]}return c(s,o,r,a,i,{implementations:!0})}(i,a,o,e.getTouchingPropertyName(s,u),u),p=i.getTypeChecker();return e.map(_,(function(t){return function(t,n){var i=d(t);if(0!==t.kind){var a=t.node;return r(r({},i),function(t,r){var n=r.getSymbolAtLocation(e.isDeclaration(t)&&t.name?t.name:t);return n?l(n,r,t):192===t.kind?{kind:"interface",displayParts:[e.punctuationPart(20),e.textPart("object literal"),e.punctuationPart(21)]}:213===t.kind?{kind:"local class",displayParts:[e.punctuationPart(20),e.textPart("anonymous local class"),e.punctuationPart(21)]}:{kind:e.getNodeKind(t),displayParts:[]}}(a,n))}return r(r({},i),{kind:"",displayParts:[]})}(t,p)}))},t.findReferenceOrRenameEntries=function(r,n,i,a,o,s,c){return e.map(u(t.Core.getReferencedSymbolsForNode(o,a,r,i,n,s)),(function(e){return c(e,a,r.getTypeChecker())}))},t.getReferenceEntriesForNode=c,t.toRenameLocation=function(t,n,i,a){return r(r({},d(t)),a&&function(t,r,n){if(0!==t.kind&&e.isIdentifier(r)){var i=t.node,a=t.kind,o=r.text,s=e.isShorthandPropertyAssignment(i.parent);if(s||e.isObjectBindingElementWithoutPropertyName(i.parent)){var c={prefixText:o+": "},u={suffixText:": "+o};return 3===a?c:4===a?u:s?u:c}if(e.isImportSpecifier(t.node.parent)&&!t.node.parent.propertyName){var l=e.isExportSpecifier(r.parent)?n.getExportSpecifierLocalTargetSymbol(r.parent):n.getSymbolAtLocation(r);return e.contains(l.declarations,t.node.parent)?{prefixText:o+" as "}:e.emptyOptions}if(e.isExportSpecifier(t.node.parent)&&!t.node.parent.propertyName)return r===t.node?{prefixText:o+" as "}:{suffixText:" as "+o}}return e.emptyOptions}(t,n,i))},t.toReferenceEntry=_,t.toHighlightSpan=function(e){var t=d(e);if(0===e.kind)return{fileName:t.fileName,span:{textSpan:t.textSpan,kind:"reference"}};var n=f(e.node),i=r({textSpan:t.textSpan,kind:n?"writtenReference":"reference",isInString:2===e.kind||void 0},t.contextSpan&&{contextSpan:t.contextSpan});return{fileName:t.fileName,span:i}},t.getTextSpanOfEntry=function(e){return 0===e.kind?e.textSpan:p(e.node,e.node.getSourceFile())}}(e.FindAllReferences||(e.FindAllReferences={}))}(s||(s={})),function(e){!function(t){!function(r){function n(t,r,n){if(t.parent&&e.isNamespaceExportDeclaration(t.parent)){var i=n.getAliasedSymbol(r),a=n.getMergedSymbol(i);if(i!==a)return a}}function i(t,r,n,i,o,c){var l=1536&t.flags?e.find(t.declarations,e.isSourceFile):void 0;if(l){var _=t.exports.get("export="),d=s(r,t,!!_,n,c);if(!_||!c.has(l.fileName))return d;var p=r.getTypeChecker();return a(r,d,u(t=e.skipAlias(_,p),void 0,n,c,p,i,o))}}function a(r){for(var n,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];for(var s=0,c=i;s<c.length;s++){var u=c[s];if(u&&u.length)if(n)for(var l=function(i){if(!i.definition||0!==i.definition.type)return n.push(i),"continue";var a=i.definition.symbol,s=e.findIndex(n,(function(e){return!!e.definition&&0===e.definition.type&&e.definition.symbol===a}));if(-1===s)return n.push(i),"continue";var c=n[s];n[s]={definition:c.definition,references:c.references.concat(i.references).sort((function(n,i){var a=o(r,n),s=o(r,i);if(a!==s)return e.compareValues(a,s);var c=t.getTextSpanOfEntry(n),u=t.getTextSpanOfEntry(i);return c.start!==u.start?e.compareValues(c.start,u.start):e.compareValues(c.length,u.length)}))}},_=0,d=u;_<d.length;_++){l(d[_])}else n=u}return n}function o(e,t){var r=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(r)}function s(r,n,i,a,o){e.Debug.assert(!!n.valueDeclaration);for(var s=e.mapDefined(t.findModuleReferences(r,a,n),(function(r){if("import"===r.kind){var n=r.literal.parent;if(e.isLiteralTypeNode(n)){var a=e.cast(n.parent,e.isImportTypeNode);if(i&&!a.qualifier)return}return t.nodeEntry(r.literal)}return{kind:0,fileName:r.referencingFile.fileName,textSpan:e.createTextSpanFromRange(r.ref)}})),c=0,u=n.declarations;c<u.length;c++){switch((p=u[c]).kind){case 288:break;case 248:o.has(p.getSourceFile().fileName)&&s.push(t.nodeEntry(p.name));break;default:e.Debug.assert(!!(33554432&n.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}}var l=n.exports.get("export=");if(l)for(var _=0,d=l.declarations;_<d.length;_++){var p,f=(p=d[_]).getSourceFile();if(o.has(f.fileName)){var m=e.isBinaryExpression(p)&&e.isPropertyAccessExpression(p.left)?p.left.expression:e.isExportAssignment(p)?e.Debug.assertDefined(e.findChildOfKind(p,88,f)):e.getNameOfDeclaration(p)||p;s.push(t.nodeEntry(m))}}return s.length?[{definition:{type:0,symbol:n},references:s}]:e.emptyArray}function c(t){return 137===t.kind&&e.isTypeOperatorNode(t.parent)&&137===t.parent.operator}function u(t,r,n,i,a,o,s){var c=r&&function(t,r,n,i){var a=r.parent;if(e.isExportSpecifier(a)&&i)return C(r,t,a,n);return e.firstDefined(t.declarations,(function(i){if(!i.parent){if(33554432&t.flags)return;e.Debug.fail("Unexpected symbol at "+e.Debug.formatSyntaxKind(r.kind)+": "+e.Debug.formatSymbol(t))}return e.isTypeLiteralNode(i.parent)&&e.isUnionTypeNode(i.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(i.parent.parent),t.name):void 0}))}(t,r,a,!M(s))||t,u=r?w(r,c):7,_=[],f=new d(n,i,r?function(t){switch(t.kind){case 128:return 1;case 75:if(e.isClassLike(t.parent))return e.Debug.assert(t.parent.name===t),2;default:return 0}}(r):0,a,o,u,s,_),m=M(s)?e.find(c.declarations,e.isExportSpecifier):void 0;if(m)E(m.name,c,m,f.createSearch(r,t,void 0),f,!0,!0);else if(r&&83===r.kind)k(r,c,f),p(r,c,{exportingModuleSymbol:e.Debug.assertDefined(c.parent,"Expected export symbol to have a parent"),exportKind:1},f);else{var g=f.createSearch(r,c,void 0,{allSearchSymbols:r?F(c,r,a,!!s.isForRename,!!s.providePrefixAndSuffixTextForRename,!!s.implementations):[c]});l(c,f,g)}return _}function l(t,r,n){var i=function(t){var r=t.declarations,n=t.flags,i=t.parent,a=t.valueDeclaration;if(a&&(200===a.kind||213===a.kind))return a;if(!r)return;if(8196&n){var o=e.find(r,(function(t){return e.hasModifier(t,8)}));return o?e.getAncestor(o,244):void 0}if(r.some(e.isObjectBindingElementWithoutPropertyName))return;var s,c=i&&!(262144&t.flags);if(c&&(!e.isExternalModuleSymbol(i)||i.globalExports))return;for(var u=0,l=r;u<l.length;u++){var _=l[u],d=e.getContainerNode(_);if(s&&s!==d)return;if(!d||288===d.kind&&!e.isExternalOrCommonJsModule(d))return;s=d}return c?s.getSourceFile():s}(t);if(i)D(i,i.getSourceFile(),n,r,!(e.isSourceFile(i)&&!e.contains(r.sourceFiles,i)));else for(var a=0,o=r.sourceFiles;a<o.length;a++){var s=o[a];r.cancellationToken.throwIfCancellationRequested(),g(s,n,r)}}var _;r.getReferencedSymbolsForNode=function(r,o,l,_,d,p,f){if(void 0===p&&(p={}),void 0===f&&(f=e.arrayToSet(_,(function(e){return e.fileName}))),e.isSourceFile(o)){var m=e.GoToDefinition.getReferenceAtPosition(o,r,l),g=m&&l.getTypeChecker().getMergedSymbol(m.file.symbol);return g&&s(l,g,!1,_,f)}if(!p.implementations){var y=function(r,n,i){if(e.isTypeKeyword(r.kind)){if(137===r.kind&&!c(r))return;return function(r,n,i,a){var o=e.flatMap(r,(function(r){return i.throwIfCancellationRequested(),e.mapDefined(h(r,e.tokenToString(n),r),(function(e){if(e.kind===n&&(!a||a(e)))return t.nodeEntry(e)}))}));return o.length?[{definition:{type:2,node:o[0].node},references:o}]:void 0}(n,r.kind,i,137===r.kind?c:void 0)}if(e.isJumpStatementTarget(r)){var a=e.getTargetLabel(r.parent,r.text);return a&&b(a.parent,a)}if(e.isLabelOfLabeledStatement(r))return b(r.parent,r);if(e.isThis(r))return function(r,n,i){var a=e.getThisContainer(r,!1),o=32;switch(a.kind){case 160:case 159:if(e.isObjectLiteralMethod(a))break;case 158:case 157:case 161:case 162:case 163:o&=e.getModifierFlags(a),a=a.parent;break;case 288:if(e.isExternalModule(a)||A(r))return;case 243:case 200:break;default:return}var s=e.flatMap(288===a.kind?n:[a.getSourceFile()],(function(t){return i.throwIfCancellationRequested(),h(t,"this",e.isSourceFile(a)?t:a).filter((function(t){if(!e.isThis(t))return!1;var r=e.getThisContainer(t,!1);switch(a.kind){case 200:case 243:return a.symbol===r.symbol;case 160:case 159:return e.isObjectLiteralMethod(a)&&a.symbol===r.symbol;case 213:case 244:return r.parent&&a.symbol===r.parent.symbol&&(32&e.getModifierFlags(r))===o;case 288:return 288===r.kind&&!e.isExternalModule(r)&&!A(t)}}))})).map((function(e){return t.nodeEntry(e)}));return[{definition:{type:3,node:e.firstDefined(s,(function(t){return e.isParameter(t.node.parent)?t.node:void 0}))||r},references:s}]}(r,n,i);if(101===r.kind)return function(r){var n=e.getSuperContainer(r,!1);if(!n)return;var i=32;switch(n.kind){case 158:case 157:case 160:case 159:case 161:case 162:case 163:i&=e.getModifierFlags(n),n=n.parent;break;default:return}var a=n.getSourceFile(),o=e.mapDefined(h(a,"super",n),(function(r){if(101===r.kind){var a=e.getSuperContainer(r,!1);return a&&(32&e.getModifierFlags(a))===i&&a.parent.symbol===n.symbol?t.nodeEntry(r):void 0}}));return[{definition:{type:0,symbol:n.symbol},references:o}]}(r);return}(o,_,d);if(y)return y}var v=l.getTypeChecker(),x=v.getSymbolAtLocation(o);if(!x)return!p.implementations&&e.isStringLiteral(o)?function(r,n,i){var a=e.flatMap(n,(function(n){return i.throwIfCancellationRequested(),e.mapDefined(h(n,r.text),(function(n){return e.isStringLiteral(n)&&n.text===r.text?t.nodeEntry(n,2):void 0}))}));return[{definition:{type:4,node:r},references:a}]}(o,_,d):void 0;if("export="===x.escapedName)return s(l,x.parent,!1,_,f);var D=i(x,l,_,d,p,f);if(D&&!(33554432&x.flags))return D;var S=n(o,x,v),T=S&&i(S,l,_,d,p,f);return a(l,D,u(x,o,_,f,v,d,p),T)},function(e){e[e.None=0]="None",e[e.Constructor=1]="Constructor",e[e.Class=2]="Class"}(_||(_={}));var d=function(){function r(t,r,n,i,a,o,s,c){this.sourceFiles=t,this.sourceFilesSet=r,this.specialSearchKind=n,this.checker=i,this.cancellationToken=a,this.searchMeaning=o,this.options=s,this.result=c,this.inheritsFromCache=e.createMap(),this.markSeenContainingTypeReference=e.nodeSeenTracker(),this.markSeenReExportRHS=e.nodeSeenTracker(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}return r.prototype.includesSourceFile=function(e){return this.sourceFilesSet.has(e.fileName)},r.prototype.getImportSearches=function(e,r){return this.importTracker||(this.importTracker=t.createImportTracker(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,r,!!this.options.isForRename)},r.prototype.createSearch=function(t,r,n,i){void 0===i&&(i={});var a=i.text,o=void 0===a?e.stripQuotes(e.unescapeLeadingUnderscores((e.getLocalSymbolForExportDefault(r)||function(t){if(33555968&t.flags){var r=t.declarations&&e.find(t.declarations,(function(t){return!e.isSourceFile(t)&&!e.isModuleDeclaration(t)}));return r&&r.symbol}}(r)||r).escapedName)):a,s=i.allSearchSymbols,c=void 0===s?[r]:s;return{symbol:r,comingFrom:n,text:o,escapedText:e.escapeLeadingUnderscores(o),parents:this.options.implementations&&t?function(t,r,n){var i=e.isRightSideOfPropertyAccess(t)?t.parent:void 0,a=i&&n.getTypeAtLocation(i.expression),o=e.mapDefined(a&&(a.isUnionOrIntersection()?a.types:a.symbol===r.parent?void 0:[a]),(function(e){return e.symbol&&96&e.symbol.flags?e.symbol:void 0}));return 0===o.length?void 0:o}(t,r,this.checker):void 0,allSearchSymbols:c,includes:function(t){return e.contains(c,t)}}},r.prototype.referenceAdder=function(r){var n=e.getSymbolId(r),i=this.symbolIdToReferences[n];return i||(i=this.symbolIdToReferences[n]=[],this.result.push({definition:{type:0,symbol:r},references:i})),function(e,r){return i.push(t.nodeEntry(e,r))}},r.prototype.addStringOrCommentReference=function(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})},r.prototype.markSearchedSymbols=function(t,r){for(var n=e.getNodeId(t),i=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=e.createMap()),a=!1,o=0,s=r;o<s.length;o++){var c=s[o];a=e.addToSeen(i,e.getSymbolId(c))||a}return a},r}();function p(e,t,r,n){var i=n.getImportSearches(t,r),a=i.importSearches,o=i.singleReferences,s=i.indirectUsers;if(o.length)for(var c=n.referenceAdder(t),u=0,l=o;u<l.length;u++){var _=l[u];f(_,n)&&c(_)}for(var d=0,p=a;d<p.length;d++){var m=p[d],y=m[0],h=m[1];x(y.getSourceFile(),n.createSearch(y,h,1),n)}if(s.length){var v=void 0;switch(r.exportKind){case 0:v=n.createSearch(e,t,1);break;case 1:v=n.options.isForRename?void 0:n.createSearch(e,t,1,{text:"default"})}if(v)for(var b=0,D=s;b<D.length;b++){g(D[b],v,n)}}}function f(t,r){return!!S(t,r)&&(!r.options.isForRename||!!e.isIdentifier(t)&&!(e.isImportOrExportSpecifier(t.parent)&&"default"===t.escapedText))}function m(e,t){for(var r=0,n=e.declarations;r<n.length;r++){var i=n[r],a=i.getSourceFile();x(a,t.createSearch(i,e,0),t,t.includesSourceFile(a))}}function g(t,r,n){void 0!==e.getNameTable(t).get(r.escapedText)&&x(t,r,n)}function y(t,r,n,i){var a=e.isParameterPropertyDeclaration(t.parent,t.parent.parent)?e.first(r.getSymbolsOfParameterPropertyDeclaration(t.parent,t.text)):r.getSymbolAtLocation(t);if(a)for(var o=0,s=h(n,a.name);o<s.length;o++){var c=s[o];if(e.isIdentifier(c)&&c!==t&&c.escapedText===t.escapedText){var u=r.getSymbolAtLocation(c);if(u===a||r.getShorthandAssignmentValueSymbol(c.parent)===a||e.isExportSpecifier(c.parent)&&C(c,u,c.parent,r)===a){var l=i(c);if(l)return l}}}}function h(t,r,n){return void 0===n&&(n=t),v(t,r,n).map((function(r){return e.getTouchingPropertyName(t,r)}))}function v(t,r,n){void 0===n&&(n=t);var i=[];if(!r||!r.length)return i;for(var a=t.text,o=a.length,s=r.length,c=a.indexOf(r,n.pos);c>=0&&!(c>n.end);){var u=c+s;0!==c&&e.isIdentifierPart(a.charCodeAt(c-1),99)||u!==o&&e.isIdentifierPart(a.charCodeAt(u),99)||i.push(c),c=a.indexOf(r,c+s+1)}return i}function b(r,n){var i=r.getSourceFile(),a=n.text,o=e.mapDefined(h(i,a,r),(function(r){return r===n||e.isJumpStatementTarget(r)&&e.getTargetLabel(r,a)===n?t.nodeEntry(r):void 0}));return[{definition:{type:1,node:n},references:o}]}function x(e,t,r,n){return void 0===n&&(n=!0),r.cancellationToken.throwIfCancellationRequested(),D(e,e,t,r,n)}function D(e,t,r,n,i){if(n.markSearchedSymbols(t,r.allSearchSymbols))for(var a=0,o=v(t,r.text,e);a<o.length;a++){T(t,o[a],r,n,i)}}function S(t,r){return!!(e.getMeaningFromLocation(t)&r.searchMeaning)}function T(r,n,i,a,o){var s=e.getTouchingPropertyName(r,n);if(function(t,r){switch(t.kind){case 75:return t.text.length===r.length;case 14:case 10:var n=t;return(e.isLiteralNameOfPropertyDeclarationOrIndexAccess(n)||e.isNameOfModuleDeclaration(t)||e.isExpressionOfExternalModuleImportEqualsDeclaration(t)||e.isCallExpression(t.parent)&&e.isBindableObjectDefinePropertyCall(t.parent)&&t.parent.arguments[1]===t)&&n.text.length===r.length;case 8:return e.isLiteralNameOfPropertyDeclarationOrIndexAccess(t)&&t.text.length===r.length;case 83:return"default".length===r.length;default:return!1}}(s,i.text)){if(S(s,a)){var c=a.checker.getSymbolAtLocation(s);if(c){var u=s.parent;if(!e.isImportSpecifier(u)||u.propertyName!==s){if(e.isExportSpecifier(u))return e.Debug.assert(75===s.kind),void E(s,c,u,i,a,o);var _=function(t,r,n,i){var a=i.checker;return P(r,n,a,!1,!i.options.isForRename||!!i.options.providePrefixAndSuffixTextForRename,(function(r,n,i,a){return t.includes(i||n||r)?{symbol:!n||6&e.getCheckFlags(r)?r:n,kind:a}:void 0}),(function(r){return!(t.parents&&!t.parents.some((function(t){return function t(r,n,i,a){if(r===n)return!0;var o=e.getSymbolId(r)+","+e.getSymbolId(n);var s=i.get(o);if(void 0!==s)return s;i.set(o,!1);var c=r.declarations.some((function(r){return e.getAllSuperTypeNodes(r).some((function(e){var r=a.getTypeAtLocation(e);return!!r&&!!r.symbol&&t(r.symbol,n,i,a)}))}));i.set(o,c);return c}(r.parent,t,i.inheritsFromCache,a)})))}))}(i,c,s,a);if(_){switch(a.specialSearchKind){case 0:o&&k(s,_,a);break;case 1:!function(t,r,n,i){e.isNewExpressionTarget(t)&&k(t,n.symbol,i);var a=function(){return i.referenceAdder(n.symbol)};if(e.isClassLike(t.parent))e.Debug.assert(83===t.kind||t.parent.name===t),function(t,r,n){var i=N(t);if(i)for(var a=0,o=i.declarations;a<o.length;a++){var s=o[a],c=e.findChildOfKind(s,128,r);e.Debug.assert(161===s.kind&&!!c),n(c)}t.exports&&t.exports.forEach((function(t){var r=t.valueDeclaration;if(r&&160===r.kind){var i=r.body;i&&O(i,103,(function(t){e.isNewExpressionTarget(t)&&n(t)}))}}))}(n.symbol,r,a());else{var o=function(t){return e.tryGetClassExtendingExpressionWithTypeArguments(e.climbPastPropertyAccess(t).parent)}(t);o&&(function(t,r){var n=N(t.symbol);if(!n)return;for(var i=0,a=n.declarations;i<a.length;i++){var o=a[i];e.Debug.assert(161===o.kind);var s=o.body;s&&O(s,101,(function(t){e.isCallExpressionTarget(t)&&r(t)}))}}(o,a()),function(e,t){if(function(e){return!!N(e.symbol)}(e))return;var r=e.symbol,n=t.createSearch(void 0,r,void 0);l(r,t,n)}(o,i))}}(s,r,i,a);break;case 2:!function(t,r,n){k(t,r.symbol,n);var i=t.parent;if(n.options.isForRename||!e.isClassLike(i))return;e.Debug.assert(i.name===t);for(var a=n.referenceAdder(r.symbol),o=0,s=i.members;o<s.length;o++){var c=s[o];e.isMethodOrAccessor(c)&&e.hasModifier(c,32)&&(c.body&&c.body.forEachChild((function t(r){103===r.kind?a(r):e.isFunctionLike(r)||e.isClassLike(r)||r.forEachChild(t)})))}}(s,i,a);break;default:e.Debug.assertNever(a.specialSearchKind)}!function(e,r,n,i){var a=t.getImportOrExportSymbol(e,r,i.checker,1===n.comingFrom);if(!a)return;var o=a.symbol;0===a.kind?M(i.options)||m(o,i):p(e,o,a.exportInfo,i)}(s,c,i,a)}else!function(t,r,n){var i=t.flags,a=t.valueDeclaration,o=n.checker.getShorthandAssignmentValueSymbol(a),s=a&&e.getNameOfDeclaration(a);33554432&i||!s||!r.includes(o)||k(s,o,n)}(c,i,a)}}}}else!a.options.implementations&&(a.options.findInStrings&&e.isInString(r,n)||a.options.findInComments&&e.isInNonReferenceComment(r,n))&&a.addStringOrCommentReference(r.fileName,e.createTextSpan(n,i.text.length))}function E(r,n,i,a,o,s,c){e.Debug.assert(!c||!!o.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");var u=i.parent,l=i.propertyName,_=i.name,d=u.parent,f=C(r,n,i,o.checker);if(c||a.includes(f)){if(l?r===l?(d.moduleSpecifier||b(),s&&!o.options.isForRename&&o.markSeenReExportRHS(_)&&k(_,e.Debug.assertDefined(i.symbol),o)):o.markSeenReExportRHS(r)&&b():o.options.isForRename&&"default"===_.escapedText||b(),!M(o.options)||c){var g=83===r.originalKeywordKind||83===i.name.originalKeywordKind?1:0,y=e.Debug.assertDefined(i.symbol),h=t.getExportInfo(y,g,o.checker);h&&p(r,y,h,o)}if(1!==a.comingFrom&&d.moduleSpecifier&&!l&&!M(o.options)){var v=o.checker.getExportSpecifierLocalTargetSymbol(i);v&&m(v,o)}}function b(){s&&k(r,f,o)}}function C(t,r,n,i){return function(t,r){var n=r.parent,i=r.propertyName,a=r.name;return e.Debug.assert(i===t||a===t),i?i===t:!n.parent.moduleSpecifier}(t,n)&&i.getExportSpecifierLocalTargetSymbol(n)||r}function k(t,r,n){var i="kind"in r?r:{kind:void 0,symbol:r},a=i.kind,o=i.symbol,s=n.referenceAdder(o);n.options.implementations?function(t,r,n){if(e.isDeclarationName(t)&&function(t){return 8388608&t.flags?!(e.isInterfaceDeclaration(t)||e.isTypeAliasDeclaration(t)):e.isVariableLike(t)?e.hasInitializer(t):e.isFunctionLikeDeclaration(t)?!!t.body:e.isClassLike(t)||e.isModuleOrEnumDeclaration(t)}(t.parent))return void r(t);if(75!==t.kind)return;280===t.parent.kind&&I(t,n.checker,r);var i=function t(r){return e.isIdentifier(r)||e.isPropertyAccessExpression(r)?t(r.parent):e.isExpressionWithTypeArguments(r)?e.tryCast(r.parent.parent,e.isClassLike):void 0}(t);if(i)return void r(i);var a=e.findAncestor(t,(function(t){return!e.isQualifiedName(t.parent)&&!e.isTypeNode(t.parent)&&!e.isTypeElement(t.parent)})),o=a.parent;if(e.hasType(o)&&o.type===a&&n.markSeenContainingTypeReference(o))if(e.hasInitializer(o))c(o.initializer);else if(e.isFunctionLike(o)&&o.body){var s=o.body;222===s.kind?e.forEachReturnStatement(s,(function(e){e.expression&&c(e.expression)})):c(s)}else e.isAssertionExpression(o)&&c(o.expression);function c(e){(function e(t){switch(t.kind){case 199:return e(t.expression);case 201:case 200:case 192:case 213:case 191:return!0;default:return!1}})(e)&&r(e)}}(t,s,n):s(t,a)}function N(e){return e.members&&e.members.get("__constructor")}function A(e){return 75===e.kind&&155===e.parent.kind&&e.parent.name===e}function F(e,t,r,n,i,a){var o=[];return P(e,t,r,n,!(n&&i),(function(e,t,r){o.push(r||t||e)}),(function(){return!a})),o}function P(t,r,i,a,o,s,c){var u=e.getContainingObjectLiteralElement(r);if(u){var l=i.getShorthandAssignmentValueSymbol(r.parent);if(l&&a)return s(l,void 0,void 0,3);var _=i.getContextualType(u.parent),d=_&&e.firstDefined(e.getPropertySymbolsFromContextualType(u,i,_,!0),(function(e){return x(e,4)}));if(d)return d;var p=function(t,r){return e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent.parent)?r.getPropertySymbolOfDestructuringAssignment(t):void 0}(r,i),f=p&&s(p,void 0,void 0,4);if(f)return f;var m=l&&s(l,void 0,void 0,3);if(m)return m}var g=n(r,t,i);if(g){var y=s(g,void 0,void 0,1);if(y)return y}var h=x(t);if(h)return h;if(t.valueDeclaration&&e.isParameterPropertyDeclaration(t.valueDeclaration,t.valueDeclaration.parent)){var v=i.getSymbolsOfParameterPropertyDeclaration(e.cast(t.valueDeclaration,e.isParameter),t.name);return e.Debug.assert(2===v.length&&!!(1&v[0].flags)&&!!(4&v[1].flags)),x(1&t.flags?v[1]:v[0])}if(!a){var b=void 0;return(b=o?e.isObjectBindingElementWithoutPropertyName(r.parent)?e.getPropertySymbolFromBindingElement(i,r.parent):void 0:D(t,i))&&x(b,4)}if(e.Debug.assert(a),o)return(b=D(t,i))&&x(b,4);function x(t,r){return e.firstDefined(i.getRootSymbols(t),(function(n){return s(t,n,void 0,r)||(n.parent&&96&n.parent.flags&&c(n)?e.getPropertySymbolsFromBaseTypes(n.parent,n.name,i,(function(e){return s(t,n,e,r)})):void 0)}))}function D(t,r){var n=e.getDeclarationOfKind(t,190);if(n&&e.isObjectBindingElementWithoutPropertyName(n))return e.getPropertySymbolFromBindingElement(r,n)}}function w(t,r){var n=e.getMeaningFromLocation(t),i=r.declarations;if(i){var a=void 0;do{a=n;for(var o=0,s=i;o<s.length;o++){var c=s[o],u=e.getMeaningFromDeclaration(c);u&n&&(n|=u)}}while(n!==a)}return n}function I(t,r,n){var i=r.getSymbolAtLocation(t),a=r.getShorthandAssignmentValueSymbol(i.valueDeclaration);if(a)for(var o=0,s=a.getDeclarations();o<s.length;o++){var c=s[o];1&e.getMeaningFromDeclaration(c)&&n(c)}}function O(t,r,n){e.forEachChild(t,(function(e){e.kind===r&&n(e),O(e,r,n)}))}function M(e){return e.isForRename&&e.providePrefixAndSuffixTextForRename}r.eachExportReference=function(r,n,i,a,o,s,c,u){for(var l=t.createImportTracker(r,e.arrayToSet(r,(function(e){return e.fileName})),n,i)(a,{exportKind:c?1:0,exportingModuleSymbol:o},!1),_=l.importSearches,d=l.indirectUsers,p=0,f=_;p<f.length;p++){u(f[p][0])}for(var m=0,g=d;m<g.length;m++)for(var y=0,v=h(g[m],c?"default":s);y<v.length;y++){var b=v[y];e.isIdentifier(b)&&!e.isImportOrExportSpecifier(b.parent)&&n.getSymbolAtLocation(b)===a&&u(b)}},r.isSymbolReferencedInFile=function(e,t,r){return y(e,t,r,(function(){return!0}))||!1},r.eachSymbolReferenceInFile=y,r.eachSignatureCall=function(t,r,n,i){if(t.name&&e.isIdentifier(t.name))for(var a=e.Debug.assertDefined(n.getSymbolAtLocation(t.name)),o=0,s=r;o<s.length;o++)for(var c=0,u=h(s[o],a.name);c<u.length;c++){var l=u[c];if(e.isIdentifier(l)&&l!==t.name&&l.escapedText===t.name.escapedText){var _=e.climbPastPropertyAccess(l),d=_.parent;if(e.isCallExpression(d)&&d.expression===_){var p=n.getSymbolAtLocation(l);p&&n.getRootSymbols(p).some((function(e){return e===a}))&&i(d)}}}},r.getIntersectingMeaningFromDeclarations=w,r.getReferenceEntriesForShorthandPropertyAssignment=I}(t.Core||(t.Core={}))}(e.FindAllReferences||(e.FindAllReferences={}))}(s||(s={})),function(e){function t(t,n,i,a){var o=i(t);return function(t){var s=a&&a.tryGetSourcePosition({fileName:t,pos:0}),c=function(t){if(i(t)===o)return n;var r=e.tryRemoveDirectoryPrefix(t,o,i);return void 0===r?void 0:n+"/"+r}(s?s.fileName:t);return s?void 0===c?void 0:function(t,n,i,a){var o=e.getRelativePathFromFile(t,n,a);return r(e.getDirectoryPath(i),o)}(s.fileName,c,t,i):c}}function r(t,r){return e.ensurePathIsNonModuleName(function(t,r){return e.normalizePath(e.combinePaths(t,r))}(t,r))}function n(t,r){if(t){if(t.resolvedModule){var n=a(t.resolvedModule.resolvedFileName);if(n)return n}var i=e.forEach(t.failedLookupLocations,(function(t){return e.endsWith(t,"/package.json")?void 0:a(t)}));return i||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1}}function a(e){var t=r(e);return t&&{newFileName:t,updated:!0}}}function i(t,r){return e.createRange(t.getStart(r)+1,t.end-1)}function a(t,r){if(e.isObjectLiteralExpression(t))for(var n=0,i=t.properties;n<i.length;n++){var a=i[n];e.isPropertyAssignment(a)&&e.isStringLiteral(a.name)&&r(a,a.name.text)}}e.getEditsForFileRename=function(o,s,c,u,l,_,d){var p=e.hostUsesCaseSensitiveFileNames(u),f=e.createGetCanonicalFileName(p),m=t(s,c,f,d),g=t(c,s,f,d);return e.textChanges.ChangeTracker.with({host:u,formatContext:l,preferences:_},(function(t){!function(t,n,o,s,c,u,l){var _=t.getCompilerOptions().configFile;if(!_)return;var d=e.getDirectoryPath(_.fileName),p=e.getTsConfigObjectLiteralExpression(_);if(!p)return;function f(t){for(var r=!1,n=0,i=e.isArrayLiteralExpression(t.initializer)?t.initializer.elements:[t.initializer];n<i.length;n++){r=m(i[n])||r}return r}function m(t){if(!e.isStringLiteral(t))return!1;var a=r(d,t.text),s=o(a);return void 0!==s&&(n.replaceRangeWithText(_,i(t,_),g(s)),!0)}function g(t){return e.getRelativePathFromDirectory(d,t,!l)}a(p,(function(t,r){switch(r){case"files":case"include":case"exclude":if(!f(t)&&"include"===r&&e.isArrayLiteralExpression(t.initializer)){var i=e.mapDefined(t.initializer.elements,(function(t){return e.isStringLiteral(t)?t.text:void 0})),o=e.getFileMatcherPatterns(d,[],i,l,u);e.getRegexFromPattern(e.Debug.assertDefined(o.includeFilePattern),l).test(s)&&!e.getRegexFromPattern(e.Debug.assertDefined(o.includeFilePattern),l).test(c)&&n.insertNodeAfter(_,e.last(t.initializer.elements),e.createStringLiteral(g(c)))}break;case"compilerOptions":a(t.initializer,(function(t,r){var n=e.getOptionFromName(r);n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?f(t):"paths"===r&&a(t.initializer,(function(t){if(e.isArrayLiteralExpression(t.initializer))for(var r=0,n=t.initializer.elements;r<n.length;r++){m(n[r])}}))}))}}))}(o,t,m,s,c,u.getCurrentDirectory(),p),function(t,a,o,s,c,u){for(var l=t.getSourceFiles(),_=function(_){var d=o(_.path),p=void 0!==d?d:_.path,f=e.getDirectoryPath(p),m=s(_.fileName),g=m||_.fileName,y=e.getDirectoryPath(g),h=void 0!==d||void 0!==m;!function(t,r,n,a){for(var o=0,s=t.referencedFiles||e.emptyArray;o<s.length;o++){var c=s[o];void 0!==(_=n(c.fileName))&&_!==t.text.slice(c.pos,c.end)&&r.replaceRangeWithText(t,c,_)}for(var u=0,l=t.imports;u<l.length;u++){var _,d=l[u];void 0!==(_=a(d))&&_!==d.text&&r.replaceRangeWithText(t,i(d,t),_)}}(_,a,(function(t){if(e.pathIsRelative(t)){var n=r(y,t),i=o(n);return void 0===i?void 0:e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(f,i,u))}}),(function(r){var i=t.getTypeChecker().getSymbolAtLocation(r);if(!i||!i.declarations.some((function(t){return e.isAmbientModule(t)}))){var a=void 0!==m?n(e.resolveModuleName(r.text,g,t.getCompilerOptions(),c),o):function(t,r,i,a,o,s){if(t){var c=e.find(t.declarations,e.isSourceFile).fileName,u=s(c);return void 0===u?{newFileName:c,updated:!1}:{newFileName:u,updated:!0}}return n(o.resolveModuleNames?o.getResolvedModuleWithFailedLookupLocationsFromCache&&o.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,i.fileName):a.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,i.fileName),s)}(i,r,_,t,c,o);return void 0!==a&&(a.updated||h&&e.pathIsRelative(r.text))?e.moduleSpecifiers.updateModuleSpecifier(t.getCompilerOptions(),p,a.newFileName,c,l,t.redirectTargetsMap,r.text):void 0}}))},d=0,p=l;d<p.length;d++){var f=p[d];_(f)}}(o,t,m,g,u,f)}))},e.getPathUpdater=t}(s||(s={})),function(e){!function(n){function i(r,n,i){var o=a(n,i,r);if(o)return[d(o.fileName,o.file.fileName)];var _=e.getTouchingPropertyName(n,i);if(_!==n){var p=_.parent;if(e.isJumpStatementTarget(_)){var f=e.getTargetLabel(_.parent,_.text);return f?[u(f,"label",_.text,void 0)]:void 0}var m=r.getTypeChecker(),g=function(e,t){var r=t.getSymbolAtLocation(e);if(r&&2097152&r.flags&&function(e,t){if(75!==e.kind)return!1;if(e.parent===t)return!0;switch(t.kind){case 254:case 252:return!0;case 257:return 256===t.parent.kind;default:return!1}}(e,r.declarations[0])){var n=t.getAliasedSymbol(r);if(n.declarations)return n}return r}(_,m);if(!g)return function(t,r){if(!e.isPropertyAccessExpression(t.parent)||t.parent.name!==t)return;var n=r.getTypeAtLocation(t.parent.expression);return e.mapDefined(n.isUnionOrIntersection()?n.types:[n],(function(e){var t=r.getIndexInfoOfType(e,0);return t&&t.declaration&&l(r,t.declaration)}))}(_,m);var y=function(t,r){var n=function(t){var r=function t(r){return e.isRightSideOfPropertyAccess(r)?t(r.parent):r}(t),n=r.parent;return n&&e.isCallLikeExpression(n)&&e.getInvokedExpression(n)===r?n:void 0}(r),i=n&&t.getResolvedSignature(n);return e.tryCast(i&&i.declaration,(function(t){return e.isFunctionLike(t)&&!e.isFunctionTypeNode(t)}))}(m,_);if(y&&(!e.isJsxOpeningLikeElement(_.parent)||!function(e){switch(e.kind){case 161:case 170:case 165:return!0;default:return!1}}(y))){var h=l(m,y);if(m.getRootSymbols(g).some((function(t){return function(t,r){return t===r.symbol||t===r.symbol.parent||!e.isCallLikeExpression(r.parent)&&t===r.parent.symbol}(t,y)}))||g.declarations&&g.declarations.some((function(t){return e.isVariableDeclaration(t)&&!!t.initializer&&e.isRequireCall(t.initializer,!1)})))return[h];var v=s(m,g,_,y)||e.emptyArray;return 101===_.kind?t([h],v):t(v,[h])}if(280===_.parent.kind){var b=m.getShorthandAssignmentValueSymbol(g.valueDeclaration);return b?b.declarations.map((function(e){return c(e,m,b,_)})):[]}if(e.isPropertyName(_)&&e.isBindingElement(p)&&e.isObjectBindingPattern(p.parent)&&_===(p.propertyName||p.name)){var x=e.getNameFromPropertyName(_),D=m.getTypeAtLocation(p.parent);return void 0===x?e.emptyArray:e.flatMap(D.isUnion()?D.types:[D],(function(e){var t=e.getProperty(x);return t&&s(m,t,_)}))}var S=e.getContainingObjectLiteralElement(_);if(S){var T=S&&m.getContextualType(S.parent);if(T)return e.flatMap(e.getPropertySymbolsFromContextualType(S,m,T,!1),(function(e){return s(m,e,_)}))}return s(m,g,_)}}function a(e,t,r){var n=_(e.referencedFiles,t);if(n)return(o=r.getSourceFileFromReference(e,n))&&{fileName:n.fileName,file:o};var i=_(e.typeReferenceDirectives,t);if(i){var a=r.getResolvedTypeReferenceDirectives().get(i.fileName);return(o=a&&r.getSourceFile(a.resolvedFileName))&&{fileName:i.fileName,file:o}}var o,s=_(e.libReferenceDirectives,t);return s?(o=r.getLibFileFromReference(s))&&{fileName:s.fileName,file:o}:void 0}function o(t,r,n){return e.flatMap(!t.isUnion()||32&t.flags?[t]:t.types,(function(e){return e.symbol&&s(r,e.symbol,n)}))}function s(t,r,n,i){var a=e.filter(r.declarations,(function(t){return t!==i&&(!e.isAssignmentDeclaration(t)||t===r.valueDeclaration)}))||void 0;return function(){if(32&r.flags&&!(16&r.flags)&&(e.isNewExpressionTarget(n)||128===n.kind)){return o((e.find(a,e.isClassLike)||e.Debug.fail("Expected declaration to have at least one class-like declaration")).members,!0)}}()||(e.isCallOrNewExpressionTarget(n)||e.isNameOfFunctionDeclaration(n)?o(a,!1):void 0)||e.map(a,(function(e){return c(e,t,r,n)}));function o(i,a){if(i){var o=i.filter(a?e.isConstructorDeclaration:e.isFunctionLike),s=o.filter((function(e){return!!e.body}));return o.length?0!==s.length?s.map((function(e){return c(e,t,r,n)})):[c(e.last(o),t,r,n)]:void 0}}}function c(t,r,n,i){var a=r.symbolToString(n);return u(t,e.SymbolDisplay.getSymbolKind(r,n,i),a,n.parent?r.symbolToString(n.parent,i):"")}function u(t,n,i,a){var o=e.getNameOfDeclaration(t)||t,s=o.getSourceFile(),c=e.createTextSpanFromNode(o,s);return r({fileName:s.fileName,textSpan:c,kind:n,name:i,containerKind:void 0,containerName:a},e.FindAllReferences.toContextSpan(c,s,e.FindAllReferences.getContextNode(t)))}function l(e,t){return c(t,e,t.symbol,t)}function _(t,r){return e.find(t,(function(t){return e.textRangeContainsPositionInclusive(t,r)}))}function d(t,r){return{fileName:r,textSpan:e.createTextSpanFromBounds(0,0),kind:"script",name:t,containerName:void 0,containerKind:void 0}}n.getDefinitionAtPosition=i,n.getReferenceAtPosition=a,n.getTypeDefinitionAtPosition=function(t,r,n){var i=e.getTouchingPropertyName(r,n);if(i!==r){var a=t.getSymbolAtLocation(i);if(a){var s=t.getTypeOfSymbolAtLocation(a,i),c=function(t,r,n){if(r.symbol===t||t.valueDeclaration&&r.symbol&&e.isVariableDeclaration(t.valueDeclaration)&&t.valueDeclaration.initializer===r.symbol.valueDeclaration){var i=r.getCallSignatures();if(1===i.length)return n.getReturnTypeOfSignature(e.first(i))}return}(a,s,t),u=c&&o(c,t,i);return u&&0!==u.length?u:o(s,t,i)}}},n.getDefinitionAndBoundSpan=function(t,r,n){var a=i(t,r,n);if(a&&0!==a.length){var o=_(r.referencedFiles,n)||_(r.typeReferenceDirectives,n)||_(r.libReferenceDirectives,n);if(o)return{definitions:a,textSpan:e.createTextSpanFromRange(o)};var s=e.getTouchingPropertyName(r,n);return{definitions:a,textSpan:e.createTextSpan(s.getStart(),s.getWidth())}}},n.findReferenceInPosition=_}(e.GoToDefinition||(e.GoToDefinition={}))}(s||(s={})),function(e){!function(t){var r,n,i=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","inheritdoc","inner","instance","interface","kind","lends","license","listens","member","memberof","method","mixes","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function a(e){var t=e.comment;switch(e.kind){case 305:return n(e.class);case 314:return i(e.typeParameters.map((function(e){return e.getText()})).join(", "));case 313:return n(e.typeExpression);case 315:case 308:case 316:case 310:var r=e.name;return r?n(r):t;default:return t}function n(e){return i(e.getText())}function i(e){return void 0===t?e:e+" "+t}}function o(t){return{name:t,kind:"",kindModifiers:"",displayParts:[e.textPart(t)],documentation:e.emptyArray,tags:void 0,codeActions:void 0}}function s(t){switch(t.kind){case 243:case 200:case 160:case 161:case 159:return{commentOwner:t,parameters:t.parameters};case 279:return s(t.initializer);case 244:case 245:case 157:case 247:case 282:case 246:return{commentOwner:t};case 224:var r=t.declarationList.declarations;return{commentOwner:t,parameters:1===r.length&&r[0].initializer?function(t){for(;199===t.kind;)t=t.expression;switch(t.kind){case 200:case 201:return t.parameters;case 213:var r=e.find(t.members,e.isConstructorDeclaration);return r?r.parameters:e.emptyArray}return e.emptyArray}(r[0].initializer):void 0};case 288:return"quit";case 248:return 248===t.parent.kind?void 0:{commentOwner:t};case 208:var n=t;return 0===e.getAssignmentDeclarationKind(n)?"quit":{commentOwner:t,parameters:e.isFunctionLike(n.right)?n.right.parameters:e.emptyArray}}}t.getJsDocCommentsFromDeclarations=function(t){var r=[];return e.forEachUnique(t,(function(t){for(var n=0,i=function(t){switch(t.kind){case 310:case 316:return[t];case 308:case 315:return[t,t.parent];default:return e.getJSDocCommentsAndTags(t)}}(t);n<i.length;n++){var a=i[n].comment;void 0!==a&&(r.length&&r.push(e.lineBreakPart()),r.push(e.textPart(a)))}})),r},t.getJsDocTagsFromDeclarations=function(t){var r=[];return e.forEachUnique(t,(function(t){for(var n=0,i=e.getJSDocTags(t);n<i.length;n++){var o=i[n];r.push({name:o.tagName.text,text:a(o)})}})),r},t.getJSDocTagNameCompletions=function(){return r||(r=e.map(i,(function(e){return{name:e,kind:"keyword",kindModifiers:"",sortText:"0"}})))},t.getJSDocTagNameCompletionDetails=o,t.getJSDocTagCompletions=function(){return n||(n=e.map(i,(function(e){return{name:"@"+e,kind:"keyword",kindModifiers:"",sortText:"0"}})))},t.getJSDocTagCompletionDetails=o,t.getJSDocParameterNameCompletions=function(t){if(!e.isIdentifier(t.name))return e.emptyArray;var r=t.name.text,n=t.parent,i=n.parent;return e.isFunctionLike(i)?e.mapDefined(i.parameters,(function(i){if(e.isIdentifier(i.name)){var a=i.name.text;if(!n.tags.some((function(r){return r!==t&&e.isJSDocParameterTag(r)&&e.isIdentifier(r.name)&&r.name.escapedText===a}))&&(void 0===r||e.startsWith(a,r)))return{name:a,kind:"parameter",kindModifiers:"",sortText:"0"}}})):[]},t.getJSDocParameterNameCompletionDetails=function(t){return{name:t,kind:"parameter",kindModifiers:"",displayParts:[e.textPart(t)],documentation:e.emptyArray,tags:void 0,codeActions:void 0}},t.getDocCommentTemplateAtPosition=function(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.findAncestor(i,e.isJSDoc);if(!a||void 0===a.comment&&!e.length(a.tags)){var o=i.getStart(r);if(a||!(o<n)){var c=function(t){return e.forEachAncestor(t,s)}(i);if(c){var u=c.commentOwner,l=c.parameters;if(!(u.getStart(r)<n)){if(!l||0===l.length){return{newText:"/** */",caretOffset:3}}var _=function(t,r){for(var n=t.text,i=e.getLineStartPositionForPosition(r,t),a=i;a<=r&&e.isWhiteSpaceSingleLine(n.charCodeAt(a));a++);return n.slice(i,a)}(r,n),d="/**"+t+_+" * ";return{newText:d+t+function(e,t,r,n){return e.map((function(e,i){var a=e.name,o=e.dotDotDotToken,s=75===a.kind?a.text:"param"+i;return r+" * @param "+(t?o?"{...any} ":"{any} ":"")+s+n})).join("")}(l,e.hasJSFileExtension(r.fileName),_,t)+_+" */"+(o===n?t+_:""),caretOffset:d.length}}}}}}}(e.JsDoc||(e.JsDoc={}))}(s||(s={})),function(e){!function(t){function r(e,t){switch(e.kind){case 254:case 257:case 252:var r=t.getSymbolAtLocation(e.name),n=t.getAliasedSymbol(r);return r.escapedName!==n.escapedName;default:return!0}}function n(t,r){var n=e.getNameOfDeclaration(t);return!!n&&(a(n,r)||153===n.kind&&i(n.expression,r))}function i(t,r){return a(t,r)||e.isPropertyAccessExpression(t)&&(r.push(t.name.text),!0)&&i(t.expression,r)}function a(t,r){return e.isPropertyNameLiteral(t)&&(r.push(e.getTextOfIdentifierOrLiteral(t)),!0)}function o(t){var r=[],a=e.getNameOfDeclaration(t);if(a&&153===a.kind&&!i(a.expression,r))return e.emptyArray;r.shift();for(var o=e.getContainerNode(t);o;){if(!n(o,r))return e.emptyArray;o=e.getContainerNode(o)}return r.reverse()}function s(t,r){return e.compareValues(t.matchKind,r.matchKind)||e.compareStringsCaseSensitiveUI(t.name,r.name)}function c(t){var r=t.declaration,n=e.getContainerNode(r),i=n&&e.getNameOfDeclaration(n);return{name:t.name,kind:e.getNodeKind(r),kindModifiers:e.getNodeModifiers(r),matchKind:e.PatternMatchKind[t.matchKind],isCaseSensitive:t.isCaseSensitive,fileName:t.fileName,textSpan:e.createTextSpanFromNode(r),containerName:i?i.text:"",containerKind:i?e.getNodeKind(n):""}}t.getNavigateToItems=function(t,n,i,a,u,l){var _=e.createPatternMatcher(a);if(!_)return e.emptyArray;for(var d=[],p=function(e){if(i.throwIfCancellationRequested(),l&&e.isDeclarationFile)return"continue";e.getNamedDeclarations().forEach((function(t,i){!function(e,t,n,i,a,s){var c=e.getMatchForLastSegmentOfPattern(t);if(!c)return;for(var u=0,l=n;u<l.length;u++){var _=l[u];if(r(_,i))if(e.patternContainsDots){var d=e.getFullMatch(o(_),t);d&&s.push({name:t,fileName:a,matchKind:d.kind,isCaseSensitive:d.isCaseSensitive,declaration:_})}else s.push({name:t,fileName:a,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:_})}}(_,i,t,n,e.fileName,d)}))},f=0,m=t;f<m.length;f++){p(m[f])}return d.sort(s),(void 0===u?d:d.slice(0,u)).map(c)}}(e.NavigateTo||(e.NavigateTo={}))}(s||(s={})),function(e){!function(t){var r,n,i,a,o,s=/\s+/g,c=150,u=[],l=[],_=[];function d(){i=void 0,n=void 0,u=[],a=void 0,_=[]}function p(e){return z(e.getText(i))}function f(e){return e.node.kind}function m(e,t){e.children?e.children.push(t):e.children=[t]}function g(t){e.Debug.assert(!u.length);var r={node:t,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};a=r;for(var n=0,i=t.statements;n<i.length;n++){E(i[n])}return S(),e.Debug.assert(!a&&!u.length),r}function y(e,t){m(a,h(e,t))}function h(t,r){return{node:t,name:r||(e.isDeclaration(t)||e.isExpression(t)?e.getNameOfDeclaration(t):void 0),additionalNodes:void 0,parent:a,children:void 0,indent:a.indent+1}}function v(t){o||(o=e.createMap()),o.set(t,!0)}function b(e){for(var t=0;t<e;t++)S()}function x(t,r){for(var n=[];!e.isPropertyNameLiteral(r);){var i=e.getNameOrArgument(r),a=e.getElementOrPropertyAccessName(r);r=r.expression,"prototype"!==a&&n.push(i)}n.push(r);for(var o=n.length-1;o>0;o--){D(t,i=n[o])}return[n.length-1,n[0]]}function D(e,t){var r=h(e,t);m(a,r),u.push(a),l.push(o),a=r}function S(){a.children&&(C(a.children,a),F(a.children)),a=u.pop(),o=l.pop()}function T(e,t,r){D(e,r),E(t),S()}function E(t){var r;if(n.throwIfCancellationRequested(),t&&!e.isToken(t))switch(t.kind){case 161:var i=t;T(i,i.body);for(var a=0,s=i.parameters;a<s.length;a++){var c=s[a];e.isParameterPropertyDeclaration(c,i)&&y(c)}break;case 160:case 162:case 163:case 159:e.hasDynamicName(t)||T(t,t.body);break;case 158:case 157:e.hasDynamicName(t)||y(t);break;case 254:var u=t;u.name&&y(u.name);var l=u.namedBindings;if(l)if(255===l.kind)y(l);else for(var _=0,d=l.elements;_<d.length;_++){y(d[_])}break;case 280:T(t,t.name);break;case 281:var p=t.expression;e.isIdentifier(p)?y(t,p):y(t);break;case 190:case 279:case 241:var f=t,m=f.name,g=f.initializer;e.isBindingPattern(m)?E(m):g&&function(e){switch(e.kind){case 201:case 200:case 213:return!0;default:return!1}}(g)?(D(t),e.forEachChild(g,E),S()):T(t,g);break;case 243:var h=t.name;h&&e.isIdentifier(h)&&v(h.text),T(t,t.body);break;case 201:case 200:T(t,t.body);break;case 247:D(t);for(var C=0,k=t.members;C<k.length;C++){B(F=k[C])||y(F)}S();break;case 244:case 213:case 245:D(t);for(var N=0,A=t.members;N<A.length;N++){var F;E(F=A[N])}S();break;case 248:T(t,function t(r){return r.body&&e.isModuleDeclaration(r.body)?t(r.body):r}(t).body);break;case 261:case 252:case 166:case 164:case 165:case 246:y(t);break;case 195:case 208:var P=e.getAssignmentDeclarationKind(t);switch(P){case 1:case 2:return void T(t,t.right);case 6:case 3:var w=(K=t).left,I=3===P?w.expression:w,O=0,M=void 0;return e.isIdentifier(I.expression)?(v(I.expression.text),M=I.expression):(O=(r=x(K,I.expression))[0],M=r[1]),6===P?e.isObjectLiteralExpression(K.right)&&K.right.properties.length>0&&(D(K,M),e.forEachChild(K.right,E),S()):e.isFunctionExpression(K.right)||e.isArrowFunction(K.right)?T(t,K.right,M):(D(K,M),T(t,K.right,w.name),S()),void b(O);case 7:case 9:var L=t,R=(M=7===P?L.arguments[0]:L.arguments[0].expression,L.arguments[1]),j=x(t,M);O=j[0];return D(t,j[1]),D(t,e.setTextRange(e.createIdentifier(R.text),R)),E(t.arguments[2]),S(),S(),void b(O);case 5:var K,J=(w=(K=t).left).expression;if(e.isIdentifier(J)&&"prototype"!==e.getElementOrPropertyAccessName(w)&&o&&o.has(J.text))return void(e.isFunctionExpression(K.right)||e.isArrowFunction(K.right)?T(t,K.right,J):e.isBindableStaticAccessExpression(w)&&(D(K,J),T(K.left,K.right,e.getNameOrArgument(w)),S()));break;case 4:case 0:case 8:break;default:e.Debug.assertNever(P)}default:e.hasJSDocNodes(t)&&e.forEach(t.jsDoc,(function(t){e.forEach(t.tags,(function(t){e.isJSDocTypeAlias(t)&&y(t)}))})),e.forEachChild(t,E)}}function C(t,r){var n=e.createMap();e.filterMutate(t,(function(t,i){var a=t.name||e.getNameOfDeclaration(t.node),o=a&&p(a);if(!o)return!0;var s=n.get(o);if(!s)return n.set(o,t),!0;if(s instanceof Array){for(var c=0,u=s;c<u.length;c++){var l;if(N(l=u[c],t,i,r))return!1}return s.push(t),!0}return!N(l=s,t,i,r)&&(n.set(o,[l,t]),!0)}))}t.getNavigationBarItems=function(t,r){n=r,i=t;try{return e.map(function(e){var t=[];return function e(r){if(function(e){if(e.children)return!0;switch(f(e)){case 244:case 213:case 247:case 245:case 248:case 288:case 246:case 315:case 308:return!0;case 201:case 243:case 200:return function(e){if(!e.node.body)return!1;switch(f(e.parent)){case 249:case 288:case 160:case 161:return!0;default:return!1}}(e);default:return!1}}(r)&&(t.push(r),r.children))for(var n=0,i=r.children;n<i.length;n++){var a=i[n];e(a)}}(e),t}(g(t)),M)}finally{d()}},t.getNavigationTree=function(e,t){n=t,i=e;try{return O(g(e))}finally{d()}};var k=((r={})[5]=!0,r[3]=!0,r[7]=!0,r[9]=!0,r[0]=!1,r[1]=!1,r[2]=!1,r[8]=!1,r[6]=!0,r[4]=!1,r);function N(t,r,n,i){return!!function(t,r,n,i){function a(t){return e.isFunctionExpression(t)||e.isFunctionDeclaration(t)||e.isVariableDeclaration(t)}var o=e.isBinaryExpression(r.node)||e.isCallExpression(r.node)?e.getAssignmentDeclarationKind(r.node):0,s=e.isBinaryExpression(t.node)||e.isCallExpression(t.node)?e.getAssignmentDeclarationKind(t.node):0;if(k[o]&&k[s]||a(t.node)&&k[o]||a(r.node)&&k[s]||e.isClassDeclaration(t.node)&&k[o]||e.isClassDeclaration(r.node)&&k[s]||e.isClassDeclaration(t.node)&&a(r.node)||e.isClassDeclaration(r.node)&&a(t.node)){var c=t.additionalNodes&&e.lastOrUndefined(t.additionalNodes)||t.node;if(!e.isClassDeclaration(t.node)&&!e.isClassDeclaration(r.node)||a(t.node)||a(r.node)){var u=a(t.node)?t.node:a(r.node)?r.node:void 0;if(void 0!==u){var l=h(e.setTextRange(e.createConstructor(void 0,void 0,[],void 0),u));l.indent=t.indent+1,l.children=t.node===u?t.children:r.children,t.children=t.node===u?e.concatenate([l],r.children||[r]):e.concatenate(t.children||[t],[l])}else(t.children||r.children)&&(t.children=e.concatenate(t.children||[t],r.children||[r]),t.children&&(C(t.children,t),F(t.children)));c=t.node=e.setTextRange(e.createClassDeclaration(void 0,void 0,t.name||e.createIdentifier("__class__"),void 0,void 0,[]),t.node)}else t.children=e.concatenate(t.children,r.children),t.children&&C(t.children,t);var _=r.node;return i.children[n-1].node.end===c.end?e.setTextRange(c,{pos:c.pos,end:_.end}):(t.additionalNodes||(t.additionalNodes=[]),t.additionalNodes.push(e.setTextRange(e.createClassDeclaration(void 0,void 0,t.name||e.createIdentifier("__class__"),void 0,void 0,[]),r.node))),!0}return 0!==o}(t,r,n,i)||!!function(t,r,n){if(t.kind!==r.kind||t.parent!==r.parent&&(!A(t,n)||!A(r,n)))return!1;switch(t.kind){case 158:case 160:case 162:case 163:return e.hasModifier(t,32)===e.hasModifier(r,32);case 248:return function e(t,r){return t.body.kind===r.body.kind&&(248!==t.body.kind||e(t.body,r.body))}(t,r);default:return!0}}(t.node,r.node,i)&&(function(t,r){var n;t.additionalNodes=t.additionalNodes||[],t.additionalNodes.push(r.node),r.additionalNodes&&(n=t.additionalNodes).push.apply(n,r.additionalNodes);t.children=e.concatenate(t.children,r.children),t.children&&(C(t.children,t),F(t.children))}(t,r),!0)}function A(t,r){var n=e.isModuleBlock(t.parent)?t.parent.parent:t.parent;return n===r.node||e.contains(r.additionalNodes,n)}function F(e){e.sort(P)}function P(t,r){return e.compareStringsCaseSensitiveUI(w(t.node),w(r.node))||e.compareValues(f(t),f(r))}function w(t){if(248===t.kind)return R(t);var r=e.getNameOfDeclaration(t);if(r&&e.isPropertyName(r)){var n=e.getPropertyNameForPropertyNameNode(r);return n&&e.unescapeLeadingUnderscores(n)}switch(t.kind){case 200:case 201:case 213:return J(t);default:return}}function I(t,r){if(248===t.kind)return z(R(t));if(r){var n=e.isIdentifier(r)?r.text:e.isElementAccessExpression(r)?"["+p(r.argumentExpression)+"]":p(r);if(n.length>0)return z(n)}switch(t.kind){case 288:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"<global>";case 201:case 243:case 200:case 244:case 213:return 512&e.getModifierFlags(t)?"default":J(t);case 161:return"constructor";case 165:return"new()";case 164:return"()";case 166:return"[]";default:return"<unknown>"}}function O(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:K(t.node),spans:L(t),nameSpan:t.name&&j(t.name),childItems:e.map(t.children,O)}}function M(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:K(t.node),spans:L(t),childItems:e.map(t.children,(function(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:L(t),childItems:_,indent:0,bolded:!1,grayed:!1}}))||_,indent:t.indent,bolded:!1,grayed:!1}}function L(e){var t=[j(e.node)];if(e.additionalNodes)for(var r=0,n=e.additionalNodes;r<n.length;r++){var i=n[r];t.push(j(i))}return t}function R(t){if(e.isAmbientModule(t))return e.getTextOfNode(t.name);var r=[];for(r.push(e.getTextOfIdentifierOrLiteral(t.name));t.body&&248===t.body.kind;)t=t.body,r.push(e.getTextOfIdentifierOrLiteral(t.name));return r.join(".")}function B(e){return!e.name||153===e.name.kind}function j(t){return 288===t.kind?e.createTextSpanFromRange(t):e.createTextSpanFromNode(t,i)}function K(t){return t.parent&&241===t.parent.kind&&(t=t.parent),e.getNodeModifiers(t)}function J(t){var r=t.parent;if(t.name&&e.getFullWidth(t.name)>0)return z(e.declarationNameToString(t.name));if(e.isVariableDeclaration(r))return z(e.declarationNameToString(r.name));if(e.isBinaryExpression(r)&&62===r.operatorToken.kind)return p(r.left).replace(s,"");if(e.isPropertyAssignment(r))return p(r.name);if(512&e.getModifierFlags(t))return"default";if(e.isClassLike(t))return"<class>";if(e.isCallExpression(r)){var n=function t(r){if(e.isIdentifier(r))return r.text;if(e.isPropertyAccessExpression(r)){var n=t(r.expression),i=r.name.text;return void 0===n?i:n+"."+i}return}(r.expression);if(void 0!==n)return(n=z(n)).length>c?n+" callback":n+"("+z(e.mapDefined(r.arguments,(function(t){return e.isStringLiteralLike(t)?t.getText(i):void 0})).join(", "))+") callback"}return"<function>"}function z(e){return(e=e.length>c?e.substring(0,c)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}}(e.NavigationBar||(e.NavigationBar={}))}(s||(s={})),function(e){!function(t){function r(t,r){var n=e.isStringLiteral(r)&&r.text;return e.isString(n)&&e.some(t.moduleAugmentations,(function(t){return e.isStringLiteral(t)&&t.text===n}))}function n(t){return void 0!==t&&e.isStringLiteralLike(t)?t.text:void 0}function i(t){if(0===t.length)return t;var r=function(t){for(var r,n=[],i=[],a=[],o=0,s=t;o<s.length;o++){var c=s[o];if(void 0!==c.importClause){var u=c.importClause,l=u.name,_=u.namedBindings;l&&n.push(c),_&&(e.isNamespaceImport(_)?i.push(c):a.push(c))}else r=r||c}return{importWithoutClause:r,defaultImports:n,namespaceImports:i,namedImports:a}}(t),n=r.importWithoutClause,i=r.defaultImports,a=r.namespaceImports,c=r.namedImports,l=[];if(n&&l.push(n),1===i.length&&1===a.length&&0===c.length){var _=i[0];return l.push(o(_,_.importClause.name,a[0].importClause.namedBindings)),l}for(var d,p=0,f=e.stableSort(a,(function(e,t){return u(e.importClause.namedBindings.name,t.importClause.namedBindings.name)}));p<f.length;p++){var m=f[p];l.push(o(m,void 0,m.importClause.namedBindings))}if(0===i.length&&0===c.length)return l;var g=[];if(1===i.length)d=i[0].importClause.name;else for(var y=0,h=i;y<h.length;y++){_=h[y];g.push(e.createImportSpecifier(e.createIdentifier("default"),_.importClause.name))}g.push.apply(g,e.flatMap(c,(function(e){return e.importClause.namedBindings.elements})));var v=s(g),b=i.length>0?i[0]:c[0],x=0===v.length?d?void 0:e.createNamedImports(e.emptyArray):0===c.length?e.createNamedImports(v):e.updateNamedImports(c[0].importClause.namedBindings,v);return l.push(o(b,d,x)),l}function a(t){if(0===t.length)return t;var r=function(e){for(var t,r=[],n=0,i=e;n<i.length;n++){var a=i[n];void 0===a.exportClause?t=t||a:r.push(a)}return{exportWithoutClause:t,namedExports:r}}(t),n=r.exportWithoutClause,i=r.namedExports,a=[];if(n&&a.push(n),0===i.length)return a;var o=[];o.push.apply(o,e.flatMap(i,(function(e){return e.exportClause.elements})));var c=s(o),u=i[0];return a.push(e.updateExportDeclaration(u,u.decorators,u.modifiers,e.updateNamedExports(u.exportClause,c),u.moduleSpecifier)),a}function o(t,r,n){return e.updateImportDeclaration(t,t.decorators,t.modifiers,e.updateImportClause(t.importClause,r,n),t.moduleSpecifier)}function s(t){return e.stableSort(t,(function(e,t){return u(e.propertyName||e.name,t.propertyName||t.name)||u(e.name,t.name)}))}function c(t,r){var i=n(t),a=n(r);return e.compareBooleans(void 0===i,void 0===a)||e.compareBooleans(e.isExternalModuleNameRelative(i),e.isExternalModuleNameRelative(a))||e.compareStringsCaseInsensitive(i,a)}function u(t,r){return e.compareStringsCaseInsensitive(t.text,r.text)}t.organizeImports=function(t,s,u,l,_){var d=e.textChanges.ChangeTracker.fromContext({host:u,formatContext:s,preferences:_}),p=function(n){return i(function(t,n,i){for(var a=i.getTypeChecker(),s=a.getJsxNamespace(n),c=!!(2&n.transformFlags),u=[],l=0,_=t;l<_.length;l++){var d=_[l],p=d.importClause,f=d.moduleSpecifier;if(p){var m=p.name,g=p.namedBindings;if(m&&!h(m)&&(m=void 0),g)if(e.isNamespaceImport(g))h(g.name)||(g=void 0);else{var y=g.elements.filter((function(e){return h(e.name)}));y.length<g.elements.length&&(g=y.length?e.updateNamedImports(g,y):void 0)}m||g?u.push(o(d,m,g)):r(n,f)&&(n.isDeclarationFile?u.push(e.createImportDeclaration(d.decorators,d.modifiers,void 0,f)):u.push(d))}else u.push(d)}return u;function h(t){return c&&t.text===s||e.FindAllReferences.Core.isSymbolReferencedInFile(t,a,n)}}(n,t,l))};y(t.statements.filter(e.isImportDeclaration),p),y(t.statements.filter(e.isExportDeclaration),a);for(var f=0,m=t.statements.filter(e.isAmbientModule);f<m.length;f++){var g=m[f];if(g.body)y(g.body.statements.filter(e.isImportDeclaration),p),y(g.body.statements.filter(e.isExportDeclaration),a)}return d.getChanges();function y(r,i){if(0!==e.length(r)){e.suppressLeadingTrivia(r[0]);var a=e.group(r,(function(e){return n(e.moduleSpecifier)})),o=e.stableSort(a,(function(e,t){return c(e[0].moduleSpecifier,t[0].moduleSpecifier)})),l=e.flatMap(o,(function(e){return n(e[0].moduleSpecifier)?i(e):e}));0===l.length?d.delete(t,r[0]):d.replaceNodeWithNodes(t,r[0],l,{leadingTriviaOption:e.textChanges.LeadingTriviaOption.Exclude,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include,suffix:e.getNewLineOrDefaultFromHost(u,s.options)});for(var _=1;_<r.length;_++)d.delete(t,r[_])}}},t.coalesceImports=i,t.coalesceExports=a,t.compareModuleSpecifiers=c}(e.OrganizeImports||(e.OrganizeImports={}))}(s||(s={})),function(e){!function(t){t.collectElements=function(t,r){var c=[];return function(t,r,n){var c=40,u=0,l=t.statements,_=l.length;for(;u<_;){for(;u<_&&!e.isAnyImportSyntax(l[u]);)f(l[u]),u++;if(u===_)break;for(var d=u;u<_&&e.isAnyImportSyntax(l[u]);)i(l[u],t,r,n),u++;var p=u-1;p!==d&&n.push(a(e.findChildOfKind(l[d],95,t).getStart(t),l[p].getEnd(),"imports"))}function f(u){if(0!==c){r.throwIfCancellationRequested(),e.isDeclaration(u)&&i(u,t,r,n),function(t){if(!e.isFunctionExpression(t)&&!e.isArrowFunction(t))return!1;var r=e.findAncestor(t,e.isVariableStatement);return!!r&&e.getSingleInitializerOfVariableStatementOrPropertyDeclaration(r)===t}(u)&&i(u.parent.parent.parent,t,r,n);var l=function(t,r){switch(t.kind){case 222:if(e.isFunctionLike(t.parent))return function(t,r,n){var i=e.isNodeArrayMultiLine(t.parameters,n)?e.findChildOfKind(t,20,n):e.findChildOfKind(r,18,n),a=e.findChildOfKind(r,19,n);return i&&a&&o(i,a,t,n,201!==t.kind)}(t.parent,t,r);switch(t.parent.kind){case 227:case 230:case 231:case 229:case 226:case 228:case 235:case 278:return c(t.parent);case 239:var n=t.parent;if(n.tryBlock===t)return c(t.parent);if(n.finallyBlock===t)return c(e.findChildOfKind(n,91,r));default:return s(e.createTextSpanFromNode(t,r),"code")}case 249:return c(t.parent);case 244:case 213:case 245:case 247:case 250:return c(t);case 192:return i(t);case 191:return i(t,22);case 264:return function(t){var n=e.createTextSpanFromBounds(t.openingElement.getStart(r),t.closingElement.getEnd()),i=t.openingElement.tagName.getText(r);return s(n,"code",n,!1,"<"+i+">...</"+i+">")}(t);case 268:return function(t){var n=e.createTextSpanFromBounds(t.openingFragment.getStart(r),t.closingFragment.getEnd());return s(n,"code",n,!1,"<>...</>")}(t);case 265:case 266:return function(e){if(0===e.properties.length)return;return a(e.getStart(r),e.getEnd(),"code")}(t.attributes)}function i(t,r){return void 0===r&&(r=18),c(t,!1,!e.isArrayLiteralExpression(t.parent)&&!e.isCallExpression(t.parent),r)}function c(n,i,a,s,c){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===s&&(s=18),void 0===c&&(c=18===s?19:23);var u=e.findChildOfKind(t,s,r),l=e.findChildOfKind(t,c,r);return u&&l&&o(u,l,n,r,i,a)}}(u,t);l&&n.push(l),c--,e.isIfStatement(u)&&u.elseStatement&&e.isIfStatement(u.elseStatement)?(f(u.expression),f(u.thenStatement),c++,f(u.elseStatement),c--):u.forEachChild(f),c++}}}(t,r,c),function(t,r){for(var i=[],a=t.getLineStarts(),o=0,c=a;o<c.length;o++){var u=c[o],l=t.getLineEndOfPosition(u),_=n(t.text.substring(u,l));if(_&&!e.isInComment(t,u))if(_[1]){var d=i.pop();d&&(d.textSpan.length=l-d.textSpan.start,d.hintSpan.length=l-d.textSpan.start,r.push(d))}else{var p=e.createTextSpanFromBounds(t.text.indexOf("//",u),l);i.push(s(p,"region",p,!1,_[2]||"#region"))}}}(t,c),c.sort((function(e,t){return e.textSpan.start-t.textSpan.start}))};var r=/^\s*\/\/\s*#(end)?region(?:\s+(.*))?(?:\r)?$/;function n(e){return r.exec(e)}function i(t,r,i,o){var s=e.getLeadingCommentRangesOfNode(t,r);if(s){for(var c=-1,u=-1,l=0,_=r.getFullText(),d=0,p=s;d<p.length;d++){var f=p[d],m=f.kind,g=f.pos,y=f.end;switch(i.throwIfCancellationRequested(),m){case 2:if(n(_.slice(g,y))){h(),l=0;break}0===l&&(c=g),u=y,l++;break;case 3:h(),o.push(a(g,y,"comment")),l=0;break;default:e.Debug.assertNever(m)}}h()}function h(){l>1&&o.push(a(c,u,"comment"))}}function a(t,r,n){return s(e.createTextSpanFromBounds(t,r),n)}function o(t,r,n,i,a,o){return void 0===a&&(a=!1),void 0===o&&(o=!0),s(e.createTextSpanFromBounds(o?t.getFullStart():t.getStart(i),r.getEnd()),"code",e.createTextSpanFromNode(n,i),a)}function s(e,t,r,n,i){return void 0===r&&(r=e),void 0===n&&(n=!1),void 0===i&&(i="..."),{textSpan:e,kind:t,hintSpan:r,bannerText:i,autoCollapse:n}}}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(s||(s={})),function(e){var t;function r(e,t){return{kind:e,isCaseSensitive:t}}function n(e,t){var r=t.get(e);return r||t.set(e,r=v(e)),r}function i(i,a,o){var s=function(e,t){for(var r=e.length-t.length,n=function(r){if(C(t,(function(t,n){return d(e.charCodeAt(n+r))===t})))return{value:r}},i=0;i<=r;i++){var a=n(i);if("object"===f(a))return a.value}return-1}(i,a.textLowerCase);if(0===s)return r(a.text.length===i.length?t.exact:t.prefix,e.startsWith(i,a.text));if(a.isLowerCase){if(-1===s)return;for(var _=0,p=n(i,o);_<p.length;_++){var m=p[_];if(c(i,m,a.text,!0))return r(t.substring,c(i,m,a.text,!1))}if(a.text.length<i.length&&l(i.charCodeAt(s)))return r(t.substring,!1)}else{if(i.indexOf(a.text)>0)return r(t.substring,!0);if(a.characterSpans.length>0){var g=n(i,o),y=!!u(i,g,a,!1)||!u(i,g,a,!0)&&void 0;if(void 0!==y)return r(t.camelCase,y)}}}function a(e,t,r){if(C(t.totalTextChunk.text,(function(e){return 32!==e&&42!==e}))){var n=i(e,t.totalTextChunk,r);if(n)return n}for(var a,s=0,c=t.subWordTextChunks;s<c.length;s++){a=o(a,i(e,c[s],r))}return a}function o(t,r){return e.min(t,r,s)}function s(t,r){return void 0===t?1:void 0===r?-1:e.compareValues(t.kind,r.kind)||e.compareBooleans(!t.isCaseSensitive,!r.isCaseSensitive)}function c(e,t,r,n,i){return void 0===i&&(i={start:0,length:r.length}),i.length<=t.length&&E(0,i.length,(function(a){return function(e,t,r){return r?d(e)===d(t):e===t}(r.charCodeAt(i.start+a),e.charCodeAt(t.start+a),n)}))}function u(t,r,n,i){for(var a=n.characterSpans,o=0,s=0;;){if(s===a.length)return!0;if(o===r.length)return!1;for(var u=r[o],_=!1;s<a.length;s++){var d=a[s];if(_&&(!l(n.text.charCodeAt(a[s-1].start))||!l(n.text.charCodeAt(a[s].start))))break;if(!c(t,u,n.text,i,d))break;_=!0,u=e.createTextSpan(u.start+d.length,u.length-d.length)}o++}}function l(t){if(t>=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var r=String.fromCharCode(t);return r===r.toUpperCase()}function _(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var r=String.fromCharCode(t);return r===r.toLowerCase()}function d(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function p(e){return e>=48&&e<=57}function m(e){return l(e)||_(e)||p(e)||95===e||36===e}function g(e){for(var t=[],r=0,n=0,i=0;i<e.length;i++){m(e.charCodeAt(i))?(0===n&&(r=i),n++):n>0&&(t.push(y(e.substr(r,n))),n=0)}return n>0&&t.push(y(e.substr(r,n))),t}function y(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:h(e)}}function h(e){return b(e,!1)}function v(e){return b(e,!0)}function b(t,r){for(var n=[],i=0,a=1;a<t.length;a++){var o=p(t.charCodeAt(a-1)),s=p(t.charCodeAt(a)),c=T(t,r,a),u=r&&S(t,a,i);(x(t.charCodeAt(a-1))||x(t.charCodeAt(a))||o!==s||c||u)&&(D(t,i,a)||n.push(e.createTextSpan(i,a-i)),i=a)}return D(t,i,t.length)||n.push(e.createTextSpan(i,t.length-i)),n}function x(e){switch(e){case 33:case 34:case 35:case 37:case 38:case 39:case 40:case 41:case 42:case 44:case 45:case 46:case 47:case 58:case 59:case 63:case 64:case 91:case 92:case 93:case 95:case 123:case 125:return!0}return!1}function D(e,t,r){return C(e,(function(e){return x(e)&&95!==e}),t,r)}function S(e,t,r){return t!==r&&t+1<e.length&&l(e.charCodeAt(t))&&_(e.charCodeAt(t+1))&&C(e,l,r,t)}function T(e,t,r){var n=l(e.charCodeAt(r-1));return l(e.charCodeAt(r))&&(!t||!n)}function E(e,t,r){for(var n=e;n<t;n++)if(!r(n))return!1;return!0}function C(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=e.length),E(r,n,(function(r){return t(e.charCodeAt(r),r)}))}!function(e){e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase"}(t=e.PatternMatchKind||(e.PatternMatchKind={})),e.createPatternMatcher=function(t){var r=e.createMap(),n=t.trim().split(".").map((function(e){return{totalTextChunk:y(t=e.trim()),subWordTextChunks:g(t)};var t}));if(!n.some((function(e){return!e.subWordTextChunks.length})))return{getFullMatch:function(t,i){return function(t,r,n,i){var s;if(!a(r,e.last(n),i))return;if(n.length-1>t.length)return;for(var c=n.length-2,u=t.length-1;c>=0;c-=1,u-=1)s=o(s,a(t[u],n[c],i));return s}(t,i,n,r)},getMatchForLastSegmentOfPattern:function(t){return a(t,e.last(n),r)},patternContainsDots:n.length>1}},e.breakIntoCharacterSpans=h,e.breakIntoWordSpans=v}(s||(s={})),function(e){e.preProcessFile=function(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var i,a,o,s={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},c=[],u=0,l=!1;function _(){return a=o,18===(o=e.scanner.scan())?u++:19===o&&u--,o}function d(){var t=e.scanner.getTokenValue(),r=e.scanner.getTokenPos();return{fileName:t,pos:r,end:r+t.length}}function p(){c.push(d()),f()}function f(){0===u&&(l=!0)}function m(){var t=e.scanner.getToken();return 129===t&&(134===(t=_())&&10===(t=_())&&(i||(i=[]),i.push({ref:d(),depth:u})),!0)}function g(){if(24===a)return!1;var t=e.scanner.getToken();if(95===t){if(20===(t=_())){if(10===(t=_()))return p(),!0}else{if(10===t)return p(),!0;if(75===t||e.isKeyword(t))if(148===(t=_())){if(10===(t=_()))return p(),!0}else if(62===t){if(h(!0))return!0}else{if(27!==t)return!0;t=_()}if(18===t){for(t=_();19!==t&&1!==t;)t=_();19===t&&148===(t=_())&&10===(t=_())&&p()}else 41===t&&122===(t=_())&&(75===(t=_())||e.isKeyword(t))&&148===(t=_())&&10===(t=_())&&p()}return!0}return!1}function y(){var t=e.scanner.getToken();if(88===t){if(f(),18===(t=_())){for(t=_();19!==t&&1!==t;)t=_();19===t&&148===(t=_())&&10===(t=_())&&p()}else if(41===t)148===(t=_())&&10===(t=_())&&p();else if(95===t&&(75===(t=_())||e.isKeyword(t))&&62===(t=_())&&h(!0))return!0;return!0}return!1}function h(t){var r=t?_():e.scanner.getToken();return 138===r&&(20===(r=_())&&10===(r=_())&&p(),!0)}function v(){var t=e.scanner.getToken();if(75===t&&"define"===e.scanner.getTokenValue()){if(20!==(t=_()))return!0;if(10===(t=_())){if(27!==(t=_()))return!0;t=_()}if(22!==t)return!0;for(t=_();23!==t&&1!==t;)10===t&&p(),t=_();return!0}return!1}if(r&&function(){for(e.scanner.setText(t),_();1!==e.scanner.getToken();)m()||g()||y()||n&&(h(!1)||v())||_();e.scanner.setText(void 0)}(),e.processCommentPragmas(s,t),e.processPragmasIntoFields(s,e.noop),l){if(i)for(var b=0,x=i;b<x.length;b++){var D=x[b];c.push(D.ref)}return{referencedFiles:s.referencedFiles,typeReferenceDirectives:s.typeReferenceDirectives,libReferenceDirectives:s.libReferenceDirectives,importedFiles:c,isLibFile:!!s.hasNoDefaultLib,ambientExternalModules:void 0}}var S=void 0;if(i)for(var T=0,E=i;T<E.length;T++){0===(D=E[T]).depth?(S||(S=[]),S.push(D.ref.fileName)):c.push(D.ref)}return{referencedFiles:s.referencedFiles,typeReferenceDirectives:s.typeReferenceDirectives,libReferenceDirectives:s.libReferenceDirectives,importedFiles:c,isLibFile:!!s.hasNoDefaultLib,ambientExternalModules:S}}}(s||(s={})),function(e){!function(t){function r(t){return{canRename:!1,localizedErrorMessage:e.getLocaleSpecificMessage(t)}}function n(t,r){var n=t.getStart(r),i=t.getWidth(r);return e.isStringLiteralLike(t)&&(n+=1,i-=2),e.createTextSpan(n,i)}t.getRenameInfo=function(t,i,a,o){var s=e.getTouchingPropertyName(i,a);return(s&&function(t){switch(t.kind){case 75:case 10:case 14:case 103:return!0;case 8:return e.isLiteralNameOfPropertyDeclarationOrIndexAccess(t);default:return!1}}(s)?function(t,i,a,o,s){var c=i.getSymbolAtLocation(t);if(!c)return;var u=c.declarations;if(!u||0===u.length)return;if(u.some(o))return r(e.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(e.isIdentifier(t)&&83===t.originalKeywordKind&&1536&c.parent.flags)return;if(e.isStringLiteralLike(t)&&e.tryGetImportFromModuleSpecifier(t))return s&&s.allowRenameOfImportPath?function(t,n,i){if(!e.isExternalModuleNameRelative(t.text))return r(e.Diagnostics.You_cannot_rename_a_module_via_a_global_import);var a=e.find(i.declarations,e.isSourceFile);if(!a)return;var o=e.endsWith(t.text,"/index")||e.endsWith(t.text,"/index.js")?void 0:e.tryRemoveSuffix(e.removeFileExtension(a.fileName),"/index"),s=void 0===o?a.fileName:o,c=void 0===o?"module":"directory",u=t.text.lastIndexOf("/")+1,l=e.createTextSpan(t.getStart(n)+1+u,t.text.length-u);return{canRename:!0,fileToRename:s,kind:c,displayName:s,fullDisplayName:s,kindModifiers:"",triggerSpan:l}}(t,a,c):void 0;var l=e.SymbolDisplay.getSymbolKind(i,c,t),_=e.isImportOrExportSpecifierName(t)||e.isStringOrNumericLiteralLike(t)&&153===t.parent.kind?e.stripQuotes(e.getTextOfIdentifierOrLiteral(t)):void 0,d=_||i.symbolToString(c),p=_||i.getFullyQualifiedName(c);return function(e,t,r,i,a,o){return{canRename:!0,fileToRename:void 0,kind:r,displayName:e,fullDisplayName:t,kindModifiers:i,triggerSpan:n(a,o)}}(d,p,l,e.SymbolDisplay.getSymbolModifiers(c),t,a)}(s,t.getTypeChecker(),i,(function(e){return t.isSourceFileDefaultLibrary(e.getSourceFile())}),o):void 0)||r(e.Diagnostics.You_cannot_rename_this_element)}}(e.Rename||(e.Rename={}))}(s||(s={})),function(e){!function(t){function n(t,r,n){return e.Debug.assert(n.pos<=r),r<n.end||n.getEnd()===r&&e.getTouchingPropertyName(t,r).pos<n.end}t.getSmartSelectionRange=function(t,i){var o,s,c={textSpan:e.createTextSpanFromBounds(i.getFullStart(),i.getEnd())},l=i;e:for(;;){var _=a(l);if(!_.length)break;for(var d=0;d<_.length;d++){var p=_[d-1],f=_[d],m=_[d+1];if(f.getStart(i)>t)break e;if(n(i,t,f)){if(e.isBlock(f)||e.isTemplateSpan(f)||e.isTemplateHead(f)||e.isTemplateTail(f)||p&&e.isTemplateHead(p)||e.isVariableDeclarationList(f)&&e.isVariableStatement(l)||e.isSyntaxList(f)&&e.isVariableDeclarationList(l)||e.isVariableDeclaration(f)&&e.isSyntaxList(l)&&1===_.length){l=f;break}if(e.isTemplateSpan(l)&&m&&e.isTemplateMiddleOrTemplateTail(m))b(f.getFullStart()-"${".length,m.getStart()+"}".length);var g=e.isSyntaxList(f)&&(s=void 0,18===(s=(o=p)&&o.kind)||22===s||20===s||266===s)&&u(m)&&!e.positionsAreOnSameLine(p.getStart(),m.getStart(),i),y=e.hasJSDocNodes(f)&&f.jsDoc[0].getStart(),h=g?p.getEnd():f.getStart(),v=g?m.getStart():f.getEnd();e.isNumber(y)&&b(y,v),b(h,v),(e.isStringLiteral(f)||e.isTemplateLiteral(f))&&b(h+1,v-1),l=f;break}if(d===_.length-1)break e}}return c;function b(n,i){if(n!==i){var a=e.createTextSpanFromBounds(n,i);(!c||!e.textSpansEqual(a,c.textSpan)&&e.textSpanIntersectsWithPosition(a,t))&&(c=r({textSpan:a},c&&{parent:c}))}}};var i=e.or(e.isImportDeclaration,e.isImportEqualsDeclaration);function a(t){if(e.isSourceFile(t))return o(t.getChildAt(0).getChildren(),i);if(e.isMappedTypeNode(t)){var r=t.getChildren(),n=r[0],a=r.slice(1),u=e.Debug.assertDefined(a.pop());e.Debug.assertEqual(n.kind,18),e.Debug.assertEqual(u.kind,19);var l=o(a,(function(e){return e===t.readonlyToken||137===e.kind||e===t.questionToken||57===e.kind}));return[n,c(s(o(l,(function(e){var t=e.kind;return 22===t||154===t||23===t})),(function(e){return 58===e.kind}))),u]}if(e.isPropertySignature(t))return s(a=o(t.getChildren(),(function(r){return r===t.name||e.contains(t.modifiers,r)})),(function(e){return 58===e.kind}));if(e.isParameter(t)){var _=o(t.getChildren(),(function(e){return e===t.dotDotDotToken||e===t.name}));return s(o(_,(function(e){return e===_[0]||e===t.questionToken})),(function(e){return 62===e.kind}))}return e.isBindingElement(t)?s(t.getChildren(),(function(e){return 62===e.kind})):t.getChildren()}function o(e,t){for(var r,n=[],i=0,a=e;i<a.length;i++){var o=a[i];t(o)?(r=r||[]).push(o):(r&&(n.push(c(r)),r=void 0),n.push(o))}return r&&n.push(c(r)),n}function s(t,r,n){if(void 0===n&&(n=!0),t.length<2)return t;var i=e.findIndex(t,r);if(-1===i)return t;var a=t.slice(0,i),o=t[i],s=e.last(t),u=n&&26===s.kind,l=t.slice(i+1,u?t.length-1:void 0),_=e.compact([a.length?c(a):void 0,o,l.length?c(l):void 0]);return u?_.concat(s):_}function c(t){e.Debug.assertGreaterThanOrEqual(t.length,1);var r=e.createNode(317,t[0].pos,e.last(t).end);return r._children=t,r}function u(e){var t=e&&e.kind;return 19===t||23===t||21===t||267===t}}(e.SmartSelectionRange||(e.SmartSelectionRange={}))}(s||(s={})),function(e){!function(r){var n,i;function a(t,r,n){for(var i=t.getFullStart(),a=t.parent;a;){var o=e.findPrecedingToken(i,r,a,!0);if(o)return e.rangeContainsRange(n,o);a=a.parent}return e.Debug.fail("Could not find preceding token")}function o(t,r){var n=function(t,r){if(29===t.kind||20===t.kind)return{list:p(t.parent,t,r),argumentIndex:0};var n=e.findContainingList(t);return n&&{list:n,argumentIndex:l(n,t)}}(t,r);if(n){var i=n.list,a=n.argumentIndex,o=function(t){var r=t.getChildren(),n=e.countWhere(r,(function(e){return 27!==e.kind}));r.length>0&&27===e.last(r).kind&&n++;return n}(i);return 0!==a&&e.Debug.assertLessThan(a,o),{list:i,argumentIndex:a,argumentCount:o,argumentsSpan:function(t,r){var n=t.getFullStart(),i=e.skipTrivia(r.text,t.getEnd(),!1);return e.createTextSpan(n,i-n)}(i,r)}}}function s(t,r,n){var i=t.parent;if(e.isCallOrNewExpression(i)){var a=i,s=o(t,n);if(!s)return;var c=s.list,u=s.argumentIndex,l=s.argumentCount,d=s.argumentsSpan;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===c.pos,invocation:{kind:0,node:a},argumentsSpan:d,argumentIndex:u,argumentCount:l}}if(e.isNoSubstitutionTemplateLiteral(t)&&e.isTaggedTemplateExpression(i))return e.isInsideTemplateLiteral(t,r,n)?_(i,0,n):void 0;if(e.isTemplateHead(t)&&197===i.parent.kind){var p=i,f=p.parent;return e.Debug.assert(210===p.kind),_(f,u=e.isInsideTemplateLiteral(t,r,n)?0:1,n)}if(e.isTemplateSpan(i)&&e.isTaggedTemplateExpression(i.parent.parent)){var m=i;f=i.parent.parent;if(e.isTemplateTail(t)&&!e.isInsideTemplateLiteral(t,r,n))return;return _(f,u=function(t,r,n,i){if(e.Debug.assert(n>=r.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralToken(r))return e.isInsideTemplateLiteral(r,n,i)?0:t+2;return t+1}(m.parent.templateSpans.indexOf(m),t,r,n),n)}if(e.isJsxOpeningLikeElement(i)){var g=i.attributes.pos,y=e.skipTrivia(n.text,i.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:e.createTextSpan(g,y-g),argumentIndex:0,argumentCount:1}}var h=e.getPossibleTypeArgumentsInfo(t,n);if(h){var v=h.called,b=h.nTypeArguments;return{isTypeParameterList:!0,invocation:a={kind:1,called:v},argumentsSpan:d=e.createTextSpanFromBounds(v.getStart(n),t.end),argumentIndex:b,argumentCount:b+1}}}function c(t){return e.isBinaryExpression(t.left)?c(t.left)+1:2}function u(t){return"__type"===t.name&&e.firstDefined(t.declarations,(function(t){return e.isFunctionTypeNode(t)?t.parent.symbol:void 0}))||t}function l(e,t){for(var r=0,n=0,i=e.getChildren();n<i.length;n++){var a=i[n];if(a===t)break;27!==a.kind&&r++}return r}function _(t,r,n){var i=e.isNoSubstitutionTemplateLiteral(t.template)?1:t.template.templateSpans.length+1;return 0!==r&&e.Debug.assertLessThan(r,i),{isTypeParameterList:!1,invocation:{kind:0,node:t},argumentsSpan:d(t,n),argumentIndex:r,argumentCount:i}}function d(t,r){var n=t.template,i=n.getStart(),a=n.getEnd();210===n.kind&&(0===e.last(n.templateSpans).literal.getFullWidth()&&(a=e.skipTrivia(r.text,a,!1)));return e.createTextSpan(i,a-i)}function p(t,r,n){var i=t.getChildren(n),a=i.indexOf(r);return e.Debug.assert(a>=0&&i.length>a+1),i[a+1]}function m(t){return 0===t.kind?e.getInvokedExpression(t.node):t.called}function g(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}!function(e){e[e.Call=0]="Call",e[e.TypeArgs=1]="TypeArgs",e[e.Contextual=2]="Contextual"}(n||(n={})),r.getSignatureHelpItems=function(t,r,n,i,l){var _=t.getTypeChecker(),d=e.findTokenOnLeftOfPosition(r,n);if(d){var p=!!i&&"characterTyped"===i.kind;if(!p||!e.isInString(r,n,d)&&!e.isInComment(r,n)){var y=!!i&&"invoked"===i.kind,b=function(t,r,n,i,a){for(var l=function(t){e.Debug.assert(e.rangeContainsRange(t.parent,t),"Not a subspan",(function(){return"Child: "+e.Debug.formatSyntaxKind(t.kind)+", parent: "+e.Debug.formatSyntaxKind(t.parent.kind)}));var a=function(t,r,n,i){return function(t,r,n,i){var a=function(t,r,n){if(20!==t.kind&&27!==t.kind)return;var i=t.parent;switch(i.kind){case 199:case 160:case 200:case 201:var a=o(t,r);if(!a)return;var s=a.argumentIndex,u=a.argumentCount,l=a.argumentsSpan,_=e.isMethodDeclaration(i)?n.getContextualTypeForObjectLiteralElement(i):n.getContextualType(i);return _&&{contextualType:_,argumentIndex:s,argumentCount:u,argumentsSpan:l};case 208:var d=function t(r){return e.isBinaryExpression(r.parent)?t(r.parent):r}(i),p=n.getContextualType(d),f=20===t.kind?0:c(i)-1,m=c(d);return p&&{contextualType:p,argumentIndex:f,argumentCount:m,argumentsSpan:e.createTextSpanFromNode(i)};default:return}}(t,n,i);if(!a)return;var s=a.contextualType,l=a.argumentIndex,_=a.argumentCount,d=a.argumentsSpan,p=s.getCallSignatures();return 1!==p.length?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:e.first(p),node:t,symbol:u(s.symbol)},argumentsSpan:d,argumentIndex:l,argumentCount:_}}(t,0,n,i)||s(t,r,n)}(t,r,n,i);if(a)return{value:a}},_=t;!e.isSourceFile(_)&&(a||!e.isBlock(_));_=_.parent){var d=l(_);if("object"===f(d))return d.value}return}(d,n,r,_,y);if(b){l.throwIfCancellationRequested();var x=function(t,r,n,i,o){var s=t.invocation,c=t.argumentCount;switch(s.kind){case 0:if(o&&!function(t,r,n){if(!e.isCallOrNewExpression(r))return!1;var i=r.getChildren(n);switch(t.kind){case 20:return e.contains(i,t);case 27:var o=e.findContainingList(t);return!!o&&e.contains(i,o);case 29:return a(t,n,r.expression);default:return!1}}(i,s.node,n))return;var u=[],l=r.getResolvedSignatureForSignatureHelp(s.node,u,c);return 0===u.length?void 0:{kind:0,candidates:u,resolvedSignature:l};case 1:var _=s.called;if(o&&!a(i,n,e.isIdentifier(_)?_.parent:_))return;if(0!==(u=e.getPossibleGenericSignatures(_,c,r)).length)return{kind:0,candidates:u,resolvedSignature:e.first(u)};var d=r.getSymbolAtLocation(_);return d&&{kind:1,symbol:d};case 2:return{kind:0,candidates:[s.signature],resolvedSignature:s.signature};default:return e.Debug.assertNever(s)}}(b,_,r,d,p);return l.throwIfCancellationRequested(),x?_.runWithCancellationToken(l,(function(e){return 0===x.kind?h(x.candidates,x.resolvedSignature,b,r,e):function(e,t,r,n){var i=t.argumentCount,a=t.argumentsSpan,o=t.invocation,s=t.argumentIndex,c=n.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);return c?{items:[v(e,c,n,g(o),r)],applicableSpan:a,selectedItemIndex:0,argumentIndex:s,argumentCount:i}:void 0}(x.symbol,b,r,e)})):e.isSourceFileJS(r)?function(t,r,n){if(2===t.invocation.kind)return;var i=m(t.invocation),a=e.isIdentifier(i)?i.text:e.isPropertyAccessExpression(i)?i.name.text:void 0,o=r.getTypeChecker();return void 0===a?void 0:e.firstDefined(r.getSourceFiles(),(function(r){return e.firstDefined(r.getNamedDeclarations().get(a),(function(e){var i=e.symbol&&o.getTypeOfSymbolAtLocation(e.symbol,e),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,(function(e){return h(a,a[0],t,r,e)}))}))}))}(b,t,l):void 0}}}},function(e){e[e.Candidate=0]="Candidate",e[e.Type=1]="Type"}(i||(i={})),r.getArgumentInfoForCompletions=function(e,t,r){var n=s(e,t,r);return!n||n.isTypeParameterList||0!==n.invocation.kind?void 0:{invocation:n.invocation.node,argumentCount:n.argumentCount,argumentIndex:n.argumentIndex}};var y=70246400;function h(r,n,i,a,o){var s=i.isTypeParameterList,c=i.argumentCount,u=i.argumentsSpan,l=i.invocation,_=i.argumentIndex,d=g(l),p=2===l.kind?l.symbol:o.getSymbolAtLocation(m(l)),f=p?e.symbolToDisplayParts(o,p,void 0,void 0):e.emptyArray,y=r.map((function(r){return function(r,n,i,a,o,s){var c=(i?x:D)(r,a,o,s),u=c.isVariadic,l=c.parameters,_=c.prefix,d=c.suffix,p=t(n,_),f=t(d,function(t,r,n){return e.mapToDisplayParts((function(e){e.writePunctuation(":"),e.writeSpace(" ");var i=n.getTypePredicateOfSignature(t);i?n.writeTypePredicate(i,r,void 0,e):n.writeType(n.getReturnTypeOfSignature(t),r,void 0,e)}))}(r,o,a)),m=r.getDocumentationComment(a),g=r.getJsDocTags();return{isVariadic:u,prefixDisplayParts:p,suffixDisplayParts:f,separatorDisplayParts:b,parameters:l,documentation:m,tags:g}}(r,f,s,o,d,a)}));0!==_&&e.Debug.assertLessThan(_,c);var h=r.indexOf(n);return e.Debug.assert(-1!==h),{items:y,applicableSpan:u,selectedItemIndex:h,argumentIndex:_,argumentCount:c}}function v(r,n,i,a,o){var s=e.symbolToDisplayParts(i,r),c=e.createPrinter({removeComments:!0}),u=n.map((function(e){return S(e,i,a,o,c)})),l=r.getDocumentationComment(i),_=r.getJsDocTags();return{isVariadic:!1,prefixDisplayParts:t(s,[e.punctuationPart(29)]),suffixDisplayParts:[e.punctuationPart(31)],separatorDisplayParts:b,parameters:u,documentation:l,tags:_}}var b=[e.punctuationPart(27),e.spacePart()];function x(r,n,i,a){var o=(r.target||r).typeParameters,s=e.createPrinter({removeComments:!0}),c=(o||e.emptyArray).map((function(e){return S(e,n,i,a,s)})),u=e.mapToDisplayParts((function(o){var c=r.thisParameter?[n.symbolToParameterDeclaration(r.thisParameter,i,y)]:[],u=e.createNodeArray(t(c,n.getExpandedParameters(r).map((function(e){return n.symbolToParameterDeclaration(e,i,y)}))));s.writeList(2576,u,a,o)}));return{isVariadic:!1,parameters:c,prefix:[e.punctuationPart(29)],suffix:t([e.punctuationPart(31)],u)}}function D(r,n,i,a){var o=n.hasEffectiveRestParameter(r),s=e.createPrinter({removeComments:!0}),c=e.mapToDisplayParts((function(t){if(r.typeParameters&&r.typeParameters.length){var o=e.createNodeArray(r.typeParameters.map((function(e){return n.typeParameterToDeclaration(e,i)})));s.writeList(53776,o,a,t)}}));return{isVariadic:o,parameters:n.getExpandedParameters(r).map((function(t){return function(t,r,n,i,a){var o=e.mapToDisplayParts((function(e){var o=r.symbolToParameterDeclaration(t,n,y);a.writeNode(4,o,i,e)})),s=r.isOptionalParameter(t.valueDeclaration);return{name:t.name,documentation:t.getDocumentationComment(r),displayParts:o,isOptional:s}}(t,n,i,a,s)})),prefix:t(c,[e.punctuationPart(20)]),suffix:[e.punctuationPart(21)]}}function S(t,r,n,i,a){var o=e.mapToDisplayParts((function(e){var o=r.typeParameterToDeclaration(t,n);a.writeNode(4,o,i,e)}));return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(r),displayParts:o,isOptional:!1}}}(e.SignatureHelp||(e.SignatureHelp={}))}(s||(s={})),function(e){var t=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;function r(t,r,n){var i=e.tryParseRawSourceMap(r);if(i&&i.sources&&i.file&&i.mappings)return e.createDocumentPositionMapper(t,i,n)}e.getSourceMapper=function(t){var r=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames()),n=t.getCurrentDirectory(),i=e.createMap(),a=e.createMap();return{tryGetSourcePosition:function t(r){if(!e.isDeclarationFileName(r.fileName))return;var n=c(r.fileName);if(!n)return;var i=s(r.fileName).getSourcePosition(r);return i&&i!==r?t(i)||i:void 0},tryGetGeneratedPosition:function(i){if(e.isDeclarationFileName(i.fileName))return;var a=c(i.fileName);if(!a)return;var o=t.getProgram();if(o.isSourceOfProjectReferenceRedirect(a.fileName))return;var u=o.getCompilerOptions(),l=u.outFile||u.out,_=l?e.removeFileExtension(l)+".d.ts":e.getDeclarationEmitOutputFilePathWorker(i.fileName,o.getCompilerOptions(),n,o.getCommonSourceDirectory(),r);if(void 0===_)return;var d=s(_,i.fileName).getGeneratedPosition(i);return d===i?void 0:d},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){i.clear(),a.clear()}};function o(t){return e.toPath(t,n,r)}function s(n,i){var s,c=o(n),u=a.get(c);if(u)return u;if(t.getDocumentPositionMapper)s=t.getDocumentPositionMapper(n,i);else if(t.readFile){var _=l(n);s=_&&e.getDocumentPositionMapper({getSourceFileLike:l,getCanonicalFileName:r,log:function(e){return t.log(e)}},n,e.getLineInfo(_.text,e.getLineStarts(_)),(function(e){return!t.fileExists||t.fileExists(e)?t.readFile(e):void 0}))}return a.set(c,s||e.identitySourceMapConsumer),s||e.identitySourceMapConsumer}function c(e){var r=t.getProgram();if(r){var n=o(e),i=r.getSourceFileByPath(n);return i&&i.resolvedPath===n?i:void 0}}function u(r){var n=o(r),a=i.get(n);if(void 0!==a)return a||void 0;if(t.readFile&&(!t.fileExists||t.fileExists(n))){var s=t.readFile(n),c=!!s&&function(t,r){return{text:t,lineMap:r,getLineAndCharacterOfPosition:function(t){return e.computeLineAndCharacterOfPosition(e.getLineStarts(this),t)}}}(s);return i.set(n,c),c||void 0}i.set(n,!1)}function l(e){return t.getSourceFileLike?t.getSourceFileLike(e):c(e)||u(e)}},e.getDocumentPositionMapper=function(n,i,a,o){var s=e.tryGetSourceMappingURL(a);if(s){var c=t.exec(s);if(c){if(c[1]){var u=c[1];return r(n,e.base64decode(e.sys,u),i)}s=void 0}}var l=[];s&&l.push(s),l.push(i+".map");for(var _=s&&e.getNormalizedAbsolutePath(s,e.getDirectoryPath(i)),d=0,p=l;d<p.length;d++){var f=p[d],m=e.getNormalizedAbsolutePath(f,e.getDirectoryPath(i)),g=o(m,_);if(e.isString(g))return r(n,g,m);if(void 0!==g)return g||void 0}}}(s||(s={})),function(e){var t=e.createMap();function r(t){switch(t.kind){case 253:var r=t.importClause,n=t.moduleSpecifier;return r&&!r.name&&r.namedBindings&&255===r.namedBindings.kind&&e.isStringLiteral(n)?r.namedBindings.name:void 0;case 252:return t.name;default:return}}function n(t){return e.isReturnStatement(t)&&!!t.expression&&i(t.expression)}function i(t){if(!a(t)||!t.arguments.every(o))return!1;for(var r=t.expression;a(r)||e.isPropertyAccessExpression(r);){if(e.isCallExpression(r)&&!r.arguments.every(o))return!1;r=r.expression}return!0}function a(t){return e.isCallExpression(t)&&(e.hasPropertyAccessExpressionWithName(t,"then")||e.hasPropertyAccessExpressionWithName(t,"catch"))}function o(e){switch(e.kind){case 243:case 200:case 201:t.set(s(e),!0);case 99:case 75:return!0;default:return!1}}function s(e){return e.pos.toString()+":"+e.end.toString()}e.computeSuggestionDiagnostics=function(i,a,o){a.getSemanticDiagnostics(i,o);var c,u=[],l=a.getTypeChecker();i.commonJsModuleIndicator&&(e.programContainsEs6Modules(a)||e.compilerOptionsIndicateEs6Modules(a.getCompilerOptions()))&&function(t){return t.statements.some((function(t){switch(t.kind){case 224:return t.declarationList.declarations.some((function(t){return!!t.initializer&&e.isRequireCall(function t(r){return e.isPropertyAccessExpression(r)?t(r.expression):r}(t.initializer),!0)}));case 225:var r=t.expression;if(!e.isBinaryExpression(r))return e.isRequireCall(r,!0);var n=e.getAssignmentDeclarationKind(r);return 1===n||2===n;default:return!1}}))}(i)&&u.push(e.createDiagnosticForNode((c=i.commonJsModuleIndicator,e.isBinaryExpression(c)?c.left:c),e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module));var _=e.isSourceFileJS(i);if(t.clear(),function r(a){if(_)switch(a.kind){case 200:var o=e.getDeclarationOfExpando(a);if(o){var c=o.symbol;if(c&&(c.exports&&c.exports.size||c.members&&c.members.size)){u.push(e.createDiagnosticForNode(e.isVariableDeclaration(a.parent)?a.parent.name:a,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration));break}}case 243:var d=a.symbol;d.members&&d.members.size>0&&u.push(e.createDiagnosticForNode(e.isVariableDeclaration(a.parent)?a.parent.name:a,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration))}else{if(e.isVariableStatement(a)&&a.parent===i&&2&a.declarationList.flags&&1===a.declarationList.declarations.length){var p=a.declarationList.declarations[0].initializer;p&&e.isRequireCall(p,!0)&&u.push(e.createDiagnosticForNode(p,e.Diagnostics.require_call_may_be_converted_to_an_import))}e.codefix.parameterShouldGetTypeFromJSDoc(a)&&u.push(e.createDiagnosticForNode(a.name||a,e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types))}e.isFunctionLikeDeclaration(a)&&function(r,i,a){(function(t,r){return!e.isAsyncFunction(t)&&t.body&&e.isBlock(t.body)&&(i=t.body,!!e.forEachReturnStatement(i,n))&&function(e,t){var r=t.getTypeAtLocation(e),n=t.getSignaturesOfType(r,0),i=n.length?t.getReturnTypeOfSignature(n[0]):void 0;return!!i&&!!t.getPromisedTypeOfPromise(i)}(t,r);var i})(r,i)&&!t.has(s(r))&&a.push(e.createDiagnosticForNode(!r.name&&e.isVariableDeclaration(r.parent)&&e.isIdentifier(r.parent.name)?r.parent.name:r,e.Diagnostics.This_may_be_converted_to_an_async_function))}(a,l,u);a.forEachChild(r)}(i),e.getAllowSyntheticDefaultImports(a.getCompilerOptions()))for(var d=0,p=i.imports;d<p.length;d++){var f=p[d],m=r(e.importFromModuleSpecifier(f));if(m){var g=e.getResolvedModule(i,f.text),y=g&&a.getSourceFile(g.resolvedFileName);y&&y.externalModuleIndicator&&e.isExportAssignment(y.externalModuleIndicator)&&y.externalModuleIndicator.isExportEquals&&u.push(e.createDiagnosticForNode(m,e.Diagnostics.Import_may_be_converted_to_a_default_import))}}return e.addRange(u,i.bindSuggestionDiagnostics),e.addRange(u,a.getSuggestionDiagnostics(i,o)),u.sort((function(e,t){return e.start-t.start}))},e.isReturnStatementWithFixablePromiseHandler=n,e.isFixablePromiseHandler=i}(s||(s={})),function(e){!function(t){function r(t,r,i){var a=n(t,r,i);if(""!==a)return a;var o=e.getCombinedLocalAndExportSymbolFlags(r);return 32&o?e.getDeclarationOfKind(r,213)?"local class":"class":384&o?"enum":524288&o?"type":64&o?"interface":262144&o?"type parameter":262144&o?"type parameter":8&o?"enum member":2097152&o?"alias":1536&o?"module":a}function n(t,r,n){var a=t.getRootSymbols(r);if(1===a.length&&8192&e.first(a).flags&&0!==t.getTypeOfSymbolAtLocation(r,n).getNonNullableType().getCallSignatures().length)return"method";if(t.isUndefinedSymbol(r))return"var";if(t.isArgumentsSymbol(r))return"local var";if(103===n.kind&&e.isExpression(n))return"parameter";var o=e.getCombinedLocalAndExportSymbolFlags(r);if(3&o)return e.isFirstDeclarationOfSymbolParameter(r)?"parameter":r.valueDeclaration&&e.isVarConst(r.valueDeclaration)?"const":e.forEach(r.declarations,e.isLet)?"let":i(r)?"local var":"var";if(16&o)return i(r)?"local function":"function";if(32768&o)return"getter";if(65536&o)return"setter";if(8192&o)return"method";if(16384&o)return"constructor";if(4&o){if(33554432&o&&6&r.checkFlags){var s=e.forEach(t.getRootSymbols(r),(function(t){var r=t.getFlags();if(98311&r)return"property";e.Debug.assert(!!(8208&r))}));return s||(t.getTypeOfSymbolAtLocation(r,n).getCallSignatures().length?"method":"property")}switch(n.parent&&n.parent.kind){case 266:case 264:case 265:return 75===n.kind?"property":"JSX attribute";case 271:return"JSX attribute";default:return"property"}}return""}function i(t){return!t.parent&&e.forEach(t.declarations,(function(t){if(200===t.kind)return!0;if(241!==t.kind&&243!==t.kind)return!1;for(var r=t.parent;!e.isFunctionBlock(r);r=r.parent)if(288===r.kind||249===r.kind)return!1;return!0}))}t.getSymbolKind=r,t.getSymbolModifiers=function(t){var r=t&&t.declarations&&t.declarations.length>0?e.getNodeModifiers(t.declarations[0]):"",n=t&&16777216&t.flags?"optional":"";return r&&n?r+","+n:r||n},t.getSymbolDisplayPartsDocumentationAndSymbolKind=function t(i,a,o,s,c,u,l){void 0===u&&(u=e.getMeaningFromLocation(c));var _,d,p,f,m,g,y=[],h=e.getCombinedLocalAndExportSymbolFlags(a),v=1&u?n(i,a,c):"",b=!1,x=103===c.kind&&e.isInExpressionContext(c);if(103===c.kind&&!x)return{displayParts:[e.keywordPart(103)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==v||32&h||2097152&h){"getter"!==v&&"setter"!==v||(v="property");var D=void 0;if(p=x?i.getTypeAtLocation(c):i.getTypeOfSymbolAtLocation(a.exportSymbol||a,c),c.parent&&193===c.parent.kind){var S=c.parent.name;(S===c||S&&0===S.getFullWidth())&&(c=c.parent)}var T=void 0;if(e.isCallOrNewExpression(c)?T=c:e.isCallExpressionTarget(c)||e.isNewExpressionTarget(c)?T=c.parent:c.parent&&e.isJsxOpeningLikeElement(c.parent)&&e.isFunctionLike(a.valueDeclaration)&&(T=c.parent),T){D=i.getResolvedSignature(T);var E=196===T.kind||e.isCallExpression(T)&&101===T.expression.kind,C=E?p.getConstructSignatures():p.getCallSignatures();if(e.contains(C,D.target)||e.contains(C,D)||(D=C.length?C[0]:void 0),D){switch(E&&32&h?(v="constructor",G(p.symbol,v)):2097152&h?(H(v="alias"),y.push(e.spacePart()),E&&(y.push(e.keywordPart(98)),y.push(e.spacePart())),W(a)):G(a,v),v){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":y.push(e.punctuationPart(58)),y.push(e.spacePart()),16&e.getObjectFlags(p)||!p.symbol||(e.addRange(y,e.symbolToDisplayParts(i,p.symbol,s,void 0,5)),y.push(e.lineBreakPart())),E&&(y.push(e.keywordPart(98)),y.push(e.spacePart())),Y(D,C,262144);break;default:Y(D,C)}b=!0}}else if(e.isNameOfFunctionDeclaration(c)&&!(98304&h)||128===c.kind&&161===c.parent.kind){var k=c.parent;if(a.declarations&&e.find(a.declarations,(function(e){return e===(128===c.kind?k.parent:k)}))){C=161===k.kind?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures();D=i.isImplementationOfOverload(k)?C[0]:i.getSignatureFromDeclaration(k),161===k.kind?(v="constructor",G(p.symbol,v)):G(164!==k.kind||2048&p.symbol.flags||4096&p.symbol.flags?a:p.symbol,v),Y(D,C),b=!0}}}if(32&h&&!b&&!x&&(V(),e.getDeclarationOfKind(a,213)?H("local class"):y.push(e.keywordPart(79)),y.push(e.spacePart()),W(a),X(a,o)),64&h&&2&u&&(U(),y.push(e.keywordPart(113)),y.push(e.spacePart()),W(a),X(a,o)),524288&h&&2&u&&(U(),y.push(e.keywordPart(144)),y.push(e.spacePart()),W(a),X(a,o),y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),e.addRange(y,e.typeToDisplayParts(i,i.getDeclaredTypeOfSymbol(a),s,8388608))),384&h&&(U(),e.some(a.declarations,(function(t){return e.isEnumDeclaration(t)&&e.isEnumConst(t)}))&&(y.push(e.keywordPart(80)),y.push(e.spacePart())),y.push(e.keywordPart(87)),y.push(e.spacePart()),W(a)),1536&h&&!x){U();var N=(K=e.getDeclarationOfKind(a,248))&&K.name&&75===K.name.kind;y.push(e.keywordPart(N?135:134)),y.push(e.spacePart()),W(a)}if(262144&h&&2&u)if(U(),y.push(e.punctuationPart(20)),y.push(e.textPart("type parameter")),y.push(e.punctuationPart(21)),y.push(e.spacePart()),W(a),a.parent)q(),W(a.parent,s),X(a.parent,s);else{var A=e.getDeclarationOfKind(a,154);if(void 0===A)return e.Debug.fail();if(K=A.parent)if(e.isFunctionLikeKind(K.kind)){q();D=i.getSignatureFromDeclaration(K);165===K.kind?(y.push(e.keywordPart(98)),y.push(e.spacePart())):164!==K.kind&&K.name&&W(K.symbol),e.addRange(y,e.signatureToDisplayParts(i,D,o,32))}else 246===K.kind&&(q(),y.push(e.keywordPart(144)),y.push(e.spacePart()),W(K.symbol),X(K.symbol,o))}if(8&h&&(v="enum member",G(a,"enum member"),282===(K=a.declarations[0]).kind)){var F=i.getConstantValue(K);void 0!==F&&(y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),y.push(e.displayPart(e.getTextOfConstantValue(F),"number"==typeof F?e.SymbolDisplayPartKind.numericLiteral:e.SymbolDisplayPartKind.stringLiteral)))}if(2097152&h){if(U(),!b){var P=i.getAliasedSymbol(a);if(P!==a&&P.declarations&&P.declarations.length>0){var w=P.declarations[0],I=e.getNameOfDeclaration(w);if(I){var O=e.isModuleWithStringLiteralName(w)&&e.hasModifier(w,2),M="default"!==a.name&&!O,L=t(i,P,e.getSourceFileOfNode(w),w,I,u,M?a:P);y.push.apply(y,L.displayParts),y.push(e.lineBreakPart()),m=L.documentation,g=L.tags}}}switch(a.declarations[0].kind){case 251:y.push(e.keywordPart(88)),y.push(e.spacePart()),y.push(e.keywordPart(135));break;case 258:y.push(e.keywordPart(88)),y.push(e.spacePart()),y.push(e.keywordPart(a.declarations[0].isExportEquals?62:83));break;case 261:y.push(e.keywordPart(88));break;default:y.push(e.keywordPart(95))}y.push(e.spacePart()),W(a),e.forEach(a.declarations,(function(t){if(252===t.kind){var r=t;if(e.isExternalModuleImportEqualsDeclaration(r))y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),y.push(e.keywordPart(138)),y.push(e.punctuationPart(20)),y.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(r)),e.SymbolDisplayPartKind.stringLiteral)),y.push(e.punctuationPart(21));else{var n=i.getSymbolAtLocation(r.moduleReference);n&&(y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),W(n,s))}return!0}}))}if(!b)if(""!==v){if(p)if(x?(U(),y.push(e.keywordPart(103))):G(a,v),"property"===v||"JSX attribute"===v||3&h||"local var"===v||x)if(y.push(e.punctuationPart(58)),y.push(e.spacePart()),p.symbol&&262144&p.symbol.flags){var R=e.mapToDisplayParts((function(t){var r=i.typeParameterToDeclaration(p,s);z().writeNode(4,r,e.getSourceFileOfNode(e.getParseTreeNode(s)),t)}));e.addRange(y,R)}else e.addRange(y,e.typeToDisplayParts(i,p,s));else if(16&h||8192&h||16384&h||131072&h||98304&h||"method"===v){(C=p.getNonNullableType().getCallSignatures()).length&&Y(C[0],C)}}else v=r(i,a,c);if(!_&&(_=a.getDocumentationComment(i),d=a.getJsDocTags(),0===_.length&&4&h&&a.parent&&e.forEach(a.parent.declarations,(function(e){return 288===e.kind}))))for(var B=0,j=a.declarations;B<j.length;B++){var K;if((K=j[B]).parent&&208===K.parent.kind){var J=i.getSymbolAtLocation(K.parent.right);if(J&&(_=J.getDocumentationComment(i),d=J.getJsDocTags(),_.length>0))break}}return 0===_.length&&m&&(_=m),0===d.length&&g&&(d=g),{displayParts:y,documentation:_,symbolKind:v,tags:0===d.length?void 0:d};function z(){return f||(f=e.createPrinter({removeComments:!0})),f}function U(){y.length&&y.push(e.lineBreakPart()),V()}function V(){l&&(H("alias"),y.push(e.spacePart()))}function q(){y.push(e.spacePart()),y.push(e.keywordPart(96)),y.push(e.spacePart())}function W(t,r){l&&t===a&&(t=l);var n=e.symbolToDisplayParts(i,t,r||o,void 0,7);e.addRange(y,n),16777216&a.flags&&y.push(e.punctuationPart(57))}function G(t,r){U(),r&&(H(r),t&&!e.some(t.declarations,(function(t){return e.isArrowFunction(t)||(e.isFunctionExpression(t)||e.isClassExpression(t))&&!t.name}))&&(y.push(e.spacePart()),W(t)))}function H(t){switch(t){case"var":case"function":case"let":case"const":case"constructor":return void y.push(e.textOrKeywordPart(t));default:return y.push(e.punctuationPart(20)),y.push(e.textOrKeywordPart(t)),void y.push(e.punctuationPart(21))}}function Y(t,r,n){void 0===n&&(n=0),e.addRange(y,e.signatureToDisplayParts(i,t,s,32|n)),r.length>1&&(y.push(e.spacePart()),y.push(e.punctuationPart(20)),y.push(e.operatorPart(39)),y.push(e.displayPart((r.length-1).toString(),e.SymbolDisplayPartKind.numericLiteral)),y.push(e.spacePart()),y.push(e.textPart(2===r.length?"overload":"overloads")),y.push(e.punctuationPart(21)));var a=t.getDocumentationComment(i);_=0===a.length?void 0:a,d=t.getJsDocTags()}function X(t,r){var n=e.mapToDisplayParts((function(n){var a=i.symbolToTypeParameterDeclarations(t,r);z().writeList(53776,a,e.getSourceFileOfNode(e.getParseTreeNode(r)),n)}));e.addRange(y,n)}}}(e.SymbolDisplay||(e.SymbolDisplay={}))}(s||(s={})),function(e){function t(t,r){var i=[],a=r.compilerOptions?n(r.compilerOptions,i):{},o=e.getDefaultCompilerOptions();for(var s in o)e.hasProperty(o,s)&&void 0===a[s]&&(a[s]=o[s]);for(var c=0,u=e.transpileOptionValueCompilerOptions;c<u.length;c++){var l=u[c];a[l.name]=l.transpileOptionValue}a.suppressOutputPathCheck=!0,a.allowNonTsExtensions=!0;var _=r.fileName||(r.compilerOptions&&r.compilerOptions.jsx?"module.tsx":"module.ts"),d=e.createSourceFile(_,t,a.target);r.moduleName&&(d.moduleName=r.moduleName),r.renamedDependencies&&(d.renamedDependencies=e.createMapFromTemplate(r.renamedDependencies));var p,f,m=e.getNewLineCharacter(a),g={getSourceFile:function(t){return t===e.normalizePath(_)?d:void 0},writeFile:function(t,r){e.fileExtensionIs(t,".map")?(e.Debug.assertEqual(f,void 0,"Unexpected multiple source map outputs, file:",t),f=r):(e.Debug.assertEqual(p,void 0,"Unexpected multiple outputs, file:",t),p=r)},getDefaultLibFileName:function(){return"lib.d.ts"},useCaseSensitiveFileNames:function(){return!1},getCanonicalFileName:function(e){return e},getCurrentDirectory:function(){return""},getNewLine:function(){return m},fileExists:function(e){return e===_},readFile:function(){return""},directoryExists:function(){return!0},getDirectories:function(){return[]}},y=e.createProgram([_],a,g);return r.reportDiagnostics&&(e.addRange(i,y.getSyntacticDiagnostics(d)),e.addRange(i,y.getOptionsDiagnostics())),y.emit(void 0,void 0,void 0,void 0,r.transformers),void 0===p?e.Debug.fail("Output generation failed"):{outputText:p,diagnostics:i,sourceMapText:f}}var r;function n(t,n){r=r||e.filter(e.optionDeclarations,(function(t){return"object"===f(t.type)&&!e.forEachEntry(t.type,(function(e){return"number"!=typeof e}))})),t=e.cloneCompilerOptions(t);for(var i=function(r){if(!e.hasProperty(t,r.name))return"continue";var i=t[r.name];e.isString(i)?t[r.name]=e.parseCustomTypeOption(r,i,n):e.forEachEntry(r.type,(function(e){return e===i}))||n.push(e.createCompilerDiagnosticForInvalidCustomType(r))},a=0,o=r;a<o.length;a++){i(o[a])}return t}e.transpileModule=t,e.transpile=function(r,n,i,a,o){var s=t(r,{compilerOptions:n,fileName:i,reportDiagnostics:!!a,moduleName:o});return e.addRange(a,s.diagnostics),s.outputText},e.fixupCompilerOptions=n}(s||(s={})),function(e){!function(t){!function(e){e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace"}(t.FormattingRequestKind||(t.FormattingRequestKind={}));var r=function(){function t(e,t,r){this.sourceFile=e,this.formattingRequestKind=t,this.options=r}return t.prototype.updateContext=function(t,r,n,i,a){this.currentTokenSpan=e.Debug.assertDefined(t),this.currentTokenParent=e.Debug.assertDefined(r),this.nextTokenSpan=e.Debug.assertDefined(n),this.nextTokenParent=e.Debug.assertDefined(i),this.contextNode=e.Debug.assertDefined(a),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0},t.prototype.ContextNodeAllOnSameLine=function(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine},t.prototype.NextNodeAllOnSameLine=function(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine},t.prototype.TokensAreOnSameLine=function(){if(void 0===this.tokensAreOnSameLine){var e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine},t.prototype.ContextNodeBlockIsOnOneLine=function(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine},t.prototype.NextNodeBlockIsOnOneLine=function(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine},t.prototype.NodeIsOnOneLine=function(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line},t.prototype.BlockIsOnOneLine=function(t){var r=e.findChildOfKind(t,18,this.sourceFile),n=e.findChildOfKind(t,19,this.sourceFile);return!(!r||!n)&&this.sourceFile.getLineAndCharacterOfPosition(r.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line},t}();t.FormattingContext=r}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){var r,n=e.createScanner(99,!1,0),i=e.createScanner(99,!1,1);!function(e){e[e.Scan=0]="Scan",e[e.RescanGreaterThanToken=1]="RescanGreaterThanToken",e[e.RescanSlashToken=2]="RescanSlashToken",e[e.RescanTemplateToken=3]="RescanTemplateToken",e[e.RescanJsxIdentifier=4]="RescanJsxIdentifier",e[e.RescanJsxText=5]="RescanJsxText"}(r||(r={})),t.getFormattingScanner=function(r,a,o,s,c){var u=1===a?i:n;u.setText(r),u.setTextPos(o);var l,_,d,p,f,m=!0,g=c({advance:function(){f=void 0,u.getStartPos()!==o?m=!!_&&4===e.last(_).kind:u.scan();l=void 0,_=void 0;var t=u.getStartPos();for(;t<s;){var r=u.getToken();if(!e.isTrivia(r))break;u.scan();var n={pos:t,end:u.getStartPos(),kind:r};t=u.getStartPos(),l=e.append(l,n)}d=u.getStartPos()},readTokenInfo:function(r){e.Debug.assert(y());var n=function(e){switch(e.kind){case 33:case 70:case 71:case 49:case 48:return!0}return!1}(r)?1:(i=r,13===i.kind?2:function(e){return 16===e.kind||17===e.kind}(r)?3:function(t){if(t.parent)switch(t.parent.kind){case 271:case 266:case 267:case 265:return e.isKeyword(t.kind)||75===t.kind}return!1}(r)?4:function(e){return 11===e.kind}(r)?5:0);var i;if(f&&n===p)return v(f,r);u.getStartPos()!==d&&(e.Debug.assert(void 0!==f),u.setTextPos(d),u.scan());var a=function(t,r){var n=u.getToken();switch(p=0,r){case 1:if(31===n){p=1;var i=u.reScanGreaterToken();return e.Debug.assert(t.kind===i),i}break;case 2:if(43===(a=n)||67===a){p=2;i=u.reScanSlashToken();return e.Debug.assert(t.kind===i),i}break;case 3:if(19===n)return p=3,u.reScanTemplateToken();break;case 4:return p=4,u.scanJsxIdentifier();case 5:return p=5,u.reScanJsxToken();case 0:break;default:e.Debug.assertNever(r)}var a;return n}(r,n),o=t.createTextRangeWithKind(u.getStartPos(),u.getTextPos(),a);_&&(_=void 0);for(;u.getStartPos()<s&&(a=u.scan(),e.isTrivia(a));){var c=t.createTextRangeWithKind(u.getStartPos(),u.getTextPos(),a);if(_||(_=[]),_.push(c),4===a){u.scan();break}}return v(f={leadingTrivia:l,trailingTrivia:_,token:o},r)},readEOFTokenRange:function(){return e.Debug.assert(h()),t.createTextRangeWithKind(u.getStartPos(),u.getTextPos(),1)},isOnToken:y,isOnEOF:h,getCurrentLeadingTrivia:function(){return l},lastTrailingTriviaWasNewLine:function(){return m},skipToEndOf:function(e){u.setTextPos(e.end),d=u.getStartPos(),p=void 0,f=void 0,m=!1,l=void 0,_=void 0}});return f=void 0,u.setText(void 0),g;function y(){var t=f?f.token.kind:u.getToken();return(f?f.token.pos:u.getStartPos())<s&&1!==t&&!e.isTrivia(t)}function h(){return 1===(f?f.token.kind:u.getToken())}function v(t,r){return e.isToken(r)&&t.token.kind!==r.kind&&(t.token.kind=r.kind),t}}}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){t.anyContext=e.emptyArray,function(e){e[e.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",e[e.StopProcessingTokenActions=2]="StopProcessingTokenActions",e[e.InsertSpace=4]="InsertSpace",e[e.InsertNewLine=8]="InsertNewLine",e[e.DeleteSpace=16]="DeleteSpace",e[e.DeleteToken=32]="DeleteToken",e[e.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",e[e.StopAction=3]="StopAction",e[e.ModifySpaceAction=28]="ModifySpaceAction",e[e.ModifyTokenAction=96]="ModifyTokenAction"}(t.RuleAction||(t.RuleAction={})),function(e){e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines"}(t.RuleFlags||(t.RuleFlags={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(r){function n(e,t,r,n,i,o){return void 0===o&&(o=0),{leftTokenRange:a(t),rightTokenRange:a(r),rule:{debugName:e,context:n,action:i,flags:o}}}function i(e){return{tokens:e,isSpecific:!0}}function a(t){return"number"==typeof t?i([t]):e.isArray(t)?i(t):t}function o(t,r,n){void 0===n&&(n=[]);for(var a=[],o=t;o<=r;o++)e.contains(n,o)||a.push(o);return i(a)}function s(e,t){return function(r){return r.options&&r.options[e]===t}}function c(e){return function(t){return t.options&&t.options.hasOwnProperty(e)&&!!t.options[e]}}function u(e){return function(t){return t.options&&t.options.hasOwnProperty(e)&&!t.options[e]}}function l(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!t.options[e]}}function _(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!t.options[e]||t.TokensAreOnSameLine()}}function d(e){return function(t){return!t.options||!t.options.hasOwnProperty(e)||!!t.options[e]}}function p(e){return 229===e.contextNode.kind}function f(e){return!p(e)}function m(e){switch(e.contextNode.kind){case 208:case 209:case 179:case 216:case 261:case 257:case 167:case 177:case 178:return!0;case 190:case 246:case 252:case 241:case 155:case 282:case 158:case 157:return 62===e.currentTokenSpan.kind||62===e.nextTokenSpan.kind;case 230:case 154:return 96===e.currentTokenSpan.kind||96===e.nextTokenSpan.kind||62===e.currentTokenSpan.kind||62===e.nextTokenSpan.kind;case 231:return 151===e.currentTokenSpan.kind||151===e.nextTokenSpan.kind}return!1}function g(e){return!m(e)}function y(e){return!h(e)}function h(t){var r=t.contextNode.kind;return 158===r||157===r||155===r||241===r||e.isFunctionLikeKind(r)}function v(e){return 209===e.contextNode.kind||179===e.contextNode.kind}function b(e){return e.TokensAreOnSameLine()||E(e)}function x(e){return 188===e.contextNode.kind||185===e.contextNode.kind||function(e){return T(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function D(e){return E(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function S(e){return T(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function T(e){return C(e.contextNode)}function E(e){return C(e.nextTokenParent)}function C(e){if(P(e))return!0;switch(e.kind){case 222:case 250:case 192:case 249:return!0}return!1}function k(e){switch(e.contextNode.kind){case 243:case 160:case 159:case 162:case 163:case 164:case 200:case 161:case 201:case 245:return!0}return!1}function N(e){return!k(e)}function A(e){return 243===e.contextNode.kind||200===e.contextNode.kind}function F(e){return P(e.contextNode)}function P(e){switch(e.kind){case 244:case 213:case 245:case 247:case 172:case 248:case 259:case 260:case 253:case 256:return!0}return!1}function w(e){switch(e.currentTokenParent.kind){case 244:case 248:case 247:case 278:case 249:case 236:return!0;case 222:var t=e.currentTokenParent.parent;if(!t||201!==t.kind&&200!==t.kind)return!0}return!1}function I(e){switch(e.contextNode.kind){case 226:case 236:case 229:case 230:case 231:case 228:case 239:case 227:case 235:case 278:return!0;default:return!1}}function O(e){return 192===e.contextNode.kind}function M(e){return function(e){return 195===e.contextNode.kind}(e)||function(e){return 196===e.contextNode.kind}(e)}function L(e){return 27!==e.currentTokenSpan.kind}function R(e){return 23!==e.nextTokenSpan.kind}function B(e){return 201===e.contextNode.kind}function j(e){return 187===e.contextNode.kind}function K(e){return e.TokensAreOnSameLine()&&11!==e.contextNode.kind}function J(e){return 264!==e.contextNode.kind&&268!==e.contextNode.kind}function z(e){return 274===e.contextNode.kind||273===e.contextNode.kind}function U(e){return 271===e.nextTokenParent.kind}function V(e){return 271===e.contextNode.kind}function q(e){return 265===e.contextNode.kind}function W(e){return!k(e)&&!E(e)}function G(e){return e.TokensAreOnSameLine()&&!!e.contextNode.decorators&&H(e.currentTokenParent)&&!H(e.nextTokenParent)}function H(t){for(;e.isExpressionNode(t);)t=t.parent;return 156===t.kind}function Y(e){return 242===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function X(e){return 2!==e.formattingRequestKind}function Q(e){return 248===e.contextNode.kind}function $(e){return 172===e.contextNode.kind}function Z(e){return 165===e.contextNode.kind}function ee(e,t){if(29!==e.kind&&31!==e.kind)return!1;switch(t.kind){case 168:case 198:case 246:case 244:case 213:case 245:case 243:case 200:case 201:case 160:case 159:case 164:case 165:case 195:case 196:case 215:return!0;default:return!1}}function te(e){return ee(e.currentTokenSpan,e.currentTokenParent)||ee(e.nextTokenSpan,e.nextTokenParent)}function re(e){return 198===e.contextNode.kind}function ne(e){return 109===e.currentTokenSpan.kind&&204===e.currentTokenParent.kind}function ie(e){return 211===e.contextNode.kind&&void 0!==e.contextNode.expression}function ae(e){return 217===e.contextNode.kind}function oe(t){var r=t.nextTokenSpan.kind,n=t.nextTokenSpan.pos;if(e.isTrivia(r)){var i=t.nextTokenParent===t.currentTokenParent?e.findNextToken(t.currentTokenParent,e.findAncestor(t.currentTokenParent,(function(e){return!e.parent})),t.sourceFile):t.nextTokenParent.getFirstToken(t.sourceFile);if(!i)return!0;r=i.kind,n=i.getStart(t.sourceFile)}return t.sourceFile.getLineAndCharacterOfPosition(t.currentTokenSpan.pos).line===t.sourceFile.getLineAndCharacterOfPosition(n).line?19===r||1===r:221!==r&&26!==r&&(245===t.contextNode.kind||246===t.contextNode.kind?!e.isPropertySignature(t.currentTokenParent)||!!t.currentTokenParent.type||20!==r:e.isPropertyDeclaration(t.currentTokenParent)?!t.currentTokenParent.initializer:229!==t.currentTokenParent.kind&&223!==t.currentTokenParent.kind&&221!==t.currentTokenParent.kind&&22!==r&&20!==r&&39!==r&&40!==r&&43!==r&&13!==r&&27!==r&&210!==r&&15!==r&&14!==r&&24!==r)}function se(t){var r=e.findAncestor(t.currentTokenParent,(function(r){return r.end!==t.currentTokenSpan.end?"quit":e.syntaxMayBeASICandidate(r.kind)}));return!!r&&e.isASICandidate(r,t.sourceFile)}r.getAllRules=function(){for(var a=[],T=0;T<=151;T++)1!==T&&a.push(T);function C(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{tokens:a.filter((function(t){return!e.some((function(e){return e===t}))})),isSpecific:!1}}var P={tokens:a,isSpecific:!1},H=i(t(a,[3])),ee=i(t(a,[1])),ce=o(76,151),ue=o(29,74),le=[96,97,151,122,132],_e=t([75],e.typeKeywords),de=H,pe=i([75,3,79,88,95]),fe=i([21,3,85,106,91,86]),me=[n("IgnoreBeforeComment",P,[2,3],r.anyContext,1),n("IgnoreAfterLineComment",2,P,r.anyContext,1),n("NotSpaceBeforeColon",P,58,[K,g,y],16),n("SpaceAfterColon",58,P,[K,g],4),n("NoSpaceBeforeQuestionMark",P,57,[K,g],16),n("SpaceAfterQuestionMarkInConditionalOperator",57,P,[K,v],4),n("NoSpaceAfterQuestionMark",57,P,[K],16),n("NoSpaceBeforeDot",P,[24,28],[K],16),n("NoSpaceAfterDot",[24,28],P,[K],16),n("NoSpaceBetweenImportParenInImportType",95,20,[K,j],16),n("NoSpaceAfterUnaryPrefixOperator",[45,46,54,53],[8,9,75,20,22,18,103,98],[K,g],16),n("NoSpaceAfterUnaryPreincrementOperator",45,[75,20,103,98],[K],16),n("NoSpaceAfterUnaryPredecrementOperator",46,[75,20,103,98],[K],16),n("NoSpaceBeforeUnaryPostincrementOperator",[75,21,23,98],45,[K],16),n("NoSpaceBeforeUnaryPostdecrementOperator",[75,21,23,98],46,[K],16),n("SpaceAfterPostincrementWhenFollowedByAdd",45,39,[K,m],4),n("SpaceAfterAddWhenFollowedByUnaryPlus",39,39,[K,m],4),n("SpaceAfterAddWhenFollowedByPreincrement",39,45,[K,m],4),n("SpaceAfterPostdecrementWhenFollowedBySubtract",46,40,[K,m],4),n("SpaceAfterSubtractWhenFollowedByUnaryMinus",40,40,[K,m],4),n("SpaceAfterSubtractWhenFollowedByPredecrement",40,46,[K,m],4),n("NoSpaceAfterCloseBrace",19,[27,26],[K],16),n("NewLineBeforeCloseBraceInBlockContext",H,19,[S],8),n("SpaceAfterCloseBrace",19,C(21),[K,w],4),n("SpaceBetweenCloseBraceAndElse",19,86,[K],4),n("SpaceBetweenCloseBraceAndWhile",19,110,[K],4),n("NoSpaceBetweenEmptyBraceBrackets",18,19,[K,O],16),n("SpaceAfterConditionalClosingParen",21,22,[I],4),n("NoSpaceBetweenFunctionKeywordAndStar",93,41,[A],16),n("SpaceAfterStarInGeneratorDeclaration",41,75,[A],4),n("SpaceAfterFunctionInFuncDecl",93,P,[k],4),n("NewLineAfterOpenBraceInBlockContext",18,P,[S],8),n("SpaceAfterGetSetInMember",[130,141],75,[k],4),n("NoSpaceBetweenYieldKeywordAndStar",120,41,[K,ie],16),n("SpaceBetweenYieldOrYieldStarAndOperand",[120,41],P,[K,ie],4),n("NoSpaceBetweenReturnAndSemicolon",100,26,[K],16),n("SpaceAfterCertainKeywords",[108,104,98,84,100,107,126],P,[K],4),n("SpaceAfterLetConstInVariableDeclaration",[114,80],P,[K,Y],4),n("NoSpaceBeforeOpenParenInFuncCall",P,20,[K,M,L],16),n("SpaceBeforeBinaryKeywordOperator",P,le,[K,m],4),n("SpaceAfterBinaryKeywordOperator",le,P,[K,m],4),n("SpaceAfterVoidOperator",109,P,[K,ne],4),n("SpaceBetweenAsyncAndOpenParen",125,20,[B,K],4),n("SpaceBetweenAsyncAndFunctionKeyword",125,93,[K],4),n("NoSpaceBetweenTagAndTemplateString",[75,21],[14,15],[K],16),n("SpaceBeforeJsxAttribute",P,75,[U,K],4),n("SpaceBeforeSlashInJsxOpeningElement",P,43,[q,K],4),n("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",43,31,[q,K],16),n("NoSpaceBeforeEqualInJsxAttribute",P,62,[V,K],16),n("NoSpaceAfterEqualInJsxAttribute",62,P,[V,K],16),n("NoSpaceAfterModuleImport",[134,138],20,[K],16),n("SpaceAfterCertainTypeScriptKeywords",[121,79,129,83,87,88,89,130,112,95,113,134,135,116,118,117,137,141,119,144,148,133,131],P,[K],4),n("SpaceBeforeCertainTypeScriptKeywords",P,[89,112,148],[K],4),n("SpaceAfterModuleName",10,18,[Q],4),n("SpaceBeforeArrow",P,38,[K],4),n("SpaceAfterArrow",38,P,[K],4),n("NoSpaceAfterEllipsis",25,75,[K],16),n("NoSpaceAfterOptionalParameters",57,[21,27],[K,g],16),n("NoSpaceBetweenEmptyInterfaceBraceBrackets",18,19,[K,$],16),n("NoSpaceBeforeOpenAngularBracket",_e,29,[K,te],16),n("NoSpaceBetweenCloseParenAndAngularBracket",21,29,[K,te],16),n("NoSpaceAfterOpenAngularBracket",29,P,[K,te],16),n("NoSpaceBeforeCloseAngularBracket",P,31,[K,te],16),n("NoSpaceAfterCloseAngularBracket",31,[20,22,31,27],[K,te,N],16),n("SpaceBeforeAt",[21,75],59,[K],4),n("NoSpaceAfterAt",59,P,[K],16),n("SpaceAfterDecorator",P,[121,75,88,83,79,119,118,116,117,130,141,22,41],[G],4),n("NoSpaceBeforeNonNullAssertionOperator",P,53,[K,ae],16),n("NoSpaceAfterNewKeywordOnConstructorSignature",98,20,[K,Z],16),n("SpaceLessThanAndNonJSXTypeAnnotation",29,29,[K],4)],ge=[n("SpaceAfterConstructor",128,20,[c("insertSpaceAfterConstructor"),K],4),n("NoSpaceAfterConstructor",128,20,[l("insertSpaceAfterConstructor"),K],16),n("SpaceAfterComma",27,P,[c("insertSpaceAfterCommaDelimiter"),K,J,R],4),n("NoSpaceAfterComma",27,P,[l("insertSpaceAfterCommaDelimiter"),K,J],16),n("SpaceAfterAnonymousFunctionKeyword",[93,41],20,[c("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),k],4),n("NoSpaceAfterAnonymousFunctionKeyword",[93,41],20,[l("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),k],16),n("SpaceAfterKeywordInControl",ce,20,[c("insertSpaceAfterKeywordsInControlFlowStatements"),I],4),n("NoSpaceAfterKeywordInControl",ce,20,[l("insertSpaceAfterKeywordsInControlFlowStatements"),I],16),n("SpaceAfterOpenParen",20,P,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),K],4),n("SpaceBeforeCloseParen",P,21,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),K],4),n("SpaceBetweenOpenParens",20,20,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),K],4),n("NoSpaceBetweenParens",20,21,[K],16),n("NoSpaceAfterOpenParen",20,P,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),K],16),n("NoSpaceBeforeCloseParen",P,21,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),K],16),n("SpaceAfterOpenBracket",22,P,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),K],4),n("SpaceBeforeCloseBracket",P,23,[c("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),K],4),n("NoSpaceBetweenBrackets",22,23,[K],16),n("NoSpaceAfterOpenBracket",22,P,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),K],16),n("NoSpaceBeforeCloseBracket",P,23,[l("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),K],16),n("SpaceAfterOpenBrace",18,P,[d("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),x],4),n("SpaceBeforeCloseBrace",P,19,[d("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),x],4),n("NoSpaceBetweenEmptyBraceBrackets",18,19,[K,O],16),n("NoSpaceAfterOpenBrace",18,P,[u("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),K],16),n("NoSpaceBeforeCloseBrace",P,19,[u("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),K],16),n("SpaceAfterTemplateHeadAndMiddle",[15,16],P,[c("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),K],4),n("SpaceBeforeTemplateMiddleAndTail",P,[16,17],[c("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),K],4),n("NoSpaceAfterTemplateHeadAndMiddle",[15,16],P,[l("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),K],16),n("NoSpaceBeforeTemplateMiddleAndTail",P,[16,17],[l("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),K],16),n("SpaceAfterOpenBraceInJsxExpression",18,P,[c("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),K,z],4),n("SpaceBeforeCloseBraceInJsxExpression",P,19,[c("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),K,z],4),n("NoSpaceAfterOpenBraceInJsxExpression",18,P,[l("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),K,z],16),n("NoSpaceBeforeCloseBraceInJsxExpression",P,19,[l("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),K,z],16),n("SpaceAfterSemicolonInFor",26,P,[c("insertSpaceAfterSemicolonInForStatements"),K,p],4),n("NoSpaceAfterSemicolonInFor",26,P,[l("insertSpaceAfterSemicolonInForStatements"),K,p],16),n("SpaceBeforeBinaryOperator",P,ue,[c("insertSpaceBeforeAndAfterBinaryOperators"),K,m],4),n("SpaceAfterBinaryOperator",ue,P,[c("insertSpaceBeforeAndAfterBinaryOperators"),K,m],4),n("NoSpaceBeforeBinaryOperator",P,ue,[l("insertSpaceBeforeAndAfterBinaryOperators"),K,m],16),n("NoSpaceAfterBinaryOperator",ue,P,[l("insertSpaceBeforeAndAfterBinaryOperators"),K,m],16),n("SpaceBeforeOpenParenInFuncDecl",P,20,[c("insertSpaceBeforeFunctionParenthesis"),K,k],4),n("NoSpaceBeforeOpenParenInFuncDecl",P,20,[l("insertSpaceBeforeFunctionParenthesis"),K,k],16),n("NewLineBeforeOpenBraceInControl",fe,18,[c("placeOpenBraceOnNewLineForControlBlocks"),I,D],8,1),n("NewLineBeforeOpenBraceInFunction",de,18,[c("placeOpenBraceOnNewLineForFunctions"),k,D],8,1),n("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",pe,18,[c("placeOpenBraceOnNewLineForFunctions"),F,D],8,1),n("SpaceAfterTypeAssertion",31,P,[c("insertSpaceAfterTypeAssertion"),K,re],4),n("NoSpaceAfterTypeAssertion",31,P,[l("insertSpaceAfterTypeAssertion"),K,re],16),n("SpaceBeforeTypeAnnotation",P,58,[c("insertSpaceBeforeTypeAnnotation"),K,h],4),n("NoSpaceBeforeTypeAnnotation",P,58,[l("insertSpaceBeforeTypeAnnotation"),K,h],16),n("NoOptionalSemicolon",26,ee,[s("semicolons",e.SemicolonPreference.Remove),oe],32),n("OptionalSemicolon",P,ee,[s("semicolons",e.SemicolonPreference.Insert),se],64)],ye=[n("NoSpaceBeforeSemicolon",P,26,[K],16),n("SpaceBeforeOpenBraceInControl",fe,18,[_("placeOpenBraceOnNewLineForControlBlocks"),I,X,b],4,1),n("SpaceBeforeOpenBraceInFunction",de,18,[_("placeOpenBraceOnNewLineForFunctions"),k,E,X,b],4,1),n("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",pe,18,[_("placeOpenBraceOnNewLineForFunctions"),F,X,b],4,1),n("NoSpaceBeforeComma",P,27,[K],16),n("NoSpaceBeforeOpenBracket",C(125,77),22,[K],16),n("NoSpaceAfterCloseBracket",23,P,[K,W],16),n("SpaceAfterSemicolon",26,P,[K],4),n("SpaceBetweenForAndAwaitKeyword",92,126,[K],4),n("SpaceBetweenStatements",[21,85,86,77],P,[K,J,f],4),n("SpaceAfterTryFinally",[106,91],18,[K],4)];return t(me,ge,ye)}}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){var r;function n(){var n,o;return void 0===r&&(n=t.getAllRules(),o=function(e){for(var t=new Array(u*u),r=new Array(t.length),n=0,i=e;n<i.length;n++)for(var o=i[n],s=o.leftTokenRange.isSpecific&&o.rightTokenRange.isSpecific,c=0,_=o.leftTokenRange.tokens;c<_.length;c++)for(var d=_[c],p=0,f=o.rightTokenRange.tokens;p<f.length;p++){var m=f[p],g=a(d,m),y=t[g];void 0===y&&(y=t[g]=[]),l(y,o.rule,s,r,g)}return t}(n),r=function(t){var r=o[a(t.currentTokenSpan.kind,t.nextTokenSpan.kind)];if(r){for(var n=[],s=0,c=0,u=r;c<u.length;c++){var l=u[c],_=~i(s);l.action&_&&e.every(l.context,(function(e){return e(t)}))&&(n.push(l),s|=l.action)}if(n.length)return n}}),r}function i(e){var t=0;return 1&e&&(t|=28),2&e&&(t|=96),28&e&&(t|=28),96&e&&(t|=96),t}function a(t,r){return e.Debug.assert(t<=151&&r<=151,"Must compute formatting context from tokens"),t*u+r}t.getFormatContext=function(e){return{options:e,getRules:n()}};var o,s=5,c=31,u=152;function l(r,n,i,a,u){var l,_,d,p=3&n.action?i?o.StopRulesSpecific:o.StopRulesAny:n.context!==t.anyContext?i?o.ContextRulesSpecific:o.ContextRulesAny:i?o.NoContextRulesSpecific:o.NoContextRulesAny,f=a[u]||0;r.splice(function(e,t){for(var r=0,n=0;n<=t;n+=s)r+=e&c,e>>=s;return r}(f,p),0,n),a[u]=(d=1+((l=f)>>(_=p)&c),e.Debug.assert((d&c)===d,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),l&~(c<<_)|d<<_)}!function(e){e[e.StopRulesSpecific=0]="StopRulesSpecific",e[e.StopRulesAny=1*s]="StopRulesAny",e[e.ContextRulesSpecific=2*s]="ContextRulesSpecific",e[e.ContextRulesAny=3*s]="ContextRulesAny",e[e.NoContextRulesSpecific=4*s]="NoContextRulesSpecific",e[e.NoContextRulesAny=5*s]="NoContextRulesAny"}(o||(o={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){var r,n,i,a,o;function s(t,r,n){var i=e.findPrecedingToken(t,n);return i&&i.kind===r&&t===i.getEnd()?i:void 0}function c(e){for(var t=e;t&&t.parent&&t.parent.end===e.end&&!u(t.parent,t);)t=t.parent;return t}function u(t,r){switch(t.kind){case 244:case 245:return e.rangeContainsRange(t.members,r);case 248:var n=t.body;return!!n&&249===n.kind&&e.rangeContainsRange(n.statements,r);case 288:case 222:case 249:return e.rangeContainsRange(t.statements,r);case 278:return e.rangeContainsRange(t.block.statements,r)}return!1}function l(t,r,n,i){return t?_({pos:e.getLineStartPositionForPosition(t.getStart(r),r),end:t.end},r,n,i):[]}function _(r,n,i,a){var o=function(t,r){return function n(i){var a=e.forEachChild(i,(function(n){return e.startEndContainsRange(n.getStart(r),n.end,t)&&n}));if(a){var o=n(a);if(o)return o}return i}(r)}(r,n);return t.getFormattingScanner(n.text,n.languageVariant,function(t,r,n){var i=t.getStart(n);if(i===r.pos&&t.end===r.end)return i;var a=e.findPrecedingToken(r.pos,n);return a?a.end>=r.pos?t.pos:a.end:t.pos}(o,r,n),r.end,(function(s){return d(r,o,t.SmartIndenter.getIndentationForNode(o,r,n,i.options),function(e,r,n){for(var i,a=-1;e;){var o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==a&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(r,e,i,n))return r.indentSize;a=o,i=e,e=e.parent}return 0}(o,i.options,n),s,i,a,function(t,r){if(!t.length)return a;var n=t.filter((function(t){return e.rangeOverlapsWithStartEnd(r,t.start,t.start+t.length)})).sort((function(e,t){return e.start-t.start}));if(!n.length)return a;var i=0;return function(t){for(;;){if(i>=n.length)return!1;var r=n[i];if(t.end<=r.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,r.start,r.start+r.length))return!0;i++}};function a(){return!1}}(n.parseDiagnostics,r),n)}))}function d(r,n,i,a,o,s,c,u,l){var _,d,f,m,g=s.options,y=s.getRules,h=new t.FormattingContext(l,c,g),v=-1,b=[];if(o.advance(),o.isOnToken()){var x=l.getLineAndCharacterOfPosition(n.getStart(l)).line,D=x;n.decorators&&(D=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(n,l)).line),function n(i,a,s,c,p,y){if(!e.rangeOverlapsWithStartEnd(r,i.getStart(l),i.getEnd()))return;var h=T(i,s,p,y);var b=a;e.forEachChild(i,(function(e){S(e,-1,i,h,s,c,!1)}),(function(r){!function(r,n,a,s){e.Debug.assert(e.isNodeArray(r));var c=function(e,t){switch(e.kind){case 161:case 243:case 200:case 160:case 159:case 201:if(e.typeParameters===t)return 29;if(e.parameters===t)return 20;break;case 195:case 196:if(e.typeArguments===t)return 29;if(e.arguments===t)return 20;break;case 168:if(e.typeArguments===t)return 29;break;case 172:return 18}return 0}(n,r),u=s,_=a;if(0!==c)for(;o.isOnToken();){if((b=o.readTokenInfo(n)).token.end>r.pos)break;if(b.token.kind===c){_=l.getLineAndCharacterOfPosition(b.token.pos).line,P(b,n,s,n);var d=void 0;if(-1!==v)d=v;else{var p=e.getLineStartPositionForPosition(b.token.pos,l);d=t.SmartIndenter.findFirstNonWhitespaceColumn(p,b.token.pos,l,g)}u=T(n,a,d,g.indentSize)}else P(b,n,s,n)}for(var f=-1,m=0;m<r.length;m++){var y=r[m];f=S(y,f,i,u,_,_,!0,0===m)}var h=function(e){switch(e){case 20:return 21;case 29:return 31;case 18:return 19}return 0}(c);if(0!==h&&o.isOnToken()){var b;27===(b=o.readTokenInfo(n)).token.kind&&e.isCallLikeExpression(n)&&(o.advance(),b=o.isOnToken()?o.readTokenInfo(n):void 0),b&&b.token.kind===h&&e.rangeContainsRange(n,b.token)&&P(b,n,u,n,!0)}}(r,i,s,h)}));for(;o.isOnToken();){var x=o.readTokenInfo(i);if(x.token.end>i.end)break;P(x,i,h,i)}if(!i.parent&&o.isOnEOF()){var D=o.readEOFTokenRange();D.end<=i.end&&_&&N(D,l.getLineAndCharacterOfPosition(D.pos).line,i,_,f,d,a,h)}function S(a,s,c,u,_,d,p,f){var y=a.getStart(l),h=l.getLineAndCharacterOfPosition(y).line,x=h;a.decorators&&(x=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(a,l)).line);var D=-1;if(p&&e.rangeContainsRange(r,c)&&-1!==(D=function(r,n,i,a,o){if(e.rangeOverlapsWithStartEnd(a,r,n)||e.rangeContainsStartEnd(a,r,n)){if(-1!==o)return o}else{var s=l.getLineAndCharacterOfPosition(r).line,c=e.getLineStartPositionForPosition(r,l),u=t.SmartIndenter.findFirstNonWhitespaceColumn(c,r,l,g);if(s!==i||r===u){var _=t.SmartIndenter.getBaseIndentation(g);return _>u?_:u}}return-1}(y,a.end,_,r,s))&&(s=D),!e.rangeOverlapsWithStartEnd(r,a.pos,a.end))return a.end<r.pos&&o.skipToEndOf(a),s;if(0===a.getFullWidth())return s;for(;o.isOnToken();){if((S=o.readTokenInfo(i)).token.end>y)break;P(S,i,u,i)}if(!o.isOnToken())return s;if(e.isToken(a)&&11!==a.kind){var S=o.readTokenInfo(a);return e.Debug.assert(S.token.end===a.end,"Token end is child end"),P(S,i,u,a),s}var T=156===a.kind?h:d,E=function(e,r,n,i,a,o){var s=t.SmartIndenter.shouldIndentChildNode(g,e)?g.indentSize:0;return o===r?{indentation:r===m?v:a.getIndentation(),delta:Math.min(g.indentSize,a.getDelta(e)+s)}:-1===n?20===e.kind&&r===m?{indentation:v,delta:a.getDelta(e)}:t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(i,e,r,l)?{indentation:a.getIndentation(),delta:s}:t.SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(i,e,r,l)?{indentation:a.getIndentation(),delta:s}:{indentation:a.getIndentation()+a.getDelta(e),delta:s}:{indentation:n,delta:s}}(a,h,D,i,u,T);(n(a,b,h,x,E.indentation,E.delta),11===a.kind)&&F({pos:a.getStart(),end:a.getEnd()},E.indentation,!0,!1);return b=i,f&&191===c.kind&&-1===s&&(s=E.indentation),s}function P(t,n,i,a,s){e.Debug.assert(e.rangeContainsRange(n,t.token));var c=o.lastTrailingTriviaWasNewLine(),d=!1;t.leadingTrivia&&C(t.leadingTrivia,n,b,i);var p=0,f=e.rangeContainsRange(r,t.token),g=l.getLineAndCharacterOfPosition(t.token.pos);if(f){var y=u(t.token),h=_;if(p=k(t.token,g,n,b,i),!y)if(0===p){var x=h&&l.getLineAndCharacterOfPosition(h.end).line;d=c&&g.line!==x}else d=1===p}if(t.trailingTrivia&&C(t.trailingTrivia,n,b,i),d){var D=f&&!u(t.token)?i.getIndentationForToken(g.line,t.token.kind,a,!!s):-1,S=!0;if(t.leadingTrivia){var T=i.getIndentationForComment(t.token.kind,D,a);S=E(t.leadingTrivia,T,S,(function(e){return A(e.pos,T,!1)}))}-1!==D&&S&&(A(t.token.pos,D,1===p),m=g.line,v=D)}o.advance(),b=n}}(n,n,x,D,i,a)}if(!o.isOnToken()){var S=o.getCurrentLeadingTrivia();S&&(E(S,i,!1,(function(e){return k(e,l.getLineAndCharacterOfPosition(e.pos),n,n,void 0)})),function(){var e=_?_.end:r.pos,t=l.getLineAndCharacterOfPosition(e).line,n=l.getLineAndCharacterOfPosition(r.end).line;P(t,n+1,_)}())}return b;function T(r,n,i,a){return{getIndentationForComment:function(e,t,r){switch(e){case 19:case 23:case 21:return i+o(r)}return-1!==t?t:i},getIndentationForToken:function(t,a,s,c){return!c&&function(t,i,a){switch(i){case 18:case 19:case 21:case 86:case 110:case 59:return!1;case 43:case 31:switch(a.kind){case 266:case 267:case 265:return!1}break;case 22:case 23:if(185!==a.kind)return!1}return n!==t&&!(r.decorators&&i===function(t){if(t.modifiers&&t.modifiers.length)return t.modifiers[0].kind;switch(t.kind){case 244:return 79;case 245:return 113;case 243:return 93;case 247:return 247;case 162:return 130;case 163:return 141;case 160:if(t.asteriskToken)return 41;case 158:case 155:var r=e.getNameOfDeclaration(t);if(r)return r.kind}}(r))}(t,a,s)?i+o(s):i},getIndentation:function(){return i},getDelta:o,recomputeIndentation:function(e){r.parent&&t.SmartIndenter.shouldIndentChildNode(g,r.parent,r,l)&&(i+=e?g.indentSize:-g.indentSize,a=t.SmartIndenter.shouldIndentChildNode(g,r)?g.indentSize:0)}};function o(e){return t.SmartIndenter.nodeWillIndentChild(g,r,e,l,!0)?a:0}}function E(t,n,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o],u=e.rangeContainsRange(r,c);switch(c.kind){case 3:u&&F(c,n,!i),i=!1;break;case 2:i&&u&&a(c),i=!1;break;case 4:i=!0}}return i}function C(t,n,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o];if(e.isComment(c.kind)&&e.rangeContainsRange(r,c))k(c,l.getLineAndCharacterOfPosition(c.pos),n,i,a)}}function k(e,t,n,i,a){var o=0;u(e)||(_?o=N(e,t.line,n,_,f,d,i,a):P(l.getLineAndCharacterOfPosition(r.pos).line,t.line));return _=e,d=n,f=t.line,o}function N(t,r,n,i,a,o,s,c){h.updateContext(i,o,t,n,s);var u=y(h),_=!1,d=0;return u?e.forEachRight(u,(function(o){switch(d=function(t,r,n,i,a){var o=a!==n;switch(t.action){case 1:return 0;case 16:if(r.end!==i.pos)return I(r.end,i.pos-r.end),o?2:0;break;case 32:I(r.pos,r.end-r.pos);break;case 8:if(1!==t.flags&&n!==a)return 0;if(1!==a-n)return O(r.end,i.pos-r.end,g.newLineCharacter),o?0:1;break;case 4:if(1!==t.flags&&n!==a)return 0;if(1!==i.pos-r.end||32!==l.text.charCodeAt(r.end))return O(r.end,i.pos-r.end," "),o?2:0;break;case 64:s=r.end,(c=";")&&b.push(e.createTextChangeFromStartLength(s,0,c))}var s,c;return 0}(o,i,a,t,r)){case 2:n.getStart(l)===t.pos&&c.recomputeIndentation(!1);break;case 1:n.getStart(l)===t.pos&&c.recomputeIndentation(!0);break;default:e.Debug.assert(0===d)}_=!(16&o.action)&&1!==o.flags})):_=1!==t.kind,r!==a&&_&&P(a,r,i),d}function A(t,r,n){var i=p(r,g);if(n)O(t,0,i);else{var a=l.getLineAndCharacterOfPosition(t),o=e.getStartPositionOfLine(a.line,l);(r!==function(e,t){for(var r=0,n=0;n<t;n++)9===l.text.charCodeAt(e+n)?r+=g.tabSize-r%g.tabSize:r++;return r}(o,a.character)||function(e,t){return e!==l.text.substr(t,e.length)}(i,o))&&O(o,a.character,i)}}function F(r,n,i,a){void 0===a&&(a=!0);var o=l.getLineAndCharacterOfPosition(r.pos).line,s=l.getLineAndCharacterOfPosition(r.end).line;if(o!==s){for(var c=[],u=r.pos,_=o;_<s;_++){var d=e.getEndLinePosition(_,l);c.push({pos:u,end:d}),u=e.getStartPositionOfLine(_+1,l)}if(a&&c.push({pos:u,end:r.end}),0!==c.length){var f=e.getStartPositionOfLine(o,l),m=t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(f,c[0].pos,l,g);if(n!==m.column){var y=0;i&&(y=1,o++);for(var h=n-m.column,v=y;v<c.length;v++,o++){var b=e.getStartPositionOfLine(o,l),x=0===v?m:t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(c[v].pos,c[v].end,l,g),D=x.column+h;if(D>0){var S=p(D,g);O(b,x.character,S)}else I(b,x.character)}}}}else i||A(r.pos,n,!1)}function P(t,r,n){for(var i=t;i<r;i++){var a=e.getStartPositionOfLine(i,l),o=e.getEndLinePosition(i,l);if(!(n&&(e.isComment(n.kind)||e.isStringOrRegularExpressionOrTemplateLiteral(n.kind))&&n.pos<=o&&n.end>o)){var s=w(a,o);-1!==s&&(e.Debug.assert(s===a||!e.isWhiteSpaceSingleLine(l.text.charCodeAt(s-1))),I(s,o+1-s))}}}function w(t,r){for(var n=r;n>=t&&e.isWhiteSpaceSingleLine(l.text.charCodeAt(n));)n--;return n!==r?n+1:-1}function I(t,r){r&&b.push(e.createTextChangeFromStartLength(t,r,""))}function O(t,r,n){(r||n)&&b.push(e.createTextChangeFromStartLength(t,r,n))}}function p(t,r){if((!i||i.tabSize!==r.tabSize||i.indentSize!==r.indentSize)&&(i={tabSize:r.tabSize,indentSize:r.indentSize},a=o=void 0),r.convertTabsToSpaces){var n=void 0,s=Math.floor(t/r.indentSize),c=t%r.indentSize;return o||(o=[]),void 0===o[s]?(n=e.repeatString(" ",r.indentSize*s),o[s]=n):n=o[s],c?n+e.repeatString(" ",c):n}var u=Math.floor(t/r.tabSize),l=t-u*r.tabSize,_=void 0;return a||(a=[]),void 0===a[u]?a[u]=_=e.repeatString("\t",u):_=a[u],l?_+e.repeatString(" ",l):_}t.createTextRangeWithKind=function(t,r,n){var i={pos:t,end:r,kind:n};return e.Debug.isDebugging&&Object.defineProperty(i,"__debugKind",{get:function(){return e.Debug.formatSyntaxKind(n)}}),i},function(e){e[e.Unknown=-1]="Unknown"}(r||(r={})),t.formatOnEnter=function(t,r,n){var i=r.getLineAndCharacterOfPosition(t).line;if(0===i)return[];for(var a=e.getEndLinePosition(i,r);e.isWhiteSpaceSingleLine(r.text.charCodeAt(a));)a--;return e.isLineBreak(r.text.charCodeAt(a))&&a--,_({pos:e.getStartPositionOfLine(i-1,r),end:a+1},r,n,2)},t.formatOnSemicolon=function(e,t,r){return l(c(s(e,26,t)),t,r,3)},t.formatOnOpeningCurly=function(t,r,n){var i=s(t,18,r);if(!i)return[];var a=c(i.parent);return _({pos:e.getLineStartPositionForPosition(a.getStart(r),r),end:t},r,n,4)},t.formatOnClosingCurly=function(e,t,r){return l(c(s(e,19,t)),t,r,5)},t.formatDocument=function(e,t){return _({pos:0,end:e.text.length},e,t,0)},t.formatSelection=function(t,r,n,i){return _({pos:e.getLineStartPositionForPosition(t,n),end:r},n,i,1)},t.formatNodeGivenIndentation=function(e,r,n,i,a,o){var s={pos:0,end:r.text.length};return t.getFormattingScanner(r.text,n,s.pos,s.end,(function(t){return d(s,e,i,a,t,o,1,(function(e){return!1}),r)}))},function(e){e[e.None=0]="None",e[e.LineAdded=1]="LineAdded",e[e.LineRemoved=2]="LineRemoved"}(n||(n={})),t.getRangeOfEnclosingComment=function(t,r,n,i){void 0===i&&(i=e.getTokenAtPosition(t,r));var a=e.findAncestor(i,e.isJSDoc);if(a&&(i=a.parent),!(i.getStart(t)<=r&&r<i.getEnd())){var o=(n=null===n?void 0:void 0===n?e.findPrecedingToken(r,t):n)&&e.getTrailingCommentRanges(t.text,n.end),s=e.getLeadingCommentRangesOfNode(i,t),c=e.concatenate(o,s);return c&&e.find(c,(function(n){return e.rangeContainsPositionExclusive(n,r)||r===n.end&&(2===n.kind||r===t.getFullWidth())}))}},t.getIndentationString=p}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){!function(r){var n,i;function a(e){return e.baseIndentSize||0}function o(e,t,r,n,i,o,u){for(var l=e.parent;l;){var p=!0;if(r){var f=e.getStart(i);p=f<r.pos||f>r.end}var m=s(l,e,i),y=m.line===t.line||d(l,e,t.line,i);if(p){var h=g(e,i,u,!y);if(-1!==h)return h+n;if(-1!==(h=c(e,l,t,y,i,u)))return h+n}D(u,l,e,i,o)&&!y&&(n+=u.indentSize);var v=_(l,e,t.line,i);l=(e=l).parent,t=v?i.getLineAndCharacterOfPosition(e.getStart(i)):m}return n+a(u)}function s(e,t,r){var n=p(t,r),i=n?n.pos:e.getStart(r);return r.getLineAndCharacterOfPosition(i)}function c(t,r,n,i,a,o){return(e.isDeclaration(t)||e.isStatementButNotDeclaration(t))&&(288===r.kind||!i)?h(n,a,o):-1}function u(t,r,n,i){var a=e.findNextToken(t,r,i);return a?18===a.kind?1:19===a.kind&&n===l(a,i).line?2:0:0}function l(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(t,r,n,i){if(!e.isCallExpression(t)||!e.contains(t.arguments,r))return!1;var a=t.expression.getEnd();return e.getLineAndCharacterOfPosition(i,a).line===n}function d(t,r,n,i){if(226===t.kind&&t.elseStatement===r){var a=e.findChildOfKind(t,86,i);return e.Debug.assert(void 0!==a),l(a,i).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(t,r,n,i){switch(n.kind){case 168:return a(n.typeArguments);case 192:return a(n.properties);case 191:return a(n.elements);case 172:return a(n.members);case 243:case 200:case 201:case 160:case 159:case 164:case 161:case 170:case 165:return a(n.typeParameters)||a(n.parameters);case 244:case 213:case 245:case 246:case 314:return a(n.typeParameters);case 196:case 195:return a(n.typeArguments)||a(n.arguments);case 242:return a(n.declarations);case 256:case 260:return a(n.elements);case 188:case 189:return a(n.elements)}function a(a){return a&&e.rangeContainsStartEnd(function(e,t,r){for(var n=e.getChildren(r),i=1;i<n.length-1;i++)if(n[i].pos===t.pos&&n[i].end===t.end)return{pos:n[i-1].end,end:n[i+1].getStart(r)};return t}(n,a,i),t,r)?a:void 0}}function m(e,t,r){return e?h(t.getLineAndCharacterOfPosition(e.pos),t,r):-1}function g(e,t,r,n){if(e.parent&&242===e.parent.kind)return-1;var i=p(e,t);if(i){var a=i.indexOf(e);if(-1!==a){var o=y(i,a,t,r);if(-1!==o)return o}return m(i,t,r)+(n?r.indentSize:0)}return-1}function y(t,r,n,i){e.Debug.assert(r>=0&&r<t.length);for(var a=l(t[r],n),o=r-1;o>=0;o--)if(27!==t[o].kind){if(n.getLineAndCharacterOfPosition(t[o].end).line!==a.line)return h(a,n,i);a=l(t[o],n)}return-1}function h(e,t,r){var n=t.getPositionOfLineAndCharacter(e.line,0);return b(n,n+e.character,t,r)}function v(t,r,n,i){for(var a=0,o=0,s=t;s<r;s++){var c=n.text.charCodeAt(s);if(!e.isWhiteSpaceSingleLine(c))break;9===c?o+=i.tabSize+o%i.tabSize:o++,a++}return{column:o,character:a}}function b(e,t,r,n){return v(e,t,r,n).column}function x(t,r,n,i,a){var o=n?n.kind:0;switch(r.kind){case 225:case 244:case 213:case 245:case 247:case 246:case 191:case 222:case 249:case 192:case 172:case 185:case 174:case 250:case 276:case 275:case 199:case 193:case 195:case 196:case 224:case 258:case 234:case 209:case 189:case 188:case 266:case 269:case 265:case 274:case 159:case 164:case 165:case 155:case 169:case 170:case 181:case 197:case 205:case 260:case 256:case 261:case 257:case 158:return!0;case 241:case 279:case 208:if(!t.indentMultiLineObjectLiteralBeginningOnBlankLine&&i&&192===o)return function(t,r){var n=e.skipTrivia(t.text,r.pos),i=t.getLineAndCharacterOfPosition(n).line,a=t.getLineAndCharacterOfPosition(r.end).line;return i===a}(i,n);if(208!==r.kind)return!0;break;case 227:case 228:case 230:case 231:case 229:case 226:case 243:case 200:case 160:case 201:case 161:case 162:case 163:return 222!==o;case 259:return 260!==o;case 253:return 254!==o||!!n.namedBindings&&256!==n.namedBindings.kind;case 264:return 267!==o;case 268:return 270!==o;case 178:case 177:if(172===o)return!1}return a}function D(e,t,r,n,i){return void 0===i&&(i=!1),x(e,t,r,n,!1)&&!(i&&r&&function(e,t){switch(e){case 234:case 238:case 232:case 233:return 222!==t.kind;default:return!1}}(r.kind,t))}!function(e){e[e.Unknown=-1]="Unknown"}(n||(n={})),r.getIndentation=function(r,n,i,s){if(void 0===s&&(s=!1),r>n.text.length)return a(i);if(i.indentStyle===e.IndentStyle.None)return 0;var c=e.findPrecedingToken(r,n,void 0,!0),_=t.getRangeOfEnclosingComment(n,r,c||null);if(_&&3===_.kind)return function(t,r,n,i){var a=e.getLineAndCharacterOfPosition(t,r).line-1,o=e.getLineAndCharacterOfPosition(t,i.pos).line;if(e.Debug.assert(o>=0),a<=o)return b(e.getStartPositionOfLine(o,t),r,t,n);var s=e.getStartPositionOfLine(a,t),c=v(s,r,t,n),u=c.column,l=c.character;if(0===u)return u;return 42===t.text.charCodeAt(s+l)?u-1:u}(n,r,i,_);if(!c)return a(i);if(e.isStringOrRegularExpressionOrTemplateLiteral(c.kind)&&c.getStart(n)<=r&&r<c.end)return 0;var d=n.getLineAndCharacterOfPosition(r).line;if(i.indentStyle===e.IndentStyle.Block)return function(t,r,n){var i=r;for(;i>0;){var a=t.text.charCodeAt(i);if(!e.isWhiteSpaceLike(a))break;i--}return b(e.getLineStartPositionForPosition(i,t),i,t,n)}(n,r,i);if(27===c.kind&&208!==c.parent.kind){var p=function(t,r,n){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?y(i.list.getChildren(),i.listItemIndex-1,r,n):-1}(c,n,i);if(-1!==p)return p}var h=function(e,t,r){return t&&f(e,e,t,r)}(r,c.parent,n);return h&&!e.rangeContainsRange(h,c)?m(h,n,i)+i.indentSize:function(t,r,n,i,s,c){var _,d=n;for(;d;){if(e.positionBelongsToNode(d,r,t)&&D(c,d,_,t,!0)){var p=l(d,t),f=u(n,d,i,t),m=0!==f?s&&2===f?c.indentSize:0:i!==p.line?c.indentSize:0;return o(d,p,void 0,m,t,!0,c)}var y=g(d,t,c,!0);if(-1!==y)return y;_=d,d=d.parent}return a(c)}(n,r,c,d,s,i)},r.getIndentationForNode=function(e,t,r,n){var i=r.getLineAndCharacterOfPosition(e.getStart(r));return o(e,i,t,0,r,!1,n)},r.getBaseIndentation=a,function(e){e[e.Unknown=0]="Unknown",e[e.OpenBrace=1]="OpenBrace",e[e.CloseBrace=2]="CloseBrace"}(i||(i={})),r.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,r.childStartsOnTheSameLineWithElseInIfStatement=d,r.argumentStartsOnSameLineAsPreviousArgument=function(t,r,n,i){if(e.isCallOrNewExpression(t)){if(!t.arguments)return!1;var a=e.find(t.arguments,(function(e){return e.pos===r.pos}));if(!a)return!1;var o=t.arguments.indexOf(a);if(0===o)return!1;var s=t.arguments[o-1];if(n===e.getLineAndCharacterOfPosition(i,s.getEnd()).line)return!0}return!1},r.getContainingList=p,r.findFirstNonWhitespaceCharacterAndColumn=v,r.findFirstNonWhitespaceColumn=b,r.nodeWillIndentChild=x,r.shouldIndentChildNode=D}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(n){function i(t){var r=t.__pos;return e.Debug.assert("number"==typeof r),r}function a(t,r){e.Debug.assert("number"==typeof r),t.__pos=r}function o(t){var r=t.__end;return e.Debug.assert("number"==typeof r),r}function s(t,r){e.Debug.assert("number"==typeof r),t.__end=r}var c,u;function l(t,r){return e.skipTrivia(t,r,!1,!0)}!function(e){e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll"}(c=n.LeadingTriviaOption||(n.LeadingTriviaOption={})),function(e){e[e.Exclude=0]="Exclude",e[e.Include=1]="Include"}(u=n.TrailingTriviaOption||(n.TrailingTriviaOption={}));var _,d={leadingTriviaOption:c.Exclude,trailingTriviaOption:u.Exclude};function p(e,t,r,n){return{pos:f(e,t,n),end:m(e,r,n)}}function f(t,r,n){var i=n.leadingTriviaOption;if(i===c.Exclude)return r.getStart(t);var a=r.getFullStart(),o=r.getStart(t);if(a===o)return o;var s=e.getLineStartPositionForPosition(a,t);if(e.getLineStartPositionForPosition(o,t)===s)return i===c.IncludeAll?a:o;var u=a>0?1:0,_=e.getStartPositionOfLine(e.getLineOfLocalPosition(t,s)+u,t);return _=l(t.text,_),e.getStartPositionOfLine(e.getLineOfLocalPosition(t,_),t)}function m(t,r,n){var i=r.end,a=n.trailingTriviaOption;if(a===u.Exclude||e.isExpression(r)&&a!==u.Include)return i;var o=e.skipTrivia(t.text,i,!0);return o===i||a!==u.Include&&!e.isLineBreak(t.text.charCodeAt(o-1))?i:o}function g(e,t){return!!t&&!!e.parent&&(27===t.kind||26===t.kind&&192===e.parent.kind)}!function(e){e[e.Remove=0]="Remove",e[e.ReplaceWithSingleNode=1]="ReplaceWithSingleNode",e[e.ReplaceWithMultipleNodes=2]="ReplaceWithMultipleNodes",e[e.Text=3]="Text"}(_||(_={})),n.isThisTypeAnnotatable=function(t){return e.isFunctionExpression(t)||e.isFunctionDeclaration(t)};var y,h,v=function(){function n(t,r){this.newLineCharacter=t,this.formatContext=r,this.changes=[],this.newFiles=[],this.classesWithNodesInsertedAtStart=e.createMap(),this.deletedNodes=[]}return n.fromContext=function(t){return new n(e.getNewLineOrDefaultFromHost(t.host,t.formatContext.options),t.formatContext)},n.with=function(e,t){var r=n.fromContext(e);return t(r),r.getChanges()},n.prototype.pushRaw=function(t,r){e.Debug.assertEqual(t.fileName,r.fileName);for(var n=0,i=r.textChanges;n<i.length;n++){var a=i[n];this.changes.push({kind:_.Text,sourceFile:t,text:a.newText,range:e.createTextRangeFromSpan(a.span)})}},n.prototype.deleteRange=function(e,t){this.changes.push({kind:_.Remove,sourceFile:e,range:t})},n.prototype.delete=function(e,t){this.deletedNodes.push({sourceFile:e,node:t})},n.prototype.deleteModifier=function(t,r){this.deleteRange(t,{pos:r.getStart(t),end:e.skipTrivia(t.text,r.end,!0)})},n.prototype.deleteNodeRange=function(e,t,r,n){void 0===n&&(n={leadingTriviaOption:c.IncludeAll});var i=f(e,t,n),a=m(e,r,n);this.deleteRange(e,{pos:i,end:a})},n.prototype.deleteNodeRangeExcludingEnd=function(e,t,r,n){void 0===n&&(n={leadingTriviaOption:c.IncludeAll});var i=f(e,t,n),a=void 0===r?e.text.length:f(e,r,n);this.deleteRange(e,{pos:i,end:a})},n.prototype.replaceRange=function(e,t,r,n){void 0===n&&(n={}),this.changes.push({kind:_.ReplaceWithSingleNode,sourceFile:e,range:t,options:n,node:r})},n.prototype.replaceNode=function(e,t,r,n){void 0===n&&(n=d),this.replaceRange(e,p(e,t,t,n),r,n)},n.prototype.replaceNodeRange=function(e,t,r,n,i){void 0===i&&(i=d),this.replaceRange(e,p(e,t,r,i),n,i)},n.prototype.replaceRangeWithNodes=function(e,t,r,n){void 0===n&&(n={}),this.changes.push({kind:_.ReplaceWithMultipleNodes,sourceFile:e,range:t,options:n,nodes:r})},n.prototype.replaceNodeWithNodes=function(e,t,r,n){void 0===n&&(n=d),this.replaceRangeWithNodes(e,p(e,t,t,n),r,n)},n.prototype.replaceNodeWithText=function(e,t,r){this.replaceRangeWithText(e,p(e,t,t,d),r)},n.prototype.replaceNodeRangeWithNodes=function(e,t,r,n,i){void 0===i&&(i=d),this.replaceRangeWithNodes(e,p(e,t,r,i),n,i)},n.prototype.nextCommaToken=function(t,r){var n=e.findNextToken(r,r.parent,t);return n&&27===n.kind?n:void 0},n.prototype.replacePropertyAssignment=function(e,t,r){var n=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,r,{suffix:n})},n.prototype.insertNodeAt=function(t,r,n,i){void 0===i&&(i={}),this.replaceRange(t,e.createRange(r),n,i)},n.prototype.insertNodesAt=function(t,r,n,i){void 0===i&&(i={}),this.replaceRangeWithNodes(t,e.createRange(r),n,i)},n.prototype.insertNodeAtTopOfFile=function(t,r,n){var i=function(t){for(var r,n=0,i=t.statements;n<i.length;n++){var a=i[n];if(!e.isPrologueDirective(a))break;r=a}var o=0,s=t.text;if(r)return o=r.end,p(),o;var c=e.getShebang(s);void 0!==c&&(o=c.length,p());var u=e.getLeadingCommentRanges(s,o);if(!u)return o;u.length&&3===u[0].kind&&e.isPinnedComment(s,u[0].pos)&&(o=u[0].end,p(),u=u.slice(1));for(var l=0,_=u;l<_.length;l++){var d=_[l];if(2!==d.kind||!e.isRecognizedTripleSlashComment(s,d.pos,d.end))break;o=d.end,p()}return o;function p(){if(o<s.length){var t=s.charCodeAt(o);e.isLineBreak(t)&&++o<s.length&&13===t&&10===s.charCodeAt(o)&&o++}}}(t);this.insertNodeAt(t,i,r,{prefix:0===i?void 0:this.newLineCharacter,suffix:(e.isLineBreak(t.text.charCodeAt(i))?"":this.newLineCharacter)+(n?this.newLineCharacter:"")})},n.prototype.insertNodeBefore=function(e,t,r,n){void 0===n&&(n=!1),this.insertNodeAt(e,f(e,t,{}),r,this.getOptionsForInsertNodeBefore(t,n))},n.prototype.insertModifierBefore=function(t,r,n){var i=n.getStart(t);this.insertNodeAt(t,i,e.createToken(r),{suffix:" "})},n.prototype.insertLastModifierBefore=function(t,r,n){if(n.modifiers){var i=n.modifiers.end;this.insertNodeAt(t,i,e.createToken(r),{prefix:" "})}else this.insertModifierBefore(t,r,n)},n.prototype.insertCommentBeforeLine=function(t,r,n,i){var a=e.getStartPositionOfLine(r,t),o=e.getFirstNonSpaceCharacterPosition(t.text,a),s=C(t,o),c=e.getTouchingToken(t,s?o:n),u=t.text.slice(a,o),l=(s?"":this.newLineCharacter)+"//"+i+this.newLineCharacter+u;this.insertText(t,c.getStart(t),l)},n.prototype.insertJsdocCommentBefore=function(t,r,n){var i=r.getStart(t);if(r.jsDoc)for(var a=0,o=r.jsDoc;a<o.length;a++){var s=o[a];this.deleteRange(t,{pos:e.getLineStartPositionForPosition(s.getStart(t),t),end:m(t,s,{})})}var c=e.getPrecedingNonSpaceCharacterPosition(t.text,i-1),u=t.text.slice(c,i);this.insertNodeAt(t,i,n,{preserveLeadingWhitespace:!1,suffix:this.newLineCharacter+u})},n.prototype.replaceRangeWithText=function(e,t,r){this.changes.push({kind:_.Text,sourceFile:e,range:t,text:r})},n.prototype.insertText=function(t,r,n){this.replaceRangeWithText(t,e.createRange(r),n)},n.prototype.tryInsertTypeAnnotation=function(t,r,n){var i;if(e.isFunctionLike(r)){if(!(i=e.findChildOfKind(r,21,t))){if(!e.isArrowFunction(r))return!1;i=e.first(r.parameters)}}else i=241!==r.kind&&r.questionToken?r.questionToken:r.name;return this.insertNodeAt(t,i.end,n,{prefix:": "}),!0},n.prototype.tryInsertThisTypeAnnotation=function(t,r,n){var i=e.findChildOfKind(r,20,t).getStart(t)+1,a=r.parameters.length?", ":"";this.insertNodeAt(t,i,n,{prefix:"this: ",suffix:a})},n.prototype.insertTypeParameters=function(t,r,n){var i=(e.findChildOfKind(r,20,t)||e.first(r.parameters)).getStart(t);this.insertNodesAt(t,i,n,{prefix:"<",suffix:">"})},n.prototype.getOptionsForInsertNodeBefore=function(t,r){return e.isStatement(t)||e.isClassElement(t)?{suffix:r?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:e.isVariableDeclaration(t)?{suffix:", "}:e.isParameter(t)?{}:e.isStringLiteral(t)&&e.isImportDeclaration(t.parent)||e.isNamedImports(t)?{suffix:", "}:e.Debug.failBadSyntaxKind(t)},n.prototype.insertNodeAtConstructorStart=function(r,n,i){var a=e.firstOrUndefined(n.body.statements);a&&n.body.multiLine?this.insertNodeBefore(r,a,i):this.replaceConstructorBody(r,n,t([i],n.body.statements))},n.prototype.insertNodeAtConstructorEnd=function(r,n,i){var a=e.lastOrUndefined(n.body.statements);a&&n.body.multiLine?this.insertNodeAfter(r,a,i):this.replaceConstructorBody(r,n,t(n.body.statements,[i]))},n.prototype.replaceConstructorBody=function(t,r,n){this.replaceNode(t,r.body,e.createBlock(n,!0))},n.prototype.insertNodeAtEndOfScope=function(t,r,n){var i=f(t,r.getLastToken(),{});this.insertNodeAt(t,i,n,{prefix:e.isLineBreak(t.text.charCodeAt(r.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})},n.prototype.insertNodeAtClassStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},n.prototype.insertNodeAtObjectStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},n.prototype.insertNodeAtStartWorker=function(t,n,i){var a=n.getStart(t),o=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(e.getLineStartPositionForPosition(a,t),a,t,this.formatContext.options)+this.formatContext.options.indentSize;this.insertNodeAt(t,D(n).pos,i,r({indentation:o},this.getInsertNodeAtStartPrefixSuffix(t,n)))},n.prototype.getInsertNodeAtStartPrefixSuffix=function(r,n){var i=e.isObjectLiteralExpression(n)?",":"";if(0===D(n).length){if(e.addToSeen(this.classesWithNodesInsertedAtStart,e.getNodeId(n),{node:n,sourceFile:r})){var a=e.positionsAreOnSameLine.apply(void 0,t(x(n,r),[r]));return{prefix:this.newLineCharacter,suffix:i+(a?this.newLineCharacter:"")}}return{prefix:"",suffix:i+this.newLineCharacter}}return{prefix:this.newLineCharacter,suffix:i}},n.prototype.insertNodeAfterComma=function(e,t,r){var n=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},n.prototype.insertNodeAfter=function(e,t,r){var n=this.insertNodeAfterWorker(e,t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},n.prototype.insertNodeAtEndOfList=function(e,t,r){this.insertNodeAt(e,t.end,r,{prefix:", "})},n.prototype.insertNodesAfter=function(t,r,n){var i=this.insertNodeAfterWorker(t,r,e.first(n));this.insertNodesAt(t,i,n,this.getInsertNodeAfterOptions(t,r))},n.prototype.insertNodeAfterWorker=function(t,r,n){var i,a;return i=r,a=n,((e.isPropertySignature(i)||e.isPropertyDeclaration(i))&&e.isClassOrTypeElement(a)&&153===a.name.kind||e.isStatementButNotDeclaration(i)&&e.isStatementButNotDeclaration(a))&&59!==t.text.charCodeAt(r.end-1)&&this.replaceRange(t,e.createRange(r.end),e.createToken(26)),m(t,r,{})},n.prototype.getInsertNodeAfterOptions=function(t,n){var i=this.getInsertNodeAfterOptionsWorker(n);return r(r({},i),{prefix:n.end===t.end&&e.isStatement(n)?i.prefix?"\n"+i.prefix:"\n":i.prefix})},n.prototype.getInsertNodeAfterOptionsWorker=function(t){switch(t.kind){case 244:case 248:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 241:case 10:case 75:return{prefix:", "};case 279:return{suffix:","+this.newLineCharacter};case 88:return{prefix:" "};case 155:return{};default:return e.Debug.assert(e.isStatement(t)||e.isClassOrTypeElement(t)),{suffix:this.newLineCharacter}}},n.prototype.insertName=function(t,r,n){if(e.Debug.assert(!r.name),201===r.kind){var i=e.findChildOfKind(r,38,t),a=e.findChildOfKind(r,20,t);a?(this.insertNodesAt(t,a.getStart(t),[e.createToken(93),e.createIdentifier(n)],{joiner:" "}),k(this,t,i)):(this.insertText(t,e.first(r.parameters).getStart(t),"function "+n+"("),this.replaceRange(t,i,e.createToken(21))),222!==r.body.kind&&(this.insertNodesAt(t,r.body.getStart(t),[e.createToken(18),e.createToken(100)],{joiner:" ",suffix:" "}),this.insertNodesAt(t,r.body.end,[e.createToken(26),e.createToken(19)],{joiner:" "}))}else{var o=e.findChildOfKind(r,200===r.kind?93:79,t).end;this.insertNodeAt(t,o,e.createIdentifier(n),{prefix:" "})}},n.prototype.insertExportModifier=function(e,t){this.insertText(e,t.getStart(e),"export ")},n.prototype.insertNodeInListAfter=function(t,r,n,i){if(void 0===i&&(i=e.formatting.SmartIndenter.getContainingList(r,t)),i){var a=e.indexOfNode(i,r);if(!(a<0)){var o=r.getEnd();if(a!==i.length-1){var s=e.getTokenAtPosition(t,r.end);if(s&&g(r,s)){var c=e.getLineAndCharacterOfPosition(t,l(t.text,i[a+1].getFullStart())),u=e.getLineAndCharacterOfPosition(t,s.end),_=void 0,d=void 0;u.line===c.line?(d=s.end,_=function(e){for(var t="",r=0;r<e;r++)t+=" ";return t}(c.character-u.character)):d=e.getStartPositionOfLine(c.line,t);var p=""+e.tokenToString(s.kind)+t.text.substring(s.end,i[a+1].getStart(t));this.replaceRange(t,e.createRange(d,i[a+1].getStart(t)),n,{prefix:_,suffix:p})}}else{var f=r.getStart(t),m=e.getLineStartPositionForPosition(f,t),y=void 0,h=!1;if(1===i.length)y=27;else{var v=e.findPrecedingToken(r.pos,t);y=g(r,v)?v.kind:27,h=e.getLineStartPositionForPosition(i[a-1].getStart(t),t)!==m}if(function(t,r){for(var n=r;n<t.length;){var i=t.charCodeAt(n);if(!e.isWhiteSpaceSingleLine(i))return 47===i;n++}return!1}(t.text,r.end)&&(h=!0),h){this.replaceRange(t,e.createRange(o),e.createToken(y));var b=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(m,f,t,this.formatContext.options),x=e.skipTrivia(t.text,o,!0,!1);x!==o&&e.isLineBreak(t.text.charCodeAt(x-1))&&x--,this.replaceRange(t,e.createRange(x),n,{indentation:b,prefix:this.newLineCharacter})}else this.replaceRange(t,e.createRange(o),n,{prefix:e.tokenToString(y)+" "})}}}else e.Debug.fail("node is not a list element")},n.prototype.parenthesizeExpression=function(t,r){this.replaceRange(t,e.rangeOfNode(r),e.createParen(r))},n.prototype.finishClassesWithNodesInsertedAtStart=function(){var t=this;this.classesWithNodesInsertedAtStart.forEach((function(r){var n=r.node,i=r.sourceFile,a=x(n,i),o=a[0],s=a[1];e.positionsAreOnSameLine(o,s,i)&&o!==s-1&&t.deleteRange(i,e.createRange(o,s-1))}))},n.prototype.finishDeleteDeclarations=function(){for(var t=this,r=new e.NodeSet,n=function(t,n){i.deletedNodes.some((function(r){return r.sourceFile===t&&e.rangeContainsRangeExclusive(r.node,n)}))||(e.isArray(n)?i.deleteRange(t,e.rangeOfTypeParameters(n)):h.deleteDeclaration(i,r,t,n))},i=this,a=0,o=this.deletedNodes;a<o.length;a++){var s=o[a];n(s.sourceFile,s.node)}r.forEach((function(n){var i=n.getSourceFile(),a=e.formatting.SmartIndenter.getContainingList(n,i);if(n===e.last(a)){var o=e.findLastIndex(a,(function(e){return!r.has(e)}),a.length-2);-1!==o&&t.deleteRange(i,{pos:a[o].end,end:b(i,a[o+1])})}}))},n.prototype.getChanges=function(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();for(var t=y.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e),r=0,n=this.newFiles;r<n.length;r++){var i=n[r],a=i.oldFile,o=i.fileName,s=i.statements;t.push(y.newFileChanges(a,o,s,this.newLineCharacter,this.formatContext))}return t},n.prototype.createNewFile=function(e,t,r){this.newFiles.push({oldFile:e,fileName:t,statements:r})},n}();function b(t,r){return e.skipTrivia(t.text,f(t,r,{leadingTriviaOption:c.IncludeAll}),!1,!0)}function x(t,r){return[e.findChildOfKind(t,18,r).end,e.findChildOfKind(t,19,r).end]}function D(t){return e.isObjectLiteralExpression(t)?t.properties:t.members}function S(t,r){for(var n=r.length-1;n>=0;n--){var i=r[n],a=i.span,o=i.newText;t=""+t.substring(0,a.start)+o+t.substring(e.textSpanEnd(a))}return t}function T(t){var r=e.visitEachChild(t,T,e.nullTransformationContext,E,T),n=e.nodeIsSynthesized(r)?r:Object.create(r);return n.pos=i(t),n.end=o(t),n}function E(t,r,n,a,s){var c=e.visitNodes(t,r,n,a,s);if(!c)return c;var u=c===t?e.createNodeArray(c.slice(0)):c;return u.pos=i(t),u.end=o(t),u}function C(t,r){return!(e.isInComment(t,r)||e.isInString(t,r)||e.isInTemplateString(t,r)||e.isInJSXText(t,r))}function k(e,t,r,n){void 0===n&&(n={leadingTriviaOption:c.IncludeAll});var i=f(t,r,n),a=m(t,r,n);e.deleteRange(t,{pos:i,end:a})}function N(t,r,n,i){var a=e.Debug.assertDefined(e.formatting.SmartIndenter.getContainingList(i,n)),o=e.indexOfNode(a,i);e.Debug.assert(-1!==o),1!==a.length?(e.Debug.assert(!r.has(i),"Deleting a node twice"),r.add(i),t.deleteRange(n,{pos:b(n,i),end:o===a.length-1?m(n,i,{}):b(n,a[o+1])})):k(t,n,i)}n.ChangeTracker=v,n.getNewFileText=function(e,t,r,n){return y.newFileChangesWorker(void 0,t,e,r,n)},function(t){function n(t,r,n,a,o){var s=n.map((function(e){return i(e,t,a).text})).join(a),c=e.createSourceFile("any file name",s,99,!0,r);return S(s,e.formatting.formatDocument(c,o))+a}function i(t,r,n){var i=function(t){var r=0,n=e.createTextWriter(t);function i(t,i){if(i||!function(t){return e.skipTrivia(t,0)===t.length}(t)){r=n.getTextPos();for(var a=0;e.isWhiteSpaceLike(t.charCodeAt(t.length-a-1));)a++;r-=a}}return{onEmitNode:function(e,t,n){t&&a(t,r),n(e,t),t&&s(t,r)},onBeforeEmitNodeArray:function(e){e&&a(e,r)},onAfterEmitNodeArray:function(e){e&&s(e,r)},onBeforeEmitToken:function(e){e&&a(e,r)},onAfterEmitToken:function(e){e&&s(e,r)},write:function(e){n.write(e),i(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),i(e,!1)},writeOperator:function(e){n.writeOperator(e),i(e,!1)},writePunctuation:function(e){n.writePunctuation(e),i(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),i(e,!1)},writeParameter:function(e){n.writeParameter(e),i(e,!1)},writeProperty:function(e){n.writeProperty(e),i(e,!1)},writeSpace:function(e){n.writeSpace(e),i(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),i(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),i(e,!1)},writeLine:function(){n.writeLine()},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),i(e,!1)},writeLiteral:function(e){n.writeLiteral(e),i(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:function(){return n.hasTrailingComment()},hasTrailingWhitespace:function(){return n.hasTrailingWhitespace()},clear:function(){n.clear(),r=0}}}(n),o="\n"===n?1:0;return e.createPrinter({newLine:o,neverAsciiEscape:!0},i).writeNode(4,t,r,i),{text:i.getText(),node:T(t)}}t.getTextChangesFromChanges=function(t,n,a,o){return e.group(t,(function(e){return e.sourceFile.path})).map((function(t){for(var s=t[0].sourceFile,c=e.stableSort(t,(function(e,t){return e.range.pos-t.range.pos||e.range.end-t.range.end})),u=function(t){e.Debug.assert(c[t].range.end<=c[t+1].range.pos,"Changes overlap",(function(){return JSON.stringify(c[t].range)+" and "+JSON.stringify(c[t+1].range)}))},l=0;l<c.length-1;l++)u(l);var d=c.map((function(t){return e.createTextChange(e.createTextSpanFromRange(t.range),function(t,n,a,o,s){if(t.kind===_.Remove)return"";if(t.kind===_.Text)return t.text;var c=t.options,u=void 0===c?{}:c,l=t.range.pos,d=function(t){return function(t,n,a,o,s,c,u){var l=o.indentation,_=o.prefix,d=o.delta,p=i(t,n,s),f=p.node,m=p.text;u&&u(f,m);var g=function(t,n){var i=t.options,a=!i.semicolons||i.semicolons===e.SemicolonPreference.Ignore,o=i.semicolons===e.SemicolonPreference.Remove||a&&!e.probablyUsesSemicolons(n);return r(r({},i),{semicolons:o?e.SemicolonPreference.Remove:e.SemicolonPreference.Ignore})}(c,n),y=void 0!==l?l:e.formatting.SmartIndenter.getIndentation(a,n,g,_===s||e.getLineStartPositionForPosition(a,n)===a);void 0===d&&(d=e.formatting.SmartIndenter.shouldIndentChildNode(g,t)&&g.indentSize||0);var h={text:m,getLineAndCharacterOfPosition:function(t){return e.getLineAndCharacterOfPosition(this,t)}},v=e.formatting.formatNodeGivenIndentation(f,h,n.languageVariant,y,d,r(r({},c),{options:g}));return S(m,v)}(t,n,l,u,a,o,s)},p=t.kind===_.ReplaceWithMultipleNodes?t.nodes.map((function(t){return e.removeSuffix(d(t),a)})).join(t.options.joiner||a):d(t.node),f=u.preserveLeadingWhitespace||void 0!==u.indentation||e.getLineStartPositionForPosition(l,n)===l?p:p.replace(/^\s+/,"");return(u.prefix||"")+f+(u.suffix||"")}(t,s,n,a,o))}));return{fileName:s.fileName,textChanges:d}}))},t.newFileChanges=function(t,r,i,a,o){var s=n(t,e.getScriptKindFromFileName(r),i,a,o);return{fileName:r,textChanges:[e.createTextChange(e.createTextSpan(0,0),s)],isNewFile:!0}},t.newFileChangesWorker=n,t.getNonformattedText=i}(y||(y={})),n.applyChanges=S,n.isValidLocationToAddComment=C,function(t){function r(t,r,n){if(n.parent.name){var i=e.Debug.assertDefined(e.getTokenAtPosition(r,n.pos-1));t.deleteRange(r,{pos:i.getStart(r),end:n.end})}else{k(t,r,e.getAncestor(n,253))}}t.deleteDeclaration=function(t,n,i,a){switch(a.kind){case 155:var o=a.parent;e.isArrowFunction(o)&&1===o.parameters.length&&!e.findChildOfKind(o,20,i)?t.replaceNodeWithText(i,a,"()"):N(t,n,i,a);break;case 253:k(t,i,a,a===i.imports[0].parent?{leadingTriviaOption:c.Exclude}:void 0);break;case 190:var s=a.parent;189===s.kind&&a!==e.last(s.elements)?k(t,i,a):N(t,n,i,a);break;case 241:!function(t,r,n,i){var a=i.parent;if(278===a.kind)return void t.deleteNodeRange(n,e.findChildOfKind(a,20,n),e.findChildOfKind(a,21,n));if(1!==a.declarations.length)return void N(t,r,n,i);var o=a.parent;switch(o.kind){case 231:case 230:t.replaceNode(n,i,e.createObjectLiteral());break;case 229:k(t,n,a);break;case 224:k(t,n,o);break;default:e.Debug.assertNever(o)}}(t,n,i,a);break;case 154:N(t,n,i,a);break;case 257:var l=a.parent;1===l.elements.length?r(t,i,l):N(t,n,i,a);break;case 255:r(t,i,a);break;default:e.isImportClause(a.parent)&&a.parent.name===a?function(t,r,n){if(n.namedBindings){var i=n.name.getStart(r),a=e.getTokenAtPosition(r,n.name.end);if(a&&27===a.kind){var o=e.skipTrivia(r.text,a.end,!1,!0);t.deleteRange(r,{pos:i,end:o})}else k(t,r,n.name)}else k(t,r,n.parent)}(t,i,a.parent):e.isCallLikeExpression(a.parent)?N(t,n,i,a):k(t,i,a,26===a.kind?{trailingTriviaOption:u.Exclude}:void 0)}}}(h||(h={})),n.deleteNode=k}(e.textChanges||(e.textChanges={}))}(s||(s={})),function(e){!function(t){var r=e.createMultiMap(),n=e.createMap();function i(t){return e.isArray(t)?e.formatStringFromArgs(e.getLocaleSpecificMessage(t[0]),t.slice(1)):e.getLocaleSpecificMessage(t)}function a(e,t,r,n,i,a){return{fixName:e,description:t,changes:r,fixId:n,fixAllDescription:i,commands:a?[a]:void 0}}function o(e,t){return{changes:e,commands:t}}function s(t,r,n){for(var i=t.program,a=t.sourceFile,o=t.cancellationToken,s=0,c=i.getSemanticDiagnostics(a,o).concat(e.computeSuggestionDiagnostics(a,i,o));s<c.length;s++){var u=c[s];e.contains(r,u.code)&&n(u)}}t.createCodeFixActionNoFixId=function(e,t,r){return a(e,i(r),t,void 0,void 0)},t.createCodeFixAction=function(e,t,r,n,o,s){return a(e,i(r),t,n,i(o),s)},t.registerCodeFix=function(t){for(var i=0,a=t.errorCodes;i<a.length;i++){var o=a[i];r.add(String(o),t)}if(t.fixIds)for(var s=0,c=t.fixIds;s<c.length;s++){var u=c[s];e.Debug.assert(!n.has(u)),n.set(u,t)}},t.getSupportedErrorCodes=function(){return e.arrayFrom(r.keys())},t.getFixes=function(t){return e.flatMap(r.get(String(t.errorCode))||e.emptyArray,(function(e){return e.getCodeActions(t)}))},t.getAllFixes=function(t){return n.get(e.cast(t.fixId,e.isString)).getAllCodeActions(t)},t.createCombinedCodeActions=o,t.createFileTextChanges=function(e,t){return{fileName:e,textChanges:t}},t.codeFixAll=function(t,r,n){var i=[];return o(e.textChanges.ChangeTracker.with(t,(function(e){return s(t,r,(function(t){return n(e,t,i)}))})),0===i.length?void 0:i)},t.eachDiagnostic=s}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){var t,r;t=e.refactor||(e.refactor={}),r=e.createMap(),t.registerRefactor=function(e,t){r.set(e,t)},t.getApplicableRefactors=function(t){return e.arrayFrom(e.flatMapIterator(r.values(),(function(e){return t.cancellationToken&&t.cancellationToken.isCancellationRequested()?void 0:e.getAvailableActions(t)})))},t.getEditsForRefactor=function(e,t,n){var i=r.get(t);return i&&i.getEditsForAction(e,n)},e.getRefactorContextSpan=function(t){var r=t.startPosition,n=t.endPosition;return e.createTextSpanFromBounds(r,void 0===n?r:n)}}(s||(s={})),function(e){!function(t){var r="addConvertToUnknownForNonOverlappingTypes",n=[e.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.Debug.assertDefined(e.findAncestor(i,(function(t){return e.isAsExpression(t)||e.isTypeAssertion(t)})),"Expected to find an assertion expression"),o=e.isAsExpression(a)?e.createAsExpression(a.expression,e.createKeywordTypeNode(147)):e.createTypeAssertion(e.createKeywordTypeNode(147),a.expression);t.replaceNode(r,a.expression,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Add_unknown_conversion_for_non_overlapping_types,r,e.Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(r){var n="addMissingAwait",i=e.Diagnostics.Property_0_does_not_exist_on_type_1.code,a=[e.Diagnostics.This_expression_is_not_callable.code,e.Diagnostics.This_expression_is_not_constructable.code],o=t([e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.Operator_0_cannot_be_applied_to_type_1.code,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2.code,e.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code,e.Diagnostics.Type_0_is_not_an_array_type.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,i],a);function s(t,n,i,a,s,c){var u=t.sourceFile,d=t.program,p=t.cancellationToken,f=function(t,r,n,i,a){var s=function(t,r){if(e.isPropertyAccessExpression(t.parent)&&e.isIdentifier(t.parent.expression))return{identifiers:[t.parent.expression],isCompleteFix:!0};if(e.isIdentifier(t))return{identifiers:[t],isCompleteFix:!0};if(e.isBinaryExpression(t)){for(var n=void 0,i=!0,a=0,o=[t.left,t.right];a<o.length;a++){var s=o[a],c=r.getTypeAtLocation(s);if(r.getPromisedTypeOfPromise(c)){if(!e.isIdentifier(s)){i=!1;continue}(n||(n=[])).push(s)}}return n&&{identifiers:n,isCompleteFix:i}}}(t,a);if(!s)return;for(var c,u=s.isCompleteFix,_=function(t){var s=a.getSymbolAtLocation(t);if(!s)return"continue";var _=e.tryCast(s.valueDeclaration,e.isVariableDeclaration),d=_&&e.tryCast(_.name,e.isIdentifier),p=e.getAncestor(_,224);if(!_||!p||_.type||!_.initializer||p.getSourceFile()!==r||e.hasModifier(p,1)||!d||!l(_.initializer))return u=!1,"continue";var f=i.getSemanticDiagnostics(r,n);if(e.FindAllReferences.Core.eachSymbolReferenceInFile(d,a,r,(function(n){return t!==n&&!function(t,r,n,i){var a=e.isPropertyAccessExpression(t.parent)?t.parent.name:e.isBinaryExpression(t.parent)?t.parent:t,s=e.find(r,(function(e){return e.start===a.getStart(n)&&e.start+e.length===a.getEnd()}));return s&&e.contains(o,s.code)||1&i.getTypeAtLocation(a).flags}(n,f,r,a)})))return u=!1,"continue";(c||(c=[])).push({expression:_.initializer,declarationSymbol:s})},d=0,p=s.identifiers;d<p.length;d++){var f=p[d];_(f)}return c&&{initializers:c,needsSecondPassForFixAll:!u}}(n,u,p,d,a);if(f){var m=s((function(t){e.forEach(f.initializers,(function(e){var r=e.expression;return _(t,i,u,a,r,c)})),c&&f.needsSecondPassForFixAll&&_(t,i,u,a,n,c)}));return r.createCodeFixActionNoFixId("addMissingAwaitToInitializer",m,1===f.initializers.length?[e.Diagnostics.Add_await_to_initializer_for_0,f.initializers[0].declarationSymbol.name]:e.Diagnostics.Add_await_to_initializers)}}function c(t,i,a,o,s,c){var u=s((function(e){return _(e,a,t.sourceFile,o,i,c)}));return r.createCodeFixAction(n,u,e.Diagnostics.Add_await,n,e.Diagnostics.Fix_all_expressions_possibly_missing_await)}function u(t,r,n,i,a){var o=e.getTokenAtPosition(t,n.start),s=e.findAncestor(o,(function(r){return r.getStart(t)<n.start||r.getEnd()>e.textSpanEnd(n)?"quit":e.isExpression(r)&&e.textSpansEqual(n,e.createTextSpanFromNode(r,t))}));return s&&function(t,r,n,i,a){var o=a.getDiagnosticsProducingTypeChecker().getDiagnostics(t,i);return e.some(o,(function(t){var i=t.start,a=t.length,o=t.relatedInformation,s=t.code;return e.isNumber(i)&&e.isNumber(a)&&e.textSpansEqual({start:i,length:a},n)&&s===r&&!!o&&e.some(o,(function(t){return t.code===e.Diagnostics.Did_you_forget_to_use_await.code}))}))}(t,r,n,i,a)&&l(s)?s:void 0}function l(t){return 32768&t.kind||!!e.findAncestor(t,(function(t){return t.parent&&e.isArrowFunction(t.parent)&&t.parent.body===t||e.isBlock(t)&&(243===t.parent.kind||200===t.parent.kind||201===t.parent.kind||160===t.parent.kind)}))}function _(t,r,n,o,s,c){if(e.isBinaryExpression(s))for(var u=0,l=[s.left,s.right];u<l.length;u++){var _=l[u];if(c&&e.isIdentifier(_))if((f=o.getSymbolAtLocation(_))&&c.has(e.getSymbolId(f).toString()))continue;var d=o.getTypeAtLocation(_),p=o.getPromisedTypeOfPromise(d)?e.createAwait(_):_;t.replaceNode(n,_,p)}else if(r===i&&e.isPropertyAccessExpression(s.parent)){if(c&&e.isIdentifier(s.parent.expression))if((f=o.getSymbolAtLocation(s.parent.expression))&&c.has(e.getSymbolId(f).toString()))return;t.replaceNode(n,s.parent.expression,e.createParen(e.createAwait(s.parent.expression)))}else if(e.contains(a,r)&&e.isCallOrNewExpression(s.parent)){if(c&&e.isIdentifier(s))if((f=o.getSymbolAtLocation(s))&&c.has(e.getSymbolId(f).toString()))return;t.replaceNode(n,s,e.createParen(e.createAwait(s)))}else{var f;if(c&&e.isVariableDeclaration(s.parent)&&e.isIdentifier(s.parent.name))if((f=o.getSymbolAtLocation(s.parent.name))&&!e.addToSeen(c,e.getSymbolId(f)))return;t.replaceNode(n,s,e.createAwait(s))}}r.registerCodeFix({fixIds:[n],errorCodes:o,getCodeActions:function(t){var r=t.sourceFile,n=t.errorCode,i=u(r,n,t.span,t.cancellationToken,t.program);if(i){var a=t.program.getTypeChecker(),o=function(r){return e.textChanges.ChangeTracker.with(t,r)};return e.compact([s(t,i,n,a,o),c(t,i,n,a,o)])}},getAllCodeActions:function(t){var n=t.sourceFile,i=t.program,a=t.cancellationToken,l=t.program.getTypeChecker(),_=e.createMap();return r.codeFixAll(t,o,(function(e,r){var o=u(n,r.code,r,a,i);if(o){var d=function(t){return t(e),[]};return s(t,o,r.code,l,d,_)||c(t,o,r.code,l,d,_)}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingConst",n=[e.Diagnostics.Cannot_find_name_0.code,e.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];function i(t,r,n,i,o){var s=e.getTokenAtPosition(r,n),c=e.findAncestor(s,(function(t){return e.isForInOrOfStatement(t.parent)?t.parent.initializer===t:!function(e){switch(e.kind){case 75:case 191:case 192:case 279:case 280:return!0;default:return!1}}(t)&&"quit"}));if(c)return a(t,c,r,o);var u=s.parent;if(e.isBinaryExpression(u)&&e.isExpressionStatement(u.parent))return a(t,s,r,o);if(e.isArrayLiteralExpression(u)){var l=i.getTypeChecker();if(!e.every(u.elements,(function(t){return function(t,r){var n=e.isIdentifier(t)?t:e.isAssignmentExpression(t,!0)&&e.isIdentifier(t.left)?t.left:void 0;return!!n&&!r.getSymbolAtLocation(n)}(t,l)})))return;return a(t,u,r,o)}var _=e.findAncestor(s,(function(t){return!!e.isExpressionStatement(t.parent)||!function(e){switch(e.kind){case 75:case 208:case 27:return!0;default:return!1}}(t)&&"quit"}));if(_){if(!function t(r,n){if(!e.isBinaryExpression(r))return!1;if(27===r.operatorToken.kind)return e.every([r.left,r.right],(function(e){return t(e,n)}));return e.isIdentifier(r.left)&&!n.getSymbolAtLocation(r.left)}(_,i.getTypeChecker()))return;return a(t,_,r,o)}}function a(e,t,r,n){n&&!n.tryAdd(t)||e.insertModifierBefore(r,80,t)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start,n.program)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Add_const_to_unresolved_variable,r,e.Diagnostics.Add_const_to_all_unresolved_variables)]},fixIds:[r],getAllCodeActions:function(r){var a=new e.NodeSet;return t.codeFixAll(r,n,(function(e,t){return i(e,t.file,t.start,r.program,a)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingDeclareProperty",n=[e.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n);if(e.isIdentifier(a)){var o=a.parent;158!==o.kind||i&&!i.tryAdd(o)||t.insertModifierBefore(r,129,o)}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Prefix_with_declare,r,e.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[r],getAllCodeActions:function(r){var a=new e.NodeSet;return t.codeFixAll(r,n,(function(e,t){return i(e,t.file,t.start,a)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingInvocationForDecorator",n=[e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.findAncestor(i,e.isDecorator);e.Debug.assert(!!a,"Expected position to be owned by a decorator.");var o=e.createCall(a.expression,void 0,void 0);t.replaceNode(r,a.expression,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Call_decorator_expression,r,e.Diagnostics.Add_to_all_uncalled_decorators)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addNameToNamelessParameter",n=[e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n);if(!e.isIdentifier(i))return e.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a "+e.Debug.formatSyntaxKind(i.kind));var a=i.parent;if(!e.isParameter(a))return e.Debug.fail("Tried to add a parameter name to a non-parameter: "+e.Debug.formatSyntaxKind(i.kind));var o=a.parent.parameters.indexOf(a);e.Debug.assert(!a.type,"Tried to add a parameter name to a parameter that already had one."),e.Debug.assert(o>-1,"Parameter not found in parent parameter list.");var s=e.createParameter(void 0,a.modifiers,a.dotDotDotToken,"arg"+o,a.questionToken,e.createTypeReferenceNode(i,void 0),a.initializer);t.replaceNode(r,i,s)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Add_parameter_name,r,e.Diagnostics.Add_names_to_all_parameters_without_names)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="annotateWithTypeFromJSDoc",n=[e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.tryCast(e.isParameter(n.parent)?n.parent.parent:n.parent,a)}function a(t){return function(t){return e.isFunctionLikeDeclaration(t)||241===t.kind||157===t.kind||158===t.kind}(t)&&o(t)}function o(t){return e.isFunctionLikeDeclaration(t)?t.parameters.some(o)||!t.type&&!!e.getJSDocReturnType(t):!t.type&&!!e.getJSDocType(t)}function s(t,r,n){if(e.isFunctionLikeDeclaration(n)&&(e.getJSDocReturnType(n)||n.parameters.some((function(t){return!!e.getJSDocType(t)})))){if(!n.typeParameters){var i=e.getJSDocTypeParameterDeclarations(n);i.length&&t.insertTypeParameters(r,n,i)}var a=e.isArrowFunction(n)&&!e.findChildOfKind(n,20,r);a&&t.insertNodeBefore(r,e.first(n.parameters),e.createToken(20));for(var o=0,s=n.parameters;o<s.length;o++){var u=s[o];if(!u.type){var l=e.getJSDocType(u);l&&t.tryInsertTypeAnnotation(r,u,c(l))}}if(a&&t.insertNodeAfter(r,e.last(n.parameters),e.createToken(21)),!n.type){var _=e.getJSDocReturnType(n);_&&t.tryInsertTypeAnnotation(r,n,c(_))}}else{var d=e.Debug.assertDefined(e.getJSDocType(n),"A JSDocType for this declaration should exist");e.Debug.assert(!n.type,"The JSDocType decl should have a type"),t.tryInsertTypeAnnotation(r,n,c(d))}}function c(t){switch(t.kind){case 293:case 294:return e.createTypeReferenceNode("any",e.emptyArray);case 297:return function(t){return e.createUnionTypeNode([e.visitNode(t.type,c),e.createTypeReferenceNode("undefined",e.emptyArray)])}(t);case 296:return c(t.type);case 295:return function(t){return e.createUnionTypeNode([e.visitNode(t.type,c),e.createTypeReferenceNode("null",e.emptyArray)])}(t);case 299:return function(t){return e.createArrayTypeNode(e.visitNode(t.type,c))}(t);case 298:return function(t){return e.createFunctionTypeNode(e.emptyArray,t.parameters.map(u),t.type)}(t);case 168:return function(t){var r=t.typeName,n=t.typeArguments;if(e.isIdentifier(t.typeName)){if(e.isJSDocIndexSignature(t))return function(t){var r=e.createParameter(void 0,void 0,void 0,139===t.typeArguments[0].kind?"n":"s",void 0,e.createTypeReferenceNode(139===t.typeArguments[0].kind?"number":"string",[]),void 0),n=e.createTypeLiteralNode([e.createIndexSignature(void 0,void 0,[r],t.typeArguments[1])]);return e.setEmitFlags(n,1),n}(t);var i=t.typeName.text;switch(t.typeName.text){case"String":case"Boolean":case"Object":case"Number":i=i.toLowerCase();break;case"array":case"date":case"promise":i=i[0].toUpperCase()+i.slice(1)}r=e.createIdentifier(i),n="Array"!==i&&"Promise"!==i||t.typeArguments?e.visitNodes(t.typeArguments,c):e.createNodeArray([e.createTypeReferenceNode("any",e.emptyArray)])}return e.createTypeReferenceNode(r,n)}(t);default:var r=e.visitEachChild(t,c,void 0);return e.setEmitFlags(r,1),r}}function u(t){var r=t.parent.parameters.indexOf(t),n=299===t.type.kind&&r===t.parent.parameters.length-1,i=t.name||(n?"rest":"arg"+r),a=n?e.createToken(25):t.dotDotDotToken;return e.createParameter(t.decorators,t.modifiers,a,i,t.questionToken,e.visitNode(t.type,c),t.initializer)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=i(n.sourceFile,n.span.start);if(a){var o=e.textChanges.ChangeTracker.with(n,(function(e){return s(e,n.sourceFile,a)}));return[t.createCodeFixAction(r,o,e.Diagnostics.Annotate_with_type_from_JSDoc,r,e.Diagnostics.Annotate_everything_with_types_from_JSDoc)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){var r=i(t.file,t.start);r&&s(e,t.file,r)}))}}),t.parameterShouldGetTypeFromJSDoc=a}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(r){var n="inferFromUsage",i=[e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,e.Diagnostics.Variable_0_implicitly_has_an_1_type.code,e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code,e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,e.Diagnostics.Member_0_implicitly_has_an_1_type.code,e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function a(t,r){switch(t){case e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code:case e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.isSetAccessorDeclaration(e.getContainingFunction(r))?e.Diagnostics.Infer_type_of_0_from_usage:e.Diagnostics.Infer_parameter_types_from_usage;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Infer_parameter_types_from_usage;case e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return e.Diagnostics.Infer_this_type_of_0_from_usage;default:return e.Diagnostics.Infer_type_of_0_from_usage}}function o(t,r,n,i,a,o,d,g,y,h){if(e.isParameterPropertyModifier(n.kind)||75===n.kind||25===n.kind||103===n.kind){var v=n.parent;switch(i=function(t){switch(t){case e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Variable_0_implicitly_has_an_1_type.code;case e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code;case e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case e.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case e.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return e.Diagnostics.Member_0_implicitly_has_an_1_type.code}return t}(i)){case e.Diagnostics.Member_0_implicitly_has_an_1_type.code:case e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(e.isVariableDeclaration(v)&&d(v)||e.isPropertyDeclaration(v)||e.isPropertySignature(v))return s(t,r,v,a,g,o,y,h),v;if(e.isPropertyAccessExpression(v)){var b=p(v.name,a,o),x=e.getTypeNodeIfAccessible(b,v,a,g);if(x){var D=e.createJSDocTypeTag(e.createJSDocTypeExpression(x),"");_(t,r,e.cast(v.parent.parent,e.isExpressionStatement),[D])}return v}return;case e.Diagnostics.Variable_0_implicitly_has_an_1_type.code:var S=a.getTypeChecker().getSymbolAtLocation(n);return S&&S.valueDeclaration&&e.isVariableDeclaration(S.valueDeclaration)&&d(S.valueDeclaration)?(s(t,r,S.valueDeclaration,a,g,o,y,h),S.valueDeclaration):void 0}var T=e.getContainingFunction(n);if(void 0!==T)switch(i){case e.Diagnostics.Parameter_0_implicitly_has_an_1_type.code:if(e.isSetAccessorDeclaration(T))return c(t,r,T,a,g,o,y,h),T;case e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:if(d(T)){var E=e.cast(v,e.isParameter);return function(t,r,n,i,a,o,s,c,_){if(!e.isIdentifier(n.name))return;var d=function(t,r,n,i){var a=f(t,r,n,i);return a&&m(n,a,i).parameters(t)||t.parameters.map((function(t){return{declaration:t,type:e.isIdentifier(t.name)?p(t.name,n,i):n.getTypeChecker().getAnyType()}}))}(i,r,a,s);if(e.Debug.assert(i.parameters.length===d.length,"Parameter count and inference count should match"),e.isInJSFile(i))l(t,r,d,a,o);else{var g=e.isArrowFunction(i)&&!e.findChildOfKind(i,20,r);g&&t.insertNodeBefore(r,e.first(i.parameters),e.createToken(20));for(var y=0,h=d;y<h.length;y++){var v=h[y],b=v.declaration,x=v.type;!b||b.type||b.initializer||u(t,r,b,x,a,o,c,_)}g&&t.insertNodeAfter(r,e.last(i.parameters),e.createToken(21))}}(t,r,E,T,a,g,o,y,h),E}return;case e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:return e.isGetAccessorDeclaration(T)&&e.isIdentifier(T.name)?(u(t,r,T,p(T.name,a,o),a,g,y,h),T):void 0;case e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:return e.isSetAccessorDeclaration(T)?(c(t,r,T,a,g,o,y,h),T):void 0;case e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return e.textChanges.isThisTypeAnnotatable(T)&&d(T)?(function(t,r,n,i,a,o){var s=f(n,r,i,o);if(!s||!s.length)return;var c=m(i,s,o).thisParameter(),u=e.getTypeNodeIfAccessible(c,n,i,a);if(!u)return;e.isInJSFile(n)?function(t,r,n,i){_(t,r,n,[e.createJSDocThisTag(e.createJSDocTypeExpression(i))])}(t,r,n,u):t.tryInsertThisTypeAnnotation(r,n,u)}(t,r,T,a,g,o),T):void 0;default:return e.Debug.fail(String(i))}}}function s(t,r,n,i,a,o,s,c){e.isIdentifier(n.name)&&u(t,r,n,p(n.name,i,o),i,a,s,c)}function c(t,r,n,i,a,o,s,c){var _=e.firstOrUndefined(n.parameters);if(_&&e.isIdentifier(n.name)&&e.isIdentifier(_.name)){var d=p(n.name,i,o);d===i.getTypeChecker().getAnyType()&&(d=p(_.name,i,o)),e.isInJSFile(n)?l(t,r,[{declaration:_,type:d}],i,a):u(t,r,_,d,i,a,s,c)}}function u(t,n,i,a,o,s,c,u){var l=e.getTypeNodeIfAccessible(a,i,o,s);if(l)if(e.isInJSFile(n)&&157!==i.kind){var d=e.isVariableDeclaration(i)?e.tryCast(i.parent.parent,e.isVariableStatement):i;if(!d)return;var p=e.createJSDocTypeExpression(l);_(t,n,d,[e.isGetAccessorDeclaration(i)?e.createJSDocReturnTag(p,""):e.createJSDocTypeTag(p,"")])}else(function(t,n,i,a,o,s,c,u,l){var _;if(e.isLiteralImportTypeNode(t)&&t.qualifier&&o.symbol){var d=null===(_=e.find(o.symbol.declarations,(function(e){return!!e.getSourceFile().externalModuleIndicator})))||void 0===_?void 0:_.getSourceFile().symbol;if(d){var p=e.getFirstIdentifier(t.qualifier).symbol,f=r.getImportCompletionAction(p,d,i,p.name,c,s,u,a.pos,l);if(f.codeAction.changes.length&&n.tryInsertTypeAnnotation(i,a,e.createTypeReferenceNode(t.qualifier,t.typeArguments))){for(var m=0,g=f.codeAction.changes;m<g.length;m++){var y=g[m],h=i.fileName===y.fileName?i:e.Debug.assertDefined(s.getSourceFile(y.fileName));n.pushRaw(h,y)}return!0}}}return!1})(l,t,n,i,a,o,s,c,u)||t.tryInsertTypeAnnotation(n,i,l)}function l(t,r,n,i,a){var o=n.length&&n[0].declaration.parent;o&&_(t,r,o,e.mapDefined(n,(function(t){var r=t.declaration;if(!r.initializer&&!e.getJSDocType(r)&&e.isIdentifier(r.name)){var n=t.type&&e.getTypeNodeIfAccessible(t.type,r,i,a),o=e.getSynthesizedClone(r.name);return e.setEmitFlags(o,3584),n&&e.createJSDocParamTag(o,!!t.isOptional,e.createJSDocTypeExpression(n),"")}})))}function _(r,n,i,a){var o=e.mapDefined(i.jsDoc,(function(e){return e.comment})),s=e.flatMapToMutable(i.jsDoc,(function(e){return e.tags})),c=a.filter((function(t){return!s||!s.some((function(r,n){var i=function(t,r){if(t.kind!==r.kind)return;switch(t.kind){case 310:var n=t,i=r;return e.isIdentifier(n.name)&&e.isIdentifier(i.name)&&n.name.escapedText===i.name.escapedText?e.createJSDocParamTag(i.name,i.isBracketed,i.typeExpression,n.comment):void 0;case 311:return e.createJSDocReturnTag(r.typeExpression,t.comment)}}(r,t);return i&&(s[n]=i),!!i}))})),u=e.createJSDocComment(o.join("\n"),e.createNodeArray(t(s||e.emptyArray,c))),l=201===i.kind?function(e){if(158===e.parent.kind)return e.parent;return e.parent.parent}(i):i;l.jsDoc=i.jsDoc,l.jsDocCache=i.jsDocCache,r.insertJsdocCommentBefore(n,l,u)}function d(t,r,n){return e.mapDefined(e.FindAllReferences.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),n),(function(t){return 0!==t.kind?e.tryCast(t.node,e.isIdentifier):void 0}))}function p(e,t,r){return m(t,d(e,t,r),r).single()}function f(t,r,n,i){var a;switch(t.kind){case 161:a=e.findChildOfKind(t,128,r);break;case 201:case 200:var o=t.parent;a=e.isVariableDeclaration(o)&&e.isIdentifier(o.name)?o.name:t.name;break;case 243:case 160:a=t.name}if(a)return d(a,n,i)}function m(r,n,i){var a=r.getTypeChecker(),o={string:function(){return a.getStringType()},number:function(){return a.getNumberType()},Array:function(e){return a.createArrayType(e)},Promise:function(e){return a.createPromiseType(e)}},s=[a.getStringType(),a.getNumberType(),a.createArrayType(a.getAnyType()),a.createPromiseType(a.getAnyType())];return{single:function(){return f(u(n))},parameters:function(o){if(0===n.length||!o.parameters)return;for(var s=c(),_=0,p=n;_<p.length;_++){var m=p[_];i.throwIfCancellationRequested(),l(m,s)}var g=t(s.constructs||[],s.calls||[]);return o.parameters.map((function(t,n){for(var s=[],c=e.isRestParameter(t),l=!1,_=0,p=g;_<p.length;_++){var m=p[_];if(m.argumentTypes.length<=n)l=e.isInJSFile(o),s.push(a.getUndefinedType());else if(c)for(var y=n;y<m.argumentTypes.length;y++)s.push(a.getBaseTypeOfLiteralType(m.argumentTypes[y]));else s.push(a.getBaseTypeOfLiteralType(m.argumentTypes[n]))}if(e.isIdentifier(t.name)){var h=u(d(t.name,r,i));s.push.apply(s,c?e.mapDefined(h,a.getElementTypeOfArrayType):h)}var v=f(s);return{type:c?a.createArrayType(v):v,isOptional:l&&!c,declaration:t}}))},thisParameter:function(){for(var t=c(),r=0,a=n;r<a.length;r++){var o=a[r];i.throwIfCancellationRequested(),l(o,t)}return f(t.candidateThisTypes||e.emptyArray)}};function c(){return{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}}function u(e){for(var t={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0},r=0,n=e;r<n.length;r++){var a=n[r];i.throwIfCancellationRequested(),l(a,t)}return m(t)}function l(t,r){for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;switch(t.parent.kind){case 225:h(r,a.getVoidType());break;case 207:r.isNumber=!0;break;case 206:!function(e,t){switch(e.operator){case 45:case 46:case 40:case 54:t.isNumber=!0;break;case 39:t.isNumberOrString=!0}}(t.parent,r);break;case 208:!function(t,r,n){switch(r.operatorToken.kind){case 42:case 41:case 43:case 44:case 47:case 48:case 49:case 50:case 51:case 52:case 64:case 66:case 65:case 67:case 68:case 72:case 73:case 74:case 69:case 71:case 70:case 40:case 29:case 32:case 31:case 33:var i=a.getTypeAtLocation(r.left===t?r.right:r.left);1056&i.flags?h(n,i):n.isNumber=!0;break;case 63:case 39:var o=a.getTypeAtLocation(r.left===t?r.right:r.left);1056&o.flags?h(n,o):296&o.flags?n.isNumber=!0:132&o.flags?n.isString=!0:1&o.flags||(n.isNumberOrString=!0);break;case 62:case 34:case 36:case 37:case 35:h(n,a.getTypeAtLocation(r.left===t?r.right:r.left));break;case 96:t===r.left&&(n.isString=!0);break;case 56:case 60:t!==r.left||241!==t.parent.parent.kind&&!e.isAssignmentExpression(t.parent.parent,!0)||h(n,a.getTypeAtLocation(r.right))}}(t,t.parent,r);break;case 275:case 276:!function(e,t){h(t,a.getTypeAtLocation(e.parent.parent.expression))}(t.parent,r);break;case 195:case 196:t.parent.expression===t?function(e,t){var r={argumentTypes:[],return_:{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}};if(e.arguments)for(var n=0,i=e.arguments;n<i.length;n++){var o=i[n];r.argumentTypes.push(a.getTypeAtLocation(o))}l(e,r.return_),195===e.kind?(t.calls||(t.calls=[])).push(r):(t.constructs||(t.constructs=[])).push(r)}(t.parent,r):_(t,r);break;case 193:!function(t,r){var n=e.escapeLeadingUnderscores(t.name.text);r.properties||(r.properties=e.createUnderscoreEscapedMap());var i=r.properties.get(n)||{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};l(t,i),r.properties.set(n,i)}(t.parent,r);break;case 194:!function(e,t,r){if(t===e.argumentExpression)return void(r.isNumberOrString=!0);var n=a.getTypeAtLocation(e.argumentExpression),i={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};l(e,i),296&n.flags?r.numberIndex=i:r.stringIndex=i}(t.parent,t,r);break;case 279:case 280:!function(t,r){var n=e.isVariableDeclaration(t.parent.parent)?t.parent.parent:t.parent;v(r,a.getTypeAtLocation(n))}(t.parent,r);break;case 158:!function(e,t){v(t,a.getTypeAtLocation(e.parent))}(t.parent,r);break;case 241:var n=t.parent,i=n.name,o=n.initializer;if(t===i){o&&h(r,a.getTypeAtLocation(o));break}default:return _(t,r)}}function _(t,r){e.isExpressionNode(t)&&h(r,a.getContextualType(t))}function p(e){return f(m(e))}function f(t){if(!t.length)return a.getAnyType();var r=a.getUnionType([a.getStringType(),a.getNumberType()]),n=function(t,r){for(var n=[],i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,c=r;s<c.length;s++){var u=c[s],l=u.high,_=u.low;l(o)&&(e.Debug.assert(!_(o),"Priority can't have both low and high"),n.push(_))}return t.filter((function(e){return n.every((function(t){return!t(e)}))}))}(t,[{high:function(e){return e===a.getStringType()||e===a.getNumberType()},low:function(e){return e===r}},{high:function(e){return!(16385&e.flags)},low:function(e){return!!(16385&e.flags)}},{high:function(e){return!(114689&e.flags||16&a.getObjectFlags(e))},low:function(e){return!!(16&a.getObjectFlags(e))}}]),i=n.filter((function(e){return 16&a.getObjectFlags(e)}));return i.length&&(n=n.filter((function(e){return!(16&a.getObjectFlags(e))}))).push(function(t){if(1===t.length)return t[0];for(var r=[],n=[],i=[],o=[],s=!1,c=!1,u=e.createMultiMap(),l=0,_=t;l<_.length;l++){for(var d=_[l],p=0,f=a.getPropertiesOfType(d);p<f.length;p++){var m=f[p];u.add(m.name,a.getTypeOfSymbolAtLocation(m,m.valueDeclaration))}r.push.apply(r,a.getSignaturesOfType(d,0)),n.push.apply(n,a.getSignaturesOfType(d,1)),d.stringIndexInfo&&(i.push(d.stringIndexInfo.type),s=s||d.stringIndexInfo.isReadonly),d.numberIndexInfo&&(o.push(d.numberIndexInfo.type),c=c||d.numberIndexInfo.isReadonly)}var g=e.mapEntries(u,(function(e,r){var n=r.length<t.length?16777216:0,i=a.createSymbol(4|n,e);return i.type=a.getUnionType(r),[e,i]}));return a.createAnonymousType(t[0].symbol,g,r,n,i.length?a.createIndexInfo(a.getUnionType(i),s):void 0,o.length?a.createIndexInfo(a.getUnionType(o),c):void 0)}(i)),a.getWidenedType(a.getUnionType(n.map(a.getBaseTypeOfLiteralType),2))}function m(t){var r=[];return t.isNumber&&r.push(a.getNumberType()),t.isString&&r.push(a.getStringType()),t.isNumberOrString&&r.push(a.getUnionType([a.getStringType(),a.getNumberType()])),t.numberIndex&&r.push(a.createArrayType(p(t.numberIndex))),(t.properties&&t.properties.size||t.calls&&t.calls.length||t.constructs&&t.constructs.length||t.stringIndex)&&r.push(function(t){var r=e.createUnderscoreEscapedMap();t.properties&&t.properties.forEach((function(e,t){var n=a.createSymbol(4,t);n.type=p(e),r.set(t,n)}));var n=t.calls?[y(t.calls)]:[],i=t.constructs?[y(t.constructs)]:[],o=t.stringIndex&&a.createIndexInfo(p(t.stringIndex),!1);return a.createAnonymousType(void 0,r,n,i,o,void 0)}(t)),r.push.apply(r,(t.candidateTypes||[]).map((function(e){return a.getBaseTypeOfLiteralType(e)}))),r.push.apply(r,function(t){if(!t.properties||!t.properties.size)return[];var r=s.filter((function(r){return function(t,r){return!!r.properties&&!e.forEachEntry(r.properties,(function(r,n){var i,o=a.getTypeOfPropertyOfType(t,n);return!o||(r.calls?!a.getSignaturesOfType(o,0).length||!a.isTypeAssignableTo(o,(i=r.calls,a.createAnonymousType(void 0,e.createSymbolTable(),[y(i)],e.emptyArray,void 0,void 0))):!a.isTypeAssignableTo(o,p(r)))}))}(r,t)}));if(0<r.length&&r.length<3)return r.map((function(r){return function(t,r){if(!(4&e.getObjectFlags(t)&&r.properties))return t;var n=t.target,i=e.singleOrUndefined(n.typeParameters);if(!i)return t;var s=[];return r.properties.forEach((function(t,r){var o=a.getTypeOfPropertyOfType(n,r);e.Debug.assert(!!o,"generic should have all the properties of its reference."),s.push.apply(s,g(o,p(t),i))})),o[t.symbol.escapedName](f(s))}(r,t)}));return[]}(t)),r}function g(t,r,n){if(t===n)return[r];if(3145728&t.flags)return e.flatMap(t.types,(function(e){return g(e,r,n)}));if(4&e.getObjectFlags(t)&&4&e.getObjectFlags(r)){var i=a.getTypeArguments(t),o=a.getTypeArguments(r),s=[];if(i&&o)for(var c=0;c<i.length;c++)o[c]&&s.push.apply(s,g(i[c],o[c],n));return s}var u=a.getSignaturesOfType(t,0),l=a.getSignaturesOfType(r,0);return 1===u.length&&1===l.length?function(t,r,n){for(var i=[],o=0;o<t.parameters.length;o++){var s=t.parameters[o],c=r.parameters[o],u=t.declaration&&e.isRestParameter(t.declaration.parameters[o]);if(!c)break;var l=a.getTypeOfSymbolAtLocation(s,s.valueDeclaration),_=u&&a.getElementTypeOfArrayType(l);_&&(l=_);var d=c.type||a.getTypeOfSymbolAtLocation(c,c.valueDeclaration);i.push.apply(i,g(l,d,n))}var p=a.getReturnTypeOfSignature(t),f=a.getReturnTypeOfSignature(r);return i.push.apply(i,g(p,f,n)),i}(u[0],l[0],n):[]}function y(t){for(var r=[],n=Math.max.apply(Math,t.map((function(e){return e.argumentTypes.length}))),i=function(n){var i=a.createSymbol(1,e.escapeLeadingUnderscores("arg"+n));i.type=f(t.map((function(e){return e.argumentTypes[n]||a.getUndefinedType()}))),t.some((function(e){return void 0===e.argumentTypes[n]}))&&(i.flags|=16777216),r.push(i)},o=0;o<n;o++)i(o);var s=p(function t(r){for(var n=e.createUnderscoreEscapedMap(),i=0,a=r;i<a.length;i++){var o=a[i];o.properties&&o.properties.forEach((function(e,t){n.has(t)||n.set(t,[]),n.get(t).push(e)}))}var s=e.createUnderscoreEscapedMap();return n.forEach((function(e,r){s.set(r,t(e))})),{isNumber:r.some((function(e){return e.isNumber})),isString:r.some((function(e){return e.isString})),isNumberOrString:r.some((function(e){return e.isNumberOrString})),candidateTypes:e.flatMap(r,(function(e){return e.candidateTypes})),properties:s,calls:e.flatMap(r,(function(e){return e.calls})),constructs:e.flatMap(r,(function(e){return e.constructs})),numberIndex:e.forEach(r,(function(e){return e.numberIndex})),stringIndex:e.forEach(r,(function(e){return e.stringIndex})),candidateThisTypes:e.flatMap(r,(function(e){return e.candidateThisTypes})),inferredTypes:void 0}}(t.map((function(e){return e.return_}))));return a.createSignature(void 0,void 0,void 0,r,s,void 0,n,0)}function h(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function v(e,t){!t||1&t.flags||131072&t.flags||(e.candidateThisTypes||(e.candidateThisTypes=[])).push(t)}}r.registerCodeFix({errorCodes:i,getCodeActions:function(t){var i,s=t.sourceFile,c=t.program,u=t.span.start,l=t.errorCode,_=t.cancellationToken,d=t.host,p=t.formatContext,f=t.preferences,m=e.getTokenAtPosition(s,u),g=e.textChanges.ChangeTracker.with(t,(function(t){i=o(t,s,m,l,c,_,e.returnTrue,d,p,f)})),y=i&&e.getNameOfDeclaration(i);return y&&0!==g.length?[r.createCodeFixAction(n,g,[a(l,m),y.getText(s)],n,e.Diagnostics.Infer_all_types_from_usage)]:void 0},fixIds:[n],getAllCodeActions:function(t){var n=t.sourceFile,a=t.program,s=t.cancellationToken,c=t.host,u=t.formatContext,l=t.preferences,_=e.nodeSeenTracker();return r.codeFixAll(t,i,(function(t,r){o(t,n,e.getTokenAtPosition(r.file,r.start),r.code,a,s,_,c,u,l)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="convertFunctionToEs6Class",n=[e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];function i(t,r,n,i){var o=i.getSymbolAtLocation(e.getTokenAtPosition(r,n));if(o&&19&o.flags){var s,c,u=o.valueDeclaration;switch(u.kind){case 243:s=u,t.delete(r,u),c=function(t){var r=l(o);t.body&&r.unshift(e.createConstructor(void 0,void 0,t.parameters,t.body));var n=a(t,88);return e.createClassDeclaration(void 0,n,t.name,void 0,void 0,r)}(u);break;case 241:s=u.parent.parent,c=function(t){var r=t.initializer;if(!r||200!==r.kind)return;if(75!==t.name.kind)return;var n=l(t.symbol);r.body&&n.unshift(e.createConstructor(void 0,void 0,r.parameters,r.body));var i=a(s,88);return e.createClassDeclaration(void 0,i,t.name,void 0,void 0,n)}(u),1===u.parent.declarations.length?(e.copyLeadingComments(s,c,r),t.delete(r,s)):t.delete(r,u)}c&&(e.copyLeadingComments(u,c,r),t.insertNodeAfter(r,s,c))}function l(n){var i=[];return n.members&&n.members.forEach((function(e){var t=o(e,void 0);t&&i.push(t)})),n.exports&&n.exports.forEach((function(t){var r=o(t,[e.createToken(119)]);r&&i.push(r)})),i;function o(n,i){if(8192&n.flags){var o=n.valueDeclaration,s=o.parent;if(c=s.right,e.isFunctionLike(c)){var c,u=s.parent&&225===s.parent.kind?s.parent:s;if(t.delete(r,u),!s.right)return e.createProperty([],i,n.name,void 0,void 0,void 0);switch(s.right.kind){case 200:var l=s.right,_=e.concatenate(i,a(l,125)),d=e.createMethod(void 0,_,void 0,o.name,void 0,void 0,l.parameters,void 0,l.body);return e.copyLeadingComments(s,d,r),d;case 201:var p=s.right,f=p.body,m=void 0;m=222===f.kind?f:e.createBlock([e.createReturn(f)]);_=e.concatenate(i,a(p,125)),d=e.createMethod(void 0,_,void 0,o.name,void 0,void 0,p.parameters,void 0,m);return e.copyLeadingComments(s,d,r),d;default:if(e.isSourceFileJS(r))return;var g=e.createProperty(void 0,i,o.name,void 0,void 0,s.right);return e.copyLeadingComments(s.parent,g,r),g}}}}}}function a(t,r){return e.filter(t.modifiers,(function(e){return e.kind===r}))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start,n.program.getTypeChecker())}));return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_function_to_an_ES2015_class,r,e.Diagnostics.Convert_all_constructor_functions_to_classes)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return i(t,r.file,r.start,e.program.getTypeChecker())}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r,n="convertToAsyncFunction",i=[e.Diagnostics.This_may_be_converted_to_an_async_function.code],a=!0;function o(t,r,n,i,a){var o,_=e.getTokenAtPosition(r,n);if(o=e.isIdentifier(_)&&e.isVariableDeclaration(_.parent)&&_.parent.initializer&&e.isFunctionLikeDeclaration(_.parent.initializer)?_.parent.initializer:e.tryCast(e.getContainingFunction(e.getTokenAtPosition(r,n)),e.isFunctionLikeDeclaration)){var d,p,f=e.createMap(),g=e.createMap(),y=[],h=e.isInJSFile(o),v=function(t,r){if(!t.body)return e.createMap();var n=e.createMap();return e.forEachChild(t.body,(function t(i){s(i,r,"then")?(n.set(e.getNodeId(i).toString(),!0),e.forEach(i.arguments,t)):s(i,r,"catch")?(n.set(e.getNodeId(i).toString(),!0),e.forEachChild(i,t)):s(i,r)?n.set(e.getNodeId(i).toString(),!0):e.forEachChild(i,t)})),n}(o,i),x=function(t,r,n,i,a,o,s){var l=e.createMap(),_=e.createMap();return e.forEachChild(t,(function t(o){if(e.isIdentifier(o)){var d=r.getSymbolAtLocation(o),p=d&&function(e,t){return e.valueDeclaration&&e.valueDeclaration.getSourceFile()===t}(d,i.sourceFile);if(d&&p){var f=m(r.getTypeAtLocation(o),r),g=e.getSymbolId(d).toString();if(!f||e.isFunctionLikeDeclaration(o.parent)||n.has(g)){if(o.parent&&(e.isParameter(o.parent)||e.isVariableDeclaration(o.parent)||e.isBindingElement(o.parent))){var y=o.text,h=_.get(y);if(h&&h.some((function(e){return e!==d}))){var v=u(o,_);l.set(g,v.identifier),n.set(g,v),s.push({identifier:v.identifier,symbol:d}),c(_,y,d)}else{var x=e.getSynthesizedDeepClone(o);l.set(g,x),n.set(g,b(x,[],s.filter((function(e){return e.identifier.text===o.text})).length)),(e.isParameter(o.parent)&&function(t){var n=t.parent;if(e.isCallExpression(n)||e.isIdentifier(n)&&!a.get(e.getNodeId(n).toString())){var i=r.getTypeAtLocation(n);return!!(i&&r.getPromisedTypeOfPromise(i))}return!1}(o.parent.parent)||e.isVariableDeclaration(o.parent))&&(s.push({identifier:x,symbol:d}),c(_,y,d))}}}else{var D=e.firstOrUndefined(f.parameters),S=D&&e.isParameter(D.valueDeclaration)&&e.tryCast(D.valueDeclaration.name,e.isIdentifier)||e.createOptimisticUniqueName("result"),T=u(S,_);n.set(g,T),s.push({identifier:T.identifier,symbol:d}),c(_,S.text,d)}}}else e.forEachChild(o,t)})),e.getSynthesizedDeepCloneWithRenames(t,!0,l,r,(function(t,i){if(e.isIdentifier(t)){var s=r.getSymbolAtLocation(t),c=s&&e.getSymbolId(s).toString();if(s&&n.get(c)){var u=r.getTypeAtLocation(t);o.set(e.getNodeId(i).toString(),u)}}var l=a.get(e.getNodeId(t).toString());void 0!==l&&(a.delete(e.getNodeId(t).toString()),a.set(e.getNodeId(i).toString(),l))}))}(o,i,f,a,v,g,y),D=function(e){var t=[];return e.forEach((function(e){0===e.numberOfAssignmentsOriginal&&t.push(e.identifier)})),t}(f),S=x.body&&e.isBlock(x.body)?(d=x.body,p=[],e.forEachReturnStatement(d,(function(t){e.isReturnStatementWithFixablePromiseHandler(t)&&p.push(t)})),p):e.emptyArray,T={checker:i,synthNamesMap:f,allVarNames:y,setOfExpressionsToReturn:v,constIdentifiers:D,originalTypeMap:g,isInJSFile:h};if(S.length){t.insertLastModifierBefore(r,125,o);for(var E=function(n){e.forEachChild(n,(function i(a){e.isCallExpression(a)?function(e,n){var i=l(e,T,e);t.replaceNodeWithNodes(r,n,i)}(a,n):e.isFunctionLike(a)||e.forEachChild(a,i)}))},C=0,k=S;C<k.length;C++){E(k[C])}}}}function s(t,r,n){var i=(n?e.isCallExpression(t):e.isExpression(t))&&(!n||e.hasPropertyAccessExpressionWithName(t,n))&&r.getTypeAtLocation(t);return!(!i||!r.getPromisedTypeOfPromise(i))}function c(e,t,r){e.has(t)?e.get(t).push(r):e.set(t,[r])}function u(t,r){var n=(r.get(t.text)||e.emptyArray).length;return b(0===n?t:e.createIdentifier(t.text+"_"+n),[],0)}function l(t,r,n,i){if(!t)return e.emptyArray;var o=e.isIdentifier(t)&&r.originalTypeMap.get(e.getNodeId(t).toString())||r.checker.getTypeAtLocation(t);return e.isCallExpression(t)&&e.hasPropertyAccessExpressionWithName(t,"then")&&o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n,i){var a=t.arguments,o=a[0],s=a[1];if(!o)return l(t.expression,r,n);var c=y(o,r),u=f(o,i,c,t,r);if(s){var _=y(s,r),d=e.createBlock(l(t.expression,r,t,c).concat(u)),p=f(s,i,_,t,r),m=_?x(_)?_.identifier.text:_.bindingPattern:"e",g=e.createVariableDeclaration(m),h=e.createCatchClause(g,e.createBlock(p));return[e.createTry(d,h,void 0)]}return l(t.expression,r,t,c).concat(u)}(t,r,n,i):e.isCallExpression(t)&&e.hasPropertyAccessExpressionWithName(t,"catch")&&o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n){var i,a=t.arguments[0],o=y(a,r),s=r.setOfExpressionsToReturn.get(e.getNodeId(t).toString());n&&!s&&(x(n)?(i=n,r.synthNamesMap.forEach((function(e,t){if(e.identifier.text===n.identifier.text){var i=_(n);r.synthNamesMap.set(t,i)}}))):i=b(e.createOptimisticUniqueName("result"),n.types),i.numberOfAssignmentsOriginal=2,r.constIdentifiers.some((function(e){return e.text===i.identifier.text}))&&r.constIdentifiers.push(_(i).identifier));var c,u,d=e.createBlock(l(t.expression,r,t,i)),p=f(a,i,o,t,r),m=o?x(o)?o.identifier.text:o.bindingPattern:"e",g=e.createVariableDeclaration(m),h=e.createCatchClause(g,e.createBlock(p));if(i&&!s){u=e.getSynthesizedDeepClone(i.identifier);var v=i.types,D=r.checker.getUnionType(v,2),S=r.isInJSFile?void 0:r.checker.typeToTypeNode(D),T=[e.createVariableDeclaration(u,S)];c=e.createVariableStatement(void 0,e.createVariableDeclarationList(T,1))}var E=e.createTry(d,h,void 0),C=n&&u&&(k=n,1===k.kind)&&e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepCloneWithRenames(n.bindingPattern),void 0,u)],2));var k;return e.compact([c,E,C])}(t,r,i):e.isPropertyAccessExpression(t)?l(t.expression,r,n,i):o&&r.checker.getPromisedTypeOfPromise(o)?function(t,r,n){var i=r.setOfExpressionsToReturn.get(e.getNodeId(t).toString()),a=t.original?t.original.parent:t.parent;if(n&&!i&&(!a||e.isPropertyAccessExpression(a)))return p(n,e.createAwait(t),r);if(!n&&!i&&(!a||e.isPropertyAccessExpression(a)))return[e.createStatement(e.createAwait(t))];return[e.createReturn(e.getSynthesizedDeepClone(t))]}(t,r,i):(a=!1,e.emptyArray)}function _(t){return b(e.createOptimisticUniqueName(t.identifier.text))}function d(t,r){var n=function t(r){return e.isIdentifier(r)?[r.text]:e.flatMap(r.elements,(function(r){return e.isOmittedExpression(r)?[]:t(r.name)}))}(v(t));return r.some((function(t){return e.contains(n,t.text)}))?2:1}function p(t,r,n){return!t||h(t)?[e.createStatement(r)]:x(t)&&t.types.length<t.numberOfAssignmentsOriginal?[e.createStatement(e.createAssignment(e.getSynthesizedDeepClone(t.identifier),r))]:[e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(v(t)),void 0,r)],d(t,n.constIdentifiers)))]}function f(t,r,n,i,o){var c=o.setOfExpressionsToReturn.get(e.getNodeId(i).toString());switch(t.kind){case 99:break;case 75:if(!n)break;var u=e.createCall(e.getSynthesizedDeepClone(t),void 0,x(n)?[n.identifier]:[]);if(c)return[e.createReturn(u)];var l=o.originalTypeMap.get(e.getNodeId(t).toString())||o.checker.getTypeAtLocation(t),_=o.checker.getSignaturesOfType(l,0);if(!_.length){a=!1;break}var f=_[0].getReturnType(),y=p(r,e.createAwait(u),o);return r&&r.types.push(f),y;case 200:case 201:var h=t.body;if(e.isBlock(h)){for(var b=[],D=!1,S=0,T=h.statements;S<T.length;S++){var E=T[S];e.isReturnStatement(E)&&(D=!0),e.isReturnStatementWithFixablePromiseHandler(E)?b=b.concat(g(o,[E],r)):b.push(E)}return c?b.map((function(t){return e.getSynthesizedDeepClone(t)})):function(t,r,n,i){for(var a=[],o=0,c=t;o<c.length;o++){var u=c[o];if(e.isReturnStatement(u)){if(u.expression){var l=s(u.expression,n.checker)?e.createAwait(u.expression):u.expression;void 0===r?a.push(e.createExpressionStatement(l)):a.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(v(r),void 0,l)],d(r,n.constIdentifiers))))}}else a.push(e.getSynthesizedDeepClone(u))}i||void 0===r||a.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(v(r),void 0,e.createIdentifier("undefined"))],d(r,n.constIdentifiers))));return a}(b,r,o,D)}var C=g(o,e.isFixablePromiseHandler(h)?[e.createReturn(h)]:e.emptyArray,r);if(C.length>0)return C;var k=m(o.checker.getTypeAtLocation(t),o.checker).getReturnType(),N=e.getSynthesizedDeepClone(h),A=o.checker.getPromisedTypeOfPromise(k)?e.createAwait(N):N;if(c)return[e.createReturn(A)];var F=p(r,A,o);return r&&r.types.push(k),F;default:a=!1}return e.emptyArray}function m(t,r){var n=r.getSignaturesOfType(t,0);return e.lastOrUndefined(n)}function g(t,r,n){for(var i=[],a=0,o=r;a<o.length;a++){var s=o[a];e.forEachChild(s,(function r(a){if(e.isCallExpression(a)){var o=l(a,t,a,n);if((i=i.concat(o)).length>0)return}else e.isFunctionLike(a)||e.forEachChild(a,r)}))}return i}function y(t,r){var n,i=0,a=[];e.isFunctionLikeDeclaration(t)?t.parameters.length>0&&(n=function t(r){if(e.isIdentifier(r))return o(r);var n=e.flatMap(r.elements,(function(r){return e.isOmittedExpression(r)?[]:[t(r.name)]}));return function(t,r,n){void 0===r&&(r=e.emptyArray);void 0===n&&(n=[]);return{kind:1,bindingPattern:t,elements:r,types:n}}(r,n)}(t.parameters[0].name)):e.isIdentifier(t)&&(n=o(t));if(n&&!("identifier"in n&&"undefined"===n.identifier.text))return n;function o(t){var n=function(e){return e.symbol?e.symbol:r.checker.getSymbolAtLocation(e)}(function(e){return e.original?e.original:e}(t));return n&&r.synthNamesMap.get(e.getSymbolId(n).toString())||b(t,a,i)}}function h(t){return!t||(x(t)?!t.identifier.text:e.every(t.elements,h))}function v(e){return x(e)?e.identifier:e.bindingPattern}function b(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=0),{kind:0,identifier:e,types:t,numberOfAssignmentsOriginal:r}}function x(e){return 0===e.kind}t.registerCodeFix({errorCodes:i,getCodeActions:function(r){a=!0;var i=e.textChanges.ChangeTracker.with(r,(function(e){return o(e,r.sourceFile,r.span.start,r.program.getTypeChecker(),r)}));return a?[t.createCodeFixAction(n,i,e.Diagnostics.Convert_to_async_function,n,e.Diagnostics.Convert_all_to_async_functions)]:[]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,i,(function(t,r){return o(t,r.file,r.start,e.program.getTypeChecker(),e)}))}}),function(e){e[e.Identifier=0]="Identifier",e[e.BindingPattern=1]="BindingPattern"}(r||(r={}))}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){function r(t,r,n,i){for(var a=0,o=t.imports;a<o.length;a++){var s=o[a],c=e.getResolvedModule(t,s.text);if(c&&c.resolvedFileName===r.fileName){var u=e.importFromModuleSpecifier(s);switch(u.kind){case 252:n.replaceNode(t,u,e.makeImport(u.name,void 0,s,i));break;case 195:e.isRequireCall(u,!1)&&n.replaceNode(t,u,e.createPropertyAccess(e.getSynthesizedDeepClone(u),"default"))}}}}function n(t,r){t.forEachChild((function n(i){if(e.isPropertyAccessExpression(i)&&e.isExportsOrModuleExportsOrAlias(t,i.expression)){var a=i.parent;r(i,e.isBinaryExpression(a)&&a.left===i&&62===a.operatorToken.kind)}i.forEachChild(n)}))}function i(r,n,i,c,f,m,g,y){switch(n.kind){case 224:return function(r,n,i,a,o,c,u){var p=n.declarationList,f=!1,m=e.flatMap(p.declarations,(function(n){var m=n.name,g=n.initializer;if(g){if(e.isExportsOrModuleExportsOrAlias(r,g))return f=!0,[];if(e.isRequireCall(g,!0))return f=!0,function(r,n,i,a,o,c,u,l){switch(n.kind){case 188:var p=e.mapAllOrFail(n.elements,(function(t){return t.dotDotDotToken||t.initializer||t.propertyName&&!e.isIdentifier(t.propertyName)||!e.isIdentifier(t.name)?void 0:_(t.propertyName&&t.propertyName.text,t.name.text)}));if(p)return[e.makeImport(void 0,p,i,l)];case 189:var f=s(t.moduleSpecifierToValidIdentifier(i.text,u),c);return[e.makeImport(e.createIdentifier(f),void 0,i,l),d(void 0,e.getSynthesizedDeepClone(n),e.createIdentifier(f))];case 75:return function(t,r,n,i,a,o,c){for(var u=a.getSymbolAtLocation(r),l=e.createMap(),_=!1,d=0,p=o.original.get(r.text);d<p.length;d++){var f=p[d];if(a.getSymbolAtLocation(f)===u&&f!==r){var m=f.parent;if(e.isPropertyAccessExpression(m)){var g=m.expression,y=m.name.text;e.Debug.assert(g===f,"Didn't expect expression === use");var h=l.get(y);void 0===h&&(h=s(y,o),l.set(y,h)),i.replaceNode(t,m,e.createIdentifier(h))}else _=!0}}var v=0===l.size?void 0:e.arrayFrom(e.mapIterator(l.entries(),(function(t){var r=t[0],n=t[1];return e.createImportSpecifier(r===n?void 0:e.createIdentifier(r),e.createIdentifier(n))})));v||(_=!0);return[e.makeImport(_?e.getSynthesizedDeepClone(r):void 0,v,n,c)]}(r,n,i,a,o,c,l);default:return e.Debug.assertNever(n,"Convert to ES6 module got invalid name kind "+n.kind)}}(r,m,g.arguments[0],i,a,o,c,u);if(e.isPropertyAccessExpression(g)&&e.isRequireCall(g.expression,!0))return f=!0,function(t,r,n,i,a){switch(t.kind){case 188:case 189:var o=s(r,i);return[l(o,r,n,a),d(void 0,t,e.createIdentifier(o))];case 75:return[l(t.text,r,n,a)];default:return e.Debug.assertNever(t,"Convert to ES6 module got invalid syntax form "+t.kind)}}(m,g.name.text,g.expression.arguments[0],o,u)}return e.createVariableStatement(void 0,e.createVariableDeclarationList([n],p.flags))}));f&&i.replaceNodeWithNodes(r,n,m)}(r,n,c,i,f,m,y),!1;case 225:var h=n.expression;switch(h.kind){case 195:return e.isRequireCall(h,!0)&&c.replaceNode(r,n,e.makeImport(void 0,void 0,h.arguments[0],y)),!1;case 208:return 62===h.operatorToken.kind&&function(t,r,n,i,s){var c=n.left,l=n.right;if(!e.isPropertyAccessExpression(c))return!1;if(e.isExportsOrModuleExportsOrAlias(t,c)){if(!e.isExportsOrModuleExportsOrAlias(t,l)){var _=e.isObjectLiteralExpression(l)?(f=l,(m=e.mapAllOrFail(f.properties,(function(t){switch(t.kind){case 162:case 163:case 280:case 281:return;case 279:return e.isIdentifier(t.name)?function(t,r){var n=[e.createToken(88)];switch(r.kind){case 200:var i=r.name;if(i&&i.text!==t)return a();case 201:return u(t,n,r);case 213:return function(t,r,n){return e.createClassDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.heritageClauses),e.getSynthesizedDeepClones(n.members))}(t,n,r);default:return a()}function a(){return d(n,e.createIdentifier(t),r)}}(t.name.text,t.initializer):void 0;case 160:return e.isIdentifier(t.name)?u(t.name.text,[e.createToken(88)],t):void 0;default:e.Debug.assertNever(t,"Convert to ES6 got invalid prop kind "+t.kind)}})))&&[m,!1]):e.isRequireCall(l,!0)?function(t,r){var n=t.text,i=r.getSymbolAtLocation(t),s=i?i.exports:e.emptyUnderscoreEscapedMap;return s.has("export=")?[[o(n)],!0]:s.has("default")?s.size>1?[[a(n),o(n)],!0]:[[o(n)],!0]:[[a(n)],!1]}(l.arguments[0],r):void 0;return _?(i.replaceNodeWithNodes(t,n.parent,_[0]),_[1]):(i.replaceRangeWithText(t,e.createRange(c.getStart(t),l.pos),"export default"),!0)}i.delete(t,n.parent)}else e.isExportsOrModuleExportsOrAlias(t,c.expression)&&function(t,r,n,i){var a=r.left.name.text,o=i.get(a);if(void 0!==o){var s=[d(void 0,o,r.right),p([e.createExportSpecifier(o,a)])];n.replaceNodeWithNodes(t,r.parent,s)}else!function(t,r,n){var i=t.left,a=t.right,o=t.parent,s=i.name.text;if(!(e.isFunctionExpression(a)||e.isArrowFunction(a)||e.isClassExpression(a))||a.name&&a.name.text!==s)n.replaceNodeRangeWithNodes(r,i.expression,e.findChildOfKind(i,24,r),[e.createToken(88),e.createToken(80)],{joiner:" ",suffix:" "});else{n.replaceRange(r,{pos:i.getStart(r),end:a.getStart(r)},e.createToken(88),{suffix:" "}),a.name||n.insertName(r,a,s);var c=e.findChildOfKind(o,26,r);c&&n.delete(r,c)}}(r,t,n)}(t,n,i,s);var f,m;return!1}(r,i,h,c,g)}default:return!1}}function a(e){return p(void 0,e)}function o(t){return p([e.createExportSpecifier(void 0,"default")],t)}function s(e,t){for(;t.original.has(e)||t.additional.has(e);)e="_"+e;return t.additional.set(e,!0),e}function c(t){var r=e.createMultiMap();return function t(r,n){e.isIdentifier(r)&&function(e){var t=e.parent;switch(t.kind){case 193:return t.name!==e;case 190:case 257:return t.propertyName!==e;default:return!0}}(r)&&n(r);r.forEachChild((function(e){return t(e,n)}))}(t,(function(e){return r.add(e.text,e)})),r}function u(t,r,n){return e.createFunctionDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),e.getSynthesizedDeepClone(n.asteriskToken),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.parameters),e.getSynthesizedDeepClone(n.type),e.convertToFunctionBody(e.getSynthesizedDeepClone(n.body)))}function l(t,r,n,i){return"default"===r?e.makeImport(e.createIdentifier(t),void 0,n,i):e.makeImport(void 0,[_(r,t)],n,i)}function _(t,r){return e.createImportSpecifier(void 0!==t&&t!==r?e.createIdentifier(t):void 0,e.createIdentifier(r))}function d(t,r,n){return e.createVariableStatement(t,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,n)],2))}function p(t,r){return e.createExportDeclaration(void 0,void 0,t&&e.createNamedExports(t),void 0===r?void 0:e.createLiteral(r))}t.registerCodeFix({errorCodes:[e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module.code],getCodeActions:function(a){var o=a.sourceFile,u=a.program,l=a.preferences,_=e.textChanges.ChangeTracker.with(a,(function(t){if(function(t,r,a,o,u){var l={original:c(t),additional:e.createMap()},_=function(t,r,i){var a=e.createMap();return n(t,(function(t){var n=t.name,o=n.text,c=n.originalKeywordKind;!a.has(o)&&(void 0!==c&&e.isNonContextualKeyword(c)||r.resolveName(t.name.text,t,111551,!0))&&a.set(o,s("_"+o,i))})),a}(t,r,l);!function(t,r,i){n(t,(function(n,a){if(!a){var o=n.name.text;i.replaceNode(t,n,e.createIdentifier(r.get(o)||o))}}))}(t,_,a);for(var d=!1,p=0,f=t.statements;p<f.length;p++){var m=f[p],g=i(t,m,r,a,l,o,_,u);d=d||g}return d}(o,u.getTypeChecker(),t,u.getCompilerOptions().target,e.getQuotePreference(o,l)))for(var a=0,_=u.getSourceFiles();a<_.length;a++){var d=_[a];r(d,o,t,e.getQuotePreference(d,l))}}));return[t.createCodeFixActionNoFixId("convertToEs6Module",_,e.Diagnostics.Convert_to_ES6_module)]}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="correctQualifiedNameToIndexedAccessType",n=[e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function i(t,r){var n=e.findAncestor(e.getTokenAtPosition(t,r),e.isQualifiedName);return e.Debug.assert(!!n,"Expected position to be owned by a qualified name."),e.isIdentifier(n.left)?n:void 0}function a(t,r,n){var i=n.right.text,a=e.createIndexedAccessTypeNode(e.createTypeReferenceNode(n.left,void 0),e.createLiteralTypeNode(e.createLiteral(i)));t.replaceNode(r,n,a)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=i(n.sourceFile,n.span.start);if(o){var s=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,n.sourceFile,o)})),c=o.left.text+'["'+o.right.text+'"]';return[t.createCodeFixAction(r,s,[e.Diagnostics.Rewrite_as_the_indexed_access_type_0,c],r,e.Diagnostics.Rewrite_all_as_indexed_access_types)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){var r=i(t.file,t.start);r&&a(e,t.file,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r=[e.Diagnostics.Class_0_incorrectly_implements_interface_1.code,e.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],n="fixClassIncorrectlyImplementsInterface";function i(t,r){return e.Debug.assertDefined(e.getContainingClass(e.getTokenAtPosition(t,r)),"There should be a containing class")}function a(t){return!(8&e.getModifierFlags(t.valueDeclaration))}function o(r,n,i,o,s,c){var u=r.program.getTypeChecker(),l=function(t,r){var n=e.getEffectiveBaseTypeNode(t);if(!n)return e.createSymbolTable();var i=r.getTypeAtLocation(n),o=r.getPropertiesOfType(i);return e.createSymbolTable(o.filter(a))}(o,u),_=u.getTypeAtLocation(n),d=u.getPropertiesOfType(_).filter(e.and(a,(function(e){return!l.has(e.escapedName)}))),p=u.getTypeAtLocation(o);function f(e,n){var a=u.getIndexInfoOfType(e,n);a&&s.insertNodeAtClassStart(i,o,u.indexInfoToIndexSignatureDeclaration(a,n,o,void 0,t.getNoopSymbolTrackerWithResolver(r)))}p.getNumberIndexType()||f(_,1),p.getStringIndexType()||f(_,0),t.createMissingMemberNodes(o,d,r,c,(function(e){return s.insertNodeAtClassStart(i,o,e)}))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,s=r.span,c=i(a,s.start);return e.mapDefined(e.getClassImplementsHeritageClauseElements(c),(function(i){var s=e.textChanges.ChangeTracker.with(r,(function(e){return o(r,i,a,c,e,r.preferences)}));return 0===s.length?void 0:t.createCodeFixAction(n,s,[e.Diagnostics.Implement_interface_0,i.getText(a)],n,e.Diagnostics.Implement_all_unimplemented_interfaces)}))},fixIds:[n],getAllCodeActions:function(n){var a=e.createMap();return t.codeFixAll(n,r,(function(t,r){var s=i(r.file,r.start);if(e.addToSeen(a,e.getNodeId(s)))for(var c=0,u=e.getClassImplementsHeritageClauseElements(s);c<u.length;c++){var l=u[c];o(n,l,r.file,s,t,n.preferences)}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(n){n.importFixId="fixMissingImport";var i,a,o=[e.Diagnostics.Cannot_find_name_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,e.Diagnostics.Cannot_find_namespace_0.code,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code];function s(e){return{description:e.description,changes:e.changes,commands:e.commands}}function c(t,r){return!(111551&e.skipAlias(t,r).flags)}function u(r,n,i,a,o,s,c){var u=a.getTypeChecker(),d=e.flatMap(r,(function(t){return function(t,r,n){var i=t.moduleSymbol,a=t.importKind;return t.exportedSymbolIsTypeOnly&&e.isSourceFileJS(n)?e.emptyArray:e.mapDefined(n.imports,(function(t){var n=e.importFromModuleSpecifier(t);return 253!==n.kind&&252!==n.kind||r.getSymbolAtLocation(t)!==i?void 0:{declaration:n,importKind:a}}))}(t,u,o)})),p=void 0===i?void 0:function(t,r,n,i){return e.firstDefined(t,(function(t){var a=function(t){if(253===t.kind){var r=t.importClause&&e.isImportClause(t.importClause)&&t.importClause.namedBindings;return r&&255===r.kind?r.name:void 0}return t.name}(t.declaration);if(a){var o=i.getAliasedSymbol(i.getSymbolAtLocation(a));if(o&&o.exports.has(e.escapeLeadingUnderscores(r)))return{kind:0,namespacePrefix:a.text,position:n}}}))}(d,n,i,u),f=function(t){return e.firstDefined(t,(function(e){var t=e.declaration,r=e.importKind;if(253===t.kind){var n=t.importClause;if(n){var i=n.name,a=n.namedBindings;return 1===r&&!i||0===r&&(!a||256===a.kind)?{kind:2,importClause:n,importKind:r}:void 0}}}))}(d),m=f?[f]:function(t,r,n,i,a,o,s){var c=e.firstDefined(r,_);return c?[c]:l(n,i,a,t,o,s)}(r,d,a,o,i,s,c);return t(p?[p]:e.emptyArray,m)}function l(t,r,n,i,a,o){var s=e.isSourceFileJS(r),c=k(r,t,a).allowsImportingSpecifier,u=e.flatMap(i,(function(i){var c=i.moduleSymbol,u=i.importKind,l=i.exportedSymbolIsTypeOnly;return e.moduleSpecifiers.getModuleSpecifiers(c,t.getCompilerOptions(),r,a,t.getSourceFiles(),o,t.redirectTargetsMap).map((function(t){return l&&s?{kind:1,moduleSpecifier:t,position:e.Debug.assertDefined(n,"position should be defined")}:{kind:3,moduleSpecifier:t,importKind:u}}))}));return e.sort(u,(function(e,t){var r=c(e.moduleSpecifier),n=c(t.moduleSpecifier);return r&&!n?-1:n&&!r?1:e.moduleSpecifier.length-t.moduleSpecifier.length}))}function _(t){var r=t.declaration,n=t.importKind,i=253===r.kind?r.moduleSpecifier:263===r.moduleReference.kind?r.moduleReference.expression:void 0;return i&&e.isStringLiteral(i)?{kind:3,moduleSpecifier:i.text,importKind:n}:void 0}function d(t,n,i){var a=e.getTokenAtPosition(t.sourceFile,i),o=n===e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code?function(t,r){var n=t.sourceFile,i=t.program,a=t.host,o=t.preferences,s=i.getTypeChecker(),c=function(t,r){var n=e.isIdentifier(t)?r.getSymbolAtLocation(t):void 0;if(e.isUMDExportSymbol(n))return n;var i=t.parent;return e.isJsxOpeningLikeElement(i)&&i.tagName===t||e.isJsxOpeningFragment(i)?e.tryCast(r.resolveName(r.getJsxNamespace(i),e.isJsxOpeningLikeElement(i)?t:i,111551,!1),e.isUMDExportSymbol):void 0}(r,s);if(!c)return;var l=s.getAliasedSymbol(c),_=c.name;return{fixes:u([{moduleSymbol:l,importKind:p(n,i.getCompilerOptions()),exportedSymbolIsTypeOnly:!1}],_,e.isIdentifier(r)?r.getStart(n):void 0,i,n,a,o),symbolName:_}}(t,a):e.isIdentifier(a)?function(t,r){var n=t.sourceFile,i=t.program,a=t.cancellationToken,o=t.host,s=t.preferences,l=i.getTypeChecker(),_=e.isJsxOpeningLikeElement(r.parent)&&r.parent.tagName===r&&(e.isIntrinsicJsxName(r.text)||l.resolveName(r.text,r,67108863,!1))?l.getJsxNamespace(n):r.text;e.Debug.assert("default"!==_,"'default' isn't a legal identifier and couldn't occur here");var d=function(t,r,n,i,a,o,s){var u=e.createMultiMap();function l(t,r,n){u.add(e.getUniqueSymbolId(r,a).toString(),{moduleSymbol:t,importKind:n,exportedSymbolIsTypeOnly:c(r,a)})}return S(o,s,i,!0,(function(e){n.throwIfCancellationRequested();var s=f(i,e,a,o.getCompilerOptions());s&&s.name===t&&D(s.symbolForMeaning,r)&&l(e,s.symbol,s.kind);var c=a.tryGetMemberInModuleExportsAndProperties(t,e);c&&D(c,r)&&l(e,c,0)})),u}(_,e.getMeaningFromLocation(r),a,n,l,i,o);return{fixes:e.arrayFrom(e.flatMapIterator(d.entries(),(function(e){e[0];return u(e[1],_,r.getStart(n),i,n,o,s)}))),symbolName:_}}(t,a):void 0;return o&&r(r({},o),{fixes:e.sort(o.fixes,(function(e,t){return e.kind-t.kind}))})}function p(t,r){if(e.getAllowSyntheticDefaultImports(r))return 1;var n=e.getEmitModuleKind(r);switch(n){case e.ModuleKind.AMD:case e.ModuleKind.CommonJS:case e.ModuleKind.UMD:return e.isInJSFile(t)?e.isExternalModule(t)?2:4:3;case e.ModuleKind.System:case e.ModuleKind.ES2015:case e.ModuleKind.ESNext:case e.ModuleKind.None:return 2;default:return e.Debug.assertNever(n,"Unexpected moduleKind "+n)}}function f(t,n,i,a){var o=function(e,t,r,n){var i=r.tryGetMemberInModuleExports("default",t);if(i)return{symbol:i,kind:1};var a=r.resolveExternalModuleSymbol(t);return a===t?void 0:{symbol:a,kind:m(e,n,r)}}(t,n,i,a);if(o){var s=o.symbol,c=o.kind,u=function t(r,n,i,a){var o=e.getLocalSymbolForExportDefault(r);if(o)return{symbolForMeaning:o,name:o.name};var s=(c=r,c.declarations&&e.firstDefined(c.declarations,(function(t){if(e.isExportAssignment(t)){if(e.isIdentifier(t.expression))return t.expression.text}else if(e.isExportSpecifier(t))return e.Debug.assert("default"===t.name.text,"Expected the specifier to be a default export"),t.propertyName&&t.propertyName.text})));var c;if(void 0!==s)return{symbolForMeaning:r,name:s};if(2097152&r.flags){var u=i.getImmediateAliasedSymbol(r);return u&&t(u,e.Debug.assertDefined(u.parent,"Alias targets of default exports must have a parent"),i,a)}if("default"!==r.escapedName&&"export="!==r.escapedName)return{symbolForMeaning:r,name:r.getName()};return{symbolForMeaning:r,name:E(n,a.target)}}(s,n,i,a);return u&&r({symbol:s,kind:c},u)}}function m(t,r,n){if(e.getAllowSyntheticDefaultImports(r)&&e.getEmitModuleKind(r)>=e.ModuleKind.ES2015)return 1;if(e.isInJSFile(t))return e.isExternalModule(t)?1:4;for(var i=0,a=t.statements;i<a.length;i++){var o=a[i];if(e.isImportEqualsDeclaration(o))return 3;if(e.isImportDeclaration(o)&&o.importClause&&o.importClause.name){var s=n.getImmediateAliasedSymbol(o.importClause.symbol);if(s&&"default"!==s.name)return 1}}return 3}function g(t,r,i,a,o){var s,c=e.textChanges.ChangeTracker.with(t,(function(t){s=function(t,r,n,i,a){switch(i.kind){case 0:return h(t,r,i),[e.Diagnostics.Change_0_to_1,n,i.namespacePrefix+"."+n];case 1:return v(t,r,i,a),[e.Diagnostics.Change_0_to_1,n,b(i.moduleSpecifier,a)+n];case 2:var o=i.importClause,s=i.importKind;y(t,r,o,1===s?n:void 0,0===s?[n]:e.emptyArray);var c=e.stripQuotes(o.parent.moduleSpecifier.getText());return[1===s?e.Diagnostics.Add_default_import_0_to_existing_import_declaration_from_1:e.Diagnostics.Add_0_to_existing_import_declaration_from_1,n,c];case 3:s=i.importKind;var u=i.moduleSpecifier;return x(t,r,u,a,1===s?{defaultImport:n,namedImports:e.emptyArray,namespaceLikeImport:void 0}:0===s?{defaultImport:void 0,namedImports:[n],namespaceLikeImport:void 0}:{defaultImport:void 0,namedImports:e.emptyArray,namespaceLikeImport:{importKind:s,name:n}}),[1===s?e.Diagnostics.Import_default_0_from_module_1:e.Diagnostics.Import_0_from_module_1,n,u];default:return e.Debug.assertNever(i,"Unexpected fix kind "+i.kind)}}(t,r,i,a,o)}));return n.createCodeFixAction("import",c,s,n.importFixId,e.Diagnostics.Add_all_missing_imports)}function y(t,r,n,i,a){if(i&&(e.Debug.assert(!n.name,"Default imports can't have names"),t.insertNodeAt(r,n.getStart(r),e.createIdentifier(i),{suffix:", "})),a.length){var o=a.map((function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))}));if(n.namedBindings&&e.cast(n.namedBindings,e.isNamedImports).elements.length)for(var s=0,c=o;s<c.length;s++){var u=c[s];t.insertNodeInListAfter(r,e.last(e.cast(n.namedBindings,e.isNamedImports).elements),u)}else if(o.length){var l=e.createNamedImports(o);n.namedBindings?t.replaceNode(r,n.namedBindings,l):t.insertNodeAfter(r,e.Debug.assertDefined(n.name,"Named import specifiers must have names"),l)}}}function h(e,t,r){var n=r.namespacePrefix,i=r.position;e.insertText(t,i,n+".")}function v(e,t,r,n){var i=r.moduleSpecifier,a=r.position;e.insertText(t,a,b(i,n))}function b(t,r){var n=e.getQuoteFromPreference(r);return"import("+n+t+n+")."}function x(t,r,n,i,a){var o=a.defaultImport,s=a.namedImports,c=a.namespaceLikeImport,u=e.makeStringLiteral(n,i);(void 0!==o||s.length)&&e.insertImport(t,r,e.makeImport(void 0===o?void 0:e.createIdentifier(o),s.map((function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))})),n,i)),c&&e.insertImport(t,r,3===c.importKind?e.createImportEqualsDeclaration(void 0,void 0,e.createIdentifier(c.name),e.createExternalModuleReference(u)):4===c.importKind?function(t,r){return e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createIdentifier(t),void 0,e.createCall(e.createIdentifier("require"),void 0,[r]))],2))}(c.name,u):e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(e.createIdentifier(c.name))),u))}function D(t,r){var n=t.declarations;return e.some(n,(function(t){return!!(e.getMeaningFromDeclaration(t)&r)}))}function S(t,r,n,i,a){var o=0,s=i&&k(n,t,r),c=t.getSourceFiles(),u=r.getGlobalTypingsCacheLocation&&r.getGlobalTypingsCacheLocation();T(t.getTypeChecker(),c,(function(t,i){var l,_,d,p,f,m;void 0===i?!s||s.allowsImportingAmbientModule(t,c)?a(t):s&&o++:i&&i!==n&&(l=n.fileName,_=i.fileName,d=e.hostGetCanonicalFileName(r),p=u,f=e.forEachAncestorDirectory(_,(function(t){return"node_modules"===e.getBaseFileName(t)?t:void 0})),void 0===(m=f&&e.getDirectoryPath(d(f)))||e.startsWith(d(l),m)||p&&e.startsWith(d(p),m))&&(!s||s.allowsImportingSourceFile(i,c)?a(t):s&&o++)})),r.log&&r.log("forEachExternalModuleToImportFrom: filtered out "+o+" modules by package.json contents")}function T(t,r,n){for(var i=0,a=t.getAmbientModules();i<a.length;i++){n(a[i],void 0)}for(var o=0,s=r;o<s.length;o++){var c=s[o];e.isExternalOrCommonJsModule(c)&&n(t.getMergedSymbol(c.symbol),c)}}function E(t,r){return C(e.removeFileExtension(e.stripQuotes(t.name)),r)}function C(t,r){var n=e.getBaseFileName(e.removeSuffix(t,"/index")),i="",a=!0,o=n.charCodeAt(0);e.isIdentifierStart(o,r)?i+=String.fromCharCode(o):a=!1;for(var s=1;s<n.length;s++){var c=n.charCodeAt(s),u=e.isIdentifierPart(c,r);if(u){var l=String.fromCharCode(c);a||(l=l.toUpperCase()),i+=l}a=u}return e.isStringANonContextualKeyword(i)?"_"+i:i||"_"}function k(t,r,n){var i,a=n.getPackageJsonsVisibleToFile&&n.getPackageJsonsVisibleToFile(t.fileName)||e.getPackageJsonsVisibleToFile(t.fileName,n),o=11,s={directoryExists:e.maybeBind(n,n.directoryExists),fileExists:e.maybeBind(n,n.fileExists),getCurrentDirectory:e.maybeBind(n,n.getCurrentDirectory),readFile:e.maybeBind(n,n.readFile),useCaseSensitiveFileNames:e.maybeBind(n,n.useCaseSensitiveFileNames),getProbableSymlinks:e.maybeBind(n,n.getProbableSymlinks)||r.getProbableSymlinks,getGlobalTypingsCacheLocation:e.maybeBind(n,n.getGlobalTypingsCacheLocation)};return{allowsImportingAmbientModule:function(t,r){if(!a.length)return!0;var n=l(t.valueDeclaration.getSourceFile().fileName,r);if(void 0===n)return!0;var i=e.stripQuotes(t.getName());if(u(i))return!0;return c(n)||c(i)},allowsImportingSourceFile:function(e,t){if(!a.length)return!0;var r=l(e.fileName,t);if(!r)return!0;return c(r)},allowsImportingSpecifier:function(t){if(!a.length||u(t))return!0;if(e.pathIsRelative(t)||e.isRootedDiskPath(t))return!0;return c(t)}};function c(t){for(var r=_(t),n=0,i=a;n<i.length;n++){var s=i[n];if(s.has(r,o)||s.has(e.getTypesPackageName(r),o))return!0}return!1}function u(r){return!!(e.isSourceFileJS(t)&&e.JsTyping.nodeCoreModules.has(r)&&(void 0===i&&(i=e.consumesNodeCoreModules(t)),i))}function l(i,a){if(e.stringContains(i,"node_modules")){var o=e.moduleSpecifiers.getNodeModulesPackageName(n.getCompilationSettings(),t.path,i,s,a,r.redirectTargetsMap);if(o)return e.pathIsRelative(o)||e.isRootedDiskPath(o)?void 0:_(o)}}function _(t){var r=e.getPathComponents(e.getPackageNameFromTypesPackageName(t)).slice(1);return e.startsWith(r[0],"@")?r[0]+"/"+r[1]:r[0]}}n.registerCodeFix({errorCodes:o,getCodeActions:function(t){var r=t.errorCode,n=t.preferences,i=t.sourceFile,a=t.span,o=d(t,r,a.start);if(o){var s=o.fixes,c=o.symbolName,u=e.getQuotePreference(i,n);return s.map((function(e){return g(t,i,c,e,u)}))}},fixIds:[n.importFixId],getAllCodeActions:function(t){var r=t.sourceFile,i=t.preferences,a=[],s=[],c=e.createMap(),u=e.createMap();return n.eachDiagnostic(t,o,(function(r){var n=d(t,r.code,r.start);if(n&&n.fixes.length){var i=n.fixes,o=n.symbolName,l=e.first(i);switch(l.kind){case 0:a.push(l);break;case 1:s.push(l);break;case 2:var _=l.importClause,p=l.importKind,f=String(e.getNodeId(_));(m=c.get(f))||c.set(f,m={importClause:_,defaultImport:void 0,namedImports:[]}),0===p?e.pushIfUnique(m.namedImports,o):(e.Debug.assert(void 0===m.defaultImport||m.defaultImport===o,"(Add to Existing) Default import should be missing or match symbolName"),m.defaultImport=o);break;case 3:var m,g=l.moduleSpecifier;p=l.importKind;switch((m=u.get(g))||u.set(g,m={defaultImport:void 0,namedImports:[],namespaceLikeImport:void 0}),p){case 1:e.Debug.assert(void 0===m.defaultImport||m.defaultImport===o,"(Add new) Default import should be missing or match symbolName"),m.defaultImport=o;break;case 0:e.pushIfUnique(m.namedImports,o);break;case 3:case 2:e.Debug.assert(void 0===m.namespaceLikeImport||m.namespaceLikeImport.name===o,"Namespacelike import shoudl be missing or match symbolName"),m.namespaceLikeImport={importKind:p,name:o}}break;default:e.Debug.assertNever(l,"fix wasn't never - got kind "+l.kind)}}})),n.createCombinedCodeActions(e.textChanges.ChangeTracker.with(t,(function(t){for(var n=e.getQuotePreference(r,i),o=0,l=a;o<l.length;o++){var _=l[o];h(t,r,_)}for(var d=0,p=s;d<p.length;d++){_=p[d];v(t,r,_,n)}c.forEach((function(e){var n=e.importClause,i=e.defaultImport,a=e.namedImports;y(t,r,n,i,a)})),u.forEach((function(e,i){x(t,r,i,n,e)}))})))}}),function(e){e[e.UseNamespace=0]="UseNamespace",e[e.ImportType=1]="ImportType",e[e.AddToExisting=2]="AddToExisting",e[e.AddNew=3]="AddNew"}(i||(i={})),function(e){e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.Equals=3]="Equals",e[e.ConstEquals=4]="ConstEquals"}(a||(a={})),n.getImportCompletionAction=function(t,r,n,i,a,o,_,d,p){var m=function(t,r,n,i,a,o,s,u){var l=[];return T(s,u,(function(u,_){if(!_||u===n||!e.startsWith(a.fileName,e.getDirectoryPath(_.fileName))){var d=f(t,u,s,o);d&&d.name===i&&e.skipAlias(d.symbol,s)===r&&l.push({moduleSymbol:u,importKind:d.kind,exportedSymbolIsTypeOnly:c(d.symbol,s)});for(var p=0,m=s.getExportsOfModule(u);p<m.length;p++){var g=m[p];g.name===i&&e.skipAlias(g,s)===r&&l.push({moduleSymbol:u,importKind:0,exportedSymbolIsTypeOnly:c(g,s)})}}})),l}(n,t,r,i,n,o.getCompilerOptions(),o.getTypeChecker(),o.getSourceFiles());return e.Debug.assert(m.some((function(e){return e.moduleSymbol===r})),"Some exportInfo should match the specified moduleSymbol"),{moduleSpecifier:e.first(l(o,n,d,m,a,p)).moduleSpecifier,codeAction:s(g({host:a,formatContext:_,preferences:p},n,i,e.first(u(m,i,d,o,n,a,p)),e.getQuotePreference(n,p)))}},n.forEachExternalModuleToImportFrom=S,n.moduleSymbolToValidIdentifier=E,n.moduleSpecifierToValidIdentifier=C}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r=[e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2.code];function n(t,r,n){var i,a=e.getTokenAtPosition(t,r),o=n.program.getTypeChecker();if(e.isPropertyAccessExpression(a.parent)&&a.parent.name===a){e.Debug.assert(75===a.kind,"Expected an identifier for spelling (property access)");var s=o.getTypeAtLocation(a.parent.expression);i=o.getSuggestionForNonexistentProperty(a,s)}else if(e.isImportSpecifier(a.parent)&&a.parent.name===a){e.Debug.assert(75===a.kind,"Expected an identifier for spelling (import)");var c=function(t,r,n){if(!n||!e.isStringLiteralLike(n.moduleSpecifier))return;var i=e.getResolvedModule(t,n.moduleSpecifier.text);return i?r.program.getSourceFile(i.resolvedFileName):void 0}(t,n,e.findAncestor(a,e.isImportDeclaration));c&&c.symbol&&(i=o.getSuggestionForNonexistentExport(a,c.symbol))}else{var u=e.getMeaningFromLocation(a),l=e.getTextOfNode(a);e.Debug.assert(void 0!==l,"name should be defined"),i=o.getSuggestionForNonexistentSymbol(a,l,function(e){var t=0;4&e&&(t|=1920);2&e&&(t|=788968);1&e&&(t|=111551);return t}(u))}return void 0===i?void 0:{node:a,suggestion:i}}function i(t,r,n,i,a){!e.isIdentifierText(i,a)&&e.isPropertyAccessExpression(n.parent)?t.replaceNode(r,n.parent,e.createElementAccess(n.parent.expression,e.createLiteral(i))):t.replaceNode(r,n,e.createIdentifier(i))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,o=n(a,r.span.start,r);if(o){var s=o.node,c=o.suggestion,u=r.host.getCompilationSettings().target,l=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,a,s,c,u)}));return[t.createCodeFixAction("spelling",l,[e.Diagnostics.Change_spelling_to_0,c],"fixSpelling",e.Diagnostics.Fix_all_detected_spelling_errors)]}},fixIds:["fixSpelling"],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,r){var a=n(r.file,r.start,e),o=e.host.getCompilationSettings().target;a&&i(t,e.sourceFile,a.node,a.suggestion,o)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r,n="addMissingMember",i=[e.Diagnostics.Property_0_does_not_exist_on_type_1.code,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code],a="addMissingMember";function o(t,r,n,i){var a=e.getTokenAtPosition(t,r);if(e.isIdentifier(a)){var o=a.parent;if(e.isPropertyAccessExpression(o)){var s=e.skipConstraint(n.getTypeAtLocation(o.expression)),c=s.symbol;if(c&&c.declarations){var u=e.find(c.declarations,e.isClassLike)||e.find(c.declarations,e.isInterfaceDeclaration);if(u&&!i.isSourceFileFromExternalLibrary(u.getSourceFile())){var l=(s.target||s)!==n.getDeclaredTypeOfSymbol(c),_=u.getSourceFile();return{kind:1,token:a,parentDeclaration:u,makeStatic:l,declSourceFile:_,inJs:e.isSourceFileJS(_),call:e.tryCast(o.parent,e.isCallExpression)}}var d=e.find(c.declarations,e.isEnumDeclaration);return d&&!i.isSourceFileFromExternalLibrary(d.getSourceFile())?{kind:0,token:a,parentDeclaration:d}:void 0}}}}function s(t,r,n,i,a){if(a){if(213===n.kind)return;var o=n.name.getText(),s=c(e.createIdentifier(o),i);t.insertNodeAfter(r,n,s)}else{var u=e.getFirstConstructorWithBody(n);if(!u)return;var l=c(e.createThis(),i);t.insertNodeAtConstructorEnd(r,u,l)}}function c(t,r){return e.createStatement(e.createAssignment(e.createPropertyAccess(t,r),e.createIdentifier("undefined")))}function u(t,r,n){var i;if(208===n.parent.parent.kind){var a=n.parent.parent,o=n.parent===a.left?a.right:a.left,s=t.getWidenedType(t.getBaseTypeOfLiteralType(t.getTypeAtLocation(o)));i=t.typeToTypeNode(s,r)}else{var c=t.getContextualType(n.parent);i=c?t.typeToTypeNode(c):void 0}return i||e.createKeywordTypeNode(124)}function l(t,r,n,i,a,o){var s=e.createProperty(void 0,o?[e.createToken(119)]:void 0,i,void 0,a,void 0),c=function(t){for(var r,n=0,i=t.members;n<i.length;n++){var a=i[n];if(!e.isPropertyDeclaration(a))break;r=a}return r}(n);c?t.insertNodeAfter(r,c,s):t.insertNodeAtClassStart(r,n,s)}function _(r,i,a,o,s){var c=e.createKeywordTypeNode(142),u=e.createParameter(void 0,void 0,void 0,"x",void 0,c,void 0),l=e.createIndexSignature(void 0,void 0,[u],s),_=e.textChanges.ChangeTracker.with(r,(function(e){return e.insertNodeAtClassStart(i,a,l)}));return t.createCodeFixActionNoFixId(n,_,[e.Diagnostics.Add_index_signature_for_property_0,o])}function d(r,n,i,a,o,s,c,u,l){var _=t.createMethodFromCallExpression(r,s,o.text,u,c,l,a),d=e.getAncestor(s,160);d&&d.parent===a?n.insertNodeAfter(i,d,_):n.insertNodeAtClassStart(i,a,_)}function p(t,r,n,i){var a=e.some(i.members,(function(e){var t=r.getTypeAtLocation(e);return!!(t&&132&t.flags)})),o=e.createEnumMember(n,a?e.createStringLiteral(n.text):void 0);t.replaceNode(i.getSourceFile(),i,e.updateEnumDeclaration(i,i.decorators,i.modifiers,i.name,e.concatenate(i.members,e.singleElementArray(o))))}t.registerCodeFix({errorCodes:i,getCodeActions:function(r){var i=o(r.sourceFile,r.span.start,r.program.getTypeChecker(),r.program);if(i){if(0===i.kind){var c=i.token,f=i.parentDeclaration,m=e.textChanges.ChangeTracker.with(r,(function(e){return p(e,r.program.getTypeChecker(),c,f)}));return[t.createCodeFixAction(n,m,[e.Diagnostics.Add_missing_enum_member_0,c.text],a,e.Diagnostics.Add_all_missing_members)]}var g=i.parentDeclaration,y=i.declSourceFile,h=i.inJs,v=i.makeStatic,b=i.token,x=i.call,D=x&&function(r,i,o,s,c,u,l,_){var p=e.textChanges.ChangeTracker.with(r,(function(e){return d(r,e,i,o,s,c,u,l,_)}));return t.createCodeFixAction(n,p,[u?e.Diagnostics.Declare_static_method_0:e.Diagnostics.Declare_method_0,s.text],a,e.Diagnostics.Add_all_missing_members)}(r,y,g,b,x,v,h,r.preferences),S=h&&!e.isInterfaceDeclaration(g)?e.singleElementArray(function(r,i,o,c,u){var l=e.textChanges.ChangeTracker.with(r,(function(e){return s(e,i,o,c,u)}));return 0===l.length?void 0:t.createCodeFixAction(n,l,[u?e.Diagnostics.Initialize_static_property_0:e.Diagnostics.Initialize_property_0_in_the_constructor,c],a,e.Diagnostics.Add_all_missing_members)}(r,y,g,b.text,v)):function(r,i,o,s,c){var d=u(r.program.getTypeChecker(),o,s),p=function(r,i,o,s,c,u){var _=e.textChanges.ChangeTracker.with(r,(function(e){return l(e,i,o,c,u,s)}));return t.createCodeFixAction(n,_,[s?e.Diagnostics.Declare_static_property_0:e.Diagnostics.Declare_property_0,c],a,e.Diagnostics.Add_all_missing_members)}(r,i,o,c,s.text,d);return c?[p]:[p,_(r,i,o,s.text,d)]}(r,y,g,b,v);return e.concatenate(e.singleElementArray(D),S)}},fixIds:[a],getAllCodeActions:function(r){var n=r.program,a=r.preferences,c=n.getTypeChecker(),_=e.createMap(),f=new e.NodeMap;return t.createCombinedCodeActions(e.textChanges.ChangeTracker.with(r,(function(m){t.eachDiagnostic(r,i,(function(t){var n=o(t.file,t.start,c,r.program);if(n&&e.addToSeen(_,e.getNodeId(n.parentDeclaration)+"#"+n.token.text))if(0===n.kind){var i=n.token,a=n.parentDeclaration;p(m,c,i,a)}else{a=n.parentDeclaration;var s=n.token,u=f.getOrUpdate(a,(function(){return[]}));u.some((function(e){return e.token.text===s.text}))||u.push(n)}})),f.forEach((function(t,i){for(var o=function(t,r){var n=[];for(;t;){var i=e.getClassExtendsHeritageElement(t),a=i&&r.getSymbolAtLocation(i.expression),o=a&&e.find(a.declarations,e.isClassLike);o&&n.push(o),t=o}return n}(i,c),_=function(t){if(o.some((function(e){var r=f.get(e);return!!r&&r.some((function(e){return e.token.text===t.token.text}))})))return"continue";var i=t.parentDeclaration,c=t.declSourceFile,_=t.inJs,p=t.makeStatic,g=t.token,y=t.call;if(y)d(r,m,c,i,g,y,p,_,a);else if(_&&!e.isInterfaceDeclaration(i))s(m,c,i,g.text,p);else{var h=u(n.getTypeChecker(),i,g);l(m,c,i,g.text,h,p)}},p=0,g=t;p<g.length;p++){_(g[p])}}))})))}}),function(e){e[e.Enum=0]="Enum",e[e.ClassOrInterface=1]="ClassOrInterface"}(r||(r={}))}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingNewOperator",n=[e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function i(t,r,n){var i=e.cast(function(t,r){var n=e.getTokenAtPosition(t,r.start),i=e.textSpanEnd(r);for(;n.end<i;)n=n.parent;return n}(r,n),e.isCallExpression),a=e.createNew(i.expression,i.typeArguments,i.arguments);t.replaceNode(r,i,a)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.sourceFile,o=n.span,s=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,a,o)}));return[t.createCodeFixAction(r,s,e.Diagnostics.Add_missing_new_operator_to_call,r,e.Diagnostics.Add_missing_new_operator_to_all_calls)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return i(t,e.sourceFile,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r=e.Diagnostics.Cannot_find_module_0.code,n=[r,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];function i(e,t){return{type:"install package",file:e,packageName:t}}function a(t,r){var n=e.cast(e.getTokenAtPosition(t,r),e.isStringLiteral).text,i=e.parsePackageName(n).packageName;return e.isExternalModuleNameRelative(i)?void 0:i}function o(t,n,i){return i===r?e.JsTyping.nodeCoreModules.has(t)?"@types/node":void 0:n.isKnownTypesPackageName(t)?e.getTypesPackageName(t):void 0}t.registerCodeFix({errorCodes:n,getCodeActions:function(r){var n=r.host,s=r.sourceFile,c=a(s,r.span.start);if(void 0!==c){var u=o(c,n,r.errorCode);return void 0===u?[]:[t.createCodeFixAction("fixCannotFindModule",[],[e.Diagnostics.Install_0,u],"installTypesPackage",e.Diagnostics.Install_all_missing_types_packages,i(s.fileName,u))]}},fixIds:["installTypesPackage"],getAllCodeActions:function(r){return t.codeFixAll(r,n,(function(t,n,s){var c=a(n.file,n.start);if(void 0!==c)switch(r.fixId){case"installTypesPackage":var u=o(c,r.host,n.code);u&&s.push(i(n.file.fileName,u));break;default:e.Debug.fail("Bad fixId: "+r.fixId)}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r=[e.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,e.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code],n="fixClassDoesntImplementInheritedAbstractMember";function i(t,r){var n=e.getTokenAtPosition(t,r);return e.cast(n.parent,e.isClassLike)}function a(r,n,i,a,s){var c=e.getEffectiveBaseTypeNode(r),u=i.program.getTypeChecker(),l=u.getTypeAtLocation(c),_=u.getPropertiesOfType(l).filter(o);t.createMissingMemberNodes(r,_,i,s,(function(e){return a.insertNodeAtClassStart(n,r,e)}))}function o(t){var r=e.getModifierFlags(e.first(t.getDeclarations()));return!(8&r||!(128&r))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.sourceFile,s=r.span,c=e.textChanges.ChangeTracker.with(r,(function(e){return a(i(o,s.start),o,r,e,r.preferences)}));return 0===c.length?void 0:[t.createCodeFixAction(n,c,e.Diagnostics.Implement_inherited_abstract_class,n,e.Diagnostics.Implement_all_inherited_abstract_classes)]},fixIds:[n],getAllCodeActions:function(n){var o=e.createMap();return t.codeFixAll(n,r,(function(t,r){var s=i(r.file,r.start);e.addToSeen(o,e.getNodeId(s))&&a(s,n.sourceFile,n,t,n.preferences)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="classSuperMustPrecedeThisAccess",n=[e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function i(e,t,r,n){e.insertNodeAtConstructorStart(t,r,n),e.delete(t,n)}function a(t,r){var n=e.getTokenAtPosition(t,r);if(103===n.kind){var i=e.getContainingFunction(n),a=o(i.body);return a&&!a.expression.arguments.some((function(t){return e.isPropertyAccessExpression(t)&&t.expression===n}))?{constructor:i,superCall:a}:void 0}}function o(t){return e.isExpressionStatement(t)&&e.isSuperCall(t.expression)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=a(o,s.start);if(c){var u=c.constructor,l=c.superCall,_=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,o,u,l)}));return[t.createCodeFixAction(r,_,e.Diagnostics.Make_super_call_the_first_statement_in_the_constructor,r,e.Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]}},fixIds:[r],getAllCodeActions:function(r){var o=r.sourceFile,s=e.createMap();return t.codeFixAll(r,n,(function(t,r){var n=a(r.file,r.start);if(n){var c=n.constructor,u=n.superCall;e.addToSeen(s,e.getNodeId(c.parent))&&i(t,o,c,u)}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="constructorForDerivedNeedSuperCall",n=[e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.Debug.assert(128===n.kind,"token should be at the constructor keyword"),n.parent}function a(t,r,n){var i=e.createStatement(e.createCall(e.createSuper(),void 0,e.emptyArray));t.insertNodeAtConstructorStart(r,n,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start),u=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c)}));return[t.createCodeFixAction(r,u,e.Diagnostics.Add_missing_super_call,r,e.Diagnostics.Add_all_missing_super_calls)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return a(t,e.sourceFile,i(r.file,r.start))}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="enableExperimentalDecorators",n=[e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning.code];function i(r,n){t.setJsonCompilerOptionValue(r,n,"experimentalDecorators",e.createTrue())}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.program.getCompilerOptions().configFile;if(void 0!==a){var o=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,a)}));return[t.createCodeFixActionNoFixId(r,o,e.Diagnostics.Enable_the_experimentalDecorators_option_in_your_configuration_file)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t){var r=e.program.getCompilerOptions().configFile;void 0!==r&&i(t,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixEnableJsxFlag",n=[e.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];function i(r,n){t.setJsonCompilerOptionValue(r,n,"jsx",e.createStringLiteral("react"))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.program.getCompilerOptions().configFile;if(void 0!==a){var o=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,a)}));return[t.createCodeFixActionNoFixId(r,o,e.Diagnostics.Enable_the_jsx_flag_in_your_configuration_file)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t){var r=e.program.getCompilerOptions().configFile;void 0!==r&&i(t,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="extendsInterfaceBecomesImplements",n=[e.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function i(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingClass(n).heritageClauses,a=i[0].getFirstToken();return 89===a.kind?{extendsToken:a,heritageClauses:i}:void 0}function a(t,r,n,i){if(t.replaceNode(r,n,e.createToken(112)),2===i.length&&89===i[0].token&&112===i[1].token){var a=i[1].getFirstToken(),o=a.getFullStart();t.replaceRange(r,{pos:o,end:o},e.createToken(27));for(var s=r.text,c=a.end;c<s.length&&e.isWhiteSpaceSingleLine(s.charCodeAt(c));)c++;t.deleteRange(r,{pos:a.getStart(),end:c})}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=i(o,n.span.start);if(s){var c=s.extendsToken,u=s.heritageClauses,l=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c,u)}));return[t.createCodeFixAction(r,l,e.Diagnostics.Change_extends_to_implements,r,e.Diagnostics.Change_all_extended_interfaces_to_implements)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){var r=i(t.file,t.start);r&&a(e,t.file,r.extendsToken,r.heritageClauses)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="forgottenThisPropertyAccess",n=e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,i=[e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,n];function a(t,r,i){var a=e.getTokenAtPosition(t,r);if(e.isIdentifier(a))return{node:a,className:i===n?e.getContainingClass(a).name.text:void 0}}function o(t,r,n){var i=n.node,a=n.className;e.suppressLeadingAndTrailingTrivia(i),t.replaceNode(r,i,e.createPropertyAccess(a?e.createIdentifier(a):e.createThis(),i))}t.registerCodeFix({errorCodes:i,getCodeActions:function(n){var i=n.sourceFile,s=a(i,n.span.start,n.errorCode);if(s){var c=e.textChanges.ChangeTracker.with(n,(function(e){return o(e,i,s)}));return[t.createCodeFixAction(r,c,[e.Diagnostics.Add_0_to_unresolved_variable,s.className||"this"],r,e.Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,i,(function(t,r){var n=a(r.file,r.start,r.code);n&&o(t,e.sourceFile,n)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="unusedIdentifier",n="unusedIdentifier_prefix",i="unusedIdentifier_delete",a="unusedIdentifier_infer",o=[e.Diagnostics._0_is_declared_but_its_value_is_never_read.code,e.Diagnostics._0_is_declared_but_never_used.code,e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code,e.Diagnostics.All_imports_in_import_declaration_are_unused.code,e.Diagnostics.All_destructured_elements_are_unused.code,e.Diagnostics.All_variables_are_unused.code,e.Diagnostics.All_type_parameters_are_unused.code];function s(t,r,n){t.replaceNode(r,n.parent,e.createKeywordTypeNode(147))}function c(n,a){return t.createCodeFixAction(r,n,a,i,e.Diagnostics.Delete_all_unused_declarations)}function u(t,r,n){t.delete(r,e.Debug.assertDefined(e.cast(n.parent,e.isDeclarationWithTypeParameterChildren).typeParameters,"The type parameter to delete should exist"))}function l(t){return 95===t.kind?e.tryCast(t.parent,e.isImportDeclaration):void 0}function _(t,r,n,i,a,o){if(18!==t.kind||!e.isObjectBindingPattern(t.parent))return!1;var s=t.parent.parent;return 155===s.kind?m(r,n,s,i,a,o):r.delete(n,s),!0}function d(t,r,n){var i=e.tryCast(r.parent,e.isVariableDeclarationList);return!(!i||i.getChildren(t)[0]!==r)&&(n.delete(t,224===i.parent.kind?i.parent:i),!0)}function p(t,r,n,i){r!==e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code&&(131===i.kind&&(i=e.cast(i.parent,e.isInferTypeNode).typeParameter.name),e.isIdentifier(i)&&function(e){switch(e.parent.kind){case 155:case 154:return!0;case 241:switch(e.parent.parent.parent.kind){case 231:case 230:return!0}}return!1}(i)&&t.replaceNode(n,i,e.createIdentifier("_"+i.text)))}function f(t,r,n,i,a,o){!function(t,r,n,i,a,o){var s=t.parent;e.isParameter(s)?m(r,n,s,i,a,o):r.delete(n,e.isImportClause(s)?t:e.isComputedPropertyName(s)?s.parent:s)}(r,n,t,i,a,o),e.isIdentifier(r)&&function(t,r,n,i){e.FindAllReferences.Core.eachSymbolReferenceInFile(n,i,r,(function(n){e.isPropertyAccessExpression(n.parent)&&n.parent.name===n&&(n=n.parent),e.isBinaryExpression(n.parent)&&e.isExpressionStatement(n.parent.parent)&&n.parent.left===n&&t.delete(r,n.parent.parent)}))}(n,t,r,i)}function m(t,r,n,i,a,o){(function(t,r,n){var i=t.parent;switch(i.kind){case 160:var a=r.getSymbolAtLocation(i.name);if(e.isMemberSymbolInBaseType(a,r))return!1;case 161:case 243:return!0;case 200:case 201:var o=i.parameters,s=o.indexOf(t);return e.Debug.assert(-1!==s,"The parameter should already be in the list"),n?o.slice(s+1).every((function(e){return 75===e.name.kind&&!e.symbol.isReferenced})):s===o.length-1;case 163:return!1;default:return e.Debug.failBadSyntaxKind(i)}})(n,i,o)&&(n.modifiers&&n.modifiers.length>0&&(!e.isIdentifier(n.name)||e.FindAllReferences.Core.isSymbolReferencedInFile(n.name,i,r))?n.modifiers.forEach((function(e){t.deleteModifier(r,e)})):(t.delete(r,n),function(t,r,n,i,a){e.FindAllReferences.Core.eachSignatureCall(n.parent,i,a,(function(e){var i=n.parent.parameters.indexOf(n);e.arguments.length>i&&t.delete(r,e.arguments[i])}))}(t,r,n,a,i)))}t.registerCodeFix({errorCodes:o,getCodeActions:function(i){var o=i.errorCode,m=i.sourceFile,g=i.program,y=g.getTypeChecker(),h=g.getSourceFiles(),v=e.getTokenAtPosition(m,i.span.start);if(e.isJSDocTemplateTag(v))return[c(e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,v)})),e.Diagnostics.Remove_template_tag)];if(29===v.kind)return[c(T=e.textChanges.ChangeTracker.with(i,(function(e){return u(e,m,v)})),e.Diagnostics.Remove_type_parameters)];var b=l(v);if(b)return[c(T=e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,b)})),[e.Diagnostics.Remove_import_from_0,e.showModuleSpecifier(b)])];var x=e.textChanges.ChangeTracker.with(i,(function(e){return _(v,e,m,y,h,!1)}));if(x.length)return[c(x,e.Diagnostics.Remove_destructuring)];var D=e.textChanges.ChangeTracker.with(i,(function(e){return d(m,v,e)}));if(D.length)return[c(D,e.Diagnostics.Remove_variable_statement)];var S=[];if(131===v.kind){var T=e.textChanges.ChangeTracker.with(i,(function(e){return s(e,m,v)})),E=e.cast(v.parent,e.isInferTypeNode).typeParameter.name.text;S.push(t.createCodeFixAction(r,T,[e.Diagnostics.Replace_infer_0_with_unknown,E],a,e.Diagnostics.Replace_all_unused_infer_with_unknown))}else{var C=e.textChanges.ChangeTracker.with(i,(function(e){return f(m,v,e,y,h,!1)}));if(C.length){E=e.isComputedPropertyName(v.parent)?v.parent:v;S.push(c(C,[e.Diagnostics.Remove_declaration_for_Colon_0,E.getText(m)]))}}var k=e.textChanges.ChangeTracker.with(i,(function(e){return p(e,o,m,v)}));return k.length&&S.push(t.createCodeFixAction(r,k,[e.Diagnostics.Prefix_0_with_an_underscore,v.getText(m)],n,e.Diagnostics.Prefix_all_unused_declarations_with_where_possible)),S},fixIds:[n,i,a],getAllCodeActions:function(r){var c=r.sourceFile,m=r.program,g=m.getTypeChecker(),y=m.getSourceFiles();return t.codeFixAll(r,o,(function(t,o){var m=e.getTokenAtPosition(c,o.start);switch(r.fixId){case n:p(t,o.code,c,m);break;case i:if(131===m.kind)break;var h=l(m);h?t.delete(c,h):e.isJSDocTemplateTag(m)?t.delete(c,m):29===m.kind?u(t,c,m):_(m,t,c,g,y,!0)||d(c,m,t)||f(c,m,t,g,y,!0);break;case a:131===m.kind&&s(t,c,m);break;default:e.Debug.fail(JSON.stringify(r.fixId))}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixUnreachableCode",n=[e.Diagnostics.Unreachable_code_detected.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n),o=e.findAncestor(a,e.isStatement);e.Debug.assert(o.getStart(r)===a.getStart(r),"token and statement should start at the same point");var s=(e.isBlock(o.parent)?o.parent:o).parent;if(!e.isBlock(o.parent)||o===e.first(o.parent.statements))switch(s.kind){case 226:if(s.elseStatement){if(e.isBlock(o.parent))break;return void t.replaceNode(r,o,e.createBlock(e.emptyArray))}case 228:case 229:return void t.delete(r,s)}if(e.isBlock(o.parent)){var c=n+i,u=e.Debug.assertDefined(function(e,t){for(var r,n=0,i=e;n<i.length;n++){var a=i[n];if(!t(a))break;r=a}return r}(e.sliceAfter(o.parent.statements,o),(function(e){return e.pos<c})),"Some statement should be last");t.deleteNodeRange(r,o,u)}else t.delete(r,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start,n.span.length)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unreachable_code,r,e.Diagnostics.Remove_all_unreachable_code)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start,t.length)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixUnusedLabel",n=[e.Diagnostics.Unused_label.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.cast(i.parent,e.isLabeledStatement),o=i.getStart(r),s=a.statement.getStart(r),c=e.positionsAreOnSameLine(o,s,r)?s:e.skipTrivia(r.text,e.findChildOfKind(a,58,r).end,!0);t.deleteRange(r,{pos:o,end:c})}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unused_label,r,e.Diagnostics.Remove_all_unused_labels)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r=[e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code];function n(e,t,r,n,i){e.replaceNode(t,r,i.typeToTypeNode(n,r))}function i(t,r,n){var i=e.findAncestor(e.getTokenAtPosition(t,r),a),o=i&&i.type;return o&&{typeNode:o,type:n.getTypeFromTypeNode(o)}}function a(e){switch(e.kind){case 216:case 164:case 165:case 243:case 162:case 166:case 185:case 160:case 159:case 155:case 158:case 157:case 163:case 246:case 198:case 241:return!0;default:return!1}}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=r.sourceFile,o=r.program.getTypeChecker(),s=i(a,r.span.start,o);if(s){var c=s.typeNode,u=s.type,l=c.getText(a),_=[d(u,"fixJSDocTypes_plain",e.Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)];return 295===c.kind&&_.push(d(o.getNullableType(u,32768),"fixJSDocTypes_nullable",e.Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),_}function d(i,s,u){var _=e.textChanges.ChangeTracker.with(r,(function(e){return n(e,a,c,i,o)}));return t.createCodeFixAction("jdocTypes",_,[e.Diagnostics.Change_0_to_1,l,o.typeToString(i)],s,u)}},fixIds:["fixJSDocTypes_plain","fixJSDocTypes_nullable"],getAllCodeActions:function(e){var a=e.fixId,o=e.program,s=e.sourceFile,c=o.getTypeChecker();return t.codeFixAll(e,r,(function(e,t){var r=i(t.file,t.start,c);if(r){var o=r.typeNode,u=r.type,l=295===o.kind&&"fixJSDocTypes_nullable"===a?c.getNullableType(u,32768):u;n(e,s,o,l,c)}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixAwaitInSyncFunction",n=[e.Diagnostics.await_expression_is_only_allowed_within_an_async_function.code,e.Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator.code];function i(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingFunction(n);if(i){var a,o;switch(i.kind){case 160:a=i.name;break;case 243:case 200:a=e.findChildOfKind(i,93,t);break;case 201:a=e.findChildOfKind(i,20,t)||e.first(i.parameters);break;default:return}return a&&{insertBefore:a,returnType:(o=i,o.type?o.type:e.isVariableDeclaration(o.parent)&&o.parent.type&&e.isFunctionTypeNode(o.parent.type)?o.parent.type.type:void 0)}}}function a(t,r,n){var i=n.insertBefore,a=n.returnType;if(a){var o=e.getEntityNameFromTypeNode(a);o&&75===o.kind&&"Promise"===o.text||t.replaceNode(r,a,e.createTypeReferenceNode("Promise",e.createNodeArray([a])))}t.insertModifierBefore(r,125,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start);if(c){var u=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c)}));return[t.createCodeFixAction(r,u,e.Diagnostics.Add_async_modifier_to_containing_function,r,e.Diagnostics.Add_all_missing_async_modifiers)]}},fixIds:[r],getAllCodeActions:function(r){var o=e.createMap();return t.codeFixAll(r,n,(function(t,n){var s=i(n.file,n.start);s&&e.addToSeen(o,e.getNodeId(s.insertBefore))&&a(t,r.sourceFile,s)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="disableJsDiagnostics",n=e.mapDefined(Object.keys(e.Diagnostics),(function(t){var r=e.Diagnostics[t];return r.category===e.DiagnosticCategory.Error?r.code:void 0}));function i(t,r,n,i){var a=e.getLineAndCharacterOfPosition(r,n).line;i&&!e.addToSeen(i,a)||t.insertCommentBeforeLine(r,a,n," @ts-ignore")}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=n.sourceFile,o=n.program,s=n.span,c=n.host,u=n.formatContext;if(e.isInJSFile(a)&&e.isCheckJsEnabledForFile(a,o.getCompilerOptions())){var l=[t.createCodeFixActionNoFixId("disableJsDiagnostics",[t.createFileTextChanges(a.fileName,[e.createTextChange(a.checkJsDirective?e.createTextSpanFromBounds(a.checkJsDirective.pos,a.checkJsDirective.end):e.createTextSpan(0,0),"// @ts-nocheck"+e.getNewLineOrDefaultFromHost(c,u.options))])],e.Diagnostics.Disable_checking_for_this_file)];return e.textChanges.isValidLocationToAddComment(a,s.start)&&l.unshift(t.createCodeFixAction("disableJsDiagnostics",e.textChanges.ChangeTracker.with(n,(function(e){return i(e,a,s.start)})),e.Diagnostics.Ignore_this_error_message,r,e.Diagnostics.Add_ts_ignore_to_all_error_messages)),l}},fixIds:[r],getAllCodeActions:function(r){var a=e.createMap();return t.codeFixAll(r,n,(function(t,r){e.textChanges.isValidLocationToAddComment(r.file,r.start)&&i(t,r.file,r.start,a)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){function r(e){return{directoryExists:e.host.directoryExists?function(t){return e.host.directoryExists(t)}:void 0,fileExists:e.host.fileExists?function(t){return e.host.fileExists(t)}:void 0,getCurrentDirectory:e.host.getCurrentDirectory?function(){return e.host.getCurrentDirectory()}:void 0,readFile:e.host.readFile?function(t){return e.host.readFile(t)}:void 0,useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames?function(){return e.host.useCaseSensitiveFileNames()}:void 0,getSourceFiles:function(){return e.program.getSourceFiles()},getCommonSourceDirectory:function(){return e.program.getCommonSourceDirectory()}}}function n(t){return{trackSymbol:e.noop,moduleResolverHost:r(t)}}function i(t,r,i,s,c){var u=t.getDeclarations();if(u&&u.length){var l=i.program.getTypeChecker(),_=u[0],d=e.getSynthesizedDeepClone(e.getNameOfDeclaration(_),!1),p=function(t){if(4&t)return e.createToken(118);if(16&t)return e.createToken(117);return}(e.getModifierFlags(_)),f=p?e.createNodeArray([p]):void 0,m=l.getWidenedType(l.getTypeOfSymbolAtLocation(t,r)),g=!!(16777216&t.flags),y=!!(8388608&r.flags);switch(_.kind){case 157:case 158:var h=l.typeToTypeNode(m,r,void 0,n(i));c(e.createProperty(void 0,f,d,g?e.createToken(57):void 0,h,void 0));break;case 162:case 163:for(var v=e.getAllAccessorDeclarations(u,_),b=l.typeToTypeNode(m,r,void 0,n(i)),x=0,D=v.secondAccessor?[v.firstAccessor,v.secondAccessor]:[v.firstAccessor];x<D.length;x++){var S=D[x];if(e.isGetAccessorDeclaration(S))c(e.createGetAccessor(void 0,f,d,e.emptyArray,b,y?void 0:o(s)));else{e.Debug.assertNode(S,e.isSetAccessorDeclaration,"The counterpart to a getter should be a setter");var T=e.getSetAccessorValueParameter(S),E=T&&e.isIdentifier(T.name)?e.idText(T.name):void 0;c(e.createSetAccessor(void 0,f,d,a(1,[E],[b],1,!1),y?void 0:o(s)))}}break;case 159:case 160:var C=l.getSignaturesOfType(m,0);if(!e.some(C))break;if(1===u.length){e.Debug.assert(1===C.length,"One declaration implies one signature"),A(C[0],f,d,y?void 0:o(s));break}for(var k=0,N=C;k<N.length;k++){A(N[k],e.getSynthesizedDeepClones(f,!1),e.getSynthesizedDeepClone(d,!1))}if(!y)if(u.length>C.length)A(l.getSignatureFromDeclaration(u[u.length-1]),f,d,o(s));else e.Debug.assert(u.length===C.length,"Declarations and signatures should match count"),c(function(t,r,n,i,s){for(var c=t[0],u=t[0].minArgumentCount,l=!1,_=0,d=t;_<d.length;_++){var p=d[_];u=Math.min(p.minArgumentCount,u),e.signatureHasRestParameter(p)&&(l=!0),p.parameters.length>=c.parameters.length&&(!e.signatureHasRestParameter(p)||e.signatureHasRestParameter(c))&&(c=p)}var f=c.parameters.length-(e.signatureHasRestParameter(c)?1:0),m=c.parameters.map((function(e){return e.name})),g=a(f,m,void 0,u,!1);if(l){var y=e.createArrayTypeNode(e.createKeywordTypeNode(124)),h=e.createParameter(void 0,void 0,e.createToken(25),m[f]||"rest",f>=u?e.createToken(57):void 0,y,void 0);g.push(h)}return function(t,r,n,i,a,s,c){return e.createMethod(void 0,t,void 0,r,n?e.createToken(57):void 0,i,a,s,o(c))}(i,r,n,void 0,g,void 0,s)}(C,d,g,f,s))}}function A(t,a,o,s){var u=function(t,r,i,a,o,s,c){var u=t.program.getTypeChecker().signatureToSignatureDeclaration(r,160,i,257,n(t));if(!u)return;return u.decorators=void 0,u.modifiers=a,u.name=o,u.questionToken=s?e.createToken(57):void 0,u.body=c,u}(i,t,r,a,o,g,s);u&&c(u)}}function a(t,r,n,i,a){for(var o=[],s=0;s<t;s++){var c=e.createParameter(void 0,void 0,void 0,r&&r[s]||"arg"+s,void 0!==i&&s>=i?e.createToken(57):void 0,a?void 0:n&&n[s]||e.createKeywordTypeNode(124),void 0);o.push(c)}return o}function o(t){return e.createBlock([e.createThrow(e.createNew(e.createIdentifier("Error"),void 0,[e.createLiteral("Method not implemented.","single"===t.quotePreference)]))],!0)}function s(t,r){return e.createPropertyAssignment(e.createStringLiteral(t),r)}function c(t,r){return e.find(t.properties,(function(t){return e.isPropertyAssignment(t)&&!!t.name&&e.isStringLiteral(t.name)&&t.name.text===r}))}t.createMissingMemberNodes=function(e,t,r,n,a){for(var o=e.symbol.members,s=0,c=t;s<c.length;s++){var u=c[s];o.has(u.escapedName)||i(u,e,r,n,a)}},t.getNoopSymbolTrackerWithResolver=n,t.createMethodFromCallExpression=function(t,r,i,s,c,u,l){var _=!e.isInterfaceDeclaration(l),d=r.typeArguments,p=r.arguments,f=r.parent,m=t.program.getTypeChecker(),g=n(t),y=e.map(p,(function(e){return m.typeToTypeNode(m.getBaseTypeOfLiteralType(m.getTypeAtLocation(e)),l,void 0,g)})),h=e.map(p,(function(t){return e.isIdentifier(t)?t.text:e.isPropertyAccessExpression(t)?t.name.text:void 0})),v=m.getContextualType(r),b=s||!v?void 0:m.typeToTypeNode(v,l,void 0,g);return e.createMethod(void 0,c?[e.createToken(119)]:void 0,e.isYieldExpression(f)?e.createToken(41):void 0,i,void 0,s?void 0:e.map(d,(function(t,r){return e.createTypeParameterDeclaration(84+d.length-1<=90?String.fromCharCode(84+r):"T"+r)})),a(p.length,h,y,void 0,s),b,_?o(u):void 0)},t.setJsonCompilerOptionValue=function(t,r,n,i){var a=e.getTsConfigObjectLiteralExpression(r);if(a){var o=c(a,"compilerOptions");if(void 0!==o){var u=o.initializer;if(e.isObjectLiteralExpression(u)){var l=c(u,n);void 0===l?t.insertNodeAtObjectStart(r,u,s(n,i)):t.replaceNode(r,l.initializer,i)}}else t.insertNodeAtObjectStart(r,a,s("compilerOptions",e.createObjectLiteral([s(n,i)])))}},t.createJsonPropertyAssignment=s,t.findJsonProperty=c}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="invalidImportSyntax";function n(n,i,a,o){var s=e.textChanges.ChangeTracker.with(n,(function(e){return e.replaceNode(i,a,o)}));return t.createCodeFixActionNoFixId(r,s,[e.Diagnostics.Replace_import_with_0,s[0].textChanges[0].newText])}function i(i,a){var o=i.program.getTypeChecker().getTypeAtLocation(a);if(!o.symbol||!o.symbol.originatingImport)return[];var s=[],c=o.symbol.originatingImport;if(e.isImportCall(c)||e.addRange(s,function(t,r){var i=e.getSourceFileOfNode(r),a=e.getNamespaceDeclarationNode(r),o=t.program.getCompilerOptions(),s=[];return s.push(n(t,i,r,e.makeImport(a.name,void 0,r.moduleSpecifier,e.getQuotePreference(i,t.preferences)))),e.getEmitModuleKind(o)===e.ModuleKind.CommonJS&&s.push(n(t,i,r,e.createImportEqualsDeclaration(void 0,void 0,a.name,e.createExternalModuleReference(r.moduleSpecifier)))),s}(i,c)),e.isExpression(a)&&(!e.isNamedDeclaration(a.parent)||a.parent.name!==a)){var u=i.sourceFile,l=e.textChanges.ChangeTracker.with(i,(function(t){return t.replaceNode(u,a,e.createPropertyAccess(a,"default"),{})}));s.push(t.createCodeFixActionNoFixId(r,l,e.Diagnostics.Use_synthetic_default_member))}return s}t.registerCodeFix({errorCodes:[e.Diagnostics.This_expression_is_not_callable.code,e.Diagnostics.This_expression_is_not_constructable.code],getCodeActions:function(t){var r=t.sourceFile,n=e.Diagnostics.This_expression_is_not_callable.code===t.errorCode?195:196,a=e.findAncestor(e.getTokenAtPosition(r,t.span.start),(function(e){return e.kind===n}));if(!a)return[];var o=a.expression;return i(t,o)}}),t.registerCodeFix({errorCodes:[e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,e.Diagnostics.Type_predicate_0_is_not_assignable_to_1.code,e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2.code,e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2.code,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1.code,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,e.Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code,e.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,e.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(t){var r=t.sourceFile,n=e.findAncestor(e.getTokenAtPosition(r,t.span.start),(function(e){return e.getStart()===t.span.start&&e.getEnd()===t.span.start+t.span.length}));if(!n)return[];return i(t,n)}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="strictClassInitialization",n="addMissingPropertyDefiniteAssignmentAssertions",i="addMissingPropertyUndefinedType",a="addMissingPropertyInitializer",o=[e.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function s(t,r){var n=e.getTokenAtPosition(t,r);return e.isIdentifier(n)?e.cast(n.parent,e.isPropertyDeclaration):void 0}function c(i,a){var o=e.textChanges.ChangeTracker.with(i,(function(e){return u(e,i.sourceFile,a)}));return t.createCodeFixAction(r,o,[e.Diagnostics.Add_definite_assignment_assertion_to_property_0,a.getText()],n,e.Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties)}function u(t,r,n){var i=e.updateProperty(n,n.decorators,n.modifiers,n.name,e.createToken(53),n.type,n.initializer);t.replaceNode(r,n,i)}function l(n,a){var o=e.textChanges.ChangeTracker.with(n,(function(e){return _(e,n.sourceFile,a)}));return t.createCodeFixAction(r,o,[e.Diagnostics.Add_undefined_type_to_property_0,a.name.getText()],i,e.Diagnostics.Add_undefined_type_to_all_uninitialized_properties)}function _(t,r,n){var i=e.createKeywordTypeNode(145),a=n.type,o=e.isUnionTypeNode(a)?a.types.concat(i):[a,i];t.replaceNode(r,a,e.createUnionTypeNode(o))}function d(t,r,n,i){var a=e.updateProperty(n,n.decorators,n.modifiers,n.name,n.questionToken,n.type,i);t.replaceNode(r,n,a)}function p(t,r){return function t(r,n){if(512&n.flags)return n===r.getFalseType()||n===r.getFalseType(!0)?e.createFalse():e.createTrue();if(n.isLiteral())return e.createLiteral(n.value);if(n.isUnion())return e.firstDefined(n.types,(function(e){return t(r,e)}));if(n.isClass()){var i=e.getClassLikeDeclarationOfSymbol(n.symbol);if(!i||e.hasModifier(i,128))return;var a=e.getFirstConstructorWithBody(i);if(a&&a.parameters.length)return;return e.createNew(e.createIdentifier(n.symbol.name),void 0,void 0)}if(r.isArrayLikeType(n))return e.createArrayLiteral();return}(t,t.getTypeFromTypeNode(r.type))}t.registerCodeFix({errorCodes:o,getCodeActions:function(n){var i=s(n.sourceFile,n.span.start);if(i){var o=[l(n,i),c(n,i)];return e.append(o,function(n,i){var o=p(n.program.getTypeChecker(),i);if(!o)return;var s=e.textChanges.ChangeTracker.with(n,(function(e){return d(e,n.sourceFile,i,o)}));return t.createCodeFixAction(r,s,[e.Diagnostics.Add_initializer_to_property_0,i.name.getText()],a,e.Diagnostics.Add_initializers_to_all_uninitialized_properties)}(n,i)),o}},fixIds:[n,i,a],getAllCodeActions:function(r){return t.codeFixAll(r,o,(function(t,o){var c=s(o.file,o.start);if(c)switch(r.fixId){case n:u(t,o.file,c);break;case i:_(t,o.file,c);break;case a:var l=p(r.program.getTypeChecker(),c);if(!l)return;d(t,o.file,c,l);break;default:e.Debug.fail(JSON.stringify(r.fixId))}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="requireInTs",n=[e.Diagnostics.require_call_may_be_converted_to_an_import.code];function i(t,r,n,i){var a=function(t,r){var n=e.getTokenAtPosition(t,r).parent;if(!e.isRequireCall(n,!0))throw e.Debug.failBadSyntaxKind(n);var i=e.cast(n.parent,e.isVariableDeclaration);return{statement:e.cast(i.parent.parent,e.isVariableStatement),name:e.cast(i.name,e.isIdentifier),required:n.arguments[0]}}(r,n),o=a.statement,s=a.name,c=a.required;t.replaceNode(r,o,e.getAllowSyntheticDefaultImports(i.getCompilerOptions())?e.createImportDeclaration(void 0,void 0,e.createImportClause(s,void 0),c):e.createImportEqualsDeclaration(void 0,void 0,s,e.createExternalModuleReference(c)))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start,n.program)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_require_to_import,r,e.Diagnostics.Convert_all_require_to_import)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return i(t,r.file,r.start,e.program)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="useDefaultImport",n=[e.Diagnostics.Import_may_be_converted_to_a_default_import.code];function i(t,r){var n=e.getTokenAtPosition(t,r);if(e.isIdentifier(n)){var i=n.parent;if(e.isImportEqualsDeclaration(i)&&e.isExternalModuleReference(i.moduleReference))return{importNode:i,name:n,moduleSpecifier:i.moduleReference.expression};if(e.isNamespaceImport(i)){var a=i.parent.parent;return{importNode:a,name:n,moduleSpecifier:a.moduleSpecifier}}}}function a(t,r,n,i){t.replaceNode(r,n.importNode,e.makeImport(n.name,void 0,n.moduleSpecifier,e.getQuotePreference(r,i)))}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span.start,c=i(o,s);if(c){var u=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c,n.preferences)}));return[t.createCodeFixAction(r,u,e.Diagnostics.Convert_to_default_import,r,e.Diagnostics.Convert_all_to_default_imports)]}},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){var n=i(r.file,r.start);n&&a(t,r.file,n,e.preferences)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="useBigintLiteral",n=[e.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];function i(t,r,n){var i=e.tryCast(e.getTokenAtPosition(r,n.start),e.isNumericLiteral);if(i){var a=i.getText(r)+"n";t.replaceNode(r,i,e.createBigIntLiteral(a))}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_to_a_bigint_numeric_literal,r,e.Diagnostics.Convert_all_to_bigint_numeric_literals)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixAddModuleReferTypeMissingTypeof",n=[e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.Debug.assert(95===n.kind,"This token should be an ImportKeyword"),e.Debug.assert(187===n.parent.kind,"Token parent should be an ImportType"),n.parent}function a(t,r,n){var i=e.updateImportTypeNode(n,n.argument,n.qualifier,n.typeArguments,!0);t.replaceNode(r,n,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start),u=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c)}));return[t.createCodeFixAction(r,u,e.Diagnostics.Add_missing_typeof,r,e.Diagnostics.Add_missing_typeof)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return a(t,e.sourceFile,i(r.file,r.start))}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(r){var n="fixConvertToMappedObjectType",i=[e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead.code];function a(t,r){var n=e.getTokenAtPosition(t,r),i=e.cast(n.parent.parent,e.isIndexSignatureDeclaration);if(!e.isClassDeclaration(i.parent))return{indexSignature:i,container:e.isInterfaceDeclaration(i.parent)?i.parent:e.cast(i.parent.parent,e.isTypeAliasDeclaration)}}function o(r,n,i){var a=i.indexSignature,o=i.container,s=(e.isInterfaceDeclaration(o)?o.members:o.type.members).filter((function(t){return!e.isIndexSignatureDeclaration(t)})),c=e.first(a.parameters),u=e.createTypeParameterDeclaration(e.cast(c.name,e.isIdentifier),c.type),l=e.createMappedTypeNode(e.hasReadonlyModifier(a)?e.createModifier(137):void 0,u,a.questionToken,a.type),_=e.createIntersectionTypeNode(t(e.getAllSuperTypeNodes(o),[l],s.length?[e.createTypeLiteralNode(s)]:e.emptyArray));r.replaceNode(n,o,function(t,r){return e.createTypeAliasDeclaration(t.decorators,t.modifiers,t.name,t.typeParameters,r)}(o,_))}r.registerCodeFix({errorCodes:i,getCodeActions:function(t){var i=t.sourceFile,s=t.span,c=a(i,s.start);if(c){var u=e.textChanges.ChangeTracker.with(t,(function(e){return o(e,i,c)})),l=e.idText(c.container.name);return[r.createCodeFixAction(n,u,[e.Diagnostics.Convert_0_to_mapped_object_type,l],n,[e.Diagnostics.Convert_0_to_mapped_object_type,l])]}},fixIds:[n],getAllCodeActions:function(e){return r.codeFixAll(e,i,(function(e,t){var r=a(t.file,t.start);r&&o(e,t.file,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="removeUnnecessaryAwait",n=[e.Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code];function i(t,r,n){var i=e.tryCast(e.getTokenAtPosition(r,n.start),(function(e){return 126===e.kind})),a=i&&e.tryCast(i.parent,e.isAwaitExpression);if(a){var o=a;if(e.isParenthesizedExpression(a.parent)){var s=e.getLeftmostExpression(a.expression,!1);if(e.isIdentifier(s)){var c=e.findPrecedingToken(a.parent.pos,r);c&&98!==c.kind&&(o=a.parent)}}t.replaceNode(r,o,a.expression)}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unnecessary_await,r,e.Diagnostics.Remove_all_unnecessary_uses_of_await)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixConvertConstToLet",n=[e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var i=n.sourceFile,a=n.span,o=n.program,s=function(t,r,n){var i=e.getTokenAtPosition(t,r),a=n.getTypeChecker().getSymbolAtLocation(i);if(a)return a.valueDeclaration.parent.parent}(i,a.start,o),c=e.textChanges.ChangeTracker.with(n,(function(e){return function(e,t,r){if(!r)return;var n=r.getStart();e.replaceRangeWithText(t,{pos:n,end:n+5},"let")}(e,i,s)}));return[t.createCodeFixAction(r,c,e.Diagnostics.Convert_const_to_let,r,e.Diagnostics.Convert_const_to_let)]},fixIds:[r]})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&(e.isSourceFile(a.parent)||e.isModuleBlock(a.parent)&&e.isAmbientModule(a.parent.parent))){var o=e.isSourceFile(a.parent)?a.parent.symbol:a.parent.parent.symbol,s=e.getModifierFlags(a),c=!!(512&s);if(1&s&&(c||!o.exports.has("default")))switch(a.kind){case 243:case 244:case 245:case 247:case 246:case 248:var u=a;return u.name&&e.isIdentifier(u.name)?{exportNode:u,exportName:u.name,wasDefault:c,exportingModuleSymbol:o}:void 0;case 224:var l=a;if(!(2&l.declarationList.flags)||1!==l.declarationList.declarations.length)return;var _=e.first(l.declarationList.declarations);if(!_.initializer)return;return e.Debug.assert(!c,"Can't have a default flag here"),e.isIdentifier(_.name)?{exportNode:l,exportName:_.name,wasDefault:c,exportingModuleSymbol:o}:void 0;default:return}}}function n(t,r){return e.createImportSpecifier(t===r?void 0:e.createIdentifier(t),e.createIdentifier(r))}t.registerRefactor("Convert export",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=n.wasDefault?e.Diagnostics.Convert_default_export_to_named_export.message:e.Diagnostics.Convert_named_export_to_default_export.message;return[{name:"Convert export",description:i,actions:[{name:n.wasDefault?"Convert default export to named export":"Convert named export to default export",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert default export to named export"===i||"Convert named export to default export"===i,"Unexpected action name"),{edits:e.textChanges.ChangeTracker.with(t,(function(i){return a=t.file,o=t.program,s=e.Debug.assertDefined(r(t),"context must have info"),c=i,u=t.cancellationToken,function(t,r,n,i){var a=r.wasDefault,o=r.exportNode,s=r.exportName;if(a)n.delete(t,e.Debug.assertDefined(e.findModifier(o,83),"Should find a default keyword in modifier list"));else{var c=e.Debug.assertDefined(e.findModifier(o,88),"Should find an export keyword in modifier list");switch(o.kind){case 243:case 244:case 245:n.insertNodeAfter(t,c,e.createToken(83));break;case 224:if(!e.FindAllReferences.Core.isSymbolReferencedInFile(s,i,t)){n.replaceNode(t,o,e.createExportDefault(e.Debug.assertDefined(e.first(o.declarationList.declarations).initializer,"Initializer was previously known to be present")));break}case 247:case 246:case 248:n.deleteModifier(t,c),n.insertNodeAfter(t,o,e.createExportDefault(e.createIdentifier(s.text)));break;default:e.Debug.assertNever(o,"Unexpected exportNode kind "+o.kind)}}}(a,s,c,o.getTypeChecker()),void function(t,r,i,a){var o=r.wasDefault,s=r.exportName,c=r.exportingModuleSymbol,u=t.getTypeChecker(),l=e.Debug.assertDefined(u.getSymbolAtLocation(s),"Export name should resolve to a symbol");e.FindAllReferences.Core.eachExportReference(t.getSourceFiles(),u,a,l,c,s.text,o,(function(t){var r=t.getSourceFile();o?function(t,r,i,a){var o=r.parent;switch(o.kind){case 193:i.replaceNode(t,r,e.createIdentifier(a));break;case 257:case 261:var s=o;i.replaceNode(t,s,n(a,s.name.text));break;case 254:var c=o;e.Debug.assert(c.name===r,"Import clause name should match provided ref"),s=n(a,r.text);var u=c.namedBindings;if(u)if(255===u.kind){i.deleteRange(t,{pos:r.getStart(t),end:u.getStart(t)});var l=e.isStringLiteral(c.parent.moduleSpecifier)?e.quotePreferenceFromString(c.parent.moduleSpecifier,t):1,_=e.makeImport(void 0,[n(a,r.text)],c.parent.moduleSpecifier,l);i.insertNodeAfter(t,c.parent,_)}else i.delete(t,r),i.insertNodeAtEndOfList(t,u.elements,s);else i.replaceNode(t,r,e.createNamedImports([s]));break;default:e.Debug.failBadSyntaxKind(o)}}(r,t,i,s.text):function(t,r,n){var i=r.parent;switch(i.kind){case 193:n.replaceNode(t,r,e.createIdentifier("default"));break;case 257:var a=e.createIdentifier(i.name.text);1===i.parent.elements.length?n.replaceNode(t,i.parent,a):(n.delete(t,i),n.insertNodeBefore(t,i.parent,a));break;case 261:n.replaceNode(t,i,function(t,r){return e.createExportSpecifier(t===r?void 0:e.createIdentifier(t),e.createIdentifier(r))}("default",i.name.text));break;default:e.Debug.assertNever(i,"Unexpected parent kind "+i.kind)}}(r,t,i)}))}(o,s,c,u);var a,o,s,c,u})),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&e.isImportDeclaration(a)){var o=a.importClause;return o&&o.namedBindings}}function n(t,r,n){return e.createImportDeclaration(void 0,void 0,e.createImportClause(r,n&&n.length?e.createNamedImports(n):void 0),t.moduleSpecifier)}t.registerRefactor("Convert import",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=255===n.kind?e.Diagnostics.Convert_namespace_import_to_named_imports.message:e.Diagnostics.Convert_named_imports_to_namespace_import.message;return[{name:"Convert import",description:i,actions:[{name:255===n.kind?"Convert namespace import to named imports":"Convert named imports to namespace import",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert namespace import to named imports"===i||"Convert named imports to namespace import"===i,"Unexpected action name"),{edits:e.textChanges.ChangeTracker.with(t,(function(i){return a=t.file,o=t.program,s=i,c=e.Debug.assertDefined(r(t),"Context must provide an import to convert"),u=o.getTypeChecker(),void(255===c.kind?function(t,r,i,a,o){var s=!1,c=[],u=e.createMap();e.FindAllReferences.Core.eachSymbolReferenceInFile(a.name,r,t,(function(t){if(e.isPropertyAccessExpression(t.parent)){var n=e.cast(t.parent,e.isPropertyAccessExpression),i=n.name.text;r.resolveName(i,t,67108863,!0)&&u.set(i,!0),e.Debug.assert(n.expression===t,"Parent expression should match id"),c.push(n)}else s=!0}));for(var l=e.createMap(),_=0,d=c;_<d.length;_++){var p=d[_],f=p.name.text,m=l.get(f);void 0===m&&l.set(f,m=u.has(f)?e.getUniqueName(f,t):f),i.replaceNode(t,p,e.createIdentifier(m))}var g=[];l.forEach((function(t,r){g.push(e.createImportSpecifier(t===r?void 0:e.createIdentifier(r),e.createIdentifier(t)))}));var y=a.parent.parent;s&&!o?i.insertNodeAfter(t,y,n(y,void 0,g)):i.replaceNode(t,y,n(y,s?e.createIdentifier(a.name.text):void 0,g))}(a,u,s,c,e.getAllowSyntheticDefaultImports(o.getCompilerOptions())):function(t,r,i,a){for(var o=a.parent.parent,s=o.moduleSpecifier,c=s&&e.isStringLiteral(s)?e.codefix.moduleSpecifierToValidIdentifier(s.text,99):"module",u=a.elements.some((function(n){return e.FindAllReferences.Core.eachSymbolReferenceInFile(n.name,r,t,(function(e){return!!r.resolveName(c,e,67108863,!0)}))||!1}))?e.getUniqueName(c,t):c,l=[],_=function(n){var a=(n.propertyName||n.name).text;e.FindAllReferences.Core.eachSymbolReferenceInFile(n.name,r,t,(function(r){var o=e.createPropertyAccess(e.createIdentifier(u),a);e.isShorthandPropertyAssignment(r.parent)?i.replaceNode(t,r.parent,e.createPropertyAssignment(r.text,o)):e.isExportSpecifier(r.parent)&&!r.parent.propertyName?l.some((function(e){return e.name===n.name}))||l.push(e.createImportSpecifier(n.propertyName&&e.createIdentifier(n.propertyName.text),e.createIdentifier(n.name.text))):i.replaceNode(t,r,o)}))},d=0,p=a.elements;d<p.length;d++){var f=p[d];_(f)}i.replaceNode(t,a,e.createNamespaceImport(e.createIdentifier(u))),l.length&&i.insertNodeAfter(t,a.parent.parent,n(o,void 0,l))}(a,u,s,c));var a,o,s,c,u})),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){!function(r){var n,i,a,o,s="Extract Symbol";function c(t){var r=l(t.file,e.getRefactorContextSpan(t)).targetRange;if(void 0===r)return e.emptyArray;var n=function(t,r){var n=p(t,r),i=n.scopes,a=n.readsAndWrites,o=a.functionErrorsPerScope,s=a.constantErrorsPerScope;return i.map((function(t,r){var n,i,a=function(t){return e.isFunctionLikeDeclaration(t)?"inner function":e.isClassLike(t)?"method":"function"}(t),c=function(t){return e.isClassLike(t)?"readonly field":"constant"}(t),u=e.isFunctionLikeDeclaration(t)?function(t){switch(t.kind){case 161:return"constructor";case 200:case 243:return t.name?"function '"+t.name.text+"'":"anonymous function";case 201:return"arrow function";case 160:return"method '"+t.name.getText()+"'";case 162:return"'get "+t.name.getText()+"'";case 163:return"'set "+t.name.getText()+"'";default:throw e.Debug.assertNever(t,"Unexpected scope kind "+t.kind)}}(t):e.isClassLike(t)?function(e){return 244===e.kind?e.name?"class '"+e.name.text+"'":"anonymous class declaration":e.name?"class expression '"+e.name.text+"'":"anonymous class expression"}(t):function(e){return 249===e.kind?"namespace '"+e.parent.name.getText()+"'":e.externalModuleIndicator?0:1}(t);return 1===u?(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"global"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[c,"global"])):0===u?(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"module"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[c,"module"])):(n=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[a,u]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[c,u])),0!==r||e.isClassLike(t)||(i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_enclosing_scope),[c])),{functionExtraction:{description:n,errors:o[r]},constantExtraction:{description:i,errors:s[r]}}}))}(r,t);if(void 0===n)return e.emptyArray;for(var i=[],a=e.createMap(),o=[],c=e.createMap(),u=0,_=0,d=n;_<d.length;_++){var f=d[_],m=f.functionExtraction,g=f.constantExtraction;if(0===m.errors.length){var y=m.description;a.has(y)||(a.set(y,!0),i.push({description:y,name:"function_scope_"+u}))}if(0===g.errors.length){y=g.description;c.has(y)||(c.set(y,!0),o.push({description:y,name:"constant_scope_"+u}))}u++}var h=[];return i.length&&h.push({name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_function),actions:i}),o.length&&h.push({name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_constant),actions:o}),h.length?h:e.emptyArray}function u(t,r){var n=l(t.file,e.getRefactorContextSpan(t)).targetRange,a=/^function_scope_(\d+)$/.exec(r);if(a){var o=+a[1];return e.Debug.assert(isFinite(o),"Expected to parse a finite number from the function scope index"),function(t,r,n){var a=p(t,r),o=a.scopes,s=a.readsAndWrites,c=s.target,u=s.usagesPerScope,l=s.functionErrorsPerScope,_=s.exposedVariableDeclarations;return e.Debug.assert(!l[n].length,"The extraction went missing? How?"),r.cancellationToken.throwIfCancellationRequested(),function(t,r,n,a,o,s){var c,u,l=n.usages,_=n.typeParameterUsages,d=n.substitutions,p=s.program.getTypeChecker(),h=r.getSourceFile(),v=e.getUniqueName(e.isClassLike(r)?"newMethod":"newFunction",h),b=e.isInJSFile(r),x=e.createIdentifier(v),D=[],S=[];l.forEach((function(t,n){var i;if(!b){var a=p.getTypeOfSymbolAtLocation(t.symbol,t.node);a=p.getBaseTypeOfLiteralType(a),i=p.typeToTypeNode(a,r,1)}var o=e.createParameter(void 0,void 0,void 0,n,void 0,i);D.push(o),2===t.usage&&(u||(u=[])).push(t),S.push(e.createIdentifier(n))}));var T=e.arrayFrom(_.values()).map((function(e){return{type:e,declaration:f(e)}})).sort(m),E=0===T.length?void 0:T.map((function(e){return e.declaration})),C=void 0!==E?E.map((function(t){return e.createTypeReferenceNode(t.name,void 0)})):void 0;if(e.isExpression(t)&&!b){var k=p.getContextualType(t);c=p.typeToTypeNode(k,r,1)}var N,A=function(t,r,n,i,a){var o,s=void 0!==n||r.length>0;if(e.isBlock(t)&&!s&&0===i.size)return{body:e.createBlock(t.statements,!0),returnValueProperty:void 0};var c=!1,u=e.createNodeArray(e.isBlock(t)?t.statements.slice(0):[e.isStatement(t)?t:e.createReturn(t)]);if(s||i.size){var l=e.visitNodes(u,(function t(a){if(!c&&234===a.kind&&s){var u=g(r,n);return a.expression&&(o||(o="__return"),u.unshift(e.createPropertyAssignment(o,e.visitNode(a.expression,t)))),1===u.length?e.createReturn(u[0].name):e.createReturn(e.createObjectLiteral(u))}var l=c;c=c||e.isFunctionLikeDeclaration(a)||e.isClassLike(a);var _=i.get(e.getNodeId(a).toString()),d=_?e.getSynthesizedDeepClone(_):e.visitEachChild(a,t,e.nullTransformationContext);return c=l,d})).slice();if(s&&!a&&e.isStatement(t)){var _=g(r,n);1===_.length?l.push(e.createReturn(_[0].name)):l.push(e.createReturn(e.createObjectLiteral(_)))}return{body:e.createBlock(l,!0),returnValueProperty:o}}return{body:e.createBlock(u,!0),returnValueProperty:void 0}}(t,a,u,d,!!(o.facts&i.HasReturn)),F=A.body,P=A.returnValueProperty;if(e.suppressLeadingAndTrailingTrivia(F),e.isClassLike(r)){var w=b?[]:[e.createToken(116)];o.facts&i.InStaticRegion&&w.push(e.createToken(119)),o.facts&i.IsAsyncFunction&&w.push(e.createToken(125)),N=e.createMethod(void 0,w.length?w:void 0,o.facts&i.IsGenerator?e.createToken(41):void 0,x,void 0,E,D,c,F)}else N=e.createFunctionDeclaration(void 0,o.facts&i.IsAsyncFunction?[e.createToken(125)]:void 0,o.facts&i.IsGenerator?e.createToken(41):void 0,x,E,D,c,F);var I=e.textChanges.ChangeTracker.fromContext(s),O=function(t,r){return e.find(function(t){if(e.isFunctionLikeDeclaration(t)){var r=t.body;if(e.isBlock(r))return r.statements}else{if(e.isModuleBlock(t)||e.isSourceFile(t))return t.statements;if(e.isClassLike(t))return t.members;e.assertType(t)}return e.emptyArray}(r),(function(r){return r.pos>=t&&e.isFunctionLikeDeclaration(r)&&!e.isConstructorDeclaration(r)}))}((y(o.range)?e.last(o.range):o.range).end,r);O?I.insertNodeBefore(s.file,O,N,!0):I.insertNodeAtEndOfScope(s.file,r,N);var M=[],L=function(t,r,n){var a=e.createIdentifier(n);if(e.isClassLike(t)){var o=r.facts&i.InStaticRegion?e.createIdentifier(t.name.text):e.createThis();return e.createPropertyAccess(o,a)}return a}(r,o,v),R=e.createCall(L,C,S);o.facts&i.IsGenerator&&(R=e.createYield(e.createToken(41),R));o.facts&i.IsAsyncFunction&&(R=e.createAwait(R));if(a.length&&!u)if(e.Debug.assert(!P,"Expected no returnValueProperty"),e.Debug.assert(!(o.facts&i.HasReturn),"Expected RangeFacts.HasReturn flag to be unset"),1===a.length){var B=a[0];M.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(B.name),e.getSynthesizedDeepClone(B.type),R)],B.parent.flags)))}else{for(var j=[],K=[],J=a[0].parent.flags,z=!1,U=0,V=a;U<V.length;U++){B=V[U];j.push(e.createBindingElement(void 0,void 0,e.getSynthesizedDeepClone(B.name)));var q=p.typeToTypeNode(p.getBaseTypeOfLiteralType(p.getTypeAtLocation(B)),r,1);K.push(e.createPropertySignature(void 0,B.symbol.name,void 0,q,void 0)),z=z||void 0!==B.type,J&=B.parent.flags}var W=z?e.createTypeLiteralNode(K):void 0;W&&e.setEmitFlags(W,1),M.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createObjectBindingPattern(j),W,R)],J)))}else if(a.length||u){if(a.length)for(var G=0,H=a;G<H.length;G++){var Y=(B=H[G]).parent.flags;2&Y&&(Y=-3&Y|1),M.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(B.symbol.name,ee(B.type))],Y)))}P&&M.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(P,ee(c))],1)));var X=g(a,u);P&&X.unshift(e.createShorthandPropertyAssignment(P)),1===X.length?(e.Debug.assert(!P,"Shouldn't have returnValueProperty here"),M.push(e.createStatement(e.createAssignment(X[0].name,R))),o.facts&i.HasReturn&&M.push(e.createReturn())):(M.push(e.createStatement(e.createAssignment(e.createObjectLiteral(X),R))),P&&M.push(e.createReturn(e.createIdentifier(P))))}else o.facts&i.HasReturn?M.push(e.createReturn(R)):y(o.range)?M.push(e.createStatement(R)):M.push(R);y(o.range)?I.replaceNodeRangeWithNodes(s.file,e.first(o.range),e.last(o.range),M):I.replaceNodeWithNodes(s.file,o.range,M);var Q=I.getChanges(),$=(y(o.range)?e.first(o.range):o.range).getSourceFile().fileName,Z=e.getRenameLocation(Q,$,v,!1);return{renameFilename:$,renameLocation:Z,edits:Q};function ee(t){if(void 0!==t){for(var r=e.getSynthesizedDeepClone(t),n=r;e.isParenthesizedTypeNode(n);)n=n.type;return e.isUnionTypeNode(n)&&e.find(n.types,(function(e){return 145===e.kind}))?r:e.createUnionTypeNode([r,e.createKeywordTypeNode(145)])}}}(c,o[n],u[n],_,t,r)}(n,t,o)}var s=/^constant_scope_(\d+)$/.exec(r);if(s){o=+s[1];return e.Debug.assert(isFinite(o),"Expected to parse a finite number from the constant scope index"),function(t,r,n){var a=p(t,r),o=a.scopes,s=a.readsAndWrites,c=s.target,u=s.usagesPerScope,l=s.constantErrorsPerScope,_=s.exposedVariableDeclarations;return e.Debug.assert(!l[n].length,"The extraction went missing? How?"),e.Debug.assert(0===_.length,"Extract constant accepted a range containing a variable declaration?"),r.cancellationToken.throwIfCancellationRequested(),function(t,r,n,a,o){var s,c=n.substitutions,u=o.program.getTypeChecker(),l=r.getSourceFile(),_=e.getUniqueName(e.isClassLike(r)?"newProperty":"newLocal",l),p=e.isInJSFile(r),f=p||!u.isContextSensitive(t)?void 0:u.typeToTypeNode(u.getContextualType(t),r,1),m=function(t,r){return r.size?function t(n){var i=r.get(e.getNodeId(n).toString());return i?e.getSynthesizedDeepClone(i):e.visitEachChild(n,t,e.nullTransformationContext)}(t):t}(t,c);s=function(n,i){if(void 0===n)return{variableType:n,initializer:i};if(!e.isFunctionExpression(i)&&!e.isArrowFunction(i)||i.typeParameters)return{variableType:n,initializer:i};var a=u.getTypeAtLocation(t),o=e.singleOrUndefined(u.getSignaturesOfType(a,0));if(!o)return{variableType:n,initializer:i};if(o.getTypeParameters())return{variableType:n,initializer:i};for(var s=[],c=!1,l=0,_=i.parameters;l<_.length;l++){var d=_[l];if(d.type)s.push(d);else{var p=u.getTypeAtLocation(d);p===u.getAnyType()&&(c=!0),s.push(e.updateParameter(d,d.decorators,d.modifiers,d.dotDotDotToken,d.name,d.questionToken,d.type||u.typeToTypeNode(p,r,1),d.initializer))}}if(c)return{variableType:n,initializer:i};if(n=void 0,e.isArrowFunction(i))i=e.updateArrowFunction(i,t.modifiers,i.typeParameters,s,i.type||u.typeToTypeNode(o.getReturnType(),r,1),i.equalsGreaterThanToken,i.body);else{if(o&&o.thisParameter){var f=e.firstOrUndefined(s);if(!f||e.isIdentifier(f.name)&&"this"!==f.name.escapedText){var m=u.getTypeOfSymbolAtLocation(o.thisParameter,t);s.splice(0,0,e.createParameter(void 0,void 0,void 0,"this",void 0,u.typeToTypeNode(m,r,1)))}}i=e.updateFunctionExpression(i,t.modifiers,i.asteriskToken,i.name,i.typeParameters,s,i.type||u.typeToTypeNode(o.getReturnType(),r,1),i.body)}return{variableType:n,initializer:i}}(f,m),f=s.variableType,m=s.initializer,e.suppressLeadingAndTrailingTrivia(m);var g=e.textChanges.ChangeTracker.fromContext(o);if(e.isClassLike(r)){e.Debug.assert(!p,"Cannot extract to a JS class");var y=[];y.push(e.createToken(116)),a&i.InStaticRegion&&y.push(e.createToken(119)),y.push(e.createToken(137));var v=e.createProperty(void 0,y,_,void 0,f,m),b=e.createPropertyAccess(a&i.InStaticRegion?e.createIdentifier(r.name.getText()):e.createThis(),e.createIdentifier(_)),x=function(t,r){var n,i=r.members;e.Debug.assert(i.length>0,"Found no members");for(var a=!0,o=0,s=i;o<s.length;o++){var c=s[o];if(c.pos>t)return n||i[0];if(a&&!e.isPropertyDeclaration(c)){if(void 0!==n)return c;a=!1}n=c}return void 0===n?e.Debug.fail():n}(t.pos,r);g.insertNodeBefore(o.file,x,v,!0),g.replaceNode(o.file,t,b)}else{var D=e.createVariableDeclaration(_,f,m),S=function(t,r){var n;for(;void 0!==t&&t!==r;){if(e.isVariableDeclaration(t)&&t.initializer===n&&e.isVariableDeclarationList(t.parent)&&t.parent.declarations.length>1)return t;n=t,t=t.parent}}(t,r);if(S){g.insertNodeBefore(o.file,S,D);b=e.createIdentifier(_);g.replaceNode(o.file,t,b)}else if(225===t.parent.kind&&r===e.findAncestor(t,d)){var T=e.createVariableStatement(void 0,e.createVariableDeclarationList([D],2));g.replaceNode(o.file,t.parent,T)}else{T=e.createVariableStatement(void 0,e.createVariableDeclarationList([D],2));if(0===(x=function(t,r){var n;e.Debug.assert(!e.isClassLike(r));for(var i=t;i!==r;i=i.parent)d(i)&&(n=i);for(i=(n||t).parent;;i=i.parent){if(h(i)){for(var a=void 0,o=0,s=i.statements;o<s.length;o++){var c=s[o];if(c.pos>t.pos)break;a=c}return!a&&e.isCaseClause(i)?(e.Debug.assert(e.isSwitchStatement(i.parent.parent),"Grandparent isn't a switch statement"),i.parent.parent):e.Debug.assertDefined(a,"prevStatement failed to get set")}e.Debug.assert(i!==r,"Didn't encounter a block-like before encountering scope")}}(t,r)).pos?g.insertNodeAtTopOfFile(o.file,T,!1):g.insertNodeBefore(o.file,x,T,!1),225===t.parent.kind)g.delete(o.file,t.parent);else{b=e.createIdentifier(_);g.replaceNode(o.file,t,b)}}}var E=g.getChanges(),C=t.getSourceFile().fileName,k=e.getRenameLocation(E,C,_,!0);return{renameFilename:C,renameLocation:k,edits:E}}(e.isExpression(c)?c:c.statements[0].expression,o[n],u[n],t.facts,r)}(n,t,o)}e.Debug.fail("Unrecognized action name")}function l(t,r){var a=r.length;if(0===a)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractEmpty)]};var o=e.getParentNodeInSpan(e.getTokenAtPosition(t,r.start),t,r),s=e.getParentNodeInSpan(e.findTokenOnLeftOfPosition(t,e.textSpanEnd(r)),t,r),c=[],u=i.None;if(!o||!s)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o.parent!==s.parent)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o!==s){if(!h(o.parent))return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};for(var l=[],d=0,p=o.parent.statements;d<p.length;d++){var f=p[d];if(f===o||l.length){var m=v(f);if(m)return{errors:m};l.push(f)}if(f===s)break}return l.length?{targetRange:{range:l,facts:u,declarations:c}}:{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]}}if(e.isJSDoc(o))return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractJSDoc)]};if(e.isReturnStatement(o)&&!o.expression)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};var g=function(t){if(e.isReturnStatement(t)){if(t.expression)return t.expression}else if(e.isVariableStatement(t)){for(var r=0,n=void 0,i=0,a=t.declarationList.declarations;i<a.length;i++){var o=a[i];o.initializer&&(r++,n=o.initializer)}if(1===r)return n}else if(e.isVariableDeclaration(t)&&t.initializer)return t.initializer;return t}(o),y=function(t){if(e.isIdentifier(e.isExpressionStatement(t)?t.expression:t))return[e.createDiagnosticForNode(t,n.cannotExtractIdentifier)];return}(g)||v(g);return y?{errors:y}:{targetRange:{range:_(g),facts:u,declarations:c}};function v(t){var a;if(function(e){e[e.None=0]="None",e[e.Break=1]="Break",e[e.Continue=2]="Continue",e[e.Return=4]="Return"}(a||(a={})),e.Debug.assert(t.pos<=t.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),e.Debug.assert(!e.positionIsSynthesized(t.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!(e.isStatement(t)||e.isExpressionNode(t)&&function(e){var t=e.parent;switch(t.kind){case 282:return!1}switch(e.kind){case 10:return 253!==t.kind&&257!==t.kind;case 212:case 188:case 190:return!1;case 75:return 190!==t.kind&&257!==t.kind&&261!==t.kind}return!0}(t)))return[e.createDiagnosticForNode(t,n.statementOrExpressionExpected)];if(8388608&t.flags)return[e.createDiagnosticForNode(t,n.cannotExtractAmbientBlock)];var o,s=e.getContainingClass(t);s&&function(t,r){for(var n=t;n!==r;){if(158===n.kind){e.hasModifier(n,32)&&(u|=i.InStaticRegion);break}if(155===n.kind){161===e.getContainingFunction(n).kind&&(u|=i.InStaticRegion);break}160===n.kind&&e.hasModifier(n,32)&&(u|=i.InStaticRegion),n=n.parent}}(t,s);var l,_=4;return function t(a){if(o)return!0;if(e.isDeclaration(a)){var s=241===a.kind?a.parent.parent:a;if(e.hasModifier(s,1))return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractExportedEntity)),!0;c.push(a.symbol)}switch(a.kind){case 253:return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractImport)),!0;case 101:if(195===a.parent.kind){var d=e.getContainingClass(a);if(d.pos<r.start||d.end>=r.start+r.length)return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractSuper)),!0}else u|=i.UsesThis}if(e.isFunctionLikeDeclaration(a)||e.isClassLike(a)){switch(a.kind){case 243:case 244:e.isSourceFile(a.parent)&&void 0===a.parent.externalModuleIndicator&&(o||(o=[])).push(e.createDiagnosticForNode(a,n.functionWillNotBeVisibleInTheNewScope))}return!1}var p=_;switch(a.kind){case 226:case 239:_=0;break;case 222:a.parent&&239===a.parent.kind&&a.parent.finallyBlock===a&&(_=4);break;case 275:_|=1;break;default:e.isIterationStatement(a,!1)&&(_|=3)}switch(a.kind){case 182:case 103:u|=i.UsesThis;break;case 237:var f=a.label;(l||(l=[])).push(f.escapedText),e.forEachChild(a,t),l.pop();break;case 233:case 232:(f=a.label)?e.contains(l,f.escapedText)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):_&(233===a.kind?1:2)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break;case 205:u|=i.IsAsyncFunction;break;case 211:u|=i.IsGenerator;break;case 234:4&_?u|=i.HasReturn:(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalReturnStatement));break;default:e.forEachChild(a,t)}_=p}(t),o}}function _(t){return e.isStatement(t)?[t]:e.isExpressionNode(t)?e.isExpressionStatement(t.parent)?[t.parent]:t:void 0}function d(t){return e.isFunctionLikeDeclaration(t)||e.isSourceFile(t)||e.isModuleBlock(t)||e.isClassLike(t)}function p(t,r){var a=r.file,o=function(t){var r=y(t.range)?e.first(t.range):t.range;if(t.facts&i.UsesThis){var n=e.getContainingClass(r);if(n){var a=e.findAncestor(r,e.isFunctionLikeDeclaration);return a?[a,n]:[n]}}for(var o=[];;)if(155===(r=r.parent).kind&&(r=e.findAncestor(r,(function(t){return e.isFunctionLikeDeclaration(t)})).parent),d(r)&&(o.push(r),288===r.kind))return o}(t);return{scopes:o,readsAndWrites:function(t,r,a,o,s,c){var u,l,_=e.createMap(),d=[],p=[],f=[],m=[],g=[],h=e.createMap(),v=[],b=y(t.range)?1===t.range.length&&e.isExpressionStatement(t.range[0])?t.range[0].expression:void 0:t.range;if(void 0===b){var x=t.range,D=e.first(x).getStart(),S=e.last(x).end;l=e.createFileDiagnostic(o,D,S-D,n.expressionExpected)}else 147456&s.getTypeAtLocation(b).flags&&(l=e.createDiagnosticForNode(b,n.uselessConstantType));for(var T=0,E=r;T<E.length;T++){var C=E[T];d.push({usages:e.createMap(),typeParameterUsages:e.createMap(),substitutions:e.createMap()}),p.push(e.createMap()),f.push(e.isFunctionLikeDeclaration(C)&&243!==C.kind?[e.createDiagnosticForNode(C,n.cannotExtractToOtherFunctionLike)]:[]);var k=[];l&&k.push(l),e.isClassLike(C)&&e.isInJSFile(C)&&k.push(e.createDiagnosticForNode(C,n.cannotExtractToJSClass)),e.isArrowFunction(C)&&!e.isBlock(C.body)&&k.push(e.createDiagnosticForNode(C,n.cannotExtractToExpressionArrowFunction)),m.push(k)}var N=e.createMap(),A=y(t.range)?e.createBlock(t.range):t.range,F=y(t.range)?e.first(t.range):t.range,P=function(t){return!!e.findAncestor(t,(function(t){return e.isDeclarationWithTypeParameters(t)&&0!==e.getEffectiveTypeParameterDeclarations(t).length}))}(F);if(function c(u,l){void 0===l&&(l=1);if(P){z(s.getTypeAtLocation(u))}e.isDeclaration(u)&&u.symbol&&g.push(u);if(e.isAssignmentExpression(u))c(u.left,2),c(u.right);else if(e.isUnaryExpressionWithWrite(u))c(u.operand,2);else if(e.isPropertyAccessExpression(u)||e.isElementAccessExpression(u))e.forEachChild(u,c);else if(e.isIdentifier(u)){if(!u.parent)return;if(e.isQualifiedName(u.parent)&&u!==u.parent.left)return;if(e.isPropertyAccessExpression(u.parent)&&u!==u.parent.expression)return;!function(c,u,l){var _=function(c,u,l){var _=U(c);if(!_)return;var g=e.getSymbolId(_).toString(),y=N.get(g);if(y&&y>=u)return g;if(N.set(g,u),y){for(var h=0,v=d;h<v.length;h++){var b=v[h];b.usages.get(c.text)&&b.usages.set(c.text,{usage:u,symbol:_,node:c})}return g}var x=_.getDeclarations(),D=x&&e.find(x,(function(e){return e.getSourceFile()===o}));if(!D)return;if(e.rangeContainsStartEnd(a,D.getStart(),D.end))return;if(t.facts&i.IsGenerator&&2===u){for(var S=e.createDiagnosticForNode(c,n.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators),T=0,E=f;T<E.length;T++){E[T].push(S)}for(var C=0,k=m;C<k.length;C++){k[C].push(S)}}for(var A=0;A<r.length;A++){var F=r[A];if(s.resolveName(_.name,F,_.flags,!1)!==_&&!p[A].has(g)){var P=V(_.exportSymbol||_,F,l);if(P)p[A].set(g,P);else if(l){if(!(262144&_.flags)){S=e.createDiagnosticForNode(c,n.typeWillNotBeVisibleInTheNewScope);f[A].push(S),m[A].push(S)}}else d[A].usages.set(c.text,{usage:u,symbol:_,node:c})}}return g}(c,u,l);if(_)for(var g=0;g<r.length;g++){var y=p[g].get(_);y&&d[g].substitutions.set(e.getNodeId(c).toString(),y)}}(u,l,e.isPartOfTypeNode(u))}else e.forEachChild(u,c)}(A),P&&!y(t.range)){z(s.getContextualType(t.range))}if(_.size>0){for(var w=e.createMap(),I=0,O=F;void 0!==O&&I<r.length;O=O.parent)if(O===r[I]&&(w.forEach((function(e,t){d[I].typeParameterUsages.set(t,e)})),I++),e.isDeclarationWithTypeParameters(O))for(var M=0,L=e.getEffectiveTypeParameterDeclarations(O);M<L.length;M++){var R=L[M],B=s.getTypeAtLocation(R);_.has(B.id.toString())&&w.set(B.id.toString(),B)}e.Debug.assert(I===r.length,"Should have iterated all scopes")}if(g.length){var j=e.isBlockScope(r[0],r[0].parent)?r[0]:e.getEnclosingBlockScopeContainer(r[0]);e.forEachChild(j,(function r(n){if(n===t.range||y(t.range)&&t.range.indexOf(n)>=0)return;var i=e.isIdentifier(n)?U(n):s.getSymbolAtLocation(n);if(i){var a=e.find(g,(function(e){return e.symbol===i}));if(a)if(e.isVariableDeclaration(a)){var o=a.symbol.id.toString();h.has(o)||(v.push(a),h.set(o,!0))}else u=u||a}e.forEachChild(n,r)}))}for(var K=function(r){var i=d[r];if(r>0&&(i.usages.size>0||i.typeParameterUsages.size>0)){var a=y(t.range)?t.range[0]:t.range;m[r].push(e.createDiagnosticForNode(a,n.cannotAccessVariablesFromNestedScopes))}var o,s=!1;if(d[r].usages.forEach((function(t){2===t.usage&&(s=!0,106500&t.symbol.flags&&t.symbol.valueDeclaration&&e.hasModifier(t.symbol.valueDeclaration,64)&&(o=t.symbol.valueDeclaration))})),e.Debug.assert(y(t.range)||0===v.length,"No variable declarations expected if something was extracted"),s&&!y(t.range)){var c=e.createDiagnosticForNode(t.range,n.cannotWriteInExpression);f[r].push(c),m[r].push(c)}else if(o&&r>0){c=e.createDiagnosticForNode(o,n.cannotExtractReadonlyPropertyInitializerOutsideConstructor);f[r].push(c),m[r].push(c)}else if(u){c=e.createDiagnosticForNode(u,n.cannotExtractExportedEntity);f[r].push(c),m[r].push(c)}},J=0;J<r.length;J++)K(J);return{target:A,usagesPerScope:d,functionErrorsPerScope:f,constantErrorsPerScope:m,exposedVariableDeclarations:v};function z(e){for(var t=0,r=s.getSymbolWalker((function(){return c.throwIfCancellationRequested(),!0})).walkType(e).visitedTypes;t<r.length;t++){var n=r[t];n.isTypeParameter()&&_.set(n.id.toString(),n)}}function U(t){return t.parent&&e.isShorthandPropertyAssignment(t.parent)&&t.parent.name===t?s.getShorthandAssignmentValueSymbol(t.parent):s.getSymbolAtLocation(t)}function V(t,r,n){if(t){var i=t.getDeclarations();if(i&&i.some((function(e){return e.parent===r})))return e.createIdentifier(t.name);var a=V(t.parent,r,n);if(void 0!==a)return n?e.createQualifiedName(a,e.createIdentifier(t.name)):e.createPropertyAccess(a,t.name)}}}(t,o,function(t,r){return y(t.range)?{pos:e.first(t.range).getStart(r),end:e.last(t.range).getEnd()}:t.range}(t,a),a,r.program.getTypeChecker(),r.cancellationToken)}}function f(e){var t,r=e.symbol;if(r&&r.declarations)for(var n=0,i=r.declarations;n<i.length;n++){var a=i[n];(void 0===t||a.pos<t.pos)&&(t=a)}return t}function m(t,r){var n=t.type,i=t.declaration,a=r.type,o=r.declaration;return e.compareProperties(i,o,"pos",e.compareValues)||e.compareStringsCaseSensitive(n.symbol?n.symbol.getName():"",a.symbol?a.symbol.getName():"")||e.compareValues(n.id,a.id)}function g(t,r){var n=e.map(t,(function(t){return e.createShorthandPropertyAssignment(t.symbol.name)})),i=e.map(r,(function(t){return e.createShorthandPropertyAssignment(t.symbol.name)}));return void 0===n?i:void 0===i?n:n.concat(i)}function y(t){return e.isArray(t)}function h(e){switch(e.kind){case 222:case 288:case 249:case 275:return!0;default:return!1}}t.registerRefactor(s,{getAvailableActions:c,getEditsForAction:u}),r.getAvailableActions=c,r.getEditsForAction=u,function(t){function r(t){return{message:t,code:0,category:e.DiagnosticCategory.Message,key:t}}t.cannotExtractRange=r("Cannot extract range."),t.cannotExtractImport=r("Cannot extract import statement."),t.cannotExtractSuper=r("Cannot extract super call."),t.cannotExtractJSDoc=r("Cannot extract JSDoc."),t.cannotExtractEmpty=r("Cannot extract empty range."),t.expressionExpected=r("expression expected."),t.uselessConstantType=r("No reason to extract constant of type."),t.statementOrExpressionExpected=r("Statement or expression expected."),t.cannotExtractRangeContainingConditionalBreakOrContinueStatements=r("Cannot extract range containing conditional break or continue statements."),t.cannotExtractRangeContainingConditionalReturnStatement=r("Cannot extract range containing conditional return statement."),t.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=r("Cannot extract range containing labeled break or continue with target outside of the range."),t.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=r("Cannot extract range containing writes to references located outside of the target range in generators."),t.typeWillNotBeVisibleInTheNewScope=r("Type will not visible in the new scope."),t.functionWillNotBeVisibleInTheNewScope=r("Function will not visible in the new scope."),t.cannotExtractIdentifier=r("Select more than a single identifier."),t.cannotExtractExportedEntity=r("Cannot extract exported declaration"),t.cannotWriteInExpression=r("Cannot write back side-effects when extracting an expression"),t.cannotExtractReadonlyPropertyInitializerOutsideConstructor=r("Cannot move initialization of read-only class property outside of the constructor"),t.cannotExtractAmbientBlock=r("Cannot extract code from ambient contexts"),t.cannotAccessVariablesFromNestedScopes=r("Cannot access variables from nested scopes"),t.cannotExtractToOtherFunctionLike=r("Cannot extract method to a function-like scope that is not a function"),t.cannotExtractToJSClass=r("Cannot extract constant to a class scope in JS"),t.cannotExtractToExpressionArrowFunction=r("Cannot extract constant to an arrow function without a block")}(n=r.Messages||(r.Messages={})),function(e){e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.InStaticRegion=16]="InStaticRegion"}(i||(i={})),r.getRangeToExtract=l,function(e){e[e.Module=0]="Module",e[e.Global=1]="Global"}(a||(a={})),function(e){e[e.Read=1]="Read",e[e.Write=2]="Write"}(o||(o={}))}(t.extractSymbol||(t.extractSymbol={}))}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.file,i=t.startPosition,a=e.isSourceFileJS(r),o=e.getTokenAtPosition(r,i),s=e.createTextRangeFromSpan(e.getRefactorContextSpan(t)),c=e.findAncestor(o,(function(e){return e.parent&&n(s,e,r)&&!n(s,e.parent,r)}));if(c&&e.isTypeNode(c)){var u=t.program.getTypeChecker(),l=e.Debug.assertDefined(e.findAncestor(c,e.isStatement),"Should find a statement"),_=function(t,r,i,a){var o=[];return function s(c){if(e.isTypeReferenceNode(c)){if(e.isIdentifier(c.typeName))if(d=t.resolveName(c.typeName.text,c.typeName,262144,!0)){var u=e.cast(e.first(d.declarations),e.isTypeParameterDeclaration);n(i,u,a)&&!n(r,u,a)&&o.push(u)}}else if(e.isInferTypeNode(c)){var l=e.findAncestor(c,(function(t){return e.isConditionalTypeNode(t)&&n(t.extendsType,c,a)}));if(!l||!n(r,l,a))return!0}else if(e.isTypePredicateNode(c)||e.isThisTypeNode(c)){var _=e.findAncestor(c.parent,e.isFunctionLike);if(_&&_.type&&n(_.type,c,a)&&!n(r,_,a))return!0}else if(e.isTypeQueryNode(c)){var d;if(e.isIdentifier(c.exprName)){if((d=t.resolveName(c.exprName.text,c.exprName,111551,!1))&&n(i,d.valueDeclaration,a)&&!n(r,d.valueDeclaration,a))return!0}else if(e.isThisIdentifier(c.exprName.left)&&!n(r,c.parent,a))return!0}return e.forEachChild(c,s)}(r)?void 0:o}(u,c,l,r);if(_)return{isJS:a,selection:c,firstStatement:l,typeParameters:_,typeElements:function t(r,n){if(!n)return;if(e.isIntersectionTypeNode(n)){for(var i=[],a=e.createMap(),o=0,s=n.types;o<s.length;o++){var c=s[o],u=t(r,c);if(!u||!u.every((function(t){return t.name&&e.addToSeen(a,e.getNameFromPropertyName(t.name))})))return;e.addRange(i,u)}return i}if(e.isParenthesizedTypeNode(n))return t(r,n.type);if(e.isTypeLiteralNode(n))return n.members;return}(u,c)}}}function n(t,r,n){return e.rangeContainsStartEnd(t,e.skipTrivia(n.text,r.pos),r.end)}t.registerRefactor("Extract type",{getAvailableActions:function(t){var n=r(t);return n?[{name:"Extract type",description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_type),actions:n.isJS?[{name:"Extract to typedef",description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_typedef)}]:e.append([{name:"Extract to type alias",description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_type_alias)}],n.typeElements&&{name:"Extract to interface",description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_interface)})}]:e.emptyArray},getEditsForAction:function(t,n){var i=t.file,a=e.Debug.assertDefined(r(t),"Expected to find a range to extract"),o=e.getUniqueName("NewType",i),s=e.textChanges.ChangeTracker.with(t,(function(t){switch(n){case"Extract to type alias":return e.Debug.assert(!a.isJS,"Invalid actionName/JS combo"),function(t,r,n,i){var a=i.firstStatement,o=i.selection,s=i.typeParameters,c=e.createTypeAliasDeclaration(void 0,void 0,n,s.map((function(t){return e.updateTypeParameterDeclaration(t,t.name,t.constraint,void 0)})),o);t.insertNodeBefore(r,a,c,!0),t.replaceNode(r,o,e.createTypeReferenceNode(n,s.map((function(t){return e.createTypeReferenceNode(t.name,void 0)}))))}(t,i,o,a);case"Extract to typedef":return e.Debug.assert(a.isJS,"Invalid actionName/JS combo"),function(t,r,n,i){var a=i.firstStatement,o=i.selection,s=i.typeParameters,c=e.createNode(315);c.tagName=e.createIdentifier("typedef"),c.fullName=e.createIdentifier(n),c.name=c.fullName,c.typeExpression=e.createJSDocTypeExpression(o);var u=[];e.forEach(s,(function(t){var r=e.getEffectiveConstraintOfTypeParameter(t),n=e.createNode(314);n.tagName=e.createIdentifier("template"),n.constraint=r&&e.cast(r,e.isJSDocTypeExpression);var i=e.createNode(154);i.name=t.name,n.typeParameters=e.createNodeArray([i]),u.push(n)})),t.insertNodeBefore(r,a,e.createJSDocComment(void 0,e.createNodeArray(e.concatenate(u,[c]))),!0),t.replaceNode(r,o,e.createTypeReferenceNode(n,s.map((function(t){return e.createTypeReferenceNode(t.name,void 0)}))))}(t,i,o,a);case"Extract to interface":return e.Debug.assert(!a.isJS&&!!a.typeElements,"Invalid actionName/JS combo"),function(t,r,n,i){var a=i.firstStatement,o=i.selection,s=i.typeParameters,c=i.typeElements,u=e.createInterfaceDeclaration(void 0,void 0,n,s,void 0,c);t.insertNodeBefore(r,a,u,!0),t.replaceNode(r,o,e.createTypeReferenceNode(n,s.map((function(t){return e.createTypeReferenceNode(t.name,void 0)}))))}(t,i,o,a);default:e.Debug.fail("Unexpected action name")}})),c=i.fileName;return{edits:s,renameFilename:c,renameLocation:e.getRenameLocation(s,c,o,!1)}}})}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){!function(r){var n="Generate 'get' and 'set' accessors",i=e.Diagnostics.Generate_get_and_set_accessors.message;function a(t){return e.isParameterPropertyDeclaration(t,t.parent)||e.isPropertyDeclaration(t)||e.isPropertyAssignment(t)}function o(t,r){return e.isIdentifier(r)?e.createIdentifier(t):e.createLiteral(t)}function s(t,r,n){var i=r?n.name:e.createThis();return e.isIdentifier(t)?e.createPropertyAccess(i,t):e.createElementAccess(i,e.createLiteral(t))}function c(t,r,n){var i=e.append(t?void 0:[e.createToken(n)],r?e.createToken(119):void 0);return i&&e.createNodeArray(i)}function u(t){var r=t.file,n=t.startPosition,i=t.endPosition,s=e.getTokenAtPosition(r,n),c=e.findAncestor(s.parent,a);if(c&&e.nodeOverlapsWithStartEnd(c.name,r,n,i)&&function(t){return e.isIdentifier(t)||e.isStringLiteral(t)}(c.name)&&124==(124|e.getModifierFlags(c))){var u=c.name.text,l=function(e){return 95===e.charCodeAt(0)}(u),_=o(l?u:e.getUniqueName("_"+u,r),c.name),d=o(l?e.getUniqueName(u.substring(1),r):u,c.name);return{isStatic:e.hasStaticModifier(c),isReadonly:e.hasReadonlyModifier(c),type:e.getTypeAnnotationNode(c),container:155===c.kind?c.parent.parent:c.parent,originalName:c.name.text,declaration:c,fieldName:_,accessorName:d,renameAccessor:l}}}function l(t,r,n,i,a){e.isParameterPropertyDeclaration(i,i.parent)?t.insertNodeAtClassStart(r,a,n):e.isPropertyAssignment(i)?t.insertNodeAfterComma(r,i,n):t.insertNodeAfter(r,i,n)}t.registerRefactor(n,{getEditsForAction:function(t,r){var n=t.file,i=u(t);if(!i)return;var a=e.isSourceFileJS(n),o=e.textChanges.ChangeTracker.fromContext(t),_=i.isStatic,d=i.isReadonly,p=i.fieldName,f=i.accessorName,m=i.originalName,g=i.type,y=i.container,h=i.declaration,v=i.renameAccessor;e.suppressLeadingAndTrailingTrivia(p),e.suppressLeadingAndTrailingTrivia(h),e.suppressLeadingAndTrailingTrivia(y);var b=e.isClassLike(y),x=-65&e.getModifierFlags(h),D=b?!x||8&x?c(a,_,118):e.createNodeArray(e.createModifiersFromModifierFlags(x)):void 0,S=b?c(a,_,116):void 0;!function(t,r,n,i,a){e.isPropertyDeclaration(n)?function(t,r,n,i,a){var o=e.updateProperty(n,n.decorators,a,i,n.questionToken||n.exclamationToken,n.type,n.initializer);t.replaceNode(r,n,o)}(t,r,n,i,a):e.isPropertyAssignment(n)?function(t,r,n,i){var a=e.updatePropertyAssignment(n,i,n.initializer);t.replacePropertyAssignment(r,n,a)}(t,r,n,i):t.replaceNode(r,n,e.updateParameter(n,n.decorators,a,n.dotDotDotToken,e.cast(i,e.isIdentifier),n.questionToken,n.type,n.initializer))}(o,n,h,p,S);var T=function(t,r,n,i,a,o){return e.createGetAccessor(void 0,i,r,void 0,n,e.createBlock([e.createReturn(s(t,a,o))],!0))}(p,f,g,D,_,y);if(e.suppressLeadingAndTrailingTrivia(T),l(o,n,T,h,y),d){var E=e.getFirstConstructorWithBody(y);E&&function(t,r,n,i,a){if(!n.body)return;n.body.forEachChild((function n(o){e.isElementAccessExpression(o)&&103===o.expression.kind&&e.isStringLiteral(o.argumentExpression)&&o.argumentExpression.text===a&&e.isWriteAccess(o)&&t.replaceNode(r,o.argumentExpression,e.createStringLiteral(i)),e.isPropertyAccessExpression(o)&&103===o.expression.kind&&o.name.text===a&&e.isWriteAccess(o)&&t.replaceNode(r,o.name,e.createIdentifier(i)),e.isFunctionLike(o)||e.isClassLike(o)||o.forEachChild(n)}))}(o,n,E,p.text,m)}else{var C=function(t,r,n,i,a,o){return e.createSetAccessor(void 0,i,r,[e.createParameter(void 0,void 0,void 0,e.createIdentifier("value"),void 0,n)],e.createBlock([e.createStatement(e.createAssignment(s(t,a,o),e.createIdentifier("value")))],!0))}(p,f,g,D,_,y);e.suppressLeadingAndTrailingTrivia(C),l(o,n,C,h,y)}var k=o.getChanges(),N=n.fileName,A=v?f:p,F=(e.isIdentifier(A)?0:-1)+e.getRenameLocation(k,N,A.text,e.isParameter(h));return{renameFilename:N,renameLocation:F,edits:k}},getAvailableActions:function(t){return u(t)?[{name:n,description:i,actions:[{name:n,description:i}]}]:e.emptyArray}})}(t.generateGetAccessorAndSetAccessor||(t.generateGetAccessorAndSetAccessor={}))}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(r){function n(t){var r=function(t){var r=t.file,n=e.createTextRangeFromSpan(e.getRefactorContextSpan(t)),i=r.statements,a=e.findIndex(i,(function(e){return e.end>n.pos}));if(-1!==a){var o=i[a];if(e.isNamedDeclaration(o)&&o.name&&e.rangeContainsRange(o.name,n))return{toMove:[i[a]],afterLast:i[a+1]};if(!(n.pos>o.getStart(r))){var s=e.findIndex(i,(function(e){return e.end>n.end}),a);if(-1===s||!(0===s||i[s].getStart(r)<n.end))return{toMove:i.slice(a,-1===s?i.length:s),afterLast:-1===s?void 0:i[s]}}}}(t);if(void 0!==r){var n=[],i=[],a=r.toMove,o=r.afterLast;return e.getRangesWhere(a,(function(t){return!function(t){switch(t.kind){case 253:return!0;case 252:return!e.hasModifier(t,1);case 224:return t.declarationList.declarations.every((function(t){return!!t.initializer&&e.isRequireCall(t.initializer,!0)}));default:return!1}}(t)}),(function(e,t){for(var r=e;r<t;r++)n.push(a[r]);i.push({first:a[e],afterLast:o})})),0===n.length?void 0:{all:n,ranges:i}}}function i(e,t,r){for(var n=0,i=t;n<i.length;n++){var a=i[n],o=a.first,s=a.afterLast;r.deleteNodeRangeExcludingEnd(e,o,s)}}function a(e){return 253===e.kind?e.moduleSpecifier:252===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function o(t,r){if(e.isImportDeclaration(t))e.isStringLiteral(t.moduleSpecifier)&&r(t);else if(e.isImportEqualsDeclaration(t))e.isExternalModuleReference(t.moduleReference)&&e.isStringLiteralLike(t.moduleReference.expression)&&r(t);else if(e.isVariableStatement(t))for(var n=0,i=t.declarationList.declarations;n<i.length;n++){var a=i[n];a.initializer&&e.isRequireCall(a.initializer,!0)&&r(a)}}function s(t,r,n,i,a){if(n=e.ensurePathIsNonModuleName(n),i){var o=r.map((function(t){return e.createImportSpecifier(void 0,e.createIdentifier(t))}));return e.makeImportIfNecessary(t,o,n,a)}e.Debug.assert(!t,"No default import should exist");var s=r.map((function(t){return e.createBindingElement(void 0,void 0,t)}));return s.length?c(e.createObjectBindingPattern(s),void 0,u(e.createLiteral(n))):void 0}function c(t,r,n,i){return void 0===i&&(i=2),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(t,r,n)],i))}function u(t){return e.createCall(e.createIdentifier("require"),void 0,[t])}function l(t,r,n,i){switch(r.kind){case 253:!function(t,r,n,i){if(!r.importClause)return;var a=r.importClause,o=a.name,s=a.namedBindings,c=!o||i(o),u=!s||(255===s.kind?i(s.name):0!==s.elements.length&&s.elements.every((function(e){return i(e.name)})));if(c&&u)n.delete(t,r);else if(o&&c&&n.delete(t,o),s)if(u)n.replaceNode(t,r.importClause,e.updateImportClause(r.importClause,o,void 0));else if(256===s.kind)for(var l=0,_=s.elements;l<_.length;l++){var d=_[l];i(d.name)&&n.delete(t,d)}}(t,r,n,i);break;case 252:i(r.name)&&n.delete(t,r);break;case 241:!function(t,r,n,i){var a=r.name;switch(a.kind){case 75:i(a)&&n.delete(t,a);break;case 189:break;case 188:if(a.elements.every((function(t){return e.isIdentifier(t.name)&&i(t.name)})))n.delete(t,e.isVariableDeclarationList(r.parent)&&1===r.parent.declarations.length?r.parent.parent:r);else for(var o=0,s=a.elements;o<s.length;o++){var c=s[o];e.isIdentifier(c.name)&&i(c.name)&&n.delete(t,c.name)}}}(t,r,n,i);break;default:e.Debug.assertNever(r,"Unexpected import decl kind "+r.kind)}}function _(t){switch(t.kind){case 252:case 257:case 254:return!0;case 241:return d(t);case 190:return e.isVariableDeclaration(t.parent.parent)&&d(t.parent.parent);default:return!1}}function d(t){return e.isSourceFile(t.parent.parent.parent)&&!!t.initializer&&e.isRequireCall(t.initializer,!0)}function p(t,r,n){switch(t.kind){case 253:var i=t.importClause;if(!i)return;var a=i.name&&n(i.name)?i.name:void 0,o=i.namedBindings&&function(t,r){if(255===t.kind)return r(t.name)?t:void 0;var n=t.elements.filter((function(e){return r(e.name)}));return n.length?e.createNamedImports(n):void 0}(i.namedBindings,n);return a||o?e.createImportDeclaration(void 0,void 0,e.createImportClause(a,o),r):void 0;case 252:return n(t.name)?t:void 0;case 241:var s=function(t,r){switch(t.kind){case 75:return r(t)?t:void 0;case 189:return t;case 188:var n=t.elements.filter((function(t){return t.propertyName||!e.isIdentifier(t.name)||r(t.name)}));return n.length?e.createObjectBindingPattern(n):void 0}}(t.name,n);return s?c(s,t.type,u(r),t.parent.flags):void 0;default:return e.Debug.assertNever(t,"Unexpected import kind "+t.kind)}}function f(t,r,n){t.forEachChild((function t(i){if(e.isIdentifier(i)&&!e.isDeclarationName(i)){var a=r.getSymbolAtLocation(i);a&&n(a)}else i.forEachChild(t)}))}r.registerRefactor("Move to a new file",{getAvailableActions:function(t){if(!t.preferences.allowTextChangesInNewFiles||void 0===n(t))return e.emptyArray;var r=e.getLocaleSpecificMessage(e.Diagnostics.Move_to_a_new_file);return[{name:"Move to a new file",description:r,actions:[{name:"Move to a new file",description:r}]}]},getEditsForAction:function(r,c){e.Debug.assert("Move to a new file"===c,"Wrong refactor invoked");var d=e.Debug.assertDefined(n(r));return{edits:e.textChanges.ChangeTracker.with(r,(function(n){return function(r,n,c,d,k,N){var A=n.getTypeChecker(),F=function(t,r,n){var i=new m,a=new m,o=new m,s=function(t){if(void 0===t)return;var r=n.getJsxNamespace(t),i=n.resolveName(r,t,1920,!0);return i&&e.some(i.declarations,_)?i:void 0}(e.find(r,(function(e){return!!(2&e.transformFlags)})));s&&a.add(s);for(var c=0,u=r;c<u.length;c++){v(D=u[c],(function(t){i.add(e.Debug.assertDefined(e.isExpressionStatement(t)?n.getSymbolAtLocation(t.expression.left):t.symbol,"Need a symbol here"))}))}for(var l=0,d=r;l<d.length;l++){f(D=d[l],n,(function(e){if(e.declarations)for(var r=0,n=e.declarations;r<n.length;r++){var s=n[r];_(s)?a.add(e):g(s)&&y(s)===t&&!i.has(e)&&o.add(e)}}))}for(var p=a.clone(),h=new m,b=0,x=t.statements;b<x.length;b++){var D=x[b];e.contains(r,D)||(s&&2&D.transformFlags&&p.delete(s),f(D,n,(function(e){i.has(e)&&h.add(e),p.delete(e)})))}return{movedSymbols:i,newFileImportsFromOldFile:o,oldFileImportsFromNewFile:h,oldImportsNeededByNewFile:a,unusedImportsFromOldFile:p}}(r,c.all,A),P=e.getDirectoryPath(r.fileName),w=e.extensionFromPath(r.fileName),I=function(t,r,n,i){for(var a=t,o=1;;o++){var s=e.combinePaths(n,a+r);if(!i.fileExists(s))return a;a=t+"."+o}}((M=F.movedSymbols,M.forEachEntry(e.symbolNameNoDefault)||"newFile"),w,P,k),O=I+w;var M;d.createNewFile(r,e.combinePaths(P,O),function(r,n,c,_,d,f,m){var y=d.getTypeChecker();if(!r.externalModuleIndicator&&!r.commonJsModuleIndicator)return i(r,_.ranges,c),_.all;var k=!!r.externalModuleIndicator,N=e.getQuotePreference(r,m),A=function(t,r,n,i){var a,o=[];return t.forEach((function(t){"default"===t.escapedName?a=e.createIdentifier(e.symbolNameNoDefault(t)):o.push(t.name)})),s(a,o,r,n,i)}(n.oldFileImportsFromNewFile,f,k,N);A&&e.insertImport(c,r,A);return function(t,r,n,i,a){for(var s=0,c=t.statements;s<c.length;s++){var u=c[s];e.contains(r,u)||o(u,(function(e){return l(t,e,n,(function(e){return i.has(a.getSymbolAtLocation(e))}))}))}}(r,_.all,c,n.unusedImportsFromOldFile,y),i(r,_.ranges,c),function(t,r,n,i,s){for(var c=r.getTypeChecker(),_=function(r){if(r===n)return"continue";for(var _=function(_){o(_,(function(o){if(c.getSymbolAtLocation(a(o))===n.symbol){var d=function(t){var r=e.isBindingElement(t.parent)?e.getPropertySymbolFromBindingElement(c,t.parent):e.skipAlias(c.getSymbolAtLocation(t),c);return!!r&&i.has(r)};l(r,o,t,d);var f=e.combinePaths(e.getDirectoryPath(a(o).text),s),m=p(o,e.createLiteral(f),d);m&&t.insertNodeAfter(r,_,m);var g=function(t){switch(t.kind){case 253:return t.importClause&&t.importClause.namedBindings&&255===t.importClause.namedBindings.kind?t.importClause.namedBindings.name:void 0;case 252:return t.name;case 241:return e.tryCast(t.name,e.isIdentifier);default:return e.Debug.assertNever(t,"Unexpected node kind "+t.kind)}}(o);g&&function(t,r,n,i,a,o,s,c){var l=e.codefix.moduleSpecifierToValidIdentifier(a,99),_=!1,d=[];if(e.FindAllReferences.Core.eachSymbolReferenceInFile(s,n,r,(function(t){e.isPropertyAccessExpression(t.parent)&&(_=_||!!n.resolveName(l,t,67108863,!0),i.has(n.getSymbolAtLocation(t.parent.name))&&d.push(t))})),d.length){for(var p=_?e.getUniqueName(l,r):l,f=0,m=d;f<m.length;f++){var g=m[f];t.replaceNode(r,g,e.createIdentifier(p))}t.insertNodeAfter(r,c,function(t,r,n){var i=e.createIdentifier(r),a=e.createLiteral(n);switch(t.kind){case 253:return e.createImportDeclaration(void 0,void 0,e.createImportClause(void 0,e.createNamespaceImport(i)),a);case 252:return e.createImportEqualsDeclaration(void 0,void 0,i,e.createExternalModuleReference(a));case 241:return e.createVariableDeclaration(i,void 0,u(a));default:return e.Debug.assertNever(t,"Unexpected node kind "+t.kind)}}(c,a,o))}}(t,r,c,i,s,f,g,o)}}))},d=0,f=r.statements;d<f.length;d++){_(f[d])}},d=0,f=r.getSourceFiles();d<f.length;d++){var m=f[d];_(m)}}(c,d,r,n.movedSymbols,f),t(function(t,r,n,i,c,u,l){for(var _,d=[],f=0,m=t.statements;f<m.length;f++){o(m[f],(function(t){e.append(d,p(t,a(t),(function(e){return r.has(c.getSymbolAtLocation(e))})))}))}var y=[],h=e.nodeSeenTracker();return n.forEach((function(r){for(var n=0,a=r.declarations;n<a.length;n++){var o=a[n];if(g(o)){var s=b(o);if(s){var c=x(o);h(c)&&D(t,c,i,u),e.hasModifier(o,512)?_=s:y.push(s.text)}}}})),e.append(d,s(_,y,e.removeFileExtension(e.getBaseFileName(t.fileName)),u,l)),d}(r,n.oldImportsNeededByNewFile,n.newFileImportsFromOldFile,c,y,k,N),function(r,n,i,a){return e.flatMap(n,(function(n){if(function(t){return e.Debug.assert(e.isSourceFile(t.parent),"Node parent should be a SourceFile"),h(t)||e.isVariableStatement(t)}(n)&&!S(r,n,a)&&v(n,(function(t){return i.has(e.Debug.assertDefined(t.symbol))}))){var o=function(e,r){return r?[T(e)]:function(e){return t([e],E(e).map(C))}(e)}(n,a);if(o)return o}return n}))}(r,_.all,n.oldFileImportsFromNewFile,k))}(r,F,d,c,n,I,N)),function(t,r,n,i,a){var o=t.getCompilerOptions().configFile;if(!o)return;var s=e.normalizePath(e.combinePaths(n,"..",i)),c=e.getRelativePathFromFile(o.fileName,s,a),u=o.statements[0]&&e.tryCast(o.statements[0].expression,e.isObjectLiteralExpression),l=u&&e.find(u.properties,(function(t){return e.isPropertyAssignment(t)&&e.isStringLiteral(t.name)&&"files"===t.name.text}));l&&e.isArrayLiteralExpression(l.initializer)&&r.insertNodeInListAfter(o,e.last(l.initializer.elements),e.createLiteral(c),l.initializer.elements)}(n,d,r.fileName,O,e.hostGetCanonicalFileName(k))}(r.file,r.program,d,n,r.host,r.preferences)})),renameFilename:void 0,renameLocation:void 0}}});var m=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getSymbolId(t)),t)},t.prototype.has=function(t){return this.map.has(String(e.getSymbolId(t)))},t.prototype.delete=function(t){this.map.delete(String(e.getSymbolId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.forEachEntry=function(t){return e.forEachEntry(this.map,t)},t.prototype.clone=function(){var r=new t;return e.copyEntries(this.map,r.map),r},t}();function g(t){return h(t)&&e.isSourceFile(t.parent)||e.isVariableDeclaration(t)&&e.isSourceFile(t.parent.parent.parent)}function y(t){return e.isVariableDeclaration(t)?t.parent.parent.parent:t.parent}function h(e){switch(e.kind){case 243:case 244:case 248:case 247:case 246:case 245:case 252:return!0;default:return!1}}function v(t,r){switch(t.kind){case 243:case 244:case 248:case 247:case 246:case 245:case 252:return r(t);case 224:return e.firstDefined(t.declarationList.declarations,(function(t){return function t(r,n){switch(r.kind){case 75:return n(e.cast(r.parent,(function(t){return e.isVariableDeclaration(t)||e.isBindingElement(t)})));case 189:case 188:return e.firstDefined(r.elements,(function(r){return e.isOmittedExpression(r)?void 0:t(r.name,n)}));default:return e.Debug.assertNever(r,"Unexpected name kind "+r.kind)}}(t.name,r)}));case 225:var n=t.expression;return e.isBinaryExpression(n)&&1===e.getAssignmentDeclarationKind(n)?r(t):void 0}}function b(t){return e.isExpressionStatement(t)?t.expression.left.name:e.tryCast(t.name,e.isIdentifier)}function x(t){switch(t.kind){case 241:return t.parent.parent;case 190:return x(e.cast(t.parent.parent,(function(t){return e.isVariableDeclaration(t)||e.isBindingElement(t)})));default:return t}}function D(t,r,n,i){if(!S(t,r,i))if(i)e.isExpressionStatement(r)||n.insertExportModifier(t,r);else{var a=E(r);0!==a.length&&n.insertNodesAfter(t,r,a.map(C))}}function S(t,r,n){return n?!e.isExpressionStatement(r)&&e.hasModifier(r,1):E(r).some((function(r){return t.symbol.exports.has(e.escapeLeadingUnderscores(r))}))}function T(t){var r=e.concatenate([e.createModifier(88)],t.modifiers);switch(t.kind){case 243:return e.updateFunctionDeclaration(t,t.decorators,r,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);case 244:return e.updateClassDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 224:return e.updateVariableStatement(t,r,t.declarationList);case 248:return e.updateModuleDeclaration(t,t.decorators,r,t.name,t.body);case 247:return e.updateEnumDeclaration(t,t.decorators,r,t.name,t.members);case 246:return e.updateTypeAliasDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.type);case 245:return e.updateInterfaceDeclaration(t,t.decorators,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 252:return e.updateImportEqualsDeclaration(t,t.decorators,r,t.name,t.moduleReference);case 225:return e.Debug.fail();default:return e.Debug.assertNever(t,"Unexpected declaration kind "+t.kind)}}function E(t){switch(t.kind){case 243:case 244:return[t.name.text];case 224:return e.mapDefined(t.declarationList.declarations,(function(t){return e.isIdentifier(t.name)?t.name.text:void 0}));case 248:case 247:case 246:case 245:case 252:return e.emptyArray;case 225:return e.Debug.fail("Can't export an ExpressionStatement");default:return e.Debug.assertNever(t,"Unexpected decl kind "+t.kind)}}function C(t){return e.createExpressionStatement(e.createBinary(e.createPropertyAccess(e.createIdentifier("exports"),e.createIdentifier(t)),62,e.createIdentifier(t)))}}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){!function(r){var n="Add or remove braces in an arrow function",i=e.Diagnostics.Add_or_remove_braces_in_an_arrow_function.message,a="Add braces to arrow function",o="Remove braces from arrow function",s=e.Diagnostics.Add_braces_to_arrow_function.message,c=e.Diagnostics.Remove_braces_from_arrow_function.message;function u(t,r){var n=e.getTokenAtPosition(t,r),i=e.getContainingFunction(n);if(i&&e.isArrowFunction(i)&&e.rangeContainsRange(i,n)&&!e.rangeContainsRange(i.body,n)){if(e.isExpression(i.body))return{func:i,addBraces:!0,expression:i.body};if(1===i.body.statements.length){var a=e.first(i.body.statements);if(e.isReturnStatement(a))return{func:i,addBraces:!1,expression:a.expression,returnStatement:a}}}}t.registerRefactor(n,{getEditsForAction:function(t,r){var n=t.file,i=t.startPosition,s=u(n,i);if(!s)return;var c,l=s.expression,_=s.returnStatement,d=s.func;if(r===a){var p=e.createReturn(l);c=e.createBlock([p],!0),e.suppressLeadingAndTrailingTrivia(c),e.copyLeadingComments(l,p,n,3,!0)}else if(r===o&&_){var f=l||e.createVoidZero();c=function(t){return e.isBinaryExpression(t)&&27===t.operatorToken.kind||e.isObjectLiteralExpression(t)}(f)?e.createParen(f):f,e.suppressLeadingAndTrailingTrivia(c),e.copyLeadingComments(_,c,n,3,!1)}else e.Debug.fail("invalid action");var m=e.textChanges.ChangeTracker.with(t,(function(e){return e.replaceNode(n,d.body,c)}));return{renameFilename:void 0,renameLocation:void 0,edits:m}},getAvailableActions:function(t){var r=t.file,l=t.startPosition,_=u(r,l);return _?[{name:n,description:i,actions:[_.addBraces?{name:a,description:s}:{name:o,description:c}]}]:e.emptyArray}})}(t.addOrRemoveBracesToArrowFunction||(t.addOrRemoveBracesToArrowFunction={}))}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(r){!function(n){var i="Convert parameters to destructured object",a=2;function o(t){var r=t.node;return e.isImportSpecifier(r.parent)||e.isImportClause(r.parent)||e.isImportEqualsDeclaration(r.parent)||e.isNamespaceImport(r.parent)?r:e.isExportSpecifier(r.parent)||e.isExportAssignment(r.parent)?r:void 0}function s(t){if(e.isDeclaration(t.node.parent))return t.node}function c(t){if(t.node.parent){var r=t.node,n=r.parent;switch(n.kind){case 195:case 196:var i=e.tryCast(n,e.isCallOrNewExpression);if(i&&i.expression===r)return i;break;case 193:var a=e.tryCast(n,e.isPropertyAccessExpression);if(a&&a.parent&&a.name===r){var o=e.tryCast(a.parent,e.isCallOrNewExpression);if(o&&o.expression===a)return o}break;case 194:var s=e.tryCast(n,e.isElementAccessExpression);if(s&&s.parent&&s.argumentExpression===r){var c=e.tryCast(s.parent,e.isCallOrNewExpression);if(c&&c.expression===s)return c}}}}function u(t){if(t.node.parent){var r=t.node,n=r.parent;switch(n.kind){case 193:var i=e.tryCast(n,e.isPropertyAccessExpression);if(i&&i.expression===r)return i;break;case 194:var a=e.tryCast(n,e.isElementAccessExpression);if(a&&a.expression===r)return a}}}function l(t){var r=t.node;if(2===e.getMeaningFromLocation(r)||e.isExpressionWithTypeArgumentsInClassExtendsClause(r.parent))return r}function _(t,r,n){var i=e.getTouchingToken(t,r),o=e.getContainingFunctionDeclaration(i);if(!function(t){var r=e.findAncestor(t,e.isJSDocNode);if(r){var n=e.findAncestor(r,(function(t){return!e.isJSDocNode(t)}));return!!n&&e.isFunctionLikeDeclaration(n)}return!1}(i))return!(o&&function(t,r){if(!function(t,r){return function(e){if(m(e))return e.length-1;return e.length}(t)>=a&&e.every(t,(function(t){return function(t,r){if(e.isRestParameter(t)){var n=r.getTypeAtLocation(t);if(!r.isArrayType(n)&&!r.isTupleType(n))return!1}return!t.modifiers&&!t.decorators&&e.isIdentifier(t.name)}(t,r)}))}(t.parameters,r))return!1;switch(t.kind){case 243:return p(t)&&d(t,r);case 160:return d(t,r);case 161:return e.isClassDeclaration(t.parent)?p(t.parent)&&d(t,r):f(t.parent.parent)&&d(t,r);case 200:case 201:return f(t.parent)}return!1}(o,n)&&e.rangeContainsRange(o,i))||o.body&&e.rangeContainsRange(o.body,i)?void 0:o}function d(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function p(t){return!!t.name||!!e.findModifier(t,83)}function f(t){return e.isVariableDeclaration(t)&&e.isVarConst(t)&&e.isIdentifier(t.name)&&!t.type}function m(t){return t.length>0&&e.isThis(t[0].name)}function g(t){return m(t)&&(t=e.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function y(t,r){var n=g(t.parameters),i=e.isRestParameter(e.last(n)),a=i?r.slice(0,n.length-1):r,o=e.map(a,(function(t,r){var i=function(t,r){return e.isIdentifier(r)&&e.getTextOfIdentifierOrLiteral(r)===t?e.createShorthandPropertyAssignment(t):e.createPropertyAssignment(t,r)}(v(n[r]),t);return e.suppressLeadingAndTrailingTrivia(i.name),e.isPropertyAssignment(i)&&e.suppressLeadingAndTrailingTrivia(i.initializer),h(t,i),i}));if(i&&r.length>=n.length){var s=r.slice(n.length-1),c=e.createPropertyAssignment(v(e.last(n)),e.createArrayLiteral(s));o.push(c)}return e.createObjectLiteral(o,!1)}function h(t,r){var n=t.getSourceFile();!function(e,t){for(var r=e.getFullStart(),n=e.getStart(),i=r;i<n;i++)if(10===t.charCodeAt(i))return!0;return!1}(t,n.text)?e.copyTrailingAsLeadingComments(t,r,n):e.copyLeadingComments(t,r,n),e.copyTrailingComments(t,r,n)}function v(t){return e.getTextOfIdentifierOrLiteral(t.name)}r.registerRefactor(i,{getEditsForAction:function(r,n){e.Debug.assert(n===i,"Unexpected action name");var a=r.file,d=r.startPosition,p=r.program,f=r.cancellationToken,b=r.host,x=_(a,d,p.getTypeChecker());if(!x||!f)return;var D=function(r,n,i){var a=function(t){switch(t.kind){case 243:return t.name?[t.name]:[e.Debug.assertDefined(e.findModifier(t,83),"Nameless function declaration should be a default export")];case 160:return[t.name];case 161:var r=e.Debug.assertDefined(e.findChildOfKind(t,128,t.getSourceFile()),"Constructor declaration should have constructor keyword");return 213===t.parent.kind?[t.parent.parent.name,r]:[r];case 201:return[t.parent.name];case 200:return t.name?[t.name,t.parent.name]:[t.parent.name];default:return e.Debug.assertNever(t,"Unexpected function declaration kind "+t.kind)}}(r),_=e.isConstructorDeclaration(r)?function(t){switch(t.parent.kind){case 244:var r=t.parent;return r.name?[r.name]:[e.Debug.assertDefined(e.findModifier(r,83),"Nameless class declaration should be a default export")];case 213:var n=t.parent,i=t.parent.parent,a=n.name;return a?[a,i.name]:[i.name]}}(r):[],d=e.deduplicate(t(a,_),e.equateValues),p=n.getTypeChecker(),f=function(t){for(var n={accessExpressions:[],typeUsages:[]},i={functionCalls:[],declarations:[],classReferences:n,valid:!0},d=e.map(a,m),p=e.map(_,m),f=e.isConstructorDeclaration(r),g=0,y=t;g<y.length;g++){var h=y[g];if(1===h.kind){if(e.contains(d,m(h.node))||e.isNewExpressionTarget(h.node)){if(o(h))continue;if(b=s(h)){i.declarations.push(b);continue}var v=c(h);if(v){i.functionCalls.push(v);continue}}if(f&&e.contains(p,m(h.node))){var b;if(o(h))continue;if(b=s(h)){i.declarations.push(b);continue}var x=u(h);if(x){n.accessExpressions.push(x);continue}if(e.isClassDeclaration(r.parent)){var D=l(h);if(D){n.typeUsages.push(D);continue}}}i.valid=!1}else i.valid=!1}return i}(e.flatMap(d,(function(t){return e.FindAllReferences.getReferenceEntriesForNode(-1,t,n,n.getSourceFiles(),i)})));e.every(f.declarations,(function(t){return e.contains(d,t)}))||(f.valid=!1);return f;function m(t){var r=p.getSymbolAtLocation(t);return r&&e.getSymbolTarget(r,p)}}(x,p,f);if(D.valid){return{renameFilename:void 0,renameLocation:void 0,edits:e.textChanges.ChangeTracker.with(r,(function(t){return function(t,r,n,i,a,o){var s=e.map(function(t,r,n){var i,a=r.getTypeChecker(),o=g(t.parameters),s=e.map(o,(function(t){var r=e.createBindingElement(void 0,void 0,v(t),e.isRestParameter(t)&&b(t)?e.createArrayLiteral():t.initializer);e.suppressLeadingAndTrailingTrivia(r),t.initializer&&r.initializer&&h(t.initializer,r.initializer);return r})),c=e.createObjectBindingPattern(s),u=(l=o,_=e.map(l,y),e.addEmitFlags(e.createTypeLiteralNode(_),1));var l,_;e.every(o,b)&&(i=e.createObjectLiteral());var d=e.createParameter(void 0,void 0,void 0,c,void 0,u,i);if(m(t.parameters)){var p=t.parameters[0],f=e.createParameter(void 0,void 0,void 0,p.name,void 0,p.type);return e.suppressLeadingAndTrailingTrivia(f.name),h(p.name,f.name),p.type&&(e.suppressLeadingAndTrailingTrivia(f.type),h(p.type,f.type)),e.createNodeArray([f,d])}return e.createNodeArray([d]);function y(t){var i=t.type;i||!t.initializer&&!e.isRestParameter(t)||(i=function(t){var i=a.getTypeAtLocation(t);return e.getTypeNodeIfAccessible(i,t,r,n)}(t));var o=e.createPropertySignature(void 0,v(t),b(t)?e.createToken(57):t.questionToken,i,void 0);return e.suppressLeadingAndTrailingTrivia(o),h(t.name,o.name),t.type&&o.type&&h(t.type,o.type),o}function b(t){if(e.isRestParameter(t)){var r=a.getTypeAtLocation(t);return!a.isTupleType(r)}return a.isOptionalParameter(t)}}(a,r,n),(function(t){return e.getSynthesizedDeepClone(t)}));i.replaceNodeRangeWithNodes(t,e.first(a.parameters),e.last(a.parameters),s,{joiner:", ",indentation:0,leadingTriviaOption:e.textChanges.LeadingTriviaOption.IncludeAll,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include});for(var c=e.sortAndDeduplicate(o.functionCalls,(function(t,r){return e.compareValues(t.pos,r.pos)})),u=0,l=c;u<l.length;u++){var _=l[u];if(_.arguments&&_.arguments.length){var d=e.getSynthesizedDeepClone(y(a,_.arguments),!0);i.replaceNodeRange(e.getSourceFileOfNode(_),e.first(_.arguments),e.last(_.arguments),d,{leadingTriviaOption:e.textChanges.LeadingTriviaOption.IncludeAll,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include})}}}(a,p,b,t,x,D)}))}}return{edits:[]}},getAvailableActions:function(t){var r=t.file,n=t.startPosition;if(e.isSourceFileJS(r))return e.emptyArray;if(!_(r,n,t.program.getTypeChecker()))return e.emptyArray;var a=e.getLocaleSpecificMessage(e.Diagnostics.Convert_parameters_to_destructured_object);return[{name:i,description:a,actions:[{name:i,description:a}]}]}})}(r.convertParamsToDestructuredObject||(r.convertParamsToDestructuredObject={}))}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){function n(t,r,n,a){var o=e.isNodeKind(t)?new i(t,r,n):75===t?new l(75,r,n):new u(t,r,n);return o.parent=a,o.flags=25358336&a.flags,o}e.servicesVersion="0.8";var i=function(){function t(e,t,r){this.pos=t,this.end=r,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}return t.prototype.assertHasRealPosition=function(t){e.Debug.assert(!e.positionIsSynthesized(this.pos)&&!e.positionIsSynthesized(this.end),t||"Node must have a real position for this operation")},t.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},t.prototype.getStart=function(t,r){return this.assertHasRealPosition(),e.getTokenPosOfNode(this,t,r)},t.prototype.getFullStart=function(){return this.assertHasRealPosition(),this.pos},t.prototype.getEnd=function(){return this.assertHasRealPosition(),this.end},t.prototype.getWidth=function(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)},t.prototype.getFullWidth=function(){return this.assertHasRealPosition(),this.end-this.pos},t.prototype.getLeadingTriviaWidth=function(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos},t.prototype.getFullText=function(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)},t.prototype.getText=function(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())},t.prototype.getChildCount=function(e){return this.getChildren(e).length},t.prototype.getChildAt=function(e,t){return this.getChildren(t)[e]},t.prototype.getChildren=function(t){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=function(t,r){if(!e.isNodeKind(t.kind))return e.emptyArray;var i=[];if(e.isJSDocCommentContainingNode(t))return t.forEachChild((function(e){i.push(e)})),i;e.scanner.setText((r||t.getSourceFile()).text);var o=t.pos,s=function(e){a(i,o,e.pos,t),i.push(e),o=e.end};return e.forEach(t.jsDoc,s),o=t.pos,t.forEachChild(s,(function(e){a(i,o,e.pos,t),i.push(function(e,t){var r=n(317,e.pos,e.end,t);r._children=[];for(var i=e.pos,o=0,s=e;o<s.length;o++){var c=s[o];a(r._children,i,c.pos,t),r._children.push(c),i=c.end}return a(r._children,i,e.end,t),r}(e,t)),o=e.end})),a(i,o,t.end,t),e.scanner.setText(void 0),i}(this,t))},t.prototype.getFirstToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t);if(r.length){var n=e.find(r,(function(e){return e.kind<292||e.kind>316}));return n.kind<152?n:n.getFirstToken(t)}},t.prototype.getLastToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t),n=e.lastOrUndefined(r);if(n)return n.kind<152?n:n.getLastToken(t)},t.prototype.forEachChild=function(t,r){return e.forEachChild(this,t,r)},t}();function a(t,r,i,a){for(e.scanner.setTextPos(r);r<i;){var o=e.scanner.scan(),s=e.scanner.getTextPos();if(s<=i&&(75===o&&e.Debug.fail("Did not expect "+e.Debug.formatSyntaxKind(a.kind)+" to have an Identifier in its trivia"),t.push(n(o,r,s,a))),r=s,1===o)break}}var s=function(){function t(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}return t.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},t.prototype.getStart=function(t,r){return e.getTokenPosOfNode(this,t,r)},t.prototype.getFullStart=function(){return this.pos},t.prototype.getEnd=function(){return this.end},t.prototype.getWidth=function(e){return this.getEnd()-this.getStart(e)},t.prototype.getFullWidth=function(){return this.end-this.pos},t.prototype.getLeadingTriviaWidth=function(e){return this.getStart(e)-this.pos},t.prototype.getFullText=function(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)},t.prototype.getText=function(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())},t.prototype.getChildCount=function(){return 0},t.prototype.getChildAt=function(){},t.prototype.getChildren=function(){return 1===this.kind&&this.jsDoc||e.emptyArray},t.prototype.getFirstToken=function(){},t.prototype.getLastToken=function(){},t.prototype.forEachChild=function(){},t}(),c=function(){function t(e,t){this.flags=e,this.escapedName=t}return t.prototype.getFlags=function(){return this.flags},Object.defineProperty(t.prototype,"name",{get:function(){return e.symbolName(this)},enumerable:!0,configurable:!0}),t.prototype.getEscapedName=function(){return this.escapedName},t.prototype.getName=function(){return this.name},t.prototype.getDeclarations=function(){return this.declarations},t.prototype.getDocumentationComment=function(t){return this.documentationComment||(this.documentationComment=e.emptyArray,this.documentationComment=f(this.declarations,t)),this.documentationComment},t.prototype.getJsDocTags=function(){return void 0===this.tags&&(this.tags=e.JsDoc.getJsDocTagsFromDeclarations(this.declarations)),this.tags},t}(),u=function(e){function t(t,r,n){var i=e.call(this,r,n)||this;return i.kind=t,i}return o(t,e),t}(s),l=function(t){function r(e,r,n){var i=t.call(this,r,n)||this;return i.kind=75,i}return o(r,t),Object.defineProperty(r.prototype,"text",{get:function(){return e.idText(this)},enumerable:!0,configurable:!0}),r}(s);l.prototype.kind=75;var _=function(){function t(e,t){this.checker=e,this.flags=t}return t.prototype.getFlags=function(){return this.flags},t.prototype.getSymbol=function(){return this.symbol},t.prototype.getProperties=function(){return this.checker.getPropertiesOfType(this)},t.prototype.getProperty=function(e){return this.checker.getPropertyOfType(this,e)},t.prototype.getApparentProperties=function(){return this.checker.getAugmentedPropertiesOfType(this)},t.prototype.getCallSignatures=function(){return this.checker.getSignaturesOfType(this,0)},t.prototype.getConstructSignatures=function(){return this.checker.getSignaturesOfType(this,1)},t.prototype.getStringIndexType=function(){return this.checker.getIndexTypeOfType(this,0)},t.prototype.getNumberIndexType=function(){return this.checker.getIndexTypeOfType(this,1)},t.prototype.getBaseTypes=function(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0},t.prototype.isNullableType=function(){return this.checker.isNullableType(this)},t.prototype.getNonNullableType=function(){return this.checker.getNonNullableType(this)},t.prototype.getNonOptionalType=function(){return this.checker.getNonOptionalType(this)},t.prototype.getConstraint=function(){return this.checker.getBaseConstraintOfType(this)},t.prototype.getDefault=function(){return this.checker.getDefaultFromTypeParameter(this)},t.prototype.isUnion=function(){return!!(1048576&this.flags)},t.prototype.isIntersection=function(){return!!(2097152&this.flags)},t.prototype.isUnionOrIntersection=function(){return!!(3145728&this.flags)},t.prototype.isLiteral=function(){return!!(384&this.flags)},t.prototype.isStringLiteral=function(){return!!(128&this.flags)},t.prototype.isNumberLiteral=function(){return!!(256&this.flags)},t.prototype.isTypeParameter=function(){return!!(262144&this.flags)},t.prototype.isClassOrInterface=function(){return!!(3&e.getObjectFlags(this))},t.prototype.isClass=function(){return!!(1&e.getObjectFlags(this))},Object.defineProperty(t.prototype,"typeArguments",{get:function(){if(4&e.getObjectFlags(this))return this.checker.getTypeArguments(this)},enumerable:!0,configurable:!0}),t}(),d=function(){function t(e,t){this.checker=e,this.flags=t}return t.prototype.getDeclaration=function(){return this.declaration},t.prototype.getTypeParameters=function(){return this.typeParameters},t.prototype.getParameters=function(){return this.parameters},t.prototype.getReturnType=function(){return this.checker.getReturnTypeOfSignature(this)},t.prototype.getDocumentationComment=function(){return this.documentationComment||(this.documentationComment=f(e.singleElementArray(this.declaration),this.checker))},t.prototype.getJsDocTags=function(){return void 0===this.jsDocTags&&(this.jsDocTags=this.declaration?e.JsDoc.getJsDocTagsFromDeclarations([this.declaration]):[]),this.jsDocTags},t}();function p(t){return e.getJSDocTags(t).some((function(e){return"inheritDoc"===e.tagName.text}))}function f(t,r){if(!t)return e.emptyArray;var n=e.JsDoc.getJsDocCommentsFromDeclarations(t);return(0===n.length||t.some(p))&&e.forEachUnique(t,(function(t){var i=function(t,r,n){return e.firstDefined(t.parent?e.getAllSuperTypeNodes(t.parent):e.emptyArray,(function(e){var t=n.getTypeAtLocation(e),i=t&&n.getPropertyOfType(t,r),a=i&&i.getDocumentationComment(n);return a&&a.length?a:void 0}))}(t,t.symbol.name,r);i&&(n=0===n.length?i.slice():i.concat(e.lineBreakPart(),n))})),n}var m=function(t){function r(e,r,n){var i=t.call(this,e,r,n)||this;return i.kind=288,i}return o(r,t),r.prototype.update=function(t,r){return e.updateSourceFile(this,t,r)},r.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},r.prototype.getLineStarts=function(){return e.getLineStarts(this)},r.prototype.getPositionOfLineAndCharacter=function(t,r,n){return e.computePositionOfLineAndCharacter(e.getLineStarts(this),t,r,this.text,n)},r.prototype.getLineEndOfPosition=function(e){var t,r=this.getLineAndCharacterOfPosition(e).line,n=this.getLineStarts();r+1>=n.length&&(t=this.getEnd()),t||(t=n[r+1]-1);var i=this.getFullText();return"\n"===i[t]&&"\r"===i[t-1]?t-1:t},r.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},r.prototype.computeNamedDeclarations=function(){var t=e.createMultiMap();return this.forEachChild((function i(a){switch(a.kind){case 243:case 200:case 160:case 159:var o=a,s=n(o);if(s){var c=function(e){var r=t.get(e);r||t.set(e,r=[]);return r}(s),u=e.lastOrUndefined(c);u&&o.parent===u.parent&&o.symbol===u.symbol?o.body&&!u.body&&(c[c.length-1]=o):c.push(o)}e.forEachChild(a,i);break;case 244:case 213:case 245:case 246:case 247:case 248:case 252:case 261:case 257:case 254:case 255:case 162:case 163:case 172:r(a),e.forEachChild(a,i);break;case 155:if(!e.hasModifier(a,92))break;case 241:case 190:var l=a;if(e.isBindingPattern(l.name)){e.forEachChild(l.name,i);break}l.initializer&&i(l.initializer);case 282:case 158:case 157:r(a);break;case 259:a.exportClause&&e.forEach(a.exportClause.elements,i);break;case 253:var _=a.importClause;_&&(_.name&&r(_.name),_.namedBindings&&(255===_.namedBindings.kind?r(_.namedBindings):e.forEach(_.namedBindings.elements,i)));break;case 208:0!==e.getAssignmentDeclarationKind(a)&&r(a);default:e.forEachChild(a,i)}})),t;function r(e){var r=n(e);r&&t.add(r,e)}function n(t){var r=e.getNonAssignedNameOfDeclaration(t);return r&&(e.isComputedPropertyName(r)&&e.isPropertyAccessExpression(r.expression)?r.expression.name.text:e.isPropertyName(r)?e.getNameFromPropertyName(r):void 0)}},r}(i),g=function(){function t(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}return t.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},t}();function y(t){var r=!0;for(var n in t)if(e.hasProperty(t,n)&&!h(n)){r=!1;break}if(r)return t;var i={};for(var n in t){if(e.hasProperty(t,n))i[h(n)?n:n.charAt(0).toLowerCase()+n.substr(1)]=t[n]}return i}function h(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function v(){return{target:1,jsx:1}}e.toEditorSettings=y,e.displayPartsToString=function(t){return t?e.map(t,(function(e){return e.text})).join(""):""},e.getDefaultCompilerOptions=v,e.getSupportedCodeFixes=function(){return e.codefix.getSupportedErrorCodes()};var b=function(){function t(t,r){this.host=t,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=e.createMap();for(var n=0,i=t.getScriptFileNames();n<i.length;n++){var a=i[n];this.createEntry(a,e.toPath(a,this.currentDirectory,r))}this._compilationSettings=t.getCompilationSettings()||{target:1,jsx:1}}return t.prototype.compilationSettings=function(){return this._compilationSettings},t.prototype.getProjectReferences=function(){return this.host.getProjectReferences&&this.host.getProjectReferences()},t.prototype.createEntry=function(t,r){var n,i=this.host.getScriptSnapshot(t);return n=i?{hostFileName:t,version:this.host.getScriptVersion(t),scriptSnapshot:i,scriptKind:e.getScriptKind(t,this.host)}:t,this.fileNameToEntry.set(r,n),n},t.prototype.getEntryByPath=function(e){return this.fileNameToEntry.get(e)},t.prototype.getHostFileInformation=function(t){var r=this.fileNameToEntry.get(t);return e.isString(r)?void 0:r},t.prototype.getOrCreateEntryByPath=function(t,r){var n=this.getEntryByPath(r)||this.createEntry(t,r);return e.isString(n)?void 0:n},t.prototype.getRootFileNames=function(){var t=[];return this.fileNameToEntry.forEach((function(r){e.isString(r)?t.push(r):6!==r.scriptKind&&t.push(r.hostFileName)})),t},t.prototype.getVersion=function(e){var t=this.getHostFileInformation(e);return t&&t.version},t.prototype.getScriptSnapshot=function(e){var t=this.getHostFileInformation(e);return t&&t.scriptSnapshot},t}(),x=function(){function t(e){this.host=e}return t.prototype.getCurrentSourceFile=function(t){var r=this.host.getScriptSnapshot(t);if(!r)throw new Error("Could not find file: '"+t+"'.");var n,i=e.getScriptKind(t,this.host),a=this.host.getScriptVersion(t);if(this.currentFileName!==t)n=S(t,r,99,a,!0,i);else if(this.currentFileVersion!==a){var o=r.getChangeRange(this.currentFileScriptSnapshot);n=T(this.currentSourceFile,r,a,o)}return n&&(this.currentFileVersion=a,this.currentFileName=t,this.currentFileScriptSnapshot=r,this.currentSourceFile=n),this.currentSourceFile},t}();function D(e,t,r){e.version=r,e.scriptSnapshot=t}function S(t,r,n,i,a,o){var s=e.createSourceFile(t,e.getSnapshotText(r),n,a,o);return D(s,r,i),s}function T(t,r,n,i,a){if(i&&n!==t.version&&!e.disableIncrementalParsing){var o=void 0,s=0!==i.span.start?t.text.substr(0,i.span.start):"",c=e.textSpanEnd(i.span)!==t.text.length?t.text.substr(e.textSpanEnd(i.span)):"";if(0===i.newLength)o=s&&c?s+c:s||c;else{var u=r.getText(i.span.start,i.span.start+i.newLength);o=s&&c?s+u+c:s?s+u:u+c}var l=e.updateSourceFile(t,o,i,a);return D(l,r,n),l.nameTable=void 0,t!==l&&t.scriptSnapshot&&(t.scriptSnapshot.dispose&&t.scriptSnapshot.dispose(),t.scriptSnapshot=void 0),l}return S(t.fileName,r,t.languageVersion,n,!0,t.scriptKind)}e.createLanguageServiceSourceFile=S,e.disableIncrementalParsing=!1,e.updateLanguageServiceSourceFile=T;var E=function(){function t(e){this.cancellationToken=e}return t.prototype.isCancellationRequested=function(){return!!this.cancellationToken&&this.cancellationToken.isCancellationRequested()},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}(),C=function(){function t(e,t){void 0===t&&(t=20),this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}return t.prototype.isCancellationRequested=function(){var t=e.timestamp();return Math.abs(t-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested())},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();function k(t){var r=function(t){switch(t.kind){case 10:case 14:case 8:if(153===t.parent.kind)return e.isObjectLiteralElement(t.parent.parent)?t.parent.parent:void 0;case 75:return!e.isObjectLiteralElement(t.parent)||192!==t.parent.parent.kind&&272!==t.parent.parent.kind||t.parent.name!==t?void 0:t.parent}return}(t);return r&&(e.isObjectLiteralExpression(r.parent)||e.isJsxAttributes(r.parent))?r:void 0}function N(t,r,n,i){var a=e.getNameFromPropertyName(t.name);if(!a)return e.emptyArray;if(!n.isUnion())return(o=n.getProperty(a))?[o]:e.emptyArray;var o,s=e.mapDefined(n.types,(function(n){return e.isObjectLiteralExpression(t.parent)&&r.isTypeInvalidDueToUnionDiscriminant(n,t.parent)?void 0:n.getProperty(a)}));if(i&&(0===s.length||s.length===n.types.length)&&(o=n.getProperty(a)))return[o];return 0===s.length?e.mapDefined(n.types,(function(e){return e.getProperty(a)})):s}e.ThrottledCancellationToken=C,e.createLanguageService=function(n,i,a){var o;void 0===i&&(i=e.createDocumentRegistry(n.useCaseSensitiveFileNames&&n.useCaseSensitiveFileNames(),n.getCurrentDirectory())),void 0===a&&(a=!1);var s,c,u=new x(n),l=0,_=new E(n.getCancellationToken&&n.getCancellationToken()),d=n.getCurrentDirectory();function p(e){n.log&&n.log(e)}!e.localizedDiagnosticMessages&&n.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=n.getLocalizedDiagnosticMessages());var f=e.hostUsesCaseSensitiveFileNames(n),m=e.createGetCanonicalFileName(f),g=e.getSourceMapper({useCaseSensitiveFileNames:function(){return f},getCurrentDirectory:function(){return d},getProgram:D,fileExists:e.maybeBind(n,n.fileExists),readFile:e.maybeBind(n,n.readFile),getDocumentPositionMapper:e.maybeBind(n,n.getDocumentPositionMapper),getSourceFileLike:e.maybeBind(n,n.getSourceFileLike),log:p});function h(e){var t=s.getSourceFile(e);if(!t){var r=new Error("Could not find source file: '"+e+"'.");throw r.ProgramFiles=s.getSourceFiles().map((function(e){return e.fileName})),r}return t}function v(){if(e.Debug.assert(!a),n.getProjectVersion){var t=n.getProjectVersion();if(t){if(c===t&&!n.hasChangedAutomaticTypeDirectiveNames)return;c=t}}var r=n.getTypeRootsVersion?n.getTypeRootsVersion():0;l!==r&&(p("TypeRoots version has changed; provide new program"),s=void 0,l=r);var o=new b(n,m),u=o.getRootFileNames(),y=n.hasInvalidatedResolution||e.returnFalse,h=o.getProjectReferences();if(!e.isProgramUptoDate(s,u,o.compilationSettings(),(function(e){return o.getVersion(e)}),T,y,!!n.hasChangedAutomaticTypeDirectiveNames,h)){var v=o.compilationSettings(),x={getSourceFile:function(t,r,n,i){return E(t,e.toPath(t,d,m),r,n,i)},getSourceFileByPath:E,getCancellationToken:function(){return _},getCanonicalFileName:m,useCaseSensitiveFileNames:function(){return f},getNewLine:function(){return e.getNewLineCharacter(v,(function(){return e.getNewLineOrDefaultFromHost(n)}))},getDefaultLibFileName:function(e){return n.getDefaultLibFileName(e)},writeFile:e.noop,getCurrentDirectory:function(){return d},fileExists:T,readFile:function(t){var r=e.toPath(t,d,m),i=o&&o.getEntryByPath(r);if(i)return e.isString(i)?void 0:e.getSnapshotText(i.scriptSnapshot);return n.readFile&&n.readFile(t)},realpath:n.realpath&&function(e){return n.realpath(e)},directoryExists:function(t){return e.directoryProbablyExists(t,n)},getDirectories:function(e){return n.getDirectories?n.getDirectories(e):[]},readDirectory:function(t,r,i,a,o){return e.Debug.assertDefined(n.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),n.readDirectory(t,r,i,a,o)},onReleaseOldSourceFile:function(e,t){var r=i.getKeyForCompilationSettings(t);i.releaseDocumentWithKey(e.resolvedPath,r)},hasInvalidatedResolution:y,hasChangedAutomaticTypeDirectiveNames:n.hasChangedAutomaticTypeDirectiveNames};n.trace&&(x.trace=function(e){return n.trace(e)}),n.resolveModuleNames&&(x.resolveModuleNames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.resolveModuleNames.apply(n,e)}),n.resolveTypeReferenceDirectives&&(x.resolveTypeReferenceDirectives=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.resolveTypeReferenceDirectives.apply(n,e)}),n.setResolvedProjectReferenceCallbacks&&(x.setResolvedProjectReferenceCallbacks=function(e){return n.setResolvedProjectReferenceCallbacks(e)}),n.useSourceOfProjectReferenceRedirect&&(x.useSourceOfProjectReferenceRedirect=function(){return n.useSourceOfProjectReferenceRedirect()});var D=i.getKeyForCompilationSettings(v),S={rootNames:u,options:v,host:x,oldProgram:s,projectReferences:h};return s=e.createProgram(S),o=void 0,g.clearCache(),void s.getTypeChecker()}function T(t){var r=e.toPath(t,d,m),i=o&&o.getEntryByPath(r);return i?!e.isString(i):!!n.fileExists&&n.fileExists(t)}function E(t,r,n,a,c){e.Debug.assert(void 0!==o,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");var u=o&&o.getOrCreateEntryByPath(t,r);if(u){if(!c){var l=s&&s.getSourceFileByPath(r);if(l)return e.Debug.assertEqual(u.scriptKind,l.scriptKind,"Registered script kind should match new script kind.",r),i.updateDocumentWithKey(t,r,v,D,u.scriptSnapshot,u.version,u.scriptKind)}return i.acquireDocumentWithKey(t,r,v,D,u.scriptSnapshot,u.version,u.scriptKind)}}}function D(){if(!a)return v(),s;e.Debug.assert(void 0===s)}function S(t,r,n){var i=e.normalizePath(t);e.Debug.assert(n.some((function(t){return e.normalizePath(t)===i}))),v();var a=e.mapDefined(n,(function(e){return s.getSourceFile(e)})),o=h(t);return e.DocumentHighlights.getDocumentHighlights(s,_,o,r,a)}function T(t,r,n,i){v();var a=n&&n.isForRename?s.getSourceFiles().filter((function(e){return!s.isSourceFileDefaultLibrary(e)})):s.getSourceFiles();return e.FindAllReferences.findReferenceOrRenameEntries(s,_,a,t,r,n,i)}function C(t){var r=e.getScriptKind(t,n);return 3===r||4===r}var A=e.createMapFromTemplate(((o={})[18]=19,o[20]=21,o[22]=23,o[31]=29,o));function F(t){return e.Debug.assertEqual(t.type,"install package"),n.installPackage?n.installPackage({fileName:function(t){return e.toPath(t,d,m)}(t.file),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`")}function P(t,r,i,a){var o="number"==typeof r?[r,void 0]:[r.pos,r.end];return{file:t,startPosition:o[0],endPosition:o[1],program:D(),host:n,formatContext:e.formatting.getFormatContext(a),cancellationToken:_,preferences:i}}return A.forEach((function(e,t){return A.set(e.toString(),Number(t))})),{dispose:function(){s&&(e.forEach(s.getSourceFiles(),(function(e){return i.releaseDocument(e.fileName,s.getCompilerOptions())})),s=void 0),n=void 0},cleanupSemanticCache:function(){s=void 0},getSyntacticDiagnostics:function(e){return v(),s.getSyntacticDiagnostics(h(e),_).slice()},getSemanticDiagnostics:function(r){v();var n=h(r),i=s.getSemanticDiagnostics(n,_);if(!e.getEmitDeclarations(s.getCompilerOptions()))return i.slice();var a=s.getDeclarationDiagnostics(n,_);return t(i,a)},getSuggestionDiagnostics:function(t){return v(),e.computeSuggestionDiagnostics(h(t),s,_)},getCompilerOptionsDiagnostics:function(){return v(),t(s.getOptionsDiagnostics(_),s.getGlobalDiagnostics(_))},getSyntacticClassifications:function(t,r){return e.getSyntacticClassifications(_,u.getCurrentSourceFile(t),r)},getSemanticClassifications:function(t,r){return C(t)?(v(),e.getSemanticClassifications(s.getTypeChecker(),_,h(t),s.getClassifiableNames(),r)):[]},getEncodedSyntacticClassifications:function(t,r){return e.getEncodedSyntacticClassifications(_,u.getCurrentSourceFile(t),r)},getEncodedSemanticClassifications:function(t,r){return C(t)?(v(),e.getEncodedSemanticClassifications(s.getTypeChecker(),_,h(t),s.getClassifiableNames(),r)):{spans:[],endOfLineState:0}},getCompletionsAtPosition:function(t,i,a){void 0===a&&(a=e.emptyOptions);var o=r(r({},e.identity(a)),{includeCompletionsForModuleExports:a.includeCompletionsForModuleExports||a.includeExternalModuleExports,includeCompletionsWithInsertText:a.includeCompletionsWithInsertText||a.includeInsertTextCompletions});return v(),e.Completions.getCompletionsAtPosition(n,s,p,h(t),i,o,a.triggerCharacter)},getCompletionEntryDetails:function(t,r,i,a,o,c){return void 0===c&&(c=e.emptyOptions),v(),e.Completions.getCompletionEntryDetails(s,p,h(t),r,{name:i,source:o},n,a&&e.formatting.getFormatContext(a),c,_)},getCompletionEntrySymbol:function(t,r,i,a){return v(),e.Completions.getCompletionEntrySymbol(s,p,h(t),r,{name:i,source:a},n)},getSignatureHelpItems:function(t,r,n){var i=(void 0===n?e.emptyOptions:n).triggerReason;v();var a=h(t);return e.SignatureHelp.getSignatureHelpItems(s,a,r,i,_)},getQuickInfoAtPosition:function(t,r){v();var n=h(t),i=e.getTouchingPropertyName(n,r);if(i!==n){var a=s.getTypeChecker(),o=function(t){if(e.isNewExpression(t.parent)&&t.pos===t.parent.pos)return t.parent.expression;return t}(i),c=function(t,r){var n=k(t);if(n){var i=r.getContextualType(n.parent),a=i&&N(n,r,i,!1);if(a&&1===a.length)return e.first(a)}return r.getSymbolAtLocation(t)}(o,a);if(!c||a.isUnknownSymbol(c)){var u=function(t,r,n){switch(r.kind){case 75:return!e.isLabelName(r)&&!e.isTagName(r);case 193:case 152:return!e.isInComment(t,n);case 103:case 182:case 101:return!0;default:return!1}}(n,o,r)?a.getTypeAtLocation(o):void 0;return u&&{kind:"",kindModifiers:"",textSpan:e.createTextSpanFromNode(o,n),displayParts:a.runWithCancellationToken(_,(function(t){return e.typeToDisplayParts(t,u,e.getContainerNode(o))})),documentation:u.symbol?u.symbol.getDocumentationComment(a):void 0,tags:u.symbol?u.symbol.getJsDocTags():void 0}}var l=a.runWithCancellationToken(_,(function(t){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(t,c,n,e.getContainerNode(o),o)})),d=l.symbolKind,p=l.displayParts,f=l.documentation,m=l.tags;return{kind:d,kindModifiers:e.SymbolDisplay.getSymbolModifiers(c),textSpan:e.createTextSpanFromNode(o,n),displayParts:p,documentation:f,tags:m}}},getDefinitionAtPosition:function(t,r){return v(),e.GoToDefinition.getDefinitionAtPosition(s,h(t),r)},getDefinitionAndBoundSpan:function(t,r){return v(),e.GoToDefinition.getDefinitionAndBoundSpan(s,h(t),r)},getImplementationAtPosition:function(t,r){return v(),e.FindAllReferences.getImplementationsAtPosition(s,_,s.getSourceFiles(),h(t),r)},getTypeDefinitionAtPosition:function(t,r){return v(),e.GoToDefinition.getTypeDefinitionAtPosition(s.getTypeChecker(),h(t),r)},getReferencesAtPosition:function(t,r){return v(),T(e.getTouchingPropertyName(h(t),r),r,{},e.FindAllReferences.toReferenceEntry)},findReferences:function(t,r){return v(),e.FindAllReferences.findReferencedSymbols(s,_,s.getSourceFiles(),h(t),r)},getOccurrencesAtPosition:function(t,n){return e.flatMap(S(t,n,[t]),(function(e){return e.highlightSpans.map((function(t){return r(r({fileName:e.fileName,textSpan:t.textSpan,isWriteAccess:"writtenReference"===t.kind,isDefinition:!1},t.isInString&&{isInString:!0}),t.contextSpan&&{contextSpan:t.contextSpan})}))}))},getDocumentHighlights:S,getNameOrDottedNameSpan:function(t,r,n){var i=u.getCurrentSourceFile(t),a=e.getTouchingPropertyName(i,r);if(a!==i){switch(a.kind){case 193:case 152:case 10:case 90:case 105:case 99:case 101:case 103:case 182:case 75:break;default:return}for(var o=a;;)if(e.isRightSideOfPropertyAccess(o)||e.isRightSideOfQualifiedName(o))o=o.parent;else{if(!e.isNameOfModuleDeclaration(o))break;if(248!==o.parent.parent.kind||o.parent.parent.body!==o.parent)break;o=o.parent.parent.name}return e.createTextSpanFromBounds(o.getStart(),a.getEnd())}},getBreakpointStatementAtPosition:function(t,r){var n=u.getCurrentSourceFile(t);return e.BreakpointResolver.spanInSourceFileAtLocation(n,r)},getNavigateToItems:function(t,r,n,i){void 0===i&&(i=!1),v();var a=n?[h(n)]:s.getSourceFiles();return e.NavigateTo.getNavigateToItems(a,s.getTypeChecker(),_,t,r,i)},getRenameInfo:function(t,r,n){return v(),e.Rename.getRenameInfo(s,h(t),r,n)},getSmartSelectionRange:function(t,r){return e.SmartSelectionRange.getSmartSelectionRange(r,u.getCurrentSourceFile(t))},findRenameLocations:function(t,n,i,a,o){v();var s=h(t),c=e.getTouchingPropertyName(s,n);if(e.isIdentifier(c)&&(e.isJsxOpeningElement(c.parent)||e.isJsxClosingElement(c.parent))&&e.isIntrinsicJsxName(c.escapedText)){var u=c.parent.parent;return[u.openingElement,u.closingElement].map((function(t){var n=e.createTextSpanFromNode(t.tagName,s);return r({fileName:s.fileName,textSpan:n},e.FindAllReferences.toContextSpan(n,s,t.parent))}))}return T(c,n,{findInStrings:i,findInComments:a,providePrefixAndSuffixTextForRename:o,isForRename:!0},(function(t,r,n){return e.FindAllReferences.toRenameLocation(t,r,n,o||!1)}))},getNavigationBarItems:function(t){return e.NavigationBar.getNavigationBarItems(u.getCurrentSourceFile(t),_)},getNavigationTree:function(t){return e.NavigationBar.getNavigationTree(u.getCurrentSourceFile(t),_)},getOutliningSpans:function(t){var r=u.getCurrentSourceFile(t);return e.OutliningElementsCollector.collectElements(r,_)},getTodoComments:function(t,r){v();var n=h(t);_.throwIfCancellationRequested();var i,a=n.text,o=[];if(r.length>0&&!function(t){return e.stringContains(t,"/node_modules/")}(n.fileName))for(var s=function(){var t="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+e.map(r,(function(e){return"("+e.text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")"})).join("|")+")";return new RegExp(t+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}(),c=void 0;c=s.exec(a);){_.throwIfCancellationRequested();e.Debug.assert(c.length===r.length+3);var u=c[1],l=c.index+u.length;if(e.isInComment(n,l)){for(var d=void 0,p=0;p<r.length;p++)c[p+3]&&(d=r[p]);if(void 0===d)return e.Debug.fail();if(!((i=a.charCodeAt(l+d.text.length))>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){var f=c[2];o.push({descriptor:d,message:f,position:l})}}}return o},getBraceMatchingAtPosition:function(t,r){var n=u.getCurrentSourceFile(t),i=e.getTouchingToken(n,r),a=i.getStart(n)===r?A.get(i.kind.toString()):void 0,o=a&&e.findChildOfKind(i.parent,a,n);return o?[e.createTextSpanFromNode(i,n),e.createTextSpanFromNode(o,n)].sort((function(e,t){return e.start-t.start})):e.emptyArray},getIndentationAtPosition:function(t,r,n){var i=e.timestamp(),a=y(n),o=u.getCurrentSourceFile(t);p("getIndentationAtPosition: getCurrentSourceFile: "+(e.timestamp()-i)),i=e.timestamp();var s=e.formatting.SmartIndenter.getIndentation(r,o,a);return p("getIndentationAtPosition: computeIndentation : "+(e.timestamp()-i)),s},getFormattingEditsForRange:function(t,r,n,i){var a=u.getCurrentSourceFile(t);return e.formatting.formatSelection(r,n,a,e.formatting.getFormatContext(y(i)))},getFormattingEditsForDocument:function(t,r){return e.formatting.formatDocument(u.getCurrentSourceFile(t),e.formatting.getFormatContext(y(r)))},getFormattingEditsAfterKeystroke:function(t,r,n,i){var a=u.getCurrentSourceFile(t),o=e.formatting.getFormatContext(y(i));if(!e.isInComment(a,r))switch(n){case"{":return e.formatting.formatOnOpeningCurly(r,a,o);case"}":return e.formatting.formatOnClosingCurly(r,a,o);case";":return e.formatting.formatOnSemicolon(r,a,o);case"\n":return e.formatting.formatOnEnter(r,a,o)}return[]},getDocCommentTemplateAtPosition:function(t,r){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(n),u.getCurrentSourceFile(t),r)},isValidBraceCompletionAtPosition:function(t,r,n){if(60===n)return!1;var i=u.getCurrentSourceFile(t);if(e.isInString(i,r))return!1;if(e.isInsideJsxElementOrAttribute(i,r))return 123===n;if(e.isInTemplateString(i,r))return!1;switch(n){case 39:case 34:case 96:return!e.isInComment(i,r)}return!0},getJsxClosingTagAtPosition:function(t,r){var n=u.getCurrentSourceFile(t),i=e.findPrecedingToken(r,n);if(i){var a=31===i.kind&&e.isJsxOpeningElement(i.parent)?i.parent.parent:e.isJsxText(i)?i.parent:void 0;return a&&function t(r){var n=r.openingElement,i=r.closingElement,a=r.parent;return!e.tagNamesAreEquivalent(n.tagName,i.tagName)||e.isJsxElement(a)&&e.tagNamesAreEquivalent(n.tagName,a.openingElement.tagName)&&t(a)}(a)?{newText:"</"+a.openingElement.tagName.getText(n)+">"}:void 0}},getSpanOfEnclosingComment:function(t,r,n){var i=u.getCurrentSourceFile(t),a=e.formatting.getRangeOfEnclosingComment(i,r);return!a||n&&3!==a.kind?void 0:e.createTextSpanFromRange(a)},getCodeFixesAtPosition:function(t,r,i,a,o,c){void 0===c&&(c=e.emptyOptions),v();var u=h(t),l=e.createTextSpanFromBounds(r,i),d=e.formatting.getFormatContext(o);return e.flatMap(e.deduplicate(a,e.equateValues,e.compareValues),(function(t){return _.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:t,sourceFile:u,span:l,program:s,host:n,cancellationToken:_,formatContext:d,preferences:c})}))},getCombinedCodeFix:function(t,r,i,a){void 0===a&&(a=e.emptyOptions),v(),e.Debug.assert("file"===t.type);var o=h(t.fileName),c=e.formatting.getFormatContext(i);return e.codefix.getAllFixes({fixId:r,sourceFile:o,program:s,host:n,cancellationToken:_,formatContext:c,preferences:a})},applyCodeActionCommand:function(t,r){var n="string"==typeof t?r:t;return e.isArray(n)?Promise.all(n.map((function(e){return F(e)}))):F(n)},organizeImports:function(t,r,i){void 0===i&&(i=e.emptyOptions),v(),e.Debug.assert("file"===t.type);var a=h(t.fileName),o=e.formatting.getFormatContext(r);return e.OrganizeImports.organizeImports(a,o,n,s,i)},getEditsForFileRename:function(t,r,i,a){return void 0===a&&(a=e.emptyOptions),e.getEditsForFileRename(D(),t,r,n,e.formatting.getFormatContext(i),a,g)},getEmitOutput:function(t,r,i){v();var a=h(t),o=n.getCustomTransformers&&n.getCustomTransformers();return e.getFileEmitOutput(s,a,!!r,_,o,i)},getNonBoundSourceFile:function(e){return u.getCurrentSourceFile(e)},getProgram:D,getApplicableRefactors:function(t,r,n){void 0===n&&(n=e.emptyOptions),v();var i=h(t);return e.refactor.getApplicableRefactors(P(i,r,n))},getEditsForRefactor:function(t,r,n,i,a,o){void 0===o&&(o=e.emptyOptions),v();var s=h(t);return e.refactor.getEditsForRefactor(P(s,n,o,r),i,a)},toLineColumnOffset:g.toLineColumnOffset,getSourceMapper:function(){return g}}},e.getNameTable=function(t){return t.nameTable||function(t){var r=t.nameTable=e.createUnderscoreEscapedMap();t.forEachChild((function t(n){if(e.isIdentifier(n)&&!e.isTagName(n)&&n.escapedText||e.isStringOrNumericLiteralLike(n)&&function(t){return e.isDeclarationName(t)||263===t.parent.kind||function(e){return e&&e.parent&&194===e.parent.kind&&e.parent.argumentExpression===e}(t)||e.isLiteralComputedPropertyDeclarationName(t)}(n)){var i=e.getEscapedTextOfIdentifierOrLiteral(n);r.set(i,void 0===r.get(i)?n.pos:-1)}if(e.forEachChild(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a<o.length;a++){var s=o[a];e.forEachChild(s,t)}}))}(t),t.nameTable},e.getContainingObjectLiteralElement=k,e.getPropertySymbolsFromContextualType=N,e.getDefaultLibFilePath=function(t){return Le+e.directorySeparator+e.getDefaultLibFileName(t)},e.objectAllocator={getNodeConstructor:function(){return i},getTokenConstructor:function(){return u},getIdentifierConstructor:function(){return l},getSourceFileConstructor:function(){return m},getSymbolConstructor:function(){return c},getTypeConstructor:function(){return _},getSignatureConstructor:function(){return d},getSourceMapSourceConstructor:function(){return g}}}(s||(s={})),function(e){!function(t){t.spanInSourceFileAtLocation=function(t,r){if(!t.isDeclarationFile){var n=e.getTokenAtPosition(t,r),i=t.getLineAndCharacterOfPosition(r).line;if(t.getLineAndCharacterOfPosition(n.getStart(t)).line>i){var a=e.findPrecedingToken(n.pos,t);if(!a||t.getLineAndCharacterOfPosition(a.getEnd()).line!==i)return;n=a}if(!(8388608&n.flags))return _(n)}function o(r,n){var i=r.decorators?e.skipTrivia(t.text,r.decorators.end):r.getStart(t);return e.createTextSpanFromBounds(i,(n||r).getEnd())}function s(r,n){return o(r,e.findNextToken(n,n.parent,t))}function c(e,r){return e&&i===t.getLineAndCharacterOfPosition(e.getStart(t)).line?_(e):_(r)}function u(r){return _(e.findPrecedingToken(r.pos,t))}function l(r){return _(e.findNextToken(r,r.parent,t))}function _(r){if(r){var n=r.parent;switch(r.kind){case 224:return h(r.declarationList.declarations[0]);case 241:case 158:case 157:return h(r);case 155:return function t(r){if(e.isBindingPattern(r.name))return D(r.name);if(function(t){return!!t.initializer||void 0!==t.dotDotDotToken||e.hasModifier(t,12)}(r))return o(r);var n=r.parent,i=n.parameters.indexOf(r);return e.Debug.assert(-1!==i),0!==i?t(n.parameters[i-1]):_(n.body)}(r);case 243:case 160:case 159:case 162:case 163:case 161:case 200:case 201:return function(e){if(!e.body)return;if(v(e))return o(e);return _(e.body)}(r);case 222:if(e.isFunctionBlock(r))return function(e){var t=e.statements.length?e.statements[0]:e.getLastToken();if(v(e.parent))return c(e.parent,t);return _(t)}(r);case 249:return b(r);case 278:return b(r.block);case 225:return o(r.expression);case 234:return o(r.getChildAt(0),r.expression);case 228:return s(r,r.expression);case 227:return _(r.statement);case 240:return o(r.getChildAt(0));case 226:return s(r,r.expression);case 237:return _(r.statement);case 233:case 232:return o(r.getChildAt(0),r.label);case 229:return function(e){if(e.initializer)return x(e);if(e.condition)return o(e.condition);if(e.incrementor)return o(e.incrementor)}(r);case 230:return s(r,r.expression);case 231:return x(r);case 236:return s(r,r.expression);case 275:case 276:return _(r.statements[0]);case 239:return b(r.tryBlock);case 238:case 258:return o(r,r.expression);case 252:return o(r,r.moduleReference);case 253:case 259:return o(r,r.moduleSpecifier);case 248:if(1!==e.getModuleInstanceState(r))return;case 244:case 247:case 282:case 190:return o(r);case 235:return _(r.statement);case 156:return g=n.decorators,e.createTextSpanFromBounds(e.skipTrivia(t.text,g.pos),g.end);case 188:case 189:return D(r);case 245:case 246:return;case 26:case 1:return c(e.findPrecedingToken(r.pos,t));case 27:return u(r);case 18:return function(r){switch(r.parent.kind){case 247:var n=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),n.members.length?n.members[0]:n.getLastToken(t));case 244:var i=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),i.members.length?i.members[0]:i.getLastToken(t));case 250:return c(r.parent.parent,r.parent.clauses[0])}return _(r.parent)}(r);case 19:return function(t){switch(t.parent.kind){case 249:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 247:case 244:return o(t);case 222:if(e.isFunctionBlock(t.parent))return o(t);case 278:return _(e.lastOrUndefined(t.parent.statements));case 250:var r=t.parent,n=e.lastOrUndefined(r.clauses);return n?_(e.lastOrUndefined(n.statements)):void 0;case 188:var i=t.parent;return _(e.lastOrUndefined(i.elements)||i);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var a=t.parent;return o(e.lastOrUndefined(a.properties)||a)}return _(t.parent)}}(r);case 23:return function(t){switch(t.parent.kind){case 189:var r=t.parent;return o(e.lastOrUndefined(r.elements)||r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var n=t.parent;return o(e.lastOrUndefined(n.elements)||n)}return _(t.parent)}}(r);case 20:return function(e){if(227===e.parent.kind||195===e.parent.kind||196===e.parent.kind)return u(e);if(199===e.parent.kind)return l(e);return _(e.parent)}(r);case 21:return function(e){switch(e.parent.kind){case 200:case 243:case 201:case 160:case 159:case 162:case 163:case 161:case 228:case 227:case 229:case 231:case 195:case 196:case 199:return u(e);default:return _(e.parent)}}(r);case 58:return function(t){if(e.isFunctionLike(t.parent)||279===t.parent.kind||155===t.parent.kind)return u(t);return _(t.parent)}(r);case 31:case 29:return function(e){if(198===e.parent.kind)return l(e);return _(e.parent)}(r);case 110:return function(e){if(227===e.parent.kind)return s(e,e.parent.expression);return _(e.parent)}(r);case 86:case 78:case 91:return l(r);case 151:return function(e){if(231===e.parent.kind)return l(e);return _(e.parent)}(r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(r))return S(r);if((75===r.kind||212===r.kind||279===r.kind||280===r.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return o(r);if(208===r.kind){var i=r,a=i.left,d=i.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a))return S(a);if(62===d.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent))return o(r);if(27===d.kind)return _(a)}if(e.isExpressionNode(r))switch(n.kind){case 227:return u(r);case 156:return _(r.parent);case 229:case 231:return o(r);case 208:if(27===r.parent.operatorToken.kind)return o(r);break;case 201:if(r.parent.body===r)return o(r)}switch(r.parent.kind){case 279:if(r.parent.name===r&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent.parent))return _(r.parent.initializer);break;case 198:if(r.parent.type===r)return l(r.parent.type);break;case 241:case 155:var p=r.parent,f=p.initializer,m=p.type;if(f===r||m===r||e.isAssignmentOperator(r.kind))return u(r);break;case 208:a=r.parent.left;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a)&&r!==a)return u(r);break;default:if(e.isFunctionLike(r.parent)&&r.parent.type===r)return u(r)}return _(r.parent)}}var g;function y(r){return e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]===r?o(e.findPrecedingToken(r.pos,t,r.parent),r):o(r)}function h(r){if(230===r.parent.parent.kind)return _(r.parent.parent);var n=r.parent;return e.isBindingPattern(r.name)?D(r.name):r.initializer||e.hasModifier(r,1)||231===n.parent.kind?y(r):e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]!==r?_(e.findPrecedingToken(r.pos,t,r.parent)):void 0}function v(t){return e.hasModifier(t,1)||244===t.parent.kind&&161!==t.kind}function b(r){switch(r.parent.kind){case 248:if(1!==e.getModuleInstanceState(r.parent))return;case 228:case 226:case 230:return c(r.parent,r.statements[0]);case 229:case 231:return c(e.findPrecedingToken(r.pos,t,r.parent),r.statements[0])}return _(r.statements[0])}function x(e){if(242!==e.initializer.kind)return _(e.initializer);var t=e.initializer;return t.declarations.length>0?_(t.declarations[0]):void 0}function D(t){var r=e.forEach(t.elements,(function(e){return 214!==e.kind?e:void 0}));return r?_(r):190===t.parent.kind?o(t.parent):y(t.parent)}function S(t){e.Debug.assert(189!==t.kind&&188!==t.kind);var r=191===t.kind?t.elements:t.properties,n=e.forEach(r,(function(e){return 214!==e.kind?e:void 0}));return n?_(n):o(208===t.parent.kind?t.parent:t)}}}}(e.BreakpointResolver||(e.BreakpointResolver={}))}(s||(s={})),function(e){e.transform=function(t,r,n){var i=[];n=e.fixupCompilerOptions(n,i);var a=e.isArray(t)?t:[t],o=e.transformNodes(void 0,void 0,n,a,r,!0);return o.diagnostics=e.concatenate(o.diagnostics,i),o}}(s||(s={}));var s,c,u=function(){return this}();!function(r){function n(e,t){e&&e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}var i=function(){function e(e){this.scriptSnapshotShim=e}return e.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},e.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},e.prototype.getChangeRange=function(e){var t=e,n=this.scriptSnapshotShim.getChangeRange(t.scriptSnapshotShim);if(null===n)return null;var i=JSON.parse(n);return r.createTextChangeRange(r.createTextSpan(i.span.start,i.span.length),i.newLength)},e.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},e}(),a=function(){function e(e){var t=this;this.shimHost=e,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(e,n){var i=JSON.parse(t.shimHost.getModuleResolutionsForFile(n));return r.map(e,(function(e){var t=r.getProperty(i,e);return t?{resolvedFileName:t,extension:r.extensionFromPath(t),isExternalLibraryImport:!1}:void 0}))}),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return t.shimHost.directoryExists(e)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(e,n){var i=JSON.parse(t.shimHost.getTypeReferenceDirectiveResolutionsForFile(n));return r.map(e,(function(e){return r.getProperty(i,e)}))})}return e.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},e.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},e.prototype.error=function(e){this.shimHost.error(e)},e.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},e.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},e.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null===e||""===e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var t=JSON.parse(e);return t.allowNonTsExtensions=!0,t},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new i(t)},e.prototype.getScriptKind=function(e){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(e):0},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null===e||""===e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},e.prototype.getCancellationToken=function(){var e=this.shimHost.getCancellationToken();return new r.ThrottledCancellationToken(e)},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},e.prototype.readDirectory=function(e,t,n,i,a){var o=r.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(t),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.readFile=function(e,t){return this.shimHost.readFile(e,t)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e}();r.LanguageServiceShimHostAdapter=a;var s=function(){function e(e){var t=this;this.shimHost=e,this.useCaseSensitiveFileNames=!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames(),"directoryExists"in this.shimHost?this.directoryExists=function(e){return t.shimHost.directoryExists(e)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(e){return t.shimHost.realpath(e)}:this.realpath=void 0}return e.prototype.readDirectory=function(e,t,n,i,a){var o=r.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(t),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.readFile=function(e){return this.shimHost.readFile(e)},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e}();function c(e,t,r,n){return l(e,t,!0,r,n)}function l(e,t,i,a,o){try{var s=function(e,t,n,i){var a;i&&(e.log(t),a=r.timestamp());var o=n();if(i){var s=r.timestamp();if(e.log(t+" completed in "+(s-a)+" msec"),r.isString(o)){var c=o;c.length>128&&(c=c.substring(0,128)+"..."),e.log(" result.length="+c.length+", result='"+JSON.stringify(c)+"'")}}return o}(e,t,a,o);return i?JSON.stringify({result:s}):s}catch(i){return i instanceof r.OperationCanceledException?JSON.stringify({canceled:!0}):(n(e,i),i.description=t,JSON.stringify({error:i}))}}r.CoreServicesShimHostAdapter=s;var _=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();function d(e,t){return e.map((function(e){return function(e,t){return{message:r.flattenDiagnosticMessageText(e.messageText,t),start:e.start,length:e.length,category:r.diagnosticCategoryName(e),code:e.code,reportsUnnecessary:e.reportsUnnecessary}}(e,t)}))}r.realizeDiagnostics=d;var p=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.host=r,i.languageService=n,i.logPerformance=!1,i.logger=i.host,i}return o(t,e),t.prototype.forwardJSONCall=function(e,t){return c(this.logger,e,t,this.logPerformance)},t.prototype.dispose=function(t){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,u&&u.CollectGarbage&&(u.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,e.prototype.dispose.call(this,t)},t.prototype.refresh=function(e){this.forwardJSONCall("refresh("+e+")",(function(){return null}))},t.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",(function(){return e.languageService.cleanupSemanticCache(),null}))},t.prototype.realizeDiagnostics=function(e){return d(e,r.getNewLineOrDefaultFromHost(this.host))},t.prototype.getSyntacticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+e+"', "+t+", "+n+")",(function(){return i.languageService.getSyntacticClassifications(e,r.createTextSpan(t,n))}))},t.prototype.getSemanticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+e+"', "+t+", "+n+")",(function(){return i.languageService.getSemanticClassifications(e,r.createTextSpan(t,n))}))},t.prototype.getEncodedSyntacticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('"+e+"', "+t+", "+n+")",(function(){return f(i.languageService.getEncodedSyntacticClassifications(e,r.createTextSpan(t,n)))}))},t.prototype.getEncodedSemanticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getEncodedSemanticClassifications('"+e+"', "+t+", "+n+")",(function(){return f(i.languageService.getEncodedSemanticClassifications(e,r.createTextSpan(t,n)))}))},t.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSyntacticDiagnostics('"+e+"')",(function(){var r=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(r)}))},t.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSemanticDiagnostics('"+e+"')",(function(){var r=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(r)}))},t.prototype.getSuggestionDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSuggestionDiagnostics('"+e+"')",(function(){return t.realizeDiagnostics(t.languageService.getSuggestionDiagnostics(e))}))},t.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",(function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)}))},t.prototype.getQuickInfoAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getQuickInfoAtPosition(e,t)}))},t.prototype.getNameOrDottedNameSpan=function(e,t,r){var n=this;return this.forwardJSONCall("getNameOrDottedNameSpan('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getNameOrDottedNameSpan(e,t,r)}))},t.prototype.getBreakpointStatementAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getBreakpointStatementAtPosition(e,t)}))},t.prototype.getSignatureHelpItems=function(e,t,r){var n=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",(function(){return n.languageService.getSignatureHelpItems(e,t,r)}))},t.prototype.getDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getDefinitionAtPosition(e,t)}))},t.prototype.getDefinitionAndBoundSpan=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('"+e+"', "+t+")",(function(){return r.languageService.getDefinitionAndBoundSpan(e,t)}))},t.prototype.getTypeDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getTypeDefinitionAtPosition(e,t)}))},t.prototype.getImplementationAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getImplementationAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getImplementationAtPosition(e,t)}))},t.prototype.getRenameInfo=function(e,t,r){var n=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",(function(){return n.languageService.getRenameInfo(e,t,r)}))},t.prototype.getSmartSelectionRange=function(e,t){var r=this;return this.forwardJSONCall("getSmartSelectionRange('"+e+"', "+t+")",(function(){return r.languageService.getSmartSelectionRange(e,t)}))},t.prototype.findRenameLocations=function(e,t,r,n,i){var a=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+r+", "+n+", "+i+")",(function(){return a.languageService.findRenameLocations(e,t,r,n,i)}))},t.prototype.getBraceMatchingAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBraceMatchingAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getBraceMatchingAtPosition(e,t)}))},t.prototype.isValidBraceCompletionAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('"+e+"', "+t+", "+r+")",(function(){return n.languageService.isValidBraceCompletionAtPosition(e,t,r)}))},t.prototype.getSpanOfEnclosingComment=function(e,t,r){var n=this;return this.forwardJSONCall("getSpanOfEnclosingComment('"+e+"', "+t+")",(function(){return n.languageService.getSpanOfEnclosingComment(e,t,r)}))},t.prototype.getIndentationAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getIndentationAtPosition('"+e+"', "+t+")",(function(){var i=JSON.parse(r);return n.languageService.getIndentationAtPosition(e,t,i)}))},t.prototype.getReferencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getReferencesAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getReferencesAtPosition(e,t)}))},t.prototype.findReferences=function(e,t){var r=this;return this.forwardJSONCall("findReferences('"+e+"', "+t+")",(function(){return r.languageService.findReferences(e,t)}))},t.prototype.getOccurrencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getOccurrencesAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getOccurrencesAtPosition(e,t)}))},t.prototype.getDocumentHighlights=function(e,t,n){var i=this;return this.forwardJSONCall("getDocumentHighlights('"+e+"', "+t+")",(function(){var a=i.languageService.getDocumentHighlights(e,t,JSON.parse(n)),o=r.normalizeSlashes(e).toLowerCase();return r.filter(a,(function(e){return r.normalizeSlashes(e.fileName).toLowerCase()===o}))}))},t.prototype.getCompletionsAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getCompletionsAtPosition(e,t,r)}))},t.prototype.getCompletionEntryDetails=function(e,t,r,n,i,a){var o=this;return this.forwardJSONCall("getCompletionEntryDetails('"+e+"', "+t+", '"+r+"')",(function(){var s=void 0===n?void 0:JSON.parse(n);return o.languageService.getCompletionEntryDetails(e,t,r,s,i,a)}))},t.prototype.getFormattingEditsForRange=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsForRange('"+e+"', "+t+", "+r+")",(function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsForRange(e,t,r,a)}))},t.prototype.getFormattingEditsForDocument=function(e,t){var r=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",(function(){var n=JSON.parse(t);return r.languageService.getFormattingEditsForDocument(e,n)}))},t.prototype.getFormattingEditsAfterKeystroke=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+r+"')",(function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsAfterKeystroke(e,t,r,a)}))},t.prototype.getDocCommentTemplateAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getDocCommentTemplateAtPosition(e,t)}))},t.prototype.getNavigateToItems=function(e,t,r){var n=this;return this.forwardJSONCall("getNavigateToItems('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getNavigateToItems(e,t,r)}))},t.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",(function(){return t.languageService.getNavigationBarItems(e)}))},t.prototype.getNavigationTree=function(e){var t=this;return this.forwardJSONCall("getNavigationTree('"+e+"')",(function(){return t.languageService.getNavigationTree(e)}))},t.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",(function(){return t.languageService.getOutliningSpans(e)}))},t.prototype.getTodoComments=function(e,t){var r=this;return this.forwardJSONCall("getTodoComments('"+e+"')",(function(){return r.languageService.getTodoComments(e,JSON.parse(t))}))},t.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",(function(){return t.languageService.getEmitOutput(e)}))},t.prototype.getEmitOutputObject=function(e){var t=this;return l(this.logger,"getEmitOutput('"+e+"')",!1,(function(){return t.languageService.getEmitOutput(e)}),this.logPerformance)},t}(_);function f(e){return{spans:e.spans.join(","),endOfLineState:e.endOfLineState}}var m=function(e){function t(t,n){var i=e.call(this,t)||this;return i.logger=n,i.logPerformance=!1,i.classifier=r.createClassifier(),i}return o(t,e),t.prototype.getEncodedLexicalClassifications=function(e,t,r){var n=this;return void 0===r&&(r=!1),c(this.logger,"getEncodedLexicalClassifications",(function(){return f(n.classifier.getEncodedLexicalClassifications(e,t,r))}),this.logPerformance)},t.prototype.getClassificationsForLine=function(e,t,r){void 0===r&&(r=!1);for(var n=this.classifier.getClassificationsForLine(e,t,r),i="",a=0,o=n.entries;a<o.length;a++){var s=o[a];i+=s.length+"\n",i+=s.classification+"\n"}return i+=n.finalLexState},t}(_),g=function(e){function n(t,r,n){var i=e.call(this,t)||this;return i.logger=r,i.host=n,i.logPerformance=!1,i}return o(n,e),n.prototype.forwardJSONCall=function(e,t){return c(this.logger,e,t,this.logPerformance)},n.prototype.resolveModuleName=function(e,t,n){var i=this;return this.forwardJSONCall("resolveModuleName('"+e+"')",(function(){var a=JSON.parse(n),o=r.resolveModuleName(t,r.normalizeSlashes(e),a,i.host),s=o.resolvedModule?o.resolvedModule.resolvedFileName:void 0;return o.resolvedModule&&".ts"!==o.resolvedModule.extension&&".tsx"!==o.resolvedModule.extension&&".d.ts"!==o.resolvedModule.extension&&(s=void 0),{resolvedFileName:s,failedLookupLocations:o.failedLookupLocations}}))},n.prototype.resolveTypeReferenceDirective=function(e,t,n){var i=this;return this.forwardJSONCall("resolveTypeReferenceDirective("+e+")",(function(){var a=JSON.parse(n),o=r.resolveTypeReferenceDirective(t,r.normalizeSlashes(e),a,i.host);return{resolvedFileName:o.resolvedTypeReferenceDirective?o.resolvedTypeReferenceDirective.resolvedFileName:void 0,primary:!o.resolvedTypeReferenceDirective||o.resolvedTypeReferenceDirective.primary,failedLookupLocations:o.failedLookupLocations}}))},n.prototype.getPreProcessedFileInfo=function(e,t){var n=this;return this.forwardJSONCall("getPreProcessedFileInfo('"+e+"')",(function(){var e=r.preProcessFile(r.getSnapshotText(t),!0,!0);return{referencedFiles:n.convertFileReferences(e.referencedFiles),importedFiles:n.convertFileReferences(e.importedFiles),ambientExternalModules:e.ambientExternalModules,isLibFile:e.isLibFile,typeReferenceDirectives:n.convertFileReferences(e.typeReferenceDirectives),libReferenceDirectives:n.convertFileReferences(e.libReferenceDirectives)}}))},n.prototype.getAutomaticTypeDirectiveNames=function(e){var t=this;return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"+e+"')",(function(){var n=JSON.parse(e);return r.getAutomaticTypeDirectiveNames(n,t.host)}))},n.prototype.convertFileReferences=function(e){if(e){for(var t=[],n=0,i=e;n<i.length;n++){var a=i[n];t.push({path:r.normalizeSlashes(a.fileName),position:a.pos,length:a.end-a.pos})}return t}},n.prototype.getTSConfigFileInfo=function(e,n){var i=this;return this.forwardJSONCall("getTSConfigFileInfo('"+e+"')",(function(){var a=r.parseJsonText(e,r.getSnapshotText(n)),o=r.normalizeSlashes(e),s=r.parseJsonSourceFileConfigFileContent(a,i.host,r.getDirectoryPath(o),{},o);return{options:s.options,typeAcquisition:s.typeAcquisition,files:s.fileNames,raw:s.raw,errors:d(t(a.parseDiagnostics,s.errors),"\r\n")}}))},n.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",(function(){return r.getDefaultCompilerOptions()}))},n.prototype.discoverTypings=function(e){var t=this,n=r.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",(function(){var i=JSON.parse(e);return void 0===t.safeList&&(t.safeList=r.JsTyping.loadSafeList(t.host,r.toPath(i.safeListPath,i.safeListPath,n))),r.JsTyping.discoverTypings(t.host,(function(e){return t.logger.log(e)}),i.fileNames,r.toPath(i.projectRootPath,i.projectRootPath,n),t.safeList,i.packageNameToTypingLocation,i.typeAcquisition,i.unresolvedImports,i.typesRegistry)}))},n}(_),y=function(){function e(){this._shims=[]}return e.prototype.getServicesVersion=function(){return r.servicesVersion},e.prototype.createLanguageServiceShim=function(e){try{void 0===this.documentRegistry&&(this.documentRegistry=r.createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()));var t=new a(e),i=r.createLanguageService(t,this.documentRegistry,!1);return new p(this,e,i)}catch(t){throw n(e,t),t}},e.prototype.createClassifierShim=function(e){try{return new m(this,e)}catch(t){throw n(e,t),t}},e.prototype.createCoreServicesShim=function(e){try{var t=new s(e);return new g(this,e,t)}catch(t){throw n(e,t),t}},e.prototype.close=function(){r.clear(this._shims),this.documentRegistry=void 0},e.prototype.registerShim=function(e){this._shims.push(e)},e.prototype.unregisterShim=function(e){for(var t=0;t<this._shims.length;t++)if(this._shims[t]===e)return void delete this._shims[t];throw new Error("Invalid operation")},e}();r.TypeScriptServicesFactory=y,e.exports&&(e.exports=r)}(s||(s={})),function(e){!function(e){e.TypeScriptServicesFactory=s.TypeScriptServicesFactory}(e.Services||(e.Services={}))}(c||(c={}));s.versionMajorMinor})));i(Fr);var Pr="win32"===Oe.platform,wr=Oe.env.NODE_DEBUG&&/fs/.test(Oe.env.NODE_DEBUG);function Ir(e){return"function"==typeof e?e:function(){var e;if(wr){var t=new Error;e=function(e){e&&(t.message=e.message,r(e=t))}}else e=r;return e;function r(e){if(e){if(Oe.throwDeprecation)throw e;if(!Oe.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);Oe.traceDeprecation?console.trace(t):console.error(t)}}}}()}yr.normalize;if(Pr)var Or=/(.*?)(?:[\/\\]+|$)/g;else Or=/(.*?)(?:[\/]+|$)/g;if(Pr)var Mr=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else Mr=/^[\/]*/;var Lr={realpathSync:function(e,t){if(e=yr.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var r,n,i,a,o=e,s={},c={};function u(){var t=Mr.exec(e);r=t[0].length,n=t[0],i=t[0],a="",Pr&&!c[i]&&(hr.lstatSync(i),c[i]=!0)}for(u();r<e.length;){Or.lastIndex=r;var l=Or.exec(e);if(a=n,n+=l[0],i=a+l[1],r=Or.lastIndex,!(c[i]||t&&t[i]===i)){var _;if(t&&Object.prototype.hasOwnProperty.call(t,i))_=t[i];else{var d=hr.lstatSync(i);if(!d.isSymbolicLink()){c[i]=!0,t&&(t[i]=i);continue}var p=null;if(!Pr){var f=d.dev.toString(32)+":"+d.ino.toString(32);s.hasOwnProperty(f)&&(p=s[f])}null===p&&(hr.statSync(i),p=hr.readlinkSync(i)),_=yr.resolve(a,p),t&&(t[i]=_),Pr||(s[f]=p)}e=yr.resolve(_,e.slice(r)),u()}}return t&&(t[o]=e),e},realpath:function(e,t,r){if("function"!=typeof r&&(r=Ir(t),t=null),e=yr.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return xe(r.bind(null,null,t[e]));var n,i,a,o,s=e,c={},u={};function l(){var t=Mr.exec(e);n=t[0].length,i=t[0],a=t[0],o="",Pr&&!u[a]?hr.lstat(a,(function(e){if(e)return r(e);u[a]=!0,_()})):xe(_)}function _(){if(n>=e.length)return t&&(t[s]=e),r(null,e);Or.lastIndex=n;var c=Or.exec(e);return o=i,i+=c[0],a=o+c[1],n=Or.lastIndex,u[a]||t&&t[a]===a?xe(_):t&&Object.prototype.hasOwnProperty.call(t,a)?f(t[a]):hr.lstat(a,d)}function d(e,n){if(e)return r(e);if(!n.isSymbolicLink())return u[a]=!0,t&&(t[a]=a),xe(_);if(!Pr){var i=n.dev.toString(32)+":"+n.ino.toString(32);if(c.hasOwnProperty(i))return p(null,c[i],a)}hr.stat(a,(function(e){if(e)return r(e);hr.readlink(a,(function(e,t){Pr||(c[i]=t),p(e,t)}))}))}function p(e,n,i){if(e)return r(e);var a=yr.resolve(o,n);t&&(t[i]=a),f(a)}function f(t){e=yr.resolve(t,e.slice(n)),l()}l()}},Rr=Ur;Ur.realpath=Ur,Ur.sync=Vr,Ur.realpathSync=Vr,Ur.monkeypatch=function(){hr.realpath=Ur,hr.realpathSync=Vr},Ur.unmonkeypatch=function(){hr.realpath=Br,hr.realpathSync=jr};var Br=hr.realpath,jr=hr.realpathSync,Kr=Oe.version,Jr=/^v[0-5]\./.test(Kr);function zr(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function Ur(e,t,r){if(Jr)return Br(e,t,r);"function"==typeof t&&(r=t,t=null),Br(e,t,(function(n,i){zr(n)?Lr.realpath(e,t,r):r(n,i)}))}function Vr(e,t){if(Jr)return jr(e,t);try{return jr(e,t)}catch(r){if(zr(r))return Lr.realpathSync(e,t);throw r}}var qr=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);Wr(i)?r.push.apply(r,i):r.push(i)}return r},Wr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Gr=Hr;function Hr(e,t,r){e instanceof RegExp&&(e=Yr(e,r)),t instanceof RegExp&&(t=Yr(t,r));var n=Xr(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function Yr(e,t){var r=t.match(e);return r?r[0]:null}function Xr(e,t,r){var n,i,a,o,s,c=r.indexOf(e),u=r.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(n=[],a=r.length;l>=0&&!s;)l==c?(n.push(l),c=r.indexOf(e,l+1)):1==n.length?s=[n.pop(),u]:((i=n.pop())<a&&(a=i,o=u),u=r.indexOf(t,l+1)),l=c<u&&c>=0?c:u;n.length&&(s=[a,o])}return s}Hr.range=Xr;var Qr=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var n=[];var i=Gr("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body);var s=a||o;var c=i.body.indexOf(",")>=0;if(!s&&!c)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+en+i.post,e(t)):[t];var u;if(s)u=i.body.split(/\.\./);else{if(1===(u=function e(t){if(!t)return[""];var r=[];var n=Gr("{","}",t);if(!n)return t.split(",");var i=n.pre;var a=n.body;var o=n.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var c=e(o);o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c));r.push.apply(r,s);return r}(i.body)).length)if(1===(u=e(u[0],!1).map(on)).length)return(_=i.post.length?e(i.post,!1):[""]).map((function(e){return i.pre+u[0]+e}))}var l=i.pre;var _=i.post.length?e(i.post,!1):[""];var d;if(s){var p=nn(u[0]),f=nn(u[1]),m=Math.max(u[0].length,u[1].length),g=3==u.length?Math.abs(nn(u[2])):1,y=cn;f<p&&(g*=-1,y=un);var h=u.some(sn);d=[];for(var v=p;y(v,f);v+=g){var b;if(o)"\\"===(b=String.fromCharCode(v))&&(b="");else if(b=String(v),h){var x=m-b.length;if(x>0){var D=new Array(x+1).join("0");b=v<0?"-"+D+b.slice(1):D+b}}d.push(b)}}else d=qr(u,(function(t){return e(t,!1)}));for(var S=0;S<d.length;S++)for(var T=0;T<_.length;T++){var E=l+d[S]+_[T];(!r||s||E)&&n.push(E)}return n}(function(e){return e.split("\\\\").join($r).split("\\{").join(Zr).split("\\}").join(en).split("\\,").join(tn).split("\\.").join(rn)}(e),!0).map(an)},$r="\0SLASH"+Math.random()+"\0",Zr="\0OPEN"+Math.random()+"\0",en="\0CLOSE"+Math.random()+"\0",tn="\0COMMA"+Math.random()+"\0",rn="\0PERIOD"+Math.random()+"\0";function nn(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function an(e){return e.split($r).join("\\").split(Zr).join("{").split(en).join("}").split(tn).join(",").split(rn).join(".")}function on(e){return"{"+e+"}"}function sn(e){return/^-?0\d/.test(e)}function cn(e,t){return e<=t}function un(e,t){return e>=t}var ln=xn;xn.Minimatch=Dn;var _n={sep:"/"};try{_n=yr}catch(e){}var dn=xn.GLOBSTAR=Dn.GLOBSTAR={},pn={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},fn="[^/]",mn=fn+"*?",gn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",yn="(?:(?!(?:\\/|^)\\.).)*?",hn=function(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}("().*{}+?[]^$\\!");var vn=/\/+/;function bn(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function xn(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new Dn(t,r).match(e))}function Dn(e,t){if(!(this instanceof Dn))return new Dn(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==_n.sep&&(e=e.split(_n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function Sn(e,t){if(t||(t=this instanceof Dn?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:Qr(e)}xn.filter=function(e,t){return t=t||{},function(r,n,i){return xn(r,e,t)}},xn.defaults=function(e){if(!e||!Object.keys(e).length)return xn;var t=xn,r=function(r,n,i){return t.minimatch(r,n,bn(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,bn(e,n))},r},Dn.defaults=function(e){return e&&Object.keys(e).length?xn.defaults(e).Minimatch:Dn},Dn.prototype.debug=function(){},Dn.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(vn)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},Dn.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,a=e.length;i<a&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n));this.negate=t},xn.braceExpand=function(e,t){return Sn(e,t)},Dn.prototype.braceExpand=Sn,Dn.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return dn;if(""===e)return"";var n,i="",a=!!r.nocase,o=!1,s=[],c=[],u=!1,l=-1,_=-1,d="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function f(){if(n){switch(n){case"*":i+=mn,a=!0;break;case"?":i+=fn,a=!0;break;default:i+="\\"+n}p.debug("clearStateChar %j %j",n,i),n=!1}}for(var m,g=0,y=e.length;g<y&&(m=e.charAt(g));g++)if(this.debug("%s\t%s %s %j",e,g,i,m),o&&hn[m])i+="\\"+m,o=!1;else switch(m){case"/":return!1;case"\\":f(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,g,i,m),u){this.debug(" in class"),"!"===m&&g===_+1&&(m="^"),i+=m;continue}p.debug("call clearStateChar %j",n),f(),n=m,r.noext&&f();continue;case"(":if(u){i+="(";continue}if(!n){i+="\\(";continue}s.push({type:n,start:g-1,reStart:i.length,open:pn[n].open,close:pn[n].close}),i+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,i),n=!1;continue;case")":if(u||!s.length){i+="\\)";continue}f(),a=!0;var h=s.pop();i+=h.close,"!"===h.type&&c.push(h),h.reEnd=i.length;continue;case"|":if(u||!s.length||o){i+="\\|",o=!1;continue}f(),i+="|";continue;case"[":if(f(),u){i+="\\"+m;continue}u=!0,_=g,l=i.length,i+=m;continue;case"]":if(g===_+1||!u){i+="\\"+m,o=!1;continue}if(u){var v=e.substring(_+1,g);try{RegExp("["+v+"]")}catch(e){var b=this.parse(v,Tn);i=i.substr(0,l)+"\\["+b[0]+"\\]",a=a||b[1],u=!1;continue}}a=!0,u=!1,i+=m;continue;default:f(),o?o=!1:!hn[m]||"^"===m&&u||(i+="\\"),i+=m}u&&(v=e.substr(_+1),b=this.parse(v,Tn),i=i.substr(0,l)+"\\["+b[0],a=a||b[1]);for(h=s.pop();h;h=s.pop()){var x=i.slice(h.reStart+h.open.length);this.debug("setting tail",i,h),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,r){return r||(r="\\"),t+t+r+"|"})),this.debug("tail=%j\n %s",x,x,h,i);var D="*"===h.type?mn:"?"===h.type?fn:"\\"+h.type;a=!0,i=i.slice(0,h.reStart)+D+"\\("+x}f(),o&&(i+="\\\\");var S=!1;switch(i.charAt(0)){case".":case"[":case"(":S=!0}for(var T=c.length-1;T>-1;T--){var E=c[T],C=i.slice(0,E.reStart),k=i.slice(E.reStart,E.reEnd-8),N=i.slice(E.reEnd-8,E.reEnd),A=i.slice(E.reEnd);N+=A;var F=C.split("(").length-1,P=A;for(g=0;g<F;g++)P=P.replace(/\)[+*?]?/,"");var w="";""===(A=P)&&t!==Tn&&(w="$"),i=C+k+A+w+N}""!==i&&a&&(i="(?=.)"+i);S&&(i=d+i);if(t===Tn)return[i,a];if(!a)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var I=r.nocase?"i":"";try{var O=new RegExp("^"+i+"$",I)}catch(e){return new RegExp("$.")}return O._glob=e,O._src=i,O};var Tn={};xn.makeRe=function(e,t){return new Dn(e,t||{}).makeRe()},Dn.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?mn:t.dot?gn:yn,n=t.nocase?"i":"",i=e.map((function(e){return e.map((function(e){return e===dn?r:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp},xn.match=function(e,t,r){var n=new Dn(t,r=r||{});return e=e.filter((function(e){return n.match(e)})),n.options.nonull&&!e.length&&e.push(t),e},Dn.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==_n.sep&&(e=e.split(_n.sep).join("/"));e=e.split(vn),this.debug(this.pattern,"split",e);var n,i,a=this.set;for(this.debug(this.pattern,"set",a),i=e.length-1;i>=0&&!(n=e[i]);i--);for(i=0;i<a.length;i++){var o=a[i],s=e;if(r.matchBase&&1===o.length&&(s=[n]),this.matchOne(s,o,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},Dn.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,a=0,o=e.length,s=t.length;i<o&&a<s;i++,a++){this.debug("matchOne loop");var c,u=t[a],l=e[i];if(this.debug(t,u,l),!1===u)return!1;if(u===dn){this.debug("GLOBSTAR",[t,u,l]);var _=i,d=a+1;if(d===s){for(this.debug("** at the end");i<o;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;_<o;){var p=e[_];if(this.debug("\nglobstar while",e,_,t,d,p),this.matchOne(e.slice(_),t.slice(d),r))return this.debug("globstar found match!",_,o,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,_,t,d);break}this.debug("globstar swallow a segment, and continue"),_++}return!(!r||(this.debug("\n>>> no match, partial?",e,_,t,d),_!==o))}if("string"==typeof u?(c=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,c)):(c=l.match(u),this.debug("pattern match",u,l,c)),!c)return!1}if(i===o&&a===s)return!0;if(i===o)return r;if(a===s)return i===o-1&&""===e[i];throw new Error("wtf?")};var En=Object.freeze({__proto__:null,default:{}}),Cn=a((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),kn=o(En),Nn=a((function(e){try{var t=kn;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=Cn}})),An=Object.freeze({__proto__:null,EventEmitter:function e(){m(this,e)}});function Fn(){}Fn.ok=function(){},Fn.strictEqual=function(){};var Pn=Object.freeze({__proto__:null,default:Fn});function wn(e){return"/"===e.charAt(0)}function In(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}var On="win32"===Oe.platform?In:wn,Mn=wn,Ln=In;On.posix=Mn,On.win32=Ln;var Rn=Yn,Bn=Hn,jn=function(e,t,r){r||(r={});if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0);e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(Xn))}(e,r),e.changedCwd=!1;var n=Oe.cwd();Wn(r,"cwd")?(e.cwd=yr.resolve(r.cwd),e.changedCwd=e.cwd!==n):e.cwd=n;e.root=r.root||yr.resolve(e.cwd,"/"),e.root=yr.resolve(e.root),"win32"===Oe.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=On(e.cwd)?e.cwd:Qn(e,e.cwd),"win32"===Oe.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new Gn(t,r),e.options=e.minimatch.options},Kn=Wn,Jn=Qn,zn=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n<i;n++){var a=e.matches[n];if(a&&0!==Object.keys(a).length){var o=Object.keys(a);t?r.push.apply(r,o):o.forEach((function(e){r[e]=!0}))}else if(e.nonull){var s=e.minimatch.globSet[n];t?r.push(s):r[s]=!0}}t||(r=Object.keys(r));e.nosort||(r=r.sort(e.nocase?Hn:Yn));if(e.mark){for(n=0;n<r.length;n++)r[n]=e._mark(r[n]);e.nodir&&(r=r.filter((function(t){var r=!/\/$/.test(t),n=e.cache[t]||e.cache[Qn(e,t)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}e.ignore.length&&(r=r.filter((function(t){return!$n(e,t)})));e.found=r},Un=function(e,t){var r=Qn(e,t),n=e.cache[r],i=t;if(n){var a="DIR"===n||Array.isArray(n),o="/"===t.slice(-1);if(a&&!o?i+="/":!a&&o&&(i=i.slice(0,-1)),i!==t){var s=Qn(e,i);e.statCache[s]=e.statCache[r],e.cache[s]=e.cache[r]}}return i},Vn=$n,qn=function(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return!(!e.gmatcher||!e.gmatcher.match(t))}))};function Wn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Gn=ln.Minimatch;function Hn(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}function Yn(e,t){return e.localeCompare(t)}function Xn(e){var t=null;if("/**"===e.slice(-3)){var r=e.replace(/(\/\*\*)+$/,"");t=new Gn(r,{dot:!0})}return{matcher:new Gn(e,{dot:!0}),gmatcher:t}}function Qn(e,t){var r=t;return r="/"===t.charAt(0)?yr.join(e.root,t):On(t)||""===t?t:e.changedCwd?yr.resolve(e.cwd,t):yr.resolve(t),"win32"===Oe.platform&&(r=r.replace(/\\/g,"/")),r}function $n(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return e.matcher.match(t)||!(!e.gmatcher||!e.gmatcher.match(t))}))}var Zn={alphasort:Rn,alphasorti:Bn,setopts:jn,ownProp:Kn,makeAbs:Jn,finish:zn,mark:Un,isIgnored:Vn,childrenIgnored:qn},ei=o(Pn),ti=oi;oi.GlobSync=si;var ri=Zn.setopts,ni=Zn.ownProp,ii=Zn.childrenIgnored,ai=Zn.isIgnored;function oi(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new si(e,t).found}function si(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof si))return new si(e,t);if(ri(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}si.prototype._finish=function(){if(ei(this instanceof si),this.realpath){var e=this;this.matches.forEach((function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t)try{i=e._makeAbs(i),n[Rr.realpathSync(i,e.realpathCache)]=!0}catch(t){if("stat"!==t.syscall)throw t;n[e._makeAbs(i)]=!0}}))}Zn.finish(this)},si.prototype._process=function(e,t,r){ei(this instanceof si);for(var n,i=0;"string"==typeof e[i];)i++;switch(i){case e.length:return void this._processSimple(e.join("/"),t);case 0:n=null;break;default:n=e.slice(0,i).join("/")}var a,o=e.slice(i);null===n?a=".":On(n)||On(e.join("/"))?(n&&On(n)||(n="/"+n),a=n):a=n;var s=this._makeAbs(a);ii(this,a)||(o[0]===ln.GLOBSTAR?this._processGlobStar(n,a,s,o,t,r):this._processReaddir(n,a,s,o,t,r))},si.prototype._processReaddir=function(e,t,r,n,i,a){var o=this._readdir(r,a);if(o){for(var s=n[0],c=!!this.minimatch.negate,u=s._glob,l=this.dot||"."===u.charAt(0),_=[],d=0;d<o.length;d++){if("."!==(m=o[d]).charAt(0)||l)(c&&!e?!m.match(s):m.match(s))&&_.push(m)}var p=_.length;if(0!==p)if(1!==n.length||this.mark||this.stat){n.shift();for(d=0;d<p;d++){var f;m=_[d];f=e?[e,m]:[m],this._process(f.concat(n),i,a)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<p;d++){var m=_[d];e&&(m="/"!==e.slice(-1)?e+"/"+m:e+m),"/"!==m.charAt(0)||this.nomount||(m=yr.join(this.root,m)),this._emitMatch(i,m)}}}},si.prototype._emitMatch=function(e,t){if(!ai(this,t)){var r=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},si.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,r;try{r=hr.lstatSync(e)}catch(e){if("ENOENT"===e.code)return null}var n=r&&r.isSymbolicLink();return this.symlinks[e]=n,n||!r||r.isDirectory()?t=this._readdir(e,!1):this.cache[e]="FILE",t},si.prototype._readdir=function(e,t){if(t&&!ni(this.symlinks,e))return this._readdirInGlobStar(e);if(ni(this.cache,e)){var r=this.cache[e];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(e,hr.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},si.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var n=t[r];n="/"===e?e+n:e+"/"+n,this.cache[n]=!0}return this.cache[e]=t,t},si.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=t.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t)}},si.prototype._processGlobStar=function(e,t,r,n,i,a){var o=this._readdir(r,a);if(o){var s=n.slice(1),c=e?[e]:[],u=c.concat(s);this._process(u,i,!1);var l=o.length;if(!this.symlinks[r]||!a)for(var _=0;_<l;_++){if("."!==o[_].charAt(0)||this.dot){var d=c.concat(o[_],s);this._process(d,i,!0);var p=c.concat(o[_],n);this._process(p,i,!0)}}}},si.prototype._processSimple=function(e,t){var r=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),r){if(e&&On(e)&&!this.nomount){var n=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=yr.join(this.root,e):(e=yr.resolve(this.root,e),n&&(e+="/"))}"win32"===Oe.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}},si.prototype._stat=function(e){var t=this._makeAbs(e),r="/"===e.slice(-1);if(e.length>this.maxLength)return!1;if(!this.stat&&ni(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[t];if(!i){var a;try{a=hr.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(a&&a.isSymbolicLink())try{i=hr.statSync(t)}catch(e){i=a}else i=a}this.statCache[t]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},si.prototype._mark=function(e){return Zn.mark(this,e)},si.prototype._makeAbs=function(e){return Zn.makeAbs(this,e)};var ci=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach((function(e){n[e]=t[e]}));return n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}};var ui=ci(_i),li=ci(di);function _i(e){var t=function t(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function di(e){var t=function t(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}_i.proto=_i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return _i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return di(this)},configurable:!0})})),ui.strict=li;var pi=Object.create(null),fi=ci((function(e,t){return pi[e]?(pi[e].push(t),null):(pi[e]=[t],function(e){return ui((function t(){var r=pi[e],n=r.length,i=mi(arguments);try{for(var a=0;a<n;a++)r[a].apply(null,i)}finally{r.length>n?(r.splice(0,n),xe((function(){t.apply(null,i)}))):delete pi[e]}}))}(e))}));function mi(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n]=e[n];return r}var gi=Di,yi=An.EventEmitter,hi=Zn.setopts,vi=Zn.ownProp,bi=Zn.childrenIgnored,xi=Zn.isIgnored;function Di(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return ti(e,t)}return new Ti(e,t,r)}Di.sync=ti;var Si=Di.GlobSync=ti.GlobSync;function Ti(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new Si(e,t)}if(!(this instanceof Ti))return new Ti(e,t,r);hi(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=ui(r),this.on("error",r),this.on("end",(function(e){r(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return s();for(var a=!0,o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--i._processing,i._processing<=0&&(a?xe((function(){i._finish()})):i._finish())}a=!1}Di.glob=Di,Di.hasMagic=function(e,t){var r=function(e,t){if(null===t||"object"!==f(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}({},t);r.noprocess=!0;var n=new Ti(e,r).minimatch.set;if(!e)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},Di.Glob=Ti,Nn(Ti,yi),Ti.prototype._finish=function(){if(ei(this instanceof Ti),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Zn.finish(this),this.emit("end",this.found)}},Ti.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var e=this.matches.length;if(0===e)return this._finish();for(var t=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--e&&t._finish()}},Ti.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r),i=this,a=n.length;if(0===a)return t();var o=this.matches[e]=Object.create(null);n.forEach((function(r,n){r=i._makeAbs(r),Rr.realpath(r,i.realpathCache,(function(n,s){n?"stat"===n.syscall?o[r]=!0:i.emit("error",n):o[s]=!0,0==--a&&(i.matches[e]=o,t())}))}))},Ti.prototype._mark=function(e){return Zn.mark(this,e)},Ti.prototype._makeAbs=function(e){return Zn.makeAbs(this,e)},Ti.prototype.abort=function(){this.aborted=!0,this.emit("abort")},Ti.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},Ti.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(t=0;t<n.length;t++){var i=n[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},Ti.prototype._process=function(e,t,r,n){if(ei(this instanceof Ti),ei("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([e,t,r,n]);else{for(var i,a=0;"string"==typeof e[a];)a++;switch(a){case e.length:return void this._processSimple(e.join("/"),t,n);case 0:i=null;break;default:i=e.slice(0,a).join("/")}var o,s=e.slice(a);null===i?o=".":On(i)||On(e.join("/"))?(i&&On(i)||(i="/"+i),o=i):o=i;var c=this._makeAbs(o);if(bi(this,o))return n();s[0]===ln.GLOBSTAR?this._processGlobStar(i,o,c,s,t,r,n):this._processReaddir(i,o,c,s,t,r,n)}},Ti.prototype._processReaddir=function(e,t,r,n,i,a,o){var s=this;this._readdir(r,a,(function(c,u){return s._processReaddir2(e,t,r,n,i,a,u,o)}))},Ti.prototype._processReaddir2=function(e,t,r,n,i,a,o,s){if(!o)return s();for(var c=n[0],u=!!this.minimatch.negate,l=c._glob,_=this.dot||"."===l.charAt(0),d=[],p=0;p<o.length;p++){if("."!==(m=o[p]).charAt(0)||_)(u&&!e?!m.match(c):m.match(c))&&d.push(m)}var f=d.length;if(0===f)return s();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(p=0;p<f;p++){var m=d[p];e&&(m="/"!==e?e+"/"+m:e+m),"/"!==m.charAt(0)||this.nomount||(m=yr.join(this.root,m)),this._emitMatch(i,m)}return s()}n.shift();for(p=0;p<f;p++){m=d[p];e&&(m="/"!==e?e+"/"+m:e+m),this._process([m].concat(n),i,a,s)}s()},Ti.prototype._emitMatch=function(e,t){if(!this.aborted&&!xi(this,t))if(this.paused)this._emitQueue.push([e,t]);else{var r=On(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[e][t]=!0;var i=this.statCache[r];i&&this.emit("stat",t,i),this.emit("match",t)}}},Ti.prototype._readdirInGlobStar=function(e,t){if(!this.aborted){if(this.follow)return this._readdir(e,!1,t);var r=this,n=fi("lstat\0"+e,(function(n,i){if(n&&"ENOENT"===n.code)return t();var a=i&&i.isSymbolicLink();r.symlinks[e]=a,a||!i||i.isDirectory()?r._readdir(e,!1,t):(r.cache[e]="FILE",t())}));n&&hr.lstat(e,n)}},Ti.prototype._readdir=function(e,t,r){if(!this.aborted&&(r=fi("readdir\0"+e+"\0"+t,r))){if(t&&!vi(this.symlinks,e))return this._readdirInGlobStar(e,r);if(vi(this.cache,e)){var n=this.cache[e];if(!n||"FILE"===n)return r();if(Array.isArray(n))return r(null,n)}hr.readdir(e,function(e,t,r){return function(n,i){n?e._readdirError(t,n,r):e._readdirEntries(t,i,r)}}(this,e,r))}},Ti.prototype._readdirEntries=function(e,t,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var i=t[n];i="/"===e?e+i:e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,r(null,t)}},Ti.prototype._readdirError=function(e,t,r){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t)}return r()}},Ti.prototype._processGlobStar=function(e,t,r,n,i,a,o){var s=this;this._readdir(r,a,(function(c,u){s._processGlobStar2(e,t,r,n,i,a,u,o)}))},Ti.prototype._processGlobStar2=function(e,t,r,n,i,a,o,s){if(!o)return s();var c=n.slice(1),u=e?[e]:[],l=u.concat(c);this._process(l,i,!1,s);var _=this.symlinks[r],d=o.length;if(_&&a)return s();for(var p=0;p<d;p++){if("."!==o[p].charAt(0)||this.dot){var f=u.concat(o[p],c);this._process(f,i,!0,s);var m=u.concat(o[p],n);this._process(m,i,!0,s)}}s()},Ti.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,(function(i,a){n._processSimple2(e,t,i,a,r)}))},Ti.prototype._processSimple2=function(e,t,r,n,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!n)return i();if(e&&On(e)&&!this.nomount){var a=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=yr.join(this.root,e):(e=yr.resolve(this.root,e),a&&(e+="/"))}"win32"===Oe.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()},Ti.prototype._stat=function(e,t){var r=this._makeAbs(e),n="/"===e.slice(-1);if(e.length>this.maxLength)return t();if(!this.stat&&vi(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return t(null,i);if(n&&"FILE"===i)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?t():t(null,o,a)}var s=this,c=fi("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return hr.stat(r,(function(n,a){n?s._stat2(e,r,null,i,t):s._stat2(e,r,n,a,t)}));s._stat2(e,r,n,i,t)}));c&&hr.lstat(r,c)},Ti.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var a="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,a&&"FILE"===o?i():i(null,o,n)};
+/*!
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
+ *
+ * Copyright (c) 2014-2016, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+var Ei={"{":"}","(":")","[":"]"},Ci=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,ki=/\\(.)|(^!|[*?{}()[\]]|\(\?)/,Ni=function(e,t){if("string"!=typeof e||""===e)return!1;if(function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}(e))return!0;var r,n=Ci;for(t&&!1===t.strict&&(n=ki);r=n.exec(e);){if(r[2])return!0;var i=r.index+r[0].length,a=r[1],o=a?Ei[a]:null;if(a&&o){var s=e.indexOf(o,i);-1!==s&&(i=s+1)}e=e.slice(i)}return!1},Ai=1/0,Fi="[object Symbol]",Pi=/&(?:amp|lt|gt|quot|#39|#96);/g,wi=RegExp(Pi.source),Ii="object"==f(n)&&n&&n.Object===Object&&n,Oi="object"==("undefined"==typeof self?"undefined":f(self))&&self&&self.Object===Object&&self,Mi=Ii||Oi||Function("return this")();
+/*!
+ * is-glob <https://github.com/jonschlinkert/is-glob>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */var Li,Ri=(Li={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},function(e){return null==Li?void 0:Li[e]}),Bi=Object.prototype.toString,ji=Mi.Symbol,Ki=ji?ji.prototype:void 0,Ji=Ki?Ki.toString:void 0;function zi(e){if("string"==typeof e)return e;if(function(e){return"symbol"==f(e)||function(e){return!!e&&"object"==f(e)}(e)&&Bi.call(e)==Fi}(e))return Ji?Ji.call(e):"";var t=e+"";return"0"==t&&1/e==-Ai?"-0":t}var Ui=function(e){var t;return(e=null==(t=e)?"":zi(t))&&wi.test(e)?e.replace(Pi,Ri):e},Vi=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}));i(Vi);var qi=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BigIntLiteral="BigIntLiteral",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ClassProperty="ClassProperty",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.DebuggerStatement="DebuggerStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.ForStatement="ForStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.Import="Import",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXFragment="JSXFragment",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXSpreadChild="JSXSpreadChild",e.JSXText="JSXText",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.OptionalCallExpression="OptionalCallExpression",e.OptionalMemberExpression="OptionalMemberExpression",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression",e.TSAbstractClassProperty="TSAbstractClassProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAnyKeyword="TSAnyKeyword",e.TSArrayType="TSArrayType",e.TSAsExpression="TSAsExpression",e.TSAsyncKeyword="TSAsyncKeyword",e.TSBooleanKeyword="TSBooleanKeyword",e.TSBigIntKeyword="TSBigIntKeyword",e.TSConditionalType="TSConditionalType",e.TSConstructorType="TSConstructorType",e.TSCallSignatureDeclaration="TSCallSignatureDeclaration",e.TSClassImplements="TSClassImplements",e.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",e.TSDeclareKeyword="TSDeclareKeyword",e.TSDeclareFunction="TSDeclareFunction",e.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",e.TSEnumDeclaration="TSEnumDeclaration",e.TSEnumMember="TSEnumMember",e.TSExportAssignment="TSExportAssignment",e.TSExportKeyword="TSExportKeyword",e.TSExternalModuleReference="TSExternalModuleReference",e.TSImportType="TSImportType",e.TSInferType="TSInferType",e.TSLiteralType="TSLiteralType",e.TSIndexedAccessType="TSIndexedAccessType",e.TSIndexSignature="TSIndexSignature",e.TSInterfaceBody="TSInterfaceBody",e.TSInterfaceDeclaration="TSInterfaceDeclaration",e.TSInterfaceHeritage="TSInterfaceHeritage",e.TSImportEqualsDeclaration="TSImportEqualsDeclaration",e.TSFunctionType="TSFunctionType",e.TSMethodSignature="TSMethodSignature",e.TSModuleBlock="TSModuleBlock",e.TSModuleDeclaration="TSModuleDeclaration",e.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",e.TSNonNullExpression="TSNonNullExpression",e.TSNeverKeyword="TSNeverKeyword",e.TSNullKeyword="TSNullKeyword",e.TSNumberKeyword="TSNumberKeyword",e.TSMappedType="TSMappedType",e.TSObjectKeyword="TSObjectKeyword",e.TSParameterProperty="TSParameterProperty",e.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSStaticKeyword="TSStaticKeyword",e.TSStringKeyword="TSStringKeyword",e.TSSymbolKeyword="TSSymbolKeyword",e.TSThisType="TSThisType",e.TSTypeAnnotation="TSTypeAnnotation",e.TSTypeAliasDeclaration="TSTypeAliasDeclaration",e.TSTypeAssertion="TSTypeAssertion",e.TSTypeLiteral="TSTypeLiteral",e.TSTypeOperator="TSTypeOperator",e.TSTypeParameter="TSTypeParameter",e.TSTypeParameterDeclaration="TSTypeParameterDeclaration",e.TSTypeParameterInstantiation="TSTypeParameterInstantiation",e.TSTypePredicate="TSTypePredicate",e.TSTypeReference="TSTypeReference",e.TSTypeQuery="TSTypeQuery",e.TSIntersectionType="TSIntersectionType",e.TSTupleType="TSTupleType",e.TSOptionalType="TSOptionalType",e.TSParenthesizedType="TSParenthesizedType",e.TSUnionType="TSUnionType",e.TSUndefinedKeyword="TSUndefinedKeyword",e.TSUnknownKeyword="TSUnknownKeyword",e.TSVoidKeyword="TSVoidKeyword"}(t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})),function(e){e.Boolean="Boolean",e.Identifier="Identifier",e.JSXIdentifier="JSXIdentifier",e.JSXText="JSXText",e.Keyword="Keyword",e.Null="Null",e.Numeric="Numeric",e.Punctuator="Punctuator",e.RegularExpression="RegularExpression",e.String="String",e.Template="Template",e.Block="Block",e.Line="Line"}(t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={}))}));i(qi);qi.AST_NODE_TYPES,qi.AST_TOKEN_TYPES;var Wi=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Vi);t.TSESTree=i,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(qi)}));i(Wi);Wi.TSESTree;var Gi=a((function(e,t){var r,i=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=i(Ui),s=a(Fr),c=s.SyntaxKind,u=[c.EqualsToken,c.PlusEqualsToken,c.MinusEqualsToken,c.AsteriskEqualsToken,c.AsteriskAsteriskEqualsToken,c.SlashEqualsToken,c.PercentEqualsToken,c.LessThanLessThanEqualsToken,c.GreaterThanGreaterThanEqualsToken,c.GreaterThanGreaterThanGreaterThanEqualsToken,c.AmpersandEqualsToken,c.BarEqualsToken,c.CaretEqualsToken],l=[c.BarBarToken,c.AmpersandAmpersandToken,c.QuestionQuestionToken],_=(h(r={},c.OpenBraceToken,"{"),h(r,c.CloseBraceToken,"}"),h(r,c.OpenParenToken,"("),h(r,c.CloseParenToken,")"),h(r,c.OpenBracketToken,"["),h(r,c.CloseBracketToken,"]"),h(r,c.DotToken,"."),h(r,c.DotDotDotToken,"..."),h(r,c.SemicolonToken,","),h(r,c.CommaToken,","),h(r,c.LessThanToken,"<"),h(r,c.GreaterThanToken,">"),h(r,c.LessThanEqualsToken,"<="),h(r,c.GreaterThanEqualsToken,">="),h(r,c.EqualsEqualsToken,"=="),h(r,c.ExclamationEqualsToken,"!="),h(r,c.EqualsEqualsEqualsToken,"==="),h(r,c.InstanceOfKeyword,"instanceof"),h(r,c.ExclamationEqualsEqualsToken,"!=="),h(r,c.EqualsGreaterThanToken,"=>"),h(r,c.PlusToken,"+"),h(r,c.MinusToken,"-"),h(r,c.AsteriskToken,"*"),h(r,c.AsteriskAsteriskToken,"**"),h(r,c.SlashToken,"/"),h(r,c.PercentToken,"%"),h(r,c.PlusPlusToken,"++"),h(r,c.MinusMinusToken,"--"),h(r,c.LessThanLessThanToken,"<<"),h(r,c.LessThanSlashToken,"</"),h(r,c.GreaterThanGreaterThanToken,">>"),h(r,c.GreaterThanGreaterThanGreaterThanToken,">>>"),h(r,c.AmpersandToken,"&"),h(r,c.BarToken,"|"),h(r,c.CaretToken,"^"),h(r,c.ExclamationToken,"!"),h(r,c.TildeToken,"~"),h(r,c.AmpersandAmpersandToken,"&&"),h(r,c.BarBarToken,"||"),h(r,c.QuestionToken,"?"),h(r,c.ColonToken,":"),h(r,c.EqualsToken,"="),h(r,c.PlusEqualsToken,"+="),h(r,c.MinusEqualsToken,"-="),h(r,c.AsteriskEqualsToken,"*="),h(r,c.AsteriskAsteriskEqualsToken,"**="),h(r,c.SlashEqualsToken,"/="),h(r,c.PercentEqualsToken,"%="),h(r,c.LessThanLessThanEqualsToken,"<<="),h(r,c.GreaterThanGreaterThanEqualsToken,">>="),h(r,c.GreaterThanGreaterThanGreaterThanEqualsToken,">>>="),h(r,c.AmpersandEqualsToken,"&="),h(r,c.BarEqualsToken,"|="),h(r,c.CaretEqualsToken,"^="),h(r,c.AtToken,"@"),h(r,c.InKeyword,"in"),h(r,c.UniqueKeyword,"unique"),h(r,c.KeyOfKeyword,"keyof"),h(r,c.NewKeyword,"new"),h(r,c.ImportKeyword,"import"),h(r,c.ReadonlyKeyword,"readonly"),h(r,c.QuestionQuestionToken,"??"),h(r,c.QuestionDotToken,"?."),r);function d(e){return-1!==u.indexOf(e.kind)}function p(e){return-1!==l.indexOf(e.kind)}function f(e){return e.kind===c.SingleLineCommentTrivia||e.kind===c.MultiLineCommentTrivia}function m(e){return e.kind===c.JSDocComment}function g(e,t){var r=t.getLineAndCharacterOfPosition(e);return{line:r.line+1,column:r.character}}function y(e,t,r){return{start:g(e,r),end:g(t,r)}}function v(e){return e.kind>=c.FirstToken&&e.kind<=c.LastToken}function b(e){return e.kind>=c.JsxElement&&e.kind<=c.JsxAttribute}function x(e,t){for(;e;){if(t(e))return e;e=e.parent}}function D(e){return!!x(e,b)}function S(e){if(e.originalKeywordKind)switch(e.originalKeywordKind){case c.NullKeyword:return Wi.AST_TOKEN_TYPES.Null;case c.GetKeyword:case c.SetKeyword:case c.TypeKeyword:case c.ModuleKeyword:case c.AsyncKeyword:case c.IsKeyword:return Wi.AST_TOKEN_TYPES.Identifier;default:return Wi.AST_TOKEN_TYPES.Keyword}if(e.kind>=c.FirstKeyword&&e.kind<=c.LastFutureReservedWord)return e.kind===c.FalseKeyword||e.kind===c.TrueKeyword?Wi.AST_TOKEN_TYPES.Boolean:Wi.AST_TOKEN_TYPES.Keyword;if(e.kind>=c.FirstPunctuation&&e.kind<=c.LastBinaryOperator)return Wi.AST_TOKEN_TYPES.Punctuator;if(e.kind>=c.NoSubstitutionTemplateLiteral&&e.kind<=c.TemplateTail)return Wi.AST_TOKEN_TYPES.Template;switch(e.kind){case c.NumericLiteral:return Wi.AST_TOKEN_TYPES.Numeric;case c.JsxText:return Wi.AST_TOKEN_TYPES.JSXText;case c.StringLiteral:return!e.parent||e.parent.kind!==c.JsxAttribute&&e.parent.kind!==c.JsxElement?Wi.AST_TOKEN_TYPES.String:Wi.AST_TOKEN_TYPES.JSXText;case c.RegularExpressionLiteral:return Wi.AST_TOKEN_TYPES.RegularExpression;case c.Identifier:case c.ConstructorKeyword:case c.GetKeyword:case c.SetKeyword:}if(e.parent&&e.kind===c.Identifier){if(b(e.parent))return Wi.AST_TOKEN_TYPES.JSXIdentifier;if(e.parent.kind===c.PropertyAccessExpression&&D(e))return Wi.AST_TOKEN_TYPES.JSXIdentifier}return Wi.AST_TOKEN_TYPES.Identifier}function T(e,t){var r=e.kind===c.JsxText?e.getFullStart():e.getStart(t),n=e.getEnd(),i=t.text.slice(r,n),a={type:S(e),value:i,range:[r,n],loc:y(r,n,t)};return"RegularExpression"===a.type&&(a.regex={pattern:i.slice(1,i.lastIndexOf("/")),flags:i.slice(i.lastIndexOf("/")+1)}),a}function E(e,t){return e.kind===c.EndOfFileToken?!!e.jsDoc:0!==e.getWidth(t)}function C(e,t){if(void 0!==e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(void 0!==n)return n}}t.isAssignmentOperator=d,t.isLogicalOperator=p,t.getTextForTokenKind=function(e){return _[e]},t.isESTreeClassMember=function(e){return e.kind!==c.SemicolonClassElement},t.hasModifier=function(e,t){return!!t.modifiers&&!!t.modifiers.length&&t.modifiers.some((function(t){return t.kind===e}))},t.getLastModifier=function(e){return!!e.modifiers&&!!e.modifiers.length&&e.modifiers[e.modifiers.length-1]||null},t.isComma=function(e){return e.kind===c.CommaToken},t.isComment=f,t.isJSDocComment=m,t.getBinaryExpressionType=function(e){return d(e)?Wi.AST_NODE_TYPES.AssignmentExpression:p(e)?Wi.AST_NODE_TYPES.LogicalExpression:Wi.AST_NODE_TYPES.BinaryExpression},t.getLineAndCharacterFor=g,t.getLocFor=y,t.canContainDirective=function(e){if(e.kind===s.SyntaxKind.Block)switch(e.parent.kind){case s.SyntaxKind.Constructor:case s.SyntaxKind.GetAccessor:case s.SyntaxKind.SetAccessor:case s.SyntaxKind.ArrowFunction:case s.SyntaxKind.FunctionExpression:case s.SyntaxKind.FunctionDeclaration:case s.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0},t.getRange=function(e,t){return[e.getStart(t),e.getEnd()]},t.isToken=v,t.isJSXToken=b,t.getDeclarationKind=function(e){return e.flags&s.NodeFlags.Let?"let":e.flags&s.NodeFlags.Const?"const":"var"},t.getTSNodeAccessibility=function(e){var t=e.modifiers;if(!t)return null;for(var r=0;r<t.length;r++){switch(t[r].kind){case c.PublicKeyword:return"public";case c.ProtectedKeyword:return"protected";case c.PrivateKeyword:return"private"}}return null},t.findNextToken=function(e,t,r){return function t(n){if(s.isToken(n)&&n.pos===e.end)return n;return C(n.getChildren(r),(function(n){return(n.pos<=e.pos&&n.end>e.end||n.pos===e.end)&&E(n,r)?t(n):void 0}))}(t)},t.findFirstMatchingAncestor=x,t.hasJSXAncestor=D,t.unescapeStringLiteralText=function(e){return o.default(e)},t.isComputedProperty=function(e){return e.kind===c.ComputedPropertyName},t.isOptional=function(e){return!!e.questionToken&&e.questionToken.kind===c.QuestionToken},t.getTokenType=S,t.convertToken=T,t.convertTokens=function(e){var t=[];return function r(n){if(!f(n)&&!m(n))if(v(n)&&n.kind!==c.EndOfFileToken){var i=T(n,e);i&&t.push(i)}else n.getChildren(e).forEach(r)}(e),t},t.createError=function(e,t,r){var n=e.getLineAndCharacterOfPosition(t);return{index:t,lineNumber:n.line+1,column:n.character,message:r}},t.nodeHasTokens=E,t.firstDefined=C}));i(Gi);Gi.isAssignmentOperator,Gi.isLogicalOperator,Gi.getTextForTokenKind,Gi.isESTreeClassMember,Gi.hasModifier,Gi.getLastModifier,Gi.isComma,Gi.isComment,Gi.isJSDocComment,Gi.getBinaryExpressionType,Gi.getLineAndCharacterFor,Gi.getLocFor,Gi.canContainDirective,Gi.getRange,Gi.isToken,Gi.isJSXToken,Gi.getDeclarationKind,Gi.getTSNodeAccessibility,Gi.findNextToken,Gi.findFirstMatchingAncestor,Gi.hasJSXAncestor,Gi.unescapeStringLiteralText,Gi.isComputedProperty,Gi.isOptional,Gi.getTokenType,Gi.convertToken,Gi.convertTokens,Gi.createError,Gi.nodeHasTokens,Gi.firstDefined;var Hi=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr),a=i.SyntaxKind;t.convertError=function(e){return Gi.createError(e.file,e.start,e.message||e.messageText)};var o=function(){function e(t,r){m(this,e),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.inTypeMode=!1,this.ast=t,this.options=Object.assign({},r)}return y(e,[{key:"getASTMaps",value:function(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}},{key:"convertProgram",value:function(){return this.converter(this.ast)}},{key:"converter",value:function(e,t,r,n){if(!e)return null;var i=this.inTypeMode,a=this.allowPattern;void 0!==r&&(this.inTypeMode=r),void 0!==n&&(this.allowPattern=n);var o=this.convertNode(e,t||e.parent);return this.registerTSNodeInNodeMap(e,o),this.inTypeMode=i,this.allowPattern=a,o}},{key:"fixExports",value:function(e,t){if(e.modifiers&&e.modifiers[0].kind===a.ExportKeyword){this.registerTSNodeInNodeMap(e,t);var r=e.modifiers[0],n=e.modifiers[1],i=n&&n.kind===a.DefaultKeyword,o=i?Gi.findNextToken(n,this.ast,this.ast):Gi.findNextToken(r,this.ast,this.ast);return t.range[0]=o.getStart(this.ast),t.loc=Gi.getLocFor(t.range[0],t.range[1],this.ast),i?this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:t,range:[r.getStart(this.ast),t.range[1]]}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportNamedDeclaration,declaration:t,specifiers:[],source:null,range:[r.getStart(this.ast),t.range[1]]})}return t}},{key:"registerTSNodeInNodeMap",value:function(e,t){t&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(e)||this.tsNodeToESTreeNodeMap.set(e,t))}},{key:"convertPattern",value:function(e,t){return this.converter(e,t,this.inTypeMode,!0)}},{key:"convertChild",value:function(e,t){return this.converter(e,t,this.inTypeMode,!1)}},{key:"convertType",value:function(e,t){return this.converter(e,t,!0,!1)}},{key:"createNode",value:function(e,t){var r=t;return r.range||(r.range=Gi.getRange(e,this.ast)),r.loc||(r.loc=Gi.getLocFor(r.range[0],r.range[1],this.ast)),r&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(r,e),r}},{key:"convertTypeAnnotation",value:function(e,t){var r=t.kind===a.FunctionType||t.kind===a.ConstructorType?2:1,n=e.getFullStart()-r,i=Gi.getLocFor(n,e.end,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeAnnotation,loc:i,range:[n,e.end],typeAnnotation:this.convertType(e)}}},{key:"convertBodyExpressions",value:function(e,t){var r=this,n=Gi.canContainDirective(t);return e.map((function(e){var t=r.convertChild(e);if(n){if(t&&t.expression&&i.isExpressionStatement(e)&&i.isStringLiteral(e.expression)){var a=t.expression.raw;return t.directive=a.slice(1,-1),t}n=!1}return t})).filter((function(e){return e}))}},{key:"convertTypeArgumentsToTypeParameters",value:function(e){var t=this,r=Gi.findNextToken(e,this.ast,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[e.pos-1,r.end],loc:Gi.getLocFor(e.pos-1,r.end,this.ast),params:e.map((function(e){return t.convertType(e)}))}}},{key:"convertTSTypeParametersToTypeParametersDeclaration",value:function(e){var t=this,r=Gi.findNextToken(e,this.ast,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeParameterDeclaration,range:[e.pos-1,r.end],loc:Gi.getLocFor(e.pos-1,r.end,this.ast),params:e.map((function(e){return t.convertType(e)}))}}},{key:"convertParameters",value:function(e){var t=this;return e&&e.length?e.map((function(e){var r=t.convertChild(e);return e.decorators&&e.decorators.length&&(r.decorators=e.decorators.map((function(e){return t.convertChild(e)}))),r})):[]}},{key:"deeplyCopy",value:function(e){var t=this,r="TS".concat(a[e.kind]);if(this.options.errorOnUnknownASTType&&!Wi.AST_NODE_TYPES[r])throw new Error('Unknown AST_NODE_TYPE: "'.concat(r,'"'));var n=this.createNode(e,{type:r});return Object.keys(e).filter((function(e){return!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc)$/.test(e)})).forEach((function(r){"type"===r?n.typeAnnotation=e.type?t.convertTypeAnnotation(e.type,e):null:"typeArguments"===r?n.typeParameters=e.typeArguments?t.convertTypeArgumentsToTypeParameters(e.typeArguments):null:"typeParameters"===r?n.typeParameters=e.typeParameters?t.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters):null:"decorators"===r?e.decorators&&e.decorators.length&&(n.decorators=e.decorators.map((function(e){return t.convertChild(e)}))):Array.isArray(e[r])?n[r]=e[r].map((function(e){return t.convertChild(e)})):e[r]&&"object"===f(e[r])&&e[r].kind?n[r]=t.convertChild(e[r]):n[r]=e[r]})),n}},{key:"convertJSXTagName",value:function(e,t){var r;switch(e.kind){case a.PropertyAccessExpression:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(e.expression,t),property:this.convertJSXTagName(e.name,t)});break;case a.ThisKeyword:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXIdentifier,name:"this"});break;case a.Identifier:default:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXIdentifier,name:e.text})}return this.registerTSNodeInNodeMap(e,r),r}},{key:"applyModifiersToResult",value:function(e,t){var r=this;if(t&&t.length){for(var n={},i=0;i<t.length;i++){switch(t[i].kind){case a.ExportKeyword:case a.DefaultKeyword:n[i]=!0;break;case a.ConstKeyword:e.const=!0,n[i]=!0;break;case a.DeclareKeyword:e.declare=!0,n[i]=!0}}var o=t.filter((function(e,t){return!n[t]}));o&&o.length&&(e.modifiers=o.map((function(e){return r.convertChild(e)})))}}},{key:"fixParentLocation",value:function(e,t){t[0]<e.range[0]&&(e.range[0]=t[0],e.loc.start=Gi.getLineAndCharacterFor(e.range[0],this.ast)),t[1]>e.range[1]&&(e.range[1]=t[1],e.loc.end=Gi.getLineAndCharacterFor(e.range[1],this.ast))}},{key:"convertNode",value:function(e,t){var r=this;switch(e.kind){case a.SourceFile:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(e.statements,e),sourceType:e.externalModuleIndicator?"module":"script",range:[e.getStart(this.ast),e.endOfFileToken.end]});case a.Block:return this.createNode(e,{type:Wi.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(e.statements,e)});case a.Identifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Identifier,name:e.text});case a.WithStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.WithStatement,object:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ReturnStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(e.expression)});case a.LabeledStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(e.label),body:this.convertChild(e.statement)});case a.ContinueStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(e.label)});case a.BreakStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.BreakStatement,label:this.convertChild(e.label)});case a.IfStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.IfStatement,test:this.convertChild(e.expression),consequent:this.convertChild(e.thenStatement),alternate:this.convertChild(e.elseStatement)});case a.SwitchStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(e.expression),cases:e.caseBlock.clauses.map((function(e){return r.convertChild(e)}))});case a.CaseClause:case a.DefaultClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.SwitchCase,test:e.kind===a.CaseClause?this.convertChild(e.expression):null,consequent:e.statements.map((function(e){return r.convertChild(e)}))});case a.ThrowStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(e.expression)});case a.TryStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TryStatement,block:this.convertChild(e.tryBlock),handler:this.convertChild(e.catchClause),finalizer:this.convertChild(e.finallyBlock)});case a.CatchClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.CatchClause,param:e.variableDeclaration?this.convertChild(e.variableDeclaration.name):null,body:this.convertChild(e.block)});case a.WhileStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.WhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.DoStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForStatement,init:this.convertChild(e.initializer),test:this.convertChild(e.condition),update:this.convertChild(e.incrementor),body:this.convertChild(e.statement)});case a.ForInStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForOfStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement),await:Boolean(e.awaitModifier&&e.awaitModifier.kind===a.AwaitKeyword)});case a.FunctionDeclaration:var n=Gi.hasModifier(a.DeclareKeyword,e),o=this.createNode(e,{type:n||!e.body?Wi.AST_NODE_TYPES.TSDeclareFunction:Wi.AST_NODE_TYPES.FunctionDeclaration,id:this.convertChild(e.name),generator:!!e.asteriskToken,expression:!1,async:Gi.hasModifier(a.AsyncKeyword,e),params:this.convertParameters(e.parameters),body:this.convertChild(e.body)||void 0});return e.type&&(o.returnType=this.convertTypeAnnotation(e.type,e)),n&&(o.declare=!0),e.typeParameters&&(o.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),e.decorators&&(o.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),this.fixExports(e,o);case a.VariableDeclaration:var s=this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclarator,id:this.convertPattern(e.name),init:this.convertChild(e.initializer)});return e.exclamationToken&&(s.definite=!0),e.type&&(s.id.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(s.id,s.id.typeAnnotation.range)),s;case a.VariableStatement:var c=this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarationList.declarations.map((function(e){return r.convertChild(e)})),kind:Gi.getDeclarationKind(e.declarationList)});return e.decorators&&(c.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.DeclareKeyword,e)&&(c.declare=!0),this.fixExports(e,c);case a.VariableDeclarationList:return this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarations.map((function(e){return r.convertChild(e)})),kind:Gi.getDeclarationKind(e)});case a.ExpressionStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ExpressionStatement,expression:this.convertChild(e.expression)});case a.ThisKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ThisExpression});case a.ArrayLiteralExpression:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return r.convertPattern(e)}))}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayExpression,elements:e.elements.map((function(e){return r.convertChild(e)}))});case a.ObjectLiteralExpression:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectPattern,properties:e.properties.map((function(e){return r.convertPattern(e)}))}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectExpression,properties:e.properties.map((function(e){return r.convertChild(e)}))});case a.PropertyAssignment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.converter(e.initializer,e,this.inTypeMode,this.allowPattern),computed:Gi.isComputedProperty(e.name),method:!1,shorthand:!1,kind:"init"});case a.ShorthandPropertyAssignment:return e.objectAssignmentInitializer?this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.name),right:this.convertChild(e.objectAssignmentInitializer)}),computed:!1,method:!1,shorthand:!0,kind:"init"}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.convertChild(e.name),computed:!1,method:!1,shorthand:!0,kind:"init"});case a.ComputedPropertyName:return this.convertChild(e.expression);case a.PropertyDeclaration:var u=Gi.hasModifier(a.AbstractKeyword,e),l=this.createNode(e,{type:u?Wi.AST_NODE_TYPES.TSAbstractClassProperty:Wi.AST_NODE_TYPES.ClassProperty,key:this.convertChild(e.name),value:this.convertChild(e.initializer),computed:Gi.isComputedProperty(e.name),static:Gi.hasModifier(a.StaticKeyword,e),readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,declare:Gi.hasModifier(a.DeclareKeyword,e)});e.type&&(l.typeAnnotation=this.convertTypeAnnotation(e.type,e)),e.decorators&&(l.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var _=Gi.getTSNodeAccessibility(e);return _&&(l.accessibility=_),e.name.kind!==a.Identifier&&e.name.kind!==a.ComputedPropertyName||!e.questionToken||(l.optional=!0),e.exclamationToken&&(l.definite=!0),l.key.type===Wi.AST_NODE_TYPES.Literal&&e.questionToken&&(l.optional=!0),l;case a.GetAccessor:case a.SetAccessor:case a.MethodDeclaration:var d,p=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:null,generator:!!e.asteriskToken,expression:!1,async:Gi.hasModifier(a.AsyncKeyword,e),body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end],params:[]});if(e.type&&(p.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(p.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(p,p.typeParameters.range)),t.kind===a.ObjectLiteralExpression)p.params=e.parameters.map((function(e){return r.convertChild(e)})),d=this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:p,computed:Gi.isComputedProperty(e.name),method:e.kind===a.MethodDeclaration,shorthand:!1,kind:"init"});else{p.params=this.convertParameters(e.parameters);var f=Gi.hasModifier(a.AbstractKeyword,e)?Wi.AST_NODE_TYPES.TSAbstractMethodDefinition:Wi.AST_NODE_TYPES.MethodDefinition;d=this.createNode(e,{type:f,key:this.convertChild(e.name),value:p,computed:Gi.isComputedProperty(e.name),static:Gi.hasModifier(a.StaticKeyword,e),kind:"method"}),e.decorators&&(d.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var m=Gi.getTSNodeAccessibility(e);m&&(d.accessibility=m)}return d.key.type===Wi.AST_NODE_TYPES.Identifier&&e.questionToken&&(d.key.optional=!0),e.kind===a.GetAccessor?d.kind="get":e.kind===a.SetAccessor?d.kind="set":d.static||e.name.kind!==a.StringLiteral||"constructor"!==e.name.text||d.type===Wi.AST_NODE_TYPES.Property||(d.kind="constructor"),d;case a.Constructor:var g=Gi.getLastModifier(e),y=g&&Gi.findNextToken(g,e,this.ast)||e.getFirstToken(),h=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:null,params:this.convertParameters(e.parameters),generator:!1,expression:!1,async:!1,body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end]});e.typeParameters&&(h.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(h,h.typeParameters.range)),e.type&&(h.returnType=this.convertTypeAnnotation(e.type,e));var v=this.createNode(e,{type:Wi.AST_NODE_TYPES.Identifier,name:"constructor",range:[y.getStart(this.ast),y.end]}),b=Gi.hasModifier(a.StaticKeyword,e),x=this.createNode(e,{type:Gi.hasModifier(a.AbstractKeyword,e)?Wi.AST_NODE_TYPES.TSAbstractMethodDefinition:Wi.AST_NODE_TYPES.MethodDefinition,key:v,value:h,computed:!1,static:b,kind:b?"method":"constructor"}),D=Gi.getTSNodeAccessibility(e);return D&&(x.accessibility=D),x;case a.FunctionExpression:var S=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:this.convertChild(e.name),generator:!!e.asteriskToken,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Gi.hasModifier(a.AsyncKeyword,e),expression:!1});return e.type&&(S.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(S.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),S;case a.SuperKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Super});case a.ArrayBindingPattern:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return r.convertPattern(e)}))});case a.OmittedExpression:return null;case a.ObjectBindingPattern:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectPattern,properties:e.elements.map((function(e){return r.convertPattern(e)}))});case a.BindingElement:if(t.kind===a.ArrayBindingPattern){var T=this.convertChild(e.name,t);return e.initializer?this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:T,right:this.convertChild(e.initializer)}):e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:T}):T}var E;return E=e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.propertyName||e.name)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.propertyName||e.name),value:this.convertChild(e.name),computed:Boolean(e.propertyName&&e.propertyName.kind===a.ComputedPropertyName),method:!1,shorthand:!e.propertyName,kind:"init"}),e.initializer&&(E.value=this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertChild(e.name),right:this.convertChild(e.initializer),range:[e.name.getStart(this.ast),e.initializer.end]})),E;case a.ArrowFunction:var C=this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Gi.hasModifier(a.AsyncKeyword,e),expression:e.body.kind!==a.Block});return e.type&&(C.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(C.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),C;case a.YieldExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.YieldExpression,delegate:!!e.asteriskToken,argument:this.convertChild(e.expression)});case a.AwaitExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(e.expression)});case a.NoSubstitutionTemplateLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-1),cooked:e.text},tail:!0})],expressions:[]});case a.TemplateExpression:var k=this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(e.head)],expressions:[]});return e.templateSpans.forEach((function(e){k.expressions.push(r.convertChild(e.expression)),k.quasis.push(r.convertChild(e.literal))})),k;case a.TaggedTemplateExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TaggedTemplateExpression,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,tag:this.convertChild(e.tag),quasi:this.convertChild(e.template)});case a.TemplateHead:case a.TemplateMiddle:case a.TemplateTail:var N=e.kind===a.TemplateTail;return this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-(N?1:2)),cooked:e.text},tail:N});case a.SpreadAssignment:case a.SpreadElement:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertPattern(e.expression)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(e.expression)});case a.Parameter:var A,F;return e.dotDotDotToken?A=F=this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.name)}):e.initializer?(A=this.convertChild(e.name),F=this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:A,right:this.convertChild(e.initializer)}),e.modifiers&&(F.range[0]=A.range[0],F.loc=Gi.getLocFor(F.range[0],F.range[1],this.ast))):A=F=this.convertChild(e.name,t),e.type&&(A.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(A,A.typeAnnotation.range)),e.questionToken&&(e.questionToken.end>A.range[1]&&(A.range[1]=e.questionToken.end,A.loc.end=Gi.getLineAndCharacterFor(A.range[1],this.ast)),A.optional=!0),e.modifiers?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSParameterProperty,accessibility:Gi.getTSNodeAccessibility(e)||void 0,readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Gi.hasModifier(a.StaticKeyword,e)||void 0,export:Gi.hasModifier(a.ExportKeyword,e)||void 0,parameter:F}):F;case a.ClassDeclaration:case a.ClassExpression:var P=e.heritageClauses||[],w=e.kind===a.ClassDeclaration?Wi.AST_NODE_TYPES.ClassDeclaration:Wi.AST_NODE_TYPES.ClassExpression,I=P.find((function(e){return e.token===a.ExtendsKeyword})),O=P.find((function(e){return e.token===a.ImplementsKeyword})),M=this.createNode(e,{type:w,id:this.convertChild(e.name),body:this.createNode(e,{type:Wi.AST_NODE_TYPES.ClassBody,body:[],range:[e.members.pos-1,e.end]}),superClass:I&&I.types[0]?this.convertChild(I.types[0].expression):null});if(I){if(I.types.length>1)throw Gi.createError(this.ast,I.types[1].pos,"Classes can only extend a single class.");I.types[0]&&I.types[0].typeArguments&&(M.superTypeParameters=this.convertTypeArgumentsToTypeParameters(I.types[0].typeArguments))}e.typeParameters&&(M.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),O&&(M.implements=O.types.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.AbstractKeyword,e)&&(M.abstract=!0),Gi.hasModifier(a.DeclareKeyword,e)&&(M.declare=!0),e.decorators&&(M.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var L=e.members.filter(Gi.isESTreeClassMember);return L.length&&(M.body.body=L.map((function(e){return r.convertChild(e)}))),this.fixExports(e,M);case a.ModuleBlock:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(e.statements,e)});case a.ImportDeclaration:var R=this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:[]});if(e.importClause&&(e.importClause.name&&R.specifiers.push(this.convertChild(e.importClause)),e.importClause.namedBindings))switch(e.importClause.namedBindings.kind){case a.NamespaceImport:R.specifiers.push(this.convertChild(e.importClause.namedBindings));break;case a.NamedImports:R.specifiers=R.specifiers.concat(e.importClause.namedBindings.elements.map((function(e){return r.convertChild(e)})))}return R;case a.NamespaceImport:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(e.name)});case a.ImportSpecifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(e.name),imported:this.convertChild(e.propertyName||e.name)});case a.ImportClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportDefaultSpecifier,local:this.convertChild(e.name),range:[e.getStart(this.ast),e.name.end]});case a.ExportDeclaration:return e.exportClause?this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:e.exportClause.elements.map((function(e){return r.convertChild(e)})),declaration:null}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(e.moduleSpecifier)});case a.ExportSpecifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(e.propertyName||e.name),exported:this.convertChild(e.name)});case a.ExportAssignment:return e.isExportEquals?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(e.expression)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(e.expression)});case a.PrefixUnaryExpression:case a.PostfixUnaryExpression:var B=Gi.getTextForTokenKind(e.operator)||"";return/^(?:\+\+|--)$/.test(B)?this.createNode(e,{type:Wi.AST_NODE_TYPES.UpdateExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)});case a.DeleteExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(e.expression)});case a.VoidExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOfExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOperator:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeOperator,operator:Gi.getTextForTokenKind(e.operator),typeAnnotation:this.convertChild(e.type)});case a.BinaryExpression:if(Gi.isComma(e.operatorToken)){var j=this.createNode(e,{type:Wi.AST_NODE_TYPES.SequenceExpression,expressions:[]}),K=this.convertChild(e.left);return K.type===Wi.AST_NODE_TYPES.SequenceExpression&&e.left.kind!==a.ParenthesizedExpression?j.expressions=j.expressions.concat(K.expressions):j.expressions.push(K),j.expressions.push(this.convertChild(e.right)),j}var J=Gi.getBinaryExpressionType(e.operatorToken);return this.allowPattern&&J===Wi.AST_NODE_TYPES.AssignmentExpression?this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.left,e),right:this.convertChild(e.right)}):this.createNode(e,{type:J,operator:Gi.getTextForTokenKind(e.operatorToken.kind),left:this.converter(e.left,e,this.inTypeMode,J===Wi.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(e.right)});case a.PropertyAccessExpression:var z=this.convertChild(e.expression),U=this.convertChild(e.name),V=void 0!==e.questionDotToken,q=(z.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||z.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return V||q?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalMemberExpression,object:z,property:U,computed:!1,optional:V}):this.createNode(e,{type:Wi.AST_NODE_TYPES.MemberExpression,object:z,property:U,computed:!1,optional:!1});case a.ElementAccessExpression:var W=this.convertChild(e.expression),G=this.convertChild(e.argumentExpression),H=void 0!==e.questionDotToken,Y=(W.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||W.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return H||Y?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalMemberExpression,object:W,property:G,computed:!0,optional:H}):this.createNode(e,{type:Wi.AST_NODE_TYPES.MemberExpression,object:W,property:G,computed:!0,optional:!1});case a.CallExpression:var X,Q=this.convertChild(e.expression),$=e.arguments.map((function(e){return r.convertChild(e)})),Z=void 0!==e.questionDotToken,ee=(Q.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||Q.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return X=Z||ee?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalCallExpression,callee:Q,arguments:$,optional:Z}):this.createNode(e,{type:Wi.AST_NODE_TYPES.CallExpression,callee:Q,arguments:$,optional:!1}),e.typeArguments&&(X.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),X;case a.NewExpression:var te=this.createNode(e,{type:Wi.AST_NODE_TYPES.NewExpression,callee:this.convertChild(e.expression),arguments:e.arguments?e.arguments.map((function(e){return r.convertChild(e)})):[]});return e.typeArguments&&(te.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),te;case a.ConditionalExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(e.condition),consequent:this.convertChild(e.whenTrue),alternate:this.convertChild(e.whenFalse)});case a.MetaProperty:return this.createNode(e,{type:Wi.AST_NODE_TYPES.MetaProperty,meta:this.createNode(e.getFirstToken(),{type:Wi.AST_NODE_TYPES.Identifier,name:Gi.getTextForTokenKind(e.keywordToken)}),property:this.convertChild(e.name)});case a.Decorator:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Decorator,expression:this.convertChild(e.expression)});case a.StringLiteral:var re=this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,raw:"",value:""});return re.raw=this.ast.text.slice(re.range[0],re.range[1]),t.name&&t.name===e?re.value=e.text:re.value=Gi.unescapeStringLiteralText(e.text),re;case a.NumericLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:Number(e.text),raw:e.getText()});case a.BigIntLiteral:var ne=this.createNode(e,{type:Wi.AST_NODE_TYPES.BigIntLiteral,raw:"",value:""});return ne.raw=this.ast.text.slice(ne.range[0],ne.range[1]),ne.value=ne.raw.slice(0,-1),ne;case a.RegularExpressionLiteral:var ie=e.text.slice(1,e.text.lastIndexOf("/")),ae=e.text.slice(e.text.lastIndexOf("/")+1),oe=null;try{oe=new RegExp(ie,ae)}catch(e){oe=null}return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:oe,raw:e.text,regex:{pattern:ie,flags:ae}});case a.TrueKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case a.FalseKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case a.NullKeyword:return this.inTypeMode?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNullKeyword}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:null,raw:"null"});case a.ImportKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Import});case a.EmptyStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.EmptyStatement});case a.DebuggerStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.DebuggerStatement});case a.JsxElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(e.openingElement),closingElement:this.convertChild(e.closingElement),children:e.children.map((function(e){return r.convertChild(e)}))});case a.JsxFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(e.openingFragment),closingFragment:this.convertChild(e.closingFragment),children:e.children.map((function(e){return r.convertChild(e)}))});case a.JsxSelfClosingElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!0,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return r.convertChild(e)})),range:Gi.getRange(e,this.ast)}),closingElement:null,children:[]});case a.JsxOpeningElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!1,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return r.convertChild(e)}))});case a.JsxClosingElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(e.tagName,e)});case a.JsxOpeningFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningFragment});case a.JsxClosingFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXClosingFragment});case a.JsxExpression:var se=e.expression?this.convertChild(e.expression):this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXEmptyExpression,range:[e.getStart(this.ast)+1,e.getEnd()-1]});return e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXSpreadChild,expression:se}):this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXExpressionContainer,expression:se});case a.JsxAttribute:var ce=this.convertChild(e.name);return ce.type=Wi.AST_NODE_TYPES.JSXIdentifier,this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXAttribute,name:ce,value:this.convertChild(e.initializer)});case a.JsxText:var ue=e.getFullStart(),le=e.getEnd();return this.options.useJSXTextNode?this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXText,value:this.ast.text.slice(ue,le),raw:this.ast.text.slice(ue,le),range:[ue,le]}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:this.ast.text.slice(ue,le),raw:this.ast.text.slice(ue,le),range:[ue,le]});case a.JsxSpreadAttribute:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(e.expression)});case a.QualifiedName:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(e.left),right:this.convertChild(e.right)});case a.TypeReference:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeReference,typeName:this.convertType(e.typeName),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0});case a.TypeParameter:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeParameter,name:this.convertType(e.name),constraint:e.constraint?this.convertType(e.constraint):void 0,default:e.default?this.convertType(e.default):void 0});case a.ThisType:case a.AnyKeyword:case a.BigIntKeyword:case a.BooleanKeyword:case a.NeverKeyword:case a.NumberKeyword:case a.ObjectKeyword:case a.StringKeyword:case a.SymbolKeyword:case a.UnknownKeyword:case a.VoidKeyword:case a.UndefinedKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES["TS".concat(a[e.kind])]});case a.NonNullExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(e.expression)});case a.TypeLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeLiteral,members:e.members.map((function(e){return r.convertChild(e)}))});case a.ArrayType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSArrayType,elementType:this.convertType(e.elementType)});case a.IndexedAccessType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertType(e.objectType),indexType:this.convertType(e.indexType)});case a.ConditionalType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSConditionalType,checkType:this.convertType(e.checkType),extendsType:this.convertType(e.extendsType),trueType:this.convertType(e.trueType),falseType:this.convertType(e.falseType)});case a.TypeQuery:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertType(e.exprName)});case a.MappedType:var _e=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSMappedType,typeParameter:this.convertType(e.typeParameter)});return e.readonlyToken&&(e.readonlyToken.kind===a.ReadonlyKeyword?_e.readonly=!0:_e.readonly=Gi.getTextForTokenKind(e.readonlyToken.kind)),e.questionToken&&(e.questionToken.kind===a.QuestionToken?_e.optional=!0:_e.optional=Gi.getTextForTokenKind(e.questionToken.kind)),e.type&&(_e.typeAnnotation=this.convertType(e.type)),_e;case a.ParenthesizedExpression:return this.convertChild(e.expression,t);case a.TypeAliasDeclaration:var de=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeAliasDeclaration,id:this.convertChild(e.name),typeAnnotation:this.convertType(e.type)});return Gi.hasModifier(a.DeclareKeyword,e)&&(de.declare=!0),e.typeParameters&&(de.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),this.fixExports(e,de);case a.MethodSignature:var pe=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSMethodSignature,computed:Gi.isComputedProperty(e.name),key:this.convertChild(e.name),params:this.convertParameters(e.parameters)});Gi.isOptional(e)&&(pe.optional=!0),e.type&&(pe.returnType=this.convertTypeAnnotation(e.type,e)),Gi.hasModifier(a.ReadonlyKeyword,e)&&(pe.readonly=!0),e.typeParameters&&(pe.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters));var fe=Gi.getTSNodeAccessibility(e);return fe&&(pe.accessibility=fe),Gi.hasModifier(a.ExportKeyword,e)&&(pe.export=!0),Gi.hasModifier(a.StaticKeyword,e)&&(pe.static=!0),pe;case a.PropertySignature:var me=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSPropertySignature,optional:Gi.isOptional(e)||void 0,computed:Gi.isComputedProperty(e.name),key:this.convertChild(e.name),typeAnnotation:e.type?this.convertTypeAnnotation(e.type,e):void 0,initializer:this.convertChild(e.initializer)||void 0,readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Gi.hasModifier(a.StaticKeyword,e)||void 0,export:Gi.hasModifier(a.ExportKeyword,e)||void 0}),ge=Gi.getTSNodeAccessibility(e);return ge&&(me.accessibility=ge),me;case a.IndexSignature:var ye=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIndexSignature,parameters:e.parameters.map((function(e){return r.convertChild(e)}))});e.type&&(ye.typeAnnotation=this.convertTypeAnnotation(e.type,e)),Gi.hasModifier(a.ReadonlyKeyword,e)&&(ye.readonly=!0);var he=Gi.getTSNodeAccessibility(e);return he&&(ye.accessibility=he),Gi.hasModifier(a.ExportKeyword,e)&&(ye.export=!0),Gi.hasModifier(a.StaticKeyword,e)&&(ye.static=!0),ye;case a.ConstructorType:case a.FunctionType:case a.ConstructSignature:case a.CallSignature:var ve;switch(e.kind){case a.ConstructSignature:ve=Wi.AST_NODE_TYPES.TSConstructSignatureDeclaration;break;case a.CallSignature:ve=Wi.AST_NODE_TYPES.TSCallSignatureDeclaration;break;case a.FunctionType:ve=Wi.AST_NODE_TYPES.TSFunctionType;break;case a.ConstructorType:default:ve=Wi.AST_NODE_TYPES.TSConstructorType}var be=this.createNode(e,{type:ve,params:this.convertParameters(e.parameters)});return e.type&&(be.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(be.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),be;case a.ExpressionWithTypeArguments:var xe=this.createNode(e,{type:t&&t.kind===a.InterfaceDeclaration?Wi.AST_NODE_TYPES.TSInterfaceHeritage:Wi.AST_NODE_TYPES.TSClassImplements,expression:this.convertChild(e.expression)});return e.typeArguments&&(xe.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),xe;case a.InterfaceDeclaration:var De=e.heritageClauses||[],Se=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInterfaceBody,body:e.members.map((function(e){return r.convertChild(e)})),range:[e.members.pos-1,e.end]}),id:this.convertChild(e.name)});if(e.typeParameters&&(Se.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),De.length>0){var Te=[],Ee=[],Ce=!0,ke=!1,Ne=void 0;try{for(var Ae,Fe=De[Symbol.iterator]();!(Ce=(Ae=Fe.next()).done);Ce=!0){var Pe=Ae.value;if(Pe.token===a.ExtendsKeyword){var we=!0,Ie=!1,Oe=void 0;try{for(var Me,Le=Pe.types[Symbol.iterator]();!(we=(Me=Le.next()).done);we=!0){var Re=Me.value;Te.push(this.convertChild(Re,e))}}catch(e){Ie=!0,Oe=e}finally{try{we||null==Le.return||Le.return()}finally{if(Ie)throw Oe}}}else if(Pe.token===a.ImplementsKeyword){var Be=!0,je=!1,Ke=void 0;try{for(var Je,ze=Pe.types[Symbol.iterator]();!(Be=(Je=ze.next()).done);Be=!0){var Ue=Je.value;Ee.push(this.convertChild(Ue,e))}}catch(e){je=!0,Ke=e}finally{try{Be||null==ze.return||ze.return()}finally{if(je)throw Ke}}}}}catch(e){ke=!0,Ne=e}finally{try{Ce||null==Fe.return||Fe.return()}finally{if(ke)throw Ne}}Te.length&&(Se.extends=Te),Ee.length&&(Se.implements=Ee)}return e.decorators&&(Se.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.AbstractKeyword,e)&&(Se.abstract=!0),Gi.hasModifier(a.DeclareKeyword,e)&&(Se.declare=!0),this.fixExports(e,Se);case a.TypePredicate:var Ve=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypePredicate,asserts:void 0!==e.assertsModifier,parameterName:this.convertChild(e.parameterName),typeAnnotation:null});return e.type&&(Ve.typeAnnotation=this.convertTypeAnnotation(e.type,e),Ve.typeAnnotation.loc=Ve.typeAnnotation.typeAnnotation.loc,Ve.typeAnnotation.range=Ve.typeAnnotation.typeAnnotation.range),Ve;case a.ImportType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSImportType,isTypeOf:!!e.isTypeOf,parameter:this.convertChild(e.argument),qualifier:this.convertChild(e.qualifier),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):null});case a.EnumDeclaration:var qe=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSEnumDeclaration,id:this.convertChild(e.name),members:e.members.map((function(e){return r.convertChild(e)}))});return this.applyModifiersToResult(qe,e.modifiers),e.decorators&&(qe.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),this.fixExports(e,qe);case a.EnumMember:var We=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSEnumMember,id:this.convertChild(e.name)});return e.initializer&&(We.initializer=this.convertChild(e.initializer)),We;case a.ModuleDeclaration:var Ge=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSModuleDeclaration,id:this.convertChild(e.name)});return e.body&&(Ge.body=this.convertChild(e.body)),this.applyModifiersToResult(Ge,e.modifiers),e.flags&i.NodeFlags.GlobalAugmentation&&(Ge.global=!0),this.fixExports(e,Ge);case a.OptionalType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertType(e.type)});case a.ParenthesizedType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSParenthesizedType,typeAnnotation:this.convertType(e.type)});case a.TupleType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTupleType,elementTypes:e.elementTypes.map((function(e){return r.convertType(e)}))});case a.UnionType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSUnionType,types:e.types.map((function(e){return r.convertType(e)}))});case a.IntersectionType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIntersectionType,types:e.types.map((function(e){return r.convertType(e)}))});case a.RestType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertType(e.type)});case a.AsExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertType(e.type)});case a.InferType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInferType,typeParameter:this.convertType(e.typeParameter)});case a.LiteralType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSLiteralType,literal:this.convertType(e.literal)});case a.TypeAssertionExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertType(e.type),expression:this.convertChild(e.expression)});case a.ImportEqualsDeclaration:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(e.name),moduleReference:this.convertChild(e.moduleReference),isExport:Gi.hasModifier(a.ExportKeyword,e)});case a.ExternalModuleReference:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(e.expression)});case a.NamespaceExportDeclaration:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(e.name)});case a.AbstractKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSAbstractKeyword});default:return this.deeplyCopy(e)}}}]),e}();t.Converter=o}));i(Hi);Hi.convertError,Hi.Converter;var Yi=function(e,t){return(Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var Xi=function(){return(Xi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Qi(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function $i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function Zi(e){return this instanceof Zi?(this.v=e,this):new Zi(e)}var ea=Object.freeze({__proto__:null,__extends:function(e,t){function r(){this.constructor=e}Yi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},get __assign(){return Xi},__rest:function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},__decorate:function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},__param:function(e,t){return function(r,n){t(r,n,e)}},__metadata:function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(o,s)}c((n=n.apply(e,t||[])).next())}))},__generator:function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},__exportStar:function(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])},__values:Qi,__read:$i,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($i(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n},__await:Zi,__asyncGenerator:function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof Zi?Promise.resolve(r.value.v).then(c,u):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},__asyncDelegator:function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Zi(e[n](t)),done:"return"===n}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Qi(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}}}),ta=a((function(e,t){function r(e){return e.kind===Fr.SyntaxKind.ModuleDeclaration}function n(e){return e.kind===Fr.SyntaxKind.PropertyAccessExpression}function i(e){return e.kind===Fr.SyntaxKind.QualifiedName}Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.GetAccessor||e.kind===Fr.SyntaxKind.SetAccessor},t.isArrayBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ArrayBindingPattern},t.isArrayLiteralExpression=function(e){return e.kind===Fr.SyntaxKind.ArrayLiteralExpression},t.isArrayTypeNode=function(e){return e.kind===Fr.SyntaxKind.ArrayType},t.isArrowFunction=function(e){return e.kind===Fr.SyntaxKind.ArrowFunction},t.isAsExpression=function(e){return e.kind===Fr.SyntaxKind.AsExpression},t.isAssertionExpression=function(e){return e.kind===Fr.SyntaxKind.AsExpression||e.kind===Fr.SyntaxKind.TypeAssertionExpression},t.isAwaitExpression=function(e){return e.kind===Fr.SyntaxKind.AwaitExpression},t.isBinaryExpression=function(e){return e.kind===Fr.SyntaxKind.BinaryExpression},t.isBindingElement=function(e){return e.kind===Fr.SyntaxKind.BindingElement},t.isBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ArrayBindingPattern||e.kind===Fr.SyntaxKind.ObjectBindingPattern},t.isBlock=function(e){return e.kind===Fr.SyntaxKind.Block},t.isBlockLike=function(e){return void 0!==e.statements},t.isBooleanLiteral=function(e){return e.kind===Fr.SyntaxKind.TrueKeyword||e.kind===Fr.SyntaxKind.FalseKeyword},t.isBreakOrContinueStatement=function(e){return e.kind===Fr.SyntaxKind.BreakStatement||e.kind===Fr.SyntaxKind.ContinueStatement},t.isBreakStatement=function(e){return e.kind===Fr.SyntaxKind.BreakStatement},t.isCallExpression=function(e){return e.kind===Fr.SyntaxKind.CallExpression},t.isCallLikeExpression=function(e){switch(e.kind){case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.Decorator:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.TaggedTemplateExpression:return!0;default:return!1}},t.isCallSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.CallSignature},t.isCaseBlock=function(e){return e.kind===Fr.SyntaxKind.CaseBlock},t.isCaseClause=function(e){return e.kind===Fr.SyntaxKind.CaseClause},t.isCaseOrDefaultClause=function(e){return e.kind===Fr.SyntaxKind.CaseClause||e.kind===Fr.SyntaxKind.DefaultClause},t.isCatchClause=function(e){return e.kind===Fr.SyntaxKind.CatchClause},t.isClassDeclaration=function(e){return e.kind===Fr.SyntaxKind.ClassDeclaration},t.isClassExpression=function(e){return e.kind===Fr.SyntaxKind.ClassExpression},t.isClassLikeDeclaration=function(e){return e.kind===Fr.SyntaxKind.ClassDeclaration||e.kind===Fr.SyntaxKind.ClassExpression},t.isCommaListExpression=function(e){return e.kind===Fr.SyntaxKind.CommaListExpression},t.isConditionalExpression=function(e){return e.kind===Fr.SyntaxKind.ConditionalExpression},t.isConditionalTypeNode=function(e){return e.kind===Fr.SyntaxKind.ConditionalType},t.isConstructorDeclaration=function(e){return e.kind===Fr.SyntaxKind.Constructor},t.isConstructorTypeNode=function(e){return e.kind===Fr.SyntaxKind.ConstructorType},t.isConstructSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.ConstructSignature},t.isContinueStatement=function(e){return e.kind===Fr.SyntaxKind.ContinueStatement},t.isComputedPropertyName=function(e){return e.kind===Fr.SyntaxKind.ComputedPropertyName},t.isDebuggerStatement=function(e){return e.kind===Fr.SyntaxKind.DebuggerStatement},t.isDecorator=function(e){return e.kind===Fr.SyntaxKind.Decorator},t.isDefaultClause=function(e){return e.kind===Fr.SyntaxKind.DefaultClause},t.isDeleteExpression=function(e){return e.kind===Fr.SyntaxKind.DeleteExpression},t.isDoStatement=function(e){return e.kind===Fr.SyntaxKind.DoStatement},t.isElementAccessExpression=function(e){return e.kind===Fr.SyntaxKind.ElementAccessExpression},t.isEmptyStatement=function(e){return e.kind===Fr.SyntaxKind.EmptyStatement},t.isEntityName=function(e){return e.kind===Fr.SyntaxKind.Identifier||i(e)},t.isEntityNameExpression=function e(t){return t.kind===Fr.SyntaxKind.Identifier||n(t)&&e(t.expression)},t.isEnumDeclaration=function(e){return e.kind===Fr.SyntaxKind.EnumDeclaration},t.isEnumMember=function(e){return e.kind===Fr.SyntaxKind.EnumMember},t.isExportAssignment=function(e){return e.kind===Fr.SyntaxKind.ExportAssignment},t.isExportDeclaration=function(e){return e.kind===Fr.SyntaxKind.ExportDeclaration},t.isExportSpecifier=function(e){return e.kind===Fr.SyntaxKind.ExportSpecifier},t.isExpression=function(e){switch(e.kind){case Fr.SyntaxKind.ArrayLiteralExpression:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.AsExpression:case Fr.SyntaxKind.AwaitExpression:case Fr.SyntaxKind.BinaryExpression:case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.CommaListExpression:case Fr.SyntaxKind.ConditionalExpression:case Fr.SyntaxKind.DeleteExpression:case Fr.SyntaxKind.ElementAccessExpression:case Fr.SyntaxKind.FalseKeyword:case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.Identifier:case Fr.SyntaxKind.JsxElement:case Fr.SyntaxKind.JsxFragment:case Fr.SyntaxKind.JsxExpression:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxOpeningFragment:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.MetaProperty:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.NonNullExpression:case Fr.SyntaxKind.NoSubstitutionTemplateLiteral:case Fr.SyntaxKind.NullKeyword:case Fr.SyntaxKind.NumericLiteral:case Fr.SyntaxKind.ObjectLiteralExpression:case Fr.SyntaxKind.OmittedExpression:case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.PostfixUnaryExpression:case Fr.SyntaxKind.PrefixUnaryExpression:case Fr.SyntaxKind.PropertyAccessExpression:case Fr.SyntaxKind.RegularExpressionLiteral:case Fr.SyntaxKind.SpreadElement:case Fr.SyntaxKind.StringLiteral:case Fr.SyntaxKind.SuperKeyword:case Fr.SyntaxKind.TaggedTemplateExpression:case Fr.SyntaxKind.TemplateExpression:case Fr.SyntaxKind.ThisKeyword:case Fr.SyntaxKind.TrueKeyword:case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.TypeOfExpression:case Fr.SyntaxKind.VoidExpression:case Fr.SyntaxKind.YieldExpression:return!0;default:return!1}},t.isExpressionStatement=function(e){return e.kind===Fr.SyntaxKind.ExpressionStatement},t.isExpressionWithTypeArguments=function(e){return e.kind===Fr.SyntaxKind.ExpressionWithTypeArguments},t.isExternalModuleReference=function(e){return e.kind===Fr.SyntaxKind.ExternalModuleReference},t.isForInStatement=function(e){return e.kind===Fr.SyntaxKind.ForInStatement},t.isForInOrOfStatement=function(e){return e.kind===Fr.SyntaxKind.ForOfStatement||e.kind===Fr.SyntaxKind.ForInStatement},t.isForOfStatement=function(e){return e.kind===Fr.SyntaxKind.ForOfStatement},t.isForStatement=function(e){return e.kind===Fr.SyntaxKind.ForStatement},t.isFunctionDeclaration=function(e){return e.kind===Fr.SyntaxKind.FunctionDeclaration},t.isFunctionExpression=function(e){return e.kind===Fr.SyntaxKind.FunctionExpression},t.isFunctionTypeNode=function(e){return e.kind===Fr.SyntaxKind.FunctionType},t.isGetAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.GetAccessor},t.isIdentifier=function(e){return e.kind===Fr.SyntaxKind.Identifier},t.isIfStatement=function(e){return e.kind===Fr.SyntaxKind.IfStatement},t.isImportClause=function(e){return e.kind===Fr.SyntaxKind.ImportClause},t.isImportDeclaration=function(e){return e.kind===Fr.SyntaxKind.ImportDeclaration},t.isImportEqualsDeclaration=function(e){return e.kind===Fr.SyntaxKind.ImportEqualsDeclaration},t.isImportSpecifier=function(e){return e.kind===Fr.SyntaxKind.ImportSpecifier},t.isIndexedAccessTypeNode=function(e){return e.kind===Fr.SyntaxKind.IndexedAccessType},t.isIndexSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.IndexSignature},t.isInferTypeNode=function(e){return e.kind===Fr.SyntaxKind.InferType},t.isInterfaceDeclaration=function(e){return e.kind===Fr.SyntaxKind.InterfaceDeclaration},t.isIntersectionTypeNode=function(e){return e.kind===Fr.SyntaxKind.IntersectionType},t.isIterationStatement=function(e){switch(e.kind){case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.DoStatement:return!0;default:return!1}},t.isJsDoc=function(e){return e.kind===Fr.SyntaxKind.JSDocComment},t.isJsxAttribute=function(e){return e.kind===Fr.SyntaxKind.JsxAttribute},t.isJsxAttributeLike=function(e){return e.kind===Fr.SyntaxKind.JsxAttribute||e.kind===Fr.SyntaxKind.JsxSpreadAttribute},t.isJsxAttributes=function(e){return e.kind===Fr.SyntaxKind.JsxAttributes},t.isJsxClosingElement=function(e){return e.kind===Fr.SyntaxKind.JsxClosingElement},t.isJsxClosingFragment=function(e){return e.kind===Fr.SyntaxKind.JsxClosingFragment},t.isJsxElement=function(e){return e.kind===Fr.SyntaxKind.JsxElement},t.isJsxExpression=function(e){return e.kind===Fr.SyntaxKind.JsxExpression},t.isJsxFragment=function(e){return e.kind===Fr.SyntaxKind.JsxFragment},t.isJsxOpeningElement=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningElement},t.isJsxOpeningFragment=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningFragment},t.isJsxOpeningLikeElement=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningElement||e.kind===Fr.SyntaxKind.JsxSelfClosingElement},t.isJsxSelfClosingElement=function(e){return e.kind===Fr.SyntaxKind.JsxSelfClosingElement},t.isJsxSpreadAttribute=function(e){return e.kind===Fr.SyntaxKind.JsxSpreadAttribute},t.isJsxText=function(e){return e.kind===Fr.SyntaxKind.JsxText},t.isLabeledStatement=function(e){return e.kind===Fr.SyntaxKind.LabeledStatement},t.isLiteralExpression=function(e){return e.kind>=Fr.SyntaxKind.FirstLiteralToken&&e.kind<=Fr.SyntaxKind.LastLiteralToken},t.isLiteralTypeNode=function(e){return e.kind===Fr.SyntaxKind.LiteralType},t.isMappedTypeNode=function(e){return e.kind===Fr.SyntaxKind.MappedType},t.isMetaProperty=function(e){return e.kind===Fr.SyntaxKind.MetaProperty},t.isMethodDeclaration=function(e){return e.kind===Fr.SyntaxKind.MethodDeclaration},t.isMethodSignature=function(e){return e.kind===Fr.SyntaxKind.MethodSignature},t.isModuleBlock=function(e){return e.kind===Fr.SyntaxKind.ModuleBlock},t.isModuleDeclaration=r,t.isNamedExports=function(e){return e.kind===Fr.SyntaxKind.NamedExports},t.isNamedImports=function(e){return e.kind===Fr.SyntaxKind.NamedImports},t.isNamespaceDeclaration=function e(t){return r(t)&&t.name.kind===Fr.SyntaxKind.Identifier&&void 0!==t.body&&(t.body.kind===Fr.SyntaxKind.ModuleBlock||e(t.body))},t.isNamespaceImport=function(e){return e.kind===Fr.SyntaxKind.NamespaceImport},t.isNamespaceExportDeclaration=function(e){return e.kind===Fr.SyntaxKind.NamespaceExportDeclaration},t.isNewExpression=function(e){return e.kind===Fr.SyntaxKind.NewExpression},t.isNonNullExpression=function(e){return e.kind===Fr.SyntaxKind.NonNullExpression},t.isNoSubstitutionTemplateLiteral=function(e){return e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isNullLiteral=function(e){return e.kind===Fr.SyntaxKind.NullKeyword},t.isNumericLiteral=function(e){return e.kind===Fr.SyntaxKind.NumericLiteral},t.isNumericOrStringLikeLiteral=function(e){switch(e.kind){case Fr.SyntaxKind.StringLiteral:case Fr.SyntaxKind.NumericLiteral:case Fr.SyntaxKind.NoSubstitutionTemplateLiteral:return!0;default:return!1}},t.isObjectBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ObjectBindingPattern},t.isObjectLiteralExpression=function(e){return e.kind===Fr.SyntaxKind.ObjectLiteralExpression},t.isOmittedExpression=function(e){return e.kind===Fr.SyntaxKind.OmittedExpression},t.isParameterDeclaration=function(e){return e.kind===Fr.SyntaxKind.Parameter},t.isParenthesizedExpression=function(e){return e.kind===Fr.SyntaxKind.ParenthesizedExpression},t.isParenthesizedTypeNode=function(e){return e.kind===Fr.SyntaxKind.ParenthesizedType},t.isPostfixUnaryExpression=function(e){return e.kind===Fr.SyntaxKind.PostfixUnaryExpression},t.isPrefixUnaryExpression=function(e){return e.kind===Fr.SyntaxKind.PrefixUnaryExpression},t.isPropertyAccessExpression=n,t.isPropertyAssignment=function(e){return e.kind===Fr.SyntaxKind.PropertyAssignment},t.isPropertyDeclaration=function(e){return e.kind===Fr.SyntaxKind.PropertyDeclaration},t.isPropertySignature=function(e){return e.kind===Fr.SyntaxKind.PropertySignature},t.isQualifiedName=i,t.isRegularExpressionLiteral=function(e){return e.kind===Fr.SyntaxKind.RegularExpressionLiteral},t.isReturnStatement=function(e){return e.kind===Fr.SyntaxKind.ReturnStatement},t.isSetAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.SetAccessor},t.isShorthandPropertyAssignment=function(e){return e.kind===Fr.SyntaxKind.ShorthandPropertyAssignment},t.isSignatureDeclaration=function(e){return void 0!==e.parameters},t.isSourceFile=function(e){return e.kind===Fr.SyntaxKind.SourceFile},t.isSpreadAssignment=function(e){return e.kind===Fr.SyntaxKind.SpreadAssignment},t.isSpreadElement=function(e){return e.kind===Fr.SyntaxKind.SpreadElement},t.isStringLiteral=function(e){return e.kind===Fr.SyntaxKind.StringLiteral},t.isSwitchStatement=function(e){return e.kind===Fr.SyntaxKind.SwitchStatement},t.isSyntaxList=function(e){return e.kind===Fr.SyntaxKind.SyntaxList},t.isTaggedTemplateExpression=function(e){return e.kind===Fr.SyntaxKind.TaggedTemplateExpression},t.isTemplateExpression=function(e){return e.kind===Fr.SyntaxKind.TemplateExpression},t.isTemplateLiteral=function(e){return e.kind===Fr.SyntaxKind.TemplateExpression||e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isTextualLiteral=function(e){return e.kind===Fr.SyntaxKind.StringLiteral||e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isThrowStatement=function(e){return e.kind===Fr.SyntaxKind.ThrowStatement},t.isTryStatement=function(e){return e.kind===Fr.SyntaxKind.TryStatement},t.isTupleTypeNode=function(e){return e.kind===Fr.SyntaxKind.TupleType},t.isTypeAliasDeclaration=function(e){return e.kind===Fr.SyntaxKind.TypeAliasDeclaration},t.isTypeAssertion=function(e){return e.kind===Fr.SyntaxKind.TypeAssertionExpression},t.isTypeLiteralNode=function(e){return e.kind===Fr.SyntaxKind.TypeLiteral},t.isTypeOfExpression=function(e){return e.kind===Fr.SyntaxKind.TypeOfExpression},t.isTypeOperatorNode=function(e){return e.kind===Fr.SyntaxKind.TypeOperator},t.isTypeParameterDeclaration=function(e){return e.kind===Fr.SyntaxKind.TypeParameter},t.isTypePredicateNode=function(e){return e.kind===Fr.SyntaxKind.TypePredicate},t.isTypeReferenceNode=function(e){return e.kind===Fr.SyntaxKind.TypeReference},t.isTypeQueryNode=function(e){return e.kind===Fr.SyntaxKind.TypeQuery},t.isUnionTypeNode=function(e){return e.kind===Fr.SyntaxKind.UnionType},t.isVariableDeclaration=function(e){return e.kind===Fr.SyntaxKind.VariableDeclaration},t.isVariableStatement=function(e){return e.kind===Fr.SyntaxKind.VariableStatement},t.isVariableDeclarationList=function(e){return e.kind===Fr.SyntaxKind.VariableDeclarationList},t.isVoidExpression=function(e){return e.kind===Fr.SyntaxKind.VoidExpression},t.isWhileStatement=function(e){return e.kind===Fr.SyntaxKind.WhileStatement},t.isWithStatement=function(e){return e.kind===Fr.SyntaxKind.WithStatement}}));i(ta);ta.isAccessorDeclaration,ta.isArrayBindingPattern,ta.isArrayLiteralExpression,ta.isArrayTypeNode,ta.isArrowFunction,ta.isAsExpression,ta.isAssertionExpression,ta.isAwaitExpression,ta.isBinaryExpression,ta.isBindingElement,ta.isBindingPattern,ta.isBlock,ta.isBlockLike,ta.isBooleanLiteral,ta.isBreakOrContinueStatement,ta.isBreakStatement,ta.isCallExpression,ta.isCallLikeExpression,ta.isCallSignatureDeclaration,ta.isCaseBlock,ta.isCaseClause,ta.isCaseOrDefaultClause,ta.isCatchClause,ta.isClassDeclaration,ta.isClassExpression,ta.isClassLikeDeclaration,ta.isCommaListExpression,ta.isConditionalExpression,ta.isConditionalTypeNode,ta.isConstructorDeclaration,ta.isConstructorTypeNode,ta.isConstructSignatureDeclaration,ta.isContinueStatement,ta.isComputedPropertyName,ta.isDebuggerStatement,ta.isDecorator,ta.isDefaultClause,ta.isDeleteExpression,ta.isDoStatement,ta.isElementAccessExpression,ta.isEmptyStatement,ta.isEntityName,ta.isEntityNameExpression,ta.isEnumDeclaration,ta.isEnumMember,ta.isExportAssignment,ta.isExportDeclaration,ta.isExportSpecifier,ta.isExpression,ta.isExpressionStatement,ta.isExpressionWithTypeArguments,ta.isExternalModuleReference,ta.isForInStatement,ta.isForInOrOfStatement,ta.isForOfStatement,ta.isForStatement,ta.isFunctionDeclaration,ta.isFunctionExpression,ta.isFunctionTypeNode,ta.isGetAccessorDeclaration,ta.isIdentifier,ta.isIfStatement,ta.isImportClause,ta.isImportDeclaration,ta.isImportEqualsDeclaration,ta.isImportSpecifier,ta.isIndexedAccessTypeNode,ta.isIndexSignatureDeclaration,ta.isInferTypeNode,ta.isInterfaceDeclaration,ta.isIntersectionTypeNode,ta.isIterationStatement,ta.isJsDoc,ta.isJsxAttribute,ta.isJsxAttributeLike,ta.isJsxAttributes,ta.isJsxClosingElement,ta.isJsxClosingFragment,ta.isJsxElement,ta.isJsxExpression,ta.isJsxFragment,ta.isJsxOpeningElement,ta.isJsxOpeningFragment,ta.isJsxOpeningLikeElement,ta.isJsxSelfClosingElement,ta.isJsxSpreadAttribute,ta.isJsxText,ta.isLabeledStatement,ta.isLiteralExpression,ta.isLiteralTypeNode,ta.isMappedTypeNode,ta.isMetaProperty,ta.isMethodDeclaration,ta.isMethodSignature,ta.isModuleBlock,ta.isModuleDeclaration,ta.isNamedExports,ta.isNamedImports,ta.isNamespaceDeclaration,ta.isNamespaceImport,ta.isNamespaceExportDeclaration,ta.isNewExpression,ta.isNonNullExpression,ta.isNoSubstitutionTemplateLiteral,ta.isNullLiteral,ta.isNumericLiteral,ta.isNumericOrStringLikeLiteral,ta.isObjectBindingPattern,ta.isObjectLiteralExpression,ta.isOmittedExpression,ta.isParameterDeclaration,ta.isParenthesizedExpression,ta.isParenthesizedTypeNode,ta.isPostfixUnaryExpression,ta.isPrefixUnaryExpression,ta.isPropertyAccessExpression,ta.isPropertyAssignment,ta.isPropertyDeclaration,ta.isPropertySignature,ta.isQualifiedName,ta.isRegularExpressionLiteral,ta.isReturnStatement,ta.isSetAccessorDeclaration,ta.isShorthandPropertyAssignment,ta.isSignatureDeclaration,ta.isSourceFile,ta.isSpreadAssignment,ta.isSpreadElement,ta.isStringLiteral,ta.isSwitchStatement,ta.isSyntaxList,ta.isTaggedTemplateExpression,ta.isTemplateExpression,ta.isTemplateLiteral,ta.isTextualLiteral,ta.isThrowStatement,ta.isTryStatement,ta.isTupleTypeNode,ta.isTypeAliasDeclaration,ta.isTypeAssertion,ta.isTypeLiteralNode,ta.isTypeOfExpression,ta.isTypeOperatorNode,ta.isTypeParameterDeclaration,ta.isTypePredicateNode,ta.isTypeReferenceNode,ta.isTypeQueryNode,ta.isUnionTypeNode,ta.isVariableDeclaration,ta.isVariableStatement,ta.isVariableDeclarationList,ta.isVoidExpression,ta.isWhileStatement,ta.isWithStatement;var ra=o(ea),na=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ta,t),t.isImportTypeNode=function(e){return e.kind===Fr.SyntaxKind.ImportType}}));i(na);na.isImportTypeNode;var ia=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(na,t),t.isOptionalTypeNode=function(e){return e.kind===Fr.SyntaxKind.OptionalType},t.isRestTypeNode=function(e){return e.kind===Fr.SyntaxKind.RestType},t.isSyntheticExpression=function(e){return e.kind===Fr.SyntaxKind.SyntheticExpression}}));i(ia);ia.isOptionalTypeNode,ia.isRestTypeNode,ia.isSyntheticExpression;var aa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ia,t),t.isBigIntLiteral=function(e){return e.kind===Fr.SyntaxKind.BigIntLiteral}}));i(aa);aa.isBigIntLiteral;var oa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(aa,t)}));i(oa);var sa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isConditionalType=function(e){return 0!=(e.flags&Fr.TypeFlags.Conditional)},t.isEnumType=function(e){return 0!=(e.flags&Fr.TypeFlags.Enum)},t.isGenericType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.ClassOrInterface)&&0!=(e.objectFlags&Fr.ObjectFlags.Reference)},t.isIndexedAccessType=function(e){return 0!=(e.flags&Fr.TypeFlags.IndexedAccess)},t.isIndexedAccessype=function(e){return 0!=(e.flags&Fr.TypeFlags.Index)},t.isInstantiableType=function(e){return 0!=(e.flags&Fr.TypeFlags.Instantiable)},t.isInterfaceType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.ClassOrInterface)},t.isIntersectionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Intersection)},t.isLiteralType=function(e){return 0!=(e.flags&(Fr.TypeFlags.StringOrNumberLiteral|Fr.TypeFlags.BigIntLiteral))},t.isObjectType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)},t.isSubstitutionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Substitution)},t.isTypeParameter=function(e){return 0!=(e.flags&Fr.TypeFlags.TypeParameter)},t.isTypeReference=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.Reference)},t.isTypeVariable=function(e){return 0!=(e.flags&Fr.TypeFlags.TypeVariable)},t.isUnionOrIntersectionType=function(e){return 0!=(e.flags&Fr.TypeFlags.UnionOrIntersection)},t.isUnionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Union)},t.isUniqueESSymbolType=function(e){return 0!=(e.flags&Fr.TypeFlags.UniqueESSymbol)}}));i(sa);sa.isConditionalType,sa.isEnumType,sa.isGenericType,sa.isIndexedAccessType,sa.isIndexedAccessype,sa.isInstantiableType,sa.isInterfaceType,sa.isIntersectionType,sa.isLiteralType,sa.isObjectType,sa.isSubstitutionType,sa.isTypeParameter,sa.isTypeReference,sa.isTypeVariable,sa.isUnionOrIntersectionType,sa.isUnionType,sa.isUniqueESSymbolType;var ca=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(sa,t)}));i(ca);var ua=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ca,t);var r=ca;function n(e){return 0!==(e.flags&Fr.TypeFlags.Object&&e.objectFlags&Fr.ObjectFlags.Tuple)}t.isTupleType=n,t.isTupleTypeReference=function(e){return r.isTypeReference(e)&&n(e.target)}}));i(ua);ua.isTupleType,ua.isTupleTypeReference;var la=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ua,t)}));i(la);var _a=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(la,t)}));i(_a);var da=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(oa,t),ra.__exportStar(_a,t)}));i(da);var pa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(aa,t),ra.__exportStar(la,t)}));i(pa);var fa=a((function(e,t){function r(e,t){if(!n(t,Fr.TypeFlags.Undefined))return t;var r=n(t,Fr.TypeFlags.Null);return t=e.getNonNullableType(t),r?e.getNullableType(t,Fr.TypeFlags.Null):t}function n(e,t){var r=!0,n=!1,i=void 0;try{for(var o,s=a(e)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(ma.isTypeFlagSet(c,t))return!0}}catch(e){n=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw i}}return!1}function i(e,t,r){var n;return r|=Fr.TypeFlags.Any,function t(i){if(_a.isTypeParameter(i)&&void 0!==i.symbol&&void 0!==i.symbol.declarations){if(void 0===n)n=new Set([i]);else{if(n.has(i))return!1;n.add(i)}var a=i.symbol.declarations[0];return void 0===a.constraint||t(e.getTypeFromTypeNode(a.constraint))}return _a.isUnionType(i)?i.types.every(t):_a.isIntersectionType(i)?i.types.some(t):ma.isTypeFlagSet(i,r)}(t)}function a(e){return _a.isUnionType(e)?e.types:[e]}function o(e,t,r){return t(e)?e.types.some(r):r(e)}function s(e,t,r){var n=e.getApparentType(e.getTypeOfSymbolAtLocation(t,r));if(t.valueDeclaration.dotDotDotToken&&void 0===(n=n.getNumberIndexType()))return!1;var i=!0,o=!1,s=void 0;try{for(var c,u=a(n)[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){if(0!==c.value.getCallSignatures().length)return!0}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return!1}function c(e,t){return ma.isTypeFlagSet(e,Fr.TypeFlags.BooleanLiteral)&&e.intrinsicName===(t?"true":"false")}function u(e,t){return t.startsWith("__")?e.getProperties().find((function(e){return e.escapedName===t})):e.getProperty(t)}function l(e,t,r){var n=!1,i=!1,o=!0,s=!1,c=void 0;try{for(var l,d=a(e)[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var p=l.value;if(void 0===u(p,t)){var f=(ma.isNumericPropertyName(t)?r.getIndexInfoOfType(p,Fr.IndexKind.Number):void 0)||r.getIndexInfoOfType(p,Fr.IndexKind.String);if(void 0!==f&&f.isReadonly){if(n)return!0;i=!0}}else{if(i||_(p,t,r))return!0;n=!0}}}catch(e){s=!0,c=e}finally{try{o||null==d.return||d.return()}finally{if(s)throw c}}return!1}function _(e,t,r){return o(e,_a.isIntersectionType,(function(e){var n=u(e,t);if(void 0===n)return!1;if(n.flags&Fr.SymbolFlags.Transient){if(/^(?:[1-9]\d*|0)$/.test(t)&&_a.isTupleTypeReference(e))return e.target.readonly;switch(function(e,t,r){if(!_a.isObjectType(e)||!ma.isObjectFlagSet(e,Fr.ObjectFlags.Mapped))return;var n=e.symbol.declarations[0];return void 0===n.readonlyToken||/^__@[^@]+$/.test(t)?l(e.modifiersType,t,r):n.readonlyToken.kind!==Fr.SyntaxKind.MinusToken}(e,t,r)){case!0:return!0;case!1:return!1}}return ma.isSymbolFlagSet(n,Fr.SymbolFlags.ValueModule)||d(n,r)}))}function d(e,t){return(e.flags&Fr.SymbolFlags.Accessor)===Fr.SymbolFlags.GetAccessor||void 0!==e.declarations&&e.declarations.some((function(e){return ma.isModifierFlagSet(e,Fr.ModifierFlags.Readonly)||oa.isVariableDeclaration(e)&&ma.isNodeFlagSet(e.parent,Fr.NodeFlags.Const)||oa.isCallExpression(e)&&ma.isReadonlyAssignmentDeclaration(e,t)||oa.isEnumMember(e)||(oa.isPropertyAssignment(e)||oa.isShorthandPropertyAssignment(e))&&ma.isInConstContext(e.parent)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyObjectType=function e(t){if(_a.isObjectType(t)&&t.objectFlags&Fr.ObjectFlags.Anonymous&&0===t.getProperties().length&&0===t.getCallSignatures().length&&0===t.getConstructSignatures().length&&void 0===t.getStringIndexType()&&void 0===t.getNumberIndexType()){var r=t.getBaseTypes();return void 0===r||r.every(e)}return!1},t.removeOptionalityFromType=r,t.isTypeAssignableToNumber=function(e,t){return i(e,t,Fr.TypeFlags.NumberLike)},t.isTypeAssignableToString=function(e,t){return i(e,t,Fr.TypeFlags.StringLike)},t.getCallSignaturesOfType=function e(t){if(_a.isUnionType(t)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t.types[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;r.push.apply(r,E(e(c)))}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}if(_a.isIntersectionType(t)){var u,l=!0,_=!1,d=void 0;try{for(var p,f=t.types[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var m=e(p.value);if(0!==m.length){if(void 0!==u)return[];u=m}}}catch(e){_=!0,d=e}finally{try{l||null==f.return||f.return()}finally{if(_)throw d}}return void 0===u?[]:u}return t.getCallSignatures()},t.unionTypeParts=a,t.intersectionTypeParts=function(e){return _a.isIntersectionType(e)?e.types:[e]},t.someTypePart=o,t.isThenableType=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getTypeAtLocation(t),n=!0,i=!1,o=void 0;try{for(var c,u=a(e.getApparentType(r))[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var l=c.value.getProperty("then");if(void 0!==l){var _=e.getTypeOfSymbolAtLocation(l,t),d=!0,p=!1,f=void 0;try{for(var m,g=a(_)[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){var y=m.value,h=!0,v=!1,b=void 0;try{for(var x,D=y.getCallSignatures()[Symbol.iterator]();!(h=(x=D.next()).done);h=!0){var S=x.value;if(0!==S.parameters.length&&s(e,S.parameters[0],t))return!0}}catch(e){v=!0,b=e}finally{try{h||null==D.return||D.return()}finally{if(v)throw b}}}}catch(e){p=!0,f=e}finally{try{d||null==g.return||g.return()}finally{if(p)throw f}}}}}catch(e){i=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}return!1},t.isFalsyType=function(e){return!!(e.flags&(Fr.TypeFlags.Undefined|Fr.TypeFlags.Null|Fr.TypeFlags.Void))||(_a.isLiteralType(e)?!e.value:c(e,!1))},t.isBooleanLiteralType=c,t.getPropertyOfType=u,t.isPropertyReadonlyInType=l,t.symbolHasReadonlyDeclaration=d,t.getPropertyNameFromType=function(e){if(e.flags&(Fr.TypeFlags.StringLiteral|Fr.TypeFlags.NumberLiteral)){var t=String(e.value);return{displayName:t,symbolName:Fr.escapeLeadingUnderscores(t)}}if(_a.isUniqueESSymbolType(e))return{displayName:"[".concat(e.symbol?e.symbol.name:e.escapedName.replace(/^__@|@\d+$/g,""),"]"),symbolName:e.escapedName}},t.getConstructorTypeOfClassLikeDeclaration=function(e,t){return t.getDeclaredTypeOfSymbol(void 0!==e.name?t.getSymbolAtLocation(e.name):t.getTypeAtLocation(e).symbol)},t.getInstanceTypeOfClassLikeDeclaration=function(e,t){return e.kind===Fr.SyntaxKind.ClassDeclaration?t.getTypeAtLocation(e):t.getTypeOfSymbolAtLocation(t.getTypeAtLocation(e).getProperty("prototype"),e)},t.getIteratorYieldResultFromIteratorResult=function(e,t,n){return _a.isUnionType(e)&&e.types.find((function(e){var i=e.getProperty("done");return void 0!==i&&c(r(n,n.getTypeOfSymbolAtLocation(i,t)),!1)}))||e}}));i(fa);fa.isEmptyObjectType,fa.removeOptionalityFromType,fa.isTypeAssignableToNumber,fa.isTypeAssignableToString,fa.getCallSignaturesOfType,fa.unionTypeParts,fa.intersectionTypeParts,fa.someTypePart,fa.isThenableType,fa.isFalsyType,fa.isBooleanLiteralType,fa.getPropertyOfType,fa.isPropertyReadonlyInType,fa.symbolHasReadonlyDeclaration,fa.getPropertyNameFromType,fa.getConstructorTypeOfClassLikeDeclaration,fa.getInstanceTypeOfClassLikeDeclaration,fa.getIteratorYieldResultFromIteratorResult;var ma=a((function(e,t){function r(e){return e>=Fr.SyntaxKind.FirstToken&&e<=Fr.SyntaxKind.LastToken}function n(e){return e>=Fr.SyntaxKind.FirstAssignment&&e<=Fr.SyntaxKind.LastAssignment}function i(e){if(void 0===e)return!1;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=!0,a=!1,o=void 0;try{for(var s,c=e[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;if(r.includes(u.kind))return!0}}catch(e){a=!0,o=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}return!1}function a(e,t){return 0!=(e.flags&t)}function o(e,t,n,i){if(!(t<e.pos||t>=e.end))return r(e.kind)?e:(void 0===n&&(n=e.getSourceFile()),s(e,t,n,!0===i))}function s(e,t,n,i){e:for(;;){var a=!0,o=!1,s=void 0;try{for(var c,u=e.getChildren(n)[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value;if(l.end>t&&(i||l.kind!==Fr.SyntaxKind.JSDocComment)){if(r(l.kind))return l;e=l;continue e}}}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return}}function c(e,t){var r=o(arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,t,e);if(!(void 0===r||r.kind===Fr.SyntaxKind.JsxText||t>=r.end-(Fr.tokenToString(r.kind)||"").length)){var n=0===r.pos?(Fr.getShebang(e.text)||"").length:r.pos;return 0!==n&&Fr.forEachTrailingCommentRange(e.text,n,u,t)||Fr.forEachLeadingCommentRange(e.text,n,u,t)}}function u(e,t,r,n,i){return i>=e&&i<t?{pos:e,end:t,kind:r}:void 0}function l(e){if(e.kind===Fr.SyntaxKind.ComputedPropertyName){if(!oa.isLiteralExpression(e.expression))return;return pa.isBigIntLiteral(e.expression)?e.expression.text.slice(0,-1):e.expression.text}return e.text}function _(e,t){var r=!0,n=!1,i=void 0;try{for(var a,o=e.elements[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s.kind===Fr.SyntaxKind.BindingElement){var c=void 0;if(c=s.name.kind===Fr.SyntaxKind.Identifier?t(s):_(s.name,t))return c}}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}var d;function p(e){return 0!=(e.flags&Fr.NodeFlags.BlockScoped)}function f(e){switch(e.kind){case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:case Fr.SyntaxKind.MappedType:return 4;case Fr.SyntaxKind.ConditionalType:return 8;default:return 0}}function g(e){switch(e.kind){case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.Constructor:case Fr.SyntaxKind.ModuleDeclaration:case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.EnumDeclaration:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.MethodSignature:case Fr.SyntaxKind.CallSignature:case Fr.SyntaxKind.ConstructSignature:case Fr.SyntaxKind.ConstructorType:case Fr.SyntaxKind.FunctionType:return 1;case Fr.SyntaxKind.SourceFile:return Fr.isExternalModule(e)?1:0;default:return 0}}function h(e){switch(e.kind){case Fr.SyntaxKind.Block:var t=e.parent;return t.kind===Fr.SyntaxKind.CatchClause||t.kind!==Fr.SyntaxKind.SourceFile&&g(t)?0:2;case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.CaseBlock:case Fr.SyntaxKind.CatchClause:case Fr.SyntaxKind.WithStatement:return 2;default:return 0}}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();return function e(i){return r(i.kind)?t(i):i.kind!==Fr.SyntaxKind.JSDocComment?i.getChildren(n).forEach(e):void 0}(e)}function b(e){return e.kind===Fr.SyntaxKind.JsxElement||e.kind===Fr.SyntaxKind.JsxFragment}function x(e,t){return void 0===d?d=Fr.createScanner(t,!1,void 0,e):(d.setScriptTarget(t),d.setText(e)),d.scan(),d}function D(e){return e>=65536?2:1}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(0===e.length)return!1;var r=e.codePointAt(0);if(!Fr.isIdentifierStart(r,t))return!1;for(var n=D(r);n<e.length;n+=D(r))if(r=e.codePointAt(n),!Fr.isIdentifierPart(r,t))return!1;return!0}function T(e,t,r){return Fr.getLineAndCharacterOfPosition(e,t).line===Fr.getLineAndCharacterOfPosition(e,r).line}function E(e,t){switch(e.kind){case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.PostfixUnaryExpression:case Fr.SyntaxKind.AwaitExpression:case Fr.SyntaxKind.YieldExpression:case Fr.SyntaxKind.DeleteExpression:return!0;case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.AsExpression:case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.NonNullExpression:case Fr.SyntaxKind.VoidExpression:case Fr.SyntaxKind.TypeOfExpression:case Fr.SyntaxKind.PropertyAccessExpression:case Fr.SyntaxKind.SpreadElement:case Fr.SyntaxKind.PartiallyEmittedExpression:return E(e.expression,t);case Fr.SyntaxKind.BinaryExpression:return n(e.operatorToken.kind)||E(e.left,t)||E(e.right,t);case Fr.SyntaxKind.PrefixUnaryExpression:switch(e.operator){case Fr.SyntaxKind.PlusPlusToken:case Fr.SyntaxKind.MinusMinusToken:return!0;default:return E(e.operand,t)}case Fr.SyntaxKind.ElementAccessExpression:return E(e.expression,t)||void 0!==e.argumentExpression&&E(e.argumentExpression,t);case Fr.SyntaxKind.ConditionalExpression:return E(e.condition,t)||E(e.whenTrue,t)||E(e.whenFalse,t);case Fr.SyntaxKind.NewExpression:if(2&t||E(e.expression,t))return!0;if(void 0!==e.arguments){var r=!0,i=!1,a=void 0;try{for(var o,s=e.arguments[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){if(E(o.value,t))return!0}}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}}return!1;case Fr.SyntaxKind.TaggedTemplateExpression:if(1&t||E(e.tag,t))return!0;if(e.template.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral)return!1;e=e.template;case Fr.SyntaxKind.TemplateExpression:var c=!0,u=!1,l=void 0;try{for(var _,d=e.templateSpans[Symbol.iterator]();!(c=(_=d.next()).done);c=!0){if(E(_.value.expression,t))return!0}}catch(e){u=!0,l=e}finally{try{c||null==d.return||d.return()}finally{if(u)throw l}}return!1;case Fr.SyntaxKind.ClassExpression:return function(e,t){if(void 0!==e.heritageClauses&&e.heritageClauses[0].token===Fr.SyntaxKind.ExtendsKeyword){var r=!0,n=!1,i=void 0;try{for(var a,o=e.heritageClauses[0].types[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){if(E(a.value.expression,t))return!0}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}var s=!0,c=!1,u=void 0;try{for(var l,_=e.members[Symbol.iterator]();!(s=(l=_.next()).done);s=!0){var d=l.value;if(void 0!==d.name&&d.name.kind===Fr.SyntaxKind.ComputedPropertyName&&E(d.name.expression,t)||oa.isPropertyDeclaration(d)&&void 0!==d.initializer&&E(d.initializer,t))return!0}}catch(e){c=!0,u=e}finally{try{s||null==_.return||_.return()}finally{if(c)throw u}}return!1}(e,t);case Fr.SyntaxKind.ArrayLiteralExpression:var p=!0,f=!1,m=void 0;try{for(var g,y=e.elements[Symbol.iterator]();!(p=(g=y.next()).done);p=!0){if(E(g.value,t))return!0}}catch(e){f=!0,m=e}finally{try{p||null==y.return||y.return()}finally{if(f)throw m}}return!1;case Fr.SyntaxKind.ObjectLiteralExpression:var h=!0,v=!1,b=void 0;try{for(var x,D=e.properties[Symbol.iterator]();!(h=(x=D.next()).done);h=!0){var S=x.value;if(void 0!==S.name&&S.name.kind===Fr.SyntaxKind.ComputedPropertyName&&E(S.name.expression,t))return!0;switch(S.kind){case Fr.SyntaxKind.PropertyAssignment:if(E(S.initializer,t))return!0;break;case Fr.SyntaxKind.SpreadAssignment:if(E(S.expression,t))return!0}}}catch(e){v=!0,b=e}finally{try{h||null==D.return||D.return()}finally{if(v)throw b}}return!1;case Fr.SyntaxKind.JsxExpression:return void 0!==e.expression&&E(e.expression,t);case Fr.SyntaxKind.JsxElement:case Fr.SyntaxKind.JsxFragment:var T=!0,C=!1,k=void 0;try{for(var N,A=e.children[Symbol.iterator]();!(T=(N=A.next()).done);T=!0){var F=N.value;if(F.kind!==Fr.SyntaxKind.JsxText&&E(F,t))return!0}}catch(e){C=!0,k=e}finally{try{T||null==A.return||A.return()}finally{if(C)throw k}}if(e.kind===Fr.SyntaxKind.JsxFragment)return!1;e=e.openingElement;case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.JsxOpeningElement:if(4&t)return!0;var P=!0,w=!1,I=void 0;try{for(var O,M=e.attributes.properties[Symbol.iterator]();!(P=(O=M.next()).done);P=!0){var L=O.value;if(L.kind===Fr.SyntaxKind.JsxSpreadAttribute){if(E(L.expression,t))return!0}else if(void 0!==L.initializer&&E(L.initializer,t))return!0}}catch(e){w=!0,I=e}finally{try{P||null==M.return||M.return()}finally{if(w)throw I}}return!1;case Fr.SyntaxKind.CommaListExpression:var R=!0,B=!1,j=void 0;try{for(var K,J=e.elements[Symbol.iterator]();!(R=(K=J.next()).done);R=!0){if(E(K.value,t))return!0}}catch(e){B=!0,j=e}finally{try{R||null==J.return||J.return()}finally{if(B)throw j}}return!1;default:return!1}}function C(e){switch(e.kind){case Fr.SyntaxKind.ShorthandPropertyAssignment:if(void 0!==e.objectAssignmentInitializer)return!0;case Fr.SyntaxKind.PropertyAssignment:case Fr.SyntaxKind.SpreadAssignment:e=e.parent;break;case Fr.SyntaxKind.SpreadElement:if(e.parent.kind!==Fr.SyntaxKind.ArrayLiteralExpression)return!1;e=e.parent}for(;;)switch(e.parent.kind){case Fr.SyntaxKind.BinaryExpression:return e.parent.left===e&&e.parent.operatorToken.kind===Fr.SyntaxKind.EqualsToken;case Fr.SyntaxKind.ForOfStatement:return e.parent.initializer===e;case Fr.SyntaxKind.ArrayLiteralExpression:case Fr.SyntaxKind.ObjectLiteralExpression:e=e.parent;break;case Fr.SyntaxKind.SpreadAssignment:case Fr.SyntaxKind.PropertyAssignment:e=e.parent.parent;break;case Fr.SyntaxKind.SpreadElement:if(e.parent.parent.kind!==Fr.SyntaxKind.ArrayLiteralExpression)return!1;e=e.parent.parent;break;default:return!1}}function k(e){var t=e.parent;switch(t.kind){case Fr.SyntaxKind.DeleteExpression:return 4;case Fr.SyntaxKind.PostfixUnaryExpression:return 3;case Fr.SyntaxKind.PrefixUnaryExpression:return t.operator===Fr.SyntaxKind.PlusPlusToken||t.operator===Fr.SyntaxKind.MinusMinusToken?3:1;case Fr.SyntaxKind.BinaryExpression:return t.right===e?1:n(t.operatorToken.kind)?t.operatorToken.kind===Fr.SyntaxKind.EqualsToken?2:3:1;case Fr.SyntaxKind.ShorthandPropertyAssignment:return t.objectAssignmentInitializer===e?1:C(t)?2:1;case Fr.SyntaxKind.PropertyAssignment:return t.name===e?0:C(t)?2:1;case Fr.SyntaxKind.ArrayLiteralExpression:case Fr.SyntaxKind.SpreadElement:case Fr.SyntaxKind.SpreadAssignment:return C(t)?2:1;case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.NonNullExpression:case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.AsExpression:return k(t);case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.ForInStatement:return t.initializer===e?2:1;case Fr.SyntaxKind.ExpressionWithTypeArguments:return t.parent.token===Fr.SyntaxKind.ExtendsKeyword&&t.parent.parent.kind!==Fr.SyntaxKind.InterfaceDeclaration?1:0;case Fr.SyntaxKind.ComputedPropertyName:case Fr.SyntaxKind.ExpressionStatement:case Fr.SyntaxKind.TypeOfExpression:case Fr.SyntaxKind.ElementAccessExpression:case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.IfStatement:case Fr.SyntaxKind.DoStatement:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.SwitchStatement:case Fr.SyntaxKind.WithStatement:case Fr.SyntaxKind.ThrowStatement:case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.TaggedTemplateExpression:case Fr.SyntaxKind.JsxExpression:case Fr.SyntaxKind.Decorator:case Fr.SyntaxKind.TemplateSpan:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.JsxSpreadAttribute:case Fr.SyntaxKind.VoidExpression:case Fr.SyntaxKind.ReturnStatement:case Fr.SyntaxKind.AwaitExpression:case Fr.SyntaxKind.YieldExpression:case Fr.SyntaxKind.ConditionalExpression:case Fr.SyntaxKind.CaseClause:case Fr.SyntaxKind.JsxElement:return 1;case Fr.SyntaxKind.ArrowFunction:return t.body===e?1:2;case Fr.SyntaxKind.PropertyDeclaration:case Fr.SyntaxKind.VariableDeclaration:case Fr.SyntaxKind.Parameter:case Fr.SyntaxKind.EnumMember:case Fr.SyntaxKind.BindingElement:case Fr.SyntaxKind.JsxAttribute:return t.initializer===e?1:0;case Fr.SyntaxKind.PropertyAccessExpression:return t.expression===e?1:0;case Fr.SyntaxKind.ExportAssignment:return t.isExportEquals?1:0}return 0}function N(e){switch(e.kind){case Fr.SyntaxKind.Parameter:case Fr.SyntaxKind.CallSignature:case Fr.SyntaxKind.ConstructSignature:case Fr.SyntaxKind.MethodSignature:case Fr.SyntaxKind.PropertySignature:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.SpreadAssignment:case Fr.SyntaxKind.ShorthandPropertyAssignment:case Fr.SyntaxKind.PropertyAssignment:case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.LabeledStatement:case Fr.SyntaxKind.ExpressionStatement:case Fr.SyntaxKind.VariableStatement:case Fr.SyntaxKind.Constructor:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.PropertyDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:case Fr.SyntaxKind.EnumMember:case Fr.SyntaxKind.EnumDeclaration:case Fr.SyntaxKind.ModuleDeclaration:case Fr.SyntaxKind.ImportEqualsDeclaration:case Fr.SyntaxKind.IndexSignature:case Fr.SyntaxKind.FunctionType:case Fr.SyntaxKind.ConstructorType:case Fr.SyntaxKind.JSDocFunctionType:case Fr.SyntaxKind.EndOfFileToken:case Fr.SyntaxKind.ExportDeclaration:return!0;default:return!1}}function A(e,t){if(e.kind===Fr.SyntaxKind.EndOfFileToken)return F(e,t||e.parent);var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e.getChildren(t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;if(!oa.isJsDoc(c))break;r.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}function F(e,t,r){var n=e.getStart(t),i=Fr[r&&T(t,e.pos,n)?"forEachTrailingCommentRange":"forEachLeadingCommentRange"](t.text,e.pos,(function(e,r,n){return n===Fr.SyntaxKind.MultiLineCommentTrivia&&"*"===t.text[e+2]?{pos:e}:void 0}));if(void 0===i)return[];var a=i.pos,o=t.text.slice(a,n),s=Fr.createSourceFile("jsdoc.ts","".concat(o,"var a;"),t.languageVersion),c=A(s.statements[0],s),u=!0,l=!1,_=void 0;try{for(var d,p=c[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){f(d.value,e)}}catch(e){l=!0,_=e}finally{try{u||null==p.return||p.return()}finally{if(l)throw _}}return c;function f(e,t){return e.pos+=a,e.end+=a,e.parent=t,Fr.forEachChild(e,(function(t){return f(t,e)}),(function(t){t.pos+=a,t.end+=a;var r=!0,n=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){f(o.value,e)}}catch(e){n=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw i}}}))}}function P(e,t){return new w(e,t).find()}Object.defineProperty(t,"__esModule",{value:!0}),t.getChildOfKind=function(e,t,r){var n=!0,i=!1,a=void 0;try{for(var o,s=e.getChildren(r)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;if(c.kind===t)return c}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}},t.isTokenKind=r,t.isNodeKind=function(e){return e>=Fr.SyntaxKind.FirstNode},t.isAssignmentKind=n,t.isTypeNodeKind=function(e){return e>=Fr.SyntaxKind.FirstTypeNode&&e<=Fr.SyntaxKind.LastTypeNode},t.isJsDocKind=function(e){return e>=Fr.SyntaxKind.FirstJSDocNode&&e<=Fr.SyntaxKind.LastJSDocNode},t.isKeywordKind=function(e){return e>=Fr.SyntaxKind.FirstKeyword&&e<=Fr.SyntaxKind.LastKeyword},t.isThisParameter=function(e){return e.name.kind===Fr.SyntaxKind.Identifier&&e.name.originalKeywordKind===Fr.SyntaxKind.ThisKeyword},t.getModifier=function(e,t){if(void 0!==e.modifiers){var r=!0,n=!1,i=void 0;try{for(var a,o=e.modifiers[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s.kind===t)return s}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},t.hasModifier=i,t.isParameterProperty=function(e){return i(e.modifiers,Fr.SyntaxKind.PublicKeyword,Fr.SyntaxKind.ProtectedKeyword,Fr.SyntaxKind.PrivateKeyword,Fr.SyntaxKind.ReadonlyKeyword)},t.hasAccessModifier=function(e){return i(e.modifiers,Fr.SyntaxKind.PublicKeyword,Fr.SyntaxKind.ProtectedKeyword,Fr.SyntaxKind.PrivateKeyword)},t.isNodeFlagSet=a,t.isTypeFlagSet=a,t.isSymbolFlagSet=a,t.isObjectFlagSet=function(e,t){return 0!=(e.objectFlags&t)},t.isModifierFlagSet=function(e,t){return 0!=(Fr.getCombinedModifierFlags(e)&t)},t.getPreviousStatement=function(e){var t=e.parent;if(oa.isBlockLike(t)){var r=t.statements.indexOf(e);if(r>0)return t.statements[r-1]}},t.getNextStatement=function(e){var t=e.parent;if(oa.isBlockLike(t)){var r=t.statements.indexOf(e);if(r<t.statements.length)return t.statements[r+1]}},t.getPreviousToken=function(e,t){for(var n=e.parent;void 0!==n&&n.pos===e.pos;)n=n.parent;if(void 0!==n)e:for(;;){for(var i=n.getChildren(t),a=i.length-1;a>=0;--a){var o=i[a];if(o.pos<e.pos&&o.kind!==Fr.SyntaxKind.JSDocComment){if(r(o.kind))return o;n=o;continue e}}return}},t.getNextToken=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getSourceFile();if(e.kind!==Fr.SyntaxKind.SourceFile&&e.kind!==Fr.SyntaxKind.EndOfFileToken){var r=e.end;for(e=e.parent;e.end===r;){if(void 0===e.parent)return e.endOfFileToken;e=e.parent}return s(e,r,t,!1)}},t.getTokenAtPosition=o,t.getCommentAtPosition=c,t.isPositionInComment=function(e,t,r){return void 0!==c(e,t,r)},t.commentText=function(e,t){return e.substring(t.pos+2,t.kind===Fr.SyntaxKind.SingleLineCommentTrivia?t.end:t.end-2)},t.getWrappedNodeAtPosition=function(e,t){if(!(e.node.pos>t||e.node.end<=t))e:for(;;){var r=!0,n=!1,i=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s.node.pos>t)return e;if(s.node.end>t){e=s;continue e}}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return e}},t.getPropertyName=l,t.forEachDestructuringIdentifier=_,t.forEachDeclaredVariable=function(e,t){var r=!0,n=!1,i=void 0;try{for(var a,o=e.declarations[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value,c=void 0;if(c=s.name.kind===Fr.SyntaxKind.Identifier?t(s):_(s.name,t))return c}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}},function(e){e[e.Var=0]="Var",e[e.Let=1]="Let",e[e.Const=2]="Const"}(t.VariableDeclarationKind||(t.VariableDeclarationKind={})),t.getVariableDeclarationKind=function(e){return e.flags&Fr.NodeFlags.Let?1:e.flags&Fr.NodeFlags.Const?2:0},t.isBlockScopedVariableDeclarationList=p,t.isBlockScopedVariableDeclaration=function(e){var t=e.parent;return t.kind===Fr.SyntaxKind.CatchClause||p(t)},t.isBlockScopedDeclarationStatement=function(e){switch(e.kind){case Fr.SyntaxKind.VariableStatement:return p(e.declarationList);case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.EnumDeclaration:case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:return!0;default:return!1}},t.isInSingleStatementContext=function(e){switch(e.parent.kind){case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.DoStatement:case Fr.SyntaxKind.IfStatement:case Fr.SyntaxKind.WithStatement:case Fr.SyntaxKind.LabeledStatement:return!0;default:return!1}},function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.Block=2]="Block",e[e.Type=4]="Type",e[e.ConditionalType=8]="ConditionalType"}(t.ScopeBoundary||(t.ScopeBoundary={})),function(e){e[e.Function=1]="Function",e[e.Block=3]="Block",e[e.Type=7]="Type",e[e.InferType=8]="InferType"}(t.ScopeBoundarySelector||(t.ScopeBoundarySelector={})),t.isScopeBoundary=function(e){return g(e)||h(e)||f(e)},t.isTypeScopeBoundary=f,t.isFunctionScopeBoundary=g,t.isBlockScopeBoundary=h,t.hasOwnThisReference=function(e){switch(e.kind){case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.FunctionExpression:return!0;case Fr.SyntaxKind.FunctionDeclaration:return void 0!==e.body;case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:return e.parent.kind===Fr.SyntaxKind.ObjectLiteralExpression;default:return!1}},t.isFunctionWithBody=function(e){switch(e.kind){case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.Constructor:return void 0!==e.body;case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.ArrowFunction:return!0;default:return!1}},t.forEachToken=v,t.forEachTokenWithTrivia=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),n=r.text,i=Fr.createScanner(r.languageVersion,!1,r.languageVariant,n);return v(e,(function(e){var a=e.kind===Fr.SyntaxKind.JsxText||e.pos===e.end?e.pos:e.getStart(r);if(a!==e.pos){i.setTextPos(e.pos);for(var o=i.scan(),s=i.getTokenPos();s<a;){var c=i.getTextPos();if(t(n,o,{pos:s,end:c},e.parent),c===a)break;o=i.scan(),s=i.getTokenPos()}}return t(n,e.kind,{end:e.end,pos:a},e.parent)}),r)},t.forEachComment=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),n=r.text,i=r.languageVariant!==Fr.LanguageVariant.JSX;return v(e,(function(e){if(e.pos!==e.end)return e.kind!==Fr.SyntaxKind.JsxText&&Fr.forEachLeadingCommentRange(n,0===e.pos?(Fr.getShebang(n)||"").length:e.pos,a),i||function(e){switch(e.kind){case Fr.SyntaxKind.CloseBraceToken:return e.parent.kind!==Fr.SyntaxKind.JsxExpression||!b(e.parent.parent);case Fr.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Fr.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Fr.SyntaxKind.JsxOpeningFragment:return!1;case Fr.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!b(e.parent.parent);case Fr.SyntaxKind.JsxClosingElement:case Fr.SyntaxKind.JsxClosingFragment:return!b(e.parent.parent.parent)}}return!0}(e)?Fr.forEachTrailingCommentRange(n,e.end,a):void 0}),r);function a(e,r,i){t(n,{pos:e,end:r,kind:i})}},t.getLineRanges=function(e){for(var t=e.getLineStarts(),r=[],n=t.length,i=e.text,a=0,o=1;o<n;++o){for(var s=t[o],c=s;c>a&&Fr.isLineBreak(i.charCodeAt(c-1));--c);r.push({pos:a,end:s,contentLength:c-a}),a=s}return r.push({pos:a,end:e.end,contentLength:e.end-a}),r},t.getLineBreakStyle=function(e){var t=e.getLineStarts();return 1===t.length||t[1]<2||"\r"!==e.text[t[1]-2]?"\n":"\r\n"},t.isValidIdentifier=function(e){var t=x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest);return t.isIdentifier()&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidPropertyAccess=S,t.isValidPropertyName=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(S(e,t))return!0;var r=x(e,t);return r.getTextPos()===e.length&&r.getToken()===Fr.SyntaxKind.NumericLiteral&&r.getTokenValue()===e},t.isValidNumericLiteral=function(e){var t=x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest);return t.getToken()===Fr.SyntaxKind.NumericLiteral&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidJsxIdentifier=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(0===e.length)return!1;var r=e.codePointAt(0);if(!Fr.isIdentifierStart(r,t))return!1;for(var n=D(r);n<e.length;n+=D(r))if(r=e.codePointAt(n),!Fr.isIdentifierPart(r,t)&&45!==r)return!1;return!0},t.isNumericPropertyName=function(e){return String(+e)===e},t.isSameLine=T,function(e){e[e.None=0]="None",e[e.TaggedTemplate=1]="TaggedTemplate",e[e.Constructor=2]="Constructor",e[e.JsxElement=4]="JsxElement"}(t.SideEffectOptions||(t.SideEffectOptions={})),t.hasSideEffects=E,t.getDeclarationOfBindingElement=function(e){for(var t=e.parent.parent;t.kind===Fr.SyntaxKind.BindingElement;)t=t.parent.parent;return t},t.isExpressionValueUsed=function(e){for(;;){var t=e.parent;switch(t.kind){case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.ElementAccessExpression:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.DoStatement:case Fr.SyntaxKind.WithStatement:case Fr.SyntaxKind.ThrowStatement:case Fr.SyntaxKind.ReturnStatement:case Fr.SyntaxKind.JsxExpression:case Fr.SyntaxKind.JsxSpreadAttribute:case Fr.SyntaxKind.JsxElement:case Fr.SyntaxKind.JsxFragment:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.ComputedPropertyName:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.ExportSpecifier:case Fr.SyntaxKind.ExportAssignment:case Fr.SyntaxKind.ImportDeclaration:case Fr.SyntaxKind.ExternalModuleReference:case Fr.SyntaxKind.Decorator:case Fr.SyntaxKind.TaggedTemplateExpression:case Fr.SyntaxKind.TemplateSpan:case Fr.SyntaxKind.ExpressionWithTypeArguments:case Fr.SyntaxKind.TypeOfExpression:case Fr.SyntaxKind.AwaitExpression:case Fr.SyntaxKind.YieldExpression:case Fr.SyntaxKind.LiteralType:case Fr.SyntaxKind.JsxAttributes:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxClosingElement:case Fr.SyntaxKind.IfStatement:case Fr.SyntaxKind.CaseClause:case Fr.SyntaxKind.SwitchStatement:return!0;case Fr.SyntaxKind.PropertyAccessExpression:return t.expression===e;case Fr.SyntaxKind.QualifiedName:return t.left===e;case Fr.SyntaxKind.ShorthandPropertyAssignment:return t.objectAssignmentInitializer===e||!C(t);case Fr.SyntaxKind.PropertyAssignment:return t.initializer===e&&!C(t);case Fr.SyntaxKind.SpreadAssignment:case Fr.SyntaxKind.SpreadElement:case Fr.SyntaxKind.ArrayLiteralExpression:return!C(t);case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.AsExpression:case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.PostfixUnaryExpression:case Fr.SyntaxKind.PrefixUnaryExpression:case Fr.SyntaxKind.NonNullExpression:e=t;break;case Fr.SyntaxKind.ForStatement:return t.condition===e;case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.ForOfStatement:return t.expression===e;case Fr.SyntaxKind.ConditionalExpression:if(t.condition===e)return!0;e=t;break;case Fr.SyntaxKind.PropertyDeclaration:case Fr.SyntaxKind.BindingElement:case Fr.SyntaxKind.VariableDeclaration:case Fr.SyntaxKind.Parameter:case Fr.SyntaxKind.EnumMember:return t.initializer===e;case Fr.SyntaxKind.ImportEqualsDeclaration:return t.moduleReference===e;case Fr.SyntaxKind.CommaListExpression:if(t.elements[t.elements.length-1]!==e)return!1;e=t;break;case Fr.SyntaxKind.BinaryExpression:if(t.right===e){if(t.operatorToken.kind===Fr.SyntaxKind.CommaToken){e=t;break}return!0}switch(t.operatorToken.kind){case Fr.SyntaxKind.CommaToken:case Fr.SyntaxKind.EqualsToken:return!1;case Fr.SyntaxKind.EqualsEqualsEqualsToken:case Fr.SyntaxKind.EqualsEqualsToken:case Fr.SyntaxKind.ExclamationEqualsEqualsToken:case Fr.SyntaxKind.ExclamationEqualsToken:case Fr.SyntaxKind.InstanceOfKeyword:case Fr.SyntaxKind.PlusToken:case Fr.SyntaxKind.MinusToken:case Fr.SyntaxKind.AsteriskToken:case Fr.SyntaxKind.SlashToken:case Fr.SyntaxKind.PercentToken:case Fr.SyntaxKind.AsteriskAsteriskToken:case Fr.SyntaxKind.GreaterThanToken:case Fr.SyntaxKind.GreaterThanGreaterThanToken:case Fr.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:case Fr.SyntaxKind.GreaterThanEqualsToken:case Fr.SyntaxKind.LessThanToken:case Fr.SyntaxKind.LessThanLessThanToken:case Fr.SyntaxKind.LessThanEqualsToken:case Fr.SyntaxKind.AmpersandToken:case Fr.SyntaxKind.BarToken:case Fr.SyntaxKind.CaretToken:case Fr.SyntaxKind.BarBarToken:case Fr.SyntaxKind.AmpersandAmpersandToken:case Fr.SyntaxKind.InKeyword:return!0;default:e=t}break;default:return!1}}},function(e){e[e.None=0]="None",e[e.Read=1]="Read",e[e.Write=2]="Write",e[e.Delete=4]="Delete",e[e.ReadWrite=3]="ReadWrite",e[e.Modification=6]="Modification"}(t.AccessKind||(t.AccessKind={})),t.getAccessKind=k,t.isReassignmentTarget=function(e){return 0!=(2&k(e))},t.canHaveJsDoc=N,t.getJsDoc=A,t.parseJsDocOfNode=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();if(N(e)&&e.kind!==Fr.SyntaxKind.EndOfFileToken){var n=A(e,r);if(0!==n.length||!t)return n}return F(e,r,t)},function(e){e[e.ImportDeclaration=1]="ImportDeclaration",e[e.ImportEquals=2]="ImportEquals",e[e.ExportFrom=4]="ExportFrom",e[e.DynamicImport=8]="DynamicImport",e[e.Require=16]="Require",e[e.ImportType=32]="ImportType",e[e.All=63]="All",e[e.AllImports=59]="AllImports",e[e.AllStaticImports=3]="AllStaticImports",e[e.AllImportExpressions=24]="AllImportExpressions",e[e.AllRequireLike=18]="AllRequireLike",e[e.AllNestedImports=56]="AllNestedImports",e[e.AllTopLevelImports=7]="AllTopLevelImports"}(t.ImportKind||(t.ImportKind={})),t.findImports=function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=P(e,t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;switch(c.kind){case Fr.SyntaxKind.ImportDeclaration:u(c.moduleSpecifier);break;case Fr.SyntaxKind.ImportEqualsDeclaration:u(c.moduleReference.expression);break;case Fr.SyntaxKind.ExportDeclaration:u(c.moduleSpecifier);break;case Fr.SyntaxKind.CallExpression:u(c.arguments[0]);break;case Fr.SyntaxKind.ImportType:oa.isLiteralTypeNode(c.argument)&&u(c.argument.literal);break;default:throw new Error("unexpected node")}}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r;function u(e){oa.isTextualLiteral(e)&&r.push(e)}},t.findImportLikeNodes=P;var w=function(){function e(t,r){m(this,e),this._sourceFile=t,this._options=r,this._result=[]}return y(e,[{key:"find",value:function(){return this._sourceFile.isDeclarationFile&&(this._options&=-25),7&this._options&&this._findImports(this._sourceFile.statements),56&this._options&&this._findNestedImports(),this._result}},{key:"_findImports",value:function(e){var t=!0,r=!1,n=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;oa.isImportDeclaration(o)?1&this._options&&this._result.push(o):oa.isImportEqualsDeclaration(o)?2&this._options&&o.moduleReference.kind===Fr.SyntaxKind.ExternalModuleReference&&this._result.push(o):oa.isExportDeclaration(o)?void 0!==o.moduleSpecifier&&4&this._options&&this._result.push(o):oa.isModuleDeclaration(o)&&this._findImportsInModule(o)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"_findImportsInModule",value:function(e){if(void 0!==e.body)return e.body.kind===Fr.SyntaxKind.ModuleDeclaration?this._findImportsInModule(e.body):void this._findImports(e.body.statements)}},{key:"_findNestedImports",value:function(){var e;e=16==(56&this._options)?/\brequire\s*[</(]/g:16&this._options?/\b(?:import|require)\s*[</(]/g:/\bimport\s*[</(]/g;for(var t=0!=(this._sourceFile.flags&Fr.NodeFlags.JavaScriptFile),r=e.exec(this._sourceFile.text);null!==r;r=e.exec(this._sourceFile.text)){var n=s(this._sourceFile,r.index,this._sourceFile,"i"===r[0][0]&&t);if(n.kind===Fr.SyntaxKind.ImportKeyword){if(n.end-"import".length!==r.index)continue;switch(n.parent.kind){case Fr.SyntaxKind.ImportType:this._result.push(n.parent);break;case Fr.SyntaxKind.CallExpression:1===n.parent.arguments.length&&this._result.push(n.parent)}}else n.kind===Fr.SyntaxKind.Identifier&&n.end-"require".length===r.index&&n.parent.kind===Fr.SyntaxKind.CallExpression&&n.parent.expression===n&&1===n.parent.arguments.length&&this._result.push(n.parent)}}}]),e}();function I(e){for(;e.kind===Fr.SyntaxKind.ModuleBlock;){do{e=e.parent}while(e.flags&Fr.NodeFlags.NestedNamespace);if(i(e.modifiers,Fr.SyntaxKind.DeclareKeyword))return!0;e=e.parent}return!1}function O(e,t){return(e.strict?!1!==e[t]:!0===e[t])&&("strictPropertyInitialization"!==t||O(e,"strictNullChecks"))}function M(e){return oa.isTypeReferenceNode(e.type)&&e.type.typeName.kind===Fr.SyntaxKind.Identifier&&"const"===e.type.typeName.escapedText}function L(e){return 3===e.arguments.length&&oa.isEntityNameExpression(e.arguments[0])&&oa.isNumericOrStringLikeLiteral(e.arguments[1])&&oa.isPropertyAccessExpression(e.expression)&&"defineProperty"===e.expression.name.escapedText&&oa.isIdentifier(e.expression.expression)&&"Object"===e.expression.expression.escapedText}function R(e){return Fr.isPropertyAccessExpression(e)&&Fr.isIdentifier(e.expression)&&"Symbol"===e.expression.escapedText}function B(e){return{displayName:"[Symbol.".concat(e.name.text,"]"),symbolName:"__@"+e.name.text}}function j(e,t){var r={known:!0,names:[]};if(R(e=K(e)))r.names.push(B(e));else{var n=t.getTypeAtLocation(e),i=!0,a=!1,o=void 0;try{for(var s,c=fa.unionTypeParts(t.getBaseConstraintOfType(n)||n)[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value,l=fa.getPropertyNameFromType(u);l?r.names.push(l):r.known=!1}}catch(e){a=!0,o=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}}return r}function K(e){for(;e.kind===Fr.SyntaxKind.ParenthesizedExpression;)e=e.expression;return e}t.isStatementInAmbientContext=function(e){for(;e.flags&Fr.NodeFlags.NestedNamespace;)e=e.parent;return i(e.modifiers,Fr.SyntaxKind.DeclareKeyword)||I(e.parent)},t.isAmbientModuleBlock=I,t.getIIFE=function(e){for(var t=e.parent;t.kind===Fr.SyntaxKind.ParenthesizedExpression;)t=t.parent;return oa.isCallExpression(t)&&e.end<=t.expression.end?t:void 0},t.isStrictCompilerOptionEnabled=O,t.isCompilerOptionEnabled=function e(t,r){switch(r){case"stripInternal":return!0===t.stripInternal&&e(t,"declaration");case"declaration":return t.declaration||e(t,"composite");case"incremental":return void 0===t.incremental?e(t,"composite"):t.incremental;case"skipDefaultLibCheck":return t.skipDefaultLibCheck||e(t,"skipLibCheck");case"suppressImplicitAnyIndexErrors":return!0===t.suppressImplicitAnyIndexErrors&&e(t,"noImplicitAny");case"allowSyntheticDefaultImports":return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:e(t,"esModuleInterop")||t.module===Fr.ModuleKind.System;case"noImplicitAny":case"noImplicitThis":case"strictNullChecks":case"strictFunctionTypes":case"strictPropertyInitialization":case"alwaysStrict":case"strictBindCallApply":return O(t,r)}return!0===t[r]},t.isAmbientModule=function(e){return e.name.kind===Fr.SyntaxKind.StringLiteral||0!=(e.flags&Fr.NodeFlags.GlobalAugmentation)},t.getCheckJsDirective=function(e){var t;return Fr.forEachLeadingCommentRange(e,(Fr.getShebang(e)||"").length,(function(r,n,i){if(i===Fr.SyntaxKind.SingleLineCommentTrivia){var a=e.slice(r,n),o=/^\/{2,3}\s*@ts-(no)?check(?:\s|$)/i.exec(a);null!==o&&(t={pos:r,end:n,enabled:void 0===o[1]})}})),t},t.isConstAssertion=M,t.isInConstContext=function(e){for(var t=e;;){var r=t.parent;e:switch(r.kind){case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.AsExpression:return M(r);case Fr.SyntaxKind.PrefixUnaryExpression:if(t.kind!==Fr.SyntaxKind.NumericLiteral)return!1;switch(r.operator){case Fr.SyntaxKind.PlusToken:case Fr.SyntaxKind.MinusToken:t=r;break e;default:return!1}case Fr.SyntaxKind.PropertyAssignment:if(r.initializer!==t)return!1;t=r.parent;break;case Fr.SyntaxKind.ShorthandPropertyAssignment:t=r.parent;break;case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.ArrayLiteralExpression:case Fr.SyntaxKind.ObjectLiteralExpression:t=r;break;default:return!1}}},t.isReadonlyAssignmentDeclaration=function(e,t){if(!L(e))return!1;var r=t.getTypeAtLocation(e.arguments[2]);if(void 0===r.getProperty("value"))return void 0===r.getProperty("set");var n=r.getProperty("writable");if(void 0===n)return!1;var i=void 0!==n.valueDeclaration&&oa.isPropertyAssignment(n.valueDeclaration)?t.getTypeAtLocation(n.valueDeclaration.initializer):t.getTypeOfSymbolAtLocation(n,e.arguments[2]);return fa.isBooleanLiteralType(i,!1)},t.isBindableObjectDefinePropertyCall=L,t.isWellKnownSymbolLiterally=R,t.getPropertyNameOfWellKnownSymbol=B,t.getLateBoundPropertyNames=j,t.getLateBoundPropertyNamesOfPropertyName=function(e,t){var r=l(e);return void 0!==r?{known:!0,names:[{displayName:r,symbolName:Fr.escapeLeadingUnderscores(r)}]}:j(e.expression,t)},t.getSingleLateBoundPropertyNameOfPropertyName=function(e,t){var r=l(e);if(void 0!==r)return{displayName:r,symbolName:Fr.escapeLeadingUnderscores(r)};var n=e.expression;return R(n)?B(n):fa.getPropertyNameFromType(t.getTypeAtLocation(n))},t.unwrapParentheses=K}));i(ma);ma.getChildOfKind,ma.isTokenKind,ma.isNodeKind,ma.isAssignmentKind,ma.isTypeNodeKind,ma.isJsDocKind,ma.isKeywordKind,ma.isThisParameter,ma.getModifier,ma.hasModifier,ma.isParameterProperty,ma.hasAccessModifier,ma.isNodeFlagSet,ma.isTypeFlagSet,ma.isSymbolFlagSet,ma.isObjectFlagSet,ma.isModifierFlagSet,ma.getPreviousStatement,ma.getNextStatement,ma.getPreviousToken,ma.getNextToken,ma.getTokenAtPosition,ma.getCommentAtPosition,ma.isPositionInComment,ma.commentText,ma.getWrappedNodeAtPosition,ma.getPropertyName,ma.forEachDestructuringIdentifier,ma.forEachDeclaredVariable,ma.VariableDeclarationKind,ma.getVariableDeclarationKind,ma.isBlockScopedVariableDeclarationList,ma.isBlockScopedVariableDeclaration,ma.isBlockScopedDeclarationStatement,ma.isInSingleStatementContext,ma.ScopeBoundary,ma.ScopeBoundarySelector,ma.isScopeBoundary,ma.isTypeScopeBoundary,ma.isFunctionScopeBoundary,ma.isBlockScopeBoundary,ma.hasOwnThisReference,ma.isFunctionWithBody,ma.forEachToken,ma.forEachTokenWithTrivia,ma.forEachComment,ma.getLineRanges,ma.getLineBreakStyle,ma.isValidIdentifier,ma.isValidPropertyAccess,ma.isValidPropertyName,ma.isValidNumericLiteral,ma.isValidJsxIdentifier,ma.isNumericPropertyName,ma.isSameLine,ma.SideEffectOptions,ma.hasSideEffects,ma.getDeclarationOfBindingElement,ma.isExpressionValueUsed,ma.AccessKind,ma.getAccessKind,ma.isReassignmentTarget,ma.canHaveJsDoc,ma.getJsDoc,ma.parseJsDocOfNode,ma.ImportKind,ma.findImports,ma.findImportLikeNodes,ma.isStatementInAmbientContext,ma.isAmbientModuleBlock,ma.getIIFE,ma.isStrictCompilerOptionEnabled,ma.isCompilerOptionEnabled,ma.isAmbientModule,ma.getCheckJsDirective,ma.isConstAssertion,ma.isInConstContext,ma.isReadonlyAssignmentDeclaration,ma.isBindableObjectDefinePropertyCall,ma.isWellKnownSymbolLiterally,ma.getPropertyNameOfWellKnownSymbol,ma.getLateBoundPropertyNames,ma.getLateBoundPropertyNamesOfPropertyName,ma.getSingleLateBoundPropertyNameOfPropertyName,ma.unwrapParentheses;var ga=a((function(e,t){function r(e){var t=e.parent;switch(t.kind){case Fr.SyntaxKind.TypeReference:return e.originalKeywordKind!==Fr.SyntaxKind.ConstKeyword?2:void 0;case Fr.SyntaxKind.ExpressionWithTypeArguments:return t.parent.token===Fr.SyntaxKind.ImplementsKeyword||t.parent.parent.kind===Fr.SyntaxKind.InterfaceDeclaration?2:4;case Fr.SyntaxKind.TypeQuery:return 13;case Fr.SyntaxKind.QualifiedName:if(t.left===e)return function(e){var t=e.parent;for(;t.kind===Fr.SyntaxKind.QualifiedName;)t=t.parent;return t}(t).kind===Fr.SyntaxKind.TypeQuery?9:1;break;case Fr.SyntaxKind.ExportSpecifier:if(void 0===t.propertyName||t.propertyName===e)return 7;break;case Fr.SyntaxKind.ExportAssignment:return 7;case Fr.SyntaxKind.BindingElement:if(t.initializer===e)return 5;break;case Fr.SyntaxKind.Parameter:case Fr.SyntaxKind.EnumMember:case Fr.SyntaxKind.PropertyDeclaration:case Fr.SyntaxKind.VariableDeclaration:case Fr.SyntaxKind.PropertyAssignment:case Fr.SyntaxKind.PropertyAccessExpression:case Fr.SyntaxKind.ImportEqualsDeclaration:if(t.name!==e)return 5;break;case Fr.SyntaxKind.JsxAttribute:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.NamespaceImport:case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.ModuleDeclaration:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.EnumDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.LabeledStatement:case Fr.SyntaxKind.BreakStatement:case Fr.SyntaxKind.ContinueStatement:case Fr.SyntaxKind.ImportClause:case Fr.SyntaxKind.ImportSpecifier:case Fr.SyntaxKind.TypePredicate:case Fr.SyntaxKind.MethodSignature:case Fr.SyntaxKind.PropertySignature:case Fr.SyntaxKind.NamespaceExportDeclaration:case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:case Fr.SyntaxKind.TypeParameter:break;default:return 5}}function n(e){switch(e.parent.kind){case Fr.SyntaxKind.TypeParameter:case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:return 2;case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:return 6;case Fr.SyntaxKind.EnumDeclaration:return 7;case Fr.SyntaxKind.NamespaceImport:case Fr.SyntaxKind.ImportClause:return 15;case Fr.SyntaxKind.ImportEqualsDeclaration:case Fr.SyntaxKind.ImportSpecifier:return e.parent.name===e?15:void 0;case Fr.SyntaxKind.ModuleDeclaration:return 1;case Fr.SyntaxKind.Parameter:if(e.parent.parent.kind===Fr.SyntaxKind.IndexSignature||e.originalKeywordKind===Fr.SyntaxKind.ThisKeyword)return;case Fr.SyntaxKind.BindingElement:case Fr.SyntaxKind.VariableDeclaration:return e.parent.name===e?4:void 0;case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.FunctionExpression:return 4}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Namespace=1]="Namespace",e[e.Type=2]="Type",e[e.Value=4]="Value",e[e.Import=8]="Import",e[e.Any=7]="Any"}(t.DeclarationDomain||(t.DeclarationDomain={})),function(e){e[e.Namespace=1]="Namespace",e[e.Type=2]="Type",e[e.Value=4]="Value",e[e.ValueOrNamespace=5]="ValueOrNamespace",e[e.Any=7]="Any",e[e.TypeQuery=8]="TypeQuery"}(t.UsageDomain||(t.UsageDomain={})),t.getUsageDomain=r,t.getDeclarationDomain=n,t.collectVariableUsage=function(e){return(new h).getUsage(e)};var i=function(){function e(t){m(this,e),this._global=t,this._variables=new Map,this._uses=[],this._namespaceScopes=void 0,this._enumScopes=void 0}return y(e,[{key:"addVariable",value:function(e,t,r,n,i){var a=this.getDestinationScope(r).getVariables(),o={domain:i,exported:n,declaration:t},s=a.get(e);void 0===s?a.set(e,{domain:i,declarations:[o],uses:[]}):(s.domain|=i,s.declarations.push(o))}},{key:"addUse",value:function(e){this._uses.push(e)}},{key:"getVariables",value:function(){return this._variables}},{key:"getFunctionScope",value:function(){return this}},{key:"end",value:function(e){var t=this;void 0!==this._namespaceScopes&&this._namespaceScopes.forEach((function(t){return t.finish(e)})),this._namespaceScopes=this._enumScopes=void 0,this._applyUses(),this._variables.forEach((function(r){var n=!0,i=!1,a=void 0;try{for(var o,s=r.declarations[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value,u={declarations:[],domain:c.domain,exported:c.exported,inGlobalScope:t._global,uses:[]},l=!0,_=!1,d=void 0;try{for(var p,f=r.declarations[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var m=p.value;m.domain&c.domain&&u.declarations.push(m.declaration)}}catch(e){_=!0,d=e}finally{try{l||null==f.return||f.return()}finally{if(_)throw d}}var g=!0,y=!1,h=void 0;try{for(var v,b=r.uses[Symbol.iterator]();!(g=(v=b.next()).done);g=!0){var x=v.value;x.domain&c.domain&&u.uses.push(x)}}catch(e){y=!0,h=e}finally{try{g||null==b.return||b.return()}finally{if(y)throw h}}e(u,c.declaration,t)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}))}},{key:"markExported",value:function(e){}},{key:"createOrReuseNamespaceScope",value:function(e,t,r,n){var i;return void 0===this._namespaceScopes?this._namespaceScopes=new Map:i=this._namespaceScopes.get(e),void 0===i?(i=new g(r,n,this),this._namespaceScopes.set(e,i)):i.refresh(r,n),i}},{key:"createOrReuseEnumScope",value:function(e,t){var r;return void 0===this._enumScopes?this._enumScopes=new Map:r=this._enumScopes.get(e),void 0===r&&(r=new s(this),this._enumScopes.set(e,r)),r}},{key:"_applyUses",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,i=this._uses[Symbol.iterator]();!(e=(n=i.next()).done);e=!0){var a=n.value;this._applyUse(a)||this._addUseToParent(a)}}catch(e){t=!0,r=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw r}}this._uses=[]}},{key:"_applyUse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._variables,r=t.get(e.location.text);return void 0!==r&&0!=(r.domain&e.domain)&&(r.uses.push(e),!0)}},{key:"_addUseToParent",value:function(e){}}]),e}(),a=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,r)))._exportAll=e,n._exports=void 0,n._innerScope=new o(D(n),1),n}return v(t,e),y(t,[{key:"addVariable",value:function(e,r,n,i,a){return 8&a?T(b(t.prototype),"addVariable",this).call(this,e,r,n,i,a):this._innerScope.addVariable(e,r,n,i,a)}},{key:"addUse",value:function(e,r){return r===this._innerScope?T(b(t.prototype),"addUse",this).call(this,e):this._innerScope.addUse(e)}},{key:"markExported",value:function(e){void 0===this._exports?this._exports=[e.text]:this._exports.push(e.text)}},{key:"end",value:function(e){var r=this;return this._innerScope.end((function(t,n){return t.exported=t.exported||r._exportAll||void 0!==r._exports&&r._exports.includes(n.text),t.inGlobalScope=r._global,e(t,n,r)})),T(b(t.prototype),"end",this).call(this,(function(t,n,i){return t.exported=t.exported||i===r&&void 0!==r._exports&&r._exports.includes(n.text),e(t,n,i)}))}},{key:"getDestinationScope",value:function(){return this}}]),t}(i),o=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,!1)))._parent=e,n._boundary=r,n}return v(t,e),y(t,[{key:"_addUseToParent",value:function(e){return this._parent.addUse(e,this)}},{key:"getDestinationScope",value:function(e){return this._boundary&e?this:this._parent.getDestinationScope(e)}}]),t}(i),s=function(e){function t(e){return m(this,t),S(this,b(t).call(this,e,1))}return v(t,e),y(t,[{key:"end",value:function(){this._applyUses()}}]),t}(o),c=function(e){function t(e){var r;return m(this,t),(r=S(this,b(t).call(this,e,8)))._state=0,r}return v(t,e),y(t,[{key:"updateState",value:function(e){this._state=e}},{key:"addUse",value:function(e){if(2!==this._state)return this._parent.addUse(e,this);this._uses.push(e)}}]),t}(o),u=function(e){function t(e){return m(this,t),S(this,b(t).call(this,e,1))}return v(t,e),y(t,[{key:"beginBody",value:function(){this._applyUses()}}]),t}(o),l=function(e){function t(e,r,n){var i;return m(this,t),(i=S(this,b(t).call(this,n,1)))._name=e,i._domain=r,i}return v(t,e),y(t,[{key:"end",value:function(e){return this._innerScope.end(e),e({declarations:[this._name],domain:this._domain,exported:!1,uses:this._uses,inGlobalScope:!1},this._name,this)}},{key:"addUse",value:function(e,t){return t!==this._innerScope?this._innerScope.addUse(e):e.domain&this._domain&&e.location.text===this._name.text?void this._uses.push(e):this._parent.addUse(e,this)}},{key:"getFunctionScope",value:function(){return this._innerScope}},{key:"getDestinationScope",value:function(){return this._innerScope}}]),t}(o),_=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,e,4,r)))._innerScope=new u(D(n)),n}return v(t,e),y(t,[{key:"beginBody",value:function(){return this._innerScope.beginBody()}}]),t}(l),d=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,e,6,r)))._innerScope=new o(D(n),1),n}return v(t,e),t}(l),p=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,r,2)))._functionScope=e,n}return v(t,e),y(t,[{key:"getFunctionScope",value:function(){return this._functionScope}}]),t}(o);function f(e){return{declaration:e,exported:!0,domain:n(e)}}var g=function(e){function t(e,r,n){var i;return m(this,t),(i=S(this,b(t).call(this,n,1)))._ambient=e,i._hasExport=r,i._innerScope=new o(D(i),1),i._exports=void 0,i}return v(t,e),y(t,[{key:"finish",value:function(e){return T(b(t.prototype),"end",this).call(this,e)}},{key:"end",value:function(e){var t=this;this._innerScope.end((function(r,n,i){if(i!==t._innerScope||!r.exported&&(!t._ambient||void 0!==t._exports&&!t._exports.has(n.text)))return e(r,n,i);var a=t._variables.get(n.text);if(void 0===a)t._variables.set(n.text,{declarations:r.declarations.map(f),domain:r.domain,uses:E(r.uses)});else{var o=!0,s=!1,c=void 0;try{e:for(var u,l=r.declarations[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var _=u.value,d=!0,p=!1,m=void 0;try{for(var g,y=a.declarations[Symbol.iterator]();!(d=(g=y.next()).done);d=!0){if(g.value.declaration===_)continue e}}catch(e){p=!0,m=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw m}}a.declarations.push(f(_))}}catch(e){s=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw c}}a.domain|=r.domain;var h=!0,v=!1,b=void 0;try{for(var x,D=r.uses[Symbol.iterator]();!(h=(x=D.next()).done);h=!0){var S=x.value;a.uses.includes(S)||a.uses.push(S)}}catch(e){v=!0,b=e}finally{try{h||null==D.return||D.return()}finally{if(v)throw b}}}})),this._applyUses(),this._innerScope=new o(this,1)}},{key:"createOrReuseNamespaceScope",value:function(e,r,n,i){return r||this._ambient&&!this._hasExport?T(b(t.prototype),"createOrReuseNamespaceScope",this).call(this,e,r,n||this._ambient,i):this._innerScope.createOrReuseNamespaceScope(e,r,n||this._ambient,i)}},{key:"createOrReuseEnumScope",value:function(e,r){return r||this._ambient&&!this._hasExport?T(b(t.prototype),"createOrReuseEnumScope",this).call(this,e,r):this._innerScope.createOrReuseEnumScope(e,r)}},{key:"addUse",value:function(e,t){if(t!==this._innerScope)return this._innerScope.addUse(e);this._uses.push(e)}},{key:"refresh",value:function(e,t){this._ambient=e,this._hasExport=t}},{key:"markExported",value:function(e,t){void 0===this._exports&&(this._exports=new Set),this._exports.add(e.text)}},{key:"getDestinationScope",value:function(){return this._innerScope}}]),t}(o);var h=function(){function e(){m(this,e),this._result=new Map}return y(e,[{key:"getUsage",value:function(e){var t=this,n=function(e,r){t._result.set(r,e)},i=Fr.isExternalModule(e);this._scope=new a(e.isDeclarationFile&&i&&!C(e),!i);var s=function e(i){if(ma.isBlockScopeBoundary(i))return c(i,new p(t._scope.getFunctionScope(),t._scope),u);switch(i.kind){case Fr.SyntaxKind.ClassExpression:return c(i,void 0!==i.name?new d(i.name,t._scope):new o(t._scope,1));case Fr.SyntaxKind.ClassDeclaration:return t._handleDeclaration(i,!0,6),c(i,new o(t._scope,1));case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:return t._handleDeclaration(i,!0,2),c(i,new o(t._scope,4));case Fr.SyntaxKind.EnumDeclaration:return t._handleDeclaration(i,!0,7),c(i,t._scope.createOrReuseEnumScope(i.name.text,ma.hasModifier(i.modifiers,Fr.SyntaxKind.ExportKeyword)));case Fr.SyntaxKind.ModuleDeclaration:return t._handleModule(i,c);case Fr.SyntaxKind.MappedType:return c(i,new o(t._scope,4));case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.Constructor:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.MethodSignature:case Fr.SyntaxKind.CallSignature:case Fr.SyntaxKind.ConstructSignature:case Fr.SyntaxKind.ConstructorType:case Fr.SyntaxKind.FunctionType:return t._handleFunctionLikeDeclaration(i,e,n);case Fr.SyntaxKind.ConditionalType:return t._handleConditionalType(i,e,n);case Fr.SyntaxKind.VariableDeclarationList:t._handleVariableDeclaration(i);break;case Fr.SyntaxKind.Parameter:i.parent.kind===Fr.SyntaxKind.IndexSignature||i.name.kind===Fr.SyntaxKind.Identifier&&i.name.originalKeywordKind===Fr.SyntaxKind.ThisKeyword||t._handleBindingName(i.name,!1,!1);break;case Fr.SyntaxKind.EnumMember:t._scope.addVariable(ma.getPropertyName(i.name),i.name,1,!0,4);break;case Fr.SyntaxKind.ImportClause:case Fr.SyntaxKind.ImportSpecifier:case Fr.SyntaxKind.NamespaceImport:case Fr.SyntaxKind.ImportEqualsDeclaration:t._handleDeclaration(i,!1,15);break;case Fr.SyntaxKind.TypeParameter:t._scope.addVariable(i.name.text,i.name,i.parent.kind===Fr.SyntaxKind.InferType?8:7,!1,2);break;case Fr.SyntaxKind.ExportSpecifier:return void 0!==i.propertyName?t._scope.markExported(i.propertyName,i.name):t._scope.markExported(i.name);case Fr.SyntaxKind.ExportAssignment:if(i.expression.kind===Fr.SyntaxKind.Identifier)return t._scope.markExported(i.expression);break;case Fr.SyntaxKind.Identifier:var a=r(i);return void(void 0!==a&&t._scope.addUse({domain:a,location:i}))}return Fr.forEachChild(i,e)},c=function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,a=t._scope;t._scope=r,i(e),t._scope.end(n),t._scope=a},u=function(e){return e.kind===Fr.SyntaxKind.CatchClause&&void 0!==e.variableDeclaration&&t._handleBindingName(e.variableDeclaration.name,!0,!1),Fr.forEachChild(e,s)};return Fr.forEachChild(e,s),this._scope.end(n),this._result;function l(e){return Fr.forEachChild(e,s)}}},{key:"_handleConditionalType",value:function(e,t,r){var n=this._scope,i=this._scope=new c(n);t(e.checkType),i.updateState(1),t(e.extendsType),i.updateState(2),t(e.trueType),i.updateState(3),t(e.falseType),i.end(r),this._scope=n}},{key:"_handleFunctionLikeDeclaration",value:function(e,t,r){void 0!==e.decorators&&e.decorators.forEach(t);var n=this._scope;e.kind===Fr.SyntaxKind.FunctionDeclaration&&this._handleDeclaration(e,!1,4);var i=this._scope=e.kind===Fr.SyntaxKind.FunctionExpression&&void 0!==e.name?new _(e.name,n):new u(n);void 0!==e.name&&t(e.name),void 0!==e.typeParameters&&e.typeParameters.forEach(t),e.parameters.forEach(t),void 0!==e.type&&t(e.type),void 0!==e.body&&(i.beginBody(),t(e.body)),i.end(r),this._scope=n}},{key:"_handleModule",value:function(e,t){if(e.flags&Fr.NodeFlags.GlobalAugmentation)return t(e,this._scope.createOrReuseNamespaceScope("-global",!1,!0,!1));if(e.name.kind===Fr.SyntaxKind.Identifier){var r=function(e){return e.parent.kind===Fr.SyntaxKind.ModuleDeclaration||ma.hasModifier(e.modifiers,Fr.SyntaxKind.ExportKeyword)}(e);this._scope.addVariable(e.name.text,e.name,1,r,5);var n=ma.hasModifier(e.modifiers,Fr.SyntaxKind.DeclareKeyword);return t(e,this._scope.createOrReuseNamespaceScope(e.name.text,r,n,n&&x(e)))}return t(e,this._scope.createOrReuseNamespaceScope('"'.concat(e.name.text,'"'),!1,!0,x(e)))}},{key:"_handleDeclaration",value:function(e,t,r){void 0!==e.name&&this._scope.addVariable(e.name.text,e.name,t?3:1,ma.hasModifier(e.modifiers,Fr.SyntaxKind.ExportKeyword),r)}},{key:"_handleBindingName",value:function(e,t,r){var n=this;if(e.kind===Fr.SyntaxKind.Identifier)return this._scope.addVariable(e.text,e,t?3:1,r,4);ma.forEachDestructuringIdentifier(e,(function(e){n._scope.addVariable(e.name.text,e.name,t?3:1,r,4)}))}},{key:"_handleVariableDeclaration",value:function(e){var t=ma.isBlockScopedVariableDeclarationList(e),r=e.parent.kind===Fr.SyntaxKind.VariableStatement&&ma.hasModifier(e.parent.modifiers,Fr.SyntaxKind.ExportKeyword),n=!0,i=!1,a=void 0;try{for(var o,s=e.declarations[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;this._handleBindingName(c.name,t,r)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}}]),e}();function x(e){return void 0!==e.body&&e.body.kind===Fr.SyntaxKind.ModuleBlock&&C(e.body)}function C(e){var t=!0,r=!1,n=void 0;try{for(var i,a=e.statements[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;if(o.kind===Fr.SyntaxKind.ExportDeclaration||o.kind===Fr.SyntaxKind.ExportAssignment)return!0}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}return!1}}));i(ga);ga.DeclarationDomain,ga.UsageDomain,ga.getUsageDomain,ga.getDeclarationDomain,ga.collectVariableUsage;var ya=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.endsControlFlow=function(e){return n(e).end};var r={statements:[],end:!1};function n(e){return oa.isBlockLike(e)?a(e):i(e)}function i(e){switch(e.kind){case Fr.SyntaxKind.ReturnStatement:case Fr.SyntaxKind.ThrowStatement:case Fr.SyntaxKind.ContinueStatement:case Fr.SyntaxKind.BreakStatement:return{statements:[e],end:!0};case Fr.SyntaxKind.Block:return a(e);case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.WhileStatement:return function(e){var t=e.kind===Fr.SyntaxKind.WhileStatement?o(e.expression):void 0===e.condition||o(e.condition);if(!1===t)return r;var n=s(i(e.statement),oa.isBreakOrContinueStatement);void 0===t&&(n.end=!1);return n}(e);case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.ForInStatement:return function(e){var t=s(i(e.statement),oa.isBreakOrContinueStatement);return t.end=!1,t}(e);case Fr.SyntaxKind.DoStatement:return s(i(e.statement),oa.isBreakOrContinueStatement);case Fr.SyntaxKind.IfStatement:return function(e){switch(o(e.expression)){case!0:return i(e.thenStatement);case!1:return void 0===e.elseStatement?r:i(e.elseStatement)}var t=i(e.thenStatement);if(void 0===e.elseStatement)return{statements:t.statements,end:!1};var n=i(e.elseStatement);return{statements:[].concat(E(t.statements),E(n.statements)),end:t.end&&n.end}}(e);case Fr.SyntaxKind.SwitchStatement:return s(function(e){var t=!1,r={statements:[],end:!1},n=!0,i=!1,o=void 0;try{for(var s,c=e.caseBlock.clauses[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var u,l=s.value;l.kind===Fr.SyntaxKind.DefaultClause&&(t=!0);var _=a(l);r.end=_.end,(u=r.statements).push.apply(u,E(_.statements))}}catch(e){i=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw o}}t||(r.end=!1);return r}(e),oa.isBreakStatement);case Fr.SyntaxKind.TryStatement:return function(e){var t;if(void 0!==e.finallyBlock&&(t=a(e.finallyBlock)).end)return t;var r=a(e.tryBlock);if(void 0===e.catchClause)return{statements:t.statements.concat(r.statements),end:r.end};var n=a(e.catchClause.block);return{statements:r.statements.filter((function(e){return e.kind!==Fr.SyntaxKind.ThrowStatement})).concat(n.statements,void 0===t?[]:t.statements),end:r.end&&n.end}}(e);case Fr.SyntaxKind.LabeledStatement:return function(e,t){var r={statements:[],end:e.end},n=t.text,i=!0,a=!1,o=void 0;try{for(var s,c=e.statements[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;switch(u.kind){case Fr.SyntaxKind.BreakStatement:case Fr.SyntaxKind.ContinueStatement:if(void 0!==u.label&&u.label.text===n){r.end=!1;continue}}r.statements.push(u)}}catch(e){a=!0,o=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}return r}(i(e.statement),e.label);case Fr.SyntaxKind.WithStatement:return i(e.statement);default:return r}}function a(e){var t={statements:[],end:!1},r=!0,n=!1,a=void 0;try{for(var o,s=e.statements[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c,u=i(o.value);if((c=t.statements).push.apply(c,E(u.statements)),u.end){t.end=!0;break}}}catch(e){n=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw a}}return t}function o(e){switch(e.kind){case Fr.SyntaxKind.TrueKeyword:return!0;case Fr.SyntaxKind.FalseKeyword:return!1;default:return}}function s(e,t){var r={statements:[],end:e.end},n=!0,i=!1,a=void 0;try{for(var o,s=e.statements[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;t(c)&&void 0===c.label?r.end=!1:r.statements.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}t.getControlFlowEnd=n}));i(ya);ya.endsControlFlow,ya.getControlFlowEnd;var ha=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertAst=function(e){var t={node:e,parent:void 0,kind:Fr.SyntaxKind.SourceFile,children:[],next:void 0,skip:void 0},r=[],n=t,i=n;return Fr.forEachChild(e,(function e(t){r.push(t);var a=n;i.next=n={node:t,parent:a,kind:t.kind,children:[],next:void 0,skip:void 0},i!==a&&function(e,t){do{e.skip=t,e=e.parent}while(e!==t.parent)}(i,n),i=n,a.children.push(n),ma.isNodeKind(t.kind)&&Fr.forEachChild(t,e),n=a})),{wrapped:t,flat:r}}}));i(ha);ha.convertAst;var va=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ma,t),ra.__exportStar(ga,t),ra.__exportStar(ya,t),ra.__exportStar(fa,t),ra.__exportStar(ha,t)}));i(va);var ba=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(da,t),ra.__exportStar(va,t)}));i(ba);var xa=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr);t.convertComments=function(e,t){var r=[];return ba.forEachComment(e,(function(n,a){var o=a.kind==i.SyntaxKind.SingleLineCommentTrivia?"Line":"Block",s=[a.pos,a.end],c=Gi.getLocFor(s[0],s[1],e),u=s[0]+2,l=a.kind===i.SyntaxKind.SingleLineCommentTrivia?s[1]-u:s[1]-u-2;r.push({type:o,value:t.substr(u,l),range:s,loc:c})}),e),r}}));i(xa);xa.convertComments;var Da=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.astConverter=function(e,t,r){var n=e.parseDiagnostics;if(n.length)throw Hi.convertError(n[0]);var i=new Hi.Converter(e,{errorOnUnknownASTType:t.errorOnUnknownASTType||!1,useJSXTextNode:t.useJSXTextNode||!1,shouldPreserveNodeMaps:r}),a=i.convertProgram();return t.tokens&&(a.tokens=Gi.convertTokens(e)),t.comment&&(a.comments=xa.convertComments(e,t.code)),{estree:a,astMaps:r?i.getASTMaps():void 0}}}));i(Da);Da.astConverter;var Sa=1e3,Ta=60*Sa,Ea=60*Ta,Ca=24*Ea,ka=7*Ca,Na=365.25*Ca,Aa=function(e,t){t=t||{};var r=f(e);if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*Na;case"weeks":case"week":case"w":return r*ka;case"days":case"day":case"d":return r*Ca;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ea;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ta;case"seconds":case"second":case"secs":case"sec":case"s":return r*Sa;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(t>=Ca)return Fa(e,t,Ca,"day");if(t>=Ea)return Fa(e,t,Ea,"hour");if(t>=Ta)return Fa(e,t,Ta,"minute");if(t>=Sa)return Fa(e,t,Sa,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=Ca)return Math.round(e/Ca)+"d";if(t>=Ea)return Math.round(e/Ea)+"h";if(t>=Ta)return Math.round(e/Ta)+"m";if(t>=Sa)return Math.round(e/Sa)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Fa(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var Pa=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var a;function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(o.enabled){var i=o,s=Number(new Date),c=s-(a||s);i.diff=c,i.prev=a,i.curr=s,a=s,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;u++;var a=r.formatters[n];if("function"==typeof a){var o=t[u];e=a.call(i,o),t.splice(u,1),u--}return e})),r.formatArgs.call(i,t),(i.log||r.log).apply(i,t)}}return o.namespace=e,o.enabled=r.enabled(e),o.useColors=r.useColors(),o.color=t(e),o.destroy=n,o.extend=i,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function n(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function i(e,t){var n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){var e=[].concat(E(r.names.map(a)),E(r.skips.map(a).map((function(e){return"-"+e})))).join(",");return r.enable(""),e},r.enable=function(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var a=r.instances[t];a.enabled=r.enabled(a.namespace)}},r.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=Aa,Object.keys(e).forEach((function(t){r[t]=e[t]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r},wa=a((function(e,t){t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":f(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==Oe&&"env"in Oe&&(e=Oe.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=Pa(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),Ia=(wa.log,wa.formatArgs,wa.save,wa.load,wa.useColors,wa.storage,wa.colors,Object.freeze({__proto__:null,default:{}})),Oa=function(e,t){var r=(t=t||Oe.argv).indexOf("--"),n=/^--/.test(e)?"":"--",i=t.indexOf(n+e);return-1!==i&&(-1===r||i<r)},Ma=Oa("no-color")||Oa("no-colors")||Oa("color=false")?0:Oa("color=16m")||Oa("color=full")||Oa("color=truecolor")?3:Oa("color=256")?2:Oa("color")||Oa("colors")||Oa("color=true")||Oa("color=always")?1:Oe.stdout&&!Oe.stdout.isTTY?0:"win32"===Oe.platform?1:"CI"in Oe.env?"TRAVIS"in Oe.env||"Travis"===Oe.env.CI?1:0:"TEAMCITY_VERSION"in Oe.env?null===Oe.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/)?0:1:/^(screen|xterm)-256(?:color)?/.test(Oe.env.TERM)?2:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(Oe.env.TERM)?1:"COLORTERM"in Oe.env?1:(Oe.env.TERM,0);0===Ma&&"FORCE_COLOR"in Oe.env&&(Ma=1);var La,Ra=Oe&&(0!==(La=Ma)&&{level:La,hasBasic:!0,has256:La>=2,has16m:La>=3}),Ba=o(Ia),ja=a((function(e,t){t.init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(){return Oe.stderr.write(kn.format.apply(kn,arguments)+"\n")},t.formatArgs=function(r){var n=this.namespace;if(this.useColors){var i=this.color,a="[3"+(i<8?i:"8;5;"+i),o=" ".concat(a,";1m").concat(n," ");r[0]=o+r[0].split("\n").join("\n"+o),r.push(a+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?Oe.env.DEBUG=e:delete Oe.env.DEBUG},t.load=function(){return Oe.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):Ba.isatty(Oe.stderr.fd)},t.colors=[6,2,3,4,5,1];try{var r=Ra;r&&(r.stderr||r).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(Oe.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=Oe.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=Pa(t);var n=e.exports.formatters;n.o=function(e){return this.inspectOpts.colors=this.useColors,kn.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,kn.inspect(e,this.inspectOpts)}})),Ka=(ja.init,ja.log,ja.formatArgs,ja.save,ja.load,ja.useColors,ja.colors,ja.inspectOpts,a((function(e){void 0===Oe||Oe.type,e.exports=wa}))),Ja=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(yr),o=i(Fr);t.DEFAULT_COMPILER_OPTIONS={allowNonTsExtensions:!0,allowJs:!0,checkJs:!0,noEmit:!0};var s=void 0===o.sys||o.sys.useCaseSensitiveFileNames?function(e){return a.default.normalize(e)}:function(e){return a.default.normalize(e).toLowerCase()};t.getCanonicalFileName=s,t.getTsconfigPath=function(e,t){return s(a.default.isAbsolute(e)?e:a.default.join(t.tsconfigRootDir||Oe.cwd(),e))},t.canonicalDirname=function(e){return a.default.dirname(e)},t.getScriptKind=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.filePath;switch(a.default.extname(t).toLowerCase()){case".ts":return o.ScriptKind.TS;case".tsx":return o.ScriptKind.TSX;case".js":return o.ScriptKind.JS;case".jsx":return o.ScriptKind.JSX;case".json":return o.ScriptKind.JSON;default:return e.jsx?o.ScriptKind.TSX:o.ScriptKind.TS}}}));i(Ja);Ja.DEFAULT_COMPILER_OPTIONS,Ja.getCanonicalFileName,Ja.getTsconfigPath,Ja.canonicalDirname,Ja.getScriptKind;var za=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=r(yr),s=i(Fr),c=a.default("typescript-eslint:typescript-estree:createDefaultProgram");t.createDefaultProgram=function(e,t){if(c("Getting default program for: %s",t.filePath||"unnamed file"),t.projects&&1===t.projects.length){var r=Ja.getTsconfigPath(t.projects[0],t),n=s.getParsedCommandLineOfConfigFile(r,Ja.DEFAULT_COMPILER_OPTIONS,Object.assign(Object.assign({},s.sys),{onUnRecoverableConfigFileDiagnostic:function(){}}));if(n){var i=s.createCompilerHost(n.options,!0),a=i.readFile;i.readFile=function(r){return o.default.normalize(r)===o.default.normalize(t.filePath)?e:a(r)};var u=s.createProgram([t.filePath],n.options,i),l=u.getSourceFile(t.filePath);return l&&{ast:l,program:u}}}}}));i(za);za.createDefaultProgram;var Ua=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=i(Fr),s=a.default("typescript-eslint:typescript-estree:createIsolatedProgram");t.createIsolatedProgram=function(e,t){s("Getting isolated program in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath);var r={fileExists:function(){return!0},getCanonicalFileName:function(){return t.filePath},getCurrentDirectory:function(){return""},getDirectories:function(){return[]},getDefaultLibFileName:function(){return"lib.d.ts"},getNewLine:function(){return"\n"},getSourceFile:function(r){return o.createSourceFile(r,e,o.ScriptTarget.Latest,!0,Ja.getScriptKind(t,r))},readFile:function(){},useCaseSensitiveFileNames:function(){return!0},writeFile:function(){return null}},n=o.createProgram([t.filePath],Object.assign({noResolve:!0,target:o.ScriptTarget.Latest,jsx:t.jsx?o.JsxEmit.Preserve:void 0},Ja.DEFAULT_COMPILER_OPTIONS),r),i=n.getSourceFile(t.filePath);if(!i)throw new Error("Expected an ast to be returned for the single-file isolated program.");return{ast:i,program:n}}}));i(Ua);Ua.createIsolatedProgram;var Va=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=r(hr),s=r(yr),c=i(Fr),u=a.default("typescript-eslint:typescript-estree:createWatchProgram"),l=new Map,_=new Map,d=new Map,p=new Map,f=new Map,m=new Set;function g(e){return function(t,r){var n=Ja.getCanonicalFileName(s.default.normalize(t)),i=function(){var t=e.get(n);return t||(t=new Set,e.set(n,t)),t}();return i.add(r),{close:function(){i.delete(r)}}}}t.clearCaches=function(){l.clear(),_.clear(),d.clear(),m.clear(),p.clear(),f.clear()};var y={code:"",filePath:""};function h(e){throw new Error(c.flattenDiagnosticMessageText(e.messageText,c.sys.newLine))}function v(e,t){u("Creating watch program for %s.",e);var r=c.createWatchCompilerHost(e,Ja.DEFAULT_COMPILER_OPTIONS,c.sys,c.createSemanticDiagnosticsBuilderProgram,h,(function(){})),n=r.readFile;r.readFile=function(e,t){var r=Ja.getCanonicalFileName(e);return m.add(r),s.default.normalize(r)===s.default.normalize(y.filePath)?y.code:n(r,t)},r.onUnRecoverableConfigFileDiagnostic=h,r.afterProgramCreate=function(e){var t=e.getConfigFileParsingDiagnostics().filter((function(e){return e.category===c.DiagnosticCategory.Error&&18003!==e.code}));t.length>0&&h(t[0])},r.watchFile=g(_),r.watchDirectory=g(d);var i=r.onCachedDirectoryStructureHostCreate;r.onCachedDirectoryStructureHostCreate=function(e){var r=e.readDirectory;e.readDirectory=function(e,n,i,a,o){return r(e,n?n.concat(t.extraFileExtensions):void 0,i,a,o)},i(e)};var a=r.setTimeout;return r.setTimeout=function(e,t){if(250===t)return e(),null;for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return a&&a.apply(void 0,[e,t].concat(n))},c.createWatchProgram(r)}function b(e,t,r){var n=e.getProgram().getProgram();if("true"===Oe.env.TSESTREE_NO_INVALIDATION)return n;(function(e){var t=o.default.statSync(e).mtimeMs,r=f.get(e);return f.set(e,t),void 0!==r&&Math.abs(r-t)>Number.EPSILON})(r)&&(u("tsconfig has changed - triggering program update. %s",r),_.get(r).forEach((function(e){return e(r,c.FileWatcherEventKind.Changed)})),p.delete(r));var i=n.getSourceFile(t);if(i)return n;u("File was not found in program - triggering folder update. %s",t);for(var a=Ja.canonicalDirname(t),s=null,l=a,m=!1;s!==l;){s=l;var g=d.get(s);if(g){g.forEach((function(e){return e(a,c.FileWatcherEventKind.Changed)})),m=!0;break}l=Ja.canonicalDirname(s)}if(!m)return u("No callback found for file, not part of this program. %s",t),null;if(p.delete(r),i=(n=e.getProgram().getProgram()).getSourceFile(t))return n;u("File was still not found in program after directory update - checking file deletions. %s",t);var y=n.getRootFileNames().find((function(e){return!o.default.existsSync(e)}));if(!y)return null;var h=_.get(Ja.getCanonicalFileName(y));return h?(u("Marking file as deleted. %s",y),h.forEach((function(e){return e(y,c.FileWatcherEventKind.Deleted)})),p.delete(r),(i=(n=e.getProgram().getProgram()).getSourceFile(t))?n:(u("File was still not found in program after deletion check, assuming it is not part of this program. %s",t),null)):(u("Could not find watch callbacks for root file. %s",y),n)}t.getProgramsForProjects=function(e,t,r){var n=Ja.getCanonicalFileName(t),i=[];y.code=e,y.filePath=n;var a=_.get(n);m.has(n)&&a&&a.size>0&&a.forEach((function(e){return e(n,c.FileWatcherEventKind.Changed)}));var o=!0,s=!1,d=void 0;try{for(var f,g=r.projects[Symbol.iterator]();!(o=(f=g.next()).done);o=!0){var h=f.value,x=Ja.getTsconfigPath(h,r),D=l.get(x);if(D){var S=p.get(x),T=null;if(S||(T=D.getProgram().getProgram(),S=new Set(T.getRootFileNames().map((function(e){return Ja.getCanonicalFileName(e)}))),p.set(x,S)),S.has(n))return u("Found existing program for file. %s",n),(T=T||D.getProgram().getProgram()).getTypeChecker(),[T]}}}catch(e){s=!0,d=e}finally{try{o||null==g.return||g.return()}finally{if(s)throw d}}u("File did not belong to any existing programs, moving to create/update. %s",n);var E=!0,C=!1,k=void 0;try{for(var N,A=r.projects[Symbol.iterator]();!(E=(N=A.next()).done);E=!0){var F=N.value,P=Ja.getTsconfigPath(F,r),w=l.get(P);if(w){var I=b(w,n,P);if(!I)continue;I.getTypeChecker(),i.push(I)}else{var O=v(P,r),M=O.getProgram().getProgram();l.set(P,O),i.push(M)}}}catch(e){C=!0,k=e}finally{try{E||null==A.return||A.return()}finally{if(C)throw k}}return i},t.createWatchProgram=v}));i(Va);Va.clearCaches,Va.getProgramsForProjects,Va.createWatchProgram;var qa=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Ka),a=r(yr),o=i.default("typescript-eslint:typescript-estree:createProjectProgram");t.createProjectProgram=function(e,t,r){o("Creating project program for: %s",r.filePath);var n=Gi.firstDefined(Va.getProgramsForProjects(e,r.filePath,r),(function(e){var t=e.getSourceFile(r.filePath);return t&&{ast:t,program:e}}));if(!n&&!t){var i=['"parserOptions.project" has been set for @typescript-eslint/parser.',"The file does not match your project config: ".concat(a.default.relative(Oe.cwd(),r.filePath),".")],s=!1,c=a.default.extname(r.filePath);if(-1===[".ts",".tsx",".js",".jsx"].indexOf(c)){var u="The extension for the file (".concat(c,") is non-standard");r.extraFileExtensions&&r.extraFileExtensions.length>0?r.extraFileExtensions.includes(c)||(i.push("".concat(u,'. It should be added to your existing "parserOptions.extraFileExtensions".')),s=!0):(i.push("".concat(u,'. You should add "parserOptions.extraFileExtensions" to your config.')),s=!0)}throw s||(i.push("The file must be included in at least one of the projects provided."),s=!0),new Error(i.join("\n"))}return n}}));i(qa);qa.createProjectProgram;var Wa=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=i(Fr),s=a.default("typescript-eslint:typescript-estree:createSourceFile");t.createSourceFile=function(e,t){return s("Getting AST without type information in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath),o.createSourceFile(t.filePath,e,o.ScriptTarget.Latest,!0,Ja.getScriptKind(t))}}));i(Wa);Wa.createSourceFile;var Ga=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr);function a(e){return e.filter((function(e){switch(e.code){case 1013:case 1014:case 1044:case 1045:case 1048:case 1049:case 1070:case 1071:case 1085:case 1090:case 1096:case 1097:case 1098:case 1099:case 1117:case 1121:case 1123:case 1141:case 1162:case 1172:case 1173:case 1175:case 1176:case 1190:case 1200:case 1206:case 1211:case 1242:case 1246:case 1255:case 1308:case 2364:case 2369:case 2462:case 8017:case 17012:case 17013:return!0}return!1}))}function o(e){return Object.assign(Object.assign({},e),{message:i.flattenDiagnosticMessageText(e.messageText,i.sys.newLine)})}t.getFirstSemanticOrSyntacticError=function(e,t){try{var r=a(e.getSyntacticDiagnostics(t));if(r.length)return o(r[0]);var n=a(e.getSemanticDiagnostics(t));return n.length?o(n[0]):void 0}catch(e){return void console.warn('Warning From TSC: "'.concat(e.message))}}}));i(Ga);Ga.getFirstSemanticOrSyntacticError;var Ha="@typescript-eslint/typescript-estree",Ya="A parser that converts TypeScript source code into an ESTree compatible form",Xa="dist/parser.js",Qa="dist/parser.d.ts",$a=["dist","README.md","LICENSE"],Za={node:"^8.10.0 || ^10.13.0 || >=11.10.1"},eo={type:"git",url:"https://github.com/typescript-eslint/typescript-eslint.git",directory:"packages/typescript-estree"},to={url:"https://github.com/typescript-eslint/typescript-eslint/issues"},ro=["ast","estree","ecmascript","javascript","typescript","parser","syntax"],no={build:"tsc -b tsconfig.build.json",clean:"tsc -b tsconfig.build.json --clean",format:'prettier --write "./**/*.{ts,js,json,md}" --ignore-path ../../.prettierignore',lint:"eslint . --ext .js,.ts --ignore-path='../../.eslintignore'",test:"jest --coverage",typecheck:"tsc -p tsconfig.json --noEmit"},io={debug:"^4.1.1",glob:"^7.1.4","is-glob":"^4.0.1","lodash.unescape":"4.0.1",semver:"^6.3.0",tsutils:"^3.17.1"},ao={"@babel/code-frame":"7.5.5","@babel/parser":"7.5.5","@babel/types":"^7.3.2","@types/babel-code-frame":"^6.20.1","@types/debug":"^4.1.5","@types/glob":"^7.1.1","@types/is-glob":"^4.0.1","@types/lodash.isplainobject":"^4.0.4","@types/lodash.unescape":"^4.0.4","@types/semver":"^6.0.1","@types/tmp":"^0.1.0","@typescript-eslint/shared-fixtures":"2.6.1","babel-code-frame":"^6.26.0",glob:"^7.1.4","lodash.isplainobject":"4.0.6",tmp:"^0.1.0",typescript:"*"},oo={typescript:{optional:!0}},so="643d6d62630a16d189f0673a4bcf34202c7a3fde",co={name:Ha,version:"2.6.1",description:Ya,main:Xa,types:Qa,files:$a,engines:Za,repository:eo,bugs:to,license:"BSD-2-Clause",keywords:ro,scripts:no,dependencies:io,devDependencies:ao,peerDependenciesMeta:oo,gitHead:so},uo=o(Object.freeze({__proto__:null,name:Ha,version:"2.6.1",description:Ya,main:Xa,types:Qa,files:$a,engines:Za,repository:eo,bugs:to,license:"BSD-2-Clause",keywords:ro,scripts:no,dependencies:io,devDependencies:ao,peerDependenciesMeta:oo,gitHead:so,default:co})),lo=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a,o=r(Me),s=i(Fr),c=r(Ni),u=">=3.2.1 <3.8.0",l=s.version,_=o.default.satisfies(l,[u].concat([">3.7.0-dev.0","3.7.1-rc"]).join(" || ")),d=!1;function p(e){return"string"!=typeof e?String(e):e}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).jsx?"estree.tsx":"estree.ts"}function g(){a={code:"",comment:!1,comments:[],createDefaultProgram:!1,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:!1,extraFileExtensions:[],filePath:m(),jsx:!1,loc:!1,log:console.log,preserveNodeMaps:void 0,projects:[],range:!1,strict:!1,tokens:null,tsconfigRootDir:Oe.cwd(),useJSXTextNode:!1}}function y(e){a.range="boolean"==typeof e.range&&e.range,a.loc="boolean"==typeof e.loc&&e.loc,"boolean"==typeof e.tokens&&e.tokens&&(a.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(a.comment=!0,a.comments=[]),"boolean"==typeof e.jsx&&e.jsx&&(a.jsx=!0),"string"==typeof e.filePath&&"<input>"!==e.filePath?a.filePath=e.filePath:a.filePath=m(a),"boolean"==typeof e.useJSXTextNode&&e.useJSXTextNode&&(a.useJSXTextNode=!0),"boolean"==typeof e.errorOnUnknownASTType&&e.errorOnUnknownASTType&&(a.errorOnUnknownASTType=!0),"function"==typeof e.loggerFn?a.log=e.loggerFn:!1===e.loggerFn&&(a.log=Function.prototype),"string"==typeof e.project?a.projects=[e.project]:Array.isArray(e.project)&&e.project.every((function(e){return"string"==typeof e}))&&(a.projects=e.project),"string"==typeof e.tsconfigRootDir&&(a.tsconfigRootDir=e.tsconfigRootDir),a.projects&&(a.projects=a.projects.reduce((function(e,t){return e.concat(c.default(t)?gi.sync(t,{cwd:a.tsconfigRootDir||Oe.cwd()}):t)}),[])),Array.isArray(e.extraFileExtensions)&&e.extraFileExtensions.every((function(e){return"string"==typeof e}))&&(a.extraFileExtensions=e.extraFileExtensions),a.preserveNodeMaps="boolean"==typeof e.preserveNodeMaps&&e.preserveNodeMaps,void 0===e.preserveNodeMaps&&a.projects.length>0&&(a.preserveNodeMaps=!0),a.createDefaultProgram="boolean"==typeof e.createDefaultProgram&&e.createDefaultProgram}function h(){if(!_&&!d){if(void 0!==f(Oe)&&Oe.stdout.isTTY){var e=["=============","WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.","You may find that it works just fine, or you may not.","SUPPORTED TYPESCRIPT VERSIONS: ".concat(u),"YOUR TYPESCRIPT VERSION: ".concat(l),"Please only submit bug reports when using the officially supported version.","============="];a.log(e.join("\n\n"))}d=!0}}var v=uo.version;t.version=v,t.parse=function(e,t){if(g(),t&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');e=p(e),a.code=e,void 0!==t&&y(t),h();var r=Wa.createSourceFile(e,a);return Da.astConverter(r,a,!1).estree},t.parseAndGenerateServices=function(e,t){g(),e=p(e),a.code=e,void 0!==t&&(y(t),"boolean"==typeof t.errorOnTypeScriptSyntacticAndSemanticIssues&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(a.errorOnTypeScriptSyntacticAndSemanticIssues=!0)),h();var r=a.projects&&a.projects.length>0,n=function(e,t,r){return t&&qa.createProjectProgram(e,r,a)||t&&r&&za.createDefaultProgram(e,a)||Ua.createIsolatedProgram(e,a)}(e,r,a.createDefaultProgram),i=n.ast,o=n.program,s=void 0!==a.preserveNodeMaps?a.preserveNodeMaps:r,c=Da.astConverter(i,a,s),u=c.estree,l=c.astMaps;if(o&&a.errorOnTypeScriptSyntacticAndSemanticIssues){var _=Ga.getFirstSemanticOrSyntacticError(o,i);if(_)throw Hi.convertError(_)}return{ast:u,services:{program:r?o:void 0,esTreeNodeToTSNodeMap:s&&l?l.esTreeNodeToTSNodeMap:void 0,tsNodeToESTreeNodeMap:s&&l?l.tsNodeToESTreeNodeMap:void 0}}},function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(Wi),t.clearCaches=Va.clearCaches}));i(lo);lo.version,lo.parse,lo.parseAndGenerateServices,lo.clearCaches;var _o=_;function po(e,t){return lo.parse(e,{loc:!0,range:!0,tokens:!0,comment:!0,useJSXTextNode:!0,jsx:t})}var fo={parsers:{typescript:Object.assign({parse:function(e,n,i){var a,o=function(e){return new RegExp(["(^[^\"'`]*</)","|","(^[^/]{2}.*/>)"].join(""),"m").test(e)}(e);try{a=po(e,o)}catch(r){try{a=po(e,!o)}catch(e){var s=r;if(void 0===s.lineNumber)throw s;throw t(s.message,{start:{line:s.lineNumber,column:s.column+1}})}}return delete a.tokens,r(e,a),ce(a,Object.assign({},i,{originalText:e}))},astFormat:"estree",hasPragma:_o},p)}},mo=fo.parsers;e.default=fo,e.parsers=mo,Object.defineProperty(e,"__esModule",{value:!0})}));
diff --git a/std/prettier/vendor/standalone.js b/std/prettier/vendor/standalone.js
index ebada0fe2..681deaf9e 100644
--- a/std/prettier/vendor/standalone.js
+++ b/std/prettier/vendor/standalone.js
@@ -1,4 +1,4 @@
-// This file is copied from prettier@1.18.2
+// This file is copied from prettier@1.19.1
/**
* Copyright © James Long and contributors
*
@@ -9,208 +9,453 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global.prettier = factory());
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.prettier = factory());
}(globalThis, (function () { 'use strict';
-var name = "prettier";
-var version$1 = "1.18.2";
-var description = "Prettier is an opinionated code formatter";
-var bin = {
- "prettier": "./bin/prettier.js"
-};
-var repository = "prettier/prettier";
-var homepage = "https://prettier.io";
-var author = "James Long";
-var license = "MIT";
-var main = "./index.js";
-var engines = {
- "node": ">=6"
-};
-var dependencies = {
- "@angular/compiler": "7.2.9",
- "@babel/code-frame": "7.0.0",
- "@babel/parser": "7.2.0",
- "@glimmer/syntax": "0.38.4",
- "@iarna/toml": "2.2.3",
- "@typescript-eslint/typescript-estree": "1.6.0",
- "angular-estree-parser": "1.1.5",
- "angular-html-parser": "1.2.0",
- "camelcase": "4.1.0",
- "chalk": "2.1.0",
- "cjk-regex": "2.0.0",
- "cosmiconfig": "5.0.7",
- "dashify": "0.2.2",
- "dedent": "0.7.0",
- "diff": "3.2.0",
- "editorconfig": "0.15.2",
- "editorconfig-to-prettier": "0.1.1",
- "escape-string-regexp": "1.0.5",
- "esutils": "2.0.2",
- "find-parent-dir": "0.3.0",
- "find-project-root": "1.1.1",
- "flow-parser": "0.84.0",
- "get-stream": "3.0.0",
- "globby": "6.1.0",
- "graphql": "14.2.0",
- "html-element-attributes": "2.0.0",
- "html-styles": "1.0.0",
- "html-tag-names": "1.1.2",
- "ignore": "4.0.6",
- "is-ci": "2.0.0",
- "jest-docblock": "23.2.0",
- "json-stable-stringify": "1.0.1",
- "leven": "2.1.0",
- "lines-and-columns": "1.1.6",
- "linguist-languages": "6.2.1-dev.20180706",
- "lodash.uniqby": "4.7.0",
- "mem": "1.1.0",
- "minimatch": "3.0.4",
- "minimist": "1.2.0",
- "n-readlines": "1.0.0",
- "normalize-path": "3.0.0",
- "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
- "postcss-less": "1.1.5",
- "postcss-media-query-parser": "0.2.3",
- "postcss-scss": "2.0.0",
- "postcss-selector-parser": "2.2.3",
- "postcss-values-parser": "1.5.0",
- "regexp-util": "1.2.2",
- "remark-math": "1.0.4",
- "remark-parse": "5.0.0",
- "resolve": "1.5.0",
- "semver": "5.4.1",
- "string-width": "3.0.0",
- "typescript": "3.4.1",
- "unicode-regex": "2.0.0",
- "unified": "6.1.6",
- "vnopts": "1.0.2",
- "yaml": "1.0.2",
- "yaml-unist-parser": "1.0.0"
-};
-var devDependencies = {
- "@babel/cli": "7.2.0",
- "@babel/core": "7.2.0",
- "@babel/preset-env": "7.2.0",
- "babel-loader": "8.0.4",
- "benchmark": "2.1.4",
- "builtin-modules": "2.0.0",
- "codecov": "codecov/codecov-node#e427d900309adb50746a39a50aa7d80071a5ddd0",
- "cross-env": "5.0.5",
- "eslint": "4.18.2",
- "eslint-config-prettier": "2.9.0",
- "eslint-friendly-formatter": "3.0.0",
- "eslint-plugin-import": "2.9.0",
- "eslint-plugin-prettier": "2.6.0",
- "eslint-plugin-react": "7.7.0",
- "execa": "0.10.0",
- "jest": "23.3.0",
- "jest-junit": "5.0.0",
- "jest-snapshot-serializer-ansi": "1.0.0",
- "jest-snapshot-serializer-raw": "1.1.0",
- "jest-watch-typeahead": "0.1.0",
- "mkdirp": "0.5.1",
- "prettier": "1.18.0",
- "prettylint": "1.0.0",
- "rimraf": "2.6.2",
- "rollup": "0.47.6",
- "rollup-plugin-alias": "1.4.0",
- "rollup-plugin-babel": "4.0.0-beta.4",
- "rollup-plugin-commonjs": "8.2.6",
- "rollup-plugin-json": "2.1.1",
- "rollup-plugin-node-builtins": "2.0.0",
- "rollup-plugin-node-globals": "1.1.0",
- "rollup-plugin-node-resolve": "2.0.0",
- "rollup-plugin-replace": "1.2.1",
- "rollup-plugin-uglify": "3.0.0",
- "shelljs": "0.8.1",
- "snapshot-diff": "0.4.0",
- "strip-ansi": "4.0.0",
- "tempy": "0.2.1",
- "webpack": "3.12.0"
-};
-var scripts = {
- "prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1",
- "prepare-release": "yarn && yarn build && yarn test:dist",
- "test": "jest",
- "test:dist": "node ./scripts/test-dist.js",
- "test-integration": "jest tests_integration",
- "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
- "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
- "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
- "lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter",
- "lint-docs": "prettylint {.,docs,website,website/blog}/*.md",
- "lint-dist": "eslint --no-eslintrc --no-ignore --env=browser \"dist/!(bin-prettier|index|third-party).js\"",
- "build": "node --max-old-space-size=2048 ./scripts/build/build.js",
- "build-docs": "node ./scripts/build-docs.js",
- "check-deps": "node ./scripts/check-deps.js"
-};
-var _package = {
- name: name,
- version: version$1,
- description: description,
- bin: bin,
- repository: repository,
- homepage: homepage,
- author: author,
- license: license,
- main: main,
- engines: engines,
- dependencies: dependencies,
- devDependencies: devDependencies,
- scripts: scripts
-};
-
-var _package$1 = Object.freeze({
- name: name,
- version: version$1,
- description: description,
- bin: bin,
- repository: repository,
- homepage: homepage,
- author: author,
- license: license,
- main: main,
- engines: engines,
- dependencies: dependencies,
- devDependencies: devDependencies,
- scripts: scripts,
- default: _package
-});
-
-var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
-
-
-function unwrapExports (x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-}
-
-function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
-}
-
-var base = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports['default'] =
- /*istanbul ignore end*/
- Diff;
+ var name = "prettier";
+ var version = "1.19.1";
+ var description = "Prettier is an opinionated code formatter";
+ var bin = {
+ prettier: "./bin/prettier.js"
+ };
+ var repository = "prettier/prettier";
+ var homepage = "https://prettier.io";
+ var author = "James Long";
+ var license = "MIT";
+ var main = "./index.js";
+ var engines = {
+ node: ">=8"
+ };
+ var dependencies = {
+ "@angular/compiler": "8.2.13",
+ "@babel/code-frame": "7.5.5",
+ "@babel/parser": "7.7.3",
+ "@glimmer/syntax": "0.41.0",
+ "@iarna/toml": "2.2.3",
+ "@typescript-eslint/typescript-estree": "2.6.1",
+ "angular-estree-parser": "1.1.5",
+ "angular-html-parser": "1.3.0",
+ camelcase: "5.3.1",
+ chalk: "2.4.2",
+ "cjk-regex": "2.0.0",
+ cosmiconfig: "5.2.1",
+ dashify: "2.0.0",
+ dedent: "0.7.0",
+ diff: "4.0.1",
+ editorconfig: "0.15.3",
+ "editorconfig-to-prettier": "0.1.1",
+ "escape-string-regexp": "1.0.5",
+ esutils: "2.0.3",
+ "find-parent-dir": "0.3.0",
+ "find-project-root": "1.1.1",
+ "flow-parser": "0.111.3",
+ "get-stream": "4.1.0",
+ globby: "6.1.0",
+ graphql: "14.5.8",
+ "html-element-attributes": "2.2.0",
+ "html-styles": "1.0.0",
+ "html-tag-names": "1.1.4",
+ ignore: "4.0.6",
+ "is-ci": "2.0.0",
+ "jest-docblock": "24.9.0",
+ "json-stable-stringify": "1.0.1",
+ leven: "3.1.0",
+ "lines-and-columns": "1.1.6",
+ "linguist-languages": "7.6.0",
+ "lodash.uniqby": "4.7.0",
+ mem: "5.1.1",
+ minimatch: "3.0.4",
+ minimist: "1.2.0",
+ "n-readlines": "1.0.0",
+ "normalize-path": "3.0.0",
+ "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
+ "postcss-less": "2.0.0",
+ "postcss-media-query-parser": "0.2.3",
+ "postcss-scss": "2.0.0",
+ "postcss-selector-parser": "2.2.3",
+ "postcss-values-parser": "1.5.0",
+ "regexp-util": "1.2.2",
+ "remark-math": "1.0.6",
+ "remark-parse": "5.0.0",
+ resolve: "1.12.0",
+ semver: "6.3.0",
+ "string-width": "4.1.0",
+ typescript: "3.7.2",
+ "unicode-regex": "3.0.0",
+ unified: "8.4.1",
+ vnopts: "1.0.2",
+ "yaml-unist-parser": "1.1.1"
+ };
+ var devDependencies = {
+ "@babel/core": "7.7.2",
+ "@babel/preset-env": "7.7.1",
+ "@rollup/plugin-alias": "2.2.0",
+ "@rollup/plugin-replace": "2.2.1",
+ "babel-loader": "8.0.6",
+ benchmark: "2.1.4",
+ "builtin-modules": "3.1.0",
+ codecov: "3.6.1",
+ "cross-env": "6.0.3",
+ eslint: "6.6.0",
+ "eslint-config-prettier": "6.5.0",
+ "eslint-formatter-friendly": "7.0.0",
+ "eslint-plugin-import": "2.18.2",
+ "eslint-plugin-prettier": "3.1.1",
+ "eslint-plugin-react": "7.16.0",
+ execa: "3.2.0",
+ jest: "23.3.0",
+ "jest-junit": "9.0.0",
+ "jest-snapshot-serializer-ansi": "1.0.0",
+ "jest-snapshot-serializer-raw": "1.1.0",
+ "jest-watch-typeahead": "0.4.0",
+ mkdirp: "0.5.1",
+ prettier: "1.19.0",
+ prettylint: "1.0.0",
+ rimraf: "3.0.0",
+ rollup: "1.26.3",
+ "rollup-plugin-babel": "4.3.3",
+ "rollup-plugin-commonjs": "10.1.0",
+ "rollup-plugin-json": "4.0.0",
+ "rollup-plugin-node-globals": "1.4.0",
+ "rollup-plugin-node-resolve": "5.2.0",
+ "rollup-plugin-terser": "5.1.2",
+ shelljs: "0.8.3",
+ "snapshot-diff": "0.4.0",
+ "strip-ansi": "5.2.0",
+ "synchronous-promise": "2.0.10",
+ tempy: "0.2.1",
+ "terser-webpack-plugin": "2.2.1",
+ webpack: "4.41.2"
+ };
+ var scripts = {
+ prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
+ "prepare-release": "yarn && yarn build && yarn test:dist",
+ test: "jest",
+ "test:dist": "node ./scripts/test-dist.js",
+ "test-integration": "jest tests_integration",
+ "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
+ "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
+ "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
+ "check-types": "tsc",
+ lint: "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
+ "lint-docs": "prettylint {.,docs,website,website/blog}/*.md",
+ "lint-dist": "eslint --no-eslintrc --no-ignore --env=browser \"dist/!(bin-prettier|index|third-party).js\"",
+ build: "node --max-old-space-size=3072 ./scripts/build/build.js",
+ "build-docs": "node ./scripts/build-docs.js",
+ "check-deps": "node ./scripts/check-deps.js",
+ spellcheck: "npx -p cspell@4.0.31 cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md"
+ };
+ var _package = {
+ name: name,
+ version: version,
+ description: description,
+ bin: bin,
+ repository: repository,
+ homepage: homepage,
+ author: author,
+ license: license,
+ main: main,
+ engines: engines,
+ dependencies: dependencies,
+ devDependencies: devDependencies,
+ scripts: scripts
+ };
+
+ var _package$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name,
+ version: version,
+ description: description,
+ bin: bin,
+ repository: repository,
+ homepage: homepage,
+ author: author,
+ license: license,
+ main: main,
+ engines: engines,
+ dependencies: dependencies,
+ devDependencies: devDependencies,
+ scripts: scripts,
+ 'default': _package
+ });
+
+ function _typeof(obj) {
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ _typeof = function (obj) {
+ return typeof obj;
+ };
+ } else {
+ _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ };
+ }
+
+ return _typeof(obj);
+ }
+
+ function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+ }
+
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+
+ function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+ }
+
+ function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+ }
+
+ function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) _setPrototypeOf(subClass, superClass);
+ }
+
+ function _getPrototypeOf(o) {
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+ }
+
+ function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+
+ return _setPrototypeOf(o, p);
+ }
+
+ function isNativeReflectConstruct() {
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+ if (Reflect.construct.sham) return false;
+ if (typeof Proxy === "function") return true;
+
+ try {
+ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ function _construct(Parent, args, Class) {
+ if (isNativeReflectConstruct()) {
+ _construct = Reflect.construct;
+ } else {
+ _construct = function _construct(Parent, args, Class) {
+ var a = [null];
+ a.push.apply(a, args);
+ var Constructor = Function.bind.apply(Parent, a);
+ var instance = new Constructor();
+ if (Class) _setPrototypeOf(instance, Class.prototype);
+ return instance;
+ };
+ }
+
+ return _construct.apply(null, arguments);
+ }
+
+ function _isNativeFunction(fn) {
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
+ }
+
+ function _wrapNativeSuper(Class) {
+ var _cache = typeof Map === "function" ? new Map() : undefined;
+
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
+ if (Class === null || !_isNativeFunction(Class)) return Class;
+
+ if (typeof Class !== "function") {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+
+ if (typeof _cache !== "undefined") {
+ if (_cache.has(Class)) return _cache.get(Class);
+
+ _cache.set(Class, Wrapper);
+ }
+
+ function Wrapper() {
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
+ }
+
+ Wrapper.prototype = Object.create(Class.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ return _setPrototypeOf(Wrapper, Class);
+ };
+
+ return _wrapNativeSuper(Class);
+ }
+
+ function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return self;
+ }
+
+ function _possibleConstructorReturn(self, call) {
+ if (call && (typeof call === "object" || typeof call === "function")) {
+ return call;
+ }
+
+ return _assertThisInitialized(self);
+ }
+
+ function _superPropBase(object, property) {
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
+ object = _getPrototypeOf(object);
+ if (object === null) break;
+ }
+
+ return object;
+ }
+
+ function _get(target, property, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.get) {
+ _get = Reflect.get;
+ } else {
+ _get = function _get(target, property, receiver) {
+ var base = _superPropBase(target, property);
+
+ if (!base) return;
+ var desc = Object.getOwnPropertyDescriptor(base, property);
+
+ if (desc.get) {
+ return desc.get.call(receiver);
+ }
+
+ return desc.value;
+ };
+ }
+
+ return _get(target, property, receiver || target);
+ }
+
+ function _taggedTemplateLiteral(strings, raw) {
+ if (!raw) {
+ raw = strings.slice(0);
+ }
+
+ return Object.freeze(Object.defineProperties(strings, {
+ raw: {
+ value: Object.freeze(raw)
+ }
+ }));
+ }
+
+ function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
+ }
+
+ function _toConsumableArray(arr) {
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
+ }
+
+ function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
+
+ return arr2;
+ }
+ }
+
+ function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+ }
+
+ function _iterableToArray(iter) {
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+ }
+
+ function _iterableToArrayLimit(arr, i) {
+ if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
+ return;
+ }
+
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+ }
+
+ function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
+ }
+
+ function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+ }
function Diff() {}
Diff.prototype = {
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
diff: function diff(oldString, newString) {
- /*istanbul ignore start*/
- var
- /*istanbul ignore end*/
- options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var callback = options.callback;
if (typeof options === 'function') {
@@ -259,9 +504,7 @@ var base = createCommonjsModule(function (module, exports) {
function execEditLength() {
for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
- var basePath =
- /*istanbul ignore start*/
- void 0;
+ var basePath = void 0;
var addPath = bestPath[diagonalPath - 1],
removePath = bestPath[diagonalPath + 1],
@@ -335,10 +578,6 @@ var base = createCommonjsModule(function (module, exports) {
}
}
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
pushComponent: function pushComponent(components, added, removed) {
var last = components[components.length - 1];
@@ -358,10 +597,6 @@ var base = createCommonjsModule(function (module, exports) {
});
}
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
var newLen = newString.length,
oldLen = oldString.length,
@@ -384,17 +619,13 @@ var base = createCommonjsModule(function (module, exports) {
basePath.newPos = newPos;
return oldPos;
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
equals: function equals(left, right) {
- return left === right;
+ if (this.options.comparator) {
+ return this.options.comparator(left, right);
+ } else {
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+ }
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
removeEmpty: function removeEmpty(array) {
var ret = [];
@@ -406,24 +637,12 @@ var base = createCommonjsModule(function (module, exports) {
return ret;
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
castInput: function castInput(value) {
return value;
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
tokenize: function tokenize(value) {
return value.split('');
},
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
join: function join(chars) {
return chars.join('');
}
@@ -467,13 +686,14 @@ var base = createCommonjsModule(function (module, exports) {
components[componentPos] = tmp;
}
}
- } // Special case handle for when one terminal is ignored. For this case we merge the
- // terminal into the prior string and drop the change.
+ } // Special case handle for when one terminal is ignored (i.e. whitespace).
+ // For this case we merge the terminal into the prior string and drop the change.
+ // This is only available for string mode.
var lastComponent = components[componentLen - 1];
- if (componentLen > 1 && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
+ if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
components[componentLen - 2].value += lastComponent.value;
components.pop();
}
@@ -487,52 +707,12 @@ var base = createCommonjsModule(function (module, exports) {
components: path.components.slice(0)
};
}
-});
-unwrapExports(base);
-var character = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
+ var characterDiff = new Diff();
- exports.__esModule = true;
- exports.characterDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffChars = diffChars;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault(base);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
-
-
- var characterDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- characterDiff = new
- /*istanbul ignore start*/
- _base2['default']();
-
- function diffChars(oldStr, newStr, callback) {
- return characterDiff.diff(oldStr, newStr, callback);
+ function diffChars(oldStr, newStr, options) {
+ return characterDiff.diff(oldStr, newStr, options);
}
-});
-unwrapExports(character);
-
-var params = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- generateOptions = generateOptions;
function generateOptions(options, defaults) {
if (typeof options === 'function') {
@@ -547,40 +727,7 @@ var params = createCommonjsModule(function (module, exports) {
}
return defaults;
- }
-});
-unwrapExports(params);
-
-var word = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.wordDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffWords = diffWords;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffWordsWithSpace = diffWordsWithSpace;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault(base);
- /*istanbul ignore end*/
-
- /*istanbul ignore start*/
-
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
- // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
- //
+ } //
// Ranges and exceptions:
// Latin-1 Supplement, 0080–00FF
// - U+00D7 × Multiplication sign
@@ -601,20 +748,19 @@ var word = createCommonjsModule(function (module, exports) {
var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
var reWhitespace = /\S/;
- var wordDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- wordDiff = new
- /*istanbul ignore start*/
- _base2['default']();
+ var wordDiff = new Diff();
wordDiff.equals = function (left, right) {
+ if (this.options.ignoreCase) {
+ left = left.toLowerCase();
+ right = right.toLowerCase();
+ }
+
return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
};
wordDiff.tokenize = function (value) {
- var tokens = value.split(/(\s+|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
+ var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
for (var i = 0; i < tokens.length - 1; i++) {
// If we have an empty string in the next field and we have only word chars before and after, merge
@@ -628,60 +774,18 @@ var word = createCommonjsModule(function (module, exports) {
return tokens;
};
- function diffWords(oldStr, newStr, callback) {
- var options =
- /*istanbul ignore start*/
- (0, params.generateOptions
- /*istanbul ignore end*/
- )(callback, {
+ function diffWords(oldStr, newStr, options) {
+ options = generateOptions(options, {
ignoreWhitespace: true
});
return wordDiff.diff(oldStr, newStr, options);
}
- function diffWordsWithSpace(oldStr, newStr, callback) {
- return wordDiff.diff(oldStr, newStr, callback);
- }
-});
-unwrapExports(word);
-
-var line = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.lineDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffLines = diffLines;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffTrimmedLines = diffTrimmedLines;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault(base);
- /*istanbul ignore end*/
-
- /*istanbul ignore start*/
-
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
+ function diffWordsWithSpace(oldStr, newStr, options) {
+ return wordDiff.diff(oldStr, newStr, options);
}
- /*istanbul ignore end*/
-
- var lineDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- lineDiff = new
- /*istanbul ignore start*/
- _base2['default']();
+ var lineDiff = new Diff();
lineDiff.tokenize = function (value) {
var retLines = [],
@@ -714,46 +818,13 @@ var line = createCommonjsModule(function (module, exports) {
}
function diffTrimmedLines(oldStr, newStr, callback) {
- var options =
- /*istanbul ignore start*/
- (0, params.generateOptions
- /*istanbul ignore end*/
- )(callback, {
+ var options = generateOptions(callback, {
ignoreWhitespace: true
});
return lineDiff.diff(oldStr, newStr, options);
}
-});
-unwrapExports(line);
-
-var sentence = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
- exports.__esModule = true;
- exports.sentenceDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffSentences = diffSentences;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault(base);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
-
-
- var sentenceDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- sentenceDiff = new
- /*istanbul ignore start*/
- _base2['default']();
+ var sentenceDiff = new Diff();
sentenceDiff.tokenize = function (value) {
return value.split(/(\S.+?[.!?])(?=\s+|$)/);
@@ -762,37 +833,8 @@ var sentence = createCommonjsModule(function (module, exports) {
function diffSentences(oldStr, newStr, callback) {
return sentenceDiff.diff(oldStr, newStr, callback);
}
-});
-unwrapExports(sentence);
-
-var css = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.cssDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffCss = diffCss;
- /*istanbul ignore start*/
- var _base2 = _interopRequireDefault(base);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
-
-
- var cssDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- cssDiff = new
- /*istanbul ignore start*/
- _base2['default']();
+ var cssDiff = new Diff();
cssDiff.tokenize = function (value) {
return value.split(/([{}:;,]|\s+)/);
@@ -801,537 +843,79 @@ var css = createCommonjsModule(function (module, exports) {
function diffCss(oldStr, newStr, callback) {
return cssDiff.diff(oldStr, newStr, callback);
}
-});
-unwrapExports(css);
-
-function _typeof(obj) {
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- _typeof = function (obj) {
- return typeof obj;
- };
- } else {
- _typeof = function (obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
-
- return _typeof(obj);
-}
-
-function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
-}
-
-function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
-}
-
-function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
-}
-
-function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
-}
-function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
-
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
+ function _typeof$1(obj) {
+ if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
+ _typeof$1 = function _typeof$1(obj) {
+ return _typeof(obj);
+ };
+ } else {
+ _typeof$1 = function _typeof$1(obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
+ };
}
- });
- if (superClass) _setPrototypeOf(subClass, superClass);
-}
-
-function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
-}
-
-function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
- return _setPrototypeOf(o, p);
-}
-
-function isNativeReflectConstruct() {
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
- if (Reflect.construct.sham) return false;
- if (typeof Proxy === "function") return true;
-
- try {
- Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
- return true;
- } catch (e) {
- return false;
- }
-}
-
-function _construct(Parent, args, Class) {
- if (isNativeReflectConstruct()) {
- _construct = Reflect.construct;
- } else {
- _construct = function _construct(Parent, args, Class) {
- var a = [null];
- a.push.apply(a, args);
- var Constructor = Function.bind.apply(Parent, a);
- var instance = new Constructor();
- if (Class) _setPrototypeOf(instance, Class.prototype);
- return instance;
- };
+ return _typeof$1(obj);
}
- return _construct.apply(null, arguments);
-}
-
-function _isNativeFunction(fn) {
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
-}
-
-function _wrapNativeSuper(Class) {
- var _cache = typeof Map === "function" ? new Map() : undefined;
-
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
- if (Class === null || !_isNativeFunction(Class)) return Class;
-
- if (typeof Class !== "function") {
- throw new TypeError("Super expression must either be null or a function");
- }
-
- if (typeof _cache !== "undefined") {
- if (_cache.has(Class)) return _cache.get(Class);
-
- _cache.set(Class, Wrapper);
- }
-
- function Wrapper() {
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
- }
-
- Wrapper.prototype = Object.create(Class.prototype, {
- constructor: {
- value: Wrapper,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- return _setPrototypeOf(Wrapper, Class);
- };
-
- return _wrapNativeSuper(Class);
-}
-
-function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return self;
-}
-
-function _possibleConstructorReturn(self, call) {
- if (call && (typeof call === "object" || typeof call === "function")) {
- return call;
- }
-
- return _assertThisInitialized(self);
-}
-
-function _superPropBase(object, property) {
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
- object = _getPrototypeOf(object);
- if (object === null) break;
+ function _toConsumableArray$1(arr) {
+ return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1();
}
- return object;
-}
-
-function _get(target, property, receiver) {
- if (typeof Reflect !== "undefined" && Reflect.get) {
- _get = Reflect.get;
- } else {
- _get = function _get(target, property, receiver) {
- var base = _superPropBase(target, property);
-
- if (!base) return;
- var desc = Object.getOwnPropertyDescriptor(base, property);
-
- if (desc.get) {
- return desc.get.call(receiver);
+ function _arrayWithoutHoles$1(arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
+ arr2[i] = arr[i];
}
- return desc.value;
- };
- }
-
- return _get(target, property, receiver || target);
-}
-
-function _taggedTemplateLiteral(strings, raw) {
- if (!raw) {
- raw = strings.slice(0);
- }
-
- return Object.freeze(Object.defineProperties(strings, {
- raw: {
- value: Object.freeze(raw)
- }
- }));
-}
-
-function _slicedToArray(arr, i) {
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
-}
-
-function _toArray(arr) {
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
-}
-
-function _toConsumableArray(arr) {
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
-}
-
-function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
-
- return arr2;
- }
-}
-
-function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
-}
-
-function _iterableToArray(iter) {
- if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
-}
-
-function _iterableToArrayLimit(arr, i) {
- var _arr = [];
- var _n = true;
- var _d = false;
- var _e = undefined;
-
- try {
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
-
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"] != null) _i["return"]();
- } finally {
- if (_d) throw _e;
+ return arr2;
}
}
- return _arr;
-}
-
-function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance");
-}
-
-function _nonIterableRest() {
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
-}
-
-function _toPrimitive(input, hint) {
- if (typeof input !== "object" || input === null) return input;
- var prim = input[Symbol.toPrimitive];
-
- if (prim !== undefined) {
- var res = prim.call(input, hint || "default");
- if (typeof res !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
+ function _iterableToArray$1(iter) {
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
- return (hint === "string" ? String : Number)(input);
-}
-
-function _toPropertyKey(arg) {
- var key = _toPrimitive(arg, "string");
-
- return typeof key === "symbol" ? key : String(key);
-}
-
-function _addElementPlacement(element, placements, silent) {
- var keys = placements[element.placement];
-
- if (!silent && keys.indexOf(element.key) !== -1) {
- throw new TypeError("Duplicated element (" + element.key + ")");
- }
-
- keys.push(element.key);
-}
-
-function _fromElementDescriptor(element) {
- var obj = {
- kind: element.kind,
- key: element.key,
- placement: element.placement,
- descriptor: element.descriptor
- };
- var desc = {
- value: "Descriptor",
- configurable: true
- };
- Object.defineProperty(obj, Symbol.toStringTag, desc);
- if (element.kind === "field") obj.initializer = element.initializer;
- return obj;
-}
-
-function _toElementDescriptors(elementObjects) {
- if (elementObjects === undefined) return;
- return _toArray(elementObjects).map(function (elementObject) {
- var element = _toElementDescriptor(elementObject);
-
- _disallowProperty(elementObject, "finisher", "An element descriptor");
-
- _disallowProperty(elementObject, "extras", "An element descriptor");
-
- return element;
- });
-}
-
-function _toElementDescriptor(elementObject) {
- var kind = String(elementObject.kind);
-
- if (kind !== "method" && kind !== "field") {
- throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
- }
-
- var key = _toPropertyKey(elementObject.key);
-
- var placement = String(elementObject.placement);
-
- if (placement !== "static" && placement !== "prototype" && placement !== "own") {
- throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
- }
-
- var descriptor = elementObject.descriptor;
-
- _disallowProperty(elementObject, "elements", "An element descriptor");
-
- var element = {
- kind: kind,
- key: key,
- placement: placement,
- descriptor: Object.assign({}, descriptor)
- };
-
- if (kind !== "field") {
- _disallowProperty(elementObject, "initializer", "A method descriptor");
- } else {
- _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
-
- _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
-
- _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
-
- element.initializer = elementObject.initializer;
- }
-
- return element;
-}
-
-function _toElementFinisherExtras(elementObject) {
- var element = _toElementDescriptor(elementObject);
-
- var finisher = _optionalCallableProperty(elementObject, "finisher");
-
- var extras = _toElementDescriptors(elementObject.extras);
-
- return {
- element: element,
- finisher: finisher,
- extras: extras
- };
-}
-
-function _fromClassDescriptor(elements) {
- var obj = {
- kind: "class",
- elements: elements.map(_fromElementDescriptor)
- };
- var desc = {
- value: "Descriptor",
- configurable: true
- };
- Object.defineProperty(obj, Symbol.toStringTag, desc);
- return obj;
-}
-
-function _toClassDescriptor(obj) {
- var kind = String(obj.kind);
-
- if (kind !== "class") {
- throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
+ function _nonIterableSpread$1() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
}
- _disallowProperty(obj, "key", "A class descriptor");
-
- _disallowProperty(obj, "placement", "A class descriptor");
-
- _disallowProperty(obj, "descriptor", "A class descriptor");
-
- _disallowProperty(obj, "initializer", "A class descriptor");
-
- _disallowProperty(obj, "extras", "A class descriptor");
-
- var finisher = _optionalCallableProperty(obj, "finisher");
-
- var elements = _toElementDescriptors(obj.elements);
-
- return {
- elements: elements,
- finisher: finisher
- };
-}
-
-function _disallowProperty(obj, name, objectType) {
- if (obj[name] !== undefined) {
- throw new TypeError(objectType + " can't have a ." + name + " property.");
- }
-}
-
-function _optionalCallableProperty(obj, name) {
- var value = obj[name];
-
- if (value !== undefined && typeof value !== "function") {
- throw new TypeError("Expected '" + name + "' to be a function");
- }
-
- return value;
-}
-
-var json = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.jsonDiff = undefined;
-
- var _typeof$$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
- return _typeof(obj);
- } : function (obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : _typeof(obj);
- };
-
- exports.
- /*istanbul ignore end*/
- diffJson = diffJson;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- canonicalize = canonicalize;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault$$1(base);
- /*istanbul ignore end*/
-
- /*istanbul ignore start*/
-
-
- function _interopRequireDefault$$1(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
-
-
var objectPrototypeToString = Object.prototype.toString;
- var jsonDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- jsonDiff = new
- /*istanbul ignore start*/
- _base2['default'](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
+ var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
jsonDiff.useLongestToken = true;
- jsonDiff.tokenize =
- /*istanbul ignore start*/
- line.lineDiff.
- /*istanbul ignore end*/
- tokenize;
+ jsonDiff.tokenize = lineDiff.tokenize;
jsonDiff.castInput = function (value) {
- /*istanbul ignore start*/
- var
- /*istanbul ignore end*/
- undefinedReplacement = this.options.undefinedReplacement;
- return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), function (k, v) {
- if (typeof v === 'undefined') {
- return undefinedReplacement;
- }
-
- return v;
- }, ' ');
+ var _this$options = this.options,
+ undefinedReplacement = _this$options.undefinedReplacement,
+ _this$options$stringi = _this$options.stringifyReplacer,
+ stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
+ return typeof v === 'undefined' ? undefinedReplacement : v;
+ } : _this$options$stringi;
+ return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
};
jsonDiff.equals = function (left, right) {
- return (
- /*istanbul ignore start*/
- _base2['default'].
- /*istanbul ignore end*/
- prototype.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'))
- );
+ return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
};
function diffJson(oldObj, newObj, options) {
return jsonDiff.diff(oldObj, newObj, options);
} // This function handles the presence of circular references by bailing out when encountering an
- // object that is already on the "stack" of items being processed.
+ // object that is already on the "stack" of items being processed. Accepts an optional replacer
- function canonicalize(obj, stack, replacementStack) {
+ function canonicalize(obj, stack, replacementStack, replacer, key) {
stack = stack || [];
replacementStack = replacementStack || [];
- var i =
- /*istanbul ignore start*/
- void 0;
+
+ if (replacer) {
+ obj = replacer(key, obj);
+ }
+
+ var i;
for (i = 0; i < stack.length; i += 1) {
if (stack[i] === obj) {
@@ -1339,9 +923,7 @@ var json = createCommonjsModule(function (module, exports) {
}
}
- var canonicalizedObj =
- /*istanbul ignore start*/
- void 0;
+ var canonicalizedObj;
if ('[object Array]' === objectPrototypeToString.call(obj)) {
stack.push(obj);
@@ -1349,7 +931,7 @@ var json = createCommonjsModule(function (module, exports) {
replacementStack.push(canonicalizedObj);
for (i = 0; i < obj.length; i += 1) {
- canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);
+ canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
}
stack.pop();
@@ -1361,31 +943,26 @@ var json = createCommonjsModule(function (module, exports) {
obj = obj.toJSON();
}
- if (
- /*istanbul ignore start*/
- (typeof
- /*istanbul ignore end*/
- obj === 'undefined' ? 'undefined' : _typeof$$1(obj)) === 'object' && obj !== null) {
+ if (_typeof$1(obj) === 'object' && obj !== null) {
stack.push(obj);
canonicalizedObj = {};
replacementStack.push(canonicalizedObj);
+
var sortedKeys = [],
- key =
- /*istanbul ignore start*/
- void 0;
+ _key;
- for (key in obj) {
+ for (_key in obj) {
/* istanbul ignore else */
- if (obj.hasOwnProperty(key)) {
- sortedKeys.push(key);
+ if (obj.hasOwnProperty(_key)) {
+ sortedKeys.push(_key);
}
}
sortedKeys.sort();
for (i = 0; i < sortedKeys.length; i += 1) {
- key = sortedKeys[i];
- canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);
+ _key = sortedKeys[i];
+ canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
}
stack.pop();
@@ -1396,62 +973,23 @@ var json = createCommonjsModule(function (module, exports) {
return canonicalizedObj;
}
-});
-unwrapExports(json);
-
-var array = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.arrayDiff = undefined;
- exports.
- /*istanbul ignore end*/
- diffArrays = diffArrays;
- /*istanbul ignore start*/
-
- var _base2 = _interopRequireDefault(base);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
- /*istanbul ignore end*/
+ var arrayDiff = new Diff();
- var arrayDiff =
- /*istanbul ignore start*/
- exports.
- /*istanbul ignore end*/
- arrayDiff = new
- /*istanbul ignore start*/
- _base2['default']();
-
- arrayDiff.tokenize = arrayDiff.join = function (value) {
+ arrayDiff.tokenize = function (value) {
return value.slice();
};
+ arrayDiff.join = arrayDiff.removeEmpty = function (value) {
+ return value;
+ };
+
function diffArrays(oldArr, newArr, callback) {
return arrayDiff.diff(oldArr, newArr, callback);
}
-});
-unwrapExports(array);
-
-var parse = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- parsePatch = parsePatch;
function parsePatch(uniDiff) {
- /*istanbul ignore start*/
- var
- /*istanbul ignore end*/
- options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
list = [],
@@ -1504,13 +1042,19 @@ var parse = createCommonjsModule(function (module, exports) {
function parseFileHeader(index) {
- var headerPattern = /^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/;
- var fileHeader = headerPattern.exec(diffstr[i]);
+ var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
if (fileHeader) {
var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
- index[keyPrefix + 'FileName'] = fileHeader[2];
- index[keyPrefix + 'Header'] = fileHeader[3];
+ var data = fileHeader[2].split('\t', 2);
+ var fileName = data[0].replace(/\\\\/g, '\\');
+
+ if (/^".*"$/.test(fileName)) {
+ fileName = fileName.substr(1, fileName.length - 2);
+ }
+
+ index[keyPrefix + 'FileName'] = fileName;
+ index[keyPrefix + 'Header'] = (data[1] || '').trim();
i++;
}
} // Parses a hunk
@@ -1539,7 +1083,7 @@ var parse = createCommonjsModule(function (module, exports) {
break;
}
- var operation = diffstr[i][0];
+ var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
hunk.lines.push(diffstr[i]);
@@ -1586,19 +1130,12 @@ var parse = createCommonjsModule(function (module, exports) {
}
return list;
- }
-});
-unwrapExports(parse);
-
-var distanceIterator = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- "use strict";
+ } // Iterator that traverses in the range of [min, max], stepping
+ // by distance from a given start position. I.e. for [0, 4], with
+ // start of 2, this will iterate 2, 3, 1, 4, 0.
- exports.__esModule = true;
- exports["default"] =
- /*istanbul ignore end*/
- function (start, minLine, maxLine) {
+ function distanceIterator(start, minLine, maxLine) {
var wantForward = true,
backwardExhausted = false,
forwardExhausted = false,
@@ -1633,51 +1170,17 @@ var distanceIterator = createCommonjsModule(function (module, exports) {
backwardExhausted = true;
return iterator();
- } // We tried to fit hunk before text beginning and beyond text lenght, then
+ } // We tried to fit hunk before text beginning and beyond text length, then
// hunk can't fit on the text. Return undefined
};
- };
-});
-unwrapExports(distanceIterator);
-
-var apply = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- applyPatch = applyPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- applyPatches = applyPatches;
- /*istanbul ignore start*/
-
- var _distanceIterator2 = _interopRequireDefault(distanceIterator);
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
}
- /*istanbul ignore end*/
-
function applyPatch(source, uniDiff) {
- /*istanbul ignore start*/
- var
- /*istanbul ignore end*/
- options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
if (typeof uniDiff === 'string') {
- uniDiff =
- /*istanbul ignore start*/
- (0, parse.parsePatch
- /*istanbul ignore end*/
- )(uniDiff);
+ uniDiff = parsePatch(uniDiff);
}
if (Array.isArray(uniDiff)) {
@@ -1692,26 +1195,15 @@ var apply = createCommonjsModule(function (module, exports) {
var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
hunks = uniDiff.hunks,
- compareLine = options.compareLine || function (lineNumber, line, operation, patchContent)
- /*istanbul ignore start*/
- {
- return (
- /*istanbul ignore end*/
- line === patchContent
- );
+ compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
+ return line === patchContent;
},
errorCount = 0,
fuzzFactor = options.fuzzFactor || 0,
minLine = 0,
offset = 0,
- removeEOFNL =
- /*istanbul ignore start*/
- void 0
- /*istanbul ignore end*/
- ,
- addEOFNL =
- /*istanbul ignore start*/
- void 0;
+ removeEOFNL,
+ addEOFNL;
/**
* Checks if the hunk exactly fits on the provided location
*/
@@ -1720,8 +1212,8 @@ var apply = createCommonjsModule(function (module, exports) {
function hunkFits(hunk, toPos) {
for (var j = 0; j < hunk.lines.length; j++) {
var line = hunk.lines[j],
- operation = line[0],
- content = line.substr(1);
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line;
if (operation === ' ' || operation === '-') {
// Context sanity check
@@ -1746,11 +1238,7 @@ var apply = createCommonjsModule(function (module, exports) {
maxLine = lines.length - hunk.oldLines,
localOffset = 0,
toPos = offset + hunk.oldStart - 1;
- var iterator =
- /*istanbul ignore start*/
- (0, _distanceIterator2['default']
- /*istanbul ignore end*/
- )(toPos, minLine, maxLine);
+ var iterator = distanceIterator(toPos, minLine, maxLine);
for (; localOffset !== undefined; localOffset = iterator()) {
if (hunkFits(hunk, toPos + localOffset)) {
@@ -1769,18 +1257,23 @@ var apply = createCommonjsModule(function (module, exports) {
} // Apply patch hunks
+ var diffOffset = 0;
+
for (var _i = 0; _i < hunks.length; _i++) {
var _hunk = hunks[_i],
- _toPos = _hunk.offset + _hunk.newStart - 1;
+ _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
+
+ diffOffset += _hunk.newLines - _hunk.oldLines;
- if (_hunk.newLines == 0) {
- _toPos++;
+ if (_toPos < 0) {
+ // Creating a new file
+ _toPos = 0;
}
for (var j = 0; j < _hunk.lines.length; j++) {
var line = _hunk.lines[j],
- operation = line[0],
- content = line.substr(1),
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line,
delimiter = _hunk.linedelimiters[j];
if (operation === ' ') {
@@ -1826,11 +1319,7 @@ var apply = createCommonjsModule(function (module, exports) {
function applyPatches(uniDiff, options) {
if (typeof uniDiff === 'string') {
- uniDiff =
- /*istanbul ignore start*/
- (0, parse.parsePatch
- /*istanbul ignore end*/
- )(uniDiff);
+ uniDiff = parsePatch(uniDiff);
}
var currentIndex = 0;
@@ -1860,42 +1349,6 @@ var apply = createCommonjsModule(function (module, exports) {
processIndex();
}
-});
-unwrapExports(apply);
-
-var create = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- structuredPatch = structuredPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- createTwoFilesPatch = createTwoFilesPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- createPatch = createPatch;
- /*istanbul ignore start*/
-
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
- arr2[i] = arr[i];
- }
-
- return arr2;
- } else {
- return Array.from(arr);
- }
- }
- /*istanbul ignore end*/
-
function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
if (!options) {
@@ -1906,11 +1359,7 @@ var create = createCommonjsModule(function (module, exports) {
options.context = 4;
}
- var diff =
- /*istanbul ignore start*/
- (0, line.diffLines
- /*istanbul ignore end*/
- )(oldStr, newStr, options);
+ var diff = diffLines(oldStr, newStr, options);
diff.push({
value: '',
lines: []
@@ -1928,20 +1377,14 @@ var create = createCommonjsModule(function (module, exports) {
curRange = [],
oldLine = 1,
newLine = 1;
- /*istanbul ignore start*/
- var _loop = function _loop(
- /*istanbul ignore end*/
- i) {
+ var _loop = function _loop(i) {
var current = diff[i],
lines = current.lines || current.value.replace(/\n$/, '').split('\n');
current.lines = lines;
if (current.added || current.removed) {
- /*istanbul ignore start*/
- var _curRange;
- /*istanbul ignore end*/
- // If we have previous context, start with that
+ var _curRange; // If we have previous context, start with that
if (!oldRangeStart) {
@@ -1956,24 +1399,8 @@ var create = createCommonjsModule(function (module, exports) {
}
} // Output our changes
- /*istanbul ignore start*/
-
-
- (_curRange =
- /*istanbul ignore end*/
- curRange).push.
- /*istanbul ignore start*/
- apply
- /*istanbul ignore end*/
- (
- /*istanbul ignore start*/
- _curRange
- /*istanbul ignore end*/
- ,
- /*istanbul ignore start*/
- _toConsumableArray(
- /*istanbul ignore end*/
- lines.map(function (entry) {
+
+ (_curRange = curRange).push.apply(_curRange, _toConsumableArray$1(lines.map(function (entry) {
return (current.added ? '+' : '-') + entry;
}))); // Track the updated file position
@@ -1988,54 +1415,17 @@ var create = createCommonjsModule(function (module, exports) {
if (oldRangeStart) {
// Close out any changes that have been output (or join overlapping)
if (lines.length <= options.context * 2 && i < diff.length - 2) {
- /*istanbul ignore start*/
- var _curRange2;
- /*istanbul ignore end*/
- // Overlapping
-
- /*istanbul ignore start*/
-
-
- (_curRange2 =
- /*istanbul ignore end*/
- curRange).push.
- /*istanbul ignore start*/
- apply
- /*istanbul ignore end*/
- (
- /*istanbul ignore start*/
- _curRange2
- /*istanbul ignore end*/
- ,
- /*istanbul ignore start*/
- _toConsumableArray(
- /*istanbul ignore end*/
- contextLines(lines)));
+ var _curRange2; // Overlapping
+
+
+ (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray$1(contextLines(lines)));
} else {
- /*istanbul ignore start*/
- var _curRange3;
- /*istanbul ignore end*/
- // end the range and output
+ var _curRange3; // end the range and output
var contextSize = Math.min(lines.length, options.context);
- /*istanbul ignore start*/
-
- (_curRange3 =
- /*istanbul ignore end*/
- curRange).push.
- /*istanbul ignore start*/
- apply
- /*istanbul ignore end*/
- (
- /*istanbul ignore start*/
- _curRange3
- /*istanbul ignore end*/
- ,
- /*istanbul ignore start*/
- _toConsumableArray(
- /*istanbul ignore end*/
- contextLines(lines.slice(0, contextSize))));
+
+ (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray$1(contextLines(lines.slice(0, contextSize))));
var hunk = {
oldStart: oldRangeStart,
@@ -2049,11 +1439,14 @@ var create = createCommonjsModule(function (module, exports) {
// EOF is inside this hunk
var oldEOFNewline = /\n$/.test(oldStr);
var newEOFNewline = /\n$/.test(newStr);
+ var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
- if (lines.length == 0 && !oldEOFNewline) {
+ if (!oldEOFNewline && noNlBeforeAdds) {
// special case: old has no eol and no trailing context; no-nl can end up before adds
curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
- } else if (!oldEOFNewline || !newEOFNewline) {
+ }
+
+ if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
curRange.push('\\ No newline at end of file');
}
}
@@ -2071,10 +1464,7 @@ var create = createCommonjsModule(function (module, exports) {
};
for (var i = 0; i < diff.length; i++) {
- /*istanbul ignore start*/
- _loop(
- /*istanbul ignore end*/
- i);
+ _loop(i);
}
return {
@@ -2110,6478 +1500,7225 @@ var create = createCommonjsModule(function (module, exports) {
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
}
-});
-unwrapExports(create);
-var dmp = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- "use strict";
+ function arrayEqual(a, b) {
+ if (a.length !== b.length) {
+ return false;
+ }
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- convertChangesToDMP = convertChangesToDMP; // See: http://code.google.com/p/google-diff-match-patch/wiki/API
+ return arrayStartsWith(a, b);
+ }
- function convertChangesToDMP(changes) {
- var ret = [],
- change =
- /*istanbul ignore start*/
- void 0
- /*istanbul ignore end*/
- ,
- operation =
- /*istanbul ignore start*/
- void 0;
+ function arrayStartsWith(array, start) {
+ if (start.length > array.length) {
+ return false;
+ }
- for (var i = 0; i < changes.length; i++) {
- change = changes[i];
+ for (var i = 0; i < start.length; i++) {
+ if (start[i] !== array[i]) {
+ return false;
+ }
+ }
- if (change.added) {
- operation = 1;
- } else if (change.removed) {
- operation = -1;
+ return true;
+ }
+
+ function calcLineCount(hunk) {
+ var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
+ oldLines = _calcOldNewLineCount.oldLines,
+ newLines = _calcOldNewLineCount.newLines;
+
+ if (oldLines !== undefined) {
+ hunk.oldLines = oldLines;
+ } else {
+ delete hunk.oldLines;
+ }
+
+ if (newLines !== undefined) {
+ hunk.newLines = newLines;
+ } else {
+ delete hunk.newLines;
+ }
+ }
+
+ function merge(mine, theirs, base) {
+ mine = loadPatch(mine, base);
+ theirs = loadPatch(theirs, base);
+ var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
+ // Leaving sanity checks on this to the API consumer that may know more about the
+ // meaning in their own context.
+
+ if (mine.index || theirs.index) {
+ ret.index = mine.index || theirs.index;
+ }
+
+ if (mine.newFileName || theirs.newFileName) {
+ if (!fileNameChanged(mine)) {
+ // No header or no change in ours, use theirs (and ours if theirs does not exist)
+ ret.oldFileName = theirs.oldFileName || mine.oldFileName;
+ ret.newFileName = theirs.newFileName || mine.newFileName;
+ ret.oldHeader = theirs.oldHeader || mine.oldHeader;
+ ret.newHeader = theirs.newHeader || mine.newHeader;
+ } else if (!fileNameChanged(theirs)) {
+ // No header or no change in theirs, use ours
+ ret.oldFileName = mine.oldFileName;
+ ret.newFileName = mine.newFileName;
+ ret.oldHeader = mine.oldHeader;
+ ret.newHeader = mine.newHeader;
} else {
- operation = 0;
+ // Both changed... figure it out
+ ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
+ ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
+ ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
+ ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
}
+ }
- ret.push([operation, change.value]);
+ ret.hunks = [];
+ var mineIndex = 0,
+ theirsIndex = 0,
+ mineOffset = 0,
+ theirsOffset = 0;
+
+ while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
+ var mineCurrent = mine.hunks[mineIndex] || {
+ oldStart: Infinity
+ },
+ theirsCurrent = theirs.hunks[theirsIndex] || {
+ oldStart: Infinity
+ };
+
+ if (hunkBefore(mineCurrent, theirsCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
+ mineIndex++;
+ theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
+ } else if (hunkBefore(theirsCurrent, mineCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
+ theirsIndex++;
+ mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
+ } else {
+ // Overlap, merge as best we can
+ var mergedHunk = {
+ oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
+ oldLines: 0,
+ newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
+ newLines: 0,
+ lines: []
+ };
+ mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
+ theirsIndex++;
+ mineIndex++;
+ ret.hunks.push(mergedHunk);
+ }
}
return ret;
}
-});
-unwrapExports(dmp);
-var xml = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
-
- exports.__esModule = true;
- exports.
- /*istanbul ignore end*/
- convertChangesToXML = convertChangesToXML;
+ function loadPatch(param, base) {
+ if (typeof param === 'string') {
+ if (/^@@/m.test(param) || /^Index:/m.test(param)) {
+ return parsePatch(param)[0];
+ }
- function convertChangesToXML(changes) {
- var ret = [];
+ if (!base) {
+ throw new Error('Must provide a base reference or pass in a patch');
+ }
- for (var i = 0; i < changes.length; i++) {
- var change = changes[i];
+ return structuredPatch(undefined, undefined, base, param);
+ }
- if (change.added) {
- ret.push('<ins>');
- } else if (change.removed) {
- ret.push('<del>');
- }
+ return param;
+ }
- ret.push(escapeHTML(change.value));
+ function fileNameChanged(patch) {
+ return patch.newFileName && patch.newFileName !== patch.oldFileName;
+ }
- if (change.added) {
- ret.push('</ins>');
- } else if (change.removed) {
- ret.push('</del>');
- }
+ function selectField(index, mine, theirs) {
+ if (mine === theirs) {
+ return mine;
+ } else {
+ index.conflict = true;
+ return {
+ mine: mine,
+ theirs: theirs
+ };
}
+ }
- return ret.join('');
+ function hunkBefore(test, check) {
+ return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
}
- function escapeHTML(s) {
- var n = s;
- n = n.replace(/&/g, '&amp;');
- n = n.replace(/</g, '&lt;');
- n = n.replace(/>/g, '&gt;');
- n = n.replace(/"/g, '&quot;');
- return n;
+ function cloneHunk(hunk, offset) {
+ return {
+ oldStart: hunk.oldStart,
+ oldLines: hunk.oldLines,
+ newStart: hunk.newStart + offset,
+ newLines: hunk.newLines,
+ lines: hunk.lines
+ };
}
-});
-unwrapExports(xml);
-var lib = createCommonjsModule(function (module, exports) {
- /*istanbul ignore start*/
- 'use strict';
+ function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
+ // This will generally result in a conflicted hunk, but there are cases where the context
+ // is the only overlap where we can successfully merge the content here.
+ var mine = {
+ offset: mineOffset,
+ lines: mineLines,
+ index: 0
+ },
+ their = {
+ offset: theirOffset,
+ lines: theirLines,
+ index: 0
+ }; // Handle any leading content
+
+ insertLeading(hunk, mine, their);
+ insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
+
+ while (mine.index < mine.lines.length && their.index < their.lines.length) {
+ var mineCurrent = mine.lines[mine.index],
+ theirCurrent = their.lines[their.index];
+
+ if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
+ // Both modified ...
+ mutualChange(hunk, mine, their);
+ } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
+ var _hunk$lines; // Mine inserted
+
+
+ (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray$1(collectChange(mine)));
+ } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
+ var _hunk$lines2; // Theirs inserted
+
+
+ (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray$1(collectChange(their)));
+ } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
+ // Mine removed or edited
+ removal(hunk, mine, their);
+ } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
+ // Their removed or edited
+ removal(hunk, their, mine, true);
+ } else if (mineCurrent === theirCurrent) {
+ // Context identity
+ hunk.lines.push(mineCurrent);
+ mine.index++;
+ their.index++;
+ } else {
+ // Context mismatch
+ conflict(hunk, collectChange(mine), collectChange(their));
+ }
+ } // Now push anything that may be remaining
- exports.__esModule = true;
- exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined;
- /*istanbul ignore end*/
- /*istanbul ignore start*/
+ insertTrailing(hunk, mine);
+ insertTrailing(hunk, their);
+ calcLineCount(hunk);
+ }
- var _base2 = _interopRequireDefault(base);
- /*istanbul ignore end*/
+ function mutualChange(hunk, mine, their) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectChange(their);
- /*istanbul ignore start*/
+ if (allRemoves(myChanges) && allRemoves(theirChanges)) {
+ // Special case for remove changes that are supersets of one another
+ if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
+ var _hunk$lines3;
+ (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray$1(myChanges));
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- 'default': obj
- };
- }
+ return;
+ } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
+ var _hunk$lines4;
- exports.
- /*istanbul ignore end*/
- Diff = _base2['default'];
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffChars = character.diffChars;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffWords = word.diffWords;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffWordsWithSpace = word.diffWordsWithSpace;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffLines = line.diffLines;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffTrimmedLines = line.diffTrimmedLines;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffSentences = sentence.diffSentences;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffCss = css.diffCss;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffJson = json.diffJson;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- diffArrays = array.diffArrays;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- structuredPatch = create.structuredPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- createTwoFilesPatch = create.createTwoFilesPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- createPatch = create.createPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- applyPatch = apply.applyPatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- applyPatches = apply.applyPatches;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- parsePatch = parse.parsePatch;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- convertChangesToDMP = dmp.convertChangesToDMP;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- convertChangesToXML = xml.convertChangesToXML;
- /*istanbul ignore start*/
-
- exports.
- /*istanbul ignore end*/
- canonicalize = json.canonicalize;
- /* See LICENSE file for terms of use */
+ (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray$1(theirChanges));
- /*
- * Text diff implementation.
- *
- * This library supports the following APIS:
- * JsDiff.diffChars: Character by character diff
- * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
- * JsDiff.diffLines: Line based diff
- *
- * JsDiff.diffCss: Diff targeted at CSS content
- *
- * These methods are based on the implementation proposed in
- * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
- * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
- */
-});
-unwrapExports(lib);
+ return;
+ }
+ } else if (arrayEqual(myChanges, theirChanges)) {
+ var _hunk$lines5;
-var _shim_fs = {};
+ (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray$1(myChanges));
-var _shim_fs$1 = Object.freeze({
- default: _shim_fs
-});
+ return;
+ }
-/*!
- * normalize-path <https://github.com/jonschlinkert/normalize-path>
- *
- * Copyright (c) 2014-2018, Jon Schlinkert.
- * Released under the MIT License.
- */
-var normalizePath = function normalizePath(path, stripTrailing) {
- if (typeof path !== 'string') {
- throw new TypeError('expected path to be a string');
+ conflict(hunk, myChanges, theirChanges);
}
- if (path === '\\' || path === '/') return '/';
- var len = path.length;
- if (len <= 1) return path; // ensure that win32 namespaces has two leading slashes, so that the path is
- // handled properly by the win32 version of path.parse() after being normalized
- // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
+ function removal(hunk, mine, their, swap) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectContext(their, myChanges);
- var prefix = '';
+ if (theirChanges.merged) {
+ var _hunk$lines6;
- if (len > 4 && path[3] === '\\') {
- var ch = path[2];
-
- if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
- path = path.slice(2);
- prefix = '//';
+ (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray$1(theirChanges.merged));
+ } else {
+ conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
}
}
- var segs = path.split(/[/\\]+/);
+ function conflict(hunk, mine, their) {
+ hunk.conflict = true;
+ hunk.lines.push({
+ conflict: true,
+ mine: mine,
+ theirs: their
+ });
+ }
+
+ function insertLeading(hunk, insert, their) {
+ while (insert.offset < their.offset && insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ insert.offset++;
+ }
+ }
- if (stripTrailing !== false && segs[segs.length - 1] === '') {
- segs.pop();
+ function insertTrailing(hunk, insert) {
+ while (insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ }
}
- return prefix + segs.join('/');
-};
+ function collectChange(state) {
+ var ret = [],
+ operation = state.lines[state.index][0];
-var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
+ while (state.index < state.lines.length) {
+ var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
-var lookup = [];
-var revLookup = [];
-var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
-var inited = false;
+ if (operation === '-' && line[0] === '+') {
+ operation = '+';
+ }
-function init() {
- inited = true;
- var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+ if (operation === line[0]) {
+ ret.push(line);
+ state.index++;
+ } else {
+ break;
+ }
+ }
- for (var i = 0, len = code.length; i < len; ++i) {
- lookup[i] = code[i];
- revLookup[code.charCodeAt(i)] = i;
+ return ret;
}
- revLookup['-'.charCodeAt(0)] = 62;
- revLookup['_'.charCodeAt(0)] = 63;
-}
+ function collectContext(state, matchChanges) {
+ var changes = [],
+ merged = [],
+ matchIndex = 0,
+ contextChanges = false,
+ conflicted = false;
-function toByteArray(b64) {
- if (!inited) {
- init();
- }
+ while (matchIndex < matchChanges.length && state.index < state.lines.length) {
+ var change = state.lines[state.index],
+ match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
- var i, j, l, tmp, placeHolders, arr;
- var len = b64.length;
+ if (match[0] === '+') {
+ break;
+ }
- if (len % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4');
- } // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
+ contextChanges = contextChanges || change[0] !== ' ';
+ merged.push(match);
+ matchIndex++; // Consume any additions in the other block as a conflict to attempt
+ // to pull in the remaining context after this
+ if (change[0] === '+') {
+ conflicted = true;
- placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data
+ while (change[0] === '+') {
+ changes.push(change);
+ change = state.lines[++state.index];
+ }
+ }
- arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars
+ if (match.substr(1) === change.substr(1)) {
+ changes.push(change);
+ state.index++;
+ } else {
+ conflicted = true;
+ }
+ }
- l = placeHolders > 0 ? len - 4 : len;
- var L = 0;
+ if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
+ conflicted = true;
+ }
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
- tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
- arr[L++] = tmp >> 16 & 0xFF;
- arr[L++] = tmp >> 8 & 0xFF;
- arr[L++] = tmp & 0xFF;
- }
+ if (conflicted) {
+ return changes;
+ }
+
+ while (matchIndex < matchChanges.length) {
+ merged.push(matchChanges[matchIndex++]);
+ }
- if (placeHolders === 2) {
- tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
- arr[L++] = tmp & 0xFF;
- } else if (placeHolders === 1) {
- tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
- arr[L++] = tmp >> 8 & 0xFF;
- arr[L++] = tmp & 0xFF;
+ return {
+ merged: merged,
+ changes: changes
+ };
}
- return arr;
-}
+ function allRemoves(changes) {
+ return changes.reduce(function (prev, change) {
+ return prev && change[0] === '-';
+ }, true);
+ }
-function tripletToBase64(num) {
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
-}
+ function skipRemoveSuperset(state, removeChanges, delta) {
+ for (var i = 0; i < delta; i++) {
+ var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
-function encodeChunk(uint8, start, end) {
- var tmp;
- var output = [];
+ if (state.lines[state.index + i] !== ' ' + changeContent) {
+ return false;
+ }
+ }
- for (var i = start; i < end; i += 3) {
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
- output.push(tripletToBase64(tmp));
+ state.index += delta;
+ return true;
}
- return output.join('');
-}
+ function calcOldNewLineCount(lines) {
+ var oldLines = 0;
+ var newLines = 0;
+ lines.forEach(function (line) {
+ if (typeof line !== 'string') {
+ var myCount = calcOldNewLineCount(line.mine);
+ var theirCount = calcOldNewLineCount(line.theirs);
-function fromByteArray(uint8) {
- if (!inited) {
- init();
- }
+ if (oldLines !== undefined) {
+ if (myCount.oldLines === theirCount.oldLines) {
+ oldLines += myCount.oldLines;
+ } else {
+ oldLines = undefined;
+ }
+ }
- var tmp;
- var len = uint8.length;
- var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
+ if (newLines !== undefined) {
+ if (myCount.newLines === theirCount.newLines) {
+ newLines += myCount.newLines;
+ } else {
+ newLines = undefined;
+ }
+ }
+ } else {
+ if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
+ newLines++;
+ }
+
+ if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
+ oldLines++;
+ }
+ }
+ });
+ return {
+ oldLines: oldLines,
+ newLines: newLines
+ };
+ } // See: http://code.google.com/p/google-diff-match-patch/wiki/API
+
+
+ function convertChangesToDMP(changes) {
+ var ret = [],
+ change,
+ operation;
- var output = '';
- var parts = [];
- var maxChunkLength = 16383; // must be multiple of 3
- // go through the array every three bytes, we'll deal with trailing stuff later
+ for (var i = 0; i < changes.length; i++) {
+ change = changes[i];
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
- } // pad the end with zeros, but make sure to not forget the extra bytes
+ if (change.added) {
+ operation = 1;
+ } else if (change.removed) {
+ operation = -1;
+ } else {
+ operation = 0;
+ }
+ ret.push([operation, change.value]);
+ }
- if (extraBytes === 1) {
- tmp = uint8[len - 1];
- output += lookup[tmp >> 2];
- output += lookup[tmp << 4 & 0x3F];
- output += '==';
- } else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + uint8[len - 1];
- output += lookup[tmp >> 10];
- output += lookup[tmp >> 4 & 0x3F];
- output += lookup[tmp << 2 & 0x3F];
- output += '=';
+ return ret;
}
- parts.push(output);
- return parts.join('');
-}
+ function convertChangesToXML(changes) {
+ var ret = [];
-function read(buffer, offset, isLE, mLen, nBytes) {
- var e, m;
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var nBits = -7;
- var i = isLE ? nBytes - 1 : 0;
- var d = isLE ? -1 : 1;
- var s = buffer[offset + i];
- i += d;
- e = s & (1 << -nBits) - 1;
- s >>= -nBits;
- nBits += eLen;
-
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
+ for (var i = 0; i < changes.length; i++) {
+ var change = changes[i];
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- if (e === 0) {
- e = 1 - eBias;
- } else if (e === eMax) {
- return m ? NaN : (s ? -1 : 1) * Infinity;
- } else {
- m = m + Math.pow(2, mLen);
- e = e - eBias;
- }
-
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
-}
-function write(buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c;
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
- var i = isLE ? 0 : nBytes - 1;
- var d = isLE ? 1 : -1;
- var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
- value = Math.abs(value);
-
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0;
- e = eMax;
- } else {
- e = Math.floor(Math.log(value) / Math.LN2);
-
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--;
- c *= 2;
- }
-
- if (e + eBias >= 1) {
- value += rt / c;
- } else {
- value += rt * Math.pow(2, 1 - eBias);
- }
+ if (change.added) {
+ ret.push('<ins>');
+ } else if (change.removed) {
+ ret.push('<del>');
+ }
- if (value * c >= 2) {
- e++;
- c /= 2;
- }
+ ret.push(escapeHTML(change.value));
- if (e + eBias >= eMax) {
- m = 0;
- e = eMax;
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
- e = 0;
+ if (change.added) {
+ ret.push('</ins>');
+ } else if (change.removed) {
+ ret.push('</del>');
+ }
}
+
+ return ret.join('');
}
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+ function escapeHTML(s) {
+ var n = s;
+ n = n.replace(/&/g, '&amp;');
+ n = n.replace(/</g, '&lt;');
+ n = n.replace(/>/g, '&gt;');
+ n = n.replace(/"/g, '&quot;');
+ return n;
+ }
- e = e << mLen | m;
- eLen += mLen;
+ var index_es6 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ Diff: Diff,
+ diffChars: diffChars,
+ diffWords: diffWords,
+ diffWordsWithSpace: diffWordsWithSpace,
+ diffLines: diffLines,
+ diffTrimmedLines: diffTrimmedLines,
+ diffSentences: diffSentences,
+ diffCss: diffCss,
+ diffJson: diffJson,
+ diffArrays: diffArrays,
+ structuredPatch: structuredPatch,
+ createTwoFilesPatch: createTwoFilesPatch,
+ createPatch: createPatch,
+ applyPatch: applyPatch,
+ applyPatches: applyPatches,
+ parsePatch: parsePatch,
+ merge: merge,
+ convertChangesToDMP: convertChangesToDMP,
+ convertChangesToXML: convertChangesToXML,
+ canonicalize: canonicalize
+ });
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+ var _shim_fs = {};
- buffer[offset + i - d] |= s * 128;
-}
+ var _shim_fs$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ 'default': _shim_fs
+ });
-var toString = {}.toString;
-var isArray$1 = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
+ /*!
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
+ *
+ * Copyright (c) 2014-2018, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+ var normalizePath = function normalizePath(path, stripTrailing) {
+ if (typeof path !== 'string') {
+ throw new TypeError('expected path to be a string');
+ }
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
- * @license MIT
- */
+ if (path === '\\' || path === '/') return '/';
+ var len = path.length;
+ if (len <= 1) return path; // ensure that win32 namespaces has two leading slashes, so that the path is
+ // handled properly by the win32 version of path.parse() after being normalized
+ // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
-/* eslint-disable no-proto */
+ var prefix = '';
-var INSPECT_MAX_BYTES = 50;
-/**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Due to various browser bugs, sometimes the Object implementation will be used even
- * when the browser supports typed arrays.
- *
- * Note:
- *
- * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
-
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
- * get the Object implementation, which is slower but behaves correctly.
- */
+ if (len > 4 && path[3] === '\\') {
+ var ch = path[2];
-Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true;
-function kMaxLength() {
- return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
-}
+ if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
+ path = path.slice(2);
+ prefix = '//';
+ }
+ }
-function createBuffer(that, length) {
- if (kMaxLength() < length) {
- throw new RangeError('Invalid typed array length');
- }
+ var segs = path.split(/[/\\]+/);
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = new Uint8Array(length);
- that.__proto__ = Buffer.prototype;
- } else {
- // Fallback: Return an object instance of the Buffer class
- if (that === null) {
- that = new Buffer(length);
+ if (stripTrailing !== false && segs[segs.length - 1] === '') {
+ segs.pop();
}
- that.length = length;
- }
-
- return that;
-}
-/**
- * The Buffer constructor returns instances of `Uint8Array` that have their
- * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
- * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
- * and the `Uint8Array` methods. Square bracket notation works as expected -- it
- * returns a single octet.
- *
- * The `Uint8Array` prototype remains unmodified.
- */
+ return prefix + segs.join('/');
+ };
+ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
-function Buffer(arg, encodingOrOffset, length) {
- if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
- return new Buffer(arg, encodingOrOffset, length);
- } // Common case.
+ var lookup = [];
+ var revLookup = [];
+ var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
+ var inited = false;
+ function init() {
+ inited = true;
+ var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
- if (typeof arg === 'number') {
- if (typeof encodingOrOffset === 'string') {
- throw new Error('If encoding is specified then the first argument must be a string');
+ for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i];
+ revLookup[code.charCodeAt(i)] = i;
}
- return allocUnsafe(this, arg);
+ revLookup['-'.charCodeAt(0)] = 62;
+ revLookup['_'.charCodeAt(0)] = 63;
}
- return from(this, arg, encodingOrOffset, length);
-}
-Buffer.poolSize = 8192; // not used by this implementation
-// TODO: Legacy, not needed anymore. Remove in next major version.
+ function toByteArray(b64) {
+ if (!inited) {
+ init();
+ }
-Buffer._augment = function (arr) {
- arr.__proto__ = Buffer.prototype;
- return arr;
-};
+ var i, j, l, tmp, placeHolders, arr;
+ var len = b64.length;
-function from(that, value, encodingOrOffset, length) {
- if (typeof value === 'number') {
- throw new TypeError('"value" argument must not be a number');
- }
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4');
+ } // the number of equal signs (place holders)
+ // if there are two placeholders, than the two characters before it
+ // represent one byte
+ // if there is only one, then the three characters before it represent 2 bytes
+ // this is just a cheap hack to not do indexOf twice
- if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
- return fromArrayBuffer(that, value, encodingOrOffset, length);
- }
- if (typeof value === 'string') {
- return fromString(that, value, encodingOrOffset);
- }
+ placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data
- return fromObject(that, value);
-}
-/**
- * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
- * if value is a number.
- * Buffer.from(str[, encoding])
- * Buffer.from(array)
- * Buffer.from(buffer)
- * Buffer.from(arrayBuffer[, byteOffset[, length]])
- **/
+ arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars
+ l = placeHolders > 0 ? len - 4 : len;
+ var L = 0;
-Buffer.from = function (value, encodingOrOffset, length) {
- return from(null, value, encodingOrOffset, length);
-};
+ for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
+ arr[L++] = tmp >> 16 & 0xFF;
+ arr[L++] = tmp >> 8 & 0xFF;
+ arr[L++] = tmp & 0xFF;
+ }
-if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype;
- Buffer.__proto__ = Uint8Array;
+ if (placeHolders === 2) {
+ tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
+ arr[L++] = tmp & 0xFF;
+ } else if (placeHolders === 1) {
+ tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
+ arr[L++] = tmp >> 8 & 0xFF;
+ arr[L++] = tmp & 0xFF;
+ }
- if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
- // Object.defineProperty(Buffer, Symbol.species, {
- // value: null,
- // configurable: true
- // })
+ return arr;
}
-}
-function assertSize(size) {
- if (typeof size !== 'number') {
- throw new TypeError('"size" argument must be a number');
- } else if (size < 0) {
- throw new RangeError('"size" argument must not be negative');
+ function tripletToBase64(num) {
+ return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
}
-}
-function alloc(that, size, fill, encoding) {
- assertSize(size);
+ function encodeChunk(uint8, start, end) {
+ var tmp;
+ var output = [];
- if (size <= 0) {
- return createBuffer(that, size);
+ for (var i = start; i < end; i += 3) {
+ tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
+ output.push(tripletToBase64(tmp));
+ }
+
+ return output.join('');
}
- if (fill !== undefined) {
- // Only pay attention to encoding if it's a string. This
- // prevents accidentally sending in a number that would
- // be interpretted as a start offset.
- return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
+ function fromByteArray(uint8) {
+ if (!inited) {
+ init();
+ }
+
+ var tmp;
+ var len = uint8.length;
+ var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
+
+ var output = '';
+ var parts = [];
+ var maxChunkLength = 16383; // must be multiple of 3
+ // go through the array every three bytes, we'll deal with trailing stuff later
+
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+ parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
+ } // pad the end with zeros, but make sure to not forget the extra bytes
+
+
+ if (extraBytes === 1) {
+ tmp = uint8[len - 1];
+ output += lookup[tmp >> 2];
+ output += lookup[tmp << 4 & 0x3F];
+ output += '==';
+ } else if (extraBytes === 2) {
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
+ output += lookup[tmp >> 10];
+ output += lookup[tmp >> 4 & 0x3F];
+ output += lookup[tmp << 2 & 0x3F];
+ output += '=';
+ }
+
+ parts.push(output);
+ return parts.join('');
+ }
+
+ function read(buffer, offset, isLE, mLen, nBytes) {
+ var e, m;
+ var eLen = nBytes * 8 - mLen - 1;
+ var eMax = (1 << eLen) - 1;
+ var eBias = eMax >> 1;
+ var nBits = -7;
+ var i = isLE ? nBytes - 1 : 0;
+ var d = isLE ? -1 : 1;
+ var s = buffer[offset + i];
+ i += d;
+ e = s & (1 << -nBits) - 1;
+ s >>= -nBits;
+ nBits += eLen;
+
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : (s ? -1 : 1) * Infinity;
+ } else {
+ m = m + Math.pow(2, mLen);
+ e = e - eBias;
+ }
+
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
}
+ function write(buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c;
+ var eLen = nBytes * 8 - mLen - 1;
+ var eMax = (1 << eLen) - 1;
+ var eBias = eMax >> 1;
+ var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
+ var i = isLE ? 0 : nBytes - 1;
+ var d = isLE ? 1 : -1;
+ var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
+ value = Math.abs(value);
- return createBuffer(that, size);
-}
-/**
- * Creates a new filled Buffer instance.
- * alloc(size[, fill[, encoding]])
- **/
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0;
+ e = eMax;
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2);
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
-Buffer.alloc = function (size, fill, encoding) {
- return alloc(null, size, fill, encoding);
-};
+ if (e + eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * Math.pow(2, 1 - eBias);
+ }
-function allocUnsafe(that, size) {
- assertSize(size);
- that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
- that[i] = 0;
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+ e = 0;
+ }
}
- }
- return that;
-}
-/**
- * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
- * */
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+ e = e << mLen | m;
+ eLen += mLen;
-Buffer.allocUnsafe = function (size) {
- return allocUnsafe(null, size);
-};
-/**
- * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
- */
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+ buffer[offset + i - d] |= s * 128;
+ }
-Buffer.allocUnsafeSlow = function (size) {
- return allocUnsafe(null, size);
-};
+ var toString = {}.toString;
+ var isArray = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+ };
-function fromString(that, string, encoding) {
- if (typeof encoding !== 'string' || encoding === '') {
- encoding = 'utf8';
- }
+ var INSPECT_MAX_BYTES = 50;
+ /**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Due to various browser bugs, sometimes the Object implementation will be used even
+ * when the browser supports typed arrays.
+ *
+ * Note:
+ *
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
- if (!Buffer.isEncoding(encoding)) {
- throw new TypeError('"encoding" must be a valid string encoding');
- }
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+ * get the Object implementation, which is slower but behaves correctly.
+ */
- var length = byteLength(string, encoding) | 0;
- that = createBuffer(that, length);
- var actual = that.write(string, encoding);
+ Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true;
- if (actual !== length) {
- // Writing a hex string, for example, that contains invalid characters will
- // cause everything after the first invalid character to be ignored. (e.g.
- // 'abxxcd' will be treated as 'ab')
- that = that.slice(0, actual);
+ function kMaxLength() {
+ return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
}
- return that;
-}
+ function createBuffer(that, length) {
+ if (kMaxLength() < length) {
+ throw new RangeError('Invalid typed array length');
+ }
-function fromArrayLike(that, array) {
- var length = array.length < 0 ? 0 : checked(array.length) | 0;
- that = createBuffer(that, length);
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = new Uint8Array(length);
+ that.__proto__ = Buffer.prototype;
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ if (that === null) {
+ that = new Buffer(length);
+ }
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255;
+ that.length = length;
+ }
+
+ return that;
}
+ /**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
- return that;
-}
-function fromArrayBuffer(that, array, byteOffset, length) {
- array.byteLength; // this throws if `array` is not a valid ArrayBuffer
+ function Buffer(arg, encodingOrOffset, length) {
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+ return new Buffer(arg, encodingOrOffset, length);
+ } // Common case.
- if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds');
- }
- if (array.byteLength < byteOffset + (length || 0)) {
- throw new RangeError('\'length\' is out of bounds');
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new Error('If encoding is specified then the first argument must be a string');
+ }
+
+ return allocUnsafe(this, arg);
+ }
+
+ return from(this, arg, encodingOrOffset, length);
}
+ Buffer.poolSize = 8192; // not used by this implementation
+ // TODO: Legacy, not needed anymore. Remove in next major version.
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array);
- } else if (length === undefined) {
- array = new Uint8Array(array, byteOffset);
- } else {
- array = new Uint8Array(array, byteOffset, length);
+ Buffer._augment = function (arr) {
+ arr.__proto__ = Buffer.prototype;
+ return arr;
+ };
+
+ function from(that, value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number');
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ return fromArrayBuffer(that, value, encodingOrOffset, length);
+ }
+
+ if (typeof value === 'string') {
+ return fromString(that, value, encodingOrOffset);
+ }
+
+ return fromObject(that, value);
}
+ /**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+
+
+ Buffer.from = function (value, encodingOrOffset, length) {
+ return from(null, value, encodingOrOffset, length);
+ };
if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = array;
- that.__proto__ = Buffer.prototype;
- } else {
- // Fallback: Return an object instance of the Buffer class
- that = fromArrayLike(that, array);
+ Buffer.prototype.__proto__ = Uint8Array.prototype;
+ Buffer.__proto__ = Uint8Array;
}
- return that;
-}
+ function assertSize(size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number');
+ } else if (size < 0) {
+ throw new RangeError('"size" argument must not be negative');
+ }
+ }
-function fromObject(that, obj) {
- if (internalIsBuffer(obj)) {
- var len = checked(obj.length) | 0;
- that = createBuffer(that, len);
+ function alloc(that, size, fill, encoding) {
+ assertSize(size);
- if (that.length === 0) {
- return that;
+ if (size <= 0) {
+ return createBuffer(that, size);
}
- obj.copy(that, 0, 0, len);
- return that;
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpretted as a start offset.
+ return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
+ }
+
+ return createBuffer(that, size);
}
+ /**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
- if (obj) {
- if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
- if (typeof obj.length !== 'number' || isnan(obj.length)) {
- return createBuffer(that, 0);
- }
- return fromArrayLike(that, obj);
- }
+ Buffer.alloc = function (size, fill, encoding) {
+ return alloc(null, size, fill, encoding);
+ };
+
+ function allocUnsafe(that, size) {
+ assertSize(size);
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
- if (obj.type === 'Buffer' && isArray$1(obj.data)) {
- return fromArrayLike(that, obj.data);
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < size; ++i) {
+ that[i] = 0;
+ }
}
+
+ return that;
}
+ /**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
- throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
-}
-function checked(length) {
- // Note: cannot use `length < kMaxLength()` here because that fails when
- // length is NaN (which is otherwise coerced to zero.)
- if (length >= kMaxLength()) {
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
- }
+ Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(null, size);
+ };
+ /**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+
- return length | 0;
-}
+ Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(null, size);
+ };
+ function fromString(that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8';
+ }
-Buffer.isBuffer = isBuffer;
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('"encoding" must be a valid string encoding');
+ }
-function internalIsBuffer(b) {
- return !!(b != null && b._isBuffer);
-}
+ var length = byteLength(string, encoding) | 0;
+ that = createBuffer(that, length);
+ var actual = that.write(string, encoding);
-Buffer.compare = function compare(a, b) {
- if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
- throw new TypeError('Arguments must be Buffers');
+ if (actual !== length) {
+ // Writing a hex string, for example, that contains invalid characters will
+ // cause everything after the first invalid character to be ignored. (e.g.
+ // 'abxxcd' will be treated as 'ab')
+ that = that.slice(0, actual);
+ }
+
+ return that;
}
- if (a === b) return 0;
- var x = a.length;
- var y = b.length;
+ function fromArrayLike(that, array) {
+ var length = array.length < 0 ? 0 : checked(array.length) | 0;
+ that = createBuffer(that, length);
- for (var i = 0, len = Math.min(x, y); i < len; ++i) {
- if (a[i] !== b[i]) {
- x = a[i];
- y = b[i];
- break;
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255;
}
+
+ return that;
}
- if (x < y) return -1;
- if (y < x) return 1;
- return 0;
-};
-
-Buffer.isEncoding = function isEncoding(encoding) {
- switch (String(encoding).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 true;
+ function fromArrayBuffer(that, array, byteOffset, length) {
+ array.byteLength; // this throws if `array` is not a valid ArrayBuffer
- default:
- return false;
- }
-};
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('\'offset\' is out of bounds');
+ }
-Buffer.concat = function concat(list, length) {
- if (!isArray$1(list)) {
- throw new TypeError('"list" argument must be an Array of Buffers');
- }
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('\'length\' is out of bounds');
+ }
+
+ if (byteOffset === undefined && length === undefined) {
+ array = new Uint8Array(array);
+ } else if (length === undefined) {
+ array = new Uint8Array(array, byteOffset);
+ } else {
+ array = new Uint8Array(array, byteOffset, length);
+ }
- if (list.length === 0) {
- return Buffer.alloc(0);
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = array;
+ that.__proto__ = Buffer.prototype;
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that = fromArrayLike(that, array);
+ }
+
+ return that;
}
- var i;
+ function fromObject(that, obj) {
+ if (internalIsBuffer(obj)) {
+ var len = checked(obj.length) | 0;
+ that = createBuffer(that, len);
- if (length === undefined) {
- length = 0;
+ if (that.length === 0) {
+ return that;
+ }
- for (i = 0; i < list.length; ++i) {
- length += list[i].length;
+ obj.copy(that, 0, 0, len);
+ return that;
}
- }
- var buffer = Buffer.allocUnsafe(length);
- var pos = 0;
+ if (obj) {
+ if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
+ return createBuffer(that, 0);
+ }
- for (i = 0; i < list.length; ++i) {
- var buf = list[i];
+ return fromArrayLike(that, obj);
+ }
- if (!internalIsBuffer(buf)) {
- throw new TypeError('"list" argument must be an Array of Buffers');
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
+ return fromArrayLike(that, obj.data);
+ }
}
- buf.copy(buffer, pos);
- pos += buf.length;
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
}
- return buffer;
-};
+ function checked(length) {
+ // Note: cannot use `length < kMaxLength()` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= kMaxLength()) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
+ }
-function byteLength(string, encoding) {
- if (internalIsBuffer(string)) {
- return string.length;
+ return length | 0;
}
+ Buffer.isBuffer = isBuffer;
- if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
- return string.byteLength;
+ function internalIsBuffer(b) {
+ return !!(b != null && b._isBuffer);
}
- if (typeof string !== 'string') {
- string = '' + string;
- }
+ Buffer.compare = function compare(a, b) {
+ if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
+ throw new TypeError('Arguments must be Buffers');
+ }
- var len = string.length;
- if (len === 0) return 0; // Use a for loop to avoid recursion
+ if (a === b) return 0;
+ var x = a.length;
+ var y = b.length;
- var loweredCase = false;
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+ if (a[i] !== b[i]) {
+ x = a[i];
+ y = b[i];
+ break;
+ }
+ }
- for (;;) {
- switch (encoding) {
- case 'ascii':
- case 'latin1':
- case 'binary':
- return len;
+ if (x < y) return -1;
+ if (y < x) return 1;
+ return 0;
+ };
+ Buffer.isEncoding = function isEncoding(encoding) {
+ switch (String(encoding).toLowerCase()) {
+ case 'hex':
case 'utf8':
case 'utf-8':
- case undefined:
- return utf8ToBytes(string).length;
-
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
- return len * 2;
-
- case 'hex':
- return len >>> 1;
-
- case 'base64':
- return base64ToBytes(string).length;
+ return true;
default:
- if (loweredCase) return utf8ToBytes(string).length; // assume utf8
+ return false;
+ }
+ };
- encoding = ('' + encoding).toLowerCase();
- loweredCase = true;
+ Buffer.concat = function concat(list, length) {
+ if (!isArray(list)) {
+ throw new TypeError('"list" argument must be an Array of Buffers');
}
- }
-}
-Buffer.byteLength = byteLength;
+ if (list.length === 0) {
+ return Buffer.alloc(0);
+ }
-function slowToString(encoding, start, end) {
- var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
- // property of a typed array.
- // This behaves neither like String nor Uint8Array in that we set start/end
- // to their upper/lower bounds if the value passed is out of range.
- // undefined is handled specially as per ECMA-262 6th Edition,
- // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+ var i;
- if (start === undefined || start < 0) {
- start = 0;
- } // Return early if start > this.length. Done here to prevent potential uint32
- // coercion fail below.
+ if (length === undefined) {
+ length = 0;
+ for (i = 0; i < list.length; ++i) {
+ length += list[i].length;
+ }
+ }
- if (start > this.length) {
- return '';
- }
+ var buffer = Buffer.allocUnsafe(length);
+ var pos = 0;
- if (end === undefined || end > this.length) {
- end = this.length;
- }
+ for (i = 0; i < list.length; ++i) {
+ var buf = list[i];
- if (end <= 0) {
- return '';
- } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+ if (!internalIsBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers');
+ }
+ buf.copy(buffer, pos);
+ pos += buf.length;
+ }
- end >>>= 0;
- start >>>= 0;
+ return buffer;
+ };
- if (end <= start) {
- return '';
- }
+ function byteLength(string, encoding) {
+ if (internalIsBuffer(string)) {
+ return string.length;
+ }
- if (!encoding) encoding = 'utf8';
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+ return string.byteLength;
+ }
- while (true) {
- switch (encoding) {
- case 'hex':
- return hexSlice(this, start, end);
+ if (typeof string !== 'string') {
+ string = '' + string;
+ }
- case 'utf8':
- case 'utf-8':
- return utf8Slice(this, start, end);
+ var len = string.length;
+ if (len === 0) return 0; // Use a for loop to avoid recursion
- case 'ascii':
- return asciiSlice(this, start, end);
+ var loweredCase = false;
- case 'latin1':
- case 'binary':
- return latin1Slice(this, start, end);
+ for (;;) {
+ switch (encoding) {
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ return len;
- case 'base64':
- return base64Slice(this, start, end);
+ case 'utf8':
+ case 'utf-8':
+ case undefined:
+ return utf8ToBytes(string).length;
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return utf16leSlice(this, start, end);
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return len * 2;
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
- encoding = (encoding + '').toLowerCase();
- loweredCase = true;
+ case 'hex':
+ return len >>> 1;
+
+ case 'base64':
+ return base64ToBytes(string).length;
+
+ default:
+ if (loweredCase) return utf8ToBytes(string).length; // assume utf8
+
+ encoding = ('' + encoding).toLowerCase();
+ loweredCase = true;
+ }
}
}
-} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
-// Buffer instances.
+ Buffer.byteLength = byteLength;
-Buffer.prototype._isBuffer = true;
+ function slowToString(encoding, start, end) {
+ var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+ // property of a typed array.
+ // This behaves neither like String nor Uint8Array in that we set start/end
+ // to their upper/lower bounds if the value passed is out of range.
+ // undefined is handled specially as per ECMA-262 6th Edition,
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
-function swap(b, n, m) {
- var i = b[n];
- b[n] = b[m];
- b[m] = i;
-}
+ if (start === undefined || start < 0) {
+ start = 0;
+ } // Return early if start > this.length. Done here to prevent potential uint32
+ // coercion fail below.
-Buffer.prototype.swap16 = function swap16() {
- var len = this.length;
- if (len % 2 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 16-bits');
- }
+ if (start > this.length) {
+ return '';
+ }
- for (var i = 0; i < len; i += 2) {
- swap(this, i, i + 1);
- }
+ if (end === undefined || end > this.length) {
+ end = this.length;
+ }
- return this;
-};
+ if (end <= 0) {
+ return '';
+ } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
-Buffer.prototype.swap32 = function swap32() {
- var len = this.length;
- if (len % 4 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 32-bits');
- }
+ end >>>= 0;
+ start >>>= 0;
- for (var i = 0; i < len; i += 4) {
- swap(this, i, i + 3);
- swap(this, i + 1, i + 2);
- }
+ if (end <= start) {
+ return '';
+ }
- return this;
-};
+ if (!encoding) encoding = 'utf8';
-Buffer.prototype.swap64 = function swap64() {
- var len = this.length;
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end);
- if (len % 8 !== 0) {
- throw new RangeError('Buffer size must be a multiple of 64-bits');
- }
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end);
- for (var i = 0; i < len; i += 8) {
- swap(this, i, i + 7);
- swap(this, i + 1, i + 6);
- swap(this, i + 2, i + 5);
- swap(this, i + 3, i + 4);
- }
+ case 'ascii':
+ return asciiSlice(this, start, end);
- return this;
-};
+ case 'latin1':
+ case 'binary':
+ return latin1Slice(this, start, end);
-Buffer.prototype.toString = function toString() {
- var length = this.length | 0;
- if (length === 0) return '';
- if (arguments.length === 0) return utf8Slice(this, 0, length);
- return slowToString.apply(this, arguments);
-};
+ case 'base64':
+ return base64Slice(this, start, end);
-Buffer.prototype.equals = function equals(b) {
- if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer');
- if (this === b) return true;
- return Buffer.compare(this, b) === 0;
-};
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end);
-Buffer.prototype.inspect = function inspect() {
- var str = '';
- var max = INSPECT_MAX_BYTES;
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+ encoding = (encoding + '').toLowerCase();
+ loweredCase = true;
+ }
+ }
+ } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+ // Buffer instances.
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
- if (this.length > max) str += ' ... ';
- }
- return '<Buffer ' + str + '>';
-};
+ Buffer.prototype._isBuffer = true;
-Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
- if (!internalIsBuffer(target)) {
- throw new TypeError('Argument must be a Buffer');
+ function swap(b, n, m) {
+ var i = b[n];
+ b[n] = b[m];
+ b[m] = i;
}
- if (start === undefined) {
- start = 0;
- }
+ Buffer.prototype.swap16 = function swap16() {
+ var len = this.length;
- if (end === undefined) {
- end = target ? target.length : 0;
- }
+ if (len % 2 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 16-bits');
+ }
- if (thisStart === undefined) {
- thisStart = 0;
- }
+ for (var i = 0; i < len; i += 2) {
+ swap(this, i, i + 1);
+ }
- if (thisEnd === undefined) {
- thisEnd = this.length;
- }
+ return this;
+ };
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
- throw new RangeError('out of range index');
- }
+ Buffer.prototype.swap32 = function swap32() {
+ var len = this.length;
- if (thisStart >= thisEnd && start >= end) {
- return 0;
- }
+ if (len % 4 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 32-bits');
+ }
- if (thisStart >= thisEnd) {
- return -1;
- }
+ for (var i = 0; i < len; i += 4) {
+ swap(this, i, i + 3);
+ swap(this, i + 1, i + 2);
+ }
- if (start >= end) {
- return 1;
- }
+ return this;
+ };
- start >>>= 0;
- end >>>= 0;
- thisStart >>>= 0;
- thisEnd >>>= 0;
- if (this === target) return 0;
- var x = thisEnd - thisStart;
- var y = end - start;
- var len = Math.min(x, y);
- var thisCopy = this.slice(thisStart, thisEnd);
- var targetCopy = target.slice(start, end);
+ Buffer.prototype.swap64 = function swap64() {
+ var len = this.length;
- for (var i = 0; i < len; ++i) {
- if (thisCopy[i] !== targetCopy[i]) {
- x = thisCopy[i];
- y = targetCopy[i];
- break;
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits');
}
- }
- if (x < y) return -1;
- if (y < x) return 1;
- return 0;
-}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
-// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
-//
-// Arguments:
-// - buffer - a Buffer to search
-// - val - a string, Buffer, or number
-// - byteOffset - an index into `buffer`; will be clamped to an int32
-// - encoding - an optional encoding, relevant is val is a string
-// - dir - true for indexOf, false for lastIndexOf
+ for (var i = 0; i < len; i += 8) {
+ swap(this, i, i + 7);
+ swap(this, i + 1, i + 6);
+ swap(this, i + 2, i + 5);
+ swap(this, i + 3, i + 4);
+ }
+ return this;
+ };
-function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
- // Empty buffer means no match
- if (buffer.length === 0) return -1; // Normalize byteOffset
+ Buffer.prototype.toString = function toString() {
+ var length = this.length | 0;
+ if (length === 0) return '';
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
+ return slowToString.apply(this, arguments);
+ };
- if (typeof byteOffset === 'string') {
- encoding = byteOffset;
- byteOffset = 0;
- } else if (byteOffset > 0x7fffffff) {
- byteOffset = 0x7fffffff;
- } else if (byteOffset < -0x80000000) {
- byteOffset = -0x80000000;
- }
+ Buffer.prototype.equals = function equals(b) {
+ if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer');
+ if (this === b) return true;
+ return Buffer.compare(this, b) === 0;
+ };
- byteOffset = +byteOffset; // Coerce to Number.
+ Buffer.prototype.inspect = function inspect() {
+ var str = '';
+ var max = INSPECT_MAX_BYTES;
- if (isNaN(byteOffset)) {
- // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
- byteOffset = dir ? 0 : buffer.length - 1;
- } // Normalize byteOffset: negative offsets start from the end of the buffer
+ if (this.length > 0) {
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
+ if (this.length > max) str += ' ... ';
+ }
+ return '<Buffer ' + str + '>';
+ };
+
+ Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
+ if (!internalIsBuffer(target)) {
+ throw new TypeError('Argument must be a Buffer');
+ }
+
+ if (start === undefined) {
+ start = 0;
+ }
- if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
+ if (end === undefined) {
+ end = target ? target.length : 0;
+ }
- if (byteOffset >= buffer.length) {
- if (dir) return -1;else byteOffset = buffer.length - 1;
- } else if (byteOffset < 0) {
- if (dir) byteOffset = 0;else return -1;
- } // Normalize val
+ if (thisStart === undefined) {
+ thisStart = 0;
+ }
+ if (thisEnd === undefined) {
+ thisEnd = this.length;
+ }
- if (typeof val === 'string') {
- val = Buffer.from(val, encoding);
- } // Finally, search either indexOf (if dir is true) or lastIndexOf
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+ throw new RangeError('out of range index');
+ }
+ if (thisStart >= thisEnd && start >= end) {
+ return 0;
+ }
- if (internalIsBuffer(val)) {
- // Special case: looking for empty string/buffer always fails
- if (val.length === 0) {
+ if (thisStart >= thisEnd) {
return -1;
}
- return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
- } else if (typeof val === 'number') {
- val = val & 0xFF; // Search for a byte value [0-255]
+ if (start >= end) {
+ return 1;
+ }
- if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
- if (dir) {
- return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
- } else {
- return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
+ start >>>= 0;
+ end >>>= 0;
+ thisStart >>>= 0;
+ thisEnd >>>= 0;
+ if (this === target) return 0;
+ var x = thisEnd - thisStart;
+ var y = end - start;
+ var len = Math.min(x, y);
+ var thisCopy = this.slice(thisStart, thisEnd);
+ var targetCopy = target.slice(start, end);
+
+ for (var i = 0; i < len; ++i) {
+ if (thisCopy[i] !== targetCopy[i]) {
+ x = thisCopy[i];
+ y = targetCopy[i];
+ break;
}
}
- return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
- }
+ if (x < y) return -1;
+ if (y < x) return 1;
+ return 0;
+ }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+ //
+ // Arguments:
+ // - buffer - a Buffer to search
+ // - val - a string, Buffer, or number
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
+ // - encoding - an optional encoding, relevant is val is a string
+ // - dir - true for indexOf, false for lastIndexOf
- throw new TypeError('val must be string, number or Buffer');
-}
-function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
- var indexSize = 1;
- var arrLength = arr.length;
- var valLength = val.length;
+ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
+ // Empty buffer means no match
+ if (buffer.length === 0) return -1; // Normalize byteOffset
+
+ if (typeof byteOffset === 'string') {
+ encoding = byteOffset;
+ byteOffset = 0;
+ } else if (byteOffset > 0x7fffffff) {
+ byteOffset = 0x7fffffff;
+ } else if (byteOffset < -0x80000000) {
+ byteOffset = -0x80000000;
+ }
- if (encoding !== undefined) {
- encoding = String(encoding).toLowerCase();
+ byteOffset = +byteOffset; // Coerce to Number.
- if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
- if (arr.length < 2 || val.length < 2) {
+ if (isNaN(byteOffset)) {
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+ byteOffset = dir ? 0 : buffer.length - 1;
+ } // Normalize byteOffset: negative offsets start from the end of the buffer
+
+
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
+
+ if (byteOffset >= buffer.length) {
+ if (dir) return -1;else byteOffset = buffer.length - 1;
+ } else if (byteOffset < 0) {
+ if (dir) byteOffset = 0;else return -1;
+ } // Normalize val
+
+
+ if (typeof val === 'string') {
+ val = Buffer.from(val, encoding);
+ } // Finally, search either indexOf (if dir is true) or lastIndexOf
+
+
+ if (internalIsBuffer(val)) {
+ // Special case: looking for empty string/buffer always fails
+ if (val.length === 0) {
return -1;
}
- indexSize = 2;
- arrLength /= 2;
- valLength /= 2;
- byteOffset /= 2;
- }
- }
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
+ } else if (typeof val === 'number') {
+ val = val & 0xFF; // Search for a byte value [0-255]
- function read$$1(buf, i) {
- if (indexSize === 1) {
- return buf[i];
- } else {
- return buf.readUInt16BE(i * indexSize);
+ if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
+ if (dir) {
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
+ } else {
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
+ }
+ }
+
+ return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
}
+
+ throw new TypeError('val must be string, number or Buffer');
}
- var i;
+ function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
+ var indexSize = 1;
+ var arrLength = arr.length;
+ var valLength = val.length;
- if (dir) {
- var foundIndex = -1;
+ if (encoding !== undefined) {
+ encoding = String(encoding).toLowerCase();
- for (i = byteOffset; i < arrLength; i++) {
- if (read$$1(arr, i) === read$$1(val, foundIndex === -1 ? 0 : i - foundIndex)) {
- if (foundIndex === -1) foundIndex = i;
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
+ if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
+ if (arr.length < 2 || val.length < 2) {
+ return -1;
+ }
+
+ indexSize = 2;
+ arrLength /= 2;
+ valLength /= 2;
+ byteOffset /= 2;
+ }
+ }
+
+ function read(buf, i) {
+ if (indexSize === 1) {
+ return buf[i];
} else {
- if (foundIndex !== -1) i -= i - foundIndex;
- foundIndex = -1;
+ return buf.readUInt16BE(i * indexSize);
}
}
- } else {
- if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
- for (i = byteOffset; i >= 0; i--) {
- var found = true;
+ var i;
- for (var j = 0; j < valLength; j++) {
- if (read$$1(arr, i + j) !== read$$1(val, j)) {
- found = false;
- break;
+ if (dir) {
+ var foundIndex = -1;
+
+ for (i = byteOffset; i < arrLength; i++) {
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ if (foundIndex === -1) foundIndex = i;
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
+ } else {
+ if (foundIndex !== -1) i -= i - foundIndex;
+ foundIndex = -1;
}
}
+ } else {
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
+
+ for (i = byteOffset; i >= 0; i--) {
+ var found = true;
- if (found) return i;
+ for (var j = 0; j < valLength; j++) {
+ if (read(arr, i + j) !== read(val, j)) {
+ found = false;
+ break;
+ }
+ }
+
+ if (found) return i;
+ }
}
+
+ return -1;
}
- return -1;
-}
+ Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
+ return this.indexOf(val, byteOffset, encoding) !== -1;
+ };
-Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
- return this.indexOf(val, byteOffset, encoding) !== -1;
-};
+ Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
+ };
-Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
-};
+ Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
+ };
-Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
-};
+ function hexWrite(buf, string, offset, length) {
+ offset = Number(offset) || 0;
+ var remaining = buf.length - offset;
-function hexWrite(buf, string, offset, length) {
- offset = Number(offset) || 0;
- var remaining = buf.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = Number(length);
- if (!length) {
- length = remaining;
- } else {
- length = Number(length);
+ if (length > remaining) {
+ length = remaining;
+ }
+ } // must be an even number of digits
- if (length > remaining) {
- length = remaining;
- }
- } // must be an even number of digits
+ var strLen = string.length;
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
- var strLen = string.length;
- if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
+ if (length > strLen / 2) {
+ length = strLen / 2;
+ }
- if (length > strLen / 2) {
- length = strLen / 2;
- }
+ for (var i = 0; i < length; ++i) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16);
+ if (isNaN(parsed)) return i;
+ buf[offset + i] = parsed;
+ }
- for (var i = 0; i < length; ++i) {
- var parsed = parseInt(string.substr(i * 2, 2), 16);
- if (isNaN(parsed)) return i;
- buf[offset + i] = parsed;
+ return i;
}
- return i;
-}
+ function utf8Write(buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
+ }
-function utf8Write(buf, string, offset, length) {
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
-}
+ function asciiWrite(buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length);
+ }
-function asciiWrite(buf, string, offset, length) {
- return blitBuffer(asciiToBytes(string), buf, offset, length);
-}
+ function latin1Write(buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length);
+ }
-function latin1Write(buf, string, offset, length) {
- return asciiWrite(buf, string, offset, length);
-}
+ function base64Write(buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length);
+ }
-function base64Write(buf, string, offset, length) {
- return blitBuffer(base64ToBytes(string), buf, offset, length);
-}
+ function ucs2Write(buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
+ }
-function ucs2Write(buf, string, offset, length) {
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
-}
+ Buffer.prototype.write = function write(string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8';
+ length = this.length;
+ offset = 0; // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset;
+ length = this.length;
+ offset = 0; // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset | 0;
-Buffer.prototype.write = function write$$1(string, offset, length, encoding) {
- // Buffer#write(string)
- if (offset === undefined) {
- encoding = 'utf8';
- length = this.length;
- offset = 0; // Buffer#write(string, encoding)
- } else if (length === undefined && typeof offset === 'string') {
- encoding = offset;
- length = this.length;
- offset = 0; // Buffer#write(string, offset[, length][, encoding])
- } else if (isFinite(offset)) {
- offset = offset | 0;
+ if (isFinite(length)) {
+ length = length | 0;
+ if (encoding === undefined) encoding = 'utf8';
+ } else {
+ encoding = length;
+ length = undefined;
+ } // legacy write(string, encoding, offset, length) - remove in v0.13
- if (isFinite(length)) {
- length = length | 0;
- if (encoding === undefined) encoding = 'utf8';
} else {
- encoding = length;
- length = undefined;
- } // legacy write(string, encoding, offset, length) - remove in v0.13
-
- } else {
- throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
- }
+ throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
+ }
- var remaining = this.length - offset;
- if (length === undefined || length > remaining) length = remaining;
+ var remaining = this.length - offset;
+ if (length === undefined || length > remaining) length = remaining;
- if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
- throw new RangeError('Attempt to write outside buffer bounds');
- }
+ if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
+ throw new RangeError('Attempt to write outside buffer bounds');
+ }
- if (!encoding) encoding = 'utf8';
- var loweredCase = false;
+ if (!encoding) encoding = 'utf8';
+ var loweredCase = false;
- for (;;) {
- switch (encoding) {
- case 'hex':
- return hexWrite(this, string, offset, length);
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length);
- case 'utf8':
- case 'utf-8':
- return utf8Write(this, string, offset, length);
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length);
- case 'ascii':
- return asciiWrite(this, string, offset, length);
+ case 'ascii':
+ return asciiWrite(this, string, offset, length);
- case 'latin1':
- case 'binary':
- return latin1Write(this, string, offset, length);
+ case 'latin1':
+ case 'binary':
+ return latin1Write(this, string, offset, length);
- case 'base64':
- // Warning: maxLength not taken into account in base64Write
- return base64Write(this, string, offset, length);
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length);
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return ucs2Write(this, string, offset, length);
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length);
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
- encoding = ('' + encoding).toLowerCase();
- loweredCase = true;
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
+ encoding = ('' + encoding).toLowerCase();
+ loweredCase = true;
+ }
}
- }
-};
+ };
-Buffer.prototype.toJSON = function toJSON() {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
+ Buffer.prototype.toJSON = function toJSON() {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ };
};
-};
-function base64Slice(buf, start, end) {
- if (start === 0 && end === buf.length) {
- return fromByteArray(buf);
- } else {
- return fromByteArray(buf.slice(start, end));
+ function base64Slice(buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return fromByteArray(buf);
+ } else {
+ return fromByteArray(buf.slice(start, end));
+ }
}
-}
-function utf8Slice(buf, start, end) {
- end = Math.min(buf.length, end);
- var res = [];
- var i = start;
+ function utf8Slice(buf, start, end) {
+ end = Math.min(buf.length, end);
+ var res = [];
+ var i = start;
- while (i < end) {
- var firstByte = buf[i];
- var codePoint = null;
- var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
+ while (i < end) {
+ var firstByte = buf[i];
+ var codePoint = null;
+ var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
- if (i + bytesPerSequence <= end) {
- var secondByte, thirdByte, fourthByte, tempCodePoint;
+ if (i + bytesPerSequence <= end) {
+ var secondByte, thirdByte, fourthByte, tempCodePoint;
- switch (bytesPerSequence) {
- case 1:
- if (firstByte < 0x80) {
- codePoint = firstByte;
- }
+ switch (bytesPerSequence) {
+ case 1:
+ if (firstByte < 0x80) {
+ codePoint = firstByte;
+ }
- break;
+ break;
- case 2:
- secondByte = buf[i + 1];
+ case 2:
+ secondByte = buf[i + 1];
- if ((secondByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
+ if ((secondByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
- if (tempCodePoint > 0x7F) {
- codePoint = tempCodePoint;
+ if (tempCodePoint > 0x7F) {
+ codePoint = tempCodePoint;
+ }
}
- }
- break;
+ break;
- case 3:
- secondByte = buf[i + 1];
- thirdByte = buf[i + 2];
+ case 3:
+ secondByte = buf[i + 1];
+ thirdByte = buf[i + 2];
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
- if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
- codePoint = tempCodePoint;
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+ codePoint = tempCodePoint;
+ }
}
- }
- break;
+ break;
- case 4:
- secondByte = buf[i + 1];
- thirdByte = buf[i + 2];
- fourthByte = buf[i + 3];
+ case 4:
+ secondByte = buf[i + 1];
+ thirdByte = buf[i + 2];
+ fourthByte = buf[i + 3];
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
- if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
- codePoint = tempCodePoint;
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+ codePoint = tempCodePoint;
+ }
}
- }
+ }
}
- }
- if (codePoint === null) {
- // we did not generate a valid codePoint so insert a
- // replacement char (U+FFFD) and advance only 1 byte
- codePoint = 0xFFFD;
- bytesPerSequence = 1;
- } else if (codePoint > 0xFFFF) {
- // encode to utf16 (surrogate pair dance)
- codePoint -= 0x10000;
- res.push(codePoint >>> 10 & 0x3FF | 0xD800);
- codePoint = 0xDC00 | codePoint & 0x3FF;
+ if (codePoint === null) {
+ // we did not generate a valid codePoint so insert a
+ // replacement char (U+FFFD) and advance only 1 byte
+ codePoint = 0xFFFD;
+ bytesPerSequence = 1;
+ } else if (codePoint > 0xFFFF) {
+ // encode to utf16 (surrogate pair dance)
+ codePoint -= 0x10000;
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800);
+ codePoint = 0xDC00 | codePoint & 0x3FF;
+ }
+
+ res.push(codePoint);
+ i += bytesPerSequence;
}
- res.push(codePoint);
- i += bytesPerSequence;
- }
+ return decodeCodePointsArray(res);
+ } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
+ // the lowest limit is Chrome, with 0x10000 args.
+ // We go 1 magnitude less, for safety
- return decodeCodePointsArray(res);
-} // Based on http://stackoverflow.com/a/22747272/680742, the browser with
-// the lowest limit is Chrome, with 0x10000 args.
-// We go 1 magnitude less, for safety
+ var MAX_ARGUMENTS_LENGTH = 0x1000;
-var MAX_ARGUMENTS_LENGTH = 0x1000;
+ function decodeCodePointsArray(codePoints) {
+ var len = codePoints.length;
-function decodeCodePointsArray(codePoints) {
- var len = codePoints.length;
+ if (len <= MAX_ARGUMENTS_LENGTH) {
+ return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
+ } // Decode in chunks to avoid "call stack size exceeded".
- if (len <= MAX_ARGUMENTS_LENGTH) {
- return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
- } // Decode in chunks to avoid "call stack size exceeded".
+ var res = '';
+ var i = 0;
- var res = '';
- var i = 0;
+ while (i < len) {
+ res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
+ }
- while (i < len) {
- res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
+ return res;
}
- return res;
-}
+ function asciiSlice(buf, start, end) {
+ var ret = '';
+ end = Math.min(buf.length, end);
-function asciiSlice(buf, start, end) {
- var ret = '';
- end = Math.min(buf.length, end);
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i] & 0x7F);
+ }
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i] & 0x7F);
+ return ret;
}
- return ret;
-}
+ function latin1Slice(buf, start, end) {
+ var ret = '';
+ end = Math.min(buf.length, end);
-function latin1Slice(buf, start, end) {
- var ret = '';
- end = Math.min(buf.length, end);
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i]);
+ }
- for (var i = start; i < end; ++i) {
- ret += String.fromCharCode(buf[i]);
+ return ret;
}
- return ret;
-}
+ function hexSlice(buf, start, end) {
+ var len = buf.length;
+ if (!start || start < 0) start = 0;
+ if (!end || end < 0 || end > len) end = len;
+ var out = '';
-function hexSlice(buf, start, end) {
- var len = buf.length;
- if (!start || start < 0) start = 0;
- if (!end || end < 0 || end > len) end = len;
- var out = '';
+ for (var i = start; i < end; ++i) {
+ out += toHex(buf[i]);
+ }
- for (var i = start; i < end; ++i) {
- out += toHex(buf[i]);
+ return out;
}
- return out;
-}
+ function utf16leSlice(buf, start, end) {
+ var bytes = buf.slice(start, end);
+ var res = '';
-function utf16leSlice(buf, start, end) {
- var bytes = buf.slice(start, end);
- var res = '';
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
+ }
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
+ return res;
}
- return res;
-}
-
-Buffer.prototype.slice = function slice(start, end) {
- var len = this.length;
- start = ~~start;
- end = end === undefined ? len : ~~end;
+ Buffer.prototype.slice = function slice(start, end) {
+ var len = this.length;
+ start = ~~start;
+ end = end === undefined ? len : ~~end;
- if (start < 0) {
- start += len;
- if (start < 0) start = 0;
- } else if (start > len) {
- start = len;
- }
+ if (start < 0) {
+ start += len;
+ if (start < 0) start = 0;
+ } else if (start > len) {
+ start = len;
+ }
- if (end < 0) {
- end += len;
- if (end < 0) end = 0;
- } else if (end > len) {
- end = len;
- }
+ if (end < 0) {
+ end += len;
+ if (end < 0) end = 0;
+ } else if (end > len) {
+ end = len;
+ }
- if (end < start) end = start;
- var newBuf;
+ if (end < start) end = start;
+ var newBuf;
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- newBuf = this.subarray(start, end);
- newBuf.__proto__ = Buffer.prototype;
- } else {
- var sliceLen = end - start;
- newBuf = new Buffer(sliceLen, undefined);
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ newBuf = this.subarray(start, end);
+ newBuf.__proto__ = Buffer.prototype;
+ } else {
+ var sliceLen = end - start;
+ newBuf = new Buffer(sliceLen, undefined);
- for (var i = 0; i < sliceLen; ++i) {
- newBuf[i] = this[i + start];
+ for (var i = 0; i < sliceLen; ++i) {
+ newBuf[i] = this[i + start];
+ }
}
- }
-
- return newBuf;
-};
-/*
- * Need to make sure that buffer isn't trying to write out of bounds.
- */
+ return newBuf;
+ };
+ /*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
-function checkOffset(offset, ext, length) {
- if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
- if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
-}
-
-Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
- offset = offset | 0;
- byteLength = byteLength | 0;
- if (!noAssert) checkOffset(offset, byteLength, this.length);
- var val = this[offset];
- var mul = 1;
- var i = 0;
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul;
+ function checkOffset(offset, ext, length) {
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
}
- return val;
-};
+ Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
+ offset = offset | 0;
+ byteLength = byteLength | 0;
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
+ var val = this[offset];
+ var mul = 1;
+ var i = 0;
-Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
- offset = offset | 0;
- byteLength = byteLength | 0;
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul;
+ }
- if (!noAssert) {
- checkOffset(offset, byteLength, this.length);
- }
+ return val;
+ };
- var val = this[offset + --byteLength];
- var mul = 1;
+ Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
+ offset = offset | 0;
+ byteLength = byteLength | 0;
- while (byteLength > 0 && (mul *= 0x100)) {
- val += this[offset + --byteLength] * mul;
- }
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length);
+ }
- return val;
-};
-
-Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length);
- return this[offset];
-};
-
-Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length);
- return this[offset] | this[offset + 1] << 8;
-};
-
-Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length);
- return this[offset] << 8 | this[offset + 1];
-};
-
-Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
-};
-
-Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
-};
-
-Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
- offset = offset | 0;
- byteLength = byteLength | 0;
- if (!noAssert) checkOffset(offset, byteLength, this.length);
- var val = this[offset];
- var mul = 1;
- var i = 0;
+ var val = this[offset + --byteLength];
+ var mul = 1;
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul;
- }
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul;
+ }
- mul *= 0x80;
- if (val >= mul) val -= Math.pow(2, 8 * byteLength);
- return val;
-};
+ return val;
+ };
-Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
- offset = offset | 0;
- byteLength = byteLength | 0;
- if (!noAssert) checkOffset(offset, byteLength, this.length);
- var i = byteLength;
- var mul = 1;
- var val = this[offset + --i];
+ Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length);
+ return this[offset];
+ };
- while (i > 0 && (mul *= 0x100)) {
- val += this[offset + --i] * mul;
- }
+ Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length);
+ return this[offset] | this[offset + 1] << 8;
+ };
- mul *= 0x80;
- if (val >= mul) val -= Math.pow(2, 8 * byteLength);
- return val;
-};
+ Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length);
+ return this[offset] << 8 | this[offset + 1];
+ };
-Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length);
- if (!(this[offset] & 0x80)) return this[offset];
- return (0xff - this[offset] + 1) * -1;
-};
+ Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
+ };
-Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length);
- var val = this[offset] | this[offset + 1] << 8;
- return val & 0x8000 ? val | 0xFFFF0000 : val;
-};
+ Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
+ };
-Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length);
- var val = this[offset + 1] | this[offset] << 8;
- return val & 0x8000 ? val | 0xFFFF0000 : val;
-};
+ Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
+ offset = offset | 0;
+ byteLength = byteLength | 0;
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
+ var val = this[offset];
+ var mul = 1;
+ var i = 0;
-Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
-};
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul;
+ }
-Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
-};
+ mul *= 0x80;
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+ return val;
+ };
-Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return read(this, offset, true, 23, 4);
-};
+ Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
+ offset = offset | 0;
+ byteLength = byteLength | 0;
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
+ var i = byteLength;
+ var mul = 1;
+ var val = this[offset + --i];
-Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length);
- return read(this, offset, false, 23, 4);
-};
-
-Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length);
- return read(this, offset, true, 52, 8);
-};
-
-Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length);
- return read(this, offset, false, 52, 8);
-};
-
-function checkInt(buf, value, offset, ext, max, min) {
- if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
- if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
- if (offset + ext > buf.length) throw new RangeError('Index out of range');
-}
-
-Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
- value = +value;
- offset = offset | 0;
- byteLength = byteLength | 0;
-
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1;
- checkInt(this, value, offset, byteLength, maxBytes, 0);
- }
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul;
+ }
- var mul = 1;
- var i = 0;
- this[offset] = value & 0xFF;
+ mul *= 0x80;
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
+ return val;
+ };
- while (++i < byteLength && (mul *= 0x100)) {
- this[offset + i] = value / mul & 0xFF;
- }
+ Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length);
+ if (!(this[offset] & 0x80)) return this[offset];
+ return (0xff - this[offset] + 1) * -1;
+ };
- return offset + byteLength;
-};
+ Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length);
+ var val = this[offset] | this[offset + 1] << 8;
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
+ };
-Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
- value = +value;
- offset = offset | 0;
- byteLength = byteLength | 0;
+ Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length);
+ var val = this[offset + 1] | this[offset] << 8;
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
+ };
- if (!noAssert) {
- var maxBytes = Math.pow(2, 8 * byteLength) - 1;
- checkInt(this, value, offset, byteLength, maxBytes, 0);
- }
+ Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
+ };
- var i = byteLength - 1;
- var mul = 1;
- this[offset + i] = value & 0xFF;
+ Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
+ };
- while (--i >= 0 && (mul *= 0x100)) {
- this[offset + i] = value / mul & 0xFF;
- }
+ Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return read(this, offset, true, 23, 4);
+ };
- return offset + byteLength;
-};
+ Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length);
+ return read(this, offset, false, 23, 4);
+ };
-Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
- this[offset] = value & 0xff;
- return offset + 1;
-};
+ Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length);
+ return read(this, offset, true, 52, 8);
+ };
-function objectWriteUInt16(buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffff + value + 1;
+ Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length);
+ return read(this, offset, false, 52, 8);
+ };
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
- buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
+ function checkInt(buf, value, offset, ext, max, min) {
+ if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
}
-}
-Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
+ Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ byteLength = byteLength | 0;
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value & 0xff;
- this[offset + 1] = value >>> 8;
- } else {
- objectWriteUInt16(this, value, offset, true);
- }
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
+ }
- return offset + 2;
-};
+ var mul = 1;
+ var i = 0;
+ this[offset] = value & 0xFF;
-Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = value / mul & 0xFF;
+ }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value >>> 8;
- this[offset + 1] = value & 0xff;
- } else {
- objectWriteUInt16(this, value, offset, false);
- }
+ return offset + byteLength;
+ };
- return offset + 2;
-};
+ Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ byteLength = byteLength | 0;
-function objectWriteUInt32(buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffffffff + value + 1;
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
+ }
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
- buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
- }
-}
+ var i = byteLength - 1;
+ var mul = 1;
+ this[offset + i] = value & 0xFF;
-Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = value / mul & 0xFF;
+ }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset + 3] = value >>> 24;
- this[offset + 2] = value >>> 16;
- this[offset + 1] = value >>> 8;
+ return offset + byteLength;
+ };
+
+ Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
this[offset] = value & 0xff;
- } else {
- objectWriteUInt32(this, value, offset, true);
+ return offset + 1;
+ };
+
+ function objectWriteUInt16(buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffff + value + 1;
+
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+ buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
+ }
}
- return offset + 4;
-};
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
-Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value & 0xff;
+ this[offset + 1] = value >>> 8;
+ } else {
+ objectWriteUInt16(this, value, offset, true);
+ }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value >>> 24;
- this[offset + 1] = value >>> 16;
- this[offset + 2] = value >>> 8;
- this[offset + 3] = value & 0xff;
- } else {
- objectWriteUInt32(this, value, offset, false);
- }
+ return offset + 2;
+ };
+
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value >>> 8;
+ this[offset + 1] = value & 0xff;
+ } else {
+ objectWriteUInt16(this, value, offset, false);
+ }
- return offset + 4;
-};
+ return offset + 2;
+ };
-Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
- value = +value;
- offset = offset | 0;
+ function objectWriteUInt32(buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffffffff + value + 1;
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1);
- checkInt(this, value, offset, byteLength, limit - 1, -limit);
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+ buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
+ }
}
- var i = 0;
- var mul = 1;
- var sub = 0;
- this[offset] = value & 0xFF;
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
- while (++i < byteLength && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
- sub = 1;
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset + 3] = value >>> 24;
+ this[offset + 2] = value >>> 16;
+ this[offset + 1] = value >>> 8;
+ this[offset] = value & 0xff;
+ } else {
+ objectWriteUInt32(this, value, offset, true);
}
- this[offset + i] = (value / mul >> 0) - sub & 0xFF;
- }
+ return offset + 4;
+ };
- return offset + byteLength;
-};
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
-Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
- value = +value;
- offset = offset | 0;
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value >>> 24;
+ this[offset + 1] = value >>> 16;
+ this[offset + 2] = value >>> 8;
+ this[offset + 3] = value & 0xff;
+ } else {
+ objectWriteUInt32(this, value, offset, false);
+ }
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1);
- checkInt(this, value, offset, byteLength, limit - 1, -limit);
- }
+ return offset + 4;
+ };
- var i = byteLength - 1;
- var mul = 1;
- var sub = 0;
- this[offset + i] = value & 0xFF;
+ Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
+ value = +value;
+ offset = offset | 0;
- while (--i >= 0 && (mul *= 0x100)) {
- if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
- sub = 1;
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1);
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
}
- this[offset + i] = (value / mul >> 0) - sub & 0xFF;
- }
+ var i = 0;
+ var mul = 1;
+ var sub = 0;
+ this[offset] = value & 0xFF;
- return offset + byteLength;
-};
+ while (++i < byteLength && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+ sub = 1;
+ }
-Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
- if (value < 0) value = 0xff + value + 1;
- this[offset] = value & 0xff;
- return offset + 1;
-};
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+ }
-Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
+ return offset + byteLength;
+ };
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value & 0xff;
- this[offset + 1] = value >>> 8;
- } else {
- objectWriteUInt16(this, value, offset, true);
- }
+ Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
+ value = +value;
+ offset = offset | 0;
- return offset + 2;
-};
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1);
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
+ }
-Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
+ var i = byteLength - 1;
+ var mul = 1;
+ var sub = 0;
+ this[offset + i] = value & 0xFF;
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value >>> 8;
- this[offset + 1] = value & 0xff;
- } else {
- objectWriteUInt16(this, value, offset, false);
- }
+ while (--i >= 0 && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+ sub = 1;
+ }
- return offset + 2;
-};
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
+ }
-Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
+ return offset + byteLength;
+ };
- if (Buffer.TYPED_ARRAY_SUPPORT) {
+ Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
+ if (value < 0) value = 0xff + value + 1;
this[offset] = value & 0xff;
- this[offset + 1] = value >>> 8;
- this[offset + 2] = value >>> 16;
- this[offset + 3] = value >>> 24;
- } else {
- objectWriteUInt32(this, value, offset, true);
- }
+ return offset + 1;
+ };
- return offset + 4;
-};
+ Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
-Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
- value = +value;
- offset = offset | 0;
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
- if (value < 0) value = 0xffffffff + value + 1;
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value & 0xff;
+ this[offset + 1] = value >>> 8;
+ } else {
+ objectWriteUInt16(this, value, offset, true);
+ }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value >>> 24;
- this[offset + 1] = value >>> 16;
- this[offset + 2] = value >>> 8;
- this[offset + 3] = value & 0xff;
- } else {
- objectWriteUInt32(this, value, offset, false);
- }
+ return offset + 2;
+ };
+
+ Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value >>> 8;
+ this[offset + 1] = value & 0xff;
+ } else {
+ objectWriteUInt16(this, value, offset, false);
+ }
- return offset + 4;
-};
+ return offset + 2;
+ };
-function checkIEEE754(buf, value, offset, ext, max, min) {
- if (offset + ext > buf.length) throw new RangeError('Index out of range');
- if (offset < 0) throw new RangeError('Index out of range');
-}
+ Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
-function writeFloat(buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
- }
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value & 0xff;
+ this[offset + 1] = value >>> 8;
+ this[offset + 2] = value >>> 16;
+ this[offset + 3] = value >>> 24;
+ } else {
+ objectWriteUInt32(this, value, offset, true);
+ }
- write(buf, value, offset, littleEndian, 23, 4);
- return offset + 4;
-}
+ return offset + 4;
+ };
-Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
- return writeFloat(this, value, offset, true, noAssert);
-};
+ Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
+ value = +value;
+ offset = offset | 0;
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
+ if (value < 0) value = 0xffffffff + value + 1;
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value >>> 24;
+ this[offset + 1] = value >>> 16;
+ this[offset + 2] = value >>> 8;
+ this[offset + 3] = value & 0xff;
+ } else {
+ objectWriteUInt32(this, value, offset, false);
+ }
-Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
- return writeFloat(this, value, offset, false, noAssert);
-};
+ return offset + 4;
+ };
-function writeDouble(buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
+ function checkIEEE754(buf, value, offset, ext, max, min) {
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
+ if (offset < 0) throw new RangeError('Index out of range');
}
- write(buf, value, offset, littleEndian, 52, 8);
- return offset + 8;
-}
-
-Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
- return writeDouble(this, value, offset, true, noAssert);
-};
+ function writeFloat(buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4);
+ }
-Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
- return writeDouble(this, value, offset, false, noAssert);
-}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+ write(buf, value, offset, littleEndian, 23, 4);
+ return offset + 4;
+ }
+ Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert);
+ };
-Buffer.prototype.copy = function copy(target, targetStart, start, end) {
- if (!start) start = 0;
- if (!end && end !== 0) end = this.length;
- if (targetStart >= target.length) targetStart = target.length;
- if (!targetStart) targetStart = 0;
- if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
+ Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert);
+ };
- if (end === start) return 0;
- if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
+ function writeDouble(buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8);
+ }
- if (targetStart < 0) {
- throw new RangeError('targetStart out of bounds');
+ write(buf, value, offset, littleEndian, 52, 8);
+ return offset + 8;
}
- if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
- if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert);
+ };
- if (end > this.length) end = this.length;
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert);
+ }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
- if (target.length - targetStart < end - start) {
- end = target.length - targetStart + start;
- }
- var len = end - start;
- var i;
+ Buffer.prototype.copy = function copy(target, targetStart, start, end) {
+ if (!start) start = 0;
+ if (!end && end !== 0) end = this.length;
+ if (targetStart >= target.length) targetStart = target.length;
+ if (!targetStart) targetStart = 0;
+ if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
- if (this === target && start < targetStart && targetStart < end) {
- // descending copy from end
- for (i = len - 1; i >= 0; --i) {
- target[i + targetStart] = this[i + start];
- }
- } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
- // ascending copy from start
- for (i = 0; i < len; ++i) {
- target[i + targetStart] = this[i + start];
+ if (end === start) return 0;
+ if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
+
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds');
}
- } else {
- Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
- }
- return len;
-}; // Usage:
-// buffer.fill(number[, offset[, end]])
-// buffer.fill(buffer[, offset[, end]])
-// buffer.fill(string[, offset[, end]][, encoding])
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
+ if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
+ if (end > this.length) end = this.length;
-Buffer.prototype.fill = function fill(val, start, end, encoding) {
- // Handle string cases:
- if (typeof val === 'string') {
- if (typeof start === 'string') {
- encoding = start;
- start = 0;
- end = this.length;
- } else if (typeof end === 'string') {
- encoding = end;
- end = this.length;
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start;
}
- if (val.length === 1) {
- var code = val.charCodeAt(0);
+ var len = end - start;
+ var i;
- if (code < 256) {
- val = code;
+ if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start];
+ }
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+ // ascending copy from start
+ for (i = 0; i < len; ++i) {
+ target[i + targetStart] = this[i + start];
}
+ } else {
+ Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
}
- if (encoding !== undefined && typeof encoding !== 'string') {
- throw new TypeError('encoding must be a string');
- }
+ return len;
+ }; // Usage:
+ // buffer.fill(number[, offset[, end]])
+ // buffer.fill(buffer[, offset[, end]])
+ // buffer.fill(string[, offset[, end]][, encoding])
- if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
- throw new TypeError('Unknown encoding: ' + encoding);
- }
- } else if (typeof val === 'number') {
- val = val & 255;
- } // Invalid ranges are not set to a default, so can range check early.
+ Buffer.prototype.fill = function fill(val, start, end, encoding) {
+ // Handle string cases:
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start;
+ start = 0;
+ end = this.length;
+ } else if (typeof end === 'string') {
+ encoding = end;
+ end = this.length;
+ }
- if (start < 0 || this.length < start || this.length < end) {
- throw new RangeError('Out of range index');
- }
+ if (val.length === 1) {
+ var code = val.charCodeAt(0);
- if (end <= start) {
- return this;
- }
+ if (code < 256) {
+ val = code;
+ }
+ }
- start = start >>> 0;
- end = end === undefined ? this.length : end >>> 0;
- if (!val) val = 0;
- var i;
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string');
+ }
+
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding);
+ }
+ } else if (typeof val === 'number') {
+ val = val & 255;
+ } // Invalid ranges are not set to a default, so can range check early.
- if (typeof val === 'number') {
- for (i = start; i < end; ++i) {
- this[i] = val;
+
+ if (start < 0 || this.length < start || this.length < end) {
+ throw new RangeError('Out of range index');
}
- } else {
- var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
- var len = bytes.length;
- for (i = 0; i < end - start; ++i) {
- this[i + start] = bytes[i % len];
+ if (end <= start) {
+ return this;
}
- }
- return this;
-}; // HELPER FUNCTIONS
-// ================
+ start = start >>> 0;
+ end = end === undefined ? this.length : end >>> 0;
+ if (!val) val = 0;
+ var i;
+ if (typeof val === 'number') {
+ for (i = start; i < end; ++i) {
+ this[i] = val;
+ }
+ } else {
+ var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
+ var len = bytes.length;
-var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
+ for (i = 0; i < end - start; ++i) {
+ this[i + start] = bytes[i % len];
+ }
+ }
-function base64clean(str) {
- // Node strips out invalid characters like \n and \t from the string, base64-js does not
- str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
+ return this;
+ }; // HELPER FUNCTIONS
+ // ================
+
+
+ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
+
+ function base64clean(str) {
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
+
+ if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
- if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '=';
+ }
- while (str.length % 4 !== 0) {
- str = str + '=';
+ return str;
}
- return str;
-}
+ function stringtrim(str) {
+ if (str.trim) return str.trim();
+ return str.replace(/^\s+|\s+$/g, '');
+ }
+
+ function toHex(n) {
+ if (n < 16) return '0' + n.toString(16);
+ return n.toString(16);
+ }
-function stringtrim(str) {
- if (str.trim) return str.trim();
- return str.replace(/^\s+|\s+$/g, '');
-}
+ function utf8ToBytes(string, units) {
+ units = units || Infinity;
+ var codePoint;
+ var length = string.length;
+ var leadSurrogate = null;
+ var bytes = [];
-function toHex(n) {
- if (n < 16) return '0' + n.toString(16);
- return n.toString(16);
-}
+ for (var i = 0; i < length; ++i) {
+ codePoint = string.charCodeAt(i); // is surrogate component
-function utf8ToBytes(string, units) {
- units = units || Infinity;
- var codePoint;
- var length = string.length;
- var leadSurrogate = null;
- var bytes = [];
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (!leadSurrogate) {
+ // no lead yet
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ continue;
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ continue;
+ } // valid lead
- for (var i = 0; i < length; ++i) {
- codePoint = string.charCodeAt(i); // is surrogate component
- if (codePoint > 0xD7FF && codePoint < 0xE000) {
- // last char was a lead
- if (!leadSurrogate) {
- // no lead yet
- if (codePoint > 0xDBFF) {
- // unexpected trail
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ leadSurrogate = codePoint;
continue;
- } else if (i + 1 === length) {
- // unpaired lead
+ } // 2 leads in a row
+
+
+ if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ leadSurrogate = codePoint;
continue;
- } // valid lead
+ } // valid surrogate pair
- leadSurrogate = codePoint;
- continue;
- } // 2 leads in a row
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ }
+ leadSurrogate = null; // encode utf8
+
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break;
+ bytes.push(codePoint);
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break;
+ bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break;
+ bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+ } else if (codePoint < 0x110000) {
+ if ((units -= 4) < 0) break;
+ bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
+ } else {
+ throw new Error('Invalid code point');
+ }
+ }
- if (codePoint < 0xDC00) {
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
- leadSurrogate = codePoint;
- continue;
- } // valid surrogate pair
+ return bytes;
+ }
+ function asciiToBytes(str) {
+ var byteArray = [];
- codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
- } else if (leadSurrogate) {
- // valid bmp char, but last char was a lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
+ for (var i = 0; i < str.length; ++i) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF);
}
- leadSurrogate = null; // encode utf8
+ return byteArray;
+ }
+
+ function utf16leToBytes(str, units) {
+ var c, hi, lo;
+ var byteArray = [];
- if (codePoint < 0x80) {
- if ((units -= 1) < 0) break;
- bytes.push(codePoint);
- } else if (codePoint < 0x800) {
+ for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break;
- bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
- } else if (codePoint < 0x10000) {
- if ((units -= 3) < 0) break;
- bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
- } else if (codePoint < 0x110000) {
- if ((units -= 4) < 0) break;
- bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
- } else {
- throw new Error('Invalid code point');
+ c = str.charCodeAt(i);
+ hi = c >> 8;
+ lo = c % 256;
+ byteArray.push(lo);
+ byteArray.push(hi);
}
+
+ return byteArray;
}
- return bytes;
-}
+ function base64ToBytes(str) {
+ return toByteArray(base64clean(str));
+ }
-function asciiToBytes(str) {
- var byteArray = [];
+ function blitBuffer(src, dst, offset, length) {
+ for (var i = 0; i < length; ++i) {
+ if (i + offset >= dst.length || i >= src.length) break;
+ dst[i + offset] = src[i];
+ }
- for (var i = 0; i < str.length; ++i) {
- // Node's code seems to be doing this and not & 0x7F..
- byteArray.push(str.charCodeAt(i) & 0xFF);
+ return i;
}
- return byteArray;
-}
+ function isnan(val) {
+ return val !== val; // eslint-disable-line no-self-compare
+ } // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
+ // The _isBuffer check is for Safari 5-7 support, because it's missing
+ // Object.prototype.constructor. Remove this eventually
-function utf16leToBytes(str, units) {
- var c, hi, lo;
- var byteArray = [];
- for (var i = 0; i < str.length; ++i) {
- if ((units -= 2) < 0) break;
- c = str.charCodeAt(i);
- hi = c >> 8;
- lo = c % 256;
- byteArray.push(lo);
- byteArray.push(hi);
+ function isBuffer(obj) {
+ return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
}
- return byteArray;
-}
+ function isFastBuffer(obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
+ } // For Node v0.10 support. Remove this eventually.
-function base64ToBytes(str) {
- return toByteArray(base64clean(str));
-}
-function blitBuffer(src, dst, offset, length) {
- for (var i = 0; i < length; ++i) {
- if (i + offset >= dst.length || i >= src.length) break;
- dst[i + offset] = src[i];
+ function isSlowBuffer(obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0));
}
- return i;
-}
-
-function isnan(val) {
- return val !== val; // eslint-disable-line no-self-compare
-} // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
-// The _isBuffer check is for Safari 5-7 support, because it's missing
-// Object.prototype.constructor. Remove this eventually
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+ function unwrapExports (x) {
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+ }
-function isBuffer(obj) {
- return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
-}
-
-function isFastBuffer(obj) {
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
-} // For Node v0.10 support. Remove this eventually.
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
+ function getCjsExportFromNamespace (n) {
+ return n && n['default'] || n;
+ }
-function isSlowBuffer(obj) {
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0));
-}
+ var fs = getCjsExportFromNamespace(_shim_fs$1);
-var fs = ( _shim_fs$1 && _shim_fs ) || _shim_fs$1;
+ /**
+ * @class
+ */
-/**
- * @class
- */
+ var LineByLine =
+ /*#__PURE__*/
+ function () {
+ function LineByLine(file, options) {
+ _classCallCheck(this, LineByLine);
-var LineByLine =
-/*#__PURE__*/
-function () {
- function LineByLine(file, options) {
- _classCallCheck(this, LineByLine);
+ options = options || {};
+ if (!options.readChunk) options.readChunk = 1024;
- options = options || {};
- if (!options.readChunk) options.readChunk = 1024;
+ if (!options.newLineCharacter) {
+ options.newLineCharacter = 0x0a; //linux line ending
+ } else {
+ options.newLineCharacter = options.newLineCharacter.charCodeAt(0);
+ }
- if (!options.newLineCharacter) {
- options.newLineCharacter = 0x0a; //linux line ending
- } else {
- options.newLineCharacter = options.newLineCharacter.charCodeAt(0);
- }
+ if (typeof file === 'number') {
+ this.fd = file;
+ } else {
+ this.fd = fs.openSync(file, 'r');
+ }
- if (typeof file === 'number') {
- this.fd = file;
- } else {
- this.fd = fs.openSync(file, 'r');
+ this.options = options;
+ this.newLineCharacter = options.newLineCharacter;
+ this.reset();
}
- this.options = options;
- this.newLineCharacter = options.newLineCharacter;
- this.reset();
- }
+ _createClass(LineByLine, [{
+ key: "_searchInBuffer",
+ value: function _searchInBuffer(buffer, hexNeedle) {
+ var found = -1;
- _createClass(LineByLine, [{
- key: "_searchInBuffer",
- value: function _searchInBuffer(buffer, hexNeedle) {
- var found = -1;
+ for (var i = 0; i <= buffer.length; i++) {
+ var b_byte = buffer[i];
- for (var i = 0; i <= buffer.length; i++) {
- var b_byte = buffer[i];
-
- if (b_byte === hexNeedle) {
- found = i;
- break;
+ if (b_byte === hexNeedle) {
+ found = i;
+ break;
+ }
}
- }
- return found;
- }
- }, {
- key: "reset",
- value: function reset() {
- this.eofReached = false;
- this.linesCache = [];
- this.fdPosition = 0;
- }
- }, {
- key: "close",
- value: function close() {
- fs.closeSync(this.fd);
- this.fd = null;
- }
- }, {
- key: "_extractLines",
- value: function _extractLines(buffer) {
- var line;
- var lines = [];
- var bufferPosition = 0;
- var lastNewLineBufferPosition = 0;
+ return found;
+ }
+ }, {
+ key: "reset",
+ value: function reset() {
+ this.eofReached = false;
+ this.linesCache = [];
+ this.fdPosition = 0;
+ }
+ }, {
+ key: "close",
+ value: function close() {
+ fs.closeSync(this.fd);
+ this.fd = null;
+ }
+ }, {
+ key: "_extractLines",
+ value: function _extractLines(buffer) {
+ var line;
+ var lines = [];
+ var bufferPosition = 0;
+ var lastNewLineBufferPosition = 0;
- while (true) {
- var bufferPositionValue = buffer[bufferPosition++];
+ while (true) {
+ var bufferPositionValue = buffer[bufferPosition++];
- if (bufferPositionValue === this.newLineCharacter) {
- line = buffer.slice(lastNewLineBufferPosition, bufferPosition);
- lines.push(line);
- lastNewLineBufferPosition = bufferPosition;
- } else if (!bufferPositionValue) {
- break;
+ if (bufferPositionValue === this.newLineCharacter) {
+ line = buffer.slice(lastNewLineBufferPosition, bufferPosition);
+ lines.push(line);
+ lastNewLineBufferPosition = bufferPosition;
+ } else if (!bufferPositionValue) {
+ break;
+ }
}
- }
- var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition);
+ var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition);
- if (leftovers.length) {
- lines.push(leftovers);
- }
+ if (leftovers.length) {
+ lines.push(leftovers);
+ }
- return lines;
- }
- }, {
- key: "_readChunk",
- value: function _readChunk(lineLeftovers) {
- var totalBytesRead = 0;
- var bytesRead;
- var buffers = [];
+ return lines;
+ }
+ }, {
+ key: "_readChunk",
+ value: function _readChunk(lineLeftovers) {
+ var totalBytesRead = 0;
+ var bytesRead;
+ var buffers = [];
- do {
- var readBuffer = new Buffer(this.options.readChunk);
- bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
- totalBytesRead = totalBytesRead + bytesRead;
- this.fdPosition = this.fdPosition + bytesRead;
- buffers.push(readBuffer);
- } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1);
+ do {
+ var readBuffer = new Buffer(this.options.readChunk);
+ bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
+ totalBytesRead = totalBytesRead + bytesRead;
+ this.fdPosition = this.fdPosition + bytesRead;
+ buffers.push(readBuffer);
+ } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1);
- var bufferData = Buffer.concat(buffers);
+ var bufferData = Buffer.concat(buffers);
- if (bytesRead < this.options.readChunk) {
- this.eofReached = true;
- bufferData = bufferData.slice(0, totalBytesRead);
- }
+ if (bytesRead < this.options.readChunk) {
+ this.eofReached = true;
+ bufferData = bufferData.slice(0, totalBytesRead);
+ }
- if (totalBytesRead) {
- this.linesCache = this._extractLines(bufferData);
+ if (totalBytesRead) {
+ this.linesCache = this._extractLines(bufferData);
- if (lineLeftovers) {
- this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]);
+ if (lineLeftovers) {
+ this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]);
+ }
}
- }
- return totalBytesRead;
- }
- }, {
- key: "next",
- value: function next() {
- if (!this.fd) return false;
- var line = false;
-
- if (this.eofReached && this.linesCache.length === 0) {
- return line;
+ return totalBytesRead;
}
+ }, {
+ key: "next",
+ value: function next() {
+ if (!this.fd) return false;
+ var line = false;
- var bytesRead;
+ if (this.eofReached && this.linesCache.length === 0) {
+ return line;
+ }
- if (!this.linesCache.length) {
- bytesRead = this._readChunk();
- }
+ var bytesRead;
- if (this.linesCache.length) {
- line = this.linesCache.shift();
- var lastLineCharacter = line[line.length - 1];
+ if (!this.linesCache.length) {
+ bytesRead = this._readChunk();
+ }
+
+ if (this.linesCache.length) {
+ line = this.linesCache.shift();
+ var lastLineCharacter = line[line.length - 1];
- if (lastLineCharacter !== 0x0a) {
- bytesRead = this._readChunk(line);
+ if (lastLineCharacter !== 0x0a) {
+ bytesRead = this._readChunk(line);
- if (bytesRead) {
- line = this.linesCache.shift();
+ if (bytesRead) {
+ line = this.linesCache.shift();
+ }
}
}
- }
- if (this.eofReached && this.linesCache.length === 0) {
- this.close();
- }
+ if (this.eofReached && this.linesCache.length === 0) {
+ this.close();
+ }
- if (line && line[line.length - 1] === this.newLineCharacter) {
- line = line.slice(0, line.length - 1);
- }
+ if (line && line[line.length - 1] === this.newLineCharacter) {
+ line = line.slice(0, line.length - 1);
+ }
- return line;
- }
- }]);
+ return line;
+ }
+ }]);
- return LineByLine;
-}();
+ return LineByLine;
+ }();
-var readlines = LineByLine;
+ var readlines = LineByLine;
-var ConfigError =
-/*#__PURE__*/
-function (_Error) {
- _inherits(ConfigError, _Error);
+ var ConfigError =
+ /*#__PURE__*/
+ function (_Error) {
+ _inherits(ConfigError, _Error);
- function ConfigError() {
- _classCallCheck(this, ConfigError);
+ function ConfigError() {
+ _classCallCheck(this, ConfigError);
- return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments));
- }
+ return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments));
+ }
- return ConfigError;
-}(_wrapNativeSuper(Error));
+ return ConfigError;
+ }(_wrapNativeSuper(Error));
-var DebugError =
-/*#__PURE__*/
-function (_Error2) {
- _inherits(DebugError, _Error2);
+ var DebugError =
+ /*#__PURE__*/
+ function (_Error2) {
+ _inherits(DebugError, _Error2);
- function DebugError() {
- _classCallCheck(this, DebugError);
+ function DebugError() {
+ _classCallCheck(this, DebugError);
- return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments));
- }
+ return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments));
+ }
- return DebugError;
-}(_wrapNativeSuper(Error));
+ return DebugError;
+ }(_wrapNativeSuper(Error));
-var UndefinedParserError$1 =
-/*#__PURE__*/
-function (_Error3) {
- _inherits(UndefinedParserError, _Error3);
+ var UndefinedParserError =
+ /*#__PURE__*/
+ function (_Error3) {
+ _inherits(UndefinedParserError, _Error3);
- function UndefinedParserError() {
- _classCallCheck(this, UndefinedParserError);
+ function UndefinedParserError() {
+ _classCallCheck(this, UndefinedParserError);
- return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments));
- }
+ return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments));
+ }
- return UndefinedParserError;
-}(_wrapNativeSuper(Error));
+ return UndefinedParserError;
+ }(_wrapNativeSuper(Error));
-var errors = {
- ConfigError: ConfigError,
- DebugError: DebugError,
- UndefinedParserError: UndefinedParserError$1
-};
+ var errors = {
+ ConfigError: ConfigError,
+ DebugError: DebugError,
+ UndefinedParserError: UndefinedParserError
+ };
-// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
+ // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
+ function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+ }
-function defaultClearTimeout() {
- throw new Error('clearTimeout has not been defined');
-}
+ function defaultClearTimeout() {
+ throw new Error('clearTimeout has not been defined');
+ }
-var cachedSetTimeout = defaultSetTimout;
-var cachedClearTimeout = defaultClearTimeout;
+ var cachedSetTimeout = defaultSetTimout;
+ var cachedClearTimeout = defaultClearTimeout;
-if (typeof global$1.setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
-}
+ if (typeof global$1.setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ }
-if (typeof global$1.clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
-}
+ if (typeof global$1.clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ }
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- } // if setTimeout wasn't available but was latter defined
+ function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ } // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch (e) {
try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
} catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch (e) {
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
}
}
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- } // if clearTimeout wasn't available but was latter defined
+ function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ } // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e) {
try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
} catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e) {
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
}
}
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
+ function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
- draining = false;
+ draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
- if (queue.length) {
- drainQueue();
+ if (queue.length) {
+ drainQueue();
+ }
}
-}
-function drainQueue() {
- if (draining) {
- return;
- }
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+ var len = queue.length;
- while (len) {
- currentQueue = queue;
- queue = [];
+ while (len) {
+ currentQueue = queue;
+ queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
}
+
+ queueIndex = -1;
+ len = queue.length;
}
- queueIndex = -1;
- len = queue.length;
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
}
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
+ function nextTick(fun) {
+ var args = new Array(arguments.length - 1);
+
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
-function nextTick(fun) {
- var args = new Array(arguments.length - 1);
+ queue.push(new Item(fun, args));
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
}
+ } // v8 likes predictible objects
+
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
}
- queue.push(new Item(fun, args));
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+
+ var title = 'browser';
+ var platform = 'browser';
+ var browser = true;
+ var env = {};
+ var argv = [];
+ var version$1 = ''; // empty string to avoid regexp issues
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
+ var versions = {};
+ var release = {};
+ var config = {};
+
+ function noop() {}
+
+ var on = noop;
+ var addListener = noop;
+ var once = noop;
+ var off = noop;
+ var removeListener = noop;
+ var removeAllListeners = noop;
+ var emit = noop;
+ function binding(name) {
+ throw new Error('process.binding is not supported');
+ }
+ function cwd() {
+ return '/';
}
-} // v8 likes predictible objects
+ function chdir(dir) {
+ throw new Error('process.chdir is not supported');
+ }
+ function umask() {
+ return 0;
+ } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
+
+ var performance = global$1.performance || {};
+
+ var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () {
+ return new Date().getTime();
+ }; // generate timestamp or delta
+ // see http://nodejs.org/api/process.html#process_process_hrtime
+
+
+ function hrtime(previousTimestamp) {
+ var clocktime = performanceNow.call(performance) * 1e-3;
+ var seconds = Math.floor(clocktime);
+ var nanoseconds = Math.floor(clocktime % 1 * 1e9);
+
+ if (previousTimestamp) {
+ seconds = seconds - previousTimestamp[0];
+ nanoseconds = nanoseconds - previousTimestamp[1];
+
+ if (nanoseconds < 0) {
+ seconds--;
+ nanoseconds += 1e9;
+ }
+ }
+
+ return [seconds, nanoseconds];
+ }
+ var startTime = new Date();
+ function uptime() {
+ var currentTime = new Date();
+ var dif = currentTime - startTime;
+ return dif / 1000;
+ }
+ var process = {
+ nextTick: nextTick,
+ title: title,
+ browser: browser,
+ env: env,
+ argv: argv,
+ version: version$1,
+ versions: versions,
+ on: on,
+ addListener: addListener,
+ once: once,
+ off: off,
+ removeListener: removeListener,
+ removeAllListeners: removeAllListeners,
+ emit: emit,
+ binding: binding,
+ cwd: cwd,
+ chdir: chdir,
+ umask: umask,
+ hrtime: hrtime,
+ platform: platform,
+ release: release,
+ config: config,
+ uptime: uptime
+ };
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
+ var semver = createCommonjsModule(function (module, exports) {
+ exports = module.exports = SemVer;
+ var debug;
+ /* istanbul ignore next */
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
+ if (_typeof(process) === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function debug() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('SEMVER');
+ console.log.apply(console, args);
+ };
+ } else {
+ debug = function debug() {};
+ } // Note: this is the semver.org version of the spec that it implements
+ // Not necessarily the package version of this code.
-var title = 'browser';
-var platform = 'browser';
-var browser = true;
-var env = {};
-var argv = [];
-var version$2 = ''; // empty string to avoid regexp issues
-var versions = {};
-var release = {};
-var config = {};
-
-function noop() {}
-
-var on = noop;
-var addListener = noop;
-var once = noop;
-var off = noop;
-var removeListener = noop;
-var removeAllListeners = noop;
-var emit = noop;
-function binding(name) {
- throw new Error('process.binding is not supported');
-}
-function cwd() {
- return '/';
-}
-function chdir(dir) {
- throw new Error('process.chdir is not supported');
-}
-
-function umask() {
- return 0;
-} // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
-
-var performance = global$1.performance || {};
-
-var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () {
- return new Date().getTime();
-}; // generate timestamp or delta
-// see http://nodejs.org/api/process.html#process_process_hrtime
-
-
-function hrtime(previousTimestamp) {
- var clocktime = performanceNow.call(performance) * 1e-3;
- var seconds = Math.floor(clocktime);
- var nanoseconds = Math.floor(clocktime % 1 * 1e9);
-
- if (previousTimestamp) {
- seconds = seconds - previousTimestamp[0];
- nanoseconds = nanoseconds - previousTimestamp[1];
-
- if (nanoseconds < 0) {
- seconds--;
- nanoseconds += 1e9;
- }
- }
-
- return [seconds, nanoseconds];
-}
-var startTime = new Date();
-function uptime() {
- var currentTime = new Date();
- var dif = currentTime - startTime;
- return dif / 1000;
-}
-var process = {
- nextTick: nextTick,
- title: title,
- browser: browser,
- env: env,
- argv: argv,
- version: version$2,
- versions: versions,
- on: on,
- addListener: addListener,
- once: once,
- off: off,
- removeListener: removeListener,
- removeAllListeners: removeAllListeners,
- emit: emit,
- binding: binding,
- cwd: cwd,
- chdir: chdir,
- umask: umask,
- hrtime: hrtime,
- platform: platform,
- release: release,
- config: config,
- uptime: uptime
-};
-
-var semver = createCommonjsModule(function (module, exports) {
- exports = module.exports = SemVer; // The debug function is excluded entirely from the minified version.
-
- /* nomin */
-
- var debug;
- /* nomin */
-
- if (_typeof(process) === 'object' &&
- /* nomin */
- process.env &&
- /* nomin */
- process.env.NODE_DEBUG &&
- /* nomin */
- /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */
- debug = function debug() {
- /* nomin */
- var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */
-
- args.unshift('SEMVER');
- /* nomin */
-
- console.log.apply(console, args);
- /* nomin */
- };
- /* nomin */
- else
- /* nomin */
- debug = function debug() {}; // Note: this is the semver.org version of the spec that it implements
- // Not necessarily the package version of this code.
-
- exports.SEMVER_SPEC_VERSION = '2.0.0';
- var MAX_LENGTH = 256;
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; // The actual regexps go on exports.re
-
- var re = exports.re = [];
- var src = exports.src = [];
- var R = 0; // The following Regular Expressions can be used for tokenizing,
- // validating, and parsing SemVer version strings.
- // ## Numeric Identifier
- // A single `0`, or a non-zero digit followed by zero or more digits.
-
- var NUMERICIDENTIFIER = R++;
- src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
- var NUMERICIDENTIFIERLOOSE = R++;
- src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier
- // Zero or more digits, followed by a letter or hyphen, and then zero or
- // more letters, digits, or hyphens.
-
- var NONNUMERICIDENTIFIER = R++;
- src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version
- // Three dot-separated numeric identifiers.
-
- var MAINVERSION = R++;
- src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')';
- var MAINVERSIONLOOSE = R++;
- src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier
- // A numeric identifier, or a non-numeric identifier.
-
- var PRERELEASEIDENTIFIER = R++;
- src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')';
- var PRERELEASEIDENTIFIERLOOSE = R++;
- src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version
- // Hyphen, followed by one or more dot-separated pre-release version
- // identifiers.
-
- var PRERELEASE = R++;
- src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
- var PRERELEASELOOSE = R++;
- src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier
- // Any combination of digits, letters, or hyphens.
-
- var BUILDIDENTIFIER = R++;
- src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata
- // Plus sign, followed by one or more period-separated build metadata
- // identifiers.
-
- var BUILD = R++;
- src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; // ## Full Version String
- // A main version, followed optionally by a pre-release version and
- // build metadata.
- // Note that the only major, minor, patch, and pre-release sections of
- // the version string are capturing groups. The build metadata is not a
- // capturing group, because it should not ever be used in version
- // comparison.
-
- var FULL = R++;
- var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?';
- src[FULL] = '^' + FULLPLAIN + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
- // common in the npm registry.
-
- var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?';
- var LOOSE = R++;
- src[LOOSE] = '^' + LOOSEPLAIN + '$';
- var GTLT = R++;
- src[GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x".
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
- // Only the first item is strictly required.
-
- var XRANGEIDENTIFIERLOOSE = R++;
- src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
- var XRANGEIDENTIFIER = R++;
- src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
- var XRANGEPLAIN = R++;
- src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?';
- var XRANGEPLAINLOOSE = R++;
- src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?';
- var XRANGE = R++;
- src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
- var XRANGELOOSE = R++;
- src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; // Tilde ranges.
- // Meaning is "reasonably at or greater than"
-
- var LONETILDE = R++;
- src[LONETILDE] = '(?:~>?)';
- var TILDETRIM = R++;
- src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
- re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
- var tildeTrimReplace = '$1~';
- var TILDE = R++;
- src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
- var TILDELOOSE = R++;
- src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; // Caret ranges.
- // Meaning is "at least and backwards compatible with"
-
- var LONECARET = R++;
- src[LONECARET] = '(?:\\^)';
- var CARETTRIM = R++;
- src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
- re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
- var caretTrimReplace = '$1^';
- var CARET = R++;
- src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
- var CARETLOOSE = R++;
- src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version"
-
- var COMPARATORLOOSE = R++;
- src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
- var COMPARATOR = R++;
- src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
-
- var COMPARATORTRIM = R++;
- src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; // this one has to use the /g flag
-
- re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
- var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4`
- // Note that these all use the loose form, because they'll be
- // checked against either the strict or loose comparator form
- // later.
-
- var HYPHENRANGE = R++;
- src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$';
- var HYPHENRANGELOOSE = R++;
- src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all.
-
- var STAR = R++;
- src[STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects.
- // All are flag-free, unless they were created above with a flag.
-
- for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i]) re[i] = new RegExp(src[i]);
- }
-
- exports.parse = parse;
-
- function parse(version, loose) {
- if (version instanceof SemVer) return version;
- if (typeof version !== 'string') return null;
- if (version.length > MAX_LENGTH) return null;
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version)) return null;
+ exports.SEMVER_SPEC_VERSION = '2.0.0';
+ var MAX_LENGTH = 256;
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+ /* istanbul ignore next */
+ 9007199254740991; // Max safe segment length for coercion.
+
+ var MAX_SAFE_COMPONENT_LENGTH = 16; // The actual regexps go on exports.re
+
+ var re = exports.re = [];
+ var src = exports.src = [];
+ var t = exports.tokens = {};
+ var R = 0;
+
+ function tok(n) {
+ t[n] = R++;
+ } // The following Regular Expressions can be used for tokenizing,
+ // validating, and parsing SemVer version strings.
+ // ## Numeric Identifier
+ // A single `0`, or a non-zero digit followed by zero or more digits.
+
+
+ tok('NUMERICIDENTIFIER');
+ src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+ tok('NUMERICIDENTIFIERLOOSE');
+ src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'; // ## Non-numeric Identifier
+ // Zero or more digits, followed by a letter or hyphen, and then zero or
+ // more letters, digits, or hyphens.
+
+ tok('NONNUMERICIDENTIFIER');
+ src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version
+ // Three dot-separated numeric identifiers.
+
+ tok('MAINVERSION');
+ src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
+ tok('MAINVERSIONLOOSE');
+ src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier
+ // A numeric identifier, or a non-numeric identifier.
+
+ tok('PRERELEASEIDENTIFIER');
+ src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
+ tok('PRERELEASEIDENTIFIERLOOSE');
+ src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version
+ // Hyphen, followed by one or more dot-separated pre-release version
+ // identifiers.
+
+ tok('PRERELEASE');
+ src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
+ tok('PRERELEASELOOSE');
+ src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier
+ // Any combination of digits, letters, or hyphens.
+
+ tok('BUILDIDENTIFIER');
+ src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata
+ // Plus sign, followed by one or more period-separated build metadata
+ // identifiers.
+
+ tok('BUILD');
+ src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'; // ## Full Version String
+ // A main version, followed optionally by a pre-release version and
+ // build metadata.
+ // Note that the only major, minor, patch, and pre-release sections of
+ // the version string are capturing groups. The build metadata is not a
+ // capturing group, because it should not ever be used in version
+ // comparison.
+
+ tok('FULL');
+ tok('FULLPLAIN');
+ src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
+ src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'; // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+ // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+ // common in the npm registry.
+
+ tok('LOOSEPLAIN');
+ src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
+ tok('LOOSE');
+ src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
+ tok('GTLT');
+ src[t.GTLT] = '((?:<|>)?=?)'; // Something like "2.*" or "1.2.x".
+ // Note that "x.x" is a valid xRange identifer, meaning "any version"
+ // Only the first item is strictly required.
+
+ tok('XRANGEIDENTIFIERLOOSE');
+ src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+ tok('XRANGEIDENTIFIER');
+ src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
+ tok('XRANGEPLAIN');
+ src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
+ tok('XRANGEPLAINLOOSE');
+ src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
+ tok('XRANGE');
+ src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
+ tok('XRANGELOOSE');
+ src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'; // Coercion.
+ // Extract anything that could conceivably be a part of a valid semver
+
+ tok('COERCE');
+ src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
+ tok('COERCERTL');
+ re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g'); // Tilde ranges.
+ // Meaning is "reasonably at or greater than"
+
+ tok('LONETILDE');
+ src[t.LONETILDE] = '(?:~>?)';
+ tok('TILDETRIM');
+ src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
+ re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
+ var tildeTrimReplace = '$1~';
+ tok('TILDE');
+ src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
+ tok('TILDELOOSE');
+ src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'; // Caret ranges.
+ // Meaning is "at least and backwards compatible with"
+
+ tok('LONECARET');
+ src[t.LONECARET] = '(?:\\^)';
+ tok('CARETTRIM');
+ src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
+ re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
+ var caretTrimReplace = '$1^';
+ tok('CARET');
+ src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
+ tok('CARETLOOSE');
+ src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version"
+
+ tok('COMPARATORLOOSE');
+ src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
+ tok('COMPARATOR');
+ src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing
+ // it modifies, so that `> 1.2.3` ==> `>1.2.3`
+
+ tok('COMPARATORTRIM');
+ src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'; // this one has to use the /g flag
+
+ re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
+ var comparatorTrimReplace = '$1$2$3'; // Something like `1.2.3 - 1.2.4`
+ // Note that these all use the loose form, because they'll be
+ // checked against either the strict or loose comparator form
+ // later.
+
+ tok('HYPHENRANGE');
+ src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
+ tok('HYPHENRANGELOOSE');
+ src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all.
+
+ tok('STAR');
+ src[t.STAR] = '(<|>)?=?\\s*\\*'; // Compile to actual regexp objects.
+ // All are flag-free, unless they were created above with a flag.
+
+ for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+
+ if (!re[i]) {
+ re[i] = new RegExp(src[i]);
+ }
+ }
+
+ exports.parse = parse;
+
+ function parse(version, options) {
+ if (!options || _typeof(options) !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
- }
+ if (version instanceof SemVer) {
+ return version;
+ }
- exports.valid = valid;
+ if (typeof version !== 'string') {
+ return null;
+ }
- function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
- }
+ if (version.length > MAX_LENGTH) {
+ return null;
+ }
- exports.clean = clean;
+ var r = options.loose ? re[t.LOOSE] : re[t.FULL];
- function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
- }
+ if (!r.test(version)) {
+ return null;
+ }
+
+ try {
+ return new SemVer(version, options);
+ } catch (er) {
+ return null;
+ }
+ }
- exports.SemVer = SemVer;
+ exports.valid = valid;
- function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose) return version;else version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
+ function valid(version, options) {
+ var v = parse(version, options);
+ return v ? v.version : null;
}
- if (version.length > MAX_LENGTH) throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
- if (!(this instanceof SemVer)) return new SemVer(version, loose);
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
- if (!m) throw new TypeError('Invalid Version: ' + version);
- this.raw = version; // these are actually numbers
+ exports.clean = clean;
+
+ function clean(version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options);
+ return s ? s.version : null;
+ }
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError('Invalid major version');
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError('Invalid minor version');
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError('Invalid patch version'); // numberify any prerelease numeric ids
+ exports.SemVer = SemVer;
- if (!m[4]) this.prerelease = [];else this.prerelease = m[4].split('.').map(function (id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
+ function SemVer(version, options) {
+ if (!options || _typeof(options) !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
}
- return id;
- });
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
- }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version;
+ } else {
+ version = version.version;
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
- SemVer.prototype.format = function () {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length) this.version += '-' + this.prerelease.join('.');
- return this.version;
- };
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
+ }
- SemVer.prototype.toString = function () {
- return this.version;
- };
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options);
+ }
- SemVer.prototype.compare = function (other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer)) other = new SemVer(other, this.loose);
- return this.compareMain(other) || this.comparePre(other);
- };
+ debug('SemVer', version, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
- SemVer.prototype.compareMain = function (other) {
- if (!(other instanceof SemVer)) other = new SemVer(other, this.loose);
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
- };
+ if (!m) {
+ throw new TypeError('Invalid Version: ' + version);
+ }
- SemVer.prototype.comparePre = function (other) {
- if (!(other instanceof SemVer)) other = new SemVer(other, this.loose); // NOT having a prerelease is > having one
+ this.raw = version; // these are actually numbers
- if (this.prerelease.length && !other.prerelease.length) return -1;else if (!this.prerelease.length && other.prerelease.length) return 1;else if (!this.prerelease.length && !other.prerelease.length) return 0;
- var i = 0;
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined) return 0;else if (b === undefined) return 1;else if (a === undefined) return -1;else if (a === b) continue;else return compareIdentifiers(a, b);
- } while (++i);
- }; // preminor will bump the version up to the next minor release, and immediately
- // down to pre-release. premajor and prepatch work the same way.
-
-
- SemVer.prototype.inc = function (release$$1, identifier) {
- switch (release$$1) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version');
+ }
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version');
+ }
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version');
+ } // numberify any prerelease numeric ids
- case 'prerelease':
- if (this.prerelease.length === 0) this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
- this.minor = 0;
- this.patch = 0;
+ if (!m[4]) {
this.prerelease = [];
- break;
+ } else {
+ this.prerelease = m[4].split('.').map(function (id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num;
+ }
+ }
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0) this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ return id;
+ });
+ }
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+ }
- case 'pre':
- if (this.prerelease.length === 0) this.prerelease = [0];else {
- var i = this.prerelease.length;
+ SemVer.prototype.format = function () {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
+ if (this.prerelease.length) {
+ this.version += '-' + this.prerelease.join('.');
+ }
+
+ return this.version;
+ };
+
+ SemVer.prototype.toString = function () {
+ return this.version;
+ };
+
+ SemVer.prototype.compare = function (other) {
+ debug('SemVer.compare', this.version, this.options, other);
+
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ return this.compareMain(other) || this.comparePre(other);
+ };
+
+ SemVer.prototype.compareMain = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
+ };
+
+ SemVer.prototype.comparePre = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ } // NOT having a prerelease is > having one
+
+
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1;
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1;
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0;
+ }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
+ var i = 0;
+
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+
+ if (a === undefined && b === undefined) {
+ return 0;
+ } else if (b === undefined) {
+ return 1;
+ } else if (a === undefined) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
}
+ } while (++i);
+ };
+
+ SemVer.prototype.compareBuild = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ var i = 0;
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1])) this.prerelease = [identifier, 0];
- } else this.prerelease = [identifier, 0];
+ do {
+ var a = this.build[i];
+ var b = other.build[i];
+ debug('prerelease compare', i, a, b);
+
+ if (a === undefined && b === undefined) {
+ return 0;
+ } else if (b === undefined) {
+ return 1;
+ } else if (a === undefined) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
}
+ } while (++i);
+ }; // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
- break;
- default:
- throw new Error('invalid increment argument: ' + release$$1);
- }
+ SemVer.prototype.inc = function (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
- this.format();
- this.raw = this.version;
- return this;
- };
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
- exports.inc = inc;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
- function inc(version, release$$1, loose, identifier) {
- if (typeof loose === 'string') {
- identifier = loose;
- loose = undefined;
- }
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier);
+ }
- try {
- return new SemVer(version, loose).inc(release$$1, identifier).version;
- } catch (er) {
- return null;
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
+ this.major++;
+ }
+
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++;
+ }
+
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++;
+ }
+
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0];
+ } else {
+ var i = this.prerelease.length;
+
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0);
+ }
+ }
+
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0];
+ }
+ } else {
+ this.prerelease = [identifier, 0];
+ }
+ }
+
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+
+ this.format();
+ this.raw = this.version;
+ return this;
+ };
+
+ exports.inc = inc;
+
+ function inc(version, release, loose, identifier) {
+ if (typeof loose === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
}
- }
- exports.diff = diff;
+ exports.diff = diff;
- function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
+ function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ var prefix = '';
+
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = 'pre';
+ var defaultResult = 'prerelease';
+ }
- if (v1.prerelease.length || v2.prerelease.length) {
for (var key in v1) {
if (key === 'major' || key === 'minor' || key === 'patch') {
if (v1[key] !== v2[key]) {
- return 'pre' + key;
+ return prefix + key;
}
}
}
- return 'prerelease';
- }
-
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
+ return defaultResult; // may be undefined
}
}
- }
- exports.compareIdentifiers = compareIdentifiers;
- var numeric = /^[0-9]+$/;
+ exports.compareIdentifiers = compareIdentifiers;
+ var numeric = /^[0-9]+$/;
- function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
+ function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
- if (anum && bnum) {
- a = +a;
- b = +b;
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
}
- return anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : a > b ? 1 : 0;
- }
+ exports.rcompareIdentifiers = rcompareIdentifiers;
- exports.rcompareIdentifiers = rcompareIdentifiers;
+ function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+ }
- function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
- }
+ exports.major = major;
- exports.major = major;
+ function major(a, loose) {
+ return new SemVer(a, loose).major;
+ }
- function major(a, loose) {
- return new SemVer(a, loose).major;
- }
+ exports.minor = minor;
- exports.minor = minor;
+ function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+ }
- function minor(a, loose) {
- return new SemVer(a, loose).minor;
- }
+ exports.patch = patch;
- exports.patch = patch;
+ function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+ }
- function patch(a, loose) {
- return new SemVer(a, loose).patch;
- }
+ exports.compare = compare;
- exports.compare = compare;
+ function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose));
+ }
- function compare(a, b, loose) {
- return new SemVer(a, loose).compare(new SemVer(b, loose));
- }
+ exports.compareLoose = compareLoose;
- exports.compareLoose = compareLoose;
+ function compareLoose(a, b) {
+ return compare(a, b, true);
+ }
- function compareLoose(a, b) {
- return compare(a, b, true);
- }
+ exports.compareBuild = compareBuild;
- exports.rcompare = rcompare;
+ function compareBuild(a, b, loose) {
+ var versionA = new SemVer(a, loose);
+ var versionB = new SemVer(b, loose);
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
+ }
- function rcompare(a, b, loose) {
- return compare(b, a, loose);
- }
+ exports.rcompare = rcompare;
- exports.sort = sort;
+ function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+ }
- function sort(list, loose) {
- return list.sort(function (a, b) {
- return exports.compare(a, b, loose);
- });
- }
+ exports.sort = sort;
- exports.rsort = rsort;
+ function sort(list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(a, b, loose);
+ });
+ }
- function rsort(list, loose) {
- return list.sort(function (a, b) {
- return exports.rcompare(a, b, loose);
- });
- }
+ exports.rsort = rsort;
- exports.gt = gt;
+ function rsort(list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(b, a, loose);
+ });
+ }
- function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
- }
+ exports.gt = gt;
- exports.lt = lt;
+ function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+ }
- function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
- }
+ exports.lt = lt;
- exports.eq = eq;
+ function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+ }
- function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
- }
+ exports.eq = eq;
- exports.neq = neq;
+ function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+ }
- function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
- }
+ exports.neq = neq;
- exports.gte = gte;
+ function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+ }
- function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
- }
+ exports.gte = gte;
- exports.lte = lte;
+ function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+ }
- function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
- }
+ exports.lte = lte;
- exports.cmp = cmp;
+ function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+ }
- function cmp(a, op, b, loose) {
- var ret;
+ exports.cmp = cmp;
- switch (op) {
- case '===':
- if (_typeof(a) === 'object') a = a.version;
- if (_typeof(b) === 'object') b = b.version;
- ret = a === b;
- break;
+ function cmp(a, op, b, loose) {
+ switch (op) {
+ case '===':
+ if (_typeof(a) === 'object') a = a.version;
+ if (_typeof(b) === 'object') b = b.version;
+ return a === b;
- case '!==':
- if (_typeof(a) === 'object') a = a.version;
- if (_typeof(b) === 'object') b = b.version;
- ret = a !== b;
- break;
+ case '!==':
+ if (_typeof(a) === 'object') a = a.version;
+ if (_typeof(b) === 'object') b = b.version;
+ return a !== b;
- case '':
- case '=':
- case '==':
- ret = eq(a, b, loose);
- break;
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose);
- case '!=':
- ret = neq(a, b, loose);
- break;
+ case '!=':
+ return neq(a, b, loose);
- case '>':
- ret = gt(a, b, loose);
- break;
+ case '>':
+ return gt(a, b, loose);
- case '>=':
- ret = gte(a, b, loose);
- break;
+ case '>=':
+ return gte(a, b, loose);
- case '<':
- ret = lt(a, b, loose);
- break;
+ case '<':
+ return lt(a, b, loose);
- case '<=':
- ret = lte(a, b, loose);
- break;
+ case '<=':
+ return lte(a, b, loose);
- default:
- throw new TypeError('Invalid operator: ' + op);
+ default:
+ throw new TypeError('Invalid operator: ' + op);
+ }
}
- return ret;
- }
-
- exports.Comparator = Comparator;
+ exports.Comparator = Comparator;
- function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose) return comp;else comp = comp.value;
- }
+ function Comparator(comp, options) {
+ if (!options || _typeof(options) !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
- if (!(this instanceof Comparator)) return new Comparator(comp, loose);
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
- if (this.semver === ANY) this.value = '';else this.value = this.operator + this.semver.version;
- debug('comp', this);
- }
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp;
+ } else {
+ comp = comp.value;
+ }
+ }
- var ANY = {};
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options);
+ }
- Comparator.prototype.parse = function (comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
- if (!m) throw new TypeError('Invalid comparator: ' + comp);
- this.operator = m[1];
- if (this.operator === '=') this.operator = ''; // if it literally is just '>' or '' then allow anything.
+ debug('comparator', comp, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ this.parse(comp);
- if (!m[2]) this.semver = ANY;else this.semver = new SemVer(m[2], this.loose);
- };
+ if (this.semver === ANY) {
+ this.value = '';
+ } else {
+ this.value = this.operator + this.semver.version;
+ }
- Comparator.prototype.toString = function () {
- return this.value;
- };
+ debug('comp', this);
+ }
- Comparator.prototype.test = function (version) {
- debug('Comparator.test', version, this.loose);
- if (this.semver === ANY) return true;
- if (typeof version === 'string') version = new SemVer(version, this.loose);
- return cmp(version, this.operator, this.semver, this.loose);
- };
+ var ANY = {};
- Comparator.prototype.intersects = function (comp, loose) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError('a Comparator is required');
- }
+ Comparator.prototype.parse = function (comp) {
+ var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
+ var m = comp.match(r);
- var rangeTmp;
+ if (!m) {
+ throw new TypeError('Invalid comparator: ' + comp);
+ }
- if (this.operator === '') {
- rangeTmp = new Range(comp.value, loose);
- return satisfies(this.value, rangeTmp, loose);
- } else if (comp.operator === '') {
- rangeTmp = new Range(this.value, loose);
- return satisfies(comp.semver, rangeTmp, loose);
- }
+ this.operator = m[1] !== undefined ? m[1] : '';
- var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
- var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
- var sameSemVer = this.semver.version === comp.semver.version;
- var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
- var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, loose) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
- var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, loose) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
- };
+ if (this.operator === '=') {
+ this.operator = '';
+ } // if it literally is just '>' or '' then allow anything.
- exports.Range = Range;
- function Range(range, loose) {
- if (range instanceof Range) {
- if (range.loose === loose) {
- return range;
+ if (!m[2]) {
+ this.semver = ANY;
} else {
- return new Range(range.raw, loose);
+ this.semver = new SemVer(m[2], this.options.loose);
}
- }
+ };
- if (range instanceof Comparator) {
- return new Range(range.value, loose);
- }
+ Comparator.prototype.toString = function () {
+ return this.value;
+ };
- if (!(this instanceof Range)) return new Range(range, loose);
- this.loose = loose; // First, split based on boolean or ||
+ Comparator.prototype.test = function (version) {
+ debug('Comparator.test', version, this.options.loose);
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function (range) {
- return this.parseRange(range.trim());
- }, this).filter(function (c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
+ if (this.semver === ANY || version === ANY) {
+ return true;
+ }
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
+ return false;
+ }
+ }
- this.format();
- }
+ return cmp(version, this.operator, this.semver, this.options);
+ };
- Range.prototype.format = function () {
- this.range = this.set.map(function (comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
- };
+ Comparator.prototype.intersects = function (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required');
+ }
- Range.prototype.toString = function () {
- return this.range;
- };
+ if (!options || _typeof(options) !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+
+ var rangeTmp;
- Range.prototype.parseRange = function (range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true;
+ }
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ rangeTmp = new Range(comp.value, options);
+ return satisfies(this.value, rangeTmp, options);
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true;
+ }
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3`
+ rangeTmp = new Range(this.value, options);
+ return satisfies(comp.semver, rangeTmp, options);
+ }
- range = range.replace(re[TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3`
+ var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
+ var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
+ var sameSemVer = this.semver.version === comp.semver.version;
+ var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
+ var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
+ var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
+ return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
+ };
- range = range.replace(re[CARETTRIM], caretTrimReplace); // normalize spaces
+ exports.Range = Range;
- range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and
- // ready to be split into comparators.
+ function Range(range, options) {
+ if (!options || _typeof(options) !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function (comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
+ return range;
+ } else {
+ return new Range(range.raw, options);
+ }
+ }
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function (comp) {
- return !!comp.match(compRe);
+ if (range instanceof Comparator) {
+ return new Range(range.value, options);
+ }
+
+ if (!(this instanceof Range)) {
+ return new Range(range, options);
+ }
+
+ this.options = options;
+ this.loose = !!options.loose;
+ this.includePrerelease = !!options.includePrerelease; // First, split based on boolean or ||
+
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function (range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function (c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
});
- }
- set = set.map(function (comp) {
- return new Comparator(comp, loose);
- });
- return set;
- };
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
- Range.prototype.intersects = function (range, loose) {
- if (!(range instanceof Range)) {
- throw new TypeError('a Range is required');
+ this.format();
}
- return this.set.some(function (thisComparators) {
- return thisComparators.every(function (thisComparator) {
- return range.set.some(function (rangeComparators) {
- return rangeComparators.every(function (rangeComparator) {
- return thisComparator.intersects(rangeComparator, loose);
+ Range.prototype.format = function () {
+ this.range = this.set.map(function (comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+ };
+
+ Range.prototype.toString = function () {
+ return this.range;
+ };
+
+ Range.prototype.parseRange = function (range) {
+ var loose = this.options.loose;
+ range = range.trim(); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+
+ var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range); // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[t.COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3`
+
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3`
+
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace); // normalize spaces
+
+ range = range.split(/\s+/).join(' '); // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
+ var set = range.split(' ').map(function (comp) {
+ return parseComparator(comp, this.options);
+ }, this).join(' ').split(/\s+/);
+
+ if (this.options.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function (comp) {
+ return !!comp.match(compRe);
+ });
+ }
+
+ set = set.map(function (comp) {
+ return new Comparator(comp, this.options);
+ }, this);
+ return set;
+ };
+
+ Range.prototype.intersects = function (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required');
+ }
+
+ return this.set.some(function (thisComparators) {
+ return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
+ return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options);
+ });
});
});
});
- });
- }; // Mostly just for testing and legacy API reasons
+ }; // take a set of comparators and determine whether there
+ // exists a version which can satisfy it
- exports.toComparators = toComparators;
+ function isSatisfiable(comparators, options) {
+ var result = true;
+ var remainingComparators = comparators.slice();
+ var testComparator = remainingComparators.pop();
- function toComparators(range, loose) {
- return new Range(range, loose).set.map(function (comp) {
- return comp.map(function (c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
- } // comprised of xranges, tildes, stars, and gtlt's at this point.
- // already replaced the hyphen ranges
- // turn into a set of JUST comparators.
-
-
- function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
- }
-
- function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
- } // ~, ~> --> * (any, kinda silly)
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-
-
- function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
- }
-
- function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
- if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-') pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0';
- } else // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
- debug('tilde return', ret);
- return ret;
- });
- } // ^ --> * (any, kinda silly)
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
- // ^1.2.3 --> >=1.2.3 <2.0.0
- // ^1.2.0 --> >=1.2.0 <2.0.0
-
-
- function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
- }
-
- function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
- if (isX(M)) ret = '';else if (isX(m)) ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';else if (isX(p)) {
- if (M === '0') ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';else ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-') pr = '-' + pr;
-
- if (M === '0') {
- if (m === '0') ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + M + '.' + (+m + 1) + '.0';
- } else ret = '>=' + M + '.' + m + '.' + p + pr + ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
-
- if (M === '0') {
- if (m === '0') ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);else ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
- } else ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every(function (otherComparator) {
+ return testComparator.intersects(otherComparator, options);
+ });
+ testComparator = remainingComparators.pop();
}
- debug('caret return', ret);
- return ret;
- });
- }
- function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function (comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
- }
-
- function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
- if (gtlt === '=' && anyX) gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
+ return result;
+ } // Mostly just for testing and legacy API reasons
+
+
+ exports.toComparators = toComparators;
+
+ function toComparators(range, options) {
+ return new Range(range, options).set.map(function (comp) {
+ return comp.map(function (c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+ } // comprised of xranges, tildes, stars, and gtlt's at this point.
+ // already replaced the hyphen ranges
+ // turn into a set of JUST comparators.
+
+
+ function parseComparator(comp, options) {
+ debug('comp', comp, options);
+ comp = replaceCarets(comp, options);
+ debug('caret', comp);
+ comp = replaceTildes(comp, options);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, options);
+ debug('xrange', comp);
+ comp = replaceStars(comp, options);
+ debug('stars', comp);
+ return comp;
+ }
+
+ function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+ } // ~, ~> --> * (any, kinda silly)
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+
+
+ function replaceTildes(comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceTilde(comp, options);
+ }).join(' ');
+ }
+
+ function replaceTilde(comp, options) {
+ var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M)) {
+ ret = '';
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ } else if (pr) {
+ debug('replaceTilde pr', pr);
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('tilde return', ret);
+ return ret;
+ });
+ } // ^ --> * (any, kinda silly)
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+ // ^1.2.3 --> >=1.2.3 <2.0.0
+ // ^1.2.0 --> >=1.2.0 <2.0.0
+
+
+ function replaceCarets(comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceCaret(comp, options);
+ }).join(' ');
+ }
+
+ function replaceCaret(comp, options) {
+ debug('caret', comp, options);
+ var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M)) {
+ ret = '';
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ } else {
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
+ }
} else {
- // nothing is forbidden
- ret = '*';
+ debug('no pr');
+
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
+ }
}
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm) m = 0;
- if (xp) p = 0;
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
+ debug('caret return', ret);
+ return ret;
+ });
+ }
+
+ function replaceXRanges(comp, options) {
+ debug('replaceXRanges', comp, options);
+ return comp.split(/\s+/).map(function (comp) {
+ return replaceXRange(comp, options);
+ }).join(' ');
+ }
+ function replaceXRange(comp, options) {
+ comp = comp.trim();
+ var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
+ return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX) {
+ gtlt = '';
+ } // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+
+
+ pr = options.includePrerelease ? '-0' : '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
if (xm) {
- M = +M + 1;
m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
}
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<';
- if (xm) M = +M + 1;else m = +m + 1;
- }
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
+ p = 0;
- debug('xRange return', ret);
- return ret;
- });
- } // Because * is AND-ed with everything else in the comparator,
- // and '' means "any version", just remove the *s entirely.
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<';
- function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose); // Looseness is ignored here. star is always as loose as it gets!
+ if (xm) {
+ M = +M + 1;
+ } else {
+ m = +m + 1;
+ }
+ }
- return comp.trim().replace(re[STAR], '');
- } // This function is passed to string.replace(re[HYPHENRANGE])
- // M, m, patch, prerelease, build
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
- // 1.2 - 3.4 => >=1.2.0 <3.5.0
+ ret = gtlt + M + '.' + m + '.' + p + pr;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
+ }
+ debug('xRange return', ret);
+ return ret;
+ });
+ } // Because * is AND-ed with everything else in the comparator,
+ // and '' means "any version", just remove the *s entirely.
- function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
- if (isX(fM)) from = '';else if (isX(fm)) from = '>=' + fM + '.0.0';else if (isX(fp)) from = '>=' + fM + '.' + fm + '.0';else from = '>=' + from;
- if (isX(tM)) to = '';else if (isX(tm)) to = '<' + (+tM + 1) + '.0.0';else if (isX(tp)) to = '<' + tM + '.' + (+tm + 1) + '.0';else if (tpr) to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;else to = '<=' + to;
- return (from + ' ' + to).trim();
- } // if ANY of the sets match ALL of its comparators, then pass
+ function replaceStars(comp, options) {
+ debug('replaceStars', comp, options); // Looseness is ignored here. star is always as loose as it gets!
- Range.prototype.test = function (version) {
- if (!version) return false;
- if (typeof version === 'string') version = new SemVer(version, this.loose);
+ return comp.trim().replace(re[t.STAR], '');
+ } // This function is passed to string.replace(re[t.HYPHENRANGE])
+ // M, m, patch, prerelease, build
+ // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+ // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+ // 1.2 - 3.4 => >=1.2.0 <3.5.0
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version)) return true;
- }
- return false;
- };
+ function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = '';
+ } else if (isX(fm)) {
+ from = '>=' + fM + '.0.0';
+ } else if (isX(fp)) {
+ from = '>=' + fM + '.' + fm + '.0';
+ } else {
+ from = '>=' + from;
+ }
- function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version)) return false;
- }
+ if (isX(tM)) {
+ to = '';
+ } else if (isX(tm)) {
+ to = '<' + (+tM + 1) + '.0.0';
+ } else if (isX(tp)) {
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ } else if (tpr) {
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ } else {
+ to = '<=' + to;
+ }
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY) continue;
+ return (from + ' ' + to).trim();
+ } // if ANY of the sets match ALL of its comparators, then pass
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
+
+ Range.prototype.test = function (version) {
+ if (!version) {
+ return false;
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
+ return false;
}
- } // Version has a -pre, but it's not one of the ones we like.
+ }
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true;
+ }
+ }
return false;
- }
+ };
- return true;
- }
+ function testSet(set, version, options) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false;
+ }
+ }
- exports.satisfies = satisfies;
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (i = 0; i < set.length; i++) {
+ debug(set[i].semver);
- function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
+ if (set[i].semver === ANY) {
+ continue;
+ }
- return range.test(version);
- }
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
- exports.maxSatisfying = maxSatisfying;
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
+ return true;
+ }
+ }
+ } // Version has a -pre, but it's not one of the ones we like.
- function maxSatisfying(versions$$1, range, loose) {
- var max = null;
- var maxSV = null;
- try {
- var rangeObj = new Range(range, loose);
- } catch (er) {
- return null;
+ return false;
+ }
+
+ return true;
}
- versions$$1.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, loose)
- if (!max || maxSV.compare(v) === -1) {
- // compare(max, v, true)
- max = v;
- maxSV = new SemVer(max, loose);
- }
+ exports.satisfies = satisfies;
+
+ function satisfies(version, range, options) {
+ try {
+ range = new Range(range, options);
+ } catch (er) {
+ return false;
}
- });
- return max;
- }
- exports.minSatisfying = minSatisfying;
+ return range.test(version);
+ }
+
+ exports.maxSatisfying = maxSatisfying;
- function minSatisfying(versions$$1, range, loose) {
- var min = null;
- var minSV = null;
+ function maxSatisfying(versions, range, options) {
+ var max = null;
+ var maxSV = null;
- try {
- var rangeObj = new Range(range, loose);
- } catch (er) {
- return null;
+ try {
+ var rangeObj = new Range(range, options);
+ } catch (er) {
+ return null;
+ }
+
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v;
+ maxSV = new SemVer(max, options);
+ }
+ }
+ });
+ return max;
}
- versions$$1.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, loose)
- if (!min || minSV.compare(v) === 1) {
- // compare(min, v, true)
- min = v;
- minSV = new SemVer(min, loose);
+ exports.minSatisfying = minSatisfying;
+
+ function minSatisfying(versions, range, options) {
+ var min = null;
+ var minSV = null;
+
+ try {
+ var rangeObj = new Range(range, options);
+ } catch (er) {
+ return null;
+ }
+
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v;
+ minSV = new SemVer(min, options);
+ }
}
+ });
+ return min;
+ }
+
+ exports.minVersion = minVersion;
+
+ function minVersion(range, loose) {
+ range = new Range(range, loose);
+ var minver = new SemVer('0.0.0');
+
+ if (range.test(minver)) {
+ return minver;
}
- });
- return min;
- }
- exports.validRange = validRange;
+ minver = new SemVer('0.0.0-0');
+
+ if (range.test(minver)) {
+ return minver;
+ }
+
+ minver = null;
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+ comparators.forEach(function (comparator) {
+ // Clone to avoid manipulating the comparator's semver object.
+ var compver = new SemVer(comparator.semver.version);
+
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++;
+ } else {
+ compver.prerelease.push(0);
+ }
+
+ compver.raw = compver.format();
+
+ /* fallthrough */
+
+ case '':
+ case '>=':
+ if (!minver || gt(minver, compver)) {
+ minver = compver;
+ }
+
+ break;
+
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break;
+
+ /* istanbul ignore next */
+
+ default:
+ throw new Error('Unexpected operation: ' + comparator.operator);
+ }
+ });
+ }
+
+ if (minver && range.test(minver)) {
+ return minver;
+ }
- function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
return null;
}
- } // Determine if version is less than all the versions possible in the range
+ exports.validRange = validRange;
- exports.ltr = ltr;
+ function validRange(range, options) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*';
+ } catch (er) {
+ return null;
+ }
+ } // Determine if version is less than all the versions possible in the range
- function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
- } // Determine if version is greater than all the versions possible in the range.
+ exports.ltr = ltr;
- exports.gtr = gtr;
+ function ltr(version, range, options) {
+ return outside(version, range, '<', options);
+ } // Determine if version is greater than all the versions possible in the range.
- function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
- }
- exports.outside = outside;
+ exports.gtr = gtr;
- function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
- var gtfn, ltefn, ltfn, comp, ecomp;
+ function gtr(version, range, options) {
+ return outside(version, range, '>', options);
+ }
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
+ exports.outside = outside;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
+ function outside(version, range, hilo, options) {
+ version = new SemVer(version, options);
+ range = new Range(range, options);
+ var gtfn, ltefn, ltfn, comp, ecomp;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- } // If it satisifes the range it is not outside
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
- if (satisfies(version, range, loose)) {
- return false;
- } // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ } // If it satisifes the range it is not outside
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
- var high = null;
- var low = null;
- comparators.forEach(function (comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0');
- }
+ if (satisfies(version, range, options)) {
+ return false;
+ } // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- }); // If the edge version comparator has a operator then our version
- // isn't outside it
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+ var high = null;
+ var low = null;
+ comparators.forEach(function (comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0');
+ }
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- } // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator;
+ }
+ }); // If the edge version comparator has a operator then our version
+ // isn't outside it
- if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ } // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+
+
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
}
+
+ return true;
}
- return true;
- }
+ exports.prerelease = prerelease;
- exports.prerelease = prerelease;
+ function prerelease(version, options) {
+ var parsed = parse(version, options);
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
+ }
- function prerelease(version, loose) {
- var parsed = parse(version, loose);
- return parsed && parsed.prerelease.length ? parsed.prerelease : null;
- }
+ exports.intersects = intersects;
- exports.intersects = intersects;
+ function intersects(r1, r2, options) {
+ r1 = new Range(r1, options);
+ r2 = new Range(r2, options);
+ return r1.intersects(r2);
+ }
- function intersects(r1, r2, loose) {
- r1 = new Range(r1, loose);
- r2 = new Range(r2, loose);
- return r1.intersects(r2);
- }
-});
+ exports.coerce = coerce;
-var arrayify = function arrayify(object, keyName) {
- return Object.keys(object).reduce(function (array, key) {
- return array.concat(Object.assign(_defineProperty({}, keyName, key), object[key]));
- }, []);
-};
+ function coerce(version, options) {
+ if (version instanceof SemVer) {
+ return version;
+ }
-var dedent_1 = createCommonjsModule(function (module) {
- "use strict";
+ if (typeof version === 'number') {
+ version = String(version);
+ }
- function dedent(strings) {
- var raw = void 0;
+ if (typeof version !== 'string') {
+ return null;
+ }
- if (typeof strings === "string") {
- // dedent can be used as a plain function
- raw = [strings];
- } else {
- raw = strings.raw;
- } // first, perform interpolation
+ options = options || {};
+ var match = null;
+
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE]);
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ var next;
+
+ while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
+ match = next;
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
+ } // leave it in a clean state
- var result = "";
- for (var i = 0; i < raw.length; i++) {
- result += raw[i]. // join lines when there is a suppressed newline
- replace(/\\\n[ \t]*/g, ""). // handle escaped backticks
- replace(/\\`/g, "`");
+ re[t.COERCERTL].lastIndex = -1;
+ }
- if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {
- result += arguments.length <= i + 1 ? undefined : arguments[i + 1];
+ if (match === null) {
+ return null;
}
- } // now strip indentation
+ return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
+ }
+ });
+ var semver_1 = semver.SEMVER_SPEC_VERSION;
+ var semver_2 = semver.re;
+ var semver_3 = semver.src;
+ var semver_4 = semver.tokens;
+ var semver_5 = semver.parse;
+ var semver_6 = semver.valid;
+ var semver_7 = semver.clean;
+ var semver_8 = semver.SemVer;
+ var semver_9 = semver.inc;
+ var semver_10 = semver.diff;
+ var semver_11 = semver.compareIdentifiers;
+ var semver_12 = semver.rcompareIdentifiers;
+ var semver_13 = semver.major;
+ var semver_14 = semver.minor;
+ var semver_15 = semver.patch;
+ var semver_16 = semver.compare;
+ var semver_17 = semver.compareLoose;
+ var semver_18 = semver.compareBuild;
+ var semver_19 = semver.rcompare;
+ var semver_20 = semver.sort;
+ var semver_21 = semver.rsort;
+ var semver_22 = semver.gt;
+ var semver_23 = semver.lt;
+ var semver_24 = semver.eq;
+ var semver_25 = semver.neq;
+ var semver_26 = semver.gte;
+ var semver_27 = semver.lte;
+ var semver_28 = semver.cmp;
+ var semver_29 = semver.Comparator;
+ var semver_30 = semver.Range;
+ var semver_31 = semver.toComparators;
+ var semver_32 = semver.satisfies;
+ var semver_33 = semver.maxSatisfying;
+ var semver_34 = semver.minSatisfying;
+ var semver_35 = semver.minVersion;
+ var semver_36 = semver.validRange;
+ var semver_37 = semver.ltr;
+ var semver_38 = semver.gtr;
+ var semver_39 = semver.outside;
+ var semver_40 = semver.prerelease;
+ var semver_41 = semver.intersects;
+ var semver_42 = semver.coerce;
+
+ var arrayify = function arrayify(object, keyName) {
+ return Object.keys(object).reduce(function (array, key) {
+ return array.concat(Object.assign(_defineProperty({}, keyName, key), object[key]));
+ }, []);
+ };
+
+ var dedent_1 = createCommonjsModule(function (module) {
+
+ function dedent(strings) {
+ var raw = void 0;
- var lines = result.split("\n");
- var mindent = null;
- lines.forEach(function (l) {
- var m = l.match(/^(\s+)\S+/);
+ if (typeof strings === "string") {
+ // dedent can be used as a plain function
+ raw = [strings];
+ } else {
+ raw = strings.raw;
+ } // first, perform interpolation
- if (m) {
- var indent = m[1].length;
- if (!mindent) {
- // this is the first indented line
- mindent = indent;
- } else {
- mindent = Math.min(mindent, indent);
+ var result = "";
+
+ for (var i = 0; i < raw.length; i++) {
+ result += raw[i]. // join lines when there is a suppressed newline
+ replace(/\\\n[ \t]*/g, ""). // handle escaped backticks
+ replace(/\\`/g, "`");
+
+ if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {
+ result += arguments.length <= i + 1 ? undefined : arguments[i + 1];
}
- }
- });
+ } // now strip indentation
- if (mindent !== null) {
- result = lines.map(function (l) {
- return l[0] === " " ? l.slice(mindent) : l;
- }).join("\n");
- } // dedent eats leading and trailing whitespace too
+ var lines = result.split("\n");
+ var mindent = null;
+ lines.forEach(function (l) {
+ var m = l.match(/^(\s+)\S+/);
- result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too
+ if (m) {
+ var indent = m[1].length;
- return result.replace(/\\n/g, "\n");
- }
+ if (!mindent) {
+ // this is the first indented line
+ mindent = indent;
+ } else {
+ mindent = Math.min(mindent, indent);
+ }
+ }
+ });
+
+ if (mindent !== null) {
+ result = lines.map(function (l) {
+ return l[0] === " " ? l.slice(mindent) : l;
+ }).join("\n");
+ } // dedent eats leading and trailing whitespace too
- {
- module.exports = dedent;
- }
-});
-function _templateObject6() {
- var data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);
+ result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too
+
+ return result.replace(/\\n/g, "\n");
+ }
+
+ {
+ module.exports = dedent;
+ }
+ });
+
+ function _templateObject6() {
+ var data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);
+
+ _templateObject6 = function _templateObject6() {
+ return data;
+ };
- _templateObject6 = function _templateObject6() {
return data;
- };
+ }
- return data;
-}
+ function _templateObject5() {
+ var data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
-function _templateObject5() {
- var data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
+ _templateObject5 = function _templateObject5() {
+ return data;
+ };
- _templateObject5 = function _templateObject5() {
return data;
- };
+ }
- return data;
-}
+ function _templateObject4() {
+ var data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
-function _templateObject4() {
- var data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
+ _templateObject4 = function _templateObject4() {
+ return data;
+ };
- _templateObject4 = function _templateObject4() {
return data;
- };
+ }
- return data;
-}
+ function _templateObject3() {
+ var data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);
-function _templateObject3() {
- var data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);
+ _templateObject3 = function _templateObject3() {
+ return data;
+ };
- _templateObject3 = function _templateObject3() {
return data;
- };
+ }
- return data;
-}
+ function _templateObject2() {
+ var data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);
-function _templateObject2() {
- var data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);
+ _templateObject2 = function _templateObject2() {
+ return data;
+ };
- _templateObject2 = function _templateObject2() {
return data;
- };
+ }
- return data;
-}
+ function _templateObject() {
+ var data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);
-function _templateObject() {
- var data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);
+ _templateObject = function _templateObject() {
+ return data;
+ };
- _templateObject = function _templateObject() {
return data;
- };
+ }
- return data;
-}
+ var CATEGORY_CONFIG = "Config";
+ var CATEGORY_EDITOR = "Editor";
+ var CATEGORY_FORMAT = "Format";
+ var CATEGORY_OTHER = "Other";
+ var CATEGORY_OUTPUT = "Output";
+ var CATEGORY_GLOBAL = "Global";
+ var CATEGORY_SPECIAL = "Special";
+ /**
+ * @typedef {Object} OptionInfo
+ * @property {string} [since] - available since version
+ * @property {string} category
+ * @property {'int' | 'boolean' | 'choice' | 'path'} type
+ * @property {boolean} [array] - indicate it's an array of the specified type
+ * @property {OptionValueInfo} [default]
+ * @property {OptionRangeInfo} [range] - for type int
+ * @property {string} description
+ * @property {string} [deprecated] - deprecated since version
+ * @property {OptionRedirectInfo} [redirect] - redirect deprecated option
+ * @property {(value: any) => boolean} [exception]
+ * @property {OptionChoiceInfo[]} [choices] - for type choice
+ * @property {string} [cliName]
+ * @property {string} [cliCategory]
+ * @property {string} [cliDescription]
+ *
+ * @typedef {number | boolean | string} OptionValue
+ * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo
+ *
+ * @typedef {Object} OptionRedirectInfo
+ * @property {string} option
+ * @property {OptionValue} value
+ *
+ * @typedef {Object} OptionRangeInfo
+ * @property {number} start - recommended range start
+ * @property {number} end - recommended range end
+ * @property {number} step - recommended range step
+ *
+ * @typedef {Object} OptionChoiceInfo
+ * @property {boolean | string} value - boolean for the option that is originally boolean type
+ * @property {string} description
+ * @property {string} [since] - undefined if available since the first version of the option
+ * @property {string} [deprecated] - deprecated since version
+ * @property {OptionValueInfo} [redirect] - redirect deprecated value
+ */
-var CATEGORY_CONFIG = "Config";
-var CATEGORY_EDITOR = "Editor";
-var CATEGORY_FORMAT = "Format";
-var CATEGORY_OTHER = "Other";
-var CATEGORY_OUTPUT = "Output";
-var CATEGORY_GLOBAL = "Global";
-var CATEGORY_SPECIAL = "Special";
-/**
- * @typedef {Object} OptionInfo
- * @property {string} since - available since version
- * @property {string} category
- * @property {'int' | 'boolean' | 'choice' | 'path'} type
- * @property {boolean} array - indicate it's an array of the specified type
- * @property {boolean?} deprecated - deprecated since version
- * @property {OptionRedirectInfo?} redirect - redirect deprecated option
- * @property {string} description
- * @property {string?} oppositeDescription - for `false` option
- * @property {OptionValueInfo} default
- * @property {OptionRangeInfo?} range - for type int
- * @property {OptionChoiceInfo?} choices - for type choice
- * @property {(value: any) => boolean} exception
- *
- * @typedef {number | boolean | string} OptionValue
- * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo
- *
- * @typedef {Object} OptionRedirectInfo
- * @property {string} option
- * @property {OptionValue} value
- *
- * @typedef {Object} OptionRangeInfo
- * @property {number} start - recommended range start
- * @property {number} end - recommended range end
- * @property {number} step - recommended range step
- *
- * @typedef {Object} OptionChoiceInfo
- * @property {boolean | string} value - boolean for the option that is originally boolean type
- * @property {string?} description - undefined if redirect
- * @property {string?} since - undefined if available since the first version of the option
- * @property {string?} deprecated - deprecated since version
- * @property {OptionValueInfo?} redirect - redirect deprecated value
- *
- * @property {string?} cliName
- * @property {string?} cliCategory
- * @property {string?} cliDescription
- */
+ /** @type {{ [name: string]: OptionInfo }} */
-/** @type {{ [name: string]: OptionInfo } */
-
-var options$2 = {
- cursorOffset: {
- since: "1.4.0",
- category: CATEGORY_SPECIAL,
- type: "int",
- default: -1,
- range: {
- start: -1,
- end: Infinity,
- step: 1
+ var options = {
+ cursorOffset: {
+ since: "1.4.0",
+ category: CATEGORY_SPECIAL,
+ type: "int",
+ default: -1,
+ range: {
+ start: -1,
+ end: Infinity,
+ step: 1
+ },
+ description: dedent_1(_templateObject()),
+ cliCategory: CATEGORY_EDITOR
},
- description: dedent_1(_templateObject()),
- cliCategory: CATEGORY_EDITOR
- },
- endOfLine: {
- since: "1.15.0",
- category: CATEGORY_GLOBAL,
- type: "choice",
- default: "auto",
- description: "Which end of line characters to apply.",
- choices: [{
- value: "auto",
- description: dedent_1(_templateObject2())
- }, {
- value: "lf",
- description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos"
- }, {
- value: "crlf",
- description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows"
- }, {
- value: "cr",
- description: "Carriage Return character only (\\r), used very rarely"
- }]
- },
- filepath: {
- since: "1.4.0",
- category: CATEGORY_SPECIAL,
- type: "path",
- description: "Specify the input filepath. This will be used to do parser inference.",
- cliName: "stdin-filepath",
- cliCategory: CATEGORY_OTHER,
- cliDescription: "Path to the file to pretend that stdin comes from."
- },
- insertPragma: {
- since: "1.8.0",
- category: CATEGORY_SPECIAL,
- type: "boolean",
- default: false,
- description: "Insert @format pragma into file's first docblock comment.",
- cliCategory: CATEGORY_OTHER
- },
- parser: {
- since: "0.0.10",
- category: CATEGORY_GLOBAL,
- type: "choice",
- default: [{
- since: "0.0.10",
- value: "babylon"
- }, {
- since: "1.13.0",
- value: undefined
- }],
- description: "Which parser to use.",
- exception: function exception(value) {
- return typeof value === "string" || typeof value === "function";
+ endOfLine: {
+ since: "1.15.0",
+ category: CATEGORY_GLOBAL,
+ type: "choice",
+ default: "auto",
+ description: "Which end of line characters to apply.",
+ choices: [{
+ value: "auto",
+ description: dedent_1(_templateObject2())
+ }, {
+ value: "lf",
+ description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos"
+ }, {
+ value: "crlf",
+ description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows"
+ }, {
+ value: "cr",
+ description: "Carriage Return character only (\\r), used very rarely"
+ }]
},
- choices: [{
- value: "flow",
- description: "Flow"
- }, {
- value: "babylon",
- description: "JavaScript",
- deprecated: "1.16.0",
- redirect: "babel"
- }, {
- value: "babel",
- since: "1.16.0",
- description: "JavaScript"
- }, {
- value: "babel-flow",
- since: "1.16.0",
- description: "Flow"
- }, {
- value: "typescript",
+ filepath: {
since: "1.4.0",
- description: "TypeScript"
- }, {
- value: "css",
- since: "1.7.1",
- description: "CSS"
- }, {
- value: "postcss",
- since: "1.4.0",
- description: "CSS/Less/SCSS",
- deprecated: "1.7.1",
- redirect: "css"
- }, {
- value: "less",
- since: "1.7.1",
- description: "Less"
- }, {
- value: "scss",
- since: "1.7.1",
- description: "SCSS"
- }, {
- value: "json",
- since: "1.5.0",
- description: "JSON"
- }, {
- value: "json5",
- since: "1.13.0",
- description: "JSON5"
- }, {
- value: "json-stringify",
- since: "1.13.0",
- description: "JSON.stringify"
- }, {
- value: "graphql",
- since: "1.5.0",
- description: "GraphQL"
- }, {
- value: "markdown",
+ category: CATEGORY_SPECIAL,
+ type: "path",
+ description: "Specify the input filepath. This will be used to do parser inference.",
+ cliName: "stdin-filepath",
+ cliCategory: CATEGORY_OTHER,
+ cliDescription: "Path to the file to pretend that stdin comes from."
+ },
+ insertPragma: {
since: "1.8.0",
- description: "Markdown"
- }, {
- value: "mdx",
- since: "1.15.0",
- description: "MDX"
- }, {
- value: "vue",
+ category: CATEGORY_SPECIAL,
+ type: "boolean",
+ default: false,
+ description: "Insert @format pragma into file's first docblock comment.",
+ cliCategory: CATEGORY_OTHER
+ },
+ parser: {
+ since: "0.0.10",
+ category: CATEGORY_GLOBAL,
+ type: "choice",
+ default: [{
+ since: "0.0.10",
+ value: "babylon"
+ }, {
+ since: "1.13.0",
+ value: undefined
+ }],
+ description: "Which parser to use.",
+ exception: function exception(value) {
+ return typeof value === "string" || typeof value === "function";
+ },
+ choices: [{
+ value: "flow",
+ description: "Flow"
+ }, {
+ value: "babylon",
+ description: "JavaScript",
+ deprecated: "1.16.0",
+ redirect: "babel"
+ }, {
+ value: "babel",
+ since: "1.16.0",
+ description: "JavaScript"
+ }, {
+ value: "babel-flow",
+ since: "1.16.0",
+ description: "Flow"
+ }, {
+ value: "typescript",
+ since: "1.4.0",
+ description: "TypeScript"
+ }, {
+ value: "css",
+ since: "1.7.1",
+ description: "CSS"
+ }, {
+ value: "postcss",
+ since: "1.4.0",
+ description: "CSS/Less/SCSS",
+ deprecated: "1.7.1",
+ redirect: "css"
+ }, {
+ value: "less",
+ since: "1.7.1",
+ description: "Less"
+ }, {
+ value: "scss",
+ since: "1.7.1",
+ description: "SCSS"
+ }, {
+ value: "json",
+ since: "1.5.0",
+ description: "JSON"
+ }, {
+ value: "json5",
+ since: "1.13.0",
+ description: "JSON5"
+ }, {
+ value: "json-stringify",
+ since: "1.13.0",
+ description: "JSON.stringify"
+ }, {
+ value: "graphql",
+ since: "1.5.0",
+ description: "GraphQL"
+ }, {
+ value: "markdown",
+ since: "1.8.0",
+ description: "Markdown"
+ }, {
+ value: "mdx",
+ since: "1.15.0",
+ description: "MDX"
+ }, {
+ value: "vue",
+ since: "1.10.0",
+ description: "Vue"
+ }, {
+ value: "yaml",
+ since: "1.14.0",
+ description: "YAML"
+ }, {
+ value: "glimmer",
+ since: null,
+ description: "Handlebars"
+ }, {
+ value: "html",
+ since: "1.15.0",
+ description: "HTML"
+ }, {
+ value: "angular",
+ since: "1.15.0",
+ description: "Angular"
+ }, {
+ value: "lwc",
+ since: "1.17.0",
+ description: "Lightning Web Components"
+ }]
+ },
+ plugins: {
since: "1.10.0",
- description: "Vue"
- }, {
- value: "yaml",
- since: "1.14.0",
- description: "YAML"
- }, {
- value: "glimmer",
- since: null,
- description: "Handlebars"
- }, {
- value: "html",
- since: "1.15.0",
- description: "HTML"
- }, {
- value: "angular",
- since: "1.15.0",
- description: "Angular"
- }, {
- value: "lwc",
- since: "1.17.0",
- description: "Lightning Web Components"
- }]
- },
- plugins: {
- since: "1.10.0",
- type: "path",
- array: true,
- default: [{
- value: []
- }],
- category: CATEGORY_GLOBAL,
- description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",
- exception: function exception(value) {
- return typeof value === "string" || _typeof(value) === "object";
+ type: "path",
+ array: true,
+ default: [{
+ value: []
+ }],
+ category: CATEGORY_GLOBAL,
+ description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",
+ exception: function exception(value) {
+ return typeof value === "string" || _typeof(value) === "object";
+ },
+ cliName: "plugin",
+ cliCategory: CATEGORY_CONFIG
},
- cliName: "plugin",
- cliCategory: CATEGORY_CONFIG
- },
- pluginSearchDirs: {
- since: "1.13.0",
- type: "path",
- array: true,
- default: [{
- value: []
- }],
- category: CATEGORY_GLOBAL,
- description: dedent_1(_templateObject3()),
- exception: function exception(value) {
- return typeof value === "string" || _typeof(value) === "object";
+ pluginSearchDirs: {
+ since: "1.13.0",
+ type: "path",
+ array: true,
+ default: [{
+ value: []
+ }],
+ category: CATEGORY_GLOBAL,
+ description: dedent_1(_templateObject3()),
+ exception: function exception(value) {
+ return typeof value === "string" || _typeof(value) === "object";
+ },
+ cliName: "plugin-search-dir",
+ cliCategory: CATEGORY_CONFIG
},
- cliName: "plugin-search-dir",
- cliCategory: CATEGORY_CONFIG
- },
- printWidth: {
- since: "0.0.0",
- category: CATEGORY_GLOBAL,
- type: "int",
- default: 80,
- description: "The line length where Prettier will try wrap.",
- range: {
- start: 0,
- end: Infinity,
- step: 1
- }
- },
- rangeEnd: {
- since: "1.4.0",
- category: CATEGORY_SPECIAL,
- type: "int",
- default: Infinity,
- range: {
- start: 0,
- end: Infinity,
- step: 1
+ printWidth: {
+ since: "0.0.0",
+ category: CATEGORY_GLOBAL,
+ type: "int",
+ default: 80,
+ description: "The line length where Prettier will try wrap.",
+ range: {
+ start: 0,
+ end: Infinity,
+ step: 1
+ }
},
- description: dedent_1(_templateObject4()),
- cliCategory: CATEGORY_EDITOR
- },
- rangeStart: {
- since: "1.4.0",
- category: CATEGORY_SPECIAL,
- type: "int",
- default: 0,
- range: {
- start: 0,
- end: Infinity,
- step: 1
+ rangeEnd: {
+ since: "1.4.0",
+ category: CATEGORY_SPECIAL,
+ type: "int",
+ default: Infinity,
+ range: {
+ start: 0,
+ end: Infinity,
+ step: 1
+ },
+ description: dedent_1(_templateObject4()),
+ cliCategory: CATEGORY_EDITOR
},
- description: dedent_1(_templateObject5()),
- cliCategory: CATEGORY_EDITOR
- },
- requirePragma: {
- since: "1.7.0",
- category: CATEGORY_SPECIAL,
- type: "boolean",
- default: false,
- description: dedent_1(_templateObject6()),
- cliCategory: CATEGORY_OTHER
- },
- tabWidth: {
- type: "int",
- category: CATEGORY_GLOBAL,
- default: 2,
- description: "Number of spaces per indentation level.",
- range: {
- start: 0,
- end: Infinity,
- step: 1
- }
- },
- useFlowParser: {
- since: "0.0.0",
- category: CATEGORY_GLOBAL,
- type: "boolean",
- default: [{
+ rangeStart: {
+ since: "1.4.0",
+ category: CATEGORY_SPECIAL,
+ type: "int",
+ default: 0,
+ range: {
+ start: 0,
+ end: Infinity,
+ step: 1
+ },
+ description: dedent_1(_templateObject5()),
+ cliCategory: CATEGORY_EDITOR
+ },
+ requirePragma: {
+ since: "1.7.0",
+ category: CATEGORY_SPECIAL,
+ type: "boolean",
+ default: false,
+ description: dedent_1(_templateObject6()),
+ cliCategory: CATEGORY_OTHER
+ },
+ tabWidth: {
+ type: "int",
+ category: CATEGORY_GLOBAL,
+ default: 2,
+ description: "Number of spaces per indentation level.",
+ range: {
+ start: 0,
+ end: Infinity,
+ step: 1
+ }
+ },
+ useFlowParser: {
since: "0.0.0",
- value: false
- }, {
- since: "1.15.0",
- value: undefined
- }],
- deprecated: "0.0.10",
- description: "Use flow parser.",
- redirect: {
- option: "parser",
- value: "flow"
+ category: CATEGORY_GLOBAL,
+ type: "boolean",
+ default: [{
+ since: "0.0.0",
+ value: false
+ }, {
+ since: "1.15.0",
+ value: undefined
+ }],
+ deprecated: "0.0.10",
+ description: "Use flow parser.",
+ redirect: {
+ option: "parser",
+ value: "flow"
+ },
+ cliName: "flow-parser"
},
- cliName: "flow-parser"
- },
- useTabs: {
- since: "1.0.0",
- category: CATEGORY_GLOBAL,
- type: "boolean",
- default: false,
- description: "Indent with tabs instead of spaces."
- }
-};
-var coreOptions$1 = {
- CATEGORY_CONFIG: CATEGORY_CONFIG,
- CATEGORY_EDITOR: CATEGORY_EDITOR,
- CATEGORY_FORMAT: CATEGORY_FORMAT,
- CATEGORY_OTHER: CATEGORY_OTHER,
- CATEGORY_OUTPUT: CATEGORY_OUTPUT,
- CATEGORY_GLOBAL: CATEGORY_GLOBAL,
- CATEGORY_SPECIAL: CATEGORY_SPECIAL,
- options: options$2
-};
-
-var require$$0 = ( _package$1 && _package ) || _package$1;
-
-var currentVersion = require$$0.version;
-var coreOptions = coreOptions$1.options;
-
-function getSupportInfo$2(version, opts) {
- opts = Object.assign({
- plugins: [],
- showUnreleased: false,
- showDeprecated: false,
- showInternal: false
- }, opts);
-
- if (!version) {
- // pre-release version is smaller than the normal version in semver,
- // we need to treat it as the normal one so as to test new features.
- version = currentVersion.split("-", 1)[0];
- }
-
- var plugins = opts.plugins;
- var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) {
- return Object.assign(currentOptions, plugin.options);
- }, {}), coreOptions), "name").sort(function (a, b) {
- return a.name === b.name ? 0 : a.name < b.name ? -1 : 1;
- }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) {
- var newOption = Object.assign({}, option);
-
- if (Array.isArray(newOption.default)) {
- newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) {
- return semver.compare(info2.since, info1.since);
- })[0].value;
- }
-
- if (Array.isArray(newOption.choices)) {
- newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated);
- }
-
- return newOption;
- }).map(function (option) {
- var filteredPlugins = plugins.filter(function (plugin) {
- return plugin.defaultOptions && plugin.defaultOptions[option.name];
- });
- var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) {
- reduced[plugin.name] = plugin.defaultOptions[option.name];
- return reduced;
- }, {});
- return Object.assign(option, {
- pluginDefaults: pluginDefaults
- });
- });
- var usePostCssParser = semver.lt(version, "1.7.1");
- var useBabylonParser = semver.lt(version, "1.16.0");
- var languages = plugins.reduce(function (all, plugin) {
- return all.concat(plugin.languages || []);
- }, []).filter(filterSince).map(function (language) {
- // Prevent breaking changes
- if (language.name === "Markdown") {
- return Object.assign({}, language, {
- parsers: ["markdown"]
- });
+ useTabs: {
+ since: "1.0.0",
+ category: CATEGORY_GLOBAL,
+ type: "boolean",
+ default: false,
+ description: "Indent with tabs instead of spaces."
}
+ };
+ var coreOptions = {
+ CATEGORY_CONFIG: CATEGORY_CONFIG,
+ CATEGORY_EDITOR: CATEGORY_EDITOR,
+ CATEGORY_FORMAT: CATEGORY_FORMAT,
+ CATEGORY_OTHER: CATEGORY_OTHER,
+ CATEGORY_OUTPUT: CATEGORY_OUTPUT,
+ CATEGORY_GLOBAL: CATEGORY_GLOBAL,
+ CATEGORY_SPECIAL: CATEGORY_SPECIAL,
+ options: options
+ };
- if (language.name === "TypeScript") {
- return Object.assign({}, language, {
- parsers: ["typescript"]
- });
- } // "babylon" was renamed to "babel" in 1.16.0
+ var require$$0 = getCjsExportFromNamespace(_package$1);
+ var currentVersion = require$$0.version;
+ var coreOptions$1 = coreOptions.options;
- if (useBabylonParser && language.parsers.indexOf("babel") !== -1) {
- return Object.assign({}, language, {
- parsers: language.parsers.map(function (parser) {
- return parser === "babel" ? "babylon" : parser;
- })
- });
+ function getSupportInfo(version, opts) {
+ opts = Object.assign({
+ plugins: [],
+ showUnreleased: false,
+ showDeprecated: false,
+ showInternal: false
+ }, opts);
+
+ if (!version) {
+ // pre-release version is smaller than the normal version in semver,
+ // we need to treat it as the normal one so as to test new features.
+ version = currentVersion.split("-", 1)[0];
}
- if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) {
- return Object.assign({}, language, {
- parsers: ["postcss"]
+ var plugins = opts.plugins;
+ var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) {
+ return Object.assign(currentOptions, plugin.options);
+ }, {}), coreOptions$1), "name").sort(function (a, b) {
+ return a.name === b.name ? 0 : a.name < b.name ? -1 : 1;
+ }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) {
+ var newOption = Object.assign({}, option);
+
+ if (Array.isArray(newOption.default)) {
+ newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) {
+ return semver.compare(info2.since, info1.since);
+ })[0].value;
+ }
+
+ if (Array.isArray(newOption.choices)) {
+ newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated);
+ }
+
+ return newOption;
+ }).map(function (option) {
+ var filteredPlugins = plugins.filter(function (plugin) {
+ return plugin.defaultOptions && plugin.defaultOptions[option.name] !== undefined;
});
- }
+ var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) {
+ reduced[plugin.name] = plugin.defaultOptions[option.name];
+ return reduced;
+ }, {});
+ return Object.assign(option, {
+ pluginDefaults: pluginDefaults
+ });
+ });
+ var usePostCssParser = semver.lt(version, "1.7.1");
+ var useBabylonParser = semver.lt(version, "1.16.0");
+ var languages = plugins.reduce(function (all, plugin) {
+ return all.concat(plugin.languages || []);
+ }, []).filter(filterSince).map(function (language) {
+ // Prevent breaking changes
+ if (language.name === "Markdown") {
+ return Object.assign({}, language, {
+ parsers: ["markdown"]
+ });
+ }
- return language;
- });
- return {
- languages: languages,
- options: options
- };
+ if (language.name === "TypeScript") {
+ return Object.assign({}, language, {
+ parsers: ["typescript"]
+ });
+ } // "babylon" was renamed to "babel" in 1.16.0
- function filterSince(object) {
- return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since);
- }
- function filterDeprecated(object) {
- return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated);
- }
+ if (useBabylonParser && language.parsers.indexOf("babel") !== -1) {
+ return Object.assign({}, language, {
+ parsers: language.parsers.map(function (parser) {
+ return parser === "babel" ? "babylon" : parser;
+ })
+ });
+ }
- function mapDeprecated(object) {
- if (!object.deprecated || opts.showDeprecated) {
- return object;
- }
+ if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) {
+ return Object.assign({}, language, {
+ parsers: ["postcss"]
+ });
+ }
- var newObject = Object.assign({}, object);
- delete newObject.deprecated;
- delete newObject.redirect;
- return newObject;
- }
+ return language;
+ });
+ return {
+ languages: languages,
+ options: options
+ };
- function mapInternal(object) {
- if (opts.showInternal) {
- return object;
+ function filterSince(object) {
+ return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since);
}
- var newObject = Object.assign({}, object);
- delete newObject.cliName;
- delete newObject.cliCategory;
- delete newObject.cliDescription;
- return newObject;
- }
-}
-
-var support = {
- getSupportInfo: getSupportInfo$2
-};
-
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-/* global Reflect, Promise */
-var _extendStatics = function extendStatics(d, b) {
- _extendStatics = Object.setPrototypeOf || {
- __proto__: []
- } instanceof Array && function (d, b) {
- d.__proto__ = b;
- } || function (d, b) {
- for (var p in b) {
- if (b.hasOwnProperty(p)) d[p] = b[p];
+ function filterDeprecated(object) {
+ return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated);
}
- };
- return _extendStatics(d, b);
-};
+ function mapDeprecated(object) {
+ if (!object.deprecated || opts.showDeprecated) {
+ return object;
+ }
+
+ var newObject = Object.assign({}, object);
+ delete newObject.deprecated;
+ delete newObject.redirect;
+ return newObject;
+ }
-function __extends(d, b) {
- _extendStatics(d, b);
+ function mapInternal(object) {
+ if (opts.showInternal) {
+ return object;
+ }
- function __() {
- this.constructor = d;
+ var newObject = Object.assign({}, object);
+ delete newObject.cliName;
+ delete newObject.cliCategory;
+ delete newObject.cliDescription;
+ return newObject;
+ }
}
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-}
-
-var _assign = function __assign() {
- _assign = Object.assign || function __assign(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
+ var support = {
+ getSupportInfo: getSupportInfo
+ };
- for (var p in s) {
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ /*! *****************************************************************************
+ Copyright (c) Microsoft Corporation. All rights reserved.
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0
+
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+ MERCHANTABLITY OR NON-INFRINGEMENT.
+
+ See the Apache Version 2.0 License for specific language governing permissions
+ and limitations under the License.
+ ***************************************************************************** */
+
+ /* global Reflect, Promise */
+ var _extendStatics = function extendStatics(d, b) {
+ _extendStatics = Object.setPrototypeOf || {
+ __proto__: []
+ } instanceof Array && function (d, b) {
+ d.__proto__ = b;
+ } || function (d, b) {
+ for (var p in b) {
+ if (b.hasOwnProperty(p)) d[p] = b[p];
}
- }
+ };
- return t;
+ return _extendStatics(d, b);
};
- return _assign.apply(this, arguments);
-};
+ function __extends(d, b) {
+ _extendStatics(d, b);
-function __rest(s, e) {
- var t = {};
+ function __() {
+ this.constructor = d;
+ }
- for (var p in s) {
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
- }
- return t;
-}
-function __decorate(decorators, target, key, desc) {
- var c = arguments.length,
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
- d;
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
- if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- }
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-}
-function __param(paramIndex, decorator) {
- return function (target, key) {
- decorator(target, key, paramIndex);
- };
-}
-function __metadata(metadataKey, metadataValue) {
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
-}
-function __awaiter(thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- }
+ var _assign = function __assign() {
+ _assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
+ for (var p in s) {
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
}
- }
- function step(result) {
- result.done ? resolve(result.value) : new P(function (resolve) {
- resolve(result.value);
- }).then(fulfilled, rejected);
- }
+ return t;
+ };
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-}
-function __generator(thisArg, body) {
- var _ = {
- label: 0,
- sent: function sent() {
- if (t[0] & 1) throw t[1];
- return t[1];
- },
- trys: [],
- ops: []
- },
- f,
- y,
- t,
- g;
- return g = {
- next: verb(0),
- "throw": verb(1),
- "return": verb(2)
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
- return this;
- }), g;
+ return _assign.apply(this, arguments);
+ };
+ function __rest(s, e) {
+ var t = {};
+
+ for (var p in s) {
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
+ }
- function verb(n) {
- return function (v) {
- return step([n, v]);
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
+ }
+ return t;
+ }
+ function __decorate(decorators, target, key, desc) {
+ var c = arguments.length,
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
+ d;
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ }
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ }
+ function __param(paramIndex, decorator) {
+ return function (target, key) {
+ decorator(target, key, paramIndex);
};
}
+ function __metadata(metadataKey, metadataValue) {
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+ }
+ function __awaiter(thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e) {
+ reject(e);
+ }
+ }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e) {
+ reject(e);
+ }
+ }
- while (_) {
- try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
+ function step(result) {
+ result.done ? resolve(result.value) : new P(function (resolve) {
+ resolve(result.value);
+ }).then(fulfilled, rejected);
+ }
- switch (op[0]) {
- case 0:
- case 1:
- t = op;
- break;
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ }
+ function __generator(thisArg, body) {
+ var _ = {
+ label: 0,
+ sent: function sent() {
+ if (t[0] & 1) throw t[1];
+ return t[1];
+ },
+ trys: [],
+ ops: []
+ },
+ f,
+ y,
+ t,
+ g;
+ return g = {
+ next: verb(0),
+ "throw": verb(1),
+ "return": verb(2)
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
+ return this;
+ }), g;
+
+ function verb(n) {
+ return function (v) {
+ return step([n, v]);
+ };
+ }
- case 4:
- _.label++;
- return {
- value: op[1],
- done: false
- };
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
- case 5:
- _.label++;
- y = op[1];
- op = [0];
- continue;
+ while (_) {
+ try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
- case 7:
- op = _.ops.pop();
+ switch (op[0]) {
+ case 0:
+ case 1:
+ t = op;
+ break;
- _.trys.pop();
+ case 4:
+ _.label++;
+ return {
+ value: op[1],
+ done: false
+ };
+
+ case 5:
+ _.label++;
+ y = op[1];
+ op = [0];
+ continue;
- continue;
+ case 7:
+ op = _.ops.pop();
+
+ _.trys.pop();
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
- _ = 0;
continue;
- }
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
- _.label = op[1];
- break;
- }
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
+ _ = 0;
+ continue;
+ }
- if (op[0] === 6 && _.label < t[1]) {
- _.label = t[1];
- t = op;
- break;
- }
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
+ _.label = op[1];
+ break;
+ }
- if (t && _.label < t[2]) {
- _.label = t[2];
+ if (op[0] === 6 && _.label < t[1]) {
+ _.label = t[1];
+ t = op;
+ break;
+ }
- _.ops.push(op);
+ if (t && _.label < t[2]) {
+ _.label = t[2];
- break;
- }
+ _.ops.push(op);
- if (t[2]) _.ops.pop();
+ break;
+ }
- _.trys.pop();
+ if (t[2]) _.ops.pop();
- continue;
- }
+ _.trys.pop();
- op = body.call(thisArg, _);
- } catch (e) {
- op = [6, e];
- y = 0;
- } finally {
- f = t = 0;
+ continue;
+ }
+
+ op = body.call(thisArg, _);
+ } catch (e) {
+ op = [6, e];
+ y = 0;
+ } finally {
+ f = t = 0;
+ }
}
- }
- if (op[0] & 5) throw op[1];
- return {
- value: op[0] ? op[1] : void 0,
- done: true
- };
- }
-}
-function __exportStar(m, exports) {
- for (var p in m) {
- if (!exports.hasOwnProperty(p)) exports[p] = m[p];
- }
-}
-function __values(o) {
- var m = typeof Symbol === "function" && o[Symbol.iterator],
- i = 0;
- if (m) return m.call(o);
- return {
- next: function next() {
- if (o && i >= o.length) o = void 0;
+ if (op[0] & 5) throw op[1];
return {
- value: o && o[i++],
- done: !o
+ value: op[0] ? op[1] : void 0,
+ done: true
};
}
- };
-}
-function __read(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m) return o;
- var i = m.call(o),
- r,
- ar = [],
- e;
-
- try {
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
- ar.push(r.value);
- }
- } catch (error) {
- e = {
- error: error
+ }
+ function __exportStar(m, exports) {
+ for (var p in m) {
+ if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+ }
+ }
+ function __values(o) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator],
+ i = 0;
+ if (m) return m.call(o);
+ return {
+ next: function next() {
+ if (o && i >= o.length) o = void 0;
+ return {
+ value: o && o[i++],
+ done: !o
+ };
+ }
};
- } finally {
+ }
+ function __read(o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o),
+ r,
+ ar = [],
+ e;
+
try {
- if (r && !r.done && (m = i["return"])) m.call(i);
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
+ ar.push(r.value);
+ }
+ } catch (error) {
+ e = {
+ error: error
+ };
} finally {
- if (e) throw e.error;
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ } finally {
+ if (e) throw e.error;
+ }
}
+
+ return ar;
}
+ function __spread() {
+ for (var ar = [], i = 0; i < arguments.length; i++) {
+ ar = ar.concat(__read(arguments[i]));
+ }
- return ar;
-}
-function __spread() {
- for (var ar = [], i = 0; i < arguments.length; i++) {
- ar = ar.concat(__read(arguments[i]));
+ return ar;
}
+ function __spreadArrays() {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
+ s += arguments[i].length;
+ }
- return ar;
-}
-function __await(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
-}
-function __asyncGenerator(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []),
- i,
- q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
- return this;
- }, i;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++) {
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
+ r[k] = a[j];
+ }
+ }
- function verb(n) {
- if (g[n]) i[n] = function (v) {
- return new Promise(function (a, b) {
- q.push([n, v, a, b]) > 1 || resume(n, v);
- });
- };
+ return r;
+ }
+ function __await(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
}
+ function __asyncGenerator(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []),
+ i,
+ q = [];
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
+ return this;
+ }, i;
- function resume(n, v) {
- try {
- step(g[n](v));
- } catch (e) {
- settle(q[0][3], e);
+ function verb(n) {
+ if (g[n]) i[n] = function (v) {
+ return new Promise(function (a, b) {
+ q.push([n, v, a, b]) > 1 || resume(n, v);
+ });
+ };
}
- }
- function step(r) {
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
- }
+ function resume(n, v) {
+ try {
+ step(g[n](v));
+ } catch (e) {
+ settle(q[0][3], e);
+ }
+ }
- function fulfill(value) {
- resume("next", value);
- }
+ function step(r) {
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
+ }
+
+ function fulfill(value) {
+ resume("next", value);
+ }
+
+ function reject(value) {
+ resume("throw", value);
+ }
- function reject(value) {
- resume("throw", value);
+ function settle(f, v) {
+ if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
+ }
}
+ function __asyncDelegator(o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) {
+ throw e;
+ }), verb("return"), i[Symbol.iterator] = function () {
+ return this;
+ }, i;
- function settle(f, v) {
- if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
+ function verb(n, f) {
+ i[n] = o[n] ? function (v) {
+ return (p = !p) ? {
+ value: __await(o[n](v)),
+ done: n === "return"
+ } : f ? f(v) : v;
+ } : f;
+ }
}
-}
-function __asyncDelegator(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function (e) {
- throw e;
- }), verb("return"), i[Symbol.iterator] = function () {
- return this;
- }, i;
-
- function verb(n, f) {
- i[n] = o[n] ? function (v) {
- return (p = !p) ? {
- value: __await(o[n](v)),
- done: n === "return"
- } : f ? f(v) : v;
- } : f;
- }
-}
-function __asyncValues(o) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator],
- i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
- return this;
- }, i);
+ function __asyncValues(o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator],
+ i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
+ return this;
+ }, i);
+
+ function verb(n) {
+ i[n] = o[n] && function (v) {
+ return new Promise(function (resolve, reject) {
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
+ });
+ };
+ }
- function verb(n) {
- i[n] = o[n] && function (v) {
- return new Promise(function (resolve, reject) {
- v = o[n](v), settle(resolve, reject, v.done, v.value);
+ function settle(resolve, reject, d, v) {
+ Promise.resolve(v).then(function (v) {
+ resolve({
+ value: v,
+ done: d
+ });
+ }, reject);
+ }
+ }
+ function __makeTemplateObject(cooked, raw) {
+ if (Object.defineProperty) {
+ Object.defineProperty(cooked, "raw", {
+ value: raw
});
+ } else {
+ cooked.raw = raw;
+ }
+
+ return cooked;
+ }
+ function __importStar(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result.default = mod;
+ return result;
+ }
+ function __importDefault(mod) {
+ return mod && mod.__esModule ? mod : {
+ default: mod
};
}
- function settle(resolve, reject, d, v) {
- Promise.resolve(v).then(function (v) {
- resolve({
- value: v,
- done: d
- });
- }, reject);
- }
-}
-function __makeTemplateObject(cooked, raw) {
- if (Object.defineProperty) {
- Object.defineProperty(cooked, "raw", {
- value: raw
+ var tslib_es6 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ __extends: __extends,
+ get __assign () { return _assign; },
+ __rest: __rest,
+ __decorate: __decorate,
+ __param: __param,
+ __metadata: __metadata,
+ __awaiter: __awaiter,
+ __generator: __generator,
+ __exportStar: __exportStar,
+ __values: __values,
+ __read: __read,
+ __spread: __spread,
+ __spreadArrays: __spreadArrays,
+ __await: __await,
+ __asyncGenerator: __asyncGenerator,
+ __asyncDelegator: __asyncDelegator,
+ __asyncValues: __asyncValues,
+ __makeTemplateObject: __makeTemplateObject,
+ __importStar: __importStar,
+ __importDefault: __importDefault
+ });
+
+ var api = createCommonjsModule(function (module, exports) {
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
});
- } else {
- cooked.raw = raw;
- }
+ exports.apiDescriptor = {
+ key: function key(_key) {
+ return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key);
+ },
+ value: function value(_value) {
+ if (_value === null || _typeof(_value) !== 'object') {
+ return JSON.stringify(_value);
+ }
- return cooked;
-}
+ if (Array.isArray(_value)) {
+ return "[".concat(_value.map(function (subValue) {
+ return exports.apiDescriptor.value(subValue);
+ }).join(', '), "]");
+ }
-function __importStar(mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) {
- if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
- }
- result.default = mod;
- return result;
-}
-function __importDefault(mod) {
- return mod && mod.__esModule ? mod : {
- default: mod
- };
-}
-
-var tslib_1 = Object.freeze({
- __extends: __extends,
- get __assign () { return _assign; },
- __rest: __rest,
- __decorate: __decorate,
- __param: __param,
- __metadata: __metadata,
- __awaiter: __awaiter,
- __generator: __generator,
- __exportStar: __exportStar,
- __values: __values,
- __read: __read,
- __spread: __spread,
- __await: __await,
- __asyncGenerator: __asyncGenerator,
- __asyncDelegator: __asyncDelegator,
- __asyncValues: __asyncValues,
- __makeTemplateObject: __makeTemplateObject,
- __importStar: __importStar,
- __importDefault: __importDefault
-});
-
-var api = createCommonjsModule(function (module, exports) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.apiDescriptor = {
- key: function key(_key) {
- return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key);
- },
- value: function value(_value) {
- if (_value === null || _typeof(_value) !== 'object') {
- return JSON.stringify(_value);
+ var keys = Object.keys(_value);
+ return keys.length === 0 ? '{}' : "{ ".concat(keys.map(function (key) {
+ return "".concat(exports.apiDescriptor.key(key), ": ").concat(exports.apiDescriptor.value(_value[key]));
+ }).join(', '), " }");
+ },
+ pair: function pair(_ref) {
+ var key = _ref.key,
+ value = _ref.value;
+ return exports.apiDescriptor.value(_defineProperty({}, key, value));
}
+ };
+ });
+ unwrapExports(api);
+ var api_1 = api.apiDescriptor;
- if (Array.isArray(_value)) {
- return "[".concat(_value.map(function (subValue) {
- return exports.apiDescriptor.value(subValue);
- }).join(', '), "]");
- }
+ var tslib_1 = getCjsExportFromNamespace(tslib_es6);
- var keys = Object.keys(_value);
- return keys.length === 0 ? '{}' : "{ ".concat(keys.map(function (key) {
- return "".concat(exports.apiDescriptor.key(key), ": ").concat(exports.apiDescriptor.value(_value[key]));
- }).join(', '), " }");
- },
- pair: function pair(_ref) {
- var key = _ref.key,
- value = _ref.value;
- return exports.apiDescriptor.value(_defineProperty({}, key, value));
- }
- };
-});
-unwrapExports(api);
+ var descriptors = createCommonjsModule(function (module, exports) {
-var descriptors = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(api, exports);
});
+ unwrapExports(descriptors);
- tslib_1.__exportStar(api, exports);
-});
-unwrapExports(descriptors);
-
-var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
-
-var escapeStringRegexp = function escapeStringRegexp(str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- return str.replace(matchOperatorsRe, '\\$&');
-};
-
-var colorName = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "darkkhaki": [189, 183, 107],
- "darkmagenta": [139, 0, 139],
- "darkolivegreen": [85, 107, 47],
- "darkorange": [255, 140, 0],
- "darkorchid": [153, 50, 204],
- "darkred": [139, 0, 0],
- "darksalmon": [233, 150, 122],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
-};
-
-var conversions = createCommonjsModule(function (module) {
- /* MIT license */
- // NOTE: conversions should only return primitive values (i.e. arrays, or
- // values that give correct `typeof` results).
- // do not use box values types (i.e. Number(), String(), etc.)
- var reverseKeywords = {};
-
- for (var key in colorName) {
- if (colorName.hasOwnProperty(key)) {
- reverseKeywords[colorName[key]] = key;
- }
- }
-
- var convert = module.exports = {
- rgb: {
- channels: 3,
- labels: 'rgb'
- },
- hsl: {
- channels: 3,
- labels: 'hsl'
- },
- hsv: {
- channels: 3,
- labels: 'hsv'
- },
- hwb: {
- channels: 3,
- labels: 'hwb'
- },
- cmyk: {
- channels: 4,
- labels: 'cmyk'
- },
- xyz: {
- channels: 3,
- labels: 'xyz'
- },
- lab: {
- channels: 3,
- labels: 'lab'
- },
- lch: {
- channels: 3,
- labels: 'lch'
- },
- hex: {
- channels: 1,
- labels: ['hex']
- },
- keyword: {
- channels: 1,
- labels: ['keyword']
- },
- ansi16: {
- channels: 1,
- labels: ['ansi16']
- },
- ansi256: {
- channels: 1,
- labels: ['ansi256']
- },
- hcg: {
- channels: 3,
- labels: ['h', 'c', 'g']
- },
- apple: {
- channels: 3,
- labels: ['r16', 'g16', 'b16']
- },
- gray: {
- channels: 1,
- labels: ['gray']
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+ var escapeStringRegexp = function escapeStringRegexp(str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
}
- }; // hide .channels and .labels properties
- for (var model in convert) {
- if (convert.hasOwnProperty(model)) {
- if (!('channels' in convert[model])) {
- throw new Error('missing channels property: ' + model);
- }
+ return str.replace(matchOperatorsRe, '\\$&');
+ };
- if (!('labels' in convert[model])) {
- throw new Error('missing channel labels property: ' + model);
- }
+ var colorName = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+ };
- if (convert[model].labels.length !== convert[model].channels) {
- throw new Error('channel and label counts mismatch: ' + model);
- }
+ var conversions = createCommonjsModule(function (module) {
+ /* MIT license */
+ // NOTE: conversions should only return primitive values (i.e. arrays, or
+ // values that give correct `typeof` results).
+ // do not use box values types (i.e. Number(), String(), etc.)
+ var reverseKeywords = {};
- var channels = convert[model].channels;
- var labels = convert[model].labels;
- delete convert[model].channels;
- delete convert[model].labels;
- Object.defineProperty(convert[model], 'channels', {
- value: channels
- });
- Object.defineProperty(convert[model], 'labels', {
- value: labels
- });
+ for (var key in colorName) {
+ if (colorName.hasOwnProperty(key)) {
+ reverseKeywords[colorName[key]] = key;
+ }
}
- }
-
- convert.rgb.hsl = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var min = Math.min(r, g, b);
- var max = Math.max(r, g, b);
- var delta = max - min;
- var h;
- var s;
- var l;
- if (max === min) {
- h = 0;
- } else if (r === max) {
- h = (g - b) / delta;
- } else if (g === max) {
- h = 2 + (b - r) / delta;
- } else if (b === max) {
- h = 4 + (r - g) / delta;
- }
+ var convert = module.exports = {
+ rgb: {
+ channels: 3,
+ labels: 'rgb'
+ },
+ hsl: {
+ channels: 3,
+ labels: 'hsl'
+ },
+ hsv: {
+ channels: 3,
+ labels: 'hsv'
+ },
+ hwb: {
+ channels: 3,
+ labels: 'hwb'
+ },
+ cmyk: {
+ channels: 4,
+ labels: 'cmyk'
+ },
+ xyz: {
+ channels: 3,
+ labels: 'xyz'
+ },
+ lab: {
+ channels: 3,
+ labels: 'lab'
+ },
+ lch: {
+ channels: 3,
+ labels: 'lch'
+ },
+ hex: {
+ channels: 1,
+ labels: ['hex']
+ },
+ keyword: {
+ channels: 1,
+ labels: ['keyword']
+ },
+ ansi16: {
+ channels: 1,
+ labels: ['ansi16']
+ },
+ ansi256: {
+ channels: 1,
+ labels: ['ansi256']
+ },
+ hcg: {
+ channels: 3,
+ labels: ['h', 'c', 'g']
+ },
+ apple: {
+ channels: 3,
+ labels: ['r16', 'g16', 'b16']
+ },
+ gray: {
+ channels: 1,
+ labels: ['gray']
+ }
+ }; // hide .channels and .labels properties
- h = Math.min(h * 60, 360);
+ for (var model in convert) {
+ if (convert.hasOwnProperty(model)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
- if (h < 0) {
- h += 360;
- }
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
- l = (min + max) / 2;
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
- if (max === min) {
- s = 0;
- } else if (l <= 0.5) {
- s = delta / (max + min);
- } else {
- s = delta / (2 - max - min);
+ var channels = convert[model].channels;
+ var labels = convert[model].labels;
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {
+ value: channels
+ });
+ Object.defineProperty(convert[model], 'labels', {
+ value: labels
+ });
+ }
}
- return [h, s * 100, l * 100];
- };
+ convert.rgb.hsl = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var l;
- convert.rgb.hsv = function (rgb) {
- var r = rgb[0];
- var g = rgb[1];
- var b = rgb[2];
- var min = Math.min(r, g, b);
- var max = Math.max(r, g, b);
- var delta = max - min;
- var h;
- var s;
- var v;
-
- if (max === 0) {
- s = 0;
- } else {
- s = delta / max * 1000 / 10;
- }
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
- if (max === min) {
- h = 0;
- } else if (r === max) {
- h = (g - b) / delta;
- } else if (g === max) {
- h = 2 + (b - r) / delta;
- } else if (b === max) {
- h = 4 + (r - g) / delta;
- }
+ h = Math.min(h * 60, 360);
- h = Math.min(h * 60, 360);
+ if (h < 0) {
+ h += 360;
+ }
- if (h < 0) {
- h += 360;
- }
+ l = (min + max) / 2;
- v = max / 255 * 1000 / 10;
- return [h, s, v];
- };
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
- convert.rgb.hwb = function (rgb) {
- var r = rgb[0];
- var g = rgb[1];
- var b = rgb[2];
- var h = convert.rgb.hsl(rgb)[0];
- var w = 1 / 255 * Math.min(r, Math.min(g, b));
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
- return [h, w * 100, b * 100];
- };
+ return [h, s * 100, l * 100];
+ };
- convert.rgb.cmyk = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var c;
- var m;
- var y;
- var k;
- k = Math.min(1 - r, 1 - g, 1 - b);
- c = (1 - r - k) / (1 - k) || 0;
- m = (1 - g - k) / (1 - k) || 0;
- y = (1 - b - k) / (1 - k) || 0;
- return [c * 100, m * 100, y * 100, k * 100];
- };
- /**
- * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
- * */
+ convert.rgb.hsv = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var v;
+
+ if (max === 0) {
+ s = 0;
+ } else {
+ s = delta / max * 1000 / 10;
+ }
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
- function comparativeDistance(x, y) {
- return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
- }
+ h = Math.min(h * 60, 360);
- convert.rgb.keyword = function (rgb) {
- var reversed = reverseKeywords[rgb];
+ if (h < 0) {
+ h += 360;
+ }
- if (reversed) {
- return reversed;
- }
+ v = max / 255 * 1000 / 10;
+ return [h, s, v];
+ };
- var currentClosestDistance = Infinity;
- var currentClosestKeyword;
+ convert.rgb.hwb = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var h = convert.rgb.hsl(rgb)[0];
+ var w = 1 / 255 * Math.min(r, Math.min(g, b));
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+ return [h, w * 100, b * 100];
+ };
- for (var keyword in colorName) {
- if (colorName.hasOwnProperty(keyword)) {
- var value = colorName[keyword]; // Compute comparative distance
+ convert.rgb.cmyk = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var c;
+ var m;
+ var y;
+ var k;
+ k = Math.min(1 - r, 1 - g, 1 - b);
+ c = (1 - r - k) / (1 - k) || 0;
+ m = (1 - g - k) / (1 - k) || 0;
+ y = (1 - b - k) / (1 - k) || 0;
+ return [c * 100, m * 100, y * 100, k * 100];
+ };
+ /**
+ * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ * */
- var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
- if (distance < currentClosestDistance) {
- currentClosestDistance = distance;
- currentClosestKeyword = keyword;
- }
- }
+ function comparativeDistance(x, y) {
+ return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
}
- return currentClosestKeyword;
- };
+ convert.rgb.keyword = function (rgb) {
+ var reversed = reverseKeywords[rgb];
- convert.keyword.rgb = function (keyword) {
- return colorName[keyword];
- };
+ if (reversed) {
+ return reversed;
+ }
- convert.rgb.xyz = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255; // assume sRGB
-
- r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
- g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
- b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
- var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
- var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
- var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
- return [x * 100, y * 100, z * 100];
- };
+ var currentClosestDistance = Infinity;
+ var currentClosestKeyword;
- convert.rgb.lab = function (rgb) {
- var xyz = convert.rgb.xyz(rgb);
- var x = xyz[0];
- var y = xyz[1];
- var z = xyz[2];
- var l;
- var a;
- var b;
- x /= 95.047;
- y /= 100;
- z /= 108.883;
- x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
- y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
- z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
- l = 116 * y - 16;
- a = 500 * (x - y);
- b = 200 * (y - z);
- return [l, a, b];
- };
+ for (var keyword in colorName) {
+ if (colorName.hasOwnProperty(keyword)) {
+ var value = colorName[keyword]; // Compute comparative distance
- convert.hsl.rgb = function (hsl) {
- var h = hsl[0] / 360;
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var t1;
- var t2;
- var t3;
- var rgb;
- var val;
+ var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
- if (s === 0) {
- val = l * 255;
- return [val, val, val];
- }
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+ }
- if (l < 0.5) {
- t2 = l * (1 + s);
- } else {
- t2 = l + s - l * s;
- }
+ return currentClosestKeyword;
+ };
+
+ convert.keyword.rgb = function (keyword) {
+ return colorName[keyword];
+ };
- t1 = 2 * l - t2;
- rgb = [0, 0, 0];
+ convert.rgb.xyz = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255; // assume sRGB
+
+ r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
+ g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
+ b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
+ var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
+ var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
+ var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
+ return [x * 100, y * 100, z * 100];
+ };
- for (var i = 0; i < 3; i++) {
- t3 = h + 1 / 3 * -(i - 1);
+ convert.rgb.lab = function (rgb) {
+ var xyz = convert.rgb.xyz(rgb);
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
+ l = 116 * y - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+ return [l, a, b];
+ };
- if (t3 < 0) {
- t3++;
- }
+ convert.hsl.rgb = function (hsl) {
+ var h = hsl[0] / 360;
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var t1;
+ var t2;
+ var t3;
+ var rgb;
+ var val;
- if (t3 > 1) {
- t3--;
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
}
- if (6 * t3 < 1) {
- val = t1 + (t2 - t1) * 6 * t3;
- } else if (2 * t3 < 1) {
- val = t2;
- } else if (3 * t3 < 2) {
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ if (l < 0.5) {
+ t2 = l * (1 + s);
} else {
- val = t1;
+ t2 = l + s - l * s;
}
- rgb[i] = val * 255;
- }
+ t1 = 2 * l - t2;
+ rgb = [0, 0, 0];
- return rgb;
- };
+ for (var i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
- convert.hsl.hsv = function (hsl) {
- var h = hsl[0];
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var smin = s;
- var lmin = Math.max(l, 0.01);
- var sv;
- var v;
- l *= 2;
- s *= l <= 1 ? l : 2 - l;
- smin *= lmin <= 1 ? lmin : 2 - lmin;
- v = (l + s) / 2;
- sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
- return [h, sv * 100, v * 100];
- };
+ if (t3 < 0) {
+ t3++;
+ }
- convert.hsv.rgb = function (hsv) {
- var h = hsv[0] / 60;
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
- var hi = Math.floor(h) % 6;
- var f = h - Math.floor(h);
- var p = 255 * v * (1 - s);
- var q = 255 * v * (1 - s * f);
- var t = 255 * v * (1 - s * (1 - f));
- v *= 255;
+ if (t3 > 1) {
+ t3--;
+ }
- switch (hi) {
- case 0:
- return [v, t, p];
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
- case 1:
- return [q, v, p];
+ rgb[i] = val * 255;
+ }
- case 2:
- return [p, v, t];
+ return rgb;
+ };
- case 3:
- return [p, q, v];
+ convert.hsl.hsv = function (hsl) {
+ var h = hsl[0];
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var smin = s;
+ var lmin = Math.max(l, 0.01);
+ var sv;
+ var v;
+ l *= 2;
+ s *= l <= 1 ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ v = (l + s) / 2;
+ sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
+ return [h, sv * 100, v * 100];
+ };
- case 4:
- return [t, p, v];
+ convert.hsv.rgb = function (hsv) {
+ var h = hsv[0] / 60;
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var hi = Math.floor(h) % 6;
+ var f = h - Math.floor(h);
+ var p = 255 * v * (1 - s);
+ var q = 255 * v * (1 - s * f);
+ var t = 255 * v * (1 - s * (1 - f));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
- case 5:
- return [v, p, q];
- }
- };
+ case 1:
+ return [q, v, p];
- convert.hsv.hsl = function (hsv) {
- var h = hsv[0];
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
- var vmin = Math.max(v, 0.01);
- var lmin;
- var sl;
- var l;
- l = (2 - s) * v;
- lmin = (2 - s) * vmin;
- sl = s * vmin;
- sl /= lmin <= 1 ? lmin : 2 - lmin;
- sl = sl || 0;
- l /= 2;
- return [h, sl * 100, l * 100];
- }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
-
-
- convert.hwb.rgb = function (hwb) {
- var h = hwb[0] / 360;
- var wh = hwb[1] / 100;
- var bl = hwb[2] / 100;
- var ratio = wh + bl;
- var i;
- var v;
- var f;
- var n; // wh + bl cant be > 1
+ case 2:
+ return [p, v, t];
- if (ratio > 1) {
- wh /= ratio;
- bl /= ratio;
- }
+ case 3:
+ return [p, q, v];
- i = Math.floor(6 * h);
- v = 1 - bl;
- f = 6 * h - i;
+ case 4:
+ return [t, p, v];
- if ((i & 0x01) !== 0) {
- f = 1 - f;
- }
+ case 5:
+ return [v, p, q];
+ }
+ };
- n = wh + f * (v - wh); // linear interpolation
+ convert.hsv.hsl = function (hsv) {
+ var h = hsv[0];
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var vmin = Math.max(v, 0.01);
+ var lmin;
+ var sl;
+ var l;
+ l = (2 - s) * v;
+ lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+ return [h, sl * 100, l * 100];
+ }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+
+
+ convert.hwb.rgb = function (hwb) {
+ var h = hwb[0] / 360;
+ var wh = hwb[1] / 100;
+ var bl = hwb[2] / 100;
+ var ratio = wh + bl;
+ var i;
+ var v;
+ var f;
+ var n; // wh + bl cant be > 1
- var r;
- var g;
- var b;
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
- switch (i) {
- default:
- case 6:
- case 0:
- r = v;
- g = n;
- b = wh;
- break;
+ i = Math.floor(6 * h);
+ v = 1 - bl;
+ f = 6 * h - i;
- case 1:
- r = n;
- g = v;
- b = wh;
- break;
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
- case 2:
- r = wh;
- g = v;
- b = n;
- break;
+ n = wh + f * (v - wh); // linear interpolation
- case 3:
- r = wh;
- g = n;
- b = v;
- break;
+ var r;
+ var g;
+ var b;
- case 4:
- r = n;
- g = wh;
- b = v;
- break;
+ switch (i) {
+ default:
+ case 6:
+ case 0:
+ r = v;
+ g = n;
+ b = wh;
+ break;
- case 5:
- r = v;
- g = wh;
- b = n;
- break;
- }
+ case 1:
+ r = n;
+ g = v;
+ b = wh;
+ break;
- return [r * 255, g * 255, b * 255];
- };
+ case 2:
+ r = wh;
+ g = v;
+ b = n;
+ break;
- convert.cmyk.rgb = function (cmyk) {
- var c = cmyk[0] / 100;
- var m = cmyk[1] / 100;
- var y = cmyk[2] / 100;
- var k = cmyk[3] / 100;
- var r;
- var g;
- var b;
- r = 1 - Math.min(1, c * (1 - k) + k);
- g = 1 - Math.min(1, m * (1 - k) + k);
- b = 1 - Math.min(1, y * (1 - k) + k);
- return [r * 255, g * 255, b * 255];
- };
+ case 3:
+ r = wh;
+ g = n;
+ b = v;
+ break;
- convert.xyz.rgb = function (xyz) {
- var x = xyz[0] / 100;
- var y = xyz[1] / 100;
- var z = xyz[2] / 100;
- var r;
- var g;
- var b;
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
- b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB
-
- r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
- g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
- b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
- r = Math.min(Math.max(0, r), 1);
- g = Math.min(Math.max(0, g), 1);
- b = Math.min(Math.max(0, b), 1);
- return [r * 255, g * 255, b * 255];
- };
+ case 4:
+ r = n;
+ g = wh;
+ b = v;
+ break;
- convert.xyz.lab = function (xyz) {
- var x = xyz[0];
- var y = xyz[1];
- var z = xyz[2];
- var l;
- var a;
- var b;
- x /= 95.047;
- y /= 100;
- z /= 108.883;
- x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
- y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
- z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
- l = 116 * y - 16;
- a = 500 * (x - y);
- b = 200 * (y - z);
- return [l, a, b];
- };
+ case 5:
+ r = v;
+ g = wh;
+ b = n;
+ break;
+ }
- convert.lab.xyz = function (lab) {
- var l = lab[0];
- var a = lab[1];
- var b = lab[2];
- var x;
- var y;
- var z;
- y = (l + 16) / 116;
- x = a / 500 + y;
- z = y - b / 200;
- var y2 = Math.pow(y, 3);
- var x2 = Math.pow(x, 3);
- var z2 = Math.pow(z, 3);
- y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
- x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
- z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
- x *= 95.047;
- y *= 100;
- z *= 108.883;
- return [x, y, z];
- };
+ return [r * 255, g * 255, b * 255];
+ };
- convert.lab.lch = function (lab) {
- var l = lab[0];
- var a = lab[1];
- var b = lab[2];
- var hr;
- var h;
- var c;
- hr = Math.atan2(b, a);
- h = hr * 360 / 2 / Math.PI;
+ convert.cmyk.rgb = function (cmyk) {
+ var c = cmyk[0] / 100;
+ var m = cmyk[1] / 100;
+ var y = cmyk[2] / 100;
+ var k = cmyk[3] / 100;
+ var r;
+ var g;
+ var b;
+ r = 1 - Math.min(1, c * (1 - k) + k);
+ g = 1 - Math.min(1, m * (1 - k) + k);
+ b = 1 - Math.min(1, y * (1 - k) + k);
+ return [r * 255, g * 255, b * 255];
+ };
- if (h < 0) {
- h += 360;
- }
+ convert.xyz.rgb = function (xyz) {
+ var x = xyz[0] / 100;
+ var y = xyz[1] / 100;
+ var z = xyz[2] / 100;
+ var r;
+ var g;
+ var b;
+ r = x * 3.2406 + y * -1.5372 + z * -0.4986;
+ g = x * -0.9689 + y * 1.8758 + z * 0.0415;
+ b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB
+
+ r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
+ g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
+ b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+ return [r * 255, g * 255, b * 255];
+ };
- c = Math.sqrt(a * a + b * b);
- return [l, c, h];
- };
+ convert.xyz.lab = function (xyz) {
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
+ l = 116 * y - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+ return [l, a, b];
+ };
- convert.lch.lab = function (lch) {
- var l = lch[0];
- var c = lch[1];
- var h = lch[2];
- var a;
- var b;
- var hr;
- hr = h / 360 * 2 * Math.PI;
- a = c * Math.cos(hr);
- b = c * Math.sin(hr);
- return [l, a, b];
- };
+ convert.lab.xyz = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var x;
+ var y;
+ var z;
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+ var y2 = Math.pow(y, 3);
+ var x2 = Math.pow(x, 3);
+ var z2 = Math.pow(z, 3);
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+ return [x, y, z];
+ };
- convert.rgb.ansi16 = function (args) {
- var r = args[0];
- var g = args[1];
- var b = args[2];
- var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
+ convert.lab.lch = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var hr;
+ var h;
+ var c;
+ hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
- value = Math.round(value / 50);
+ if (h < 0) {
+ h += 360;
+ }
- if (value === 0) {
- return 30;
- }
+ c = Math.sqrt(a * a + b * b);
+ return [l, c, h];
+ };
- var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
+ convert.lch.lab = function (lch) {
+ var l = lch[0];
+ var c = lch[1];
+ var h = lch[2];
+ var a;
+ var b;
+ var hr;
+ hr = h / 360 * 2 * Math.PI;
+ a = c * Math.cos(hr);
+ b = c * Math.sin(hr);
+ return [l, a, b];
+ };
- if (value === 2) {
- ansi += 60;
- }
+ convert.rgb.ansi16 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+ var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
- return ansi;
- };
+ value = Math.round(value / 50);
- convert.hsv.ansi16 = function (args) {
- // optimization here; we already know the value and don't need to get
- // it converted for us.
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
- };
+ if (value === 0) {
+ return 30;
+ }
- convert.rgb.ansi256 = function (args) {
- var r = args[0];
- var g = args[1];
- var b = args[2]; // we use the extended greyscale palette here, with the exception of
- // black and white. normal palette only has 4 greyscale shades.
+ var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
- if (r === g && g === b) {
- if (r < 8) {
- return 16;
+ if (value === 2) {
+ ansi += 60;
}
- if (r > 248) {
- return 231;
- }
+ return ansi;
+ };
- return Math.round((r - 8) / 247 * 24) + 232;
- }
+ convert.hsv.ansi16 = function (args) {
+ // optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+ };
- var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
- return ansi;
- };
+ convert.rgb.ansi256 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2]; // we use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
- convert.ansi16.rgb = function (args) {
- var color = args % 10; // handle greyscale
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
- if (color === 0 || color === 7) {
- if (args > 50) {
- color += 3.5;
+ return Math.round((r - 8) / 247 * 24) + 232;
}
- color = color / 10.5 * 255;
- return [color, color, color];
- }
+ var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
+ return ansi;
+ };
- var mult = (~~(args > 50) + 1) * 0.5;
- var r = (color & 1) * mult * 255;
- var g = (color >> 1 & 1) * mult * 255;
- var b = (color >> 2 & 1) * mult * 255;
- return [r, g, b];
- };
+ convert.ansi16.rgb = function (args) {
+ var color = args % 10; // handle greyscale
- convert.ansi256.rgb = function (args) {
- // handle greyscale
- if (args >= 232) {
- var c = (args - 232) * 10 + 8;
- return [c, c, c];
- }
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
- args -= 16;
- var rem;
- var r = Math.floor(args / 36) / 5 * 255;
- var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
- var b = rem % 6 / 5 * 255;
- return [r, g, b];
- };
+ color = color / 10.5 * 255;
+ return [color, color, color];
+ }
- convert.rgb.hex = function (args) {
- var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
- var string = integer.toString(16).toUpperCase();
- return '000000'.substring(string.length) + string;
- };
+ var mult = (~~(args > 50) + 1) * 0.5;
+ var r = (color & 1) * mult * 255;
+ var g = (color >> 1 & 1) * mult * 255;
+ var b = (color >> 2 & 1) * mult * 255;
+ return [r, g, b];
+ };
- convert.hex.rgb = function (args) {
- var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ convert.ansi256.rgb = function (args) {
+ // handle greyscale
+ if (args >= 232) {
+ var c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
- if (!match) {
- return [0, 0, 0];
- }
+ args -= 16;
+ var rem;
+ var r = Math.floor(args / 36) / 5 * 255;
+ var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ var b = rem % 6 / 5 * 255;
+ return [r, g, b];
+ };
- var colorString = match[0];
+ convert.rgb.hex = function (args) {
+ var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+ };
- if (match[0].length === 3) {
- colorString = colorString.split('').map(function (char) {
- return char + char;
- }).join('');
- }
+ convert.hex.rgb = function (args) {
+ var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
- var integer = parseInt(colorString, 16);
- var r = integer >> 16 & 0xFF;
- var g = integer >> 8 & 0xFF;
- var b = integer & 0xFF;
- return [r, g, b];
- };
+ if (!match) {
+ return [0, 0, 0];
+ }
- convert.rgb.hcg = function (rgb) {
- var r = rgb[0] / 255;
- var g = rgb[1] / 255;
- var b = rgb[2] / 255;
- var max = Math.max(Math.max(r, g), b);
- var min = Math.min(Math.min(r, g), b);
- var chroma = max - min;
- var grayscale;
- var hue;
-
- if (chroma < 1) {
- grayscale = min / (1 - chroma);
- } else {
- grayscale = 0;
- }
+ var colorString = match[0];
- if (chroma <= 0) {
- hue = 0;
- } else if (max === r) {
- hue = (g - b) / chroma % 6;
- } else if (max === g) {
- hue = 2 + (b - r) / chroma;
- } else {
- hue = 4 + (r - g) / chroma + 4;
- }
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(function (char) {
+ return char + char;
+ }).join('');
+ }
- hue /= 6;
- hue %= 1;
- return [hue * 360, chroma * 100, grayscale * 100];
- };
+ var integer = parseInt(colorString, 16);
+ var r = integer >> 16 & 0xFF;
+ var g = integer >> 8 & 0xFF;
+ var b = integer & 0xFF;
+ return [r, g, b];
+ };
- convert.hsl.hcg = function (hsl) {
- var s = hsl[1] / 100;
- var l = hsl[2] / 100;
- var c = 1;
- var f = 0;
+ convert.rgb.hcg = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var max = Math.max(Math.max(r, g), b);
+ var min = Math.min(Math.min(r, g), b);
+ var chroma = max - min;
+ var grayscale;
+ var hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
- if (l < 0.5) {
- c = 2.0 * s * l;
- } else {
- c = 2.0 * s * (1.0 - l);
- }
+ if (chroma <= 0) {
+ hue = 0;
+ } else if (max === r) {
+ hue = (g - b) / chroma % 6;
+ } else if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma + 4;
+ }
- if (c < 1.0) {
- f = (l - 0.5 * c) / (1.0 - c);
- }
+ hue /= 6;
+ hue %= 1;
+ return [hue * 360, chroma * 100, grayscale * 100];
+ };
- return [hsl[0], c * 100, f * 100];
- };
+ convert.hsl.hcg = function (hsl) {
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var c = 1;
+ var f = 0;
- convert.hsv.hcg = function (hsv) {
- var s = hsv[1] / 100;
- var v = hsv[2] / 100;
- var c = s * v;
- var f = 0;
+ if (l < 0.5) {
+ c = 2.0 * s * l;
+ } else {
+ c = 2.0 * s * (1.0 - l);
+ }
- if (c < 1.0) {
- f = (v - c) / (1 - c);
- }
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
- return [hsv[0], c * 100, f * 100];
- };
+ return [hsl[0], c * 100, f * 100];
+ };
- convert.hcg.rgb = function (hcg) {
- var h = hcg[0] / 360;
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
+ convert.hsv.hcg = function (hsv) {
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var c = s * v;
+ var f = 0;
- if (c === 0.0) {
- return [g * 255, g * 255, g * 255];
- }
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
- var pure = [0, 0, 0];
- var hi = h % 1 * 6;
- var v = hi % 1;
- var w = 1 - v;
- var mg = 0;
+ return [hsv[0], c * 100, f * 100];
+ };
- switch (Math.floor(hi)) {
- case 0:
- pure[0] = 1;
- pure[1] = v;
- pure[2] = 0;
- break;
+ convert.hcg.rgb = function (hcg) {
+ var h = hcg[0] / 360;
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
- case 1:
- pure[0] = w;
- pure[1] = 1;
- pure[2] = 0;
- break;
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
- case 2:
- pure[0] = 0;
- pure[1] = 1;
- pure[2] = v;
- break;
+ var pure = [0, 0, 0];
+ var hi = h % 1 * 6;
+ var v = hi % 1;
+ var w = 1 - v;
+ var mg = 0;
- case 3:
- pure[0] = 0;
- pure[1] = w;
- pure[2] = 1;
- break;
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1;
+ pure[1] = v;
+ pure[2] = 0;
+ break;
- case 4:
- pure[0] = v;
- pure[1] = 0;
- pure[2] = 1;
- break;
+ case 1:
+ pure[0] = w;
+ pure[1] = 1;
+ pure[2] = 0;
+ break;
- default:
- pure[0] = 1;
- pure[1] = 0;
- pure[2] = w;
- }
+ case 2:
+ pure[0] = 0;
+ pure[1] = 1;
+ pure[2] = v;
+ break;
- mg = (1.0 - c) * g;
- return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
- };
+ case 3:
+ pure[0] = 0;
+ pure[1] = w;
+ pure[2] = 1;
+ break;
- convert.hcg.hsv = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
- var v = c + g * (1.0 - c);
- var f = 0;
+ case 4:
+ pure[0] = v;
+ pure[1] = 0;
+ pure[2] = 1;
+ break;
- if (v > 0.0) {
- f = c / v;
- }
+ default:
+ pure[0] = 1;
+ pure[1] = 0;
+ pure[2] = w;
+ }
- return [hcg[0], f * 100, v * 100];
- };
+ mg = (1.0 - c) * g;
+ return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
+ };
- convert.hcg.hsl = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
- var l = g * (1.0 - c) + 0.5 * c;
- var s = 0;
+ convert.hcg.hsv = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var v = c + g * (1.0 - c);
+ var f = 0;
- if (l > 0.0 && l < 0.5) {
- s = c / (2 * l);
- } else if (l >= 0.5 && l < 1.0) {
- s = c / (2 * (1 - l));
- }
+ if (v > 0.0) {
+ f = c / v;
+ }
- return [hcg[0], s * 100, l * 100];
- };
+ return [hcg[0], f * 100, v * 100];
+ };
- convert.hcg.hwb = function (hcg) {
- var c = hcg[1] / 100;
- var g = hcg[2] / 100;
- var v = c + g * (1.0 - c);
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
- };
+ convert.hcg.hsl = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var l = g * (1.0 - c) + 0.5 * c;
+ var s = 0;
- convert.hwb.hcg = function (hwb) {
- var w = hwb[1] / 100;
- var b = hwb[2] / 100;
- var v = 1 - b;
- var c = v - w;
- var g = 0;
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
- if (c < 1) {
- g = (v - c) / (1 - c);
- }
+ return [hcg[0], s * 100, l * 100];
+ };
- return [hwb[0], c * 100, g * 100];
- };
+ convert.hcg.hwb = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+ };
- convert.apple.rgb = function (apple) {
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
- };
+ convert.hwb.hcg = function (hwb) {
+ var w = hwb[1] / 100;
+ var b = hwb[2] / 100;
+ var v = 1 - b;
+ var c = v - w;
+ var g = 0;
- convert.rgb.apple = function (rgb) {
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
- };
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
- convert.gray.rgb = function (args) {
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
- };
+ return [hwb[0], c * 100, g * 100];
+ };
- convert.gray.hsl = convert.gray.hsv = function (args) {
- return [0, 0, args[0]];
- };
+ convert.apple.rgb = function (apple) {
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
+ };
- convert.gray.hwb = function (gray) {
- return [0, 100, gray[0]];
- };
+ convert.rgb.apple = function (rgb) {
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
+ };
- convert.gray.cmyk = function (gray) {
- return [0, 0, 0, gray[0]];
- };
+ convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+ };
- convert.gray.lab = function (gray) {
- return [gray[0], 0, 0];
- };
+ convert.gray.hsl = convert.gray.hsv = function (args) {
+ return [0, 0, args[0]];
+ };
- convert.gray.hex = function (gray) {
- var val = Math.round(gray[0] / 100 * 255) & 0xFF;
- var integer = (val << 16) + (val << 8) + val;
- var string = integer.toString(16).toUpperCase();
- return '000000'.substring(string.length) + string;
- };
+ convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+ };
- convert.rgb.gray = function (rgb) {
- var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
- return [val / 255 * 100];
- };
-});
+ convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+ };
-/*
- this function routes a model to all other models.
+ convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+ };
- all functions that are routed have a property `.conversion` attached
- to the returned synthetic function. This property is an array
- of strings, each with the steps in between the 'from' and 'to'
- color models (inclusive).
+ convert.gray.hex = function (gray) {
+ var val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ var integer = (val << 16) + (val << 8) + val;
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+ };
- conversions that are not possible simply are not included.
-*/
-// https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ convert.rgb.gray = function (rgb) {
+ var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+ };
+ });
+ var conversions_1 = conversions.rgb;
+ var conversions_2 = conversions.hsl;
+ var conversions_3 = conversions.hsv;
+ var conversions_4 = conversions.hwb;
+ var conversions_5 = conversions.cmyk;
+ var conversions_6 = conversions.xyz;
+ var conversions_7 = conversions.lab;
+ var conversions_8 = conversions.lch;
+ var conversions_9 = conversions.hex;
+ var conversions_10 = conversions.keyword;
+ var conversions_11 = conversions.ansi16;
+ var conversions_12 = conversions.ansi256;
+ var conversions_13 = conversions.hcg;
+ var conversions_14 = conversions.apple;
+ var conversions_15 = conversions.gray;
-var models$1 = Object.keys(conversions);
+ /*
+ this function routes a model to all other models.
-function buildGraph() {
- var graph = {};
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
- for (var len = models$1.length, i = 0; i < len; i++) {
- graph[models$1[i]] = {
- // http://jsperf.com/1-vs-infinity
- // micro-opt, but this is simple.
- distance: -1,
- parent: null
- };
- }
+ conversions that are not possible simply are not included.
+ */
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
- return graph;
-} // https://en.wikipedia.org/wiki/Breadth-first_search
+ var models = Object.keys(conversions);
+ function buildGraph() {
+ var graph = {};
-function deriveBFS(fromModel) {
- var graph = buildGraph();
- var queue = [fromModel]; // unshift -> queue -> pop
+ for (var len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+ } // https://en.wikipedia.org/wiki/Breadth-first_search
+
+
+ function deriveBFS(fromModel) {
+ var graph = buildGraph();
+ var queue = [fromModel]; // unshift -> queue -> pop
- graph[fromModel].distance = 0;
+ graph[fromModel].distance = 0;
- while (queue.length) {
- var current = queue.pop();
- var adjacents = Object.keys(conversions[current]);
+ while (queue.length) {
+ var current = queue.pop();
+ var adjacents = Object.keys(conversions[current]);
- for (var len = adjacents.length, i = 0; i < len; i++) {
- var adjacent = adjacents[i];
- var node = graph[adjacent];
+ for (var len = adjacents.length, i = 0; i < len; i++) {
+ var adjacent = adjacents[i];
+ var node = graph[adjacent];
- if (node.distance === -1) {
- node.distance = graph[current].distance + 1;
- node.parent = current;
- queue.unshift(adjacent);
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
}
}
+
+ return graph;
}
- return graph;
-}
+ function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+ }
-function link(from, to) {
- return function (args) {
- return to(from(args));
- };
-}
+ function wrapConversion(toModel, graph) {
+ var path = [graph[toModel].parent, toModel];
+ var fn = conversions[graph[toModel].parent][toModel];
+ var cur = graph[toModel].parent;
-function wrapConversion(toModel, graph) {
- var path = [graph[toModel].parent, toModel];
- var fn = conversions[graph[toModel].parent][toModel];
- var cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
- while (graph[cur].parent) {
- path.unshift(graph[cur].parent);
- fn = link(conversions[graph[cur].parent][cur], fn);
- cur = graph[cur].parent;
+ fn.conversion = path;
+ return fn;
}
- fn.conversion = path;
- return fn;
-}
+ var route = function route(fromModel) {
+ var graph = deriveBFS(fromModel);
+ var conversion = {};
+ var models = Object.keys(graph);
-var route = function route(fromModel) {
- var graph = deriveBFS(fromModel);
- var conversion = {};
- var models = Object.keys(graph);
+ for (var len = models.length, i = 0; i < len; i++) {
+ var toModel = models[i];
+ var node = graph[toModel];
- for (var len = models.length, i = 0; i < len; i++) {
- var toModel = models[i];
- var node = graph[toModel];
+ if (node.parent === null) {
+ // no possible conversion, or this node is the source model.
+ continue;
+ }
- if (node.parent === null) {
- // no possible conversion, or this node is the source model.
- continue;
+ conversion[toModel] = wrapConversion(toModel, graph);
}
- conversion[toModel] = wrapConversion(toModel, graph);
- }
+ return conversion;
+ };
- return conversion;
-};
+ var convert = {};
+ var models$1 = Object.keys(conversions);
-var convert = {};
-var models = Object.keys(conversions);
+ function wrapRaw(fn) {
+ var wrappedFn = function wrappedFn(args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
-function wrapRaw(fn) {
- var wrappedFn = function wrappedFn(args) {
- if (args === undefined || args === null) {
- return args;
- }
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
- if (arguments.length > 1) {
- args = Array.prototype.slice.call(arguments);
- }
+ return fn(args);
+ }; // preserve .conversion property if there is one
- return fn(args);
- }; // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
- if ('conversion' in fn) {
- wrappedFn.conversion = fn.conversion;
+ return wrappedFn;
}
- return wrappedFn;
-}
-
-function wrapRounded(fn) {
- var wrappedFn = function wrappedFn(args) {
- if (args === undefined || args === null) {
- return args;
- }
+ function wrapRounded(fn) {
+ var wrappedFn = function wrappedFn(args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
- if (arguments.length > 1) {
- args = Array.prototype.slice.call(arguments);
- }
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
- var result = fn(args); // we're assuming the result is an array here.
- // see notice in conversions.js; don't use box types
- // in conversion functions.
+ var result = fn(args); // we're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
- if (_typeof(result) === 'object') {
- for (var len = result.length, i = 0; i < len; i++) {
- result[i] = Math.round(result[i]);
+ if (_typeof(result) === 'object') {
+ for (var len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
}
- }
- return result;
- }; // preserve .conversion property if there is one
+ return result;
+ }; // preserve .conversion property if there is one
- if ('conversion' in fn) {
- wrappedFn.conversion = fn.conversion;
- }
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
- return wrappedFn;
-}
+ return wrappedFn;
+ }
-models.forEach(function (fromModel) {
- convert[fromModel] = {};
- Object.defineProperty(convert[fromModel], 'channels', {
- value: conversions[fromModel].channels
- });
- Object.defineProperty(convert[fromModel], 'labels', {
- value: conversions[fromModel].labels
- });
- var routes = route(fromModel);
- var routeModels = Object.keys(routes);
- routeModels.forEach(function (toModel) {
- var fn = routes[toModel];
- convert[fromModel][toModel] = wrapRounded(fn);
- convert[fromModel][toModel].raw = wrapRaw(fn);
+ models$1.forEach(function (fromModel) {
+ convert[fromModel] = {};
+ Object.defineProperty(convert[fromModel], 'channels', {
+ value: conversions[fromModel].channels
+ });
+ Object.defineProperty(convert[fromModel], 'labels', {
+ value: conversions[fromModel].labels
+ });
+ var routes = route(fromModel);
+ var routeModels = Object.keys(routes);
+ routeModels.forEach(function (toModel) {
+ var fn = routes[toModel];
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
});
-});
-var colorConvert = convert;
+ var colorConvert = convert;
-var ansiStyles = createCommonjsModule(function (module) {
- 'use strict';
+ var ansiStyles = createCommonjsModule(function (module) {
- var wrapAnsi16 = function wrapAnsi16(fn, offset) {
- return function () {
- var code = fn.apply(colorConvert, arguments);
- return "\x1B[".concat(code + offset, "m");
+ var wrapAnsi16 = function wrapAnsi16(fn, offset) {
+ return function () {
+ var code = fn.apply(colorConvert, arguments);
+ return "\x1B[".concat(code + offset, "m");
+ };
};
- };
- var wrapAnsi256 = function wrapAnsi256(fn, offset) {
- return function () {
- var code = fn.apply(colorConvert, arguments);
- return "\x1B[".concat(38 + offset, ";5;").concat(code, "m");
+ var wrapAnsi256 = function wrapAnsi256(fn, offset) {
+ return function () {
+ var code = fn.apply(colorConvert, arguments);
+ return "\x1B[".concat(38 + offset, ";5;").concat(code, "m");
+ };
};
- };
- var wrapAnsi16m = function wrapAnsi16m(fn, offset) {
- return function () {
- var rgb = fn.apply(colorConvert, arguments);
- return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m");
+ var wrapAnsi16m = function wrapAnsi16m(fn, offset) {
+ return function () {
+ var rgb = fn.apply(colorConvert, arguments);
+ return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m");
+ };
};
- };
-
- function assembleStyles() {
- var codes = new Map();
- var styles = {
- modifier: {
- reset: [0, 0],
- // 21 isn't widely supported and 22 does the same thing
- bold: [1, 22],
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29]
- },
- color: {
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39],
- // Bright color
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39]
- },
- bgColor: {
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
- // Bright color
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }
- }; // Fix humans
-
- styles.color.grey = styles.color.gray;
-
- var _arr = Object.keys(styles);
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var groupName = _arr[_i];
- var group = styles[groupName];
-
- var _arr3 = Object.keys(group);
-
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var styleName = _arr3[_i3];
- var style = group[styleName];
- styles[styleName] = {
- open: "\x1B[".concat(style[0], "m"),
- close: "\x1B[".concat(style[1], "m")
- };
- group[styleName] = styles[styleName];
- codes.set(style[0], style[1]);
- }
- Object.defineProperty(styles, groupName, {
- value: group,
- enumerable: false
- });
- Object.defineProperty(styles, 'codes', {
- value: codes,
- enumerable: false
- });
- }
+ function assembleStyles() {
+ var codes = new Map();
+ var styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39],
+ // Bright color
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ }; // Fix humans
+
+ styles.color.grey = styles.color.gray;
+
+ for (var _i = 0, _Object$keys = Object.keys(styles); _i < _Object$keys.length; _i++) {
+ var groupName = _Object$keys[_i];
+ var group = styles[groupName];
+
+ for (var _i3 = 0, _Object$keys3 = Object.keys(group); _i3 < _Object$keys3.length; _i3++) {
+ var styleName = _Object$keys3[_i3];
+ var style = group[styleName];
+ styles[styleName] = {
+ open: "\x1B[".concat(style[0], "m"),
+ close: "\x1B[".concat(style[1], "m")
+ };
+ group[styleName] = styles[styleName];
+ codes.set(style[0], style[1]);
+ }
- var ansi2ansi = function ansi2ansi(n) {
- return n;
- };
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false
+ });
+ }
- var rgb2rgb = function rgb2rgb(r, g, b) {
- return [r, g, b];
- };
+ var ansi2ansi = function ansi2ansi(n) {
+ return n;
+ };
- styles.color.close = "\x1B[39m";
- styles.bgColor.close = "\x1B[49m";
- styles.color.ansi = {
- ansi: wrapAnsi16(ansi2ansi, 0)
- };
- styles.color.ansi256 = {
- ansi256: wrapAnsi256(ansi2ansi, 0)
- };
- styles.color.ansi16m = {
- rgb: wrapAnsi16m(rgb2rgb, 0)
- };
- styles.bgColor.ansi = {
- ansi: wrapAnsi16(ansi2ansi, 10)
- };
- styles.bgColor.ansi256 = {
- ansi256: wrapAnsi256(ansi2ansi, 10)
- };
- styles.bgColor.ansi16m = {
- rgb: wrapAnsi16m(rgb2rgb, 10)
- };
+ var rgb2rgb = function rgb2rgb(r, g, b) {
+ return [r, g, b];
+ };
- var _arr2 = Object.keys(colorConvert);
+ styles.color.close = "\x1B[39m";
+ styles.bgColor.close = "\x1B[49m";
+ styles.color.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 0)
+ };
+ styles.color.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 0)
+ };
+ styles.color.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 0)
+ };
+ styles.bgColor.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 10)
+ };
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var key = _arr2[_i2];
+ for (var _i2 = 0, _Object$keys2 = Object.keys(colorConvert); _i2 < _Object$keys2.length; _i2++) {
+ var key = _Object$keys2[_i2];
- if (_typeof(colorConvert[key]) !== 'object') {
- continue;
- }
+ if (_typeof(colorConvert[key]) !== 'object') {
+ continue;
+ }
- var suite = colorConvert[key];
+ var suite = colorConvert[key];
- if (key === 'ansi16') {
- key = 'ansi';
- }
+ if (key === 'ansi16') {
+ key = 'ansi';
+ }
- if ('ansi16' in suite) {
- styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
- styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
- }
+ if ('ansi16' in suite) {
+ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
+ styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
+ }
- if ('ansi256' in suite) {
- styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
- styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
- }
+ if ('ansi256' in suite) {
+ styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
+ styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
+ }
- if ('rgb' in suite) {
- styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
- styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+ if ('rgb' in suite) {
+ styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
+ styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+ }
}
- }
- return styles;
- } // Make the export immutable
+ return styles;
+ } // Make the export immutable
- Object.defineProperty(module, 'exports', {
- enumerable: true,
- get: assembleStyles
+ Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+ });
});
-});
-
-var os = {
- EOL: "\n"
-};
-
-var os$1 = Object.freeze({
- default: os
-});
-var hasFlag = createCommonjsModule(function (module) {
- 'use strict';
+ var require$$0$1 = {
+ EOL: "\n"
+ };
- module.exports = function (flag, argv$$1) {
- argv$$1 = argv$$1 || process.argv;
+ var hasFlag = function hasFlag(flag, argv) {
+ argv = argv || process.argv;
var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
- var pos = argv$$1.indexOf(prefix + flag);
- var terminatorPos = argv$$1.indexOf('--');
+ var pos = argv.indexOf(prefix + flag);
+ var terminatorPos = argv.indexOf('--');
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
};
-});
-var require$$1$1 = ( os$1 && os ) || os$1;
+ var env$1 = process.env;
+ var forceColor;
-var env$1 = process.env;
-var forceColor;
+ if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
+ forceColor = false;
+ } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
+ forceColor = true;
+ }
-if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
- forceColor = false;
-} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
- forceColor = true;
-}
+ if ('FORCE_COLOR' in env$1) {
+ forceColor = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0;
+ }
-if ('FORCE_COLOR' in env$1) {
- forceColor = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0;
-}
+ function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
-function translateLevel(level) {
- if (level === 0) {
- return false;
+ return {
+ level: level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
}
- return {
- level: level,
- hasBasic: true,
- has256: level >= 2,
- has16m: level >= 3
- };
-}
+ function supportsColor(stream) {
+ if (forceColor === false) {
+ return 0;
+ }
-function supportsColor(stream) {
- if (forceColor === false) {
- return 0;
- }
+ if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
+ return 3;
+ }
- if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
- return 3;
- }
+ if (hasFlag('color=256')) {
+ return 2;
+ }
- if (hasFlag('color=256')) {
- return 2;
- }
+ if (stream && !stream.isTTY && forceColor !== true) {
+ return 0;
+ }
- if (stream && !stream.isTTY && forceColor !== true) {
- return 0;
- }
+ var min = forceColor ? 1 : 0;
- var min = forceColor ? 1 : 0;
+ if (process.platform === 'win32') {
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
+ // libuv that enables 256 color output on Windows. Anything earlier and it
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
+ // that supports 16m/TrueColor.
+ var osRelease = require$$0$1.release().split('.');
- if (process.platform === 'win32') {
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
- // libuv that enables 256 color output on Windows. Anything earlier and it
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
- // release that supports 256 colors. Windows 10 build 14931 is the first release
- // that supports 16m/TrueColor.
- var osRelease = require$$1$1.release().split('.');
+ if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
- if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ return 1;
}
- return 1;
- }
+ if ('CI' in env$1) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) {
+ return sign in env$1;
+ }) || env$1.CI_NAME === 'codeship') {
+ return 1;
+ }
- if ('CI' in env$1) {
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) {
- return sign in env$1;
- }) || env$1.CI_NAME === 'codeship') {
- return 1;
+ return min;
}
- return min;
- }
+ if ('TEAMCITY_VERSION' in env$1) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
+ }
- if ('TEAMCITY_VERSION' in env$1) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
- }
+ if (env$1.COLORTERM === 'truecolor') {
+ return 3;
+ }
- if (env$1.COLORTERM === 'truecolor') {
- return 3;
- }
+ if ('TERM_PROGRAM' in env$1) {
+ var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
- if ('TERM_PROGRAM' in env$1) {
- var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+ switch (env$1.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
- switch (env$1.TERM_PROGRAM) {
- case 'iTerm.app':
- return version >= 3 ? 3 : 2;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
- case 'Apple_Terminal':
- return 2;
- // No default
+ if (/-256(color)?$/i.test(env$1.TERM)) {
+ return 2;
}
- }
- if (/-256(color)?$/i.test(env$1.TERM)) {
- return 2;
- }
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
+ return 1;
+ }
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
- return 1;
- }
+ if ('COLORTERM' in env$1) {
+ return 1;
+ }
- if ('COLORTERM' in env$1) {
- return 1;
- }
+ if (env$1.TERM === 'dumb') {
+ return min;
+ }
- if (env$1.TERM === 'dumb') {
return min;
}
- return min;
-}
-
-function getSupportLevel(stream) {
- var level = supportsColor(stream);
- return translateLevel(level);
-}
-
-var supportsColor_1 = {
- supportsColor: getSupportLevel,
- stdout: getSupportLevel(process.stdout),
- stderr: getSupportLevel(process.stderr)
-};
+ function getSupportLevel(stream) {
+ var level = supportsColor(stream);
+ return translateLevel(level);
+ }
-var templates = createCommonjsModule(function (module) {
- 'use strict';
+ var supportsColor_1 = {
+ supportsColor: getSupportLevel,
+ stdout: getSupportLevel(process.stdout),
+ stderr: getSupportLevel(process.stderr)
+ };
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
@@ -8706,10 +8843,8 @@ var templates = createCommonjsModule(function (module) {
var current = chalk;
- var _arr = Object.keys(enabled);
-
- for (var _i = 0; _i < _arr.length; _i++) {
- var styleName = _arr[_i];
+ for (var _i = 0, _Object$keys = Object.keys(enabled); _i < _Object$keys.length; _i++) {
+ var styleName = _Object$keys[_i];
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
@@ -8727,7 +8862,7 @@ var templates = createCommonjsModule(function (module) {
return current;
}
- module.exports = function (chalk, tmp) {
+ var templates = function templates(chalk, tmp) {
var styles = [];
var chunks = [];
var chunk = []; // eslint-disable-next-line max-params
@@ -8764,1856 +8899,1909 @@ var templates = createCommonjsModule(function (module) {
return chunks.join('');
};
-});
-var chalk = createCommonjsModule(function (module) {
- 'use strict';
+ var chalk = createCommonjsModule(function (module) {
- var stdoutColor = supportsColor_1.stdout;
- var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping
+ var stdoutColor = supportsColor_1.stdout;
+ var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping
- var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such
+ var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such
- var skipModels = new Set(['gray']);
- var styles = Object.create(null);
+ var skipModels = new Set(['gray']);
+ var styles = Object.create(null);
- function applyOptions(obj, options) {
- options = options || {}; // Detect level if not set manually
-
- var scLevel = stdoutColor ? stdoutColor.level : 0;
- obj.level = options.level === undefined ? scLevel : options.level;
- obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
- }
-
- function Chalk(options) {
- // We check for this.template here since calling `chalk.constructor()`
- // by itself will have a `this` of a previously constructed chalk object
- if (!this || !(this instanceof Chalk) || this.template) {
- var _chalk = {};
- applyOptions(_chalk, options);
-
- _chalk.template = function () {
- var args = [].slice.call(arguments);
- return chalkTag.apply(null, [_chalk.template].concat(args));
- };
+ function applyOptions(obj, options) {
+ options = options || {}; // Detect level if not set manually
- Object.setPrototypeOf(_chalk, Chalk.prototype);
- Object.setPrototypeOf(_chalk.template, _chalk);
- _chalk.template.constructor = Chalk;
- return _chalk.template;
+ var scLevel = stdoutColor ? stdoutColor.level : 0;
+ obj.level = options.level === undefined ? scLevel : options.level;
+ obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
- applyOptions(this, options);
- } // Use bright blue on Windows as the normal blue color is illegible
+ function Chalk(options) {
+ // We check for this.template here since calling `chalk.constructor()`
+ // by itself will have a `this` of a previously constructed chalk object
+ if (!this || !(this instanceof Chalk) || this.template) {
+ var _chalk = {};
+ applyOptions(_chalk, options);
+ _chalk.template = function () {
+ var args = [].slice.call(arguments);
+ return chalkTag.apply(null, [_chalk.template].concat(args));
+ };
- if (isSimpleWindowsTerm) {
- ansiStyles.blue.open = "\x1B[94m";
- }
-
- var _arr = Object.keys(ansiStyles);
-
- var _loop = function _loop() {
- var key = _arr[_i];
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
- styles[key] = {
- get: function get() {
- var codes = ansiStyles[key];
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ Object.setPrototypeOf(_chalk, Chalk.prototype);
+ Object.setPrototypeOf(_chalk.template, _chalk);
+ _chalk.template.constructor = Chalk;
+ return _chalk.template;
}
- };
- };
- for (var _i = 0; _i < _arr.length; _i++) {
- _loop();
- }
+ applyOptions(this, options);
+ } // Use bright blue on Windows as the normal blue color is illegible
- styles.visible = {
- get: function get() {
- return build.call(this, this._styles || [], true, 'visible');
- }
- };
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
- var _arr2 = Object.keys(ansiStyles.color.ansi);
+ if (isSimpleWindowsTerm) {
+ ansiStyles.blue.open = "\x1B[94m";
+ }
- var _loop2 = function _loop2() {
- var model = _arr2[_i2];
+ var _loop = function _loop() {
+ var key = _Object$keys[_i];
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+ styles[key] = {
+ get: function get() {
+ var codes = ansiStyles[key];
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ }
+ };
+ };
- if (skipModels.has(model)) {
- return "continue";
+ for (var _i = 0, _Object$keys = Object.keys(ansiStyles); _i < _Object$keys.length; _i++) {
+ _loop();
}
- styles[model] = {
+ styles.visible = {
get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.color.close,
- closeRe: ansiStyles.color.closeRe
- };
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
- };
+ return build.call(this, this._styles || [], true, 'visible');
}
};
- };
-
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var _ret = _loop2();
+ ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
- if (_ret === "continue") continue;
- }
+ var _loop2 = function _loop2() {
+ var model = _Object$keys2[_i2];
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
+ if (skipModels.has(model)) {
+ return "continue";
+ }
- var _arr3 = Object.keys(ansiStyles.bgColor.ansi);
+ styles[model] = {
+ get: function get() {
+ var level = this.level;
+ return function () {
+ var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
+ var codes = {
+ open: open,
+ close: ansiStyles.color.close,
+ closeRe: ansiStyles.color.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+ };
- var _loop3 = function _loop3() {
- var model = _arr3[_i3];
+ for (var _i2 = 0, _Object$keys2 = Object.keys(ansiStyles.color.ansi); _i2 < _Object$keys2.length; _i2++) {
+ var _ret = _loop2();
- if (skipModels.has(model)) {
- return "continue";
+ if (_ret === "continue") continue;
}
- var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
- styles[bgModel] = {
- get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.bgColor.close,
- closeRe: ansiStyles.bgColor.closeRe
- };
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
- };
- }
- };
- };
+ ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var _ret2 = _loop3();
+ var _loop3 = function _loop3() {
+ var model = _Object$keys3[_i3];
- if (_ret2 === "continue") continue;
- }
-
- var proto = Object.defineProperties(function () {}, styles);
+ if (skipModels.has(model)) {
+ return "continue";
+ }
- function build(_styles, _empty, key) {
- var builder = function builder() {
- return applyStyle.apply(builder, arguments);
+ var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get: function get() {
+ var level = this.level;
+ return function () {
+ var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
+ var codes = {
+ open: open,
+ close: ansiStyles.bgColor.close,
+ closeRe: ansiStyles.bgColor.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
};
- builder._styles = _styles;
- builder._empty = _empty;
- var self = this;
- Object.defineProperty(builder, 'level', {
- enumerable: true,
- get: function get() {
- return self.level;
- },
- set: function set(level) {
- self.level = level;
- }
- });
- Object.defineProperty(builder, 'enabled', {
- enumerable: true,
- get: function get() {
- return self.enabled;
- },
- set: function set(enabled) {
- self.enabled = enabled;
- }
- }); // See below for fix regarding invisible grey/dim combination on Windows
+ for (var _i3 = 0, _Object$keys3 = Object.keys(ansiStyles.bgColor.ansi); _i3 < _Object$keys3.length; _i3++) {
+ var _ret2 = _loop3();
- builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is
- // no way to create a function with a different prototype
+ if (_ret2 === "continue") continue;
+ }
- builder.__proto__ = proto; // eslint-disable-line no-proto
+ var proto = Object.defineProperties(function () {}, styles);
- return builder;
- }
+ function build(_styles, _empty, key) {
+ var builder = function builder() {
+ return applyStyle.apply(builder, arguments);
+ };
- function applyStyle() {
- // Support varags, but simply cast to string in case there's only one arg
- var args = arguments;
- var argsLen = args.length;
- var str = String(arguments[0]);
+ builder._styles = _styles;
+ builder._empty = _empty;
+ var self = this;
+ Object.defineProperty(builder, 'level', {
+ enumerable: true,
+ get: function get() {
+ return self.level;
+ },
+ set: function set(level) {
+ self.level = level;
+ }
+ });
+ Object.defineProperty(builder, 'enabled', {
+ enumerable: true,
+ get: function get() {
+ return self.enabled;
+ },
+ set: function set(enabled) {
+ self.enabled = enabled;
+ }
+ }); // See below for fix regarding invisible grey/dim combination on Windows
- if (argsLen === 0) {
- return '';
+ builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is
+ // no way to create a function with a different prototype
+
+ builder.__proto__ = proto; // eslint-disable-line no-proto
+
+ return builder;
}
- if (argsLen > 1) {
- // Don't slice `arguments`, it prevents V8 optimizations
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
+ function applyStyle() {
+ // Support varags, but simply cast to string in case there's only one arg
+ var args = arguments;
+ var argsLen = args.length;
+ var str = String(arguments[0]);
+
+ if (argsLen === 0) {
+ return '';
}
- }
- if (!this.enabled || this.level <= 0 || !str) {
- return this._empty ? '' : str;
- } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
- // see https://github.com/chalk/chalk/issues/58
- // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
+ if (argsLen > 1) {
+ // Don't slice `arguments`, it prevents V8 optimizations
+ for (var a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+ if (!this.enabled || this.level <= 0 || !str) {
+ return this._empty ? '' : str;
+ } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
+ // see https://github.com/chalk/chalk/issues/58
+ // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
- var originalDim = ansiStyles.dim.open;
- if (isSimpleWindowsTerm && this.hasGrey) {
- ansiStyles.dim.open = '';
- }
+ var originalDim = ansiStyles.dim.open;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ if (isSimpleWindowsTerm && this.hasGrey) {
+ ansiStyles.dim.open = '';
+ }
- try {
- for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var code = _step.value;
- // Replace any instances already present with a re-opening code
- // otherwise only the part of the string until said closing code
- // will be colored, and the rest will simply be 'plain'.
- str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen
- // after next line to fix a bleed issue on macOS
- // https://github.com/chalk/chalk/pull/92
-
- str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open));
- } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
+ for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var code = _step.value;
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS
+ // https://github.com/chalk/chalk/pull/92
+
+ str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open));
+ } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
+
+ ansiStyles.dim.open = originalDim;
+ return str;
}
- ansiStyles.dim.open = originalDim;
- return str;
- }
+ function chalkTag(chalk, strings) {
+ if (!Array.isArray(strings)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return [].slice.call(arguments, 1).join(' ');
+ }
- function chalkTag(chalk, strings) {
- if (!Array.isArray(strings)) {
- // If chalk() was called by itself or with a string,
- // return the string itself as a string.
- return [].slice.call(arguments, 1).join(' ');
- }
+ var args = [].slice.call(arguments, 2);
+ var parts = [strings.raw[0]];
- var args = [].slice.call(arguments, 2);
- var parts = [strings.raw[0]];
+ for (var i = 1; i < strings.length; i++) {
+ parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
+ parts.push(String(strings.raw[i]));
+ }
- for (var i = 1; i < strings.length; i++) {
- parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
- parts.push(String(strings.raw[i]));
+ return templates(chalk, parts.join(''));
}
- return templates(chalk, parts.join(''));
- }
+ Object.defineProperties(Chalk.prototype, styles);
+ module.exports = Chalk(); // eslint-disable-line new-cap
- Object.defineProperties(Chalk.prototype, styles);
- module.exports = Chalk(); // eslint-disable-line new-cap
+ module.exports.supportsColor = stdoutColor;
+ module.exports.default = module.exports; // For TypeScript
+ });
+ var chalk_1 = chalk.supportsColor;
- module.exports.supportsColor = stdoutColor;
- module.exports.default = module.exports; // For TypeScript
-});
+ var common = createCommonjsModule(function (module, exports) {
-var common = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) {
+ var descriptor = _ref.descriptor;
+ var messages = ["".concat(chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair)), " is deprecated")];
- exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) {
- var descriptor = _ref.descriptor;
- var messages = ["".concat(chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair)), " is deprecated")];
+ if (redirectTo) {
+ messages.push("we now treat it as ".concat(chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))));
+ }
- if (redirectTo) {
- messages.push("we now treat it as ".concat(chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))));
- }
+ return messages.join('; ') + '.';
+ };
+ });
+ unwrapExports(common);
+ var common_1 = common.commonDeprecatedHandler;
- return messages.join('; ') + '.';
- };
-});
-unwrapExports(common);
+ var deprecated = createCommonjsModule(function (module, exports) {
-var deprecated = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(common, exports);
});
+ unwrapExports(deprecated);
- tslib_1.__exportStar(common, exports);
-});
-unwrapExports(deprecated);
+ var common$1 = createCommonjsModule(function (module, exports) {
-var common$2 = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.commonInvalidHandler = function (key, value, utils) {
+ return ["Invalid ".concat(chalk.default.red(utils.descriptor.key(key)), " value."), "Expected ".concat(chalk.default.blue(utils.schemas[key].expected(utils)), ","), "but received ".concat(chalk.default.red(utils.descriptor.value(value)), ".")].join(' ');
+ };
});
+ unwrapExports(common$1);
+ var common_1$1 = common$1.commonInvalidHandler;
- exports.commonInvalidHandler = function (key, value, utils) {
- return ["Invalid ".concat(chalk.default.red(utils.descriptor.key(key)), " value."), "Expected ".concat(chalk.default.blue(utils.schemas[key].expected(utils)), ","), "but received ".concat(chalk.default.red(utils.descriptor.value(value)), ".")].join(' ');
- };
-});
-unwrapExports(common$2);
+ var invalid = createCommonjsModule(function (module, exports) {
-var invalid = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(common$1, exports);
});
+ unwrapExports(invalid);
- tslib_1.__exportStar(common$2, exports);
-});
-unwrapExports(invalid);
+ /* eslint-disable no-nested-ternary */
-/* eslint-disable no-nested-ternary */
-var arr = [];
-var charCodeCache = [];
+ var arr = [];
+ var charCodeCache = [];
-var leven$1 = function leven(a, b) {
- if (a === b) {
- return 0;
- }
+ var leven = function leven(a, b) {
+ if (a === b) {
+ return 0;
+ }
- var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the
- // shortest & which one is the longest
+ var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the
+ // shortest & which one is the longest
- if (a.length > b.length) {
- a = b;
- b = swap;
- }
+ if (a.length > b.length) {
+ a = b;
+ b = swap;
+ }
- var aLen = a.length;
- var bLen = b.length;
+ var aLen = a.length;
+ var bLen = b.length;
- if (aLen === 0) {
- return bLen;
- }
+ if (aLen === 0) {
+ return bLen;
+ }
- if (bLen === 0) {
- return aLen;
- } // Performing suffix trimming:
- // We can linearly drop suffix common to both strings since they
- // don't increase distance at all
- // Note: `~-` is the bitwise way to perform a `- 1` operation
+ if (bLen === 0) {
+ return aLen;
+ } // Performing suffix trimming:
+ // We can linearly drop suffix common to both strings since they
+ // don't increase distance at all
+ // Note: `~-` is the bitwise way to perform a `- 1` operation
- while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) {
- aLen--;
- bLen--;
- }
+ while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) {
+ aLen--;
+ bLen--;
+ }
- if (aLen === 0) {
- return bLen;
- } // Performing prefix trimming
- // We can linearly drop prefix common to both strings since they
- // don't increase distance at all
+ if (aLen === 0) {
+ return bLen;
+ } // Performing prefix trimming
+ // We can linearly drop prefix common to both strings since they
+ // don't increase distance at all
- var start = 0;
+ var start = 0;
- while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) {
- start++;
- }
+ while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) {
+ start++;
+ }
- aLen -= start;
- bLen -= start;
+ aLen -= start;
+ bLen -= start;
- if (aLen === 0) {
- return bLen;
- }
+ if (aLen === 0) {
+ return bLen;
+ }
- var bCharCode;
- var ret;
- var tmp;
- var tmp2;
- var i = 0;
- var j = 0;
+ var bCharCode;
+ var ret;
+ var tmp;
+ var tmp2;
+ var i = 0;
+ var j = 0;
- while (i < aLen) {
- charCodeCache[start + i] = a.charCodeAt(start + i);
- arr[i] = ++i;
- }
+ while (i < aLen) {
+ charCodeCache[start + i] = a.charCodeAt(start + i);
+ arr[i] = ++i;
+ }
- while (j < bLen) {
- bCharCode = b.charCodeAt(start + j);
- tmp = j++;
- ret = j;
+ while (j < bLen) {
+ bCharCode = b.charCodeAt(start + j);
+ tmp = j++;
+ ret = j;
- for (i = 0; i < aLen; i++) {
- tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1;
- tmp = arr[i];
- ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2;
+ for (i = 0; i < aLen; i++) {
+ tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1;
+ tmp = arr[i];
+ ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2;
+ }
}
- }
-
- return ret;
-};
-var leven_1 = createCommonjsModule(function (module, exports) {
- "use strict";
+ return ret;
+ };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ var leven_1 = createCommonjsModule(function (module, exports) {
- exports.levenUnknownHandler = function (key, value, _ref) {
- var descriptor = _ref.descriptor,
- logger = _ref.logger,
- schemas = _ref.schemas;
- var messages = ["Ignored unknown option ".concat(chalk.default.yellow(descriptor.pair({
- key: key,
- value: value
- })), ".")];
- var suggestion = Object.keys(schemas).sort().find(function (knownKey) {
- return leven$1(key, knownKey) < 3;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
});
- if (suggestion) {
- messages.push("Did you mean ".concat(chalk.default.blue(descriptor.key(suggestion)), "?"));
- }
-
- logger.warn(messages.join(' '));
- };
-});
-unwrapExports(leven_1);
+ exports.levenUnknownHandler = function (key, value, _ref) {
+ var descriptor = _ref.descriptor,
+ logger = _ref.logger,
+ schemas = _ref.schemas;
+ var messages = ["Ignored unknown option ".concat(chalk.default.yellow(descriptor.pair({
+ key: key,
+ value: value
+ })), ".")];
+ var suggestion = Object.keys(schemas).sort().find(function (knownKey) {
+ return leven(key, knownKey) < 3;
+ });
-var unknown = createCommonjsModule(function (module, exports) {
- "use strict";
+ if (suggestion) {
+ messages.push("Did you mean ".concat(chalk.default.blue(descriptor.key(suggestion)), "?"));
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
+ logger.warn(messages.join(' '));
+ };
});
+ unwrapExports(leven_1);
+ var leven_2 = leven_1.levenUnknownHandler;
- tslib_1.__exportStar(leven_1, exports);
-});
-unwrapExports(unknown);
+ var unknown = createCommonjsModule(function (module, exports) {
-var handlers = createCommonjsModule(function (module, exports) {
- "use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(leven_1, exports);
});
+ unwrapExports(unknown);
- tslib_1.__exportStar(deprecated, exports);
+ var handlers = createCommonjsModule(function (module, exports) {
- tslib_1.__exportStar(invalid, exports);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- tslib_1.__exportStar(unknown, exports);
-});
-unwrapExports(handlers);
+ tslib_1.__exportStar(deprecated, exports);
-var schema = createCommonjsModule(function (module, exports) {
- "use strict";
+ tslib_1.__exportStar(invalid, exports);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(unknown, exports);
});
- var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess'];
-
- function createSchema(SchemaConstructor, parameters) {
- var schema = new SchemaConstructor(parameters);
- var subSchema = Object.create(schema);
+ unwrapExports(handlers);
- for (var _i = 0; _i < HANDLER_KEYS.length; _i++) {
- var handlerKey = HANDLER_KEYS[_i];
+ var schema = createCommonjsModule(function (module, exports) {
- if (handlerKey in parameters) {
- subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length);
- }
- }
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess'];
- return subSchema;
- }
+ function createSchema(SchemaConstructor, parameters) {
+ var schema = new SchemaConstructor(parameters);
+ var subSchema = Object.create(schema);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- exports.createSchema = createSchema;
+ try {
+ for (var _iterator = HANDLER_KEYS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var handlerKey = _step.value;
- var Schema =
- /*#__PURE__*/
- function () {
- function Schema(parameters) {
- _classCallCheck(this, Schema);
+ if (handlerKey in parameters) {
+ subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length);
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
- this.name = parameters.name;
+ return subSchema;
}
- _createClass(Schema, [{
- key: "default",
- value: function _default(_utils) {
- return undefined;
- } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length`
+ exports.createSchema = createSchema;
- }, {
- key: "expected",
- value: function expected(_utils) {
- return 'nothing';
- } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length`
+ var Schema =
+ /*#__PURE__*/
+ function () {
+ function Schema(parameters) {
+ _classCallCheck(this, Schema);
- }, {
- key: "validate",
- value: function validate(_value, _utils) {
- return false;
- }
- }, {
- key: "deprecated",
- value: function deprecated(_value, _utils) {
- return false;
- }
- }, {
- key: "forward",
- value: function forward(_value, _utils) {
- return undefined;
- }
- }, {
- key: "redirect",
- value: function redirect(_value, _utils) {
- return undefined;
- }
- }, {
- key: "overlap",
- value: function overlap(currentValue, _newValue, _utils) {
- return currentValue;
- }
- }, {
- key: "preprocess",
- value: function preprocess(value, _utils) {
- return value;
- }
- }, {
- key: "postprocess",
- value: function postprocess(value, _utils) {
- return value;
- }
- }], [{
- key: "create",
- value: function create(parameters) {
- // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863
- return createSchema(this, parameters);
+ this.name = parameters.name;
}
- }]);
- return Schema;
- }();
+ _createClass(Schema, [{
+ key: "default",
+ value: function _default(_utils) {
+ return undefined;
+ } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length`
- exports.Schema = Schema;
+ }, {
+ key: "expected",
+ value: function expected(_utils) {
+ return 'nothing';
+ } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length`
- function normalizeHandler(handler, superSchema, handlerArgumentsLength) {
- return typeof handler === 'function' ? function () {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+ }, {
+ key: "validate",
+ value: function validate(_value, _utils) {
+ return false;
+ }
+ }, {
+ key: "deprecated",
+ value: function deprecated(_value, _utils) {
+ return false;
+ }
+ }, {
+ key: "forward",
+ value: function forward(_value, _utils) {
+ return undefined;
+ }
+ }, {
+ key: "redirect",
+ value: function redirect(_value, _utils) {
+ return undefined;
+ }
+ }, {
+ key: "overlap",
+ value: function overlap(currentValue, _newValue, _utils) {
+ return currentValue;
+ }
+ }, {
+ key: "preprocess",
+ value: function preprocess(value, _utils) {
+ return value;
+ }
+ }, {
+ key: "postprocess",
+ value: function postprocess(value, _utils) {
+ return value;
+ }
+ }], [{
+ key: "create",
+ value: function create(parameters) {
+ // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863
+ return createSchema(this, parameters);
+ }
+ }]);
- return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1))));
- } : function () {
- return handler;
- };
- }
-});
-unwrapExports(schema);
+ return Schema;
+ }();
-var alias = createCommonjsModule(function (module, exports) {
- "use strict";
+ exports.Schema = Schema;
- Object.defineProperty(exports, "__esModule", {
- value: true
+ function normalizeHandler(handler, superSchema, handlerArgumentsLength) {
+ return typeof handler === 'function' ? function () {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1))));
+ } : function () {
+ return handler;
+ };
+ }
});
+ unwrapExports(schema);
+ var schema_1 = schema.createSchema;
+ var schema_2 = schema.Schema;
- var AliasSchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(AliasSchema, _schema_1$Schema);
+ var alias = createCommonjsModule(function (module, exports) {
- function AliasSchema(parameters) {
- var _this;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- _classCallCheck(this, AliasSchema);
+ var AliasSchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(AliasSchema, _schema_1$Schema);
- _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters));
- _this._sourceName = parameters.sourceName;
- return _this;
- }
+ function AliasSchema(parameters) {
+ var _this;
- _createClass(AliasSchema, [{
- key: "expected",
- value: function expected(utils) {
- return utils.schemas[this._sourceName].expected(utils);
- }
- }, {
- key: "validate",
- value: function validate(value, utils) {
- return utils.schemas[this._sourceName].validate(value, utils);
- }
- }, {
- key: "redirect",
- value: function redirect(_value, _utils) {
- return this._sourceName;
- }
- }]);
+ _classCallCheck(this, AliasSchema);
- return AliasSchema;
- }(schema.Schema);
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters));
+ _this._sourceName = parameters.sourceName;
+ return _this;
+ }
- exports.AliasSchema = AliasSchema;
-});
-unwrapExports(alias);
+ _createClass(AliasSchema, [{
+ key: "expected",
+ value: function expected(utils) {
+ return utils.schemas[this._sourceName].expected(utils);
+ }
+ }, {
+ key: "validate",
+ value: function validate(value, utils) {
+ return utils.schemas[this._sourceName].validate(value, utils);
+ }
+ }, {
+ key: "redirect",
+ value: function redirect(_value, _utils) {
+ return this._sourceName;
+ }
+ }]);
-var any = createCommonjsModule(function (module, exports) {
- "use strict";
+ return AliasSchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.AliasSchema = AliasSchema;
});
+ unwrapExports(alias);
+ var alias_1 = alias.AliasSchema;
- var AnySchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(AnySchema, _schema_1$Schema);
+ var any = createCommonjsModule(function (module, exports) {
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- function AnySchema() {
- _classCallCheck(this, AnySchema);
+ var AnySchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(AnySchema, _schema_1$Schema);
- return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments));
- }
+ function AnySchema() {
+ _classCallCheck(this, AnySchema);
- _createClass(AnySchema, [{
- key: "expected",
- value: function expected() {
- return 'anything';
+ return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments));
}
- }, {
- key: "validate",
- value: function validate() {
- return true;
- }
- }]);
-
- return AnySchema;
- }(schema.Schema);
- exports.AnySchema = AnySchema;
-});
-unwrapExports(any);
+ _createClass(AnySchema, [{
+ key: "expected",
+ value: function expected() {
+ return 'anything';
+ }
+ }, {
+ key: "validate",
+ value: function validate() {
+ return true;
+ }
+ }]);
-var array$2 = createCommonjsModule(function (module, exports) {
- "use strict";
+ return AnySchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.AnySchema = AnySchema;
});
+ unwrapExports(any);
+ var any_1 = any.AnySchema;
- var ArraySchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(ArraySchema, _schema_1$Schema);
+ var array = createCommonjsModule(function (module, exports) {
- function ArraySchema(_a) {
- var _this;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- _classCallCheck(this, ArraySchema);
+ var ArraySchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(ArraySchema, _schema_1$Schema);
- var valueSchema = _a.valueSchema,
- _a$name = _a.name,
- name = _a$name === void 0 ? valueSchema.name : _a$name,
- handlers = tslib_1.__rest(_a, ["valueSchema", "name"]);
+ function ArraySchema(_a) {
+ var _this;
- _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, {
- name: name
- })));
- _this._valueSchema = valueSchema;
- return _this;
- }
+ _classCallCheck(this, ArraySchema);
- _createClass(ArraySchema, [{
- key: "expected",
- value: function expected(utils) {
- return "an array of ".concat(this._valueSchema.expected(utils));
+ var valueSchema = _a.valueSchema,
+ _a$name = _a.name,
+ name = _a$name === void 0 ? valueSchema.name : _a$name,
+ handlers = tslib_1.__rest(_a, ["valueSchema", "name"]);
+
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, {
+ name: name
+ })));
+ _this._valueSchema = valueSchema;
+ return _this;
}
- }, {
- key: "validate",
- value: function validate(value, utils) {
- if (!Array.isArray(value)) {
- return false;
+
+ _createClass(ArraySchema, [{
+ key: "expected",
+ value: function expected(utils) {
+ return "an array of ".concat(this._valueSchema.expected(utils));
}
+ }, {
+ key: "validate",
+ value: function validate(value, utils) {
+ if (!Array.isArray(value)) {
+ return false;
+ }
- var invalidValues = [];
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var invalidValues = [];
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- try {
- for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var subValue = _step.value;
- var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue);
-
- if (subValidateResult !== true) {
- invalidValues.push(subValidateResult.value);
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var subValue = _step.value;
+ var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue);
+
+ if (subValidateResult !== true) {
+ invalidValues.push(subValidateResult.value);
+ }
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- return invalidValues.length === 0 ? true : {
- value: invalidValues
- };
- }
- }, {
- key: "deprecated",
- value: function deprecated(value, utils) {
- var deprecatedResult = [];
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ return invalidValues.length === 0 ? true : {
+ value: invalidValues
+ };
+ }
+ }, {
+ key: "deprecated",
+ value: function deprecated(value, utils) {
+ var deprecatedResult = [];
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
- try {
- for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var subValue = _step2.value;
- var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue);
-
- if (subDeprecatedResult !== false) {
- deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) {
- var deprecatedValue = _ref.value;
- return {
- value: [deprecatedValue]
- };
- })));
- }
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
+ for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var subValue = _step2.value;
+ var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue);
+
+ if (subDeprecatedResult !== false) {
+ deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) {
+ var deprecatedValue = _ref.value;
+ return {
+ value: [deprecatedValue]
+ };
+ })));
+ }
}
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
}
- }
- return deprecatedResult;
- }
- }, {
- key: "forward",
- value: function forward(value, utils) {
- var forwardResult = [];
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
+ return deprecatedResult;
+ }
+ }, {
+ key: "forward",
+ value: function forward(value, utils) {
+ var forwardResult = [];
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
- try {
- for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var subValue = _step3.value;
- var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue);
- forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult)));
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
+ for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var subValue = _step3.value;
+ var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue);
+ forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult)));
}
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
} finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
}
}
+
+ return forwardResult;
}
+ }, {
+ key: "redirect",
+ value: function redirect(value, utils) {
+ var remain = [];
+ var redirect = [];
+ var _iteratorNormalCompletion4 = true;
+ var _didIteratorError4 = false;
+ var _iteratorError4 = undefined;
- return forwardResult;
- }
- }, {
- key: "redirect",
- value: function redirect(value, utils) {
- var remain = [];
- var redirect = [];
- var _iteratorNormalCompletion4 = true;
- var _didIteratorError4 = false;
- var _iteratorError4 = undefined;
+ try {
+ for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
+ var subValue = _step4.value;
+ var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue);
- try {
- for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
- var subValue = _step4.value;
- var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue);
+ if ('remain' in subRedirectResult) {
+ remain.push(subRedirectResult.remain);
+ }
- if ('remain' in subRedirectResult) {
- remain.push(subRedirectResult.remain);
- }
-
- redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult)));
- }
- } catch (err) {
- _didIteratorError4 = true;
- _iteratorError4 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
- _iterator4.return();
+ redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult)));
}
+ } catch (err) {
+ _didIteratorError4 = true;
+ _iteratorError4 = err;
} finally {
- if (_didIteratorError4) {
- throw _iteratorError4;
+ try {
+ if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
+ _iterator4.return();
+ }
+ } finally {
+ if (_didIteratorError4) {
+ throw _iteratorError4;
+ }
}
}
- }
-
- return remain.length === 0 ? {
- redirect: redirect
- } : {
- redirect: redirect,
- remain: remain
- };
- }
- }, {
- key: "overlap",
- value: function overlap(currentValue, newValue) {
- return currentValue.concat(newValue);
- }
- }]);
- return ArraySchema;
- }(schema.Schema);
-
- exports.ArraySchema = ArraySchema;
+ return remain.length === 0 ? {
+ redirect: redirect
+ } : {
+ redirect: redirect,
+ remain: remain
+ };
+ }
+ }, {
+ key: "overlap",
+ value: function overlap(currentValue, newValue) {
+ return currentValue.concat(newValue);
+ }
+ }]);
- function wrapTransferResult(_ref2) {
- var from = _ref2.from,
- to = _ref2.to;
- return {
- from: [from],
- to: to
- };
- }
-});
-unwrapExports(array$2);
+ return ArraySchema;
+ }(schema.Schema);
-var boolean_1 = createCommonjsModule(function (module, exports) {
- "use strict";
+ exports.ArraySchema = ArraySchema;
- Object.defineProperty(exports, "__esModule", {
- value: true
+ function wrapTransferResult(_ref2) {
+ var from = _ref2.from,
+ to = _ref2.to;
+ return {
+ from: [from],
+ to: to
+ };
+ }
});
+ unwrapExports(array);
+ var array_1 = array.ArraySchema;
- var BooleanSchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(BooleanSchema, _schema_1$Schema);
+ var boolean_1 = createCommonjsModule(function (module, exports) {
- function BooleanSchema() {
- _classCallCheck(this, BooleanSchema);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments));
- }
+ var BooleanSchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(BooleanSchema, _schema_1$Schema);
- _createClass(BooleanSchema, [{
- key: "expected",
- value: function expected() {
- return 'true or false';
- }
- }, {
- key: "validate",
- value: function validate(value) {
- return typeof value === 'boolean';
- }
- }]);
+ function BooleanSchema() {
+ _classCallCheck(this, BooleanSchema);
- return BooleanSchema;
- }(schema.Schema);
+ return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments));
+ }
- exports.BooleanSchema = BooleanSchema;
-});
-unwrapExports(boolean_1);
+ _createClass(BooleanSchema, [{
+ key: "expected",
+ value: function expected() {
+ return 'true or false';
+ }
+ }, {
+ key: "validate",
+ value: function validate(value) {
+ return typeof value === 'boolean';
+ }
+ }]);
-var utils = createCommonjsModule(function (module, exports) {
- "use strict";
+ return BooleanSchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.BooleanSchema = BooleanSchema;
});
+ unwrapExports(boolean_1);
+ var boolean_2 = boolean_1.BooleanSchema;
- function recordFromArray(array, mainKey) {
- var record = Object.create(null);
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var utils = createCommonjsModule(function (module, exports) {
- try {
- for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var value = _step.value;
- var key = value[mainKey]; // istanbul ignore next
-
- if (record[key]) {
- throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key)));
- } // @ts-ignore
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ function recordFromArray(array, mainKey) {
+ var record = Object.create(null);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- record[key] = value;
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var value = _step.value;
+ var key = value[mainKey]; // istanbul ignore next
+
+ if (record[key]) {
+ throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key)));
+ } // @ts-ignore
+
+
+ record[key] = value;
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- return record;
- }
+ return record;
+ }
- exports.recordFromArray = recordFromArray;
+ exports.recordFromArray = recordFromArray;
- function mapFromArray(array, mainKey) {
- var map = new Map();
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ function mapFromArray(array, mainKey) {
+ var map = new Map();
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
- try {
- for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var value = _step2.value;
- var key = value[mainKey]; // istanbul ignore next
+ try {
+ for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var value = _step2.value;
+ var key = value[mainKey]; // istanbul ignore next
- if (map.has(key)) {
- throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key)));
- }
+ if (map.has(key)) {
+ throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key)));
+ }
- map.set(key, value);
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
+ map.set(key, value);
}
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
}
- }
-
- return map;
- }
- exports.mapFromArray = mapFromArray;
+ return map;
+ }
- function createAutoChecklist() {
- var map = Object.create(null);
- return function (id) {
- var idString = JSON.stringify(id);
+ exports.mapFromArray = mapFromArray;
- if (map[idString]) {
- return true;
- }
+ function createAutoChecklist() {
+ var map = Object.create(null);
+ return function (id) {
+ var idString = JSON.stringify(id);
- map[idString] = true;
- return false;
- };
- }
+ if (map[idString]) {
+ return true;
+ }
- exports.createAutoChecklist = createAutoChecklist;
+ map[idString] = true;
+ return false;
+ };
+ }
- function partition(array, predicate) {
- var trueArray = [];
- var falseArray = [];
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
+ exports.createAutoChecklist = createAutoChecklist;
- try {
- for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var value = _step3.value;
+ function partition(array, predicate) {
+ var trueArray = [];
+ var falseArray = [];
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
- if (predicate(value)) {
- trueArray.push(value);
- } else {
- falseArray.push(value);
- }
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
+ for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var value = _step3.value;
+
+ if (predicate(value)) {
+ trueArray.push(value);
+ } else {
+ falseArray.push(value);
+ }
}
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
} finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
}
}
- }
-
- return [trueArray, falseArray];
- }
- exports.partition = partition;
-
- function isInt(value) {
- return value === Math.floor(value);
- }
+ return [trueArray, falseArray];
+ }
- exports.isInt = isInt;
+ exports.partition = partition;
- function comparePrimitive(a, b) {
- if (a === b) {
- return 0;
+ function isInt(value) {
+ return value === Math.floor(value);
}
- var typeofA = _typeof(a);
+ exports.isInt = isInt;
- var typeofB = _typeof(b);
+ function comparePrimitive(a, b) {
+ if (a === b) {
+ return 0;
+ }
- var orders = ['undefined', 'object', 'boolean', 'number', 'string'];
+ var typeofA = _typeof(a);
- if (typeofA !== typeofB) {
- return orders.indexOf(typeofA) - orders.indexOf(typeofB);
- }
+ var typeofB = _typeof(b);
- if (typeofA !== 'string') {
- return Number(a) - Number(b);
- }
+ var orders = ['undefined', 'object', 'boolean', 'number', 'string'];
- return a.localeCompare(b);
- }
+ if (typeofA !== typeofB) {
+ return orders.indexOf(typeofA) - orders.indexOf(typeofB);
+ }
- exports.comparePrimitive = comparePrimitive;
+ if (typeofA !== 'string') {
+ return Number(a) - Number(b);
+ }
- function normalizeDefaultResult(result) {
- return result === undefined ? {} : result;
- }
+ return a.localeCompare(b);
+ }
- exports.normalizeDefaultResult = normalizeDefaultResult;
+ exports.comparePrimitive = comparePrimitive;
- function normalizeValidateResult(result, value) {
- return result === true ? true : result === false ? {
- value: value
- } : result;
- }
+ function normalizeDefaultResult(result) {
+ return result === undefined ? {} : result;
+ }
- exports.normalizeValidateResult = normalizeValidateResult;
+ exports.normalizeDefaultResult = normalizeDefaultResult;
- function normalizeDeprecatedResult(result, value) {
- var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{
- value: value
- }] : 'value' in result ? [result] : result.length === 0 ? false : result;
- }
+ function normalizeValidateResult(result, value) {
+ return result === true ? true : result === false ? {
+ value: value
+ } : result;
+ }
- exports.normalizeDeprecatedResult = normalizeDeprecatedResult;
+ exports.normalizeValidateResult = normalizeValidateResult;
- function normalizeTransferResult(result, value) {
- return typeof result === 'string' || 'key' in result ? {
- from: value,
- to: result
- } : 'from' in result ? {
- from: result.from,
- to: result.to
- } : {
- from: value,
- to: result.to
- };
- }
+ function normalizeDeprecatedResult(result, value) {
+ var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+ return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{
+ value: value
+ }] : 'value' in result ? [result] : result.length === 0 ? false : result;
+ }
- exports.normalizeTransferResult = normalizeTransferResult;
+ exports.normalizeDeprecatedResult = normalizeDeprecatedResult;
- function normalizeForwardResult(result, value) {
- return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) {
- return normalizeTransferResult(transferResult, value);
- }) : [normalizeTransferResult(result, value)];
- }
+ function normalizeTransferResult(result, value) {
+ return typeof result === 'string' || 'key' in result ? {
+ from: value,
+ to: result
+ } : 'from' in result ? {
+ from: result.from,
+ to: result.to
+ } : {
+ from: value,
+ to: result.to
+ };
+ }
- exports.normalizeForwardResult = normalizeForwardResult;
+ exports.normalizeTransferResult = normalizeTransferResult;
- function normalizeRedirectResult(result, value) {
- var redirect = normalizeForwardResult(_typeof(result) === 'object' && 'redirect' in result ? result.redirect : result, value);
- return redirect.length === 0 ? {
- remain: value,
- redirect: redirect
- } : _typeof(result) === 'object' && 'remain' in result ? {
- remain: result.remain,
- redirect: redirect
- } : {
- redirect: redirect
- };
- }
+ function normalizeForwardResult(result, value) {
+ return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) {
+ return normalizeTransferResult(transferResult, value);
+ }) : [normalizeTransferResult(result, value)];
+ }
- exports.normalizeRedirectResult = normalizeRedirectResult;
-});
-unwrapExports(utils);
+ exports.normalizeForwardResult = normalizeForwardResult;
-var choice = createCommonjsModule(function (module, exports) {
- "use strict";
+ function normalizeRedirectResult(result, value) {
+ var redirect = normalizeForwardResult(_typeof(result) === 'object' && 'redirect' in result ? result.redirect : result, value);
+ return redirect.length === 0 ? {
+ remain: value,
+ redirect: redirect
+ } : _typeof(result) === 'object' && 'remain' in result ? {
+ remain: result.remain,
+ redirect: redirect
+ } : {
+ redirect: redirect
+ };
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.normalizeRedirectResult = normalizeRedirectResult;
});
+ unwrapExports(utils);
+ var utils_1 = utils.recordFromArray;
+ var utils_2 = utils.mapFromArray;
+ var utils_3 = utils.createAutoChecklist;
+ var utils_4 = utils.partition;
+ var utils_5 = utils.isInt;
+ var utils_6 = utils.comparePrimitive;
+ var utils_7 = utils.normalizeDefaultResult;
+ var utils_8 = utils.normalizeValidateResult;
+ var utils_9 = utils.normalizeDeprecatedResult;
+ var utils_10 = utils.normalizeTransferResult;
+ var utils_11 = utils.normalizeForwardResult;
+ var utils_12 = utils.normalizeRedirectResult;
+
+ var choice = createCommonjsModule(function (module, exports) {
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- var ChoiceSchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(ChoiceSchema, _schema_1$Schema);
+ var ChoiceSchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(ChoiceSchema, _schema_1$Schema);
- function ChoiceSchema(parameters) {
- var _this;
+ function ChoiceSchema(parameters) {
+ var _this;
- _classCallCheck(this, ChoiceSchema);
+ _classCallCheck(this, ChoiceSchema);
- _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters));
- _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) {
- return choice && _typeof(choice) === 'object' ? choice : {
- value: choice
- };
- }), 'value');
- return _this;
- }
-
- _createClass(ChoiceSchema, [{
- key: "expected",
- value: function expected(_ref) {
- var _this2 = this;
-
- var descriptor = _ref.descriptor;
- var choiceValues = Array.from(this._choices.keys()).map(function (value) {
- return _this2._choices.get(value);
- }).filter(function (choiceInfo) {
- return !choiceInfo.deprecated;
- }).map(function (choiceInfo) {
- return choiceInfo.value;
- }).sort(utils.comparePrimitive).map(descriptor.value);
- var head = choiceValues.slice(0, -2);
- var tail = choiceValues.slice(-2);
- return head.concat(tail.join(' or ')).join(', ');
- }
- }, {
- key: "validate",
- value: function validate(value) {
- return this._choices.has(value);
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters));
+ _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) {
+ return choice && _typeof(choice) === 'object' ? choice : {
+ value: choice
+ };
+ }), 'value');
+ return _this;
}
- }, {
- key: "deprecated",
- value: function deprecated(value) {
- var choiceInfo = this._choices.get(value);
- return choiceInfo && choiceInfo.deprecated ? {
- value: value
- } : false;
- }
- }, {
- key: "forward",
- value: function forward(value) {
- var choiceInfo = this._choices.get(value);
+ _createClass(ChoiceSchema, [{
+ key: "expected",
+ value: function expected(_ref) {
+ var _this2 = this;
- return choiceInfo ? choiceInfo.forward : undefined;
- }
- }, {
- key: "redirect",
- value: function redirect(value) {
- var choiceInfo = this._choices.get(value);
+ var descriptor = _ref.descriptor;
+ var choiceValues = Array.from(this._choices.keys()).map(function (value) {
+ return _this2._choices.get(value);
+ }).filter(function (choiceInfo) {
+ return !choiceInfo.deprecated;
+ }).map(function (choiceInfo) {
+ return choiceInfo.value;
+ }).sort(utils.comparePrimitive).map(descriptor.value);
+ var head = choiceValues.slice(0, -2);
+ var tail = choiceValues.slice(-2);
+ return head.concat(tail.join(' or ')).join(', ');
+ }
+ }, {
+ key: "validate",
+ value: function validate(value) {
+ return this._choices.has(value);
+ }
+ }, {
+ key: "deprecated",
+ value: function deprecated(value) {
+ var choiceInfo = this._choices.get(value);
- return choiceInfo ? choiceInfo.redirect : undefined;
- }
- }]);
+ return choiceInfo && choiceInfo.deprecated ? {
+ value: value
+ } : false;
+ }
+ }, {
+ key: "forward",
+ value: function forward(value) {
+ var choiceInfo = this._choices.get(value);
- return ChoiceSchema;
- }(schema.Schema);
+ return choiceInfo ? choiceInfo.forward : undefined;
+ }
+ }, {
+ key: "redirect",
+ value: function redirect(value) {
+ var choiceInfo = this._choices.get(value);
- exports.ChoiceSchema = ChoiceSchema;
-});
-unwrapExports(choice);
+ return choiceInfo ? choiceInfo.redirect : undefined;
+ }
+ }]);
-var number = createCommonjsModule(function (module, exports) {
- "use strict";
+ return ChoiceSchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.ChoiceSchema = ChoiceSchema;
});
+ unwrapExports(choice);
+ var choice_1 = choice.ChoiceSchema;
- var NumberSchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(NumberSchema, _schema_1$Schema);
+ var number = createCommonjsModule(function (module, exports) {
- function NumberSchema() {
- _classCallCheck(this, NumberSchema);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments));
- }
+ var NumberSchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(NumberSchema, _schema_1$Schema);
- _createClass(NumberSchema, [{
- key: "expected",
- value: function expected() {
- return 'a number';
- }
- }, {
- key: "validate",
- value: function validate(value, _utils) {
- return typeof value === 'number';
- }
- }]);
+ function NumberSchema() {
+ _classCallCheck(this, NumberSchema);
- return NumberSchema;
- }(schema.Schema);
+ return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments));
+ }
- exports.NumberSchema = NumberSchema;
-});
-unwrapExports(number);
+ _createClass(NumberSchema, [{
+ key: "expected",
+ value: function expected() {
+ return 'a number';
+ }
+ }, {
+ key: "validate",
+ value: function validate(value, _utils) {
+ return typeof value === 'number';
+ }
+ }]);
-var integer = createCommonjsModule(function (module, exports) {
- "use strict";
+ return NumberSchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.NumberSchema = NumberSchema;
});
+ unwrapExports(number);
+ var number_1 = number.NumberSchema;
- var IntegerSchema =
- /*#__PURE__*/
- function (_number_1$NumberSchem) {
- _inherits(IntegerSchema, _number_1$NumberSchem);
+ var integer = createCommonjsModule(function (module, exports) {
- function IntegerSchema() {
- _classCallCheck(this, IntegerSchema);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments));
- }
+ var IntegerSchema =
+ /*#__PURE__*/
+ function (_number_1$NumberSchem) {
+ _inherits(IntegerSchema, _number_1$NumberSchem);
- _createClass(IntegerSchema, [{
- key: "expected",
- value: function expected() {
- return 'an integer';
- }
- }, {
- key: "validate",
- value: function validate(value, utils$$2) {
- return utils$$2.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$$2), value) === true && utils.isInt(value);
- }
- }]);
+ function IntegerSchema() {
+ _classCallCheck(this, IntegerSchema);
- return IntegerSchema;
- }(number.NumberSchema);
+ return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments));
+ }
- exports.IntegerSchema = IntegerSchema;
-});
-unwrapExports(integer);
+ _createClass(IntegerSchema, [{
+ key: "expected",
+ value: function expected() {
+ return 'an integer';
+ }
+ }, {
+ key: "validate",
+ value: function validate(value, utils$1) {
+ return utils$1.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$1), value) === true && utils.isInt(value);
+ }
+ }]);
-var string = createCommonjsModule(function (module, exports) {
- "use strict";
+ return IntegerSchema;
+ }(number.NumberSchema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.IntegerSchema = IntegerSchema;
});
+ unwrapExports(integer);
+ var integer_1 = integer.IntegerSchema;
- var StringSchema =
- /*#__PURE__*/
- function (_schema_1$Schema) {
- _inherits(StringSchema, _schema_1$Schema);
+ var string = createCommonjsModule(function (module, exports) {
- function StringSchema() {
- _classCallCheck(this, StringSchema);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments));
- }
+ var StringSchema =
+ /*#__PURE__*/
+ function (_schema_1$Schema) {
+ _inherits(StringSchema, _schema_1$Schema);
- _createClass(StringSchema, [{
- key: "expected",
- value: function expected() {
- return 'a string';
- }
- }, {
- key: "validate",
- value: function validate(value) {
- return typeof value === 'string';
- }
- }]);
+ function StringSchema() {
+ _classCallCheck(this, StringSchema);
- return StringSchema;
- }(schema.Schema);
+ return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments));
+ }
- exports.StringSchema = StringSchema;
-});
-unwrapExports(string);
+ _createClass(StringSchema, [{
+ key: "expected",
+ value: function expected() {
+ return 'a string';
+ }
+ }, {
+ key: "validate",
+ value: function validate(value) {
+ return typeof value === 'string';
+ }
+ }]);
-var schemas = createCommonjsModule(function (module, exports) {
- "use strict";
+ return StringSchema;
+ }(schema.Schema);
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.StringSchema = StringSchema;
});
+ unwrapExports(string);
+ var string_1 = string.StringSchema;
- tslib_1.__exportStar(alias, exports);
+ var schemas = createCommonjsModule(function (module, exports) {
- tslib_1.__exportStar(any, exports);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- tslib_1.__exportStar(array$2, exports);
+ tslib_1.__exportStar(alias, exports);
- tslib_1.__exportStar(boolean_1, exports);
+ tslib_1.__exportStar(any, exports);
- tslib_1.__exportStar(choice, exports);
+ tslib_1.__exportStar(array, exports);
- tslib_1.__exportStar(integer, exports);
+ tslib_1.__exportStar(boolean_1, exports);
- tslib_1.__exportStar(number, exports);
+ tslib_1.__exportStar(choice, exports);
- tslib_1.__exportStar(string, exports);
-});
-unwrapExports(schemas);
+ tslib_1.__exportStar(integer, exports);
-var defaults = createCommonjsModule(function (module, exports) {
- "use strict";
+ tslib_1.__exportStar(number, exports);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.defaultDescriptor = api.apiDescriptor;
- exports.defaultUnknownHandler = leven_1.levenUnknownHandler;
- exports.defaultInvalidHandler = invalid.commonInvalidHandler;
- exports.defaultDeprecatedHandler = common.commonDeprecatedHandler;
-});
-unwrapExports(defaults);
-
-var normalize$1 = createCommonjsModule(function (module, exports) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
+ tslib_1.__exportStar(string, exports);
});
+ unwrapExports(schemas);
- exports.normalize = function (options, schemas, opts) {
- return new Normalizer(schemas, opts).normalize(options);
- };
+ var defaults = createCommonjsModule(function (module, exports) {
- var Normalizer =
- /*#__PURE__*/
- function () {
- function Normalizer(schemas, opts) {
- _classCallCheck(this, Normalizer);
-
- // istanbul ignore next
- var _ref = opts || {},
- _ref$logger = _ref.logger,
- logger = _ref$logger === void 0 ? console : _ref$logger,
- _ref$descriptor = _ref.descriptor,
- descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor,
- _ref$unknown = _ref.unknown,
- unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown,
- _ref$invalid = _ref.invalid,
- invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid,
- _ref$deprecated = _ref.deprecated,
- deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated;
-
- this._utils = {
- descriptor: descriptor,
- logger:
- /* istanbul ignore next */
- logger || {
- warn: function warn() {}
- },
- schemas: utils.recordFromArray(schemas, 'name'),
- normalizeDefaultResult: utils.normalizeDefaultResult,
- normalizeDeprecatedResult: utils.normalizeDeprecatedResult,
- normalizeForwardResult: utils.normalizeForwardResult,
- normalizeRedirectResult: utils.normalizeRedirectResult,
- normalizeValidateResult: utils.normalizeValidateResult
- };
- this._unknownHandler = unknown;
- this._invalidHandler = invalid;
- this._deprecatedHandler = deprecated;
- this.cleanHistory();
- }
-
- _createClass(Normalizer, [{
- key: "cleanHistory",
- value: function cleanHistory() {
- this._hasDeprecationWarned = utils.createAutoChecklist();
- }
- }, {
- key: "normalize",
- value: function normalize(options) {
- var _this = this;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.defaultDescriptor = api.apiDescriptor;
+ exports.defaultUnknownHandler = leven_1.levenUnknownHandler;
+ exports.defaultInvalidHandler = invalid.commonInvalidHandler;
+ exports.defaultDeprecatedHandler = common.commonDeprecatedHandler;
+ });
+ unwrapExports(defaults);
+ var defaults_1 = defaults.defaultDescriptor;
+ var defaults_2 = defaults.defaultUnknownHandler;
+ var defaults_3 = defaults.defaultInvalidHandler;
+ var defaults_4 = defaults.defaultDeprecatedHandler;
- var normalized = {};
- var restOptionsArray = [options];
+ var normalize = createCommonjsModule(function (module, exports) {
- var applyNormalization = function applyNormalization() {
- while (restOptionsArray.length !== 0) {
- var currentOptions = restOptionsArray.shift();
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized);
+ exports.normalize = function (options, schemas, opts) {
+ return new Normalizer(schemas, opts).normalize(options);
+ };
- restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray));
- }
+ var Normalizer =
+ /*#__PURE__*/
+ function () {
+ function Normalizer(schemas, opts) {
+ _classCallCheck(this, Normalizer);
+
+ // istanbul ignore next
+ var _ref = opts || {},
+ _ref$logger = _ref.logger,
+ logger = _ref$logger === void 0 ? console : _ref$logger,
+ _ref$descriptor = _ref.descriptor,
+ descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor,
+ _ref$unknown = _ref.unknown,
+ unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown,
+ _ref$invalid = _ref.invalid,
+ invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid,
+ _ref$deprecated = _ref.deprecated,
+ deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated;
+
+ this._utils = {
+ descriptor: descriptor,
+ logger:
+ /* istanbul ignore next */
+ logger || {
+ warn: function warn() {}
+ },
+ schemas: utils.recordFromArray(schemas, 'name'),
+ normalizeDefaultResult: utils.normalizeDefaultResult,
+ normalizeDeprecatedResult: utils.normalizeDeprecatedResult,
+ normalizeForwardResult: utils.normalizeForwardResult,
+ normalizeRedirectResult: utils.normalizeRedirectResult,
+ normalizeValidateResult: utils.normalizeValidateResult
};
+ this._unknownHandler = unknown;
+ this._invalidHandler = invalid;
+ this._deprecatedHandler = deprecated;
+ this.cleanHistory();
+ }
- applyNormalization();
+ _createClass(Normalizer, [{
+ key: "cleanHistory",
+ value: function cleanHistory() {
+ this._hasDeprecationWarned = utils.createAutoChecklist();
+ }
+ }, {
+ key: "normalize",
+ value: function normalize(options) {
+ var _this = this;
- var _arr = Object.keys(this._utils.schemas);
+ var normalized = {};
+ var restOptionsArray = [options];
- for (var _i = 0; _i < _arr.length; _i++) {
- var key = _arr[_i];
- var schema = this._utils.schemas[key];
+ var applyNormalization = function applyNormalization() {
+ while (restOptionsArray.length !== 0) {
+ var currentOptions = restOptionsArray.shift();
- if (!(key in normalized)) {
- var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils));
+ var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized);
- if ('value' in defaultResult) {
- restOptionsArray.push(_defineProperty({}, key, defaultResult.value));
+ restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray));
}
- }
- }
+ };
- applyNormalization();
+ applyNormalization();
- var _arr2 = Object.keys(this._utils.schemas);
+ for (var _i = 0, _Object$keys = Object.keys(this._utils.schemas); _i < _Object$keys.length; _i++) {
+ var key = _Object$keys[_i];
+ var schema = this._utils.schemas[key];
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var _key = _arr2[_i2];
- var _schema = this._utils.schemas[_key];
+ if (!(key in normalized)) {
+ var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils));
- if (_key in normalized) {
- normalized[_key] = _schema.postprocess(normalized[_key], this._utils);
+ if ('value' in defaultResult) {
+ restOptionsArray.push(_defineProperty({}, key, defaultResult.value));
+ }
+ }
}
- }
- return normalized;
- }
- }, {
- key: "_applyNormalization",
- value: function _applyNormalization(options, normalized) {
- var _this2 = this;
+ applyNormalization();
- var transferredOptionsArray = [];
+ for (var _i2 = 0, _Object$keys2 = Object.keys(this._utils.schemas); _i2 < _Object$keys2.length; _i2++) {
+ var _key = _Object$keys2[_i2];
+ var _schema = this._utils.schemas[_key];
- var _utils_1$partition = utils.partition(Object.keys(options), function (key) {
- return key in _this2._utils.schemas;
- }),
- _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2),
- knownOptionNames = _utils_1$partition2[0],
- unknownOptionNames = _utils_1$partition2[1];
+ if (_key in normalized) {
+ normalized[_key] = _schema.postprocess(normalized[_key], this._utils);
+ }
+ }
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ return normalized;
+ }
+ }, {
+ key: "_applyNormalization",
+ value: function _applyNormalization(options, normalized) {
+ var _this2 = this;
- try {
- var _loop = function _loop() {
- var key = _step.value;
- var schema = _this2._utils.schemas[key];
- var value = schema.preprocess(options[key], _this2._utils);
- var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value);
+ var transferredOptionsArray = [];
- if (validateResult !== true) {
- var invalidValue = validateResult.value;
+ var _utils_1$partition = utils.partition(Object.keys(options), function (key) {
+ return key in _this2._utils.schemas;
+ }),
+ _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2),
+ knownOptionNames = _utils_1$partition2[0],
+ unknownOptionNames = _utils_1$partition2[1];
- var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) :
- /* istanbul ignore next*/
- errorMessageOrError;
- }
+ try {
+ var _loop = function _loop() {
+ var key = _step.value;
+ var schema = _this2._utils.schemas[key];
+ var value = schema.preprocess(options[key], _this2._utils);
+ var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value);
- var appendTransferredOptions = function appendTransferredOptions(_ref2) {
- var from = _ref2.from,
- to = _ref2.to;
- transferredOptionsArray.push(typeof to === 'string' ? _defineProperty({}, to, from) : _defineProperty({}, to.key, to.value));
- };
+ if (validateResult !== true) {
+ var invalidValue = validateResult.value;
- var warnDeprecated = function warnDeprecated(_ref5) {
- var currentValue = _ref5.value,
- redirectTo = _ref5.redirectTo;
- var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value,
- /* doNotNormalizeTrue */
- true);
+ var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils);
- if (deprecatedResult === false) {
- return;
+ throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) :
+ /* istanbul ignore next*/
+ errorMessageOrError;
}
- if (deprecatedResult === true) {
- if (!_this2._hasDeprecationWarned(key)) {
- _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils));
+ var appendTransferredOptions = function appendTransferredOptions(_ref2) {
+ var from = _ref2.from,
+ to = _ref2.to;
+ transferredOptionsArray.push(typeof to === 'string' ? _defineProperty({}, to, from) : _defineProperty({}, to.key, to.value));
+ };
+
+ var warnDeprecated = function warnDeprecated(_ref5) {
+ var currentValue = _ref5.value,
+ redirectTo = _ref5.redirectTo;
+ var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value,
+ /* doNotNormalizeTrue */
+ true);
+
+ if (deprecatedResult === false) {
+ return;
}
- } else {
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
- try {
- for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var deprecatedValue = _step3.value.value;
- var pair = {
- key: key,
- value: deprecatedValue
- };
-
- if (!_this2._hasDeprecationWarned(pair)) {
- var redirectToPair = typeof redirectTo === 'string' ? {
- key: redirectTo,
- value: deprecatedValue
- } : redirectTo;
-
- _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils));
- }
+ if (deprecatedResult === true) {
+ if (!_this2._hasDeprecationWarned(key)) {
+ _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils));
}
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
+ } else {
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
+ for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var deprecatedValue = _step3.value.value;
+ var pair = {
+ key: key,
+ value: deprecatedValue
+ };
+
+ if (!_this2._hasDeprecationWarned(pair)) {
+ var redirectToPair = typeof redirectTo === 'string' ? {
+ key: redirectTo,
+ value: deprecatedValue
+ } : redirectTo;
+
+ _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils));
+ }
}
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
} finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
}
}
}
- }
- };
+ };
- var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value);
- forwardResult.forEach(appendTransferredOptions);
- var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value);
- redirectResult.redirect.forEach(appendTransferredOptions);
+ var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value);
+ forwardResult.forEach(appendTransferredOptions);
+ var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value);
+ redirectResult.redirect.forEach(appendTransferredOptions);
- if ('remain' in redirectResult) {
- var remainingValue = redirectResult.remain;
- normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue;
- warnDeprecated({
- value: remainingValue
- });
- }
-
- var _iteratorNormalCompletion4 = true;
- var _didIteratorError4 = false;
- var _iteratorError4 = undefined;
-
- try {
- for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
- var _step4$value = _step4.value,
- from = _step4$value.from,
- to = _step4$value.to;
+ if ('remain' in redirectResult) {
+ var remainingValue = redirectResult.remain;
+ normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue;
warnDeprecated({
- value: from,
- redirectTo: to
+ value: remainingValue
});
}
- } catch (err) {
- _didIteratorError4 = true;
- _iteratorError4 = err;
- } finally {
+
+ var _iteratorNormalCompletion4 = true;
+ var _didIteratorError4 = false;
+ var _iteratorError4 = undefined;
+
try {
- if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
- _iterator4.return();
+ for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
+ var _step4$value = _step4.value,
+ from = _step4$value.from,
+ to = _step4$value.to;
+ warnDeprecated({
+ value: from,
+ redirectTo: to
+ });
}
+ } catch (err) {
+ _didIteratorError4 = true;
+ _iteratorError4 = err;
} finally {
- if (_didIteratorError4) {
- throw _iteratorError4;
+ try {
+ if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
+ _iterator4.return();
+ }
+ } finally {
+ if (_didIteratorError4) {
+ throw _iteratorError4;
+ }
}
}
- }
- };
+ };
- for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- _loop();
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ _loop();
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
- try {
- for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var key = _step2.value;
- var value = options[key];
-
- var unknownResult = this._unknownHandler(key, value, this._utils);
+ try {
+ for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var key = _step2.value;
+ var value = options[key];
- if (unknownResult) {
- var _arr3 = Object.keys(unknownResult);
+ var unknownResult = this._unknownHandler(key, value, this._utils);
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var unknownKey = _arr3[_i3];
+ if (unknownResult) {
+ for (var _i3 = 0, _Object$keys3 = Object.keys(unknownResult); _i3 < _Object$keys3.length; _i3++) {
+ var unknownKey = _Object$keys3[_i3];
- var unknownOption = _defineProperty({}, unknownKey, unknownResult[unknownKey]);
+ var unknownOption = _defineProperty({}, unknownKey, unknownResult[unknownKey]);
- if (unknownKey in this._utils.schemas) {
- transferredOptionsArray.push(unknownOption);
- } else {
- Object.assign(normalized, unknownOption);
+ if (unknownKey in this._utils.schemas) {
+ transferredOptionsArray.push(unknownOption);
+ } else {
+ Object.assign(normalized, unknownOption);
+ }
}
}
}
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
}
- }
- return transferredOptionsArray;
- }
- }]);
-
- return Normalizer;
- }();
-
- exports.Normalizer = Normalizer;
-});
-unwrapExports(normalize$1);
+ return transferredOptionsArray;
+ }
+ }]);
-var lib$1 = createCommonjsModule(function (module, exports) {
- "use strict";
+ return Normalizer;
+ }();
- Object.defineProperty(exports, "__esModule", {
- value: true
+ exports.Normalizer = Normalizer;
});
+ unwrapExports(normalize);
+ var normalize_1 = normalize.normalize;
+ var normalize_2 = normalize.Normalizer;
- tslib_1.__exportStar(descriptors, exports);
+ var lib = createCommonjsModule(function (module, exports) {
- tslib_1.__exportStar(handlers, exports);
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
- tslib_1.__exportStar(schemas, exports);
+ tslib_1.__exportStar(descriptors, exports);
- tslib_1.__exportStar(normalize$1, exports);
+ tslib_1.__exportStar(handlers, exports);
- tslib_1.__exportStar(schema, exports);
-});
-unwrapExports(lib$1);
+ tslib_1.__exportStar(schemas, exports);
-var hasFlag$3 = function hasFlag(flag, argv$$1) {
- argv$$1 = argv$$1 || process.argv;
- var terminatorPos = argv$$1.indexOf('--');
- var prefix = /^-{1,2}/.test(flag) ? '' : '--';
- var pos = argv$$1.indexOf(prefix + flag);
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
-};
+ tslib_1.__exportStar(normalize, exports);
-var supportsColor$1 = createCommonjsModule(function (module) {
- 'use strict';
+ tslib_1.__exportStar(schema, exports);
+ });
+ unwrapExports(lib);
- var env$$1 = process.env;
+ var array$1 = [];
+ var charCodeCache$1 = [];
- var support = function support(level) {
- if (level === 0) {
- return false;
+ var leven$1 = function leven(left, right) {
+ if (left === right) {
+ return 0;
}
- return {
- level: level,
- hasBasic: true,
- has256: level >= 2,
- has16m: level >= 3
- };
- };
+ var swap = left; // Swapping the strings if `a` is longer than `b` so we know which one is the
+ // shortest & which one is the longest
- var supportLevel = function () {
- if (hasFlag$3('no-color') || hasFlag$3('no-colors') || hasFlag$3('color=false')) {
- return 0;
+ if (left.length > right.length) {
+ left = right;
+ right = swap;
}
- if (hasFlag$3('color=16m') || hasFlag$3('color=full') || hasFlag$3('color=truecolor')) {
- return 3;
- }
+ var leftLength = left.length;
+ var rightLength = right.length; // Performing suffix trimming:
+ // We can linearly drop suffix common to both strings since they
+ // don't increase distance at all
+ // Note: `~-` is the bitwise way to perform a `- 1` operation
- if (hasFlag$3('color=256')) {
- return 2;
+ while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) {
+ leftLength--;
+ rightLength--;
+ } // Performing prefix trimming
+ // We can linearly drop prefix common to both strings since they
+ // don't increase distance at all
+
+
+ var start = 0;
+
+ while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) {
+ start++;
}
- if (hasFlag$3('color') || hasFlag$3('colors') || hasFlag$3('color=true') || hasFlag$3('color=always')) {
- return 1;
+ leftLength -= start;
+ rightLength -= start;
+
+ if (leftLength === 0) {
+ return rightLength;
}
- if (process.stdout && !process.stdout.isTTY) {
- return 0;
+ var bCharCode;
+ var result;
+ var temp;
+ var temp2;
+ var i = 0;
+ var j = 0;
+
+ while (i < leftLength) {
+ charCodeCache$1[i] = left.charCodeAt(start + i);
+ array$1[i] = ++i;
}
- if (process.platform === 'win32') {
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
- // libuv that enables 256 color output on Windows. Anything earlier and it
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
- // release that supports 256 colors.
- var osRelease = require$$1$1.release().split('.');
+ while (j < rightLength) {
+ bCharCode = right.charCodeAt(start + j);
+ temp = j++;
+ result = j;
- if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
- return 2;
- }
+ for (i = 0; i < leftLength; i++) {
+ temp2 = bCharCode === charCodeCache$1[i] ? temp : temp + 1;
+ temp = array$1[i]; // eslint-disable-next-line no-multi-assign
- return 1;
+ result = array$1[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2;
+ }
}
- if ('CI' in env$$1) {
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) {
- return sign in env$$1;
- }) || env$$1.CI_NAME === 'codeship') {
- return 1;
- }
+ return result;
+ };
- return 0;
- }
+ var leven_1$1 = leven$1; // TODO: Remove this for the next major release
+
+ var default_1 = leven$1;
+ leven_1$1.default = default_1;
- if ('TEAMCITY_VERSION' in env$$1) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$$1.TEAMCITY_VERSION) ? 1 : 0;
+ var cliDescriptor = {
+ key: function key(_key) {
+ return _key.length === 1 ? "-".concat(_key) : "--".concat(_key);
+ },
+ value: function value(_value) {
+ return lib.apiDescriptor.value(_value);
+ },
+ pair: function pair(_ref) {
+ var key = _ref.key,
+ value = _ref.value;
+ return value === false ? "--no-".concat(key) : value === true ? cliDescriptor.key(key) : value === "" ? "".concat(cliDescriptor.key(key), " without an argument") : "".concat(cliDescriptor.key(key), "=").concat(value);
}
+ };
- if ('TERM_PROGRAM' in env$$1) {
- var version = parseInt((env$$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+ var FlagSchema =
+ /*#__PURE__*/
+ function (_vnopts$ChoiceSchema) {
+ _inherits(FlagSchema, _vnopts$ChoiceSchema);
- switch (env$$1.TERM_PROGRAM) {
- case 'iTerm.app':
- return version >= 3 ? 3 : 2;
+ function FlagSchema(_ref2) {
+ var _this;
- case 'Hyper':
- return 3;
+ var name = _ref2.name,
+ flags = _ref2.flags;
- case 'Apple_Terminal':
- return 2;
- // No default
- }
- }
+ _classCallCheck(this, FlagSchema);
- if (/-256(color)?$/i.test(env$$1.TERM)) {
- return 2;
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, {
+ name: name,
+ choices: flags
+ }));
+ _this._flags = flags.slice().sort();
+ return _this;
}
- if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env$$1.TERM)) {
- return 1;
- }
+ _createClass(FlagSchema, [{
+ key: "preprocess",
+ value: function preprocess(value, utils) {
+ if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) {
+ var suggestion = this._flags.find(function (flag) {
+ return leven_1$1(flag, value) < 3;
+ });
- if ('COLORTERM' in env$$1) {
- return 1;
- }
+ if (suggestion) {
+ utils.logger.warn(["Unknown flag ".concat(chalk.yellow(utils.descriptor.value(value)), ","), "did you mean ".concat(chalk.blue(utils.descriptor.value(suggestion)), "?")].join(" "));
+ return suggestion;
+ }
+ }
- if (env$$1.TERM === 'dumb') {
- return 0;
- }
+ return value;
+ }
+ }, {
+ key: "expected",
+ value: function expected() {
+ return "a flag";
+ }
+ }]);
- return 0;
- }();
+ return FlagSchema;
+ }(lib.ChoiceSchema);
- if ('FORCE_COLOR' in env$$1) {
- supportLevel = parseInt(env$$1.FORCE_COLOR, 10) === 0 ? 0 : supportLevel || 1;
- }
+ var hasDeprecationWarned;
- module.exports = process && support(supportLevel);
-});
+ function normalizeOptions(options, optionInfos) {
+ var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
+ logger = _ref3.logger,
+ _ref3$isCLI = _ref3.isCLI,
+ isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI,
+ _ref3$passThrough = _ref3.passThrough,
+ passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough;
-var templates$2 = createCommonjsModule(function (module) {
- 'use strict';
+ var unknown = !passThrough ? lib.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) {
+ return passThrough.indexOf(key) === -1 ? undefined : _defineProperty({}, key, value);
+ } : function (key, value) {
+ return _defineProperty({}, key, value);
+ };
+ var descriptor = isCLI ? cliDescriptor : lib.apiDescriptor;
+ var schemas = optionInfosToSchemas(optionInfos, {
+ isCLI: isCLI
+ });
+ var normalizer = new lib.Normalizer(schemas, {
+ logger: logger,
+ unknown: unknown,
+ descriptor: descriptor
+ });
+ var shouldSuppressDuplicateDeprecationWarnings = logger !== false;
- var TEMPLATE_REGEX = /(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
- var ESCAPE_REGEX = /\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi;
- var ESCAPES = {
- n: '\n',
- r: '\r',
- t: '\t',
- b: '\b',
- f: '\f',
- v: '\v',
- 0: '\0',
- '\\': '\\',
- e: "\x1B",
- a: "\x07"
- };
+ if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) {
+ normalizer._hasDeprecationWarned = hasDeprecationWarned;
+ }
- function unescape(c) {
- if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {
- return String.fromCharCode(parseInt(c.slice(1), 16));
+ var normalized = normalizer.normalize(options);
+
+ if (shouldSuppressDuplicateDeprecationWarnings) {
+ hasDeprecationWarned = normalizer._hasDeprecationWarned;
}
- return ESCAPES[c] || c;
+ return normalized;
}
- function parseArguments(name, args) {
- var results = [];
- var chunks = args.trim().split(/\s*,\s*/g);
- var matches;
+ function optionInfosToSchemas(optionInfos, _ref6) {
+ var isCLI = _ref6.isCLI;
+ var schemas = [];
+
+ if (isCLI) {
+ schemas.push(lib.AnySchema.create({
+ name: "_"
+ }));
+ }
+
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
- for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var chunk = _step.value;
+ for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var optionInfo = _step.value;
+ schemas.push(optionInfoToSchema(optionInfo, {
+ isCLI: isCLI,
+ optionInfos: optionInfos
+ }));
- if (!isNaN(chunk)) {
- results.push(Number(chunk));
- } else if (matches = chunk.match(STRING_REGEX)) {
- results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) {
- return escape ? unescape(escape) : chr;
+ if (optionInfo.alias && isCLI) {
+ schemas.push(lib.AliasSchema.create({
+ name: optionInfo.alias,
+ sourceName: optionInfo.name
}));
- } else {
- throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')"));
}
}
} catch (err) {
@@ -10631,8703 +10819,8827 @@ var templates$2 = createCommonjsModule(function (module) {
}
}
- return results;
+ return schemas;
}
- function parseStyle(style) {
- STYLE_REGEX.lastIndex = 0;
- var results = [];
- var matches;
-
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
- var name = matches[1];
-
- if (matches[2]) {
- var args = parseArguments(name, matches[2]);
- results.push([name].concat(args));
- } else {
- results.push([name]);
- }
- }
-
- return results;
- }
-
- function buildStyle(chalk, styles) {
- var enabled = {};
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var layer = _step2.value;
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
-
- try {
- for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var style = _step3.value;
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
- }
- }
- }
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
-
- var current = chalk;
-
- var _arr = Object.keys(enabled);
+ function optionInfoToSchema(optionInfo, _ref7) {
+ var isCLI = _ref7.isCLI,
+ optionInfos = _ref7.optionInfos;
+ var SchemaConstructor;
+ var parameters = {
+ name: optionInfo.name
+ };
+ var handlers = {};
- for (var _i = 0; _i < _arr.length; _i++) {
- var styleName = _arr[_i];
+ switch (optionInfo.type) {
+ case "int":
+ SchemaConstructor = lib.IntegerSchema;
- if (Array.isArray(enabled[styleName])) {
- if (!(styleName in current)) {
- throw new Error("Unknown Chalk style: ".concat(styleName));
- }
-
- if (enabled[styleName].length > 0) {
- current = current[styleName].apply(current, enabled[styleName]);
- } else {
- current = current[styleName];
+ if (isCLI) {
+ parameters.preprocess = function (value) {
+ return Number(value);
+ };
}
- }
- }
- return current;
- }
+ break;
- module.exports = function (chalk, tmp) {
- var styles = [];
- var chunks = [];
- var chunk = []; // eslint-disable-next-line max-params
+ case "string":
+ SchemaConstructor = lib.StringSchema;
+ break;
- tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) {
- if (escapeChar) {
- chunk.push(unescape(escapeChar));
- } else if (style) {
- var str = chunk.join('');
- chunk = [];
- chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
- styles.push({
- inverse: inverse,
- styles: parseStyle(style)
+ case "choice":
+ SchemaConstructor = lib.ChoiceSchema;
+ parameters.choices = optionInfo.choices.map(function (choiceInfo) {
+ return _typeof(choiceInfo) === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, {
+ redirect: {
+ to: {
+ key: optionInfo.name,
+ value: choiceInfo.redirect
+ }
+ }
+ }) : choiceInfo;
});
- } else if (close) {
- if (styles.length === 0) {
- throw new Error('Found extraneous } in Chalk template literal');
- }
-
- chunks.push(buildStyle(chalk, styles)(chunk.join('')));
- chunk = [];
- styles.pop();
- } else {
- chunk.push(chr);
- }
- });
- chunks.push(chunk.join(''));
-
- if (styles.length > 0) {
- var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)");
- throw new Error(errMsg);
- }
-
- return chunks.join('');
- };
-});
-
-var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping
-
-var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such
-
-var skipModels = new Set(['gray']);
-var styles = Object.create(null);
-
-function applyOptions(obj, options) {
- options = options || {}; // Detect level if not set manually
-
- var scLevel = supportsColor$1 ? supportsColor$1.level : 0;
- obj.level = options.level === undefined ? scLevel : options.level;
- obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
-}
-
-function Chalk(options) {
- // We check for this.template here since calling `chalk.constructor()`
- // by itself will have a `this` of a previously constructed chalk object
- if (!this || !(this instanceof Chalk) || this.template) {
- var _chalk = {};
- applyOptions(_chalk, options);
-
- _chalk.template = function () {
- var args = [].slice.call(arguments);
- return chalkTag.apply(null, [_chalk.template].concat(args));
- };
-
- Object.setPrototypeOf(_chalk, Chalk.prototype);
- Object.setPrototypeOf(_chalk.template, _chalk);
- _chalk.template.constructor = Chalk;
- return _chalk.template;
- }
-
- applyOptions(this, options);
-} // Use bright blue on Windows as the normal blue color is illegible
+ break;
+ case "boolean":
+ SchemaConstructor = lib.BooleanSchema;
+ break;
-if (isSimpleWindowsTerm) {
- ansiStyles.blue.open = "\x1B[94m";
-}
+ case "flag":
+ SchemaConstructor = FlagSchema;
+ parameters.flags = optionInfos.map(function (optionInfo) {
+ return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? "no-".concat(optionInfo.name) : []);
+ }).reduce(function (a, b) {
+ return a.concat(b);
+ }, []);
+ break;
-var _arr = Object.keys(ansiStyles);
+ case "path":
+ SchemaConstructor = lib.StringSchema;
+ break;
-var _loop = function _loop() {
- var key = _arr[_i];
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
- styles[key] = {
- get: function get() {
- var codes = ansiStyles[key];
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key);
+ default:
+ throw new Error("Unexpected type ".concat(optionInfo.type));
}
- };
-};
-
-for (var _i = 0; _i < _arr.length; _i++) {
- _loop();
-}
-
-ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
-var _arr2 = Object.keys(ansiStyles.color.ansi);
-
-var _loop2 = function _loop2() {
- var model = _arr2[_i2];
-
- if (skipModels.has(model)) {
- return "continue";
- }
+ if (optionInfo.exception) {
+ parameters.validate = function (value, schema, utils) {
+ return optionInfo.exception(value) || schema.validate(value, utils);
+ };
+ } else {
+ parameters.validate = function (value, schema, utils) {
+ return value === undefined || schema.validate(value, utils);
+ };
+ }
- styles[model] = {
- get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.color.close,
- closeRe: ansiStyles.color.closeRe
+ if (optionInfo.redirect) {
+ handlers.redirect = function (value) {
+ return !value ? undefined : {
+ to: {
+ key: optionInfo.redirect.option,
+ value: optionInfo.redirect.value
+ }
};
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model);
};
}
- };
-};
-for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var _ret = _loop2();
+ if (optionInfo.deprecated) {
+ handlers.deprecated = true;
+ } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2
- if (_ret === "continue") continue;
-}
-ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
-
-var _arr3 = Object.keys(ansiStyles.bgColor.ansi);
-
-var _loop3 = function _loop3() {
- var model = _arr3[_i3];
-
- if (skipModels.has(model)) {
- return "continue";
- }
+ if (isCLI && !optionInfo.array) {
+ var originalPreprocess = parameters.preprocess || function (x) {
+ return x;
+ };
- var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
- styles[bgModel] = {
- get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.bgColor.close,
- closeRe: ansiStyles.bgColor.closeRe
- };
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model);
+ parameters.preprocess = function (value, schema, utils) {
+ return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils);
};
}
- };
-};
-for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var _ret2 = _loop3();
+ return optionInfo.array ? lib.ArraySchema.create(Object.assign(isCLI ? {
+ preprocess: function preprocess(v) {
+ return [].concat(v);
+ }
+ } : {}, handlers, {
+ valueSchema: SchemaConstructor.create(parameters)
+ })) : SchemaConstructor.create(Object.assign({}, parameters, handlers));
+ }
- if (_ret2 === "continue") continue;
-}
+ function normalizeApiOptions(options, optionInfos, opts) {
+ return normalizeOptions(options, optionInfos, opts);
+ }
-var proto = Object.defineProperties(function () {}, styles);
+ function normalizeCliOptions(options, optionInfos, opts) {
+ return normalizeOptions(options, optionInfos, Object.assign({
+ isCLI: true
+ }, opts));
+ }
-function build(_styles, key) {
- var builder = function builder() {
- return applyStyle.apply(builder, arguments);
+ var optionsNormalizer = {
+ normalizeApiOptions: normalizeApiOptions,
+ normalizeCliOptions: normalizeCliOptions
};
- builder._styles = _styles;
- var self = this;
- Object.defineProperty(builder, 'level', {
- enumerable: true,
- get: function get() {
- return self.level;
- },
- set: function set(level) {
- self.level = level;
- }
- });
- Object.defineProperty(builder, 'enabled', {
- enumerable: true,
- get: function get() {
- return self.enabled;
- },
- set: function set(enabled) {
- self.enabled = enabled;
- }
- }); // See below for fix regarding invisible grey/dim combination on Windows
-
- builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is
- // no way to create a function with a different prototype
-
- builder.__proto__ = proto; // eslint-disable-line no-proto
+ var getLast = function getLast(arr) {
+ return arr.length > 0 ? arr[arr.length - 1] : null;
+ };
- return builder;
-}
+ function locStart(node, opts) {
+ opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator
-function applyStyle() {
- // Support varags, but simply cast to string in case there's only one arg
- var args = arguments;
- var argsLen = args.length;
- var str = String(arguments[0]);
+ if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) {
+ return locStart(node.declaration.decorators[0]);
+ }
- if (argsLen === 0) {
- return '';
- }
+ if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) {
+ return locStart(node.decorators[0]);
+ }
- if (argsLen > 1) {
- // Don't slice `arguments`, it prevents V8 optimizations
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
+ if (node.__location) {
+ return node.__location.startOffset;
}
- }
- if (!this.enabled || this.level <= 0 || !str) {
- return str;
- } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
- // see https://github.com/chalk/chalk/issues/58
- // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
+ if (node.range) {
+ return node.range[0];
+ }
+ if (typeof node.start === "number") {
+ return node.start;
+ }
- var originalDim = ansiStyles.dim.open;
+ if (node.loc) {
+ return node.loc.start;
+ }
- if (isSimpleWindowsTerm && this.hasGrey) {
- ansiStyles.dim.open = '';
+ return null;
}
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var code = _step.value;
- // Replace any instances already present with a re-opening code
- // otherwise only the part of the string until said closing code
- // will be colored, and the rest will simply be 'plain'.
- str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen
- // after next line to fix a bleed issue on macOS
- // https://github.com/chalk/chalk/pull/92
+ function locEnd(node) {
+ var endNode = node.nodes && getLast(node.nodes);
- str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open));
- } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ if (endNode && node.source && !node.source.end) {
+ node = endNode;
+ }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
+ if (node.__location) {
+ return node.__location.endOffset;
}
- }
- ansiStyles.dim.open = originalDim;
- return str;
-}
+ var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null;
-function chalkTag(chalk, strings) {
- if (!Array.isArray(strings)) {
- // If chalk() was called by itself or with a string,
- // return the string itself as a string.
- return [].slice.call(arguments, 1).join(' ');
- }
+ if (node.typeAnnotation) {
+ return Math.max(loc, locEnd(node.typeAnnotation));
+ }
- var args = [].slice.call(arguments, 2);
- var parts = [strings.raw[0]];
+ if (node.loc && !loc) {
+ return node.loc.end;
+ }
- for (var i = 1; i < strings.length; i++) {
- parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
- parts.push(String(strings.raw[i]));
+ return loc;
}
- return templates$2(chalk, parts.join(''));
-}
-
-Object.defineProperties(Chalk.prototype, styles);
-var chalk$2 = Chalk(); // eslint-disable-line new-cap
+ var loc = {
+ locStart: locStart,
+ locEnd: locEnd
+ };
-var supportsColor_1$2 = supportsColor$1;
-chalk$2.supportsColor = supportsColor_1$2;
+ var jsTokens = createCommonjsModule(function (module, exports) {
+ // Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
+ // License: MIT. (See LICENSE.)
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ }); // This regex comes from regex.coffee, and is inserted here by generate-index.js
+ // (run `npm run build`).
-var cliDescriptor = {
- key: function key(_key) {
- return _key.length === 1 ? "-".concat(_key) : "--".concat(_key);
- },
- value: function value(_value) {
- return lib$1.apiDescriptor.value(_value);
- },
- pair: function pair(_ref) {
- var key = _ref.key,
- value = _ref.value;
- return value === false ? "--no-".concat(key) : value === true ? cliDescriptor.key(key) : value === "" ? "".concat(cliDescriptor.key(key), " without an argument") : "".concat(cliDescriptor.key(key), "=").concat(value);
- }
-};
+ exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
-var FlagSchema =
-/*#__PURE__*/
-function (_vnopts$ChoiceSchema) {
- _inherits(FlagSchema, _vnopts$ChoiceSchema);
+ exports.matchToToken = function (match) {
+ var token = {
+ type: "invalid",
+ value: match[0],
+ closed: undefined
+ };
+ if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
+ return token;
+ };
+ });
+ unwrapExports(jsTokens);
+ var jsTokens_1 = jsTokens.matchToToken;
+
+ var ast = createCommonjsModule(function (module) {
+ /*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ (function () {
+
+ function isExpression(node) {
+ if (node == null) {
+ return false;
+ }
- function FlagSchema(_ref2) {
- var _this;
+ switch (node.type) {
+ case 'ArrayExpression':
+ case 'AssignmentExpression':
+ case 'BinaryExpression':
+ case 'CallExpression':
+ case 'ConditionalExpression':
+ case 'FunctionExpression':
+ case 'Identifier':
+ case 'Literal':
+ case 'LogicalExpression':
+ case 'MemberExpression':
+ case 'NewExpression':
+ case 'ObjectExpression':
+ case 'SequenceExpression':
+ case 'ThisExpression':
+ case 'UnaryExpression':
+ case 'UpdateExpression':
+ return true;
+ }
- var name = _ref2.name,
- flags = _ref2.flags;
+ return false;
+ }
- _classCallCheck(this, FlagSchema);
+ function isIterationStatement(node) {
+ if (node == null) {
+ return false;
+ }
- _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, {
- name: name,
- choices: flags
- }));
- _this._flags = flags.slice().sort();
- return _this;
- }
+ switch (node.type) {
+ case 'DoWhileStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'WhileStatement':
+ return true;
+ }
- _createClass(FlagSchema, [{
- key: "preprocess",
- value: function preprocess(value, utils) {
- if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) {
- var suggestion = this._flags.find(function (flag) {
- return leven$1(flag, value) < 3;
- });
+ return false;
+ }
- if (suggestion) {
- utils.logger.warn(["Unknown flag ".concat(chalk$2.yellow(utils.descriptor.value(value)), ","), "did you mean ".concat(chalk$2.blue(utils.descriptor.value(suggestion)), "?")].join(" "));
- return suggestion;
+ function isStatement(node) {
+ if (node == null) {
+ return false;
}
- }
- return value;
- }
- }, {
- key: "expected",
- value: function expected() {
- return "a flag";
- }
- }]);
+ switch (node.type) {
+ case 'BlockStatement':
+ case 'BreakStatement':
+ case 'ContinueStatement':
+ case 'DebuggerStatement':
+ case 'DoWhileStatement':
+ case 'EmptyStatement':
+ case 'ExpressionStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'IfStatement':
+ case 'LabeledStatement':
+ case 'ReturnStatement':
+ case 'SwitchStatement':
+ case 'ThrowStatement':
+ case 'TryStatement':
+ case 'VariableDeclaration':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return true;
+ }
- return FlagSchema;
-}(lib$1.ChoiceSchema);
+ return false;
+ }
-var hasDeprecationWarned;
+ function isSourceElement(node) {
+ return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
+ }
-function normalizeOptions$1(options, optionInfos) {
- var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
- logger = _ref3.logger,
- _ref3$isCLI = _ref3.isCLI,
- isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI,
- _ref3$passThrough = _ref3.passThrough,
- passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough;
+ function trailingStatement(node) {
+ switch (node.type) {
+ case 'IfStatement':
+ if (node.alternate != null) {
+ return node.alternate;
+ }
- var unknown = !passThrough ? lib$1.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) {
- return passThrough.indexOf(key) === -1 ? undefined : _defineProperty({}, key, value);
- } : function (key, value) {
- return _defineProperty({}, key, value);
- };
- var descriptor = isCLI ? cliDescriptor : lib$1.apiDescriptor;
- var schemas = optionInfosToSchemas(optionInfos, {
- isCLI: isCLI
- });
- var normalizer = new lib$1.Normalizer(schemas, {
- logger: logger,
- unknown: unknown,
- descriptor: descriptor
- });
- var shouldSuppressDuplicateDeprecationWarnings = logger !== false;
+ return node.consequent;
- if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) {
- normalizer._hasDeprecationWarned = hasDeprecationWarned;
- }
+ case 'LabeledStatement':
+ case 'ForStatement':
+ case 'ForInStatement':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return node.body;
+ }
- var normalized = normalizer.normalize(options);
+ return null;
+ }
- if (shouldSuppressDuplicateDeprecationWarnings) {
- hasDeprecationWarned = normalizer._hasDeprecationWarned;
- }
+ function isProblematicIfStatement(node) {
+ var current;
- return normalized;
-}
+ if (node.type !== 'IfStatement') {
+ return false;
+ }
-function optionInfosToSchemas(optionInfos, _ref6) {
- var isCLI = _ref6.isCLI;
- var schemas = [];
+ if (node.alternate == null) {
+ return false;
+ }
- if (isCLI) {
- schemas.push(lib$1.AnySchema.create({
- name: "_"
- }));
- }
+ current = node.consequent;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ do {
+ if (current.type === 'IfStatement') {
+ if (current.alternate == null) {
+ return true;
+ }
+ }
- try {
- for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var optionInfo = _step.value;
- schemas.push(optionInfoToSchema(optionInfo, {
- isCLI: isCLI,
- optionInfos: optionInfos
- }));
+ current = trailingStatement(current);
+ } while (current);
- if (optionInfo.alias && isCLI) {
- schemas.push(lib$1.AliasSchema.create({
- name: optionInfo.alias,
- sourceName: optionInfo.name
- }));
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ return false;
}
- }
- }
- return schemas;
-}
+ module.exports = {
+ isExpression: isExpression,
+ isStatement: isStatement,
+ isIterationStatement: isIterationStatement,
+ isSourceElement: isSourceElement,
+ isProblematicIfStatement: isProblematicIfStatement,
+ trailingStatement: trailingStatement
+ };
+ })();
+ /* vim: set sw=4 ts=4 et tw=80 : */
-function optionInfoToSchema(optionInfo, _ref7) {
- var isCLI = _ref7.isCLI,
- optionInfos = _ref7.optionInfos;
- var SchemaConstructor;
- var parameters = {
- name: optionInfo.name
- };
- var handlers = {};
+ });
+ var ast_1 = ast.isExpression;
+ var ast_2 = ast.isStatement;
+ var ast_3 = ast.isIterationStatement;
+ var ast_4 = ast.isSourceElement;
+ var ast_5 = ast.isProblematicIfStatement;
+ var ast_6 = ast.trailingStatement;
+
+ var code = createCommonjsModule(function (module) {
+ /*
+ Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ (function () {
+
+ var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`.
+
+ ES5Regex = {
+ // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
+ 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\u08B6-\u08BD\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\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\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-\u1884\u1887-\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\u1C80-\u1C88\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\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-\uA7AE\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]/,
+ // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
+ NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\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\u08B6-\u08BD\u08D4-\u08E1\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\u0C80-\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\u0D54-\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\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-\u19D9\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\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\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]/
+ };
+ ES6Regex = {
+ // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
+ 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\u08B6-\u08BD\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\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\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\u1C80-\u1C88\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-\uA7AE\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\uDCB0-\uDCD3\uDCD8-\uDCFB\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[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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\uDD00-\uDD43]|\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]/,
+ // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
+ 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\u08B6-\u08BD\u08D4-\u08E1\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\u0C80-\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\u0D54-\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\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\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\uDCB0-\uDCD3\uDCD8-\uDCFB\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\uDE3E\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[\uDC00-\uDC4A\uDC50-\uDC59\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]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\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]/
+ };
- switch (optionInfo.type) {
- case "int":
- SchemaConstructor = lib$1.IntegerSchema;
+ function isDecimalDigit(ch) {
+ return 0x30 <= ch && ch <= 0x39; // 0..9
+ }
- if (isCLI) {
- parameters.preprocess = function (value) {
- return Number(value);
- };
+ function isHexDigit(ch) {
+ return 0x30 <= ch && ch <= 0x39 || // 0..9
+ 0x61 <= ch && ch <= 0x66 || // a..f
+ 0x41 <= ch && ch <= 0x46; // A..F
}
- break;
+ function isOctalDigit(ch) {
+ return ch >= 0x30 && ch <= 0x37; // 0..7
+ } // 7.2 White Space
- case "choice":
- SchemaConstructor = lib$1.ChoiceSchema;
- parameters.choices = optionInfo.choices.map(function (choiceInfo) {
- return _typeof(choiceInfo) === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, {
- redirect: {
- to: {
- key: optionInfo.name,
- value: choiceInfo.redirect
- }
- }
- }) : choiceInfo;
- });
- break;
- case "boolean":
- SchemaConstructor = lib$1.BooleanSchema;
- break;
+ NON_ASCII_WHITESPACES = [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
- case "flag":
- SchemaConstructor = FlagSchema;
- parameters.flags = optionInfos.map(function (optionInfo) {
- return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? "no-".concat(optionInfo.name) : []);
- }).reduce(function (a, b) {
- return a.concat(b);
- }, []);
- break;
+ function isWhiteSpace(ch) {
+ return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
+ } // 7.3 Line Terminators
- case "path":
- SchemaConstructor = lib$1.StringSchema;
- break;
- default:
- throw new Error("Unexpected type ".concat(optionInfo.type));
- }
+ function isLineTerminator(ch) {
+ return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
+ } // 7.6 Identifier Names and Identifiers
- if (optionInfo.exception) {
- parameters.validate = function (value, schema, utils) {
- return optionInfo.exception(value) || schema.validate(value, utils);
- };
- } else {
- parameters.validate = function (value, schema, utils) {
- return value === undefined || schema.validate(value, utils);
- };
- }
- if (optionInfo.redirect) {
- handlers.redirect = function (value) {
- return !value ? undefined : {
- to: {
- key: optionInfo.redirect.option,
- value: optionInfo.redirect.value
+ function fromCodePoint(cp) {
+ if (cp <= 0xFFFF) {
+ return String.fromCharCode(cp);
}
- };
- };
- }
- if (optionInfo.deprecated) {
- handlers.deprecated = true;
- } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2
-
-
- if (isCLI && !optionInfo.array) {
- var originalPreprocess = parameters.preprocess || function (x) {
- return x;
- };
-
- parameters.preprocess = function (value, schema, utils) {
- return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils);
- };
- }
-
- return optionInfo.array ? lib$1.ArraySchema.create(Object.assign(isCLI ? {
- preprocess: function preprocess(v) {
- return [].concat(v);
- }
- } : {}, handlers, {
- valueSchema: SchemaConstructor.create(parameters)
- })) : SchemaConstructor.create(Object.assign({}, parameters, handlers));
-}
-
-function normalizeApiOptions(options, optionInfos, opts) {
- return normalizeOptions$1(options, optionInfos, opts);
-}
-
-function normalizeCliOptions(options, optionInfos, opts) {
- return normalizeOptions$1(options, optionInfos, Object.assign({
- isCLI: true
- }, opts));
-}
+ var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
+ var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
+ return cu1 + cu2;
+ }
-var optionsNormalizer = {
- normalizeApiOptions: normalizeApiOptions,
- normalizeCliOptions: normalizeCliOptions
-};
+ IDENTIFIER_START = new Array(0x80);
-var getLast = function getLast(arr) {
- return arr.length > 0 ? arr[arr.length - 1] : null;
-};
+ for (ch = 0; ch < 0x80; ++ch) {
+ IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
+ ch >= 0x41 && ch <= 0x5A || // A..Z
+ ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
+ }
-function locStart$1(node, opts) {
- opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator
+ IDENTIFIER_PART = new Array(0x80);
- if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) {
- return locStart$1(node.declaration.decorators[0]);
- }
+ for (ch = 0; ch < 0x80; ++ch) {
+ IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
+ ch >= 0x41 && ch <= 0x5A || // A..Z
+ ch >= 0x30 && ch <= 0x39 || // 0..9
+ ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
+ }
- if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) {
- return locStart$1(node.decorators[0]);
- }
+ function isIdentifierStartES5(ch) {
+ return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ }
- if (node.__location) {
- return node.__location.startOffset;
- }
+ function isIdentifierPartES5(ch) {
+ return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+ }
- if (node.range) {
- return node.range[0];
- }
+ function isIdentifierStartES6(ch) {
+ return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ }
- if (typeof node.start === "number") {
- return node.start;
- }
+ function isIdentifierPartES6(ch) {
+ return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+ }
- if (node.loc) {
- return node.loc.start;
- }
+ module.exports = {
+ isDecimalDigit: isDecimalDigit,
+ isHexDigit: isHexDigit,
+ isOctalDigit: isOctalDigit,
+ isWhiteSpace: isWhiteSpace,
+ isLineTerminator: isLineTerminator,
+ isIdentifierStartES5: isIdentifierStartES5,
+ isIdentifierPartES5: isIdentifierPartES5,
+ isIdentifierStartES6: isIdentifierStartES6,
+ isIdentifierPartES6: isIdentifierPartES6
+ };
+ })();
+ /* vim: set sw=4 ts=4 et tw=80 : */
- return null;
-}
+ });
+ var code_1 = code.isDecimalDigit;
+ var code_2 = code.isHexDigit;
+ var code_3 = code.isOctalDigit;
+ var code_4 = code.isWhiteSpace;
+ var code_5 = code.isLineTerminator;
+ var code_6 = code.isIdentifierStartES5;
+ var code_7 = code.isIdentifierPartES5;
+ var code_8 = code.isIdentifierStartES6;
+ var code_9 = code.isIdentifierPartES6;
+
+ var keyword = createCommonjsModule(function (module) {
+ /*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ (function () {
+
+ var code$1 = code;
+
+ function isStrictModeReservedWordES6(id) {
+ switch (id) {
+ case 'implements':
+ case 'interface':
+ case 'package':
+ case 'private':
+ case 'protected':
+ case 'public':
+ case 'static':
+ case 'let':
+ return true;
-function locEnd$1(node) {
- var endNode = node.nodes && getLast(node.nodes);
+ default:
+ return false;
+ }
+ }
- if (endNode && node.source && !node.source.end) {
- node = endNode;
- }
+ function isKeywordES5(id, strict) {
+ // yield should not be treated as keyword under non-strict mode.
+ if (!strict && id === 'yield') {
+ return false;
+ }
- if (node.__location) {
- return node.__location.endOffset;
- }
+ return isKeywordES6(id, strict);
+ }
- var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null;
+ function isKeywordES6(id, strict) {
+ if (strict && isStrictModeReservedWordES6(id)) {
+ return true;
+ }
- if (node.typeAnnotation) {
- return Math.max(loc, locEnd$1(node.typeAnnotation));
- }
+ switch (id.length) {
+ case 2:
+ return id === 'if' || id === 'in' || id === 'do';
- if (node.loc && !loc) {
- return node.loc.end;
- }
+ case 3:
+ return id === 'var' || id === 'for' || id === 'new' || id === 'try';
- return loc;
-}
+ case 4:
+ return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
-var loc = {
- locStart: locStart$1,
- locEnd: locEnd$1
-};
+ case 5:
+ return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
-var jsTokens = createCommonjsModule(function (module, exports) {
- // Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
- // License: MIT. (See LICENSE.)
- Object.defineProperty(exports, "__esModule", {
- value: true
- }); // This regex comes from regex.coffee, and is inserted here by generate-index.js
- // (run `npm run build`).
+ case 6:
+ return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
- exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
+ case 7:
+ return id === 'default' || id === 'finally' || id === 'extends';
- exports.matchToToken = function (match) {
- var token = {
- type: "invalid",
- value: match[0],
- closed: undefined
- };
- if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
- return token;
- };
-});
-unwrapExports(jsTokens);
+ case 8:
+ return id === 'function' || id === 'continue' || id === 'debugger';
-var ast = createCommonjsModule(function (module) {
- /*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function () {
- 'use strict';
+ case 10:
+ return id === 'instanceof';
- function isExpression(node) {
- if (node == null) {
- return false;
+ default:
+ return false;
+ }
}
- switch (node.type) {
- case 'ArrayExpression':
- case 'AssignmentExpression':
- case 'BinaryExpression':
- case 'CallExpression':
- case 'ConditionalExpression':
- case 'FunctionExpression':
- case 'Identifier':
- case 'Literal':
- case 'LogicalExpression':
- case 'MemberExpression':
- case 'NewExpression':
- case 'ObjectExpression':
- case 'SequenceExpression':
- case 'ThisExpression':
- case 'UnaryExpression':
- case 'UpdateExpression':
- return true;
+ function isReservedWordES5(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
}
- return false;
- }
-
- function isIterationStatement(node) {
- if (node == null) {
- return false;
+ function isReservedWordES6(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
}
- switch (node.type) {
- case 'DoWhileStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'WhileStatement':
- return true;
+ function isRestrictedWord(id) {
+ return id === 'eval' || id === 'arguments';
}
- return false;
- }
+ function isIdentifierNameES5(id) {
+ var i, iz, ch;
- function isStatement(node) {
- if (node == null) {
- return false;
- }
+ if (id.length === 0) {
+ return false;
+ }
- switch (node.type) {
- case 'BlockStatement':
- case 'BreakStatement':
- case 'ContinueStatement':
- case 'DebuggerStatement':
- case 'DoWhileStatement':
- case 'EmptyStatement':
- case 'ExpressionStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'IfStatement':
- case 'LabeledStatement':
- case 'ReturnStatement':
- case 'SwitchStatement':
- case 'ThrowStatement':
- case 'TryStatement':
- case 'VariableDeclaration':
- case 'WhileStatement':
- case 'WithStatement':
- return true;
- }
+ ch = id.charCodeAt(0);
- return false;
- }
+ if (!code$1.isIdentifierStartES5(ch)) {
+ return false;
+ }
- function isSourceElement(node) {
- return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
- }
+ for (i = 1, iz = id.length; i < iz; ++i) {
+ ch = id.charCodeAt(i);
- function trailingStatement(node) {
- switch (node.type) {
- case 'IfStatement':
- if (node.alternate != null) {
- return node.alternate;
+ if (!code$1.isIdentifierPartES5(ch)) {
+ return false;
}
+ }
- return node.consequent;
-
- case 'LabeledStatement':
- case 'ForStatement':
- case 'ForInStatement':
- case 'WhileStatement':
- case 'WithStatement':
- return node.body;
- }
-
- return null;
- }
-
- function isProblematicIfStatement(node) {
- var current;
-
- if (node.type !== 'IfStatement') {
- return false;
+ return true;
}
- if (node.alternate == null) {
- return false;
+ function decodeUtf16(lead, trail) {
+ return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
}
- current = node.consequent;
+ function isIdentifierNameES6(id) {
+ var i, iz, ch, lowCh, check;
- do {
- if (current.type === 'IfStatement') {
- if (current.alternate == null) {
- return true;
- }
+ if (id.length === 0) {
+ return false;
}
- current = trailingStatement(current);
- } while (current);
+ check = code$1.isIdentifierStartES6;
- return false;
- }
+ for (i = 0, iz = id.length; i < iz; ++i) {
+ ch = id.charCodeAt(i);
- module.exports = {
- isExpression: isExpression,
- isStatement: isStatement,
- isIterationStatement: isIterationStatement,
- isSourceElement: isSourceElement,
- isProblematicIfStatement: isProblematicIfStatement,
- trailingStatement: trailingStatement
- };
- })();
- /* vim: set sw=4 ts=4 et tw=80 : */
+ if (0xD800 <= ch && ch <= 0xDBFF) {
+ ++i;
-});
+ if (i >= iz) {
+ return false;
+ }
-var code = createCommonjsModule(function (module) {
- /*
- Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
- Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function () {
- 'use strict';
+ lowCh = id.charCodeAt(i);
- var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`.
+ if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
+ return false;
+ }
- ES5Regex = {
- // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
- 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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/,
- // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
- NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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\u1380-\u138F\u13A0-\u13F4\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-\u19D9\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]/
- };
- ES6Regex = {
- // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
- 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-\u08B2\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\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\u0C59\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\u0D60\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-\u13F4\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\u19C1-\u19C7\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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\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]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\uD87E[\uDC00-\uDE1D]/,
- // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
- 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-\u08B2\u08E4-\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\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\u0C59\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\u0D60-\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-\u13F4\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-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
- };
+ ch = decodeUtf16(ch, lowCh);
+ }
- function isDecimalDigit(ch) {
- return 0x30 <= ch && ch <= 0x39; // 0..9
- }
+ if (!check(ch)) {
+ return false;
+ }
- function isHexDigit(ch) {
- return 0x30 <= ch && ch <= 0x39 || // 0..9
- 0x61 <= ch && ch <= 0x66 || // a..f
- 0x41 <= ch && ch <= 0x46; // A..F
- }
+ check = code$1.isIdentifierPartES6;
+ }
- function isOctalDigit(ch) {
- return ch >= 0x30 && ch <= 0x37; // 0..7
- } // 7.2 White Space
+ return true;
+ }
+ function isIdentifierES5(id, strict) {
+ return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
+ }
- NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
+ function isIdentifierES6(id, strict) {
+ return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
+ }
- function isWhiteSpace(ch) {
- return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
- } // 7.3 Line Terminators
+ module.exports = {
+ isKeywordES5: isKeywordES5,
+ isKeywordES6: isKeywordES6,
+ isReservedWordES5: isReservedWordES5,
+ isReservedWordES6: isReservedWordES6,
+ isRestrictedWord: isRestrictedWord,
+ isIdentifierNameES5: isIdentifierNameES5,
+ isIdentifierNameES6: isIdentifierNameES6,
+ isIdentifierES5: isIdentifierES5,
+ isIdentifierES6: isIdentifierES6
+ };
+ })();
+ /* vim: set sw=4 ts=4 et tw=80 : */
+ });
+ var keyword_1 = keyword.isKeywordES5;
+ var keyword_2 = keyword.isKeywordES6;
+ var keyword_3 = keyword.isReservedWordES5;
+ var keyword_4 = keyword.isReservedWordES6;
+ var keyword_5 = keyword.isRestrictedWord;
+ var keyword_6 = keyword.isIdentifierNameES5;
+ var keyword_7 = keyword.isIdentifierNameES6;
+ var keyword_8 = keyword.isIdentifierES5;
+ var keyword_9 = keyword.isIdentifierES6;
+
+ var utils$1 = createCommonjsModule(function (module, exports) {
+ /*
+ Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ (function () {
+
+ exports.ast = ast;
+ exports.code = code;
+ exports.keyword = keyword;
+ })();
+ /* vim: set sw=4 ts=4 et tw=80 : */
- function isLineTerminator(ch) {
- return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
- } // 7.6 Identifier Names and Identifiers
+ });
+ var utils_1$1 = utils$1.ast;
+ var utils_2$1 = utils$1.code;
+ var utils_3$1 = utils$1.keyword;
+ var lib$1 = createCommonjsModule(function (module, exports) {
- function fromCodePoint(cp) {
- if (cp <= 0xFFFF) {
- return String.fromCharCode(cp);
- }
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.shouldHighlight = shouldHighlight;
+ exports.getChalk = getChalk;
+ exports.default = highlight;
- var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
- var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
- return cu1 + cu2;
- }
+ function _jsTokens() {
+ var data = _interopRequireWildcard(jsTokens);
- IDENTIFIER_START = new Array(0x80);
+ _jsTokens = function _jsTokens() {
+ return data;
+ };
- for (ch = 0; ch < 0x80; ++ch) {
- IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
- ch >= 0x41 && ch <= 0x5A || // A..Z
- ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
+ return data;
}
- IDENTIFIER_PART = new Array(0x80);
+ function _esutils() {
+ var data = _interopRequireDefault(utils$1);
- for (ch = 0; ch < 0x80; ++ch) {
- IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
- ch >= 0x41 && ch <= 0x5A || // A..Z
- ch >= 0x30 && ch <= 0x39 || // 0..9
- ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
- }
+ _esutils = function _esutils() {
+ return data;
+ };
- function isIdentifierStartES5(ch) {
- return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ return data;
}
- function isIdentifierPartES5(ch) {
- return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
- }
+ function _chalk() {
+ var data = _interopRequireDefault(chalk);
+
+ _chalk = function _chalk() {
+ return data;
+ };
- function isIdentifierStartES6(ch) {
- return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
+ return data;
}
- function isIdentifierPartES6(ch) {
- return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
+ function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ default: obj
+ };
}
- module.exports = {
- isDecimalDigit: isDecimalDigit,
- isHexDigit: isHexDigit,
- isOctalDigit: isOctalDigit,
- isWhiteSpace: isWhiteSpace,
- isLineTerminator: isLineTerminator,
- isIdentifierStartES5: isIdentifierStartES5,
- isIdentifierPartES5: isIdentifierPartES5,
- isIdentifierStartES6: isIdentifierStartES6,
- isIdentifierPartES6: isIdentifierPartES6
- };
- })();
- /* vim: set sw=4 ts=4 et tw=80 : */
+ function _interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ } else {
+ var newObj = {};
-});
+ if (obj != null) {
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
-var keyword = createCommonjsModule(function (module) {
- /*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function () {
- 'use strict';
-
- var code$$1 = code;
-
- function isStrictModeReservedWordES6(id) {
- switch (id) {
- case 'implements':
- case 'interface':
- case 'package':
- case 'private':
- case 'protected':
- case 'public':
- case 'static':
- case 'let':
- return true;
+ if (desc.get || desc.set) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ }
- default:
- return false;
+ newObj.default = obj;
+ return newObj;
}
}
- function isKeywordES5(id, strict) {
- // yield should not be treated as keyword under non-strict mode.
- if (!strict && id === 'yield') {
- return false;
- }
-
- return isKeywordES6(id, strict);
+ function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsx_tag: chalk.yellow,
+ punctuator: chalk.yellow,
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold
+ };
}
- function isKeywordES6(id, strict) {
- if (strict && isStrictModeReservedWordES6(id)) {
- return true;
- }
+ var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+ var JSX_TAG = /^[a-z][\w-]*$/i;
+ var BRACKET = /^[()[\]{}]$/;
- switch (id.length) {
- case 2:
- return id === 'if' || id === 'in' || id === 'do';
+ function getTokenType(match) {
+ var _match$slice = match.slice(-2),
+ _match$slice2 = _slicedToArray(_match$slice, 2),
+ offset = _match$slice2[0],
+ text = _match$slice2[1];
- case 3:
- return id === 'var' || id === 'for' || id === 'new' || id === 'try';
+ var token = (0, _jsTokens().matchToToken)(match);
- case 4:
- return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
-
- case 5:
- return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
-
- case 6:
- return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
+ if (token.type === "name") {
+ if (_esutils().default.keyword.isReservedWordES6(token.value)) {
+ return "keyword";
+ }
- case 7:
- return id === 'default' || id === 'finally' || id === 'extends';
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
+ return "jsx_tag";
+ }
- case 8:
- return id === 'function' || id === 'continue' || id === 'debugger';
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
- case 10:
- return id === 'instanceof';
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
- default:
- return false;
+ if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
+ return "punctuator";
}
- }
- function isReservedWordES5(id, strict) {
- return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
+ return token.type;
}
- function isReservedWordES6(id, strict) {
- return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
+ function highlightTokens(defs, text) {
+ return text.replace(_jsTokens().default, function () {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var type = getTokenType(args);
+ var colorize = defs[type];
+
+ if (colorize) {
+ return args[0].split(NEWLINE).map(function (str) {
+ return colorize(str);
+ }).join("\n");
+ } else {
+ return args[0];
+ }
+ });
}
- function isRestrictedWord(id) {
- return id === 'eval' || id === 'arguments';
+ function shouldHighlight(options) {
+ return _chalk().default.supportsColor || options.forceColor;
}
- function isIdentifierNameES5(id) {
- var i, iz, ch;
+ function getChalk(options) {
+ var chalk = _chalk().default;
- if (id.length === 0) {
- return false;
+ if (options.forceColor) {
+ chalk = new (_chalk().default.constructor)({
+ enabled: true,
+ level: 1
+ });
}
- ch = id.charCodeAt(0);
-
- if (!code$$1.isIdentifierStartES5(ch)) {
- return false;
- }
+ return chalk;
+ }
- for (i = 1, iz = id.length; i < iz; ++i) {
- ch = id.charCodeAt(i);
+ function highlight(code) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- if (!code$$1.isIdentifierPartES5(ch)) {
- return false;
- }
+ if (shouldHighlight(options)) {
+ var chalk = getChalk(options);
+ var defs = getDefs(chalk);
+ return highlightTokens(defs, code);
+ } else {
+ return code;
}
-
- return true;
- }
-
- function decodeUtf16(lead, trail) {
- return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
}
+ });
+ unwrapExports(lib$1);
+ var lib_1 = lib$1.shouldHighlight;
+ var lib_2 = lib$1.getChalk;
- function isIdentifierNameES6(id) {
- var i, iz, ch, lowCh, check;
+ var lib$2 = createCommonjsModule(function (module, exports) {
- if (id.length === 0) {
- return false;
- }
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.codeFrameColumns = codeFrameColumns;
+ exports.default = _default;
- check = code$$1.isIdentifierStartES6;
+ function _highlight() {
+ var data = _interopRequireWildcard(lib$1);
- for (i = 0, iz = id.length; i < iz; ++i) {
- ch = id.charCodeAt(i);
+ _highlight = function _highlight() {
+ return data;
+ };
- if (0xD800 <= ch && ch <= 0xDBFF) {
- ++i;
+ return data;
+ }
- if (i >= iz) {
- return false;
- }
+ function _interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ } else {
+ var newObj = {};
- lowCh = id.charCodeAt(i);
+ if (obj != null) {
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
- if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
- return false;
+ if (desc.get || desc.set) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
}
-
- ch = decodeUtf16(ch, lowCh);
}
- if (!check(ch)) {
- return false;
- }
-
- check = code$$1.isIdentifierPartES6;
+ newObj.default = obj;
+ return newObj;
}
-
- return true;
}
- function isIdentifierES5(id, strict) {
- return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
- }
+ var deprecationWarningShown = false;
- function isIdentifierES6(id, strict) {
- return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
+ function getDefs(chalk) {
+ return {
+ gutter: chalk.grey,
+ marker: chalk.red.bold,
+ message: chalk.red.bold
+ };
}
- module.exports = {
- isKeywordES5: isKeywordES5,
- isKeywordES6: isKeywordES6,
- isReservedWordES5: isReservedWordES5,
- isReservedWordES6: isReservedWordES6,
- isRestrictedWord: isRestrictedWord,
- isIdentifierNameES5: isIdentifierNameES5,
- isIdentifierNameES6: isIdentifierNameES6,
- isIdentifierES5: isIdentifierES5,
- isIdentifierES6: isIdentifierES6
- };
- })();
- /* vim: set sw=4 ts=4 et tw=80 : */
-
-});
+ var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-var utils$2 = createCommonjsModule(function (module, exports) {
- /*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- (function () {
- 'use strict';
-
- exports.ast = ast;
- exports.code = code;
- exports.keyword = keyword;
- })();
- /* vim: set sw=4 ts=4 et tw=80 : */
-
-});
-
-var hasFlag$6 = createCommonjsModule(function (module) {
- 'use strict';
-
- module.exports = function (flag, argv$$1) {
- argv$$1 = argv$$1 || process.argv;
- var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
- var pos = argv$$1.indexOf(prefix + flag);
- var terminatorPos = argv$$1.indexOf('--');
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
- };
-});
-
-var env$2 = process.env;
-var forceColor$1;
-
-if (hasFlag$6('no-color') || hasFlag$6('no-colors') || hasFlag$6('color=false')) {
- forceColor$1 = false;
-} else if (hasFlag$6('color') || hasFlag$6('colors') || hasFlag$6('color=true') || hasFlag$6('color=always')) {
- forceColor$1 = true;
-}
-
-if ('FORCE_COLOR' in env$2) {
- forceColor$1 = env$2.FORCE_COLOR.length === 0 || parseInt(env$2.FORCE_COLOR, 10) !== 0;
-}
-
-function translateLevel$1(level) {
- if (level === 0) {
- return false;
- }
-
- return {
- level: level,
- hasBasic: true,
- has256: level >= 2,
- has16m: level >= 3
- };
-}
-
-function supportsColor$4(stream) {
- if (forceColor$1 === false) {
- return 0;
- }
+ function getMarkerLines(loc, source, opts) {
+ var startLoc = Object.assign({
+ column: 0,
+ line: -1
+ }, loc.start);
+ var endLoc = Object.assign({}, startLoc, loc.end);
- if (hasFlag$6('color=16m') || hasFlag$6('color=full') || hasFlag$6('color=truecolor')) {
- return 3;
- }
+ var _ref = opts || {},
+ _ref$linesAbove = _ref.linesAbove,
+ linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove,
+ _ref$linesBelow = _ref.linesBelow,
+ linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow;
- if (hasFlag$6('color=256')) {
- return 2;
- }
+ var startLine = startLoc.line;
+ var startColumn = startLoc.column;
+ var endLine = endLoc.line;
+ var endColumn = endLoc.column;
+ var start = Math.max(startLine - (linesAbove + 1), 0);
+ var end = Math.min(source.length, endLine + linesBelow);
- if (stream && !stream.isTTY && forceColor$1 !== true) {
- return 0;
- }
+ if (startLine === -1) {
+ start = 0;
+ }
- var min = forceColor$1 ? 1 : 0;
+ if (endLine === -1) {
+ end = source.length;
+ }
- if (process.platform === 'win32') {
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
- // libuv that enables 256 color output on Windows. Anything earlier and it
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
- // release that supports 256 colors. Windows 10 build 14931 is the first release
- // that supports 16m/TrueColor.
- var osRelease = require$$1$1.release().split('.');
+ var lineDiff = endLine - startLine;
+ var markerLines = {};
- if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
- }
+ if (lineDiff) {
+ for (var i = 0; i <= lineDiff; i++) {
+ var lineNumber = i + startLine;
- return 1;
- }
+ if (!startColumn) {
+ markerLines[lineNumber] = true;
+ } else if (i === 0) {
+ var sourceLength = source[lineNumber - 1].length;
+ markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+ } else if (i === lineDiff) {
+ markerLines[lineNumber] = [0, endColumn];
+ } else {
+ var _sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, _sourceLength];
+ }
+ }
+ } else {
+ if (startColumn === endColumn) {
+ if (startColumn) {
+ markerLines[startLine] = [startColumn, 0];
+ } else {
+ markerLines[startLine] = true;
+ }
+ } else {
+ markerLines[startLine] = [startColumn, endColumn - startColumn];
+ }
+ }
- if ('CI' in env$2) {
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) {
- return sign in env$2;
- }) || env$2.CI_NAME === 'codeship') {
- return 1;
+ return {
+ start: start,
+ end: end,
+ markerLines: markerLines
+ };
}
- return min;
- }
+ function codeFrameColumns(rawLines, loc) {
+ var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);
+ var chalk = (0, _highlight().getChalk)(opts);
+ var defs = getDefs(chalk);
- if ('TEAMCITY_VERSION' in env$2) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$2.TEAMCITY_VERSION) ? 1 : 0;
- }
+ var maybeHighlight = function maybeHighlight(chalkFn, string) {
+ return highlighted ? chalkFn(string) : string;
+ };
- if (env$2.COLORTERM === 'truecolor') {
- return 3;
- }
+ var lines = rawLines.split(NEWLINE);
+
+ var _getMarkerLines = getMarkerLines(loc, lines, opts),
+ start = _getMarkerLines.start,
+ end = _getMarkerLines.end,
+ markerLines = _getMarkerLines.markerLines;
+
+ var hasColumns = loc.start && typeof loc.start.column === "number";
+ var numberMaxWidth = String(end).length;
+ var highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines;
+ var frame = highlightedLines.split(NEWLINE).slice(start, end).map(function (line, index) {
+ var number = start + 1 + index;
+ var paddedNumber = " ".concat(number).slice(-numberMaxWidth);
+ var gutter = " ".concat(paddedNumber, " | ");
+ var hasMarker = markerLines[number];
+ var lastMarkerLine = !markerLines[number + 1];
+
+ if (hasMarker) {
+ var markerLine = "";
+
+ if (Array.isArray(hasMarker)) {
+ var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+ var numberOfMarkers = hasMarker[1] || 1;
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+
+ if (lastMarkerLine && opts.message) {
+ markerLine += " " + maybeHighlight(defs.message, opts.message);
+ }
+ }
- if ('TERM_PROGRAM' in env$2) {
- var version = parseInt((env$2.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
+ } else {
+ return " ".concat(maybeHighlight(defs.gutter, gutter)).concat(line);
+ }
+ }).join("\n");
- switch (env$2.TERM_PROGRAM) {
- case 'iTerm.app':
- return version >= 3 ? 3 : 2;
+ if (opts.message && !hasColumns) {
+ frame = "".concat(" ".repeat(numberMaxWidth + 1)).concat(opts.message, "\n").concat(frame);
+ }
- case 'Apple_Terminal':
- return 2;
- // No default
+ if (highlighted) {
+ return chalk.reset(frame);
+ } else {
+ return frame;
+ }
}
- }
-
- if (/-256(color)?$/i.test(env$2.TERM)) {
- return 2;
- }
-
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$2.TERM)) {
- return 1;
- }
-
- if ('COLORTERM' in env$2) {
- return 1;
- }
- if (env$2.TERM === 'dumb') {
- return min;
- }
-
- return min;
-}
+ function _default(rawLines, lineNumber, colNumber) {
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-function getSupportLevel$1(stream) {
- var level = supportsColor$4(stream);
- return translateLevel$1(level);
-}
+ if (!deprecationWarningShown) {
+ deprecationWarningShown = true;
+ var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
-var supportsColor_1$3 = {
- supportsColor: getSupportLevel$1,
- stdout: getSupportLevel$1(process.stdout),
- stderr: getSupportLevel$1(process.stderr)
-};
-
-var templates$4 = createCommonjsModule(function (module) {
- 'use strict';
-
- var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
- var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
- var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]);
+ if (process.emitWarning) {
+ process.emitWarning(message, "DeprecationWarning");
+ } else {
+ var deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
+ }
+ }
- function unescape(c) {
- if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {
- return String.fromCharCode(parseInt(c.slice(1), 16));
+ colNumber = Math.max(colNumber, 0);
+ var location = {
+ start: {
+ column: colNumber,
+ line: lineNumber
+ }
+ };
+ return codeFrameColumns(rawLines, location, opts);
}
+ });
+ unwrapExports(lib$2);
+ var lib_1$1 = lib$2.codeFrameColumns;
- return ESCAPES.get(c) || c;
- }
+ var ConfigError$1 = errors.ConfigError;
+ var locStart$1 = loc.locStart,
+ locEnd$1 = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent
+ // triggering the parsers getters.
- function parseArguments(name, args) {
- var results = [];
- var chunks = args.trim().split(/\s*,\s*/g);
- var matches;
+ var ownNames = Object.getOwnPropertyNames;
+ var ownDescriptor = Object.getOwnPropertyDescriptor;
+
+ function getParsers(options) {
+ var parsers = {};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
- for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var chunk = _step.value;
+ for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var plugin = _step.value;
- if (!isNaN(chunk)) {
- results.push(Number(chunk));
- } else if (matches = chunk.match(STRING_REGEX)) {
- results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) {
- return escape ? unescape(escape) : chr;
- }));
- } else {
- throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')"));
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ if (!plugin.parsers) {
+ continue;
}
- }
- }
-
- return results;
- }
-
- function parseStyle(style) {
- STYLE_REGEX.lastIndex = 0;
- var results = [];
- var matches;
-
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
- var name = matches[1];
- if (matches[2]) {
- var args = parseArguments(name, matches[2]);
- results.push([name].concat(args));
- } else {
- results.push([name]);
- }
- }
-
- return results;
- }
-
- function buildStyle(chalk, styles) {
- var enabled = {};
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var layer = _step2.value;
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
try {
- for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var style = _step3.value;
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
+ for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var name = _step2.value;
+ Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name));
}
} catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
}
} finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ if (_didIteratorError2) {
+ throw _iteratorError2;
}
}
}
}
} catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
}
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ if (_didIteratorError) {
+ throw _iteratorError;
}
}
}
- var current = chalk;
+ return parsers;
+ }
- var _arr = Object.keys(enabled);
+ function resolveParser(opts, parsers) {
+ parsers = parsers || getParsers(opts);
- for (var _i = 0; _i < _arr.length; _i++) {
- var styleName = _arr[_i];
+ if (typeof opts.parser === "function") {
+ // Custom parser API always works with JavaScript.
+ return {
+ parse: opts.parser,
+ astFormat: "estree",
+ locStart: locStart$1,
+ locEnd: locEnd$1
+ };
+ }
- if (Array.isArray(enabled[styleName])) {
- if (!(styleName in current)) {
- throw new Error("Unknown Chalk style: ".concat(styleName));
- }
+ if (typeof opts.parser === "string") {
+ if (Object.prototype.hasOwnProperty.call(parsers, opts.parser)) {
+ return parsers[opts.parser];
+ }
+ /* istanbul ignore next */
- if (enabled[styleName].length > 0) {
- current = current[styleName].apply(current, enabled[styleName]);
- } else {
- current = current[styleName];
- }
+
+ {
+ throw new ConfigError$1("Couldn't resolve parser \"".concat(opts.parser, "\". Parsers must be explicitly added to the standalone bundle."));
}
}
-
- return current;
}
- module.exports = function (chalk, tmp) {
- var styles = [];
- var chunks = [];
- var chunk = []; // eslint-disable-next-line max-params
+ function parse(text, opts) {
+ var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call
+ // the parsers getters when actually calling the parser `parse` function.
- tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) {
- if (escapeChar) {
- chunk.push(unescape(escapeChar));
- } else if (style) {
- var str = chunk.join('');
- chunk = [];
- chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
- styles.push({
- inverse: inverse,
- styles: parseStyle(style)
- });
- } else if (close) {
- if (styles.length === 0) {
- throw new Error('Found extraneous } in Chalk template literal');
+ var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) {
+ return Object.defineProperty(object, parserName, {
+ enumerable: true,
+ get: function get() {
+ return parsers[parserName].parse;
}
+ });
+ }, {});
+ var parser = resolveParser(opts, parsers);
- chunks.push(buildStyle(chalk, styles)(chunk.join('')));
- chunk = [];
- styles.pop();
- } else {
- chunk.push(chr);
+ try {
+ if (parser.preprocess) {
+ text = parser.preprocess(text, opts);
}
- });
- chunks.push(chunk.join(''));
-
- if (styles.length > 0) {
- var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)");
- throw new Error(errMsg);
- }
-
- return chunks.join('');
- };
-});
-
-var chalk$5 = createCommonjsModule(function (module) {
- 'use strict';
-
- var stdoutColor = supportsColor_1$3.stdout;
- var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping
- var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such
+ return {
+ text: text,
+ ast: parser.parse(text, parsersForCustomParserApi, opts)
+ };
+ } catch (error) {
+ var loc = error.loc;
- var skipModels = new Set(['gray']);
- var styles = Object.create(null);
+ if (loc) {
+ var codeFrame = lib$2;
+ error.codeFrame = codeFrame.codeFrameColumns(text, loc, {
+ highlightCode: true
+ });
+ error.message += "\n" + error.codeFrame;
+ throw error;
+ }
+ /* istanbul ignore next */
- function applyOptions(obj, options) {
- options = options || {}; // Detect level if not set manually
- var scLevel = stdoutColor ? stdoutColor.level : 0;
- obj.level = options.level === undefined ? scLevel : options.level;
- obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
+ throw error.stack;
+ }
}
- function Chalk(options) {
- // We check for this.template here since calling `chalk.constructor()`
- // by itself will have a `this` of a previously constructed chalk object
- if (!this || !(this instanceof Chalk) || this.template) {
- var _chalk = {};
- applyOptions(_chalk, options);
+ var parser = {
+ parse: parse,
+ resolveParser: resolveParser
+ };
- _chalk.template = function () {
- var args = [].slice.call(arguments);
- return chalkTag.apply(null, [_chalk.template].concat(args));
- };
+ var UndefinedParserError$1 = errors.UndefinedParserError;
+ var getSupportInfo$1 = support.getSupportInfo;
+ var resolveParser$1 = parser.resolveParser;
+ var hiddenDefaults = {
+ astFormat: "estree",
+ printer: {},
+ originalText: undefined,
+ locStart: null,
+ locEnd: null
+ }; // Copy options and fill in default values.
+
+ function normalize$1(options, opts) {
+ opts = opts || {};
+ var rawOptions = Object.assign({}, options);
+ var supportOptions = getSupportInfo$1(null, {
+ plugins: options.plugins,
+ showUnreleased: true,
+ showDeprecated: true
+ }).options;
+ var defaults = supportOptions.reduce(function (reduced, optionInfo) {
+ return optionInfo.default !== undefined ? Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.default)) : reduced;
+ }, Object.assign({}, hiddenDefaults));
+
+ if (!rawOptions.parser) {
+ if (!rawOptions.filepath) {
+ var logger = opts.logger || console;
+ logger.warn("No parser and no filepath given, using 'babel' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred.");
+ rawOptions.parser = "babel";
+ } else {
+ rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins);
- Object.setPrototypeOf(_chalk, Chalk.prototype);
- Object.setPrototypeOf(_chalk.template, _chalk);
- _chalk.template.constructor = Chalk;
- return _chalk.template;
+ if (!rawOptions.parser) {
+ throw new UndefinedParserError$1("No parser could be inferred for file: ".concat(rawOptions.filepath));
+ }
+ }
}
- applyOptions(this, options);
- } // Use bright blue on Windows as the normal blue color is illegible
-
-
- if (isSimpleWindowsTerm) {
- ansiStyles.blue.open = "\x1B[94m";
- }
-
- var _arr = Object.keys(ansiStyles);
-
- var _loop = function _loop() {
- var key = _arr[_i];
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
- styles[key] = {
- get: function get() {
- var codes = ansiStyles[key];
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ var parser = resolveParser$1(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) {
+ return x.name === "parser";
+ })], {
+ passThrough: true,
+ logger: false
+ }));
+ rawOptions.astFormat = parser.astFormat;
+ rawOptions.locEnd = parser.locEnd;
+ rawOptions.locStart = parser.locStart;
+ var plugin = getPlugin(rawOptions);
+ rawOptions.printer = plugin.printers[rawOptions.astFormat];
+ var pluginDefaults = supportOptions.filter(function (optionInfo) {
+ return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name] !== undefined;
+ }).reduce(function (reduced, optionInfo) {
+ return Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.pluginDefaults[plugin.name]));
+ }, {});
+ var mixedDefaults = Object.assign({}, defaults, pluginDefaults);
+ Object.keys(mixedDefaults).forEach(function (k) {
+ if (rawOptions[k] == null) {
+ rawOptions[k] = mixedDefaults[k];
}
- };
- };
-
- for (var _i = 0; _i < _arr.length; _i++) {
- _loop();
- }
+ });
- styles.visible = {
- get: function get() {
- return build.call(this, this._styles || [], true, 'visible');
+ if (rawOptions.parser === "json") {
+ rawOptions.trailingComma = "none";
}
- };
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
- var _arr2 = Object.keys(ansiStyles.color.ansi);
+ return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({
+ passThrough: Object.keys(hiddenDefaults)
+ }, opts));
+ }
- var _loop2 = function _loop2() {
- var model = _arr2[_i2];
+ function getPlugin(options) {
+ var astFormat = options.astFormat;
- if (skipModels.has(model)) {
- return "continue";
+ if (!astFormat) {
+ throw new Error("getPlugin() requires astFormat to be set");
}
- styles[model] = {
- get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.color.close,
- closeRe: ansiStyles.color.closeRe
- };
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
- };
- }
- };
- };
+ var printerPlugin = options.plugins.find(function (plugin) {
+ return plugin.printers && plugin.printers[astFormat];
+ });
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
- var _ret = _loop2();
+ if (!printerPlugin) {
+ throw new Error("Couldn't find plugin for AST format \"".concat(astFormat, "\""));
+ }
- if (_ret === "continue") continue;
+ return printerPlugin;
}
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
-
- var _arr3 = Object.keys(ansiStyles.bgColor.ansi);
+ function getInterpreter(filepath) {
+ if (typeof filepath !== "string") {
+ return "";
+ }
- var _loop3 = function _loop3() {
- var model = _arr3[_i3];
+ var fd;
- if (skipModels.has(model)) {
- return "continue";
+ try {
+ fd = fs.openSync(filepath, "r");
+ } catch (err) {
+ return "";
}
- var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
- styles[bgModel] = {
- get: function get() {
- var level = this.level;
- return function () {
- var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
- var codes = {
- open: open,
- close: ansiStyles.bgColor.close,
- closeRe: ansiStyles.bgColor.closeRe
- };
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
- };
- }
- };
- };
+ try {
+ var liner = new readlines(fd);
+ var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
- var _ret2 = _loop3();
+ var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/);
- if (_ret2 === "continue") continue;
- }
+ if (m1) {
+ return m1[1];
+ } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node
- var proto = Object.defineProperties(function () {}, styles);
- function build(_styles, _empty, key) {
- var builder = function builder() {
- return applyStyle.apply(builder, arguments);
- };
+ var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/);
- builder._styles = _styles;
- builder._empty = _empty;
- var self = this;
- Object.defineProperty(builder, 'level', {
- enumerable: true,
- get: function get() {
- return self.level;
- },
- set: function set(level) {
- self.level = level;
- }
- });
- Object.defineProperty(builder, 'enabled', {
- enumerable: true,
- get: function get() {
- return self.enabled;
- },
- set: function set(enabled) {
- self.enabled = enabled;
+ if (m2) {
+ return m2[1];
}
- }); // See below for fix regarding invisible grey/dim combination on Windows
- builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is
- // no way to create a function with a different prototype
+ return "";
+ } catch (err) {
+ // There are some weird cases where paths are missing, causing Jest
+ // failures. It's unclear what these correspond to in the real world.
+ return "";
+ } finally {
+ try {
+ // There are some weird cases where paths are missing, causing Jest
+ // failures. It's unclear what these correspond to in the real world.
+ fs.closeSync(fd);
+ } catch (err) {// nop
+ }
+ }
+ }
- builder.__proto__ = proto; // eslint-disable-line no-proto
+ function inferParser(filepath, plugins) {
+ var filepathParts = normalizePath(filepath).split("/");
+ var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the
+ // interpreter in the shebang line, if any; but since this requires FS access,
+ // do it last.
- return builder;
+ var language = getSupportInfo$1(null, {
+ plugins: plugins
+ }).languages.find(function (language) {
+ return language.since !== null && (language.extensions && language.extensions.some(function (extension) {
+ return filename.endsWith(extension);
+ }) || language.filenames && language.filenames.find(function (name) {
+ return name.toLowerCase() === filename;
+ }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1);
+ });
+ return language && language.parsers[0];
}
- function applyStyle() {
- // Support varags, but simply cast to string in case there's only one arg
- var args = arguments;
- var argsLen = args.length;
- var str = String(arguments[0]);
+ var options$1 = {
+ normalize: normalize$1,
+ hiddenDefaults: hiddenDefaults,
+ inferParser: inferParser
+ };
- if (argsLen === 0) {
- return '';
+ function massageAST(ast, options, parent) {
+ if (Array.isArray(ast)) {
+ return ast.map(function (e) {
+ return massageAST(e, options, parent);
+ }).filter(function (e) {
+ return e;
+ });
}
- if (argsLen > 1) {
- // Don't slice `arguments`, it prevents V8 optimizations
- for (var a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
- }
+ if (!ast || _typeof(ast) !== "object") {
+ return ast;
}
- if (!this.enabled || this.level <= 0 || !str) {
- return this._empty ? '' : str;
- } // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
- // see https://github.com/chalk/chalk/issues/58
- // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
+ var newObj = {};
+ for (var _i = 0, _Object$keys = Object.keys(ast); _i < _Object$keys.length; _i++) {
+ var key = _Object$keys[_i];
- var originalDim = ansiStyles.dim.open;
-
- if (isSimpleWindowsTerm && this.hasGrey) {
- ansiStyles.dim.open = '';
+ if (typeof ast[key] !== "function") {
+ newObj[key] = massageAST(ast[key], options, ast);
+ }
}
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ if (options.printer.massageAstNode) {
+ var result = options.printer.massageAstNode(ast, newObj, parent);
- try {
- for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var code = _step.value;
- // Replace any instances already present with a re-opening code
- // otherwise only the part of the string until said closing code
- // will be colored, and the rest will simply be 'plain'.
- str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen
- // after next line to fix a bleed issue on macOS
- // https://github.com/chalk/chalk/pull/92
-
- str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open));
- } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ if (result === null) {
+ return undefined;
+ }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
+ if (result) {
+ return result;
}
}
- ansiStyles.dim.open = originalDim;
- return str;
+ return newObj;
}
- function chalkTag(chalk, strings) {
- if (!Array.isArray(strings)) {
- // If chalk() was called by itself or with a string,
- // return the string itself as a string.
- return [].slice.call(arguments, 1).join(' ');
- }
-
- var args = [].slice.call(arguments, 2);
- var parts = [strings.raw[0]];
+ var massageAst = massageAST;
- for (var i = 1; i < strings.length; i++) {
- parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
- parts.push(String(strings.raw[i]));
- }
+ function assert() {}
- return templates$4(chalk, parts.join(''));
- }
+ assert.ok = function () {};
- Object.defineProperties(Chalk.prototype, styles);
- module.exports = Chalk(); // eslint-disable-line new-cap
+ assert.strictEqual = function () {};
- module.exports.supportsColor = stdoutColor;
- module.exports.default = module.exports; // For TypeScript
-});
+ /**
+ * @param {Doc[]} parts
+ * @returns Doc
+ */
-var lib$3 = createCommonjsModule(function (module, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.shouldHighlight = shouldHighlight;
- exports.getChalk = getChalk;
- exports.default = highlight;
+ function concat(parts) {
+ // access the internals of a document directly.
+ // if(parts.length === 1) {
+ // // If it's a single document, no need to concat it.
+ // return parts[0];
+ // }
- function _jsTokens() {
- var data = _interopRequireWildcard$$1(jsTokens);
- _jsTokens = function _jsTokens() {
- return data;
+ return {
+ type: "concat",
+ parts: parts
};
-
- return data;
}
+ /**
+ * @param {Doc} contents
+ * @returns Doc
+ */
- function _esutils() {
- var data = _interopRequireDefault$$1(utils$2);
- _esutils = function _esutils() {
- return data;
+ function indent(contents) {
+
+ return {
+ type: "indent",
+ contents: contents
};
+ }
+ /**
+ * @param {number} n
+ * @param {Doc} contents
+ * @returns Doc
+ */
- return data;
+
+ function align(n, contents) {
+
+ return {
+ type: "align",
+ contents: contents,
+ n: n
+ };
}
+ /**
+ * @param {Doc} contents
+ * @param {object} [opts] - TBD ???
+ * @returns Doc
+ */
- function _chalk() {
- var data = _interopRequireDefault$$1(chalk$5);
- _chalk = function _chalk() {
- return data;
+ function group(contents, opts) {
+ opts = opts || {};
+
+ return {
+ type: "group",
+ id: opts.id,
+ contents: contents,
+ break: !!opts.shouldBreak,
+ expandedStates: opts.expandedStates
};
+ }
+ /**
+ * @param {Doc} contents
+ * @returns Doc
+ */
- return data;
+
+ function dedentToRoot(contents) {
+ return align(-Infinity, contents);
}
+ /**
+ * @param {Doc} contents
+ * @returns Doc
+ */
- function _interopRequireDefault$$1(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
+
+ function markAsRoot(contents) {
+ // @ts-ignore - TBD ???:
+ return align({
+ type: "root"
+ }, contents);
}
+ /**
+ * @param {Doc} contents
+ * @returns Doc
+ */
- function _interopRequireWildcard$$1(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
+ function dedent(contents) {
+ return align(-1, contents);
+ }
+ /**
+ * @param {Doc[]} states
+ * @param {object} [opts] - TBD ???
+ * @returns Doc
+ */
- if (desc.get || desc.set) {
- Object.defineProperty(newObj, key, desc);
- } else {
- newObj[key] = obj[key];
- }
- }
- }
- }
- newObj.default = obj;
- return newObj;
- }
+ function conditionalGroup(states, opts) {
+ return group(states[0], Object.assign(opts || {}, {
+ expandedStates: states
+ }));
}
+ /**
+ * @param {Doc[]} parts
+ * @returns Doc
+ */
+
+
+ function fill(parts) {
+
+ return {
+ type: "fill",
+ parts: parts
+ };
+ }
+ /**
+ * @param {Doc} [breakContents]
+ * @param {Doc} [flatContents]
+ * @param {object} [opts] - TBD ???
+ * @returns Doc
+ */
+
+
+ function ifBreak(breakContents, flatContents, opts) {
+ opts = opts || {};
- function getDefs(chalk) {
return {
- keyword: chalk.cyan,
- capitalized: chalk.yellow,
- jsx_tag: chalk.yellow,
- punctuator: chalk.yellow,
- number: chalk.magenta,
- string: chalk.green,
- regex: chalk.magenta,
- comment: chalk.grey,
- invalid: chalk.white.bgRed.bold
+ type: "if-break",
+ breakContents: breakContents,
+ flatContents: flatContents,
+ groupId: opts.groupId
};
}
+ /**
+ * @param {Doc} contents
+ * @returns Doc
+ */
- var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
- var JSX_TAG = /^[a-z][\w-]*$/i;
- var BRACKET = /^[()[\]{}]$/;
- function getTokenType(match) {
- var _match$slice = match.slice(-2),
- _match$slice2 = _slicedToArray(_match$slice, 2),
- offset = _match$slice2[0],
- text = _match$slice2[1];
+ function lineSuffix(contents) {
- var token = (0, _jsTokens().matchToToken)(match);
+ return {
+ type: "line-suffix",
+ contents: contents
+ };
+ }
- if (token.type === "name") {
- if (_esutils().default.keyword.isReservedWordES6(token.value)) {
- return "keyword";
- }
+ var lineSuffixBoundary = {
+ type: "line-suffix-boundary"
+ };
+ var breakParent = {
+ type: "break-parent"
+ };
+ var trim = {
+ type: "trim"
+ };
+ var line = {
+ type: "line"
+ };
+ var softline = {
+ type: "line",
+ soft: true
+ };
+ var hardline = concat([{
+ type: "line",
+ hard: true
+ }, breakParent]);
+ var literalline = concat([{
+ type: "line",
+ hard: true,
+ literal: true
+ }, breakParent]);
+ var cursor = {
+ type: "cursor",
+ placeholder: Symbol("cursor")
+ };
+ /**
+ * @param {Doc} sep
+ * @param {Doc[]} arr
+ * @returns Doc
+ */
- if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
- return "jsx_tag";
- }
+ function join(sep, arr) {
+ var res = [];
- if (token.value[0] !== token.value[0].toLowerCase()) {
- return "capitalized";
+ for (var i = 0; i < arr.length; i++) {
+ if (i !== 0) {
+ res.push(sep);
}
- }
- if (token.type === "punctuator" && BRACKET.test(token.value)) {
- return "bracket";
+ res.push(arr[i]);
}
- if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
- return "punctuator";
- }
-
- return token.type;
+ return concat(res);
}
+ /**
+ * @param {Doc} doc
+ * @param {number} size
+ * @param {number} tabWidth
+ */
- function highlightTokens(defs, text) {
- return text.replace(_jsTokens().default, function () {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var type = getTokenType(args);
- var colorize = defs[type];
+ function addAlignmentToDoc(doc, size, tabWidth) {
+ var aligned = doc;
- if (colorize) {
- return args[0].split(NEWLINE).map(function (str) {
- return colorize(str);
- }).join("\n");
- } else {
- return args[0];
- }
- });
- }
+ if (size > 0) {
+ // Use indent to add tabs for all the levels of tabs we need
+ for (var i = 0; i < Math.floor(size / tabWidth); ++i) {
+ aligned = indent(aligned);
+ } // Use align for all the spaces that are needed
- function shouldHighlight(options) {
- return _chalk().default.supportsColor || options.forceColor;
- }
- function getChalk(options) {
- var chalk = _chalk().default;
+ aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current
+ // indentation, so we use -Infinity to reset the indentation to 0
- if (options.forceColor) {
- chalk = new (_chalk().default.constructor)({
- enabled: true,
- level: 1
- });
+ aligned = align(-Infinity, aligned);
}
- return chalk;
+ return aligned;
}
- function highlight(code) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var docBuilders = {
+ concat: concat,
+ join: join,
+ line: line,
+ softline: softline,
+ hardline: hardline,
+ literalline: literalline,
+ group: group,
+ conditionalGroup: conditionalGroup,
+ fill: fill,
+ lineSuffix: lineSuffix,
+ lineSuffixBoundary: lineSuffixBoundary,
+ cursor: cursor,
+ breakParent: breakParent,
+ ifBreak: ifBreak,
+ trim: trim,
+ indent: indent,
+ align: align,
+ addAlignmentToDoc: addAlignmentToDoc,
+ markAsRoot: markAsRoot,
+ dedentToRoot: dedentToRoot,
+ dedent: dedent
+ };
- if (shouldHighlight(options)) {
- var chalk = getChalk(options);
- var defs = getDefs(chalk);
- return highlightTokens(defs, code);
- } else {
- return code;
- }
- }
-});
-unwrapExports(lib$3);
+ var ansiRegex = function ansiRegex(options) {
+ options = Object.assign({
+ onlyFirst: false
+ }, options);
+ var pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'].join('|');
+ return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
+ };
-var lib$2 = createCommonjsModule(function (module, exports) {
- "use strict";
+ var stripAnsi = function stripAnsi(string) {
+ return typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
+ };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.codeFrameColumns = codeFrameColumns;
- exports.default = _default;
+ var stripAnsi_1 = stripAnsi;
+ var default_1$1 = stripAnsi;
+ stripAnsi_1.default = default_1$1;
- function _highlight() {
- var data = _interopRequireWildcard(lib$3);
+ /* eslint-disable yoda */
- _highlight = function _highlight() {
- return data;
- };
+ var isFullwidthCodePoint = function isFullwidthCodePoint(codePoint) {
+ if (Number.isNaN(codePoint)) {
+ return false;
+ } // Code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
- return data;
- }
- function _interopRequireWildcard(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
+ if (codePoint >= 0x1100 && (codePoint <= 0x115F || // Hangul Jamo
+ codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ 0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ 0x3250 <= codePoint && codePoint <= 0x4DBF || // CJK Unified Ideographs .. Yi Radicals
+ 0x4E00 <= codePoint && codePoint <= 0xA4C6 || // Hangul Jamo Extended-A
+ 0xA960 <= codePoint && codePoint <= 0xA97C || // Hangul Syllables
+ 0xAC00 <= codePoint && codePoint <= 0xD7A3 || // CJK Compatibility Ideographs
+ 0xF900 <= codePoint && codePoint <= 0xFAFF || // Vertical Forms
+ 0xFE10 <= codePoint && codePoint <= 0xFE19 || // CJK Compatibility Forms .. Small Form Variants
+ 0xFE30 <= codePoint && codePoint <= 0xFE6B || // Halfwidth and Fullwidth Forms
+ 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || // Kana Supplement
+ 0x1B000 <= codePoint && codePoint <= 0x1B001 || // Enclosed Ideographic Supplement
+ 0x1F200 <= codePoint && codePoint <= 0x1F251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ 0x20000 <= codePoint && codePoint <= 0x3FFFD)) {
+ return true;
+ }
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
+ return false;
+ };
- if (desc.get || desc.set) {
- Object.defineProperty(newObj, key, desc);
- } else {
- newObj[key] = obj[key];
- }
- }
- }
- }
+ var isFullwidthCodePoint_1 = isFullwidthCodePoint;
+ var default_1$2 = isFullwidthCodePoint;
+ isFullwidthCodePoint_1.default = default_1$2;
+
+ var emojiRegex = function emojiRegex() {
+ // https://mths.be/emoji
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
+ };
- newObj.default = obj;
- return newObj;
+ var stringWidth = function stringWidth(string) {
+ string = string.replace(emojiRegex(), ' ');
+
+ if (typeof string !== 'string' || string.length === 0) {
+ return 0;
}
- }
- var deprecationWarningShown = false;
+ string = stripAnsi_1(string);
+ var width = 0;
- function getDefs(chalk) {
- return {
- gutter: chalk.grey,
- marker: chalk.red.bold,
- message: chalk.red.bold
- };
- }
+ for (var i = 0; i < string.length; i++) {
+ var code = string.codePointAt(i); // Ignore control characters
- var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+ if (code <= 0x1F || code >= 0x7F && code <= 0x9F) {
+ continue;
+ } // Ignore combining characters
- function getMarkerLines(loc, source, opts) {
- var startLoc = Object.assign({
- column: 0,
- line: -1
- }, loc.start);
- var endLoc = Object.assign({}, startLoc, loc.end);
- var _ref = opts || {},
- _ref$linesAbove = _ref.linesAbove,
- linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove,
- _ref$linesBelow = _ref.linesBelow,
- linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow;
+ if (code >= 0x300 && code <= 0x36F) {
+ continue;
+ } // Surrogates
- var startLine = startLoc.line;
- var startColumn = startLoc.column;
- var endLine = endLoc.line;
- var endColumn = endLoc.column;
- var start = Math.max(startLine - (linesAbove + 1), 0);
- var end = Math.min(source.length, endLine + linesBelow);
- if (startLine === -1) {
- start = 0;
- }
+ if (code > 0xFFFF) {
+ i++;
+ }
- if (endLine === -1) {
- end = source.length;
+ width += isFullwidthCodePoint_1(code) ? 2 : 1;
}
- var lineDiff = endLine - startLine;
- var markerLines = {};
+ return width;
+ };
- if (lineDiff) {
- for (var i = 0; i <= lineDiff; i++) {
- var lineNumber = i + startLine;
+ var stringWidth_1 = stringWidth; // TODO: remove this in the next major version
- if (!startColumn) {
- markerLines[lineNumber] = true;
- } else if (i === 0) {
- var sourceLength = source[lineNumber - 1].length;
- markerLines[lineNumber] = [startColumn, sourceLength - startColumn];
- } else if (i === lineDiff) {
- markerLines[lineNumber] = [0, endColumn];
- } else {
- var _sourceLength = source[lineNumber - i].length;
- markerLines[lineNumber] = [0, _sourceLength];
- }
- }
- } else {
- if (startColumn === endColumn) {
- if (startColumn) {
- markerLines[startLine] = [startColumn, 0];
- } else {
- markerLines[startLine] = true;
- }
- } else {
- markerLines[startLine] = [startColumn, endColumn - startColumn];
+ var default_1$3 = stringWidth;
+ stringWidth_1.default = default_1$3;
+
+ var notAsciiRegex = /[^\x20-\x7F]/;
+
+ function isExportDeclaration(node) {
+ if (node) {
+ switch (node.type) {
+ case "ExportDefaultDeclaration":
+ case "ExportDefaultSpecifier":
+ case "DeclareExportDeclaration":
+ case "ExportNamedDeclaration":
+ case "ExportAllDeclaration":
+ return true;
}
}
- return {
- start: start,
- end: end,
- markerLines: markerLines
- };
+ return false;
}
- function codeFrameColumns(rawLines, loc) {
- var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);
- var chalk = (0, _highlight().getChalk)(opts);
- var defs = getDefs(chalk);
+ function getParentExportDeclaration(path) {
+ var parentNode = path.getParentNode();
- var maybeHighlight = function maybeHighlight(chalkFn, string) {
- return highlighted ? chalkFn(string) : string;
- };
+ if (path.getName() === "declaration" && isExportDeclaration(parentNode)) {
+ return parentNode;
+ }
- if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts);
- var lines = rawLines.split(NEWLINE);
+ return null;
+ }
- var _getMarkerLines = getMarkerLines(loc, lines, opts),
- start = _getMarkerLines.start,
- end = _getMarkerLines.end,
- markerLines = _getMarkerLines.markerLines;
+ function getPenultimate(arr) {
+ if (arr.length > 1) {
+ return arr[arr.length - 2];
+ }
- var hasColumns = loc.start && typeof loc.start.column === "number";
- var numberMaxWidth = String(end).length;
- var frame = lines.slice(start, end).map(function (line, index) {
- var number = start + 1 + index;
- var paddedNumber = " ".concat(number).slice(-numberMaxWidth);
- var gutter = " ".concat(paddedNumber, " | ");
- var hasMarker = markerLines[number];
- var lastMarkerLine = !markerLines[number + 1];
+ return null;
+ }
+ /**
+ * @typedef {{backwards?: boolean}} SkipOptions
+ */
- if (hasMarker) {
- var markerLine = "";
+ /**
+ * @param {string | RegExp} chars
+ * @returns {(text: string, index: number | false, opts?: SkipOptions) => number | false}
+ */
- if (Array.isArray(hasMarker)) {
- var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
- var numberOfMarkers = hasMarker[1] || 1;
- markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
- if (lastMarkerLine && opts.message) {
- markerLine += " " + maybeHighlight(defs.message, opts.message);
- }
- }
+ function skip(chars) {
+ return function (text, index, opts) {
+ var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having
+ // to check for failures (did someone say monads?).
- return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
- } else {
- return " ".concat(maybeHighlight(defs.gutter, gutter)).concat(line);
+ if (index === false) {
+ return false;
}
- }).join("\n");
- if (opts.message && !hasColumns) {
- frame = "".concat(" ".repeat(numberMaxWidth + 1)).concat(opts.message, "\n").concat(frame);
- }
-
- if (highlighted) {
- return chalk.reset(frame);
- } else {
- return frame;
- }
- }
+ var length = text.length;
+ var cursor = index;
- function _default(rawLines, lineNumber, colNumber) {
- var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+ while (cursor >= 0 && cursor < length) {
+ var c = text.charAt(cursor);
- if (!deprecationWarningShown) {
- deprecationWarningShown = true;
- var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
+ if (chars instanceof RegExp) {
+ if (!chars.test(c)) {
+ return cursor;
+ }
+ } else if (chars.indexOf(c) === -1) {
+ return cursor;
+ }
- if (process.emitWarning) {
- process.emitWarning(message, "DeprecationWarning");
- } else {
- var deprecationError = new Error(message);
- deprecationError.name = "DeprecationWarning";
- console.warn(new Error(message));
+ backwards ? cursor-- : cursor++;
}
- }
- colNumber = Math.max(colNumber, 0);
- var location = {
- start: {
- column: colNumber,
- line: lineNumber
+ if (cursor === -1 || cursor === length) {
+ // If we reached the beginning or end of the file, return the
+ // out-of-bounds cursor. It's up to the caller to handle this
+ // correctly. We don't want to indicate `false` though if it
+ // actually skipped valid characters.
+ return cursor;
}
+
+ return false;
};
- return codeFrameColumns(rawLines, location, opts);
}
-});
-unwrapExports(lib$2);
+ /**
+ * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false}
+ */
-var ConfigError$1 = errors.ConfigError;
-var locStart = loc.locStart;
-var locEnd = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent
-// triggering the parsers getters.
-var ownNames = Object.getOwnPropertyNames;
-var ownDescriptor = Object.getOwnPropertyDescriptor;
+ var skipWhitespace = skip(/\s/);
+ /**
+ * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false}
+ */
-function getParsers(options) {
- var parsers = {};
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var skipSpaces = skip(" \t");
+ /**
+ * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false}
+ */
- try {
- for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var plugin = _step.value;
+ var skipToLineEnd = skip(",; \t");
+ /**
+ * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false}
+ */
- if (!plugin.parsers) {
- continue;
- }
+ var skipEverythingButNewLine = skip(/[^\r\n]/);
+ /**
+ * @param {string} text
+ * @param {number | false} index
+ * @returns {number | false}
+ */
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ function skipInlineComment(text, index) {
+ if (index === false) {
+ return false;
+ }
- try {
- for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var name = _step2.value;
- Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name));
+ if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") {
+ for (var i = index + 2; i < text.length; ++i) {
+ if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
+ return i + 2;
}
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
}
}
- }
-
- return parsers;
-}
-
-function resolveParser$1(opts, parsers) {
- parsers = parsers || getParsers(opts);
- if (typeof opts.parser === "function") {
- // Custom parser API always works with JavaScript.
- return {
- parse: opts.parser,
- astFormat: "estree",
- locStart: locStart,
- locEnd: locEnd
- };
+ return index;
}
+ /**
+ * @param {string} text
+ * @param {number | false} index
+ * @returns {number | false}
+ */
- if (typeof opts.parser === "string") {
- if (parsers.hasOwnProperty(opts.parser)) {
- return parsers[opts.parser];
- }
- /* istanbul ignore next */
+ function skipTrailingComment(text, index) {
+ if (index === false) {
+ return false;
+ }
- {
- throw new ConfigError$1("Couldn't resolve parser \"".concat(opts.parser, "\". Parsers must be explicitly added to the standalone bundle."));
+ if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") {
+ return skipEverythingButNewLine(text, index);
}
- }
-}
-function parse$2(text, opts) {
- var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call
- // the parsers getters when actually calling the parser `parse` function.
+ return index;
+ } // This one doesn't use the above helper function because it wants to
+ // test \r\n in order and `skip` doesn't support ordering and we only
+ // want to skip one newline. It's simple to implement.
- var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) {
- return Object.defineProperty(object, parserName, {
- enumerable: true,
- get: function get() {
- return parsers[parserName].parse;
- }
- });
- }, {});
- var parser = resolveParser$1(opts, parsers);
+ /**
+ * @param {string} text
+ * @param {number | false} index
+ * @param {SkipOptions=} opts
+ * @returns {number | false}
+ */
- try {
- if (parser.preprocess) {
- text = parser.preprocess(text, opts);
- }
- return {
- text: text,
- ast: parser.parse(text, parsersForCustomParserApi, opts)
- };
- } catch (error) {
- var loc$$1 = error.loc;
+ function skipNewline(text, index, opts) {
+ var backwards = opts && opts.backwards;
- if (loc$$1) {
- var codeFrame = lib$2;
- error.codeFrame = codeFrame.codeFrameColumns(text, loc$$1, {
- highlightCode: true
- });
- error.message += "\n" + error.codeFrame;
- throw error;
+ if (index === false) {
+ return false;
}
- /* istanbul ignore next */
+ var atIndex = text.charAt(index);
- throw error.stack;
- }
-}
-
-var parser = {
- parse: parse$2,
- resolveParser: resolveParser$1
-};
-
-var UndefinedParserError = errors.UndefinedParserError;
-var getSupportInfo$1 = support.getSupportInfo;
-var resolveParser = parser.resolveParser;
-var hiddenDefaults = {
- astFormat: "estree",
- printer: {},
- originalText: undefined,
- locStart: null,
- locEnd: null
-}; // Copy options and fill in default values.
-
-function normalize(options, opts) {
- opts = opts || {};
- var rawOptions = Object.assign({}, options);
- var supportOptions = getSupportInfo$1(null, {
- plugins: options.plugins,
- showUnreleased: true,
- showDeprecated: true
- }).options;
- var defaults = supportOptions.reduce(function (reduced, optionInfo) {
- return optionInfo.default !== undefined ? Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.default)) : reduced;
- }, Object.assign({}, hiddenDefaults));
-
- if (!rawOptions.parser) {
- if (!rawOptions.filepath) {
- var logger = opts.logger || console;
- logger.warn("No parser and no filepath given, using 'babel' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred.");
- rawOptions.parser = "babel";
+ if (backwards) {
+ if (text.charAt(index - 1) === "\r" && atIndex === "\n") {
+ return index - 2;
+ }
+
+ if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
+ return index - 1;
+ }
} else {
- rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins);
-
- if (!rawOptions.parser) {
- throw new UndefinedParserError("No parser could be inferred for file: ".concat(rawOptions.filepath));
- }
- }
- }
-
- var parser$$1 = resolveParser(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) {
- return x.name === "parser";
- })], {
- passThrough: true,
- logger: false
- }));
- rawOptions.astFormat = parser$$1.astFormat;
- rawOptions.locEnd = parser$$1.locEnd;
- rawOptions.locStart = parser$$1.locStart;
- var plugin = getPlugin(rawOptions);
- rawOptions.printer = plugin.printers[rawOptions.astFormat];
- var pluginDefaults = supportOptions.filter(function (optionInfo) {
- return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name];
- }).reduce(function (reduced, optionInfo) {
- return Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.pluginDefaults[plugin.name]));
- }, {});
- var mixedDefaults = Object.assign({}, defaults, pluginDefaults);
- Object.keys(mixedDefaults).forEach(function (k) {
- if (rawOptions[k] == null) {
- rawOptions[k] = mixedDefaults[k];
+ if (atIndex === "\r" && text.charAt(index + 1) === "\n") {
+ return index + 2;
+ }
+
+ if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
+ return index + 1;
+ }
}
- });
- if (rawOptions.parser === "json") {
- rawOptions.trailingComma = "none";
+ return index;
}
+ /**
+ * @param {string} text
+ * @param {number} index
+ * @param {SkipOptions=} opts
+ * @returns {boolean}
+ */
- return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({
- passThrough: Object.keys(hiddenDefaults)
- }, opts));
-}
-
-function getPlugin(options) {
- var astFormat = options.astFormat;
- if (!astFormat) {
- throw new Error("getPlugin() requires astFormat to be set");
+ function hasNewline(text, index, opts) {
+ opts = opts || {};
+ var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts);
+ var idx2 = skipNewline(text, idx, opts);
+ return idx !== idx2;
}
+ /**
+ * @param {string} text
+ * @param {number} start
+ * @param {number} end
+ * @returns {boolean}
+ */
- var printerPlugin = options.plugins.find(function (plugin) {
- return plugin.printers && plugin.printers[astFormat];
- });
- if (!printerPlugin) {
- throw new Error("Couldn't find plugin for AST format \"".concat(astFormat, "\""));
- }
+ function hasNewlineInRange(text, start, end) {
+ for (var i = start; i < end; ++i) {
+ if (text.charAt(i) === "\n") {
+ return true;
+ }
+ }
- return printerPlugin;
-}
+ return false;
+ } // Note: this function doesn't ignore leading comments unlike isNextLineEmpty
-function getInterpreter(filepath) {
- if (typeof filepath !== "string") {
- return "";
- }
+ /**
+ * @template N
+ * @param {string} text
+ * @param {N} node
+ * @param {(node: N) => number} locStart
+ */
- var fd;
- try {
- fd = fs.openSync(filepath, "r");
- } catch (err) {
- return "";
+ function isPreviousLineEmpty(text, node, locStart) {
+ /** @type {number | false} */
+ var idx = locStart(node) - 1;
+ idx = skipSpaces(text, idx, {
+ backwards: true
+ });
+ idx = skipNewline(text, idx, {
+ backwards: true
+ });
+ idx = skipSpaces(text, idx, {
+ backwards: true
+ });
+ var idx2 = skipNewline(text, idx, {
+ backwards: true
+ });
+ return idx !== idx2;
}
+ /**
+ * @param {string} text
+ * @param {number} index
+ * @returns {boolean}
+ */
- try {
- var liner = new readlines(fd);
- var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node
-
- var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/);
-
- if (m1) {
- return m1[1];
- } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node
+ function isNextLineEmptyAfterIndex(text, index) {
+ /** @type {number | false} */
+ var oldIdx = null;
+ /** @type {number | false} */
- var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/);
+ var idx = index;
- if (m2) {
- return m2[1];
+ while (idx !== oldIdx) {
+ // We need to skip all the potential trailing inline comments
+ oldIdx = idx;
+ idx = skipToLineEnd(text, idx);
+ idx = skipInlineComment(text, idx);
+ idx = skipSpaces(text, idx);
}
- return "";
- } catch (err) {
- // There are some weird cases where paths are missing, causing Jest
- // failures. It's unclear what these correspond to in the real world.
- return "";
- } finally {
- try {
- // There are some weird cases where paths are missing, causing Jest
- // failures. It's unclear what these correspond to in the real world.
- fs.closeSync(fd);
- } catch (err) {// nop
- }
- }
-}
-
-function inferParser(filepath, plugins) {
- var filepathParts = normalizePath(filepath).split("/");
- var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the
- // interpreter in the shebang line, if any; but since this requires FS access,
- // do it last.
-
- var language = getSupportInfo$1(null, {
- plugins: plugins
- }).languages.find(function (language) {
- return language.since !== null && (language.extensions && language.extensions.some(function (extension) {
- return filename.endsWith(extension);
- }) || language.filenames && language.filenames.find(function (name) {
- return name.toLowerCase() === filename;
- }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1);
- });
- return language && language.parsers[0];
-}
-
-var options = {
- normalize: normalize,
- hiddenDefaults: hiddenDefaults,
- inferParser: inferParser
-};
-
-function massageAST(ast, options, parent) {
- if (Array.isArray(ast)) {
- return ast.map(function (e) {
- return massageAST(e, options, parent);
- }).filter(function (e) {
- return e;
- });
- }
-
- if (!ast || _typeof(ast) !== "object") {
- return ast;
+ idx = skipTrailingComment(text, idx);
+ idx = skipNewline(text, idx);
+ return idx !== false && hasNewline(text, idx);
}
+ /**
+ * @template N
+ * @param {string} text
+ * @param {N} node
+ * @param {(node: N) => number} locEnd
+ * @returns {boolean}
+ */
- var newObj = {};
- var _arr = Object.keys(ast);
+ function isNextLineEmpty(text, node, locEnd) {
+ return isNextLineEmptyAfterIndex(text, locEnd(node));
+ }
+ /**
+ * @param {string} text
+ * @param {number} idx
+ * @returns {number | false}
+ */
- for (var _i = 0; _i < _arr.length; _i++) {
- var key = _arr[_i];
- if (typeof ast[key] !== "function") {
- newObj[key] = massageAST(ast[key], options, ast);
- }
- }
+ function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) {
+ /** @type {number | false} */
+ var oldIdx = null;
+ /** @type {number | false} */
- if (options.printer.massageAstNode) {
- var result = options.printer.massageAstNode(ast, newObj, parent);
+ var nextIdx = idx;
- if (result === null) {
- return undefined;
+ while (nextIdx !== oldIdx) {
+ oldIdx = nextIdx;
+ nextIdx = skipSpaces(text, nextIdx);
+ nextIdx = skipInlineComment(text, nextIdx);
+ nextIdx = skipTrailingComment(text, nextIdx);
+ nextIdx = skipNewline(text, nextIdx);
}
- if (result) {
- return result;
- }
+ return nextIdx;
}
+ /**
+ * @template N
+ * @param {string} text
+ * @param {N} node
+ * @param {(node: N) => number} locEnd
+ * @returns {number | false}
+ */
- return newObj;
-}
-
-var massageAst = massageAST;
-
-function assert() {}
-assert.ok = function () {};
+ function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
+ return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node));
+ }
+ /**
+ * @template N
+ * @param {string} text
+ * @param {N} node
+ * @param {(node: N) => number} locEnd
+ * @returns {string}
+ */
-assert.strictEqual = function () {};
+ function getNextNonSpaceNonCommentCharacter(text, node, locEnd) {
+ return text.charAt( // @ts-ignore => TBD: can return false, should we define a fallback?
+ getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd));
+ }
+ /**
+ * @param {string} text
+ * @param {number} index
+ * @param {SkipOptions=} opts
+ * @returns {boolean}
+ */
-var assert$2 = Object.freeze({
- default: assert
-});
+ function hasSpaces(text, index, opts) {
+ opts = opts || {};
+ var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts);
+ return idx !== index;
+ }
+ /**
+ * @param {{range?: [number, number], start?: number}} node
+ * @param {number} index
+ */
-function concat$1(parts) {
- return {
- type: "concat",
- parts: parts
- };
-}
-function indent$1(contents) {
- return {
- type: "indent",
- contents: contents
- };
-}
+ function setLocStart(node, index) {
+ if (node.range) {
+ node.range[0] = index;
+ } else {
+ node.start = index;
+ }
+ }
+ /**
+ * @param {{range?: [number, number], end?: number}} node
+ * @param {number} index
+ */
-function align(n, contents) {
- return {
- type: "align",
- contents: contents,
- n: n
- };
-}
-function group(contents, opts) {
- opts = opts || {};
+ function setLocEnd(node, index) {
+ if (node.range) {
+ node.range[1] = index;
+ } else {
+ node.end = index;
+ }
+ }
- return {
- type: "group",
- id: opts.id,
- contents: contents,
- break: !!opts.shouldBreak,
- expandedStates: opts.expandedStates
- };
-}
-
-function dedentToRoot(contents) {
- return align(-Infinity, contents);
-}
-
-function markAsRoot(contents) {
- return align({
- type: "root"
- }, contents);
-}
-
-function dedent$1(contents) {
- return align(-1, contents);
-}
-
-function conditionalGroup(states, opts) {
- return group(states[0], Object.assign(opts || {}, {
- expandedStates: states
- }));
-}
-
-function fill(parts) {
- return {
- type: "fill",
- parts: parts
- };
-}
+ var PRECEDENCE = {};
+ [["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) {
+ tier.forEach(function (op) {
+ PRECEDENCE[op] = i;
+ });
+ });
-function ifBreak(breakContents, flatContents, opts) {
- opts = opts || {};
+ function getPrecedence(op) {
+ return PRECEDENCE[op];
+ }
- return {
- type: "if-break",
- breakContents: breakContents,
- flatContents: flatContents,
- groupId: opts.groupId
+ var equalityOperators = {
+ "==": true,
+ "!=": true,
+ "===": true,
+ "!==": true
};
-}
-
-function lineSuffix$1(contents) {
- return {
- type: "line-suffix",
- contents: contents
+ var multiplicativeOperators = {
+ "*": true,
+ "/": true,
+ "%": true
};
-}
-
-var lineSuffixBoundary = {
- type: "line-suffix-boundary"
-};
-var breakParent$1 = {
- type: "break-parent"
-};
-var trim = {
- type: "trim"
-};
-var line$2 = {
- type: "line"
-};
-var softline = {
- type: "line",
- soft: true
-};
-var hardline$1 = concat$1([{
- type: "line",
- hard: true
-}, breakParent$1]);
-var literalline = concat$1([{
- type: "line",
- hard: true,
- literal: true
-}, breakParent$1]);
-var cursor$1 = {
- type: "cursor",
- placeholder: Symbol("cursor")
-};
-
-function join$1(sep, arr) {
- var res = [];
-
- for (var i = 0; i < arr.length; i++) {
- if (i !== 0) {
- res.push(sep);
- }
-
- res.push(arr[i]);
- }
-
- return concat$1(res);
-}
-
-function addAlignmentToDoc(doc, size, tabWidth) {
- var aligned = doc;
-
- if (size > 0) {
- // Use indent to add tabs for all the levels of tabs we need
- for (var i = 0; i < Math.floor(size / tabWidth); ++i) {
- aligned = indent$1(aligned);
- } // Use align for all the spaces that are needed
-
-
- aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current
- // indentation, so we use -Infinity to reset the indentation to 0
-
- aligned = align(-Infinity, aligned);
- }
-
- return aligned;
-}
-
-var docBuilders = {
- concat: concat$1,
- join: join$1,
- line: line$2,
- softline: softline,
- hardline: hardline$1,
- literalline: literalline,
- group: group,
- conditionalGroup: conditionalGroup,
- fill: fill,
- lineSuffix: lineSuffix$1,
- lineSuffixBoundary: lineSuffixBoundary,
- cursor: cursor$1,
- breakParent: breakParent$1,
- ifBreak: ifBreak,
- trim: trim,
- indent: indent$1,
- align: align,
- addAlignmentToDoc: addAlignmentToDoc,
- markAsRoot: markAsRoot,
- dedentToRoot: dedentToRoot,
- dedent: dedent$1
-};
-
-var ansiRegex = createCommonjsModule(function (module) {
- 'use strict';
-
- module.exports = function (options) {
- options = Object.assign({
- onlyFirst: false
- }, options);
- var pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'].join('|');
- return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
+ var bitshiftOperators = {
+ ">>": true,
+ ">>>": true,
+ "<<": true
};
-});
-var stripAnsi = function stripAnsi(input) {
- return typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
-};
+ function shouldFlatten(parentOp, nodeOp) {
+ if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) {
+ return false;
+ } // ** is right-associative
+ // x ** y ** z --> x ** (y ** z)
-var isFullwidthCodePoint = createCommonjsModule(function (module) {
- 'use strict';
- /* eslint-disable yoda */
- module.exports = function (x) {
- if (Number.isNaN(x)) {
+ if (parentOp === "**") {
return false;
- } // code points are derived from:
- // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ } // x == y == z --> (x == y) == z
- if (x >= 0x1100 && (x <= 0x115f || // Hangul Jamo
- x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
- x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
- 0x2e80 <= x && x <= 0x3247 && x !== 0x303f || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
- 0x3250 <= x && x <= 0x4dbf || // CJK Unified Ideographs .. Yi Radicals
- 0x4e00 <= x && x <= 0xa4c6 || // Hangul Jamo Extended-A
- 0xa960 <= x && x <= 0xa97c || // Hangul Syllables
- 0xac00 <= x && x <= 0xd7a3 || // CJK Compatibility Ideographs
- 0xf900 <= x && x <= 0xfaff || // Vertical Forms
- 0xfe10 <= x && x <= 0xfe19 || // CJK Compatibility Forms .. Small Form Variants
- 0xfe30 <= x && x <= 0xfe6b || // Halfwidth and Fullwidth Forms
- 0xff01 <= x && x <= 0xff60 || 0xffe0 <= x && x <= 0xffe6 || // Kana Supplement
- 0x1b000 <= x && x <= 0x1b001 || // Enclosed Ideographic Supplement
- 0x1f200 <= x && x <= 0x1f251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
- 0x20000 <= x && x <= 0x3fffd)) {
- return true;
- }
+ if (equalityOperators[parentOp] && equalityOperators[nodeOp]) {
+ return false;
+ } // x * y % z --> (x * y) % z
- return false;
- };
-});
-var emojiRegex = function emojiRegex() {
- // https://mths.be/emoji
- return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g;
-};
+ if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) {
+ return false;
+ } // x * y / z --> (x * y) / z
+ // x / y * z --> (x / y) * z
-var stringWidth = createCommonjsModule(function (module) {
- 'use strict';
- var emojiRegex$$1 = emojiRegex();
+ if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) {
+ return false;
+ } // x << y << z --> (x << y) << z
- module.exports = function (input) {
- input = input.replace(emojiRegex$$1, ' ');
- if (typeof input !== 'string' || input.length === 0) {
- return 0;
+ if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) {
+ return false;
}
- input = stripAnsi(input);
- var width = 0;
-
- for (var i = 0; i < input.length; i++) {
- var code = input.codePointAt(i); // Ignore control characters
-
- if (code <= 0x1F || code >= 0x7F && code <= 0x9F) {
- continue;
- } // Ignore combining characters
-
-
- if (code >= 0x300 && code <= 0x36F) {
- continue;
- } // Surrogates
-
-
- if (code > 0xFFFF) {
- i++;
- }
+ return true;
+ }
- width += isFullwidthCodePoint(code) ? 2 : 1;
- }
+ function isBitwiseOperator(operator) {
+ return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&";
+ } // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr
+ // holds) `function`, `class`, or `do {}`. Will be overzealous if there's
+ // already necessary grouping parentheses.
- return width;
- };
-});
-var notAsciiRegex = /[^\x20-\x7F]/;
+ function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) {
+ node = getLeftMost(node);
-function isExportDeclaration(node) {
- if (node) {
switch (node.type) {
- case "ExportDefaultDeclaration":
- case "ExportDefaultSpecifier":
- case "DeclareExportDeclaration":
- case "ExportNamedDeclaration":
- case "ExportAllDeclaration":
- return true;
- }
- }
+ case "FunctionExpression":
+ case "ClassExpression":
+ case "DoExpression":
+ return forbidFunctionClassAndDoExpr;
- return false;
-}
+ case "ObjectExpression":
+ return true;
-function getParentExportDeclaration(path) {
- var parentNode = path.getParentNode();
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr);
- if (path.getName() === "declaration" && isExportDeclaration(parentNode)) {
- return parentNode;
- }
+ case "TaggedTemplateExpression":
+ if (node.tag.type === "FunctionExpression") {
+ // IIFEs are always already parenthesized
+ return false;
+ }
- return null;
-}
+ return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr);
-function getPenultimate(arr) {
- if (arr.length > 1) {
- return arr[arr.length - 2];
- }
+ case "CallExpression":
+ case "OptionalCallExpression":
+ if (node.callee.type === "FunctionExpression") {
+ // IIFEs are always already parenthesized
+ return false;
+ }
- return null;
-}
+ return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr);
-function skip(chars) {
- return function (text, index, opts) {
- var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having
- // to check for failures (did someone say monads?).
+ case "ConditionalExpression":
+ return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr);
- if (index === false) {
- return false;
- }
+ case "UpdateExpression":
+ return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr);
- var length = text.length;
- var cursor = index;
+ case "BindExpression":
+ return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr);
- while (cursor >= 0 && cursor < length) {
- var c = text.charAt(cursor);
+ case "SequenceExpression":
+ return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr);
- if (chars instanceof RegExp) {
- if (!chars.test(c)) {
- return cursor;
- }
- } else if (chars.indexOf(c) === -1) {
- return cursor;
- }
+ case "TSAsExpression":
+ return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr);
- backwards ? cursor-- : cursor++;
+ default:
+ return false;
}
+ }
- if (cursor === -1 || cursor === length) {
- // If we reached the beginning or end of the file, return the
- // out-of-bounds cursor. It's up to the caller to handle this
- // correctly. We don't want to indicate `false` though if it
- // actually skipped valid characters.
- return cursor;
+ function getLeftMost(node) {
+ if (node.left) {
+ return getLeftMost(node.left);
}
- return false;
- };
-}
+ return node;
+ }
+ /**
+ * @param {string} value
+ * @param {number} tabWidth
+ * @param {number=} startIndex
+ * @returns {number}
+ */
-var skipWhitespace = skip(/\s/);
-var skipSpaces = skip(" \t");
-var skipToLineEnd = skip(",; \t");
-var skipEverythingButNewLine = skip(/[^\r\n]/);
-function skipInlineComment(text, index) {
- if (index === false) {
- return false;
- }
+ function getAlignmentSize(value, tabWidth, startIndex) {
+ startIndex = startIndex || 0;
+ var size = 0;
- if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") {
- for (var i = index + 2; i < text.length; ++i) {
- if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
- return i + 2;
+ for (var i = startIndex; i < value.length; ++i) {
+ if (value[i] === "\t") {
+ // Tabs behave in a way that they are aligned to the nearest
+ // multiple of tabWidth:
+ // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4
+ // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ...
+ size = size + tabWidth - size % tabWidth;
+ } else {
+ size++;
}
}
+
+ return size;
}
+ /**
+ * @param {string} value
+ * @param {number} tabWidth
+ * @returns {number}
+ */
- return index;
-}
-function skipTrailingComment(text, index) {
- if (index === false) {
- return false;
- }
+ function getIndentSize(value, tabWidth) {
+ var lastNewlineIndex = value.lastIndexOf("\n");
- if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") {
- return skipEverythingButNewLine(text, index);
- }
+ if (lastNewlineIndex === -1) {
+ return 0;
+ }
- return index;
-} // This one doesn't use the above helper function because it wants to
-// test \r\n in order and `skip` doesn't support ordering and we only
-// want to skip one newline. It's simple to implement.
+ return getAlignmentSize( // All the leading whitespaces
+ value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth);
+ }
+ /**
+ * @typedef {'"' | "'"} Quote
+ */
+ /**
+ *
+ * @param {string} raw
+ * @param {Quote} preferredQuote
+ * @returns {Quote}
+ */
-function skipNewline$1(text, index, opts) {
- var backwards = opts && opts.backwards;
- if (index === false) {
- return false;
- }
+ function getPreferredQuote(raw, preferredQuote) {
+ // `rawContent` is the string exactly like it appeared in the input source
+ // code, without its enclosing quotes.
+ var rawContent = raw.slice(1, -1);
+ /** @type {{ quote: '"', regex: RegExp }} */
- var atIndex = text.charAt(index);
+ var double = {
+ quote: '"',
+ regex: /"/g
+ };
+ /** @type {{ quote: "'", regex: RegExp }} */
- if (backwards) {
- if (text.charAt(index - 1) === "\r" && atIndex === "\n") {
- return index - 2;
- }
+ var single = {
+ quote: "'",
+ regex: /'/g
+ };
+ var preferred = preferredQuote === "'" ? single : double;
+ var alternate = preferred === single ? double : single;
+ var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing
+ // the string, we might want to enclose with the alternate quote instead, to
+ // minimize the number of escaped quotes.
- if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
- return index - 1;
- }
- } else {
- if (atIndex === "\r" && text.charAt(index + 1) === "\n") {
- return index + 2;
+ if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) {
+ var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length;
+ var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length;
+ result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote;
}
- if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
- return index + 1;
- }
+ return result;
}
- return index;
-}
+ function printString(raw, options, isDirectiveLiteral) {
+ // `rawContent` is the string exactly like it appeared in the input source
+ // code, without its enclosing quotes.
+ var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap
+ // the quotes on a DirectiveLiteral.
-function hasNewline$1(text, index, opts) {
- opts = opts || {};
- var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts);
- var idx2 = skipNewline$1(text, idx, opts);
- return idx !== idx2;
-}
+ var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'");
+ /** @type {Quote} */
-function hasNewlineInRange(text, start, end) {
- for (var i = start; i < end; ++i) {
- if (text.charAt(i) === "\n") {
- return true;
- }
- }
+ var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't
+ // change the escape sequences they use.
+ // See https://github.com/prettier/prettier/issues/1555
+ // and https://tc39.github.io/ecma262/#directive-prologue
- return false;
-} // Note: this function doesn't ignore leading comments unlike isNextLineEmpty
+ if (isDirectiveLiteral) {
+ if (canChangeDirectiveQuotes) {
+ return enclosingQuote + rawContent + enclosingQuote;
+ }
+ return raw;
+ } // It might sound unnecessary to use `makeString` even if the string already
+ // is enclosed with `enclosingQuote`, but it isn't. The string could contain
+ // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes
+ // sure that we consistently output the minimum amount of escaped quotes.
-function isPreviousLineEmpty$1(text, node, locStart) {
- var idx = locStart(node) - 1;
- idx = skipSpaces(text, idx, {
- backwards: true
- });
- idx = skipNewline$1(text, idx, {
- backwards: true
- });
- idx = skipSpaces(text, idx, {
- backwards: true
- });
- var idx2 = skipNewline$1(text, idx, {
- backwards: true
- });
- return idx !== idx2;
-}
-
-function isNextLineEmptyAfterIndex(text, index) {
- var oldIdx = null;
- var idx = index;
- while (idx !== oldIdx) {
- // We need to skip all the potential trailing inline comments
- oldIdx = idx;
- idx = skipToLineEnd(text, idx);
- idx = skipInlineComment(text, idx);
- idx = skipSpaces(text, idx);
+ return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.embeddedInHtml));
}
+ /**
+ * @param {string} rawContent
+ * @param {Quote} enclosingQuote
+ * @param {boolean=} unescapeUnnecessaryEscapes
+ * @returns {string}
+ */
- idx = skipTrailingComment(text, idx);
- idx = skipNewline$1(text, idx);
- return hasNewline$1(text, idx);
-}
-function isNextLineEmpty(text, node, locEnd) {
- return isNextLineEmptyAfterIndex(text, locEnd(node));
-}
+ function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) {
+ var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double).
-function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) {
- var oldIdx = null;
+ var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to
+ // enclose `rawContent` with `enclosingQuote`.
- while (idx !== oldIdx) {
- oldIdx = idx;
- idx = skipSpaces(text, idx);
- idx = skipInlineComment(text, idx);
- idx = skipTrailingComment(text, idx);
- idx = skipNewline$1(text, idx);
- }
+ var newContent = rawContent.replace(regex, function (match, escaped, quote) {
+ // If we matched an escape, and the escaped character is a quote of the
+ // other type than we intend to enclose the string with, there's no need for
+ // it to be escaped, so return it _without_ the backslash.
+ if (escaped === otherQuote) {
+ return escaped;
+ } // If we matched an unescaped quote and it is of the _same_ type as we
+ // intend to enclose the string with, it must be escaped, so return it with
+ // a backslash.
- return idx;
-}
-function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
- return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node));
-}
+ if (quote === enclosingQuote) {
+ return "\\" + quote;
+ }
-function getNextNonSpaceNonCommentCharacter(text, node, locEnd) {
- return text.charAt(getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd));
-}
+ if (quote) {
+ return quote;
+ } // Unescape any unnecessarily escaped character.
+ // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27
-function hasSpaces(text, index, opts) {
- opts = opts || {};
- var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts);
- return idx !== index;
-}
-function setLocStart(node, index) {
- if (node.range) {
- node.range[0] = index;
- } else {
- node.start = index;
+ return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped;
+ });
+ return enclosingQuote + newContent + enclosingQuote;
}
-}
-function setLocEnd(node, index) {
- if (node.range) {
- node.range[1] = index;
- } else {
- node.end = index;
+ function printNumber(rawNumber) {
+ return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation.
+ .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0).
+ .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit.
+ .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes.
+ .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot.
+ .replace(/\.(?=e|$)/, "");
}
-}
+ /**
+ * @param {string} str
+ * @param {string} target
+ * @returns {number}
+ */
-var PRECEDENCE = {};
-[["|>"], ["||", "??"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) {
- tier.forEach(function (op) {
- PRECEDENCE[op] = i;
- });
-});
-
-function getPrecedence(op) {
- return PRECEDENCE[op];
-}
-
-var equalityOperators = {
- "==": true,
- "!=": true,
- "===": true,
- "!==": true
-};
-var multiplicativeOperators = {
- "*": true,
- "/": true,
- "%": true
-};
-var bitshiftOperators = {
- ">>": true,
- ">>>": true,
- "<<": true
-};
-
-function shouldFlatten(parentOp, nodeOp) {
- if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) {
- return false;
- } // ** is right-associative
- // x ** y ** z --> x ** (y ** z)
+ function getMaxContinuousCount(str, target) {
+ var results = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g"));
- if (parentOp === "**") {
- return false;
- } // x == y == z --> (x == y) == z
+ if (results === null) {
+ return 0;
+ }
+ return results.reduce(function (maxCount, result) {
+ return Math.max(maxCount, result.length / target.length);
+ }, 0);
+ }
- if (equalityOperators[parentOp] && equalityOperators[nodeOp]) {
- return false;
- } // x * y % z --> (x * y) % z
+ function getMinNotPresentContinuousCount(str, target) {
+ var matches = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g"));
+ if (matches === null) {
+ return 0;
+ }
- if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) {
- return false;
- } // x * y / z --> (x * y) / z
- // x / y * z --> (x / y) * z
+ var countPresent = new Map();
+ var max = 0;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+ try {
+ for (var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var match = _step.value;
+ var count = match.length / target.length;
+ countPresent.set(count, true);
- if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) {
- return false;
- } // x << y << z --> (x << y) << z
+ if (count > max) {
+ max = count;
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+ for (var i = 1; i < max; i++) {
+ if (!countPresent.get(i)) {
+ return i;
+ }
+ }
- if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) {
- return false;
+ return max + 1;
}
+ /**
+ * @param {string} text
+ * @returns {number}
+ */
- return true;
-}
-function isBitwiseOperator(operator) {
- return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&";
-} // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr
-// holds) `function`, `class`, or `do {}`. Will be overzealous if there's
-// already necessary grouping parentheses.
+ function getStringWidth(text) {
+ if (!text) {
+ return 0;
+ } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width`
-function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) {
- node = getLeftMost(node);
+ if (!notAsciiRegex.test(text)) {
+ return text.length;
+ }
- switch (node.type) {
- case "FunctionExpression":
- case "ClassExpression":
- case "DoExpression":
- return forbidFunctionClassAndDoExpr;
+ return stringWidth_1(text);
+ }
- case "ObjectExpression":
- return true;
+ function hasIgnoreComment(path) {
+ var node = path.getValue();
+ return hasNodeIgnoreComment(node);
+ }
- case "MemberExpression":
- return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr);
+ function hasNodeIgnoreComment(node) {
+ return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) {
+ return comment.value.trim() === "prettier-ignore";
+ });
+ }
- case "TaggedTemplateExpression":
- if (node.tag.type === "FunctionExpression") {
- // IIFEs are always already parenthesized
- return false;
- }
+ function matchAncestorTypes(path, types, index) {
+ index = index || 0;
+ types = types.slice();
- return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr);
+ while (types.length) {
+ var parent = path.getParentNode(index);
+ var type = types.shift();
- case "CallExpression":
- if (node.callee.type === "FunctionExpression") {
- // IIFEs are always already parenthesized
+ if (!parent || parent.type !== type) {
return false;
}
- return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr);
-
- case "ConditionalExpression":
- return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr);
-
- case "UpdateExpression":
- return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr);
-
- case "BindExpression":
- return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr);
-
- case "SequenceExpression":
- return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr);
-
- case "TSAsExpression":
- return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr);
-
- default:
- return false;
- }
-}
+ index++;
+ }
-function getLeftMost(node) {
- if (node.left) {
- return getLeftMost(node.left);
+ return true;
}
- return node;
-}
-
-function getAlignmentSize(value, tabWidth, startIndex) {
- startIndex = startIndex || 0;
- var size = 0;
+ function addCommentHelper(node, comment) {
+ var comments = node.comments || (node.comments = []);
+ comments.push(comment);
+ comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment
+ // We already "print" it via the raw text, we don't need to re-print it as a
+ // comment
- for (var i = startIndex; i < value.length; ++i) {
- if (value[i] === "\t") {
- // Tabs behave in a way that they are aligned to the nearest
- // multiple of tabWidth:
- // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4
- // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ...
- size = size + tabWidth - size % tabWidth;
- } else {
- size++;
+ if (node.type === "JSXText") {
+ comment.printed = true;
}
}
- return size;
-}
-
-function getIndentSize(value, tabWidth) {
- var lastNewlineIndex = value.lastIndexOf("\n");
-
- if (lastNewlineIndex === -1) {
- return 0;
+ function addLeadingComment(node, comment) {
+ comment.leading = true;
+ comment.trailing = false;
+ addCommentHelper(node, comment);
}
- return getAlignmentSize( // All the leading whitespaces
- value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth);
-}
-
-function getPreferredQuote(raw, preferredQuote) {
- // `rawContent` is the string exactly like it appeared in the input source
- // code, without its enclosing quotes.
- var rawContent = raw.slice(1, -1);
- var double = {
- quote: '"',
- regex: /"/g
- };
- var single = {
- quote: "'",
- regex: /'/g
- };
- var preferred = preferredQuote === "'" ? single : double;
- var alternate = preferred === single ? double : single;
- var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing
- // the string, we might want to enclose with the alternate quote instead, to
- // minimize the number of escaped quotes.
-
- if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) {
- var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length;
- var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length;
- result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote;
+ function addDanglingComment(node, comment) {
+ comment.leading = false;
+ comment.trailing = false;
+ addCommentHelper(node, comment);
}
- return result;
-}
-
-function printString(raw, options, isDirectiveLiteral) {
- // `rawContent` is the string exactly like it appeared in the input source
- // code, without its enclosing quotes.
- var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap
- // the quotes on a DirectiveLiteral.
+ function addTrailingComment(node, comment) {
+ comment.leading = false;
+ comment.trailing = true;
+ addCommentHelper(node, comment);
+ }
- var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'");
- var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't
- // change the escape sequences they use.
- // See https://github.com/prettier/prettier/issues/1555
- // and https://tc39.github.io/ecma262/#directive-prologue
+ function isWithinParentArrayProperty(path, propertyName) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
- if (isDirectiveLiteral) {
- if (canChangeDirectiveQuotes) {
- return enclosingQuote + rawContent + enclosingQuote;
+ if (parent == null) {
+ return false;
}
- return raw;
- } // It might sound unnecessary to use `makeString` even if the string already
- // is enclosed with `enclosingQuote`, but it isn't. The string could contain
- // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes
- // sure that we consistently output the minimum amount of escaped quotes.
-
-
- return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.embeddedInHtml));
-}
-
-function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) {
- var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double).
-
- var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to
- // enclose `rawContent` with `enclosingQuote`.
-
- var newContent = rawContent.replace(regex, function (match, escaped, quote) {
- // If we matched an escape, and the escaped character is a quote of the
- // other type than we intend to enclose the string with, there's no need for
- // it to be escaped, so return it _without_ the backslash.
- if (escaped === otherQuote) {
- return escaped;
- } // If we matched an unescaped quote and it is of the _same_ type as we
- // intend to enclose the string with, it must be escaped, so return it with
- // a backslash.
-
-
- if (quote === enclosingQuote) {
- return "\\" + quote;
+ if (!Array.isArray(parent[propertyName])) {
+ return false;
}
- if (quote) {
- return quote;
- } // Unescape any unnecessarily escaped character.
- // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27
-
-
- return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped;
- });
- return enclosingQuote + newContent + enclosingQuote;
-}
-
-function printNumber(rawNumber) {
- return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation.
- .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0).
- .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit.
- .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes.
- .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot.
- .replace(/\.(?=e|$)/, "");
-}
-
-function getMaxContinuousCount(str, target) {
- var results = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g"));
-
- if (results === null) {
- return 0;
+ var key = path.getName();
+ return parent[propertyName][key] === node;
}
- return results.reduce(function (maxCount, result) {
- return Math.max(maxCount, result.length / target.length);
- }, 0);
-}
-
-function getMinNotPresentContinuousCount(str, target) {
- var matches = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g"));
-
- if (matches === null) {
- return 0;
- }
+ function replaceEndOfLineWith(text, replacement) {
+ var parts = [];
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
- var countPresent = new Map();
- var max = 0;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ try {
+ for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var part = _step2.value;
- try {
- for (var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var match = _step.value;
- var count = match.length / target.length;
- countPresent.set(count, true);
+ if (parts.length !== 0) {
+ parts.push(replacement);
+ }
- if (count > max) {
- max = count;
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ parts.push(part);
}
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
}
- }
-
- for (var i = 1; i < max; i++) {
- if (!countPresent.get(i)) {
- return i;
- }
- }
-
- return max + 1;
-}
-
-function getStringWidth$1(text) {
- if (!text) {
- return 0;
- } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width`
-
- if (!notAsciiRegex.test(text)) {
- return text.length;
- }
-
- return stringWidth(text);
-}
-
-function hasIgnoreComment(path) {
- var node = path.getValue();
- return hasNodeIgnoreComment(node);
-}
-
-function hasNodeIgnoreComment(node) {
- return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) {
- return comment.value.trim() === "prettier-ignore";
- });
-}
-
-function matchAncestorTypes(path, types, index) {
- index = index || 0;
- types = types.slice();
+ return parts;
+ }
+
+ var util = {
+ replaceEndOfLineWith: replaceEndOfLineWith,
+ getStringWidth: getStringWidth,
+ getMaxContinuousCount: getMaxContinuousCount,
+ getMinNotPresentContinuousCount: getMinNotPresentContinuousCount,
+ getPrecedence: getPrecedence,
+ shouldFlatten: shouldFlatten,
+ isBitwiseOperator: isBitwiseOperator,
+ isExportDeclaration: isExportDeclaration,
+ getParentExportDeclaration: getParentExportDeclaration,
+ getPenultimate: getPenultimate,
+ getLast: getLast,
+ getNextNonSpaceNonCommentCharacterIndexWithStartIndex: getNextNonSpaceNonCommentCharacterIndexWithStartIndex,
+ getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex,
+ getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter,
+ skip: skip,
+ skipWhitespace: skipWhitespace,
+ skipSpaces: skipSpaces,
+ skipToLineEnd: skipToLineEnd,
+ skipEverythingButNewLine: skipEverythingButNewLine,
+ skipInlineComment: skipInlineComment,
+ skipTrailingComment: skipTrailingComment,
+ skipNewline: skipNewline,
+ isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex,
+ isNextLineEmpty: isNextLineEmpty,
+ isPreviousLineEmpty: isPreviousLineEmpty,
+ hasNewline: hasNewline,
+ hasNewlineInRange: hasNewlineInRange,
+ hasSpaces: hasSpaces,
+ setLocStart: setLocStart,
+ setLocEnd: setLocEnd,
+ startsWithNoLookaheadToken: startsWithNoLookaheadToken,
+ getAlignmentSize: getAlignmentSize,
+ getIndentSize: getIndentSize,
+ getPreferredQuote: getPreferredQuote,
+ printString: printString,
+ printNumber: printNumber,
+ hasIgnoreComment: hasIgnoreComment,
+ hasNodeIgnoreComment: hasNodeIgnoreComment,
+ makeString: makeString,
+ matchAncestorTypes: matchAncestorTypes,
+ addLeadingComment: addLeadingComment,
+ addDanglingComment: addDanglingComment,
+ addTrailingComment: addTrailingComment,
+ isWithinParentArrayProperty: isWithinParentArrayProperty
+ };
- while (types.length) {
- var parent = path.getParentNode(index);
- var type = types.shift();
+ function guessEndOfLine(text) {
+ var index = text.indexOf("\r");
- if (!parent || parent.type !== type) {
- return false;
+ if (index >= 0) {
+ return text.charAt(index + 1) === "\n" ? "crlf" : "cr";
}
- index++;
+ return "lf";
}
- return true;
-}
+ function convertEndOfLineToChars(value) {
+ switch (value) {
+ case "cr":
+ return "\r";
-function addCommentHelper(node, comment) {
- var comments = node.comments || (node.comments = []);
- comments.push(comment);
- comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment
- // We already "print" it via the raw text, we don't need to re-print it as a
- // comment
+ case "crlf":
+ return "\r\n";
- if (node.type === "JSXText") {
- comment.printed = true;
+ default:
+ return "\n";
+ }
}
-}
-
-function addLeadingComment$1(node, comment) {
- comment.leading = true;
- comment.trailing = false;
- addCommentHelper(node, comment);
-}
-function addDanglingComment$1(node, comment) {
- comment.leading = false;
- comment.trailing = false;
- addCommentHelper(node, comment);
-}
+ var endOfLine = {
+ guessEndOfLine: guessEndOfLine,
+ convertEndOfLineToChars: convertEndOfLineToChars
+ };
-function addTrailingComment$1(node, comment) {
- comment.leading = false;
- comment.trailing = true;
- addCommentHelper(node, comment);
-}
+ var getStringWidth$1 = util.getStringWidth;
+ var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars;
+ var concat$1 = docBuilders.concat,
+ fill$1 = docBuilders.fill,
+ cursor$1 = docBuilders.cursor;
+ /** @type {Record<symbol, typeof MODE_BREAK | typeof MODE_FLAT>} */
-function isWithinParentArrayProperty(path, propertyName) {
- var node = path.getValue();
- var parent = path.getParentNode();
+ var groupModeMap;
+ var MODE_BREAK = 1;
+ var MODE_FLAT = 2;
- if (parent == null) {
- return false;
+ function rootIndent() {
+ return {
+ value: "",
+ length: 0,
+ queue: []
+ };
}
- if (!Array.isArray(parent[propertyName])) {
- return false;
+ function makeIndent(ind, options) {
+ return generateInd(ind, {
+ type: "indent"
+ }, options);
}
- var key = path.getName();
- return parent[propertyName][key] === node;
-}
+ function makeAlign(ind, n, options) {
+ return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, {
+ type: "dedent"
+ }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, {
+ root: ind
+ }) : typeof n === "string" ? generateInd(ind, {
+ type: "stringAlign",
+ n: n
+ }, options) : generateInd(ind, {
+ type: "numberAlign",
+ n: n
+ }, options);
+ }
-function replaceEndOfLineWith(text, replacement) {
- var parts = [];
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ function generateInd(ind, newPart, options) {
+ var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart);
+ var value = "";
+ var length = 0;
+ var lastTabs = 0;
+ var lastSpaces = 0;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- try {
- for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var part = _step2.value;
+ try {
+ for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var part = _step.value;
- if (parts.length !== 0) {
- parts.push(replacement);
- }
+ switch (part.type) {
+ case "indent":
+ flush();
- parts.push(part);
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
-
- return parts;
-}
-
-var util = {
- replaceEndOfLineWith: replaceEndOfLineWith,
- getStringWidth: getStringWidth$1,
- getMaxContinuousCount: getMaxContinuousCount,
- getMinNotPresentContinuousCount: getMinNotPresentContinuousCount,
- getPrecedence: getPrecedence,
- shouldFlatten: shouldFlatten,
- isBitwiseOperator: isBitwiseOperator,
- isExportDeclaration: isExportDeclaration,
- getParentExportDeclaration: getParentExportDeclaration,
- getPenultimate: getPenultimate,
- getLast: getLast,
- getNextNonSpaceNonCommentCharacterIndexWithStartIndex: getNextNonSpaceNonCommentCharacterIndexWithStartIndex,
- getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex,
- getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter,
- skip: skip,
- skipWhitespace: skipWhitespace,
- skipSpaces: skipSpaces,
- skipToLineEnd: skipToLineEnd,
- skipEverythingButNewLine: skipEverythingButNewLine,
- skipInlineComment: skipInlineComment,
- skipTrailingComment: skipTrailingComment,
- skipNewline: skipNewline$1,
- isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex,
- isNextLineEmpty: isNextLineEmpty,
- isPreviousLineEmpty: isPreviousLineEmpty$1,
- hasNewline: hasNewline$1,
- hasNewlineInRange: hasNewlineInRange,
- hasSpaces: hasSpaces,
- setLocStart: setLocStart,
- setLocEnd: setLocEnd,
- startsWithNoLookaheadToken: startsWithNoLookaheadToken,
- getAlignmentSize: getAlignmentSize,
- getIndentSize: getIndentSize,
- getPreferredQuote: getPreferredQuote,
- printString: printString,
- printNumber: printNumber,
- hasIgnoreComment: hasIgnoreComment,
- hasNodeIgnoreComment: hasNodeIgnoreComment,
- makeString: makeString,
- matchAncestorTypes: matchAncestorTypes,
- addLeadingComment: addLeadingComment$1,
- addDanglingComment: addDanglingComment$1,
- addTrailingComment: addTrailingComment$1,
- isWithinParentArrayProperty: isWithinParentArrayProperty
-};
-
-function guessEndOfLine$1(text) {
- var index = text.indexOf("\r");
-
- if (index >= 0) {
- return text.charAt(index + 1) === "\n" ? "crlf" : "cr";
- }
-
- return "lf";
-}
-
-function convertEndOfLineToChars$2(value) {
- switch (value) {
- case "cr":
- return "\r";
-
- case "crlf":
- return "\r\n";
-
- default:
- return "\n";
- }
-}
-
-var endOfLine = {
- guessEndOfLine: guessEndOfLine$1,
- convertEndOfLineToChars: convertEndOfLineToChars$2
-};
-
-var getStringWidth = util.getStringWidth;
-var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars;
-var concat$2 = docBuilders.concat;
-var fill$1 = docBuilders.fill;
-var cursor$2 = docBuilders.cursor;
-/** @type {{[groupId: PropertyKey]: MODE}} */
-
-var groupModeMap;
-var MODE_BREAK = 1;
-var MODE_FLAT = 2;
-
-function rootIndent() {
- return {
- value: "",
- length: 0,
- queue: []
- };
-}
-
-function makeIndent(ind, options) {
- return generateInd(ind, {
- type: "indent"
- }, options);
-}
-
-function makeAlign(ind, n, options) {
- return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, {
- type: "dedent"
- }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, {
- root: ind
- }) : typeof n === "string" ? generateInd(ind, {
- type: "stringAlign",
- n: n
- }, options) : generateInd(ind, {
- type: "numberAlign",
- n: n
- }, options);
-}
-
-function generateInd(ind, newPart, options) {
- var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart);
- var value = "";
- var length = 0;
- var lastTabs = 0;
- var lastSpaces = 0;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var part = _step.value;
-
- switch (part.type) {
- case "indent":
- flush();
-
- if (options.useTabs) {
- addTabs(1);
- } else {
- addSpaces(options.tabWidth);
- }
+ if (options.useTabs) {
+ addTabs(1);
+ } else {
+ addSpaces(options.tabWidth);
+ }
- break;
+ break;
- case "stringAlign":
- flush();
- value += part.n;
- length += part.n.length;
- break;
+ case "stringAlign":
+ flush();
+ value += part.n;
+ length += part.n.length;
+ break;
- case "numberAlign":
- lastTabs += 1;
- lastSpaces += part.n;
- break;
+ case "numberAlign":
+ lastTabs += 1;
+ lastSpaces += part.n;
+ break;
- /* istanbul ignore next */
+ /* istanbul ignore next */
- default:
- throw new Error("Unexpected type '".concat(part.type, "'"));
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ default:
+ throw new Error("Unexpected type '".concat(part.type, "'"));
+ }
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- flushSpaces();
- return Object.assign({}, ind, {
- value: value,
- length: length,
- queue: queue
- });
+ flushSpaces();
+ return Object.assign({}, ind, {
+ value: value,
+ length: length,
+ queue: queue
+ });
- function addTabs(count) {
- value += "\t".repeat(count);
- length += options.tabWidth * count;
- }
+ function addTabs(count) {
+ value += "\t".repeat(count);
+ length += options.tabWidth * count;
+ }
- function addSpaces(count) {
- value += " ".repeat(count);
- length += count;
- }
+ function addSpaces(count) {
+ value += " ".repeat(count);
+ length += count;
+ }
- function flush() {
- if (options.useTabs) {
- flushTabs();
- } else {
- flushSpaces();
+ function flush() {
+ if (options.useTabs) {
+ flushTabs();
+ } else {
+ flushSpaces();
+ }
}
- }
- function flushTabs() {
- if (lastTabs > 0) {
- addTabs(lastTabs);
+ function flushTabs() {
+ if (lastTabs > 0) {
+ addTabs(lastTabs);
+ }
+
+ resetLast();
}
- resetLast();
- }
+ function flushSpaces() {
+ if (lastSpaces > 0) {
+ addSpaces(lastSpaces);
+ }
- function flushSpaces() {
- if (lastSpaces > 0) {
- addSpaces(lastSpaces);
+ resetLast();
}
- resetLast();
+ function resetLast() {
+ lastTabs = 0;
+ lastSpaces = 0;
+ }
}
- function resetLast() {
- lastTabs = 0;
- lastSpaces = 0;
- }
-}
+ function trim$1(out) {
+ if (out.length === 0) {
+ return 0;
+ }
-function trim$1(out) {
- if (out.length === 0) {
- return 0;
- }
+ var trimCount = 0; // Trim whitespace at the end of line
- var trimCount = 0; // Trim whitespace at the end of line
+ while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) {
+ trimCount += out.pop().length;
+ }
- while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) {
- trimCount += out.pop().length;
- }
+ if (out.length && typeof out[out.length - 1] === "string") {
+ var trimmed = out[out.length - 1].replace(/[ \t]*$/, "");
+ trimCount += out[out.length - 1].length - trimmed.length;
+ out[out.length - 1] = trimmed;
+ }
- if (out.length && typeof out[out.length - 1] === "string") {
- var trimmed = out[out.length - 1].replace(/[ \t]*$/, "");
- trimCount += out[out.length - 1].length - trimmed.length;
- out[out.length - 1] = trimmed;
+ return trimCount;
}
- return trimCount;
-}
+ function fits(next, restCommands, width, options, mustBeFlat) {
+ var restIdx = restCommands.length;
+ var cmds = [next]; // `out` is only used for width counting because `trim` requires to look
+ // backwards for space characters.
-function fits(next, restCommands, width, options, mustBeFlat) {
- var restIdx = restCommands.length;
- var cmds = [next]; // `out` is only used for width counting because `trim` requires to look
- // backwards for space characters.
+ var out = [];
- var out = [];
+ while (width >= 0) {
+ if (cmds.length === 0) {
+ if (restIdx === 0) {
+ return true;
+ }
- while (width >= 0) {
- if (cmds.length === 0) {
- if (restIdx === 0) {
- return true;
+ cmds.push(restCommands[restIdx - 1]);
+ restIdx--;
+ continue;
}
- cmds.push(restCommands[restIdx - 1]);
- restIdx--;
- continue;
- }
+ var x = cmds.pop();
+ var ind = x[0];
+ var mode = x[1];
+ var doc = x[2];
- var x = cmds.pop();
- var ind = x[0];
- var mode = x[1];
- var doc = x[2];
-
- if (typeof doc === "string") {
- out.push(doc);
- width -= getStringWidth(doc);
- } else {
- switch (doc.type) {
- case "concat":
- for (var i = doc.parts.length - 1; i >= 0; i--) {
- cmds.push([ind, mode, doc.parts[i]]);
- }
+ if (typeof doc === "string") {
+ out.push(doc);
+ width -= getStringWidth$1(doc);
+ } else {
+ switch (doc.type) {
+ case "concat":
+ for (var i = doc.parts.length - 1; i >= 0; i--) {
+ cmds.push([ind, mode, doc.parts[i]]);
+ }
- break;
+ break;
- case "indent":
- cmds.push([makeIndent(ind, options), mode, doc.contents]);
- break;
+ case "indent":
+ cmds.push([makeIndent(ind, options), mode, doc.contents]);
+ break;
- case "align":
- cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]);
- break;
+ case "align":
+ cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]);
+ break;
- case "trim":
- width += trim$1(out);
- break;
+ case "trim":
+ width += trim$1(out);
+ break;
- case "group":
- if (mustBeFlat && doc.break) {
- return false;
- }
+ case "group":
+ if (mustBeFlat && doc.break) {
+ return false;
+ }
- cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]);
+ cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]);
- if (doc.id) {
- groupModeMap[doc.id] = cmds[cmds.length - 1][1];
- }
+ if (doc.id) {
+ groupModeMap[doc.id] = cmds[cmds.length - 1][1];
+ }
- break;
+ break;
- case "fill":
- for (var _i = doc.parts.length - 1; _i >= 0; _i--) {
- cmds.push([ind, mode, doc.parts[_i]]);
- }
+ case "fill":
+ for (var _i = doc.parts.length - 1; _i >= 0; _i--) {
+ cmds.push([ind, mode, doc.parts[_i]]);
+ }
- break;
+ break;
- case "if-break":
- {
- var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode;
+ case "if-break":
+ {
+ var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode;
- if (groupMode === MODE_BREAK) {
- if (doc.breakContents) {
- cmds.push([ind, mode, doc.breakContents]);
+ if (groupMode === MODE_BREAK) {
+ if (doc.breakContents) {
+ cmds.push([ind, mode, doc.breakContents]);
+ }
}
- }
- if (groupMode === MODE_FLAT) {
- if (doc.flatContents) {
- cmds.push([ind, mode, doc.flatContents]);
+ if (groupMode === MODE_FLAT) {
+ if (doc.flatContents) {
+ cmds.push([ind, mode, doc.flatContents]);
+ }
}
+
+ break;
}
- break;
- }
+ case "line":
+ switch (mode) {
+ // fallthrough
+ case MODE_FLAT:
+ if (!doc.hard) {
+ if (!doc.soft) {
+ out.push(" ");
+ width -= 1;
+ }
- case "line":
- switch (mode) {
- // fallthrough
- case MODE_FLAT:
- if (!doc.hard) {
- if (!doc.soft) {
- out.push(" ");
- width -= 1;
+ break;
}
- break;
- }
+ return true;
- return true;
-
- case MODE_BREAK:
- return true;
- }
+ case MODE_BREAK:
+ return true;
+ }
- break;
+ break;
+ }
}
}
- }
-
- return false;
-}
-function printDocToString(doc, options) {
- groupModeMap = {};
- var width = options.printWidth;
- var newLine = convertEndOfLineToChars$1(options.endOfLine);
- var pos = 0; // cmds is basically a stack. We've turned a recursive call into a
- // while loop which is much faster. The while loop below adds new
- // cmds to the array instead of recursively calling `print`.
-
- var cmds = [[rootIndent(), MODE_BREAK, doc]];
- var out = [];
- var shouldRemeasure = false;
- var lineSuffix = [];
-
- while (cmds.length !== 0) {
- var x = cmds.pop();
- var ind = x[0];
- var mode = x[1];
- var _doc = x[2];
+ return false;
+ }
- if (typeof _doc === "string") {
- out.push(_doc);
- pos += getStringWidth(_doc);
- } else {
- switch (_doc.type) {
- case "cursor":
- out.push(cursor$2.placeholder);
- break;
+ function printDocToString(doc, options) {
+ groupModeMap = {};
+ var width = options.printWidth;
+ var newLine = convertEndOfLineToChars$1(options.endOfLine);
+ var pos = 0; // cmds is basically a stack. We've turned a recursive call into a
+ // while loop which is much faster. The while loop below adds new
+ // cmds to the array instead of recursively calling `print`.
+
+ var cmds = [[rootIndent(), MODE_BREAK, doc]];
+ var out = [];
+ var shouldRemeasure = false;
+ var lineSuffix = [];
+
+ while (cmds.length !== 0) {
+ var x = cmds.pop();
+ var ind = x[0];
+ var mode = x[1];
+ var _doc = x[2];
+
+ if (typeof _doc === "string") {
+ out.push(_doc);
+ pos += getStringWidth$1(_doc);
+ } else {
+ switch (_doc.type) {
+ case "cursor":
+ out.push(cursor$1.placeholder);
+ break;
- case "concat":
- for (var i = _doc.parts.length - 1; i >= 0; i--) {
- cmds.push([ind, mode, _doc.parts[i]]);
- }
+ case "concat":
+ for (var i = _doc.parts.length - 1; i >= 0; i--) {
+ cmds.push([ind, mode, _doc.parts[i]]);
+ }
- break;
+ break;
- case "indent":
- cmds.push([makeIndent(ind, options), mode, _doc.contents]);
- break;
+ case "indent":
+ cmds.push([makeIndent(ind, options), mode, _doc.contents]);
+ break;
- case "align":
- cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]);
- break;
+ case "align":
+ cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]);
+ break;
- case "trim":
- pos -= trim$1(out);
- break;
+ case "trim":
+ pos -= trim$1(out);
+ break;
- case "group":
- switch (mode) {
- case MODE_FLAT:
- if (!shouldRemeasure) {
- cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]);
- break;
- }
+ case "group":
+ switch (mode) {
+ case MODE_FLAT:
+ if (!shouldRemeasure) {
+ cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]);
+ break;
+ }
- // fallthrough
+ // fallthrough
- case MODE_BREAK:
- {
- shouldRemeasure = false;
- var next = [ind, MODE_FLAT, _doc.contents];
- var rem = width - pos;
+ case MODE_BREAK:
+ {
+ shouldRemeasure = false;
+ var next = [ind, MODE_FLAT, _doc.contents];
+ var rem = width - pos;
- if (!_doc.break && fits(next, cmds, rem, options)) {
- cmds.push(next);
- } else {
- // Expanded states are a rare case where a document
- // can manually provide multiple representations of
- // itself. It provides an array of documents
- // going from the least expanded (most flattened)
- // representation first to the most expanded. If a
- // group has these, we need to manually go through
- // these states and find the first one that fits.
- if (_doc.expandedStates) {
- var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1];
-
- if (_doc.break) {
- cmds.push([ind, MODE_BREAK, mostExpanded]);
- break;
- } else {
- for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) {
- if (_i2 >= _doc.expandedStates.length) {
- cmds.push([ind, MODE_BREAK, mostExpanded]);
- break;
- } else {
- var state = _doc.expandedStates[_i2];
- var cmd = [ind, MODE_FLAT, state];
-
- if (fits(cmd, cmds, rem, options)) {
- cmds.push(cmd);
+ if (!_doc.break && fits(next, cmds, rem, options)) {
+ cmds.push(next);
+ } else {
+ // Expanded states are a rare case where a document
+ // can manually provide multiple representations of
+ // itself. It provides an array of documents
+ // going from the least expanded (most flattened)
+ // representation first to the most expanded. If a
+ // group has these, we need to manually go through
+ // these states and find the first one that fits.
+ if (_doc.expandedStates) {
+ var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1];
+
+ if (_doc.break) {
+ cmds.push([ind, MODE_BREAK, mostExpanded]);
+ break;
+ } else {
+ for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) {
+ if (_i2 >= _doc.expandedStates.length) {
+ cmds.push([ind, MODE_BREAK, mostExpanded]);
break;
+ } else {
+ var state = _doc.expandedStates[_i2];
+ var cmd = [ind, MODE_FLAT, state];
+
+ if (fits(cmd, cmds, rem, options)) {
+ cmds.push(cmd);
+ break;
+ }
}
}
}
+ } else {
+ cmds.push([ind, MODE_BREAK, _doc.contents]);
}
- } else {
- cmds.push([ind, MODE_BREAK, _doc.contents]);
}
+
+ break;
}
+ }
+
+ if (_doc.id) {
+ groupModeMap[_doc.id] = cmds[cmds.length - 1][1];
+ }
+ break;
+ // Fills each line with as much code as possible before moving to a new
+ // line with the same indentation.
+ //
+ // Expects doc.parts to be an array of alternating content and
+ // whitespace. The whitespace contains the linebreaks.
+ //
+ // For example:
+ // ["I", line, "love", line, "monkeys"]
+ // or
+ // [{ type: group, ... }, softline, { type: group, ... }]
+ //
+ // It uses this parts structure to handle three main layout cases:
+ // * The first two content items fit on the same line without
+ // breaking
+ // -> output the first content item and the whitespace "flat".
+ // * Only the first content item fits on the line without breaking
+ // -> output the first content item "flat" and the whitespace with
+ // "break".
+ // * Neither content item fits on the line without breaking
+ // -> output the first content item and the whitespace with "break".
+
+ case "fill":
+ {
+ var _rem = width - pos;
+
+ var parts = _doc.parts;
+
+ if (parts.length === 0) {
break;
}
- }
- if (_doc.id) {
- groupModeMap[_doc.id] = cmds[cmds.length - 1][1];
- }
+ var content = parts[0];
+ var contentFlatCmd = [ind, MODE_FLAT, content];
+ var contentBreakCmd = [ind, MODE_BREAK, content];
+ var contentFits = fits(contentFlatCmd, [], _rem, options, true);
- break;
- // Fills each line with as much code as possible before moving to a new
- // line with the same indentation.
- //
- // Expects doc.parts to be an array of alternating content and
- // whitespace. The whitespace contains the linebreaks.
- //
- // For example:
- // ["I", line, "love", line, "monkeys"]
- // or
- // [{ type: group, ... }, softline, { type: group, ... }]
- //
- // It uses this parts structure to handle three main layout cases:
- // * The first two content items fit on the same line without
- // breaking
- // -> output the first content item and the whitespace "flat".
- // * Only the first content item fits on the line without breaking
- // -> output the first content item "flat" and the whitespace with
- // "break".
- // * Neither content item fits on the line without breaking
- // -> output the first content item and the whitespace with "break".
-
- case "fill":
- {
- var _rem = width - pos;
-
- var parts = _doc.parts;
-
- if (parts.length === 0) {
- break;
- }
-
- var content = parts[0];
- var contentFlatCmd = [ind, MODE_FLAT, content];
- var contentBreakCmd = [ind, MODE_BREAK, content];
- var contentFits = fits(contentFlatCmd, [], _rem, options, true);
+ if (parts.length === 1) {
+ if (contentFits) {
+ cmds.push(contentFlatCmd);
+ } else {
+ cmds.push(contentBreakCmd);
+ }
- if (parts.length === 1) {
- if (contentFits) {
- cmds.push(contentFlatCmd);
- } else {
- cmds.push(contentBreakCmd);
+ break;
}
- break;
- }
+ var whitespace = parts[1];
+ var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace];
+ var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace];
+
+ if (parts.length === 2) {
+ if (contentFits) {
+ cmds.push(whitespaceFlatCmd);
+ cmds.push(contentFlatCmd);
+ } else {
+ cmds.push(whitespaceBreakCmd);
+ cmds.push(contentBreakCmd);
+ }
+
+ break;
+ } // At this point we've handled the first pair (context, separator)
+ // and will create a new fill doc for the rest of the content.
+ // Ideally we wouldn't mutate the array here but coping all the
+ // elements to a new array would make this algorithm quadratic,
+ // which is unusable for large arrays (e.g. large texts in JSX).
- var whitespace = parts[1];
- var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace];
- var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace];
- if (parts.length === 2) {
- if (contentFits) {
+ parts.splice(0, 2);
+ var remainingCmd = [ind, mode, fill$1(parts)];
+ var secondContent = parts[0];
+ var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$1([content, whitespace, secondContent])];
+ var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true);
+
+ if (firstAndSecondContentFits) {
+ cmds.push(remainingCmd);
cmds.push(whitespaceFlatCmd);
cmds.push(contentFlatCmd);
+ } else if (contentFits) {
+ cmds.push(remainingCmd);
+ cmds.push(whitespaceBreakCmd);
+ cmds.push(contentFlatCmd);
} else {
+ cmds.push(remainingCmd);
cmds.push(whitespaceBreakCmd);
cmds.push(contentBreakCmd);
}
break;
- } // At this point we've handled the first pair (context, separator)
- // and will create a new fill doc for the rest of the content.
- // Ideally we wouldn't mutate the array here but coping all the
- // elements to a new array would make this algorithm quadratic,
- // which is unusable for large arrays (e.g. large texts in JSX).
-
-
- parts.splice(0, 2);
- var remainingCmd = [ind, mode, fill$1(parts)];
- var secondContent = parts[0];
- var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$2([content, whitespace, secondContent])];
- var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true);
-
- if (firstAndSecondContentFits) {
- cmds.push(remainingCmd);
- cmds.push(whitespaceFlatCmd);
- cmds.push(contentFlatCmd);
- } else if (contentFits) {
- cmds.push(remainingCmd);
- cmds.push(whitespaceBreakCmd);
- cmds.push(contentFlatCmd);
- } else {
- cmds.push(remainingCmd);
- cmds.push(whitespaceBreakCmd);
- cmds.push(contentBreakCmd);
}
- break;
- }
-
- case "if-break":
- {
- var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode;
+ case "if-break":
+ {
+ var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode;
- if (groupMode === MODE_BREAK) {
- if (_doc.breakContents) {
- cmds.push([ind, mode, _doc.breakContents]);
+ if (groupMode === MODE_BREAK) {
+ if (_doc.breakContents) {
+ cmds.push([ind, mode, _doc.breakContents]);
+ }
}
- }
- if (groupMode === MODE_FLAT) {
- if (_doc.flatContents) {
- cmds.push([ind, mode, _doc.flatContents]);
+ if (groupMode === MODE_FLAT) {
+ if (_doc.flatContents) {
+ cmds.push([ind, mode, _doc.flatContents]);
+ }
}
+
+ break;
}
+ case "line-suffix":
+ lineSuffix.push([ind, mode, _doc.contents]);
break;
- }
- case "line-suffix":
- lineSuffix.push([ind, mode, _doc.contents]);
- break;
+ case "line-suffix-boundary":
+ if (lineSuffix.length > 0) {
+ cmds.push([ind, mode, {
+ type: "line",
+ hard: true
+ }]);
+ }
- case "line-suffix-boundary":
- if (lineSuffix.length > 0) {
- cmds.push([ind, mode, {
- type: "line",
- hard: true
- }]);
- }
+ break;
- break;
+ case "line":
+ switch (mode) {
+ case MODE_FLAT:
+ if (!_doc.hard) {
+ if (!_doc.soft) {
+ out.push(" ");
+ pos += 1;
+ }
- case "line":
- switch (mode) {
- case MODE_FLAT:
- if (!_doc.hard) {
- if (!_doc.soft) {
- out.push(" ");
- pos += 1;
+ break;
+ } else {
+ // This line was forced into the output even if we
+ // were in flattened mode, so we need to tell the next
+ // group that no matter what, it needs to remeasure
+ // because the previous measurement didn't accurately
+ // capture the entire expression (this is necessary
+ // for nested groups)
+ shouldRemeasure = true;
}
- break;
- } else {
- // This line was forced into the output even if we
- // were in flattened mode, so we need to tell the next
- // group that no matter what, it needs to remeasure
- // because the previous measurement didn't accurately
- // capture the entire expression (this is necessary
- // for nested groups)
- shouldRemeasure = true;
- }
-
- // fallthrough
+ // fallthrough
- case MODE_BREAK:
- if (lineSuffix.length) {
- cmds.push([ind, mode, _doc]);
- [].push.apply(cmds, lineSuffix.reverse());
- lineSuffix = [];
- break;
- }
+ case MODE_BREAK:
+ if (lineSuffix.length) {
+ cmds.push([ind, mode, _doc]);
+ [].push.apply(cmds, lineSuffix.reverse());
+ lineSuffix = [];
+ break;
+ }
- if (_doc.literal) {
- if (ind.root) {
- out.push(newLine, ind.root.value);
- pos = ind.root.length;
+ if (_doc.literal) {
+ if (ind.root) {
+ out.push(newLine, ind.root.value);
+ pos = ind.root.length;
+ } else {
+ out.push(newLine);
+ pos = 0;
+ }
} else {
- out.push(newLine);
- pos = 0;
+ pos -= trim$1(out);
+ out.push(newLine + ind.value);
+ pos = ind.length;
}
- } else {
- pos -= trim$1(out);
- out.push(newLine + ind.value);
- pos = ind.length;
- }
- break;
- }
-
- break;
+ break;
+ }
- default:
+ break;
+ }
}
}
- }
- var cursorPlaceholderIndex = out.indexOf(cursor$2.placeholder);
+ var cursorPlaceholderIndex = out.indexOf(cursor$1.placeholder);
+
+ if (cursorPlaceholderIndex !== -1) {
+ var otherCursorPlaceholderIndex = out.indexOf(cursor$1.placeholder, cursorPlaceholderIndex + 1);
+ var beforeCursor = out.slice(0, cursorPlaceholderIndex).join("");
+ var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join("");
+ var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join("");
+ return {
+ formatted: beforeCursor + aroundCursor + afterCursor,
+ cursorNodeStart: beforeCursor.length,
+ cursorNodeText: aroundCursor
+ };
+ }
- if (cursorPlaceholderIndex !== -1) {
- var otherCursorPlaceholderIndex = out.indexOf(cursor$2.placeholder, cursorPlaceholderIndex + 1);
- var beforeCursor = out.slice(0, cursorPlaceholderIndex).join("");
- var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join("");
- var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join("");
return {
- formatted: beforeCursor + aroundCursor + afterCursor,
- cursorNodeStart: beforeCursor.length,
- cursorNodeText: aroundCursor
+ formatted: out.join("")
};
}
- return {
- formatted: out.join("")
+ var docPrinter = {
+ printDocToString: printDocToString
};
-}
-var docPrinter = {
- printDocToString: printDocToString
-};
+ var traverseDocOnExitStackMarker = {};
-var traverseDocOnExitStackMarker = {};
+ function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
+ var docsStack = [doc];
-function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
- var docsStack = [doc];
+ while (docsStack.length !== 0) {
+ var _doc = docsStack.pop();
- while (docsStack.length !== 0) {
- var _doc = docsStack.pop();
-
- if (_doc === traverseDocOnExitStackMarker) {
- onExit(docsStack.pop());
- continue;
- }
+ if (_doc === traverseDocOnExitStackMarker) {
+ onExit(docsStack.pop());
+ continue;
+ }
- var shouldRecurse = true;
+ var shouldRecurse = true;
- if (onEnter) {
- if (onEnter(_doc) === false) {
- shouldRecurse = false;
+ if (onEnter) {
+ if (onEnter(_doc) === false) {
+ shouldRecurse = false;
+ }
}
- }
- if (onExit) {
- docsStack.push(_doc);
- docsStack.push(traverseDocOnExitStackMarker);
- }
+ if (onExit) {
+ docsStack.push(_doc);
+ docsStack.push(traverseDocOnExitStackMarker);
+ }
- if (shouldRecurse) {
- // When there are multiple parts to process,
- // the parts need to be pushed onto the stack in reverse order,
- // so that they are processed in the original order
- // when the stack is popped.
- if (_doc.type === "concat" || _doc.type === "fill") {
- for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) {
- docsStack.push(_doc.parts[i]);
- }
- } else if (_doc.type === "if-break") {
- if (_doc.flatContents) {
- docsStack.push(_doc.flatContents);
- }
+ if (shouldRecurse) {
+ // When there are multiple parts to process,
+ // the parts need to be pushed onto the stack in reverse order,
+ // so that they are processed in the original order
+ // when the stack is popped.
+ if (_doc.type === "concat" || _doc.type === "fill") {
+ for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) {
+ docsStack.push(_doc.parts[i]);
+ }
+ } else if (_doc.type === "if-break") {
+ if (_doc.flatContents) {
+ docsStack.push(_doc.flatContents);
+ }
- if (_doc.breakContents) {
- docsStack.push(_doc.breakContents);
- }
- } else if (_doc.type === "group" && _doc.expandedStates) {
- if (shouldTraverseConditionalGroups) {
- for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) {
- docsStack.push(_doc.expandedStates[_i]);
+ if (_doc.breakContents) {
+ docsStack.push(_doc.breakContents);
}
- } else {
+ } else if (_doc.type === "group" && _doc.expandedStates) {
+ if (shouldTraverseConditionalGroups) {
+ for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) {
+ docsStack.push(_doc.expandedStates[_i]);
+ }
+ } else {
+ docsStack.push(_doc.contents);
+ }
+ } else if (_doc.contents) {
docsStack.push(_doc.contents);
}
- } else if (_doc.contents) {
- docsStack.push(_doc.contents);
}
}
}
-}
-function mapDoc$1(doc, cb) {
- if (doc.type === "concat" || doc.type === "fill") {
- var parts = doc.parts.map(function (part) {
- return mapDoc$1(part, cb);
- });
- return cb(Object.assign({}, doc, {
- parts: parts
- }));
- } else if (doc.type === "if-break") {
- var breakContents = doc.breakContents && mapDoc$1(doc.breakContents, cb);
- var flatContents = doc.flatContents && mapDoc$1(doc.flatContents, cb);
- return cb(Object.assign({}, doc, {
- breakContents: breakContents,
- flatContents: flatContents
- }));
- } else if (doc.contents) {
- var contents = mapDoc$1(doc.contents, cb);
- return cb(Object.assign({}, doc, {
- contents: contents
- }));
+ function mapDoc(doc, cb) {
+ if (doc.type === "concat" || doc.type === "fill") {
+ var parts = doc.parts.map(function (part) {
+ return mapDoc(part, cb);
+ });
+ return cb(Object.assign({}, doc, {
+ parts: parts
+ }));
+ } else if (doc.type === "if-break") {
+ var breakContents = doc.breakContents && mapDoc(doc.breakContents, cb);
+ var flatContents = doc.flatContents && mapDoc(doc.flatContents, cb);
+ return cb(Object.assign({}, doc, {
+ breakContents: breakContents,
+ flatContents: flatContents
+ }));
+ } else if (doc.contents) {
+ var contents = mapDoc(doc.contents, cb);
+ return cb(Object.assign({}, doc, {
+ contents: contents
+ }));
+ }
+
+ return cb(doc);
}
- return cb(doc);
-}
+ function findInDoc(doc, fn, defaultValue) {
+ var result = defaultValue;
+ var hasStopped = false;
-function findInDoc(doc, fn, defaultValue) {
- var result = defaultValue;
- var hasStopped = false;
+ function findInDocOnEnterFn(doc) {
+ var maybeResult = fn(doc);
- function findInDocOnEnterFn(doc) {
- var maybeResult = fn(doc);
+ if (maybeResult !== undefined) {
+ hasStopped = true;
+ result = maybeResult;
+ }
- if (maybeResult !== undefined) {
- hasStopped = true;
- result = maybeResult;
+ if (hasStopped) {
+ return false;
+ }
}
- if (hasStopped) {
- return false;
- }
+ traverseDoc(doc, findInDocOnEnterFn);
+ return result;
}
- traverseDoc(doc, findInDocOnEnterFn);
- return result;
-}
+ function isEmpty(n) {
+ return typeof n === "string" && n.length === 0;
+ }
-function isEmpty(n) {
- return typeof n === "string" && n.length === 0;
-}
+ function isLineNextFn(doc) {
+ if (typeof doc === "string") {
+ return false;
+ }
-function isLineNextFn(doc) {
- if (typeof doc === "string") {
- return false;
+ if (doc.type === "line") {
+ return true;
+ }
}
- if (doc.type === "line") {
- return true;
+ function isLineNext(doc) {
+ return findInDoc(doc, isLineNextFn, false);
}
-}
-function isLineNext(doc) {
- return findInDoc(doc, isLineNextFn, false);
-}
+ function willBreakFn(doc) {
+ if (doc.type === "group" && doc.break) {
+ return true;
+ }
-function willBreakFn(doc) {
- if (doc.type === "group" && doc.break) {
- return true;
- }
+ if (doc.type === "line" && doc.hard) {
+ return true;
+ }
- if (doc.type === "line" && doc.hard) {
- return true;
+ if (doc.type === "break-parent") {
+ return true;
+ }
}
- if (doc.type === "break-parent") {
- return true;
+ function willBreak(doc) {
+ return findInDoc(doc, willBreakFn, false);
}
-}
-
-function willBreak(doc) {
- return findInDoc(doc, willBreakFn, false);
-}
-function breakParentGroup(groupStack) {
- if (groupStack.length > 0) {
- var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because
- // the user is expected to manually handle what breaks.
+ function breakParentGroup(groupStack) {
+ if (groupStack.length > 0) {
+ var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because
+ // the user is expected to manually handle what breaks.
- if (!parentGroup.expandedStates) {
- parentGroup.break = true;
+ if (!parentGroup.expandedStates) {
+ parentGroup.break = true;
+ }
}
+
+ return null;
}
- return null;
-}
+ function propagateBreaks(doc) {
+ var alreadyVisitedSet = new Set();
+ var groupStack = [];
-function propagateBreaks(doc) {
- var alreadyVisitedSet = new Set();
- var groupStack = [];
+ function propagateBreaksOnEnterFn(doc) {
+ if (doc.type === "break-parent") {
+ breakParentGroup(groupStack);
+ }
- function propagateBreaksOnEnterFn(doc) {
- if (doc.type === "break-parent") {
- breakParentGroup(groupStack);
- }
+ if (doc.type === "group") {
+ groupStack.push(doc);
- if (doc.type === "group") {
- groupStack.push(doc);
+ if (alreadyVisitedSet.has(doc)) {
+ return false;
+ }
- if (alreadyVisitedSet.has(doc)) {
- return false;
+ alreadyVisitedSet.add(doc);
}
-
- alreadyVisitedSet.add(doc);
}
- }
- function propagateBreaksOnExitFn(doc) {
- if (doc.type === "group") {
- var group = groupStack.pop();
+ function propagateBreaksOnExitFn(doc) {
+ if (doc.type === "group") {
+ var group = groupStack.pop();
- if (group.break) {
- breakParentGroup(groupStack);
+ if (group.break) {
+ breakParentGroup(groupStack);
+ }
}
}
+
+ traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn,
+ /* shouldTraverseConditionalGroups */
+ true);
}
- traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn,
- /* shouldTraverseConditionalGroups */
- true);
-}
+ function removeLinesFn(doc) {
+ // Force this doc into flat mode by statically converting all
+ // lines into spaces (or soft lines into nothing). Hard lines
+ // should still output because there's too great of a chance
+ // of breaking existing assumptions otherwise.
+ if (doc.type === "line" && !doc.hard) {
+ return doc.soft ? "" : " ";
+ } else if (doc.type === "if-break") {
+ return doc.flatContents || "";
+ }
-function removeLinesFn(doc) {
- // Force this doc into flat mode by statically converting all
- // lines into spaces (or soft lines into nothing). Hard lines
- // should still output because there's too great of a chance
- // of breaking existing assumptions otherwise.
- if (doc.type === "line" && !doc.hard) {
- return doc.soft ? "" : " ";
- } else if (doc.type === "if-break") {
- return doc.flatContents || "";
+ return doc;
}
- return doc;
-}
+ function removeLines(doc) {
+ return mapDoc(doc, removeLinesFn);
+ }
-function removeLines(doc) {
- return mapDoc$1(doc, removeLinesFn);
-}
+ function stripTrailingHardline(doc) {
+ // HACK remove ending hardline, original PR: #1984
+ if (doc.type === "concat" && doc.parts.length !== 0) {
+ var lastPart = doc.parts[doc.parts.length - 1];
-function stripTrailingHardline(doc) {
- // HACK remove ending hardline, original PR: #1984
- if (doc.type === "concat" && doc.parts.length !== 0) {
- var lastPart = doc.parts[doc.parts.length - 1];
+ if (lastPart.type === "concat") {
+ if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") {
+ return {
+ type: "concat",
+ parts: doc.parts.slice(0, -1)
+ };
+ }
- if (lastPart.type === "concat") {
- if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") {
return {
type: "concat",
- parts: doc.parts.slice(0, -1)
+ parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart))
};
}
-
- return {
- type: "concat",
- parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart))
- };
}
- }
- return doc;
-}
+ return doc;
+ }
-var docUtils = {
- isEmpty: isEmpty,
- willBreak: willBreak,
- isLineNext: isLineNext,
- traverseDoc: traverseDoc,
- findInDoc: findInDoc,
- mapDoc: mapDoc$1,
- propagateBreaks: propagateBreaks,
- removeLines: removeLines,
- stripTrailingHardline: stripTrailingHardline
-};
+ var docUtils = {
+ isEmpty: isEmpty,
+ willBreak: willBreak,
+ isLineNext: isLineNext,
+ traverseDoc: traverseDoc,
+ findInDoc: findInDoc,
+ mapDoc: mapDoc,
+ propagateBreaks: propagateBreaks,
+ removeLines: removeLines,
+ stripTrailingHardline: stripTrailingHardline
+ };
-function flattenDoc(doc) {
- if (doc.type === "concat") {
- var res = [];
+ function flattenDoc(doc) {
+ if (doc.type === "concat") {
+ var res = [];
- for (var i = 0; i < doc.parts.length; ++i) {
- var doc2 = doc.parts[i];
+ for (var i = 0; i < doc.parts.length; ++i) {
+ var doc2 = doc.parts[i];
- if (typeof doc2 !== "string" && doc2.type === "concat") {
- [].push.apply(res, flattenDoc(doc2).parts);
- } else {
- var flattened = flattenDoc(doc2);
+ if (typeof doc2 !== "string" && doc2.type === "concat") {
+ [].push.apply(res, flattenDoc(doc2).parts);
+ } else {
+ var flattened = flattenDoc(doc2);
- if (flattened !== "") {
- res.push(flattened);
+ if (flattened !== "") {
+ res.push(flattened);
+ }
}
}
+
+ return Object.assign({}, doc, {
+ parts: res
+ });
+ } else if (doc.type === "if-break") {
+ return Object.assign({}, doc, {
+ breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null,
+ flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null
+ });
+ } else if (doc.type === "group") {
+ return Object.assign({}, doc, {
+ contents: flattenDoc(doc.contents),
+ expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates
+ });
+ } else if (doc.contents) {
+ return Object.assign({}, doc, {
+ contents: flattenDoc(doc.contents)
+ });
}
- return Object.assign({}, doc, {
- parts: res
- });
- } else if (doc.type === "if-break") {
- return Object.assign({}, doc, {
- breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null,
- flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null
- });
- } else if (doc.type === "group") {
- return Object.assign({}, doc, {
- contents: flattenDoc(doc.contents),
- expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates
- });
- } else if (doc.contents) {
- return Object.assign({}, doc, {
- contents: flattenDoc(doc.contents)
- });
+ return doc;
}
- return doc;
-}
+ function printDoc(doc) {
+ if (typeof doc === "string") {
+ return JSON.stringify(doc);
+ }
-function printDoc(doc) {
- if (typeof doc === "string") {
- return JSON.stringify(doc);
- }
+ if (doc.type === "line") {
+ if (doc.literal) {
+ return "literalline";
+ }
- if (doc.type === "line") {
- if (doc.literal) {
- return "literalline";
- }
+ if (doc.hard) {
+ return "hardline";
+ }
- if (doc.hard) {
- return "hardline";
- }
+ if (doc.soft) {
+ return "softline";
+ }
- if (doc.soft) {
- return "softline";
+ return "line";
}
- return "line";
- }
+ if (doc.type === "break-parent") {
+ return "breakParent";
+ }
- if (doc.type === "break-parent") {
- return "breakParent";
- }
+ if (doc.type === "trim") {
+ return "trim";
+ }
- if (doc.type === "trim") {
- return "trim";
- }
+ if (doc.type === "concat") {
+ return "[" + doc.parts.map(printDoc).join(", ") + "]";
+ }
- if (doc.type === "concat") {
- return "[" + doc.parts.map(printDoc).join(", ") + "]";
- }
+ if (doc.type === "indent") {
+ return "indent(" + printDoc(doc.contents) + ")";
+ }
- if (doc.type === "indent") {
- return "indent(" + printDoc(doc.contents) + ")";
- }
+ if (doc.type === "align") {
+ return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")";
+ }
- if (doc.type === "align") {
- return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")";
- }
+ if (doc.type === "if-break") {
+ return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")";
+ }
- if (doc.type === "if-break") {
- return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")";
- }
+ if (doc.type === "group") {
+ if (doc.expandedStates) {
+ return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])";
+ }
- if (doc.type === "group") {
- if (doc.expandedStates) {
- return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])";
+ return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")";
}
- return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")";
- }
+ if (doc.type === "fill") {
+ return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")";
+ }
- if (doc.type === "fill") {
- return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")";
- }
+ if (doc.type === "line-suffix") {
+ return "lineSuffix(" + printDoc(doc.contents) + ")";
+ }
- if (doc.type === "line-suffix") {
- return "lineSuffix(" + printDoc(doc.contents) + ")";
- }
+ if (doc.type === "line-suffix-boundary") {
+ return "lineSuffixBoundary";
+ }
- if (doc.type === "line-suffix-boundary") {
- return "lineSuffixBoundary";
+ throw new Error("Unknown doc type " + doc.type);
}
- throw new Error("Unknown doc type " + doc.type);
-}
-
-var docDebug = {
- printDocToDebug: function printDocToDebug(doc) {
- return printDoc(flattenDoc(doc));
- }
-};
+ var docDebug = {
+ printDocToDebug: function printDocToDebug(doc) {
+ return printDoc(flattenDoc(doc));
+ }
+ };
-var doc = {
- builders: docBuilders,
- printer: docPrinter,
- utils: docUtils,
- debug: docDebug
-};
+ var doc = {
+ builders: docBuilders,
+ printer: docPrinter,
+ utils: docUtils,
+ debug: docDebug
+ };
-var mapDoc$2 = doc.utils.mapDoc;
+ var mapDoc$1 = doc.utils.mapDoc;
+
+ function isNextLineEmpty$1(text, node, options) {
+ return util.isNextLineEmpty(text, node, options.locEnd);
+ }
+
+ function isPreviousLineEmpty$1(text, node, options) {
+ return util.isPreviousLineEmpty(text, node, options.locStart);
+ }
+
+ function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) {
+ return util.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd);
+ }
+
+ var utilShared = {
+ getMaxContinuousCount: util.getMaxContinuousCount,
+ getStringWidth: util.getStringWidth,
+ getAlignmentSize: util.getAlignmentSize,
+ getIndentSize: util.getIndentSize,
+ skip: util.skip,
+ skipWhitespace: util.skipWhitespace,
+ skipSpaces: util.skipSpaces,
+ skipNewline: util.skipNewline,
+ skipToLineEnd: util.skipToLineEnd,
+ skipEverythingButNewLine: util.skipEverythingButNewLine,
+ skipInlineComment: util.skipInlineComment,
+ skipTrailingComment: util.skipTrailingComment,
+ hasNewline: util.hasNewline,
+ hasNewlineInRange: util.hasNewlineInRange,
+ hasSpaces: util.hasSpaces,
+ isNextLineEmpty: isNextLineEmpty$1,
+ isNextLineEmptyAfterIndex: util.isNextLineEmptyAfterIndex,
+ isPreviousLineEmpty: isPreviousLineEmpty$1,
+ getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1,
+ mapDoc: mapDoc$1,
+ // TODO: remove in 2.0, we already exposed it in docUtils
+ makeString: util.makeString,
+ addLeadingComment: util.addLeadingComment,
+ addDanglingComment: util.addDanglingComment,
+ addTrailingComment: util.addTrailingComment
+ };
-function isNextLineEmpty$1(text, node, options) {
- return util.isNextLineEmpty(text, node, options.locEnd);
-}
+ var _require$$0$builders = doc.builders,
+ concat$2 = _require$$0$builders.concat,
+ hardline$1 = _require$$0$builders.hardline,
+ breakParent$1 = _require$$0$builders.breakParent,
+ indent$1 = _require$$0$builders.indent,
+ lineSuffix$1 = _require$$0$builders.lineSuffix,
+ join$1 = _require$$0$builders.join,
+ cursor$2 = _require$$0$builders.cursor;
+ var hasNewline$1 = util.hasNewline,
+ skipNewline$1 = util.skipNewline,
+ isPreviousLineEmpty$2 = util.isPreviousLineEmpty;
+ var addLeadingComment$1 = utilShared.addLeadingComment,
+ addDanglingComment$1 = utilShared.addDanglingComment,
+ addTrailingComment$1 = utilShared.addTrailingComment;
+ var childNodesCacheKey = Symbol("child-nodes");
+
+ function getSortedChildNodes(node, options, resultArray) {
+ if (!node) {
+ return;
+ }
-function isPreviousLineEmpty$2(text, node, options) {
- return util.isPreviousLineEmpty(text, node, options.locStart);
-}
+ var printer = options.printer,
+ locStart = options.locStart,
+ locEnd = options.locEnd;
-function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) {
- return util.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd);
-}
+ if (resultArray) {
+ if (node && printer.canAttachComment && printer.canAttachComment(node)) {
+ // This reverse insertion sort almost always takes constant
+ // time because we almost always (maybe always?) append the
+ // nodes in order anyway.
+ var i;
-var utilShared = {
- getMaxContinuousCount: util.getMaxContinuousCount,
- getStringWidth: util.getStringWidth,
- getAlignmentSize: util.getAlignmentSize,
- getIndentSize: util.getIndentSize,
- skip: util.skip,
- skipWhitespace: util.skipWhitespace,
- skipSpaces: util.skipSpaces,
- skipNewline: util.skipNewline,
- skipToLineEnd: util.skipToLineEnd,
- skipEverythingButNewLine: util.skipEverythingButNewLine,
- skipInlineComment: util.skipInlineComment,
- skipTrailingComment: util.skipTrailingComment,
- hasNewline: util.hasNewline,
- hasNewlineInRange: util.hasNewlineInRange,
- hasSpaces: util.hasSpaces,
- isNextLineEmpty: isNextLineEmpty$1,
- isNextLineEmptyAfterIndex: util.isNextLineEmptyAfterIndex,
- isPreviousLineEmpty: isPreviousLineEmpty$2,
- getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1,
- mapDoc: mapDoc$2,
- // TODO: remove in 2.0, we already exposed it in docUtils
- makeString: util.makeString,
- addLeadingComment: util.addLeadingComment,
- addDanglingComment: util.addDanglingComment,
- addTrailingComment: util.addTrailingComment
-};
+ for (i = resultArray.length - 1; i >= 0; --i) {
+ if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) {
+ break;
+ }
+ }
-var assert$3 = ( assert$2 && assert ) || assert$2;
+ resultArray.splice(i + 1, 0, node);
+ return;
+ }
+ } else if (node[childNodesCacheKey]) {
+ return node[childNodesCacheKey];
+ }
-var _require$$0$builders = doc.builders;
-var concat = _require$$0$builders.concat;
-var hardline = _require$$0$builders.hardline;
-var breakParent = _require$$0$builders.breakParent;
-var indent = _require$$0$builders.indent;
-var lineSuffix = _require$$0$builders.lineSuffix;
-var join = _require$$0$builders.join;
-var cursor = _require$$0$builders.cursor;
-var hasNewline = util.hasNewline;
-var skipNewline = util.skipNewline;
-var isPreviousLineEmpty = util.isPreviousLineEmpty;
-var addLeadingComment = utilShared.addLeadingComment;
-var addDanglingComment = utilShared.addDanglingComment;
-var addTrailingComment = utilShared.addTrailingComment;
-var childNodesCacheKey = Symbol("child-nodes");
-
-function getSortedChildNodes(node, options, resultArray) {
- if (!node) {
- return;
- }
-
- var printer = options.printer,
- locStart = options.locStart,
- locEnd = options.locEnd;
-
- if (resultArray) {
- if (node && printer.canAttachComment && printer.canAttachComment(node)) {
- // This reverse insertion sort almost always takes constant
- // time because we almost always (maybe always?) append the
- // nodes in order anyway.
- var i;
+ var childNodes;
- for (i = resultArray.length - 1; i >= 0; --i) {
- if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) {
- break;
- }
- }
+ if (printer.getCommentChildNodes) {
+ childNodes = printer.getCommentChildNodes(node);
+ } else if (node && _typeof(node) === "object") {
+ childNodes = Object.keys(node).filter(function (n) {
+ return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode";
+ }).map(function (n) {
+ return node[n];
+ });
+ }
- resultArray.splice(i + 1, 0, node);
+ if (!childNodes) {
return;
}
- } else if (node[childNodesCacheKey]) {
- return node[childNodesCacheKey];
- }
- var childNodes;
+ if (!resultArray) {
+ Object.defineProperty(node, childNodesCacheKey, {
+ value: resultArray = [],
+ enumerable: false
+ });
+ }
- if (printer.getCommentChildNodes) {
- childNodes = printer.getCommentChildNodes(node);
- } else if (node && _typeof(node) === "object") {
- childNodes = Object.keys(node).filter(function (n) {
- return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode";
- }).map(function (n) {
- return node[n];
+ childNodes.forEach(function (childNode) {
+ getSortedChildNodes(childNode, options, resultArray);
});
- }
-
- if (!childNodes) {
- return;
- }
+ return resultArray;
+ } // As efficiently as possible, decorate the comment object with
+ // .precedingNode, .enclosingNode, and/or .followingNode properties, at
+ // least one of which is guaranteed to be defined.
+
+
+ function decorateComment(node, comment, options) {
+ var locStart = options.locStart,
+ locEnd = options.locEnd;
+ var childNodes = getSortedChildNodes(node, options);
+ var precedingNode;
+ var followingNode; // Time to dust off the old binary search robes and wizard hat.
+
+ var left = 0;
+ var right = childNodes.length;
+
+ while (left < right) {
+ var middle = left + right >> 1;
+ var child = childNodes[middle];
+
+ if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) {
+ // The comment is completely contained by this child node.
+ comment.enclosingNode = child;
+ decorateComment(child, comment, options);
+ return; // Abandon the binary search at this level.
+ }
+
+ if (locEnd(child) - locStart(comment) <= 0) {
+ // This child node falls completely before the comment.
+ // Because we will never consider this node or any nodes
+ // before it again, this node must be the closest preceding
+ // node we have encountered so far.
+ precedingNode = child;
+ left = middle + 1;
+ continue;
+ }
- if (!resultArray) {
- Object.defineProperty(node, childNodesCacheKey, {
- value: resultArray = [],
- enumerable: false
- });
- }
+ if (locEnd(comment) - locStart(child) <= 0) {
+ // This child node falls completely after the comment.
+ // Because we will never consider this node or any nodes after
+ // it again, this node must be the closest following node we
+ // have encountered so far.
+ followingNode = child;
+ right = middle;
+ continue;
+ }
+ /* istanbul ignore next */
- childNodes.forEach(function (childNode) {
- getSortedChildNodes(childNode, options, resultArray);
- });
- return resultArray;
-} // As efficiently as possible, decorate the comment object with
-// .precedingNode, .enclosingNode, and/or .followingNode properties, at
-// least one of which is guaranteed to be defined.
-
-
-function decorateComment(node, comment, options) {
- var locStart = options.locStart,
- locEnd = options.locEnd;
- var childNodes = getSortedChildNodes(node, options);
- var precedingNode;
- var followingNode; // Time to dust off the old binary search robes and wizard hat.
-
- var left = 0;
- var right = childNodes.length;
-
- while (left < right) {
- var middle = left + right >> 1;
- var child = childNodes[middle];
-
- if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) {
- // The comment is completely contained by this child node.
- comment.enclosingNode = child;
- decorateComment(child, comment, options);
- return; // Abandon the binary search at this level.
- }
-
- if (locEnd(child) - locStart(comment) <= 0) {
- // This child node falls completely before the comment.
- // Because we will never consider this node or any nodes
- // before it again, this node must be the closest preceding
- // node we have encountered so far.
- precedingNode = child;
- left = middle + 1;
- continue;
- }
-
- if (locEnd(comment) - locStart(child) <= 0) {
- // This child node falls completely after the comment.
- // Because we will never consider this node or any nodes after
- // it again, this node must be the closest following node we
- // have encountered so far.
- followingNode = child;
- right = middle;
- continue;
- }
- /* istanbul ignore next */
+ throw new Error("Comment location overlaps with node location");
+ } // We don't want comments inside of different expressions inside of the same
+ // template literal to move to another expression.
- throw new Error("Comment location overlaps with node location");
- } // We don't want comments inside of different expressions inside of the same
- // template literal to move to another expression.
+ if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") {
+ var quasis = comment.enclosingNode.quasis;
+ var commentIndex = findExpressionIndexForComment(quasis, comment, options);
- if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") {
- var quasis = comment.enclosingNode.quasis;
- var commentIndex = findExpressionIndexForComment(quasis, comment, options);
+ if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) {
+ precedingNode = null;
+ }
- if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) {
- precedingNode = null;
+ if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) {
+ followingNode = null;
+ }
}
- if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) {
- followingNode = null;
+ if (precedingNode) {
+ comment.precedingNode = precedingNode;
}
- }
- if (precedingNode) {
- comment.precedingNode = precedingNode;
+ if (followingNode) {
+ comment.followingNode = followingNode;
+ }
}
- if (followingNode) {
- comment.followingNode = followingNode;
- }
-}
+ function attach(comments, ast, text, options) {
+ if (!Array.isArray(comments)) {
+ return;
+ }
-function attach(comments, ast, text, options) {
- if (!Array.isArray(comments)) {
- return;
- }
+ var tiesToBreak = [];
+ var locStart = options.locStart,
+ locEnd = options.locEnd;
+ comments.forEach(function (comment, i) {
+ if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") {
+ if (locStart(comment) - locStart(ast) <= 0) {
+ addLeadingComment$1(ast, comment);
+ return;
+ }
- var tiesToBreak = [];
- var locStart = options.locStart,
- locEnd = options.locEnd;
- comments.forEach(function (comment, i) {
- if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") {
- if (locStart(comment) - locStart(ast) <= 0) {
- addLeadingComment(ast, comment);
- return;
+ if (locEnd(comment) - locEnd(ast) >= 0) {
+ addTrailingComment$1(ast, comment);
+ return;
+ }
}
- if (locEnd(comment) - locEnd(ast) >= 0) {
- addTrailingComment(ast, comment);
- return;
- }
- }
+ decorateComment(ast, comment, options);
+ var precedingNode = comment.precedingNode,
+ enclosingNode = comment.enclosingNode,
+ followingNode = comment.followingNode;
+ var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () {
+ return false;
+ };
+ var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () {
+ return false;
+ };
+ var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () {
+ return false;
+ };
+ var isLastComment = comments.length - 1 === i;
- decorateComment(ast, comment, options);
- var precedingNode = comment.precedingNode,
- enclosingNode = comment.enclosingNode,
- followingNode = comment.followingNode;
- var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () {
- return false;
- };
- var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () {
- return false;
- };
- var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () {
- return false;
- };
- var isLastComment = comments.length - 1 === i;
+ if (hasNewline$1(text, locStart(comment), {
+ backwards: true
+ })) {
+ // If a comment exists on its own line, prefer a leading comment.
+ // We also need to check if it's the first line of the file.
+ if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) ; else if (followingNode) {
+ // Always a leading comment.
+ addLeadingComment$1(followingNode, comment);
+ } else if (precedingNode) {
+ addTrailingComment$1(precedingNode, comment);
+ } else if (enclosingNode) {
+ addDanglingComment$1(enclosingNode, comment);
+ } else {
+ // There are no nodes, let's attach it to the root of the ast
+
+ /* istanbul ignore next */
+ addDanglingComment$1(ast, comment);
+ }
+ } else if (hasNewline$1(text, locEnd(comment))) {
+ if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) ; else if (precedingNode) {
+ // There is content before this comment on the same line, but
+ // none after it, so prefer a trailing comment of the previous node.
+ addTrailingComment$1(precedingNode, comment);
+ } else if (followingNode) {
+ addLeadingComment$1(followingNode, comment);
+ } else if (enclosingNode) {
+ addDanglingComment$1(enclosingNode, comment);
+ } else {
+ // There are no nodes, let's attach it to the root of the ast
- if (hasNewline(text, locStart(comment), {
- backwards: true
- })) {
- // If a comment exists on its own line, prefer a leading comment.
- // We also need to check if it's the first line of the file.
- if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) {// We're good
- } else if (followingNode) {
- // Always a leading comment.
- addLeadingComment(followingNode, comment);
- } else if (precedingNode) {
- addTrailingComment(precedingNode, comment);
- } else if (enclosingNode) {
- addDanglingComment(enclosingNode, comment);
+ /* istanbul ignore next */
+ addDanglingComment$1(ast, comment);
+ }
} else {
- // There are no nodes, let's attach it to the root of the ast
+ if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) ; else if (precedingNode && followingNode) {
+ // Otherwise, text exists both before and after the comment on
+ // the same line. If there is both a preceding and following
+ // node, use a tie-breaking algorithm to determine if it should
+ // be attached to the next or previous node. In the last case,
+ // simply attach the right node;
+ var tieCount = tiesToBreak.length;
+
+ if (tieCount > 0) {
+ var lastTie = tiesToBreak[tieCount - 1];
+
+ if (lastTie.followingNode !== comment.followingNode) {
+ breakTies(tiesToBreak, text, options);
+ }
+ }
- /* istanbul ignore next */
- addDanglingComment(ast, comment);
- }
- } else if (hasNewline(text, locEnd(comment))) {
- if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) {// We're good
- } else if (precedingNode) {
- // There is content before this comment on the same line, but
- // none after it, so prefer a trailing comment of the previous node.
- addTrailingComment(precedingNode, comment);
- } else if (followingNode) {
- addLeadingComment(followingNode, comment);
- } else if (enclosingNode) {
- addDanglingComment(enclosingNode, comment);
- } else {
- // There are no nodes, let's attach it to the root of the ast
+ tiesToBreak.push(comment);
+ } else if (precedingNode) {
+ addTrailingComment$1(precedingNode, comment);
+ } else if (followingNode) {
+ addLeadingComment$1(followingNode, comment);
+ } else if (enclosingNode) {
+ addDanglingComment$1(enclosingNode, comment);
+ } else {
+ // There are no nodes, let's attach it to the root of the ast
- /* istanbul ignore next */
- addDanglingComment(ast, comment);
+ /* istanbul ignore next */
+ addDanglingComment$1(ast, comment);
+ }
}
- } else {
- if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) {// We're good
- } else if (precedingNode && followingNode) {
- // Otherwise, text exists both before and after the comment on
- // the same line. If there is both a preceding and following
- // node, use a tie-breaking algorithm to determine if it should
- // be attached to the next or previous node. In the last case,
- // simply attach the right node;
- var tieCount = tiesToBreak.length;
-
- if (tieCount > 0) {
- var lastTie = tiesToBreak[tieCount - 1];
-
- if (lastTie.followingNode !== comment.followingNode) {
- breakTies(tiesToBreak, text, options);
- }
- }
-
- tiesToBreak.push(comment);
- } else if (precedingNode) {
- addTrailingComment(precedingNode, comment);
- } else if (followingNode) {
- addLeadingComment(followingNode, comment);
- } else if (enclosingNode) {
- addDanglingComment(enclosingNode, comment);
- } else {
- // There are no nodes, let's attach it to the root of the ast
+ });
+ breakTies(tiesToBreak, text, options);
+ comments.forEach(function (comment) {
+ // These node references were useful for breaking ties, but we
+ // don't need them anymore, and they create cycles in the AST that
+ // may lead to infinite recursion if we don't delete them here.
+ delete comment.precedingNode;
+ delete comment.enclosingNode;
+ delete comment.followingNode;
+ });
+ }
- /* istanbul ignore next */
- addDanglingComment(ast, comment);
- }
+ function breakTies(tiesToBreak, text, options) {
+ var tieCount = tiesToBreak.length;
+
+ if (tieCount === 0) {
+ return;
}
- });
- breakTies(tiesToBreak, text, options);
- comments.forEach(function (comment) {
- // These node references were useful for breaking ties, but we
- // don't need them anymore, and they create cycles in the AST that
- // may lead to infinite recursion if we don't delete them here.
- delete comment.precedingNode;
- delete comment.enclosingNode;
- delete comment.followingNode;
- });
-}
-function breakTies(tiesToBreak, text, options) {
- var tieCount = tiesToBreak.length;
+ var _tiesToBreak$ = tiesToBreak[0],
+ precedingNode = _tiesToBreak$.precedingNode,
+ followingNode = _tiesToBreak$.followingNode;
+ var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps
+ // between the tied comments. In order to qualify as leading, a
+ // comment must be separated from followingNode by an unbroken series of
+ // gaps (or other comments). Gaps should only contain whitespace or open
+ // parentheses.
- if (tieCount === 0) {
- return;
- }
+ var indexOfFirstLeadingComment;
- var _tiesToBreak$ = tiesToBreak[0],
- precedingNode = _tiesToBreak$.precedingNode,
- followingNode = _tiesToBreak$.followingNode;
- var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps
- // between the tied comments. In order to qualify as leading, a
- // comment must be separated from followingNode by an unbroken series of
- // gaps (or other comments). Gaps should only contain whitespace or open
- // parentheses.
+ for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
+ var comment = tiesToBreak[indexOfFirstLeadingComment - 1];
+ assert.strictEqual(comment.precedingNode, precedingNode);
+ assert.strictEqual(comment.followingNode, followingNode);
+ var gap = text.slice(options.locEnd(comment), gapEndPos);
- var indexOfFirstLeadingComment;
+ if (/^[\s(]*$/.test(gap)) {
+ gapEndPos = options.locStart(comment);
+ } else {
+ // The gap string contained something other than whitespace or open
+ // parentheses.
+ break;
+ }
+ }
- for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
- var comment = tiesToBreak[indexOfFirstLeadingComment - 1];
- assert$3.strictEqual(comment.precedingNode, precedingNode);
- assert$3.strictEqual(comment.followingNode, followingNode);
- var gap = text.slice(options.locEnd(comment), gapEndPos).trim();
+ tiesToBreak.forEach(function (comment, i) {
+ if (i < indexOfFirstLeadingComment) {
+ addTrailingComment$1(precedingNode, comment);
+ } else {
+ addLeadingComment$1(followingNode, comment);
+ }
+ });
+ tiesToBreak.length = 0;
+ }
- if (gap === "" || /^\(+$/.test(gap)) {
- gapEndPos = options.locStart(comment);
- } else {
- // The gap string contained something other than whitespace or open
- // parentheses.
- break;
- }
+ function printComment(commentPath, options) {
+ var comment = commentPath.getValue();
+ comment.printed = true;
+ return options.printer.printComment(commentPath, options);
}
- tiesToBreak.forEach(function (comment, i) {
- if (i < indexOfFirstLeadingComment) {
- addTrailingComment(precedingNode, comment);
- } else {
- addLeadingComment(followingNode, comment);
- }
- });
- tiesToBreak.length = 0;
-}
+ function findExpressionIndexForComment(quasis, comment, options) {
+ var startPos = options.locStart(comment) - 1;
-function printComment(commentPath, options) {
- var comment = commentPath.getValue();
- comment.printed = true;
- return options.printer.printComment(commentPath, options);
-}
+ for (var i = 1; i < quasis.length; ++i) {
+ if (startPos < getQuasiRange(quasis[i]).start) {
+ return i - 1;
+ }
+ } // We haven't found it, it probably means that some of the locations are off.
+ // Let's just return the first one.
-function findExpressionIndexForComment(quasis, comment, options) {
- var startPos = options.locStart(comment) - 1;
+ /* istanbul ignore next */
- for (var i = 1; i < quasis.length; ++i) {
- if (startPos < getQuasiRange(quasis[i]).start) {
- return i - 1;
- }
- } // We haven't found it, it probably means that some of the locations are off.
- // Let's just return the first one.
- /* istanbul ignore next */
+ return 0;
+ }
+ function getQuasiRange(expr) {
+ if (expr.start !== undefined) {
+ // Babel
+ return {
+ start: expr.start,
+ end: expr.end
+ };
+ } // Flow
- return 0;
-}
-function getQuasiRange(expr) {
- if (expr.start !== undefined) {
- // Babel
return {
- start: expr.start,
- end: expr.end
+ start: expr.range[0],
+ end: expr.range[1]
};
- } // Flow
+ }
+ function printLeadingComment(commentPath, print, options) {
+ var comment = commentPath.getValue();
+ var contents = printComment(commentPath, options);
- return {
- start: expr.range[0],
- end: expr.range[1]
- };
-}
+ if (!contents) {
+ return "";
+ }
-function printLeadingComment(commentPath, print, options) {
- var comment = commentPath.getValue();
- var contents = printComment(commentPath, options);
+ var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the
+ // same line or not.
- if (!contents) {
- return "";
- }
-
- var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the
- // same line or not.
+ if (isBlock) {
+ return concat$2([contents, hasNewline$1(options.originalText, options.locEnd(comment)) ? hardline$1 : " "]);
+ }
- if (isBlock) {
- return concat([contents, hasNewline(options.originalText, options.locEnd(comment)) ? hardline : " "]);
+ return concat$2([contents, hardline$1]);
}
- return concat([contents, hardline]);
-}
+ function printTrailingComment(commentPath, print, options) {
+ var comment = commentPath.getValue();
+ var contents = printComment(commentPath, options);
+
+ if (!contents) {
+ return "";
+ }
-function printTrailingComment(commentPath, print, options) {
- var comment = commentPath.getValue();
- var contents = printComment(commentPath, options);
+ var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break
+ // when the parentParentNode is a ClassDeclaration/-Expression
+ // And the parentNode is in the superClass property
- if (!contents) {
- return "";
- }
+ var parentNode = commentPath.getNode(1);
+ var parentParentNode = commentPath.getNode(2);
+ var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode;
- var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break
- // when the parentParentNode is a ClassDeclaration/-Expression
- // And the parentNode is in the superClass property
+ if (hasNewline$1(options.originalText, options.locStart(comment), {
+ backwards: true
+ })) {
+ // This allows comments at the end of nested structures:
+ // {
+ // x: 1,
+ // y: 2
+ // // A comment
+ // }
+ // Those kinds of comments are almost always leading comments, but
+ // here it doesn't go "outside" the block and turns it into a
+ // trailing comment for `2`. We can simulate the above by checking
+ // if this a comment on its own line; normal trailing comments are
+ // always at the end of another expression.
+ var isLineBeforeEmpty = isPreviousLineEmpty$2(options.originalText, comment, options.locStart);
+ return lineSuffix$1(concat$2([hardline$1, isLineBeforeEmpty ? hardline$1 : "", contents]));
+ } else if (isBlock || isParentSuperClass) {
+ // Trailing block comments never need a newline
+ return concat$2([" ", contents]);
+ }
+
+ return concat$2([lineSuffix$1(concat$2([" ", contents])), !isBlock ? breakParent$1 : ""]);
+ }
+
+ function printDanglingComments(path, options, sameIndent, filter) {
+ var parts = [];
+ var node = path.getValue();
- var parentNode = commentPath.getNode(1);
- var parentParentNode = commentPath.getNode(2);
- var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode;
+ if (!node || !node.comments) {
+ return "";
+ }
- if (hasNewline(options.originalText, options.locStart(comment), {
- backwards: true
- })) {
- // This allows comments at the end of nested structures:
- // {
- // x: 1,
- // y: 2
- // // A comment
- // }
- // Those kinds of comments are almost always leading comments, but
- // here it doesn't go "outside" the block and turns it into a
- // trailing comment for `2`. We can simulate the above by checking
- // if this a comment on its own line; normal trailing comments are
- // always at the end of another expression.
- var isLineBeforeEmpty = isPreviousLineEmpty(options.originalText, comment, options.locStart);
- return lineSuffix(concat([hardline, isLineBeforeEmpty ? hardline : "", contents]));
- } else if (isBlock || isParentSuperClass) {
- // Trailing block comments never need a newline
- return concat([" ", contents]);
- }
-
- return concat([lineSuffix(concat([" ", contents])), !isBlock ? breakParent : ""]);
-}
-
-function printDanglingComments(path, options, sameIndent, filter) {
- var parts = [];
- var node = path.getValue();
-
- if (!node || !node.comments) {
- return "";
- }
+ path.each(function (commentPath) {
+ var comment = commentPath.getValue();
- path.each(function (commentPath) {
- var comment = commentPath.getValue();
+ if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) {
+ parts.push(printComment(commentPath, options));
+ }
+ }, "comments");
- if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) {
- parts.push(printComment(commentPath, options));
+ if (parts.length === 0) {
+ return "";
}
- }, "comments");
- if (parts.length === 0) {
- return "";
- }
+ if (sameIndent) {
+ return join$1(hardline$1, parts);
+ }
- if (sameIndent) {
- return join(hardline, parts);
+ return indent$1(concat$2([hardline$1, join$1(hardline$1, parts)]));
}
- return indent(concat([hardline, join(hardline, parts)]));
-}
+ function prependCursorPlaceholder(path, options, printed) {
+ if (path.getNode() === options.cursorNode && path.getValue()) {
+ return concat$2([cursor$2, printed, cursor$2]);
+ }
-function prependCursorPlaceholder(path, options, printed) {
- if (path.getNode() === options.cursorNode && path.getValue()) {
- return concat([cursor, printed, cursor]);
+ return printed;
}
- return printed;
-}
-
-function printComments(path, print, options, needsSemi) {
- var value = path.getValue();
- var printed = print(path);
- var comments = value && value.comments;
+ function printComments(path, print, options, needsSemi) {
+ var value = path.getValue();
+ var printed = print(path);
+ var comments = value && value.comments;
- if (!comments || comments.length === 0) {
- return prependCursorPlaceholder(path, options, printed);
- }
+ if (!comments || comments.length === 0) {
+ return prependCursorPlaceholder(path, options, printed);
+ }
- var leadingParts = [];
- var trailingParts = [needsSemi ? ";" : "", printed];
- path.each(function (commentPath) {
- var comment = commentPath.getValue();
- var leading = comment.leading,
- trailing = comment.trailing;
+ var leadingParts = [];
+ var trailingParts = [needsSemi ? ";" : "", printed];
+ path.each(function (commentPath) {
+ var comment = commentPath.getValue();
+ var leading = comment.leading,
+ trailing = comment.trailing;
- if (leading) {
- var contents = printLeadingComment(commentPath, print, options);
+ if (leading) {
+ var contents = printLeadingComment(commentPath, print, options);
- if (!contents) {
- return;
- }
+ if (!contents) {
+ return;
+ }
- leadingParts.push(contents);
- var text = options.originalText;
+ leadingParts.push(contents);
+ var text = options.originalText;
+ var index = skipNewline$1(text, options.locEnd(comment));
- if (hasNewline(text, skipNewline(text, options.locEnd(comment)))) {
- leadingParts.push(hardline);
+ if (index !== false && hasNewline$1(text, index)) {
+ leadingParts.push(hardline$1);
+ }
+ } else if (trailing) {
+ trailingParts.push(printTrailingComment(commentPath, print, options));
}
- } else if (trailing) {
- trailingParts.push(printTrailingComment(commentPath, print, options));
- }
- }, "comments");
- return prependCursorPlaceholder(path, options, concat(leadingParts.concat(trailingParts)));
-}
+ }, "comments");
+ return prependCursorPlaceholder(path, options, concat$2(leadingParts.concat(trailingParts)));
+ }
-var comments = {
- attach: attach,
- printComments: printComments,
- printDanglingComments: printDanglingComments,
- getSortedChildNodes: getSortedChildNodes
-};
+ var comments = {
+ attach: attach,
+ printComments: printComments,
+ printDanglingComments: printDanglingComments,
+ getSortedChildNodes: getSortedChildNodes
+ };
-function FastPath(value) {
- assert$3.ok(this instanceof FastPath);
- this.stack = [value];
-} // The name of the current property is always the penultimate element of
-// this.stack, and always a String.
+ function FastPath(value) {
+ assert.ok(this instanceof FastPath);
+ this.stack = [value];
+ } // The name of the current property is always the penultimate element of
+ // this.stack, and always a String.
-FastPath.prototype.getName = function getName() {
- var s = this.stack;
- var len = s.length;
+ FastPath.prototype.getName = function getName() {
+ var s = this.stack;
+ var len = s.length;
- if (len > 1) {
- return s[len - 2];
- } // Since the name is always a string, null is a safe sentinel value to
- // return if we do not know the name of the (root) value.
+ if (len > 1) {
+ return s[len - 2];
+ } // Since the name is always a string, null is a safe sentinel value to
+ // return if we do not know the name of the (root) value.
- /* istanbul ignore next */
+ /* istanbul ignore next */
- return null;
-}; // The value of the current property is always the final element of
-// this.stack.
+ return null;
+ }; // The value of the current property is always the final element of
+ // this.stack.
-FastPath.prototype.getValue = function getValue() {
- var s = this.stack;
- return s[s.length - 1];
-};
+ FastPath.prototype.getValue = function getValue() {
+ var s = this.stack;
+ return s[s.length - 1];
+ };
-function getNodeHelper(path, count) {
- var stackIndex = getNodeStackIndexHelper(path.stack, count);
- return stackIndex === -1 ? null : path.stack[stackIndex];
-}
+ function getNodeHelper(path, count) {
+ var stackIndex = getNodeStackIndexHelper(path.stack, count);
+ return stackIndex === -1 ? null : path.stack[stackIndex];
+ }
-function getNodeStackIndexHelper(stack, count) {
- for (var i = stack.length - 1; i >= 0; i -= 2) {
- var value = stack[i];
+ function getNodeStackIndexHelper(stack, count) {
+ for (var i = stack.length - 1; i >= 0; i -= 2) {
+ var value = stack[i];
- if (value && !Array.isArray(value) && --count < 0) {
- return i;
+ if (value && !Array.isArray(value) && --count < 0) {
+ return i;
+ }
}
- }
- return -1;
-}
+ return -1;
+ }
-FastPath.prototype.getNode = function getNode(count) {
- return getNodeHelper(this, ~~count);
-};
+ FastPath.prototype.getNode = function getNode(count) {
+ return getNodeHelper(this, ~~count);
+ };
-FastPath.prototype.getParentNode = function getParentNode(count) {
- return getNodeHelper(this, ~~count + 1);
-}; // Temporarily push properties named by string arguments given after the
-// callback function onto this.stack, then call the callback with a
-// reference to this (modified) FastPath object. Note that the stack will
-// be restored to its original state after the callback is finished, so it
-// is probably a mistake to retain a reference to the path.
+ FastPath.prototype.getParentNode = function getParentNode(count) {
+ return getNodeHelper(this, ~~count + 1);
+ }; // Temporarily push properties named by string arguments given after the
+ // callback function onto this.stack, then call the callback with a
+ // reference to this (modified) FastPath object. Note that the stack will
+ // be restored to its original state after the callback is finished, so it
+ // is probably a mistake to retain a reference to the path.
-FastPath.prototype.call = function call(callback
-/*, name1, name2, ... */
-) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
+ FastPath.prototype.call = function call(callback
+ /*, name1, name2, ... */
+ ) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
- var result = callback(this);
- s.length = origLen;
- return result;
-};
+ var result = callback(this);
+ s.length = origLen;
+ return result;
+ };
-FastPath.prototype.callParent = function callParent(callback, count) {
- var stackIndex = getNodeStackIndexHelper(this.stack, ~~count + 1);
- var parentValues = this.stack.splice(stackIndex + 1);
- var result = callback(this);
- Array.prototype.push.apply(this.stack, parentValues);
- return result;
-}; // Similar to FastPath.prototype.call, except that the value obtained by
-// accessing this.getValue()[name1][name2]... should be array-like. The
-// callback will be called with a reference to this path object for each
-// element of the array.
+ FastPath.prototype.callParent = function callParent(callback, count) {
+ var stackIndex = getNodeStackIndexHelper(this.stack, ~~count + 1);
+ var parentValues = this.stack.splice(stackIndex + 1);
+ var result = callback(this);
+ Array.prototype.push.apply(this.stack, parentValues);
+ return result;
+ }; // Similar to FastPath.prototype.call, except that the value obtained by
+ // accessing this.getValue()[name1][name2]... should be array-like. The
+ // callback will be called with a reference to this path object for each
+ // element of the array.
-FastPath.prototype.each = function each(callback
-/*, name1, name2, ... */
-) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
+ FastPath.prototype.each = function each(callback
+ /*, name1, name2, ... */
+ ) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
- for (var _i = 0; _i < value.length; ++_i) {
- if (_i in value) {
- s.push(_i, value[_i]); // If the callback needs to know the value of i, call
- // path.getName(), assuming path is the parameter name.
+ for (var _i = 0; _i < value.length; ++_i) {
+ if (_i in value) {
+ s.push(_i, value[_i]); // If the callback needs to know the value of i, call
+ // path.getName(), assuming path is the parameter name.
- callback(this);
- s.length -= 2;
+ callback(this);
+ s.length -= 2;
+ }
}
- }
- s.length = origLen;
-}; // Similar to FastPath.prototype.each, except that the results of the
-// callback function invocations are stored in an array and returned at
-// the end of the iteration.
+ s.length = origLen;
+ }; // Similar to FastPath.prototype.each, except that the results of the
+ // callback function invocations are stored in an array and returned at
+ // the end of the iteration.
-FastPath.prototype.map = function map(callback
-/*, name1, name2, ... */
-) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
+ FastPath.prototype.map = function map(callback
+ /*, name1, name2, ... */
+ ) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
- var result = new Array(value.length);
+ var result = new Array(value.length);
- for (var _i2 = 0; _i2 < value.length; ++_i2) {
- if (_i2 in value) {
- s.push(_i2, value[_i2]);
- result[_i2] = callback(this, _i2);
- s.length -= 2;
+ for (var _i2 = 0; _i2 < value.length; ++_i2) {
+ if (_i2 in value) {
+ s.push(_i2, value[_i2]);
+ result[_i2] = callback(this, _i2);
+ s.length -= 2;
+ }
}
- }
- s.length = origLen;
- return result;
-};
+ s.length = origLen;
+ return result;
+ };
-var fastPath = FastPath;
+ var fastPath = FastPath;
-var normalize$3 = options.normalize;
+ var normalize$2 = options$1.normalize;
-function printSubtree(path, print, options$$1, printAstToDoc) {
- if (options$$1.printer.embed) {
- return options$$1.printer.embed(path, print, function (text, partialNextOptions) {
- return textToDoc(text, partialNextOptions, options$$1, printAstToDoc);
- }, options$$1);
+ function printSubtree(path, print, options, printAstToDoc) {
+ if (options.printer.embed) {
+ return options.printer.embed(path, print, function (text, partialNextOptions) {
+ return textToDoc(text, partialNextOptions, options, printAstToDoc);
+ }, options);
+ }
}
-}
-
-function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) {
- var nextOptions = normalize$3(Object.assign({}, parentOptions, partialNextOptions, {
- parentParser: parentOptions.parser,
- embeddedInHtml: !!(parentOptions.embeddedInHtml || parentOptions.parser === "html" || parentOptions.parser === "vue" || parentOptions.parser === "angular" || parentOptions.parser === "lwc"),
- originalText: text
- }), {
- passThrough: true
- });
- var result = parser.parse(text, nextOptions);
- var ast = result.ast;
- text = result.text;
- var astComments = ast.comments;
- delete ast.comments;
- comments.attach(astComments, ast, text, nextOptions);
- return printAstToDoc(ast, nextOptions);
-}
-
-var multiparser = {
- printSubtree: printSubtree
-};
-
-var doc$2 = doc;
-var docBuilders$2 = doc$2.builders;
-var concat$3 = docBuilders$2.concat;
-var hardline$2 = docBuilders$2.hardline;
-var addAlignmentToDoc$1 = docBuilders$2.addAlignmentToDoc;
-var docUtils$2 = doc$2.utils;
-/**
- * Takes an abstract syntax tree (AST) and recursively converts it to a
- * document (series of printing primitives).
- *
- * This is done by descending down the AST recursively. The recursion
- * involves two functions that call each other:
- *
- * 1. printGenerically(), which is defined as an inner function here.
- * It basically takes care of node caching.
- * 2. callPluginPrintFunction(), which checks for some options, and
- * ultimately calls the print() function provided by the plugin.
- *
- * The plugin function will call printGenerically() again for child nodes
- * of the current node, which will do its housekeeping, then call the
- * plugin function again, and so on.
- *
- * All the while, these functions pass a "path" variable around, which
- * is a stack-like data structure (FastPath) that maintains the current
- * state of the recursion. It is called "path", because it represents
- * the path to the current node through the Abstract Syntax Tree.
- */
-function printAstToDoc(ast, options) {
- var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
- var printer = options.printer;
-
- if (printer.preprocess) {
- ast = printer.preprocess(ast, options);
+ function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) {
+ var nextOptions = normalize$2(Object.assign({}, parentOptions, partialNextOptions, {
+ parentParser: parentOptions.parser,
+ embeddedInHtml: !!(parentOptions.embeddedInHtml || parentOptions.parser === "html" || parentOptions.parser === "vue" || parentOptions.parser === "angular" || parentOptions.parser === "lwc"),
+ originalText: text
+ }), {
+ passThrough: true
+ });
+ var result = parser.parse(text, nextOptions);
+ var ast = result.ast;
+ text = result.text;
+ var astComments = ast.comments;
+ delete ast.comments;
+ comments.attach(astComments, ast, text, nextOptions);
+ return printAstToDoc(ast, nextOptions);
}
- var cache = new Map();
-
- function printGenerically(path, args) {
- var node = path.getValue();
- var shouldCache = node && _typeof(node) === "object" && args === undefined;
-
- if (shouldCache && cache.has(node)) {
- return cache.get(node);
- } // We let JSXElement print its comments itself because it adds () around
- // UnionTypeAnnotation has to align the child without the comments
-
+ var multiparser = {
+ printSubtree: printSubtree
+ };
- var res;
+ var doc$1 = doc;
+ var docBuilders$1 = doc$1.builders;
+ var concat$3 = docBuilders$1.concat;
+ var hardline$2 = docBuilders$1.hardline;
+ var addAlignmentToDoc$1 = docBuilders$1.addAlignmentToDoc;
+ var docUtils$1 = doc$1.utils;
+ /**
+ * Takes an abstract syntax tree (AST) and recursively converts it to a
+ * document (series of printing primitives).
+ *
+ * This is done by descending down the AST recursively. The recursion
+ * involves two functions that call each other:
+ *
+ * 1. printGenerically(), which is defined as an inner function here.
+ * It basically takes care of node caching.
+ * 2. callPluginPrintFunction(), which checks for some options, and
+ * ultimately calls the print() function provided by the plugin.
+ *
+ * The plugin function will call printGenerically() again for child nodes
+ * of the current node, which will do its housekeeping, then call the
+ * plugin function again, and so on.
+ *
+ * All the while, these functions pass a "path" variable around, which
+ * is a stack-like data structure (FastPath) that maintains the current
+ * state of the recursion. It is called "path", because it represents
+ * the path to the current node through the Abstract Syntax Tree.
+ */
- if (printer.willPrintOwnComments && printer.willPrintOwnComments(path, options)) {
- res = callPluginPrintFunction(path, options, printGenerically, args);
- } else {
- // printComments will call the plugin print function and check for
- // comments to print
- res = comments.printComments(path, function (p) {
- return callPluginPrintFunction(p, options, printGenerically, args);
- }, options, args && args.needsSemi);
- }
+ function printAstToDoc(ast, options) {
+ var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
+ var printer = options.printer;
- if (shouldCache) {
- cache.set(node, res);
+ if (printer.preprocess) {
+ ast = printer.preprocess(ast, options);
}
- return res;
- }
+ var cache = new Map();
- var doc$$2 = printGenerically(new fastPath(ast));
+ function printGenerically(path, args) {
+ var node = path.getValue();
+ var shouldCache = node && _typeof(node) === "object" && args === undefined;
- if (alignmentSize > 0) {
- // Add a hardline to make the indents take effect
- // It should be removed in index.js format()
- doc$$2 = addAlignmentToDoc$1(concat$3([hardline$2, doc$$2]), alignmentSize, options.tabWidth);
- }
+ if (shouldCache && cache.has(node)) {
+ return cache.get(node);
+ } // We let JSXElement print its comments itself because it adds () around
+ // UnionTypeAnnotation has to align the child without the comments
- docUtils$2.propagateBreaks(doc$$2);
- return doc$$2;
-}
-function callPluginPrintFunction(path, options, printPath, args) {
- assert$3.ok(path instanceof fastPath);
- var node = path.getValue();
- var printer = options.printer; // Escape hatch
-
- if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path)) {
- return options.originalText.slice(options.locStart(node), options.locEnd(node));
- }
+ var res;
- if (node) {
- try {
- // Potentially switch to a different parser
- var sub = multiparser.printSubtree(path, printPath, options, printAstToDoc);
+ if (printer.willPrintOwnComments && printer.willPrintOwnComments(path, options)) {
+ res = callPluginPrintFunction(path, options, printGenerically, args);
+ } else {
+ // printComments will call the plugin print function and check for
+ // comments to print
+ res = comments.printComments(path, function (p) {
+ return callPluginPrintFunction(p, options, printGenerically, args);
+ }, options, args && args.needsSemi);
+ }
- if (sub) {
- return sub;
+ if (shouldCache) {
+ cache.set(node, res);
}
- } catch (error) {
- /* istanbul ignore if */
- if (commonjsGlobal.PRETTIER_DEBUG) {
- throw error;
- } // Continue with current parser
+ return res;
}
- }
-
- return printer.print(path, options, printPath, args);
-}
-var astToDoc = printAstToDoc;
+ var doc = printGenerically(new fastPath(ast));
-function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) {
- var resultStartNode = startNodeAndParents.node;
- var resultEndNode = endNodeAndParents.node;
+ if (alignmentSize > 0) {
+ // Add a hardline to make the indents take effect
+ // It should be removed in index.js format()
+ doc = addAlignmentToDoc$1(concat$3([hardline$2, doc]), alignmentSize, options.tabWidth);
+ }
- if (resultStartNode === resultEndNode) {
- return {
- startNode: resultStartNode,
- endNode: resultEndNode
- };
+ docUtils$1.propagateBreaks(doc);
+ return doc;
}
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var endParent = _step.value;
+ function callPluginPrintFunction(path, options, printPath, args) {
+ assert.ok(path instanceof fastPath);
+ var node = path.getValue();
+ var printer = options.printer; // Escape hatch
- if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) {
- resultEndNode = endParent;
- } else {
- break;
- }
+ if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path)) {
+ return options.originalText.slice(options.locStart(node), options.locEnd(node));
}
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
+
+ if (node) {
+ try {
+ // Potentially switch to a different parser
+ var sub = multiparser.printSubtree(path, printPath, options, printAstToDoc);
+
+ if (sub) {
+ return sub;
+ }
+ } catch (error) {
+ /* istanbul ignore if */
+ if (commonjsGlobal.PRETTIER_DEBUG) {
+ throw error;
+ } // Continue with current parser
+
}
}
+
+ return printer.print(path, options, printPath, args);
}
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ var astToDoc = printAstToDoc;
- try {
- for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var startParent = _step2.value;
+ function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) {
+ var resultStartNode = startNodeAndParents.node;
+ var resultEndNode = endNodeAndParents.node;
- if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) {
- resultStartNode = startParent;
- } else {
- break;
- }
+ if (resultStartNode === resultEndNode) {
+ return {
+ startNode: resultStartNode,
+ endNode: resultEndNode
+ };
}
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
+
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
+ for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var endParent = _step.value;
+
+ if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) {
+ resultEndNode = endParent;
+ } else {
+ break;
+ }
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
-
- return {
- startNode: resultStartNode,
- endNode: resultEndNode
- };
-}
-
-function findNodeAtOffset(node, offset, options, predicate, parentNodes) {
- predicate = predicate || function () {
- return true;
- };
-
- parentNodes = parentNodes || [];
- var start = options.locStart(node, options.locStart);
- var end = options.locEnd(node, options.locEnd);
- if (start <= offset && offset <= end) {
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
try {
- for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var childNode = _step3.value;
- var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes));
+ for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var startParent = _step2.value;
- if (childResult) {
- return childResult;
+ if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) {
+ resultStartNode = startParent;
+ } else {
+ break;
}
}
} catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
}
} finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ if (_didIteratorError2) {
+ throw _iteratorError2;
}
}
}
- if (predicate(node)) {
- return {
- node: node,
- parentNodes: parentNodes
- };
- }
+ return {
+ startNode: resultStartNode,
+ endNode: resultEndNode
+ };
}
-} // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5
+ function findNodeAtOffset(node, offset, options, predicate, parentNodes) {
+ predicate = predicate || function () {
+ return true;
+ };
+
+ parentNodes = parentNodes || [];
+ var start = options.locStart(node, options.locStart);
+ var end = options.locEnd(node, options.locEnd);
-function isSourceElement(opts, node) {
- if (node == null) {
- return false;
- } // JS and JS like to avoid repetitions
-
-
- var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015
- "ImportDeclaration", // Module
- "ExportDefaultDeclaration", // Module
- "ExportNamedDeclaration", // Module
- "ExportAllDeclaration", // Module
- "TypeAlias", // Flow
- "InterfaceDeclaration", // Flow, TypeScript
- "TypeAliasDeclaration", // TypeScript
- "ExportAssignment", // TypeScript
- "ExportDeclaration" // TypeScript
- ];
- var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"];
- var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"];
+ if (start <= offset && offset <= end) {
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var childNode = _step3.value;
+ var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes));
- switch (opts.parser) {
- case "flow":
- case "babel":
- case "typescript":
- return jsSourceElements.indexOf(node.type) > -1;
+ if (childResult) {
+ return childResult;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
- case "json":
- return jsonSourceElements.indexOf(node.type) > -1;
+ if (predicate(node)) {
+ return {
+ node: node,
+ parentNodes: parentNodes
+ };
+ }
+ }
+ } // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5
- case "graphql":
- return graphqlSourceElements.indexOf(node.kind) > -1;
- case "vue":
- return node.tag !== "root";
- }
+ function isSourceElement(opts, node) {
+ if (node == null) {
+ return false;
+ } // JS and JS like to avoid repetitions
- return false;
-}
-function calculateRange(text, opts, ast) {
- // Contract the range so that it has non-whitespace characters at its endpoints.
- // This ensures we can format a range that doesn't end on a node.
- var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd);
- var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart);
- var endNonWhitespace;
+ var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015
+ "ImportDeclaration", // Module
+ "ExportDefaultDeclaration", // Module
+ "ExportNamedDeclaration", // Module
+ "ExportAllDeclaration", // Module
+ "TypeAlias", // Flow
+ "InterfaceDeclaration", // Flow, TypeScript
+ "TypeAliasDeclaration", // TypeScript
+ "ExportAssignment", // TypeScript
+ "ExportDeclaration" // TypeScript
+ ];
+ var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"];
+ var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"];
- for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) {
- if (text[endNonWhitespace - 1].match(/\S/)) {
- break;
+ switch (opts.parser) {
+ case "flow":
+ case "babel":
+ case "typescript":
+ return jsSourceElements.indexOf(node.type) > -1;
+
+ case "json":
+ return jsonSourceElements.indexOf(node.type) > -1;
+
+ case "graphql":
+ return graphqlSourceElements.indexOf(node.kind) > -1;
+
+ case "vue":
+ return node.tag !== "root";
}
+
+ return false;
}
- var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) {
- return isSourceElement(opts, node);
- });
- var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) {
- return isSourceElement(opts, node);
- });
+ function calculateRange(text, opts, ast) {
+ // Contract the range so that it has non-whitespace characters at its endpoints.
+ // This ensures we can format a range that doesn't end on a node.
+ var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd);
+ var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart);
+ var endNonWhitespace;
+
+ for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) {
+ if (text[endNonWhitespace - 1].match(/\S/)) {
+ break;
+ }
+ }
+
+ var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) {
+ return isSourceElement(opts, node);
+ });
+ var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) {
+ return isSourceElement(opts, node);
+ });
- if (!startNodeAndParents || !endNodeAndParents) {
+ if (!startNodeAndParents || !endNodeAndParents) {
+ return {
+ rangeStart: 0,
+ rangeEnd: 0
+ };
+ }
+
+ var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts);
+ var startNode = siblingAncestors.startNode,
+ endNode = siblingAncestors.endNode;
+ var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart));
+ var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd));
return {
- rangeStart: 0,
- rangeEnd: 0
+ rangeStart: rangeStart,
+ rangeEnd: rangeEnd
};
}
- var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts);
- var startNode = siblingAncestors.startNode,
- endNode = siblingAncestors.endNode;
- var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart));
- var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd));
- return {
- rangeStart: rangeStart,
- rangeEnd: rangeEnd
+ var rangeUtil = {
+ calculateRange: calculateRange,
+ findNodeAtOffset: findNodeAtOffset
};
-}
-
-var rangeUtil = {
- calculateRange: calculateRange,
- findNodeAtOffset: findNodeAtOffset
-};
-
-var normalizeOptions = options.normalize;
-var guessEndOfLine = endOfLine.guessEndOfLine;
-var convertEndOfLineToChars = endOfLine.convertEndOfLineToChars;
-var mapDoc = doc.utils.mapDoc;
-var _printDocToString = doc.printer.printDocToString;
-var printDocToDebug = doc.debug.printDocToDebug;
-var UTF8BOM = 0xfeff;
-var CURSOR = Symbol("cursor");
-var PLACEHOLDERS = {
- cursorOffset: "<<<PRETTIER_CURSOR>>>",
- rangeStart: "<<<PRETTIER_RANGE_START>>>",
- rangeEnd: "<<<PRETTIER_RANGE_END>>>"
-};
-
-function ensureAllCommentsPrinted(astComments) {
- if (!astComments) {
- return;
- }
-
- for (var i = 0; i < astComments.length; ++i) {
- if (astComments[i].value.trim() === "prettier-ignore") {
- // If there's a prettier-ignore, we're not printing that sub-tree so we
- // don't know if the comments was printed or not.
+
+ var diff = getCjsExportFromNamespace(index_es6);
+
+ var normalizeOptions$1 = options$1.normalize;
+ var guessEndOfLine$1 = endOfLine.guessEndOfLine,
+ convertEndOfLineToChars$2 = endOfLine.convertEndOfLineToChars;
+ var mapDoc$2 = doc.utils.mapDoc,
+ _printDocToString = doc.printer.printDocToString,
+ printDocToDebug = doc.debug.printDocToDebug;
+ var UTF8BOM = 0xfeff;
+ var CURSOR = Symbol("cursor");
+ var PLACEHOLDERS = {
+ cursorOffset: "<<<PRETTIER_CURSOR>>>",
+ rangeStart: "<<<PRETTIER_RANGE_START>>>",
+ rangeEnd: "<<<PRETTIER_RANGE_END>>>"
+ };
+
+ function ensureAllCommentsPrinted(astComments) {
+ if (!astComments) {
return;
}
- }
- astComments.forEach(function (comment) {
- if (!comment.printed) {
- throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!');
+ for (var i = 0; i < astComments.length; ++i) {
+ if (astComments[i].value.trim() === "prettier-ignore") {
+ // If there's a prettier-ignore, we're not printing that sub-tree so we
+ // don't know if the comments was printed or not.
+ return;
+ }
}
- delete comment.printed;
- });
-}
-
-function attachComments(text, ast, opts) {
- var astComments = ast.comments;
+ astComments.forEach(function (comment) {
+ if (!comment.printed) {
+ throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!');
+ }
- if (astComments) {
- delete ast.comments;
- comments.attach(astComments, ast, text, opts);
+ delete comment.printed;
+ });
}
- ast.tokens = [];
- opts.originalText = opts.parser === "yaml" ? text : text.trimRight();
- return astComments;
-}
+ function attachComments(text, ast, opts) {
+ var astComments = ast.comments;
-function coreFormat(text, opts, addAlignmentSize) {
- if (!text || !text.trim().length) {
- return {
- formatted: "",
- cursorOffset: 0
- };
+ if (astComments) {
+ delete ast.comments;
+ comments.attach(astComments, ast, text, opts);
+ }
+
+ ast.tokens = [];
+ opts.originalText = opts.parser === "yaml" ? text : text.trimRight();
+ return astComments;
}
- addAlignmentSize = addAlignmentSize || 0;
- var parsed = parser.parse(text, opts);
- var ast = parsed.ast;
- text = parsed.text;
+ function coreFormat(text, opts, addAlignmentSize) {
+ if (!text || !text.trim().length) {
+ return {
+ formatted: "",
+ cursorOffset: 0
+ };
+ }
+
+ addAlignmentSize = addAlignmentSize || 0;
+ var parsed = parser.parse(text, opts);
+ var ast = parsed.ast;
+ text = parsed.text;
- if (opts.cursorOffset >= 0) {
- var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts);
+ if (opts.cursorOffset >= 0) {
+ var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts);
- if (nodeResult && nodeResult.node) {
- opts.cursorNode = nodeResult.node;
+ if (nodeResult && nodeResult.node) {
+ opts.cursorNode = nodeResult.node;
+ }
}
- }
- var astComments = attachComments(text, ast, opts);
- var doc$$1 = astToDoc(ast, opts, addAlignmentSize);
- var eol = convertEndOfLineToChars(opts.endOfLine);
+ var astComments = attachComments(text, ast, opts);
+ var doc = astToDoc(ast, opts, addAlignmentSize);
+ var eol = convertEndOfLineToChars$2(opts.endOfLine);
- var result = _printDocToString(opts.endOfLine === "lf" ? doc$$1 : mapDoc(doc$$1, function (currentDoc) {
- return typeof currentDoc === "string" && currentDoc.indexOf("\n") !== -1 ? currentDoc.replace(/\n/g, eol) : currentDoc;
- }), opts);
+ var result = _printDocToString(opts.endOfLine === "lf" ? doc : mapDoc$2(doc, function (currentDoc) {
+ return typeof currentDoc === "string" && currentDoc.indexOf("\n") !== -1 ? currentDoc.replace(/\n/g, eol) : currentDoc;
+ }), opts);
- ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
+ ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
- if (addAlignmentSize > 0) {
- var trimmed = result.formatted.trim();
+ if (addAlignmentSize > 0) {
+ var trimmed = result.formatted.trim();
+
+ if (result.cursorNodeStart !== undefined) {
+ result.cursorNodeStart -= result.formatted.indexOf(trimmed);
+ }
- if (result.cursorNodeStart !== undefined) {
- result.cursorNodeStart -= result.formatted.indexOf(trimmed);
+ result.formatted = trimmed + convertEndOfLineToChars$2(opts.endOfLine);
}
- result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine);
- }
+ if (opts.cursorOffset >= 0) {
+ var oldCursorNodeStart;
+ var oldCursorNodeText;
+ var cursorOffsetRelativeToOldCursorNode;
+ var newCursorNodeStart;
+ var newCursorNodeText;
- if (opts.cursorOffset >= 0) {
- var oldCursorNodeStart;
- var oldCursorNodeText;
- var cursorOffsetRelativeToOldCursorNode;
- var newCursorNodeStart;
- var newCursorNodeText;
+ if (opts.cursorNode && result.cursorNodeText) {
+ oldCursorNodeStart = opts.locStart(opts.cursorNode);
+ oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode));
+ cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart;
+ newCursorNodeStart = result.cursorNodeStart;
+ newCursorNodeText = result.cursorNodeText;
+ } else {
+ oldCursorNodeStart = 0;
+ oldCursorNodeText = text;
+ cursorOffsetRelativeToOldCursorNode = opts.cursorOffset;
+ newCursorNodeStart = 0;
+ newCursorNodeText = result.formatted;
+ }
- if (opts.cursorNode && result.cursorNodeText) {
- oldCursorNodeStart = opts.locStart(opts.cursorNode);
- oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode));
- cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart;
- newCursorNodeStart = result.cursorNodeStart;
- newCursorNodeText = result.cursorNodeText;
- } else {
- oldCursorNodeStart = 0;
- oldCursorNodeText = text;
- cursorOffsetRelativeToOldCursorNode = opts.cursorOffset;
- newCursorNodeStart = 0;
- newCursorNodeText = result.formatted;
- }
+ if (oldCursorNodeText === newCursorNodeText) {
+ return {
+ formatted: result.formatted,
+ cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode
+ };
+ } // diff old and new cursor node texts, with a special cursor
+ // symbol inserted to find out where it moves to
+
+
+ var oldCursorNodeCharArray = oldCursorNodeText.split("");
+ oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR);
+ var newCursorNodeCharArray = newCursorNodeText.split("");
+ var cursorNodeDiff = diff.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray);
+ var cursorOffset = newCursorNodeStart;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var entry = _step.value;
+
+ if (entry.removed) {
+ if (entry.value.indexOf(CURSOR) > -1) {
+ break;
+ }
+ } else {
+ cursorOffset += entry.count;
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
- if (oldCursorNodeText === newCursorNodeText) {
return {
formatted: result.formatted,
- cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode
+ cursorOffset: cursorOffset
};
- } // diff old and new cursor node texts, with a special cursor
- // symbol inserted to find out where it moves to
+ }
+ return {
+ formatted: result.formatted
+ };
+ }
- var oldCursorNodeCharArray = oldCursorNodeText.split("");
- oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR);
- var newCursorNodeCharArray = newCursorNodeText.split("");
- var cursorNodeDiff = lib.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray);
- var cursorOffset = newCursorNodeStart;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ function formatRange(text, opts) {
+ var parsed = parser.parse(text, opts);
+ var ast = parsed.ast;
+ text = parsed.text;
+ var range = rangeUtil.calculateRange(text, opts, ast);
+ var rangeStart = range.rangeStart;
+ var rangeEnd = range.rangeEnd;
+ var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line.
+ // This is so we can detect indentation correctly and restore it.
+ // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0
+
+ var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1);
+ var indentString = text.slice(rangeStart2, rangeStart);
+ var alignmentSize = util.getAlignmentSize(indentString, opts.tabWidth);
+ var rangeResult = coreFormat(rangeString, Object.assign({}, opts, {
+ rangeStart: 0,
+ rangeEnd: Infinity,
+ // track the cursor offset only if it's within our range
+ cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1
+ }), alignmentSize); // Since the range contracts to avoid trailing whitespace,
+ // we need to remove the newline that was inserted by the `format` call.
+
+ var rangeTrimmed = rangeResult.formatted.trimRight();
+ var rangeLeft = text.slice(0, rangeStart);
+ var rangeRight = text.slice(rangeEnd);
+ var cursorOffset = opts.cursorOffset;
+
+ if (opts.cursorOffset >= rangeEnd) {
+ // handle the case where the cursor was past the end of the range
+ cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length);
+ } else if (rangeResult.cursorOffset !== undefined) {
+ // handle the case where the cursor was in the range
+ cursorOffset = rangeResult.cursorOffset + rangeStart;
+ } // keep the cursor as it was if it was before the start of the range
+
+
+ var formatted;
+
+ if (opts.endOfLine === "lf") {
+ formatted = rangeLeft + rangeTrimmed + rangeRight;
+ } else {
+ var eol = convertEndOfLineToChars$2(opts.endOfLine);
- try {
- for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var entry = _step.value;
+ if (cursorOffset >= 0) {
+ var parts = [rangeLeft, rangeTrimmed, rangeRight];
+ var partIndex = 0;
+ var partOffset = cursorOffset;
+
+ while (partIndex < parts.length) {
+ var part = parts[partIndex];
- if (entry.removed) {
- if (entry.value.indexOf(CURSOR) > -1) {
+ if (partOffset < part.length) {
+ parts[partIndex] = parts[partIndex].slice(0, partOffset) + PLACEHOLDERS.cursorOffset + parts[partIndex].slice(partOffset);
break;
}
- } else {
- cursorOffset += entry.count;
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
+
+ partIndex++;
+ partOffset -= part.length;
}
+
+ var newRangeLeft = parts[0],
+ newRangeTrimmed = parts[1],
+ newRangeRight = parts[2];
+ formatted = (newRangeLeft.replace(/\n/g, eol) + newRangeTrimmed + newRangeRight.replace(/\n/g, eol)).replace(PLACEHOLDERS.cursorOffset, function (_, index) {
+ cursorOffset = index;
+ return "";
+ });
+ } else {
+ formatted = rangeLeft.replace(/\n/g, eol) + rangeTrimmed + rangeRight.replace(/\n/g, eol);
}
}
return {
- formatted: result.formatted,
+ formatted: formatted,
cursorOffset: cursorOffset
};
}
- return {
- formatted: result.formatted
- };
-}
-
-function formatRange(text, opts) {
- var parsed = parser.parse(text, opts);
- var ast = parsed.ast;
- text = parsed.text;
- var range = rangeUtil.calculateRange(text, opts, ast);
- var rangeStart = range.rangeStart;
- var rangeEnd = range.rangeEnd;
- var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line.
- // This is so we can detect indentation correctly and restore it.
- // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0
-
- var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1);
- var indentString = text.slice(rangeStart2, rangeStart);
- var alignmentSize = util.getAlignmentSize(indentString, opts.tabWidth);
- var rangeResult = coreFormat(rangeString, Object.assign({}, opts, {
- rangeStart: 0,
- rangeEnd: Infinity,
- // track the cursor offset only if it's within our range
- cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1
- }), alignmentSize); // Since the range contracts to avoid trailing whitespace,
- // we need to remove the newline that was inserted by the `format` call.
-
- var rangeTrimmed = rangeResult.formatted.trimRight();
- var rangeLeft = text.slice(0, rangeStart);
- var rangeRight = text.slice(rangeEnd);
- var cursorOffset = opts.cursorOffset;
-
- if (opts.cursorOffset >= rangeEnd) {
- // handle the case where the cursor was past the end of the range
- cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length);
- } else if (rangeResult.cursorOffset !== undefined) {
- // handle the case where the cursor was in the range
- cursorOffset = rangeResult.cursorOffset + rangeStart;
- } // keep the cursor as it was if it was before the start of the range
-
-
- var formatted;
-
- if (opts.endOfLine === "lf") {
- formatted = rangeLeft + rangeTrimmed + rangeRight;
- } else {
- var eol = convertEndOfLineToChars(opts.endOfLine);
-
- if (cursorOffset >= 0) {
- var parts = [rangeLeft, rangeTrimmed, rangeRight];
- var partIndex = 0;
- var partOffset = cursorOffset;
-
- while (partIndex < parts.length) {
- var part = parts[partIndex];
-
- if (partOffset < part.length) {
- parts[partIndex] = parts[partIndex].slice(0, partOffset) + PLACEHOLDERS.cursorOffset + parts[partIndex].slice(partOffset);
- break;
- }
+ function format(text, opts) {
+ var selectedParser = parser.resolveParser(opts);
+ var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text);
- partIndex++;
- partOffset -= part.length;
- }
+ if (opts.requirePragma && !hasPragma) {
+ return {
+ formatted: text
+ };
+ }
- var newRangeLeft = parts[0],
- newRangeTrimmed = parts[1],
- newRangeRight = parts[2];
- formatted = (newRangeLeft.replace(/\n/g, eol) + newRangeTrimmed + newRangeRight.replace(/\n/g, eol)).replace(PLACEHOLDERS.cursorOffset, function (_, index) {
- cursorOffset = index;
- return "";
+ if (opts.endOfLine === "auto") {
+ opts.endOfLine = guessEndOfLine$1(text);
+ }
+
+ var hasCursor = opts.cursorOffset >= 0;
+ var hasRangeStart = opts.rangeStart > 0;
+ var hasRangeEnd = opts.rangeEnd < text.length; // get rid of CR/CRLF parsing
+
+ if (text.indexOf("\r") !== -1) {
+ var offsetKeys = [hasCursor && "cursorOffset", hasRangeStart && "rangeStart", hasRangeEnd && "rangeEnd"].filter(Boolean).sort(function (aKey, bKey) {
+ return opts[aKey] - opts[bKey];
});
- } else {
- formatted = rangeLeft.replace(/\n/g, eol) + rangeTrimmed + rangeRight.replace(/\n/g, eol);
+
+ for (var i = offsetKeys.length - 1; i >= 0; i--) {
+ var key = offsetKeys[i];
+ text = text.slice(0, opts[key]) + PLACEHOLDERS[key] + text.slice(opts[key]);
+ }
+
+ text = text.replace(/\r\n?/g, "\n");
+
+ var _loop = function _loop(_i) {
+ var key = offsetKeys[_i];
+ text = text.replace(PLACEHOLDERS[key], function (_, index) {
+ opts[key] = index;
+ return "";
+ });
+ };
+
+ for (var _i = 0; _i < offsetKeys.length; _i++) {
+ _loop(_i);
+ }
}
- }
- return {
- formatted: formatted,
- cursorOffset: cursorOffset
- };
-}
+ var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM;
-function format(text, opts) {
- var selectedParser = parser.resolveParser(opts);
- var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text);
+ if (hasUnicodeBOM) {
+ text = text.substring(1);
- if (opts.requirePragma && !hasPragma) {
- return {
- formatted: text
- };
- }
+ if (hasCursor) {
+ opts.cursorOffset++;
+ }
- if (opts.endOfLine === "auto") {
- opts.endOfLine = guessEndOfLine(text);
- }
+ if (hasRangeStart) {
+ opts.rangeStart++;
+ }
- var hasCursor = opts.cursorOffset >= 0;
- var hasRangeStart = opts.rangeStart > 0;
- var hasRangeEnd = opts.rangeEnd < text.length; // get rid of CR/CRLF parsing
+ if (hasRangeEnd) {
+ opts.rangeEnd++;
+ }
+ }
- if (text.indexOf("\r") !== -1) {
- var offsetKeys = [hasCursor && "cursorOffset", hasRangeStart && "rangeStart", hasRangeEnd && "rangeEnd"].filter(Boolean).sort(function (aKey, bKey) {
- return opts[aKey] - opts[bKey];
- });
+ if (!hasCursor) {
+ opts.cursorOffset = -1;
+ }
- for (var i = offsetKeys.length - 1; i >= 0; i--) {
- var key = offsetKeys[i];
- text = text.slice(0, opts[key]) + PLACEHOLDERS[key] + text.slice(opts[key]);
+ if (opts.rangeStart < 0) {
+ opts.rangeStart = 0;
}
- text = text.replace(/\r\n?/g, "\n");
+ if (opts.rangeEnd > text.length) {
+ opts.rangeEnd = text.length;
+ }
- var _loop = function _loop(_i) {
- var key = offsetKeys[_i];
- text = text.replace(PLACEHOLDERS[key], function (_, index) {
- opts[key] = index;
- return "";
- });
- };
+ var result = hasRangeStart || hasRangeEnd ? formatRange(text, opts) : coreFormat(opts.insertPragma && opts.printer.insertPragma && !hasPragma ? opts.printer.insertPragma(text) : text, opts);
+
+ if (hasUnicodeBOM) {
+ result.formatted = String.fromCharCode(UTF8BOM) + result.formatted;
- for (var _i = 0; _i < offsetKeys.length; _i++) {
- _loop(_i);
+ if (hasCursor) {
+ result.cursorOffset++;
+ }
}
+
+ return result;
}
- var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM;
+ var core = {
+ formatWithCursor: function formatWithCursor(text, opts) {
+ opts = normalizeOptions$1(opts);
+ return format(text, opts);
+ },
+ parse: function parse(text, opts, massage) {
+ opts = normalizeOptions$1(opts);
- if (hasUnicodeBOM) {
- text = text.substring(1);
+ if (text.indexOf("\r") !== -1) {
+ text = text.replace(/\r\n?/g, "\n");
+ }
- if (hasCursor) {
- opts.cursorOffset++;
- }
+ var parsed = parser.parse(text, opts);
- if (hasRangeStart) {
- opts.rangeStart++;
- }
+ if (massage) {
+ parsed.ast = massageAst(parsed.ast, opts);
+ }
- if (hasRangeEnd) {
- opts.rangeEnd++;
+ return parsed;
+ },
+ formatAST: function formatAST(ast, opts) {
+ opts = normalizeOptions$1(opts);
+ var doc = astToDoc(ast, opts);
+ return _printDocToString(doc, opts);
+ },
+ // Doesn't handle shebang for now
+ formatDoc: function formatDoc(doc, opts) {
+ var debug = printDocToDebug(doc);
+ opts = normalizeOptions$1(Object.assign({}, opts, {
+ parser: "babel"
+ }));
+ return format(debug, opts).formatted;
+ },
+ printToDoc: function printToDoc(text, opts) {
+ opts = normalizeOptions$1(opts);
+ var parsed = parser.parse(text, opts);
+ var ast = parsed.ast;
+ text = parsed.text;
+ attachComments(text, ast, opts);
+ return astToDoc(ast, opts);
+ },
+ printDocToString: function printDocToString(doc, opts) {
+ return _printDocToString(doc, normalizeOptions$1(opts));
}
- }
+ };
- if (!hasCursor) {
- opts.cursorOffset = -1;
- }
+ var index = [
+ "a",
+ "abbr",
+ "acronym",
+ "address",
+ "applet",
+ "area",
+ "article",
+ "aside",
+ "audio",
+ "b",
+ "base",
+ "basefont",
+ "bdi",
+ "bdo",
+ "bgsound",
+ "big",
+ "blink",
+ "blockquote",
+ "body",
+ "br",
+ "button",
+ "canvas",
+ "caption",
+ "center",
+ "cite",
+ "code",
+ "col",
+ "colgroup",
+ "command",
+ "content",
+ "data",
+ "datalist",
+ "dd",
+ "del",
+ "details",
+ "dfn",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "element",
+ "em",
+ "embed",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "font",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hgroup",
+ "hr",
+ "html",
+ "i",
+ "iframe",
+ "image",
+ "img",
+ "input",
+ "ins",
+ "isindex",
+ "kbd",
+ "keygen",
+ "label",
+ "legend",
+ "li",
+ "link",
+ "listing",
+ "main",
+ "map",
+ "mark",
+ "marquee",
+ "math",
+ "menu",
+ "menuitem",
+ "meta",
+ "meter",
+ "multicol",
+ "nav",
+ "nextid",
+ "nobr",
+ "noembed",
+ "noframes",
+ "noscript",
+ "object",
+ "ol",
+ "optgroup",
+ "option",
+ "output",
+ "p",
+ "param",
+ "picture",
+ "plaintext",
+ "pre",
+ "progress",
+ "q",
+ "rb",
+ "rbc",
+ "rp",
+ "rt",
+ "rtc",
+ "ruby",
+ "s",
+ "samp",
+ "script",
+ "section",
+ "select",
+ "shadow",
+ "slot",
+ "small",
+ "source",
+ "spacer",
+ "span",
+ "strike",
+ "strong",
+ "style",
+ "sub",
+ "summary",
+ "sup",
+ "svg",
+ "table",
+ "tbody",
+ "td",
+ "template",
+ "textarea",
+ "tfoot",
+ "th",
+ "thead",
+ "time",
+ "title",
+ "tr",
+ "track",
+ "tt",
+ "u",
+ "ul",
+ "var",
+ "video",
+ "wbr",
+ "xmp"
+ ];
- if (opts.rangeStart < 0) {
- opts.rangeStart = 0;
- }
+ var htmlTagNames = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ 'default': index
+ });
- if (opts.rangeEnd > text.length) {
- opts.rangeEnd = text.length;
- }
+ var htmlTagNames$1 = getCjsExportFromNamespace(htmlTagNames);
+
+ function clean(ast, newObj, parent) {
+ ["raw", // front-matter
+ "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) {
+ delete newObj[name];
+ });
- var result = hasRangeStart || hasRangeEnd ? formatRange(text, opts) : coreFormat(opts.insertPragma && opts.printer.insertPragma && !hasPragma ? opts.printer.insertPragma(text) : text, opts);
+ if (ast.type === "yaml") {
+ delete newObj.value;
+ } // --insert-pragma
- if (hasUnicodeBOM) {
- result.formatted = String.fromCharCode(UTF8BOM) + result.formatted;
- if (hasCursor) {
- result.cursorOffset++;
+ if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment
+ parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) {
+ /**
+ * something
+ *
+ * @format
+ */
+ delete newObj.text; // standalone pragma
+
+ if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) {
+ return null;
+ }
}
- }
- return result;
-}
+ if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") {
+ delete newObj.value;
+ }
-var core = {
- formatWithCursor: function formatWithCursor(text, opts) {
- opts = normalizeOptions(opts);
- return format(text, opts);
- },
- parse: function parse(text, opts, massage) {
- opts = normalizeOptions(opts);
+ if (ast.type === "css-rule") {
+ delete newObj.params;
+ }
- if (text.indexOf("\r") !== -1) {
- text = text.replace(/\r\n?/g, "\n");
+ if (ast.type === "selector-combinator") {
+ newObj.value = newObj.value.replace(/\s+/g, " ");
}
- var parsed = parser.parse(text, opts);
+ if (ast.type === "media-feature") {
+ newObj.value = newObj.value.replace(/ /g, "");
+ }
- if (massage) {
- parsed.ast = massageAst(parsed.ast, opts);
- }
-
- return parsed;
- },
- formatAST: function formatAST(ast, opts) {
- opts = normalizeOptions(opts);
- var doc$$1 = astToDoc(ast, opts);
- return _printDocToString(doc$$1, opts);
- },
- // Doesn't handle shebang for now
- formatDoc: function formatDoc(doc$$1, opts) {
- var debug = printDocToDebug(doc$$1);
- opts = normalizeOptions(Object.assign({}, opts, {
- parser: "babel"
- }));
- return format(debug, opts).formatted;
- },
- printToDoc: function printToDoc(text, opts) {
- opts = normalizeOptions(opts);
- var parsed = parser.parse(text, opts);
- var ast = parsed.ast;
- text = parsed.text;
- attachComments(text, ast, opts);
- return astToDoc(ast, opts);
- },
- printDocToString: function printDocToString(doc$$1, opts) {
- return _printDocToString(doc$$1, normalizeOptions(opts));
- }
-};
+ if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") {
+ newObj.value = newObj.value.toLowerCase();
+ }
-var index$11 = ["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"];
+ if (ast.type === "css-decl") {
+ newObj.prop = newObj.prop.toLowerCase();
+ }
-var htmlTagNames = Object.freeze({
- default: index$11
-});
+ if (ast.type === "css-atrule" || ast.type === "css-import") {
+ newObj.name = newObj.name.toLowerCase();
+ }
-var htmlTagNames$1 = ( htmlTagNames && index$11 ) || htmlTagNames;
+ if (ast.type === "value-number") {
+ newObj.unit = newObj.unit.toLowerCase();
+ }
-function clean(ast, newObj, parent) {
- ["raw", // front-matter
- "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) {
- delete newObj[name];
- });
+ if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) {
+ newObj.value = cleanCSSStrings(newObj.value);
+ }
- if (ast.type === "yaml") {
- delete newObj.value;
- } // --insert-pragma
+ if (ast.type === "selector-attribute") {
+ newObj.attribute = newObj.attribute.trim();
+ if (newObj.namespace) {
+ if (typeof newObj.namespace === "string") {
+ newObj.namespace = newObj.namespace.trim();
- if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment
- parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) {
- /**
- * something
- *
- * @format
- */
- delete newObj.text; // standalone pragma
+ if (newObj.namespace.length === 0) {
+ newObj.namespace = true;
+ }
+ }
+ }
- if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) {
- return null;
+ if (newObj.value) {
+ newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, "");
+ delete newObj.quoted;
+ }
}
- }
- if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") {
- delete newObj.value;
- }
+ if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) {
+ newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) {
+ var num = Number(numStr);
+ return isNaN(num) ? match : num + unit.toLowerCase();
+ });
+ }
- if (ast.type === "css-rule") {
- delete newObj.params;
- }
+ if (ast.type === "selector-tag") {
+ var lowercasedValue = ast.value.toLowerCase();
- if (ast.type === "selector-combinator") {
- newObj.value = newObj.value.replace(/\s+/g, " ");
- }
+ if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) {
+ newObj.value = lowercasedValue;
+ }
- if (ast.type === "media-feature") {
- newObj.value = newObj.value.replace(/ /g, "");
- }
+ if (["from", "to"].indexOf(lowercasedValue) !== -1) {
+ newObj.value = lowercasedValue;
+ }
+ } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func`
- if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") {
- newObj.value = newObj.value.toLowerCase();
- }
- if (ast.type === "css-decl") {
- newObj.prop = newObj.prop.toLowerCase();
- }
+ if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") {
+ delete newObj.value;
+ } // Workaround for SCSS nested properties
- if (ast.type === "css-atrule" || ast.type === "css-import") {
- newObj.name = newObj.name.toLowerCase();
- }
- if (ast.type === "value-number") {
- newObj.unit = newObj.unit.toLowerCase();
+ if (ast.type === "selector-unknown") {
+ delete newObj.value;
+ }
}
- if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) {
- newObj.value = cleanCSSStrings(newObj.value);
+ function cleanCSSStrings(value) {
+ return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1");
}
- if (ast.type === "selector-attribute") {
- newObj.attribute = newObj.attribute.trim();
+ var clean_1 = clean;
- if (newObj.namespace) {
- if (typeof newObj.namespace === "string") {
- newObj.namespace = newObj.namespace.trim();
+ var _require$$0$builders$1 = doc.builders,
+ hardline$3 = _require$$0$builders$1.hardline,
+ literalline$1 = _require$$0$builders$1.literalline,
+ concat$4 = _require$$0$builders$1.concat,
+ markAsRoot$1 = _require$$0$builders$1.markAsRoot,
+ mapDoc$3 = doc.utils.mapDoc;
- if (newObj.namespace.length === 0) {
- newObj.namespace = true;
- }
- }
+ function embed(path, print, textToDoc
+ /*, options */
+ ) {
+ var node = path.getValue();
+
+ if (node.type === "yaml") {
+ return markAsRoot$1(concat$4(["---", hardline$3, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---", hardline$3]));
}
- if (newObj.value) {
- newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, "");
- delete newObj.quoted;
+ return null;
+
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$3(doc, function (currentDoc) {
+ return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$4(currentDoc.split(/(\n)/g).map(function (v, i) {
+ return i % 2 === 0 ? v : literalline$1;
+ })) : currentDoc;
+ });
}
}
- if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) {
- newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) {
- var num = Number(numStr);
- return isNaN(num) ? match : num + unit.toLowerCase();
- });
- }
+ var embed_1 = embed;
- if (ast.type === "selector-tag") {
- var lowercasedValue = ast.value.toLowerCase();
+ var detectNewline = createCommonjsModule(function (module) {
- if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) {
- newObj.value = lowercasedValue;
- }
+ module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
- if (["from", "to"].indexOf(lowercasedValue) !== -1) {
- newObj.value = lowercasedValue;
- }
- } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func`
+ var newlines = str.match(/(?:\r?\n)/g) || [];
+ if (newlines.length === 0) {
+ return null;
+ }
- if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") {
- delete newObj.value;
- } // Workaround for SCSS nested properties
+ var crlf = newlines.filter(function (el) {
+ return el === '\r\n';
+ }).length;
+ var lf = newlines.length - crlf;
+ return crlf > lf ? '\r\n' : '\n';
+ };
+ module.exports.graceful = function (str) {
+ return module.exports(str) || '\n';
+ };
+ });
+ var detectNewline_1 = detectNewline.graceful;
- if (ast.type === "selector-unknown") {
- delete newObj.value;
- }
-}
+ var build = createCommonjsModule(function (module, exports) {
-function cleanCSSStrings(value) {
- return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1");
-}
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+ exports.extract = extract;
+ exports.strip = strip;
+ exports.parse = parse;
+ exports.parseWithComments = parseWithComments;
+ exports.print = print;
-var clean_1 = clean;
+ function _os() {
+ var data = require$$0$1;
-var _require$$0$builders$1 = doc.builders;
-var hardline$4 = _require$$0$builders$1.hardline;
-var literalline$1 = _require$$0$builders$1.literalline;
-var concat$5 = _require$$0$builders$1.concat;
-var markAsRoot$1 = _require$$0$builders$1.markAsRoot;
-var mapDoc$3 = doc.utils.mapDoc;
+ _os = function _os() {
+ return data;
+ };
-function embed(path, print, textToDoc
-/*, options */
-) {
- var node = path.getValue();
+ return data;
+ }
- if (node.type === "yaml") {
- return markAsRoot$1(concat$5(["---", hardline$4, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
- parser: "yaml"
- })) : "", "---", hardline$4]));
- }
+ function _detectNewline() {
+ var data = _interopRequireDefault(detectNewline);
- return null;
+ _detectNewline = function _detectNewline() {
+ return data;
+ };
- function replaceNewlinesWithLiterallines(doc$$2) {
- return mapDoc$3(doc$$2, function (currentDoc) {
- return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$5(currentDoc.split(/(\n)/g).map(function (v, i) {
- return i % 2 === 0 ? v : literalline$1;
- })) : currentDoc;
- });
- }
-}
+ return data;
+ }
-var embed_1 = embed;
+ function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ default: obj
+ };
+ }
+ /**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
-var detectNewline = createCommonjsModule(function (module) {
- 'use strict';
- module.exports = function (str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
+ var commentEndRe = /\*\/$/;
+ var commentStartRe = /^\/\*\*/;
+ var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
+ var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g;
+ var ltrimNewlineRe = /^(\r?\n)+/;
+ var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;
+ var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;
+ var stringStartRe = /(\r?\n|^) *\* ?/g;
+
+ function extract(contents) {
+ var match = contents.match(docblockRe);
+ return match ? match[0].trimLeft() : '';
}
- var newlines = str.match(/(?:\r?\n)/g) || [];
+ function strip(contents) {
+ var match = contents.match(docblockRe);
+ return match && match[0] ? contents.substring(match[0].length) : contents;
+ }
- if (newlines.length === 0) {
- return null;
+ function parse(docblock) {
+ return parseWithComments(docblock).pragmas;
}
- var crlf = newlines.filter(function (el) {
- return el === '\r\n';
- }).length;
- var lf = newlines.length - crlf;
- return crlf > lf ? '\r\n' : '\n';
- };
+ function parseWithComments(docblock) {
+ var line = (0, _detectNewline().default)(docblock) || _os().EOL;
- module.exports.graceful = function (str) {
- return module.exports(str) || '\n';
- };
-});
+ docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives
-var build$1 = createCommonjsModule(function (module, exports) {
- 'use strict';
+ var prev = '';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- exports.extract = extract;
- exports.strip = strip;
- exports.parse = parse;
- exports.parseWithComments = parseWithComments;
- exports.print = print;
+ while (prev !== docblock) {
+ prev = docblock;
+ docblock = docblock.replace(multilineRe, "".concat(line, "$1 $2").concat(line));
+ }
- var _detectNewline;
+ docblock = docblock.replace(ltrimNewlineRe, '').trimRight();
+ var result = Object.create(null);
+ var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight();
+ var match;
- function _load_detectNewline() {
- return _detectNewline = _interopRequireDefault(detectNewline);
- }
+ while (match = propertyRe.exec(docblock)) {
+ // strip linecomments from pragmas
+ var nextPragma = match[2].replace(lineCommentRe, '');
- var _os;
+ if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) {
+ result[match[1]] = [].concat(result[match[1]], nextPragma);
+ } else {
+ result[match[1]] = nextPragma;
+ }
+ }
- function _load_os() {
- return _os = require$$1$1;
- }
+ return {
+ comments: comments,
+ pragmas: result
+ };
+ }
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- /**
- * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- *
- */
+ function print(_ref) {
+ var _ref$comments = _ref.comments,
+ comments = _ref$comments === void 0 ? '' : _ref$comments,
+ _ref$pragmas = _ref.pragmas,
+ pragmas = _ref$pragmas === void 0 ? {} : _ref$pragmas;
+
+ var line = (0, _detectNewline().default)(comments) || _os().EOL;
+
+ var head = '/**';
+ var start = ' *';
+ var tail = ' */';
+ var keys = Object.keys(pragmas);
+ var printedObject = keys.map(function (key) {
+ return printKeyValues(key, pragmas[key]);
+ }).reduce(function (arr, next) {
+ return arr.concat(next);
+ }, []).map(function (keyValue) {
+ return start + ' ' + keyValue + line;
+ }).join('');
+ if (!comments) {
+ if (keys.length === 0) {
+ return '';
+ }
- var commentEndRe = /\*\/$/;
- var commentStartRe = /^\/\*\*/;
- var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
- var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g;
- var ltrimNewlineRe = /^(\r?\n)+/;
- var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;
- var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;
- var stringStartRe = /(\r?\n|^) *\* ?/g;
+ if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) {
+ var value = pragmas[keys[0]];
+ return "".concat(head, " ").concat(printKeyValues(keys[0], value)[0]).concat(tail);
+ }
+ }
- function extract(contents) {
- var match = contents.match(docblockRe);
- return match ? match[0].trimLeft() : '';
- }
+ var printedComments = comments.split(line).map(function (textLine) {
+ return "".concat(start, " ").concat(textLine);
+ }).join(line) + line;
+ return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail;
+ }
- function strip(contents) {
- var match = contents.match(docblockRe);
- return match && match[0] ? contents.substring(match[0].length) : contents;
- }
+ function printKeyValues(key, valueOrArray) {
+ return [].concat(valueOrArray).map(function (value) {
+ return "@".concat(key, " ").concat(value).trim();
+ });
+ }
+ });
+ unwrapExports(build);
+ var build_1 = build.extract;
+ var build_2 = build.strip;
+ var build_3 = build.parse;
+ var build_4 = build.parseWithComments;
+ var build_5 = build.print;
- function parse(docblock) {
- return parseWithComments(docblock).pragmas;
+ function hasPragma(text) {
+ var pragmas = Object.keys(build.parse(build.extract(text)));
+ return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1;
}
- function parseWithComments(docblock) {
- var line = (0, (_detectNewline || _load_detectNewline()).default)(docblock) || (_os || _load_os()).EOL;
+ function insertPragma(text) {
+ var parsedDocblock = build.parseWithComments(build.extract(text));
+ var pragmas = Object.assign({
+ format: ""
+ }, parsedDocblock.pragmas);
+ var newDocblock = build.print({
+ pragmas: pragmas,
+ comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines
- docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives
+ }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock)
- var prev = '';
+ var strippedText = build.strip(text);
+ var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n";
+ return newDocblock + separatingNewlines + strippedText;
+ }
- while (prev !== docblock) {
- prev = docblock;
- docblock = docblock.replace(multilineRe, "".concat(line, "$1 $2").concat(line));
- }
+ var pragma = {
+ hasPragma: hasPragma,
+ insertPragma: insertPragma
+ };
- docblock = docblock.replace(ltrimNewlineRe, '').trimRight();
- var result = Object.create(null);
- var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight();
- var match;
+ var DELIMITER_MAP = {
+ "---": "yaml",
+ "+++": "toml"
+ };
- while (match = propertyRe.exec(docblock)) {
- // strip linecomments from pragmas
- var nextPragma = match[2].replace(lineCommentRe, '');
+ function parse$1(text) {
+ var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|");
+ var match = text.match( // trailing spaces after delimiters are allowed
+ new RegExp("^(".concat(delimiterRegex, ")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));
- if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) {
- result[match[1]] = [].concat(result[match[1]], nextPragma);
- } else {
- result[match[1]] = nextPragma;
- }
+ if (match === null) {
+ return {
+ frontMatter: null,
+ content: text
+ };
}
+ var raw = match[0].replace(/\n$/, "");
+ var delimiter = match[1];
+ var value = match[2];
return {
- comments: comments,
- pragmas: result
+ frontMatter: {
+ type: DELIMITER_MAP[delimiter],
+ value: value,
+ raw: raw
+ },
+ content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length)
};
}
- function print(_ref) {
- var _ref$comments = _ref.comments;
- var comments = _ref$comments === undefined ? '' : _ref$comments;
- var _ref$pragmas = _ref.pragmas;
- var pragmas = _ref$pragmas === undefined ? {} : _ref$pragmas;
-
- var line = (0, (_detectNewline || _load_detectNewline()).default)(comments) || (_os || _load_os()).EOL;
-
- var head = '/**';
- var start = ' *';
- var tail = ' */';
- var keys = Object.keys(pragmas);
- var printedObject = keys.map(function (key) {
- return printKeyValues(key, pragmas[key]);
- }).reduce(function (arr, next) {
- return arr.concat(next);
- }, []).map(function (keyValue) {
- return start + ' ' + keyValue + line;
- }).join('');
-
- if (!comments) {
- if (keys.length === 0) {
- return '';
- }
-
- if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) {
- var value = pragmas[keys[0]];
- return "".concat(head, " ").concat(printKeyValues(keys[0], value)[0]).concat(tail);
- }
- }
+ var frontMatter = parse$1;
- var printedComments = comments.split(line).map(function (textLine) {
- return "".concat(start, " ").concat(textLine);
- }).join(line) + line;
- return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail;
+ function hasPragma$1(text) {
+ return pragma.hasPragma(frontMatter(text).content);
}
- function printKeyValues(key, valueOrArray) {
- return [].concat(valueOrArray).map(function (value) {
- return "@".concat(key, " ").concat(value).trim();
- });
- }
-});
-unwrapExports(build$1);
-
-function hasPragma$1(text) {
- var pragmas = Object.keys(build$1.parse(build$1.extract(text)));
- return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1;
-}
-
-function insertPragma$2(text) {
- var parsedDocblock = build$1.parseWithComments(build$1.extract(text));
- var pragmas = Object.assign({
- format: ""
- }, parsedDocblock.pragmas);
- var newDocblock = build$1.print({
- pragmas: pragmas,
- comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines
-
- }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock)
-
- var strippedText = build$1.strip(text);
- var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n";
- return newDocblock + separatingNewlines + strippedText;
-}
-
-var pragma$2 = {
- hasPragma: hasPragma$1,
- insertPragma: insertPragma$2
-};
-
-var DELIMITER_MAP = {
- "---": "yaml",
- "+++": "toml"
-};
-
-function parse$3(text) {
- var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|");
- var match = text.match( // trailing spaces after delimiters are allowed
- new RegExp("^(".concat(delimiterRegex, ")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));
-
- if (match === null) {
- return {
- frontMatter: null,
- content: text
- };
+ function insertPragma$1(text) {
+ var _parseFrontMatter = frontMatter(text),
+ frontMatter$1 = _parseFrontMatter.frontMatter,
+ content = _parseFrontMatter.content;
+
+ return (frontMatter$1 ? frontMatter$1.raw + "\n\n" : "") + pragma.insertPragma(content);
}
- var raw = match[0].replace(/\n$/, "");
- var delimiter = match[1];
- var value = match[2];
- return {
- frontMatter: {
- type: DELIMITER_MAP[delimiter],
- value: value,
- raw: raw
- },
- content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length)
+ var pragma$1 = {
+ hasPragma: hasPragma$1,
+ insertPragma: insertPragma$1
};
-}
-var frontMatter = parse$3;
+ var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"];
-function hasPragma(text) {
- return pragma$2.hasPragma(frontMatter(text).content);
-}
+ function getAncestorCounter(path, typeOrTypes) {
+ var types = [].concat(typeOrTypes);
+ var counter = -1;
+ var ancestorNode;
-function insertPragma$1(text) {
- var _parseFrontMatter = frontMatter(text),
- frontMatter$$1 = _parseFrontMatter.frontMatter,
- content = _parseFrontMatter.content;
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.indexOf(ancestorNode.type) !== -1) {
+ return counter;
+ }
+ }
- return (frontMatter$$1 ? frontMatter$$1.raw + "\n\n" : "") + pragma$2.insertPragma(content);
-}
+ return -1;
+ }
-var pragma = {
- hasPragma: hasPragma,
- insertPragma: insertPragma$1
-};
+ function getAncestorNode(path, typeOrTypes) {
+ var counter = getAncestorCounter(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+ }
-var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"];
+ function getPropOfDeclNode(path) {
+ var declAncestorNode = getAncestorNode(path, "css-decl");
+ return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase();
+ }
-function getAncestorCounter(path, typeOrTypes) {
- var types = [].concat(typeOrTypes);
- var counter = -1;
- var ancestorNode;
+ function isSCSS(parser, text) {
+ var hasExplicitParserChoice = parser === "less" || parser === "scss";
+ var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/;
+ return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
+ }
- while (ancestorNode = path.getParentNode(++counter)) {
- if (types.indexOf(ancestorNode.type) !== -1) {
- return counter;
- }
+ function isWideKeywords(value) {
+ return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1;
+ }
+
+ function isKeyframeAtRuleKeywords(path, value) {
+ var atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1;
+ }
+
+ function maybeToLowerCase(value) {
+ return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase();
}
- return -1;
-}
+ function insideValueFunctionNode(path, functionName) {
+ var funcAncestorNode = getAncestorNode(path, "value-func");
+ return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName;
+ }
-function getAncestorNode$1(path, typeOrTypes) {
- var counter = getAncestorCounter(path, typeOrTypes);
- return counter === -1 ? null : path.getParentNode(counter);
-}
+ function insideICSSRuleNode(path) {
+ var ruleAncestorNode = getAncestorNode(path, "css-rule");
+ return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export"));
+ }
-function getPropOfDeclNode$1(path) {
- var declAncestorNode = getAncestorNode$1(path, "css-decl");
- return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase();
-}
+ function insideAtRuleNode(path, atRuleNameOrAtRuleNames) {
+ var atRuleNames = [].concat(atRuleNameOrAtRuleNames);
+ var atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1;
+ }
-function isSCSS$1(parser, text) {
- var hasExplicitParserChoice = parser === "less" || parser === "scss";
- var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/;
- return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
-}
+ function insideURLFunctionInImportAtRuleNode(path) {
+ var node = path.getValue();
+ var atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2;
+ }
-function isWideKeywords$1(value) {
- return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1;
-}
+ function isURLFunctionNode(node) {
+ return node.type === "value-func" && node.value.toLowerCase() === "url";
+ }
-function isKeyframeAtRuleKeywords$1(path, value) {
- var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
- return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1;
-}
+ function isLastNode(path, node) {
+ var parentNode = path.getParentNode();
-function maybeToLowerCase$1(value) {
- return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase();
-}
+ if (!parentNode) {
+ return false;
+ }
-function insideValueFunctionNode$1(path, functionName) {
- var funcAncestorNode = getAncestorNode$1(path, "value-func");
- return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName;
-}
+ var nodes = parentNode.nodes;
+ return nodes && nodes.indexOf(node) === nodes.length - 1;
+ }
-function insideICSSRuleNode$1(path) {
- var ruleAncestorNode = getAncestorNode$1(path, "css-rule");
- return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export"));
-}
+ function isHTMLTag(value) {
+ return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1;
+ }
-function insideAtRuleNode$1(path, atRuleNameOrAtRuleNames) {
- var atRuleNames = [].concat(atRuleNameOrAtRuleNames);
- var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
- return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1;
-}
+ function isDetachedRulesetDeclarationNode(node) {
+ // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as atrules with names ending
+ // with a colon, so keep the original case then.
+ if (!node.selector) {
+ return false;
+ }
-function insideURLFunctionInImportAtRuleNode$1(path) {
- var node = path.getValue();
- var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
- return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2;
-}
+ return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value);
+ }
-function isURLFunctionNode$1(node) {
- return node.type === "value-func" && node.value.toLowerCase() === "url";
-}
+ function isForKeywordNode(node) {
+ return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1;
+ }
-function isLastNode$1(path, node) {
- var parentNode = path.getParentNode();
+ function isIfElseKeywordNode(node) {
+ return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1;
+ }
- if (!parentNode) {
- return false;
+ function isEachKeywordNode(node) {
+ return node.type === "value-word" && node.value === "in";
}
- var nodes = parentNode.nodes;
- return nodes && nodes.indexOf(node) === nodes.length - 1;
-}
+ function isMultiplicationNode(node) {
+ return node.type === "value-operator" && node.value === "*";
+ }
-function isHTMLTag$1(value) {
- return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1;
-}
+ function isDivisionNode(node) {
+ return node.type === "value-operator" && node.value === "/";
+ }
-function isDetachedRulesetDeclarationNode$1(node) {
- // If a Less file ends up being parsed with the SCSS parser, Less
- // variable declarations will be parsed as atrules with names ending
- // with a colon, so keep the original case then.
- if (!node.selector) {
- return false;
+ function isAdditionNode(node) {
+ return node.type === "value-operator" && node.value === "+";
}
- return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value);
-}
+ function isSubtractionNode(node) {
+ return node.type === "value-operator" && node.value === "-";
+ }
-function isForKeywordNode$1(node) {
- return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1;
-}
+ function isModuloNode(node) {
+ return node.type === "value-operator" && node.value === "%";
+ }
-function isIfElseKeywordNode$1(node) {
- return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1;
-}
+ function isMathOperatorNode(node) {
+ return isMultiplicationNode(node) || isDivisionNode(node) || isAdditionNode(node) || isSubtractionNode(node) || isModuloNode(node);
+ }
-function isEachKeywordNode$1(node) {
- return node.type === "value-word" && node.value === "in";
-}
+ function isEqualityOperatorNode(node) {
+ return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1;
+ }
-function isMultiplicationNode$1(node) {
- return node.type === "value-operator" && node.value === "*";
-}
+ function isRelationalOperatorNode(node) {
+ return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1;
+ }
-function isDivisionNode$1(node) {
- return node.type === "value-operator" && node.value === "/";
-}
+ function isSCSSControlDirectiveNode(node) {
+ return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1;
+ }
-function isAdditionNode$1(node) {
- return node.type === "value-operator" && node.value === "+";
-}
+ function isSCSSNestedPropertyNode(node) {
+ if (!node.selector) {
+ return false;
+ }
-function isSubtractionNode$1(node) {
- return node.type === "value-operator" && node.value === "-";
-}
+ return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":");
+ }
-function isModuloNode(node) {
- return node.type === "value-operator" && node.value === "%";
-}
+ function isDetachedRulesetCallNode(node) {
+ return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params);
+ }
-function isMathOperatorNode$1(node) {
- return isMultiplicationNode$1(node) || isDivisionNode$1(node) || isAdditionNode$1(node) || isSubtractionNode$1(node) || isModuloNode(node);
-}
+ function isTemplatePlaceholderNode(node) {
+ return node.name.startsWith("prettier-placeholder");
+ }
-function isEqualityOperatorNode$1(node) {
- return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1;
-}
+ function isTemplatePropNode(node) {
+ return node.prop.startsWith("@prettier-placeholder");
+ }
-function isRelationalOperatorNode$1(node) {
- return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1;
-}
+ function isPostcssSimpleVarNode(currentNode, nextNode) {
+ return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before;
+ }
-function isSCSSControlDirectiveNode$1(node) {
- return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1;
-}
+ function hasComposesNode(node) {
+ return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes";
+ }
-function isSCSSNestedPropertyNode(node) {
- if (!node.selector) {
- return false;
+ function hasParensAroundNode(node) {
+ return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null;
}
- return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":");
-}
+ function hasEmptyRawBefore(node) {
+ return node.raws && node.raws.before === "";
+ }
-function isDetachedRulesetCallNode$1(node) {
- return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params);
-}
+ function isKeyValuePairNode(node) {
+ return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon";
+ }
-function isTemplatePlaceholderNode$1(node) {
- return node.name.startsWith("prettier-placeholder");
-}
+ function isKeyValuePairInParenGroupNode(node) {
+ return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode(node.groups[0]);
+ }
-function isTemplatePropNode$1(node) {
- return node.prop.startsWith("@prettier-placeholder");
-}
+ function isSCSSMapItemNode(path) {
+ var node = path.getValue(); // Ignore empty item (i.e. `$key: ()`)
-function isPostcssSimpleVarNode$1(currentNode, nextNode) {
- return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before;
-}
+ if (node.groups.length === 0) {
+ return false;
+ }
-function hasComposesNode$1(node) {
- return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes";
-}
+ var parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`)
-function hasParensAroundNode$1(node) {
- return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null;
-}
+ if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) {
+ return false;
+ }
-function hasEmptyRawBefore$1(node) {
- return node.raws && node.raws.before === "";
-}
+ var declNode = getAncestorNode(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`)
-function isKeyValuePairNode$1(node) {
- return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon";
-}
+ if (declNode && declNode.prop && declNode.prop.startsWith("$")) {
+ return true;
+ } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`)
-function isKeyValuePairInParenGroupNode(node) {
- return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode$1(node.groups[0]);
-}
-function isSCSSMapItemNode$1(path) {
- var node = path.getValue(); // Ignore empty item (i.e. `$key: ()`)
+ if (isKeyValuePairInParenGroupNode(parentParentNode)) {
+ return true;
+ } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`)
- if (node.groups.length === 0) {
- return false;
- }
- var parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`)
+ if (parentParentNode.type === "value-func") {
+ return true;
+ }
- if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) {
return false;
}
- var declNode = getAncestorNode$1(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`)
+ function isInlineValueCommentNode(node) {
+ return node.type === "value-comment" && node.inline;
+ }
- if (declNode && declNode.prop && declNode.prop.startsWith("$")) {
- return true;
- } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`)
+ function isHashNode(node) {
+ return node.type === "value-word" && node.value === "#";
+ }
+ function isLeftCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "{";
+ }
- if (isKeyValuePairInParenGroupNode(parentParentNode)) {
- return true;
- } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`)
+ function isRightCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "}";
+ }
+ function isWordNode(node) {
+ return ["value-word", "value-atword"].indexOf(node.type) !== -1;
+ }
- if (parentParentNode.type === "value-func") {
- return true;
+ function isColonNode(node) {
+ return node.type === "value-colon";
}
- return false;
-}
+ function isMediaAndSupportsKeywords(node) {
+ return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1;
+ }
-function isInlineValueCommentNode$1(node) {
- return node.type === "value-comment" && node.inline;
-}
+ function isColorAdjusterFuncNode(node) {
+ if (node.type !== "value-func") {
+ return false;
+ }
-function isHashNode$1(node) {
- return node.type === "value-word" && node.value === "#";
-}
+ return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1;
+ }
+
+ var utils$2 = {
+ getAncestorCounter: getAncestorCounter,
+ getAncestorNode: getAncestorNode,
+ getPropOfDeclNode: getPropOfDeclNode,
+ maybeToLowerCase: maybeToLowerCase,
+ insideValueFunctionNode: insideValueFunctionNode,
+ insideICSSRuleNode: insideICSSRuleNode,
+ insideAtRuleNode: insideAtRuleNode,
+ insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode,
+ isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords,
+ isHTMLTag: isHTMLTag,
+ isWideKeywords: isWideKeywords,
+ isSCSS: isSCSS,
+ isLastNode: isLastNode,
+ isSCSSControlDirectiveNode: isSCSSControlDirectiveNode,
+ isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode,
+ isRelationalOperatorNode: isRelationalOperatorNode,
+ isEqualityOperatorNode: isEqualityOperatorNode,
+ isMultiplicationNode: isMultiplicationNode,
+ isDivisionNode: isDivisionNode,
+ isAdditionNode: isAdditionNode,
+ isSubtractionNode: isSubtractionNode,
+ isModuloNode: isModuloNode,
+ isMathOperatorNode: isMathOperatorNode,
+ isEachKeywordNode: isEachKeywordNode,
+ isForKeywordNode: isForKeywordNode,
+ isURLFunctionNode: isURLFunctionNode,
+ isIfElseKeywordNode: isIfElseKeywordNode,
+ hasComposesNode: hasComposesNode,
+ hasParensAroundNode: hasParensAroundNode,
+ hasEmptyRawBefore: hasEmptyRawBefore,
+ isSCSSNestedPropertyNode: isSCSSNestedPropertyNode,
+ isDetachedRulesetCallNode: isDetachedRulesetCallNode,
+ isTemplatePlaceholderNode: isTemplatePlaceholderNode,
+ isTemplatePropNode: isTemplatePropNode,
+ isPostcssSimpleVarNode: isPostcssSimpleVarNode,
+ isKeyValuePairNode: isKeyValuePairNode,
+ isKeyValuePairInParenGroupNode: isKeyValuePairInParenGroupNode,
+ isSCSSMapItemNode: isSCSSMapItemNode,
+ isInlineValueCommentNode: isInlineValueCommentNode,
+ isHashNode: isHashNode,
+ isLeftCurlyBraceNode: isLeftCurlyBraceNode,
+ isRightCurlyBraceNode: isRightCurlyBraceNode,
+ isWordNode: isWordNode,
+ isColonNode: isColonNode,
+ isMediaAndSupportsKeywords: isMediaAndSupportsKeywords,
+ isColorAdjusterFuncNode: isColorAdjusterFuncNode
+ };
-function isLeftCurlyBraceNode$1(node) {
- return node.type === "value-word" && node.value === "{";
-}
+ var insertPragma$2 = pragma$1.insertPragma;
+ var printNumber$1 = util.printNumber,
+ printString$1 = util.printString,
+ hasIgnoreComment$1 = util.hasIgnoreComment,
+ hasNewline$2 = util.hasNewline;
+ var isNextLineEmpty$2 = utilShared.isNextLineEmpty;
+ var _require$$3$builders = doc.builders,
+ concat$5 = _require$$3$builders.concat,
+ join$2 = _require$$3$builders.join,
+ line$1 = _require$$3$builders.line,
+ hardline$4 = _require$$3$builders.hardline,
+ softline$1 = _require$$3$builders.softline,
+ group$1 = _require$$3$builders.group,
+ fill$2 = _require$$3$builders.fill,
+ indent$2 = _require$$3$builders.indent,
+ dedent$1 = _require$$3$builders.dedent,
+ ifBreak$1 = _require$$3$builders.ifBreak,
+ removeLines$1 = doc.utils.removeLines;
+ var getAncestorNode$1 = utils$2.getAncestorNode,
+ getPropOfDeclNode$1 = utils$2.getPropOfDeclNode,
+ maybeToLowerCase$1 = utils$2.maybeToLowerCase,
+ insideValueFunctionNode$1 = utils$2.insideValueFunctionNode,
+ insideICSSRuleNode$1 = utils$2.insideICSSRuleNode,
+ insideAtRuleNode$1 = utils$2.insideAtRuleNode,
+ insideURLFunctionInImportAtRuleNode$1 = utils$2.insideURLFunctionInImportAtRuleNode,
+ isKeyframeAtRuleKeywords$1 = utils$2.isKeyframeAtRuleKeywords,
+ isHTMLTag$1 = utils$2.isHTMLTag,
+ isWideKeywords$1 = utils$2.isWideKeywords,
+ isSCSS$1 = utils$2.isSCSS,
+ isLastNode$1 = utils$2.isLastNode,
+ isSCSSControlDirectiveNode$1 = utils$2.isSCSSControlDirectiveNode,
+ isDetachedRulesetDeclarationNode$1 = utils$2.isDetachedRulesetDeclarationNode,
+ isRelationalOperatorNode$1 = utils$2.isRelationalOperatorNode,
+ isEqualityOperatorNode$1 = utils$2.isEqualityOperatorNode,
+ isMultiplicationNode$1 = utils$2.isMultiplicationNode,
+ isDivisionNode$1 = utils$2.isDivisionNode,
+ isAdditionNode$1 = utils$2.isAdditionNode,
+ isSubtractionNode$1 = utils$2.isSubtractionNode,
+ isMathOperatorNode$1 = utils$2.isMathOperatorNode,
+ isEachKeywordNode$1 = utils$2.isEachKeywordNode,
+ isForKeywordNode$1 = utils$2.isForKeywordNode,
+ isURLFunctionNode$1 = utils$2.isURLFunctionNode,
+ isIfElseKeywordNode$1 = utils$2.isIfElseKeywordNode,
+ hasComposesNode$1 = utils$2.hasComposesNode,
+ hasParensAroundNode$1 = utils$2.hasParensAroundNode,
+ hasEmptyRawBefore$1 = utils$2.hasEmptyRawBefore,
+ isKeyValuePairNode$1 = utils$2.isKeyValuePairNode,
+ isDetachedRulesetCallNode$1 = utils$2.isDetachedRulesetCallNode,
+ isTemplatePlaceholderNode$1 = utils$2.isTemplatePlaceholderNode,
+ isTemplatePropNode$1 = utils$2.isTemplatePropNode,
+ isPostcssSimpleVarNode$1 = utils$2.isPostcssSimpleVarNode,
+ isSCSSMapItemNode$1 = utils$2.isSCSSMapItemNode,
+ isInlineValueCommentNode$1 = utils$2.isInlineValueCommentNode,
+ isHashNode$1 = utils$2.isHashNode,
+ isLeftCurlyBraceNode$1 = utils$2.isLeftCurlyBraceNode,
+ isRightCurlyBraceNode$1 = utils$2.isRightCurlyBraceNode,
+ isWordNode$1 = utils$2.isWordNode,
+ isColonNode$1 = utils$2.isColonNode,
+ isMediaAndSupportsKeywords$1 = utils$2.isMediaAndSupportsKeywords,
+ isColorAdjusterFuncNode$1 = utils$2.isColorAdjusterFuncNode;
+
+ function shouldPrintComma(options) {
+ switch (options.trailingComma) {
+ case "all":
+ case "es5":
+ return true;
-function isRightCurlyBraceNode$1(node) {
- return node.type === "value-word" && node.value === "}";
-}
+ case "none":
+ default:
+ return false;
+ }
+ }
-function isWordNode$1(node) {
- return ["value-word", "value-atword"].indexOf(node.type) !== -1;
-}
+ function genericPrint(path, options, print) {
+ var node = path.getValue();
+ /* istanbul ignore if */
-function isColonNode$1(node) {
- return node.type === "value-colon";
-}
+ if (!node) {
+ return "";
+ }
-function isMediaAndSupportsKeywords$1(node) {
- return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1;
-}
+ if (typeof node === "string") {
+ return node;
+ }
-function isColorAdjusterFuncNode$1(node) {
- if (node.type !== "value-func") {
- return false;
- }
+ switch (node.type) {
+ case "yaml":
+ case "toml":
+ return concat$5([node.raw, hardline$4]);
- return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1;
-}
-
-var utils$4 = {
- getAncestorCounter: getAncestorCounter,
- getAncestorNode: getAncestorNode$1,
- getPropOfDeclNode: getPropOfDeclNode$1,
- maybeToLowerCase: maybeToLowerCase$1,
- insideValueFunctionNode: insideValueFunctionNode$1,
- insideICSSRuleNode: insideICSSRuleNode$1,
- insideAtRuleNode: insideAtRuleNode$1,
- insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1,
- isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1,
- isHTMLTag: isHTMLTag$1,
- isWideKeywords: isWideKeywords$1,
- isSCSS: isSCSS$1,
- isLastNode: isLastNode$1,
- isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1,
- isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1,
- isRelationalOperatorNode: isRelationalOperatorNode$1,
- isEqualityOperatorNode: isEqualityOperatorNode$1,
- isMultiplicationNode: isMultiplicationNode$1,
- isDivisionNode: isDivisionNode$1,
- isAdditionNode: isAdditionNode$1,
- isSubtractionNode: isSubtractionNode$1,
- isModuloNode: isModuloNode,
- isMathOperatorNode: isMathOperatorNode$1,
- isEachKeywordNode: isEachKeywordNode$1,
- isForKeywordNode: isForKeywordNode$1,
- isURLFunctionNode: isURLFunctionNode$1,
- isIfElseKeywordNode: isIfElseKeywordNode$1,
- hasComposesNode: hasComposesNode$1,
- hasParensAroundNode: hasParensAroundNode$1,
- hasEmptyRawBefore: hasEmptyRawBefore$1,
- isSCSSNestedPropertyNode: isSCSSNestedPropertyNode,
- isDetachedRulesetCallNode: isDetachedRulesetCallNode$1,
- isTemplatePlaceholderNode: isTemplatePlaceholderNode$1,
- isTemplatePropNode: isTemplatePropNode$1,
- isPostcssSimpleVarNode: isPostcssSimpleVarNode$1,
- isKeyValuePairNode: isKeyValuePairNode$1,
- isKeyValuePairInParenGroupNode: isKeyValuePairInParenGroupNode,
- isSCSSMapItemNode: isSCSSMapItemNode$1,
- isInlineValueCommentNode: isInlineValueCommentNode$1,
- isHashNode: isHashNode$1,
- isLeftCurlyBraceNode: isLeftCurlyBraceNode$1,
- isRightCurlyBraceNode: isRightCurlyBraceNode$1,
- isWordNode: isWordNode$1,
- isColonNode: isColonNode$1,
- isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1,
- isColorAdjusterFuncNode: isColorAdjusterFuncNode$1
-};
-
-var insertPragma = pragma.insertPragma;
-var printNumber$1 = util.printNumber;
-var printString$1 = util.printString;
-var hasIgnoreComment$1 = util.hasIgnoreComment;
-var hasNewline$2 = util.hasNewline;
-var isNextLineEmpty$2 = utilShared.isNextLineEmpty;
-var _require$$3$builders = doc.builders;
-var concat$4 = _require$$3$builders.concat;
-var join$2 = _require$$3$builders.join;
-var line$3 = _require$$3$builders.line;
-var hardline$3 = _require$$3$builders.hardline;
-var softline$1 = _require$$3$builders.softline;
-var group$1 = _require$$3$builders.group;
-var fill$2 = _require$$3$builders.fill;
-var indent$2 = _require$$3$builders.indent;
-var dedent$2 = _require$$3$builders.dedent;
-var ifBreak$1 = _require$$3$builders.ifBreak;
-var removeLines$1 = doc.utils.removeLines;
-var getAncestorNode = utils$4.getAncestorNode;
-var getPropOfDeclNode = utils$4.getPropOfDeclNode;
-var maybeToLowerCase = utils$4.maybeToLowerCase;
-var insideValueFunctionNode = utils$4.insideValueFunctionNode;
-var insideICSSRuleNode = utils$4.insideICSSRuleNode;
-var insideAtRuleNode = utils$4.insideAtRuleNode;
-var insideURLFunctionInImportAtRuleNode = utils$4.insideURLFunctionInImportAtRuleNode;
-var isKeyframeAtRuleKeywords = utils$4.isKeyframeAtRuleKeywords;
-var isHTMLTag = utils$4.isHTMLTag;
-var isWideKeywords = utils$4.isWideKeywords;
-var isSCSS = utils$4.isSCSS;
-var isLastNode = utils$4.isLastNode;
-var isSCSSControlDirectiveNode = utils$4.isSCSSControlDirectiveNode;
-var isDetachedRulesetDeclarationNode = utils$4.isDetachedRulesetDeclarationNode;
-var isRelationalOperatorNode = utils$4.isRelationalOperatorNode;
-var isEqualityOperatorNode = utils$4.isEqualityOperatorNode;
-var isMultiplicationNode = utils$4.isMultiplicationNode;
-var isDivisionNode = utils$4.isDivisionNode;
-var isAdditionNode = utils$4.isAdditionNode;
-var isSubtractionNode = utils$4.isSubtractionNode;
-var isMathOperatorNode = utils$4.isMathOperatorNode;
-var isEachKeywordNode = utils$4.isEachKeywordNode;
-var isForKeywordNode = utils$4.isForKeywordNode;
-var isURLFunctionNode = utils$4.isURLFunctionNode;
-var isIfElseKeywordNode = utils$4.isIfElseKeywordNode;
-var hasComposesNode = utils$4.hasComposesNode;
-var hasParensAroundNode = utils$4.hasParensAroundNode;
-var hasEmptyRawBefore = utils$4.hasEmptyRawBefore;
-var isKeyValuePairNode = utils$4.isKeyValuePairNode;
-var isDetachedRulesetCallNode = utils$4.isDetachedRulesetCallNode;
-var isTemplatePlaceholderNode = utils$4.isTemplatePlaceholderNode;
-var isTemplatePropNode = utils$4.isTemplatePropNode;
-var isPostcssSimpleVarNode = utils$4.isPostcssSimpleVarNode;
-var isSCSSMapItemNode = utils$4.isSCSSMapItemNode;
-var isInlineValueCommentNode = utils$4.isInlineValueCommentNode;
-var isHashNode = utils$4.isHashNode;
-var isLeftCurlyBraceNode = utils$4.isLeftCurlyBraceNode;
-var isRightCurlyBraceNode = utils$4.isRightCurlyBraceNode;
-var isWordNode = utils$4.isWordNode;
-var isColonNode = utils$4.isColonNode;
-var isMediaAndSupportsKeywords = utils$4.isMediaAndSupportsKeywords;
-var isColorAdjusterFuncNode = utils$4.isColorAdjusterFuncNode;
-
-function shouldPrintComma(options) {
- switch (options.trailingComma) {
- case "all":
- case "es5":
- return true;
+ case "css-root":
+ {
+ var nodes = printNodeSequence(path, options, print);
- case "none":
- default:
- return false;
- }
-}
+ if (nodes.parts.length) {
+ return concat$5([nodes, hardline$4]);
+ }
-function genericPrint(path, options, print) {
- var node = path.getValue();
- /* istanbul ignore if */
+ return nodes;
+ }
- if (!node) {
- return "";
- }
+ case "css-comment":
+ {
+ if (node.raws.content) {
+ return node.raws.content;
+ }
- if (typeof node === "string") {
- return node;
- }
+ var text = options.originalText.slice(options.locStart(node), options.locEnd(node));
+ var rawText = node.raws.text || node.text; // Workaround a bug where the location is off.
+ // https://github.com/postcss/postcss-scss/issues/63
- switch (node.type) {
- case "yaml":
- case "toml":
- return concat$4([node.raw, hardline$3]);
+ if (text.indexOf(rawText) === -1) {
+ if (node.raws.inline) {
+ return concat$5(["// ", rawText]);
+ }
- case "css-root":
- {
- var nodes = printNodeSequence(path, options, print);
+ return concat$5(["/* ", rawText, " */"]);
+ }
- if (nodes.parts.length) {
- return concat$4([nodes, hardline$3]);
+ return text;
}
- return nodes;
- }
-
- case "css-comment":
- {
- if (node.raws.content) {
- return node.raws.content;
+ case "css-rule":
+ {
+ return concat$5([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$5([" {", node.nodes.length > 0 ? indent$2(concat$5([hardline$4, printNodeSequence(path, options, print)])) : "", hardline$4, "}", isDetachedRulesetDeclarationNode$1(node) ? ";" : ""]) : ";"]);
}
- var text = options.originalText.slice(options.locStart(node), options.locEnd(node));
- var rawText = node.raws.text || node.text; // Workaround a bug where the location is off.
- // https://github.com/postcss/postcss-scss/issues/63
+ case "css-decl":
+ {
+ var parentNode = path.getParentNode();
+ return concat$5([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode$1(path) ? node.prop : maybeToLowerCase$1(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode$1(node) ? removeLines$1(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$5([" {", indent$2(concat$5([softline$1, printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePropNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
+ }
- if (text.indexOf(rawText) === -1) {
- if (node.raws.inline) {
- return concat$4(["// ", rawText]);
- }
+ case "css-atrule":
+ {
+ var _parentNode = path.getParentNode();
- return concat$4(["/* ", rawText, " */"]);
+ return concat$5(["@", // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as at-rules with names ending
+ // with a colon, so keep the original case then.
+ isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$5([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$5([hardline$4, hardline$4]) : hardline$4 : " ", path.call(print, "params")]) : "", node.selector ? indent$2(concat$5([" ", path.call(print, "selector")])) : "", node.value ? group$1(concat$5([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$1 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$5([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$2(concat$5([node.nodes.length > 0 ? softline$1 : "", printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePlaceholderNode$1(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
}
+ // postcss-media-query-parser
- return text;
- }
-
- case "css-rule":
- {
- return concat$4([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$4([" {", node.nodes.length > 0 ? indent$2(concat$4([hardline$3, printNodeSequence(path, options, print)])) : "", hardline$3, "}", isDetachedRulesetDeclarationNode(node) ? ";" : ""]) : ";"]);
- }
+ case "media-query-list":
+ {
+ var parts = [];
+ path.each(function (childPath) {
+ var node = childPath.getValue();
- case "css-decl":
- {
- var parentNode = path.getParentNode();
- return concat$4([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode(path) ? node.prop : maybeToLowerCase(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode(node) ? removeLines$1(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$4([" {", indent$2(concat$4([softline$1, printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePropNode(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
- }
+ if (node.type === "media-query" && node.value === "") {
+ return;
+ }
- case "css-atrule":
- {
- var _parentNode = path.getParentNode();
+ parts.push(childPath.call(print));
+ }, "nodes");
+ return group$1(indent$2(join$2(line$1, parts)));
+ }
- return concat$4(["@", // If a Less file ends up being parsed with the SCSS parser, Less
- // variable declarations will be parsed as at-rules with names ending
- // with a colon, so keep the original case then.
- isDetachedRulesetCallNode(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase(node.name), node.params ? concat$4([isDetachedRulesetCallNode(node) ? "" : isTemplatePlaceholderNode(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$4([hardline$3, hardline$3]) : hardline$3 : " ", path.call(print, "params")]) : "", node.selector ? indent$2(concat$4([" ", path.call(print, "selector")])) : "", node.value ? group$1(concat$4([" ", path.call(print, "value"), isSCSSControlDirectiveNode(node) ? hasParensAroundNode(node) ? " " : line$3 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$4([isSCSSControlDirectiveNode(node) ? "" : " ", "{", indent$2(concat$4([node.nodes.length > 0 ? softline$1 : "", printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePlaceholderNode(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
- }
- // postcss-media-query-parser
+ case "media-query":
+ {
+ return concat$5([join$2(" ", path.map(print, "nodes")), isLastNode$1(path, node) ? "" : ","]);
+ }
- case "media-query-list":
- {
- var parts = [];
- path.each(function (childPath) {
- var node = childPath.getValue();
+ case "media-type":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
- if (node.type === "media-query" && node.value === "") {
- return;
+ case "media-feature-expression":
+ {
+ if (!node.nodes) {
+ return node.value;
}
- parts.push(childPath.call(print));
- }, "nodes");
- return group$1(indent$2(join$2(line$3, parts)));
- }
-
- case "media-query":
- {
- return concat$4([join$2(" ", path.map(print, "nodes")), isLastNode(path, node) ? "" : ","]);
- }
+ return concat$5(["(", concat$5(path.map(print, "nodes")), ")"]);
+ }
- case "media-type":
- {
- return adjustNumbers(adjustStrings(node.value, options));
- }
+ case "media-feature":
+ {
+ return maybeToLowerCase$1(adjustStrings(node.value.replace(/ +/g, " "), options));
+ }
- case "media-feature-expression":
- {
- if (!node.nodes) {
- return node.value;
+ case "media-colon":
+ {
+ return concat$5([node.value, " "]);
}
- return concat$4(["(", concat$4(path.map(print, "nodes")), ")"]);
- }
+ case "media-value":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
- case "media-feature":
- {
- return maybeToLowerCase(adjustStrings(node.value.replace(/ +/g, " "), options));
- }
+ case "media-keyword":
+ {
+ return adjustStrings(node.value, options);
+ }
- case "media-colon":
- {
- return concat$4([node.value, " "]);
- }
+ case "media-url":
+ {
+ return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options);
+ }
- case "media-value":
- {
- return adjustNumbers(adjustStrings(node.value, options));
- }
+ case "media-unknown":
+ {
+ return node.value;
+ }
+ // postcss-selector-parser
- case "media-keyword":
- {
- return adjustStrings(node.value, options);
- }
+ case "selector-root":
+ {
+ return group$1(concat$5([insideAtRuleNode$1(path, "custom-selector") ? concat$5([getAncestorNode$1(path, "css-atrule").customSelector, line$1]) : "", join$2(concat$5([",", insideAtRuleNode$1(path, ["extend", "custom-selector", "nest"]) ? line$1 : hardline$4]), path.map(print, "nodes"))]));
+ }
- case "media-url":
- {
- return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options);
- }
+ case "selector-selector":
+ {
+ return group$1(indent$2(concat$5(path.map(print, "nodes"))));
+ }
- case "media-unknown":
- {
- return node.value;
- }
- // postcss-selector-parser
+ case "selector-comment":
+ {
+ return node.value;
+ }
- case "selector-root":
- {
- return group$1(concat$4([insideAtRuleNode(path, "custom-selector") ? concat$4([getAncestorNode(path, "css-atrule").customSelector, line$3]) : "", join$2(concat$4([",", insideAtRuleNode(path, ["extend", "custom-selector", "nest"]) ? line$3 : hardline$3]), path.map(print, "nodes"))]));
- }
+ case "selector-string":
+ {
+ return adjustStrings(node.value, options);
+ }
- case "selector-selector":
- {
- return group$1(indent$2(concat$4(path.map(print, "nodes"))));
- }
+ case "selector-tag":
+ {
+ var _parentNode2 = path.getParentNode();
- case "selector-comment":
- {
- return node.value;
- }
+ var index = _parentNode2 && _parentNode2.nodes.indexOf(node);
- case "selector-string":
- {
- return adjustStrings(node.value, options);
- }
+ var prevNode = index && _parentNode2.nodes[index - 1];
+ return concat$5([node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag$1(node.value) || isKeyframeAtRuleKeywords$1(path, node.value) ? node.value.toLowerCase() : node.value)]);
+ }
- case "selector-tag":
- {
- var _parentNode2 = path.getParentNode();
+ case "selector-id":
+ {
+ return concat$5(["#", node.value]);
+ }
- var index = _parentNode2 && _parentNode2.nodes.indexOf(node);
+ case "selector-class":
+ {
+ return concat$5([".", adjustNumbers(adjustStrings(node.value, options))]);
+ }
- var prevNode = index && _parentNode2.nodes[index - 1];
- return concat$4([node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag(node.value) || isKeyframeAtRuleKeywords(path, node.value) ? node.value.toLowerCase() : node.value)]);
- }
+ case "selector-attribute":
+ {
+ return concat$5(["[", node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]);
+ }
- case "selector-id":
- {
- return concat$4(["#", node.value]);
- }
+ case "selector-combinator":
+ {
+ if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") {
+ var _parentNode3 = path.getParentNode();
- case "selector-class":
- {
- return concat$4([".", adjustNumbers(adjustStrings(node.value, options))]);
- }
+ var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$1;
- case "selector-attribute":
- {
- return concat$4(["[", node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]);
- }
+ return concat$5([_leading, node.value, isLastNode$1(path, node) ? "" : " "]);
+ }
- case "selector-combinator":
- {
- if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") {
- var _parentNode3 = path.getParentNode();
+ var leading = node.value.trim().startsWith("(") ? line$1 : "";
+ var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$1;
+ return concat$5([leading, value]);
+ }
- var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$3;
+ case "selector-universal":
+ {
+ return concat$5([node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]);
+ }
- return concat$4([_leading, node.value, isLastNode(path, node) ? "" : " "]);
+ case "selector-pseudo":
+ {
+ return concat$5([maybeToLowerCase$1(node.value), node.nodes && node.nodes.length > 0 ? concat$5(["(", join$2(", ", path.map(print, "nodes")), ")"]) : ""]);
}
- var leading = node.value.trim().startsWith("(") ? line$3 : "";
- var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$3;
- return concat$4([leading, value]);
- }
+ case "selector-nesting":
+ {
+ return node.value;
+ }
- case "selector-universal":
- {
- return concat$4([node.namespace ? concat$4([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]);
- }
+ case "selector-unknown":
+ {
+ var ruleAncestorNode = getAncestorNode$1(path, "css-rule"); // Nested SCSS property
- case "selector-pseudo":
- {
- return concat$4([maybeToLowerCase(node.value), node.nodes && node.nodes.length > 0 ? concat$4(["(", join$2(", ", path.map(print, "nodes")), ")"]) : ""]);
- }
+ if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) {
+ return adjustNumbers(adjustStrings(maybeToLowerCase$1(node.value), options));
+ }
- case "selector-nesting":
- {
- return node.value;
- }
+ return node.value;
+ }
+ // postcss-values-parser
- case "selector-unknown":
- {
- var ruleAncestorNode = getAncestorNode(path, "css-rule"); // Nested SCSS property
+ case "value-value":
+ case "value-root":
+ {
+ return path.call(print, "group");
+ }
- if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) {
- return adjustNumbers(adjustStrings(maybeToLowerCase(node.value), options));
+ case "value-comment":
+ {
+ return concat$5([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]);
}
- return node.value;
- }
- // postcss-values-parser
+ case "value-comma_group":
+ {
+ var _parentNode4 = path.getParentNode();
- case "value-value":
- case "value-root":
- {
- return path.call(print, "group");
- }
+ var parentParentNode = path.getParentNode(1);
+ var declAncestorProp = getPropOfDeclNode$1(path);
+ var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template"));
+ var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
+ var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode$1(atRuleAncestorNode);
+ var printed = path.map(print, "groups");
+ var _parts = [];
+ var insideURLFunction = insideValueFunctionNode$1(path, "url");
+ var insideSCSSInterpolationInString = false;
+ var didBreak = false;
- case "value-comment":
- {
- return concat$4([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]);
- }
+ for (var i = 0; i < node.groups.length; ++i) {
+ _parts.push(printed[i]); // Ignore value inside `url()`
- case "value-comma_group":
- {
- var _parentNode4 = path.getParentNode();
- var parentParentNode = path.getParentNode(1);
- var declAncestorProp = getPropOfDeclNode(path);
- var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template"));
- var atRuleAncestorNode = getAncestorNode(path, "css-atrule");
- var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode(atRuleAncestorNode);
- var printed = path.map(print, "groups");
- var _parts = [];
- var insideURLFunction = insideValueFunctionNode(path, "url");
- var insideSCSSInterpolationInString = false;
- var didBreak = false;
+ if (insideURLFunction) {
+ continue;
+ }
- for (var i = 0; i < node.groups.length; ++i) {
- _parts.push(printed[i]); // Ignore value inside `url()`
+ var iPrevNode = node.groups[i - 1];
+ var iNode = node.groups[i];
+ var iNextNode = node.groups[i + 1];
+ var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon)
+ if (!iNextNode) {
+ continue;
+ } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
- if (insideURLFunction) {
- continue;
- }
- var iPrevNode = node.groups[i - 1];
- var iNode = node.groups[i];
- var iNextNode = node.groups[i + 1];
- var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon)
+ var isStartSCSSInterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{");
+ var isEndingSCSSInterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}");
- if (!iNextNode) {
- continue;
- } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
+ if (isStartSCSSInterpolationInString || isEndingSCSSInterpolationInString) {
+ insideSCSSInterpolationInString = !insideSCSSInterpolationInString;
+ continue;
+ }
+ if (insideSCSSInterpolationInString) {
+ continue;
+ } // Ignore colon (i.e. `:`)
- var isStartSCSSinterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{");
- var isEndingSCSSinterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}");
- if (isStartSCSSinterpolationInString || isEndingSCSSinterpolationInString) {
- insideSCSSInterpolationInString = !insideSCSSInterpolationInString;
- continue;
- }
+ if (isColonNode$1(iNode) || isColonNode$1(iNextNode)) {
+ continue;
+ } // Ignore `@` in Less (i.e. `@@var;`)
- if (insideSCSSInterpolationInString) {
- continue;
- } // Ignore colon (i.e. `:`)
+ if (iNode.type === "value-atword" && iNode.value === "") {
+ continue;
+ } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`)
- if (isColonNode(iNode) || isColonNode(iNextNode)) {
- continue;
- } // Ignore `@` in Less (i.e. `@@var;`)
+ if (iNode.value === "~") {
+ continue;
+ } // Ignore escape `\`
- if (iNode.type === "value-atword" && iNode.value === "") {
- continue;
- } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`)
+ if (iNode.value && iNode.value.indexOf("\\") !== -1 && iNextNode && iNextNode.type !== "value-comment") {
+ continue;
+ } // Ignore escaped `/`
- if (iNode.value === "~") {
- continue;
- } // Ignore escape `\`
+ if (iPrevNode && iPrevNode.value && iPrevNode.value.indexOf("\\") === iPrevNode.value.length - 1 && iNode.type === "value-operator" && iNode.value === "/") {
+ continue;
+ } // Ignore `\` (i.e. `$variable: \@small;`)
- if (iNode.value && iNode.value.indexOf("\\") !== -1 && iNextNode && iNextNode.type !== "value-comment") {
- continue;
- } // Ignore escaped `/`
+ if (iNode.value === "\\") {
+ continue;
+ } // Ignore `$$` (i.e. `background-color: $$(style)Color;`)
- if (iPrevNode && iPrevNode.value && iPrevNode.value.indexOf("\\") === iPrevNode.value.length - 1 && iNode.type === "value-operator" && iNode.value === "/") {
- continue;
- } // Ignore `\` (i.e. `$variable: \@small;`)
+ if (isPostcssSimpleVarNode$1(iNode, iNextNode)) {
+ continue;
+ } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`)
- if (iNode.value === "\\") {
- continue;
- } // Ignore `$$` (i.e. `background-color: $$(style)Color;`)
+ if (isHashNode$1(iNode) || isLeftCurlyBraceNode$1(iNode) || isRightCurlyBraceNode$1(iNextNode) || isLeftCurlyBraceNode$1(iNextNode) && hasEmptyRawBefore$1(iNextNode) || isRightCurlyBraceNode$1(iNode) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`)
- if (isPostcssSimpleVarNode(iNode, iNextNode)) {
- continue;
- } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`)
+ if (iNode.value === "--" && isHashNode$1(iNextNode)) {
+ continue;
+ } // Formatting math operations
- if (isHashNode(iNode) || isLeftCurlyBraceNode(iNode) || isRightCurlyBraceNode(iNextNode) || isLeftCurlyBraceNode(iNextNode) && hasEmptyRawBefore(iNextNode) || isRightCurlyBraceNode(iNode) && hasEmptyRawBefore(iNextNode)) {
- continue;
- } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`)
+ var isMathOperator = isMathOperatorNode$1(iNode);
+ var isNextMathOperator = isMathOperatorNode$1(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is
+ // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`)
+ // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`)
- if (iNode.value === "--" && isHashNode(iNextNode)) {
- continue;
- } // Formatting math operations
+ if ((isMathOperator && isHashNode$1(iNextNode) || isNextMathOperator && isRightCurlyBraceNode$1(iNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces before and after addition and subtraction math operators as is in `calc` function
+ // due to the fact that it is not valid syntax
+ // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`)
- var isMathOperator = isMathOperatorNode(iNode);
- var isNextMathOperator = isMathOperatorNode(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is
- // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`)
- // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`)
+ if (insideValueFunctionNode$1(path, "calc") && (isAdditionNode$1(iNode) || isAdditionNode$1(iNextNode) || isSubtractionNode$1(iNode) || isSubtractionNode$1(iNextNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`)
+ // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is.
- if ((isMathOperator && isHashNode(iNextNode) || isNextMathOperator && isRightCurlyBraceNode(iNode)) && hasEmptyRawBefore(iNextNode)) {
- continue;
- } // Print spaces before and after addition and subtraction math operators as is in `calc` function
- // due to the fact that it is not valid syntax
- // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`)
+ var isColorAdjusterNode = (isAdditionNode$1(iNode) || isSubtractionNode$1(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode$1(parentParentNode) && !hasEmptyRawBefore$1(iNextNode);
+ var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode$1(iNextNextNode) || iNode.type === "value-func" || isWordNode$1(iNode);
+ var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode$1(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode$1(iPrevNode); // Formatting `/`, `+`, `-` sign
- if (insideValueFunctionNode(path, "calc") && (isAdditionNode(iNode) || isAdditionNode(iNextNode) || isSubtractionNode(iNode) || isSubtractionNode(iNextNode)) && hasEmptyRawBefore(iNextNode)) {
- continue;
- } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`)
- // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is.
+ if (!(isMultiplicationNode$1(iNextNode) || isMultiplicationNode$1(iNode)) && !insideValueFunctionNode$1(path, "calc") && !isColorAdjusterNode && (isDivisionNode$1(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode$1(iNode) && !requireSpaceAfterOperator || isAdditionNode$1(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode$1(iNode) && !requireSpaceAfterOperator || isSubtractionNode$1(iNextNode) || isSubtractionNode$1(iNode)) && (hasEmptyRawBefore$1(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode$1(iPrevNode)))) {
+ continue;
+ } // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`)
- var isColorAdjusterNode = (isAdditionNode(iNode) || isSubtractionNode(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode(parentParentNode) && !hasEmptyRawBefore(iNextNode);
- var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode(iNextNextNode) || iNode.type === "value-func" || isWordNode(iNode);
- var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode(iPrevNode); // Formatting `/`, `+`, `-` sign
+ if (isInlineValueCommentNode$1(iNode)) {
+ _parts.push(hardline$4);
- if (!(isMultiplicationNode(iNextNode) || isMultiplicationNode(iNode)) && !insideValueFunctionNode(path, "calc") && !isColorAdjusterNode && (isDivisionNode(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode(iNode) && !requireSpaceAfterOperator || isAdditionNode(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode(iNode) && !requireSpaceAfterOperator || isSubtractionNode(iNextNode) || isSubtractionNode(iNode)) && (hasEmptyRawBefore(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode(iPrevNode)))) {
- continue;
- } // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`)
+ continue;
+ } // Handle keywords in SCSS control directive
- if (isInlineValueCommentNode(iNode)) {
- _parts.push(hardline$3);
+ if (isControlDirective && (isEqualityOperatorNode$1(iNextNode) || isRelationalOperatorNode$1(iNextNode) || isIfElseKeywordNode$1(iNextNode) || isEachKeywordNode$1(iNode) || isForKeywordNode$1(iNode))) {
+ _parts.push(" ");
- continue;
- } // Handle keywords in SCSS control directive
+ continue;
+ } // At-rule `namespace` should be in one line
- if (isControlDirective && (isEqualityOperatorNode(iNextNode) || isRelationalOperatorNode(iNextNode) || isIfElseKeywordNode(iNextNode) || isEachKeywordNode(iNode) || isForKeywordNode(iNode))) {
- _parts.push(" ");
+ if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") {
+ _parts.push(" ");
- continue;
- } // At-rule `namespace` should be in one line
+ continue;
+ } // Formatting `grid` property
- if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") {
- _parts.push(" ");
+ if (isGridValue) {
+ if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) {
+ _parts.push(hardline$4);
- continue;
- } // Formatting `grid` property
+ didBreak = true;
+ } else {
+ _parts.push(" ");
+ }
+ continue;
+ } // Add `space` before next math operation
+ // Note: `grip` property have `/` delimiter and it is not math operation, so
+ // `grid` property handles above
- if (isGridValue) {
- if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) {
- _parts.push(hardline$3);
- didBreak = true;
- } else {
+ if (isNextMathOperator) {
_parts.push(" ");
- }
- continue;
- } // Add `space` before next math operation
- // Note: `grip` property have `/` delimiter and it is not math operation, so
- // `grid` property handles above
+ continue;
+ } // Be default all values go through `line`
- if (isNextMathOperator) {
- _parts.push(" ");
+ _parts.push(line$1);
+ }
- continue;
- } // Be default all values go through `line`
+ if (didBreak) {
+ _parts.unshift(hardline$4);
+ }
+ if (isControlDirective) {
+ return group$1(indent$2(concat$5(_parts)));
+ } // Indent is not needed for import url when url is very long
+ // and node has two groups
+ // when type is value-comma_group
+ // example @import url("verylongurl") projection,tv
- _parts.push(line$3);
- }
- if (didBreak) {
- _parts.unshift(hardline$3);
+ if (insideURLFunctionInImportAtRuleNode$1(path)) {
+ return group$1(fill$2(_parts));
+ }
+
+ return group$1(indent$2(fill$2(_parts)));
}
- if (isControlDirective) {
- return group$1(indent$2(concat$4(_parts)));
- } // Indent is not needed for import url when url is very long
- // and node has two groups
- // when type is value-comma_group
- // example @import url("verylongurl") projection,tv
+ case "value-paren_group":
+ {
+ var _parentNode5 = path.getParentNode();
+ if (_parentNode5 && isURLFunctionNode$1(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
+ return concat$5([node.open ? path.call(print, "open") : "", join$2(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]);
+ }
- if (insideURLFunctionInImportAtRuleNode(path)) {
- return group$1(fill$2(_parts));
- }
+ if (!node.open) {
+ var _printed = path.map(print, "groups");
- return group$1(indent$2(fill$2(_parts)));
- }
+ var res = [];
- case "value-paren_group":
- {
- var _parentNode5 = path.getParentNode();
+ for (var _i = 0; _i < _printed.length; _i++) {
+ if (_i !== 0) {
+ res.push(concat$5([",", line$1]));
+ }
- if (_parentNode5 && isURLFunctionNode(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
- return concat$4([node.open ? path.call(print, "open") : "", join$2(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]);
- }
+ res.push(_printed[_i]);
+ }
- if (!node.open) {
- var _printed = path.map(print, "groups");
+ return group$1(indent$2(fill$2(res)));
+ }
- var res = [];
+ var isSCSSMapItem = isSCSSMapItemNode$1(path);
+ return group$1(concat$5([node.open ? path.call(print, "open") : "", indent$2(concat$5([softline$1, join$2(concat$5([",", line$1]), path.map(function (childPath) {
+ var node = childPath.getValue();
+ var printed = print(childPath); // Key/Value pair in open paren already indented
- for (var _i = 0; _i < _printed.length; _i++) {
- if (_i !== 0) {
- res.push(concat$4([",", line$3]));
+ if (isKeyValuePairNode$1(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") {
+ printed.contents.contents.parts[1] = group$1(printed.contents.contents.parts[1]);
+ return group$1(dedent$1(printed));
}
- res.push(_printed[_i]);
- }
+ return printed;
+ }, "groups"))])), ifBreak$1(isSCSS$1(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma(options) ? "," : ""), softline$1, node.close ? path.call(print, "close") : ""]), {
+ shouldBreak: isSCSSMapItem
+ });
+ }
- return group$1(indent$2(fill$2(res)));
+ case "value-func":
+ {
+ return concat$5([node.value, insideAtRuleNode$1(path, "supports") && isMediaAndSupportsKeywords$1(node) ? " " : "", path.call(print, "group")]);
}
- var isSCSSMapItem = isSCSSMapItemNode(path);
- return group$1(concat$4([node.open ? path.call(print, "open") : "", indent$2(concat$4([softline$1, join$2(concat$4([",", line$3]), path.map(function (childPath) {
- var node = childPath.getValue();
- var printed = print(childPath); // Key/Value pair in open paren already indented
+ case "value-paren":
+ {
+ return node.value;
+ }
+
+ case "value-number":
+ {
+ return concat$5([printCssNumber(node.value), maybeToLowerCase$1(node.unit)]);
+ }
+
+ case "value-operator":
+ {
+ return node.value;
+ }
- if (isKeyValuePairNode(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") {
- printed.contents.contents.parts[1] = group$1(printed.contents.contents.parts[1]);
- return group$1(dedent$2(printed));
+ case "value-word":
+ {
+ if (node.isColor && node.isHex || isWideKeywords$1(node.value)) {
+ return node.value.toLowerCase();
}
- return printed;
- }, "groups"))])), ifBreak$1(isSCSS(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma(options) ? "," : ""), softline$1, node.close ? path.call(print, "close") : ""]), {
- shouldBreak: isSCSSMapItem
- });
- }
+ return node.value;
+ }
- case "value-func":
- {
- return concat$4([node.value, insideAtRuleNode(path, "supports") && isMediaAndSupportsKeywords(node) ? " " : "", path.call(print, "group")]);
- }
+ case "value-colon":
+ {
+ return concat$5([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`)
+ insideValueFunctionNode$1(path, "url") ? "" : line$1]);
+ }
- case "value-paren":
- {
- return node.value;
- }
+ case "value-comma":
+ {
+ return concat$5([node.value, " "]);
+ }
- case "value-number":
- {
- return concat$4([printCssNumber(node.value), maybeToLowerCase(node.unit)]);
- }
+ case "value-string":
+ {
+ return printString$1(node.raws.quote + node.value + node.raws.quote, options);
+ }
- case "value-operator":
- {
- return node.value;
- }
+ case "value-atword":
+ {
+ return concat$5(["@", node.value]);
+ }
- case "value-word":
- {
- if (node.isColor && node.isHex || isWideKeywords(node.value)) {
- return node.value.toLowerCase();
+ case "value-unicode-range":
+ {
+ return node.value;
}
- return node.value;
- }
+ case "value-unknown":
+ {
+ return node.value;
+ }
- case "value-colon":
- {
- return concat$4([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`)
- insideValueFunctionNode(path, "url") ? "" : line$3]);
- }
+ default:
+ /* istanbul ignore next */
+ throw new Error("Unknown postcss type ".concat(JSON.stringify(node.type)));
+ }
+ }
- case "value-comma":
- {
- return concat$4([node.value, " "]);
- }
+ function printNodeSequence(path, options, print) {
+ var node = path.getValue();
+ var parts = [];
+ var i = 0;
+ path.map(function (pathChild) {
+ var prevNode = node.nodes[i - 1];
- case "value-string":
- {
- return printString$1(node.raws.quote + node.value + node.raws.quote, options);
+ if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") {
+ var childNode = pathChild.getValue();
+ parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode)));
+ } else {
+ parts.push(pathChild.call(print));
}
- case "value-atword":
- {
- return concat$4(["@", node.value]);
- }
+ if (i !== node.nodes.length - 1) {
+ if (node.nodes[i + 1].type === "css-comment" && !hasNewline$2(options.originalText, options.locStart(node.nodes[i + 1]), {
+ backwards: true
+ }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") {
+ parts.push(" ");
+ } else {
+ parts.push(hardline$4);
- case "value-unicode-range":
- {
- return node.value;
+ if (isNextLineEmpty$2(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") {
+ parts.push(hardline$4);
+ }
+ }
}
- case "value-unknown":
- {
- return node.value;
- }
+ i++;
+ }, "nodes");
+ return concat$5(parts);
+ }
- default:
- /* istanbul ignore next */
- throw new Error("Unknown postcss type ".concat(JSON.stringify(node.type)));
+ var STRING_REGEX$1 = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;
+ var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;
+ var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g;
+ var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g;
+ var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX$1.source + "|" + "(".concat(WORD_PART_REGEX.source, ")?") + "(".concat(NUMBER_REGEX.source, ")") + "(".concat(STANDARD_UNIT_REGEX.source, ")?"), "g");
+
+ function adjustStrings(value, options) {
+ return value.replace(STRING_REGEX$1, function (match) {
+ return printString$1(match, options);
+ });
}
-}
-function printNodeSequence(path, options, print) {
- var node = path.getValue();
- var parts = [];
- var i = 0;
- path.map(function (pathChild) {
- var prevNode = node.nodes[i - 1];
+ function quoteAttributeValue(value, options) {
+ var quote = options.singleQuote ? "'" : '"';
+ return value.includes('"') || value.includes("'") ? value : quote + value + quote;
+ }
- if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") {
- var childNode = pathChild.getValue();
- parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode)));
- } else {
- parts.push(pathChild.call(print));
+ function adjustNumbers(value) {
+ return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) {
+ return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase$1(unit || "") : match;
+ });
+ }
+
+ function printCssNumber(rawNumber) {
+ return printNumber$1(rawNumber) // Remove trailing `.0`.
+ .replace(/\.0(?=$|e)/, "");
+ }
+
+ var printerPostcss = {
+ print: genericPrint,
+ embed: embed_1,
+ insertPragma: insertPragma$2,
+ hasPrettierIgnore: hasIgnoreComment$1,
+ massageAstNode: clean_1
+ };
+
+ var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+
+ var commonOptions = {
+ bracketSpacing: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: true,
+ description: "Print spaces between brackets.",
+ oppositeDescription: "Do not print spaces between brackets."
+ },
+ singleQuote: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes instead of double quotes."
+ },
+ proseWrap: {
+ since: "1.8.2",
+ category: CATEGORY_COMMON,
+ type: "choice",
+ default: [{
+ since: "1.8.2",
+ value: true
+ }, {
+ since: "1.9.0",
+ value: "preserve"
+ }],
+ description: "How to wrap prose.",
+ choices: [{
+ since: "1.9.0",
+ value: "always",
+ description: "Wrap prose if it exceeds the print width."
+ }, {
+ since: "1.9.0",
+ value: "never",
+ description: "Do not wrap prose."
+ }, {
+ since: "1.9.0",
+ value: "preserve",
+ description: "Wrap prose as-is."
+ }, {
+ value: false,
+ deprecated: "1.9.0",
+ redirect: "never"
+ }, {
+ value: true,
+ deprecated: "1.9.0",
+ redirect: "always"
+ }]
}
+ };
- if (i !== node.nodes.length - 1) {
- if (node.nodes[i + 1].type === "css-comment" && !hasNewline$2(options.originalText, options.locStart(node.nodes[i + 1]), {
- backwards: true
- }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") {
- parts.push(" ");
- } else {
- parts.push(hardline$3);
+ var options$2 = {
+ singleQuote: commonOptions.singleQuote
+ };
- if (isNextLineEmpty$2(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") {
- parts.push(hardline$3);
- }
- }
+ var createLanguage = function createLanguage(linguistData, transform) {
+ var language = {};
+
+ for (var key in linguistData) {
+ var newKey = key === "languageId" ? "linguistLanguageId" : key;
+ language[newKey] = linguistData[key];
}
- i++;
- }, "nodes");
- return concat$4(parts);
-}
+ return transform(language);
+ };
-var STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;
-var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;
-var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g;
-var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g;
-var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX.source + "|" + "(".concat(WORD_PART_REGEX.source, ")?") + "(".concat(NUMBER_REGEX.source, ")") + "(".concat(STANDARD_UNIT_REGEX.source, ")?"), "g");
+ var name$1 = "CSS";
+ var type = "markup";
+ var tmScope = "source.css";
+ var aceMode = "css";
+ var codemirrorMode = "css";
+ var codemirrorMimeType = "text/css";
+ var color = "#563d7c";
+ var extensions = [
+ ".css"
+ ];
+ var languageId = 50;
+ var CSS = {
+ name: name$1,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ extensions: extensions,
+ languageId: languageId
+ };
-function adjustStrings(value, options) {
- return value.replace(STRING_REGEX, function (match) {
- return printString$1(match, options);
+ var CSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$1,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ extensions: extensions,
+ languageId: languageId,
+ 'default': CSS
});
-}
-function quoteAttributeValue(value, options) {
- var quote = options.singleQuote ? "'" : '"';
- return value.includes('"') || value.includes("'") ? value : quote + value + quote;
-}
+ var name$2 = "PostCSS";
+ var type$1 = "markup";
+ var tmScope$1 = "source.postcss";
+ var group$2 = "CSS";
+ var extensions$1 = [
+ ".pcss"
+ ];
+ var aceMode$1 = "text";
+ var languageId$1 = 262764437;
+ var PostCSS = {
+ name: name$2,
+ type: type$1,
+ tmScope: tmScope$1,
+ group: group$2,
+ extensions: extensions$1,
+ aceMode: aceMode$1,
+ languageId: languageId$1
+ };
-function adjustNumbers(value) {
- return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) {
- return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase(unit || "") : match;
+ var PostCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$2,
+ type: type$1,
+ tmScope: tmScope$1,
+ group: group$2,
+ extensions: extensions$1,
+ aceMode: aceMode$1,
+ languageId: languageId$1,
+ 'default': PostCSS
});
-}
-
-function printCssNumber(rawNumber) {
- return printNumber$1(rawNumber) // Remove trailing `.0`.
- .replace(/\.0(?=$|e)/, "");
-}
-
-var printerPostcss = {
- print: genericPrint,
- embed: embed_1,
- insertPragma: insertPragma,
- hasPrettierIgnore: hasIgnoreComment$1,
- massageAstNode: clean_1
-};
-
-var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
-
-var commonOptions = {
- bracketSpacing: {
- since: "0.0.0",
- category: CATEGORY_COMMON,
- type: "boolean",
- default: true,
- description: "Print spaces between brackets.",
- oppositeDescription: "Do not print spaces between brackets."
- },
- singleQuote: {
- since: "0.0.0",
- category: CATEGORY_COMMON,
- type: "boolean",
- default: false,
- description: "Use single quotes instead of double quotes."
- },
- proseWrap: {
- since: "1.8.2",
- category: CATEGORY_COMMON,
- type: "choice",
- default: [{
- since: "1.8.2",
- value: true
- }, {
- since: "1.9.0",
- value: "preserve"
- }],
- description: "How to wrap prose.",
- choices: [{
- since: "1.9.0",
- value: "always",
- description: "Wrap prose if it exceeds the print width."
- }, {
- since: "1.9.0",
- value: "never",
- description: "Do not wrap prose."
- }, {
- since: "1.9.0",
- value: "preserve",
- description: "Wrap prose as-is."
- }, {
- value: false,
- deprecated: "1.9.0",
- redirect: "never"
- }, {
- value: true,
- deprecated: "1.9.0",
- redirect: "always"
- }]
- }
-};
-
-var options$3 = {
- singleQuote: commonOptions.singleQuote
-};
-
-var createLanguage = function createLanguage(linguistData, _ref) {
- var extend = _ref.extend,
- override = _ref.override;
- var language = {};
-
- for (var key in linguistData) {
- var newKey = key === "languageId" ? "linguistLanguageId" : key;
- language[newKey] = linguistData[key];
- }
-
- if (extend) {
- for (var _key in extend) {
- language[_key] = (language[_key] || []).concat(extend[_key]);
- }
- }
-
- for (var _key2 in override) {
- language[_key2] = override[_key2];
- }
-
- return language;
-};
-
-var name$1 = "CSS";
-var type = "markup";
-var tmScope = "source.css";
-var aceMode = "css";
-var codemirrorMode = "css";
-var codemirrorMimeType = "text/css";
-var color = "#563d7c";
-var extensions = [".css"];
-var languageId = 50;
-var css$2 = {
- name: name$1,
- type: type,
- tmScope: tmScope,
- aceMode: aceMode,
- codemirrorMode: codemirrorMode,
- codemirrorMimeType: codemirrorMimeType,
- color: color,
- extensions: extensions,
- languageId: languageId
-};
-
-var css$3 = Object.freeze({
- name: name$1,
- type: type,
- tmScope: tmScope,
- aceMode: aceMode,
- codemirrorMode: codemirrorMode,
- codemirrorMimeType: codemirrorMimeType,
- color: color,
- extensions: extensions,
- languageId: languageId,
- default: css$2
-});
-
-var name$2 = "PostCSS";
-var type$1 = "markup";
-var tmScope$1 = "source.postcss";
-var group$2 = "CSS";
-var extensions$1 = [".pcss"];
-var aceMode$1 = "text";
-var languageId$1 = 262764437;
-var postcss = {
- name: name$2,
- type: type$1,
- tmScope: tmScope$1,
- group: group$2,
- extensions: extensions$1,
- aceMode: aceMode$1,
- languageId: languageId$1
-};
-
-var postcss$1 = Object.freeze({
- name: name$2,
- type: type$1,
- tmScope: tmScope$1,
- group: group$2,
- extensions: extensions$1,
- aceMode: aceMode$1,
- languageId: languageId$1,
- default: postcss
-});
-
-var name$3 = "Less";
-var type$2 = "markup";
-var group$3 = "CSS";
-var extensions$2 = [".less"];
-var tmScope$2 = "source.css.less";
-var aceMode$2 = "less";
-var codemirrorMode$1 = "css";
-var codemirrorMimeType$1 = "text/css";
-var languageId$2 = 198;
-var less = {
- name: name$3,
- type: type$2,
- group: group$3,
- extensions: extensions$2,
- tmScope: tmScope$2,
- aceMode: aceMode$2,
- codemirrorMode: codemirrorMode$1,
- codemirrorMimeType: codemirrorMimeType$1,
- languageId: languageId$2
-};
-
-var less$1 = Object.freeze({
- name: name$3,
- type: type$2,
- group: group$3,
- extensions: extensions$2,
- tmScope: tmScope$2,
- aceMode: aceMode$2,
- codemirrorMode: codemirrorMode$1,
- codemirrorMimeType: codemirrorMimeType$1,
- languageId: languageId$2,
- default: less
-});
-
-var name$4 = "SCSS";
-var type$3 = "markup";
-var tmScope$3 = "source.scss";
-var group$4 = "CSS";
-var aceMode$3 = "scss";
-var codemirrorMode$2 = "css";
-var codemirrorMimeType$2 = "text/x-scss";
-var extensions$3 = [".scss"];
-var languageId$3 = 329;
-var scss = {
- name: name$4,
- type: type$3,
- tmScope: tmScope$3,
- group: group$4,
- aceMode: aceMode$3,
- codemirrorMode: codemirrorMode$2,
- codemirrorMimeType: codemirrorMimeType$2,
- extensions: extensions$3,
- languageId: languageId$3
-};
-
-var scss$1 = Object.freeze({
- name: name$4,
- type: type$3,
- tmScope: tmScope$3,
- group: group$4,
- aceMode: aceMode$3,
- codemirrorMode: codemirrorMode$2,
- codemirrorMimeType: codemirrorMimeType$2,
- extensions: extensions$3,
- languageId: languageId$3,
- default: scss
-});
-
-var require$$0$17 = ( css$3 && css$2 ) || css$3;
-
-var require$$1$8 = ( postcss$1 && postcss ) || postcss$1;
-
-var require$$2$9 = ( less$1 && less ) || less$1;
-
-var require$$3$4 = ( scss$1 && scss ) || scss$1;
-
-var languages = [createLanguage(require$$0$17, {
- override: {
- since: "1.4.0",
- parsers: ["css"],
- vscodeLanguageIds: ["css"]
- }
-}), createLanguage(require$$1$8, {
- override: {
- since: "1.4.0",
- parsers: ["css"],
- vscodeLanguageIds: ["postcss"]
- },
- extend: {
- extensions: [".postcss"]
- }
-}), createLanguage(require$$2$9, {
- override: {
- since: "1.4.0",
- parsers: ["less"],
- vscodeLanguageIds: ["less"]
- }
-}), createLanguage(require$$3$4, {
- override: {
- since: "1.4.0",
- parsers: ["scss"],
- vscodeLanguageIds: ["scss"]
- }
-})];
-var printers = {
- postcss: printerPostcss
-};
-var languageCss = {
- languages: languages,
- options: options$3,
- printers: printers
-};
-
-function hasPragma$2(text) {
- return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text);
-}
-
-function insertPragma$4(text) {
- return "# @format\n\n" + text;
-}
-
-var pragma$4 = {
- hasPragma: hasPragma$2,
- insertPragma: insertPragma$4
-};
-
-var _require$$0$builders$2 = doc.builders;
-var concat$6 = _require$$0$builders$2.concat;
-var join$3 = _require$$0$builders$2.join;
-var hardline$5 = _require$$0$builders$2.hardline;
-var line$4 = _require$$0$builders$2.line;
-var softline$2 = _require$$0$builders$2.softline;
-var group$5 = _require$$0$builders$2.group;
-var indent$3 = _require$$0$builders$2.indent;
-var ifBreak$2 = _require$$0$builders$2.ifBreak;
-var hasIgnoreComment$2 = util.hasIgnoreComment;
-var isNextLineEmpty$3 = utilShared.isNextLineEmpty;
-var insertPragma$3 = pragma$4.insertPragma;
-
-function genericPrint$1(path, options, print) {
- var n = path.getValue();
-
- if (!n) {
- return "";
+
+ var name$3 = "Less";
+ var type$2 = "markup";
+ var group$3 = "CSS";
+ var extensions$2 = [
+ ".less"
+ ];
+ var tmScope$2 = "source.css.less";
+ var aceMode$2 = "less";
+ var codemirrorMode$1 = "css";
+ var codemirrorMimeType$1 = "text/css";
+ var languageId$2 = 198;
+ var Less = {
+ name: name$3,
+ type: type$2,
+ group: group$3,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$2
+ };
+
+ var Less$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$3,
+ type: type$2,
+ group: group$3,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$2,
+ 'default': Less
+ });
+
+ var name$4 = "SCSS";
+ var type$3 = "markup";
+ var tmScope$3 = "source.css.scss";
+ var group$4 = "CSS";
+ var aceMode$3 = "scss";
+ var codemirrorMode$2 = "css";
+ var codemirrorMimeType$2 = "text/x-scss";
+ var extensions$3 = [
+ ".scss"
+ ];
+ var languageId$3 = 329;
+ var SCSS = {
+ name: name$4,
+ type: type$3,
+ tmScope: tmScope$3,
+ group: group$4,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ extensions: extensions$3,
+ languageId: languageId$3
+ };
+
+ var SCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$4,
+ type: type$3,
+ tmScope: tmScope$3,
+ group: group$4,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ extensions: extensions$3,
+ languageId: languageId$3,
+ 'default': SCSS
+ });
+
+ var require$$0$2 = getCjsExportFromNamespace(CSS$1);
+
+ var require$$1 = getCjsExportFromNamespace(PostCSS$1);
+
+ var require$$2 = getCjsExportFromNamespace(Less$1);
+
+ var require$$3 = getCjsExportFromNamespace(SCSS$1);
+
+ var languages = [createLanguage(require$$0$2, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["css"]
+ });
+ }), createLanguage(require$$1, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["postcss"],
+ extensions: data.extensions.concat(".postcss")
+ });
+ }), createLanguage(require$$2, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["less"],
+ vscodeLanguageIds: ["less"]
+ });
+ }), createLanguage(require$$3, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["scss"],
+ vscodeLanguageIds: ["scss"]
+ });
+ })];
+ var printers = {
+ postcss: printerPostcss
+ };
+ var languageCss = {
+ languages: languages,
+ options: options$2,
+ printers: printers
+ };
+
+ function hasPragma$2(text) {
+ return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text);
}
- if (typeof n === "string") {
- return n;
+ function insertPragma$3(text) {
+ return "# @format\n\n" + text;
}
- switch (n.kind) {
- case "Document":
- {
- var parts = [];
- path.map(function (pathChild, index) {
- parts.push(concat$6([pathChild.call(print)]));
+ var pragma$2 = {
+ hasPragma: hasPragma$2,
+ insertPragma: insertPragma$3
+ };
- if (index !== n.definitions.length - 1) {
- parts.push(hardline$5);
+ var _require$$0$builders$2 = doc.builders,
+ concat$6 = _require$$0$builders$2.concat,
+ join$3 = _require$$0$builders$2.join,
+ hardline$5 = _require$$0$builders$2.hardline,
+ line$2 = _require$$0$builders$2.line,
+ softline$2 = _require$$0$builders$2.softline,
+ group$5 = _require$$0$builders$2.group,
+ indent$3 = _require$$0$builders$2.indent,
+ ifBreak$2 = _require$$0$builders$2.ifBreak;
+ var hasIgnoreComment$2 = util.hasIgnoreComment;
+ var isNextLineEmpty$3 = utilShared.isNextLineEmpty;
+ var insertPragma$4 = pragma$2.insertPragma;
+
+ function genericPrint$1(path, options, print) {
+ var n = path.getValue();
+
+ if (!n) {
+ return "";
+ }
- if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options)) {
+ if (typeof n === "string") {
+ return n;
+ }
+
+ switch (n.kind) {
+ case "Document":
+ {
+ var parts = [];
+ path.map(function (pathChild, index) {
+ parts.push(concat$6([pathChild.call(print)]));
+
+ if (index !== n.definitions.length - 1) {
parts.push(hardline$5);
+
+ if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options)) {
+ parts.push(hardline$5);
+ }
}
+ }, "definitions");
+ return concat$6([concat$6(parts), hardline$5]);
+ }
+
+ case "OperationDefinition":
+ {
+ var hasOperation = options.originalText[options.locStart(n)] !== "{";
+ var hasName = !!n.name;
+ return concat$6([hasOperation ? n.operation : "", hasOperation && hasName ? concat$6([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]);
+ }
+
+ case "FragmentDefinition":
+ {
+ return concat$6(["fragment ", path.call(print, "name"), n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
+
+ case "SelectionSet":
+ {
+ return concat$6(["{", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (selectionsPath) {
+ return printSequence(selectionsPath, options, print);
+ }, "selections"))])), hardline$5, "}"]);
+ }
+
+ case "Field":
+ {
+ return group$5(concat$6([n.alias ? concat$6([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
+ return printSequence(argsPath, options, print);
+ }, "arguments"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")]));
+ }
+
+ case "Name":
+ {
+ return n.value;
+ }
+
+ case "StringValue":
+ {
+ if (n.block) {
+ return concat$6(['"""', hardline$5, join$3(hardline$5, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$5, '"""']);
}
- }, "definitions");
- return concat$6([concat$6(parts), hardline$5]);
- }
- case "OperationDefinition":
- {
- var hasOperation = options.originalText[options.locStart(n)] !== "{";
- var hasName = !!n.name;
- return concat$6([hasOperation ? n.operation : "", hasOperation && hasName ? concat$6([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]);
- }
+ return concat$6(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']);
+ }
- case "FragmentDefinition":
- {
- return concat$6(["fragment ", path.call(print, "name"), n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
- }
+ case "IntValue":
+ case "FloatValue":
+ case "EnumValue":
+ {
+ return n.value;
+ }
- case "SelectionSet":
- {
- return concat$6(["{", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (selectionsPath) {
- return printSequence(selectionsPath, options, print);
- }, "selections"))])), hardline$5, "}"]);
- }
+ case "BooleanValue":
+ {
+ return n.value ? "true" : "false";
+ }
- case "Field":
- {
- return group$5(concat$6([n.alias ? concat$6([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
- return printSequence(argsPath, options, print);
- }, "arguments"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")]));
- }
+ case "NullValue":
+ {
+ return "null";
+ }
- case "Name":
- {
- return n.value;
- }
+ case "Variable":
+ {
+ return concat$6(["$", path.call(print, "name")]);
+ }
- case "StringValue":
- {
- if (n.block) {
- return concat$6(['"""', hardline$5, join$3(hardline$5, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$5, '"""']);
+ case "ListValue":
+ {
+ return group$5(concat$6(["[", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "values"))])), softline$2, "]"]));
}
- return concat$6(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']);
- }
+ case "ObjectValue":
+ {
+ return group$5(concat$6(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "fields"))])), softline$2, ifBreak$2("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"]));
+ }
- case "IntValue":
- case "FloatValue":
- case "EnumValue":
- {
- return n.value;
- }
+ case "ObjectField":
+ case "Argument":
+ {
+ return concat$6([path.call(print, "name"), ": ", path.call(print, "value")]);
+ }
- case "BooleanValue":
- {
- return n.value ? "true" : "false";
- }
+ case "Directive":
+ {
+ return concat$6(["@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
+ return printSequence(argsPath, options, print);
+ }, "arguments"))])), softline$2, ")"])) : ""]);
+ }
- case "NullValue":
- {
- return "null";
- }
+ case "NamedType":
+ {
+ return path.call(print, "name");
+ }
- case "Variable":
- {
- return concat$6(["$", path.call(print, "name")]);
- }
+ case "VariableDefinition":
+ {
+ return concat$6([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
- case "ListValue":
- {
- return group$5(concat$6(["[", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "values"))])), softline$2, "]"]));
- }
+ case "TypeExtensionDefinition":
+ {
+ return concat$6(["extend ", path.call(print, "definition")]);
+ }
- case "ObjectValue":
- {
- return group$5(concat$6(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "fields"))])), softline$2, ifBreak$2("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"]));
- }
+ case "ObjectTypeExtension":
+ case "ObjectTypeDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$6([" implements ", join$3(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path.map(print, "interfaces"))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
+ return printSequence(fieldsPath, options, print);
+ }, "fields"))])), hardline$5, "}"]) : ""]);
+ }
- case "ObjectField":
- case "Argument":
- {
- return concat$6([path.call(print, "name"), ": ", path.call(print, "value")]);
- }
+ case "FieldDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
+ return printSequence(argsPath, options, print);
+ }, "arguments"))])), softline$2, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]);
+ }
- case "Directive":
- {
- return concat$6(["@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
- return printSequence(argsPath, options, print);
- }, "arguments"))])), softline$2, ")"])) : ""]);
- }
+ case "DirectiveDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
+ return printSequence(argsPath, options, print);
+ }, "arguments"))])), softline$2, ")"])) : "", concat$6([" on ", join$3(" | ", path.map(print, "locations"))])]);
+ }
- case "NamedType":
- {
- return path.call(print, "name");
- }
+ case "EnumTypeExtension":
+ case "EnumTypeDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (valuesPath) {
+ return printSequence(valuesPath, options, print);
+ }, "values"))])), hardline$5, "}"]) : ""]);
+ }
- case "VariableDefinition":
- {
- return concat$6([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
- }
+ case "EnumValueDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
- case "TypeExtensionDefinition":
- {
- return concat$6(["extend ", path.call(print, "definition")]);
- }
+ case "InputValueDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? n.description.block ? hardline$5 : line$2 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
- case "ObjectTypeExtension":
- case "ObjectTypeDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$6([" implements ", join$3(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path.map(print, "interfaces"))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
- return printSequence(fieldsPath, options, print);
- }, "fields"))])), hardline$5, "}"]) : ""]);
- }
+ case "InputObjectTypeExtension":
+ case "InputObjectTypeDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
+ return printSequence(fieldsPath, options, print);
+ }, "fields"))])), hardline$5, "}"]) : ""]);
+ }
- case "FieldDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
- return printSequence(argsPath, options, print);
- }, "arguments"))])), softline$2, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]);
- }
+ case "SchemaDefinition":
+ {
+ return concat$6(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (opsPath) {
+ return printSequence(opsPath, options, print);
+ }, "operationTypes"))])) : "", hardline$5, "}"]);
+ }
- case "DirectiveDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) {
- return printSequence(argsPath, options, print);
- }, "arguments"))])), softline$2, ")"])) : "", concat$6([" on ", join$3(" | ", path.map(print, "locations"))])]);
- }
+ case "OperationTypeDefinition":
+ {
+ return concat$6([path.call(print, "operation"), ": ", path.call(print, "type")]);
+ }
- case "EnumTypeExtension":
- case "EnumTypeDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (valuesPath) {
- return printSequence(valuesPath, options, print);
- }, "values"))])), hardline$5, "}"]) : ""]);
- }
+ case "InterfaceTypeExtension":
+ case "InterfaceTypeDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
+ return printSequence(fieldsPath, options, print);
+ }, "fields"))])), hardline$5, "}"]) : ""]);
+ }
- case "EnumValueDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), printDirectives(path, print, n)]);
- }
+ case "FragmentSpread":
+ {
+ return concat$6(["...", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
- case "InputValueDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? n.description.block ? hardline$5 : line$4 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
- }
+ case "InlineFragment":
+ {
+ return concat$6(["...", n.typeCondition ? concat$6([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
- case "InputObjectTypeExtension":
- case "InputObjectTypeDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
- return printSequence(fieldsPath, options, print);
- }, "fields"))])), hardline$5, "}"]) : ""]);
- }
+ case "UnionTypeExtension":
+ case "UnionTypeDefinition":
+ {
+ return group$5(concat$6([path.call(print, "description"), n.description ? hardline$5 : "", group$5(concat$6([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$6([" =", ifBreak$2("", " "), indent$3(concat$6([ifBreak$2(concat$6([line$2, " "])), join$3(concat$6([line$2, "| "]), path.map(print, "types"))]))]) : ""]))]));
+ }
- case "SchemaDefinition":
- {
- return concat$6(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (opsPath) {
- return printSequence(opsPath, options, print);
- }, "operationTypes"))])) : "", hardline$5, "}"]);
- }
+ case "ScalarTypeExtension":
+ case "ScalarTypeDefinition":
+ {
+ return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
- case "OperationTypeDefinition":
- {
- return concat$6([path.call(print, "operation"), ": ", path.call(print, "type")]);
- }
+ case "NonNullType":
+ {
+ return concat$6([path.call(print, "type"), "!"]);
+ }
- case "InterfaceTypeExtension":
- case "InterfaceTypeDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) {
- return printSequence(fieldsPath, options, print);
- }, "fields"))])), hardline$5, "}"]) : ""]);
- }
+ case "ListType":
+ {
+ return concat$6(["[", path.call(print, "type"), "]"]);
+ }
- case "FragmentSpread":
- {
- return concat$6(["...", path.call(print, "name"), printDirectives(path, print, n)]);
- }
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
+ }
+ }
- case "InlineFragment":
- {
- return concat$6(["...", n.typeCondition ? concat$6([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
- }
+ function printDirectives(path, print, n) {
+ if (n.directives.length === 0) {
+ return "";
+ }
- case "UnionTypeExtension":
- case "UnionTypeDefinition":
- {
- return group$5(concat$6([path.call(print, "description"), n.description ? hardline$5 : "", group$5(concat$6([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$6([" =", ifBreak$2("", " "), indent$3(concat$6([ifBreak$2(concat$6([line$4, " "])), join$3(concat$6([line$4, "| "]), path.map(print, "types"))]))]) : ""]))]));
- }
+ return concat$6([" ", group$5(indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", " "), softline$2]), path.map(print, "directives"))])))]);
+ }
- case "ScalarTypeExtension":
- case "ScalarTypeDefinition":
- {
- return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]);
- }
+ function printSequence(sequencePath, options, print) {
+ var count = sequencePath.getValue().length;
+ return sequencePath.map(function (path, i) {
+ var printed = print(path);
- case "NonNullType":
- {
- return concat$6([path.call(print, "type"), "!"]);
+ if (isNextLineEmpty$3(options.originalText, path.getValue(), options) && i < count - 1) {
+ return concat$6([printed, hardline$5]);
}
- case "ListType":
- {
- return concat$6(["[", path.call(print, "type"), "]"]);
- }
+ return printed;
+ });
+ }
- default:
- /* istanbul ignore next */
- throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
+ function canAttachComment(node) {
+ return node.kind && node.kind !== "Comment";
}
-}
-function printDirectives(path, print, n) {
- if (n.directives.length === 0) {
- return "";
+ function printComment$1(commentPath) {
+ var comment = commentPath.getValue();
+
+ if (comment.kind === "Comment") {
+ return "#" + comment.value.trimRight();
+ }
+
+ throw new Error("Not a comment: " + JSON.stringify(comment));
}
- return concat$6([" ", group$5(indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", " "), softline$2]), path.map(print, "directives"))])))]);
-}
+ function determineInterfaceSeparator(originalSource) {
+ var start = originalSource.indexOf("implements");
-function printSequence(sequencePath, options, print) {
- var count = sequencePath.getValue().length;
- return sequencePath.map(function (path, i) {
- var printed = print(path);
+ if (start === -1) {
+ throw new Error("Must implement interfaces: " + originalSource);
+ }
- if (isNextLineEmpty$3(options.originalText, path.getValue(), options) && i < count - 1) {
- return concat$6([printed, hardline$5]);
+ var end = originalSource.indexOf("{");
+
+ if (end === -1) {
+ end = originalSource.length;
}
- return printed;
- });
-}
-
-function canAttachComment(node) {
- return node.kind && node.kind !== "Comment";
-}
-
-function printComment$1(commentPath) {
- var comment = commentPath.getValue();
-
- if (comment.kind === "Comment") {
- return "#" + comment.value.trimRight();
- }
-
- throw new Error("Not a comment: " + JSON.stringify(comment));
-}
-
-function determineInterfaceSeparator(originalSource) {
- var start = originalSource.indexOf("implements");
-
- if (start === -1) {
- throw new Error("Must implement interfaces: " + originalSource);
- }
-
- var end = originalSource.indexOf("{");
-
- if (end === -1) {
- end = originalSource.length;
- }
-
- return originalSource.substr(start, end).includes("&") ? " & " : ", ";
-}
-
-function clean$2(node, newNode
-/*, parent*/
-) {
- delete newNode.loc;
- delete newNode.comments;
-}
-
-var printerGraphql = {
- print: genericPrint$1,
- massageAstNode: clean$2,
- hasPrettierIgnore: hasIgnoreComment$2,
- insertPragma: insertPragma$3,
- printComment: printComment$1,
- canAttachComment: canAttachComment
-};
-
-var options$6 = {
- bracketSpacing: commonOptions.bracketSpacing
-};
-
-var name$5 = "GraphQL";
-var type$4 = "data";
-var extensions$4 = [".graphql", ".gql"];
-var tmScope$4 = "source.graphql";
-var aceMode$4 = "text";
-var languageId$4 = 139;
-var graphql = {
- name: name$5,
- type: type$4,
- extensions: extensions$4,
- tmScope: tmScope$4,
- aceMode: aceMode$4,
- languageId: languageId$4
-};
-
-var graphql$1 = Object.freeze({
- name: name$5,
- type: type$4,
- extensions: extensions$4,
- tmScope: tmScope$4,
- aceMode: aceMode$4,
- languageId: languageId$4,
- default: graphql
-});
-
-var require$$0$18 = ( graphql$1 && graphql ) || graphql$1;
-
-var languages$1 = [createLanguage(require$$0$18, {
- override: {
- since: "1.5.0",
- parsers: ["graphql"],
- vscodeLanguageIds: ["graphql"]
- }
-})];
-var printers$1 = {
- graphql: printerGraphql
-};
-var languageGraphql = {
- languages: languages$1,
- options: options$6,
- printers: printers$1
-};
-
-var _require$$0$builders$3 = doc.builders;
-var concat$7 = _require$$0$builders$3.concat;
-var join$4 = _require$$0$builders$3.join;
-var softline$3 = _require$$0$builders$3.softline;
-var hardline$6 = _require$$0$builders$3.hardline;
-var line$5 = _require$$0$builders$3.line;
-var group$6 = _require$$0$builders$3.group;
-var indent$4 = _require$$0$builders$3.indent;
-var ifBreak$3 = _require$$0$builders$3.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements
-
-var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter:
-// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts
-
-function print(path, options, print) {
- var n = path.getValue();
- /* istanbul ignore if*/
-
- if (!n) {
- return "";
+ return originalSource.substr(start, end).includes("&") ? " & " : ", ";
}
- switch (n.type) {
- case "Program":
- {
- return group$6(join$4(softline$3, path.map(print, "body").filter(function (text) {
- return text !== "";
- })));
- }
+ function clean$1(node, newNode
+ /*, parent*/
+ ) {
+ delete newNode.loc;
+ delete newNode.comments;
+ }
- case "ElementNode":
- {
- var tagFirstChar = n.tag[0];
- var isLocal = n.tag.indexOf(".") !== -1;
- var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal;
- var hasChildren = n.children.length > 0;
- var isVoid = isGlimmerComponent && !hasChildren || voidTags.indexOf(n.tag) !== -1;
- var closeTagForNoBreak = isVoid ? concat$7([" />", softline$3]) : ">";
- var closeTagForBreak = isVoid ? "/>" : ">";
-
- var _getParams = function _getParams(path, print) {
- return indent$4(concat$7([n.attributes.length ? line$5 : "", join$4(line$5, path.map(print, "attributes")), n.modifiers.length ? line$5 : "", join$4(line$5, path.map(print, "modifiers")), n.comments.length ? line$5 : "", join$4(line$5, path.map(print, "comments"))]));
- };
+ var printerGraphql = {
+ print: genericPrint$1,
+ massageAstNode: clean$1,
+ hasPrettierIgnore: hasIgnoreComment$2,
+ insertPragma: insertPragma$4,
+ printComment: printComment$1,
+ canAttachComment: canAttachComment
+ };
+
+ var options$3 = {
+ bracketSpacing: commonOptions.bracketSpacing
+ };
+
+ var name$5 = "GraphQL";
+ var type$4 = "data";
+ var extensions$4 = [
+ ".graphql",
+ ".gql",
+ ".graphqls"
+ ];
+ var tmScope$4 = "source.graphql";
+ var aceMode$4 = "text";
+ var languageId$4 = 139;
+ var GraphQL = {
+ name: name$5,
+ type: type$4,
+ extensions: extensions$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ languageId: languageId$4
+ };
+
+ var GraphQL$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$5,
+ type: type$4,
+ extensions: extensions$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ languageId: languageId$4,
+ 'default': GraphQL
+ });
+
+ var require$$0$3 = getCjsExportFromNamespace(GraphQL$1);
+
+ var languages$1 = [createLanguage(require$$0$3, function (data) {
+ return Object.assign(data, {
+ since: "1.5.0",
+ parsers: ["graphql"],
+ vscodeLanguageIds: ["graphql"]
+ });
+ })];
+ var printers$1 = {
+ graphql: printerGraphql
+ };
+ var languageGraphql = {
+ languages: languages$1,
+ options: options$3,
+ printers: printers$1
+ };
+
+ var _require$$0$builders$3 = doc.builders,
+ concat$7 = _require$$0$builders$3.concat,
+ join$4 = _require$$0$builders$3.join,
+ softline$3 = _require$$0$builders$3.softline,
+ hardline$6 = _require$$0$builders$3.hardline,
+ line$3 = _require$$0$builders$3.line,
+ group$6 = _require$$0$builders$3.group,
+ indent$4 = _require$$0$builders$3.indent,
+ ifBreak$3 = _require$$0$builders$3.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements
- return concat$7([group$6(concat$7(["<", n.tag, _getParams(path, print), n.blockParams.length ? " as |".concat(n.blockParams.join(" "), "|") : "", ifBreak$3(softline$3, ""), ifBreak$3(closeTagForBreak, closeTagForNoBreak)])), group$6(concat$7([indent$4(join$4(softline$3, [""].concat(path.map(print, "children")))), ifBreak$3(hasChildren ? hardline$6 : "", ""), !isVoid ? concat$7(["</", n.tag, ">"]) : ""]))]);
+ var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter:
+ // https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts
+
+ function printChildren(path, options, print) {
+ return concat$7(path.map(function (childPath, childIndex) {
+ var childNode = path.getValue();
+ var isFirstNode = childIndex === 0;
+ var isLastNode = childIndex == path.getParentNode(0).children.length - 1;
+ var isLastNodeInMultiNodeList = isLastNode && !isFirstNode;
+ var isWhitespace = isWhitespaceNode(childNode);
+
+ if (isWhitespace && isLastNodeInMultiNodeList) {
+ return print(childPath, options, print);
+ } else if (isFirstNode) {
+ return concat$7([softline$3, print(childPath, options, print)]);
}
- case "BlockStatement":
- {
- var pp = path.getParentNode(1);
- var isElseIf = pp && pp.inverse && pp.inverse.body.length === 1 && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if";
- var hasElseIf = n.inverse && n.inverse.body.length === 1 && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if";
- var indentElse = hasElseIf ? function (a) {
- return a;
- } : indent$4;
-
- if (n.inverse) {
- return concat$7([isElseIf ? concat$7(["{{else ", printPathParams(path, print), "}}"]) : printOpenBlock(path, print), indent$4(concat$7([hardline$6, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$7([hardline$6, "{{else}}"]) : "", n.inverse ? indentElse(concat$7([hardline$6, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$7([hardline$6, printCloseBlock(path, print)])]);
- } else if (isElseIf) {
- return concat$7([concat$7(["{{else ", printPathParams(path, print), "}}"]), indent$4(concat$7([hardline$6, path.call(print, "program")]))]);
+ return print(childPath, options, print);
+ }, "children"));
+ }
+
+ function print(path, options, print) {
+ var n = path.getValue();
+ /* istanbul ignore if*/
+
+ if (!n) {
+ return "";
+ }
+
+ switch (n.type) {
+ case "Block":
+ case "Program":
+ case "Template":
+ {
+ return group$6(concat$7(path.map(print, "body").filter(function (text) {
+ return text !== "";
+ })));
+ }
+
+ case "ElementNode":
+ {
+ var tagFirstChar = n.tag[0];
+ var isLocal = n.tag.indexOf(".") !== -1;
+ var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal;
+ var hasChildren = n.children.length > 0;
+ var hasNonWhitespaceChildren = n.children.some(function (n) {
+ return !isWhitespaceNode(n);
+ });
+ var isVoid = isGlimmerComponent && (!hasChildren || !hasNonWhitespaceChildren) || voidTags.indexOf(n.tag) !== -1;
+ var closeTagForNoBreak = isVoid ? concat$7([" />", softline$3]) : ">";
+ var closeTagForBreak = isVoid ? "/>" : ">";
+
+ var _getParams = function _getParams(path, print) {
+ return indent$4(concat$7([n.attributes.length ? line$3 : "", join$4(line$3, path.map(print, "attributes")), n.modifiers.length ? line$3 : "", join$4(line$3, path.map(print, "modifiers")), n.comments.length ? line$3 : "", join$4(line$3, path.map(print, "comments"))]));
+ };
+
+ var nextNode = getNextNode(path);
+ return concat$7([group$6(concat$7(["<", n.tag, _getParams(path, print), n.blockParams.length ? " as |".concat(n.blockParams.join(" "), "|") : "", ifBreak$3(softline$3, ""), ifBreak$3(closeTagForBreak, closeTagForNoBreak)])), !isVoid ? group$6(concat$7([hasNonWhitespaceChildren ? indent$4(printChildren(path, options, print)) : "", ifBreak$3(hasChildren ? hardline$6 : "", ""), concat$7(["</", n.tag, ">"])])) : "", nextNode && nextNode.type === "ElementNode" ? hardline$6 : ""]);
}
- /**
- * I want this boolean to be: if params are going to cause a break,
- * not that it has params.
- */
+ case "BlockStatement":
+ {
+ var pp = path.getParentNode(1);
+ var isElseIf = pp && pp.inverse && pp.inverse.body.length === 1 && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if";
+ var hasElseIf = n.inverse && n.inverse.body.length === 1 && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if";
+ var indentElse = hasElseIf ? function (a) {
+ return a;
+ } : indent$4;
- var hasParams = n.params.length > 0 || n.hash.pairs.length > 0;
+ if (n.inverse) {
+ return concat$7([isElseIf ? concat$7(["{{else ", printPathParams(path, print), "}}"]) : printOpenBlock(path, print), indent$4(concat$7([hardline$6, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$7([hardline$6, "{{else}}"]) : "", n.inverse ? indentElse(concat$7([hardline$6, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$7([hardline$6, printCloseBlock(path, print)])]);
+ } else if (isElseIf) {
+ return concat$7([concat$7(["{{else ", printPathParams(path, print), "}}"]), indent$4(concat$7([hardline$6, path.call(print, "program")]))]);
+ }
- var _hasChildren = n.program.body.length > 0;
+ var _hasNonWhitespaceChildren = n.program.body.some(function (n) {
+ return !isWhitespaceNode(n);
+ });
- return concat$7([printOpenBlock(path, print), group$6(concat$7([indent$4(concat$7([softline$3, path.call(print, "program")])), hasParams && _hasChildren ? hardline$6 : softline$3, printCloseBlock(path, print)]))]);
- }
+ return concat$7([printOpenBlock(path, print), group$6(concat$7([indent$4(concat$7([softline$3, path.call(print, "program")])), _hasNonWhitespaceChildren ? hardline$6 : softline$3, printCloseBlock(path, print)]))]);
+ }
- case "ElementModifierStatement":
- case "MustacheStatement":
- {
- var _pp = path.getParentNode(1);
+ case "ElementModifierStatement":
+ case "MustacheStatement":
+ {
+ var _pp = path.getParentNode(1);
- var isConcat = _pp && _pp.type === "ConcatStatement";
- return group$6(concat$7([n.escaped === false ? "{{{" : "{{", printPathParams(path, print), isConcat ? "" : softline$3, n.escaped === false ? "}}}" : "}}"]));
- }
+ var isConcat = _pp && _pp.type === "ConcatStatement";
+ return group$6(concat$7([n.escaped === false ? "{{{" : "{{", printPathParams(path, print, {
+ group: false
+ }), isConcat ? "" : softline$3, n.escaped === false ? "}}}" : "}}"]));
+ }
- case "SubExpression":
- {
- var params = getParams(path, print);
- var printedParams = params.length > 0 ? indent$4(concat$7([line$5, group$6(join$4(line$5, params))])) : "";
- return group$6(concat$7(["(", printPath(path, print), printedParams, softline$3, ")"]));
- }
+ case "SubExpression":
+ {
+ var params = getParams(path, print);
+ var printedParams = params.length > 0 ? indent$4(concat$7([line$3, group$6(join$4(line$3, params))])) : "";
+ return group$6(concat$7(["(", printPath(path, print), printedParams, softline$3, ")"]));
+ }
- case "AttrNode":
- {
- var isText = n.value.type === "TextNode";
+ case "AttrNode":
+ {
+ var isText = n.value.type === "TextNode";
- if (isText && n.value.loc.start.column === n.value.loc.end.column) {
- return concat$7([n.name]);
+ if (isText && n.value.loc.start.column === n.value.loc.end.column) {
+ return concat$7([n.name]);
+ }
+
+ var value = path.call(print, "value");
+ var quotedValue = isText ? printStringLiteral(value.parts.join(), options) : value;
+ return concat$7([n.name, "=", quotedValue]);
}
- var quote = isText ? '"' : "";
- return concat$7([n.name, "=", quote, path.call(print, "value"), quote]);
- }
+ case "ConcatStatement":
+ {
+ return concat$7(['"', group$6(indent$4(join$4(softline$3, path.map(function (partPath) {
+ return print(partPath);
+ }, "parts").filter(function (a) {
+ return a !== "";
+ })))), '"']);
+ }
- case "ConcatStatement":
- {
- return concat$7(['"', group$6(indent$4(join$4(softline$3, path.map(function (partPath) {
- return print(partPath);
- }, "parts").filter(function (a) {
- return a !== "";
- })))), '"']);
- }
+ case "Hash":
+ {
+ return concat$7([join$4(line$3, path.map(print, "pairs"))]);
+ }
- case "Hash":
- {
- return concat$7([join$4(line$5, path.map(print, "pairs"))]);
- }
+ case "HashPair":
+ {
+ return concat$7([n.key, "=", path.call(print, "value")]);
+ }
- case "HashPair":
- {
- return concat$7([n.key, "=", path.call(print, "value")]);
- }
+ case "TextNode":
+ {
+ var maxLineBreaksToPreserve = 2;
+ var isFirstElement = !getPreviousNode(path);
+ var isLastElement = !getNextNode(path);
+ var isWhitespaceOnly = !/\S/.test(n.chars);
+ var lineBreaksCount = countNewLines(n.chars);
+ var hasBlockParent = path.getParentNode(0).type === "Block";
+ var hasElementParent = path.getParentNode(0).type === "ElementNode";
+ var hasTemplateParent = path.getParentNode(0).type === "Template";
+ var leadingLineBreaksCount = countLeadingNewLines(n.chars);
+ var trailingLineBreaksCount = countTrailingNewLines(n.chars);
- case "TextNode":
- {
- var leadingSpace = "";
- var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present, when next to mustache statement.
+ if ((isFirstElement || isLastElement) && isWhitespaceOnly && (hasBlockParent || hasElementParent || hasTemplateParent)) {
+ return "";
+ }
- var inAttrNode = path.stack.indexOf("attributes") >= 0;
+ if (isWhitespaceOnly && lineBreaksCount) {
+ leadingLineBreaksCount = Math.min(lineBreaksCount, maxLineBreaksToPreserve);
+ trailingLineBreaksCount = 0;
+ } else {
+ if (isNextNodeOfType(path, "ElementNode") || isNextNodeOfType(path, "BlockStatement")) {
+ trailingLineBreaksCount = Math.max(trailingLineBreaksCount, 1);
+ }
- if (inAttrNode) {
- var parentNode = path.getParentNode(0);
+ if (isPreviousNodeOfSomeType(path, ["ElementNode"]) || isPreviousNodeOfSomeType(path, ["BlockStatement"])) {
+ leadingLineBreaksCount = Math.max(leadingLineBreaksCount, 1);
+ }
+ }
+
+ var leadingSpace = "";
+ var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present,
+ // when next to mustache statement.
- var _isConcat = parentNode.type === "ConcatStatement";
+ var inAttrNode = path.stack.indexOf("attributes") >= 0;
- if (_isConcat) {
- var parts = parentNode.parts;
- var partIndex = parts.indexOf(n);
+ if (inAttrNode) {
+ var parentNode = path.getParentNode(0);
- if (partIndex > 0) {
- var partType = parts[partIndex - 1].type;
- var isMustache = partType === "MustacheStatement";
+ var _isConcat = parentNode.type === "ConcatStatement";
- if (isMustache) {
- leadingSpace = " ";
+ if (_isConcat) {
+ var parts = parentNode.parts;
+ var partIndex = parts.indexOf(n);
+
+ if (partIndex > 0) {
+ var partType = parts[partIndex - 1].type;
+ var isMustache = partType === "MustacheStatement";
+
+ if (isMustache) {
+ leadingSpace = " ";
+ }
}
- }
- if (partIndex < parts.length - 1) {
- var _partType = parts[partIndex + 1].type;
+ if (partIndex < parts.length - 1) {
+ var _partType = parts[partIndex + 1].type;
- var _isMustache = _partType === "MustacheStatement";
+ var _isMustache = _partType === "MustacheStatement";
- if (_isMustache) {
- trailingSpace = " ";
+ if (_isMustache) {
+ trailingSpace = " ";
+ }
}
}
+ } else {
+ if (trailingLineBreaksCount === 0 && isNextNodeOfType(path, "MustacheStatement")) {
+ trailingSpace = " ";
+ }
+
+ if (leadingLineBreaksCount === 0 && isPreviousNodeOfSomeType(path, ["MustacheStatement"])) {
+ leadingSpace = " ";
+ }
+
+ if (isFirstElement) {
+ leadingLineBreaksCount = 0;
+ leadingSpace = "";
+ }
+
+ if (isLastElement) {
+ trailingLineBreaksCount = 0;
+ trailingSpace = "";
+ }
}
+
+ return concat$7([].concat(_toConsumableArray(generateHardlines(leadingLineBreaksCount, maxLineBreaksToPreserve)), [n.chars.replace(/^[\s ]+/g, leadingSpace).replace(/[\s ]+$/, trailingSpace)], _toConsumableArray(generateHardlines(trailingLineBreaksCount, maxLineBreaksToPreserve))).filter(Boolean));
}
- return n.chars.replace(/^\s+/, leadingSpace).replace(/\s+$/, trailingSpace);
- }
+ case "MustacheCommentStatement":
+ {
+ var dashes = n.value.indexOf("}}") > -1 ? "--" : "";
+ return concat$7(["{{!", dashes, n.value, dashes, "}}"]);
+ }
- case "MustacheCommentStatement":
- {
- var dashes = n.value.indexOf("}}") > -1 ? "--" : "";
- return concat$7(["{{!", dashes, n.value, dashes, "}}"]);
- }
+ case "PathExpression":
+ {
+ return n.original;
+ }
- case "PathExpression":
- {
- return n.original;
- }
+ case "BooleanLiteral":
+ {
+ return String(n.value);
+ }
- case "BooleanLiteral":
- {
- return String(n.value);
- }
+ case "CommentStatement":
+ {
+ return concat$7(["<!--", n.value, "-->"]);
+ }
- case "CommentStatement":
- {
- return concat$7(["<!--", n.value, "-->"]);
- }
+ case "StringLiteral":
+ {
+ return printStringLiteral(n.value, options);
+ }
- case "StringLiteral":
- {
- return printStringLiteral(n.value, options);
- }
+ case "NumberLiteral":
+ {
+ return String(n.value);
+ }
- case "NumberLiteral":
- {
- return String(n.value);
- }
+ case "UndefinedLiteral":
+ {
+ return "undefined";
+ }
- case "UndefinedLiteral":
- {
- return "undefined";
- }
+ case "NullLiteral":
+ {
+ return "null";
+ }
- case "NullLiteral":
- {
- return "null";
- }
+ /* istanbul ignore next */
+
+ default:
+ throw new Error("unknown glimmer type: " + JSON.stringify(n.type));
+ }
+ }
+ /**
+ * Prints a string literal with the correct surrounding quotes based on
+ * `options.singleQuote` and the number of escaped quotes contained in
+ * the string literal. This function is the glimmer equivalent of `printString`
+ * in `common/util`, but has differences because of the way escaped characters
+ * are treated in hbs string literals.
+ * @param {string} stringLiteral - the string literal value
+ * @param {object} options - the prettier options object
+ */
- /* istanbul ignore next */
- default:
- throw new Error("unknown glimmer type: " + JSON.stringify(n.type));
+ function printStringLiteral(stringLiteral, options) {
+ var double = {
+ quote: '"',
+ regex: /"/g
+ };
+ var single = {
+ quote: "'",
+ regex: /'/g
+ };
+ var preferred = options.singleQuote ? single : double;
+ var alternate = preferred === single ? double : single;
+ var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for
+ // enclosing the string, we might want to enclose with the alternate quote
+ // instead, to minimize the number of escaped quotes.
+
+ if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) {
+ var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length;
+ var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length;
+ shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes;
+ }
+
+ var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred;
+ var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, "\\".concat(enclosingQuote.quote));
+ return "".concat(enclosingQuote.quote).concat(escapedStringLiteral).concat(enclosingQuote.quote);
}
-}
-/**
- * Prints a string literal with the correct surrounding quotes based on
- * `options.singleQuote` and the number of escaped quotes contained in
- * the string literal. This function is the glimmer equivalent of `printString`
- * in `common/util`, but has differences because of the way escaped characters
- * are treated in hbs string literals.
- * @param {string} stringLiteral - the string literal value
- * @param {object} options - the prettier options object
- */
+ function printPath(path, print) {
+ return path.call(print, "path");
+ }
-function printStringLiteral(stringLiteral, options) {
- var double = {
- quote: '"',
- regex: /"/g
- };
- var single = {
- quote: "'",
- regex: /'/g
- };
- var preferred = options.singleQuote ? single : double;
- var alternate = preferred === single ? double : single;
- var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for
- // enclosing the string, we might want to enclose with the alternate quote
- // instead, to minimize the number of escaped quotes.
+ function getParams(path, print) {
+ var node = path.getValue();
+ var parts = [];
+
+ if (node.params.length > 0) {
+ parts = parts.concat(path.map(print, "params"));
+ }
+
+ if (node.hash && node.hash.pairs.length > 0) {
+ parts.push(path.call(print, "hash"));
+ }
- if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) {
- var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length;
- var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length;
- shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes;
+ return parts;
}
- var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred;
- var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, "\\".concat(enclosingQuote.quote));
- return "".concat(enclosingQuote.quote).concat(escapedStringLiteral).concat(enclosingQuote.quote);
-}
+ function printPathParams(path, print, options) {
+ var parts = [];
+ options = Object.assign({
+ group: true
+ }, options || {});
+ parts.push(printPath(path, print));
+ parts = parts.concat(getParams(path, print));
-function printPath(path, print) {
- return path.call(print, "path");
-}
+ if (!options.group) {
+ return indent$4(join$4(line$3, parts));
+ }
+
+ return indent$4(group$6(join$4(line$3, parts)));
+ }
-function getParams(path, print) {
- var node = path.getValue();
- var parts = [];
+ function printBlockParams(path) {
+ var block = path.getValue();
- if (node.params.length > 0) {
- parts = parts.concat(path.map(print, "params"));
+ if (!block.program || !block.program.blockParams.length) {
+ return "";
+ }
+
+ return concat$7([" as |", block.program.blockParams.join(" "), "|"]);
+ }
+
+ function printOpenBlock(path, print) {
+ return group$6(concat$7(["{{#", printPathParams(path, print), printBlockParams(path), softline$3, "}}"]));
}
- if (node.hash && node.hash.pairs.length > 0) {
- parts.push(path.call(print, "hash"));
+ function printCloseBlock(path, print) {
+ return concat$7(["{{/", path.call(print, "path"), "}}"]);
}
- return parts;
-}
+ function isWhitespaceNode(node) {
+ return node.type === "TextNode" && !/\S/.test(node.chars);
+ }
-function printPathParams(path, print) {
- var parts = [];
- parts.push(printPath(path, print));
- parts = parts.concat(getParams(path, print));
- return indent$4(group$6(join$4(line$5, parts)));
-}
+ function getPreviousNode(path) {
+ var node = path.getValue();
+ var parentNode = path.getParentNode(0);
+ var children = parentNode.children || parentNode.body;
-function printBlockParams(path) {
- var block = path.getValue();
+ if (children) {
+ var nodeIndex = children.indexOf(node);
- if (!block.program || !block.program.blockParams.length) {
- return "";
+ if (nodeIndex > 0) {
+ var previousNode = children[nodeIndex - 1];
+ return previousNode;
+ }
+ }
}
- return concat$7([" as |", block.program.blockParams.join(" "), "|"]);
-}
+ function getNextNode(path) {
+ var node = path.getValue();
+ var parentNode = path.getParentNode(0);
+ var children = parentNode.children || parentNode.body;
-function printOpenBlock(path, print) {
- return group$6(concat$7(["{{#", printPathParams(path, print), printBlockParams(path), softline$3, "}}"]));
-}
+ if (children) {
+ var nodeIndex = children.indexOf(node);
-function printCloseBlock(path, print) {
- return concat$7(["{{/", path.call(print, "path"), "}}"]);
-}
+ if (nodeIndex < children.length) {
+ var nextNode = children[nodeIndex + 1];
+ return nextNode;
+ }
+ }
+ }
-function clean$3(ast, newObj) {
- delete newObj.loc; // (Glimmer/HTML) ignore TextNode whitespace
+ function isPreviousNodeOfSomeType(path, types) {
+ var previousNode = getPreviousNode(path);
- if (ast.type === "TextNode") {
- if (ast.chars.replace(/\s+/, "") === "") {
- return null;
+ if (previousNode) {
+ return types.some(function (type) {
+ return previousNode.type === type;
+ });
}
- newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, "");
- }
-}
-
-var printerGlimmer = {
- print: print,
- massageAstNode: clean$3
-};
-
-var name$6 = "Handlebars";
-var type$5 = "markup";
-var group$7 = "HTML";
-var aliases = ["hbs", "htmlbars"];
-var extensions$5 = [".handlebars", ".hbs"];
-var tmScope$5 = "text.html.handlebars";
-var aceMode$5 = "handlebars";
-var languageId$5 = 155;
-var handlebars = {
- name: name$6,
- type: type$5,
- group: group$7,
- aliases: aliases,
- extensions: extensions$5,
- tmScope: tmScope$5,
- aceMode: aceMode$5,
- languageId: languageId$5
-};
-
-var handlebars$1 = Object.freeze({
- name: name$6,
- type: type$5,
- group: group$7,
- aliases: aliases,
- extensions: extensions$5,
- tmScope: tmScope$5,
- aceMode: aceMode$5,
- languageId: languageId$5,
- default: handlebars
-});
-
-var require$$0$19 = ( handlebars$1 && handlebars ) || handlebars$1;
-
-var languages$2 = [createLanguage(require$$0$19, {
- override: {
- since: null,
- // unreleased
- parsers: ["glimmer"],
- vscodeLanguageIds: ["handlebars"]
- }
-})];
-var printers$2 = {
- glimmer: printerGlimmer
-};
-var languageHandlebars = {
- languages: languages$2,
- printers: printers$2
-};
-
-var clean$4 = function clean(ast, newNode) {
- delete newNode.sourceSpan;
- delete newNode.startSourceSpan;
- delete newNode.endSourceSpan;
- delete newNode.nameSpan;
- delete newNode.valueSpan;
-
- if (ast.type === "text" || ast.type === "comment") {
- return null;
- } // may be formatted by multiparser
+ return false;
+ }
+ function isNextNodeOfType(path, type) {
+ var nextNode = getNextNode(path);
+ return nextNode && nextNode.type === type;
+ }
- if (ast.type === "yaml" || ast.type === "toml") {
- return null;
+ function clean$2(ast, newObj) {
+ delete newObj.loc;
+ delete newObj.selfClosing; // (Glimmer/HTML) ignore TextNode whitespace
+
+ if (ast.type === "TextNode") {
+ if (ast.chars.replace(/\s+/, "") === "") {
+ return null;
+ }
+
+ newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, "");
+ }
+ }
+
+ function countNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ return string.split("\n").length - 1;
+ }
+
+ function countLeadingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ var newLines = (string.match(/^([^\S\r\n]*[\r\n])+/g) || [])[0] || "";
+ return countNewLines(newLines);
}
- if (ast.type === "attribute") {
- delete newNode.value;
- }
-
- if (ast.type === "docType") {
- delete newNode.value;
- }
-};
-
-var a = ["accesskey", "charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "tabindex", "target", "type"];
-var abbr = ["title"];
-var applet = ["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"];
-var area = ["accesskey", "alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "tabindex", "target", "type"];
-var audio = ["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"];
-var base$2 = ["href", "target"];
-var basefont = ["color", "face", "size"];
-var bdo = ["dir"];
-var blockquote = ["cite"];
-var body = ["alink", "background", "bgcolor", "link", "text", "vlink"];
-var br = ["clear"];
-var button = ["accesskey", "autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "tabindex", "type", "value"];
-var canvas = ["height", "width"];
-var caption = ["align"];
-var col = ["align", "char", "charoff", "span", "valign", "width"];
-var colgroup = ["align", "char", "charoff", "span", "valign", "width"];
-var data = ["value"];
-var del = ["cite", "datetime"];
-var details = ["open"];
-var dfn = ["title"];
-var dialog = ["open"];
-var dir = ["compact"];
-var div = ["align"];
-var dl = ["compact"];
-var embed$3 = ["height", "src", "type", "width"];
-var fieldset = ["disabled", "form", "name"];
-var font = ["color", "face", "size"];
-var form = ["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"];
-var frame = ["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"];
-var frameset = ["cols", "rows"];
-var h1 = ["align"];
-var h2 = ["align"];
-var h3 = ["align"];
-var h4 = ["align"];
-var h5 = ["align"];
-var h6 = ["align"];
-var head = ["profile"];
-var hr = ["align", "noshade", "size", "width"];
-var html = ["manifest", "version"];
-var iframe = ["align", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"];
-var img = ["align", "alt", "border", "crossorigin", "decoding", "height", "hspace", "ismap", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"];
-var input = ["accept", "accesskey", "align", "alt", "autocomplete", "autofocus", "checked", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "tabindex", "title", "type", "usemap", "value", "width"];
-var ins = ["cite", "datetime"];
-var isindex = ["prompt"];
-var label = ["accesskey", "for", "form"];
-var legend = ["accesskey", "align"];
-var li = ["type", "value"];
-var link$1 = ["as", "charset", "color", "crossorigin", "href", "hreflang", "integrity", "media", "nonce", "referrerpolicy", "rel", "rev", "sizes", "target", "title", "type"];
-var map = ["name"];
-var menu = ["compact"];
-var meta = ["charset", "content", "http-equiv", "name", "scheme"];
-var meter = ["high", "low", "max", "min", "optimum", "value"];
-var object = ["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "tabindex", "type", "typemustmatch", "usemap", "vspace", "width"];
-var ol = ["compact", "reversed", "start", "type"];
-var optgroup = ["disabled", "label"];
-var option = ["disabled", "label", "selected", "value"];
-var output = ["for", "form", "name"];
-var p = ["align"];
-var param = ["name", "type", "value", "valuetype"];
-var pre = ["width"];
-var progress = ["max", "value"];
-var q = ["cite"];
-var script = ["async", "charset", "crossorigin", "defer", "integrity", "language", "nomodule", "nonce", "referrerpolicy", "src", "type"];
-var select = ["autocomplete", "autofocus", "disabled", "form", "multiple", "name", "required", "size", "tabindex"];
-var slot = ["name"];
-var source = ["media", "sizes", "src", "srcset", "type"];
-var style = ["media", "nonce", "title", "type"];
-var table = ["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"];
-var tbody = ["align", "char", "charoff", "valign"];
-var td = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"];
-var textarea = ["accesskey", "autocomplete", "autofocus", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "tabindex", "wrap"];
-var tfoot = ["align", "char", "charoff", "valign"];
-var th = ["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"];
-var thead = ["align", "char", "charoff", "valign"];
-var time = ["datetime"];
-var tr = ["align", "bgcolor", "char", "charoff", "valign"];
-var track = ["default", "kind", "label", "src", "srclang"];
-var ul = ["compact", "type"];
-var video = ["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"];
-var index$13 = {
- a: a,
- abbr: abbr,
- applet: applet,
- area: area,
- audio: audio,
- base: base$2,
- basefont: basefont,
- bdo: bdo,
- blockquote: blockquote,
- body: body,
- br: br,
- button: button,
- canvas: canvas,
- caption: caption,
- col: col,
- colgroup: colgroup,
- data: data,
- del: del,
- details: details,
- dfn: dfn,
- dialog: dialog,
- dir: dir,
- div: div,
- dl: dl,
- embed: embed$3,
- fieldset: fieldset,
- font: font,
- form: form,
- frame: frame,
- frameset: frameset,
- h1: h1,
- h2: h2,
- h3: h3,
- h4: h4,
- h5: h5,
- h6: h6,
- head: head,
- hr: hr,
- html: html,
- iframe: iframe,
- img: img,
- input: input,
- ins: ins,
- isindex: isindex,
- label: label,
- legend: legend,
- li: li,
- link: link$1,
- map: map,
- menu: menu,
- meta: meta,
- meter: meter,
- object: object,
- ol: ol,
- optgroup: optgroup,
- option: option,
- output: output,
- p: p,
- param: param,
- pre: pre,
- progress: progress,
- q: q,
- script: script,
- select: select,
- slot: slot,
- source: source,
- style: style,
- table: table,
- tbody: tbody,
- td: td,
- textarea: textarea,
- tfoot: tfoot,
- th: th,
- thead: thead,
- time: time,
- tr: tr,
- track: track,
- ul: ul,
- video: video,
- "*": ["accesskey", "autocapitalize", "class", "contenteditable", "dir", "draggable", "hidden", "id", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "slot", "spellcheck", "style", "tabindex", "title", "translate"]
-};
-
-var htmlElementAttributes = Object.freeze({
- a: a,
- abbr: abbr,
- applet: applet,
- area: area,
- audio: audio,
- base: base$2,
- basefont: basefont,
- bdo: bdo,
- blockquote: blockquote,
- body: body,
- br: br,
- button: button,
- canvas: canvas,
- caption: caption,
- col: col,
- colgroup: colgroup,
- data: data,
- del: del,
- details: details,
- dfn: dfn,
- dialog: dialog,
- dir: dir,
- div: div,
- dl: dl,
- embed: embed$3,
- fieldset: fieldset,
- font: font,
- form: form,
- frame: frame,
- frameset: frameset,
- h1: h1,
- h2: h2,
- h3: h3,
- h4: h4,
- h5: h5,
- h6: h6,
- head: head,
- hr: hr,
- html: html,
- iframe: iframe,
- img: img,
- input: input,
- ins: ins,
- isindex: isindex,
- label: label,
- legend: legend,
- li: li,
- link: link$1,
- map: map,
- menu: menu,
- meta: meta,
- meter: meter,
- object: object,
- ol: ol,
- optgroup: optgroup,
- option: option,
- output: output,
- p: p,
- param: param,
- pre: pre,
- progress: progress,
- q: q,
- script: script,
- select: select,
- slot: slot,
- source: source,
- style: style,
- table: table,
- tbody: tbody,
- td: td,
- textarea: textarea,
- tfoot: tfoot,
- th: th,
- thead: thead,
- time: time,
- tr: tr,
- track: track,
- ul: ul,
- video: video,
- default: index$13
-});
-
-var json$4 = {"CSS_DISPLAY_TAGS":{"area":"none","base":"none","basefont":"none","datalist":"none","head":"none","link":"none","meta":"none","noembed":"none","noframes":"none","param":"none","rp":"none","script":"none","source":"block","style":"none","template":"inline","track":"block","title":"none","html":"block","body":"block","address":"block","blockquote":"block","center":"block","div":"block","figure":"block","figcaption":"block","footer":"block","form":"block","header":"block","hr":"block","legend":"block","listing":"block","main":"block","p":"block","plaintext":"block","pre":"block","xmp":"block","slot":"contents","ruby":"ruby","rt":"ruby-text","article":"block","aside":"block","h1":"block","h2":"block","h3":"block","h4":"block","h5":"block","h6":"block","hgroup":"block","nav":"block","section":"block","dir":"block","dd":"block","dl":"block","dt":"block","ol":"block","ul":"block","li":"list-item","table":"table","caption":"table-caption","colgroup":"table-column-group","col":"table-column","thead":"table-header-group","tbody":"table-row-group","tfoot":"table-footer-group","tr":"table-row","td":"table-cell","th":"table-cell","fieldset":"block","button":"inline-block","video":"inline-block","audio":"inline-block"},"CSS_DISPLAY_DEFAULT":"inline","CSS_WHITE_SPACE_TAGS":{"listing":"pre","plaintext":"pre","pre":"pre","xmp":"pre","nobr":"nowrap","table":"initial","textarea":"pre-wrap"},"CSS_WHITE_SPACE_DEFAULT":"normal"};
-
-var htmlElementAttributes$1 = ( htmlElementAttributes && index$13 ) || htmlElementAttributes;
-
-var CSS_DISPLAY_TAGS = json$4.CSS_DISPLAY_TAGS;
-var CSS_DISPLAY_DEFAULT = json$4.CSS_DISPLAY_DEFAULT;
-var CSS_WHITE_SPACE_TAGS = json$4.CSS_WHITE_SPACE_TAGS;
-var CSS_WHITE_SPACE_DEFAULT = json$4.CSS_WHITE_SPACE_DEFAULT;
-var HTML_TAGS = arrayToMap(htmlTagNames$1);
-var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap);
-
-function arrayToMap(array) {
- var map = Object.create(null);
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var value = _step.value;
- map[value] = true;
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
+ function countTrailingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ var newLines = (string.match(/([\r\n][^\S\r\n]*)+$/g) || [])[0] || "";
+ return countNewLines(newLines);
+ }
+
+ function generateHardlines() {
+ var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+ var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
+ return new Array(Math.min(number, max)).fill(hardline$6);
+ }
+
+ var printerGlimmer = {
+ print: print,
+ massageAstNode: clean$2
+ };
+
+ var name$6 = "Handlebars";
+ var type$5 = "markup";
+ var group$7 = "HTML";
+ var aliases = [
+ "hbs",
+ "htmlbars"
+ ];
+ var extensions$5 = [
+ ".handlebars",
+ ".hbs"
+ ];
+ var tmScope$5 = "text.html.handlebars";
+ var aceMode$5 = "handlebars";
+ var languageId$5 = 155;
+ var Handlebars = {
+ name: name$6,
+ type: type$5,
+ group: group$7,
+ aliases: aliases,
+ extensions: extensions$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ languageId: languageId$5
+ };
+
+ var Handlebars$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$6,
+ type: type$5,
+ group: group$7,
+ aliases: aliases,
+ extensions: extensions$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ languageId: languageId$5,
+ 'default': Handlebars
+ });
+
+ var require$$0$4 = getCjsExportFromNamespace(Handlebars$1);
+
+ var languages$2 = [createLanguage(require$$0$4, function (data) {
+ return Object.assign(data, {
+ since: null,
+ // unreleased
+ parsers: ["glimmer"],
+ vscodeLanguageIds: ["handlebars"]
+ });
+ })];
+ var printers$2 = {
+ glimmer: printerGlimmer
+ };
+ var languageHandlebars = {
+ languages: languages$2,
+ printers: printers$2
+ };
+
+ var clean$3 = function clean(ast, newNode) {
+ delete newNode.sourceSpan;
+ delete newNode.startSourceSpan;
+ delete newNode.endSourceSpan;
+ delete newNode.nameSpan;
+ delete newNode.valueSpan;
+
+ if (ast.type === "text" || ast.type === "comment") {
+ return null;
+ } // may be formatted by multiparser
+
+
+ if (ast.type === "yaml" || ast.type === "toml") {
+ return null;
+ }
+
+ if (ast.type === "attribute") {
+ delete newNode.value;
+ }
+
+ if (ast.type === "docType") {
+ delete newNode.value;
+ }
+ };
+
+ var json = {
+ "CSS_DISPLAY_TAGS": {
+ "area": "none",
+ "base": "none",
+ "basefont": "none",
+ "datalist": "none",
+ "head": "none",
+ "link": "none",
+ "meta": "none",
+ "noembed": "none",
+ "noframes": "none",
+ "param": "none",
+ "rp": "none",
+ "script": "block",
+ "source": "block",
+ "style": "none",
+ "template": "inline",
+ "track": "block",
+ "title": "none",
+ "html": "block",
+ "body": "block",
+ "address": "block",
+ "blockquote": "block",
+ "center": "block",
+ "div": "block",
+ "figure": "block",
+ "figcaption": "block",
+ "footer": "block",
+ "form": "block",
+ "header": "block",
+ "hr": "block",
+ "legend": "block",
+ "listing": "block",
+ "main": "block",
+ "p": "block",
+ "plaintext": "block",
+ "pre": "block",
+ "xmp": "block",
+ "slot": "contents",
+ "ruby": "ruby",
+ "rt": "ruby-text",
+ "article": "block",
+ "aside": "block",
+ "h1": "block",
+ "h2": "block",
+ "h3": "block",
+ "h4": "block",
+ "h5": "block",
+ "h6": "block",
+ "hgroup": "block",
+ "nav": "block",
+ "section": "block",
+ "dir": "block",
+ "dd": "block",
+ "dl": "block",
+ "dt": "block",
+ "ol": "block",
+ "ul": "block",
+ "li": "list-item",
+ "table": "table",
+ "caption": "table-caption",
+ "colgroup": "table-column-group",
+ "col": "table-column",
+ "thead": "table-header-group",
+ "tbody": "table-row-group",
+ "tfoot": "table-footer-group",
+ "tr": "table-row",
+ "td": "table-cell",
+ "th": "table-cell",
+ "fieldset": "block",
+ "button": "inline-block",
+ "video": "inline-block",
+ "audio": "inline-block"
+ },
+ "CSS_DISPLAY_DEFAULT": "inline",
+ "CSS_WHITE_SPACE_TAGS": {
+ "listing": "pre",
+ "plaintext": "pre",
+ "pre": "pre",
+ "xmp": "pre",
+ "nobr": "nowrap",
+ "table": "initial",
+ "textarea": "pre-wrap"
+ },
+ "CSS_WHITE_SPACE_DEFAULT": "normal"
+ };
+
+ var a = [
+ "accesskey",
+ "charset",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "name",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+ ];
+ var abbr = [
+ "title"
+ ];
+ var applet = [
+ "align",
+ "alt",
+ "archive",
+ "code",
+ "codebase",
+ "height",
+ "hspace",
+ "name",
+ "object",
+ "vspace",
+ "width"
+ ];
+ var area = [
+ "accesskey",
+ "alt",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "nohref",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+ ];
+ var audio = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "loop",
+ "muted",
+ "preload",
+ "src"
+ ];
+ var base = [
+ "href",
+ "target"
+ ];
+ var basefont = [
+ "color",
+ "face",
+ "size"
+ ];
+ var bdo = [
+ "dir"
+ ];
+ var blockquote = [
+ "cite"
+ ];
+ var body = [
+ "alink",
+ "background",
+ "bgcolor",
+ "link",
+ "text",
+ "vlink"
+ ];
+ var br = [
+ "clear"
+ ];
+ var button = [
+ "accesskey",
+ "autofocus",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "name",
+ "tabindex",
+ "type",
+ "value"
+ ];
+ var canvas = [
+ "height",
+ "width"
+ ];
+ var caption = [
+ "align"
+ ];
+ var col = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+ ];
+ var colgroup = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+ ];
+ var data = [
+ "value"
+ ];
+ var del = [
+ "cite",
+ "datetime"
+ ];
+ var details = [
+ "open"
+ ];
+ var dfn = [
+ "title"
+ ];
+ var dialog = [
+ "open"
+ ];
+ var dir = [
+ "compact"
+ ];
+ var div = [
+ "align"
+ ];
+ var dl = [
+ "compact"
+ ];
+ var embed$1 = [
+ "height",
+ "src",
+ "type",
+ "width"
+ ];
+ var fieldset = [
+ "disabled",
+ "form",
+ "name"
+ ];
+ var font = [
+ "color",
+ "face",
+ "size"
+ ];
+ var form = [
+ "accept",
+ "accept-charset",
+ "action",
+ "autocomplete",
+ "enctype",
+ "method",
+ "name",
+ "novalidate",
+ "target"
+ ];
+ var frame = [
+ "frameborder",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "noresize",
+ "scrolling",
+ "src"
+ ];
+ var frameset = [
+ "cols",
+ "rows"
+ ];
+ var h1 = [
+ "align"
+ ];
+ var h2 = [
+ "align"
+ ];
+ var h3 = [
+ "align"
+ ];
+ var h4 = [
+ "align"
+ ];
+ var h5 = [
+ "align"
+ ];
+ var h6 = [
+ "align"
+ ];
+ var head = [
+ "profile"
+ ];
+ var hr = [
+ "align",
+ "noshade",
+ "size",
+ "width"
+ ];
+ var html = [
+ "manifest",
+ "version"
+ ];
+ var iframe = [
+ "align",
+ "allow",
+ "allowfullscreen",
+ "allowpaymentrequest",
+ "allowusermedia",
+ "frameborder",
+ "height",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "referrerpolicy",
+ "sandbox",
+ "scrolling",
+ "src",
+ "srcdoc",
+ "width"
+ ];
+ var img = [
+ "align",
+ "alt",
+ "border",
+ "crossorigin",
+ "decoding",
+ "height",
+ "hspace",
+ "ismap",
+ "longdesc",
+ "name",
+ "referrerpolicy",
+ "sizes",
+ "src",
+ "srcset",
+ "usemap",
+ "vspace",
+ "width"
+ ];
+ var input = [
+ "accept",
+ "accesskey",
+ "align",
+ "alt",
+ "autocomplete",
+ "autofocus",
+ "checked",
+ "dirname",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "height",
+ "ismap",
+ "list",
+ "max",
+ "maxlength",
+ "min",
+ "minlength",
+ "multiple",
+ "name",
+ "pattern",
+ "placeholder",
+ "readonly",
+ "required",
+ "size",
+ "src",
+ "step",
+ "tabindex",
+ "title",
+ "type",
+ "usemap",
+ "value",
+ "width"
+ ];
+ var ins = [
+ "cite",
+ "datetime"
+ ];
+ var isindex = [
+ "prompt"
+ ];
+ var label = [
+ "accesskey",
+ "for",
+ "form"
+ ];
+ var legend = [
+ "accesskey",
+ "align"
+ ];
+ var li = [
+ "type",
+ "value"
+ ];
+ var link$1 = [
+ "as",
+ "charset",
+ "color",
+ "crossorigin",
+ "href",
+ "hreflang",
+ "imagesizes",
+ "imagesrcset",
+ "integrity",
+ "media",
+ "nonce",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "sizes",
+ "target",
+ "title",
+ "type"
+ ];
+ var map = [
+ "name"
+ ];
+ var menu = [
+ "compact"
+ ];
+ var meta = [
+ "charset",
+ "content",
+ "http-equiv",
+ "name",
+ "scheme"
+ ];
+ var meter = [
+ "high",
+ "low",
+ "max",
+ "min",
+ "optimum",
+ "value"
+ ];
+ var object = [
+ "align",
+ "archive",
+ "border",
+ "classid",
+ "codebase",
+ "codetype",
+ "data",
+ "declare",
+ "form",
+ "height",
+ "hspace",
+ "name",
+ "standby",
+ "tabindex",
+ "type",
+ "typemustmatch",
+ "usemap",
+ "vspace",
+ "width"
+ ];
+ var ol = [
+ "compact",
+ "reversed",
+ "start",
+ "type"
+ ];
+ var optgroup = [
+ "disabled",
+ "label"
+ ];
+ var option = [
+ "disabled",
+ "label",
+ "selected",
+ "value"
+ ];
+ var output = [
+ "for",
+ "form",
+ "name"
+ ];
+ var p = [
+ "align"
+ ];
+ var param = [
+ "name",
+ "type",
+ "value",
+ "valuetype"
+ ];
+ var pre = [
+ "width"
+ ];
+ var progress = [
+ "max",
+ "value"
+ ];
+ var q = [
+ "cite"
+ ];
+ var script = [
+ "async",
+ "charset",
+ "crossorigin",
+ "defer",
+ "integrity",
+ "language",
+ "nomodule",
+ "nonce",
+ "referrerpolicy",
+ "src",
+ "type"
+ ];
+ var select = [
+ "autocomplete",
+ "autofocus",
+ "disabled",
+ "form",
+ "multiple",
+ "name",
+ "required",
+ "size",
+ "tabindex"
+ ];
+ var slot = [
+ "name"
+ ];
+ var source = [
+ "media",
+ "sizes",
+ "src",
+ "srcset",
+ "type"
+ ];
+ var style = [
+ "media",
+ "nonce",
+ "title",
+ "type"
+ ];
+ var table = [
+ "align",
+ "bgcolor",
+ "border",
+ "cellpadding",
+ "cellspacing",
+ "frame",
+ "rules",
+ "summary",
+ "width"
+ ];
+ var tbody = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+ ];
+ var td = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+ ];
+ var textarea = [
+ "accesskey",
+ "autocomplete",
+ "autofocus",
+ "cols",
+ "dirname",
+ "disabled",
+ "form",
+ "maxlength",
+ "minlength",
+ "name",
+ "placeholder",
+ "readonly",
+ "required",
+ "rows",
+ "tabindex",
+ "wrap"
+ ];
+ var tfoot = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+ ];
+ var th = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+ ];
+ var thead = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+ ];
+ var time = [
+ "datetime"
+ ];
+ var tr = [
+ "align",
+ "bgcolor",
+ "char",
+ "charoff",
+ "valign"
+ ];
+ var track = [
+ "default",
+ "kind",
+ "label",
+ "src",
+ "srclang"
+ ];
+ var ul = [
+ "compact",
+ "type"
+ ];
+ var video = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "height",
+ "loop",
+ "muted",
+ "playsinline",
+ "poster",
+ "preload",
+ "src",
+ "width"
+ ];
+ var index$1 = {
+ "*": [
+ "accesskey",
+ "autocapitalize",
+ "autofocus",
+ "class",
+ "contenteditable",
+ "dir",
+ "draggable",
+ "enterkeyhint",
+ "hidden",
+ "id",
+ "inputmode",
+ "is",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "nonce",
+ "slot",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+ ],
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data,
+ del: del,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$1,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$1,
+ map: map,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video
+ };
+
+ var htmlElementAttributes = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data,
+ del: del,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$1,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$1,
+ map: map,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video,
+ 'default': index$1
+ });
+
+ var htmlElementAttributes$1 = getCjsExportFromNamespace(htmlElementAttributes);
+
+ var CSS_DISPLAY_TAGS = json.CSS_DISPLAY_TAGS,
+ CSS_DISPLAY_DEFAULT = json.CSS_DISPLAY_DEFAULT,
+ CSS_WHITE_SPACE_TAGS = json.CSS_WHITE_SPACE_TAGS,
+ CSS_WHITE_SPACE_DEFAULT = json.CSS_WHITE_SPACE_DEFAULT;
+ var HTML_TAGS = arrayToMap(htmlTagNames$1);
+ var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap);
+
+ function arrayToMap(array) {
+ var map = Object.create(null);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var value = _step.value;
+ map[value] = true;
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- return map;
-}
+ return map;
+ }
-function mapObject(object, fn) {
- var newObject = Object.create(null);
+ function mapObject(object, fn) {
+ var newObject = Object.create(null);
- var _arr = Object.keys(object);
+ for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {
+ var key = _Object$keys[_i];
+ newObject[key] = fn(object[key], key);
+ }
- for (var _i = 0; _i < _arr.length; _i++) {
- var key = _arr[_i];
- newObject[key] = fn(object[key], key);
+ return newObject;
}
- return newObject;
-}
+ function shouldPreserveContent(node, options) {
+ if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") {
+ return true;
+ } // unterminated node in ie conditional comment
+ // e.g. <!--[if lt IE 9]><html><![endif]-->
-function shouldPreserveContent$1(node, options) {
- if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") {
- return true;
- } // unterminated node in ie conditional comment
- // e.g. <!--[if lt IE 9]><html><![endif]-->
+ if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) {
+ return true;
+ } // incomplete html in ie conditional comment
+ // e.g. <!--[if lt IE 9]></div><![endif]-->
- if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) {
- return true;
- } // incomplete html in ie conditional comment
- // e.g. <!--[if lt IE 9]></div><![endif]-->
+ if (node.type === "ieConditionalComment" && !node.complete) {
+ return true;
+ } // top-level elements (excluding <template>, <style> and <script>) in Vue SFC are considered custom block
+ // custom blocks can be written in other languages so we should preserve them to not break the code
- if (node.type === "ieConditionalComment" && !node.complete) {
- return true;
- } // top-level elements (excluding <template>, <style> and <script>) in Vue SFC are considered custom block
- // custom blocks can be written in other languages so we should preserve them to not break the code
+ if (options.parser === "vue" && node.type === "element" && node.parent.type === "root" && ["template", "style", "script", // vue parser can be used for vue dom template as well, so we should still format top-level <html>
+ "html"].indexOf(node.fullName) === -1) {
+ return true;
+ } // TODO: handle non-text children in <pre>
- if (options.parser === "vue" && node.type === "element" && node.parent.type === "root" && ["template", "style", "script", // vue parser can be used for vue dom template as well, so we should still format top-level <html>
- "html"].indexOf(node.fullName) === -1) {
- return true;
- } // TODO: handle non-text children in <pre>
+ if (isPreLikeNode(node) && node.children.some(function (child) {
+ return child.type !== "text" && child.type !== "interpolation";
+ })) {
+ return true;
+ }
- if (isPreLikeNode(node) && node.children.some(function (child) {
- return child.type !== "text" && child.type !== "interpolation";
- })) {
- return true;
+ return false;
}
- return false;
-}
+ function hasPrettierIgnore(node) {
+ if (node.type === "attribute" || isTextLikeNode(node)) {
+ return false;
+ }
-function hasPrettierIgnore$1(node) {
- if (node.type === "attribute" || isTextLikeNode$1(node)) {
- return false;
+ if (!node.parent) {
+ return false;
+ }
+
+ if (typeof node.index !== "number" || node.index === 0) {
+ return false;
+ }
+
+ var prevNode = node.parent.children[node.index - 1];
+ return isPrettierIgnore(prevNode);
}
- if (!node.parent) {
- return false;
+ function isPrettierIgnore(node) {
+ return node.type === "comment" && node.value.trim() === "prettier-ignore";
}
- if (typeof node.index !== "number" || node.index === 0) {
- return false;
+ function getPrettierIgnoreAttributeCommentData(value) {
+ var match = value.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);
+
+ if (!match) {
+ return false;
+ }
+
+ if (!match[1]) {
+ return true;
+ }
+
+ return match[1].split(/\s+/);
}
+ /** there's no opening/closing tag or it's considered not breakable */
- var prevNode = node.parent.children[node.index - 1];
- return isPrettierIgnore(prevNode);
-}
-function isPrettierIgnore(node) {
- return node.type === "comment" && node.value.trim() === "prettier-ignore";
-}
+ function isTextLikeNode(node) {
+ return node.type === "text" || node.type === "comment";
+ }
-function getPrettierIgnoreAttributeCommentData$1(value) {
- var match = value.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);
+ function isScriptLikeTag(node) {
+ return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
+ }
- if (!match) {
- return false;
+ function isFrontMatterNode(node) {
+ return node.type === "yaml" || node.type === "toml";
}
- if (!match[1]) {
- return true;
+ function canHaveInterpolation(node) {
+ return node.children && !isScriptLikeTag(node);
}
- return match[1].split(/\s+/);
-}
-/** there's no opening/closing tag or it's considered not breakable */
+ function isWhitespaceSensitiveNode(node) {
+ return isScriptLikeTag(node) || node.type === "interpolation" || isIndentationSensitiveNode(node);
+ }
+ function isIndentationSensitiveNode(node) {
+ return getNodeCssStyleWhiteSpace(node).startsWith("pre");
+ }
-function isTextLikeNode$1(node) {
- return node.type === "text" || node.type === "comment";
-}
+ function isLeadingSpaceSensitiveNode(node) {
+ var isLeadingSpaceSensitive = _isLeadingSpaceSensitiveNode();
-function isScriptLikeTag$1(node) {
- return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
-}
+ if (isLeadingSpaceSensitive && !node.prev && node.parent && node.parent.tagDefinition && node.parent.tagDefinition.ignoreFirstLf) {
+ return node.type === "interpolation";
+ }
-function isFrontMatterNode(node) {
- return node.type === "yaml" || node.type === "toml";
-}
+ return isLeadingSpaceSensitive;
-function canHaveInterpolation(node) {
- return node.children && !isScriptLikeTag$1(node);
-}
+ function _isLeadingSpaceSensitiveNode() {
+ if (isFrontMatterNode(node)) {
+ return false;
+ }
-function isWhitespaceSensitiveNode(node) {
- return isScriptLikeTag$1(node) || node.type === "interpolation" || isIndentationSensitiveNode(node);
-}
+ if ((node.type === "text" || node.type === "interpolation") && node.prev && (node.prev.type === "text" || node.prev.type === "interpolation")) {
+ return true;
+ }
-function isIndentationSensitiveNode(node) {
- return getNodeCssStyleWhiteSpace(node).startsWith("pre");
-}
+ if (!node.parent || node.parent.cssDisplay === "none") {
+ return false;
+ }
-function isLeadingSpaceSensitiveNode(node) {
- var isLeadingSpaceSensitive = _isLeadingSpaceSensitiveNode();
+ if (isPreLikeNode(node.parent)) {
+ return true;
+ }
- if (isLeadingSpaceSensitive && !node.prev && node.parent && node.parent.tagDefinition && node.parent.tagDefinition.ignoreFirstLf) {
- return node.type === "interpolation";
- }
+ if (!node.prev && (node.parent.type === "root" || isScriptLikeTag(node.parent) || !isFirstChildLeadingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+ return false;
+ }
- return isLeadingSpaceSensitive;
+ if (node.prev && !isNextLeadingSpaceSensitiveCssDisplay(node.prev.cssDisplay)) {
+ return false;
+ }
+
+ return true;
+ }
+ }
- function _isLeadingSpaceSensitiveNode() {
+ function isTrailingSpaceSensitiveNode(node) {
if (isFrontMatterNode(node)) {
return false;
}
- if ((node.type === "text" || node.type === "interpolation") && node.prev && (node.prev.type === "text" || node.prev.type === "interpolation")) {
+ if ((node.type === "text" || node.type === "interpolation") && node.next && (node.next.type === "text" || node.next.type === "interpolation")) {
return true;
}
@@ -19339,9729 +19651,10167 @@ function isLeadingSpaceSensitiveNode(node) {
return true;
}
- if (!node.prev && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isFirstChildLeadingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
+ if (!node.next && (node.parent.type === "root" || isScriptLikeTag(node.parent) || !isLastChildTrailingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
return false;
}
- if (node.prev && !isNextLeadingSpaceSensitiveCssDisplay(node.prev.cssDisplay)) {
+ if (node.next && !isPrevTrailingSpaceSensitiveCssDisplay(node.next.cssDisplay)) {
return false;
}
return true;
}
-}
-function isTrailingSpaceSensitiveNode(node) {
- if (isFrontMatterNode(node)) {
- return false;
+ function isDanglingSpaceSensitiveNode(node) {
+ return isDanglingSpaceSensitiveCssDisplay(node.cssDisplay) && !isScriptLikeTag(node);
}
- if ((node.type === "text" || node.type === "interpolation") && node.next && (node.next.type === "text" || node.next.type === "interpolation")) {
- return true;
+ function forceNextEmptyLine(node) {
+ return isFrontMatterNode(node) || node.next && node.sourceSpan.end.line + 1 < node.next.sourceSpan.start.line;
}
+ /** firstChild leadingSpaces and lastChild trailingSpaces */
- if (!node.parent || node.parent.cssDisplay === "none") {
- return false;
- }
- if (isPreLikeNode(node.parent)) {
- return true;
+ function forceBreakContent(node) {
+ return forceBreakChildren(node) || node.type === "element" && node.children.length !== 0 && (["body", "script", "style"].indexOf(node.name) !== -1 || node.children.some(function (child) {
+ return hasNonTextChild(child);
+ })) || node.firstChild && node.firstChild === node.lastChild && hasLeadingLineBreak(node.firstChild) && (!node.lastChild.isTrailingSpaceSensitive || hasTrailingLineBreak(node.lastChild));
}
+ /** spaces between children */
- if (!node.next && (node.parent.type === "root" || isScriptLikeTag$1(node.parent) || !isLastChildTrailingSpaceSensitiveCssDisplay(node.parent.cssDisplay))) {
- return false;
+
+ function forceBreakChildren(node) {
+ return node.type === "element" && node.children.length !== 0 && (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell");
}
- if (node.next && !isPrevTrailingSpaceSensitiveCssDisplay(node.next.cssDisplay)) {
- return false;
+ function preferHardlineAsLeadingSpaces(node) {
+ return preferHardlineAsSurroundingSpaces(node) || node.prev && preferHardlineAsTrailingSpaces(node.prev) || hasSurroundingLineBreak(node);
}
- return true;
-}
+ function preferHardlineAsTrailingSpaces(node) {
+ return preferHardlineAsSurroundingSpaces(node) || node.type === "element" && node.fullName === "br" || hasSurroundingLineBreak(node);
+ }
-function isDanglingSpaceSensitiveNode(node) {
- return isDanglingSpaceSensitiveCssDisplay(node.cssDisplay) && !isScriptLikeTag$1(node);
-}
+ function hasSurroundingLineBreak(node) {
+ return hasLeadingLineBreak(node) && hasTrailingLineBreak(node);
+ }
-function forceNextEmptyLine$1(node) {
- return isFrontMatterNode(node) || node.next && node.sourceSpan.end.line + 1 < node.next.sourceSpan.start.line;
-}
-/** firstChild leadingSpaces and lastChild trailingSpaces */
+ function hasLeadingLineBreak(node) {
+ return node.hasLeadingSpaces && (node.prev ? node.prev.sourceSpan.end.line < node.sourceSpan.start.line : node.parent.type === "root" || node.parent.startSourceSpan.end.line < node.sourceSpan.start.line);
+ }
+ function hasTrailingLineBreak(node) {
+ return node.hasTrailingSpaces && (node.next ? node.next.sourceSpan.start.line > node.sourceSpan.end.line : node.parent.type === "root" || node.parent.endSourceSpan.start.line > node.sourceSpan.end.line);
+ }
-function forceBreakContent$1(node) {
- return forceBreakChildren$1(node) || node.type === "element" && node.children.length !== 0 && (["body", "template", "script", "style"].indexOf(node.name) !== -1 || node.children.some(function (child) {
- return hasNonTextChild(child);
- })) || node.firstChild && node.firstChild === node.lastChild && hasLeadingLineBreak(node.firstChild) && (!node.lastChild.isTrailingSpaceSensitive || hasTrailingLineBreak(node.lastChild));
-}
-/** spaces between children */
+ function preferHardlineAsSurroundingSpaces(node) {
+ switch (node.type) {
+ case "ieConditionalComment":
+ case "comment":
+ case "directive":
+ return true;
+ case "element":
+ return ["script", "select"].indexOf(node.name) !== -1;
+ }
-function forceBreakChildren$1(node) {
- return node.type === "element" && node.children.length !== 0 && (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell");
-}
+ return false;
+ }
-function preferHardlineAsLeadingSpaces$1(node) {
- return preferHardlineAsSurroundingSpaces(node) || node.prev && preferHardlineAsTrailingSpaces(node.prev) || hasSurroundingLineBreak(node);
-}
+ function getLastDescendant(node) {
+ return node.lastChild ? getLastDescendant(node.lastChild) : node;
+ }
-function preferHardlineAsTrailingSpaces(node) {
- return preferHardlineAsSurroundingSpaces(node) || node.type === "element" && node.fullName === "br" || hasSurroundingLineBreak(node);
-}
+ function hasNonTextChild(node) {
+ return node.children && node.children.some(function (child) {
+ return child.type !== "text";
+ });
+ }
-function hasSurroundingLineBreak(node) {
- return hasLeadingLineBreak(node) && hasTrailingLineBreak(node);
-}
+ function inferScriptParser(node) {
+ if (node.name === "script" && !node.attrMap.src) {
+ if (!node.attrMap.lang && !node.attrMap.type || node.attrMap.type === "module" || node.attrMap.type === "text/javascript" || node.attrMap.type === "text/babel" || node.attrMap.type === "application/javascript") {
+ return "babel";
+ }
-function hasLeadingLineBreak(node) {
- return node.hasLeadingSpaces && (node.prev ? node.prev.sourceSpan.end.line < node.sourceSpan.start.line : node.parent.type === "root" || node.parent.startSourceSpan.end.line < node.sourceSpan.start.line);
-}
+ if (node.attrMap.type === "application/x-typescript" || node.attrMap.lang === "ts" || node.attrMap.lang === "tsx") {
+ return "typescript";
+ }
-function hasTrailingLineBreak(node) {
- return node.hasTrailingSpaces && (node.next ? node.next.sourceSpan.start.line > node.sourceSpan.end.line : node.parent.type === "root" || node.parent.endSourceSpan.start.line > node.sourceSpan.end.line);
-}
+ if (node.attrMap.type === "text/markdown") {
+ return "markdown";
+ }
-function preferHardlineAsSurroundingSpaces(node) {
- switch (node.type) {
- case "ieConditionalComment":
- case "comment":
- case "directive":
- return true;
+ if (node.attrMap.type.endsWith("json") || node.attrMap.type.endsWith("importmap")) {
+ return "json";
+ }
+ }
- case "element":
- return ["script", "select"].indexOf(node.name) !== -1;
- }
+ if (node.name === "style") {
+ if (!node.attrMap.lang || node.attrMap.lang === "postcss" || node.attrMap.lang === "css") {
+ return "css";
+ }
- return false;
-}
+ if (node.attrMap.lang === "scss") {
+ return "scss";
+ }
-function getLastDescendant$1(node) {
- return node.lastChild ? getLastDescendant$1(node.lastChild) : node;
-}
+ if (node.attrMap.lang === "less") {
+ return "less";
+ }
+ }
-function hasNonTextChild(node) {
- return node.children && node.children.some(function (child) {
- return child.type !== "text";
- });
-}
+ return null;
+ }
-function inferScriptParser$1(node) {
- if (node.name === "script" && !node.attrMap.src) {
- if (!node.attrMap.lang && !node.attrMap.type || node.attrMap.type === "module" || node.attrMap.type === "text/javascript" || node.attrMap.type === "text/babel" || node.attrMap.type === "application/javascript") {
- return "babel";
- }
+ function isBlockLikeCssDisplay(cssDisplay) {
+ return cssDisplay === "block" || cssDisplay === "list-item" || cssDisplay.startsWith("table");
+ }
- if (node.attrMap.type === "application/x-typescript" || node.attrMap.lang === "ts" || node.attrMap.lang === "tsx") {
- return "typescript";
- }
+ function isFirstChildLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+ return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+ }
- if (node.attrMap.type === "text/markdown") {
- return "markdown";
- }
+ function isLastChildTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+ return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+ }
- if (node.attrMap.type === "application/ld+json") {
- return "json";
- }
+ function isPrevTrailingSpaceSensitiveCssDisplay(cssDisplay) {
+ return !isBlockLikeCssDisplay(cssDisplay);
}
- if (node.name === "style") {
- if (!node.attrMap.lang || node.attrMap.lang === "postcss") {
- return "css";
- }
+ function isNextLeadingSpaceSensitiveCssDisplay(cssDisplay) {
+ return !isBlockLikeCssDisplay(cssDisplay);
+ }
- if (node.attrMap.lang === "scss") {
- return "scss";
- }
+ function isDanglingSpaceSensitiveCssDisplay(cssDisplay) {
+ return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
+ }
- if (node.attrMap.lang === "less") {
- return "less";
- }
+ function isPreLikeNode(node) {
+ return getNodeCssStyleWhiteSpace(node).startsWith("pre");
}
- return null;
-}
+ function countParents(path) {
+ var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
+ return true;
+ };
+ var counter = 0;
-function isBlockLikeCssDisplay(cssDisplay) {
- return cssDisplay === "block" || cssDisplay === "list-item" || cssDisplay.startsWith("table");
-}
+ for (var i = path.stack.length - 1; i >= 0; i--) {
+ var value = path.stack[i];
-function isFirstChildLeadingSpaceSensitiveCssDisplay(cssDisplay) {
- return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
-}
+ if (value && _typeof(value) === "object" && !Array.isArray(value) && predicate(value)) {
+ counter++;
+ }
+ }
-function isLastChildTrailingSpaceSensitiveCssDisplay(cssDisplay) {
- return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
-}
+ return counter;
+ }
-function isPrevTrailingSpaceSensitiveCssDisplay(cssDisplay) {
- return !isBlockLikeCssDisplay(cssDisplay);
-}
+ function hasParent(node, fn) {
+ var current = node;
+
+ while (current) {
+ if (fn(current)) {
+ return true;
+ }
-function isNextLeadingSpaceSensitiveCssDisplay(cssDisplay) {
- return !isBlockLikeCssDisplay(cssDisplay);
-}
+ current = current.parent;
+ }
-function isDanglingSpaceSensitiveCssDisplay(cssDisplay) {
- return !isBlockLikeCssDisplay(cssDisplay) && cssDisplay !== "inline-block";
-}
+ return false;
+ }
-function isPreLikeNode(node) {
- return getNodeCssStyleWhiteSpace(node).startsWith("pre");
-}
+ function getNodeCssStyleDisplay(node, options) {
+ if (node.prev && node.prev.type === "comment") {
+ // <!-- display: block -->
+ var match = node.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
-function countParents$1(path) {
- var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
- return true;
- };
- var counter = 0;
+ if (match) {
+ return match[1];
+ }
+ }
- for (var i = path.stack.length - 1; i >= 0; i--) {
- var value = path.stack[i];
+ var isInSvgForeignObject = false;
- if (value && _typeof(value) === "object" && !Array.isArray(value) && predicate(value)) {
- counter++;
+ if (node.type === "element" && node.namespace === "svg") {
+ if (hasParent(node, function (parent) {
+ return parent.fullName === "svg:foreignObject";
+ })) {
+ isInSvgForeignObject = true;
+ } else {
+ return node.name === "svg" ? "inline-block" : "block";
+ }
}
- }
- return counter;
-}
+ switch (options.htmlWhitespaceSensitivity) {
+ case "strict":
+ return "inline";
-function hasParent(node, fn) {
- var current = node;
+ case "ignore":
+ return "block";
- while (current) {
- if (fn(current)) {
- return true;
+ default:
+ return node.type === "element" && (!node.namespace || isInSvgForeignObject) && CSS_DISPLAY_TAGS[node.name] || CSS_DISPLAY_DEFAULT;
}
+ }
- current = current.parent;
+ function getNodeCssStyleWhiteSpace(node) {
+ return node.type === "element" && !node.namespace && CSS_WHITE_SPACE_TAGS[node.name] || CSS_WHITE_SPACE_DEFAULT;
}
- return false;
-}
+ function getMinIndentation(text) {
+ var minIndentation = Infinity;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
-function getNodeCssStyleDisplay(node, options) {
- if (node.prev && node.prev.type === "comment") {
- // <!-- display: block -->
- var match = node.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
+ try {
+ for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var lineText = _step2.value;
- if (match) {
- return match[1];
- }
- }
+ if (lineText.length === 0) {
+ continue;
+ }
- var isInSvgForeignObject = false;
+ if (/\S/.test(lineText[0])) {
+ return 0;
+ }
- if (node.type === "element" && node.namespace === "svg") {
- if (hasParent(node, function (parent) {
- return parent.fullName === "svg:foreignObject";
- })) {
- isInSvgForeignObject = true;
- } else {
- return node.name === "svg" ? "inline-block" : "block";
- }
- }
+ var indentation = lineText.match(/^\s*/)[0].length;
- switch (options.htmlWhitespaceSensitivity) {
- case "strict":
- return "inline";
+ if (lineText.length === indentation) {
+ continue;
+ }
- case "ignore":
- return "block";
+ if (indentation < minIndentation) {
+ minIndentation = indentation;
+ }
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
- default:
- return node.type === "element" && (!node.namespace || isInSvgForeignObject) && CSS_DISPLAY_TAGS[node.name] || CSS_DISPLAY_DEFAULT;
+ return minIndentation === Infinity ? 0 : minIndentation;
}
-}
-function getNodeCssStyleWhiteSpace(node) {
- return node.type === "element" && !node.namespace && CSS_WHITE_SPACE_TAGS[node.name] || CSS_WHITE_SPACE_DEFAULT;
-}
+ function dedentString(text) {
+ var minIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMinIndentation(text);
+ return minIndent === 0 ? text : text.split("\n").map(function (lineText) {
+ return lineText.slice(minIndent);
+ }).join("\n");
+ }
-function getMinIndentation(text) {
- var minIndentation = Infinity;
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ function normalizeParts(parts) {
+ var newParts = [];
+ var restParts = parts.slice();
- try {
- for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var lineText = _step2.value;
+ while (restParts.length !== 0) {
+ var part = restParts.shift();
- if (lineText.length === 0) {
+ if (!part) {
continue;
}
- if (/\S/.test(lineText[0])) {
- return 0;
+ if (part.type === "concat") {
+ Array.prototype.unshift.apply(restParts, part.parts);
+ continue;
}
- var indentation = lineText.match(/^\s*/)[0].length;
-
- if (lineText.length === indentation) {
+ if (newParts.length !== 0 && typeof newParts[newParts.length - 1] === "string" && typeof part === "string") {
+ newParts.push(newParts.pop() + part);
continue;
}
- if (indentation < minIndentation) {
- minIndentation = indentation;
- }
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
+ newParts.push(part);
}
+
+ return newParts;
}
- return minIndentation === Infinity ? 0 : minIndentation;
-}
-
-function dedentString$1(text) {
- var minIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMinIndentation(text);
- return minIndent === 0 ? text : text.split("\n").map(function (lineText) {
- return lineText.slice(minIndent);
- }).join("\n");
-}
+ function identity(x) {
+ return x;
+ }
-function normalizeParts$1(parts) {
- var newParts = [];
- var restParts = parts.slice();
+ function shouldNotPrintClosingTag(node, options) {
+ return !node.isSelfClosing && !node.endSourceSpan && (hasPrettierIgnore(node) || shouldPreserveContent(node.parent, options));
+ }
- while (restParts.length !== 0) {
- var part = restParts.shift();
+ function countChars(text, char) {
+ var counter = 0;
- if (!part) {
- continue;
- }
-
- if (part.type === "concat") {
- Array.prototype.unshift.apply(restParts, part.parts);
- continue;
- }
-
- if (newParts.length !== 0 && typeof newParts[newParts.length - 1] === "string" && typeof part === "string") {
- newParts.push(newParts.pop() + part);
- continue;
- }
-
- newParts.push(part);
- }
-
- return newParts;
-}
-
-function identity(x) {
- return x;
-}
-
-function shouldNotPrintClosingTag$1(node, options) {
- return !node.isSelfClosing && !node.endSourceSpan && (hasPrettierIgnore$1(node) || shouldPreserveContent$1(node.parent, options));
-}
-
-function countChars$1(text, char) {
- var counter = 0;
-
- for (var i = 0; i < text.length; i++) {
- if (text[i] === char) {
- counter++;
- }
- }
-
- return counter;
-}
-
-function unescapeQuoteEntities$1(text) {
- return text.replace(/&apos;/g, "'").replace(/&quot;/g, '"');
-}
-
-var utils$6 = {
- HTML_ELEMENT_ATTRIBUTES: HTML_ELEMENT_ATTRIBUTES,
- HTML_TAGS: HTML_TAGS,
- canHaveInterpolation: canHaveInterpolation,
- countChars: countChars$1,
- countParents: countParents$1,
- dedentString: dedentString$1,
- forceBreakChildren: forceBreakChildren$1,
- forceBreakContent: forceBreakContent$1,
- forceNextEmptyLine: forceNextEmptyLine$1,
- getLastDescendant: getLastDescendant$1,
- getNodeCssStyleDisplay: getNodeCssStyleDisplay,
- getNodeCssStyleWhiteSpace: getNodeCssStyleWhiteSpace,
- getPrettierIgnoreAttributeCommentData: getPrettierIgnoreAttributeCommentData$1,
- hasPrettierIgnore: hasPrettierIgnore$1,
- identity: identity,
- inferScriptParser: inferScriptParser$1,
- isDanglingSpaceSensitiveNode: isDanglingSpaceSensitiveNode,
- isFrontMatterNode: isFrontMatterNode,
- isIndentationSensitiveNode: isIndentationSensitiveNode,
- isLeadingSpaceSensitiveNode: isLeadingSpaceSensitiveNode,
- isPreLikeNode: isPreLikeNode,
- isScriptLikeTag: isScriptLikeTag$1,
- isTextLikeNode: isTextLikeNode$1,
- isTrailingSpaceSensitiveNode: isTrailingSpaceSensitiveNode,
- isWhitespaceSensitiveNode: isWhitespaceSensitiveNode,
- normalizeParts: normalizeParts$1,
- preferHardlineAsLeadingSpaces: preferHardlineAsLeadingSpaces$1,
- preferHardlineAsTrailingSpaces: preferHardlineAsTrailingSpaces,
- shouldNotPrintClosingTag: shouldNotPrintClosingTag$1,
- shouldPreserveContent: shouldPreserveContent$1,
- unescapeQuoteEntities: unescapeQuoteEntities$1
-};
-
-var canHaveInterpolation$1 = utils$6.canHaveInterpolation;
-var getNodeCssStyleDisplay$1 = utils$6.getNodeCssStyleDisplay;
-var isDanglingSpaceSensitiveNode$1 = utils$6.isDanglingSpaceSensitiveNode;
-var isIndentationSensitiveNode$1 = utils$6.isIndentationSensitiveNode;
-var isLeadingSpaceSensitiveNode$1 = utils$6.isLeadingSpaceSensitiveNode;
-var isTrailingSpaceSensitiveNode$1 = utils$6.isTrailingSpaceSensitiveNode;
-var isWhitespaceSensitiveNode$1 = utils$6.isWhitespaceSensitiveNode;
-var PREPROCESS_PIPELINE = [removeIgnorableFirstLf, mergeIeConditonalStartEndCommentIntoElementOpeningTag, mergeCdataIntoText, extractInterpolation, extractWhitespaces, addCssDisplay, addIsSelfClosing, addHasHtmComponentClosingTag, addIsSpaceSensitive, mergeSimpleElementIntoText];
-
-function preprocess(ast, options) {
- for (var _i = 0; _i < PREPROCESS_PIPELINE.length; _i++) {
- var fn = PREPROCESS_PIPELINE[_i];
- ast = fn(ast, options);
- }
-
- return ast;
-}
-
-function removeIgnorableFirstLf(ast
-/*, options */
-) {
- return ast.map(function (node) {
- if (node.type === "element" && node.tagDefinition.ignoreFirstLf && node.children.length !== 0 && node.children[0].type === "text" && node.children[0].value[0] === "\n") {
- var text = node.children[0];
- return node.clone({
- children: text.value.length === 1 ? node.children.slice(1) : [].concat(text.clone({
- value: text.value.slice(1)
- }), node.children.slice(1))
- });
+ for (var i = 0; i < text.length; i++) {
+ if (text[i] === char) {
+ counter++;
+ }
}
- return node;
- });
-}
-
-function mergeIeConditonalStartEndCommentIntoElementOpeningTag(ast
-/*, options */
-) {
- /**
- * <!--[if ...]><!--><target><!--<![endif]-->
- */
- var isTarget = function isTarget(node) {
- return node.type === "element" && node.prev && node.prev.type === "ieConditionalStartComment" && node.prev.sourceSpan.end.offset === node.startSourceSpan.start.offset && node.firstChild && node.firstChild.type === "ieConditionalEndComment" && node.firstChild.sourceSpan.start.offset === node.startSourceSpan.end.offset;
- };
-
- return ast.map(function (node) {
- if (node.children) {
- var isTargetResults = node.children.map(isTarget);
+ return counter;
+ }
- if (isTargetResults.some(Boolean)) {
- var newChildren = [];
+ function unescapeQuoteEntities(text) {
+ return text.replace(/&apos;/g, "'").replace(/&quot;/g, '"');
+ }
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
+ var utils$3 = {
+ HTML_ELEMENT_ATTRIBUTES: HTML_ELEMENT_ATTRIBUTES,
+ HTML_TAGS: HTML_TAGS,
+ canHaveInterpolation: canHaveInterpolation,
+ countChars: countChars,
+ countParents: countParents,
+ dedentString: dedentString,
+ forceBreakChildren: forceBreakChildren,
+ forceBreakContent: forceBreakContent,
+ forceNextEmptyLine: forceNextEmptyLine,
+ getLastDescendant: getLastDescendant,
+ getNodeCssStyleDisplay: getNodeCssStyleDisplay,
+ getNodeCssStyleWhiteSpace: getNodeCssStyleWhiteSpace,
+ getPrettierIgnoreAttributeCommentData: getPrettierIgnoreAttributeCommentData,
+ hasPrettierIgnore: hasPrettierIgnore,
+ identity: identity,
+ inferScriptParser: inferScriptParser,
+ isDanglingSpaceSensitiveNode: isDanglingSpaceSensitiveNode,
+ isFrontMatterNode: isFrontMatterNode,
+ isIndentationSensitiveNode: isIndentationSensitiveNode,
+ isLeadingSpaceSensitiveNode: isLeadingSpaceSensitiveNode,
+ isPreLikeNode: isPreLikeNode,
+ isScriptLikeTag: isScriptLikeTag,
+ isTextLikeNode: isTextLikeNode,
+ isTrailingSpaceSensitiveNode: isTrailingSpaceSensitiveNode,
+ isWhitespaceSensitiveNode: isWhitespaceSensitiveNode,
+ normalizeParts: normalizeParts,
+ preferHardlineAsLeadingSpaces: preferHardlineAsLeadingSpaces,
+ preferHardlineAsTrailingSpaces: preferHardlineAsTrailingSpaces,
+ shouldNotPrintClosingTag: shouldNotPrintClosingTag,
+ shouldPreserveContent: shouldPreserveContent,
+ unescapeQuoteEntities: unescapeQuoteEntities
+ };
- if (isTargetResults[i + 1]) {
- // ieConditionalStartComment
- continue;
- }
+ var canHaveInterpolation$1 = utils$3.canHaveInterpolation,
+ getNodeCssStyleDisplay$1 = utils$3.getNodeCssStyleDisplay,
+ isDanglingSpaceSensitiveNode$1 = utils$3.isDanglingSpaceSensitiveNode,
+ isIndentationSensitiveNode$1 = utils$3.isIndentationSensitiveNode,
+ isLeadingSpaceSensitiveNode$1 = utils$3.isLeadingSpaceSensitiveNode,
+ isTrailingSpaceSensitiveNode$1 = utils$3.isTrailingSpaceSensitiveNode,
+ isWhitespaceSensitiveNode$1 = utils$3.isWhitespaceSensitiveNode;
+ var PREPROCESS_PIPELINE = [removeIgnorableFirstLf, mergeIeConditonalStartEndCommentIntoElementOpeningTag, mergeCdataIntoText, extractInterpolation, extractWhitespaces, addCssDisplay, addIsSelfClosing, addHasHtmComponentClosingTag, addIsSpaceSensitive, mergeSimpleElementIntoText];
- if (isTargetResults[i]) {
- var ieConditionalStartComment = child.prev;
- var ieConditionalEndComment = child.firstChild;
- var ParseSourceSpan = child.sourceSpan.constructor;
- var startSourceSpan = new ParseSourceSpan(ieConditionalStartComment.sourceSpan.start, ieConditionalEndComment.sourceSpan.end);
- var sourceSpan = new ParseSourceSpan(startSourceSpan.start, child.sourceSpan.end);
- newChildren.push(child.clone({
- condition: ieConditionalStartComment.condition,
- sourceSpan: sourceSpan,
- startSourceSpan: startSourceSpan,
- children: child.children.slice(1)
- }));
- continue;
- }
+ function preprocess(ast, options) {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- newChildren.push(child);
+ try {
+ for (var _iterator = PREPROCESS_PIPELINE[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var fn = _step.value;
+ ast = fn(ast, options);
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
}
+ }
+ }
+
+ return ast;
+ }
+ function removeIgnorableFirstLf(ast
+ /*, options */
+ ) {
+ return ast.map(function (node) {
+ if (node.type === "element" && node.tagDefinition.ignoreFirstLf && node.children.length !== 0 && node.children[0].type === "text" && node.children[0].value[0] === "\n") {
+ var text = node.children[0];
return node.clone({
- children: newChildren
+ children: text.value.length === 1 ? node.children.slice(1) : [].concat(text.clone({
+ value: text.value.slice(1)
+ }), node.children.slice(1))
});
}
- }
- return node;
- });
-}
+ return node;
+ });
+ }
-function mergeNodeIntoText(ast, shouldMerge, getValue) {
- return ast.map(function (node) {
- if (node.children) {
- var shouldMergeResults = node.children.map(shouldMerge);
+ function mergeIeConditonalStartEndCommentIntoElementOpeningTag(ast
+ /*, options */
+ ) {
+ /**
+ * <!--[if ...]><!--><target><!--<![endif]-->
+ */
+ var isTarget = function isTarget(node) {
+ return node.type === "element" && node.prev && node.prev.type === "ieConditionalStartComment" && node.prev.sourceSpan.end.offset === node.startSourceSpan.start.offset && node.firstChild && node.firstChild.type === "ieConditionalEndComment" && node.firstChild.sourceSpan.start.offset === node.startSourceSpan.end.offset;
+ };
- if (shouldMergeResults.some(Boolean)) {
- var newChildren = [];
+ return ast.map(function (node) {
+ if (node.children) {
+ var isTargetResults = node.children.map(isTarget);
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
+ if (isTargetResults.some(Boolean)) {
+ var newChildren = [];
+
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+
+ if (isTargetResults[i + 1]) {
+ // ieConditionalStartComment
+ continue;
+ }
+
+ if (isTargetResults[i]) {
+ var ieConditionalStartComment = child.prev;
+ var ieConditionalEndComment = child.firstChild;
+ var ParseSourceSpan = child.sourceSpan.constructor;
+ var startSourceSpan = new ParseSourceSpan(ieConditionalStartComment.sourceSpan.start, ieConditionalEndComment.sourceSpan.end);
+ var sourceSpan = new ParseSourceSpan(startSourceSpan.start, child.sourceSpan.end);
+ newChildren.push(child.clone({
+ condition: ieConditionalStartComment.condition,
+ sourceSpan: sourceSpan,
+ startSourceSpan: startSourceSpan,
+ children: child.children.slice(1)
+ }));
+ continue;
+ }
- if (child.type !== "text" && !shouldMergeResults[i]) {
newChildren.push(child);
- continue;
}
- var newChild = child.type === "text" ? child : child.clone({
- type: "text",
- value: getValue(child)
+ return node.clone({
+ children: newChildren
});
+ }
+ }
- if (newChildren.length === 0 || newChildren[newChildren.length - 1].type !== "text") {
- newChildren.push(newChild);
- continue;
- }
+ return node;
+ });
+ }
- var lastChild = newChildren.pop();
- var ParseSourceSpan = lastChild.sourceSpan.constructor;
- newChildren.push(lastChild.clone({
- value: lastChild.value + newChild.value,
- sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, newChild.sourceSpan.end)
- }));
- }
+ function mergeNodeIntoText(ast, shouldMerge, getValue) {
+ return ast.map(function (node) {
+ if (node.children) {
+ var shouldMergeResults = node.children.map(shouldMerge);
- return node.clone({
- children: newChildren
- });
- }
- }
+ if (shouldMergeResults.some(Boolean)) {
+ var newChildren = [];
- return node;
- });
-}
-
-function mergeCdataIntoText(ast
-/*, options */
-) {
- return mergeNodeIntoText(ast, function (node) {
- return node.type === "cdata";
- }, function (node) {
- return "<![CDATA[".concat(node.value, "]]>");
- });
-}
-
-function mergeSimpleElementIntoText(ast
-/*, options */
-) {
- var isSimpleElement = function isSimpleElement(node) {
- return node.type === "element" && node.attrs.length === 0 && node.children.length === 1 && node.firstChild.type === "text" && // \xA0: non-breaking whitespace
- !/[^\S\xA0]/.test(node.children[0].value) && !node.firstChild.hasLeadingSpaces && !node.firstChild.hasTrailingSpaces && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces && node.prev && node.prev.type === "text" && node.next && node.next.type === "text";
- };
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
- return ast.map(function (node) {
- if (node.children) {
- var isSimpleElementResults = node.children.map(isSimpleElement);
+ if (child.type !== "text" && !shouldMergeResults[i]) {
+ newChildren.push(child);
+ continue;
+ }
- if (isSimpleElementResults.some(Boolean)) {
- var newChildren = [];
+ var newChild = child.type === "text" ? child : child.clone({
+ type: "text",
+ value: getValue(child)
+ });
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
+ if (newChildren.length === 0 || newChildren[newChildren.length - 1].type !== "text") {
+ newChildren.push(newChild);
+ continue;
+ }
- if (isSimpleElementResults[i]) {
var lastChild = newChildren.pop();
- var nextChild = node.children[++i];
- var ParseSourceSpan = node.sourceSpan.constructor;
- var isTrailingSpaceSensitive = nextChild.isTrailingSpaceSensitive,
- hasTrailingSpaces = nextChild.hasTrailingSpaces;
+ var ParseSourceSpan = lastChild.sourceSpan.constructor;
newChildren.push(lastChild.clone({
- value: lastChild.value + "<".concat(child.rawName, ">") + child.firstChild.value + "</".concat(child.rawName, ">") + nextChild.value,
- sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, nextChild.sourceSpan.end),
- isTrailingSpaceSensitive: isTrailingSpaceSensitive,
- hasTrailingSpaces: hasTrailingSpaces
+ value: lastChild.value + newChild.value,
+ sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, newChild.sourceSpan.end)
}));
- } else {
- newChildren.push(child);
}
- }
- return node.clone({
- children: newChildren
- });
+ return node.clone({
+ children: newChildren
+ });
+ }
}
- }
- return node;
- });
-}
-
-function extractInterpolation(ast, options) {
- if (options.parser === "html") {
- return ast;
+ return node;
+ });
}
- var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
- return ast.map(function (node) {
- if (!canHaveInterpolation$1(node)) {
- return node;
- }
+ function mergeCdataIntoText(ast
+ /*, options */
+ ) {
+ return mergeNodeIntoText(ast, function (node) {
+ return node.type === "cdata";
+ }, function (node) {
+ return "<![CDATA[".concat(node.value, "]]>");
+ });
+ }
- var newChildren = [];
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ function mergeSimpleElementIntoText(ast
+ /*, options */
+ ) {
+ var isSimpleElement = function isSimpleElement(node) {
+ return node.type === "element" && node.attrs.length === 0 && node.children.length === 1 && node.firstChild.type === "text" && // \xA0: non-breaking whitespace
+ !/[^\S\xA0]/.test(node.children[0].value) && !node.firstChild.hasLeadingSpaces && !node.firstChild.hasTrailingSpaces && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces && node.prev && node.prev.type === "text" && node.next && node.next.type === "text";
+ };
- try {
- for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var child = _step.value;
+ return ast.map(function (node) {
+ if (node.children) {
+ var isSimpleElementResults = node.children.map(isSimpleElement);
+
+ if (isSimpleElementResults.some(Boolean)) {
+ var newChildren = [];
+
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+
+ if (isSimpleElementResults[i]) {
+ var lastChild = newChildren.pop();
+ var nextChild = node.children[++i];
+ var ParseSourceSpan = node.sourceSpan.constructor;
+ var isTrailingSpaceSensitive = nextChild.isTrailingSpaceSensitive,
+ hasTrailingSpaces = nextChild.hasTrailingSpaces;
+ newChildren.push(lastChild.clone({
+ value: lastChild.value + "<".concat(child.rawName, ">") + child.firstChild.value + "</".concat(child.rawName, ">") + nextChild.value,
+ sourceSpan: new ParseSourceSpan(lastChild.sourceSpan.start, nextChild.sourceSpan.end),
+ isTrailingSpaceSensitive: isTrailingSpaceSensitive,
+ hasTrailingSpaces: hasTrailingSpaces
+ }));
+ } else {
+ newChildren.push(child);
+ }
+ }
- if (child.type !== "text") {
- newChildren.push(child);
- continue;
+ return node.clone({
+ children: newChildren
+ });
}
+ }
- var ParseSourceSpan = child.sourceSpan.constructor;
- var startSourceSpan = child.sourceSpan.start;
- var endSourceSpan = null;
- var components = child.value.split(interpolationRegex);
+ return node;
+ });
+ }
- for (var i = 0; i < components.length; i++, startSourceSpan = endSourceSpan) {
- var value = components[i];
+ function extractInterpolation(ast, options) {
+ if (options.parser === "html") {
+ return ast;
+ }
- if (i % 2 === 0) {
- endSourceSpan = startSourceSpan.moveBy(value.length);
+ var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
+ return ast.map(function (node) {
+ if (!canHaveInterpolation$1(node)) {
+ return node;
+ }
- if (value.length !== 0) {
- newChildren.push({
- type: "text",
- value: value,
- sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan)
- });
- }
+ var newChildren = [];
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+ try {
+ for (var _iterator2 = node.children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var child = _step2.value;
+
+ if (child.type !== "text") {
+ newChildren.push(child);
continue;
}
- endSourceSpan = startSourceSpan.moveBy(value.length + 4); // `{{` + `}}`
+ var ParseSourceSpan = child.sourceSpan.constructor;
+ var startSourceSpan = child.sourceSpan.start;
+ var endSourceSpan = null;
+ var components = child.value.split(interpolationRegex);
- newChildren.push({
- type: "interpolation",
- sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan),
- children: value.length === 0 ? [] : [{
- type: "text",
- value: value,
- sourceSpan: new ParseSourceSpan(startSourceSpan.moveBy(2), endSourceSpan.moveBy(-2))
- }]
- });
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var i = 0; i < components.length; i++, startSourceSpan = endSourceSpan) {
+ var value = components[i];
+
+ if (i % 2 === 0) {
+ endSourceSpan = startSourceSpan.moveBy(value.length);
+
+ if (value.length !== 0) {
+ newChildren.push({
+ type: "text",
+ value: value,
+ sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan)
+ });
+ }
+
+ continue;
+ }
+
+ endSourceSpan = startSourceSpan.moveBy(value.length + 4); // `{{` + `}}`
+
+ newChildren.push({
+ type: "interpolation",
+ sourceSpan: new ParseSourceSpan(startSourceSpan, endSourceSpan),
+ children: value.length === 0 ? [] : [{
+ type: "text",
+ value: value,
+ sourceSpan: new ParseSourceSpan(startSourceSpan.moveBy(2), endSourceSpan.moveBy(-2))
+ }]
+ });
+ }
}
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
}
- }
- return node.clone({
- children: newChildren
+ return node.clone({
+ children: newChildren
+ });
});
- });
-}
-/**
- * - add `hasLeadingSpaces` field
- * - add `hasTrailingSpaces` field
- * - add `hasDanglingSpaces` field for parent nodes
- * - add `isWhitespaceSensitive`, `isIndentationSensitive` field for text nodes
- * - remove insensitive whitespaces
- */
+ }
+ /**
+ * - add `hasLeadingSpaces` field
+ * - add `hasTrailingSpaces` field
+ * - add `hasDanglingSpaces` field for parent nodes
+ * - add `isWhitespaceSensitive`, `isIndentationSensitive` field for text nodes
+ * - remove insensitive whitespaces
+ */
-function extractWhitespaces(ast
-/*, options*/
-) {
- var TYPE_WHITESPACE = "whitespace";
- return ast.map(function (node) {
- if (!node.children) {
- return node;
- }
+ function extractWhitespaces(ast
+ /*, options*/
+ ) {
+ var TYPE_WHITESPACE = "whitespace";
+ return ast.map(function (node) {
+ if (!node.children) {
+ return node;
+ }
- if (node.children.length === 0 || node.children.length === 1 && node.children[0].type === "text" && node.children[0].value.trim().length === 0) {
- return node.clone({
- children: [],
- hasDanglingSpaces: node.children.length !== 0
- });
- }
+ if (node.children.length === 0 || node.children.length === 1 && node.children[0].type === "text" && node.children[0].value.trim().length === 0) {
+ return node.clone({
+ children: [],
+ hasDanglingSpaces: node.children.length !== 0
+ });
+ }
- var isWhitespaceSensitive = isWhitespaceSensitiveNode$1(node);
- var isIndentationSensitive = isIndentationSensitiveNode$1(node);
- return node.clone({
- isWhitespaceSensitive: isWhitespaceSensitive,
- isIndentationSensitive: isIndentationSensitive,
- children: node.children // extract whitespace nodes
- .reduce(function (newChildren, child) {
- if (child.type !== "text" || isWhitespaceSensitive) {
- return newChildren.concat(child);
- }
+ var isWhitespaceSensitive = isWhitespaceSensitiveNode$1(node);
+ var isIndentationSensitive = isIndentationSensitiveNode$1(node);
+ return node.clone({
+ isWhitespaceSensitive: isWhitespaceSensitive,
+ isIndentationSensitive: isIndentationSensitive,
+ children: node.children // extract whitespace nodes
+ .reduce(function (newChildren, child) {
+ if (child.type !== "text" || isWhitespaceSensitive) {
+ return newChildren.concat(child);
+ }
- var localChildren = [];
+ var localChildren = [];
- var _child$value$match = child.value.match(/^(\s*)([\s\S]*?)(\s*)$/),
- _child$value$match2 = _slicedToArray(_child$value$match, 4),
- leadingSpaces = _child$value$match2[1],
- text = _child$value$match2[2],
- trailingSpaces = _child$value$match2[3];
+ var _child$value$match = child.value.match(/^(\s*)([\s\S]*?)(\s*)$/),
+ _child$value$match2 = _slicedToArray(_child$value$match, 4),
+ leadingSpaces = _child$value$match2[1],
+ text = _child$value$match2[2],
+ trailingSpaces = _child$value$match2[3];
- if (leadingSpaces) {
- localChildren.push({
- type: TYPE_WHITESPACE
- });
- }
+ if (leadingSpaces) {
+ localChildren.push({
+ type: TYPE_WHITESPACE
+ });
+ }
- var ParseSourceSpan = child.sourceSpan.constructor;
+ var ParseSourceSpan = child.sourceSpan.constructor;
- if (text) {
- localChildren.push({
- type: "text",
- value: text,
- sourceSpan: new ParseSourceSpan(child.sourceSpan.start.moveBy(leadingSpaces.length), child.sourceSpan.end.moveBy(-trailingSpaces.length))
- });
- }
+ if (text) {
+ localChildren.push({
+ type: "text",
+ value: text,
+ sourceSpan: new ParseSourceSpan(child.sourceSpan.start.moveBy(leadingSpaces.length), child.sourceSpan.end.moveBy(-trailingSpaces.length))
+ });
+ }
- if (trailingSpaces) {
- localChildren.push({
- type: TYPE_WHITESPACE
- });
- }
+ if (trailingSpaces) {
+ localChildren.push({
+ type: TYPE_WHITESPACE
+ });
+ }
- return newChildren.concat(localChildren);
- }, []) // set hasLeadingSpaces/hasTrailingSpaces and filter whitespace nodes
- .reduce(function (newChildren, child, i, children) {
- if (child.type === TYPE_WHITESPACE) {
- return newChildren;
- }
+ return newChildren.concat(localChildren);
+ }, []) // set hasLeadingSpaces/hasTrailingSpaces and filter whitespace nodes
+ .reduce(function (newChildren, child, i, children) {
+ if (child.type === TYPE_WHITESPACE) {
+ return newChildren;
+ }
- var hasLeadingSpaces = i !== 0 && children[i - 1].type === TYPE_WHITESPACE;
- var hasTrailingSpaces = i !== children.length - 1 && children[i + 1].type === TYPE_WHITESPACE;
- return newChildren.concat(Object.assign({}, child, {
- hasLeadingSpaces: hasLeadingSpaces,
- hasTrailingSpaces: hasTrailingSpaces
- }));
- }, [])
+ var hasLeadingSpaces = i !== 0 && children[i - 1].type === TYPE_WHITESPACE;
+ var hasTrailingSpaces = i !== children.length - 1 && children[i + 1].type === TYPE_WHITESPACE;
+ return newChildren.concat(Object.assign({}, child, {
+ hasLeadingSpaces: hasLeadingSpaces,
+ hasTrailingSpaces: hasTrailingSpaces
+ }));
+ }, [])
+ });
});
- });
-}
-
-function addIsSelfClosing(ast
-/*, options */
-) {
- return ast.map(function (node) {
- return Object.assign(node, {
- isSelfClosing: !node.children || node.type === "element" && (node.tagDefinition.isVoid || // self-closing
- node.startSourceSpan === node.endSourceSpan)
+ }
+
+ function addIsSelfClosing(ast
+ /*, options */
+ ) {
+ return ast.map(function (node) {
+ return Object.assign(node, {
+ isSelfClosing: !node.children || node.type === "element" && (node.tagDefinition.isVoid || // self-closing
+ node.startSourceSpan === node.endSourceSpan)
+ });
});
- });
-}
+ }
-function addHasHtmComponentClosingTag(ast, options) {
- return ast.map(function (node) {
- return node.type !== "element" ? node : Object.assign(node, {
- hasHtmComponentClosingTag: node.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(options.originalText.slice(node.endSourceSpan.start.offset, node.endSourceSpan.end.offset))
+ function addHasHtmComponentClosingTag(ast, options) {
+ return ast.map(function (node) {
+ return node.type !== "element" ? node : Object.assign(node, {
+ hasHtmComponentClosingTag: node.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(options.originalText.slice(node.endSourceSpan.start.offset, node.endSourceSpan.end.offset))
+ });
});
- });
-}
+ }
-function addCssDisplay(ast, options) {
- return ast.map(function (node) {
- return Object.assign(node, {
- cssDisplay: getNodeCssStyleDisplay$1(node, options)
+ function addCssDisplay(ast, options) {
+ return ast.map(function (node) {
+ return Object.assign(node, {
+ cssDisplay: getNodeCssStyleDisplay$1(node, options)
+ });
});
- });
-}
-/**
- * - add `isLeadingSpaceSensitive` field
- * - add `isTrailingSpaceSensitive` field
- * - add `isDanglingSpaceSensitive` field for parent nodes
- */
+ }
+ /**
+ * - add `isLeadingSpaceSensitive` field
+ * - add `isTrailingSpaceSensitive` field
+ * - add `isDanglingSpaceSensitive` field for parent nodes
+ */
-function addIsSpaceSensitive(ast
-/*, options */
-) {
- return ast.map(function (node) {
- if (!node.children) {
- return node;
- }
+ function addIsSpaceSensitive(ast
+ /*, options */
+ ) {
+ return ast.map(function (node) {
+ if (!node.children) {
+ return node;
+ }
+
+ if (node.children.length === 0) {
+ return node.clone({
+ isDanglingSpaceSensitive: isDanglingSpaceSensitiveNode$1(node)
+ });
+ }
- if (node.children.length === 0) {
return node.clone({
- isDanglingSpaceSensitive: isDanglingSpaceSensitiveNode$1(node)
+ children: node.children.map(function (child) {
+ return Object.assign({}, child, {
+ isLeadingSpaceSensitive: isLeadingSpaceSensitiveNode$1(child),
+ isTrailingSpaceSensitive: isTrailingSpaceSensitiveNode$1(child)
+ });
+ }).map(function (child, index, children) {
+ return Object.assign({}, child, {
+ isLeadingSpaceSensitive: index === 0 ? child.isLeadingSpaceSensitive : children[index - 1].isTrailingSpaceSensitive && child.isLeadingSpaceSensitive,
+ isTrailingSpaceSensitive: index === children.length - 1 ? child.isTrailingSpaceSensitive : children[index + 1].isLeadingSpaceSensitive && child.isTrailingSpaceSensitive
+ });
+ })
});
- }
-
- return node.clone({
- children: node.children.map(function (child) {
- return Object.assign({}, child, {
- isLeadingSpaceSensitive: isLeadingSpaceSensitiveNode$1(child),
- isTrailingSpaceSensitive: isTrailingSpaceSensitiveNode$1(child)
- });
- }).map(function (child, index, children) {
- return Object.assign({}, child, {
- isLeadingSpaceSensitive: index === 0 ? child.isLeadingSpaceSensitive : children[index - 1].isTrailingSpaceSensitive && child.isLeadingSpaceSensitive,
- isTrailingSpaceSensitive: index === children.length - 1 ? child.isTrailingSpaceSensitive : children[index + 1].isLeadingSpaceSensitive && child.isTrailingSpaceSensitive
- });
- })
});
- });
-}
+ }
-var preprocess_1 = preprocess;
+ var preprocess_1 = preprocess;
-function hasPragma$3(text) {
- return /^\s*<!--\s*@(format|prettier)\s*-->/.test(text);
-}
+ function hasPragma$3(text) {
+ return /^\s*<!--\s*@(format|prettier)\s*-->/.test(text);
+ }
-function insertPragma$6(text) {
- return "<!-- @format -->\n\n" + text.replace(/^\s*\n/, "");
-}
+ function insertPragma$5(text) {
+ return "<!-- @format -->\n\n" + text.replace(/^\s*\n/, "");
+ }
-var pragma$6 = {
- hasPragma: hasPragma$3,
- insertPragma: insertPragma$6
-};
+ var pragma$3 = {
+ hasPragma: hasPragma$3,
+ insertPragma: insertPragma$5
+ };
-var _require$$0$builders$4 = doc.builders;
-var concat$9 = _require$$0$builders$4.concat;
-var group$9 = _require$$0$builders$4.group;
-/**
- * v-for="... in ..."
- * v-for="... of ..."
- * v-for="(..., ...) in ..."
- * v-for="(..., ...) of ..."
- */
+ var _require$$0$builders$4 = doc.builders,
+ concat$8 = _require$$0$builders$4.concat,
+ group$8 = _require$$0$builders$4.group;
+ /**
+ * v-for="... in ..."
+ * v-for="... of ..."
+ * v-for="(..., ...) in ..."
+ * v-for="(..., ...) of ..."
+ */
-function printVueFor$1(value, textToDoc) {
- var _parseVueFor = parseVueFor(value),
- left = _parseVueFor.left,
- operator = _parseVueFor.operator,
- right = _parseVueFor.right;
+ function printVueFor(value, textToDoc) {
+ var _parseVueFor = parseVueFor(value),
+ left = _parseVueFor.left,
+ operator = _parseVueFor.operator,
+ right = _parseVueFor.right;
+
+ return concat$8([group$8(textToDoc("function _(".concat(left, ") {}"), {
+ parser: "babel",
+ __isVueForBindingLeft: true
+ })), " ", operator, " ", textToDoc(right, {
+ parser: "__js_expression"
+ })]);
+ } // modified from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/parser/index.js#L370-L387
- return concat$9([group$9(textToDoc("function _(".concat(left, ") {}"), {
- parser: "babel",
- __isVueForBindingLeft: true
- })), " ", operator, " ", textToDoc(right, {
- parser: "__js_expression"
- })]);
-} // modified from https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/parser/index.js#L370-L387
+ function parseVueFor(value) {
+ var forAliasRE = /([^]*?)\s+(in|of)\s+([^]*)/;
+ var forIteratorRE = /,([^,}\]]*)(?:,([^,}\]]*))?$/;
+ var stripParensRE = /^\(|\)$/g;
+ var inMatch = value.match(forAliasRE);
-function parseVueFor(value) {
- var forAliasRE = /([^]*?)\s+(in|of)\s+([^]*)/;
- var forIteratorRE = /,([^,}\]]*)(?:,([^,}\]]*))?$/;
- var stripParensRE = /^\(|\)$/g;
- var inMatch = value.match(forAliasRE);
+ if (!inMatch) {
+ return;
+ }
- if (!inMatch) {
- return;
+ var res = {};
+ res.for = inMatch[3].trim();
+ var alias = inMatch[1].trim().replace(stripParensRE, "");
+ var iteratorMatch = alias.match(forIteratorRE);
+
+ if (iteratorMatch) {
+ res.alias = alias.replace(forIteratorRE, "");
+ res.iterator1 = iteratorMatch[1].trim();
+
+ if (iteratorMatch[2]) {
+ res.iterator2 = iteratorMatch[2].trim();
+ }
+ } else {
+ res.alias = alias;
+ }
+
+ return {
+ left: "".concat([res.alias, res.iterator1, res.iterator2].filter(Boolean).join(",")),
+ operator: inMatch[2],
+ right: res.for
+ };
+ }
+
+ function printVueSlotScope(value, textToDoc) {
+ return textToDoc("function _(".concat(value, ") {}"), {
+ parser: "babel",
+ __isVueSlotScope: true
+ });
}
- var res = {};
- res.for = inMatch[3].trim();
- var alias = inMatch[1].trim().replace(stripParensRE, "");
- var iteratorMatch = alias.match(forIteratorRE);
+ function isVueEventBindingExpression(eventBindingValue) {
+ // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/codegen/events.js#L3-L4
+ // arrow function or anonymous function
+ var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; // simple member expression chain (a, a.b, a['b'], a["b"], a[0], a[b])
- if (iteratorMatch) {
- res.alias = alias.replace(forIteratorRE, "");
- res.iterator1 = iteratorMatch[1].trim();
+ var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104
- if (iteratorMatch[2]) {
- res.iterator2 = iteratorMatch[2].trim();
- }
- } else {
- res.alias = alias;
+ var value = eventBindingValue.trim();
+ return fnExpRE.test(value) || simplePathRE.test(value);
}
- return {
- left: "".concat([res.alias, res.iterator1, res.iterator2].filter(Boolean).join(",")),
- operator: inMatch[2],
- right: res.for
+ var syntaxVue = {
+ isVueEventBindingExpression: isVueEventBindingExpression,
+ printVueFor: printVueFor,
+ printVueSlotScope: printVueSlotScope
};
-}
-function printVueSlotScope$1(value, textToDoc) {
- return textToDoc("function _(".concat(value, ") {}"), {
- parser: "babel",
- __isVueSlotScope: true
- });
-}
+ var parseSrcset = createCommonjsModule(function (module) {
+ /**
+ * Srcset Parser
+ *
+ * By Alex Bell | MIT License
+ *
+ * JS Parser for the string value that appears in markup <img srcset="here">
+ *
+ * @returns Array [{url: _, d: _, w: _, h:_}, ...]
+ *
+ * Based super duper closely on the reference algorithm at:
+ * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
+ *
+ * Most comments are copied in directly from the spec
+ * (except for comments in parens).
+ */
+ (function (root, factory) {
+ if ( module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals (root is window)
+ root.parseSrcset = factory();
+ }
+ })(commonjsGlobal, function () {
+ // 1. Let input be the value passed to this algorithm.
+ return function (input, options) {
+ var logger = options && options.logger || console; // UTILITY FUNCTIONS
+ // Manual is faster than RegEx
+ // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
+ // http://jsperf.com/whitespace-character/5
+
+ function isSpace(c) {
+ return c === " " || // space
+ c === "\t" || // horizontal tab
+ c === "\n" || // new line
+ c === "\f" || // form feed
+ c === "\r"; // carriage return
+ }
+
+ function collectCharacters(regEx) {
+ var chars,
+ match = regEx.exec(input.substring(pos));
+
+ if (match) {
+ chars = match[0];
+ pos += chars.length;
+ return chars;
+ }
+ }
-function isVueEventBindingExpression$1(eventBindingValue) {
- // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/codegen/events.js#L3-L4
- // arrow function or anonymous function
- var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; // simple member expression chain (a, a.b, a['b'], a["b"], a[0], a[b])
+ var inputLength = input.length,
+ // (Don't use \s, to avoid matching non-breaking space)
+ regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
+ regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
+ regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
+ regexTrailingCommas = /[,]+$/,
+ regexNonNegativeInteger = /^\d+$/,
+ // ( Positive or negative or unsigned integers or decimals, without or without exponents.
+ // Must include at least one digit.
+ // According to spec tests any decimal point must be followed by a digit.
+ // No leading plus sign is allowed.)
+ // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
+ regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,
+ url,
+ descriptors,
+ currentDescriptor,
+ state,
+ c,
+ // 2. Let position be a pointer into input, initially pointing at the start
+ // of the string.
+ pos = 0,
+ // 3. Let candidates be an initially empty source set.
+ candidates = []; // 4. Splitting loop: Collect a sequence of characters that are space
+ // characters or U+002C COMMA characters. If any U+002C COMMA characters
+ // were collected, that is a parse error.
- var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; // https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104
+ while (true) {
+ collectCharacters(regexLeadingCommasOrSpaces); // 5. If position is past the end of input, return candidates and abort these steps.
- var value = eventBindingValue.trim();
- return fnExpRE.test(value) || simplePathRE.test(value);
-}
+ if (pos >= inputLength) {
+ return candidates; // (we're done, this is the sole return path)
+ } // 6. Collect a sequence of characters that are not space characters,
+ // and let that be url.
-var syntaxVue = {
- isVueEventBindingExpression: isVueEventBindingExpression$1,
- printVueFor: printVueFor$1,
- printVueSlotScope: printVueSlotScope$1
-};
-var parseSrcset = createCommonjsModule(function (module) {
- /**
- * Srcset Parser
- *
- * By Alex Bell | MIT License
- *
- * JS Parser for the string value that appears in markup <img srcset="here">
- *
- * @returns Array [{url: _, d: _, w: _, h:_}, ...]
- *
- * Based super duper closely on the reference algorithm at:
- * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
- *
- * Most comments are copied in directly from the spec
- * (except for comments in parens).
- */
- (function (root, factory) {
- if (typeof undefined === 'function' && undefined.amd) {
- // AMD. Register as an anonymous module.
- undefined([], factory);
- } else if ('object' === 'object' && module.exports) {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
- } else {
- // Browser globals (root is window)
- root.parseSrcset = factory();
- }
- })(commonjsGlobal, function () {
- // 1. Let input be the value passed to this algorithm.
- return function (input, options) {
- var logger = options && options.logger || console; // UTILITY FUNCTIONS
- // Manual is faster than RegEx
- // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
- // http://jsperf.com/whitespace-character/5
-
- function isSpace(c) {
- return c === " " || // space
- c === "\t" || // horizontal tab
- c === "\n" || // new line
- c === "\f" || // form feed
- c === "\r"; // carriage return
- }
-
- function collectCharacters(regEx) {
- var chars,
- match = regEx.exec(input.substring(pos));
-
- if (match) {
- chars = match[0];
- pos += chars.length;
- return chars;
- }
- }
-
- var inputLength = input.length,
- // (Don't use \s, to avoid matching non-breaking space)
- regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
- regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
- regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
- regexTrailingCommas = /[,]+$/,
- regexNonNegativeInteger = /^\d+$/,
- // ( Positive or negative or unsigned integers or decimals, without or without exponents.
- // Must include at least one digit.
- // According to spec tests any decimal point must be followed by a digit.
- // No leading plus sign is allowed.)
- // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
- regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,
- url,
- descriptors,
- currentDescriptor,
- state,
- c,
- // 2. Let position be a pointer into input, initially pointing at the start
- // of the string.
- pos = 0,
- // 3. Let candidates be an initially empty source set.
- candidates = []; // 4. Splitting loop: Collect a sequence of characters that are space
- // characters or U+002C COMMA characters. If any U+002C COMMA characters
- // were collected, that is a parse error.
-
- while (true) {
- collectCharacters(regexLeadingCommasOrSpaces); // 5. If position is past the end of input, return candidates and abort these steps.
-
- if (pos >= inputLength) {
- return candidates; // (we're done, this is the sole return path)
- } // 6. Collect a sequence of characters that are not space characters,
- // and let that be url.
-
-
- url = collectCharacters(regexLeadingNotSpaces); // 7. Let descriptors be a new empty list.
-
- descriptors = []; // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
- // (1). Remove all trailing U+002C COMMA characters from url. If this removed
- // more than one character, that is a parse error.
-
- if (url.slice(-1) === ",") {
- url = url.replace(regexTrailingCommas, ""); // (Jump ahead to step 9 to skip tokenization and just push the candidate).
-
- parseDescriptors(); // Otherwise, follow these substeps:
- } else {
- tokenize();
- } // (close else of step 8)
- // 16. Return to the step labeled splitting loop.
+ url = collectCharacters(regexLeadingNotSpaces); // 7. Let descriptors be a new empty list.
- } // (Close of big while loop.)
+ descriptors = []; // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
+ // (1). Remove all trailing U+002C COMMA characters from url. If this removed
+ // more than one character, that is a parse error.
- /**
- * Tokenizes descriptor properties prior to parsing
- * Returns undefined.
- */
+ if (url.slice(-1) === ",") {
+ url = url.replace(regexTrailingCommas, ""); // (Jump ahead to step 9 to skip tokenization and just push the candidate).
+ parseDescriptors(); // Otherwise, follow these substeps:
+ } else {
+ tokenize();
+ } // (close else of step 8)
+ // 16. Return to the step labeled splitting loop.
- function tokenize() {
- // 8.1. Descriptor tokeniser: Skip whitespace
- collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.
+ } // (Close of big while loop.)
- currentDescriptor = ""; // 8.3. Let state be in descriptor.
+ /**
+ * Tokenizes descriptor properties prior to parsing
+ * Returns undefined.
+ */
- state = "in descriptor";
- while (true) {
- // 8.4. Let c be the character at position.
- c = input.charAt(pos); // Do the following depending on the value of state.
- // For the purpose of this step, "EOF" is a special character representing
- // that position is past the end of input.
- // In descriptor
-
- if (state === "in descriptor") {
- // Do the following, depending on the value of c:
- // Space character
- // If current descriptor is not empty, append current descriptor to
- // descriptors and let current descriptor be the empty string.
- // Set state to after descriptor.
- if (isSpace(c)) {
- if (currentDescriptor) {
- descriptors.push(currentDescriptor);
- currentDescriptor = "";
- state = "after descriptor";
- } // U+002C COMMA (,)
- // Advance position to the next character in input. If current descriptor
- // is not empty, append current descriptor to descriptors. Jump to the step
- // labeled descriptor parser.
+ function tokenize() {
+ // 8.1. Descriptor tokeniser: Skip whitespace
+ collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.
- } else if (c === ",") {
- pos += 1;
+ currentDescriptor = ""; // 8.3. Let state be in descriptor.
- if (currentDescriptor) {
- descriptors.push(currentDescriptor);
- }
+ state = "in descriptor";
+
+ while (true) {
+ // 8.4. Let c be the character at position.
+ c = input.charAt(pos); // Do the following depending on the value of state.
+ // For the purpose of this step, "EOF" is a special character representing
+ // that position is past the end of input.
+ // In descriptor
- parseDescriptors();
- return; // U+0028 LEFT PARENTHESIS (()
- // Append c to current descriptor. Set state to in parens.
- } else if (c === "(") {
- currentDescriptor = currentDescriptor + c;
- state = "in parens"; // EOF
+ if (state === "in descriptor") {
+ // Do the following, depending on the value of c:
+ // Space character
// If current descriptor is not empty, append current descriptor to
- // descriptors. Jump to the step labeled descriptor parser.
- } else if (c === "") {
- if (currentDescriptor) {
+ // descriptors and let current descriptor be the empty string.
+ // Set state to after descriptor.
+ if (isSpace(c)) {
+ if (currentDescriptor) {
+ descriptors.push(currentDescriptor);
+ currentDescriptor = "";
+ state = "after descriptor";
+ } // U+002C COMMA (,)
+ // Advance position to the next character in input. If current descriptor
+ // is not empty, append current descriptor to descriptors. Jump to the step
+ // labeled descriptor parser.
+
+ } else if (c === ",") {
+ pos += 1;
+
+ if (currentDescriptor) {
+ descriptors.push(currentDescriptor);
+ }
+
+ parseDescriptors();
+ return; // U+0028 LEFT PARENTHESIS (()
+ // Append c to current descriptor. Set state to in parens.
+ } else if (c === "(") {
+ currentDescriptor = currentDescriptor + c;
+ state = "in parens"; // EOF
+ // If current descriptor is not empty, append current descriptor to
+ // descriptors. Jump to the step labeled descriptor parser.
+ } else if (c === "") {
+ if (currentDescriptor) {
+ descriptors.push(currentDescriptor);
+ }
+
+ parseDescriptors();
+ return; // Anything else
+ // Append c to current descriptor.
+ } else {
+ currentDescriptor = currentDescriptor + c;
+ } // (end "in descriptor"
+ // In parens
+
+ } else if (state === "in parens") {
+ // U+0029 RIGHT PARENTHESIS ())
+ // Append c to current descriptor. Set state to in descriptor.
+ if (c === ")") {
+ currentDescriptor = currentDescriptor + c;
+ state = "in descriptor"; // EOF
+ // Append current descriptor to descriptors. Jump to the step labeled
+ // descriptor parser.
+ } else if (c === "") {
descriptors.push(currentDescriptor);
+ parseDescriptors();
+ return; // Anything else
+ // Append c to current descriptor.
+ } else {
+ currentDescriptor = currentDescriptor + c;
+ } // After descriptor
+
+ } else if (state === "after descriptor") {
+ // Do the following, depending on the value of c:
+ // Space character: Stay in this state.
+ if (isSpace(c)) ; else if (c === "") {
+ parseDescriptors();
+ return; // Anything else
+ // Set state to in descriptor. Set position to the previous character in input.
+ } else {
+ state = "in descriptor";
+ pos -= 1;
}
-
- parseDescriptors();
- return; // Anything else
- // Append c to current descriptor.
- } else {
- currentDescriptor = currentDescriptor + c;
- } // (end "in descriptor"
- // In parens
-
- } else if (state === "in parens") {
- // U+0029 RIGHT PARENTHESIS ())
- // Append c to current descriptor. Set state to in descriptor.
- if (c === ")") {
- currentDescriptor = currentDescriptor + c;
- state = "in descriptor"; // EOF
- // Append current descriptor to descriptors. Jump to the step labeled
- // descriptor parser.
- } else if (c === "") {
- descriptors.push(currentDescriptor);
- parseDescriptors();
- return; // Anything else
- // Append c to current descriptor.
- } else {
- currentDescriptor = currentDescriptor + c;
- } // After descriptor
-
- } else if (state === "after descriptor") {
- // Do the following, depending on the value of c:
- // Space character: Stay in this state.
- if (isSpace(c)) {// EOF: Jump to the step labeled descriptor parser.
- } else if (c === "") {
- parseDescriptors();
- return; // Anything else
- // Set state to in descriptor. Set position to the previous character in input.
- } else {
- state = "in descriptor";
- pos -= 1;
- }
- } // Advance position to the next character in input.
+ } // Advance position to the next character in input.
- pos += 1; // Repeat this step.
- } // (close while true loop)
+ pos += 1; // Repeat this step.
+ } // (close while true loop)
- }
- /**
- * Adds descriptor properties to a candidate, pushes to the candidates array
- * @return undefined
- */
- // Declared outside of the while loop so that it's only created once.
-
-
- function parseDescriptors() {
- // 9. Descriptor parser: Let error be no.
- var pError = false,
- // 10. Let width be absent.
- // 11. Let density be absent.
- // 12. Let future-compat-h be absent. (We're implementing it now as h)
- w,
- d,
- h,
- i,
- candidate = {},
- desc,
- lastChar,
- value,
- intVal,
- floatVal; // 13. For each descriptor in descriptors, run the appropriate set of steps
- // from the following list:
-
- for (i = 0; i < descriptors.length; i++) {
- desc = descriptors[i];
- lastChar = desc[desc.length - 1];
- value = desc.substring(0, desc.length - 1);
- intVal = parseInt(value, 10);
- floatVal = parseFloat(value); // If the descriptor consists of a valid non-negative integer followed by
- // a U+0077 LATIN SMALL LETTER W character
-
- if (regexNonNegativeInteger.test(value) && lastChar === "w") {
- // If width and density are not both absent, then let error be yes.
- if (w || d) {
- pError = true;
- } // Apply the rules for parsing non-negative integers to the descriptor.
- // If the result is zero, let error be yes.
- // Otherwise, let width be the result.
+ }
+ /**
+ * Adds descriptor properties to a candidate, pushes to the candidates array
+ * @return undefined
+ */
+ // Declared outside of the while loop so that it's only created once.
+
+
+ function parseDescriptors() {
+ // 9. Descriptor parser: Let error be no.
+ var pError = false,
+ // 10. Let width be absent.
+ // 11. Let density be absent.
+ // 12. Let future-compat-h be absent. (We're implementing it now as h)
+ w,
+ d,
+ h,
+ i,
+ candidate = {},
+ desc,
+ lastChar,
+ value,
+ intVal,
+ floatVal; // 13. For each descriptor in descriptors, run the appropriate set of steps
+ // from the following list:
+
+ for (i = 0; i < descriptors.length; i++) {
+ desc = descriptors[i];
+ lastChar = desc[desc.length - 1];
+ value = desc.substring(0, desc.length - 1);
+ intVal = parseInt(value, 10);
+ floatVal = parseFloat(value); // If the descriptor consists of a valid non-negative integer followed by
+ // a U+0077 LATIN SMALL LETTER W character
+
+ if (regexNonNegativeInteger.test(value) && lastChar === "w") {
+ // If width and density are not both absent, then let error be yes.
+ if (w || d) {
+ pError = true;
+ } // Apply the rules for parsing non-negative integers to the descriptor.
+ // If the result is zero, let error be yes.
+ // Otherwise, let width be the result.
+
+
+ if (intVal === 0) {
+ pError = true;
+ } else {
+ w = intVal;
+ } // If the descriptor consists of a valid floating-point number followed by
+ // a U+0078 LATIN SMALL LETTER X character
+
+ } else if (regexFloatingPoint.test(value) && lastChar === "x") {
+ // If width, density and future-compat-h are not all absent, then let error
+ // be yes.
+ if (w || d || h) {
+ pError = true;
+ } // Apply the rules for parsing floating-point number values to the descriptor.
+ // If the result is less than zero, let error be yes. Otherwise, let density
+ // be the result.
+
+
+ if (floatVal < 0) {
+ pError = true;
+ } else {
+ d = floatVal;
+ } // If the descriptor consists of a valid non-negative integer followed by
+ // a U+0068 LATIN SMALL LETTER H character
+ } else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
+ // If height and density are not both absent, then let error be yes.
+ if (h || d) {
+ pError = true;
+ } // Apply the rules for parsing non-negative integers to the descriptor.
+ // If the result is zero, let error be yes. Otherwise, let future-compat-h
+ // be the result.
- if (intVal === 0) {
- pError = true;
- } else {
- w = intVal;
- } // If the descriptor consists of a valid floating-point number followed by
- // a U+0078 LATIN SMALL LETTER X character
-
- } else if (regexFloatingPoint.test(value) && lastChar === "x") {
- // If width, density and future-compat-h are not all absent, then let error
- // be yes.
- if (w || d || h) {
- pError = true;
- } // Apply the rules for parsing floating-point number values to the descriptor.
- // If the result is less than zero, let error be yes. Otherwise, let density
- // be the result.
+ if (intVal === 0) {
+ pError = true;
+ } else {
+ h = intVal;
+ } // Anything else, Let error be yes.
- if (floatVal < 0) {
- pError = true;
} else {
- d = floatVal;
- } // If the descriptor consists of a valid non-negative integer followed by
- // a U+0068 LATIN SMALL LETTER H character
-
- } else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
- // If height and density are not both absent, then let error be yes.
- if (h || d) {
pError = true;
- } // Apply the rules for parsing non-negative integers to the descriptor.
- // If the result is zero, let error be yes. Otherwise, let future-compat-h
- // be the result.
+ }
+ } // (close step 13 for loop)
+ // 15. If error is still no, then append a new image source to candidates whose
+ // URL is url, associated with a width width if not absent and a pixel
+ // density density if not absent. Otherwise, there is a parse error.
- if (intVal === 0) {
- pError = true;
- } else {
- h = intVal;
- } // Anything else, Let error be yes.
+ if (!pError) {
+ candidate.url = url;
- } else {
- pError = true;
- }
- } // (close step 13 for loop)
- // 15. If error is still no, then append a new image source to candidates whose
- // URL is url, associated with a width width if not absent and a pixel
- // density density if not absent. Otherwise, there is a parse error.
+ if (w) {
+ candidate.w = w;
+ }
+ if (d) {
+ candidate.d = d;
+ }
- if (!pError) {
- candidate.url = url;
+ if (h) {
+ candidate.h = h;
+ }
- if (w) {
- candidate.w = w;
+ candidates.push(candidate);
+ } else if (logger && logger.error) {
+ logger.error("Invalid srcset descriptor found in '" + input + "' at '" + desc + "'.");
}
+ } // (close parseDescriptors fn)
- if (d) {
- candidate.d = d;
- }
+ };
+ });
+ });
- if (h) {
- candidate.h = h;
- }
+ var _require$$0$builders$5 = doc.builders,
+ concat$9 = _require$$0$builders$5.concat,
+ ifBreak$4 = _require$$0$builders$5.ifBreak,
+ join$5 = _require$$0$builders$5.join,
+ line$4 = _require$$0$builders$5.line;
- candidates.push(candidate);
- } else if (logger && logger.error) {
- logger.error("Invalid srcset descriptor found in '" + input + "' at '" + desc + "'.");
+ function printImgSrcset(value) {
+ var srcset = parseSrcset(value, {
+ logger: {
+ error: function error(message) {
+ throw new Error(message);
}
- } // (close parseDescriptors fn)
+ }
+ });
+ var hasW = srcset.some(function (src) {
+ return src.w;
+ });
+ var hasH = srcset.some(function (src) {
+ return src.h;
+ });
+ var hasX = srcset.some(function (src) {
+ return src.d;
+ });
+ if (hasW + hasH + hasX !== 1) {
+ throw new Error("Mixed descriptor in srcset is not supported");
+ }
+
+ var key = hasW ? "w" : hasH ? "h" : "d";
+ var unit = hasW ? "w" : hasH ? "h" : "x";
+
+ var getMax = function getMax(values) {
+ return Math.max.apply(Math, values);
};
- });
-});
-var _require$$0$builders$5 = doc.builders;
-var concat$10 = _require$$0$builders$5.concat;
-var ifBreak$5 = _require$$0$builders$5.ifBreak;
-var join$6 = _require$$0$builders$5.join;
-var line$7 = _require$$0$builders$5.line;
+ var urls = srcset.map(function (src) {
+ return src.url;
+ });
+ var maxUrlLength = getMax(urls.map(function (url) {
+ return url.length;
+ }));
+ var descriptors = srcset.map(function (src) {
+ return src[key];
+ }).map(function (descriptor) {
+ return descriptor ? descriptor.toString() : "";
+ });
+ var descriptorLeftLengths = descriptors.map(function (descriptor) {
+ var index = descriptor.indexOf(".");
+ return index === -1 ? descriptor.length : index;
+ });
+ var maxDescriptorLeftLength = getMax(descriptorLeftLengths);
+ return join$5(concat$9([",", line$4]), urls.map(function (url, index) {
+ var parts = [url];
+ var descriptor = descriptors[index];
-function printImgSrcset$1(value) {
- var srcset = parseSrcset(value, {
- logger: {
- error: function error(message) {
- throw new Error(message);
+ if (descriptor) {
+ var urlPadding = maxUrlLength - url.length + 1;
+ var descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index];
+ var alignment = " ".repeat(urlPadding + descriptorPadding);
+ parts.push(ifBreak$4(alignment, " "), descriptor + unit);
}
- }
- });
- var hasW = srcset.some(function (src) {
- return src.w;
- });
- var hasH = srcset.some(function (src) {
- return src.h;
- });
- var hasX = srcset.some(function (src) {
- return src.d;
- });
- if (hasW + hasH + hasX !== 1) {
- throw new Error("Mixed descriptor in srcset is not supported");
+ return concat$9(parts);
+ }));
}
- var key = hasW ? "w" : hasH ? "h" : "d";
- var unit = hasW ? "w" : hasH ? "h" : "x";
-
- var getMax = function getMax(values) {
- return Math.max.apply(Math, values);
+ var syntaxAttribute = {
+ printImgSrcset: printImgSrcset
};
- var urls = srcset.map(function (src) {
- return src.url;
- });
- var maxUrlLength = getMax(urls.map(function (url) {
- return url.length;
- }));
- var descriptors = srcset.map(function (src) {
- return src[key];
- }).map(function (descriptor) {
- return descriptor ? descriptor.toString() : "";
- });
- var descriptorLeftLengths = descriptors.map(function (descriptor) {
- var index = descriptor.indexOf(".");
- return index === -1 ? descriptor.length : index;
- });
- var maxDescriptorLeftLength = getMax(descriptorLeftLengths);
- return join$6(concat$10([",", line$7]), urls.map(function (url, index) {
- var parts = [url];
- var descriptor = descriptors[index];
-
- if (descriptor) {
- var urlPadding = maxUrlLength - url.length + 1;
- var descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index];
- var alignment = " ".repeat(urlPadding + descriptorPadding);
- parts.push(ifBreak$5(alignment, " "), descriptor + unit);
- }
-
- return concat$10(parts);
- }));
-}
-
-var syntaxAttribute = {
- printImgSrcset: printImgSrcset$1
-};
-
-var builders = doc.builders;
-var _require$$0$utils = doc.utils;
-var stripTrailingHardline$1 = _require$$0$utils.stripTrailingHardline;
-var mapDoc$4 = _require$$0$utils.mapDoc;
-var breakParent$2 = builders.breakParent;
-var dedentToRoot$1 = builders.dedentToRoot;
-var fill$3 = builders.fill;
-var group$8 = builders.group;
-var hardline$7 = builders.hardline;
-var ifBreak$4 = builders.ifBreak;
-var indent$5 = builders.indent;
-var join$5 = builders.join;
-var line$6 = builders.line;
-var literalline$2 = builders.literalline;
-var markAsRoot$2 = builders.markAsRoot;
-var softline$4 = builders.softline;
-var countChars = utils$6.countChars;
-var countParents = utils$6.countParents;
-var dedentString = utils$6.dedentString;
-var forceBreakChildren = utils$6.forceBreakChildren;
-var forceBreakContent = utils$6.forceBreakContent;
-var forceNextEmptyLine = utils$6.forceNextEmptyLine;
-var getLastDescendant = utils$6.getLastDescendant;
-var getPrettierIgnoreAttributeCommentData = utils$6.getPrettierIgnoreAttributeCommentData;
-var hasPrettierIgnore = utils$6.hasPrettierIgnore;
-var inferScriptParser = utils$6.inferScriptParser;
-var isScriptLikeTag = utils$6.isScriptLikeTag;
-var isTextLikeNode = utils$6.isTextLikeNode;
-var normalizeParts = utils$6.normalizeParts;
-var preferHardlineAsLeadingSpaces = utils$6.preferHardlineAsLeadingSpaces;
-var shouldNotPrintClosingTag = utils$6.shouldNotPrintClosingTag;
-var shouldPreserveContent = utils$6.shouldPreserveContent;
-var unescapeQuoteEntities = utils$6.unescapeQuoteEntities;
-var replaceEndOfLineWith$1 = util.replaceEndOfLineWith;
-var insertPragma$5 = pragma$6.insertPragma;
-var printVueFor = syntaxVue.printVueFor;
-var printVueSlotScope = syntaxVue.printVueSlotScope;
-var isVueEventBindingExpression = syntaxVue.isVueEventBindingExpression;
-var printImgSrcset = syntaxAttribute.printImgSrcset;
-
-function concat$8(parts) {
- var newParts = normalizeParts(parts);
- return newParts.length === 0 ? "" : newParts.length === 1 ? newParts[0] : builders.concat(newParts);
-}
-
-function embed$2(path, print, textToDoc, options) {
- var node = path.getValue();
-
- switch (node.type) {
- case "text":
- {
- if (isScriptLikeTag(node.parent)) {
- var parser = inferScriptParser(node.parent);
+ var builders = doc.builders,
+ _require$$0$utils = doc.utils,
+ stripTrailingHardline$1 = _require$$0$utils.stripTrailingHardline,
+ mapDoc$4 = _require$$0$utils.mapDoc;
+ var breakParent$2 = builders.breakParent,
+ dedentToRoot$1 = builders.dedentToRoot,
+ fill$3 = builders.fill,
+ group$9 = builders.group,
+ hardline$7 = builders.hardline,
+ ifBreak$5 = builders.ifBreak,
+ indent$5 = builders.indent,
+ join$6 = builders.join,
+ line$5 = builders.line,
+ literalline$2 = builders.literalline,
+ markAsRoot$2 = builders.markAsRoot,
+ softline$4 = builders.softline;
+ var countChars$1 = utils$3.countChars,
+ countParents$1 = utils$3.countParents,
+ dedentString$1 = utils$3.dedentString,
+ forceBreakChildren$1 = utils$3.forceBreakChildren,
+ forceBreakContent$1 = utils$3.forceBreakContent,
+ forceNextEmptyLine$1 = utils$3.forceNextEmptyLine,
+ getLastDescendant$1 = utils$3.getLastDescendant,
+ getPrettierIgnoreAttributeCommentData$1 = utils$3.getPrettierIgnoreAttributeCommentData,
+ hasPrettierIgnore$1 = utils$3.hasPrettierIgnore,
+ inferScriptParser$1 = utils$3.inferScriptParser,
+ isScriptLikeTag$1 = utils$3.isScriptLikeTag,
+ isTextLikeNode$1 = utils$3.isTextLikeNode,
+ normalizeParts$1 = utils$3.normalizeParts,
+ preferHardlineAsLeadingSpaces$1 = utils$3.preferHardlineAsLeadingSpaces,
+ shouldNotPrintClosingTag$1 = utils$3.shouldNotPrintClosingTag,
+ shouldPreserveContent$1 = utils$3.shouldPreserveContent,
+ unescapeQuoteEntities$1 = utils$3.unescapeQuoteEntities;
+ var replaceEndOfLineWith$1 = util.replaceEndOfLineWith;
+ var insertPragma$6 = pragma$3.insertPragma;
+ var printVueFor$1 = syntaxVue.printVueFor,
+ printVueSlotScope$1 = syntaxVue.printVueSlotScope,
+ isVueEventBindingExpression$1 = syntaxVue.isVueEventBindingExpression;
+ var printImgSrcset$1 = syntaxAttribute.printImgSrcset;
+
+ function concat$a(parts) {
+ var newParts = normalizeParts$1(parts);
+ return newParts.length === 0 ? "" : newParts.length === 1 ? newParts[0] : builders.concat(newParts);
+ }
+
+ function embed$2(path, print, textToDoc, options) {
+ var node = path.getValue();
- if (parser) {
- var value = parser === "markdown" ? dedentString(node.value.replace(/^[^\S\n]*?\n/, "")) : node.value;
- return builders.concat([concat$8([breakParent$2, printOpeningTagPrefix(node, options), stripTrailingHardline$1(textToDoc(value, {
- parser: parser
- })), printClosingTagSuffix(node, options)])]);
+ switch (node.type) {
+ case "text":
+ {
+ if (isScriptLikeTag$1(node.parent)) {
+ var parser = inferScriptParser$1(node.parent);
+
+ if (parser) {
+ var value = parser === "markdown" ? dedentString$1(node.value.replace(/^[^\S\n]*?\n/, "")) : node.value;
+ return builders.concat([concat$a([breakParent$2, printOpeningTagPrefix(node, options), stripTrailingHardline$1(textToDoc(value, {
+ parser: parser
+ })), printClosingTagSuffix(node, options)])]);
+ }
+ } else if (node.parent.type === "interpolation") {
+ return concat$a([indent$5(concat$a([line$5, textToDoc(node.value, Object.assign({
+ __isInHtmlInterpolation: true // to avoid unexpected `}}`
+
+ }, options.parser === "angular" ? {
+ parser: "__ng_interpolation",
+ trailingComma: "none"
+ } : options.parser === "vue" ? {
+ parser: "__vue_expression"
+ } : {
+ parser: "__js_expression"
+ }))])), node.parent.next && needsToBorrowPrevClosingTagEndMarker(node.parent.next) ? " " : line$5]);
}
- } else if (node.parent.type === "interpolation") {
- return concat$8([indent$5(concat$8([line$6, textToDoc(node.value, Object.assign({
- __isInHtmlInterpolation: true // to avoid unexpected `}}`
- }, options.parser === "angular" ? {
- parser: "__ng_interpolation",
- trailingComma: "none"
- } : options.parser === "vue" ? {
- parser: "__vue_expression"
- } : {
- parser: "__js_expression"
- }))])), node.parent.next && needsToBorrowPrevClosingTagEndMarker(node.parent.next) ? " " : line$6]);
+ break;
}
- break;
- }
-
- case "attribute":
- {
- if (!node.value) {
- break;
- } // lit-html: html`<my-element obj=${obj}></my-element>`
+ case "attribute":
+ {
+ if (!node.value) {
+ break;
+ } // lit-html: html`<my-element obj=${obj}></my-element>`
- if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(options.originalText.slice(node.valueSpan.start.offset, node.valueSpan.end.offset))) {
- return concat$8([node.rawName, "=", node.value]);
- } // lwc: html`<my-element data-for={value}></my-elememt>`
+ if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(options.originalText.slice(node.valueSpan.start.offset, node.valueSpan.end.offset))) {
+ return concat$a([node.rawName, "=", node.value]);
+ } // lwc: html`<my-element data-for={value}></my-element>`
- if (options.parser === "lwc") {
- var interpolationRegex = /^\{[\s\S]*\}$/;
+ if (options.parser === "lwc") {
+ var interpolationRegex = /^\{[\s\S]*\}$/;
- if (interpolationRegex.test(options.originalText.slice(node.valueSpan.start.offset, node.valueSpan.end.offset))) {
- return concat$8([node.rawName, "=", node.value]);
+ if (interpolationRegex.test(options.originalText.slice(node.valueSpan.start.offset, node.valueSpan.end.offset))) {
+ return concat$a([node.rawName, "=", node.value]);
+ }
}
- }
- var embeddedAttributeValueDoc = printEmbeddedAttributeValue(node, function (code, opts) {
- return (// strictly prefer single quote to avoid unnecessary html entity escape
- textToDoc(code, Object.assign({
- __isInHtmlAttribute: true
- }, opts))
- );
- }, options);
+ var embeddedAttributeValueDoc = printEmbeddedAttributeValue(node, function (code, opts) {
+ return (// strictly prefer single quote to avoid unnecessary html entity escape
+ textToDoc(code, Object.assign({
+ __isInHtmlAttribute: true
+ }, opts))
+ );
+ }, options);
- if (embeddedAttributeValueDoc) {
- return concat$8([node.rawName, '="', group$8(mapDoc$4(embeddedAttributeValueDoc, function (doc$$2) {
- return typeof doc$$2 === "string" ? doc$$2.replace(/"/g, "&quot;") : doc$$2;
- })), '"']);
- }
+ if (embeddedAttributeValueDoc) {
+ return concat$a([node.rawName, '="', group$9(mapDoc$4(embeddedAttributeValueDoc, function (doc) {
+ return typeof doc === "string" ? doc.replace(/"/g, "&quot;") : doc;
+ })), '"']);
+ }
- break;
- }
+ break;
+ }
- case "yaml":
- return markAsRoot$2(concat$8(["---", hardline$7, node.value.trim().length === 0 ? "" : textToDoc(node.value, {
- parser: "yaml"
- }), "---"]));
+ case "yaml":
+ return markAsRoot$2(concat$a(["---", hardline$7, node.value.trim().length === 0 ? "" : textToDoc(node.value, {
+ parser: "yaml"
+ }), "---"]));
+ }
}
-}
-
-function genericPrint$2(path, options, print) {
- var node = path.getValue();
- switch (node.type) {
- case "root":
- // use original concat to not break stripTrailingHardline
- return builders.concat([group$8(printChildren(path, options, print)), hardline$7]);
+ function genericPrint$2(path, options, print) {
+ var node = path.getValue();
- case "element":
- case "ieConditionalComment":
- {
- /**
- * do not break:
- *
- * <div>{{
- * ~
- * interpolation
- * }}</div>
- * ~
- *
- * exception: break if the opening tag breaks
- *
- * <div
- * long
- * ~
- * >{{
- * interpolation
- * }}</div
- * ~
- * >
- */
- var shouldHugContent = node.children.length === 1 && node.firstChild.type === "interpolation" && node.firstChild.isLeadingSpaceSensitive && !node.firstChild.hasLeadingSpaces && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces;
- var attrGroupId = Symbol("element-attr-group-id");
- return concat$8([group$8(concat$8([group$8(printOpeningTag(path, options, print), {
- id: attrGroupId
- }), node.children.length === 0 ? node.hasDanglingSpaces && node.isDanglingSpaceSensitive ? line$6 : "" : concat$8([forceBreakContent(node) ? breakParent$2 : "", function (childrenDoc) {
- return shouldHugContent ? ifBreak$4(indent$5(childrenDoc), childrenDoc, {
+ switch (node.type) {
+ case "root":
+ // use original concat to not break stripTrailingHardline
+ return builders.concat([group$9(printChildren$1(path, options, print)), hardline$7]);
+
+ case "element":
+ case "ieConditionalComment":
+ {
+ /**
+ * do not break:
+ *
+ * <div>{{
+ * ~
+ * interpolation
+ * }}</div>
+ * ~
+ *
+ * exception: break if the opening tag breaks
+ *
+ * <div
+ * long
+ * ~
+ * >{{
+ * interpolation
+ * }}</div
+ * ~
+ * >
+ */
+ var shouldHugContent = node.children.length === 1 && node.firstChild.type === "interpolation" && node.firstChild.isLeadingSpaceSensitive && !node.firstChild.hasLeadingSpaces && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces;
+ var attrGroupId = Symbol("element-attr-group-id");
+ return concat$a([group$9(concat$a([group$9(printOpeningTag(path, options, print), {
+ id: attrGroupId
+ }), node.children.length === 0 ? node.hasDanglingSpaces && node.isDanglingSpaceSensitive ? line$5 : "" : concat$a([forceBreakContent$1(node) ? breakParent$2 : "", function (childrenDoc) {
+ return shouldHugContent ? ifBreak$5(indent$5(childrenDoc), childrenDoc, {
+ groupId: attrGroupId
+ }) : isScriptLikeTag$1(node) && node.parent.type === "root" && options.parser === "vue" && !options.vueIndentScriptAndStyle ? childrenDoc : indent$5(childrenDoc);
+ }(concat$a([shouldHugContent ? ifBreak$5(softline$4, "", {
groupId: attrGroupId
- }) : isScriptLikeTag(node) && node.parent.type === "root" && options.parser === "vue" ? childrenDoc : indent$5(childrenDoc);
- }(concat$8([shouldHugContent ? ifBreak$4(softline$4, "", {
- groupId: attrGroupId
- }) : node.firstChild.hasLeadingSpaces && node.firstChild.isLeadingSpaceSensitive ? line$6 : node.firstChild.type === "text" && node.isWhitespaceSensitive && node.isIndentationSensitive ? dedentToRoot$1(softline$4) : softline$4, printChildren(path, options, print)])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? " " : "" : shouldHugContent ? ifBreak$4(softline$4, "", {
- groupId: attrGroupId
- }) : node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? line$6 : (node.lastChild.type === "comment" || node.lastChild.type === "text" && node.isWhitespaceSensitive && node.isIndentationSensitive) && new RegExp("\\n\\s{".concat(options.tabWidth * countParents(path, function (n) {
- return n.parent && n.parent.type !== "root";
- }), "}$")).test(node.lastChild.value) ?
- /**
- * <div>
- * <pre>
- * something
- * </pre>
- * ~
- * </div>
- */
- "" : softline$4])])), printClosingTag(node, options)]);
- }
+ }) : node.firstChild.hasLeadingSpaces && node.firstChild.isLeadingSpaceSensitive ? line$5 : node.firstChild.type === "text" && node.isWhitespaceSensitive && node.isIndentationSensitive ? dedentToRoot$1(softline$4) : softline$4, printChildren$1(path, options, print)])), (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? " " : "" : shouldHugContent ? ifBreak$5(softline$4, "", {
+ groupId: attrGroupId
+ }) : node.lastChild.hasTrailingSpaces && node.lastChild.isTrailingSpaceSensitive ? line$5 : (node.lastChild.type === "comment" || node.lastChild.type === "text" && node.isWhitespaceSensitive && node.isIndentationSensitive) && new RegExp("\\n\\s{".concat(options.tabWidth * countParents$1(path, function (n) {
+ return n.parent && n.parent.type !== "root";
+ }), "}$")).test(node.lastChild.value) ?
+ /**
+ * <div>
+ * <pre>
+ * something
+ * </pre>
+ * ~
+ * </div>
+ */
+ "" : softline$4])])), printClosingTag(node, options)]);
+ }
+
+ case "ieConditionalStartComment":
+ case "ieConditionalEndComment":
+ return concat$a([printOpeningTagStart(node), printClosingTagEnd(node)]);
+
+ case "interpolation":
+ return concat$a([printOpeningTagStart(node, options), concat$a(path.map(print, "children")), printClosingTagEnd(node, options)]);
+
+ case "text":
+ {
+ if (node.parent.type === "interpolation") {
+ // replace the trailing literalline with hardline for better readability
+ var trailingNewlineRegex = /\n[^\S\n]*?$/;
+ var hasTrailingNewline = trailingNewlineRegex.test(node.value);
+ var value = hasTrailingNewline ? node.value.replace(trailingNewlineRegex, "") : node.value;
+ return concat$a([concat$a(replaceEndOfLineWith$1(value, literalline$2)), hasTrailingNewline ? hardline$7 : ""]);
+ }
- case "ieConditionalStartComment":
- case "ieConditionalEndComment":
- return concat$8([printOpeningTagStart(node), printClosingTagEnd(node)]);
+ return fill$3(normalizeParts$1([].concat(printOpeningTagPrefix(node, options), getTextValueParts(node), printClosingTagSuffix(node, options))));
+ }
- case "interpolation":
- return concat$8([printOpeningTagStart(node, options), concat$8(path.map(print, "children")), printClosingTagEnd(node, options)]);
+ case "docType":
+ return concat$a([group$9(concat$a([printOpeningTagStart(node, options), " ", node.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")])), printClosingTagEnd(node, options)]);
- case "text":
- {
- if (node.parent.type === "interpolation") {
- // replace the trailing literalline with hardline for better readability
- var trailingNewlineRegex = /\n[^\S\n]*?$/;
- var hasTrailingNewline = trailingNewlineRegex.test(node.value);
- var value = hasTrailingNewline ? node.value.replace(trailingNewlineRegex, "") : node.value;
- return concat$8([concat$8(replaceEndOfLineWith$1(value, literalline$2)), hasTrailingNewline ? hardline$7 : ""]);
+ case "comment":
+ {
+ return concat$a([printOpeningTagPrefix(node, options), concat$a(replaceEndOfLineWith$1(options.originalText.slice(options.locStart(node), options.locEnd(node)), literalline$2)), printClosingTagSuffix(node, options)]);
}
- return fill$3(normalizeParts([].concat(printOpeningTagPrefix(node, options), getTextValueParts(node), printClosingTagSuffix(node, options))));
- }
-
- case "docType":
- return concat$8([group$8(concat$8([printOpeningTagStart(node, options), " ", node.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")])), printClosingTagEnd(node, options)]);
+ case "attribute":
+ {
+ if (node.value === null) {
+ return node.rawName;
+ }
- case "comment":
- {
- return concat$8([printOpeningTagPrefix(node, options), concat$8(replaceEndOfLineWith$1(options.originalText.slice(options.locStart(node), options.locEnd(node)), literalline$2)), printClosingTagSuffix(node, options)]);
- }
+ var _value = unescapeQuoteEntities$1(node.value);
- case "attribute":
- {
- if (node.value === null) {
- return node.rawName;
+ var singleQuoteCount = countChars$1(_value, "'");
+ var doubleQuoteCount = countChars$1(_value, '"');
+ var quote = singleQuoteCount < doubleQuoteCount ? "'" : '"';
+ return concat$a([node.rawName, concat$a(["=", quote, concat$a(replaceEndOfLineWith$1(quote === '"' ? _value.replace(/"/g, "&quot;") : _value.replace(/'/g, "&apos;"), literalline$2)), quote])]);
}
- var _value = unescapeQuoteEntities(node.value);
-
- var singleQuoteCount = countChars(_value, "'");
- var doubleQuoteCount = countChars(_value, '"');
- var quote = singleQuoteCount < doubleQuoteCount ? "'" : '"';
- return concat$8([node.rawName, concat$8(["=", quote, concat$8(replaceEndOfLineWith$1(quote === '"' ? _value.replace(/"/g, "&quot;") : _value.replace(/'/g, "&apos;"), literalline$2)), quote])]);
- }
+ case "yaml":
+ case "toml":
+ return concat$a(replaceEndOfLineWith$1(node.raw, literalline$2));
- case "yaml":
- case "toml":
- return concat$8(replaceEndOfLineWith$1(node.raw, literalline$2));
-
- default:
- throw new Error("Unexpected node type ".concat(node.type));
+ default:
+ throw new Error("Unexpected node type ".concat(node.type));
+ }
}
-}
-function printChildren(path, options, print) {
- var node = path.getValue();
+ function printChildren$1(path, options, print) {
+ var node = path.getValue();
+
+ if (forceBreakChildren$1(node)) {
+ return concat$a([breakParent$2, concat$a(path.map(function (childPath) {
+ var childNode = childPath.getValue();
+ var prevBetweenLine = !childNode.prev ? "" : printBetweenLine(childNode.prev, childNode);
+ return concat$a([!prevBetweenLine ? "" : concat$a([prevBetweenLine, forceNextEmptyLine$1(childNode.prev) ? hardline$7 : ""]), printChild(childPath)]);
+ }, "children"))]);
+ }
- if (forceBreakChildren(node)) {
- return concat$8([breakParent$2, concat$8(path.map(function (childPath) {
+ var groupIds = node.children.map(function () {
+ return Symbol("");
+ });
+ return concat$a(path.map(function (childPath, childIndex) {
var childNode = childPath.getValue();
- var prevBetweenLine = !childNode.prev ? "" : printBetweenLine(childNode.prev, childNode);
- return concat$8([!prevBetweenLine ? "" : concat$8([prevBetweenLine, forceNextEmptyLine(childNode.prev) ? hardline$7 : ""]), printChild(childPath)]);
- }, "children"))]);
- }
- var groupIds = node.children.map(function () {
- return Symbol("");
- });
- return concat$8(path.map(function (childPath, childIndex) {
- var childNode = childPath.getValue();
+ if (isTextLikeNode$1(childNode)) {
+ if (childNode.prev && isTextLikeNode$1(childNode.prev)) {
+ var _prevBetweenLine = printBetweenLine(childNode.prev, childNode);
- if (isTextLikeNode(childNode)) {
- if (childNode.prev && isTextLikeNode(childNode.prev)) {
- var _prevBetweenLine = printBetweenLine(childNode.prev, childNode);
+ if (_prevBetweenLine) {
+ if (forceNextEmptyLine$1(childNode.prev)) {
+ return concat$a([hardline$7, hardline$7, printChild(childPath)]);
+ }
- if (_prevBetweenLine) {
- if (forceNextEmptyLine(childNode.prev)) {
- return concat$8([hardline$7, hardline$7, printChild(childPath)]);
+ return concat$a([_prevBetweenLine, printChild(childPath)]);
}
-
- return concat$8([_prevBetweenLine, printChild(childPath)]);
}
+
+ return printChild(childPath);
}
- return printChild(childPath);
- }
+ var prevParts = [];
+ var leadingParts = [];
+ var trailingParts = [];
+ var nextParts = [];
+ var prevBetweenLine = childNode.prev ? printBetweenLine(childNode.prev, childNode) : "";
+ var nextBetweenLine = childNode.next ? printBetweenLine(childNode, childNode.next) : "";
- var prevParts = [];
- var leadingParts = [];
- var trailingParts = [];
- var nextParts = [];
- var prevBetweenLine = childNode.prev ? printBetweenLine(childNode.prev, childNode) : "";
- var nextBetweenLine = childNode.next ? printBetweenLine(childNode, childNode.next) : "";
-
- if (prevBetweenLine) {
- if (forceNextEmptyLine(childNode.prev)) {
- prevParts.push(hardline$7, hardline$7);
- } else if (prevBetweenLine === hardline$7) {
- prevParts.push(hardline$7);
- } else {
- if (isTextLikeNode(childNode.prev)) {
- leadingParts.push(prevBetweenLine);
+ if (prevBetweenLine) {
+ if (forceNextEmptyLine$1(childNode.prev)) {
+ prevParts.push(hardline$7, hardline$7);
+ } else if (prevBetweenLine === hardline$7) {
+ prevParts.push(hardline$7);
} else {
- leadingParts.push(ifBreak$4("", softline$4, {
- groupId: groupIds[childIndex - 1]
- }));
+ if (isTextLikeNode$1(childNode.prev)) {
+ leadingParts.push(prevBetweenLine);
+ } else {
+ leadingParts.push(ifBreak$5("", softline$4, {
+ groupId: groupIds[childIndex - 1]
+ }));
+ }
}
}
- }
- if (nextBetweenLine) {
- if (forceNextEmptyLine(childNode)) {
- if (isTextLikeNode(childNode.next)) {
- nextParts.push(hardline$7, hardline$7);
- }
- } else if (nextBetweenLine === hardline$7) {
- if (isTextLikeNode(childNode.next)) {
- nextParts.push(hardline$7);
+ if (nextBetweenLine) {
+ if (forceNextEmptyLine$1(childNode)) {
+ if (isTextLikeNode$1(childNode.next)) {
+ nextParts.push(hardline$7, hardline$7);
+ }
+ } else if (nextBetweenLine === hardline$7) {
+ if (isTextLikeNode$1(childNode.next)) {
+ nextParts.push(hardline$7);
+ }
+ } else {
+ trailingParts.push(nextBetweenLine);
}
- } else {
- trailingParts.push(nextBetweenLine);
}
- }
- return concat$8([].concat(prevParts, group$8(concat$8([concat$8(leadingParts), group$8(concat$8([printChild(childPath), concat$8(trailingParts)]), {
- id: groupIds[childIndex]
- })])), nextParts));
- }, "children"));
+ return concat$a([].concat(prevParts, group$9(concat$a([concat$a(leadingParts), group$9(concat$a([printChild(childPath), concat$a(trailingParts)]), {
+ id: groupIds[childIndex]
+ })])), nextParts));
+ }, "children"));
- function printChild(childPath) {
- var child = childPath.getValue();
+ function printChild(childPath) {
+ var child = childPath.getValue();
- if (hasPrettierIgnore(child)) {
- return concat$8([].concat(printOpeningTagPrefix(child, options), replaceEndOfLineWith$1(options.originalText.slice(options.locStart(child) + (child.prev && needsToBorrowNextOpeningTagStartMarker(child.prev) ? printOpeningTagStartMarker(child).length : 0), options.locEnd(child) - (child.next && needsToBorrowPrevClosingTagEndMarker(child.next) ? printClosingTagEndMarker(child, options).length : 0)), literalline$2), printClosingTagSuffix(child, options)));
- }
+ if (hasPrettierIgnore$1(child)) {
+ return concat$a([].concat(printOpeningTagPrefix(child, options), replaceEndOfLineWith$1(options.originalText.slice(options.locStart(child) + (child.prev && needsToBorrowNextOpeningTagStartMarker(child.prev) ? printOpeningTagStartMarker(child).length : 0), options.locEnd(child) - (child.next && needsToBorrowPrevClosingTagEndMarker(child.next) ? printClosingTagEndMarker(child, options).length : 0)), literalline$2), printClosingTagSuffix(child, options)));
+ }
- if (shouldPreserveContent(child, options)) {
- return concat$8([].concat(printOpeningTagPrefix(child, options), group$8(printOpeningTag(childPath, options, print)), replaceEndOfLineWith$1(options.originalText.slice(child.startSourceSpan.end.offset + (child.firstChild && needsToBorrowParentOpeningTagEndMarker(child.firstChild) ? -printOpeningTagEndMarker(child).length : 0), child.endSourceSpan.start.offset + (child.lastChild && needsToBorrowParentClosingTagStartMarker(child.lastChild) ? printClosingTagStartMarker(child, options).length : needsToBorrowLastChildClosingTagEndMarker(child) ? -printClosingTagEndMarker(child.lastChild, options).length : 0)), literalline$2), printClosingTag(child, options), printClosingTagSuffix(child, options)));
+ if (shouldPreserveContent$1(child, options)) {
+ return concat$a([].concat(printOpeningTagPrefix(child, options), group$9(printOpeningTag(childPath, options, print)), replaceEndOfLineWith$1(options.originalText.slice(child.startSourceSpan.end.offset + (child.firstChild && needsToBorrowParentOpeningTagEndMarker(child.firstChild) ? -printOpeningTagEndMarker(child).length : 0), child.endSourceSpan.start.offset + (child.lastChild && needsToBorrowParentClosingTagStartMarker(child.lastChild) ? printClosingTagStartMarker(child, options).length : needsToBorrowLastChildClosingTagEndMarker(child) ? -printClosingTagEndMarker(child.lastChild, options).length : 0)), literalline$2), printClosingTag(child, options), printClosingTagSuffix(child, options)));
+ }
+
+ return print(childPath);
}
- return print(childPath);
+ function printBetweenLine(prevNode, nextNode) {
+ return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : line$5 : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : softline$4 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (
+ /**
+ * 123<a
+ * ~
+ * ><b>
+ */
+ nextNode.firstChild ||
+ /**
+ * 123<!--
+ * ~
+ * -->
+ */
+ nextNode.isSelfClosing ||
+ /**
+ * 123<span
+ * ~
+ * attr
+ */
+ nextNode.type === "element" && nextNode.attrs.length !== 0) ||
+ /**
+ * <img
+ * src="long"
+ * ~
+ * />123
+ */
+ prevNode.type === "element" && prevNode.isSelfClosing && needsToBorrowPrevClosingTagEndMarker(nextNode) ? "" : !nextNode.isLeadingSpaceSensitive || preferHardlineAsLeadingSpaces$1(nextNode) ||
+ /**
+ * Want to write us a letter? Use our<a
+ * ><b><a>mailing address</a></b></a
+ * ~
+ * >.
+ */
+ needsToBorrowPrevClosingTagEndMarker(nextNode) && prevNode.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild) && prevNode.lastChild.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild.lastChild) ? hardline$7 : nextNode.hasLeadingSpaces ? line$5 : softline$4;
+ }
}
- function printBetweenLine(prevNode, nextNode) {
- return isTextLikeNode(prevNode) && isTextLikeNode(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces(nextNode) ? hardline$7 : line$6 : "" : preferHardlineAsLeadingSpaces(nextNode) ? hardline$7 : softline$4 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (
- /**
- * 123<a
- * ~
- * ><b>
- */
- nextNode.firstChild ||
+ function printOpeningTag(path, options, print) {
+ var node = path.getValue();
+ var forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0;
+ return concat$a([printOpeningTagStart(node, options), !node.attrs || node.attrs.length === 0 ? node.isSelfClosing ?
/**
- * 123<!--
- * ~
- * -->
+ * <br />
+ * ^
*/
- nextNode.isSelfClosing ||
+ " " : "" : concat$a([indent$5(concat$a([forceNotToBreakAttrContent ? " " : line$5, join$6(line$5, function (ignoreAttributeData) {
+ var hasPrettierIgnoreAttribute = typeof ignoreAttributeData === "boolean" ? function () {
+ return ignoreAttributeData;
+ } : Array.isArray(ignoreAttributeData) ? function (attr) {
+ return ignoreAttributeData.indexOf(attr.rawName) !== -1;
+ } : function () {
+ return false;
+ };
+ return path.map(function (attrPath) {
+ var attr = attrPath.getValue();
+ return hasPrettierIgnoreAttribute(attr) ? concat$a(replaceEndOfLineWith$1(options.originalText.slice(options.locStart(attr), options.locEnd(attr)), literalline$2)) : print(attrPath);
+ }, "attrs");
+ }(node.prev && node.prev.type === "comment" && getPrettierIgnoreAttributeCommentData$1(node.prev.value)))])),
/**
- * 123<span
- * ~
+ * 123<a
* attr
+ * ~
+ * >456
*/
- nextNode.type === "element" && nextNode.attrs.length !== 0) ||
+ node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ||
/**
- * <img
- * src="long"
- * ~
- * />123
+ * <span
+ * >123<meta
+ * ~
+ * /></span>
*/
- prevNode.type === "element" && prevNode.isSelfClosing && needsToBorrowPrevClosingTagEndMarker(nextNode) ? "" : !nextNode.isLeadingSpaceSensitive || preferHardlineAsLeadingSpaces(nextNode) ||
- /**
- * Want to write us a letter? Use our<a
- * ><b><a>mailing address</a></b></a
- * ~
- * >.
- */
- needsToBorrowPrevClosingTagEndMarker(nextNode) && prevNode.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild) && prevNode.lastChild.lastChild && needsToBorrowParentClosingTagStartMarker(prevNode.lastChild.lastChild) ? hardline$7 : nextNode.hasLeadingSpaces ? line$6 : softline$4;
+ node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) ? "" : node.isSelfClosing ? forceNotToBreakAttrContent ? " " : line$5 : forceNotToBreakAttrContent ? "" : softline$4]), node.isSelfClosing ? "" : printOpeningTagEnd(node)]);
}
-}
-function printOpeningTag(path, options, print) {
- var node = path.getValue();
- var forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0;
- return concat$8([printOpeningTagStart(node, options), !node.attrs || node.attrs.length === 0 ? node.isSelfClosing ?
- /**
- * <br />
- * ^
- */
- " " : "" : concat$8([indent$5(concat$8([forceNotToBreakAttrContent ? " " : line$6, join$5(line$6, function (ignoreAttributeData) {
- var hasPrettierIgnoreAttribute = typeof ignoreAttributeData === "boolean" ? function () {
- return ignoreAttributeData;
- } : Array.isArray(ignoreAttributeData) ? function (attr) {
- return ignoreAttributeData.indexOf(attr.rawName) !== -1;
- } : function () {
- return false;
- };
- return path.map(function (attrPath) {
- var attr = attrPath.getValue();
- return hasPrettierIgnoreAttribute(attr) ? concat$8(replaceEndOfLineWith$1(options.originalText.slice(options.locStart(attr), options.locEnd(attr)), literalline$2)) : print(attrPath);
- }, "attrs");
- }(node.prev && node.prev.type === "comment" && getPrettierIgnoreAttributeCommentData(node.prev.value)))])),
- /**
- * 123<a
- * attr
- * ~
- * >456
- */
- node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ||
- /**
- * <span
- * >123<meta
- * ~
- * /></span>
- */
- node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) ? "" : node.isSelfClosing ? forceNotToBreakAttrContent ? " " : line$6 : forceNotToBreakAttrContent ? "" : softline$4]), node.isSelfClosing ? "" : printOpeningTagEnd(node)]);
-}
-
-function printOpeningTagStart(node, options) {
- return node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? "" : concat$8([printOpeningTagPrefix(node, options), printOpeningTagStartMarker(node)]);
-}
+ function printOpeningTagStart(node, options) {
+ return node.prev && needsToBorrowNextOpeningTagStartMarker(node.prev) ? "" : concat$a([printOpeningTagPrefix(node, options), printOpeningTagStartMarker(node)]);
+ }
-function printOpeningTagEnd(node) {
- return node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ? "" : printOpeningTagEndMarker(node);
-}
+ function printOpeningTagEnd(node) {
+ return node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) ? "" : printOpeningTagEndMarker(node);
+ }
-function printClosingTag(node, options) {
- return concat$8([node.isSelfClosing ? "" : printClosingTagStart(node, options), printClosingTagEnd(node, options)]);
-}
+ function printClosingTag(node, options) {
+ return concat$a([node.isSelfClosing ? "" : printClosingTagStart(node, options), printClosingTagEnd(node, options)]);
+ }
-function printClosingTagStart(node, options) {
- return node.lastChild && needsToBorrowParentClosingTagStartMarker(node.lastChild) ? "" : concat$8([printClosingTagPrefix(node, options), printClosingTagStartMarker(node, options)]);
-}
+ function printClosingTagStart(node, options) {
+ return node.lastChild && needsToBorrowParentClosingTagStartMarker(node.lastChild) ? "" : concat$a([printClosingTagPrefix(node, options), printClosingTagStartMarker(node, options)]);
+ }
-function printClosingTagEnd(node, options) {
- return (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? "" : concat$8([printClosingTagEndMarker(node, options), printClosingTagSuffix(node, options)]);
-}
+ function printClosingTagEnd(node, options) {
+ return (node.next ? needsToBorrowPrevClosingTagEndMarker(node.next) : needsToBorrowLastChildClosingTagEndMarker(node.parent)) ? "" : concat$a([printClosingTagEndMarker(node, options), printClosingTagSuffix(node, options)]);
+ }
-function needsToBorrowNextOpeningTagStartMarker(node) {
- /**
- * 123<p
- * ^^
- * >
- */
- return node.next && !isTextLikeNode(node.next) && isTextLikeNode(node) && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces;
-}
+ function needsToBorrowNextOpeningTagStartMarker(node) {
+ /**
+ * 123<p
+ * ^^
+ * >
+ */
+ return node.next && !isTextLikeNode$1(node.next) && isTextLikeNode$1(node) && node.isTrailingSpaceSensitive && !node.hasTrailingSpaces;
+ }
-function needsToBorrowParentOpeningTagEndMarker(node) {
- /**
- * <p
- * >123
- * ^
- *
- * <p
- * ><a
- * ^
- */
- return !node.prev && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces;
-}
+ function needsToBorrowParentOpeningTagEndMarker(node) {
+ /**
+ * <p
+ * >123
+ * ^
+ *
+ * <p
+ * ><a
+ * ^
+ */
+ return !node.prev && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces;
+ }
-function needsToBorrowPrevClosingTagEndMarker(node) {
- /**
- * <p></p
- * >123
- * ^
- *
- * <p></p
- * ><a
- * ^
- */
- return node.prev && !isTextLikeNode(node.prev) && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces;
-}
+ function needsToBorrowPrevClosingTagEndMarker(node) {
+ /**
+ * <p></p
+ * >123
+ * ^
+ *
+ * <p></p
+ * ><a
+ * ^
+ */
+ return node.prev && !isTextLikeNode$1(node.prev) && node.isLeadingSpaceSensitive && !node.hasLeadingSpaces;
+ }
-function needsToBorrowLastChildClosingTagEndMarker(node) {
- /**
- * <p
- * ><a></a
- * ></p
- * ^
- * >
- */
- return node.lastChild && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces && !isTextLikeNode(getLastDescendant(node.lastChild));
-}
+ function needsToBorrowLastChildClosingTagEndMarker(node) {
+ /**
+ * <p
+ * ><a></a
+ * ></p
+ * ^
+ * >
+ */
+ return node.lastChild && node.lastChild.isTrailingSpaceSensitive && !node.lastChild.hasTrailingSpaces && !isTextLikeNode$1(getLastDescendant$1(node.lastChild));
+ }
-function needsToBorrowParentClosingTagStartMarker(node) {
- /**
- * <p>
- * 123</p
- * ^^^
- * >
- *
- * 123</b
- * ></a
- * ^^^
- * >
- */
- return !node.next && !node.hasTrailingSpaces && node.isTrailingSpaceSensitive && isTextLikeNode(getLastDescendant(node));
-}
+ function needsToBorrowParentClosingTagStartMarker(node) {
+ /**
+ * <p>
+ * 123</p
+ * ^^^
+ * >
+ *
+ * 123</b
+ * ></a
+ * ^^^
+ * >
+ */
+ return !node.next && !node.hasTrailingSpaces && node.isTrailingSpaceSensitive && isTextLikeNode$1(getLastDescendant$1(node));
+ }
-function printOpeningTagPrefix(node, options) {
- return needsToBorrowParentOpeningTagEndMarker(node) ? printOpeningTagEndMarker(node.parent) : needsToBorrowPrevClosingTagEndMarker(node) ? printClosingTagEndMarker(node.prev, options) : "";
-}
+ function printOpeningTagPrefix(node, options) {
+ return needsToBorrowParentOpeningTagEndMarker(node) ? printOpeningTagEndMarker(node.parent) : needsToBorrowPrevClosingTagEndMarker(node) ? printClosingTagEndMarker(node.prev, options) : "";
+ }
-function printClosingTagPrefix(node, options) {
- return needsToBorrowLastChildClosingTagEndMarker(node) ? printClosingTagEndMarker(node.lastChild, options) : "";
-}
+ function printClosingTagPrefix(node, options) {
+ return needsToBorrowLastChildClosingTagEndMarker(node) ? printClosingTagEndMarker(node.lastChild, options) : "";
+ }
-function printClosingTagSuffix(node, options) {
- return needsToBorrowParentClosingTagStartMarker(node) ? printClosingTagStartMarker(node.parent, options) : needsToBorrowNextOpeningTagStartMarker(node) ? printOpeningTagStartMarker(node.next) : "";
-}
+ function printClosingTagSuffix(node, options) {
+ return needsToBorrowParentClosingTagStartMarker(node) ? printClosingTagStartMarker(node.parent, options) : needsToBorrowNextOpeningTagStartMarker(node) ? printOpeningTagStartMarker(node.next) : "";
+ }
-function printOpeningTagStartMarker(node) {
- switch (node.type) {
- case "ieConditionalComment":
- case "ieConditionalStartComment":
- return "<!--[if ".concat(node.condition);
+ function printOpeningTagStartMarker(node) {
+ switch (node.type) {
+ case "ieConditionalComment":
+ case "ieConditionalStartComment":
+ return "<!--[if ".concat(node.condition);
- case "ieConditionalEndComment":
- return "<!--<!";
+ case "ieConditionalEndComment":
+ return "<!--<!";
- case "interpolation":
- return "{{";
+ case "interpolation":
+ return "{{";
- case "docType":
- return "<!DOCTYPE";
+ case "docType":
+ return "<!DOCTYPE";
- case "element":
- if (node.condition) {
- return "<!--[if ".concat(node.condition, "]><!--><").concat(node.rawName);
- }
+ case "element":
+ if (node.condition) {
+ return "<!--[if ".concat(node.condition, "]><!--><").concat(node.rawName);
+ }
- // fall through
+ // fall through
- default:
- return "<".concat(node.rawName);
+ default:
+ return "<".concat(node.rawName);
+ }
}
-}
-function printOpeningTagEndMarker(node) {
- assert$3(!node.isSelfClosing);
+ function printOpeningTagEndMarker(node) {
+ assert(!node.isSelfClosing);
- switch (node.type) {
- case "ieConditionalComment":
- return "]>";
+ switch (node.type) {
+ case "ieConditionalComment":
+ return "]>";
- case "element":
- if (node.condition) {
- return "><!--<![endif]-->";
- }
+ case "element":
+ if (node.condition) {
+ return "><!--<![endif]-->";
+ }
- // fall through
+ // fall through
- default:
- return ">";
+ default:
+ return ">";
+ }
}
-}
-function printClosingTagStartMarker(node, options) {
- assert$3(!node.isSelfClosing);
+ function printClosingTagStartMarker(node, options) {
+ assert(!node.isSelfClosing);
- if (shouldNotPrintClosingTag(node, options)) {
- return "";
- }
+ if (shouldNotPrintClosingTag$1(node, options)) {
+ return "";
+ }
- switch (node.type) {
- case "ieConditionalComment":
- return "<!";
+ switch (node.type) {
+ case "ieConditionalComment":
+ return "<!";
- case "element":
- if (node.hasHtmComponentClosingTag) {
- return "<//";
- }
+ case "element":
+ if (node.hasHtmComponentClosingTag) {
+ return "<//";
+ }
- // fall through
+ // fall through
- default:
- return "</".concat(node.rawName);
+ default:
+ return "</".concat(node.rawName);
+ }
}
-}
-function printClosingTagEndMarker(node, options) {
- if (shouldNotPrintClosingTag(node, options)) {
- return "";
- }
+ function printClosingTagEndMarker(node, options) {
+ if (shouldNotPrintClosingTag$1(node, options)) {
+ return "";
+ }
- switch (node.type) {
- case "ieConditionalComment":
- case "ieConditionalEndComment":
- return "[endif]-->";
+ switch (node.type) {
+ case "ieConditionalComment":
+ case "ieConditionalEndComment":
+ return "[endif]-->";
- case "ieConditionalStartComment":
- return "]><!-->";
+ case "ieConditionalStartComment":
+ return "]><!-->";
- case "interpolation":
- return "}}";
+ case "interpolation":
+ return "}}";
- case "element":
- if (node.isSelfClosing) {
- return "/>";
- }
+ case "element":
+ if (node.isSelfClosing) {
+ return "/>";
+ }
- // fall through
+ // fall through
- default:
- return ">";
+ default:
+ return ">";
+ }
}
-}
-
-function getTextValueParts(node) {
- var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.value;
- return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceEndOfLineWith$1(value, literalline$2) : replaceEndOfLineWith$1(dedentString(value.replace(/^\s*?\n|\n\s*?$/g, "")), hardline$7) : // https://infra.spec.whatwg.org/#ascii-whitespace
- join$5(line$6, value.split(/[\t\n\f\r ]+/)).parts;
-}
-function printEmbeddedAttributeValue(node, originalTextToDoc, options) {
- var isKeyMatched = function isKeyMatched(patterns) {
- return new RegExp(patterns.join("|")).test(node.fullName);
- };
+ function getTextValueParts(node) {
+ var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.value;
+ return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceEndOfLineWith$1(value, literalline$2) : replaceEndOfLineWith$1(dedentString$1(value.replace(/^\s*?\n|\n\s*?$/g, "")), hardline$7) : // https://infra.spec.whatwg.org/#ascii-whitespace
+ join$6(line$5, value.split(/[\t\n\f\r ]+/)).parts;
+ }
- var getValue = function getValue() {
- return unescapeQuoteEntities(node.value);
- };
+ function printEmbeddedAttributeValue(node, originalTextToDoc, options) {
+ var isKeyMatched = function isKeyMatched(patterns) {
+ return new RegExp(patterns.join("|")).test(node.fullName);
+ };
- var shouldHug = false;
+ var getValue = function getValue() {
+ return unescapeQuoteEntities$1(node.value);
+ };
- var __onHtmlBindingRoot = function __onHtmlBindingRoot(root) {
- var rootNode = root.type === "NGRoot" ? root.node.type === "NGMicrosyntax" && root.node.body.length === 1 && root.node.body[0].type === "NGMicrosyntaxExpression" ? root.node.body[0].expression : root.node : root.type === "JsExpressionRoot" ? root.node : root;
+ var shouldHug = false;
- if (rootNode && (rootNode.type === "ObjectExpression" || rootNode.type === "ArrayExpression")) {
- shouldHug = true;
- }
- };
+ var __onHtmlBindingRoot = function __onHtmlBindingRoot(root) {
+ var rootNode = root.type === "NGRoot" ? root.node.type === "NGMicrosyntax" && root.node.body.length === 1 && root.node.body[0].type === "NGMicrosyntaxExpression" ? root.node.body[0].expression : root.node : root.type === "JsExpressionRoot" ? root.node : root;
- var printHug = function printHug(doc$$2) {
- return group$8(doc$$2);
- };
+ if (rootNode && (rootNode.type === "ObjectExpression" || rootNode.type === "ArrayExpression")) {
+ shouldHug = true;
+ }
+ };
- var printExpand = function printExpand(doc$$2) {
- return group$8(concat$8([indent$5(concat$8([softline$4, doc$$2])), softline$4]));
- };
+ var printHug = function printHug(doc) {
+ return group$9(doc);
+ };
- var printMaybeHug = function printMaybeHug(doc$$2) {
- return shouldHug ? printHug(doc$$2) : printExpand(doc$$2);
- };
+ var printExpand = function printExpand(doc) {
+ return group$9(concat$a([indent$5(concat$a([softline$4, doc])), softline$4]));
+ };
- var textToDoc = function textToDoc(code, opts) {
- return originalTextToDoc(code, Object.assign({
- __onHtmlBindingRoot: __onHtmlBindingRoot
- }, opts));
- };
+ var printMaybeHug = function printMaybeHug(doc) {
+ return shouldHug ? printHug(doc) : printExpand(doc);
+ };
- if (node.fullName === "srcset" && (node.parent.fullName === "img" || node.parent.fullName === "source")) {
- return printExpand(printImgSrcset(getValue()));
- }
+ var textToDoc = function textToDoc(code, opts) {
+ return originalTextToDoc(code, Object.assign({
+ __onHtmlBindingRoot: __onHtmlBindingRoot
+ }, opts));
+ };
- if (options.parser === "vue") {
- if (node.fullName === "v-for") {
- return printVueFor(getValue(), textToDoc);
+ if (node.fullName === "srcset" && (node.parent.fullName === "img" || node.parent.fullName === "source")) {
+ return printExpand(printImgSrcset$1(getValue()));
}
- if (node.fullName === "slot-scope") {
- return printVueSlotScope(getValue(), textToDoc);
- }
- /**
- * @click="jsStatement"
- * @click="jsExpression"
- * v-on:click="jsStatement"
- * v-on:click="jsExpression"
- */
+ if (options.parser === "vue") {
+ if (node.fullName === "v-for") {
+ return printVueFor$1(getValue(), textToDoc);
+ }
+ if (node.fullName === "slot-scope") {
+ return printVueSlotScope$1(getValue(), textToDoc);
+ }
+ /**
+ * @click="jsStatement"
+ * @click="jsExpression"
+ * v-on:click="jsStatement"
+ * v-on:click="jsExpression"
+ */
- var vueEventBindingPatterns = ["^@", "^v-on:"];
- /**
- * :class="vueExpression"
- * v-bind:id="vueExpression"
- */
- var vueExpressionBindingPatterns = ["^:", "^v-bind:"];
- /**
- * v-if="jsExpression"
- */
+ var vueEventBindingPatterns = ["^@", "^v-on:"];
+ /**
+ * :class="vueExpression"
+ * v-bind:id="vueExpression"
+ */
- var jsExpressionBindingPatterns = ["^v-"];
+ var vueExpressionBindingPatterns = ["^:", "^v-bind:"];
+ /**
+ * v-if="jsExpression"
+ */
- if (isKeyMatched(vueEventBindingPatterns)) {
- var value = getValue();
- return printMaybeHug(isVueEventBindingExpression(value) ? textToDoc(value, {
- parser: "__js_expression"
- }) : stripTrailingHardline$1(textToDoc(value, {
- parser: "__vue_event_binding"
- })));
- }
+ var jsExpressionBindingPatterns = ["^v-"];
- if (isKeyMatched(vueExpressionBindingPatterns)) {
- return printMaybeHug(textToDoc(getValue(), {
- parser: "__vue_expression"
- }));
- }
+ if (isKeyMatched(vueEventBindingPatterns)) {
+ var value = getValue();
+ return printMaybeHug(isVueEventBindingExpression$1(value) ? textToDoc(value, {
+ parser: "__js_expression"
+ }) : stripTrailingHardline$1(textToDoc(value, {
+ parser: "__vue_event_binding"
+ })));
+ }
- if (isKeyMatched(jsExpressionBindingPatterns)) {
- return printMaybeHug(textToDoc(getValue(), {
- parser: "__js_expression"
- }));
+ if (isKeyMatched(vueExpressionBindingPatterns)) {
+ return printMaybeHug(textToDoc(getValue(), {
+ parser: "__vue_expression"
+ }));
+ }
+
+ if (isKeyMatched(jsExpressionBindingPatterns)) {
+ return printMaybeHug(textToDoc(getValue(), {
+ parser: "__js_expression"
+ }));
+ }
}
- }
- if (options.parser === "angular") {
- var ngTextToDoc = function ngTextToDoc(code, opts) {
- return (// angular does not allow trailing comma
- textToDoc(code, Object.assign({
- trailingComma: "none"
- }, opts))
- );
- };
- /**
- * *directive="angularDirective"
- */
+ if (options.parser === "angular") {
+ var ngTextToDoc = function ngTextToDoc(code, opts) {
+ return (// angular does not allow trailing comma
+ textToDoc(code, Object.assign({
+ trailingComma: "none"
+ }, opts))
+ );
+ };
+ /**
+ * *directive="angularDirective"
+ */
- var ngDirectiveBindingPatterns = ["^\\*"];
- /**
- * (click)="angularStatement"
- * on-click="angularStatement"
- */
+ var ngDirectiveBindingPatterns = ["^\\*"];
+ /**
+ * (click)="angularStatement"
+ * on-click="angularStatement"
+ */
- var ngStatementBindingPatterns = ["^\\(.+\\)$", "^on-"];
- /**
- * [target]="angularExpression"
- * bind-target="angularExpression"
- * [(target)]="angularExpression"
- * bindon-target="angularExpression"
- */
+ var ngStatementBindingPatterns = ["^\\(.+\\)$", "^on-"];
+ /**
+ * [target]="angularExpression"
+ * bind-target="angularExpression"
+ * [(target)]="angularExpression"
+ * bindon-target="angularExpression"
+ */
- var ngExpressionBindingPatterns = ["^\\[.+\\]$", "^bind(on)?-"];
+ var ngExpressionBindingPatterns = ["^\\[.+\\]$", "^bind(on)?-"];
+ /**
+ * i18n="longDescription"
+ * i18n-attr="longDescription"
+ */
- if (isKeyMatched(ngStatementBindingPatterns)) {
- return printMaybeHug(ngTextToDoc(getValue(), {
- parser: "__ng_action"
- }));
- }
+ var ngI18nPatterns = ["^i18n(-.+)?$"];
- if (isKeyMatched(ngExpressionBindingPatterns)) {
- return printMaybeHug(ngTextToDoc(getValue(), {
- parser: "__ng_binding"
- }));
- }
+ if (isKeyMatched(ngStatementBindingPatterns)) {
+ return printMaybeHug(ngTextToDoc(getValue(), {
+ parser: "__ng_action"
+ }));
+ }
- if (isKeyMatched(ngDirectiveBindingPatterns)) {
- return printMaybeHug(ngTextToDoc(getValue(), {
- parser: "__ng_directive"
- }));
- }
+ if (isKeyMatched(ngExpressionBindingPatterns)) {
+ return printMaybeHug(ngTextToDoc(getValue(), {
+ parser: "__ng_binding"
+ }));
+ }
- var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
+ if (isKeyMatched(ngI18nPatterns)) {
+ return printExpand(fill$3(getTextValueParts(node, getValue())));
+ }
- var _value2 = getValue();
+ if (isKeyMatched(ngDirectiveBindingPatterns)) {
+ return printMaybeHug(ngTextToDoc(getValue(), {
+ parser: "__ng_directive"
+ }));
+ }
- if (interpolationRegex.test(_value2)) {
- var parts = [];
+ var interpolationRegex = /\{\{([\s\S]+?)\}\}/g;
- _value2.split(interpolationRegex).forEach(function (part, index) {
- if (index % 2 === 0) {
- parts.push(concat$8(replaceEndOfLineWith$1(part, literalline$2)));
- } else {
- try {
- parts.push(group$8(concat$8(["{{", indent$5(concat$8([line$6, ngTextToDoc(part, {
- parser: "__ng_interpolation",
- __isInHtmlInterpolation: true // to avoid unexpected `}}`
+ var _value2 = getValue();
- })])), line$6, "}}"])));
- } catch (e) {
- parts.push("{{", concat$8(replaceEndOfLineWith$1(part, literalline$2)), "}}");
+ if (interpolationRegex.test(_value2)) {
+ var parts = [];
+
+ _value2.split(interpolationRegex).forEach(function (part, index) {
+ if (index % 2 === 0) {
+ parts.push(concat$a(replaceEndOfLineWith$1(part, literalline$2)));
+ } else {
+ try {
+ parts.push(group$9(concat$a(["{{", indent$5(concat$a([line$5, ngTextToDoc(part, {
+ parser: "__ng_interpolation",
+ __isInHtmlInterpolation: true // to avoid unexpected `}}`
+
+ })])), line$5, "}}"])));
+ } catch (e) {
+ parts.push("{{", concat$a(replaceEndOfLineWith$1(part, literalline$2)), "}}");
+ }
}
- }
- });
+ });
- return group$8(concat$8(parts));
+ return group$9(concat$a(parts));
+ }
}
+
+ return null;
}
- return null;
-}
+ var printerHtml = {
+ preprocess: preprocess_1,
+ print: genericPrint$2,
+ insertPragma: insertPragma$6,
+ massageAstNode: clean$3,
+ embed: embed$2
+ };
-var printerHtml = {
- preprocess: preprocess_1,
- print: genericPrint$2,
- insertPragma: insertPragma$5,
- massageAstNode: clean$4,
- embed: embed$2
-};
+ var CATEGORY_HTML = "HTML"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
-var CATEGORY_HTML = "HTML"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+ var options$4 = {
+ htmlWhitespaceSensitivity: {
+ since: "1.15.0",
+ category: CATEGORY_HTML,
+ type: "choice",
+ default: "css",
+ description: "How to handle whitespaces in HTML.",
+ choices: [{
+ value: "css",
+ description: "Respect the default value of CSS display property."
+ }, {
+ value: "strict",
+ description: "Whitespaces are considered sensitive."
+ }, {
+ value: "ignore",
+ description: "Whitespaces are considered insensitive."
+ }]
+ },
+ vueIndentScriptAndStyle: {
+ since: "1.19.0",
+ category: CATEGORY_HTML,
+ type: "boolean",
+ default: false,
+ description: "Indent script and style tags in Vue files."
+ }
+ };
-var options$9 = {
- htmlWhitespaceSensitivity: {
- since: "1.15.0",
- category: CATEGORY_HTML,
- type: "choice",
- default: "css",
- description: "How to handle whitespaces in HTML.",
- choices: [{
- value: "css",
- description: "Respect the default value of CSS display property."
- }, {
- value: "strict",
- description: "Whitespaces are considered sensitive."
- }, {
- value: "ignore",
- description: "Whitespaces are considered insensitive."
- }]
- }
-};
-
-var name$7 = "HTML";
-var type$6 = "markup";
-var tmScope$6 = "text.html.basic";
-var aceMode$6 = "html";
-var codemirrorMode$3 = "htmlmixed";
-var codemirrorMimeType$3 = "text/html";
-var color$1 = "#e34c26";
-var aliases$1 = ["xhtml"];
-var extensions$6 = [".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"];
-var languageId$6 = 146;
-var html$1 = {
- name: name$7,
- type: type$6,
- tmScope: tmScope$6,
- aceMode: aceMode$6,
- codemirrorMode: codemirrorMode$3,
- codemirrorMimeType: codemirrorMimeType$3,
- color: color$1,
- aliases: aliases$1,
- extensions: extensions$6,
- languageId: languageId$6
-};
-
-var html$2 = Object.freeze({
- name: name$7,
- type: type$6,
- tmScope: tmScope$6,
- aceMode: aceMode$6,
- codemirrorMode: codemirrorMode$3,
- codemirrorMimeType: codemirrorMimeType$3,
- color: color$1,
- aliases: aliases$1,
- extensions: extensions$6,
- languageId: languageId$6,
- default: html$1
-});
-
-var name$8 = "Vue";
-var type$7 = "markup";
-var color$2 = "#2c3e50";
-var extensions$7 = [".vue"];
-var tmScope$7 = "text.html.vue";
-var aceMode$7 = "html";
-var languageId$7 = 391;
-var vue = {
- name: name$8,
- type: type$7,
- color: color$2,
- extensions: extensions$7,
- tmScope: tmScope$7,
- aceMode: aceMode$7,
- languageId: languageId$7
-};
-
-var vue$1 = Object.freeze({
- name: name$8,
- type: type$7,
- color: color$2,
- extensions: extensions$7,
- tmScope: tmScope$7,
- aceMode: aceMode$7,
- languageId: languageId$7,
- default: vue
-});
-
-var require$$0$22 = ( html$2 && html$1 ) || html$2;
-
-var require$$1$9 = ( vue$1 && vue ) || vue$1;
-
-var languages$3 = [createLanguage(require$$0$22, {
- override: {
- name: "Angular",
- since: "1.15.0",
- parsers: ["angular"],
- vscodeLanguageIds: ["html"],
- extensions: [".component.html"],
- filenames: []
- }
-}), createLanguage(require$$0$22, {
- override: {
- since: "1.15.0",
- parsers: ["html"],
- vscodeLanguageIds: ["html"]
- },
- extend: {
- extensions: [".mjml" // MJML is considered XML in Linguist but it should be formatted as HTML
- ]
- }
-}), createLanguage(require$$0$22, {
- override: {
- name: "Lightning Web Components",
- since: "1.17.0",
- parsers: ["lwc"],
- vscodeLanguageIds: ["html"],
- extensions: [],
- filenames: []
- }
-}), createLanguage(require$$1$9, {
- override: {
- since: "1.10.0",
- parsers: ["vue"],
- vscodeLanguageIds: ["vue"]
- }
-})];
-var printers$3 = {
- html: printerHtml
-};
-var languageHtml = {
- languages: languages$3,
- printers: printers$3,
- options: options$9
-};
-
-var addLeadingComment$2 = utilShared.addLeadingComment;
-var addTrailingComment$2 = utilShared.addTrailingComment;
-var addDanglingComment$2 = utilShared.addDanglingComment;
-
-function handleOwnLineComment(comment, text, options, ast, isLastComment) {
- var precedingNode = comment.precedingNode,
- enclosingNode = comment.enclosingNode,
- followingNode = comment.followingNode;
-
- if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleMemberExpressionComments(enclosingNode, followingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleImportSpecifierComments(enclosingNode, comment) || handleForComments(enclosingNode, precedingNode, comment) || handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) || handleAssignmentPatternComments(enclosingNode, comment) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options)) {
- return true;
- }
+ var name$7 = "HTML";
+ var type$6 = "markup";
+ var tmScope$6 = "text.html.basic";
+ var aceMode$6 = "html";
+ var codemirrorMode$3 = "htmlmixed";
+ var codemirrorMimeType$3 = "text/html";
+ var color$1 = "#e34c26";
+ var aliases$1 = [
+ "xhtml"
+ ];
+ var extensions$6 = [
+ ".html",
+ ".htm",
+ ".html.hl",
+ ".inc",
+ ".st",
+ ".xht",
+ ".xhtml"
+ ];
+ var languageId$6 = 146;
+ var HTML = {
+ name: name$7,
+ type: type$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ color: color$1,
+ aliases: aliases$1,
+ extensions: extensions$6,
+ languageId: languageId$6
+ };
- return false;
-}
+ var HTML$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$7,
+ type: type$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ color: color$1,
+ aliases: aliases$1,
+ extensions: extensions$6,
+ languageId: languageId$6,
+ 'default': HTML
+ });
-function handleEndOfLineComment(comment, text, options, ast, isLastComment) {
- var precedingNode = comment.precedingNode,
- enclosingNode = comment.enclosingNode,
- followingNode = comment.followingNode;
+ var name$8 = "Vue";
+ var type$7 = "markup";
+ var color$2 = "#2c3e50";
+ var extensions$7 = [
+ ".vue"
+ ];
+ var tmScope$7 = "text.html.vue";
+ var aceMode$7 = "html";
+ var languageId$7 = 391;
+ var Vue = {
+ name: name$8,
+ type: type$7,
+ color: color$2,
+ extensions: extensions$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ languageId: languageId$7
+ };
- if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) || handleImportSpecifierComments(enclosingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleLabeledStatementComments(enclosingNode, comment) || handleCallExpressionComments(precedingNode, enclosingNode, comment) || handlePropertyComments(enclosingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleTypeAliasComments(enclosingNode, followingNode, comment) || handleVariableDeclaratorComments(enclosingNode, followingNode, comment)) {
- return true;
- }
+ var Vue$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$8,
+ type: type$7,
+ color: color$2,
+ extensions: extensions$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ languageId: languageId$7,
+ 'default': Vue
+ });
- return false;
-}
+ var require$$0$5 = getCjsExportFromNamespace(HTML$1);
-function handleRemainingComment(comment, text, options, ast, isLastComment) {
- var precedingNode = comment.precedingNode,
- enclosingNode = comment.enclosingNode,
- followingNode = comment.followingNode;
+ var require$$1$1 = getCjsExportFromNamespace(Vue$1);
- if (handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) || handleCommentInEmptyParens(text, enclosingNode, comment, options) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleCommentAfterArrowParams(text, enclosingNode, comment, options) || handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) || handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) || handleBreakAndContinueStatementComments(enclosingNode, comment)) {
- return true;
- }
+ var languages$3 = [createLanguage(require$$0$5, function (data) {
+ return Object.assign(data, {
+ name: "Angular",
+ since: "1.15.0",
+ parsers: ["angular"],
+ vscodeLanguageIds: ["html"],
+ extensions: [".component.html"],
+ filenames: []
+ });
+ }), createLanguage(require$$0$5, function (data) {
+ return Object.assign(data, {
+ since: "1.15.0",
+ parsers: ["html"],
+ vscodeLanguageIds: ["html"],
+ extensions: data.extensions.concat([".mjml" // MJML is considered XML in Linguist but it should be formatted as HTML
+ ])
+ });
+ }), createLanguage(require$$0$5, function (data) {
+ return Object.assign(data, {
+ name: "Lightning Web Components",
+ since: "1.17.0",
+ parsers: ["lwc"],
+ vscodeLanguageIds: ["html"],
+ extensions: [],
+ filenames: []
+ });
+ }), createLanguage(require$$1$1, function (data) {
+ return Object.assign(data, {
+ since: "1.10.0",
+ parsers: ["vue"],
+ vscodeLanguageIds: ["vue"]
+ });
+ })];
+ var printers$3 = {
+ html: printerHtml
+ };
+ var languageHtml = {
+ languages: languages$3,
+ printers: printers$3,
+ options: options$4
+ };
- return false;
-}
+ var addLeadingComment$2 = utilShared.addLeadingComment,
+ addTrailingComment$2 = utilShared.addTrailingComment,
+ addDanglingComment$2 = utilShared.addDanglingComment;
-function addBlockStatementFirstComment(node, comment) {
- var body = node.body.filter(function (n) {
- return n.type !== "EmptyStatement";
- });
+ function handleOwnLineComment(comment, text, options, ast, isLastComment) {
+ var precedingNode = comment.precedingNode,
+ enclosingNode = comment.enclosingNode,
+ followingNode = comment.followingNode;
+
+ if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleMemberExpressionComments(enclosingNode, followingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleImportSpecifierComments(enclosingNode, comment) || handleForComments(enclosingNode, precedingNode, comment) || handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) || handleAssignmentPatternComments(enclosingNode, comment) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options)) {
+ return true;
+ }
- if (body.length === 0) {
- addDanglingComment$2(node, comment);
- } else {
- addLeadingComment$2(body[0], comment);
- }
-}
-
-function addBlockOrNotComment(node, comment) {
- if (node.type === "BlockStatement") {
- addBlockStatementFirstComment(node, comment);
- } else {
- addLeadingComment$2(node, comment);
- }
-} // There are often comments before the else clause of if statements like
-//
-// if (1) { ... }
-// // comment
-// else { ... }
-//
-// They are being attached as leading comments of the BlockExpression which
-// is not well printed. What we want is to instead move the comment inside
-// of the block and make it leadingComment of the first element of the block
-// or dangling comment of the block if there is nothing inside
-//
-// if (1) { ... }
-// else {
-// // comment
-// ...
-// }
-
-
-function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
- if (!enclosingNode || enclosingNode.type !== "IfStatement" || !followingNode) {
return false;
- } // We unfortunately have no way using the AST or location of nodes to know
- // if the comment is positioned before the condition parenthesis:
- // if (a /* comment */) {}
- // The only workaround I found is to look at the next character to see if
- // it is a ).
+ }
+ function handleEndOfLineComment(comment, text, options, ast, isLastComment) {
+ var precedingNode = comment.precedingNode,
+ enclosingNode = comment.enclosingNode,
+ followingNode = comment.followingNode;
- var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd);
+ if (handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) || handleImportSpecifierComments(enclosingNode, comment) || handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) || handleClassComments(enclosingNode, precedingNode, followingNode, comment) || handleLabeledStatementComments(enclosingNode, comment) || handleCallExpressionComments(precedingNode, enclosingNode, comment) || handlePropertyComments(enclosingNode, comment) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleTypeAliasComments(enclosingNode, followingNode, comment) || handleVariableDeclaratorComments(enclosingNode, followingNode, comment)) {
+ return true;
+ }
- if (nextCharacter === ")") {
- addTrailingComment$2(precedingNode, comment);
- return true;
- } // Comments before `else`:
- // - treat as trailing comments of the consequent, if it's a BlockStatement
- // - treat as a dangling comment otherwise
+ return false;
+ }
+ function handleRemainingComment(comment, text, options, ast, isLastComment) {
+ var precedingNode = comment.precedingNode,
+ enclosingNode = comment.enclosingNode,
+ followingNode = comment.followingNode;
- if (precedingNode === enclosingNode.consequent && followingNode === enclosingNode.alternate) {
- if (precedingNode.type === "BlockStatement") {
- addTrailingComment$2(precedingNode, comment);
- } else {
- addDanglingComment$2(enclosingNode, comment);
+ if (handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) || handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) || handleCommentInEmptyParens(text, enclosingNode, comment, options) || handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) || handleOnlyComments(enclosingNode, ast, comment, isLastComment) || handleCommentAfterArrowParams(text, enclosingNode, comment, options) || handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) || handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) || handleBreakAndContinueStatementComments(enclosingNode, comment)) {
+ return true;
}
- return true;
+ return false;
}
- if (followingNode.type === "BlockStatement") {
- addBlockStatementFirstComment(followingNode, comment);
- return true;
+ function addBlockStatementFirstComment(node, comment) {
+ var body = node.body.filter(function (n) {
+ return n.type !== "EmptyStatement";
+ });
+
+ if (body.length === 0) {
+ addDanglingComment$2(node, comment);
+ } else {
+ addLeadingComment$2(body[0], comment);
+ }
}
- if (followingNode.type === "IfStatement") {
- addBlockOrNotComment(followingNode.consequent, comment);
- return true;
- } // For comments positioned after the condition parenthesis in an if statement
- // before the consequent without brackets on, such as
- // if (a) /* comment */ true,
- // we look at the next character to see if the following node
- // is the consequent for the if statement
+ function addBlockOrNotComment(node, comment) {
+ if (node.type === "BlockStatement") {
+ addBlockStatementFirstComment(node, comment);
+ } else {
+ addLeadingComment$2(node, comment);
+ }
+ } // There are often comments before the else clause of if statements like
+ //
+ // if (1) { ... }
+ // // comment
+ // else { ... }
+ //
+ // They are being attached as leading comments of the BlockExpression which
+ // is not well printed. What we want is to instead move the comment inside
+ // of the block and make it leadingComment of the first element of the block
+ // or dangling comment of the block if there is nothing inside
+ //
+ // if (1) { ... }
+ // else {
+ // // comment
+ // ...
+ // }
- if (enclosingNode.consequent === followingNode) {
- addLeadingComment$2(followingNode, comment);
- return true;
- }
+ function handleIfStatementComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
+ if (!enclosingNode || enclosingNode.type !== "IfStatement" || !followingNode) {
+ return false;
+ } // We unfortunately have no way using the AST or location of nodes to know
+ // if the comment is positioned before the condition parenthesis:
+ // if (a /* comment */) {}
+ // The only workaround I found is to look at the next character to see if
+ // it is a ).
- return false;
-}
-function handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
- if (!enclosingNode || enclosingNode.type !== "WhileStatement" || !followingNode) {
- return false;
- } // We unfortunately have no way using the AST or location of nodes to know
- // if the comment is positioned before the condition parenthesis:
- // while (a /* comment */) {}
- // The only workaround I found is to look at the next character to see if
- // it is a ).
+ var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd);
+ if (nextCharacter === ")") {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ } // Comments before `else`:
+ // - treat as trailing comments of the consequent, if it's a BlockStatement
+ // - treat as a dangling comment otherwise
- var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd);
- if (nextCharacter === ")") {
- addTrailingComment$2(precedingNode, comment);
- return true;
- }
+ if (precedingNode === enclosingNode.consequent && followingNode === enclosingNode.alternate) {
+ if (precedingNode.type === "BlockStatement") {
+ addTrailingComment$2(precedingNode, comment);
+ } else {
+ addDanglingComment$2(enclosingNode, comment);
+ }
- if (followingNode.type === "BlockStatement") {
- addBlockStatementFirstComment(followingNode, comment);
- return true;
- }
+ return true;
+ }
- return false;
-} // Same as IfStatement but for TryStatement
+ if (followingNode.type === "BlockStatement") {
+ addBlockStatementFirstComment(followingNode, comment);
+ return true;
+ }
+
+ if (followingNode.type === "IfStatement") {
+ addBlockOrNotComment(followingNode.consequent, comment);
+ return true;
+ } // For comments positioned after the condition parenthesis in an if statement
+ // before the consequent without brackets on, such as
+ // if (a) /* comment */ true,
+ // we look at the next character to see if the following node
+ // is the consequent for the if statement
-function handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) {
- if (!enclosingNode || enclosingNode.type !== "TryStatement" && enclosingNode.type !== "CatchClause" || !followingNode) {
+ if (enclosingNode.consequent === followingNode) {
+ addLeadingComment$2(followingNode, comment);
+ return true;
+ }
+
return false;
}
- if (enclosingNode.type === "CatchClause" && precedingNode) {
- addTrailingComment$2(precedingNode, comment);
- return true;
- }
+ function handleWhileComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
+ if (!enclosingNode || enclosingNode.type !== "WhileStatement" || !followingNode) {
+ return false;
+ } // We unfortunately have no way using the AST or location of nodes to know
+ // if the comment is positioned before the condition parenthesis:
+ // while (a /* comment */) {}
+ // The only workaround I found is to look at the next character to see if
+ // it is a ).
- if (followingNode.type === "BlockStatement") {
- addBlockStatementFirstComment(followingNode, comment);
- return true;
- }
- if (followingNode.type === "TryStatement") {
- addBlockOrNotComment(followingNode.finalizer, comment);
- return true;
- }
+ var nextCharacter = util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd);
- if (followingNode.type === "CatchClause") {
- addBlockOrNotComment(followingNode.body, comment);
- return true;
- }
+ if (nextCharacter === ")") {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
- return false;
-}
+ if (followingNode.type === "BlockStatement") {
+ addBlockStatementFirstComment(followingNode, comment);
+ return true;
+ }
-function handleMemberExpressionComments(enclosingNode, followingNode, comment) {
- if (enclosingNode && enclosingNode.type === "MemberExpression" && followingNode && followingNode.type === "Identifier") {
- addLeadingComment$2(enclosingNode, comment);
- return true;
- }
+ return false;
+ } // Same as IfStatement but for TryStatement
- return false;
-}
-function handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) {
- var isSameLineAsPrecedingNode = precedingNode && !util.hasNewlineInRange(text, options.locEnd(precedingNode), options.locStart(comment));
+ function handleTryStatementComments(enclosingNode, precedingNode, followingNode, comment) {
+ if (!enclosingNode || enclosingNode.type !== "TryStatement" && enclosingNode.type !== "CatchClause" || !followingNode) {
+ return false;
+ }
- if ((!precedingNode || !isSameLineAsPrecedingNode) && enclosingNode && enclosingNode.type === "ConditionalExpression" && followingNode) {
- addLeadingComment$2(followingNode, comment);
- return true;
- }
+ if (enclosingNode.type === "CatchClause" && precedingNode) {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
- return false;
-}
+ if (followingNode.type === "BlockStatement") {
+ addBlockStatementFirstComment(followingNode, comment);
+ return true;
+ }
-function handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "ObjectProperty" || enclosingNode.type === "Property") && enclosingNode.shorthand && enclosingNode.key === precedingNode && enclosingNode.value.type === "AssignmentPattern") {
- addTrailingComment$2(enclosingNode.value.left, comment);
- return true;
- }
+ if (followingNode.type === "TryStatement") {
+ addBlockOrNotComment(followingNode.finalizer, comment);
+ return true;
+ }
- return false;
-}
+ if (followingNode.type === "CatchClause") {
+ addBlockOrNotComment(followingNode.body, comment);
+ return true;
+ }
-function handleClassComments(enclosingNode, precedingNode, followingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "ClassDeclaration" || enclosingNode.type === "ClassExpression") && enclosingNode.decorators && enclosingNode.decorators.length > 0 && !(followingNode && followingNode.type === "Decorator")) {
- if (!enclosingNode.decorators || enclosingNode.decorators.length === 0) {
+ return false;
+ }
+
+ function handleMemberExpressionComments(enclosingNode, followingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "MemberExpression" || enclosingNode.type === "OptionalMemberExpression") && followingNode && followingNode.type === "Identifier") {
addLeadingComment$2(enclosingNode, comment);
- } else {
- addTrailingComment$2(enclosingNode.decorators[enclosingNode.decorators.length - 1], comment);
+ return true;
}
- return true;
+ return false;
}
- return false;
-}
-
-function handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) {
- // This is only needed for estree parsers (flow, typescript) to attach
- // after a method name:
- // obj = { fn /*comment*/() {} };
- if (enclosingNode && precedingNode && (enclosingNode.type === "Property" || enclosingNode.type === "MethodDefinition") && precedingNode.type === "Identifier" && enclosingNode.key === precedingNode && // special Property case: { key: /*comment*/(value) };
- // comment should be attached to value instead of key
- util.getNextNonSpaceNonCommentCharacter(text, precedingNode, options.locEnd) !== ":") {
- addTrailingComment$2(precedingNode, comment);
- return true;
- } // Print comments between decorators and class methods as a trailing comment
- // on the decorator node instead of the method node
+ function handleConditionalExpressionComments(enclosingNode, precedingNode, followingNode, comment, text, options) {
+ var isSameLineAsPrecedingNode = precedingNode && !util.hasNewlineInRange(text, options.locEnd(precedingNode), options.locStart(comment));
+ if ((!precedingNode || !isSameLineAsPrecedingNode) && enclosingNode && enclosingNode.type === "ConditionalExpression" && followingNode) {
+ addLeadingComment$2(followingNode, comment);
+ return true;
+ }
- if (precedingNode && enclosingNode && precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "MethodDefinition")) {
- addTrailingComment$2(precedingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleObjectPropertyAssignment(enclosingNode, precedingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "ObjectProperty" || enclosingNode.type === "Property") && enclosingNode.shorthand && enclosingNode.key === precedingNode && enclosingNode.value.type === "AssignmentPattern") {
+ addTrailingComment$2(enclosingNode.value.left, comment);
+ return true;
+ }
-function handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) {
- if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== "(") {
return false;
}
- if (precedingNode && enclosingNode && (enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "MethodDefinition" || enclosingNode.type === "ObjectMethod")) {
- addTrailingComment$2(precedingNode, comment);
- return true;
- }
+ function handleClassComments(enclosingNode, precedingNode, followingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "ClassDeclaration" || enclosingNode.type === "ClassExpression") && enclosingNode.decorators && enclosingNode.decorators.length > 0 && !(followingNode && followingNode.type === "Decorator")) {
+ if (!enclosingNode.decorators || enclosingNode.decorators.length === 0) {
+ addLeadingComment$2(enclosingNode, comment);
+ } else {
+ addTrailingComment$2(enclosingNode.decorators[enclosingNode.decorators.length - 1], comment);
+ }
- return false;
-}
+ return true;
+ }
-function handleCommentAfterArrowParams(text, enclosingNode, comment, options) {
- if (!(enclosingNode && enclosingNode.type === "ArrowFunctionExpression")) {
return false;
}
- var index = utilShared.getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+ function handleMethodNameComments(text, enclosingNode, precedingNode, comment, options) {
+ // This is only needed for estree parsers (flow, typescript) to attach
+ // after a method name:
+ // obj = { fn /*comment*/() {} };
+ if (enclosingNode && precedingNode && (enclosingNode.type === "Property" || enclosingNode.type === "MethodDefinition") && precedingNode.type === "Identifier" && enclosingNode.key === precedingNode && // special Property case: { key: /*comment*/(value) };
+ // comment should be attached to value instead of key
+ util.getNextNonSpaceNonCommentCharacter(text, precedingNode, options.locEnd) !== ":") {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ } // Print comments between decorators and class methods as a trailing comment
+ // on the decorator node instead of the method node
- if (text.substr(index, 2) === "=>") {
- addDanglingComment$2(enclosingNode, comment);
- return true;
- }
- return false;
-}
+ if (precedingNode && enclosingNode && precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "MethodDefinition")) {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
-function handleCommentInEmptyParens(text, enclosingNode, comment, options) {
- if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== ")") {
return false;
- } // Only add dangling comments to fix the case when no params are present,
- // i.e. a function without any argument.
+ }
+ function handleFunctionNameComments(text, enclosingNode, precedingNode, comment, options) {
+ if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== "(") {
+ return false;
+ }
- if (enclosingNode && ((enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "ObjectMethod") && enclosingNode.params.length === 0 || (enclosingNode.type === "CallExpression" || enclosingNode.type === "NewExpression") && enclosingNode.arguments.length === 0)) {
- addDanglingComment$2(enclosingNode, comment);
- return true;
- }
+ if (precedingNode && enclosingNode && (enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "MethodDefinition" || enclosingNode.type === "ObjectMethod")) {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
- if (enclosingNode && enclosingNode.type === "MethodDefinition" && enclosingNode.value.params.length === 0) {
- addDanglingComment$2(enclosingNode.value, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleCommentAfterArrowParams(text, enclosingNode, comment, options) {
+ if (!(enclosingNode && enclosingNode.type === "ArrowFunctionExpression")) {
+ return false;
+ }
-function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
- // Type definitions functions
- if (precedingNode && precedingNode.type === "FunctionTypeParam" && enclosingNode && enclosingNode.type === "FunctionTypeAnnotation" && followingNode && followingNode.type !== "FunctionTypeParam") {
- addTrailingComment$2(precedingNode, comment);
- return true;
- } // Real functions
+ var index = utilShared.getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+ if (text.substr(index, 2) === "=>") {
+ addDanglingComment$2(enclosingNode, comment);
+ return true;
+ }
- if (precedingNode && (precedingNode.type === "Identifier" || precedingNode.type === "AssignmentPattern") && enclosingNode && (enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "ObjectMethod" || enclosingNode.type === "ClassMethod") && util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) === ")") {
- addTrailingComment$2(precedingNode, comment);
- return true;
+ return false;
}
- if (enclosingNode && enclosingNode.type === "FunctionDeclaration" && followingNode && followingNode.type === "BlockStatement") {
- var functionParamRightParenIndex = function () {
- if (enclosingNode.params.length !== 0) {
- return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(util.getLast(enclosingNode.params)));
- }
+ function handleCommentInEmptyParens(text, enclosingNode, comment, options) {
+ if (util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) !== ")") {
+ return false;
+ } // Only add dangling comments to fix the case when no params are present,
+ // i.e. a function without any argument.
- var functionParamLeftParenIndex = util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(enclosingNode.id));
- return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, functionParamLeftParenIndex + 1);
- }();
- if (options.locStart(comment) > functionParamRightParenIndex) {
- addBlockStatementFirstComment(followingNode, comment);
+ if (enclosingNode && ((enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "ClassMethod" || enclosingNode.type === "ObjectMethod") && enclosingNode.params.length === 0 || (enclosingNode.type === "CallExpression" || enclosingNode.type === "OptionalCallExpression" || enclosingNode.type === "NewExpression") && enclosingNode.arguments.length === 0)) {
+ addDanglingComment$2(enclosingNode, comment);
return true;
}
- }
- return false;
-}
+ if (enclosingNode && enclosingNode.type === "MethodDefinition" && enclosingNode.value.params.length === 0) {
+ addDanglingComment$2(enclosingNode.value, comment);
+ return true;
+ }
-function handleImportSpecifierComments(enclosingNode, comment) {
- if (enclosingNode && enclosingNode.type === "ImportSpecifier") {
- addLeadingComment$2(enclosingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
+ // Type definitions functions
+ if (precedingNode && precedingNode.type === "FunctionTypeParam" && enclosingNode && enclosingNode.type === "FunctionTypeAnnotation" && followingNode && followingNode.type !== "FunctionTypeParam") {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ } // Real functions
-function handleLabeledStatementComments(enclosingNode, comment) {
- if (enclosingNode && enclosingNode.type === "LabeledStatement") {
- addLeadingComment$2(enclosingNode, comment);
- return true;
- }
- return false;
-}
+ if (precedingNode && (precedingNode.type === "Identifier" || precedingNode.type === "AssignmentPattern") && enclosingNode && (enclosingNode.type === "ArrowFunctionExpression" || enclosingNode.type === "FunctionExpression" || enclosingNode.type === "FunctionDeclaration" || enclosingNode.type === "ObjectMethod" || enclosingNode.type === "ClassMethod") && util.getNextNonSpaceNonCommentCharacter(text, comment, options.locEnd) === ")") {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
-function handleBreakAndContinueStatementComments(enclosingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "ContinueStatement" || enclosingNode.type === "BreakStatement") && !enclosingNode.label) {
- addTrailingComment$2(enclosingNode, comment);
- return true;
+ if (enclosingNode && enclosingNode.type === "FunctionDeclaration" && followingNode && followingNode.type === "BlockStatement") {
+ var functionParamRightParenIndex = function () {
+ if (enclosingNode.params.length !== 0) {
+ return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(util.getLast(enclosingNode.params)));
+ }
+
+ var functionParamLeftParenIndex = util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, options.locEnd(enclosingNode.id));
+ return util.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, functionParamLeftParenIndex + 1);
+ }();
+
+ if (options.locStart(comment) > functionParamRightParenIndex) {
+ addBlockStatementFirstComment(followingNode, comment);
+ return true;
+ }
+ }
+
+ return false;
}
- return false;
-}
+ function handleImportSpecifierComments(enclosingNode, comment) {
+ if (enclosingNode && enclosingNode.type === "ImportSpecifier") {
+ addLeadingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handleCallExpressionComments(precedingNode, enclosingNode, comment) {
- if (enclosingNode && enclosingNode.type === "CallExpression" && precedingNode && enclosingNode.callee === precedingNode && enclosingNode.arguments.length > 0) {
- addLeadingComment$2(enclosingNode.arguments[0], comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleLabeledStatementComments(enclosingNode, comment) {
+ if (enclosingNode && enclosingNode.type === "LabeledStatement") {
+ addLeadingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
- addTrailingComment$2(precedingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleBreakAndContinueStatementComments(enclosingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "ContinueStatement" || enclosingNode.type === "BreakStatement") && !enclosingNode.label) {
+ addTrailingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handlePropertyComments(enclosingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "Property" || enclosingNode.type === "ObjectProperty")) {
- addLeadingComment$2(enclosingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleCallExpressionComments(precedingNode, enclosingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "CallExpression" || enclosingNode.type === "OptionalCallExpression") && precedingNode && enclosingNode.callee === precedingNode && enclosingNode.arguments.length > 0) {
+ addLeadingComment$2(enclosingNode.arguments[0], comment);
+ return true;
+ }
-function handleOnlyComments(enclosingNode, ast, comment, isLastComment) {
- // With Flow the enclosingNode is undefined so use the AST instead.
- if (ast && ast.body && ast.body.length === 0) {
- if (isLastComment) {
- addDanglingComment$2(ast, comment);
- } else {
- addLeadingComment$2(ast, comment);
+ return false;
+ }
+
+ function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
}
- return true;
- } else if (enclosingNode && enclosingNode.type === "Program" && enclosingNode.body.length === 0 && enclosingNode.directives && enclosingNode.directives.length === 0) {
- if (isLastComment) {
- addDanglingComment$2(enclosingNode, comment);
- } else {
+ return false;
+ }
+
+ function handlePropertyComments(enclosingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "Property" || enclosingNode.type === "ObjectProperty")) {
addLeadingComment$2(enclosingNode, comment);
+ return true;
}
- return true;
+ return false;
}
- return false;
-}
+ function handleOnlyComments(enclosingNode, ast, comment, isLastComment) {
+ // With Flow the enclosingNode is undefined so use the AST instead.
+ if (ast && ast.body && ast.body.length === 0) {
+ if (isLastComment) {
+ addDanglingComment$2(ast, comment);
+ } else {
+ addLeadingComment$2(ast, comment);
+ }
-function handleForComments(enclosingNode, precedingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "ForInStatement" || enclosingNode.type === "ForOfStatement")) {
- addLeadingComment$2(enclosingNode, comment);
- return true;
- }
+ return true;
+ } else if (enclosingNode && enclosingNode.type === "Program" && enclosingNode.body.length === 0 && enclosingNode.directives && enclosingNode.directives.length === 0) {
+ if (isLastComment) {
+ addDanglingComment$2(enclosingNode, comment);
+ } else {
+ addLeadingComment$2(enclosingNode, comment);
+ }
- return false;
-}
+ return true;
+ }
-function handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) {
- if (precedingNode && precedingNode.type === "ImportSpecifier" && enclosingNode && enclosingNode.type === "ImportDeclaration" && util.hasNewline(text, options.locEnd(comment))) {
- addTrailingComment$2(precedingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleForComments(enclosingNode, precedingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "ForInStatement" || enclosingNode.type === "ForOfStatement")) {
+ addLeadingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handleAssignmentPatternComments(enclosingNode, comment) {
- if (enclosingNode && enclosingNode.type === "AssignmentPattern") {
- addLeadingComment$2(enclosingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleImportDeclarationComments(text, enclosingNode, precedingNode, comment, options) {
+ if (precedingNode && precedingNode.type === "ImportSpecifier" && enclosingNode && enclosingNode.type === "ImportDeclaration" && util.hasNewline(text, options.locEnd(comment))) {
+ addTrailingComment$2(precedingNode, comment);
+ return true;
+ }
-function handleTypeAliasComments(enclosingNode, followingNode, comment) {
- if (enclosingNode && enclosingNode.type === "TypeAlias") {
- addLeadingComment$2(enclosingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleAssignmentPatternComments(enclosingNode, comment) {
+ if (enclosingNode && enclosingNode.type === "AssignmentPattern") {
+ addLeadingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handleVariableDeclaratorComments(enclosingNode, followingNode, comment) {
- if (enclosingNode && (enclosingNode.type === "VariableDeclarator" || enclosingNode.type === "AssignmentExpression") && followingNode && (followingNode.type === "ObjectExpression" || followingNode.type === "ArrayExpression" || followingNode.type === "TemplateLiteral" || followingNode.type === "TaggedTemplateExpression")) {
- addLeadingComment$2(followingNode, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleTypeAliasComments(enclosingNode, followingNode, comment) {
+ if (enclosingNode && enclosingNode.type === "TypeAlias") {
+ addLeadingComment$2(enclosingNode, comment);
+ return true;
+ }
-function handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) {
- if (!enclosingNode || enclosingNode.type !== "TSMappedType") {
return false;
}
- if (followingNode && followingNode.type === "TSTypeParameter" && followingNode.name) {
- addLeadingComment$2(followingNode.name, comment);
- return true;
- }
+ function handleVariableDeclaratorComments(enclosingNode, followingNode, comment) {
+ if (enclosingNode && (enclosingNode.type === "VariableDeclarator" || enclosingNode.type === "AssignmentExpression") && followingNode && (followingNode.type === "ObjectExpression" || followingNode.type === "ArrayExpression" || followingNode.type === "TemplateLiteral" || followingNode.type === "TaggedTemplateExpression")) {
+ addLeadingComment$2(followingNode, comment);
+ return true;
+ }
- if (precedingNode && precedingNode.type === "TSTypeParameter" && precedingNode.constraint) {
- addTrailingComment$2(precedingNode.constraint, comment);
- return true;
+ return false;
}
- return false;
-}
+ function handleTSMappedTypeComments(text, enclosingNode, precedingNode, followingNode, comment) {
+ if (!enclosingNode || enclosingNode.type !== "TSMappedType") {
+ return false;
+ }
-function isBlockComment$1(comment) {
- return comment.type === "Block" || comment.type === "CommentBlock";
-}
+ if (followingNode && followingNode.type === "TSTypeParameter" && followingNode.name) {
+ addLeadingComment$2(followingNode.name, comment);
+ return true;
+ }
-function hasLeadingComment$2(node) {
- var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
- return true;
- };
+ if (precedingNode && precedingNode.type === "TSTypeParameter" && precedingNode.constraint) {
+ addTrailingComment$2(precedingNode.constraint, comment);
+ return true;
+ }
- if (node.leadingComments) {
- return node.leadingComments.some(fn);
+ return false;
}
- if (node.comments) {
- return node.comments.some(function (comment) {
- return comment.leading && fn(comment);
- });
+ function isBlockComment(comment) {
+ return comment.type === "Block" || comment.type === "CommentBlock";
}
- return false;
-}
-
-var comments$3 = {
- handleOwnLineComment: handleOwnLineComment,
- handleEndOfLineComment: handleEndOfLineComment,
- handleRemainingComment: handleRemainingComment,
- hasLeadingComment: hasLeadingComment$2,
- isBlockComment: isBlockComment$1
-};
-
-var isBlockComment = comments$3.isBlockComment;
-var hasLeadingComment$1 = comments$3.hasLeadingComment;
-var _require$$1$builders = doc.builders;
-var indent$7 = _require$$1$builders.indent;
-var join$8 = _require$$1$builders.join;
-var hardline$9 = _require$$1$builders.hardline;
-var softline$6 = _require$$1$builders.softline;
-var literalline$4 = _require$$1$builders.literalline;
-var concat$12 = _require$$1$builders.concat;
-var group$11 = _require$$1$builders.group;
-var dedentToRoot$2 = _require$$1$builders.dedentToRoot;
-var _require$$1$utils = doc.utils;
-var mapDoc$5 = _require$$1$utils.mapDoc;
-var stripTrailingHardline$2 = _require$$1$utils.stripTrailingHardline;
-
-function embed$4(path, print, textToDoc, options) {
- var node = path.getValue();
- var parent = path.getParentNode();
- var parentParent = path.getParentNode(1);
-
- switch (node.type) {
- case "TemplateLiteral":
- {
- var isCss = [isStyledJsx, isStyledComponents, isCssProp, isAngularComponentStyles].some(function (isIt) {
- return isIt(path);
- });
+ function hasLeadingComment(node) {
+ var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
+ return true;
+ };
- if (isCss) {
- // Get full template literal with expressions replaced by placeholders
- var rawQuasis = node.quasis.map(function (q) {
- return q.value.raw;
- });
- var placeholderID = 0;
- var text = rawQuasis.reduce(function (prevVal, currVal, idx) {
- return idx == 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
- }, "");
- var doc$$2 = textToDoc(text, {
- parser: "css"
- });
- return transformCssDoc(doc$$2, path, print);
- }
- /*
- * react-relay and graphql-tag
- * graphql`...`
- * graphql.experimental`...`
- * gql`...`
- *
- * This intentionally excludes Relay Classic tags, as Prettier does not
- * support Relay Classic formatting.
- */
+ if (node.leadingComments) {
+ return node.leadingComments.some(fn);
+ }
+ if (node.comments) {
+ return node.comments.some(function (comment) {
+ return comment.leading && fn(comment);
+ });
+ }
- if (isGraphQL(path)) {
- var expressionDocs = node.expressions ? path.map(print, "expressions") : [];
- var numQuasis = node.quasis.length;
+ return false;
+ }
- if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") {
- return "``";
- }
+ var comments$1 = {
+ handleOwnLineComment: handleOwnLineComment,
+ handleEndOfLineComment: handleEndOfLineComment,
+ handleRemainingComment: handleRemainingComment,
+ hasLeadingComment: hasLeadingComment,
+ isBlockComment: isBlockComment
+ };
- var parts = [];
+ var isBlockComment$1 = comments$1.isBlockComment,
+ hasLeadingComment$1 = comments$1.hasLeadingComment;
+ var _require$$1$builders = doc.builders,
+ indent$6 = _require$$1$builders.indent,
+ join$7 = _require$$1$builders.join,
+ hardline$8 = _require$$1$builders.hardline,
+ softline$5 = _require$$1$builders.softline,
+ literalline$3 = _require$$1$builders.literalline,
+ concat$b = _require$$1$builders.concat,
+ group$a = _require$$1$builders.group,
+ dedentToRoot$2 = _require$$1$builders.dedentToRoot,
+ _require$$1$utils = doc.utils,
+ mapDoc$5 = _require$$1$utils.mapDoc,
+ stripTrailingHardline$2 = _require$$1$utils.stripTrailingHardline;
+
+ function embed$3(path, print, textToDoc, options) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ var parentParent = path.getParentNode(1);
- for (var i = 0; i < numQuasis; i++) {
- var templateElement = node.quasis[i];
- var isFirst = i === 0;
- var isLast = i === numQuasis - 1;
- var _text = templateElement.value.cooked; // Bail out if any of the quasis have an invalid escape sequence
- // (which would make the `cooked` value be `null` or `undefined`)
+ switch (node.type) {
+ case "TemplateLiteral":
+ {
+ var isCss = [isStyledJsx, isStyledComponents, isCssProp, isAngularComponentStyles].some(function (isIt) {
+ return isIt(path);
+ });
- if (typeof _text !== "string") {
- return null;
+ if (isCss) {
+ // Get full template literal with expressions replaced by placeholders
+ var rawQuasis = node.quasis.map(function (q) {
+ return q.value.raw;
+ });
+ var placeholderID = 0;
+ var text = rawQuasis.reduce(function (prevVal, currVal, idx) {
+ return idx == 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
+ }, "");
+ var doc = textToDoc(text, {
+ parser: "css"
+ });
+ return transformCssDoc(doc, path, print);
+ }
+ /*
+ * react-relay and graphql-tag
+ * graphql`...`
+ * graphql.experimental`...`
+ * gql`...`
+ *
+ * This intentionally excludes Relay Classic tags, as Prettier does not
+ * support Relay Classic formatting.
+ */
+
+
+ if (isGraphQL(path)) {
+ var expressionDocs = node.expressions ? path.map(print, "expressions") : [];
+ var numQuasis = node.quasis.length;
+
+ if (numQuasis === 1 && node.quasis[0].value.raw.trim() === "") {
+ return "``";
}
- var lines = _text.split("\n");
+ var parts = [];
- var numLines = lines.length;
- var expressionDoc = expressionDocs[i];
- var startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === "";
- var endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === "";
- var commentsAndWhitespaceOnly = lines.every(function (line) {
- return /^\s*(?:#[^\r\n]*)?$/.test(line);
- }); // Bail out if an interpolation occurs within a comment.
+ for (var i = 0; i < numQuasis; i++) {
+ var templateElement = node.quasis[i];
+ var isFirst = i === 0;
+ var isLast = i === numQuasis - 1;
+ var _text = templateElement.value.cooked; // Bail out if any of the quasis have an invalid escape sequence
+ // (which would make the `cooked` value be `null` or `undefined`)
- if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) {
- return null;
- }
+ if (typeof _text !== "string") {
+ return null;
+ }
- var _doc = null;
+ var lines = _text.split("\n");
- if (commentsAndWhitespaceOnly) {
- _doc = printGraphqlComments(lines);
- } else {
- _doc = stripTrailingHardline$2(textToDoc(_text, {
- parser: "graphql"
- }));
- }
+ var numLines = lines.length;
+ var expressionDoc = expressionDocs[i];
+ var startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === "";
+ var endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === "";
+ var commentsAndWhitespaceOnly = lines.every(function (line) {
+ return /^\s*(?:#[^\r\n]*)?$/.test(line);
+ }); // Bail out if an interpolation occurs within a comment.
- if (_doc) {
- _doc = escapeTemplateCharacters(_doc, false);
+ if (!isLast && /#[^\r\n]*$/.test(lines[numLines - 1])) {
+ return null;
+ }
- if (!isFirst && startsWithBlankLine) {
- parts.push("");
+ var _doc = null;
+
+ if (commentsAndWhitespaceOnly) {
+ _doc = printGraphqlComments(lines);
+ } else {
+ _doc = stripTrailingHardline$2(textToDoc(_text, {
+ parser: "graphql"
+ }));
}
- parts.push(_doc);
+ if (_doc) {
+ _doc = escapeTemplateCharacters(_doc, false);
+
+ if (!isFirst && startsWithBlankLine) {
+ parts.push("");
+ }
+
+ parts.push(_doc);
- if (!isLast && endsWithBlankLine) {
+ if (!isLast && endsWithBlankLine) {
+ parts.push("");
+ }
+ } else if (!isFirst && !isLast && startsWithBlankLine) {
parts.push("");
}
- } else if (!isFirst && !isLast && startsWithBlankLine) {
- parts.push("");
- }
- if (expressionDoc) {
- parts.push(concat$12(["${", expressionDoc, "}"]));
+ if (expressionDoc) {
+ parts.push(concat$b(["${", expressionDoc, "}"]));
+ }
}
+
+ return concat$b(["`", indent$6(concat$b([hardline$8, join$7(hardline$8, parts)])), hardline$8, "`"]);
}
- return concat$12(["`", indent$7(concat$12([hardline$9, join$8(hardline$9, parts)])), hardline$9, "`"]);
- }
+ var htmlParser = isHtml(path) ? "html" : isAngularComponentTemplate(path) ? "angular" : undefined;
- var htmlParser = isHtml(path) ? "html" : isAngularComponentTemplate(path) ? "angular" : undefined;
+ if (htmlParser) {
+ return printHtmlTemplateLiteral(path, print, textToDoc, htmlParser, options.embeddedInHtml);
+ }
- if (htmlParser) {
- return printHtmlTemplateLiteral(path, print, textToDoc, htmlParser, options.embeddedInHtml);
+ break;
}
- break;
- }
+ case "TemplateElement":
+ {
+ /**
+ * md`...`
+ * markdown`...`
+ */
+ if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "Identifier" && (parentParent.tag.name === "md" || parentParent.tag.name === "markdown")) {
+ var _text2 = parent.quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, function (_, backslashes) {
+ return "\\".repeat(backslashes.length / 2) + "`";
+ });
- case "TemplateElement":
- {
- /**
- * md`...`
- * markdown`...`
- */
- if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "Identifier" && (parentParent.tag.name === "md" || parentParent.tag.name === "markdown")) {
- var _text2 = parent.quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, function (_, backslashes) {
- return "\\".repeat(backslashes.length / 2) + "`";
- });
+ var indentation = getIndentation(_text2);
+ var hasIndent = indentation !== "";
+ return concat$b([hasIndent ? indent$6(concat$b([softline$5, printMarkdown(_text2.replace(new RegExp("^".concat(indentation), "gm"), ""))])) : concat$b([literalline$3, dedentToRoot$2(printMarkdown(_text2))]), softline$5]);
+ }
- var indentation = getIndentation(_text2);
- var hasIndent = indentation !== "";
- return concat$12([hasIndent ? indent$7(concat$12([softline$6, printMarkdown(_text2.replace(new RegExp("^".concat(indentation), "gm"), ""))])) : concat$12([literalline$4, dedentToRoot$2(printMarkdown(_text2))]), softline$6]);
+ break;
}
+ }
- break;
- }
+ function printMarkdown(text) {
+ var doc = textToDoc(text, {
+ parser: "markdown",
+ __inJsTemplate: true
+ });
+ return stripTrailingHardline$2(escapeTemplateCharacters(doc, true));
+ }
}
- function printMarkdown(text) {
- var doc$$2 = textToDoc(text, {
- parser: "markdown",
- __inJsTemplate: true
+ function getIndentation(str) {
+ var firstMatchedIndent = str.match(/^([^\S\n]*)\S/m);
+ return firstMatchedIndent === null ? "" : firstMatchedIndent[1];
+ }
+
+ function uncook(cookedValue) {
+ return cookedValue.replace(/([\\`]|\$\{)/g, "\\$1");
+ }
+
+ function escapeTemplateCharacters(doc, raw) {
+ return mapDoc$5(doc, function (currentDoc) {
+ if (!currentDoc.parts) {
+ return currentDoc;
+ }
+
+ var parts = [];
+ currentDoc.parts.forEach(function (part) {
+ if (typeof part === "string") {
+ parts.push(raw ? part.replace(/(\\*)`/g, "$1$1\\`") : uncook(part));
+ } else {
+ parts.push(part);
+ }
+ });
+ return Object.assign({}, currentDoc, {
+ parts: parts
+ });
});
- return stripTrailingHardline$2(escapeTemplateCharacters(doc$$2, true));
}
-}
-function getIndentation(str) {
- var firstMatchedIndent = str.match(/^([^\S\n]*)\S/m);
- return firstMatchedIndent === null ? "" : firstMatchedIndent[1];
-}
+ function transformCssDoc(quasisDoc, path, print) {
+ var parentNode = path.getValue();
+ var isEmpty = parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim();
-function uncook(cookedValue) {
- return cookedValue.replace(/([\\`]|\$\{)/g, "\\$1");
-}
+ if (isEmpty) {
+ return "``";
+ }
+
+ var expressionDocs = parentNode.expressions ? path.map(print, "expressions") : [];
+ var newDoc = replacePlaceholders(quasisDoc, expressionDocs);
+ /* istanbul ignore if */
-function escapeTemplateCharacters(doc$$2, raw) {
- return mapDoc$5(doc$$2, function (currentDoc) {
- if (!currentDoc.parts) {
- return currentDoc;
+ if (!newDoc) {
+ throw new Error("Couldn't insert all the expressions");
}
- var parts = [];
- currentDoc.parts.forEach(function (part) {
- if (typeof part === "string") {
- parts.push(raw ? part.replace(/(\\*)`/g, "$1$1\\`") : uncook(part));
- } else {
- parts.push(part);
- }
- });
- return Object.assign({}, currentDoc, {
- parts: parts
- });
- });
-}
+ return concat$b(["`", indent$6(concat$b([hardline$8, stripTrailingHardline$2(newDoc)])), softline$5, "`"]);
+ } // Search all the placeholders in the quasisDoc tree
+ // and replace them with the expression docs one by one
+ // returns a new doc with all the placeholders replaced,
+ // or null if it couldn't replace any expression
-function transformCssDoc(quasisDoc, path, print) {
- var parentNode = path.getValue();
- var isEmpty = parentNode.quasis.length === 1 && !parentNode.quasis[0].value.raw.trim();
- if (isEmpty) {
- return "``";
- }
+ function replacePlaceholders(quasisDoc, expressionDocs) {
+ if (!expressionDocs || !expressionDocs.length) {
+ return quasisDoc;
+ }
- var expressionDocs = parentNode.expressions ? path.map(print, "expressions") : [];
- var newDoc = replacePlaceholders(quasisDoc, expressionDocs);
- /* istanbul ignore if */
+ var expressions = expressionDocs.slice();
+ var replaceCounter = 0;
+ var newDoc = mapDoc$5(quasisDoc, function (doc) {
+ if (!doc || !doc.parts || !doc.parts.length) {
+ return doc;
+ }
- if (!newDoc) {
- throw new Error("Couldn't insert all the expressions");
- }
+ var parts = doc.parts;
+ var atIndex = parts.indexOf("@");
+ var placeholderIndex = atIndex + 1;
- return concat$12(["`", indent$7(concat$12([hardline$9, stripTrailingHardline$2(newDoc)])), softline$6, "`"]);
-} // Search all the placeholders in the quasisDoc tree
-// and replace them with the expression docs one by one
-// returns a new doc with all the placeholders replaced,
-// or null if it couldn't replace any expression
+ if (atIndex > -1 && typeof parts[placeholderIndex] === "string" && parts[placeholderIndex].startsWith("prettier-placeholder")) {
+ // If placeholder is split, join it
+ var at = parts[atIndex];
+ var placeholder = parts[placeholderIndex];
+ var rest = parts.slice(placeholderIndex + 1);
+ parts = parts.slice(0, atIndex).concat([at + placeholder]).concat(rest);
+ }
+ var atPlaceholderIndex = parts.findIndex(function (part) {
+ return typeof part === "string" && part.startsWith("@prettier-placeholder");
+ });
-function replacePlaceholders(quasisDoc, expressionDocs) {
- if (!expressionDocs || !expressionDocs.length) {
- return quasisDoc;
- }
+ if (atPlaceholderIndex > -1) {
+ var _placeholder = parts[atPlaceholderIndex];
- var expressions = expressionDocs.slice();
- var replaceCounter = 0;
- var newDoc = mapDoc$5(quasisDoc, function (doc$$2) {
- if (!doc$$2 || !doc$$2.parts || !doc$$2.parts.length) {
- return doc$$2;
- }
+ var _rest = parts.slice(atPlaceholderIndex + 1);
- var parts = doc$$2.parts;
- var atIndex = parts.indexOf("@");
- var placeholderIndex = atIndex + 1;
+ var placeholderMatch = _placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/);
- if (atIndex > -1 && typeof parts[placeholderIndex] === "string" && parts[placeholderIndex].startsWith("prettier-placeholder")) {
- // If placeholder is split, join it
- var at = parts[atIndex];
- var placeholder = parts[placeholderIndex];
- var rest = parts.slice(placeholderIndex + 1);
- parts = parts.slice(0, atIndex).concat([at + placeholder]).concat(rest);
- }
+ var placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like:
+ // animation: linear ${time}s ease-out;
+
+ var suffix = placeholderMatch[2];
+ var expression = expressions[placeholderID];
+ replaceCounter++;
+ parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(_rest);
+ }
- var atPlaceholderIndex = parts.findIndex(function (part) {
- return typeof part === "string" && part.startsWith("@prettier-placeholder");
+ return Object.assign({}, doc, {
+ parts: parts
+ });
});
+ return expressions.length === replaceCounter ? newDoc : null;
+ }
- if (atPlaceholderIndex > -1) {
- var _placeholder = parts[atPlaceholderIndex];
+ function printGraphqlComments(lines) {
+ var parts = [];
+ var seenComment = false;
+ lines.map(function (textLine) {
+ return textLine.trim();
+ }).forEach(function (textLine, i, array) {
+ // Lines are either whitespace only, or a comment (with potential whitespace
+ // around it). Drop whitespace-only lines.
+ if (textLine === "") {
+ return;
+ }
- var _rest = parts.slice(atPlaceholderIndex + 1);
+ if (array[i - 1] === "" && seenComment) {
+ // If a non-first comment is preceded by a blank (whitespace only) line,
+ // add in a blank line.
+ parts.push(concat$b([hardline$8, textLine]));
+ } else {
+ parts.push(textLine);
+ }
- var placeholderMatch = _placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/);
+ seenComment = true;
+ }); // If `lines` was whitespace only, return `null`.
- var placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like:
- // animation: linear ${time}s ease-out;
+ return parts.length === 0 ? null : join$7(hardline$8, parts);
+ }
+ /**
+ * Template literal in these contexts:
+ * <style jsx>{`div{color:red}`}</style>
+ * css``
+ * css.global``
+ * css.resolve``
+ */
- var suffix = placeholderMatch[2];
- var expression = expressions[placeholderID];
- replaceCounter++;
- parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(_rest);
- }
- return Object.assign({}, doc$$2, {
- parts: parts
- });
- });
- return expressions.length === replaceCounter ? newDoc : null;
-}
-
-function printGraphqlComments(lines) {
- var parts = [];
- var seenComment = false;
- lines.map(function (textLine) {
- return textLine.trim();
- }).forEach(function (textLine, i, array) {
- // Lines are either whitespace only, or a comment (with poential whitespace
- // around it). Drop whitespace-only lines.
- if (textLine === "") {
- return;
- }
+ function isStyledJsx(path) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ var parentParent = path.getParentNode(1);
+ return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(function (attribute) {
+ return attribute.name.name === "jsx";
+ }) || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "Identifier" && parent.tag.name === "css" || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "MemberExpression" && parent.tag.object.name === "css" && (parent.tag.property.name === "global" || parent.tag.property.name === "resolve");
+ }
+ /**
+ * Angular Components can have:
+ * - Inline HTML template
+ * - Inline CSS styles
+ *
+ * ...which are both within template literals somewhere
+ * inside of the Component decorator factory.
+ *
+ * E.g.
+ * @Component({
+ * template: `<div>...</div>`,
+ * styles: [`h1 { color: blue; }`]
+ * })
+ */
- if (array[i - 1] === "" && seenComment) {
- // If a non-first comment is preceded by a blank (whitespace only) line,
- // add in a blank line.
- parts.push(concat$12([hardline$9, textLine]));
- } else {
- parts.push(textLine);
- }
- seenComment = true;
- }); // If `lines` was whitespace only, return `null`.
+ function isAngularComponentStyles(path) {
+ return isPathMatch(path, [function (node) {
+ return node.type === "TemplateLiteral";
+ }, function (node, name) {
+ return node.type === "ArrayExpression" && name === "elements";
+ }, function (node, name) {
+ return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "styles" && name === "value";
+ }].concat(getAngularComponentObjectExpressionPredicates()));
+ }
- return parts.length === 0 ? null : join$8(hardline$9, parts);
-}
-/**
- * Template literal in these contexts:
- * <style jsx>{`div{color:red}`}</style>
- * css``
- * css.global``
- * css.resolve``
- */
+ function isAngularComponentTemplate(path) {
+ return isPathMatch(path, [function (node) {
+ return node.type === "TemplateLiteral";
+ }, function (node, name) {
+ return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "template" && name === "value";
+ }].concat(getAngularComponentObjectExpressionPredicates()));
+ }
+ function getAngularComponentObjectExpressionPredicates() {
+ return [function (node, name) {
+ return node.type === "ObjectExpression" && name === "properties";
+ }, function (node, name) {
+ return node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments";
+ }, function (node, name) {
+ return node.type === "Decorator" && name === "expression";
+ }];
+ }
+ /**
+ * styled-components template literals
+ */
-function isStyledJsx(path) {
- var node = path.getValue();
- var parent = path.getParentNode();
- var parentParent = path.getParentNode(1);
- return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(function (attribute) {
- return attribute.name.name === "jsx";
- }) || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "Identifier" && parent.tag.name === "css" || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "MemberExpression" && parent.tag.object.name === "css" && (parent.tag.property.name === "global" || parent.tag.property.name === "resolve");
-}
-/**
- * Angular Components can have:
- * - Inline HTML template
- * - Inline CSS styles
- *
- * ...which are both within template literals somewhere
- * inside of the Component decorator factory.
- *
- * E.g.
- * @Component({
- * template: `<div>...</div>`,
- * styles: [`h1 { color: blue; }`]
- * })
- */
+ function isStyledComponents(path) {
+ var parent = path.getParentNode();
-function isAngularComponentStyles(path) {
- return isPathMatch(path, [function (node) {
- return node.type === "TemplateLiteral";
- }, function (node, name) {
- return node.type === "ArrayExpression" && name === "elements";
- }, function (node, name) {
- return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "styles" && name === "value";
- }].concat(getAngularComponentObjectExpressionPredicates()));
-}
-
-function isAngularComponentTemplate(path) {
- return isPathMatch(path, [function (node) {
- return node.type === "TemplateLiteral";
- }, function (node, name) {
- return node.type === "Property" && node.key.type === "Identifier" && node.key.name === "template" && name === "value";
- }].concat(getAngularComponentObjectExpressionPredicates()));
-}
-
-function getAngularComponentObjectExpressionPredicates() {
- return [function (node, name) {
- return node.type === "ObjectExpression" && name === "properties";
- }, function (node, name) {
- return node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments";
- }, function (node, name) {
- return node.type === "Decorator" && name === "expression";
- }];
-}
-/**
- * styled-components template literals
- */
+ if (!parent || parent.type !== "TaggedTemplateExpression") {
+ return false;
+ }
+ var tag = parent.tag;
-function isStyledComponents(path) {
- var parent = path.getParentNode();
+ switch (tag.type) {
+ case "MemberExpression":
+ return (// styled.foo``
+ isStyledIdentifier(tag.object) || // Component.extend``
+ isStyledExtend(tag)
+ );
- if (!parent || parent.type !== "TaggedTemplateExpression") {
- return false;
- }
+ case "CallExpression":
+ return (// styled(Component)``
+ isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attrs({})``
+ isStyledIdentifier(tag.callee.object.object) || // Component.extend.attrs({})``
+ isStyledExtend(tag.callee.object)) || // styled(Component).attrs({})``
+ tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee))
+ );
- var tag = parent.tag;
+ case "Identifier":
+ // css``
+ return tag.name === "css";
- switch (tag.type) {
- case "MemberExpression":
- return (// styled.foo``
- isStyledIdentifier(tag.object) || // Component.extend``
- isStyledExtend(tag)
- );
+ default:
+ return false;
+ }
+ }
+ /**
+ * JSX element with CSS prop
+ */
- case "CallExpression":
- return (// styled(Component)``
- isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attrs({})``
- isStyledIdentifier(tag.callee.object.object) || // Component.extend.attrs({})``
- isStyledExtend(tag.callee.object)) || // styled(Component).attrs({})``
- tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee))
- );
- case "Identifier":
- // css``
- return tag.name === "css";
+ function isCssProp(path) {
+ var parent = path.getParentNode();
+ var parentParent = path.getParentNode(1);
+ return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css";
+ }
- default:
- return false;
+ function isStyledIdentifier(node) {
+ return node.type === "Identifier" && node.name === "styled";
}
-}
-/**
- * JSX element with CSS prop
- */
+ function isStyledExtend(node) {
+ return /^[A-Z]/.test(node.object.name) && node.property.name === "extend";
+ }
+ /*
+ * react-relay and graphql-tag
+ * graphql`...`
+ * graphql.experimental`...`
+ * gql`...`
+ * GraphQL comment block
+ *
+ * This intentionally excludes Relay Classic tags, as Prettier does not
+ * support Relay Classic formatting.
+ */
-function isCssProp(path) {
- var parent = path.getParentNode();
- var parentParent = path.getParentNode(1);
- return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css";
-}
-
-function isStyledIdentifier(node) {
- return node.type === "Identifier" && node.name === "styled";
-}
-
-function isStyledExtend(node) {
- return /^[A-Z]/.test(node.object.name) && node.property.name === "extend";
-}
-/*
- * react-relay and graphql-tag
- * graphql`...`
- * graphql.experimental`...`
- * gql`...`
- * GraphQL comment block
- *
- * This intentionally excludes Relay Classic tags, as Prettier does not
- * support Relay Classic formatting.
- */
+ function isGraphQL(path) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql");
+ }
-function isGraphQL(path) {
- var node = path.getValue();
- var parent = path.getParentNode();
- return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql");
-}
-
-function hasLanguageComment(node, languageName) {
- // This checks for a leading comment that is exactly `/* GraphQL */`
- // In order to be in line with other implementations of this comment tag
- // we will not trim the comment value and we will expect exactly one space on
- // either side of the GraphQL string
- // Also see ./clean.js
- return hasLeadingComment$1(node, function (comment) {
- return isBlockComment(comment) && comment.value === " ".concat(languageName, " ");
- });
-}
+ function hasLanguageComment(node, languageName) {
+ // This checks for a leading comment that is exactly `/* GraphQL */`
+ // In order to be in line with other implementations of this comment tag
+ // we will not trim the comment value and we will expect exactly one space on
+ // either side of the GraphQL string
+ // Also see ./clean.js
+ return hasLeadingComment$1(node, function (comment) {
+ return isBlockComment$1(comment) && comment.value === " ".concat(languageName, " ");
+ });
+ }
-function isPathMatch(path, predicateStack) {
- var stack = path.stack.slice();
- var name = null;
- var node = stack.pop();
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ function isPathMatch(path, predicateStack) {
+ var stack = path.stack.slice();
+ var name = null;
+ var node = stack.pop();
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- try {
- for (var _iterator = predicateStack[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var predicate = _step.value;
+ try {
+ for (var _iterator = predicateStack[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var predicate = _step.value;
- if (node === undefined) {
- return false;
- } // skip index/array
+ if (node === undefined) {
+ return false;
+ } // skip index/array
- if (typeof name === "number") {
- name = stack.pop();
- node = stack.pop();
- }
+ if (typeof name === "number") {
+ name = stack.pop();
+ node = stack.pop();
+ }
- if (!predicate(node, name)) {
- return false;
- }
+ if (!predicate(node, name)) {
+ return false;
+ }
- name = stack.pop();
- node = stack.pop();
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ name = stack.pop();
+ node = stack.pop();
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
+
+ return true;
}
+ /**
+ * - html`...`
+ * - HTML comment block
+ */
- return true;
-}
-/**
- * - html`...`
- * - HTML comment block
- */
+ function isHtml(path) {
+ var node = path.getValue();
+ return hasLanguageComment(node, "HTML") || isPathMatch(path, [function (node) {
+ return node.type === "TemplateLiteral";
+ }, function (node, name) {
+ return node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi";
+ }]);
+ } // The counter is needed to distinguish nested embeds.
-function isHtml(path) {
- var node = path.getValue();
- return hasLanguageComment(node, "HTML") || isPathMatch(path, [function (node) {
- return node.type === "TemplateLiteral";
- }, function (node, name) {
- return node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi";
- }]);
-} // The counter is needed to distinguish nested embeds.
+ var htmlTemplateLiteralCounter = 0;
-var htmlTemplateLiteralCounter = 0;
+ function printHtmlTemplateLiteral(path, print, textToDoc, parser, escapeClosingScriptTag) {
+ var node = path.getValue();
+ var counter = htmlTemplateLiteralCounter;
+ htmlTemplateLiteralCounter = htmlTemplateLiteralCounter + 1 >>> 0;
-function printHtmlTemplateLiteral(path, print, textToDoc, parser, escapeClosingScriptTag) {
- var node = path.getValue();
- var counter = htmlTemplateLiteralCounter;
- htmlTemplateLiteralCounter = htmlTemplateLiteralCounter + 1 >>> 0;
+ var composePlaceholder = function composePlaceholder(index) {
+ return "PRETTIER_HTML_PLACEHOLDER_".concat(index, "_").concat(counter, "_IN_JS");
+ };
- var composePlaceholder = function composePlaceholder(index) {
- return "PRETTIER_HTML_PLACEHOLDER_".concat(index, "_").concat(counter, "_IN_JS");
- };
+ var text = node.quasis.map(function (quasi, index, quasis) {
+ return index === quasis.length - 1 ? quasi.value.cooked : quasi.value.cooked + composePlaceholder(index);
+ }).join("");
+ var expressionDocs = path.map(print, "expressions");
- var text = node.quasis.map(function (quasi, index, quasis) {
- return index === quasis.length - 1 ? quasi.value.cooked : quasi.value.cooked + composePlaceholder(index);
- }).join("");
- var expressionDocs = path.map(print, "expressions");
+ if (expressionDocs.length === 0 && text.trim().length === 0) {
+ return "``";
+ }
- if (expressionDocs.length === 0 && text.trim().length === 0) {
- return "``";
- }
+ var placeholderRegex = RegExp(composePlaceholder("(\\d+)"), "g");
+ var contentDoc = mapDoc$5(stripTrailingHardline$2(textToDoc(text, {
+ parser: parser
+ })), function (doc) {
+ if (typeof doc !== "string") {
+ return doc;
+ }
- var placeholderRegex = RegExp(composePlaceholder("(\\d+)"), "g");
- var contentDoc = mapDoc$5(stripTrailingHardline$2(textToDoc(text, {
- parser: parser
- })), function (doc$$2) {
- if (typeof doc$$2 !== "string") {
- return doc$$2;
- }
+ var parts = [];
+ var components = doc.split(placeholderRegex);
- var parts = [];
- var components = doc$$2.split(placeholderRegex);
+ for (var i = 0; i < components.length; i++) {
+ var component = components[i];
- for (var i = 0; i < components.length; i++) {
- var component = components[i];
+ if (i % 2 === 0) {
+ if (component) {
+ component = uncook(component);
- if (i % 2 === 0) {
- if (component) {
- component = uncook(component);
+ if (escapeClosingScriptTag) {
+ component = component.replace(/<\/(script)\b/gi, "<\\/$1");
+ }
- if (escapeClosingScriptTag) {
- component = component.replace(/<\/(script)\b/gi, "<\\/$1");
+ parts.push(component);
}
- parts.push(component);
+ continue;
}
- continue;
+ var placeholderIndex = +component;
+ parts.push(concat$b(["${", group$a(expressionDocs[placeholderIndex]), "}"]));
}
- var placeholderIndex = +component;
- parts.push(concat$12(["${", group$11(expressionDocs[placeholderIndex]), "}"]));
- }
+ return concat$b(parts);
+ });
+ return group$a(concat$b(["`", indent$6(concat$b([hardline$8, group$a(contentDoc)])), softline$5, "`"]));
+ }
- return concat$12(parts);
- });
- return group$11(concat$12(["`", indent$7(concat$12([hardline$9, group$11(contentDoc)])), softline$6, "`"]));
-}
+ var embed_1$1 = embed$3;
-var embed_1$2 = embed$4;
+ function clean$4(ast, newObj, parent) {
+ ["range", "raw", "comments", "leadingComments", "trailingComments", "extra", "start", "end", "flags", "errors"].forEach(function (name) {
+ delete newObj[name];
+ });
-function clean$7(ast, newObj, parent) {
- ["range", "raw", "comments", "leadingComments", "trailingComments", "extra", "start", "end", "flags"].forEach(function (name) {
- delete newObj[name];
- });
+ if (ast.type === "BigIntLiteral") {
+ newObj.value = newObj.value.toLowerCase();
+ } // We remove extra `;` and add them when needed
- if (ast.type === "BigIntLiteral") {
- newObj.value = newObj.value.toLowerCase();
- } // We remove extra `;` and add them when needed
+ if (ast.type === "EmptyStatement") {
+ return null;
+ } // We move text around, including whitespaces and add {" "}
- if (ast.type === "EmptyStatement") {
- return null;
- } // We move text around, including whitespaces and add {" "}
+ if (ast.type === "JSXText") {
+ return null;
+ }
- if (ast.type === "JSXText") {
- return null;
- }
+ if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") {
+ return null;
+ } // We remove unneeded parens around same-operator LogicalExpressions
- if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") {
- return null;
- } // (TypeScript) Ignore `static` in `constructor(static p) {}`
- // and `export` in `constructor(export p) {}`
+ if (isUnbalancedLogicalTree(newObj)) {
+ return rebalanceLogicalTree(newObj);
+ } // (TypeScript) Ignore `static` in `constructor(static p) {}`
+ // and `export` in `constructor(export p) {}`
- if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) {
- return {
- type: "Identifier",
- name: ast.parameter.name,
- typeAnnotation: newObj.parameter.typeAnnotation,
- decorators: newObj.decorators
- };
- } // (TypeScript) ignore empty `specifiers` array
+ if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) {
+ return {
+ type: "Identifier",
+ name: ast.parameter.name,
+ typeAnnotation: newObj.parameter.typeAnnotation,
+ decorators: newObj.decorators
+ };
+ } // (TypeScript) ignore empty `specifiers` array
- if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) {
- delete newObj.specifiers;
- } // (TypeScript) bypass TSParenthesizedType
+ if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) {
+ delete newObj.specifiers;
+ } // We convert <div></div> to <div />
- if (ast.type === "TSParenthesizedType") {
- return newObj.typeAnnotation;
- } // We convert <div></div> to <div />
+ if (ast.type === "JSXOpeningElement") {
+ delete newObj.selfClosing;
+ }
- if (ast.type === "JSXOpeningElement") {
- delete newObj.selfClosing;
- }
+ if (ast.type === "JSXElement") {
+ delete newObj.closingElement;
+ } // We change {'key': value} into {key: value}
- if (ast.type === "JSXElement") {
- delete newObj.closingElement;
- } // We change {'key': value} into {key: value}
+ if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && _typeof(ast.key) === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) {
+ delete newObj.key;
+ }
- if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && _typeof(ast.key) === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) {
- delete newObj.key;
- }
+ if (ast.type === "OptionalMemberExpression" && ast.optional === false) {
+ newObj.type = "MemberExpression";
+ delete newObj.optional;
+ } // Remove raw and cooked values from TemplateElement when it's CSS
+ // styled-jsx
- if (ast.type === "OptionalMemberExpression" && ast.optional === false) {
- newObj.type = "MemberExpression";
- delete newObj.optional;
- } // Remove raw and cooked values from TemplateElement when it's CSS
- // styled-jsx
+ if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(function (attr) {
+ return attr.name.name === "jsx";
+ })) {
+ var templateLiterals = newObj.children.filter(function (child) {
+ return child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral";
+ }).map(function (container) {
+ return container.expression;
+ });
+ var quasis = templateLiterals.reduce(function (quasis, templateLiteral) {
+ return quasis.concat(templateLiteral.quasis);
+ }, []);
+ quasis.forEach(function (q) {
+ return delete q.value;
+ });
+ } // CSS template literals in css prop
- if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(function (attr) {
- return attr.name.name === "jsx";
- })) {
- var templateLiterals = newObj.children.filter(function (child) {
- return child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral";
- }).map(function (container) {
- return container.expression;
- });
- var quasis = templateLiterals.reduce(function (quasis, templateLiteral) {
- return quasis.concat(templateLiteral.quasis);
- }, []);
- quasis.forEach(function (q) {
- return delete q.value;
- });
- } // CSS template literals in css prop
+ if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") {
+ newObj.value.expression.quasis.forEach(function (q) {
+ return delete q.value;
+ });
+ } // Angular Components: Inline HTML template and Inline CSS styles
- if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") {
- newObj.value.expression.quasis.forEach(function (q) {
- return delete q.value;
- });
- } // Angular Components: Inline HTML template and Inline CSS styles
+ var expression = ast.expression || ast.callee;
- var expression = ast.expression || ast.callee;
+ if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) {
+ var astProps = ast.expression.arguments[0].properties;
+ newObj.expression.arguments[0].properties.forEach(function (prop, index) {
+ var templateLiteral = null;
- if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) {
- var astProps = ast.expression.arguments[0].properties;
- newObj.expression.arguments[0].properties.forEach(function (prop, index) {
- var templateLiteral = null;
+ switch (astProps[index].key.name) {
+ case "styles":
+ if (prop.value.type === "ArrayExpression") {
+ templateLiteral = prop.value.elements[0];
+ }
- switch (astProps[index].key.name) {
- case "styles":
- if (prop.value.type === "ArrayExpression") {
- templateLiteral = prop.value.elements[0];
- }
+ break;
- break;
+ case "template":
+ if (prop.value.type === "TemplateLiteral") {
+ templateLiteral = prop.value;
+ }
- case "template":
- if (prop.value.type === "TemplateLiteral") {
- templateLiteral = prop.value;
- }
+ break;
+ }
- break;
- }
+ if (templateLiteral) {
+ templateLiteral.quasis.forEach(function (q) {
+ return delete q.value;
+ });
+ }
+ });
+ } // styled-components, graphql, markdown
- if (templateLiteral) {
- templateLiteral.quasis.forEach(function (q) {
- return delete q.value;
- });
- }
- });
- } // styled-components, graphql, markdown
+ if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) {
+ newObj.quasi.quasis.forEach(function (quasi) {
+ return delete quasi.value;
+ });
+ }
- if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) {
- newObj.quasi.quasis.forEach(function (quasi) {
- return delete quasi.value;
- });
+ if (ast.type === "TemplateLiteral") {
+ // This checks for a leading comment that is exactly `/* GraphQL */`
+ // In order to be in line with other implementations of this comment tag
+ // we will not trim the comment value and we will expect exactly one space on
+ // either side of the GraphQL string
+ // Also see ./embed.js
+ var hasLanguageComment = ast.leadingComments && ast.leadingComments.some(function (comment) {
+ return comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(function (languageName) {
+ return comment.value === " ".concat(languageName, " ");
+ });
+ });
+
+ if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") {
+ newObj.quasis.forEach(function (quasi) {
+ return delete quasi.value;
+ });
+ }
+ }
}
- if (ast.type === "TemplateLiteral") {
- // This checks for a leading comment that is exactly `/* GraphQL */`
- // In order to be in line with other implementations of this comment tag
- // we will not trim the comment value and we will expect exactly one space on
- // either side of the GraphQL string
- // Also see ./embed.js
- var hasLanguageComment = ast.leadingComments && ast.leadingComments.some(function (comment) {
- return comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(function (languageName) {
- return comment.value === " ".concat(languageName, " ");
- });
- });
+ function isUnbalancedLogicalTree(newObj) {
+ return newObj.type === "LogicalExpression" && newObj.right.type === "LogicalExpression" && newObj.operator === newObj.right.operator;
+ }
- if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") {
- newObj.quasis.forEach(function (quasi) {
- return delete quasi.value;
+ function rebalanceLogicalTree(newObj) {
+ if (isUnbalancedLogicalTree(newObj)) {
+ return rebalanceLogicalTree({
+ type: "LogicalExpression",
+ operator: newObj.operator,
+ left: rebalanceLogicalTree({
+ type: "LogicalExpression",
+ operator: newObj.operator,
+ left: newObj.left,
+ right: newObj.right.left,
+ loc: {}
+ }),
+ right: newObj.right.right,
+ loc: {}
});
}
- }
-}
-var clean_1$2 = clean$7;
+ return newObj;
+ }
-// Flow annotation comments cannot be split across lines. For example:
-//
-// (this /*
-// : any */).foo = 5;
-//
-// is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so
-// removing the newline would create a type annotation that the user did not intend
-// to create.
+ var clean_1$1 = clean$4;
-var NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)";
-var FLOW_SHORTHAND_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*:"));
-var FLOW_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*::"));
+ var getLast$1 = util.getLast,
+ hasNewline$3 = util.hasNewline,
+ hasNewlineInRange$1 = util.hasNewlineInRange,
+ hasIgnoreComment$3 = util.hasIgnoreComment,
+ hasNodeIgnoreComment$1 = util.hasNodeIgnoreComment,
+ skipWhitespace$1 = util.skipWhitespace;
+ var isIdentifierName = utils$1.keyword.isIdentifierNameES5; // We match any whitespace except line terminators because
+ // Flow annotation comments cannot be split across lines. For example:
+ //
+ // (this /*
+ // : any */).foo = 5;
+ //
+ // is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so
+ // removing the newline would create a type annotation that the user did not intend
+ // to create.
-function hasFlowShorthandAnnotationComment$2(node) {
- // https://flow.org/en/docs/types/comments/
- // Syntax example: const r = new (window.Request /*: Class<Request> */)("");
- return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION);
-}
+ var NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)";
+ var FLOW_SHORTHAND_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*:"));
+ var FLOW_ANNOTATION = new RegExp("^".concat(NON_LINE_TERMINATING_WHITE_SPACE, "*::"));
-function hasFlowAnnotationComment$1(comments) {
- return comments && comments[0].value.match(FLOW_ANNOTATION);
-}
+ function hasFlowShorthandAnnotationComment(node) {
+ // https://flow.org/en/docs/types/comments/
+ // Syntax example: const r = new (window.Request /*: Class<Request> */)("");
+ return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION);
+ }
-function hasNode$1(node, fn) {
- if (!node || _typeof(node) !== "object") {
- return false;
+ function hasFlowAnnotationComment(comments) {
+ return comments && comments[0].value.match(FLOW_ANNOTATION);
}
- if (Array.isArray(node)) {
- return node.some(function (value) {
- return hasNode$1(value, fn);
+ function hasNode(node, fn) {
+ if (!node || _typeof(node) !== "object") {
+ return false;
+ }
+
+ if (Array.isArray(node)) {
+ return node.some(function (value) {
+ return hasNode(value, fn);
+ });
+ }
+
+ var result = fn(node);
+ return typeof result === "boolean" ? result : Object.keys(node).some(function (key) {
+ return hasNode(node[key], fn);
});
}
- var result = fn(node);
- return typeof result === "boolean" ? result : Object.keys(node).some(function (key) {
- return hasNode$1(node[key], fn);
- });
-}
+ function hasNakedLeftSide(node) {
+ return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSAsExpression" || node.type === "TSNonNullExpression";
+ }
-function hasNakedLeftSide$2(node) {
- return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSAsExpression" || node.type === "TSNonNullExpression";
-}
+ function getLeftSide(node) {
+ if (node.expressions) {
+ return node.expressions[0];
+ }
-function getLeftSide$1(node) {
- if (node.expressions) {
- return node.expressions[0];
+ return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression;
}
- return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression;
-}
+ function getLeftSidePathName(path, node) {
+ if (node.expressions) {
+ return ["expressions", 0];
+ }
-function getLeftSidePathName$2(path, node) {
- if (node.expressions) {
- return ["expressions", 0];
- }
+ if (node.left) {
+ return ["left"];
+ }
- if (node.left) {
- return ["left"];
- }
+ if (node.test) {
+ return ["test"];
+ }
- if (node.test) {
- return ["test"];
- }
+ if (node.object) {
+ return ["object"];
+ }
- if (node.object) {
- return ["object"];
+ if (node.callee) {
+ return ["callee"];
+ }
+
+ if (node.tag) {
+ return ["tag"];
+ }
+
+ if (node.argument) {
+ return ["argument"];
+ }
+
+ if (node.expression) {
+ return ["expression"];
+ }
+
+ throw new Error("Unexpected node has no left side", node);
}
- if (node.callee) {
- return ["callee"];
+ function isLiteral(node) {
+ return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText";
}
- if (node.tag) {
- return ["tag"];
+ function isNumericLiteral(node) {
+ return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number";
}
- if (node.argument) {
- return ["argument"];
+ function isStringLiteral(node) {
+ return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string";
}
- if (node.expression) {
- return ["expression"];
+ function isObjectType(n) {
+ return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral";
}
- throw new Error("Unexpected node has no left side", node);
-}
+ function isFunctionOrArrowExpression(node) {
+ return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
+ }
-var utils$8 = {
- getLeftSide: getLeftSide$1,
- getLeftSidePathName: getLeftSidePathName$2,
- hasNakedLeftSide: hasNakedLeftSide$2,
- hasNode: hasNode$1,
- hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2,
- hasFlowAnnotationComment: hasFlowAnnotationComment$1
-};
+ function isFunctionOrArrowExpressionWithBody(node) {
+ return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement";
+ }
-var getLeftSidePathName$1 = utils$8.getLeftSidePathName;
-var hasNakedLeftSide$1 = utils$8.hasNakedLeftSide;
-var hasFlowShorthandAnnotationComment$1 = utils$8.hasFlowShorthandAnnotationComment;
+ function isTemplateLiteral(node) {
+ return node.type === "TemplateLiteral";
+ } // `inject` is used in AngularJS 1.x, `async` in Angular 2+
+ // example: https://docs.angularjs.org/guide/unit-testing#using-beforeall-
-function hasClosureCompilerTypeCastComment(text, path) {
- // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts
- // Syntax example: var x = /** @type {string} */ (fruit);
- var n = path.getValue();
- return isParenthesized(n) && (hasTypeCastComment(n) || hasAncestorTypeCastComment(0)); // for sub-item: /** @type {array} */ (numberOrString).map(x => x);
- function hasAncestorTypeCastComment(index) {
- var ancestor = path.getParentNode(index);
- return ancestor && !isParenthesized(ancestor) ? hasTypeCastComment(ancestor) || hasAncestorTypeCastComment(index + 1) : false;
+ function isAngularTestWrapper(node) {
+ return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync");
}
- function hasTypeCastComment(node) {
- return node.comments && node.comments.some(function (comment) {
- return comment.leading && comments$3.isBlockComment(comment) && isTypeCastComment(comment.value);
- });
+ function isJSXNode(node) {
+ return node.type === "JSXElement" || node.type === "JSXFragment";
}
- function isParenthesized(node) {
- // Closure typecast comments only really make sense when _not_ using
- // typescript or flow parsers, so we take advantage of the babel parser's
- // parenthesized expressions.
- return node.extra && node.extra.parenthesized;
- }
+ function isTheOnlyJSXElementInMarkdown(options, path) {
+ if (options.parentParser !== "markdown" && options.parentParser !== "mdx") {
+ return false;
+ }
- function isTypeCastComment(comment) {
- var cleaned = comment.trim().split("\n").map(function (line) {
- return line.replace(/^[\s*]+/, "");
- }).join(" ").trim();
+ var node = path.getNode();
- if (!/^@type\s*\{[^]+\}$/.test(cleaned)) {
+ if (!node.expression || !isJSXNode(node.expression)) {
return false;
}
- var isCompletelyClosed = false;
- var unpairedBracketCount = 0;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = cleaned[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var char = _step.value;
+ var parent = path.getParentNode();
+ return parent.type === "Program" && parent.body.length == 1;
+ } // Detect an expression node representing `{" "}`
- if (char === "{") {
- if (isCompletelyClosed) {
- return false;
- }
- unpairedBracketCount++;
- } else if (char === "}") {
- if (unpairedBracketCount === 0) {
- return false;
- }
+ function isJSXWhitespaceExpression(node) {
+ return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments;
+ }
- unpairedBracketCount--;
+ function isMemberExpressionChain(node) {
+ if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") {
+ return false;
+ }
- if (unpairedBracketCount === 0) {
- isCompletelyClosed = true;
- }
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ if (node.object.type === "Identifier") {
+ return true;
}
- return unpairedBracketCount === 0;
+ return isMemberExpressionChain(node.object);
}
-}
-
-function needsParens(path, options) {
- var parent = path.getParentNode();
- if (!parent) {
- return false;
+ function isGetterOrSetter(node) {
+ return node.kind === "get" || node.kind === "set";
}
- var name = path.getName();
- var node = path.getNode(); // If the value of this path is some child of a Node and not a Node
- // itself, then it doesn't need parentheses. Only Node objects (in
- // fact, only Expression nodes) need parentheses.
+ function sameLocStart(nodeA, nodeB, options) {
+ return options.locStart(nodeA) === options.locStart(nodeB);
+ } // TODO: This is a bad hack and we need a better way to distinguish between
+ // arrow functions and otherwise
- if (path.getValue() !== node) {
- return false;
- } // to avoid unexpected `}}` in HTML interpolations
+ function isFunctionNotation(node, options) {
+ return isGetterOrSetter(node) || sameLocStart(node, node.value, options);
+ } // Hack to differentiate between the following two which have the same ast
+ // type T = { method: () => void };
+ // type T = { method(): void };
- if (options.__isInHtmlInterpolation && !options.bracketSpacing && endsWithRightBracket(node) && isFollowedByRightBracket(path)) {
- return true;
- } // Only statements don't need parentheses.
+ function isObjectTypePropertyAFunction(node, options) {
+ return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options);
+ } // Hack to differentiate between the following two which have the same ast
+ // declare function f(a): void;
+ // var f: (a) => void;
- if (isStatement(node)) {
- return false;
- } // Closure compiler requires that type casted expressions to be surrounded by
- // parentheses.
+ function isTypeAnnotationAFunction(node, options) {
+ return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
+ }
- if (hasClosureCompilerTypeCastComment(options.originalText, path)) {
- return true;
+ function isBinaryish(node) {
+ return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression";
}
- if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow
- // parser. The Flow parser turns Flow comments into type annotation nodes in its
- // AST, which we handle separately.
- options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path.getValue())) {
- return true;
- } // Identifiers never need parentheses.
+ function isMemberish(node) {
+ return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object;
+ }
+ function isSimpleFlowType(node) {
+ var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"];
+ return node && flowTypeAnnotations.indexOf(node.type) !== -1 && !(node.type === "GenericTypeAnnotation" && node.typeParameters);
+ }
- if (node.type === "Identifier") {
- // ...unless those identifiers are embed placeholders. They might be substituted by complex
- // expressions, so the parens around them should not be dropped. Example (JS-in-HTML-in-JS):
- // let tpl = html`<script> f((${expr}) / 2); </script>`;
- // If the inner JS formatter removes the parens, the expression might change its meaning:
- // f((a + b) / 2) vs f(a + b / 2)
- if (node.extra && node.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(node.name)) {
- return true;
- }
+ var unitTestRe = /^(skip|[fx]?(it|describe|test))$/;
- return false;
+ function isSkipOrOnlyBlock(node) {
+ return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip");
}
- if (parent.type === "ParenthesizedExpression") {
- return false;
- } // Add parens around the extends clause of a class. It is needed for almost
- // all expressions.
+ function isUnitTestSetUp(n) {
+ var unitTestSetUpRe = /^(before|after)(Each|All)$/;
+ return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1;
+ } // eg; `describe("some string", (done) => {})`
- if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) {
- return true;
- } // `export default function` or `export default class` can't be followed by
- // anything after. So an expression like `export default (function(){}).toString()`
- // needs to be followed by a parentheses
+ function isTestCall(n, parent) {
+ if (n.type !== "CallExpression") {
+ return false;
+ }
+ if (n.arguments.length === 1) {
+ if (isAngularTestWrapper(n) && parent && isTestCall(parent)) {
+ return isFunctionOrArrowExpression(n.arguments[0]);
+ }
+
+ if (isUnitTestSetUp(n)) {
+ return isAngularTestWrapper(n.arguments[0]);
+ }
+ } else if (n.arguments.length === 2 || n.arguments.length === 3) {
+ if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) {
+ // it("name", () => { ... }, 2500)
+ if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) {
+ return false;
+ }
- if (parent.type === "ExportDefaultDeclaration") {
- return shouldWrapFunctionForExportDefault(path, options);
+ return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]);
+ }
+ }
+
+ return false;
}
- if (parent.type === "Decorator" && parent.expression === node) {
- var hasCallExpression = false;
- var hasMemberExpression = false;
- var current = node;
+ function hasLeadingComment$2(node) {
+ return node.comments && node.comments.some(function (comment) {
+ return comment.leading;
+ });
+ }
- while (current) {
- switch (current.type) {
- case "MemberExpression":
- hasMemberExpression = true;
- current = current.object;
- break;
+ function hasTrailingComment(node) {
+ return node.comments && node.comments.some(function (comment) {
+ return comment.trailing;
+ });
+ }
- case "CallExpression":
- if (
- /** @(x().y) */
- hasMemberExpression ||
- /** @(x().y()) */
- hasCallExpression) {
- return true;
- }
+ function isCallOrOptionalCallExpression(node) {
+ return node.type === "CallExpression" || node.type === "OptionalCallExpression";
+ }
+
+ function hasDanglingComments(node) {
+ return node.comments && node.comments.some(function (comment) {
+ return !comment.leading && !comment.trailing;
+ });
+ }
+ /** identify if an angular expression seems to have side effects */
- hasCallExpression = true;
- current = current.callee;
- break;
- case "Identifier":
+ function hasNgSideEffect(path) {
+ return hasNode(path.getValue(), function (node) {
+ switch (node.type) {
+ case undefined:
return false;
- default:
+ case "CallExpression":
+ case "OptionalCallExpression":
+ case "AssignmentExpression":
return true;
}
- }
-
- return true;
+ });
}
- if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway
- util.startsWithNoLookaheadToken(node,
- /* forbidFunctionClassAndDoExpr */
- false) || parent.type === "ExpressionStatement" && util.startsWithNoLookaheadToken(node,
- /* forbidFunctionClassAndDoExpr */
- true)) {
- return true;
+ function isNgForOf(node, index, parentNode) {
+ return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
}
+ /** @param node {import("estree").TemplateLiteral} */
- switch (node.type) {
- case "CallExpression":
- {
- var firstParentNotMemberExpression = parent;
- var i = 0; // tagged templates are basically member expressions from a grammar perspective
- // see https://tc39.github.io/ecma262/#prod-MemberExpression
- // so are typescript's non-null assertions, though there's no grammar to point to
- while (firstParentNotMemberExpression && (firstParentNotMemberExpression.type === "MemberExpression" && firstParentNotMemberExpression.object === path.getParentNode(i - 1) || firstParentNotMemberExpression.type === "TaggedTemplateExpression" || firstParentNotMemberExpression.type === "TSNonNullExpression")) {
- firstParentNotMemberExpression = path.getParentNode(++i);
- }
+ function isSimpleTemplateLiteral(node) {
+ if (node.expressions.length === 0) {
+ return false;
+ }
- if (firstParentNotMemberExpression.type === "NewExpression" && firstParentNotMemberExpression.callee === path.getParentNode(i - 1)) {
- return true;
+ return node.expressions.every(function (expr) {
+ // Disallow comments since printDocToString can't print them here
+ if (expr.comments) {
+ return false;
+ } // Allow `x` and `this`
+
+
+ if (expr.type === "Identifier" || expr.type === "ThisExpression") {
+ return true;
+ } // Allow `a.b.c`, `a.b[c]`, and `this.x.y`
+
+
+ if (expr.type === "MemberExpression" || expr.type === "OptionalMemberExpression") {
+ var head = expr;
+
+ while (head.type === "MemberExpression" || head.type === "OptionalMemberExpression") {
+ if (head.property.type !== "Identifier" && head.property.type !== "Literal" && head.property.type !== "StringLiteral" && head.property.type !== "NumericLiteral") {
+ return false;
+ }
+
+ head = head.object;
+
+ if (head.comments) {
+ return false;
+ }
}
- if (parent.type === "BindExpression" && parent.callee === node) {
+ if (head.type === "Identifier" || head.type === "ThisExpression") {
return true;
}
return false;
}
- case "SpreadElement":
- case "SpreadProperty":
- return parent.type === "MemberExpression" && name === "object" && parent.object === node;
+ return false;
+ });
+ }
- case "UpdateExpression":
- if (parent.type === "UnaryExpression") {
- return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-");
- }
+ function getFlowVariance(path) {
+ if (!path.variance) {
+ return null;
+ } // Babel 7.0 currently uses variance node type, and flow should
+ // follow suit soon:
+ // https://github.com/babel/babel/issues/4722
- // else fallthrough
- case "UnaryExpression":
- switch (parent.type) {
- case "UnaryExpression":
- return node.operator === parent.operator && (node.operator === "+" || node.operator === "-");
+ var variance = path.variance.kind || path.variance;
- case "BindExpression":
- return true;
+ switch (variance) {
+ case "plus":
+ return "+";
- case "MemberExpression":
- return name === "object" && parent.object === node;
+ case "minus":
+ return "-";
- case "TaggedTemplateExpression":
- return true;
+ default:
+ /* istanbul ignore next */
+ return variance;
+ }
+ }
- case "NewExpression":
- case "CallExpression":
- return name === "callee" && parent.callee === node;
+ function classPropMayCauseASIProblems(path) {
+ var node = path.getNode();
- case "BinaryExpression":
- return parent.operator === "**" && name === "left";
+ if (node.type !== "ClassProperty") {
+ return false;
+ }
- case "TSNonNullExpression":
- return true;
+ var name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today
+ // so isn't properly tested yet.
- default:
- return false;
+ if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) {
+ return true;
+ }
+ }
+
+ function classChildNeedsASIProtection(node) {
+ if (!node) {
+ return;
+ }
+
+ if (node.static || node.accessibility // TypeScript
+ ) {
+ return false;
}
- case "BinaryExpression":
- {
- if (parent.type === "UpdateExpression") {
- return true;
- }
+ if (!node.computed) {
+ var name = node.key && node.key.name;
- var isLeftOfAForStatement = function isLeftOfAForStatement(node) {
- var i = 0;
+ if (name === "in" || name === "instanceof") {
+ return true;
+ }
+ }
- while (node) {
- var _parent = path.getParentNode(i++);
+ switch (node.type) {
+ case "ClassProperty":
+ case "TSAbstractClassProperty":
+ return node.computed;
- if (!_parent) {
- return false;
- }
+ case "MethodDefinition": // Flow
- if (_parent.type === "ForStatement" && _parent.init === node) {
- return true;
- }
+ case "TSAbstractMethodDefinition": // TypeScript
- node = _parent;
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ {
+ // Babel
+ var isAsync = node.value ? node.value.async : node.async;
+ var isGenerator = node.value ? node.value.generator : node.generator;
+
+ if (isAsync || node.kind === "get" || node.kind === "set") {
+ return false;
}
- return false;
- };
+ if (node.computed || isGenerator) {
+ return true;
+ }
- if (node.operator === "in" && isLeftOfAForStatement(node)) {
- return true;
+ return false;
}
- }
- // fallthrough
-
- case "TSTypeAssertion":
- case "TSAsExpression":
- case "LogicalExpression":
- switch (parent.type) {
- case "ConditionalExpression":
- return node.type === "TSAsExpression";
- case "CallExpression":
- case "NewExpression":
- return name === "callee" && parent.callee === node;
-
- case "ClassExpression":
- case "ClassDeclaration":
- return name === "superClass" && parent.superClass === node;
-
- case "TSTypeAssertion":
- case "TaggedTemplateExpression":
- case "UnaryExpression":
- case "JSXSpreadAttribute":
- case "SpreadElement":
- case "SpreadProperty":
- case "BindExpression":
- case "AwaitExpression":
- case "TSAsExpression":
- case "TSNonNullExpression":
- case "UpdateExpression":
- return true;
+ case "TSIndexSignature":
+ return true;
- case "MemberExpression":
- case "OptionalMemberExpression":
- return name === "object" && parent.object === node;
+ default:
+ /* istanbul ignore next */
+ return false;
+ }
+ }
- case "AssignmentExpression":
- return parent.left === node && (node.type === "TSTypeAssertion" || node.type === "TSAsExpression");
+ function getTypeScriptMappedTypeModifier(tokenNode, keyword) {
+ if (tokenNode === "+") {
+ return "+" + keyword;
+ } else if (tokenNode === "-") {
+ return "-" + keyword;
+ }
- case "BinaryExpression":
- case "LogicalExpression":
- {
- if (!node.operator && node.type !== "TSTypeAssertion") {
- return true;
- }
+ return keyword;
+ }
- var po = parent.operator;
- var pp = util.getPrecedence(po);
- var no = node.operator;
- var np = util.getPrecedence(no);
+ function hasNewlineBetweenOrAfterDecorators(node, options) {
+ return hasNewlineInRange$1(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$1(node.decorators))) || hasNewline$3(options.originalText, options.locEnd(getLast$1(node.decorators)));
+ } // Only space, newline, carriage return, and tab are treated as whitespace
+ // inside JSX.
- if (pp > np) {
- return true;
- }
- if ((po === "||" || po === "??") && no === "&&") {
- return true;
- }
+ var jsxWhitespaceChars = " \n\r\t";
+ var matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)");
+ var containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]"); // Meaningful if it contains non-whitespace characters,
+ // or it contains whitespace without a new line.
- if (pp === np && name === "right") {
- assert$3.strictEqual(parent.right, node);
- return true;
- }
+ function isMeaningfulJSXText(node) {
+ return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node)));
+ }
- if (pp === np && !util.shouldFlatten(po, no)) {
- return true;
- }
+ function hasJsxIgnoreComment(path) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
- if (pp < np && no === "%") {
- return po === "+" || po === "-";
- } // Add parenthesis when working with bitwise operators
- // It's not stricly needed but helps with code understanding
+ if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) {
+ return false;
+ } // Lookup the previous sibling, ignoring any empty JSXText elements
- if (util.isBitwiseOperator(po)) {
- return true;
- }
+ var index = parent.children.indexOf(node);
+ var prevSibling = null;
- return false;
- }
+ for (var i = index; i > 0; i--) {
+ var candidate = parent.children[i - 1];
- default:
- return false;
+ if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) {
+ continue;
}
- case "TSParenthesizedType":
- {
- var grandParent = path.getParentNode(1);
- /**
- * const foo = (): (() => void) => (): void => null;
- * ^ ^
- */
+ prevSibling = candidate;
+ break;
+ }
- if (getUnparenthesizedNode(node).type === "TSFunctionType" && parent.type === "TSTypeAnnotation" && grandParent.type === "ArrowFunctionExpression" && grandParent.returnType === parent) {
- return true;
- }
+ return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(function (comment) {
+ return comment.value.trim() === "prettier-ignore";
+ });
+ }
- if ((parent.type === "TSTypeParameter" || parent.type === "TypeParameter" || parent.type === "TSTypeAliasDeclaration" || parent.type === "TSTypeAnnotation" || parent.type === "TSParenthesizedType" || parent.type === "TSTypeParameterInstantiation") && grandParent.type !== "TSTypeOperator" && grandParent.type !== "TSOptionalType") {
- return false;
- } // Delegate to inner TSParenthesizedType
+ function isEmptyJSXElement(node) {
+ if (node.children.length === 0) {
+ return true;
+ }
+ if (node.children.length > 1) {
+ return false;
+ } // if there is one text child and does not contain any meaningful text
+ // we can treat the element as empty.
- if (node.typeAnnotation.type === "TSParenthesizedType" && parent.type !== "TSArrayType") {
- return false;
- }
- return true;
- }
+ var child = node.children[0];
+ return isLiteral(child) && !isMeaningfulJSXText(child);
+ }
- case "SequenceExpression":
- switch (parent.type) {
- case "ReturnStatement":
- return false;
+ function hasPrettierIgnore$2(path) {
+ return hasIgnoreComment$3(path) || hasJsxIgnoreComment(path);
+ }
- case "ForStatement":
- // Although parentheses wouldn't hurt around sequence
- // expressions in the head of for loops, traditional style
- // dictates that e.g. i++, j++ should not be wrapped with
- // parentheses.
- return false;
+ function isLastStatement(path) {
+ var parent = path.getParentNode();
- case "ExpressionStatement":
- return name !== "expression";
+ if (!parent) {
+ return true;
+ }
- case "ArrowFunctionExpression":
- // We do need parentheses, but SequenceExpressions are handled
- // specially when printing bodies of arrow functions.
- return name !== "body";
+ var node = path.getValue();
+ var body = (parent.body || parent.consequent).filter(function (stmt) {
+ return stmt.type !== "EmptyStatement";
+ });
+ return body && body[body.length - 1] === node;
+ }
- default:
- // Otherwise err on the side of overparenthesization, adding
- // explicit exceptions above if this proves overzealous.
- return true;
- }
+ function isFlowAnnotationComment(text, typeAnnotation, options) {
+ var start = options.locStart(typeAnnotation);
+ var end = skipWhitespace$1(text, options.locEnd(typeAnnotation));
+ return text.substr(start, 2) === "/*" && text.substr(end, 2) === "*/";
+ }
- case "YieldExpression":
- if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") {
- return true;
- }
+ function hasLeadingOwnLineComment(text, node, options) {
+ if (isJSXNode(node)) {
+ return hasNodeIgnoreComment$1(node);
+ }
- // else fallthrough
-
- case "AwaitExpression":
- switch (parent.type) {
- case "TaggedTemplateExpression":
- case "UnaryExpression":
- case "BinaryExpression":
- case "LogicalExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "TSAsExpression":
- case "TSNonNullExpression":
- case "BindExpression":
- case "OptionalMemberExpression":
- return true;
+ var res = node.comments && node.comments.some(function (comment) {
+ return comment.leading && hasNewline$3(text, options.locEnd(comment));
+ });
+ return res;
+ } // This recurses the return argument, looking for the first token
+ // (the leftmost leaf node) and, if it (or its parents) has any
+ // leadingComments, returns true (so it can be wrapped in parens).
- case "MemberExpression":
- return parent.object === node;
- case "NewExpression":
- case "CallExpression":
- return parent.callee === node;
+ function returnArgumentHasLeadingComment(options, argument) {
+ if (hasLeadingOwnLineComment(options.originalText, argument, options)) {
+ return true;
+ }
- case "ConditionalExpression":
- return parent.test === node;
+ if (hasNakedLeftSide(argument)) {
+ var leftMost = argument;
+ var newLeftMost;
- default:
- return false;
+ while (newLeftMost = getLeftSide(leftMost)) {
+ leftMost = newLeftMost;
+
+ if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) {
+ return true;
+ }
}
+ }
- case "ArrayTypeAnnotation":
- return parent.type === "NullableTypeAnnotation";
+ return false;
+ }
- case "IntersectionTypeAnnotation":
- case "UnionTypeAnnotation":
- return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation";
+ function isStringPropSafeToCoerceToIdentifier(node, options) {
+ return isStringLiteral(node.key) && isIdentifierName(node.key.value) && options.parser !== "json" && !(options.parser === "typescript" && node.type === "ClassProperty");
+ }
- case "NullableTypeAnnotation":
- return parent.type === "ArrayTypeAnnotation";
+ function isJestEachTemplateLiteral(node, parentNode) {
+ /**
+ * describe.each`table`(name, fn)
+ * describe.only.each`table`(name, fn)
+ * describe.skip.each`table`(name, fn)
+ * test.each`table`(name, fn)
+ * test.only.each`table`(name, fn)
+ * test.skip.each`table`(name, fn)
+ *
+ * Ref: https://github.com/facebook/jest/pull/6102
+ */
+ var jestEachTriggerRegex = /^[xf]?(describe|it|test)$/;
+ return parentNode.type === "TaggedTemplateExpression" && parentNode.quasi === node && parentNode.tag.type === "MemberExpression" && parentNode.tag.property.type === "Identifier" && parentNode.tag.property.name === "each" && (parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.name) || parentNode.tag.object.type === "MemberExpression" && parentNode.tag.object.property.type === "Identifier" && (parentNode.tag.object.property.name === "only" || parentNode.tag.object.property.name === "skip") && parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.object.name));
+ }
- case "FunctionTypeAnnotation":
- {
- var ancestor = parent.type === "NullableTypeAnnotation" ? path.getParentNode(1) : parent;
- return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses
- // are really needed, but since ??T doesn't make sense this check
- // will almost never be true.
- ancestor.type === "NullableTypeAnnotation";
- }
+ function templateLiteralHasNewLines(template) {
+ return template.quasis.some(function (quasi) {
+ return quasi.value.raw.includes("\n");
+ });
+ }
- case "StringLiteral":
- case "NumericLiteral":
- case "Literal":
- if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
- // See corresponding workaround in printer.js case: "Literal"
- options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(options.locStart(node) - 1, 1) === "(")) {
- // To avoid becoming a directive
- var _grandParent = path.getParentNode(1);
+ function isTemplateOnItsOwnLine(n, text, options) {
+ return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$3(text, options.locStart(n), {
+ backwards: true
+ });
+ }
- return _grandParent.type === "Program" || _grandParent.type === "BlockStatement";
+ function needsHardlineAfterDanglingComment(node) {
+ if (!node.comments) {
+ return false;
+ }
+
+ var lastDanglingComment = getLast$1(node.comments.filter(function (comment) {
+ return !comment.leading && !comment.trailing;
+ }));
+ return lastDanglingComment && !comments$1.isBlockComment(lastDanglingComment);
+ } // If we have nested conditional expressions, we want to print them in JSX mode
+ // if there's at least one JSXElement somewhere in the tree.
+ //
+ // A conditional expression chain like this should be printed in normal mode,
+ // because there aren't JSXElements anywhere in it:
+ //
+ // isA ? "A" : isB ? "B" : isC ? "C" : "Unknown";
+ //
+ // But a conditional expression chain like this should be printed in JSX mode,
+ // because there is a JSXElement in the last ConditionalExpression:
+ //
+ // isA ? "A" : isB ? "B" : isC ? "C" : <span className="warning">Unknown</span>;
+ //
+ // This type of ConditionalExpression chain is structured like this in the AST:
+ //
+ // ConditionalExpression {
+ // test: ...,
+ // consequent: ...,
+ // alternate: ConditionalExpression {
+ // test: ...,
+ // consequent: ...,
+ // alternate: ConditionalExpression {
+ // test: ...,
+ // consequent: ...,
+ // alternate: ...,
+ // }
+ // }
+ // }
+ //
+ // We want to traverse over that shape and convert it into a flat structure so
+ // that we can find if there's a JSXElement somewhere inside.
+
+
+ function getConditionalChainContents(node) {
+ // Given this code:
+ //
+ // // Using a ConditionalExpression as the consequent is uncommon, but should
+ // // be handled.
+ // A ? B : C ? D : E ? F ? G : H : I
+ //
+ // which has this AST:
+ //
+ // ConditionalExpression {
+ // test: Identifier(A),
+ // consequent: Identifier(B),
+ // alternate: ConditionalExpression {
+ // test: Identifier(C),
+ // consequent: Identifier(D),
+ // alternate: ConditionalExpression {
+ // test: Identifier(E),
+ // consequent: ConditionalExpression {
+ // test: Identifier(F),
+ // consequent: Identifier(G),
+ // alternate: Identifier(H),
+ // },
+ // alternate: Identifier(I),
+ // }
+ // }
+ // }
+ //
+ // we should return this Array:
+ //
+ // [
+ // Identifier(A),
+ // Identifier(B),
+ // Identifier(C),
+ // Identifier(D),
+ // Identifier(E),
+ // Identifier(F),
+ // Identifier(G),
+ // Identifier(H),
+ // Identifier(I)
+ // ];
+ //
+ // This loses the information about whether each node was the test,
+ // consequent, or alternate, but we don't care about that here- we are only
+ // flattening this structure to find if there's any JSXElements inside.
+ var nonConditionalExpressions = [];
+
+ function recurse(node) {
+ if (node.type === "ConditionalExpression") {
+ recurse(node.test);
+ recurse(node.consequent);
+ recurse(node.alternate);
+ } else {
+ nonConditionalExpressions.push(node);
}
+ }
- return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node;
+ recurse(node);
+ return nonConditionalExpressions;
+ }
- case "AssignmentExpression":
- {
- var _grandParent2 = path.getParentNode(1);
+ function conditionalExpressionChainContainsJSX(node) {
+ return Boolean(getConditionalChainContents(node).find(isJSXNode));
+ } // Logic to check for args with multiple anonymous functions. For instance,
+ // the following call should be split on multiple lines for readability:
+ // source.pipe(map((x) => x + x), filter((x) => x % 2 === 0))
- if (parent.type === "ArrowFunctionExpression" && parent.body === node) {
- return true;
- } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) {
- return false;
- } else if (parent.type === "TSPropertySignature" && parent.name === node) {
- return false;
- } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) {
- return false;
- } else if (parent.type === "ExpressionStatement") {
- return node.left.type === "ObjectPattern";
- } else if (parent.type === "TSPropertySignature" && parent.key === node) {
- return false;
- } else if (parent.type === "AssignmentExpression") {
- return false;
- } else if (parent.type === "SequenceExpression" && _grandParent2 && _grandParent2.type === "ForStatement" && (_grandParent2.init === parent || _grandParent2.update === parent)) {
- return false;
- } else if (parent.type === "Property" && parent.value === node) {
- return false;
- } else if (parent.type === "NGChainedExpression") {
- return false;
- }
- return true;
- }
+ function isFunctionCompositionArgs(args) {
+ if (args.length <= 1) {
+ return false;
+ }
- case "ConditionalExpression":
- switch (parent.type) {
- case "TaggedTemplateExpression":
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "BinaryExpression":
- case "LogicalExpression":
- case "NGPipeExpression":
- case "ExportDefaultDeclaration":
- case "AwaitExpression":
- case "JSXSpreadAttribute":
- case "TSTypeAssertion":
- case "TypeCastExpression":
- case "TSAsExpression":
- case "TSNonNullExpression":
- case "OptionalMemberExpression":
- return true;
+ var count = 0;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- case "NewExpression":
- case "CallExpression":
- return name === "callee" && parent.callee === node;
+ try {
+ for (var _iterator = args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var arg = _step.value;
- case "ConditionalExpression":
- return name === "test" && parent.test === node;
+ if (isFunctionOrArrowExpression(arg)) {
+ count += 1;
- case "MemberExpression":
- return name === "object" && parent.object === node;
+ if (count > 1) {
+ return true;
+ }
+ } else if (isCallOrOptionalCallExpression(arg)) {
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
- default:
- return false;
+ try {
+ for (var _iterator2 = arg.arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var childArg = _step2.value;
+
+ if (isFunctionOrArrowExpression(childArg)) {
+ return true;
+ }
+ }
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+ }
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
- case "FunctionExpression":
- switch (parent.type) {
- case "NewExpression":
- case "CallExpression":
- return name === "callee";
- // Not strictly necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses.
+ return false;
+ } // Logic to determine if a call is a “long curried function call”.
+ // See https://github.com/prettier/prettier/issues/1420.
+ //
+ // `connect(a, b, c)(d)`
+ // In the above call expression, the second call is the parent node and the
+ // first call is the current node.
- case "TaggedTemplateExpression":
- return true;
- // This is basically a kind of IIFE.
- default:
- return false;
- }
+ function isLongCurriedCallExpression(path) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ return isCallOrOptionalCallExpression(node) && isCallOrOptionalCallExpression(parent) && parent.callee === node && node.arguments.length > parent.arguments.length && parent.arguments.length > 0;
+ }
+
+ function rawText(node) {
+ return node.extra ? node.extra.raw : node.raw;
+ }
+
+ function identity$1(x) {
+ return x;
+ }
+
+ function isTSXFile(options) {
+ return options.filepath && /\.tsx$/i.test(options.filepath);
+ }
+
+ var utils$4 = {
+ classChildNeedsASIProtection: classChildNeedsASIProtection,
+ classPropMayCauseASIProblems: classPropMayCauseASIProblems,
+ conditionalExpressionChainContainsJSX: conditionalExpressionChainContainsJSX,
+ getFlowVariance: getFlowVariance,
+ getLeftSidePathName: getLeftSidePathName,
+ getTypeScriptMappedTypeModifier: getTypeScriptMappedTypeModifier,
+ hasDanglingComments: hasDanglingComments,
+ hasFlowAnnotationComment: hasFlowAnnotationComment,
+ hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment,
+ hasLeadingComment: hasLeadingComment$2,
+ hasLeadingOwnLineComment: hasLeadingOwnLineComment,
+ hasNakedLeftSide: hasNakedLeftSide,
+ hasNewlineBetweenOrAfterDecorators: hasNewlineBetweenOrAfterDecorators,
+ hasNgSideEffect: hasNgSideEffect,
+ hasNode: hasNode,
+ hasPrettierIgnore: hasPrettierIgnore$2,
+ hasTrailingComment: hasTrailingComment,
+ identity: identity$1,
+ isBinaryish: isBinaryish,
+ isCallOrOptionalCallExpression: isCallOrOptionalCallExpression,
+ isEmptyJSXElement: isEmptyJSXElement,
+ isFlowAnnotationComment: isFlowAnnotationComment,
+ isFunctionCompositionArgs: isFunctionCompositionArgs,
+ isFunctionNotation: isFunctionNotation,
+ isFunctionOrArrowExpression: isFunctionOrArrowExpression,
+ isGetterOrSetter: isGetterOrSetter,
+ isJestEachTemplateLiteral: isJestEachTemplateLiteral,
+ isJSXNode: isJSXNode,
+ isJSXWhitespaceExpression: isJSXWhitespaceExpression,
+ isLastStatement: isLastStatement,
+ isLiteral: isLiteral,
+ isLongCurriedCallExpression: isLongCurriedCallExpression,
+ isMeaningfulJSXText: isMeaningfulJSXText,
+ isMemberExpressionChain: isMemberExpressionChain,
+ isMemberish: isMemberish,
+ isNgForOf: isNgForOf,
+ isNumericLiteral: isNumericLiteral,
+ isObjectType: isObjectType,
+ isObjectTypePropertyAFunction: isObjectTypePropertyAFunction,
+ isSimpleFlowType: isSimpleFlowType,
+ isSimpleTemplateLiteral: isSimpleTemplateLiteral,
+ isStringLiteral: isStringLiteral,
+ isStringPropSafeToCoerceToIdentifier: isStringPropSafeToCoerceToIdentifier,
+ isTemplateOnItsOwnLine: isTemplateOnItsOwnLine,
+ isTestCall: isTestCall,
+ isTheOnlyJSXElementInMarkdown: isTheOnlyJSXElementInMarkdown,
+ isTSXFile: isTSXFile,
+ isTypeAnnotationAFunction: isTypeAnnotationAFunction,
+ matchJsxWhitespaceRegex: matchJsxWhitespaceRegex,
+ needsHardlineAfterDanglingComment: needsHardlineAfterDanglingComment,
+ rawText: rawText,
+ returnArgumentHasLeadingComment: returnArgumentHasLeadingComment
+ };
- case "ArrowFunctionExpression":
- switch (parent.type) {
- case "CallExpression":
- return name === "callee";
-
- case "NewExpression":
- return name === "callee";
-
- case "MemberExpression":
- return name === "object";
-
- case "TSAsExpression":
- case "BindExpression":
- case "TaggedTemplateExpression":
- case "UnaryExpression":
- case "LogicalExpression":
- case "BinaryExpression":
- case "AwaitExpression":
- case "TSTypeAssertion":
- return true;
+ var getLeftSidePathName$1 = utils$4.getLeftSidePathName,
+ hasFlowShorthandAnnotationComment$1 = utils$4.hasFlowShorthandAnnotationComment,
+ hasNakedLeftSide$1 = utils$4.hasNakedLeftSide,
+ hasNode$1 = utils$4.hasNode;
- case "ConditionalExpression":
- return name === "test";
+ function hasClosureCompilerTypeCastComment(text, path) {
+ // https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts
+ // Syntax example: var x = /** @type {string} */ (fruit);
+ var n = path.getValue();
+ return isParenthesized(n) && (hasTypeCastComment(n) || hasAncestorTypeCastComment(0)); // for sub-item: /** @type {array} */ (numberOrString).map(x => x);
- default:
- return false;
- }
+ function hasAncestorTypeCastComment(index) {
+ var ancestor = path.getParentNode(index);
+ return ancestor && !isParenthesized(ancestor) ? hasTypeCastComment(ancestor) || hasAncestorTypeCastComment(index + 1) : false;
+ }
- case "ClassExpression":
- switch (parent.type) {
- case "NewExpression":
- return name === "callee" && parent.callee === node;
+ function hasTypeCastComment(node) {
+ return node.comments && node.comments.some(function (comment) {
+ return comment.leading && comments$1.isBlockComment(comment) && isTypeCastComment(comment.value);
+ });
+ }
- default:
- return false;
+ function isParenthesized(node) {
+ // Closure typecast comments only really make sense when _not_ using
+ // typescript or flow parsers, so we take advantage of the babel parser's
+ // parenthesized expressions.
+ return node.extra && node.extra.parenthesized;
+ }
+
+ function isTypeCastComment(comment) {
+ var cleaned = comment.trim().split("\n").map(function (line) {
+ return line.replace(/^[\s*]+/, "");
+ }).join(" ").trim();
+
+ if (!/^@type\s*\{[^]+\}$/.test(cleaned)) {
+ return false;
}
- case "OptionalMemberExpression":
- return parent.type === "MemberExpression";
+ var isCompletelyClosed = false;
+ var unpairedBracketCount = 0;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = cleaned[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var char = _step.value;
- case "MemberExpression":
- if (parent.type === "BindExpression" && name === "callee" && parent.callee === node) {
- var object = node.object;
+ if (char === "{") {
+ if (isCompletelyClosed) {
+ return false;
+ }
- while (object) {
- if (object.type === "CallExpression") {
- return true;
- }
+ unpairedBracketCount++;
+ } else if (char === "}") {
+ if (unpairedBracketCount === 0) {
+ return false;
+ }
- if (object.type !== "MemberExpression" && object.type !== "BindExpression") {
- break;
- }
+ unpairedBracketCount--;
- object = object.object;
+ if (unpairedBracketCount === 0) {
+ isCompletelyClosed = true;
+ }
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
+ return unpairedBracketCount === 0;
+ }
+ }
+
+ function needsParens(path, options) {
+ var parent = path.getParentNode();
+
+ if (!parent) {
return false;
+ }
- case "BindExpression":
- if (parent.type === "BindExpression" && name === "callee" && parent.callee === node || parent.type === "MemberExpression" && name === "object" && parent.object === node || parent.type === "NewExpression" && name === "callee" && parent.callee === node) {
- return true;
- }
+ var name = path.getName();
+ var node = path.getNode(); // If the value of this path is some child of a Node and not a Node
+ // itself, then it doesn't need parentheses. Only Node objects (in
+ // fact, only Expression nodes) need parentheses.
+ if (path.getValue() !== node) {
return false;
+ } // to avoid unexpected `}}` in HTML interpolations
- case "NGPipeExpression":
- if (parent.type === "NGRoot" || parent.type === "NGMicrosyntaxExpression" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") {
- return false;
- }
+ if (options.__isInHtmlInterpolation && !options.bracketSpacing && endsWithRightBracket(node) && isFollowedByRightBracket(path)) {
return true;
- }
+ } // Only statements don't need parentheses.
- return false;
-}
-function isStatement(node) {
- return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForAwaitStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSDeclareFunction" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement";
-}
+ if (isStatement(node)) {
+ return false;
+ } // Closure compiler requires that type casted expressions to be surrounded by
+ // parentheses.
-function getUnparenthesizedNode(node) {
- return node.type === "TSParenthesizedType" ? getUnparenthesizedNode(node.typeAnnotation) : node;
-}
-function endsWithRightBracket(node) {
- switch (node.type) {
- case "ObjectExpression":
+ if (hasClosureCompilerTypeCastComment(options.originalText, path)) {
return true;
+ }
- default:
- return false;
- }
-}
+ if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow
+ // parser. The Flow parser turns Flow comments into type annotation nodes in its
+ // AST, which we handle separately.
+ options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path.getValue())) {
+ return true;
+ } // Identifiers never need parentheses.
-function isFollowedByRightBracket(path) {
- var node = path.getValue();
- var parent = path.getParentNode();
- var name = path.getName();
- switch (parent.type) {
- case "NGPipeExpression":
- if (typeof name === "number" && parent.arguments[name] === node && parent.arguments.length - 1 === name) {
- return path.callParent(isFollowedByRightBracket);
+ if (node.type === "Identifier") {
+ // ...unless those identifiers are embed placeholders. They might be substituted by complex
+ // expressions, so the parens around them should not be dropped. Example (JS-in-HTML-in-JS):
+ // let tpl = html`<script> f((${expr}) / 2); </script>`;
+ // If the inner JS formatter removes the parens, the expression might change its meaning:
+ // f((a + b) / 2) vs f(a + b / 2)
+ if (node.extra && node.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(node.name)) {
+ return true;
}
- break;
+ return false;
+ }
- case "ObjectProperty":
- if (name === "value") {
- var parentParent = path.getParentNode(1);
- return parentParent.properties[parentParent.properties.length - 1] === parent;
- }
+ if (parent.type === "ParenthesizedExpression") {
+ return false;
+ } // Add parens around the extends clause of a class. It is needed for almost
+ // all expressions.
- break;
- case "BinaryExpression":
- case "LogicalExpression":
- if (name === "right") {
- return path.callParent(isFollowedByRightBracket);
- }
+ if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) {
+ return true;
+ } // `export default function` or `export default class` can't be followed by
+ // anything after. So an expression like `export default (function(){}).toString()`
+ // needs to be followed by a parentheses
- break;
- case "ConditionalExpression":
- if (name === "alternate") {
- return path.callParent(isFollowedByRightBracket);
- }
+ if (parent.type === "ExportDefaultDeclaration") {
+ return shouldWrapFunctionForExportDefault(path, options);
+ }
- break;
+ if (parent.type === "Decorator" && parent.expression === node) {
+ var hasCallExpression = false;
+ var hasMemberExpression = false;
+ var current = node;
- case "UnaryExpression":
- if (parent.prefix) {
- return path.callParent(isFollowedByRightBracket);
- }
+ while (current) {
+ switch (current.type) {
+ case "MemberExpression":
+ hasMemberExpression = true;
+ current = current.object;
+ break;
- break;
- }
+ case "CallExpression":
+ if (
+ /** @(x().y) */
+ hasMemberExpression ||
+ /** @(x().y()) */
+ hasCallExpression) {
+ return true;
+ }
- return false;
-}
+ hasCallExpression = true;
+ current = current.callee;
+ break;
-function shouldWrapFunctionForExportDefault(path, options) {
- var node = path.getValue();
- var parent = path.getParentNode();
+ case "Identifier":
+ return false;
- if (node.type === "FunctionExpression" || node.type === "ClassExpression") {
- return parent.type === "ExportDefaultDeclaration" || // in some cases the function is already wrapped
- // (e.g. `export default (function() {})();`)
- // in this case we don't need to add extra parens
- !needsParens(path, options);
- }
+ default:
+ return true;
+ }
+ }
- if (!hasNakedLeftSide$1(node) || parent.type !== "ExportDefaultDeclaration" && needsParens(path, options)) {
- return false;
- }
+ return true;
+ }
- return path.call.apply(path, [function (childPath) {
- return shouldWrapFunctionForExportDefault(childPath, options);
- }].concat(getLeftSidePathName$1(path, node)));
-}
+ if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway
+ util.startsWithNoLookaheadToken(node,
+ /* forbidFunctionClassAndDoExpr */
+ false) || parent.type === "ExpressionStatement" && util.startsWithNoLookaheadToken(node,
+ /* forbidFunctionClassAndDoExpr */
+ true)) {
+ return true;
+ }
-var needsParens_1 = needsParens;
+ switch (node.type) {
+ case "SpreadElement":
+ case "SpreadProperty":
+ return parent.type === "MemberExpression" && name === "object" && parent.object === node;
-var _require$$0$builders$6 = doc.builders;
-var concat$13 = _require$$0$builders$6.concat;
-var join$9 = _require$$0$builders$6.join;
-var line$9 = _require$$0$builders$6.line;
+ case "UpdateExpression":
+ if (parent.type === "UnaryExpression") {
+ return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-");
+ }
-function printHtmlBinding$1(path, options, print) {
- var node = path.getValue();
+ // else fallthrough
- if (options.__onHtmlBindingRoot && path.getName() === null) {
- options.__onHtmlBindingRoot(node);
- }
+ case "UnaryExpression":
+ switch (parent.type) {
+ case "UnaryExpression":
+ return node.operator === parent.operator && (node.operator === "+" || node.operator === "-");
- if (node.type !== "File") {
- return;
- }
+ case "BindExpression":
+ return true;
- if (options.__isVueForBindingLeft) {
- return path.call(function (functionDeclarationPath) {
- var _functionDeclarationP = functionDeclarationPath.getValue(),
- params = _functionDeclarationP.params;
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
- return concat$13([params.length > 1 ? "(" : "", join$9(concat$13([",", line$9]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]);
- }, "program", "body", 0);
- }
+ case "TaggedTemplateExpression":
+ return true;
- if (options.__isVueSlotScope) {
- return path.call(function (functionDeclarationPath) {
- return join$9(concat$13([",", line$9]), functionDeclarationPath.map(print, "params"));
- }, "program", "body", 0);
- }
-} // based on https://github.com/prettier/prettier/blob/master/src/language-html/syntax-vue.js isVueEventBindingExpression()
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+ case "BinaryExpression":
+ return parent.operator === "**" && name === "left";
-function isVueEventBindingExpression$3(node) {
- switch (node.type) {
- case "MemberExpression":
- switch (node.property.type) {
- case "Identifier":
- case "NumericLiteral":
- case "StringLiteral":
- return isVueEventBindingExpression$3(node.object);
- }
+ case "TSNonNullExpression":
+ return true;
- return false;
+ default:
+ return false;
+ }
- case "Identifier":
- return true;
+ case "BinaryExpression":
+ {
+ if (parent.type === "UpdateExpression") {
+ return true;
+ }
- default:
- return false;
- }
-}
-
-var htmlBinding = {
- isVueEventBindingExpression: isVueEventBindingExpression$3,
- printHtmlBinding: printHtmlBinding$1
-};
-
-function preprocess$2(ast, options) {
- switch (options.parser) {
- case "json":
- case "json5":
- case "json-stringify":
- case "__js_expression":
- case "__vue_expression":
- return Object.assign({}, ast, {
- type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot",
- node: ast,
- comments: []
- });
+ var isLeftOfAForStatement = function isLeftOfAForStatement(node) {
+ var i = 0;
- default:
- return ast;
- }
-}
-
-var preprocess_1$2 = preprocess$2;
-
-var getParentExportDeclaration$1 = util.getParentExportDeclaration;
-var isExportDeclaration$1 = util.isExportDeclaration;
-var shouldFlatten$1 = util.shouldFlatten;
-var getNextNonSpaceNonCommentCharacter$1 = util.getNextNonSpaceNonCommentCharacter;
-var hasNewline$3 = util.hasNewline;
-var hasNewlineInRange$1 = util.hasNewlineInRange;
-var getLast$3 = util.getLast;
-var getStringWidth$2 = util.getStringWidth;
-var printString$2 = util.printString;
-var printNumber$2 = util.printNumber;
-var hasIgnoreComment$3 = util.hasIgnoreComment;
-var skipWhitespace$1 = util.skipWhitespace;
-var hasNodeIgnoreComment$1 = util.hasNodeIgnoreComment;
-var getPenultimate$1 = util.getPenultimate;
-var startsWithNoLookaheadToken$1 = util.startsWithNoLookaheadToken;
-var getIndentSize$1 = util.getIndentSize;
-var matchAncestorTypes$1 = util.matchAncestorTypes;
-var getPreferredQuote$1 = util.getPreferredQuote;
-var isNextLineEmpty$4 = utilShared.isNextLineEmpty;
-var isNextLineEmptyAfterIndex$1 = utilShared.isNextLineEmptyAfterIndex;
-var getNextNonSpaceNonCommentCharacterIndex$2 = utilShared.getNextNonSpaceNonCommentCharacterIndex;
-var isIdentifierName = utils$2.keyword.isIdentifierNameES5;
-var insertPragma$7 = pragma$2.insertPragma;
-var printHtmlBinding = htmlBinding.printHtmlBinding;
-var isVueEventBindingExpression$2 = htmlBinding.isVueEventBindingExpression;
-var getLeftSide = utils$8.getLeftSide;
-var getLeftSidePathName = utils$8.getLeftSidePathName;
-var hasNakedLeftSide = utils$8.hasNakedLeftSide;
-var hasNode = utils$8.hasNode;
-var hasFlowAnnotationComment = utils$8.hasFlowAnnotationComment;
-var hasFlowShorthandAnnotationComment = utils$8.hasFlowShorthandAnnotationComment;
-var needsQuoteProps = new WeakMap();
-var _require$$6$builders = doc.builders;
-var concat$11 = _require$$6$builders.concat;
-var join$7 = _require$$6$builders.join;
-var line$8 = _require$$6$builders.line;
-var hardline$8 = _require$$6$builders.hardline;
-var softline$5 = _require$$6$builders.softline;
-var literalline$3 = _require$$6$builders.literalline;
-var group$10 = _require$$6$builders.group;
-var indent$6 = _require$$6$builders.indent;
-var align$1 = _require$$6$builders.align;
-var conditionalGroup$1 = _require$$6$builders.conditionalGroup;
-var fill$4 = _require$$6$builders.fill;
-var ifBreak$6 = _require$$6$builders.ifBreak;
-var breakParent$3 = _require$$6$builders.breakParent;
-var lineSuffixBoundary$1 = _require$$6$builders.lineSuffixBoundary;
-var addAlignmentToDoc$2 = _require$$6$builders.addAlignmentToDoc;
-var dedent$3 = _require$$6$builders.dedent;
-var _require$$6$utils = doc.utils;
-var willBreak$1 = _require$$6$utils.willBreak;
-var isLineNext$1 = _require$$6$utils.isLineNext;
-var isEmpty$1 = _require$$6$utils.isEmpty;
-var removeLines$2 = _require$$6$utils.removeLines;
-var printDocToString$1 = doc.printer.printDocToString;
-var uid = 0;
-
-function shouldPrintComma$1(options, level) {
- level = level || "es5";
-
- switch (options.trailingComma) {
- case "all":
- if (level === "all") {
- return true;
- }
+ while (node) {
+ var _parent = path.getParentNode(i++);
- // fallthrough
+ if (!_parent) {
+ return false;
+ }
- case "es5":
- if (level === "es5") {
- return true;
- }
+ if (_parent.type === "ForStatement" && _parent.init === node) {
+ return true;
+ }
- // fallthrough
+ node = _parent;
+ }
- case "none":
- default:
- return false;
- }
-}
+ return false;
+ };
-function genericPrint$3(path, options, printPath, args) {
- var node = path.getValue();
- var needsParens = false;
- var linesWithoutParens = printPathNoParens(path, options, printPath, args);
+ if (node.operator === "in" && isLeftOfAForStatement(node)) {
+ return true;
+ }
+ }
+ // fallthrough
+
+ case "TSTypeAssertion":
+ case "TSAsExpression":
+ case "LogicalExpression":
+ switch (parent.type) {
+ case "ConditionalExpression":
+ return node.type === "TSAsExpression";
+
+ case "CallExpression":
+ case "NewExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "ClassExpression":
+ case "ClassDeclaration":
+ return name === "superClass" && parent.superClass === node;
+
+ case "TSTypeAssertion":
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "JSXSpreadAttribute":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "BindExpression":
+ case "AwaitExpression":
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "UpdateExpression":
+ return true;
- if (!node || isEmpty$1(linesWithoutParens)) {
- return linesWithoutParens;
- }
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
- var parentExportDecl = getParentExportDeclaration$1(path);
- var decorators = [];
+ case "AssignmentExpression":
+ return parent.left === node && (node.type === "TSTypeAssertion" || node.type === "TSAsExpression");
- if (node.type === "ClassMethod" || node.type === "ClassPrivateMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty" || node.type === "MethodDefinition" || node.type === "TSAbstractMethodDefinition") {// their decorators are handled themselves
- } else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator
- // was written before the export, the export will be responsible
- // for printing the decorators.
- !(parentExportDecl && options.locStart(parentExportDecl, {
- ignoreDecorators: true
- }) > options.locStart(node.decorators[0]))) {
- var shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options);
- var separator = shouldBreak ? hardline$8 : line$8;
- path.each(function (decoratorPath) {
- var decorator = decoratorPath.getValue();
+ case "LogicalExpression":
+ if (node.type === "LogicalExpression") {
+ return parent.operator !== node.operator;
+ }
- if (decorator.expression) {
- decorator = decorator.expression;
- } else {
- decorator = decorator.callee;
- }
+ // else fallthrough
- decorators.push(printPath(decoratorPath), separator);
- }, "decorators");
+ case "BinaryExpression":
+ {
+ if (!node.operator && node.type !== "TSTypeAssertion") {
+ return true;
+ }
- if (parentExportDecl) {
- decorators.unshift(hardline$8);
- }
- } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export,
- // otherwise they are printed by the node.declaration
- options.locStart(node, {
- ignoreDecorators: true
- }) > options.locStart(node.declaration.decorators[0])) {
- // Export declarations are responsible for printing any decorators
- // that logically apply to node.declaration.
- path.each(function (decoratorPath) {
- var decorator = decoratorPath.getValue();
- var prefix = decorator.type === "Decorator" ? "" : "@";
- decorators.push(prefix, printPath(decoratorPath), hardline$8);
- }, "declaration", "decorators");
- } else {
- // Nodes with decorators can't have parentheses, so we can avoid
- // computing pathNeedsParens() except in this case.
- needsParens = needsParens_1(path, options);
- }
+ var po = parent.operator;
+ var pp = util.getPrecedence(po);
+ var no = node.operator;
+ var np = util.getPrecedence(no);
- var parts = [];
+ if (pp > np) {
+ return true;
+ }
- if (needsParens) {
- parts.unshift("(");
- }
+ if (pp === np && name === "right") {
+ assert.strictEqual(parent.right, node);
+ return true;
+ }
- parts.push(linesWithoutParens);
+ if (pp === np && !util.shouldFlatten(po, no)) {
+ return true;
+ }
- if (needsParens) {
- var _node = path.getValue();
+ if (pp < np && no === "%") {
+ return po === "+" || po === "-";
+ } // Add parenthesis when working with bitwise operators
+ // It's not strictly needed but helps with code understanding
- if (hasFlowShorthandAnnotationComment(_node)) {
- parts.push(" /*");
- parts.push(_node.trailingComments[0].value.trimLeft());
- parts.push("*/");
- _node.trailingComments[0].printed = true;
- }
- parts.push(")");
- }
+ if (util.isBitwiseOperator(po)) {
+ return true;
+ }
- if (decorators.length > 0) {
- return group$10(concat$11(decorators.concat(parts)));
- }
+ return false;
+ }
- return concat$11(parts);
-}
+ default:
+ return false;
+ }
-function hasNewlineBetweenOrAfterDecorators(node, options) {
- return hasNewlineInRange$1(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$3(node.decorators))) || hasNewline$3(options.originalText, options.locEnd(getLast$3(node.decorators)));
-}
+ case "SequenceExpression":
+ switch (parent.type) {
+ case "ReturnStatement":
+ return false;
-function printDecorators(path, options, print) {
- var node = path.getValue();
- return group$10(concat$11([join$7(line$8, path.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options) ? hardline$8 : line$8]));
-}
+ case "ForStatement":
+ // Although parentheses wouldn't hurt around sequence
+ // expressions in the head of for loops, traditional style
+ // dictates that e.g. i++, j++ should not be wrapped with
+ // parentheses.
+ return false;
-function hasPrettierIgnore$2(path) {
- return hasIgnoreComment$3(path) || hasJsxIgnoreComment(path);
-}
+ case "ExpressionStatement":
+ return name !== "expression";
-function hasJsxIgnoreComment(path) {
- var node = path.getValue();
- var parent = path.getParentNode();
+ case "ArrowFunctionExpression":
+ // We do need parentheses, but SequenceExpressions are handled
+ // specially when printing bodies of arrow functions.
+ return name !== "body";
- if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) {
- return false;
- } // Lookup the previous sibling, ignoring any empty JSXText elements
+ default:
+ // Otherwise err on the side of overparenthesization, adding
+ // explicit exceptions above if this proves overzealous.
+ return true;
+ }
+ case "YieldExpression":
+ if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") {
+ return true;
+ }
- var index = parent.children.indexOf(node);
- var prevSibling = null;
+ // else fallthrough
- for (var i = index; i > 0; i--) {
- var candidate = parent.children[i - 1];
+ case "AwaitExpression":
+ switch (parent.type) {
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "BindExpression":
+ return true;
- if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) {
- continue;
- }
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
- prevSibling = candidate;
- break;
- }
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
- return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(function (comment) {
- return comment.value.trim() === "prettier-ignore";
- });
-}
-/**
- * The following is the shared logic for
- * ternary operators, namely ConditionalExpression
- * and TSConditionalType
- * @typedef {Object} OperatorOptions
- * @property {() => Array<string | Doc>} beforeParts - Parts to print before the `?`.
- * @property {(breakClosingParen: boolean) => Array<string | Doc>} afterParts - Parts to print after the conditional expression.
- * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.
- * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType".
- * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent".
- * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate".
- * @property {string} testNodePropertyName - The property at which the test node can be found on the main node, eg "test".
- * @property {boolean} breakNested - Whether to break all nested ternaries when one breaks.
- * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node.
- * @param {Options} options - Prettier options
- * @param {Function} print - Print function to call recursively
- * @param {OperatorOptions} operatorOptions
- * @returns Doc
- */
+ case "ConditionalExpression":
+ return parent.test === node;
+ default:
+ return false;
+ }
-function printTernaryOperator(path, options, print, operatorOptions) {
- var node = path.getValue();
- var testNode = node[operatorOptions.testNodePropertyName];
- var consequentNode = node[operatorOptions.consequentNodePropertyName];
- var alternateNode = node[operatorOptions.alternateNodePropertyName];
- var parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode".
- // See tests/jsx/conditional-expression.js for more info.
-
- var jsxMode = false;
- var parent = path.getParentNode();
- var forceNoIndent = parent.type === operatorOptions.conditionalNodeType; // Find the outermost non-ConditionalExpression parent, and the outermost
- // ConditionalExpression parent. We'll use these to determine if we should
- // print in JSX mode.
-
- var currentParent;
- var previousParent;
- var i = 0;
-
- do {
- previousParent = currentParent || node;
- currentParent = path.getParentNode(i);
- i++;
- } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType);
-
- var firstNonConditionalParent = currentParent || parent;
- var lastConditionalParent = previousParent;
-
- if (operatorOptions.shouldCheckJsx && (isJSXNode(testNode) || isJSXNode(consequentNode) || isJSXNode(alternateNode) || conditionalExpressionChainContainsJSX(lastConditionalParent))) {
- jsxMode = true;
- forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in
- // parens when using ?: within JSX, because the parens are analogous to
- // curly braces in an if statement.
-
- var wrap = function wrap(doc$$2) {
- return concat$11([ifBreak$6("(", ""), indent$6(concat$11([softline$5, doc$$2])), softline$5, ifBreak$6(")", "")]);
- }; // The only things we don't wrap are:
- // * Nested conditional expressions in alternates
- // * null
-
-
- var isNull = function isNull(node) {
- return node.type === "NullLiteral" || node.type === "Literal" && node.value === null;
- };
+ case "TSConditionalType":
+ if (parent.type === "TSConditionalType" && node === parent.extendsType) {
+ return true;
+ }
- parts.push(" ? ", isNull(consequentNode) ? path.call(print, operatorOptions.consequentNodePropertyName) : wrap(path.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNull(alternateNode) ? path.call(print, operatorOptions.alternateNodePropertyName) : wrap(path.call(print, operatorOptions.alternateNodePropertyName)));
- } else {
- // normal mode
- var part = concat$11([line$8, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", "(") : "", align$1(2, path.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", ")") : "", line$8, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path.call(print, operatorOptions.alternateNodePropertyName))]);
- parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node ? part : options.useTabs ? dedent$3(indent$6(part)) : align$1(Math.max(0, options.tabWidth - 2), part));
- } // We want a whole chain of ConditionalExpressions to all
- // break if any of them break. That means we should only group around the
- // outer-most ConditionalExpression.
+ // fallthrough
+ case "TSFunctionType":
+ case "TSConstructorType":
+ if (parent.type === "TSConditionalType" && node === parent.checkType) {
+ return true;
+ }
- var maybeGroup = function maybeGroup(doc$$2) {
- return operatorOptions.breakNested ? parent === firstNonConditionalParent ? group$10(doc$$2) : doc$$2 : group$10(doc$$2);
- }; // Break the closing paren to keep the chain right after it:
- // (a
- // ? b
- // : c
- // ).call()
+ // fallthrough
+ case "TSUnionType":
+ case "TSIntersectionType":
+ if (parent.type === "TSUnionType" || parent.type === "TSIntersectionType") {
+ return true;
+ }
- var breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed;
- return maybeGroup(concat$11([].concat(function (testDoc) {
- return (
- /**
- * a
- * ? b
- * : multiline
- * test
- * node
- * ^^ align(2)
- * ? d
- * : e
- */
- parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc
- );
- }(concat$11(operatorOptions.beforeParts())), forceNoIndent ? concat$11(parts) : indent$6(concat$11(parts)), operatorOptions.afterParts(breakClosingParen))));
-}
+ // fallthrough
-function getTypeScriptMappedTypeModifier(tokenNode, keyword) {
- if (tokenNode === "+") {
- return "+" + keyword;
- } else if (tokenNode === "-") {
- return "-" + keyword;
- }
+ case "TSTypeOperator":
+ case "TSInferType":
+ return parent.type === "TSArrayType" || parent.type === "TSOptionalType" || parent.type === "TSRestType" || parent.type === "TSIndexedAccessType" && node === parent.objectType || parent.type === "TSTypeOperator";
- return keyword;
-}
+ case "ArrayTypeAnnotation":
+ return parent.type === "NullableTypeAnnotation";
-function printPathNoParens(path, options, print, args) {
- var n = path.getValue();
- var semi = options.semi ? ";" : "";
+ case "IntersectionTypeAnnotation":
+ case "UnionTypeAnnotation":
+ return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation";
- if (!n) {
- return "";
- }
+ case "NullableTypeAnnotation":
+ return parent.type === "ArrayTypeAnnotation";
- if (typeof n === "string") {
- return n;
- }
+ case "FunctionTypeAnnotation":
+ {
+ var ancestor = parent.type === "NullableTypeAnnotation" ? path.getParentNode(1) : parent;
+ return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses
+ // are really needed, but since ??T doesn't make sense this check
+ // will almost never be true.
+ ancestor.type === "NullableTypeAnnotation";
+ }
- var htmlBinding$$1 = printHtmlBinding(path, options, print);
+ case "StringLiteral":
+ case "NumericLiteral":
+ case "Literal":
+ if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
+ // See corresponding workaround in printer.js case: "Literal"
+ options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(options.locStart(node) - 1, 1) === "(")) {
+ // To avoid becoming a directive
+ var grandParent = path.getParentNode(1);
+ return grandParent.type === "Program" || grandParent.type === "BlockStatement";
+ }
- if (htmlBinding$$1) {
- return htmlBinding$$1;
- }
+ return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node;
- var parts = [];
+ case "AssignmentExpression":
+ {
+ var _grandParent = path.getParentNode(1);
- switch (n.type) {
- case "JsExpressionRoot":
- return path.call(print, "node");
+ if (parent.type === "ArrowFunctionExpression" && parent.body === node) {
+ return true;
+ } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) {
+ return false;
+ } else if (parent.type === "TSPropertySignature" && parent.name === node) {
+ return false;
+ } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) {
+ return false;
+ } else if (parent.type === "ExpressionStatement") {
+ return node.left.type === "ObjectPattern";
+ } else if (parent.type === "TSPropertySignature" && parent.key === node) {
+ return false;
+ } else if (parent.type === "AssignmentExpression") {
+ return false;
+ } else if (parent.type === "SequenceExpression" && _grandParent && _grandParent.type === "ForStatement" && (_grandParent.init === parent || _grandParent.update === parent)) {
+ return false;
+ } else if (parent.type === "Property" && parent.value === node) {
+ return false;
+ } else if (parent.type === "NGChainedExpression") {
+ return false;
+ }
- case "JsonRoot":
- return concat$11([path.call(print, "node"), hardline$8]);
+ return true;
+ }
- case "File":
- // Print @babel/parser's InterpreterDirective here so that
- // leading comments on the `Program` node get printed after the hashbang.
- if (n.program && n.program.interpreter) {
- parts.push(path.call(function (programPath) {
- return programPath.call(print, "interpreter");
- }, "program"));
- }
+ case "ConditionalExpression":
+ switch (parent.type) {
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "NGPipeExpression":
+ case "ExportDefaultDeclaration":
+ case "AwaitExpression":
+ case "JSXSpreadAttribute":
+ case "TSTypeAssertion":
+ case "TypeCastExpression":
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ return true;
- parts.push(path.call(print, "program"));
- return concat$11(parts);
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
- case "Program":
- // Babel 6
- if (n.directives) {
- path.each(function (childPath) {
- parts.push(print(childPath), semi, hardline$8);
+ case "ConditionalExpression":
+ return name === "test" && parent.test === node;
- if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) {
- parts.push(hardline$8);
- }
- }, "directives");
- }
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
- parts.push(path.call(function (bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body"));
- parts.push(comments.printDanglingComments(path, options,
- /* sameIndent */
- true)); // Only force a trailing newline if there were any contents.
+ default:
+ return false;
+ }
- if (n.body.length || n.comments) {
- parts.push(hardline$8);
- }
+ case "FunctionExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ // Not always necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses.
+ // Is necessary if it is `expression` of `ExpressionStatement`.
+ return name === "callee";
- return concat$11(parts);
- // Babel extension.
+ case "TaggedTemplateExpression":
+ return true;
+ // This is basically a kind of IIFE.
- case "EmptyStatement":
- return "";
+ default:
+ return false;
+ }
- case "ExpressionStatement":
- // Detect Flow-parsed directives
- if (n.directive) {
- return concat$11([nodeStr(n.expression, options, true), semi]);
- }
+ case "ArrowFunctionExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ case "TSAsExpression":
+ case "BindExpression":
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "LogicalExpression":
+ case "BinaryExpression":
+ case "AwaitExpression":
+ case "TSTypeAssertion":
+ return true;
- if (options.parser === "__vue_event_binding") {
- var parent = path.getParentNode();
+ case "ConditionalExpression":
+ return name === "test";
- if (parent.type === "Program" && parent.body.length === 1 && parent.body[0] === n) {
- return concat$11([path.call(print, "expression"), isVueEventBindingExpression$2(n.expression) ? ";" : ""]);
+ default:
+ return false;
}
- } // Do not append semicolon after the only JSX element in a program
+ case "ClassExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ return name === "callee" && parent.callee === node;
- return concat$11([path.call(print, "expression"), isTheOnlyJSXElementInMarkdown(options, path) ? "" : semi]);
- // Babel extension.
+ default:
+ return false;
+ }
- case "ParenthesizedExpression":
- return concat$11(["(", path.call(print, "expression"), ")"]);
+ case "OptionalMemberExpression":
+ case "OptionalCallExpression":
+ if ((parent.type === "MemberExpression" && name === "object" || parent.type === "CallExpression" && name === "callee") && // workaround for https://github.com/facebook/flow/issues/8159
+ !(options.parser === "flow" && parent.range[0] === node.range[0])) {
+ return true;
+ }
- case "AssignmentExpression":
- return printAssignment(n.left, path.call(print, "left"), concat$11([" ", n.operator]), n.right, path.call(print, "right"), options);
+ // fallthrough
- case "BinaryExpression":
- case "LogicalExpression":
- case "NGPipeExpression":
- {
- var _parent = path.getParentNode();
+ case "CallExpression":
+ case "MemberExpression":
+ case "TaggedTemplateExpression":
+ case "TSNonNullExpression":
+ if ((parent.type === "BindExpression" || parent.type === "NewExpression") && name === "callee") {
+ var object = node;
+
+ while (object) {
+ switch (object.type) {
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return true;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ case "BindExpression":
+ object = object.object;
+ break;
+ // tagged templates are basically member expressions from a grammar perspective
+ // see https://tc39.github.io/ecma262/#prod-MemberExpression
- var parentParent = path.getParentNode(1);
- var isInsideParenthesis = n !== _parent.body && (_parent.type === "IfStatement" || _parent.type === "WhileStatement" || _parent.type === "DoWhileStatement");
+ case "TaggedTemplateExpression":
+ object = object.tag;
+ break;
- var _parts = printBinaryishExpressions(path, print, options,
- /* isNested */
- false, isInsideParenthesis); // if (
- // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft
- // ) {
- //
- // looks super weird, we want to break the children if the parent breaks
- //
- // if (
- // this.hasPlugin("dynamicImports") &&
- // this.lookahead().type === tt.parenLeft
- // ) {
+ case "TSNonNullExpression":
+ object = object.expression;
+ break;
+ default:
+ return false;
+ }
+ }
+ }
- if (isInsideParenthesis) {
- return concat$11(_parts);
- } // Break between the parens in unaries or in a member expression, i.e.
- //
- // (
- // a &&
- // b &&
- // c
- // ).call()
+ return false;
+
+ case "BindExpression":
+ return (parent.type === "BindExpression" || parent.type === "NewExpression") && name === "callee" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && name === "object";
+
+ case "NGPipeExpression":
+ if (parent.type === "NGRoot" || parent.type === "NGMicrosyntaxExpression" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") {
+ return false;
+ }
+
+ return true;
+
+ case "JSXFragment":
+ case "JSXElement":
+ return name === "callee" || parent.type !== "ArrayExpression" && parent.type !== "ArrowFunctionExpression" && parent.type !== "AssignmentExpression" && parent.type !== "AssignmentPattern" && parent.type !== "BinaryExpression" && parent.type !== "CallExpression" && parent.type !== "ConditionalExpression" && parent.type !== "ExpressionStatement" && parent.type !== "JsExpressionRoot" && parent.type !== "JSXAttribute" && parent.type !== "JSXElement" && parent.type !== "JSXExpressionContainer" && parent.type !== "JSXFragment" && parent.type !== "LogicalExpression" && parent.type !== "ObjectProperty" && parent.type !== "OptionalCallExpression" && parent.type !== "Property" && parent.type !== "ReturnStatement" && parent.type !== "TypeCastExpression" && parent.type !== "VariableDeclarator";
+
+ case "TypeAnnotation":
+ return name === "returnType" && parent.type === "ArrowFunctionExpression" && includesFunctionTypeInObjectType(node);
+ }
+
+ return false;
+ }
+
+ function isStatement(node) {
+ return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForAwaitStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSDeclareFunction" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement";
+ }
+ function includesFunctionTypeInObjectType(node) {
+ return hasNode$1(node, function (n1) {
+ return n1.type === "ObjectTypeAnnotation" && hasNode$1(n1, function (n2) {
+ return n2.type === "FunctionTypeAnnotation" || undefined;
+ }) || undefined;
+ });
+ }
- if (_parent.type === "UnaryExpression" || (_parent.type === "MemberExpression" || _parent.type === "OptionalMemberExpression") && !_parent.computed) {
- return group$10(concat$11([indent$6(concat$11([softline$5, concat$11(_parts)])), softline$5]));
- } // Avoid indenting sub-expressions in some cases where the first sub-expression is already
- // indented accordingly. We should indent sub-expressions where the first case isn't indented.
+ function endsWithRightBracket(node) {
+ switch (node.type) {
+ case "ObjectExpression":
+ return true;
+ default:
+ return false;
+ }
+ }
- var shouldNotIndent = _parent.type === "ReturnStatement" || _parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.type !== "NGPipeExpression" && (_parent.type === "NGRoot" && options.parser === "__ng_binding" || _parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === _parent.body && _parent.type === "ArrowFunctionExpression" || n !== _parent.body && _parent.type === "ForStatement" || _parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "CallExpression";
- var shouldIndentIfInlining = _parent.type === "AssignmentExpression" || _parent.type === "VariableDeclarator" || _parent.type === "ClassProperty" || _parent.type === "TSAbstractClassProperty" || _parent.type === "ClassPrivateProperty" || _parent.type === "ObjectProperty" || _parent.type === "Property";
- var samePrecedenceSubExpression = isBinaryish(n.left) && shouldFlatten$1(n.operator, n.left.operator);
+ function isFollowedByRightBracket(path) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ var name = path.getName();
- if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) {
- return group$10(concat$11(_parts));
+ switch (parent.type) {
+ case "NGPipeExpression":
+ if (typeof name === "number" && parent.arguments[name] === node && parent.arguments.length - 1 === name) {
+ return path.callParent(isFollowedByRightBracket);
}
- if (_parts.length === 0) {
- return "";
- } // If the right part is a JSX node, we include it in a separate group to
- // prevent it breaking the whole chain, so we can print the expression like:
- //
- // foo && bar && (
- // <Foo>
- // <Bar />
- // </Foo>
- // )
-
-
- var hasJSX = isJSXNode(n.right);
- var rest = concat$11(hasJSX ? _parts.slice(1, -1) : _parts.slice(1));
- var groupId = Symbol("logicalChain-" + ++uid);
- var chain = group$10(concat$11([// Don't include the initial expression in the indentation
- // level. The first item is guaranteed to be the first
- // left-most expression.
- _parts.length > 0 ? _parts[0] : "", indent$6(rest)]), {
- id: groupId
- });
+ break;
- if (!hasJSX) {
- return chain;
+ case "ObjectProperty":
+ if (name === "value") {
+ var parentParent = path.getParentNode(1);
+ return parentParent.properties[parentParent.properties.length - 1] === parent;
}
- var jsxPart = getLast$3(_parts);
- return group$10(concat$11([chain, ifBreak$6(indent$6(jsxPart), jsxPart, {
- groupId: groupId
- })]));
- }
+ break;
- case "AssignmentPattern":
- return concat$11([path.call(print, "left"), " = ", path.call(print, "right")]);
+ case "BinaryExpression":
+ case "LogicalExpression":
+ if (name === "right") {
+ return path.callParent(isFollowedByRightBracket);
+ }
- case "TSTypeAssertion":
- {
- var shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression");
- var castGroup = group$10(concat$11(["<", indent$6(concat$11([softline$5, path.call(print, "typeAnnotation")])), softline$5, ">"]));
- var exprContents = concat$11([ifBreak$6("("), indent$6(concat$11([softline$5, path.call(print, "expression")])), softline$5, ifBreak$6(")")]);
+ break;
- if (shouldBreakAfterCast) {
- return conditionalGroup$1([concat$11([castGroup, path.call(print, "expression")]), concat$11([castGroup, group$10(exprContents, {
- shouldBreak: true
- })]), concat$11([castGroup, path.call(print, "expression")])]);
+ case "ConditionalExpression":
+ if (name === "alternate") {
+ return path.callParent(isFollowedByRightBracket);
}
- return group$10(concat$11([castGroup, path.call(print, "expression")]));
- }
+ break;
- case "OptionalMemberExpression":
- case "MemberExpression":
- {
- var _parent2 = path.getParentNode();
+ case "UnaryExpression":
+ if (parent.prefix) {
+ return path.callParent(isFollowedByRightBracket);
+ }
- var firstNonMemberParent;
- var i = 0;
+ break;
+ }
- do {
- firstNonMemberParent = path.getParentNode(i);
- i++;
- } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression"));
+ return false;
+ }
- var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent2.type !== "MemberExpression" && _parent2.type !== "OptionalMemberExpression";
- return concat$11([path.call(print, "object"), shouldInline ? printMemberLookup(path, options, print) : group$10(indent$6(concat$11([softline$5, printMemberLookup(path, options, print)])))]);
- }
+ function shouldWrapFunctionForExportDefault(path, options) {
+ var node = path.getValue();
+ var parent = path.getParentNode();
- case "MetaProperty":
- return concat$11([path.call(print, "meta"), ".", path.call(print, "property")]);
+ if (node.type === "FunctionExpression" || node.type === "ClassExpression") {
+ return parent.type === "ExportDefaultDeclaration" || // in some cases the function is already wrapped
+ // (e.g. `export default (function() {})();`)
+ // in this case we don't need to add extra parens
+ !needsParens(path, options);
+ }
- case "BindExpression":
- if (n.object) {
- parts.push(path.call(print, "object"));
- }
+ if (!hasNakedLeftSide$1(node) || parent.type !== "ExportDefaultDeclaration" && needsParens(path, options)) {
+ return false;
+ }
- parts.push(group$10(indent$6(concat$11([softline$5, printBindExpressionCallee(path, options, print)]))));
- return concat$11(parts);
+ return path.call.apply(path, [function (childPath) {
+ return shouldWrapFunctionForExportDefault(childPath, options);
+ }].concat(getLeftSidePathName$1(path, node)));
+ }
- case "Identifier":
- {
- return concat$11([n.name, printOptionalToken(path), printTypeAnnotation(path, options, print)]);
- }
+ var needsParens_1 = needsParens;
- case "SpreadElement":
- case "SpreadElementPattern":
- case "RestProperty":
- case "SpreadProperty":
- case "SpreadPropertyPattern":
- case "RestElement":
- case "ObjectTypeSpreadProperty":
- return concat$11(["...", path.call(print, "argument"), printTypeAnnotation(path, options, print)]);
+ var _require$$0$builders$6 = doc.builders,
+ concat$c = _require$$0$builders$6.concat,
+ join$8 = _require$$0$builders$6.join,
+ line$6 = _require$$0$builders$6.line;
- case "FunctionDeclaration":
- case "FunctionExpression":
- parts.push(printFunctionDeclaration(path, print, options));
+ function printHtmlBinding(path, options, print) {
+ var node = path.getValue();
- if (!n.body) {
- parts.push(semi);
- }
+ if (options.__onHtmlBindingRoot && path.getName() === null) {
+ options.__onHtmlBindingRoot(node);
+ }
- return concat$11(parts);
+ if (node.type !== "File") {
+ return;
+ }
- case "ArrowFunctionExpression":
- {
- if (n.async) {
- parts.push("async ");
- }
+ if (options.__isVueForBindingLeft) {
+ return path.call(function (functionDeclarationPath) {
+ var _functionDeclarationP = functionDeclarationPath.getValue(),
+ params = _functionDeclarationP.params;
- if (shouldPrintParamsWithoutParens(path, options)) {
- parts.push(path.call(print, "params", 0));
- } else {
- parts.push(group$10(concat$11([printFunctionParams(path, print, options,
- /* expandLast */
- args && (args.expandLastArg || args.expandFirstArg),
- /* printTypeParams */
- true), printReturnType(path, print, options)])));
- }
+ return concat$c([params.length > 1 ? "(" : "", join$8(concat$c([",", line$6]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]);
+ }, "program", "body", 0);
+ }
+
+ if (options.__isVueSlotScope) {
+ return path.call(function (functionDeclarationPath) {
+ return join$8(concat$c([",", line$6]), functionDeclarationPath.map(print, "params"));
+ }, "program", "body", 0);
+ }
+ } // based on https://github.com/prettier/prettier/blob/master/src/language-html/syntax-vue.js isVueEventBindingExpression()
- var dangling = comments.printDanglingComments(path, options,
- /* sameIndent */
- true, function (comment) {
- var nextCharacter = getNextNonSpaceNonCommentCharacterIndex$2(options.originalText, comment, options);
- return options.originalText.substr(nextCharacter, 2) === "=>";
- });
- if (dangling) {
- parts.push(" ", dangling);
+ function isVueEventBindingExpression$2(node) {
+ switch (node.type) {
+ case "MemberExpression":
+ switch (node.property.type) {
+ case "Identifier":
+ case "NumericLiteral":
+ case "StringLiteral":
+ return isVueEventBindingExpression$2(node.object);
}
- parts.push(" =>");
- var body = path.call(function (bodyPath) {
- return print(bodyPath, args);
- }, "body"); // We want to always keep these types of nodes on the same line
- // as the arrow.
+ return false;
- if (!hasLeadingOwnLineComment(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode(n.body) || isTemplateOnItsOwnLine(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) {
- return group$10(concat$11([concat$11(parts), " ", body]));
- } // We handle sequence expressions as the body of arrows specially,
- // so that the required parentheses end up on their own lines.
+ case "Identifier":
+ return true;
+ default:
+ return false;
+ }
+ }
- if (n.body.type === "SequenceExpression") {
- return group$10(concat$11([concat$11(parts), group$10(concat$11([" (", indent$6(concat$11([softline$5, body])), softline$5, ")"]))]));
- } // if the arrow function is expanded as last argument, we are adding a
- // level of indentation and need to add a softline to align the closing )
- // with the opening (, or if it's inside a JSXExpression (e.g. an attribute)
- // we should align the expression's closing } with the line with the opening {.
+ var htmlBinding = {
+ isVueEventBindingExpression: isVueEventBindingExpression$2,
+ printHtmlBinding: printHtmlBinding
+ };
+ function preprocess$1(ast, options) {
+ switch (options.parser) {
+ case "json":
+ case "json5":
+ case "json-stringify":
+ case "__js_expression":
+ case "__vue_expression":
+ return Object.assign({}, ast, {
+ type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot",
+ node: ast,
+ comments: []
+ });
- var shouldAddSoftLine = (args && args.expandLastArg || path.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length);
- var printTrailingComma = args && args.expandLastArg && shouldPrintComma$1(options, "all"); // In order to avoid confusion between
- // a => a ? a : a
- // a <= a ? a : a
+ default:
+ return ast;
+ }
+ }
+
+ var preprocess_1$1 = preprocess$1;
+
+ var getParentExportDeclaration$1 = util.getParentExportDeclaration,
+ isExportDeclaration$1 = util.isExportDeclaration,
+ shouldFlatten$1 = util.shouldFlatten,
+ getNextNonSpaceNonCommentCharacter$1 = util.getNextNonSpaceNonCommentCharacter,
+ hasNewline$4 = util.hasNewline,
+ hasNewlineInRange$2 = util.hasNewlineInRange,
+ getLast$2 = util.getLast,
+ getStringWidth$2 = util.getStringWidth,
+ printString$2 = util.printString,
+ printNumber$2 = util.printNumber,
+ hasIgnoreComment$4 = util.hasIgnoreComment,
+ hasNodeIgnoreComment$2 = util.hasNodeIgnoreComment,
+ getPenultimate$1 = util.getPenultimate,
+ startsWithNoLookaheadToken$1 = util.startsWithNoLookaheadToken,
+ getIndentSize$1 = util.getIndentSize,
+ matchAncestorTypes$1 = util.matchAncestorTypes,
+ getPreferredQuote$1 = util.getPreferredQuote;
+ var isNextLineEmpty$4 = utilShared.isNextLineEmpty,
+ isNextLineEmptyAfterIndex$1 = utilShared.isNextLineEmptyAfterIndex,
+ getNextNonSpaceNonCommentCharacterIndex$2 = utilShared.getNextNonSpaceNonCommentCharacterIndex;
+ var insertPragma$7 = pragma.insertPragma;
+ var printHtmlBinding$1 = htmlBinding.printHtmlBinding,
+ isVueEventBindingExpression$3 = htmlBinding.isVueEventBindingExpression;
+ var classChildNeedsASIProtection$1 = utils$4.classChildNeedsASIProtection,
+ classPropMayCauseASIProblems$1 = utils$4.classPropMayCauseASIProblems,
+ conditionalExpressionChainContainsJSX$1 = utils$4.conditionalExpressionChainContainsJSX,
+ getFlowVariance$1 = utils$4.getFlowVariance,
+ getLeftSidePathName$2 = utils$4.getLeftSidePathName,
+ getTypeScriptMappedTypeModifier$1 = utils$4.getTypeScriptMappedTypeModifier,
+ hasDanglingComments$1 = utils$4.hasDanglingComments,
+ hasFlowAnnotationComment$1 = utils$4.hasFlowAnnotationComment,
+ hasFlowShorthandAnnotationComment$2 = utils$4.hasFlowShorthandAnnotationComment,
+ hasLeadingComment$3 = utils$4.hasLeadingComment,
+ hasLeadingOwnLineComment$1 = utils$4.hasLeadingOwnLineComment,
+ hasNakedLeftSide$2 = utils$4.hasNakedLeftSide,
+ hasNewlineBetweenOrAfterDecorators$1 = utils$4.hasNewlineBetweenOrAfterDecorators,
+ hasNgSideEffect$1 = utils$4.hasNgSideEffect,
+ hasPrettierIgnore$3 = utils$4.hasPrettierIgnore,
+ hasTrailingComment$1 = utils$4.hasTrailingComment,
+ identity$2 = utils$4.identity,
+ isBinaryish$1 = utils$4.isBinaryish,
+ isCallOrOptionalCallExpression$1 = utils$4.isCallOrOptionalCallExpression,
+ isEmptyJSXElement$1 = utils$4.isEmptyJSXElement,
+ isFlowAnnotationComment$1 = utils$4.isFlowAnnotationComment,
+ isFunctionCompositionArgs$1 = utils$4.isFunctionCompositionArgs,
+ isFunctionNotation$1 = utils$4.isFunctionNotation,
+ isFunctionOrArrowExpression$1 = utils$4.isFunctionOrArrowExpression,
+ isGetterOrSetter$1 = utils$4.isGetterOrSetter,
+ isJestEachTemplateLiteral$1 = utils$4.isJestEachTemplateLiteral,
+ isJSXNode$1 = utils$4.isJSXNode,
+ isJSXWhitespaceExpression$1 = utils$4.isJSXWhitespaceExpression,
+ isLastStatement$1 = utils$4.isLastStatement,
+ isLiteral$1 = utils$4.isLiteral,
+ isLongCurriedCallExpression$1 = utils$4.isLongCurriedCallExpression,
+ isMeaningfulJSXText$1 = utils$4.isMeaningfulJSXText,
+ isMemberExpressionChain$1 = utils$4.isMemberExpressionChain,
+ isMemberish$1 = utils$4.isMemberish,
+ isNgForOf$1 = utils$4.isNgForOf,
+ isNumericLiteral$1 = utils$4.isNumericLiteral,
+ isObjectType$1 = utils$4.isObjectType,
+ isObjectTypePropertyAFunction$1 = utils$4.isObjectTypePropertyAFunction,
+ isSimpleFlowType$1 = utils$4.isSimpleFlowType,
+ isSimpleTemplateLiteral$1 = utils$4.isSimpleTemplateLiteral,
+ isStringLiteral$1 = utils$4.isStringLiteral,
+ isStringPropSafeToCoerceToIdentifier$1 = utils$4.isStringPropSafeToCoerceToIdentifier,
+ isTemplateOnItsOwnLine$1 = utils$4.isTemplateOnItsOwnLine,
+ isTestCall$1 = utils$4.isTestCall,
+ isTheOnlyJSXElementInMarkdown$1 = utils$4.isTheOnlyJSXElementInMarkdown,
+ isTSXFile$1 = utils$4.isTSXFile,
+ isTypeAnnotationAFunction$1 = utils$4.isTypeAnnotationAFunction,
+ matchJsxWhitespaceRegex$1 = utils$4.matchJsxWhitespaceRegex,
+ needsHardlineAfterDanglingComment$1 = utils$4.needsHardlineAfterDanglingComment,
+ rawText$1 = utils$4.rawText,
+ returnArgumentHasLeadingComment$1 = utils$4.returnArgumentHasLeadingComment;
+ var needsQuoteProps = new WeakMap();
+ var _require$$5$builders = doc.builders,
+ concat$d = _require$$5$builders.concat,
+ join$9 = _require$$5$builders.join,
+ line$7 = _require$$5$builders.line,
+ hardline$9 = _require$$5$builders.hardline,
+ softline$6 = _require$$5$builders.softline,
+ literalline$4 = _require$$5$builders.literalline,
+ group$b = _require$$5$builders.group,
+ indent$7 = _require$$5$builders.indent,
+ align$1 = _require$$5$builders.align,
+ conditionalGroup$1 = _require$$5$builders.conditionalGroup,
+ fill$4 = _require$$5$builders.fill,
+ ifBreak$6 = _require$$5$builders.ifBreak,
+ breakParent$3 = _require$$5$builders.breakParent,
+ lineSuffixBoundary$1 = _require$$5$builders.lineSuffixBoundary,
+ addAlignmentToDoc$2 = _require$$5$builders.addAlignmentToDoc,
+ dedent$2 = _require$$5$builders.dedent,
+ _require$$5$utils = doc.utils,
+ willBreak$1 = _require$$5$utils.willBreak,
+ isLineNext$1 = _require$$5$utils.isLineNext,
+ isEmpty$1 = _require$$5$utils.isEmpty,
+ removeLines$2 = _require$$5$utils.removeLines,
+ printDocToString$1 = doc.printer.printDocToString;
+ var uid = 0;
+
+ function shouldPrintComma$1(options, level) {
+ level = level || "es5";
+
+ switch (options.trailingComma) {
+ case "all":
+ if (level === "all") {
+ return true;
+ }
- var shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body,
- /* forbidFunctionAndClass */
- false);
- return group$10(concat$11([concat$11(parts), group$10(concat$11([indent$6(concat$11([line$8, shouldAddParens ? ifBreak$6("", "(") : "", body, shouldAddParens ? ifBreak$6("", ")") : ""])), shouldAddSoftLine ? concat$11([ifBreak$6(printTrailingComma ? "," : ""), softline$5]) : ""]))]));
- }
+ // fallthrough
- case "MethodDefinition":
- case "TSAbstractMethodDefinition":
- if (n.decorators && n.decorators.length !== 0) {
- parts.push(printDecorators(path, options, print));
- }
+ case "es5":
+ if (level === "es5") {
+ return true;
+ }
- if (n.accessibility) {
- parts.push(n.accessibility + " ");
- }
+ // fallthrough
- if (n.static) {
- parts.push("static ");
- }
+ case "none":
+ default:
+ return false;
+ }
+ }
- if (n.type === "TSAbstractMethodDefinition") {
- parts.push("abstract ");
- }
+ function genericPrint$3(path, options, printPath, args) {
+ var node = path.getValue();
+ var needsParens = false;
+ var linesWithoutParens = printPathNoParens(path, options, printPath, args);
- parts.push(printMethod(path, options, print));
- return concat$11(parts);
+ if (!node || isEmpty$1(linesWithoutParens)) {
+ return linesWithoutParens;
+ }
- case "YieldExpression":
- parts.push("yield");
+ var parentExportDecl = getParentExportDeclaration$1(path);
+ var decorators = [];
- if (n.delegate) {
- parts.push("*");
- }
+ if (node.type === "ClassMethod" || node.type === "ClassPrivateMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty" || node.type === "MethodDefinition" || node.type === "TSAbstractMethodDefinition") ; else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator
+ // was written before the export, the export will be responsible
+ // for printing the decorators.
+ !(parentExportDecl && options.locStart(parentExportDecl, {
+ ignoreDecorators: true
+ }) > options.locStart(node.decorators[0]))) {
+ var shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators$1(node, options);
+ var separator = shouldBreak ? hardline$9 : line$7;
+ path.each(function (decoratorPath) {
+ var decorator = decoratorPath.getValue();
- if (n.argument) {
- parts.push(" ", path.call(print, "argument"));
- }
+ if (decorator.expression) {
+ decorator = decorator.expression;
+ } else {
+ decorator = decorator.callee;
+ }
+
+ decorators.push(printPath(decoratorPath), separator);
+ }, "decorators");
+
+ if (parentExportDecl) {
+ decorators.unshift(hardline$9);
+ }
+ } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export,
+ // otherwise they are printed by the node.declaration
+ options.locStart(node, {
+ ignoreDecorators: true
+ }) > options.locStart(node.declaration.decorators[0])) {
+ // Export declarations are responsible for printing any decorators
+ // that logically apply to node.declaration.
+ path.each(function (decoratorPath) {
+ var decorator = decoratorPath.getValue();
+ var prefix = decorator.type === "Decorator" ? "" : "@";
+ decorators.push(prefix, printPath(decoratorPath), hardline$9);
+ }, "declaration", "decorators");
+ } else {
+ // Nodes with decorators can't have parentheses, so we can avoid
+ // computing pathNeedsParens() except in this case.
+ needsParens = needsParens_1(path, options);
+ }
- return concat$11(parts);
+ var parts = [];
- case "AwaitExpression":
- return concat$11(["await ", path.call(print, "argument")]);
+ if (needsParens) {
+ parts.unshift("(");
+ }
- case "ImportSpecifier":
- if (n.importKind) {
- parts.push(path.call(print, "importKind"), " ");
- }
+ parts.push(linesWithoutParens);
- parts.push(path.call(print, "imported"));
+ if (needsParens) {
+ var _node = path.getValue();
- if (n.local && n.local.name !== n.imported.name) {
- parts.push(" as ", path.call(print, "local"));
+ if (hasFlowShorthandAnnotationComment$2(_node)) {
+ parts.push(" /*");
+ parts.push(_node.trailingComments[0].value.trimLeft());
+ parts.push("*/");
+ _node.trailingComments[0].printed = true;
}
- return concat$11(parts);
+ parts.push(")");
+ }
- case "ExportSpecifier":
- parts.push(path.call(print, "local"));
+ if (decorators.length > 0) {
+ return group$b(concat$d(decorators.concat(parts)));
+ }
- if (n.exported && n.exported.name !== n.local.name) {
- parts.push(" as ", path.call(print, "exported"));
- }
+ return concat$d(parts);
+ }
- return concat$11(parts);
+ function printDecorators(path, options, print) {
+ var node = path.getValue();
+ return group$b(concat$d([join$9(line$7, path.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators$1(node, options) ? hardline$9 : line$7]));
+ }
+ /**
+ * The following is the shared logic for
+ * ternary operators, namely ConditionalExpression
+ * and TSConditionalType
+ * @typedef {Object} OperatorOptions
+ * @property {() => Array<string | Doc>} beforeParts - Parts to print before the `?`.
+ * @property {(breakClosingParen: boolean) => Array<string | Doc>} afterParts - Parts to print after the conditional expression.
+ * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.
+ * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType".
+ * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent".
+ * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate".
+ * @property {string} testNodePropertyName - The property at which the test node can be found on the main node, eg "test".
+ * @property {boolean} breakNested - Whether to break all nested ternaries when one breaks.
+ * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node.
+ * @param {Options} options - Prettier options
+ * @param {Function} print - Print function to call recursively
+ * @param {OperatorOptions} operatorOptions
+ * @returns Doc
+ */
- case "ImportNamespaceSpecifier":
- parts.push("* as ");
- parts.push(path.call(print, "local"));
- return concat$11(parts);
- case "ImportDefaultSpecifier":
- return path.call(print, "local");
+ function printTernaryOperator(path, options, print, operatorOptions) {
+ var node = path.getValue();
+ var testNode = node[operatorOptions.testNodePropertyName];
+ var consequentNode = node[operatorOptions.consequentNodePropertyName];
+ var alternateNode = node[operatorOptions.alternateNodePropertyName];
+ var parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode".
+ // See tests/jsx/conditional-expression.js for more info.
- case "TSExportAssignment":
- return concat$11(["export = ", path.call(print, "expression"), semi]);
+ var jsxMode = false;
+ var parent = path.getParentNode();
+ var forceNoIndent = parent.type === operatorOptions.conditionalNodeType; // Find the outermost non-ConditionalExpression parent, and the outermost
+ // ConditionalExpression parent. We'll use these to determine if we should
+ // print in JSX mode.
- case "ExportDefaultDeclaration":
- case "ExportNamedDeclaration":
- return printExportDeclaration(path, options, print);
+ var currentParent;
+ var previousParent;
+ var i = 0;
- case "ExportAllDeclaration":
- parts.push("export ");
+ do {
+ previousParent = currentParent || node;
+ currentParent = path.getParentNode(i);
+ i++;
+ } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType);
- if (n.exportKind === "type") {
- parts.push("type ");
- }
+ var firstNonConditionalParent = currentParent || parent;
+ var lastConditionalParent = previousParent;
- parts.push("* from ", path.call(print, "source"), semi);
- return concat$11(parts);
+ if (operatorOptions.shouldCheckJsx && (isJSXNode$1(testNode) || isJSXNode$1(consequentNode) || isJSXNode$1(alternateNode) || conditionalExpressionChainContainsJSX$1(lastConditionalParent))) {
+ jsxMode = true;
+ forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in
+ // parens when using ?: within JSX, because the parens are analogous to
+ // curly braces in an if statement.
- case "ExportNamespaceSpecifier":
- case "ExportDefaultSpecifier":
- return path.call(print, "exported");
+ var wrap = function wrap(doc) {
+ return concat$d([ifBreak$6("(", ""), indent$7(concat$d([softline$6, doc])), softline$6, ifBreak$6(")", "")]);
+ }; // The only things we don't wrap are:
+ // * Nested conditional expressions in alternates
+ // * null
- case "ImportDeclaration":
- {
- parts.push("import ");
- if (n.importKind && n.importKind !== "value") {
- parts.push(n.importKind + " ");
- }
+ var isNull = function isNull(node) {
+ return node.type === "NullLiteral" || node.type === "Literal" && node.value === null;
+ };
- var standalones = [];
- var grouped = [];
+ parts.push(" ? ", isNull(consequentNode) ? path.call(print, operatorOptions.consequentNodePropertyName) : wrap(path.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNull(alternateNode) ? path.call(print, operatorOptions.alternateNodePropertyName) : wrap(path.call(print, operatorOptions.alternateNodePropertyName)));
+ } else {
+ // normal mode
+ var part = concat$d([line$7, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", "(") : "", align$1(2, path.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6("", ")") : "", line$7, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path.call(print, operatorOptions.alternateNodePropertyName))]);
+ parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node ? part : options.useTabs ? dedent$2(indent$7(part)) : align$1(Math.max(0, options.tabWidth - 2), part));
+ } // We want a whole chain of ConditionalExpressions to all
+ // break if any of them break. That means we should only group around the
+ // outer-most ConditionalExpression.
- if (n.specifiers && n.specifiers.length > 0) {
- path.each(function (specifierPath) {
- var value = specifierPath.getValue();
- if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") {
- standalones.push(print(specifierPath));
- } else {
- grouped.push(print(specifierPath));
- }
- }, "specifiers");
+ var maybeGroup = function maybeGroup(doc) {
+ return operatorOptions.breakNested ? parent === firstNonConditionalParent ? group$b(doc) : doc : group$b(doc);
+ }; // Break the closing paren to keep the chain right after it:
+ // (a
+ // ? b
+ // : c
+ // ).call()
- if (standalones.length > 0) {
- parts.push(join$7(", ", standalones));
- }
- if (standalones.length > 0 && grouped.length > 0) {
- parts.push(", ");
- }
+ var breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression" || parent.type === "NGPipeExpression" && parent.left === node && operatorOptions.breakNested) && !parent.computed;
+ return maybeGroup(concat$d([].concat(function (testDoc) {
+ return (
+ /**
+ * a
+ * ? b
+ * : multiline
+ * test
+ * node
+ * ^^ align(2)
+ * ? d
+ * : e
+ */
+ parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc
+ );
+ }(concat$d(operatorOptions.beforeParts())), forceNoIndent ? concat$d(parts) : indent$7(concat$d(parts)), operatorOptions.afterParts(breakClosingParen))));
+ }
- if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) {
- return node.comments;
- })) {
- parts.push(concat$11(["{", options.bracketSpacing ? " " : "", concat$11(grouped), options.bracketSpacing ? " " : "", "}"]));
- } else if (grouped.length >= 1) {
- parts.push(group$10(concat$11(["{", indent$6(concat$11([options.bracketSpacing ? line$8 : softline$5, join$7(concat$11([",", line$8]), grouped)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$8 : softline$5, "}"])));
- }
+ function printPathNoParens(path, options, print, args) {
+ var n = path.getValue();
+ var semi = options.semi ? ";" : "";
- parts.push(" from ");
- } else if (n.importKind && n.importKind === "type" || // import {} from 'x'
- /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) {
- parts.push("{} from ");
- }
+ if (!n) {
+ return "";
+ }
- parts.push(path.call(print, "source"), semi);
- return concat$11(parts);
- }
+ if (typeof n === "string") {
+ return n;
+ }
- case "Import":
- return "import";
+ var htmlBinding = printHtmlBinding$1(path, options, print);
- case "TSModuleBlock":
- case "BlockStatement":
- {
- var naked = path.call(function (bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body");
- var hasContent = n.body.find(function (node) {
- return node.type !== "EmptyStatement";
- });
- var hasDirectives = n.directives && n.directives.length > 0;
+ if (htmlBinding) {
+ return htmlBinding;
+ }
- var _parent3 = path.getParentNode();
+ var parts = [];
- var _parentParent = path.getParentNode(1);
+ switch (n.type) {
+ case "JsExpressionRoot":
+ return path.call(print, "node");
- if (!hasContent && !hasDirectives && !hasDanglingComments(n) && (_parent3.type === "ArrowFunctionExpression" || _parent3.type === "FunctionExpression" || _parent3.type === "FunctionDeclaration" || _parent3.type === "ObjectMethod" || _parent3.type === "ClassMethod" || _parent3.type === "ClassPrivateMethod" || _parent3.type === "ForStatement" || _parent3.type === "WhileStatement" || _parent3.type === "DoWhileStatement" || _parent3.type === "DoExpression" || _parent3.type === "CatchClause" && !_parentParent.finalizer || _parent3.type === "TSModuleDeclaration")) {
- return "{}";
+ case "JsonRoot":
+ return concat$d([path.call(print, "node"), hardline$9]);
+
+ case "File":
+ // Print @babel/parser's InterpreterDirective here so that
+ // leading comments on the `Program` node get printed after the hashbang.
+ if (n.program && n.program.interpreter) {
+ parts.push(path.call(function (programPath) {
+ return programPath.call(print, "interpreter");
+ }, "program"));
}
- parts.push("{"); // Babel 6
+ parts.push(path.call(print, "program"));
+ return concat$d(parts);
- if (hasDirectives) {
+ case "Program":
+ // Babel 6
+ if (n.directives) {
path.each(function (childPath) {
- parts.push(indent$6(concat$11([hardline$8, print(childPath), semi])));
+ parts.push(print(childPath), semi, hardline$9);
if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) {
- parts.push(hardline$8);
+ parts.push(hardline$9);
}
}, "directives");
}
- if (hasContent) {
- parts.push(indent$6(concat$11([hardline$8, naked])));
+ parts.push(path.call(function (bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body"));
+ parts.push(comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true)); // Only force a trailing newline if there were any contents.
+
+ if (n.body.length || n.comments) {
+ parts.push(hardline$9);
}
- parts.push(comments.printDanglingComments(path, options));
- parts.push(hardline$8, "}");
- return concat$11(parts);
- }
+ return concat$d(parts);
+ // Babel extension.
- case "ReturnStatement":
- parts.push("return");
+ case "EmptyStatement":
+ return "";
- if (n.argument) {
- if (returnArgumentHasLeadingComment(options, n.argument)) {
- parts.push(concat$11([" (", indent$6(concat$11([hardline$8, path.call(print, "argument")])), hardline$8, ")"]));
- } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression" || n.argument.type === "SequenceExpression") {
- parts.push(group$10(concat$11([ifBreak$6(" (", " "), indent$6(concat$11([softline$5, path.call(print, "argument")])), softline$5, ifBreak$6(")")])));
- } else {
- parts.push(" ", path.call(print, "argument"));
+ case "ExpressionStatement":
+ // Detect Flow-parsed directives
+ if (n.directive) {
+ return concat$d([nodeStr(n.expression, options, true), semi]);
}
- }
- if (hasDanglingComments(n)) {
- parts.push(" ", comments.printDanglingComments(path, options,
- /* sameIndent */
- true));
- }
+ if (options.parser === "__vue_event_binding") {
+ var parent = path.getParentNode();
- parts.push(semi);
- return concat$11(parts);
+ if (parent.type === "Program" && parent.body.length === 1 && parent.body[0] === n) {
+ return concat$d([path.call(print, "expression"), isVueEventBindingExpression$3(n.expression) ? ";" : ""]);
+ }
+ } // Do not append semicolon after the only JSX element in a program
- case "NewExpression":
- case "OptionalCallExpression":
- case "CallExpression":
- {
- var isNew = n.type === "NewExpression";
- var optional = printOptionalToken(path);
-
- if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style
- // define calls, as a unit.
- // e.g. `define(["some/lib", (lib) => {`
- !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || // Template literals as single arguments
- n.arguments.length === 1 && isTemplateOnItsOwnLine(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line
- // e.g. `it('long name', () => {`
- !isNew && isTestCall(n, path.getParentNode())) {
- return concat$11([isNew ? "new " : "", path.call(print, "callee"), optional, printFunctionTypeParameters(path, options, print), concat$11(["(", join$7(", ", path.map(print, "arguments")), ")"])]);
- } // Inline Flow annotation comments following Identifiers in Call nodes need to
- // stay with the Identifier. For example:
- //
- // foo /*:: <SomeGeneric> */(bar);
- //
- // Here, we ensure that such comments stay between the Identifier and the Callee.
+ return concat$d([path.call(print, "expression"), isTheOnlyJSXElementInMarkdown$1(options, path) ? "" : semi]);
+ // Babel extension.
- var isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment(n.callee.trailingComments);
+ case "ParenthesizedExpression":
+ return concat$d(["(", path.call(print, "expression"), ")"]);
- if (isIdentifierWithFlowAnnotation) {
- n.callee.trailingComments[0].printed = true;
- } // We detect calls on member lookups and possibly print them in a
- // special chain format. See `printMemberChain` for more info.
+ case "AssignmentExpression":
+ return printAssignment(n.left, path.call(print, "left"), concat$d([" ", n.operator]), n.right, path.call(print, "right"), options);
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "NGPipeExpression":
+ {
+ var _parent = path.getParentNode();
+
+ var parentParent = path.getParentNode(1);
+ var isInsideParenthesis = n !== _parent.body && (_parent.type === "IfStatement" || _parent.type === "WhileStatement" || _parent.type === "SwitchStatement" || _parent.type === "DoWhileStatement");
+
+ var _parts = printBinaryishExpressions(path, print, options,
+ /* isNested */
+ false, isInsideParenthesis); // if (
+ // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft
+ // ) {
+ //
+ // looks super weird, we want to break the children if the parent breaks
+ //
+ // if (
+ // this.hasPlugin("dynamicImports") &&
+ // this.lookahead().type === tt.parenLeft
+ // ) {
+
+
+ if (isInsideParenthesis) {
+ return concat$d(_parts);
+ } // Break between the parens in
+ // unaries or in a member or specific call expression, i.e.
+ //
+ // (
+ // a &&
+ // b &&
+ // c
+ // ).call()
+
+
+ if ((_parent.type === "CallExpression" || _parent.type === "OptionalCallExpression") && _parent.callee === n || _parent.type === "UnaryExpression" || (_parent.type === "MemberExpression" || _parent.type === "OptionalMemberExpression") && !_parent.computed) {
+ return group$b(concat$d([indent$7(concat$d([softline$6, concat$d(_parts)])), softline$6]));
+ } // Avoid indenting sub-expressions in some cases where the first sub-expression is already
+ // indented accordingly. We should indent sub-expressions where the first case isn't indented.
+
+
+ var shouldNotIndent = _parent.type === "ReturnStatement" || _parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.type !== "NGPipeExpression" && (_parent.type === "NGRoot" && options.parser === "__ng_binding" || _parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === _parent.body && _parent.type === "ArrowFunctionExpression" || n !== _parent.body && _parent.type === "ForStatement" || _parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "CallExpression" && parentParent.type !== "OptionalCallExpression";
+ var shouldIndentIfInlining = _parent.type === "AssignmentExpression" || _parent.type === "VariableDeclarator" || _parent.type === "ClassProperty" || _parent.type === "TSAbstractClassProperty" || _parent.type === "ClassPrivateProperty" || _parent.type === "ObjectProperty" || _parent.type === "Property";
+ var samePrecedenceSubExpression = isBinaryish$1(n.left) && shouldFlatten$1(n.operator, n.left.operator);
+
+ if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) {
+ return group$b(concat$d(_parts));
+ }
+ if (_parts.length === 0) {
+ return "";
+ } // If the right part is a JSX node, we include it in a separate group to
+ // prevent it breaking the whole chain, so we can print the expression like:
+ //
+ // foo && bar && (
+ // <Foo>
+ // <Bar />
+ // </Foo>
+ // )
+
+
+ var hasJSX = isJSXNode$1(n.right);
+ var rest = concat$d(hasJSX ? _parts.slice(1, -1) : _parts.slice(1));
+ var groupId = Symbol("logicalChain-" + ++uid);
+ var chain = group$b(concat$d([// Don't include the initial expression in the indentation
+ // level. The first item is guaranteed to be the first
+ // left-most expression.
+ _parts.length > 0 ? _parts[0] : "", indent$7(rest)]), {
+ id: groupId
+ });
+
+ if (!hasJSX) {
+ return chain;
+ }
- if (!isNew && isMemberish(n.callee)) {
- return printMemberChain(path, options, print);
+ var jsxPart = getLast$2(_parts);
+ return group$b(concat$d([chain, ifBreak$6(indent$7(jsxPart), jsxPart, {
+ groupId: groupId
+ })]));
}
- return concat$11([isNew ? "new " : "", path.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? "/*:: ".concat(n.callee.trailingComments[0].value.substring(2).trim(), " */") : "", printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]);
- }
+ case "AssignmentPattern":
+ return concat$d([path.call(print, "left"), " = ", path.call(print, "right")]);
- case "TSInterfaceDeclaration":
- if (isNodeStartingWithDeclare(n, options)) {
- parts.push("declare ");
- }
+ case "TSTypeAssertion":
+ {
+ var shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression");
+ var castGroup = group$b(concat$d(["<", indent$7(concat$d([softline$6, path.call(print, "typeAnnotation")])), softline$6, ">"]));
+ var exprContents = concat$d([ifBreak$6("("), indent$7(concat$d([softline$6, path.call(print, "expression")])), softline$6, ifBreak$6(")")]);
- parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path, options, print), "interface ", path.call(print, "id"), n.typeParameters ? path.call(print, "typeParameters") : "", " ");
+ if (shouldBreakAfterCast) {
+ return conditionalGroup$1([concat$d([castGroup, path.call(print, "expression")]), concat$d([castGroup, group$b(exprContents, {
+ shouldBreak: true
+ })]), concat$d([castGroup, path.call(print, "expression")])]);
+ }
- if (n.extends && n.extends.length) {
- parts.push(group$10(indent$6(concat$11([softline$5, "extends ", (n.extends.length === 1 ? identity$1 : indent$6)(join$7(concat$11([",", line$8]), path.map(print, "extends"))), " "]))));
- }
+ return group$b(concat$d([castGroup, path.call(print, "expression")]));
+ }
- parts.push(path.call(print, "body"));
- return concat$11(parts);
+ case "OptionalMemberExpression":
+ case "MemberExpression":
+ {
+ var _parent2 = path.getParentNode();
- case "ObjectTypeInternalSlot":
- return concat$11([n.static ? "static " : "", "[[", path.call(print, "id"), "]]", printOptionalToken(path), n.method ? "" : ": ", path.call(print, "value")]);
+ var firstNonMemberParent;
+ var i = 0;
- case "ObjectExpression":
- case "ObjectPattern":
- case "ObjectTypeAnnotation":
- case "TSInterfaceBody":
- case "TSTypeLiteral":
- {
- var propertiesField;
+ do {
+ firstNonMemberParent = path.getParentNode(i);
+ i++;
+ } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression"));
- if (n.type === "TSTypeLiteral") {
- propertiesField = "members";
- } else if (n.type === "TSInterfaceBody") {
- propertiesField = "body";
- } else {
- propertiesField = "properties";
+ var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent2.type !== "MemberExpression" && _parent2.type !== "OptionalMemberExpression";
+ return concat$d([path.call(print, "object"), shouldInline ? printMemberLookup(path, options, print) : group$b(indent$7(concat$d([softline$6, printMemberLookup(path, options, print)])))]);
}
- var isTypeAnnotation = n.type === "ObjectTypeAnnotation";
- var fields = [];
+ case "MetaProperty":
+ return concat$d([path.call(print, "meta"), ".", path.call(print, "property")]);
- if (isTypeAnnotation) {
- fields.push("indexers", "callProperties", "internalSlots");
+ case "BindExpression":
+ if (n.object) {
+ parts.push(path.call(print, "object"));
}
- fields.push(propertiesField);
- var firstProperty = fields.map(function (field) {
- return n[field][0];
- }).sort(function (a, b) {
- return options.locStart(a) - options.locStart(b);
- })[0];
-
- var _parent4 = path.getParentNode(0);
-
- var isFlowInterfaceLikeBody = isTypeAnnotation && _parent4 && (_parent4.type === "InterfaceDeclaration" || _parent4.type === "DeclareInterface" || _parent4.type === "DeclareClass") && path.getName() === "body";
- var shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && _parent4.type !== "FunctionDeclaration" && _parent4.type !== "FunctionExpression" && _parent4.type !== "ArrowFunctionExpression" && _parent4.type !== "AssignmentPattern" && _parent4.type !== "CatchClause" && n.properties.some(function (property) {
- return property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern");
- }) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$1(options.originalText, options.locStart(n), options.locStart(firstProperty));
- var separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$6(semi, ";") : ",";
- var leftBrace = n.exact ? "{|" : "{";
- var rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be
- // interleaved in the source code. So we need to reorder them before
- // printing them.
+ parts.push(group$b(indent$7(concat$d([softline$6, printBindExpressionCallee(path, options, print)]))));
+ return concat$d(parts);
- var propsAndLoc = [];
- fields.forEach(function (field) {
- path.each(function (childPath) {
- var node = childPath.getValue();
- propsAndLoc.push({
- node: node,
- printed: print(childPath),
- loc: options.locStart(node)
- });
- }, field);
- });
- var separatorParts = [];
- var props = propsAndLoc.sort(function (a, b) {
- return a.loc - b.loc;
- }).map(function (prop) {
- var result = concat$11(separatorParts.concat(group$10(prop.printed)));
- separatorParts = [separator, line$8];
+ case "Identifier":
+ {
+ return concat$d([n.name, printOptionalToken(path), printTypeAnnotation(path, options, print)]);
+ }
- if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature" || prop.node.type === "TSConstructSignatureDeclaration") && hasNodeIgnoreComment$1(prop.node)) {
- separatorParts.shift();
- }
+ case "V8IntrinsicIdentifier":
+ return concat$d(["%", n.name]);
- if (isNextLineEmpty$4(options.originalText, prop.node, options)) {
- separatorParts.push(hardline$8);
- }
+ case "SpreadElement":
+ case "SpreadElementPattern":
+ case "RestProperty":
+ case "SpreadProperty":
+ case "SpreadPropertyPattern":
+ case "RestElement":
+ case "ObjectTypeSpreadProperty":
+ return concat$d(["...", path.call(print, "argument"), printTypeAnnotation(path, options, print)]);
- return result;
- });
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ parts.push(printFunctionDeclaration(path, print, options));
- if (n.inexact) {
- props.push(concat$11(separatorParts.concat(group$10("..."))));
+ if (!n.body) {
+ parts.push(semi);
}
- var lastElem = getLast$3(n[propertiesField]);
- var canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$1(lastElem) || n.inexact));
- var content;
+ return concat$d(parts);
- if (props.length === 0 && !n.typeAnnotation) {
- if (!hasDanglingComments(n)) {
- return concat$11([leftBrace, rightBrace]);
+ case "ArrowFunctionExpression":
+ {
+ if (n.async) {
+ parts.push("async ");
}
- content = group$10(concat$11([leftBrace, comments.printDanglingComments(path, options), softline$5, rightBrace, printOptionalToken(path)]));
- } else {
- content = concat$11([leftBrace, indent$6(concat$11([options.bracketSpacing ? line$8 : softline$5, concat$11(props)])), ifBreak$6(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma$1(options)) ? separator : ""), concat$11([options.bracketSpacing ? line$8 : softline$5, rightBrace]), printOptionalToken(path), printTypeAnnotation(path, options, print)]);
- } // If we inline the object as first argument of the parent, we don't want
- // to create another group so that the object breaks before the return
- // type
+ if (shouldPrintParamsWithoutParens(path, options)) {
+ parts.push(path.call(print, "params", 0));
+ } else {
+ parts.push(group$b(concat$d([printFunctionParams(path, print, options,
+ /* expandLast */
+ args && (args.expandLastArg || args.expandFirstArg),
+ /* printTypeParams */
+ true), printReturnType(path, print, options)])));
+ }
+ var dangling = comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true, function (comment) {
+ var nextCharacter = getNextNonSpaceNonCommentCharacterIndex$2(options.originalText, comment, options);
+ return options.originalText.substr(nextCharacter, 2) === "=>";
+ });
- var parentParentParent = path.getParentNode(2);
+ if (dangling) {
+ parts.push(" ", dangling);
+ }
- if (n.type === "ObjectPattern" && _parent4 && shouldHugArguments(_parent4) && _parent4.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) {
- return content;
- }
+ parts.push(" =>");
+ var body = path.call(function (bodyPath) {
+ return print(bodyPath, args);
+ }, "body"); // We want to always keep these types of nodes on the same line
+ // as the arrow.
- return group$10(content, {
- shouldBreak: shouldBreak
- });
- }
- // Babel 6
+ if (!hasLeadingOwnLineComment$1(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode$1(n.body) || isTemplateOnItsOwnLine$1(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) {
+ return group$b(concat$d([concat$d(parts), " ", body]));
+ } // We handle sequence expressions as the body of arrows specially,
+ // so that the required parentheses end up on their own lines.
- case "ObjectProperty": // Non-standard AST node type.
- case "Property":
- if (n.method || n.kind === "get" || n.kind === "set") {
- return printMethod(path, options, print);
- }
+ if (n.body.type === "SequenceExpression") {
+ return group$b(concat$d([concat$d(parts), group$b(concat$d([" (", indent$7(concat$d([softline$6, body])), softline$6, ")"]))]));
+ } // if the arrow function is expanded as last argument, we are adding a
+ // level of indentation and need to add a softline to align the closing )
+ // with the opening (, or if it's inside a JSXExpression (e.g. an attribute)
+ // we should align the expression's closing } with the line with the opening {.
- if (n.shorthand) {
- parts.push(path.call(print, "value"));
- } else {
- var printedLeft;
- if (n.computed) {
- printedLeft = concat$11(["[", path.call(print, "key"), "]"]);
- } else {
- printedLeft = printPropertyKey(path, options, print);
+ var shouldAddSoftLine = (args && args.expandLastArg || path.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length);
+ var printTrailingComma = args && args.expandLastArg && shouldPrintComma$1(options, "all"); // In order to avoid confusion between
+ // a => a ? a : a
+ // a <= a ? a : a
+
+ var shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body,
+ /* forbidFunctionAndClass */
+ false);
+ return group$b(concat$d([concat$d(parts), group$b(concat$d([indent$7(concat$d([line$7, shouldAddParens ? ifBreak$6("", "(") : "", body, shouldAddParens ? ifBreak$6("", ")") : ""])), shouldAddSoftLine ? concat$d([ifBreak$6(printTrailingComma ? "," : ""), softline$6]) : ""]))]));
}
- parts.push(printAssignment(n.key, printedLeft, ":", n.value, path.call(print, "value"), options));
- }
+ case "YieldExpression":
+ parts.push("yield");
- return concat$11(parts);
- // Babel 6
+ if (n.delegate) {
+ parts.push("*");
+ }
- case "ClassMethod":
- case "ClassPrivateMethod":
- if (n.decorators && n.decorators.length !== 0) {
- parts.push(printDecorators(path, options, print));
- }
+ if (n.argument) {
+ parts.push(" ", path.call(print, "argument"));
+ }
- if (n.static) {
- parts.push("static ");
- }
+ return concat$d(parts);
- parts = parts.concat(printObjectMethod(path, options, print));
- return concat$11(parts);
- // Babel 6
+ case "AwaitExpression":
+ {
+ parts.push("await ", path.call(print, "argument"));
- case "ObjectMethod":
- return printObjectMethod(path, options, print);
+ var _parent3 = path.getParentNode();
- case "Decorator":
- return concat$11(["@", path.call(print, "expression"), path.call(print, "callee")]);
+ if ((_parent3.type === "CallExpression" || _parent3.type === "OptionalCallExpression") && _parent3.callee === n || (_parent3.type === "MemberExpression" || _parent3.type === "OptionalMemberExpression") && _parent3.object === n) {
+ return group$b(concat$d([indent$7(concat$d([softline$6, concat$d(parts)])), softline$6]));
+ }
- case "ArrayExpression":
- case "ArrayPattern":
- if (n.elements.length === 0) {
- if (!hasDanglingComments(n)) {
- parts.push("[]");
- } else {
- parts.push(group$10(concat$11(["[", comments.printDanglingComments(path, options), softline$5, "]"])));
+ return concat$d(parts);
}
- } else {
- var _lastElem = getLast$3(n.elements);
-
- var canHaveTrailingComma = !(_lastElem && _lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which
- // changes its length based on the number of commas. The algorithm
- // is that if the last argument is null, we need to force insert
- // a comma to ensure JavaScript recognizes it.
- // [,].length === 1
- // [1,].length === 1
- // [1,,].length === 2
- //
- // Note that getLast returns null if the array is empty, but
- // we already check for an empty array just above so we are safe
- var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null;
- parts.push(group$10(concat$11(["[", indent$6(concat$11([softline$5, printArrayItems(path, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$6(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma$1(options) ? "," : ""), comments.printDanglingComments(path, options,
- /* sameIndent */
- true), softline$5, "]"])));
- }
+ case "ImportSpecifier":
+ if (n.importKind) {
+ parts.push(path.call(print, "importKind"), " ");
+ }
- parts.push(printOptionalToken(path), printTypeAnnotation(path, options, print));
- return concat$11(parts);
+ parts.push(path.call(print, "imported"));
- case "SequenceExpression":
- {
- var _parent5 = path.getParentNode(0);
-
- if (_parent5.type === "ExpressionStatement" || _parent5.type === "ForStatement") {
- // For ExpressionStatements and for-loop heads, which are among
- // the few places a SequenceExpression appears unparenthesized, we want
- // to indent expressions after the first.
- var _parts2 = [];
- path.each(function (p) {
- if (p.getName() === 0) {
- _parts2.push(print(p));
- } else {
- _parts2.push(",", indent$6(concat$11([line$8, print(p)])));
- }
- }, "expressions");
- return group$10(concat$11(_parts2));
+ if (n.local && n.local.name !== n.imported.name) {
+ parts.push(" as ", path.call(print, "local"));
}
- return group$10(concat$11([join$7(concat$11([",", line$8]), path.map(print, "expressions"))]));
- }
+ return concat$d(parts);
- case "ThisExpression":
- return "this";
+ case "ExportSpecifier":
+ parts.push(path.call(print, "local"));
- case "Super":
- return "super";
+ if (n.exported && n.exported.name !== n.local.name) {
+ parts.push(" as ", path.call(print, "exported"));
+ }
- case "NullLiteral":
- // Babel 6 Literal split
- return "null";
+ return concat$d(parts);
- case "RegExpLiteral":
- // Babel 6 Literal split
- return printRegex(n);
+ case "ImportNamespaceSpecifier":
+ parts.push("* as ");
+ parts.push(path.call(print, "local"));
+ return concat$d(parts);
- case "NumericLiteral":
- // Babel 6 Literal split
- return printNumber$2(n.extra.raw);
+ case "ImportDefaultSpecifier":
+ return path.call(print, "local");
- case "BigIntLiteral":
- return concat$11([printNumber$2(n.extra ? n.extra.rawValue : // TypeScript
- n.value), "n"]);
+ case "TSExportAssignment":
+ return concat$d(["export = ", path.call(print, "expression"), semi]);
- case "BooleanLiteral": // Babel 6 Literal split
+ case "ExportDefaultDeclaration":
+ case "ExportNamedDeclaration":
+ return printExportDeclaration(path, options, print);
- case "StringLiteral": // Babel 6 Literal split
+ case "ExportAllDeclaration":
+ parts.push("export ");
- case "Literal":
- {
- if (n.regex) {
- return printRegex(n.regex);
+ if (n.exportKind === "type") {
+ parts.push("type ");
}
- if (typeof n.value === "number") {
- return printNumber$2(n.raw);
- }
+ parts.push("* from ", path.call(print, "source"), semi);
+ return concat$d(parts);
- if (typeof n.value !== "string") {
- return "" + n.value;
- } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
- // See corresponding workaround in needs-parens.js
+ case "ExportNamespaceSpecifier":
+ case "ExportDefaultSpecifier":
+ return path.call(print, "exported");
+ case "ImportDeclaration":
+ {
+ parts.push("import ");
- var grandParent = path.getParentNode(1);
- var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement");
- return nodeStr(n, options, isTypeScriptDirective);
- }
+ if (n.importKind && n.importKind !== "value") {
+ parts.push(n.importKind + " ");
+ }
+
+ var standalones = [];
+ var grouped = [];
+
+ if (n.specifiers && n.specifiers.length > 0) {
+ path.each(function (specifierPath) {
+ var value = specifierPath.getValue();
- case "Directive":
- return path.call(print, "value");
- // Babel 6
+ if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") {
+ standalones.push(print(specifierPath));
+ } else {
+ grouped.push(print(specifierPath));
+ }
+ }, "specifiers");
- case "DirectiveLiteral":
- return nodeStr(n, options);
+ if (standalones.length > 0) {
+ parts.push(join$9(", ", standalones));
+ }
- case "UnaryExpression":
- parts.push(n.operator);
+ if (standalones.length > 0 && grouped.length > 0) {
+ parts.push(", ");
+ }
- if (/[a-z]$/.test(n.operator)) {
- parts.push(" ");
- }
+ if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) {
+ return node.comments;
+ })) {
+ parts.push(concat$d(["{", options.bracketSpacing ? " " : "", concat$d(grouped), options.bracketSpacing ? " " : "", "}"]));
+ } else if (grouped.length >= 1) {
+ parts.push(group$b(concat$d(["{", indent$7(concat$d([options.bracketSpacing ? line$7 : softline$6, join$9(concat$d([",", line$7]), grouped)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$7 : softline$6, "}"])));
+ }
- parts.push(path.call(print, "argument"));
- return concat$11(parts);
+ parts.push(" from ");
+ } else if (n.importKind && n.importKind === "type" || // import {} from 'x'
+ /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) {
+ parts.push("{} from ");
+ }
- case "UpdateExpression":
- parts.push(path.call(print, "argument"), n.operator);
+ parts.push(path.call(print, "source"), semi);
+ return concat$d(parts);
+ }
- if (n.prefix) {
- parts.reverse();
- }
+ case "Import":
+ return "import";
- return concat$11(parts);
+ case "TSModuleBlock":
+ case "BlockStatement":
+ {
+ var naked = path.call(function (bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body");
+ var hasContent = n.body.find(function (node) {
+ return node.type !== "EmptyStatement";
+ });
+ var hasDirectives = n.directives && n.directives.length > 0;
- case "ConditionalExpression":
- return printTernaryOperator(path, options, print, {
- beforeParts: function beforeParts() {
- return [path.call(print, "test")];
- },
- afterParts: function afterParts(breakClosingParen) {
- return [breakClosingParen ? softline$5 : ""];
- },
- shouldCheckJsx: true,
- conditionalNodeType: "ConditionalExpression",
- consequentNodePropertyName: "consequent",
- alternateNodePropertyName: "alternate",
- testNodePropertyName: "test",
- breakNested: true
- });
+ var _parent4 = path.getParentNode();
- case "VariableDeclaration":
- {
- var printed = path.map(function (childPath) {
- return print(childPath);
- }, "declarations"); // We generally want to terminate all variable declarations with a
- // semicolon, except when they in the () part of for loops.
-
- var parentNode = path.getParentNode();
- var isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement";
- var hasValue = n.declarations.some(function (decl) {
- return decl.init;
- });
- var firstVariable;
+ var _parentParent = path.getParentNode(1);
+
+ if (!hasContent && !hasDirectives && !hasDanglingComments$1(n) && (_parent4.type === "ArrowFunctionExpression" || _parent4.type === "FunctionExpression" || _parent4.type === "FunctionDeclaration" || _parent4.type === "ObjectMethod" || _parent4.type === "ClassMethod" || _parent4.type === "ClassPrivateMethod" || _parent4.type === "ForStatement" || _parent4.type === "WhileStatement" || _parent4.type === "DoWhileStatement" || _parent4.type === "DoExpression" || _parent4.type === "CatchClause" && !_parentParent.finalizer || _parent4.type === "TSModuleDeclaration")) {
+ return "{}";
+ }
+
+ parts.push("{"); // Babel 6
+
+ if (hasDirectives) {
+ path.each(function (childPath) {
+ parts.push(indent$7(concat$d([hardline$9, print(childPath), semi])));
+
+ if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) {
+ parts.push(hardline$9);
+ }
+ }, "directives");
+ }
+
+ if (hasContent) {
+ parts.push(indent$7(concat$d([hardline$9, naked])));
+ }
- if (printed.length === 1 && !n.declarations[0].comments) {
- firstVariable = printed[0];
- } else if (printed.length > 0) {
- // Indent first var to comply with eslint one-var rule
- firstVariable = indent$6(printed[0]);
+ parts.push(comments.printDanglingComments(path, options));
+ parts.push(hardline$9, "}");
+ return concat$d(parts);
}
- parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, firstVariable ? concat$11([" ", firstVariable]) : "", indent$6(concat$11(printed.slice(1).map(function (p) {
- return concat$11([",", hasValue && !isParentForLoop ? hardline$8 : line$8, p]);
- })))];
+ case "ReturnStatement":
+ parts.push("return");
- if (!(isParentForLoop && parentNode.body !== n)) {
- parts.push(semi);
+ if (n.argument) {
+ if (returnArgumentHasLeadingComment$1(options, n.argument)) {
+ parts.push(concat$d([" (", indent$7(concat$d([hardline$9, path.call(print, "argument")])), hardline$9, ")"]));
+ } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression" || n.argument.type === "SequenceExpression") {
+ parts.push(group$b(concat$d([ifBreak$6(" (", " "), indent$7(concat$d([softline$6, path.call(print, "argument")])), softline$6, ifBreak$6(")")])));
+ } else {
+ parts.push(" ", path.call(print, "argument"));
+ }
}
- return group$10(concat$11(parts));
- }
+ if (hasDanglingComments$1(n)) {
+ parts.push(" ", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
+ }
- case "TSTypeAliasDeclaration":
- {
+ parts.push(semi);
+ return concat$d(parts);
+
+ case "NewExpression":
+ case "OptionalCallExpression":
+ case "CallExpression":
+ {
+ var isNew = n.type === "NewExpression";
+ var optional = printOptionalToken(path);
+
+ if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style
+ // define calls, as a unit.
+ // e.g. `define(["some/lib", (lib) => {`
+ !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || // Template literals as single arguments
+ n.arguments.length === 1 && isTemplateOnItsOwnLine$1(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line
+ // e.g. `it('long name', () => {`
+ !isNew && isTestCall$1(n, path.getParentNode())) {
+ return concat$d([isNew ? "new " : "", path.call(print, "callee"), optional, printFunctionTypeParameters(path, options, print), concat$d(["(", join$9(", ", path.map(print, "arguments")), ")"])]);
+ } // Inline Flow annotation comments following Identifiers in Call nodes need to
+ // stay with the Identifier. For example:
+ //
+ // foo /*:: <SomeGeneric> */(bar);
+ //
+ // Here, we ensure that such comments stay between the Identifier and the Callee.
+
+
+ var isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment$1(n.callee.trailingComments);
+
+ if (isIdentifierWithFlowAnnotation) {
+ n.callee.trailingComments[0].printed = true;
+ } // We detect calls on member lookups and possibly print them in a
+ // special chain format. See `printMemberChain` for more info.
+
+
+ if (!isNew && isMemberish$1(n.callee)) {
+ return printMemberChain(path, options, print);
+ }
+
+ var contents = concat$d([isNew ? "new " : "", path.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? "/*:: ".concat(n.callee.trailingComments[0].value.substring(2).trim(), " */") : "", printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); // We group here when the callee is itself a call expression.
+ // See `isLongCurriedCallExpression` for more info.
+
+ if (isCallOrOptionalCallExpression$1(n.callee)) {
+ return group$b(contents);
+ }
+
+ return contents;
+ }
+
+ case "TSInterfaceDeclaration":
if (n.declare) {
parts.push("declare ");
}
- var _printed = printAssignmentRight(n.id, n.typeAnnotation, n.typeAnnotation && path.call(print, "typeAnnotation"), options);
+ parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path, options, print), "interface ", path.call(print, "id"), n.typeParameters ? path.call(print, "typeParameters") : "", " ");
- parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed, semi);
- return group$10(concat$11(parts));
- }
+ if (n.extends && n.extends.length) {
+ parts.push(group$b(indent$7(concat$d([softline$6, "extends ", (n.extends.length === 1 ? identity$2 : indent$7)(join$9(concat$d([",", line$7]), path.map(print, "extends"))), " "]))));
+ }
- case "VariableDeclarator":
- return printAssignment(n.id, path.call(print, "id"), " =", n.init, n.init && path.call(print, "init"), options);
+ parts.push(path.call(print, "body"));
+ return concat$d(parts);
- case "WithStatement":
- return group$10(concat$11(["with (", path.call(print, "object"), ")", adjustClause(n.body, path.call(print, "body"))]));
+ case "ObjectTypeInternalSlot":
+ return concat$d([n.static ? "static " : "", "[[", path.call(print, "id"), "]]", printOptionalToken(path), n.method ? "" : ": ", path.call(print, "value")]);
- case "IfStatement":
- {
- var con = adjustClause(n.consequent, path.call(print, "consequent"));
- var opening = group$10(concat$11(["if (", group$10(concat$11([indent$6(concat$11([softline$5, path.call(print, "test")])), softline$5])), ")", con]));
- parts.push(opening);
+ case "ObjectExpression":
+ case "ObjectPattern":
+ case "ObjectTypeAnnotation":
+ case "TSInterfaceBody":
+ case "TSTypeLiteral":
+ {
+ var propertiesField;
+
+ if (n.type === "TSTypeLiteral") {
+ propertiesField = "members";
+ } else if (n.type === "TSInterfaceBody") {
+ propertiesField = "body";
+ } else {
+ propertiesField = "properties";
+ }
- if (n.alternate) {
- var commentOnOwnLine = hasTrailingComment(n.consequent) && n.consequent.comments.some(function (comment) {
- return comment.trailing && !comments$3.isBlockComment(comment);
- }) || needsHardlineAfterDanglingComment(n);
- var elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine;
- parts.push(elseOnSameLine ? " " : hardline$8);
+ var isTypeAnnotation = n.type === "ObjectTypeAnnotation";
+ var fields = [];
- if (hasDanglingComments(n)) {
- parts.push(comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$8 : " ");
+ if (isTypeAnnotation) {
+ fields.push("indexers", "callProperties", "internalSlots");
}
- parts.push("else", group$10(adjustClause(n.alternate, path.call(print, "alternate"), n.alternate.type === "IfStatement")));
- }
+ fields.push(propertiesField);
+ var firstProperty = fields.map(function (field) {
+ return n[field][0];
+ }).sort(function (a, b) {
+ return options.locStart(a) - options.locStart(b);
+ })[0];
+
+ var _parent5 = path.getParentNode(0);
+
+ var isFlowInterfaceLikeBody = isTypeAnnotation && _parent5 && (_parent5.type === "InterfaceDeclaration" || _parent5.type === "DeclareInterface" || _parent5.type === "DeclareClass") && path.getName() === "body";
+ var shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && _parent5.type !== "FunctionDeclaration" && _parent5.type !== "FunctionExpression" && _parent5.type !== "ArrowFunctionExpression" && _parent5.type !== "ObjectMethod" && _parent5.type !== "ClassMethod" && _parent5.type !== "ClassPrivateMethod" && _parent5.type !== "AssignmentPattern" && _parent5.type !== "CatchClause" && n.properties.some(function (property) {
+ return property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern");
+ }) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$2(options.originalText, options.locStart(n), options.locStart(firstProperty));
+ var separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$6(semi, ";") : ",";
+ var leftBrace = n.exact ? "{|" : "{";
+ var rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be
+ // interleaved in the source code. So we need to reorder them before
+ // printing them.
+
+ var propsAndLoc = [];
+ fields.forEach(function (field) {
+ path.each(function (childPath) {
+ var node = childPath.getValue();
+ propsAndLoc.push({
+ node: node,
+ printed: print(childPath),
+ loc: options.locStart(node)
+ });
+ }, field);
+ });
+ var separatorParts = [];
+ var props = propsAndLoc.sort(function (a, b) {
+ return a.loc - b.loc;
+ }).map(function (prop) {
+ var result = concat$d(separatorParts.concat(group$b(prop.printed)));
+ separatorParts = [separator, line$7];
+
+ if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature" || prop.node.type === "TSConstructSignatureDeclaration") && hasNodeIgnoreComment$2(prop.node)) {
+ separatorParts.shift();
+ }
- return concat$11(parts);
- }
+ if (isNextLineEmpty$4(options.originalText, prop.node, options)) {
+ separatorParts.push(hardline$9);
+ }
- case "ForStatement":
- {
- var _body = adjustClause(n.body, path.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent.
- // Any comment positioned between the for statement and the parentheses
- // is going to be printed before the statement.
+ return result;
+ });
+ if (n.inexact) {
+ props.push(concat$d(separatorParts.concat(group$b("..."))));
+ }
- var _dangling = comments.printDanglingComments(path, options,
- /* sameLine */
- true);
+ var lastElem = getLast$2(n[propertiesField]);
+ var canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem) || n.inexact));
+ var content;
- var printedComments = _dangling ? concat$11([_dangling, softline$5]) : "";
+ if (props.length === 0) {
+ if (!hasDanglingComments$1(n)) {
+ return concat$d([leftBrace, rightBrace, printTypeAnnotation(path, options, print)]);
+ }
- if (!n.init && !n.test && !n.update) {
- return concat$11([printedComments, group$10(concat$11(["for (;;)", _body]))]);
- }
+ content = group$b(concat$d([leftBrace, comments.printDanglingComments(path, options), softline$6, rightBrace, printOptionalToken(path), printTypeAnnotation(path, options, print)]));
+ } else {
+ content = concat$d([leftBrace, indent$7(concat$d([options.bracketSpacing ? line$7 : softline$6, concat$d(props)])), ifBreak$6(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma$1(options)) ? separator : ""), concat$d([options.bracketSpacing ? line$7 : softline$6, rightBrace]), printOptionalToken(path), printTypeAnnotation(path, options, print)]);
+ } // If we inline the object as first argument of the parent, we don't want
+ // to create another group so that the object breaks before the return
+ // type
- return concat$11([printedComments, group$10(concat$11(["for (", group$10(concat$11([indent$6(concat$11([softline$5, path.call(print, "init"), ";", line$8, path.call(print, "test"), ";", line$8, path.call(print, "update")])), softline$5])), ")", _body]))]);
- }
- case "WhileStatement":
- return group$10(concat$11(["while (", group$10(concat$11([indent$6(concat$11([softline$5, path.call(print, "test")])), softline$5])), ")", adjustClause(n.body, path.call(print, "body"))]));
+ var parentParentParent = path.getParentNode(2);
- case "ForInStatement":
- // Note: esprima can't actually parse "for each (".
- return group$10(concat$11([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
+ if (n.type === "ObjectPattern" && _parent5 && shouldHugArguments(_parent5) && !n.decorators && _parent5.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) {
+ return content;
+ }
- case "ForOfStatement":
- case "ForAwaitStatement":
- {
- // Babel 7 removed ForAwaitStatement in favor of ForOfStatement
- // with `"await": true`:
- // https://github.com/estree/estree/pull/138
- var isAwait = n.type === "ForAwaitStatement" || n.await;
- return group$10(concat$11(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
- }
+ return group$b(content, {
+ shouldBreak: shouldBreak
+ });
+ }
+ // Babel 6
- case "DoWhileStatement":
- {
- var clause = adjustClause(n.body, path.call(print, "body"));
- var doBody = group$10(concat$11(["do", clause]));
- parts = [doBody];
+ case "ObjectProperty": // Non-standard AST node type.
- if (n.body.type === "BlockStatement") {
- parts.push(" ");
- } else {
- parts.push(hardline$8);
+ case "Property":
+ if (n.method || n.kind === "get" || n.kind === "set") {
+ return printMethod(path, options, print);
}
- parts.push("while (");
- parts.push(group$10(concat$11([indent$6(concat$11([softline$5, path.call(print, "test")])), softline$5])), ")", semi);
- return concat$11(parts);
- }
+ if (n.shorthand) {
+ parts.push(path.call(print, "value"));
+ } else {
+ parts.push(printAssignment(n.key, printPropertyKey(path, options, print), ":", n.value, path.call(print, "value"), options));
+ }
- case "DoExpression":
- return concat$11(["do ", path.call(print, "body")]);
+ return concat$d(parts);
+ // Babel 6
- case "BreakStatement":
- parts.push("break");
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ case "MethodDefinition":
+ case "TSAbstractMethodDefinition":
+ if (n.decorators && n.decorators.length !== 0) {
+ parts.push(printDecorators(path, options, print));
+ }
- if (n.label) {
- parts.push(" ", path.call(print, "label"));
- }
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
- parts.push(semi);
- return concat$11(parts);
+ if (n.static) {
+ parts.push("static ");
+ }
- case "ContinueStatement":
- parts.push("continue");
+ if (n.type === "TSAbstractMethodDefinition") {
+ parts.push("abstract ");
+ }
- if (n.label) {
- parts.push(" ", path.call(print, "label"));
- }
+ parts.push(printMethod(path, options, print));
+ return concat$d(parts);
- parts.push(semi);
- return concat$11(parts);
+ case "ObjectMethod":
+ return printMethod(path, options, print);
- case "LabeledStatement":
- if (n.body.type === "EmptyStatement") {
- return concat$11([path.call(print, "label"), ":;"]);
- }
+ case "Decorator":
+ return concat$d(["@", path.call(print, "expression"), path.call(print, "callee")]);
- return concat$11([path.call(print, "label"), ": ", path.call(print, "body")]);
+ case "ArrayExpression":
+ case "ArrayPattern":
+ if (n.elements.length === 0) {
+ if (!hasDanglingComments$1(n)) {
+ parts.push("[]");
+ } else {
+ parts.push(group$b(concat$d(["[", comments.printDanglingComments(path, options), softline$6, "]"])));
+ }
+ } else {
+ var _lastElem = getLast$2(n.elements);
- case "TryStatement":
- return concat$11(["try ", path.call(print, "block"), n.handler ? concat$11([" ", path.call(print, "handler")]) : "", n.finalizer ? concat$11([" finally ", path.call(print, "finalizer")]) : ""]);
+ var canHaveTrailingComma = !(_lastElem && _lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which
+ // changes its length based on the number of commas. The algorithm
+ // is that if the last argument is null, we need to force insert
+ // a comma to ensure JavaScript recognizes it.
+ // [,].length === 1
+ // [1,].length === 1
+ // [1,,].length === 2
+ //
+ // Note that getLast returns null if the array is empty, but
+ // we already check for an empty array just above so we are safe
- case "CatchClause":
- if (n.param) {
- var hasComments = n.param.comments && n.param.comments.some(function (comment) {
- return !comments$3.isBlockComment(comment) || comment.leading && hasNewline$3(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$3(options.originalText, options.locStart(comment), {
- backwards: true
- });
- });
- var param = path.call(print, "param");
- return concat$11(["catch ", hasComments ? concat$11(["(", indent$6(concat$11([softline$5, param])), softline$5, ") "]) : concat$11(["(", param, ") "]), path.call(print, "body")]);
- }
+ var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null;
- return concat$11(["catch ", path.call(print, "body")]);
+ var _shouldBreak = n.elements.length > 1 && n.elements.every(function (element, i, elements) {
+ var elementType = element && element.type;
- case "ThrowStatement":
- return concat$11(["throw ", path.call(print, "argument"), semi]);
- // Note: ignoring n.lexical because it has no printing consequences.
+ if (elementType !== "ArrayExpression" && elementType !== "ObjectExpression") {
+ return false;
+ }
- case "SwitchStatement":
- return concat$11([group$10(concat$11(["switch (", indent$6(concat$11([softline$5, path.call(print, "discriminant")])), softline$5, ")"])), " {", n.cases.length > 0 ? indent$6(concat$11([hardline$8, join$7(hardline$8, path.map(function (casePath) {
- var caseNode = casePath.getValue();
- return concat$11([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$4(options.originalText, caseNode, options) ? hardline$8 : ""]);
- }, "cases"))])) : "", hardline$8, "}"]);
+ var nextElement = elements[i + 1];
- case "SwitchCase":
- {
- if (n.test) {
- parts.push("case ", path.call(print, "test"), ":");
- } else {
- parts.push("default:");
- }
+ if (nextElement && elementType !== nextElement.type) {
+ return false;
+ }
- var consequent = n.consequent.filter(function (node) {
- return node.type !== "EmptyStatement";
- });
+ var itemsKey = elementType === "ArrayExpression" ? "elements" : "properties";
+ return element[itemsKey] && element[itemsKey].length > 1;
+ });
- if (consequent.length > 0) {
- var cons = path.call(function (consequentPath) {
- return printStatementSequence(consequentPath, options, print);
- }, "consequent");
- parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$11([" ", cons]) : indent$6(concat$11([hardline$8, cons])));
+ parts.push(group$b(concat$d(["[", indent$7(concat$d([softline$6, printArrayItems(path, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$6(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma$1(options) ? "," : ""), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), softline$6, "]"]), {
+ shouldBreak: _shouldBreak
+ }));
}
- return concat$11(parts);
- }
- // JSX extensions below.
+ parts.push(printOptionalToken(path), printTypeAnnotation(path, options, print));
+ return concat$d(parts);
- case "DebuggerStatement":
- return concat$11(["debugger", semi]);
+ case "SequenceExpression":
+ {
+ var _parent6 = path.getParentNode(0);
- case "JSXAttribute":
- parts.push(path.call(print, "name"));
+ if (_parent6.type === "ExpressionStatement" || _parent6.type === "ForStatement") {
+ // For ExpressionStatements and for-loop heads, which are among
+ // the few places a SequenceExpression appears unparenthesized, we want
+ // to indent expressions after the first.
+ var _parts2 = [];
+ path.each(function (p) {
+ if (p.getName() === 0) {
+ _parts2.push(print(p));
+ } else {
+ _parts2.push(",", indent$7(concat$d([line$7, print(p)])));
+ }
+ }, "expressions");
+ return group$b(concat$d(_parts2));
+ }
- if (n.value) {
- var res;
+ return group$b(concat$d([join$9(concat$d([",", line$7]), path.map(print, "expressions"))]));
+ }
- if (isStringLiteral(n.value)) {
- var raw = rawText(n.value); // Unescape all quotes so we get an accurate preferred quote
+ case "ThisExpression":
+ return "this";
- var final = raw.replace(/&apos;/g, "'").replace(/&quot;/g, '"');
- var quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"');
+ case "Super":
+ return "super";
- var _escape = quote === "'" ? "&apos;" : "&quot;";
+ case "NullLiteral":
+ // Babel 6 Literal split
+ return "null";
- final = final.slice(1, -1).replace(new RegExp(quote, "g"), _escape);
- res = concat$11([quote, final, quote]);
- } else {
- res = path.call(print, "value");
- }
+ case "RegExpLiteral":
+ // Babel 6 Literal split
+ return printRegex(n);
- parts.push("=", res);
- }
+ case "NumericLiteral":
+ // Babel 6 Literal split
+ return printNumber$2(n.extra.raw);
- return concat$11(parts);
+ case "BigIntLiteral":
+ // babel: n.extra.raw, typescript: n.raw, flow: n.bigint
+ return (n.bigint || (n.extra ? n.extra.raw : n.raw)).toLowerCase();
- case "JSXIdentifier":
- return "" + n.name;
+ case "BooleanLiteral": // Babel 6 Literal split
- case "JSXNamespacedName":
- return join$7(":", [path.call(print, "namespace"), path.call(print, "name")]);
+ case "StringLiteral": // Babel 6 Literal split
- case "JSXMemberExpression":
- return join$7(".", [path.call(print, "object"), path.call(print, "property")]);
+ case "Literal":
+ {
+ if (n.regex) {
+ return printRegex(n.regex);
+ }
- case "TSQualifiedName":
- return join$7(".", [path.call(print, "left"), path.call(print, "right")]);
+ if (typeof n.value === "number") {
+ return printNumber$2(n.raw);
+ }
- case "JSXSpreadAttribute":
- case "JSXSpreadChild":
- {
- return concat$11(["{", path.call(function (p) {
- var printed = concat$11(["...", print(p)]);
- var n = p.getValue();
+ if (typeof n.value !== "string") {
+ return "" + n.value;
+ } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
+ // See corresponding workaround in needs-parens.js
- if (!n.comments || !n.comments.length) {
- return printed;
- }
- return concat$11([indent$6(concat$11([softline$5, comments.printComments(p, function () {
- return printed;
- }, options)])), softline$5]);
- }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]);
- }
+ var grandParent = path.getParentNode(1);
+ var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement");
+ return nodeStr(n, options, isTypeScriptDirective);
+ }
- case "JSXExpressionContainer":
- {
- var _parent6 = path.getParentNode(0);
+ case "Directive":
+ return path.call(print, "value");
+ // Babel 6
- var preventInline = _parent6.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0;
+ case "DirectiveLiteral":
+ return nodeStr(n, options);
- var _shouldInline = !preventInline && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode(_parent6) && (n.expression.type === "ConditionalExpression" || isBinaryish(n.expression)));
+ case "UnaryExpression":
+ parts.push(n.operator);
- if (_shouldInline) {
- return group$10(concat$11(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
+ if (/[a-z]$/.test(n.operator)) {
+ parts.push(" ");
}
- return group$10(concat$11(["{", indent$6(concat$11([softline$5, path.call(print, "expression")])), softline$5, lineSuffixBoundary$1, "}"]));
- }
+ if (n.argument.comments && n.argument.comments.length > 0) {
+ parts.push(group$b(concat$d(["(", indent$7(concat$d([softline$6, path.call(print, "argument")])), softline$6, ")"])));
+ } else {
+ parts.push(path.call(print, "argument"));
+ }
- case "JSXFragment":
- case "JSXElement":
- {
- var elem = comments.printComments(path, function () {
- return printJSXElement(path, options, print);
- }, options);
- return maybeWrapJSXElementInParens(path, elem);
- }
+ return concat$d(parts);
- case "JSXOpeningElement":
- {
- var _n = path.getValue();
-
- var nameHasComments = _n.name && _n.name.comments && _n.name.comments.length > 0; // Don't break self-closing elements with no attributes and no comments
-
- if (_n.selfClosing && !_n.attributes.length && !nameHasComments) {
- return concat$11(["<", path.call(print, "name"), path.call(print, "typeParameters"), " />"]);
- } // don't break up opening elements with a single long text attribute
-
-
- if (_n.attributes && _n.attributes.length === 1 && _n.attributes[0].value && isStringLiteral(_n.attributes[0].value) && !_n.attributes[0].value.value.includes("\n") && // We should break for the following cases:
- // <div
- // // comment
- // attr="value"
- // >
- // <div
- // attr="value"
- // // comment
- // >
- !nameHasComments && (!_n.attributes[0].comments || !_n.attributes[0].comments.length)) {
- return group$10(concat$11(["<", path.call(print, "name"), path.call(print, "typeParameters"), " ", concat$11(path.map(print, "attributes")), _n.selfClosing ? " />" : ">"]));
- }
-
- var lastAttrHasTrailingComments = _n.attributes.length && hasTrailingComment(getLast$3(_n.attributes));
- var bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be
- // kept unbroken regardless of `jsxBracketSameLine`
- !_n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases:
- // <div
- // // comment
- // >
- // <div
- // attr // comment
- // >
- !nameHasComments || _n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a
- // string literal with newlines
-
- var _shouldBreak = _n.attributes && _n.attributes.some(function (attr) {
- return attr.value && isStringLiteral(attr.value) && attr.value.value.includes("\n");
- });
+ case "UpdateExpression":
+ parts.push(path.call(print, "argument"), n.operator);
- return group$10(concat$11(["<", path.call(print, "name"), path.call(print, "typeParameters"), concat$11([indent$6(concat$11(path.map(function (attr) {
- return concat$11([line$8, print(attr)]);
- }, "attributes"))), _n.selfClosing ? line$8 : bracketSameLine ? ">" : softline$5]), _n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), {
- shouldBreak: _shouldBreak
- });
- }
+ if (n.prefix) {
+ parts.reverse();
+ }
- case "JSXClosingElement":
- return concat$11(["</", path.call(print, "name"), ">"]);
+ return concat$d(parts);
- case "JSXOpeningFragment":
- case "JSXClosingFragment":
- {
- var hasComment = n.comments && n.comments.length;
- var hasOwnLineComment = hasComment && !n.comments.every(comments$3.isBlockComment);
- var isOpeningFragment = n.type === "JSXOpeningFragment";
- return concat$11([isOpeningFragment ? "<" : "</", indent$6(concat$11([hasOwnLineComment ? hardline$8 : hasComment && !isOpeningFragment ? " " : "", comments.printDanglingComments(path, options, true)])), hasOwnLineComment ? hardline$8 : "", ">"]);
- }
+ case "ConditionalExpression":
+ return printTernaryOperator(path, options, print, {
+ beforeParts: function beforeParts() {
+ return [path.call(print, "test")];
+ },
+ afterParts: function afterParts(breakClosingParen) {
+ return [breakClosingParen ? softline$6 : ""];
+ },
+ shouldCheckJsx: true,
+ conditionalNodeType: "ConditionalExpression",
+ consequentNodePropertyName: "consequent",
+ alternateNodePropertyName: "alternate",
+ testNodePropertyName: "test",
+ breakNested: true
+ });
- case "JSXText":
- /* istanbul ignore next */
- throw new Error("JSXTest should be handled by JSXElement");
+ case "VariableDeclaration":
+ {
+ var printed = path.map(function (childPath) {
+ return print(childPath);
+ }, "declarations"); // We generally want to terminate all variable declarations with a
+ // semicolon, except when they in the () part of for loops.
+
+ var parentNode = path.getParentNode();
+ var isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement";
+ var hasValue = n.declarations.some(function (decl) {
+ return decl.init;
+ });
+ var firstVariable;
- case "JSXEmptyExpression":
- {
- var requiresHardline = n.comments && !n.comments.every(comments$3.isBlockComment);
- return concat$11([comments.printDanglingComments(path, options,
- /* sameIndent */
- !requiresHardline), requiresHardline ? hardline$8 : ""]);
- }
+ if (printed.length === 1 && !n.declarations[0].comments) {
+ firstVariable = printed[0];
+ } else if (printed.length > 0) {
+ // Indent first var to comply with eslint one-var rule
+ firstVariable = indent$7(printed[0]);
+ }
- case "ClassBody":
- if (!n.comments && n.body.length === 0) {
- return "{}";
- }
+ parts = [n.declare ? "declare " : "", n.kind, firstVariable ? concat$d([" ", firstVariable]) : "", indent$7(concat$d(printed.slice(1).map(function (p) {
+ return concat$d([",", hasValue && !isParentForLoop ? hardline$9 : line$7, p]);
+ })))];
- return concat$11(["{", n.body.length > 0 ? indent$6(concat$11([hardline$8, path.call(function (bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body")])) : comments.printDanglingComments(path, options), hardline$8, "}"]);
+ if (!(isParentForLoop && parentNode.body !== n)) {
+ parts.push(semi);
+ }
- case "ClassProperty":
- case "TSAbstractClassProperty":
- case "ClassPrivateProperty":
- {
- if (n.decorators && n.decorators.length !== 0) {
- parts.push(printDecorators(path, options, print));
+ return group$b(concat$d(parts));
}
- if (n.accessibility) {
- parts.push(n.accessibility + " ");
- }
+ case "TSTypeAliasDeclaration":
+ {
+ if (n.declare) {
+ parts.push("declare ");
+ }
- if (n.static) {
- parts.push("static ");
- }
+ var _printed = printAssignmentRight(n.id, n.typeAnnotation, n.typeAnnotation && path.call(print, "typeAnnotation"), options);
- if (n.type === "TSAbstractClassProperty") {
- parts.push("abstract ");
+ parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed, semi);
+ return group$b(concat$d(parts));
}
- if (n.readonly) {
- parts.push("readonly ");
- }
+ case "VariableDeclarator":
+ return printAssignment(n.id, path.call(print, "id"), " =", n.init, n.init && path.call(print, "init"), options);
- var variance = getFlowVariance(n);
+ case "WithStatement":
+ return group$b(concat$d(["with (", path.call(print, "object"), ")", adjustClause(n.body, path.call(print, "body"))]));
- if (variance) {
- parts.push(variance);
- }
+ case "IfStatement":
+ {
+ var con = adjustClause(n.consequent, path.call(print, "consequent"));
+ var opening = group$b(concat$d(["if (", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, "test")])), softline$6])), ")", con]));
+ parts.push(opening);
- if (n.computed) {
- parts.push("[", path.call(print, "key"), "]");
- } else {
- parts.push(printPropertyKey(path, options, print));
- }
+ if (n.alternate) {
+ var commentOnOwnLine = hasTrailingComment$1(n.consequent) && n.consequent.comments.some(function (comment) {
+ return comment.trailing && !comments$1.isBlockComment(comment);
+ }) || needsHardlineAfterDanglingComment$1(n);
+ var elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine;
+ parts.push(elseOnSameLine ? " " : hardline$9);
- parts.push(printOptionalToken(path));
- parts.push(printTypeAnnotation(path, options, print));
+ if (hasDanglingComments$1(n)) {
+ parts.push(comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$9 : " ");
+ }
- if (n.value) {
- parts.push(" =", printAssignmentRight(n.key, n.value, path.call(print, "value"), options));
+ parts.push("else", group$b(adjustClause(n.alternate, path.call(print, "alternate"), n.alternate.type === "IfStatement")));
+ }
+
+ return concat$d(parts);
}
- parts.push(semi);
- return group$10(concat$11(parts));
- }
+ case "ForStatement":
+ {
+ var _body = adjustClause(n.body, path.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent.
+ // Any comment positioned between the for statement and the parentheses
+ // is going to be printed before the statement.
- case "ClassDeclaration":
- case "ClassExpression":
- if (isNodeStartingWithDeclare(n, options)) {
- parts.push("declare ");
- }
- parts.push(concat$11(printClass(path, options, print)));
- return concat$11(parts);
+ var _dangling = comments.printDanglingComments(path, options,
+ /* sameLine */
+ true);
- case "TSInterfaceHeritage":
- parts.push(path.call(print, "expression"));
+ var printedComments = _dangling ? concat$d([_dangling, softline$6]) : "";
- if (n.typeParameters) {
- parts.push(path.call(print, "typeParameters"));
- }
+ if (!n.init && !n.test && !n.update) {
+ return concat$d([printedComments, group$b(concat$d(["for (;;)", _body]))]);
+ }
- return concat$11(parts);
+ return concat$d([printedComments, group$b(concat$d(["for (", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, "init"), ";", line$7, path.call(print, "test"), ";", line$7, path.call(print, "update")])), softline$6])), ")", _body]))]);
+ }
- case "TemplateElement":
- return join$7(literalline$3, n.value.raw.split(/\r?\n/g));
+ case "WhileStatement":
+ return group$b(concat$d(["while (", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, "test")])), softline$6])), ")", adjustClause(n.body, path.call(print, "body"))]));
- case "TemplateLiteral":
- {
- var expressions = path.map(print, "expressions");
+ case "ForInStatement":
+ // Note: esprima can't actually parse "for each (".
+ return group$b(concat$d([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
- var _parentNode = path.getParentNode();
+ case "ForOfStatement":
+ case "ForAwaitStatement":
+ {
+ // Babel 7 removed ForAwaitStatement in favor of ForOfStatement
+ // with `"await": true`:
+ // https://github.com/estree/estree/pull/138
+ var isAwait = n.type === "ForAwaitStatement" || n.await;
+ return group$b(concat$d(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
+ }
- if (isJestEachTemplateLiteral(n, _parentNode)) {
- var _printed2 = printJestEachTemplateLiteral(n, expressions, options);
+ case "DoWhileStatement":
+ {
+ var clause = adjustClause(n.body, path.call(print, "body"));
+ var doBody = group$b(concat$d(["do", clause]));
+ parts = [doBody];
- if (_printed2) {
- return _printed2;
+ if (n.body.type === "BlockStatement") {
+ parts.push(" ");
+ } else {
+ parts.push(hardline$9);
}
+
+ parts.push("while (");
+ parts.push(group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, "test")])), softline$6])), ")", semi);
+ return concat$d(parts);
}
- var isSimple = isSimpleTemplateLiteral(n);
+ case "DoExpression":
+ return concat$d(["do ", path.call(print, "body")]);
- if (isSimple) {
- expressions = expressions.map(function (doc$$2) {
- return printDocToString$1(doc$$2, Object.assign({}, options, {
- printWidth: Infinity
- })).formatted;
- });
+ case "BreakStatement":
+ parts.push("break");
+
+ if (n.label) {
+ parts.push(" ", path.call(print, "label"));
}
- parts.push("`");
- path.each(function (childPath) {
- var i = childPath.getName();
- parts.push(print(childPath));
-
- if (i < expressions.length) {
- // For a template literal of the following form:
- // `someQuery {
- // ${call({
- // a,
- // b,
- // })}
- // }`
- // the expression is on its own line (there is a \n in the previous
- // quasi literal), therefore we want to indent the JavaScript
- // expression inside at the beginning of ${ instead of the beginning
- // of the `.
- var tabWidth = options.tabWidth;
- var quasi = childPath.getValue();
- var indentSize = getIndentSize$1(quasi.value.raw, tabWidth);
- var _printed3 = expressions[i];
-
- if (!isSimple) {
- // Breaks at the template element boundaries (${ and }) are preferred to breaking
- // in the middle of a MemberExpression
- if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression") {
- _printed3 = concat$11([indent$6(concat$11([softline$5, _printed3])), softline$5]);
- }
- }
+ parts.push(semi);
+ return concat$d(parts);
- var aligned = indentSize === 0 && quasi.value.raw.endsWith("\n") ? align$1(-Infinity, _printed3) : addAlignmentToDoc$2(_printed3, indentSize, tabWidth);
- parts.push(group$10(concat$11(["${", aligned, lineSuffixBoundary$1, "}"])));
- }
- }, "quasis");
- parts.push("`");
- return concat$11(parts);
- }
- // These types are unprintable because they serve as abstract
- // supertypes for other (printable) types.
-
- case "TaggedTemplateExpression":
- return concat$11([path.call(print, "tag"), path.call(print, "typeParameters"), path.call(print, "quasi")]);
-
- case "Node":
- case "Printable":
- case "SourceLocation":
- case "Position":
- case "Statement":
- case "Function":
- case "Pattern":
- case "Expression":
- case "Declaration":
- case "Specifier":
- case "NamedSpecifier":
- case "Comment":
- case "MemberTypeAnnotation": // Flow
-
- case "Type":
- /* istanbul ignore next */
- throw new Error("unprintable type: " + JSON.stringify(n.type));
- // Type Annotations for Facebook Flow, typically stripped out or
- // transformed away before printing.
+ case "ContinueStatement":
+ parts.push("continue");
- case "TypeAnnotation":
- case "TSTypeAnnotation":
- if (n.typeAnnotation) {
- return path.call(print, "typeAnnotation");
- }
- /* istanbul ignore next */
+ if (n.label) {
+ parts.push(" ", path.call(print, "label"));
+ }
+ parts.push(semi);
+ return concat$d(parts);
- return "";
+ case "LabeledStatement":
+ if (n.body.type === "EmptyStatement") {
+ return concat$d([path.call(print, "label"), ":;"]);
+ }
- case "TSTupleType":
- case "TupleTypeAnnotation":
- {
- var typesField = n.type === "TSTupleType" ? "elementTypes" : "types";
- return group$10(concat$11(["[", indent$6(concat$11([softline$5, printArrayItems(path, options, typesField, print)])), ifBreak$6(shouldPrintComma$1(options, "all") ? "," : ""), comments.printDanglingComments(path, options,
- /* sameIndent */
- true), softline$5, "]"]));
- }
+ return concat$d([path.call(print, "label"), ": ", path.call(print, "body")]);
- case "ExistsTypeAnnotation":
- return "*";
+ case "TryStatement":
+ return concat$d(["try ", path.call(print, "block"), n.handler ? concat$d([" ", path.call(print, "handler")]) : "", n.finalizer ? concat$d([" finally ", path.call(print, "finalizer")]) : ""]);
- case "EmptyTypeAnnotation":
- return "empty";
+ case "CatchClause":
+ if (n.param) {
+ var hasComments = n.param.comments && n.param.comments.some(function (comment) {
+ return !comments$1.isBlockComment(comment) || comment.leading && hasNewline$4(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$4(options.originalText, options.locStart(comment), {
+ backwards: true
+ });
+ });
+ var param = path.call(print, "param");
+ return concat$d(["catch ", hasComments ? concat$d(["(", indent$7(concat$d([softline$6, param])), softline$6, ") "]) : concat$d(["(", param, ") "]), path.call(print, "body")]);
+ }
- case "AnyTypeAnnotation":
- return "any";
+ return concat$d(["catch ", path.call(print, "body")]);
- case "MixedTypeAnnotation":
- return "mixed";
+ case "ThrowStatement":
+ return concat$d(["throw ", path.call(print, "argument"), semi]);
+ // Note: ignoring n.lexical because it has no printing consequences.
- case "ArrayTypeAnnotation":
- return concat$11([path.call(print, "elementType"), "[]"]);
+ case "SwitchStatement":
+ return concat$d([group$b(concat$d(["switch (", indent$7(concat$d([softline$6, path.call(print, "discriminant")])), softline$6, ")"])), " {", n.cases.length > 0 ? indent$7(concat$d([hardline$9, join$9(hardline$9, path.map(function (casePath) {
+ var caseNode = casePath.getValue();
+ return concat$d([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$4(options.originalText, caseNode, options) ? hardline$9 : ""]);
+ }, "cases"))])) : "", hardline$9, "}"]);
- case "BooleanTypeAnnotation":
- return "boolean";
+ case "SwitchCase":
+ {
+ if (n.test) {
+ parts.push("case ", path.call(print, "test"), ":");
+ } else {
+ parts.push("default:");
+ }
- case "BooleanLiteralTypeAnnotation":
- return "" + n.value;
+ var consequent = n.consequent.filter(function (node) {
+ return node.type !== "EmptyStatement";
+ });
- case "DeclareClass":
- return printFlowDeclaration(path, printClass(path, options, print));
+ if (consequent.length > 0) {
+ var cons = path.call(function (consequentPath) {
+ return printStatementSequence(consequentPath, options, print);
+ }, "consequent");
+ parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$d([" ", cons]) : indent$7(concat$d([hardline$9, cons])));
+ }
- case "TSDeclareFunction":
- // For TypeScript the TSDeclareFunction node shares the AST
- // structure with FunctionDeclaration
- return concat$11([n.declare ? "declare " : "", printFunctionDeclaration(path, print, options), semi]);
+ return concat$d(parts);
+ }
+ // JSX extensions below.
- case "DeclareFunction":
- return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]);
+ case "DebuggerStatement":
+ return concat$d(["debugger", semi]);
- case "DeclareModule":
- return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]);
+ case "JSXAttribute":
+ parts.push(path.call(print, "name"));
- case "DeclareModuleExports":
- return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]);
+ if (n.value) {
+ var res;
- case "DeclareVariable":
- return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]);
+ if (isStringLiteral$1(n.value)) {
+ var raw = rawText$1(n.value); // Unescape all quotes so we get an accurate preferred quote
- case "DeclareExportAllDeclaration":
- return concat$11(["declare export * from ", path.call(print, "source")]);
+ var final = raw.replace(/&apos;/g, "'").replace(/&quot;/g, '"');
+ var quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"');
- case "DeclareExportDeclaration":
- return concat$11(["declare ", printExportDeclaration(path, options, print)]);
+ var _escape = quote === "'" ? "&apos;" : "&quot;";
- case "DeclareOpaqueType":
- case "OpaqueType":
- {
- parts.push("opaque type ", path.call(print, "id"), path.call(print, "typeParameters"));
+ final = final.slice(1, -1).replace(new RegExp(quote, "g"), _escape);
+ res = concat$d([quote, final, quote]);
+ } else {
+ res = path.call(print, "value");
+ }
- if (n.supertype) {
- parts.push(": ", path.call(print, "supertype"));
+ parts.push("=", res);
}
- if (n.impltype) {
- parts.push(" = ", path.call(print, "impltype"));
- }
+ return concat$d(parts);
- parts.push(semi);
+ case "JSXIdentifier":
+ return "" + n.name;
- if (n.type === "DeclareOpaqueType") {
- return printFlowDeclaration(path, parts);
- }
+ case "JSXNamespacedName":
+ return join$9(":", [path.call(print, "namespace"), path.call(print, "name")]);
- return concat$11(parts);
- }
+ case "JSXMemberExpression":
+ return join$9(".", [path.call(print, "object"), path.call(print, "property")]);
- case "FunctionTypeAnnotation":
- case "TSFunctionType":
- {
- // FunctionTypeAnnotation is ambiguous:
- // declare function foo(a: B): void; OR
- // var A: (a: B) => void;
- var _parent7 = path.getParentNode(0);
+ case "TSQualifiedName":
+ return join$9(".", [path.call(print, "left"), path.call(print, "right")]);
- var _parentParent2 = path.getParentNode(1);
+ case "JSXSpreadAttribute":
+ case "JSXSpreadChild":
+ {
+ return concat$d(["{", path.call(function (p) {
+ var printed = concat$d(["...", print(p)]);
+ var n = p.getValue();
- var _parentParentParent = path.getParentNode(2);
+ if (!n.comments || !n.comments.length) {
+ return printed;
+ }
- var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((_parent7.type === "ObjectTypeProperty" || _parent7.type === "ObjectTypeInternalSlot") && !getFlowVariance(_parent7) && !_parent7.optional && options.locStart(_parent7) === options.locStart(n) || _parent7.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction");
- var needsColon = isArrowFunctionTypeAnnotation && (_parent7.type === "TypeAnnotation" || _parent7.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are
- // printing ":" as part of the expression and it would put parenthesis
- // around :(
+ return concat$d([indent$7(concat$d([softline$6, comments.printComments(p, function () {
+ return printed;
+ }, options)])), softline$6]);
+ }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]);
+ }
- var needsParens = needsColon && isArrowFunctionTypeAnnotation && (_parent7.type === "TypeAnnotation" || _parent7.type === "TSTypeAnnotation") && _parentParent2.type === "ArrowFunctionExpression";
+ case "JSXExpressionContainer":
+ {
+ var _parent7 = path.getParentNode(0);
- if (isObjectTypePropertyAFunction(_parent7, options)) {
- isArrowFunctionTypeAnnotation = true;
- needsColon = true;
- }
+ var preventInline = _parent7.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0;
- if (needsParens) {
- parts.push("(");
- }
+ var _shouldInline = !preventInline && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode$1(_parent7) && (n.expression.type === "ConditionalExpression" || isBinaryish$1(n.expression)));
- parts.push(printFunctionParams(path, print, options,
- /* expandArg */
- false,
- /* printTypeParams */
- true)); // The returnType is not wrapped in a TypeAnnotation, so the colon
- // needs to be added separately.
+ if (_shouldInline) {
+ return group$b(concat$d(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
+ }
- if (n.returnType || n.predicate || n.typeAnnotation) {
- parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation"));
+ return group$b(concat$d(["{", indent$7(concat$d([softline$6, path.call(print, "expression")])), softline$6, lineSuffixBoundary$1, "}"]));
}
- if (needsParens) {
- parts.push(")");
+ case "JSXFragment":
+ case "JSXElement":
+ {
+ var elem = comments.printComments(path, function () {
+ return printJSXElement(path, options, print);
+ }, options);
+ return maybeWrapJSXElementInParens(path, elem, options);
}
- return group$10(concat$11(parts));
- }
+ case "JSXOpeningElement":
+ {
+ var _n = path.getValue();
+
+ var nameHasComments = _n.name && _n.name.comments && _n.name.comments.length > 0 || _n.typeParameters && _n.typeParameters.comments && _n.typeParameters.comments.length > 0; // Don't break self-closing elements with no attributes and no comments
- case "TSRestType":
- return concat$11(["...", path.call(print, "typeAnnotation")]);
+ if (_n.selfClosing && !_n.attributes.length && !nameHasComments) {
+ return concat$d(["<", path.call(print, "name"), path.call(print, "typeParameters"), " />"]);
+ } // don't break up opening elements with a single long text attribute
- case "TSOptionalType":
- return concat$11([path.call(print, "typeAnnotation"), "?"]);
- case "FunctionTypeParam":
- return concat$11([path.call(print, "name"), printOptionalToken(path), n.name ? ": " : "", path.call(print, "typeAnnotation")]);
+ if (_n.attributes && _n.attributes.length === 1 && _n.attributes[0].value && isStringLiteral$1(_n.attributes[0].value) && !_n.attributes[0].value.value.includes("\n") && // We should break for the following cases:
+ // <div
+ // // comment
+ // attr="value"
+ // >
+ // <div
+ // attr="value"
+ // // comment
+ // >
+ !nameHasComments && (!_n.attributes[0].comments || !_n.attributes[0].comments.length)) {
+ return group$b(concat$d(["<", path.call(print, "name"), path.call(print, "typeParameters"), " ", concat$d(path.map(print, "attributes")), _n.selfClosing ? " />" : ">"]));
+ }
- case "GenericTypeAnnotation":
- return concat$11([path.call(print, "id"), path.call(print, "typeParameters")]);
+ var lastAttrHasTrailingComments = _n.attributes.length && hasTrailingComment$1(getLast$2(_n.attributes));
+ var bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be
+ // kept unbroken regardless of `jsxBracketSameLine`
+ !_n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases:
+ // <div
+ // // comment
+ // >
+ // <div
+ // attr // comment
+ // >
+ !nameHasComments || _n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a
+ // string literal with newlines
+
+ var _shouldBreak2 = _n.attributes && _n.attributes.some(function (attr) {
+ return attr.value && isStringLiteral$1(attr.value) && attr.value.value.includes("\n");
+ });
- case "DeclareInterface":
- case "InterfaceDeclaration":
- case "InterfaceTypeAnnotation":
- {
- if (n.type === "DeclareInterface" || isNodeStartingWithDeclare(n, options)) {
- parts.push("declare ");
+ return group$b(concat$d(["<", path.call(print, "name"), path.call(print, "typeParameters"), concat$d([indent$7(concat$d(path.map(function (attr) {
+ return concat$d([line$7, print(attr)]);
+ }, "attributes"))), _n.selfClosing ? line$7 : bracketSameLine ? ">" : softline$6]), _n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), {
+ shouldBreak: _shouldBreak2
+ });
}
- parts.push("interface");
+ case "JSXClosingElement":
+ return concat$d(["</", path.call(print, "name"), ">"]);
- if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") {
- parts.push(" ", path.call(print, "id"), path.call(print, "typeParameters"));
+ case "JSXOpeningFragment":
+ case "JSXClosingFragment":
+ {
+ var hasComment = n.comments && n.comments.length;
+ var hasOwnLineComment = hasComment && !n.comments.every(comments$1.isBlockComment);
+ var isOpeningFragment = n.type === "JSXOpeningFragment";
+ return concat$d([isOpeningFragment ? "<" : "</", indent$7(concat$d([hasOwnLineComment ? hardline$9 : hasComment && !isOpeningFragment ? " " : "", comments.printDanglingComments(path, options, true)])), hasOwnLineComment ? hardline$9 : "", ">"]);
}
- if (n["extends"].length > 0) {
- parts.push(group$10(indent$6(concat$11([line$8, "extends ", (n.extends.length === 1 ? identity$1 : indent$6)(join$7(concat$11([",", line$8]), path.map(print, "extends")))]))));
- }
+ case "JSXText":
+ /* istanbul ignore next */
+ throw new Error("JSXTest should be handled by JSXElement");
- parts.push(" ", path.call(print, "body"));
- return group$10(concat$11(parts));
- }
+ case "JSXEmptyExpression":
+ {
+ var requiresHardline = n.comments && !n.comments.every(comments$1.isBlockComment);
+ return concat$d([comments.printDanglingComments(path, options,
+ /* sameIndent */
+ !requiresHardline), requiresHardline ? hardline$9 : ""]);
+ }
- case "ClassImplements":
- case "InterfaceExtends":
- return concat$11([path.call(print, "id"), path.call(print, "typeParameters")]);
+ case "ClassBody":
+ if (!n.comments && n.body.length === 0) {
+ return "{}";
+ }
- case "TSClassImplements":
- return concat$11([path.call(print, "expression"), path.call(print, "typeParameters")]);
+ return concat$d(["{", n.body.length > 0 ? indent$7(concat$d([hardline$9, path.call(function (bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body")])) : comments.printDanglingComments(path, options), hardline$9, "}"]);
+
+ case "ClassProperty":
+ case "TSAbstractClassProperty":
+ case "ClassPrivateProperty":
+ {
+ if (n.decorators && n.decorators.length !== 0) {
+ parts.push(printDecorators(path, options, print));
+ }
- case "TSIntersectionType":
- case "IntersectionTypeAnnotation":
- {
- var types = path.map(print, "types");
- var result = [];
- var wasIndented = false;
-
- for (var _i = 0; _i < types.length; ++_i) {
- if (_i === 0) {
- result.push(types[_i]);
- } else if (isObjectType(n.types[_i - 1]) && isObjectType(n.types[_i])) {
- // If both are objects, don't indent
- result.push(concat$11([" & ", wasIndented ? indent$6(types[_i]) : types[_i]]));
- } else if (!isObjectType(n.types[_i - 1]) && !isObjectType(n.types[_i])) {
- // If no object is involved, go to the next line if it breaks
- result.push(indent$6(concat$11([" &", line$8, types[_i]])));
- } else {
- // If you go from object to non-object or vis-versa, then inline it
- if (_i > 1) {
- wasIndented = true;
- }
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
- result.push(" & ", _i > 1 ? indent$6(types[_i]) : types[_i]);
+ if (n.declare) {
+ parts.push("declare ");
}
- }
- return group$10(concat$11(result));
- }
+ if (n.static) {
+ parts.push("static ");
+ }
- case "TSUnionType":
- case "UnionTypeAnnotation":
- {
- // single-line variation
- // A | B | C
- // multi-line variation
- // | A
- // | B
- // | C
- var _parent8 = path.getParentNode(); // If there's a leading comment, the parent is doing the indentation
+ if (n.type === "TSAbstractClassProperty") {
+ parts.push("abstract ");
+ }
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
- var shouldIndent = _parent8.type !== "TypeParameterInstantiation" && _parent8.type !== "TSTypeParameterInstantiation" && _parent8.type !== "GenericTypeAnnotation" && _parent8.type !== "TSTypeReference" && _parent8.type !== "TSTypeAssertion" && !(_parent8.type === "FunctionTypeParam" && !_parent8.name) && !((_parent8.type === "TypeAlias" || _parent8.type === "VariableDeclarator" || _parent8.type === "TSTypeAliasDeclaration") && hasLeadingOwnLineComment(options.originalText, n, options)); // {
- // a: string
- // } | null | void
- // should be inlined and not be printed in the multi-line variant
+ var variance = getFlowVariance$1(n);
- var shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like
- // | child1
- // // comment
- // | child2
+ if (variance) {
+ parts.push(variance);
+ }
- var _printed4 = path.map(function (typePath) {
- var printedType = typePath.call(print);
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path), printTypeAnnotation(path, options, print));
- if (!shouldHug) {
- printedType = align$1(2, printedType);
+ if (n.value) {
+ parts.push(" =", printAssignmentRight(n.key, n.value, path.call(print, "value"), options));
}
- return comments.printComments(typePath, function () {
- return printedType;
- }, options);
- }, "types");
+ parts.push(semi);
+ return group$b(concat$d(parts));
+ }
- if (shouldHug) {
- return join$7(" | ", _printed4);
+ case "ClassDeclaration":
+ case "ClassExpression":
+ if (n.declare) {
+ parts.push("declare ");
}
- var shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment(options.originalText, n, options);
- var code = concat$11([ifBreak$6(concat$11([shouldAddStartLine ? line$8 : "", "| "])), join$7(concat$11([line$8, "| "]), _printed4)]);
- var hasParens;
+ parts.push(concat$d(printClass(path, options, print)));
+ return concat$d(parts);
- if (n.type === "TSUnionType") {
- var greatGrandParent = path.getParentNode(2);
- var greatGreatGrandParent = path.getParentNode(3);
- hasParens = greatGrandParent && greatGrandParent.type === "TSParenthesizedType" && greatGreatGrandParent && (greatGreatGrandParent.type === "TSUnionType" || greatGreatGrandParent.type === "TSIntersectionType");
- } else {
- hasParens = needsParens_1(path, options);
- }
+ case "TSInterfaceHeritage":
+ parts.push(path.call(print, "expression"));
- if (hasParens) {
- return group$10(concat$11([indent$6(code), softline$5]));
+ if (n.typeParameters) {
+ parts.push(path.call(print, "typeParameters"));
}
- return group$10(shouldIndent ? indent$6(code) : code);
- }
+ return concat$d(parts);
- case "NullableTypeAnnotation":
- return concat$11(["?", path.call(print, "typeAnnotation")]);
+ case "TemplateElement":
+ return join$9(literalline$4, n.value.raw.split(/\r?\n/g));
- case "TSNullKeyword":
- case "NullLiteralTypeAnnotation":
- return "null";
+ case "TemplateLiteral":
+ {
+ var expressions = path.map(print, "expressions");
- case "ThisTypeAnnotation":
- return "this";
+ var _parentNode = path.getParentNode();
- case "NumberTypeAnnotation":
- return "number";
+ if (isJestEachTemplateLiteral$1(n, _parentNode)) {
+ var _printed2 = printJestEachTemplateLiteral(n, expressions, options);
- case "ObjectTypeCallProperty":
- if (n.static) {
- parts.push("static ");
- }
+ if (_printed2) {
+ return _printed2;
+ }
+ }
- parts.push(path.call(print, "value"));
- return concat$11(parts);
+ var isSimple = isSimpleTemplateLiteral$1(n);
- case "ObjectTypeIndexer":
- {
- var _variance = getFlowVariance(n);
-
- return concat$11([_variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]);
- }
+ if (isSimple) {
+ expressions = expressions.map(function (doc) {
+ return printDocToString$1(doc, Object.assign({}, options, {
+ printWidth: Infinity
+ })).formatted;
+ });
+ }
- case "ObjectTypeProperty":
- {
- var _variance2 = getFlowVariance(n);
+ parts.push(lineSuffixBoundary$1, "`");
+ path.each(function (childPath) {
+ var i = childPath.getName();
+ parts.push(print(childPath));
+
+ if (i < expressions.length) {
+ // For a template literal of the following form:
+ // `someQuery {
+ // ${call({
+ // a,
+ // b,
+ // })}
+ // }`
+ // the expression is on its own line (there is a \n in the previous
+ // quasi literal), therefore we want to indent the JavaScript
+ // expression inside at the beginning of ${ instead of the beginning
+ // of the `.
+ var tabWidth = options.tabWidth;
+ var quasi = childPath.getValue();
+ var indentSize = getIndentSize$1(quasi.value.raw, tabWidth);
+ var _printed3 = expressions[i];
+
+ if (!isSimple) {
+ // Breaks at the template element boundaries (${ and }) are preferred to breaking
+ // in the middle of a MemberExpression
+ if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression") {
+ _printed3 = concat$d([indent$7(concat$d([softline$6, _printed3])), softline$6]);
+ }
+ }
- var modifier = "";
+ var aligned = indentSize === 0 && quasi.value.raw.endsWith("\n") ? align$1(-Infinity, _printed3) : addAlignmentToDoc$2(_printed3, indentSize, tabWidth);
+ parts.push(group$b(concat$d(["${", aligned, lineSuffixBoundary$1, "}"])));
+ }
+ }, "quasis");
+ parts.push("`");
+ return concat$d(parts);
+ }
+ // These types are unprintable because they serve as abstract
+ // supertypes for other (printable) types.
+
+ case "TaggedTemplateExpression":
+ return concat$d([path.call(print, "tag"), path.call(print, "typeParameters"), path.call(print, "quasi")]);
+
+ case "Node":
+ case "Printable":
+ case "SourceLocation":
+ case "Position":
+ case "Statement":
+ case "Function":
+ case "Pattern":
+ case "Expression":
+ case "Declaration":
+ case "Specifier":
+ case "NamedSpecifier":
+ case "Comment":
+ case "MemberTypeAnnotation": // Flow
+
+ case "Type":
+ /* istanbul ignore next */
+ throw new Error("unprintable type: " + JSON.stringify(n.type));
+ // Type Annotations for Facebook Flow, typically stripped out or
+ // transformed away before printing.
- if (n.proto) {
- modifier = "proto ";
- } else if (n.static) {
- modifier = "static ";
+ case "TypeAnnotation":
+ case "TSTypeAnnotation":
+ if (n.typeAnnotation) {
+ return path.call(print, "typeAnnotation");
}
+ /* istanbul ignore next */
- return concat$11([modifier, isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation(n, options) ? "" : ": ", path.call(print, "value")]);
- }
- case "QualifiedTypeIdentifier":
- return concat$11([path.call(print, "qualification"), ".", path.call(print, "id")]);
+ return "";
- case "StringLiteralTypeAnnotation":
- return nodeStr(n, options);
+ case "TSTupleType":
+ case "TupleTypeAnnotation":
+ {
+ var typesField = n.type === "TSTupleType" ? "elementTypes" : "types";
+ return group$b(concat$d(["[", indent$7(concat$d([softline$6, printArrayItems(path, options, typesField, print)])), ifBreak$6(shouldPrintComma$1(options, "all") ? "," : ""), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), softline$6, "]"]));
+ }
- case "NumberLiteralTypeAnnotation":
- assert$3.strictEqual(_typeof(n.value), "number");
+ case "ExistsTypeAnnotation":
+ return "*";
- if (n.extra != null) {
- return printNumber$2(n.extra.raw);
- }
+ case "EmptyTypeAnnotation":
+ return "empty";
- return printNumber$2(n.raw);
+ case "AnyTypeAnnotation":
+ return "any";
- case "StringTypeAnnotation":
- return "string";
+ case "MixedTypeAnnotation":
+ return "mixed";
- case "DeclareTypeAlias":
- case "TypeAlias":
- {
- if (n.type === "DeclareTypeAlias" || isNodeStartingWithDeclare(n, options)) {
- parts.push("declare ");
- }
+ case "ArrayTypeAnnotation":
+ return concat$d([path.call(print, "elementType"), "[]"]);
- var _printed5 = printAssignmentRight(n.id, n.right, path.call(print, "right"), options);
+ case "BooleanTypeAnnotation":
+ return "boolean";
- parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed5, semi);
- return group$10(concat$11(parts));
- }
+ case "BooleanLiteralTypeAnnotation":
+ return "" + n.value;
- case "TypeCastExpression":
- {
- var value = path.getValue(); // Flow supports a comment syntax for specifying type annotations: https://flow.org/en/docs/types/comments/.
- // Unfortunately, its parser doesn't differentiate between comment annotations and regular
- // annotations when producing an AST. So to preserve parentheses around type casts that use
- // the comment syntax, we need to hackily read the source itself to see if the code contains
- // a type annotation comment.
- //
- // Note that we're able to use the normal whitespace regex here because the Flow parser has
- // already deemed this AST node to be a type cast. Only the Babel parser needs the
- // non-line-break whitespace regex, which is why hasFlowShorthandAnnotationComment() is
- // implemented differently.
+ case "DeclareClass":
+ return printFlowDeclaration(path, printClass(path, options, print));
- var commentSyntax = value && value.typeAnnotation && value.typeAnnotation.range && options.originalText.substring(value.typeAnnotation.range[0]).match(/^\/\*\s*:/);
- return concat$11(["(", path.call(print, "expression"), commentSyntax ? " /*" : "", ": ", path.call(print, "typeAnnotation"), commentSyntax ? " */" : "", ")"]);
- }
+ case "TSDeclareFunction":
+ // For TypeScript the TSDeclareFunction node shares the AST
+ // structure with FunctionDeclaration
+ return concat$d([n.declare ? "declare " : "", printFunctionDeclaration(path, print, options), semi]);
- case "TypeParameterDeclaration":
- case "TypeParameterInstantiation":
- {
- var _value = path.getValue();
+ case "DeclareFunction":
+ return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]);
- var commentStart = _value.range ? options.originalText.substring(0, _value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here
- // because we know for sure that this is a type definition.
+ case "DeclareModule":
+ return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]);
- var _commentSyntax = commentStart >= 0 && options.originalText.substring(commentStart).match(/^\/\*\s*::/);
+ case "DeclareModuleExports":
+ return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]);
- if (_commentSyntax) {
- return concat$11(["/*:: ", printTypeParameters(path, options, print, "params"), " */"]);
- }
+ case "DeclareVariable":
+ return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]);
- return printTypeParameters(path, options, print, "params");
- }
+ case "DeclareExportAllDeclaration":
+ return concat$d(["declare export * from ", path.call(print, "source")]);
- case "TSTypeParameterDeclaration":
- case "TSTypeParameterInstantiation":
- return printTypeParameters(path, options, print, "params");
+ case "DeclareExportDeclaration":
+ return concat$d(["declare ", printExportDeclaration(path, options, print)]);
- case "TSTypeParameter":
- case "TypeParameter":
- {
- var _parent9 = path.getParentNode();
+ case "DeclareOpaqueType":
+ case "OpaqueType":
+ {
+ parts.push("opaque type ", path.call(print, "id"), path.call(print, "typeParameters"));
- if (_parent9.type === "TSMappedType") {
- parts.push("[", path.call(print, "name"));
+ if (n.supertype) {
+ parts.push(": ", path.call(print, "supertype"));
+ }
- if (n.constraint) {
- parts.push(" in ", path.call(print, "constraint"));
+ if (n.impltype) {
+ parts.push(" = ", path.call(print, "impltype"));
}
- parts.push("]");
- return concat$11(parts);
- }
+ parts.push(semi);
- var _variance3 = getFlowVariance(n);
+ if (n.type === "DeclareOpaqueType") {
+ return printFlowDeclaration(path, parts);
+ }
- if (_variance3) {
- parts.push(_variance3);
+ return concat$d(parts);
}
- parts.push(path.call(print, "name"));
+ case "EnumDeclaration":
+ return concat$d(["enum ", path.call(print, "id"), " ", path.call(print, "body")]);
- if (n.bound) {
- parts.push(": ");
- parts.push(path.call(print, "bound"));
- }
+ case "EnumBooleanBody":
+ case "EnumNumberBody":
+ case "EnumStringBody":
+ case "EnumSymbolBody":
+ {
+ if (n.type === "EnumSymbolBody" || n.explicitType) {
+ var type = null;
- if (n.constraint) {
- parts.push(" extends ", path.call(print, "constraint"));
- }
+ switch (n.type) {
+ case "EnumBooleanBody":
+ type = "boolean";
+ break;
- if (n["default"]) {
- parts.push(" = ", path.call(print, "default"));
- } // Keep comma if the file extension is .tsx and
- // has one type parameter that isn't extend with any types.
- // Because, otherwise formatted result will be invalid as tsx.
+ case "EnumNumberBody":
+ type = "number";
+ break;
+ case "EnumStringBody":
+ type = "string";
+ break;
- var _grandParent = path.getNode(2);
+ case "EnumSymbolBody":
+ type = "symbol";
+ break;
+ }
+
+ parts.push("of ", type, " ");
+ }
+
+ if (n.members.length === 0) {
+ parts.push(group$b(concat$d(["{", comments.printDanglingComments(path, options), softline$6, "}"])));
+ } else {
+ parts.push(group$b(concat$d(["{", indent$7(concat$d([hardline$9, printArrayItems(path, options, "members", print), shouldPrintComma$1(options) ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$9, "}"])));
+ }
- if (_parent9.params && _parent9.params.length === 1 && options.filepath && /\.tsx$/i.test(options.filepath) && !n.constraint && _grandParent.type === "ArrowFunctionExpression") {
- parts.push(",");
+ return concat$d(parts);
}
- return concat$11(parts);
- }
+ case "EnumBooleanMember":
+ case "EnumNumberMember":
+ case "EnumStringMember":
+ return concat$d([path.call(print, "id"), " = ", _typeof(n.init) === "object" ? path.call(print, "init") : String(n.init)]);
- case "TypeofTypeAnnotation":
- return concat$11(["typeof ", path.call(print, "argument")]);
+ case "EnumDefaultedMember":
+ return path.call(print, "id");
- case "VoidTypeAnnotation":
- return "void";
+ case "FunctionTypeAnnotation":
+ case "TSFunctionType":
+ {
+ // FunctionTypeAnnotation is ambiguous:
+ // declare function foo(a: B): void; OR
+ // var A: (a: B) => void;
+ var _parent8 = path.getParentNode(0);
- case "InferredPredicate":
- return "%checks";
- // Unhandled types below. If encountered, nodes of these types should
- // be either left alone or desugared into AST types that are fully
- // supported by the pretty-printer.
+ var _parentParent2 = path.getParentNode(1);
- case "DeclaredPredicate":
- return concat$11(["%checks(", path.call(print, "value"), ")"]);
+ var _parentParentParent = path.getParentNode(2);
- case "TSAbstractKeyword":
- return "abstract";
+ var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((_parent8.type === "ObjectTypeProperty" || _parent8.type === "ObjectTypeInternalSlot") && !getFlowVariance$1(_parent8) && !_parent8.optional && options.locStart(_parent8) === options.locStart(n) || _parent8.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction");
+ var needsColon = isArrowFunctionTypeAnnotation && (_parent8.type === "TypeAnnotation" || _parent8.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are
+ // printing ":" as part of the expression and it would put parenthesis
+ // around :(
- case "TSAnyKeyword":
- return "any";
+ var needsParens = needsColon && isArrowFunctionTypeAnnotation && (_parent8.type === "TypeAnnotation" || _parent8.type === "TSTypeAnnotation") && _parentParent2.type === "ArrowFunctionExpression";
+
+ if (isObjectTypePropertyAFunction$1(_parent8, options)) {
+ isArrowFunctionTypeAnnotation = true;
+ needsColon = true;
+ }
- case "TSAsyncKeyword":
- return "async";
+ if (needsParens) {
+ parts.push("(");
+ }
- case "TSBooleanKeyword":
- return "boolean";
+ parts.push(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)); // The returnType is not wrapped in a TypeAnnotation, so the colon
+ // needs to be added separately.
- case "TSBigIntKeyword":
- return "bigint";
+ if (n.returnType || n.predicate || n.typeAnnotation) {
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation"));
+ }
- case "TSConstKeyword":
- return "const";
+ if (needsParens) {
+ parts.push(")");
+ }
- case "TSDeclareKeyword":
- return "declare";
+ return group$b(concat$d(parts));
+ }
- case "TSExportKeyword":
- return "export";
+ case "TSRestType":
+ return concat$d(["...", path.call(print, "typeAnnotation")]);
- case "TSNeverKeyword":
- return "never";
+ case "TSOptionalType":
+ return concat$d([path.call(print, "typeAnnotation"), "?"]);
- case "TSNumberKeyword":
- return "number";
+ case "FunctionTypeParam":
+ return concat$d([path.call(print, "name"), printOptionalToken(path), n.name ? ": " : "", path.call(print, "typeAnnotation")]);
- case "TSObjectKeyword":
- return "object";
+ case "GenericTypeAnnotation":
+ return concat$d([path.call(print, "id"), path.call(print, "typeParameters")]);
- case "TSProtectedKeyword":
- return "protected";
+ case "DeclareInterface":
+ case "InterfaceDeclaration":
+ case "InterfaceTypeAnnotation":
+ {
+ if (n.type === "DeclareInterface" || n.declare) {
+ parts.push("declare ");
+ }
- case "TSPrivateKeyword":
- return "private";
+ parts.push("interface");
- case "TSPublicKeyword":
- return "public";
+ if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") {
+ parts.push(" ", path.call(print, "id"), path.call(print, "typeParameters"));
+ }
- case "TSReadonlyKeyword":
- return "readonly";
+ if (n["extends"].length > 0) {
+ parts.push(group$b(indent$7(concat$d([line$7, "extends ", (n.extends.length === 1 ? identity$2 : indent$7)(join$9(concat$d([",", line$7]), path.map(print, "extends")))]))));
+ }
- case "TSSymbolKeyword":
- return "symbol";
+ parts.push(" ", path.call(print, "body"));
+ return group$b(concat$d(parts));
+ }
+
+ case "ClassImplements":
+ case "InterfaceExtends":
+ return concat$d([path.call(print, "id"), path.call(print, "typeParameters")]);
+
+ case "TSClassImplements":
+ return concat$d([path.call(print, "expression"), path.call(print, "typeParameters")]);
+
+ case "TSIntersectionType":
+ case "IntersectionTypeAnnotation":
+ {
+ var types = path.map(print, "types");
+ var result = [];
+ var wasIndented = false;
+
+ for (var _i = 0; _i < types.length; ++_i) {
+ if (_i === 0) {
+ result.push(types[_i]);
+ } else if (isObjectType$1(n.types[_i - 1]) && isObjectType$1(n.types[_i])) {
+ // If both are objects, don't indent
+ result.push(concat$d([" & ", wasIndented ? indent$7(types[_i]) : types[_i]]));
+ } else if (!isObjectType$1(n.types[_i - 1]) && !isObjectType$1(n.types[_i])) {
+ // If no object is involved, go to the next line if it breaks
+ result.push(indent$7(concat$d([" &", line$7, types[_i]])));
+ } else {
+ // If you go from object to non-object or vis-versa, then inline it
+ if (_i > 1) {
+ wasIndented = true;
+ }
- case "TSStaticKeyword":
- return "static";
+ result.push(" & ", _i > 1 ? indent$7(types[_i]) : types[_i]);
+ }
+ }
- case "TSStringKeyword":
- return "string";
+ return group$b(concat$d(result));
+ }
- case "TSUndefinedKeyword":
- return "undefined";
+ case "TSUnionType":
+ case "UnionTypeAnnotation":
+ {
+ // single-line variation
+ // A | B | C
+ // multi-line variation
+ // | A
+ // | B
+ // | C
+ var _parent9 = path.getParentNode(); // If there's a leading comment, the parent is doing the indentation
- case "TSUnknownKeyword":
- return "unknown";
- case "TSVoidKeyword":
- return "void";
+ var shouldIndent = _parent9.type !== "TypeParameterInstantiation" && _parent9.type !== "TSTypeParameterInstantiation" && _parent9.type !== "GenericTypeAnnotation" && _parent9.type !== "TSTypeReference" && _parent9.type !== "TSTypeAssertion" && _parent9.type !== "TupleTypeAnnotation" && _parent9.type !== "TSTupleType" && !(_parent9.type === "FunctionTypeParam" && !_parent9.name) && !((_parent9.type === "TypeAlias" || _parent9.type === "VariableDeclarator" || _parent9.type === "TSTypeAliasDeclaration") && hasLeadingOwnLineComment$1(options.originalText, n, options)); // {
+ // a: string
+ // } | null | void
+ // should be inlined and not be printed in the multi-line variant
- case "TSAsExpression":
- return concat$11([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]);
+ var shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like
+ // | child1
+ // // comment
+ // | child2
- case "TSArrayType":
- return concat$11([path.call(print, "elementType"), "[]"]);
+ var _printed4 = path.map(function (typePath) {
+ var printedType = typePath.call(print);
- case "TSPropertySignature":
- {
- if (n.export) {
- parts.push("export ");
- }
+ if (!shouldHug) {
+ printedType = align$1(2, printedType);
+ }
- if (n.accessibility) {
- parts.push(n.accessibility + " ");
+ return comments.printComments(typePath, function () {
+ return printedType;
+ }, options);
+ }, "types");
+
+ if (shouldHug) {
+ return join$9(" | ", _printed4);
+ }
+
+ var shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment$1(options.originalText, n, options);
+ var code = concat$d([ifBreak$6(concat$d([shouldAddStartLine ? line$7 : "", "| "])), join$9(concat$d([line$7, "| "]), _printed4)]);
+
+ if (needsParens_1(path, options)) {
+ return group$b(concat$d([indent$7(code), softline$6]));
+ }
+
+ if (_parent9.type === "TupleTypeAnnotation" && _parent9.types.length > 1 || _parent9.type === "TSTupleType" && _parent9.elementTypes.length > 1) {
+ return group$b(concat$d([indent$7(concat$d([ifBreak$6(concat$d(["(", softline$6])), code])), softline$6, ifBreak$6(")")]));
+ }
+
+ return group$b(shouldIndent ? indent$7(code) : code);
}
+ case "NullableTypeAnnotation":
+ return concat$d(["?", path.call(print, "typeAnnotation")]);
+
+ case "TSNullKeyword":
+ case "NullLiteralTypeAnnotation":
+ return "null";
+
+ case "ThisTypeAnnotation":
+ return "this";
+
+ case "NumberTypeAnnotation":
+ return "number";
+
+ case "ObjectTypeCallProperty":
if (n.static) {
parts.push("static ");
}
- if (n.readonly) {
- parts.push("readonly ");
+ parts.push(path.call(print, "value"));
+ return concat$d(parts);
+
+ case "ObjectTypeIndexer":
+ {
+ var _variance = getFlowVariance$1(n);
+
+ return concat$d([_variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]);
}
- if (n.computed) {
- parts.push("[");
+ case "ObjectTypeProperty":
+ {
+ var _variance2 = getFlowVariance$1(n);
+
+ var modifier = "";
+
+ if (n.proto) {
+ modifier = "proto ";
+ } else if (n.static) {
+ modifier = "static ";
+ }
+
+ return concat$d([modifier, isGetterOrSetter$1(n) ? n.kind + " " : "", _variance2 || "", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation$1(n, options) ? "" : ": ", path.call(print, "value")]);
}
- parts.push(printPropertyKey(path, options, print));
+ case "QualifiedTypeIdentifier":
+ return concat$d([path.call(print, "qualification"), ".", path.call(print, "id")]);
+
+ case "StringLiteralTypeAnnotation":
+ return nodeStr(n, options);
+
+ case "NumberLiteralTypeAnnotation":
+ assert.strictEqual(_typeof(n.value), "number");
- if (n.computed) {
- parts.push("]");
+ if (n.extra != null) {
+ return printNumber$2(n.extra.raw);
}
- parts.push(printOptionalToken(path));
+ return printNumber$2(n.raw);
- if (n.typeAnnotation) {
- parts.push(": ");
- parts.push(path.call(print, "typeAnnotation"));
- } // This isn't valid semantically, but it's in the AST so we can print it.
+ case "StringTypeAnnotation":
+ return "string";
+ case "DeclareTypeAlias":
+ case "TypeAlias":
+ {
+ if (n.type === "DeclareTypeAlias" || n.declare) {
+ parts.push("declare ");
+ }
- if (n.initializer) {
- parts.push(" = ", path.call(print, "initializer"));
+ var _printed5 = printAssignmentRight(n.id, n.right, path.call(print, "right"), options);
+
+ parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed5, semi);
+ return group$b(concat$d(parts));
}
- return concat$11(parts);
- }
+ case "TypeCastExpression":
+ {
+ var value = path.getValue(); // Flow supports a comment syntax for specifying type annotations: https://flow.org/en/docs/types/comments/.
+ // Unfortunately, its parser doesn't differentiate between comment annotations and regular
+ // annotations when producing an AST. So to preserve parentheses around type casts that use
+ // the comment syntax, we need to hackily read the source itself to see if the code contains
+ // a type annotation comment.
+ //
+ // Note that we're able to use the normal whitespace regex here because the Flow parser has
+ // already deemed this AST node to be a type cast. Only the Babel parser needs the
+ // non-line-break whitespace regex, which is why hasFlowShorthandAnnotationComment() is
+ // implemented differently.
- case "TSParameterProperty":
- if (n.accessibility) {
- parts.push(n.accessibility + " ");
- }
+ var commentSyntax = value && value.typeAnnotation && value.typeAnnotation.range && options.originalText.substring(value.typeAnnotation.range[0]).match(/^\/\*\s*:/);
+ return concat$d(["(", path.call(print, "expression"), commentSyntax ? " /*" : "", ": ", path.call(print, "typeAnnotation"), commentSyntax ? " */" : "", ")"]);
+ }
- if (n.export) {
- parts.push("export ");
- }
+ case "TypeParameterDeclaration":
+ case "TypeParameterInstantiation":
+ {
+ var _value = path.getValue();
- if (n.static) {
- parts.push("static ");
- }
+ var commentStart = _value.range ? options.originalText.substring(0, _value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here
+ // because we know for sure that this is a type definition.
- if (n.readonly) {
- parts.push("readonly ");
- }
+ var _commentSyntax = commentStart >= 0 && options.originalText.substring(commentStart).match(/^\/\*\s*::/);
- parts.push(path.call(print, "parameter"));
- return concat$11(parts);
+ if (_commentSyntax) {
+ return concat$d(["/*:: ", printTypeParameters(path, options, print, "params"), " */"]);
+ }
- case "TSTypeReference":
- return concat$11([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]);
+ return printTypeParameters(path, options, print, "params");
+ }
- case "TSTypeQuery":
- return concat$11(["typeof ", path.call(print, "exprName")]);
+ case "TSTypeParameterDeclaration":
+ case "TSTypeParameterInstantiation":
+ return printTypeParameters(path, options, print, "params");
- case "TSParenthesizedType":
- {
- return path.call(print, "typeAnnotation");
- }
+ case "TSTypeParameter":
+ case "TypeParameter":
+ {
+ var _parent10 = path.getParentNode();
- case "TSIndexSignature":
- {
- var _parent10 = path.getParentNode();
+ if (_parent10.type === "TSMappedType") {
+ parts.push("[", path.call(print, "name"));
- return concat$11([n.export ? "export " : "", n.accessibility ? concat$11([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? concat$11(path.map(print, "parameters")) : "", "]: ", path.call(print, "typeAnnotation"), _parent10.type === "ClassBody" ? semi : ""]);
- }
+ if (n.constraint) {
+ parts.push(" in ", path.call(print, "constraint"));
+ }
- case "TSTypePredicate":
- return concat$11([path.call(print, "parameterName"), " is ", path.call(print, "typeAnnotation")]);
+ parts.push("]");
+ return concat$d(parts);
+ }
- case "TSNonNullExpression":
- return concat$11([path.call(print, "expression"), "!"]);
+ var _variance3 = getFlowVariance$1(n);
- case "TSThisType":
- return "this";
+ if (_variance3) {
+ parts.push(_variance3);
+ }
- case "TSImportType":
- return concat$11([!n.isTypeOf ? "" : "typeof ", "import(", path.call(print, "parameter"), ")", !n.qualifier ? "" : concat$11([".", path.call(print, "qualifier")]), printTypeParameters(path, options, print, "typeParameters")]);
+ parts.push(path.call(print, "name"));
- case "TSLiteralType":
- return path.call(print, "literal");
+ if (n.bound) {
+ parts.push(": ");
+ parts.push(path.call(print, "bound"));
+ }
- case "TSIndexedAccessType":
- return concat$11([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]);
+ if (n.constraint) {
+ parts.push(" extends ", path.call(print, "constraint"));
+ }
- case "TSConstructSignatureDeclaration":
- case "TSCallSignatureDeclaration":
- case "TSConstructorType":
- {
- if (n.type !== "TSCallSignatureDeclaration") {
- parts.push("new ");
- }
+ if (n["default"]) {
+ parts.push(" = ", path.call(print, "default"));
+ } // Keep comma if the file extension is .tsx and
+ // has one type parameter that isn't extend with any types.
+ // Because, otherwise formatted result will be invalid as tsx.
- parts.push(group$10(printFunctionParams(path, print, options,
- /* expandArg */
- false,
- /* printTypeParams */
- true)));
- if (n.returnType) {
- var isType = n.type === "TSConstructorType";
- parts.push(isType ? " => " : ": ", path.call(print, "returnType"));
+ var _grandParent = path.getNode(2);
+
+ if (_parent10.params && _parent10.params.length === 1 && isTSXFile$1(options) && !n.constraint && _grandParent.type === "ArrowFunctionExpression") {
+ parts.push(",");
+ }
+
+ return concat$d(parts);
}
- return concat$11(parts);
- }
+ case "TypeofTypeAnnotation":
+ return concat$d(["typeof ", path.call(print, "argument")]);
- case "TSTypeOperator":
- return concat$11([n.operator, " ", path.call(print, "typeAnnotation")]);
+ case "VoidTypeAnnotation":
+ return "void";
- case "TSMappedType":
- {
- var _shouldBreak2 = hasNewlineInRange$1(options.originalText, options.locStart(n), options.locEnd(n));
+ case "InferredPredicate":
+ return "%checks";
+ // Unhandled types below. If encountered, nodes of these types should
+ // be either left alone or desugared into AST types that are fully
+ // supported by the pretty-printer.
- return group$10(concat$11(["{", indent$6(concat$11([options.bracketSpacing ? line$8 : softline$5, n.readonly ? concat$11([getTypeScriptMappedTypeModifier(n.readonly, "readonly"), " "]) : "", printTypeScriptModifiers(path, options, print), path.call(print, "typeParameter"), n.optional ? getTypeScriptMappedTypeModifier(n.optional, "?") : "", ": ", path.call(print, "typeAnnotation"), _shouldBreak2 && options.semi ? ";" : ""])), comments.printDanglingComments(path, options,
- /* sameIndent */
- true), options.bracketSpacing ? line$8 : softline$5, "}"]), {
- shouldBreak: _shouldBreak2
- });
- }
+ case "DeclaredPredicate":
+ return concat$d(["%checks(", path.call(print, "value"), ")"]);
- case "TSMethodSignature":
- parts.push(n.accessibility ? concat$11([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path), printFunctionParams(path, print, options,
- /* expandArg */
- false,
- /* printTypeParams */
- true));
+ case "TSAbstractKeyword":
+ return "abstract";
- if (n.returnType) {
- parts.push(": ", path.call(print, "returnType"));
- }
+ case "TSAnyKeyword":
+ return "any";
- return group$10(concat$11(parts));
+ case "TSAsyncKeyword":
+ return "async";
- case "TSNamespaceExportDeclaration":
- parts.push("export as namespace ", path.call(print, "id"));
+ case "TSBooleanKeyword":
+ return "boolean";
- if (options.semi) {
- parts.push(";");
- }
+ case "TSBigIntKeyword":
+ return "bigint";
- return group$10(concat$11(parts));
+ case "TSConstKeyword":
+ return "const";
- case "TSEnumDeclaration":
- if (isNodeStartingWithDeclare(n, options)) {
- parts.push("declare ");
- }
+ case "TSDeclareKeyword":
+ return "declare";
- if (n.modifiers) {
- parts.push(printTypeScriptModifiers(path, options, print));
- }
+ case "TSExportKeyword":
+ return "export";
- if (n.const) {
- parts.push("const ");
- }
+ case "TSNeverKeyword":
+ return "never";
- parts.push("enum ", path.call(print, "id"), " ");
+ case "TSNumberKeyword":
+ return "number";
- if (n.members.length === 0) {
- parts.push(group$10(concat$11(["{", comments.printDanglingComments(path, options), softline$5, "}"])));
- } else {
- parts.push(group$10(concat$11(["{", indent$6(concat$11([hardline$8, printArrayItems(path, options, "members", print), shouldPrintComma$1(options, "es5") ? "," : ""])), comments.printDanglingComments(path, options,
- /* sameIndent */
- true), hardline$8, "}"])));
- }
+ case "TSObjectKeyword":
+ return "object";
- return concat$11(parts);
+ case "TSProtectedKeyword":
+ return "protected";
- case "TSEnumMember":
- parts.push(path.call(print, "id"));
+ case "TSPrivateKeyword":
+ return "private";
- if (n.initializer) {
- parts.push(" = ", path.call(print, "initializer"));
- }
+ case "TSPublicKeyword":
+ return "public";
- return concat$11(parts);
+ case "TSReadonlyKeyword":
+ return "readonly";
- case "TSImportEqualsDeclaration":
- if (n.isExport) {
- parts.push("export ");
- }
+ case "TSSymbolKeyword":
+ return "symbol";
- parts.push("import ", path.call(print, "id"), " = ", path.call(print, "moduleReference"));
+ case "TSStaticKeyword":
+ return "static";
- if (options.semi) {
- parts.push(";");
- }
+ case "TSStringKeyword":
+ return "string";
- return group$10(concat$11(parts));
+ case "TSUndefinedKeyword":
+ return "undefined";
- case "TSExternalModuleReference":
- return concat$11(["require(", path.call(print, "expression"), ")"]);
+ case "TSUnknownKeyword":
+ return "unknown";
- case "TSModuleDeclaration":
- {
- var _parent11 = path.getParentNode();
+ case "TSVoidKeyword":
+ return "void";
- var isExternalModule = isLiteral(n.id);
- var parentIsDeclaration = _parent11.type === "TSModuleDeclaration";
- var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration";
+ case "TSAsExpression":
+ return concat$d([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]);
- if (parentIsDeclaration) {
- parts.push(".");
- } else {
- if (n.declare === true) {
- parts.push("declare ");
+ case "TSArrayType":
+ return concat$d([path.call(print, "elementType"), "[]"]);
+
+ case "TSPropertySignature":
+ {
+ if (n.export) {
+ parts.push("export ");
}
- parts.push(printTypeScriptModifiers(path, options, print));
- var textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this:
- // (declare)? global { ... }
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
- var isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId);
+ if (n.static) {
+ parts.push("static ");
+ }
- if (!isGlobalDeclaration) {
- parts.push(isExternalModule || /(^|\s)module(\s|$)/.test(textBetweenNodeAndItsId) ? "module " : "namespace ");
+ if (n.readonly) {
+ parts.push("readonly ");
}
+
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path));
+
+ if (n.typeAnnotation) {
+ parts.push(": ");
+ parts.push(path.call(print, "typeAnnotation"));
+ } // This isn't valid semantically, but it's in the AST so we can print it.
+
+
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
+ }
+
+ return concat$d(parts);
}
- parts.push(path.call(print, "id"));
+ case "TSParameterProperty":
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
- if (bodyIsDeclaration) {
- parts.push(path.call(print, "body"));
- } else if (n.body) {
- parts.push(" ", group$10(path.call(print, "body")));
- } else {
- parts.push(semi);
+ if (n.export) {
+ parts.push("export ");
}
- return concat$11(parts);
- }
+ if (n.static) {
+ parts.push("static ");
+ }
- case "PrivateName":
- return concat$11(["#", path.call(print, "id")]);
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
- case "TSConditionalType":
- return printTernaryOperator(path, options, print, {
- beforeParts: function beforeParts() {
- return [path.call(print, "checkType"), " ", "extends", " ", path.call(print, "extendsType")];
- },
- afterParts: function afterParts() {
- return [];
- },
- shouldCheckJsx: false,
- conditionalNodeType: "TSConditionalType",
- consequentNodePropertyName: "trueType",
- alternateNodePropertyName: "falseType",
- testNodePropertyName: "checkType",
- breakNested: true
- });
+ parts.push(path.call(print, "parameter"));
+ return concat$d(parts);
- case "TSInferType":
- return concat$11(["infer", " ", path.call(print, "typeParameter")]);
+ case "TSTypeReference":
+ return concat$d([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]);
- case "InterpreterDirective":
- parts.push("#!", n.value, hardline$8);
+ case "TSTypeQuery":
+ return concat$d(["typeof ", path.call(print, "exprName")]);
- if (isNextLineEmpty$4(options.originalText, n, options)) {
- parts.push(hardline$8);
- }
+ case "TSIndexSignature":
+ {
+ var _parent11 = path.getParentNode();
+
+ return concat$d([n.export ? "export " : "", n.accessibility ? concat$d([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? concat$d(path.map(print, "parameters")) : "", "]: ", path.call(print, "typeAnnotation"), _parent11.type === "ClassBody" ? semi : ""]);
+ }
- return concat$11(parts);
+ case "TSTypePredicate":
+ return concat$d([n.asserts ? "asserts " : "", path.call(print, "parameterName"), n.typeAnnotation ? concat$d([" is ", path.call(print, "typeAnnotation")]) : ""]);
- case "NGRoot":
- return concat$11([].concat(path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$11([" //", n.node.comments[0].value.trimRight()])));
+ case "TSNonNullExpression":
+ return concat$d([path.call(print, "expression"), "!"]);
- case "NGChainedExpression":
- return group$10(join$7(concat$11([";", line$8]), path.map(function (childPath) {
- return hasNgSideEffect(childPath) ? print(childPath) : concat$11(["(", print(childPath), ")"]);
- }, "expressions")));
+ case "TSThisType":
+ return "this";
- case "NGEmptyExpression":
- return "";
+ case "TSImportType":
+ return concat$d([!n.isTypeOf ? "" : "typeof ", "import(", path.call(print, "parameter"), ")", !n.qualifier ? "" : concat$d([".", path.call(print, "qualifier")]), printTypeParameters(path, options, print, "typeParameters")]);
- case "NGQuotedExpression":
- return concat$11([n.prefix, ":", n.value]);
+ case "TSLiteralType":
+ return path.call(print, "literal");
- case "NGMicrosyntax":
- return concat$11(path.map(function (childPath, index) {
- return concat$11([index === 0 ? "" : isNgForOf(childPath.getValue(), index, n) ? " " : concat$11([";", line$8]), print(childPath)]);
- }, "body"));
+ case "TSIndexedAccessType":
+ return concat$d([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]);
- case "NGMicrosyntaxKey":
- return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name);
+ case "TSConstructSignatureDeclaration":
+ case "TSCallSignatureDeclaration":
+ case "TSConstructorType":
+ {
+ if (n.type !== "TSCallSignatureDeclaration") {
+ parts.push("new ");
+ }
- case "NGMicrosyntaxExpression":
- return concat$11([path.call(print, "expression"), n.alias === null ? "" : concat$11([" as ", path.call(print, "alias")])]);
+ parts.push(group$b(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)));
- case "NGMicrosyntaxKeyedExpression":
- {
- var index = path.getName();
+ if (n.returnType) {
+ var isType = n.type === "TSConstructorType";
+ parts.push(isType ? " => " : ": ", path.call(print, "returnType"));
+ }
- var _parentNode2 = path.getParentNode();
+ return concat$d(parts);
+ }
- var shouldNotPrintColon = isNgForOf(n, index, _parentNode2) || (index === 1 && (n.key.name === "then" || n.key.name === "else") || index === 2 && n.key.name === "else" && _parentNode2.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && _parentNode2.body[index - 1].key.name === "then") && _parentNode2.body[0].type === "NGMicrosyntaxExpression";
- return concat$11([path.call(print, "key"), shouldNotPrintColon ? " " : ": ", path.call(print, "expression")]);
- }
+ case "TSTypeOperator":
+ return concat$d([n.operator, " ", path.call(print, "typeAnnotation")]);
- case "NGMicrosyntaxLet":
- return concat$11(["let ", path.call(print, "key"), n.value === null ? "" : concat$11([" = ", path.call(print, "value")])]);
+ case "TSMappedType":
+ {
+ var _shouldBreak3 = hasNewlineInRange$2(options.originalText, options.locStart(n), options.locEnd(n));
- case "NGMicrosyntaxAs":
- return concat$11([path.call(print, "key"), " as ", path.call(print, "alias")]);
+ return group$b(concat$d(["{", indent$7(concat$d([options.bracketSpacing ? line$7 : softline$6, n.readonly ? concat$d([getTypeScriptMappedTypeModifier$1(n.readonly, "readonly"), " "]) : "", printTypeScriptModifiers(path, options, print), path.call(print, "typeParameter"), n.optional ? getTypeScriptMappedTypeModifier$1(n.optional, "?") : "", ": ", path.call(print, "typeAnnotation"), ifBreak$6(semi, "")])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), options.bracketSpacing ? line$7 : softline$6, "}"]), {
+ shouldBreak: _shouldBreak3
+ });
+ }
- default:
- /* istanbul ignore next */
- throw new Error("unknown type: " + JSON.stringify(n.type));
- }
-}
+ case "TSMethodSignature":
+ parts.push(n.accessibility ? concat$d([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path), printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true));
-function isNgForOf(node, index, parentNode) {
- return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
-}
-/** identify if an angular expression seems to have side effects */
+ if (n.returnType) {
+ parts.push(": ", path.call(print, "returnType"));
+ }
+ return group$b(concat$d(parts));
-function hasNgSideEffect(path) {
- return hasNode(path.getValue(), function (node) {
- switch (node.type) {
- case undefined:
- return false;
+ case "TSNamespaceExportDeclaration":
+ parts.push("export as namespace ", path.call(print, "id"));
- case "CallExpression":
- case "OptionalCallExpression":
- case "AssignmentExpression":
- return true;
- }
- });
-}
+ if (options.semi) {
+ parts.push(";");
+ }
-function printStatementSequence(path, options, print) {
- var printed = [];
- var bodyNode = path.getNode();
- var isClass = bodyNode.type === "ClassBody";
- path.map(function (stmtPath, i) {
- var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy
- // "statements," it's safer simply to skip them.
+ return group$b(concat$d(parts));
- /* istanbul ignore if */
+ case "TSEnumDeclaration":
+ if (n.declare) {
+ parts.push("declare ");
+ }
- if (!stmt) {
- return;
- } // Skip printing EmptyStatement nodes to avoid leaving stray
- // semicolons lying around.
+ if (n.modifiers) {
+ parts.push(printTypeScriptModifiers(path, options, print));
+ }
+ if (n.const) {
+ parts.push("const ");
+ }
- if (stmt.type === "EmptyStatement") {
- return;
- }
+ parts.push("enum ", path.call(print, "id"), " ");
- var stmtPrinted = print(stmtPath);
- var text = options.originalText;
- var parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI
- // don't prepend the only JSX element in a program with semicolon
+ if (n.members.length === 0) {
+ parts.push(group$b(concat$d(["{", comments.printDanglingComments(path, options), softline$6, "}"])));
+ } else {
+ parts.push(group$b(concat$d(["{", indent$7(concat$d([hardline$9, printArrayItems(path, options, "members", print), shouldPrintComma$1(options, "es5") ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$9, "}"])));
+ }
- if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) {
- if (stmt.comments && stmt.comments.some(function (comment) {
- return comment.leading;
- })) {
- parts.push(print(stmtPath, {
- needsSemi: true
- }));
- } else {
- parts.push(";", stmtPrinted);
- }
- } else {
- parts.push(stmtPrinted);
- }
+ return concat$d(parts);
- if (!options.semi && isClass) {
- if (classPropMayCauseASIProblems(stmtPath)) {
- parts.push(";");
- } else if (stmt.type === "ClassProperty") {
- var nextChild = bodyNode.body[i + 1];
+ case "TSEnumMember":
+ parts.push(path.call(print, "id"));
- if (classChildNeedsASIProtection(nextChild)) {
- parts.push(";");
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
}
- }
- }
- if (isNextLineEmpty$4(text, stmt, options) && !isLastStatement(stmtPath)) {
- parts.push(hardline$8);
- }
+ return concat$d(parts);
- printed.push(concat$11(parts));
- });
- return join$7(hardline$8, printed);
-}
+ case "TSImportEqualsDeclaration":
+ if (n.isExport) {
+ parts.push("export ");
+ }
-function printPropertyKey(path, options, print) {
- var node = path.getNode();
- var parent = path.getParentNode();
- var key = node.key;
+ parts.push("import ", path.call(print, "id"), " = ", path.call(print, "moduleReference"));
- if (options.quoteProps === "consistent" && !needsQuoteProps.has(parent)) {
- var objectHasStringProp = (parent.properties || parent.body || parent.members).some(function (prop) {
- return !prop.computed && prop.key && isStringLiteral(prop.key) && !isStringPropSafeToCoerceToIdentifier(prop, options);
- });
- needsQuoteProps.set(parent, objectHasStringProp);
- }
+ if (options.semi) {
+ parts.push(";");
+ }
- if (key.type === "Identifier" && !node.computed && (options.parser === "json" || options.quoteProps === "consistent" && needsQuoteProps.get(parent))) {
- // a -> "a"
- var prop = printString$2(JSON.stringify(key.name), options);
- return path.call(function (keyPath) {
- return comments.printComments(keyPath, function () {
- return prop;
- }, options);
- }, "key");
- }
+ return group$b(concat$d(parts));
- if (!node.computed && isStringPropSafeToCoerceToIdentifier(node, options) && (options.quoteProps === "as-needed" || options.quoteProps === "consistent" && !needsQuoteProps.get(parent))) {
- // 'a' -> a
- return path.call(function (keyPath) {
- return comments.printComments(keyPath, function () {
- return key.value;
- }, options);
- }, "key");
- }
+ case "TSExternalModuleReference":
+ return concat$d(["require(", path.call(print, "expression"), ")"]);
- return path.call(print, "key");
-}
+ case "TSModuleDeclaration":
+ {
+ var _parent12 = path.getParentNode();
-function printMethod(path, options, print) {
- var node = path.getNode();
- var semi = options.semi ? ";" : "";
- var kind = node.kind;
- var parts = [];
+ var isExternalModule = isLiteral$1(n.id);
+ var parentIsDeclaration = _parent12.type === "TSModuleDeclaration";
+ var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration";
- if (node.type === "ObjectMethod" || node.type === "ClassMethod" || node.type === "ClassPrivateMethod") {
- node.value = node;
- }
+ if (parentIsDeclaration) {
+ parts.push(".");
+ } else {
+ if (n.declare) {
+ parts.push("declare ");
+ }
- if (node.value.async) {
- parts.push("async ");
- }
+ parts.push(printTypeScriptModifiers(path, options, print));
+ var textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this:
+ // (declare)? global { ... }
- if (!kind || kind === "init" || kind === "method" || kind === "constructor") {
- if (node.value.generator) {
- parts.push("*");
- }
- } else {
- assert$3.ok(kind === "get" || kind === "set");
- parts.push(kind, " ");
- }
+ var isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId);
- var key = printPropertyKey(path, options, print);
+ if (!isGlobalDeclaration) {
+ parts.push(isExternalModule || /(^|\s)module(\s|$)/.test(textBetweenNodeAndItsId) ? "module " : "namespace ");
+ }
+ }
- if (node.computed) {
- key = concat$11(["[", key, "]"]);
- }
+ parts.push(path.call(print, "id"));
- parts.push(key, concat$11(path.call(function (valuePath) {
- return [printFunctionTypeParameters(valuePath, options, print), group$10(concat$11([printFunctionParams(valuePath, print, options), printReturnType(valuePath, print, options)]))];
- }, "value")));
+ if (bodyIsDeclaration) {
+ parts.push(path.call(print, "body"));
+ } else if (n.body) {
+ parts.push(" ", group$b(path.call(print, "body")));
+ } else {
+ parts.push(semi);
+ }
- if (!node.value.body || node.value.body.length === 0) {
- parts.push(semi);
- } else {
- parts.push(" ", path.call(print, "value", "body"));
- }
+ return concat$d(parts);
+ }
+
+ case "PrivateName":
+ return concat$d(["#", path.call(print, "id")]);
+
+ case "TSConditionalType":
+ return printTernaryOperator(path, options, print, {
+ beforeParts: function beforeParts() {
+ return [path.call(print, "checkType"), " ", "extends", " ", path.call(print, "extendsType")];
+ },
+ afterParts: function afterParts() {
+ return [];
+ },
+ shouldCheckJsx: false,
+ conditionalNodeType: "TSConditionalType",
+ consequentNodePropertyName: "trueType",
+ alternateNodePropertyName: "falseType",
+ testNodePropertyName: "checkType",
+ breakNested: true
+ });
- return concat$11(parts);
-}
+ case "TSInferType":
+ return concat$d(["infer", " ", path.call(print, "typeParameter")]);
-function couldGroupArg(arg) {
- return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertion" || arg.type === "TSAsExpression" || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && ( // we want to avoid breaking inside composite return types but not simple keywords
- // https://github.com/prettier/prettier/issues/4070
- // export class Thing implements OtherThing {
- // do: (type: Type) => Provider<Prop> = memoize(
- // (type: ObjectType): Provider<Opts> => {}
- // );
- // }
- // https://github.com/prettier/prettier/issues/6099
- // app.get("/", (req, res): void => {
- // res.send("Hello World!");
- // });
- !arg.returnType || !arg.returnType.typeAnnotation || arg.returnType.typeAnnotation.type !== "TSTypeReference") && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode(arg.body));
-}
-
-function shouldGroupLastArg(args) {
- var lastArg = getLast$3(args);
- var penultimateArg = getPenultimate$1(args);
- return !hasLeadingComment(lastArg) && !hasTrailingComment(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type,
- // disable last element expansion.
- !penultimateArg || penultimateArg.type !== lastArg.type);
-}
-
-function shouldGroupFirstArg(args) {
- if (args.length !== 2) {
- return false;
- }
+ case "InterpreterDirective":
+ parts.push("#!", n.value, hardline$9);
- var firstArg = args[0];
- var secondArg = args[1];
- return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg);
-}
+ if (isNextLineEmpty$4(options.originalText, n, options)) {
+ parts.push(hardline$9);
+ }
-function isSimpleFlowType(node) {
- var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"];
- return node && flowTypeAnnotations.indexOf(node.type) !== -1 && !(node.type === "GenericTypeAnnotation" && node.typeParameters);
-}
+ return concat$d(parts);
-function isJestEachTemplateLiteral(node, parentNode) {
- /**
- * describe.each`table`(name, fn)
- * describe.only.each`table`(name, fn)
- * describe.skip.each`table`(name, fn)
- * test.each`table`(name, fn)
- * test.only.each`table`(name, fn)
- * test.skip.each`table`(name, fn)
- *
- * Ref: https://github.com/facebook/jest/pull/6102
- */
- var jestEachTriggerRegex = /^[xf]?(describe|it|test)$/;
- return parentNode.type === "TaggedTemplateExpression" && parentNode.quasi === node && parentNode.tag.type === "MemberExpression" && parentNode.tag.property.type === "Identifier" && parentNode.tag.property.name === "each" && (parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.name) || parentNode.tag.object.type === "MemberExpression" && parentNode.tag.object.property.type === "Identifier" && (parentNode.tag.object.property.name === "only" || parentNode.tag.object.property.name === "skip") && parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.object.name));
-}
+ case "NGRoot":
+ return concat$d([].concat(path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$d([" //", n.node.comments[0].value.trimRight()])));
-function printJestEachTemplateLiteral(node, expressions, options) {
- /**
- * a | b | expected
- * ${1} | ${1} | ${2}
- * ${1} | ${2} | ${3}
- * ${2} | ${1} | ${3}
- */
- var headerNames = node.quasis[0].value.raw.trim().split(/\s*\|\s*/);
+ case "NGChainedExpression":
+ return group$b(join$9(concat$d([";", line$7]), path.map(function (childPath) {
+ return hasNgSideEffect$1(childPath) ? print(childPath) : concat$d(["(", print(childPath), ")"]);
+ }, "expressions")));
- if (headerNames.length > 1 || headerNames.some(function (headerName) {
- return headerName.length !== 0;
- })) {
- var parts = [];
- var stringifiedExpressions = expressions.map(function (doc$$2) {
- return "${" + printDocToString$1(doc$$2, Object.assign({}, options, {
- printWidth: Infinity,
- endOfLine: "lf"
- })).formatted + "}";
- });
- var tableBody = [{
- hasLineBreak: false,
- cells: []
- }];
+ case "NGEmptyExpression":
+ return "";
- for (var i = 1; i < node.quasis.length; i++) {
- var row = tableBody[tableBody.length - 1];
- var correspondingExpression = stringifiedExpressions[i - 1];
- row.cells.push(correspondingExpression);
+ case "NGQuotedExpression":
+ return concat$d([n.prefix, ":", n.value]);
- if (correspondingExpression.indexOf("\n") !== -1) {
- row.hasLineBreak = true;
- }
+ case "NGMicrosyntax":
+ return concat$d(path.map(function (childPath, index) {
+ return concat$d([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$d([";", line$7]), print(childPath)]);
+ }, "body"));
- if (node.quasis[i].value.raw.indexOf("\n") !== -1) {
- tableBody.push({
- hasLineBreak: false,
- cells: []
- });
- }
- }
+ case "NGMicrosyntaxKey":
+ return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name);
- var maxColumnCount = tableBody.reduce(function (maxColumnCount, row) {
- return Math.max(maxColumnCount, row.cells.length);
- }, headerNames.length);
- var maxColumnWidths = Array.from(new Array(maxColumnCount), function () {
- return 0;
- });
- var table = [{
- cells: headerNames
- }].concat(tableBody.filter(function (row) {
- return row.cells.length !== 0;
- }));
- table.filter(function (row) {
- return !row.hasLineBreak;
- }).forEach(function (row) {
- row.cells.forEach(function (cell, index) {
- maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$2(cell));
- });
- });
- parts.push("`", indent$6(concat$11([hardline$8, join$7(hardline$8, table.map(function (row) {
- return join$7(" | ", row.cells.map(function (cell, index) {
- return row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$2(cell));
- }));
- }))])), hardline$8, "`");
- return concat$11(parts);
- }
-}
+ case "NGMicrosyntaxExpression":
+ return concat$d([path.call(print, "expression"), n.alias === null ? "" : concat$d([" as ", path.call(print, "alias")])]);
+ case "NGMicrosyntaxKeyedExpression":
+ {
+ var index = path.getName();
-function isSimpleTemplateLiteral(node) {
- if (node.expressions.length === 0) {
- return false;
- }
+ var _parentNode2 = path.getParentNode();
- return node.expressions.every(function (expr) {
- // Disallow comments since printDocToString can't print them here
- if (expr.comments) {
- return false;
- } // Allow `x` and `this`
+ var shouldNotPrintColon = isNgForOf$1(n, index, _parentNode2) || (index === 1 && (n.key.name === "then" || n.key.name === "else") || index === 2 && n.key.name === "else" && _parentNode2.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && _parentNode2.body[index - 1].key.name === "then") && _parentNode2.body[0].type === "NGMicrosyntaxExpression";
+ return concat$d([path.call(print, "key"), shouldNotPrintColon ? " " : ": ", path.call(print, "expression")]);
+ }
+ case "NGMicrosyntaxLet":
+ return concat$d(["let ", path.call(print, "key"), n.value === null ? "" : concat$d([" = ", path.call(print, "value")])]);
- if (expr.type === "Identifier" || expr.type === "ThisExpression") {
- return true;
- } // Allow `a.b.c`, `a.b[c]`, and `this.x.y`
+ case "NGMicrosyntaxAs":
+ return concat$d([path.call(print, "key"), " as ", path.call(print, "alias")]);
+ case "ArgumentPlaceholder":
+ return "?";
- if ((expr.type === "MemberExpression" || expr.type === "OptionalMemberExpression") && (expr.property.type === "Identifier" || expr.property.type === "Literal")) {
- var ancestor = expr;
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(n.type));
+ }
+ }
- while (ancestor.type === "MemberExpression" || ancestor.type === "OptionalMemberExpression") {
- ancestor = ancestor.object;
+ function printStatementSequence(path, options, print) {
+ var printed = [];
+ var bodyNode = path.getNode();
+ var isClass = bodyNode.type === "ClassBody";
+ path.map(function (stmtPath, i) {
+ var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy
+ // "statements," it's safer simply to skip them.
- if (ancestor.comments) {
- return false;
- }
+ /* istanbul ignore if */
+
+ if (!stmt) {
+ return;
+ } // Skip printing EmptyStatement nodes to avoid leaving stray
+ // semicolons lying around.
+
+
+ if (stmt.type === "EmptyStatement") {
+ return;
}
- if (ancestor.type === "Identifier" || ancestor.type === "ThisExpression") {
- return true;
+ var stmtPrinted = print(stmtPath);
+ var text = options.originalText;
+ var parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI
+ // don't prepend the only JSX element in a program with semicolon
+
+ if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown$1(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) {
+ if (stmt.comments && stmt.comments.some(function (comment) {
+ return comment.leading;
+ })) {
+ parts.push(print(stmtPath, {
+ needsSemi: true
+ }));
+ } else {
+ parts.push(";", stmtPrinted);
+ }
+ } else {
+ parts.push(stmtPrinted);
}
- return false;
- }
+ if (!options.semi && isClass) {
+ if (classPropMayCauseASIProblems$1(stmtPath)) {
+ parts.push(";");
+ } else if (stmt.type === "ClassProperty") {
+ var nextChild = bodyNode.body[i + 1];
- return false;
- });
-}
-
-var functionCompositionFunctionNames = new Set(["pipe", // RxJS, Ramda
-"pipeP", // Ramda
-"pipeK", // Ramda
-"compose", // Ramda, Redux
-"composeFlipped", // Not from any library, but common in Haskell, so supported
-"composeP", // Ramda
-"composeK", // Ramda
-"flow", // Lodash
-"flowRight", // Lodash
-"connect", // Redux
-"createSelector" // Reselect
-]);
-var ordinaryMethodNames = new Set(["connect" // GObject, MongoDB
-]);
-
-function isFunctionCompositionFunction(node) {
- switch (node.type) {
- case "OptionalMemberExpression":
- case "MemberExpression":
- {
- return isFunctionCompositionFunction(node.property) && !ordinaryMethodNames.has(node.property.name);
+ if (classChildNeedsASIProtection$1(nextChild)) {
+ parts.push(";");
+ }
+ }
}
- case "Identifier":
- {
- return functionCompositionFunctionNames.has(node.name);
+ if (isNextLineEmpty$4(text, stmt, options) && !isLastStatement$1(stmtPath)) {
+ parts.push(hardline$9);
}
- case "StringLiteral":
- case "Literal":
- {
- return functionCompositionFunctionNames.has(node.value);
- }
+ printed.push(concat$d(parts));
+ });
+ return join$9(hardline$9, printed);
}
-}
-function printArgumentsList(path, options, print) {
- var node = path.getValue();
- var args = node.arguments;
+ function printPropertyKey(path, options, print) {
+ var node = path.getNode();
- if (args.length === 0) {
- return concat$11(["(", comments.printDanglingComments(path, options,
- /* sameIndent */
- true), ")"]);
- } // useEffect(() => { ... }, [foo, bar, baz])
+ if (node.computed) {
+ return concat$d(["[", path.call(print, "key"), "]"]);
+ }
+ var parent = path.getParentNode();
+ var key = node.key;
- if (args.length === 2 && args[0].type === "ArrowFunctionExpression" && args[0].params.length === 0 && args[0].body.type === "BlockStatement" && args[1].type === "ArrayExpression" && !args.find(function (arg) {
- return arg.leadingComments || arg.trailingComments;
- })) {
- return concat$11(["(", path.call(print, "arguments", 0), ", ", path.call(print, "arguments", 1), ")"]);
+ if (options.quoteProps === "consistent" && !needsQuoteProps.has(parent)) {
+ var objectHasStringProp = (parent.properties || parent.body || parent.members).some(function (prop) {
+ return !prop.computed && prop.key && isStringLiteral$1(prop.key) && !isStringPropSafeToCoerceToIdentifier$1(prop, options);
+ });
+ needsQuoteProps.set(parent, objectHasStringProp);
+ }
+
+ if (key.type === "Identifier" && (options.parser === "json" || options.quoteProps === "consistent" && needsQuoteProps.get(parent))) {
+ // a -> "a"
+ var prop = printString$2(JSON.stringify(key.name), options);
+ return path.call(function (keyPath) {
+ return comments.printComments(keyPath, function () {
+ return prop;
+ }, options);
+ }, "key");
+ }
+
+ if (isStringPropSafeToCoerceToIdentifier$1(node, options) && (options.quoteProps === "as-needed" || options.quoteProps === "consistent" && !needsQuoteProps.get(parent))) {
+ // 'a' -> a
+ return path.call(function (keyPath) {
+ return comments.printComments(keyPath, function () {
+ return key.value;
+ }, options);
+ }, "key");
+ }
+
+ return path.call(print, "key");
}
- var anyArgEmptyLine = false;
- var hasEmptyLineFollowingFirstArg = false;
- var lastArgIndex = args.length - 1;
- var printedArguments = path.map(function (argPath, index) {
- var arg = argPath.getNode();
- var parts = [print(argPath)];
+ function printMethod(path, options, print) {
+ var node = path.getNode();
+ var kind = node.kind;
+ var value = node.value || node;
+ var parts = [];
- if (index === lastArgIndex) {// do nothing
- } else if (isNextLineEmpty$4(options.originalText, arg, options)) {
- if (index === 0) {
- hasEmptyLineFollowingFirstArg = true;
+ if (!kind || kind === "init" || kind === "method" || kind === "constructor") {
+ if (value.async) {
+ parts.push("async ");
}
- anyArgEmptyLine = true;
- parts.push(",", hardline$8, hardline$8);
+ if (value.generator) {
+ parts.push("*");
+ }
} else {
- parts.push(",", line$8);
+ assert.ok(kind === "get" || kind === "set");
+ parts.push(kind, " ");
}
- return concat$11(parts);
- }, "arguments");
- var maybeTrailingComma = // Dynamic imports cannot have trailing commas
- !(node.callee && node.callee.type === "Import") && shouldPrintComma$1(options, "all") ? "," : "";
+ parts.push(printPropertyKey(path, options, print), node.optional || node.key.optional ? "?" : "", node === value ? printMethodInternal(path, options, print) : path.call(function (path) {
+ return printMethodInternal(path, options, print);
+ }, "value"));
+ return concat$d(parts);
+ }
- function allArgsBrokenOut() {
- return group$10(concat$11(["(", indent$6(concat$11([line$8, concat$11(printedArguments)])), maybeTrailingComma, line$8, ")"]), {
- shouldBreak: true
- });
- } // We want to get
- // pipe(
- // x => x + 1,
- // x => x - 1
- // )
- // here, but not
- // process.stdout.pipe(socket)
+ function printMethodInternal(path, options, print) {
+ var parts = [printFunctionTypeParameters(path, options, print), group$b(concat$d([printFunctionParams(path, print, options), printReturnType(path, print, options)]))];
+ if (path.getNode().body) {
+ parts.push(" ", path.call(print, "body"));
+ } else {
+ parts.push(options.semi ? ";" : "");
+ }
- if (isFunctionCompositionFunction(node.callee) && args.length > 1) {
- return allArgsBrokenOut();
+ return concat$d(parts);
}
- var shouldGroupFirst = shouldGroupFirstArg(args);
- var shouldGroupLast = shouldGroupLastArg(args);
-
- if (shouldGroupFirst || shouldGroupLast) {
- var shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine; // We want to print the last argument with a special flag
+ function couldGroupArg(arg) {
+ return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertion" && couldGroupArg(arg.expression) || arg.type === "TSAsExpression" && couldGroupArg(arg.expression) || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && ( // we want to avoid breaking inside composite return types but not simple keywords
+ // https://github.com/prettier/prettier/issues/4070
+ // export class Thing implements OtherThing {
+ // do: (type: Type) => Provider<Prop> = memoize(
+ // (type: ObjectType): Provider<Opts> => {}
+ // );
+ // }
+ // https://github.com/prettier/prettier/issues/6099
+ // app.get("/", (req, res): void => {
+ // res.send("Hello World!");
+ // });
+ !arg.returnType || !arg.returnType.typeAnnotation || arg.returnType.typeAnnotation.type !== "TSTypeReference") && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode$1(arg.body));
+ }
- var printedExpanded;
- var i = 0;
- path.each(function (argPath) {
- if (shouldGroupFirst && i === 0) {
- printedExpanded = [concat$11([argPath.call(function (p) {
- return print(p, {
- expandFirstArg: true
- });
- }), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$8 : line$8, hasEmptyLineFollowingFirstArg ? hardline$8 : ""])].concat(printedArguments.slice(1));
- }
+ function shouldGroupLastArg(args) {
+ var lastArg = getLast$2(args);
+ var penultimateArg = getPenultimate$1(args);
+ return !hasLeadingComment$3(lastArg) && !hasTrailingComment$1(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type,
+ // disable last element expansion.
+ !penultimateArg || penultimateArg.type !== lastArg.type);
+ }
- if (shouldGroupLast && i === args.length - 1) {
- printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(function (p) {
- return print(p, {
- expandLastArg: true
- });
- }));
- }
+ function shouldGroupFirstArg(args) {
+ if (args.length !== 2) {
+ return false;
+ }
- i++;
- }, "arguments");
- var somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1);
- return concat$11([somePrintedArgumentsWillBreak ? breakParent$3 : "", conditionalGroup$1([concat$11([ifBreak$6(indent$6(concat$11(["(", softline$5, concat$11(printedExpanded)])), concat$11(["(", concat$11(printedExpanded)])), somePrintedArgumentsWillBreak ? concat$11([ifBreak$6(maybeTrailingComma), softline$5]) : "", ")"]), shouldGroupFirst ? concat$11(["(", group$10(printedExpanded[0], {
- shouldBreak: true
- }), concat$11(printedExpanded.slice(1)), ")"]) : concat$11(["(", concat$11(printedArguments.slice(0, -1)), group$10(getLast$3(printedExpanded), {
- shouldBreak: true
- }), ")"]), allArgsBrokenOut()], {
- shouldBreak: shouldBreak
- })]);
+ var firstArg = args[0];
+ var secondArg = args[1];
+ return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg);
}
- return group$10(concat$11(["(", indent$6(concat$11([softline$5, concat$11(printedArguments)])), ifBreak$6(maybeTrailingComma), softline$5, ")"]), {
- shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine
- });
-}
+ function printJestEachTemplateLiteral(node, expressions, options) {
+ /**
+ * a | b | expected
+ * ${1} | ${1} | ${2}
+ * ${1} | ${2} | ${3}
+ * ${2} | ${1} | ${3}
+ */
+ var headerNames = node.quasis[0].value.raw.trim().split(/\s*\|\s*/);
-function printTypeAnnotation(path, options, print) {
- var node = path.getValue();
+ if (headerNames.length > 1 || headerNames.some(function (headerName) {
+ return headerName.length !== 0;
+ })) {
+ var parts = [];
+ var stringifiedExpressions = expressions.map(function (doc) {
+ return "${" + printDocToString$1(doc, Object.assign({}, options, {
+ printWidth: Infinity,
+ endOfLine: "lf"
+ })).formatted + "}";
+ });
+ var tableBody = [{
+ hasLineBreak: false,
+ cells: []
+ }];
- if (!node.typeAnnotation) {
- return "";
- }
+ for (var i = 1; i < node.quasis.length; i++) {
+ var row = tableBody[tableBody.length - 1];
+ var correspondingExpression = stringifiedExpressions[i - 1];
+ row.cells.push(correspondingExpression);
+
+ if (correspondingExpression.indexOf("\n") !== -1) {
+ row.hasLineBreak = true;
+ }
- var parentNode = path.getParentNode();
- var isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite;
- var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node;
+ if (node.quasis[i].value.raw.indexOf("\n") !== -1) {
+ tableBody.push({
+ hasLineBreak: false,
+ cells: []
+ });
+ }
+ }
- if (isFlowAnnotationComment(options.originalText, node.typeAnnotation, options)) {
- return concat$11([" /*: ", path.call(print, "typeAnnotation"), " */"]);
+ var maxColumnCount = tableBody.reduce(function (maxColumnCount, row) {
+ return Math.max(maxColumnCount, row.cells.length);
+ }, headerNames.length);
+ var maxColumnWidths = Array.from(new Array(maxColumnCount), function () {
+ return 0;
+ });
+ var table = [{
+ cells: headerNames
+ }].concat(tableBody.filter(function (row) {
+ return row.cells.length !== 0;
+ }));
+ table.filter(function (row) {
+ return !row.hasLineBreak;
+ }).forEach(function (row) {
+ row.cells.forEach(function (cell, index) {
+ maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$2(cell));
+ });
+ });
+ parts.push(lineSuffixBoundary$1, "`", indent$7(concat$d([hardline$9, join$9(hardline$9, table.map(function (row) {
+ return join$9(" | ", row.cells.map(function (cell, index) {
+ return row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$2(cell));
+ }));
+ }))])), hardline$9, "`");
+ return concat$d(parts);
+ }
}
- return concat$11([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path.call(print, "typeAnnotation")]);
-}
+ function printArgumentsList(path, options, print) {
+ var node = path.getValue();
+ var args = node.arguments;
-function printFunctionTypeParameters(path, options, print) {
- var fun = path.getValue();
+ if (args.length === 0) {
+ return concat$d(["(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), ")"]);
+ } // useEffect(() => { ... }, [foo, bar, baz])
- if (fun.typeArguments) {
- return path.call(print, "typeArguments");
- }
- if (fun.typeParameters) {
- return path.call(print, "typeParameters");
- }
+ if (args.length === 2 && args[0].type === "ArrowFunctionExpression" && args[0].params.length === 0 && args[0].body.type === "BlockStatement" && args[1].type === "ArrayExpression" && !args.find(function (arg) {
+ return arg.comments;
+ })) {
+ return concat$d(["(", path.call(print, "arguments", 0), ", ", path.call(print, "arguments", 1), ")"]);
+ } // func(
+ // ({
+ // a,
+ // b
+ // }) => {}
+ // );
- return "";
-}
-function printFunctionParams(path, print, options, expandArg, printTypeParams) {
- var fun = path.getValue();
- var parent = path.getParentNode();
- var paramsField = fun.parameters ? "parameters" : "params";
- var isParametersInTestCall = isTestCall(parent);
- var shouldHugParameters = shouldHugArguments(fun);
- var shouldExpandParameters = expandArg && !(fun[paramsField] && fun[paramsField].some(function (n) {
- return n.comments;
- }));
- var typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : "";
- var printed = [];
+ function shouldBreakForArrowFunctionInArguments(arg, argPath) {
+ if (!arg || arg.type !== "ArrowFunctionExpression" || !arg.body || arg.body.type !== "BlockStatement" || !arg.params || arg.params.length < 1) {
+ return false;
+ }
- if (fun[paramsField]) {
- var lastArgIndex = fun[paramsField].length - 1;
- printed = path.map(function (childPath, index) {
- var parts = [];
- var param = childPath.getValue();
- parts.push(print(childPath));
+ var shouldBreak = false;
+ argPath.each(function (paramPath) {
+ var printed = concat$d([print(paramPath)]);
+ shouldBreak = shouldBreak || willBreak$1(printed);
+ }, "params");
+ return shouldBreak;
+ }
+
+ var anyArgEmptyLine = false;
+ var shouldBreakForArrowFunction = false;
+ var hasEmptyLineFollowingFirstArg = false;
+ var lastArgIndex = args.length - 1;
+ var printedArguments = path.map(function (argPath, index) {
+ var arg = argPath.getNode();
+ var parts = [print(argPath)];
- if (index === lastArgIndex) {
- if (fun.rest) {
- parts.push(",", line$8);
+ if (index === lastArgIndex) ; else if (isNextLineEmpty$4(options.originalText, arg, options)) {
+ if (index === 0) {
+ hasEmptyLineFollowingFirstArg = true;
}
- } else if (isParametersInTestCall || shouldHugParameters || shouldExpandParameters) {
- parts.push(", ");
- } else if (isNextLineEmpty$4(options.originalText, param, options)) {
- parts.push(",", hardline$8, hardline$8);
+
+ anyArgEmptyLine = true;
+ parts.push(",", hardline$9, hardline$9);
} else {
- parts.push(",", line$8);
+ parts.push(",", line$7);
}
- return concat$11(parts);
- }, paramsField);
- }
+ shouldBreakForArrowFunction = shouldBreakForArrowFunctionInArguments(arg, argPath);
+ return concat$d(parts);
+ }, "arguments");
+ var maybeTrailingComma = // Dynamic imports cannot have trailing commas
+ !(node.callee && node.callee.type === "Import") && shouldPrintComma$1(options, "all") ? "," : "";
- if (fun.rest) {
- printed.push(concat$11(["...", path.call(print, "rest")]));
- }
+ function allArgsBrokenOut() {
+ return group$b(concat$d(["(", indent$7(concat$d([line$7, concat$d(printedArguments)])), maybeTrailingComma, line$7, ")"]), {
+ shouldBreak: true
+ });
+ }
- if (printed.length === 0) {
- return concat$11([typeParams, "(", comments.printDanglingComments(path, options,
- /* sameIndent */
- true, function (comment) {
- return getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")";
- }), ")"]);
- }
+ if (isFunctionCompositionArgs$1(args)) {
+ return allArgsBrokenOut();
+ }
- var lastParam = getLast$3(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the
- // params of the first/last argument, we dont want the arguments to break and instead
- // want the whole expression to be on a new line.
- //
- // Good: Bad:
- // verylongcall( verylongcall((
- // (a, b) => { a,
- // } b,
- // }) ) => {
- // })
-
- if (shouldExpandParameters) {
- return group$10(concat$11([removeLines$2(typeParams), "(", concat$11(printed.map(removeLines$2)), ")"]));
- } // Single object destructuring should hug
- //
- // function({
- // a,
- // b,
- // c
- // }) {}
+ var shouldGroupFirst = shouldGroupFirstArg(args);
+ var shouldGroupLast = shouldGroupLastArg(args);
+ if (shouldGroupFirst || shouldGroupLast) {
+ var shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine || shouldBreakForArrowFunction; // We want to print the last argument with a special flag
- if (shouldHugParameters) {
- return concat$11([typeParams, "(", concat$11(printed), ")"]);
- } // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})`
+ var printedExpanded;
+ var i = 0;
+ path.each(function (argPath) {
+ if (shouldGroupFirst && i === 0) {
+ printedExpanded = [concat$d([argPath.call(function (p) {
+ return print(p, {
+ expandFirstArg: true
+ });
+ }), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$9 : line$7, hasEmptyLineFollowingFirstArg ? hardline$9 : ""])].concat(printedArguments.slice(1));
+ }
+ if (shouldGroupLast && i === args.length - 1) {
+ printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(function (p) {
+ return print(p, {
+ expandLastArg: true
+ });
+ }));
+ }
- if (isParametersInTestCall) {
- return concat$11([typeParams, "(", concat$11(printed), ")"]);
- }
+ i++;
+ }, "arguments");
+ var somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1);
+ var simpleConcat = concat$d(["(", concat$d(printedExpanded), ")"]);
+ return concat$d([somePrintedArgumentsWillBreak ? breakParent$3 : "", conditionalGroup$1([!somePrintedArgumentsWillBreak && !node.typeArguments && !node.typeParameters ? simpleConcat : ifBreak$6(allArgsBrokenOut(), simpleConcat), shouldGroupFirst ? concat$d(["(", group$b(printedExpanded[0], {
+ shouldBreak: true
+ }), concat$d(printedExpanded.slice(1)), ")"]) : concat$d(["(", concat$d(printedArguments.slice(0, -1)), group$b(getLast$2(printedExpanded), {
+ shouldBreak: true
+ }), ")"]), allArgsBrokenOut()], {
+ shouldBreak: shouldBreak
+ })]);
+ }
- var isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction(parent, options) || isTypeAnnotationAFunction(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType(fun[paramsField][0].typeAnnotation) && !fun.rest;
+ var contents = concat$d(["(", indent$7(concat$d([softline$6, concat$d(printedArguments)])), ifBreak$6(maybeTrailingComma), softline$6, ")"]);
- if (isFlowShorthandWithOneArg) {
- if (options.arrowParens === "always") {
- return concat$11(["(", concat$11(printed), ")"]);
+ if (isLongCurriedCallExpression$1(path)) {
+ // By not wrapping the arguments in a group, the printer prioritizes
+ // breaking up these arguments rather than the args of the parent call.
+ return contents;
}
- return concat$11(printed);
+ return group$b(contents, {
+ shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine
+ });
}
- var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest;
- return concat$11([typeParams, "(", indent$6(concat$11([softline$5, concat$11(printed)])), ifBreak$6(canHaveTrailingComma && shouldPrintComma$1(options, "all") ? "," : ""), softline$5, ")"]);
-}
+ function printTypeAnnotation(path, options, print) {
+ var node = path.getValue();
-function shouldPrintParamsWithoutParens(path, options) {
- if (options.arrowParens === "always") {
- return false;
- }
+ if (!node.typeAnnotation) {
+ return "";
+ }
- if (options.arrowParens === "avoid") {
- var node = path.getValue();
- return canPrintParamsWithoutParens(node);
- } // Fallback default; should be unreachable
+ var parentNode = path.getParentNode();
+ var isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite;
+ var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node;
+ if (isFlowAnnotationComment$1(options.originalText, node.typeAnnotation, options)) {
+ return concat$d([" /*: ", path.call(print, "typeAnnotation"), " */"]);
+ }
- return false;
-}
+ return concat$d([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path.call(print, "typeAnnotation")]);
+ }
-function canPrintParamsWithoutParens(node) {
- return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType;
-}
+ function printFunctionTypeParameters(path, options, print) {
+ var fun = path.getValue();
-function printFunctionDeclaration(path, print, options) {
- var n = path.getValue();
- var parts = [];
+ if (fun.typeArguments) {
+ return path.call(print, "typeArguments");
+ }
- if (n.async) {
- parts.push("async ");
+ if (fun.typeParameters) {
+ return path.call(print, "typeParameters");
+ }
+
+ return "";
}
- parts.push("function");
+ function printFunctionParams(path, print, options, expandArg, printTypeParams) {
+ var fun = path.getValue();
+ var parent = path.getParentNode();
+ var paramsField = fun.parameters ? "parameters" : "params";
+ var isParametersInTestCall = isTestCall$1(parent);
+ var shouldHugParameters = shouldHugArguments(fun);
+ var shouldExpandParameters = expandArg && !(fun[paramsField] && fun[paramsField].some(function (n) {
+ return n.comments;
+ }));
+ var typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : "";
+ var printed = [];
- if (n.generator) {
- parts.push("*");
- }
+ if (fun[paramsField]) {
+ var lastArgIndex = fun[paramsField].length - 1;
+ printed = path.map(function (childPath, index) {
+ var parts = [];
+ var param = childPath.getValue();
+ parts.push(print(childPath));
- if (n.id) {
- parts.push(" ", path.call(print, "id"));
- }
+ if (index === lastArgIndex) {
+ if (fun.rest) {
+ parts.push(",", line$7);
+ }
+ } else if (isParametersInTestCall || shouldHugParameters || shouldExpandParameters) {
+ parts.push(", ");
+ } else if (isNextLineEmpty$4(options.originalText, param, options)) {
+ parts.push(",", hardline$9, hardline$9);
+ } else {
+ parts.push(",", line$7);
+ }
- parts.push(printFunctionTypeParameters(path, options, print), group$10(concat$11([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? " " : "", path.call(print, "body"));
- return concat$11(parts);
-}
+ return concat$d(parts);
+ }, paramsField);
+ }
-function printObjectMethod(path, options, print) {
- var objMethod = path.getValue();
- var parts = [];
+ if (fun.rest) {
+ printed.push(concat$d(["...", path.call(print, "rest")]));
+ }
- if (objMethod.async) {
- parts.push("async ");
- }
+ if (printed.length === 0) {
+ return concat$d([typeParams, "(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true, function (comment) {
+ return getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")";
+ }), ")"]);
+ }
+
+ var lastParam = getLast$2(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the
+ // params of the first/last argument, we don't want the arguments to break and instead
+ // want the whole expression to be on a new line.
+ //
+ // Good: Bad:
+ // verylongcall( verylongcall((
+ // (a, b) => { a,
+ // } b,
+ // }) ) => {
+ // })
+
+ if (shouldExpandParameters) {
+ return group$b(concat$d([removeLines$2(typeParams), "(", concat$d(printed.map(removeLines$2)), ")"]));
+ } // Single object destructuring should hug
+ //
+ // function({
+ // a,
+ // b,
+ // c
+ // }) {}
+
+
+ var hasNotParameterDecorator = fun[paramsField].every(function (param) {
+ return !param.decorators;
+ });
- if (objMethod.generator) {
- parts.push("*");
- }
+ if (shouldHugParameters && hasNotParameterDecorator) {
+ return concat$d([typeParams, "(", concat$d(printed), ")"]);
+ } // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})`
- if (objMethod.method || objMethod.kind === "get" || objMethod.kind === "set") {
- return printMethod(path, options, print);
- }
- var key = printPropertyKey(path, options, print);
+ if (isParametersInTestCall) {
+ return concat$d([typeParams, "(", concat$d(printed), ")"]);
+ }
- if (objMethod.computed) {
- parts.push("[", key, "]");
- } else {
- parts.push(key);
- }
+ var isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction$1(parent, options) || isTypeAnnotationAFunction$1(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType$1(fun[paramsField][0].typeAnnotation) && !fun.rest;
- parts.push(printFunctionTypeParameters(path, options, print), group$10(concat$11([printFunctionParams(path, print, options), printReturnType(path, print, options)])), " ", path.call(print, "body"));
- return concat$11(parts);
-}
+ if (isFlowShorthandWithOneArg) {
+ if (options.arrowParens === "always") {
+ return concat$d(["(", concat$d(printed), ")"]);
+ }
-function printReturnType(path, print, options) {
- var n = path.getValue();
- var returnType = path.call(print, "returnType");
+ return concat$d(printed);
+ }
- if (n.returnType && isFlowAnnotationComment(options.originalText, n.returnType, options)) {
- return concat$11([" /*: ", returnType, " */"]);
+ var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest;
+ return concat$d([typeParams, "(", indent$7(concat$d([softline$6, concat$d(printed)])), ifBreak$6(canHaveTrailingComma && shouldPrintComma$1(options, "all") ? "," : ""), softline$6, ")"]);
}
- var parts = [returnType]; // prepend colon to TypeScript type annotation
+ function shouldPrintParamsWithoutParens(path, options) {
+ if (options.arrowParens === "always") {
+ return false;
+ }
+
+ if (options.arrowParens === "avoid") {
+ var node = path.getValue();
+ return canPrintParamsWithoutParens(node);
+ } // Fallback default; should be unreachable
- if (n.returnType && n.returnType.typeAnnotation) {
- parts.unshift(": ");
+
+ return false;
}
- if (n.predicate) {
- // The return type will already add the colon, but otherwise we
- // need to do it ourselves
- parts.push(n.returnType ? " " : ": ", path.call(print, "predicate"));
+ function canPrintParamsWithoutParens(node) {
+ return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments$1(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType;
}
- return concat$11(parts);
-}
+ function printFunctionDeclaration(path, print, options) {
+ var n = path.getValue();
+ var parts = [];
-function printExportDeclaration(path, options, print) {
- var decl = path.getValue();
- var semi = options.semi ? ";" : "";
- var parts = ["export "];
- var isDefault = decl["default"] || decl.type === "ExportDefaultDeclaration";
+ if (n.async) {
+ parts.push("async ");
+ }
- if (isDefault) {
- parts.push("default ");
- }
+ parts.push("function");
- parts.push(comments.printDanglingComments(path, options,
- /* sameIndent */
- true));
+ if (n.generator) {
+ parts.push("*");
+ }
+
+ if (n.id) {
+ parts.push(" ", path.call(print, "id"));
+ }
- if (needsHardlineAfterDanglingComment(decl)) {
- parts.push(hardline$8);
+ parts.push(printFunctionTypeParameters(path, options, print), group$b(concat$d([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? " " : "", path.call(print, "body"));
+ return concat$d(parts);
}
- if (decl.declaration) {
- parts.push(path.call(print, "declaration"));
+ function printReturnType(path, print, options) {
+ var n = path.getValue();
+ var returnType = path.call(print, "returnType");
- if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
- parts.push(semi);
+ if (n.returnType && isFlowAnnotationComment$1(options.originalText, n.returnType, options)) {
+ return concat$d([" /*: ", returnType, " */"]);
}
- } else {
- if (decl.specifiers && decl.specifiers.length > 0) {
- var specifiers = [];
- var defaultSpecifiers = [];
- var namespaceSpecifiers = [];
- path.each(function (specifierPath) {
- var specifierType = path.getValue().type;
-
- if (specifierType === "ExportSpecifier") {
- specifiers.push(print(specifierPath));
- } else if (specifierType === "ExportDefaultSpecifier") {
- defaultSpecifiers.push(print(specifierPath));
- } else if (specifierType === "ExportNamespaceSpecifier") {
- namespaceSpecifiers.push(concat$11(["* as ", print(specifierPath)]));
- }
- }, "specifiers");
- var isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0;
- var isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0);
- parts.push(decl.exportKind === "type" ? "type " : "", concat$11(defaultSpecifiers), concat$11([isDefaultFollowed ? ", " : ""]), concat$11(namespaceSpecifiers), concat$11([isNamespaceFollowed ? ", " : ""]), specifiers.length !== 0 ? group$10(concat$11(["{", indent$6(concat$11([options.bracketSpacing ? line$8 : softline$5, join$7(concat$11([",", line$8]), specifiers)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$8 : softline$5, "}"])) : "");
- } else {
- parts.push("{}");
+
+ var parts = [returnType]; // prepend colon to TypeScript type annotation
+
+ if (n.returnType && n.returnType.typeAnnotation) {
+ parts.unshift(": ");
}
- if (decl.source) {
- parts.push(" from ", path.call(print, "source"));
+ if (n.predicate) {
+ // The return type will already add the colon, but otherwise we
+ // need to do it ourselves
+ parts.push(n.returnType ? " " : ": ", path.call(print, "predicate"));
}
- parts.push(semi);
+ return concat$d(parts);
}
- return concat$11(parts);
-}
-
-function printFlowDeclaration(path, parts) {
- var parentExportDecl = getParentExportDeclaration$1(path);
+ function printExportDeclaration(path, options, print) {
+ var decl = path.getValue();
+ var semi = options.semi ? ";" : "";
+ var parts = ["export "];
+ var isDefault = decl["default"] || decl.type === "ExportDefaultDeclaration";
- if (parentExportDecl) {
- assert$3.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
- } else {
- // If the parent node has type DeclareExportDeclaration, then it
- // will be responsible for printing the "declare" token. Otherwise
- // it needs to be printed with this non-exported declaration node.
- parts.unshift("declare ");
- }
+ if (isDefault) {
+ parts.push("default ");
+ }
- return concat$11(parts);
-}
+ parts.push(comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
-function getFlowVariance(path) {
- if (!path.variance) {
- return null;
- } // Babel 7.0 currently uses variance node type, and flow should
- // follow suit soon:
- // https://github.com/babel/babel/issues/4722
+ if (needsHardlineAfterDanglingComment$1(decl)) {
+ parts.push(hardline$9);
+ }
+ if (decl.declaration) {
+ parts.push(path.call(print, "declaration"));
- var variance = path.variance.kind || path.variance;
+ if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
+ parts.push(semi);
+ }
+ } else {
+ if (decl.specifiers && decl.specifiers.length > 0) {
+ var specifiers = [];
+ var defaultSpecifiers = [];
+ var namespaceSpecifiers = [];
+ path.each(function (specifierPath) {
+ var specifierType = path.getValue().type;
+
+ if (specifierType === "ExportSpecifier") {
+ specifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportDefaultSpecifier") {
+ defaultSpecifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportNamespaceSpecifier") {
+ namespaceSpecifiers.push(concat$d(["* as ", print(specifierPath)]));
+ }
+ }, "specifiers");
+ var isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0;
+ var isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0);
+ var canBreak = specifiers.length > 1 || defaultSpecifiers.length > 0 || decl.specifiers && decl.specifiers.some(function (node) {
+ return node.comments;
+ });
+ var printed = "";
- switch (variance) {
- case "plus":
- return "+";
+ if (specifiers.length !== 0) {
+ if (canBreak) {
+ printed = group$b(concat$d(["{", indent$7(concat$d([options.bracketSpacing ? line$7 : softline$6, join$9(concat$d([",", line$7]), specifiers)])), ifBreak$6(shouldPrintComma$1(options) ? "," : ""), options.bracketSpacing ? line$7 : softline$6, "}"]));
+ } else {
+ printed = concat$d(["{", options.bracketSpacing ? " " : "", concat$d(specifiers), options.bracketSpacing ? " " : "", "}"]);
+ }
+ }
- case "minus":
- return "-";
+ parts.push(decl.exportKind === "type" ? "type " : "", concat$d(defaultSpecifiers), concat$d([isDefaultFollowed ? ", " : ""]), concat$d(namespaceSpecifiers), concat$d([isNamespaceFollowed ? ", " : ""]), printed);
+ } else {
+ parts.push("{}");
+ }
- default:
- /* istanbul ignore next */
- return variance;
- }
-}
+ if (decl.source) {
+ parts.push(" from ", path.call(print, "source"));
+ }
-function printTypeScriptModifiers(path, options, print) {
- var n = path.getValue();
+ parts.push(semi);
+ }
- if (!n.modifiers || !n.modifiers.length) {
- return "";
+ return concat$d(parts);
}
- return concat$11([join$7(" ", path.map(print, "modifiers")), " "]);
-}
+ function printFlowDeclaration(path, parts) {
+ var parentExportDecl = getParentExportDeclaration$1(path);
-function printTypeParameters(path, options, print, paramsKey) {
- var n = path.getValue();
+ if (parentExportDecl) {
+ assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
+ } else {
+ // If the parent node has type DeclareExportDeclaration, then it
+ // will be responsible for printing the "declare" token. Otherwise
+ // it needs to be printed with this non-exported declaration node.
+ parts.unshift("declare ");
+ }
- if (!n[paramsKey]) {
- return "";
- } // for TypeParameterDeclaration typeParameters is a single node
+ return concat$d(parts);
+ }
+ function printTypeScriptModifiers(path, options, print) {
+ var n = path.getValue();
+
+ if (!n.modifiers || !n.modifiers.length) {
+ return "";
+ }
- if (!Array.isArray(n[paramsKey])) {
- return path.call(print, paramsKey);
+ return concat$d([join$9(" ", path.map(print, "modifiers")), " "]);
}
- var grandparent = path.getNode(2);
- var isParameterInTestCall = grandparent != null && isTestCall(grandparent);
- var shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation");
+ function printTypeParameters(path, options, print, paramsKey) {
+ var n = path.getValue();
- if (shouldInline) {
- return concat$11(["<", join$7(", ", path.map(print, paramsKey)), ">"]);
- }
+ if (!n[paramsKey]) {
+ return "";
+ } // for TypeParameterDeclaration typeParameters is a single node
- return group$10(concat$11(["<", indent$6(concat$11([softline$5, join$7(concat$11([",", line$8]), path.map(print, paramsKey))])), ifBreak$6(options.parser !== "typescript" && shouldPrintComma$1(options, "all") ? "," : ""), softline$5, ">"]));
-}
-function printClass(path, options, print) {
- var n = path.getValue();
- var parts = [];
+ if (!Array.isArray(n[paramsKey])) {
+ return path.call(print, paramsKey);
+ }
- if (n.abstract) {
- parts.push("abstract ");
- }
+ var grandparent = path.getNode(2);
+ var greatGreatGrandParent = path.getNode(4);
+ var isParameterInTestCall = grandparent != null && isTestCall$1(grandparent);
+ var shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation" || // See https://github.com/prettier/prettier/pull/6467 for the context.
+ greatGreatGrandParent && greatGreatGrandParent.type === "VariableDeclarator" && grandparent && grandparent.type === "TSTypeAnnotation" && n[paramsKey][0].type !== "TSUnionType" && n[paramsKey][0].type !== "UnionTypeAnnotation" && n[paramsKey][0].type !== "TSConditionalType" && n[paramsKey][0].type !== "TSMappedType");
- parts.push("class");
+ if (shouldInline) {
+ return concat$d(["<", join$9(", ", path.map(print, paramsKey)), ">"]);
+ }
- if (n.id) {
- parts.push(" ", path.call(print, "id"));
+ return group$b(concat$d(["<", indent$7(concat$d([softline$6, join$9(concat$d([",", line$7]), path.map(print, paramsKey))])), ifBreak$6(options.parser !== "typescript" && shouldPrintComma$1(options, "all") ? "," : ""), softline$6, ">"]));
}
- parts.push(path.call(print, "typeParameters"));
- var partsGroup = [];
+ function printClass(path, options, print) {
+ var n = path.getValue();
+ var parts = [];
- if (n.superClass) {
- var printed = concat$11(["extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line
- // If there is only on extends and there are not comments
+ if (n.abstract) {
+ parts.push("abstract ");
+ }
- if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) {
- parts.push(concat$11([" ", path.call(function (superClass) {
- return comments.printComments(superClass, function () {
- return printed;
- }, options);
- }, "superClass")]));
- } else {
- partsGroup.push(group$10(concat$11([line$8, path.call(function (superClass) {
- return comments.printComments(superClass, function () {
- return printed;
- }, options);
- }, "superClass")])));
+ parts.push("class");
+
+ if (n.id) {
+ parts.push(" ", path.call(print, "id"));
}
- } else if (n.extends && n.extends.length > 0) {
- parts.push(" extends ", join$7(", ", path.map(print, "extends")));
- }
- if (n["mixins"] && n["mixins"].length > 0) {
- partsGroup.push(line$8, "mixins ", group$10(indent$6(join$7(concat$11([",", line$8]), path.map(print, "mixins")))));
- }
+ parts.push(path.call(print, "typeParameters"));
+ var partsGroup = [];
- if (n["implements"] && n["implements"].length > 0) {
- partsGroup.push(line$8, "implements", group$10(indent$6(concat$11([line$8, join$7(concat$11([",", line$8]), path.map(print, "implements"))]))));
- }
+ if (n.superClass) {
+ var printed = concat$d(["extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line
+ // If there is only on extends and there are not comments
- if (partsGroup.length > 0) {
- parts.push(group$10(indent$6(concat$11(partsGroup))));
- }
+ if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) {
+ parts.push(concat$d([" ", path.call(function (superClass) {
+ return comments.printComments(superClass, function () {
+ return printed;
+ }, options);
+ }, "superClass")]));
+ } else {
+ partsGroup.push(group$b(concat$d([line$7, path.call(function (superClass) {
+ return comments.printComments(superClass, function () {
+ return printed;
+ }, options);
+ }, "superClass")])));
+ }
+ } else if (n.extends && n.extends.length > 0) {
+ parts.push(" extends ", join$9(", ", path.map(print, "extends")));
+ }
- if (n.body && n.body.comments && hasLeadingOwnLineComment(options.originalText, n.body, options)) {
- parts.push(hardline$8);
- } else {
- parts.push(" ");
- }
+ if (n["mixins"] && n["mixins"].length > 0) {
+ partsGroup.push(line$7, "mixins ", group$b(indent$7(join$9(concat$d([",", line$7]), path.map(print, "mixins")))));
+ }
- parts.push(path.call(print, "body"));
- return parts;
-}
+ if (n["implements"] && n["implements"].length > 0) {
+ partsGroup.push(line$7, "implements", group$b(indent$7(concat$d([line$7, join$9(concat$d([",", line$7]), path.map(print, "implements"))]))));
+ }
-function printOptionalToken(path) {
- var node = path.getValue();
+ if (partsGroup.length > 0) {
+ parts.push(group$b(indent$7(concat$d(partsGroup))));
+ }
- if (!node.optional) {
- return "";
- }
+ if (n.body && n.body.comments && hasLeadingOwnLineComment$1(options.originalText, n.body, options)) {
+ parts.push(hardline$9);
+ } else {
+ parts.push(" ");
+ }
- if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) {
- return "?.";
+ parts.push(path.call(print, "body"));
+ return parts;
}
- return "?";
-}
+ function printOptionalToken(path) {
+ var node = path.getValue();
-function printMemberLookup(path, options, print) {
- var property = path.call(print, "property");
- var n = path.getValue();
- var optional = printOptionalToken(path);
+ if (!node.optional || // It's an optional computed method parsed by typescript-estree.
+ // "?" is printed in `printMethod`.
+ node.type === "Identifier" && node === path.getParentNode().key) {
+ return "";
+ }
- if (!n.computed) {
- return concat$11([optional, ".", property]);
- }
+ if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) {
+ return "?.";
+ }
- if (!n.property || isNumericLiteral(n.property)) {
- return concat$11([optional, "[", property, "]"]);
+ return "?";
}
- return group$10(concat$11([optional, "[", indent$6(concat$11([softline$5, property])), softline$5, "]"]));
-}
+ function printMemberLookup(path, options, print) {
+ var property = path.call(print, "property");
+ var n = path.getValue();
+ var optional = printOptionalToken(path);
-function printBindExpressionCallee(path, options, print) {
- return concat$11(["::", path.call(print, "callee")]);
-} // We detect calls on member expressions specially to format a
-// common pattern better. The pattern we are looking for is this:
-//
-// arr
-// .map(x => x + 1)
-// .filter(x => x > 10)
-// .some(x => x % 2)
-//
-// The way it is structured in the AST is via a nested sequence of
-// MemberExpression and CallExpression. We need to traverse the AST
-// and make groups out of it to print it in the desired way.
+ if (!n.computed) {
+ return concat$d([optional, ".", property]);
+ }
+ if (!n.property || isNumericLiteral$1(n.property)) {
+ return concat$d([optional, "[", property, "]"]);
+ }
-function printMemberChain(path, options, print) {
- // The first phase is to linearize the AST by traversing it down.
+ return group$b(concat$d([optional, "[", indent$7(concat$d([softline$6, property])), softline$6, "]"]));
+ }
+
+ function printBindExpressionCallee(path, options, print) {
+ return concat$d(["::", path.call(print, "callee")]);
+ } // We detect calls on member expressions specially to format a
+ // common pattern better. The pattern we are looking for is this:
+ //
+ // arr
+ // .map(x => x + 1)
+ // .filter(x => x > 10)
+ // .some(x => x % 2)
//
- // a().b()
- // has the following AST structure:
- // CallExpression(MemberExpression(CallExpression(Identifier)))
- // and we transform it into
- // [Identifier, CallExpression, MemberExpression, CallExpression]
- var printedNodes = []; // Here we try to retain one typed empty line after each call expression or
- // the first group whether it is in parentheses or not
+ // The way it is structured in the AST is via a nested sequence of
+ // MemberExpression and CallExpression. We need to traverse the AST
+ // and make groups out of it to print it in the desired way.
- function shouldInsertEmptyLineAfter(node) {
- var originalText = options.originalText;
- var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$2(originalText, node, options);
- var nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty
- // line after that parenthesis
- if (nextChar == ")") {
- return isNextLineEmptyAfterIndex$1(originalText, nextCharIndex + 1, options);
- }
+ function printMemberChain(path, options, print) {
+ // The first phase is to linearize the AST by traversing it down.
+ //
+ // a().b()
+ // has the following AST structure:
+ // CallExpression(MemberExpression(CallExpression(Identifier)))
+ // and we transform it into
+ // [Identifier, CallExpression, MemberExpression, CallExpression]
+ var printedNodes = []; // Here we try to retain one typed empty line after each call expression or
+ // the first group whether it is in parentheses or not
- return isNextLineEmpty$4(originalText, node, options);
- }
+ function shouldInsertEmptyLineAfter(node) {
+ var originalText = options.originalText;
+ var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$2(originalText, node, options);
+ var nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty
+ // line after that parenthesis
- function rec(path) {
- var node = path.getValue();
+ if (nextChar == ")") {
+ return isNextLineEmptyAfterIndex$1(originalText, nextCharIndex + 1, options);
+ }
- if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) {
- printedNodes.unshift({
- node: node,
- printed: concat$11([comments.printComments(path, function () {
- return concat$11([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]);
- }, options), shouldInsertEmptyLineAfter(node) ? hardline$8 : ""])
- });
- path.call(function (callee) {
- return rec(callee);
- }, "callee");
- } else if (isMemberish(node)) {
- printedNodes.unshift({
- node: node,
- needsParens: needsParens_1(path, options),
- printed: comments.printComments(path, function () {
- return node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print);
- }, options)
- });
- path.call(function (object) {
- return rec(object);
- }, "object");
- } else if (node.type === "TSNonNullExpression") {
- printedNodes.unshift({
- node: node,
- printed: comments.printComments(path, function () {
- return "!";
- }, options)
- });
- path.call(function (expression) {
- return rec(expression);
- }, "expression");
- } else {
- printedNodes.unshift({
- node: node,
- printed: path.call(print)
- });
+ return isNextLineEmpty$4(originalText, node, options);
}
- } // Note: the comments of the root node have already been printed, so we
- // need to extract this first call without printing them as they would
- // if handled inside of the recursive call.
+ function rec(path) {
+ var node = path.getValue();
+
+ if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish$1(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) {
+ printedNodes.unshift({
+ node: node,
+ printed: concat$d([comments.printComments(path, function () {
+ return concat$d([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]);
+ }, options), shouldInsertEmptyLineAfter(node) ? hardline$9 : ""])
+ });
+ path.call(function (callee) {
+ return rec(callee);
+ }, "callee");
+ } else if (isMemberish$1(node)) {
+ printedNodes.unshift({
+ node: node,
+ needsParens: needsParens_1(path, options),
+ printed: comments.printComments(path, function () {
+ return node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print);
+ }, options)
+ });
+ path.call(function (object) {
+ return rec(object);
+ }, "object");
+ } else if (node.type === "TSNonNullExpression") {
+ printedNodes.unshift({
+ node: node,
+ printed: comments.printComments(path, function () {
+ return "!";
+ }, options)
+ });
+ path.call(function (expression) {
+ return rec(expression);
+ }, "expression");
+ } else {
+ printedNodes.unshift({
+ node: node,
+ printed: path.call(print)
+ });
+ }
+ } // Note: the comments of the root node have already been printed, so we
+ // need to extract this first call without printing them as they would
+ // if handled inside of the recursive call.
- var node = path.getValue();
- printedNodes.unshift({
- node: node,
- printed: concat$11([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)])
- });
- path.call(function (callee) {
- return rec(callee);
- }, "callee"); // Once we have a linear list of printed nodes, we want to create groups out
- // of it.
- //
- // a().b.c().d().e
- // will be grouped as
- // [
- // [Identifier, CallExpression],
- // [MemberExpression, MemberExpression, CallExpression],
- // [MemberExpression, CallExpression],
- // [MemberExpression],
- // ]
- // so that we can print it as
- // a()
- // .b.c()
- // .d()
- // .e
- // The first group is the first node followed by
- // - as many CallExpression as possible
- // < fn()()() >.something()
- // - as many array acessors as possible
- // < fn()[0][1][2] >.something()
- // - then, as many MemberExpression as possible but the last one
- // < this.items >.something()
-
- var groups = [];
- var currentGroup = [printedNodes[0]];
- var i = 1;
-
- for (; i < printedNodes.length; ++i) {
- if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) {
- currentGroup.push(printedNodes[i]);
- } else {
- break;
- }
- }
- if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") {
- for (; i + 1 < printedNodes.length; ++i) {
- if (isMemberish(printedNodes[i].node) && isMemberish(printedNodes[i + 1].node)) {
+ var node = path.getValue();
+ printedNodes.unshift({
+ node: node,
+ printed: concat$d([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)])
+ });
+ path.call(function (callee) {
+ return rec(callee);
+ }, "callee"); // Once we have a linear list of printed nodes, we want to create groups out
+ // of it.
+ //
+ // a().b.c().d().e
+ // will be grouped as
+ // [
+ // [Identifier, CallExpression],
+ // [MemberExpression, MemberExpression, CallExpression],
+ // [MemberExpression, CallExpression],
+ // [MemberExpression],
+ // ]
+ // so that we can print it as
+ // a()
+ // .b.c()
+ // .d()
+ // .e
+ // The first group is the first node followed by
+ // - as many CallExpression as possible
+ // < fn()()() >.something()
+ // - as many array accessors as possible
+ // < fn()[0][1][2] >.something()
+ // - then, as many MemberExpression as possible but the last one
+ // < this.items >.something()
+
+ var groups = [];
+ var currentGroup = [printedNodes[0]];
+ var i = 1;
+
+ for (; i < printedNodes.length; ++i) {
+ if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
currentGroup.push(printedNodes[i]);
} else {
break;
}
}
- }
- groups.push(currentGroup);
- currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by
- // a sequence of CallExpression. To compute it, we keep adding things to the
- // group until we has seen a CallExpression in the past and reach a
- // MemberExpression
+ if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") {
+ for (; i + 1 < printedNodes.length; ++i) {
+ if (isMemberish$1(printedNodes[i].node) && isMemberish$1(printedNodes[i + 1].node)) {
+ currentGroup.push(printedNodes[i]);
+ } else {
+ break;
+ }
+ }
+ }
- var hasSeenCallExpression = false;
+ groups.push(currentGroup);
+ currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by
+ // a sequence of CallExpression. To compute it, we keep adding things to the
+ // group until we has seen a CallExpression in the past and reach a
+ // MemberExpression
+
+ var hasSeenCallExpression = false;
+
+ for (; i < printedNodes.length; ++i) {
+ if (hasSeenCallExpression && isMemberish$1(printedNodes[i].node)) {
+ // [0] should be appended at the end of the group instead of the
+ // beginning of the next one
+ if (printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
+ currentGroup.push(printedNodes[i]);
+ continue;
+ }
- for (; i < printedNodes.length; ++i) {
- if (hasSeenCallExpression && isMemberish(printedNodes[i].node)) {
- // [0] should be appended at the end of the group instead of the
- // beginning of the next one
- if (printedNodes[i].node.computed && isNumericLiteral(printedNodes[i].node.property)) {
- currentGroup.push(printedNodes[i]);
- continue;
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
}
- groups.push(currentGroup);
- currentGroup = [];
- hasSeenCallExpression = false;
- }
+ if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") {
+ hasSeenCallExpression = true;
+ }
- if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") {
- hasSeenCallExpression = true;
- }
+ currentGroup.push(printedNodes[i]);
- currentGroup.push(printedNodes[i]);
+ if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(function (comment) {
+ return comment.trailing;
+ })) {
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
+ }
+ }
- if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(function (comment) {
- return comment.trailing;
- })) {
+ if (currentGroup.length > 0) {
groups.push(currentGroup);
- currentGroup = [];
- hasSeenCallExpression = false;
- }
- }
+ } // There are cases like Object.keys(), Observable.of(), _.values() where
+ // they are the subject of all the chained calls and therefore should
+ // be kept on the same line:
+ //
+ // Object.keys(items)
+ // .filter(x => x)
+ // .map(x => x)
+ //
+ // In order to detect those cases, we use an heuristic: if the first
+ // node is an identifier with the name starting with a capital
+ // letter or just a sequence of _$. The rationale is that they are
+ // likely to be factories.
- if (currentGroup.length > 0) {
- groups.push(currentGroup);
- } // There are cases like Object.keys(), Observable.of(), _.values() where
- // they are the subject of all the chained calls and therefore should
- // be kept on the same line:
- //
- // Object.keys(items)
- // .filter(x => x)
- // .map(x => x)
- //
- // In order to detect those cases, we use an heuristic: if the first
- // node is an identifier with the name starting with a capital
- // letter or just a sequence of _$. The rationale is that they are
- // likely to be factories.
+ function isFactory(name) {
+ return /^[A-Z]|^[_$]+$/.test(name);
+ } // In case the Identifier is shorter than tab width, we can keep the
+ // first call in a single line, if it's an ExpressionStatement.
+ //
+ // d3.scaleLinear()
+ // .domain([0, 100])
+ // .range([0, width]);
+ //
- function isFactory(name) {
- return /^[A-Z]|^[_$]+$/.test(name);
- } // In case the Identifier is shorter than tab width, we can keep the
- // first call in a single line, if it's an ExpressionStatement.
- //
- // d3.scaleLinear()
- // .domain([0, 100])
- // .range([0, width]);
- //
+ function isShort(name) {
+ return name.length <= options.tabWidth;
+ }
- function isShort(name) {
- return name.length <= options.tabWidth;
- }
+ function shouldNotWrap(groups) {
+ var parent = path.getParentNode();
+ var isExpression = parent && parent.type === "ExpressionStatement";
+ var hasComputed = groups[1].length && groups[1][0].node.computed;
- function shouldNotWrap(groups) {
- var parent = path.getParentNode();
- var isExpression = parent && parent.type === "ExpressionStatement";
- var hasComputed = groups[1].length && groups[1][0].node.computed;
+ if (groups[0].length === 1) {
+ var firstNode = groups[0][0].node;
+ return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed);
+ }
- if (groups[0].length === 1) {
- var firstNode = groups[0][0].node;
- return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed);
+ var lastNode = getLast$2(groups[0]).node;
+ return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed);
}
- var lastNode = getLast$3(groups[0]).node;
- return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed);
- }
+ var shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups);
- var shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups);
+ function printGroup(printedGroup) {
+ var printed = printedGroup.map(function (tuple) {
+ return tuple.printed;
+ }); // Checks if the last node (i.e. the parent node) needs parens and print
+ // accordingly
- function printGroup(printedGroup) {
- var printed = printedGroup.map(function (tuple) {
- return tuple.printed;
- }); // Checks if the last node (i.e. the parent node) needs parens and print
- // accordingly
+ if (printedGroup.length > 0 && printedGroup[printedGroup.length - 1].needsParens) {
+ return concat$d(["("].concat(_toConsumableArray(printed), [")"]));
+ }
- if (printedGroup.length > 0 && printedGroup[printedGroup.length - 1].needsParens) {
- return concat$11(["("].concat(_toConsumableArray(printed), [")"]));
+ return concat$d(printed);
}
- return concat$11(printed);
- }
+ function printIndentedGroup(groups) {
+ if (groups.length === 0) {
+ return "";
+ }
- function printIndentedGroup(groups) {
- if (groups.length === 0) {
- return "";
+ return indent$7(group$b(concat$d([hardline$9, join$9(hardline$9, groups.map(printGroup))])));
}
- return indent$6(group$10(concat$11([hardline$8, join$7(hardline$8, groups.map(printGroup))])));
- }
-
- var printedGroups = groups.map(printGroup);
- var oneLine = concat$11(printedGroups);
- var cutoff = shouldMerge ? 3 : 2;
- var flatGroups = groups.slice(0, cutoff).reduce(function (res, group) {
- return res.concat(group);
- }, []);
- var hasComment = flatGroups.slice(1, -1).some(function (node) {
- return hasLeadingComment(node.node);
- }) || flatGroups.slice(0, -1).some(function (node) {
- return hasTrailingComment(node.node);
- }) || groups[cutoff] && hasLeadingComment(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just
- // render everything concatenated together.
+ var printedGroups = groups.map(printGroup);
+ var oneLine = concat$d(printedGroups);
+ var cutoff = shouldMerge ? 3 : 2;
+ var flatGroups = groups.slice(0, cutoff).reduce(function (res, group) {
+ return res.concat(group);
+ }, []);
+ var hasComment = flatGroups.slice(1, -1).some(function (node) {
+ return hasLeadingComment$3(node.node);
+ }) || flatGroups.slice(0, -1).some(function (node) {
+ return hasTrailingComment$1(node.node);
+ }) || groups[cutoff] && hasLeadingComment$3(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just
+ // render everything concatenated together.
- if (groups.length <= cutoff && !hasComment) {
- return group$10(oneLine);
- } // Find out the last node in the first group and check if it has an
- // empty line after
+ if (groups.length <= cutoff && !hasComment) {
+ if (isLongCurriedCallExpression$1(path)) {
+ return oneLine;
+ }
+ return group$b(oneLine);
+ } // Find out the last node in the first group and check if it has an
+ // empty line after
- var lastNodeBeforeIndent = getLast$3(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node;
- var shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent);
- var expanded = concat$11([printGroup(groups[0]), shouldMerge ? concat$11(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$8 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]);
- var callExpressions = printedNodes.map(function (_ref) {
- var node = _ref.node;
- return node;
- }).filter(isCallOrOptionalCallExpression); // We don't want to print in one line if there's:
- // * A comment.
- // * 3 or more chained calls.
- // * Any group but the last one has a hard line.
- // If the last group is a function it's okay to inline if it fits.
- if (hasComment || callExpressions.length >= 3 || printedGroups.slice(0, -1).some(willBreak$1) ||
- /**
- * scopes.filter(scope => scope.value !== '').map((scope, i) => {
- * // multi line content
- * })
- */
- function (lastGroupDoc, lastGroupNode) {
- return isCallOrOptionalCallExpression(lastGroupNode) && willBreak$1(lastGroupDoc);
- }(getLast$3(printedGroups), getLast$3(getLast$3(groups)).node) && callExpressions.slice(0, -1).some(function (n) {
- return n.arguments.some(isFunctionOrArrowExpression);
- })) {
- return group$10(expanded);
- }
-
- return concat$11([// We only need to check `oneLine` because if `expanded` is chosen
- // that means that the parent group has already been broken
- // naturally
- willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$3 : "", conditionalGroup$1([oneLine, expanded])]);
-}
-
-function isCallOrOptionalCallExpression(node) {
- return node.type === "CallExpression" || node.type === "OptionalCallExpression";
-}
-
-function isJSXNode(node) {
- return node.type === "JSXElement" || node.type === "JSXFragment";
-}
-
-function isEmptyJSXElement(node) {
- if (node.children.length === 0) {
- return true;
- }
+ var lastNodeBeforeIndent = getLast$2(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node;
+ var shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent);
+ var expanded = concat$d([printGroup(groups[0]), shouldMerge ? concat$d(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$9 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]);
+ var callExpressions = printedNodes.map(function (_ref) {
+ var node = _ref.node;
+ return node;
+ }).filter(isCallOrOptionalCallExpression$1); // We don't want to print in one line if there's:
+ // * A comment.
+ // * 3 or more chained calls.
+ // * Any group but the last one has a hard line.
+ // If the last group is a function it's okay to inline if it fits.
- if (node.children.length > 1) {
- return false;
- } // if there is one text child and does not contain any meaningful text
- // we can treat the element as empty.
-
-
- var child = node.children[0];
- return isLiteral(child) && !isMeaningfulJSXText(child);
-} // Only space, newline, carriage return, and tab are treated as whitespace
-// inside JSX.
-
-
-var jsxWhitespaceChars = " \n\r\t";
-var containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]");
-var matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)"); // Meaningful if it contains non-whitespace characters,
-// or it contains whitespace without a new line.
-
-function isMeaningfulJSXText(node) {
- return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node)));
-}
-
-function conditionalExpressionChainContainsJSX(node) {
- return Boolean(getConditionalChainContents(node).find(isJSXNode));
-} // If we have nested conditional expressions, we want to print them in JSX mode
-// if there's at least one JSXElement somewhere in the tree.
-//
-// A conditional expression chain like this should be printed in normal mode,
-// because there aren't JSXElements anywhere in it:
-//
-// isA ? "A" : isB ? "B" : isC ? "C" : "Unknown";
-//
-// But a conditional expression chain like this should be printed in JSX mode,
-// because there is a JSXElement in the last ConditionalExpression:
-//
-// isA ? "A" : isB ? "B" : isC ? "C" : <span className="warning">Unknown</span>;
-//
-// This type of ConditionalExpression chain is structured like this in the AST:
-//
-// ConditionalExpression {
-// test: ...,
-// consequent: ...,
-// alternate: ConditionalExpression {
-// test: ...,
-// consequent: ...,
-// alternate: ConditionalExpression {
-// test: ...,
-// consequent: ...,
-// alternate: ...,
-// }
-// }
-// }
-//
-// We want to traverse over that shape and convert it into a flat structure so
-// that we can find if there's a JSXElement somewhere inside.
-
-
-function getConditionalChainContents(node) {
- // Given this code:
- //
- // // Using a ConditionalExpression as the consequent is uncommon, but should
- // // be handled.
- // A ? B : C ? D : E ? F ? G : H : I
- //
- // which has this AST:
- //
- // ConditionalExpression {
- // test: Identifier(A),
- // consequent: Identifier(B),
- // alternate: ConditionalExpression {
- // test: Identifier(C),
- // consequent: Identifier(D),
- // alternate: ConditionalExpression {
- // test: Identifier(E),
- // consequent: ConditionalExpression {
- // test: Identifier(F),
- // consequent: Identifier(G),
- // alternate: Identifier(H),
- // },
- // alternate: Identifier(I),
- // }
- // }
- // }
- //
- // we should return this Array:
- //
- // [
- // Identifier(A),
- // Identifier(B),
- // Identifier(C),
- // Identifier(D),
- // Identifier(E),
- // Identifier(F),
- // Identifier(G),
- // Identifier(H),
- // Identifier(I)
- // ];
- //
- // This loses the information about whether each node was the test,
- // consequent, or alternate, but we don't care about that here- we are only
- // flattening this structure to find if there's any JSXElements inside.
- var nonConditionalExpressions = [];
-
- function recurse(node) {
- if (node.type === "ConditionalExpression") {
- recurse(node.test);
- recurse(node.consequent);
- recurse(node.alternate);
- } else {
- nonConditionalExpressions.push(node);
+ if (hasComment || callExpressions.length >= 3 || printedGroups.slice(0, -1).some(willBreak$1) ||
+ /**
+ * scopes.filter(scope => scope.value !== '').map((scope, i) => {
+ * // multi line content
+ * })
+ */
+ function (lastGroupDoc, lastGroupNode) {
+ return isCallOrOptionalCallExpression$1(lastGroupNode) && willBreak$1(lastGroupDoc);
+ }(getLast$2(printedGroups), getLast$2(getLast$2(groups)).node) && callExpressions.slice(0, -1).some(function (n) {
+ return n.arguments.some(isFunctionOrArrowExpression$1);
+ })) {
+ return group$b(expanded);
}
- }
-
- recurse(node);
- return nonConditionalExpressions;
-} // Detect an expression node representing `{" "}`
+ return concat$d([// We only need to check `oneLine` because if `expanded` is chosen
+ // that means that the parent group has already been broken
+ // naturally
+ willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$3 : "", conditionalGroup$1([oneLine, expanded])]);
+ }
-function isJSXWhitespaceExpression(node) {
- return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments;
-}
+ function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return "";
+ }
-function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
- if (isFacebookTranslationTag) {
- return "";
- }
+ if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) {
+ return child.length === 1 ? softline$6 : hardline$9;
+ }
- if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) {
- return child.length === 1 ? softline$5 : hardline$8;
+ return softline$6;
}
- return softline$5;
-}
+ function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return hardline$9;
+ }
-function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
- if (isFacebookTranslationTag) {
- return hardline$8;
- }
+ if (child.length === 1) {
+ return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$9 : softline$6;
+ }
- if (child.length === 1) {
- return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$8 : softline$5;
- }
+ return hardline$9;
+ } // JSX Children are strange, mostly for two reasons:
+ // 1. JSX reads newlines into string values, instead of skipping them like JS
+ // 2. up to one whitespace between elements within a line is significant,
+ // but not between lines.
+ //
+ // Leading, trailing, and lone whitespace all need to
+ // turn themselves into the rather ugly `{' '}` when breaking.
+ //
+ // We print JSX using the `fill` doc primitive.
+ // This requires that we give it an array of alternating
+ // content and whitespace elements.
+ // To ensure this we add dummy `""` content elements as needed.
- return hardline$8;
-} // JSX Children are strange, mostly for two reasons:
-// 1. JSX reads newlines into string values, instead of skipping them like JS
-// 2. up to one whitespace between elements within a line is significant,
-// but not between lines.
-//
-// Leading, trailing, and lone whitespace all need to
-// turn themselves into the rather ugly `{' '}` when breaking.
-//
-// We print JSX using the `fill` doc primitive.
-// This requires that we give it an array of alternating
-// content and whitespace elements.
-// To ensure this we add dummy `""` content elements as needed.
+ function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) {
+ var n = path.getValue();
+ var children = []; // using `map` instead of `each` because it provides `i`
-function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) {
- var n = path.getValue();
- var children = []; // using `map` instead of `each` because it provides `i`
+ path.map(function (childPath, i) {
+ var child = childPath.getValue();
- path.map(function (childPath, i) {
- var child = childPath.getValue();
+ if (isLiteral$1(child)) {
+ var text = rawText$1(child); // Contains a non-whitespace character
- if (isLiteral(child)) {
- var text = rawText(child); // Contains a non-whitespace character
+ if (isMeaningfulJSXText$1(child)) {
+ var words = text.split(matchJsxWhitespaceRegex$1); // Starts with whitespace
- if (isMeaningfulJSXText(child)) {
- var words = text.split(matchJsxWhitespaceRegex); // Starts with whitespace
+ if (words[0] === "") {
+ children.push("");
+ words.shift();
- if (words[0] === "") {
- children.push("");
- words.shift();
+ if (/\n/.test(words[0])) {
+ var next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next));
+ } else {
+ children.push(jsxWhitespace);
+ }
- if (/\n/.test(words[0])) {
- var next = n.children[i + 1];
- children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next));
- } else {
- children.push(jsxWhitespace);
+ words.shift();
}
- words.shift();
- }
+ var endWhitespace; // Ends with whitespace
- var endWhitespace; // Ends with whitespace
+ if (getLast$2(words) === "") {
+ words.pop();
+ endWhitespace = words.pop();
+ } // This was whitespace only without a new line.
- if (getLast$3(words) === "") {
- words.pop();
- endWhitespace = words.pop();
- } // This was whitespace only without a new line.
+ if (words.length === 0) {
+ return;
+ }
- if (words.length === 0) {
- return;
- }
+ words.forEach(function (word, i) {
+ if (i % 2 === 1) {
+ children.push(line$7);
+ } else {
+ children.push(word);
+ }
+ });
- words.forEach(function (word, i) {
- if (i % 2 === 1) {
- children.push(line$8);
+ if (endWhitespace !== undefined) {
+ if (/\n/.test(endWhitespace)) {
+ var _next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$2(children), child, _next));
+ } else {
+ children.push(jsxWhitespace);
+ }
} else {
- children.push(word);
+ var _next2 = n.children[i + 1];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$2(children), child, _next2));
}
- });
-
- if (endWhitespace !== undefined) {
- if (/\n/.test(endWhitespace)) {
- var _next = n.children[i + 1];
- children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$3(children), child, _next));
- } else {
- children.push(jsxWhitespace);
+ } else if (/\n/.test(text)) {
+ // Keep (up to one) blank line between tags/expressions/text.
+ // Note: We don't keep blank lines between text elements.
+ if (text.match(/\n/g).length > 1) {
+ children.push("");
+ children.push(hardline$9);
}
} else {
- var _next2 = n.children[i + 1];
- children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$3(children), child, _next2));
- }
- } else if (/\n/.test(text)) {
- // Keep (up to one) blank line between tags/expressions/text.
- // Note: We don't keep blank lines between text elements.
- if (text.match(/\n/g).length > 1) {
children.push("");
- children.push(hardline$8);
+ children.push(jsxWhitespace);
}
} else {
- children.push("");
- children.push(jsxWhitespace);
- }
- } else {
- var printedChild = print(childPath);
- children.push(printedChild);
- var _next3 = n.children[i + 1];
+ var printedChild = print(childPath);
+ children.push(printedChild);
+ var _next3 = n.children[i + 1];
- var directlyFollowedByMeaningfulText = _next3 && isMeaningfulJSXText(_next3);
+ var directlyFollowedByMeaningfulText = _next3 && isMeaningfulJSXText$1(_next3);
- if (directlyFollowedByMeaningfulText) {
- var firstWord = rawText(_next3).trim().split(matchJsxWhitespaceRegex)[0];
- children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, _next3));
- } else {
- children.push(hardline$8);
+ if (directlyFollowedByMeaningfulText) {
+ var firstWord = rawText$1(_next3).trim().split(matchJsxWhitespaceRegex$1)[0];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, _next3));
+ } else {
+ children.push(hardline$9);
+ }
}
- }
- }, "children");
- return children;
-} // JSX expands children from the inside-out, instead of the outside-in.
-// This is both to break children before attributes,
-// and to ensure that when children break, their parents do as well.
-//
-// Any element that is written without any newlines and fits on a single line
-// is left that way.
-// Not only that, any user-written-line containing multiple JSX siblings
-// should also be kept on one line if possible,
-// so each user-written-line is wrapped in its own group.
-//
-// Elements that contain newlines or don't fit on a single line (recursively)
-// are fully-split, using hardline and shouldBreak: true.
-//
-// To support that case properly, all leading and trailing spaces
-// are stripped from the list of children, and replaced with a single hardline.
+ }, "children");
+ return children;
+ } // JSX expands children from the inside-out, instead of the outside-in.
+ // This is both to break children before attributes,
+ // and to ensure that when children break, their parents do as well.
+ //
+ // Any element that is written without any newlines and fits on a single line
+ // is left that way.
+ // Not only that, any user-written-line containing multiple JSX siblings
+ // should also be kept on one line if possible,
+ // so each user-written-line is wrapped in its own group.
+ //
+ // Elements that contain newlines or don't fit on a single line (recursively)
+ // are fully-split, using hardline and shouldBreak: true.
+ //
+ // To support that case properly, all leading and trailing spaces
+ // are stripped from the list of children, and replaced with a single hardline.
-function printJSXElement(path, options, print) {
- var n = path.getValue();
+ function printJSXElement(path, options, print) {
+ var n = path.getValue();
- if (n.type === "JSXElement" && isEmptyJSXElement(n)) {
- return concat$11([path.call(print, "openingElement"), path.call(print, "closingElement")]);
- }
+ if (n.type === "JSXElement" && isEmptyJSXElement$1(n)) {
+ return concat$d([path.call(print, "openingElement"), path.call(print, "closingElement")]);
+ }
- var openingLines = n.type === "JSXElement" ? path.call(print, "openingElement") : path.call(print, "openingFragment");
- var closingLines = n.type === "JSXElement" ? path.call(print, "closingElement") : path.call(print, "closingFragment");
+ var openingLines = n.type === "JSXElement" ? path.call(print, "openingElement") : path.call(print, "openingFragment");
+ var closingLines = n.type === "JSXElement" ? path.call(print, "closingElement") : path.call(print, "closingFragment");
- if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) {
- return concat$11([openingLines, concat$11(path.map(print, "children")), closingLines]);
- } // Convert `{" "}` to text nodes containing a space.
- // This makes it easy to turn them into `jsxWhitespace` which
- // can then print as either a space or `{" "}` when breaking.
+ if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) {
+ return concat$d([openingLines, concat$d(path.map(print, "children")), closingLines]);
+ } // Convert `{" "}` to text nodes containing a space.
+ // This makes it easy to turn them into `jsxWhitespace` which
+ // can then print as either a space or `{" "}` when breaking.
- n.children = n.children.map(function (child) {
- if (isJSXWhitespaceExpression(child)) {
- return {
- type: "JSXText",
- value: " ",
- raw: " "
- };
- }
+ n.children = n.children.map(function (child) {
+ if (isJSXWhitespaceExpression$1(child)) {
+ return {
+ type: "JSXText",
+ value: " ",
+ raw: " "
+ };
+ }
- return child;
- });
- var containsTag = n.children.filter(isJSXNode).length > 0;
- var containsMultipleExpressions = n.children.filter(function (child) {
- return child.type === "JSXExpressionContainer";
- }).length > 1;
- var containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true.
-
- var forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions;
- var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
- var jsxWhitespace = ifBreak$6(concat$11([rawJsxWhitespace, softline$5]), " ");
- var isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt";
- var children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag);
- var containsText = n.children.filter(function (child) {
- return isMeaningfulJSXText(child);
- }).length > 0; // We can end up we multiple whitespace elements with empty string
- // content between them.
- // We need to remove empty whitespace and softlines before JSX whitespace
- // to get the correct output.
-
- for (var i = children.length - 2; i >= 0; i--) {
- var isPairOfEmptyStrings = children[i] === "" && children[i + 1] === "";
- var isPairOfHardlines = children[i] === hardline$8 && children[i + 1] === "" && children[i + 2] === hardline$8;
- var isLineFollowedByJSXWhitespace = (children[i] === softline$5 || children[i] === hardline$8) && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
- var isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$5 || children[i + 2] === hardline$8);
- var isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
- var isPairOfHardOrSoftLines = children[i] === softline$5 && children[i + 1] === "" && children[i + 2] === hardline$8 || children[i] === hardline$8 && children[i + 1] === "" && children[i + 2] === softline$5;
-
- if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) {
- children.splice(i, 2);
- } else if (isJSXWhitespaceFollowedByLine) {
- children.splice(i + 1, 2);
- }
- } // Trim trailing lines (or empty strings)
-
-
- while (children.length && (isLineNext$1(getLast$3(children)) || isEmpty$1(getLast$3(children)))) {
- children.pop();
- } // Trim leading lines (or empty strings)
-
-
- while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) {
- children.shift();
- children.shift();
- } // Tweak how we format children if outputting this element over multiple lines.
- // Also detect whether we will force this element to output over multiple lines.
-
-
- var multilineChildren = [];
- children.forEach(function (child, i) {
- // There are a number of situations where we need to ensure we display
- // whitespace as `{" "}` when outputting this element over multiple lines.
- if (child === jsxWhitespace) {
- if (i === 1 && children[i - 1] === "") {
- if (children.length === 2) {
- // Solitary whitespace
+ return child;
+ });
+ var containsTag = n.children.filter(isJSXNode$1).length > 0;
+ var containsMultipleExpressions = n.children.filter(function (child) {
+ return child.type === "JSXExpressionContainer";
+ }).length > 1;
+ var containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true.
+
+ var forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions;
+ var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
+ var jsxWhitespace = ifBreak$6(concat$d([rawJsxWhitespace, softline$6]), " ");
+ var isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt";
+ var children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag);
+ var containsText = n.children.filter(function (child) {
+ return isMeaningfulJSXText$1(child);
+ }).length > 0; // We can end up we multiple whitespace elements with empty string
+ // content between them.
+ // We need to remove empty whitespace and softlines before JSX whitespace
+ // to get the correct output.
+
+ for (var i = children.length - 2; i >= 0; i--) {
+ var isPairOfEmptyStrings = children[i] === "" && children[i + 1] === "";
+ var isPairOfHardlines = children[i] === hardline$9 && children[i + 1] === "" && children[i + 2] === hardline$9;
+ var isLineFollowedByJSXWhitespace = (children[i] === softline$6 || children[i] === hardline$9) && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ var isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$6 || children[i + 2] === hardline$9);
+ var isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ var isPairOfHardOrSoftLines = children[i] === softline$6 && children[i + 1] === "" && children[i + 2] === hardline$9 || children[i] === hardline$9 && children[i + 1] === "" && children[i + 2] === softline$6;
+
+ if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) {
+ children.splice(i, 2);
+ } else if (isJSXWhitespaceFollowedByLine) {
+ children.splice(i + 1, 2);
+ }
+ } // Trim trailing lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(getLast$2(children)) || isEmpty$1(getLast$2(children)))) {
+ children.pop();
+ } // Trim leading lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) {
+ children.shift();
+ children.shift();
+ } // Tweak how we format children if outputting this element over multiple lines.
+ // Also detect whether we will force this element to output over multiple lines.
+
+
+ var multilineChildren = [];
+ children.forEach(function (child, i) {
+ // There are a number of situations where we need to ensure we display
+ // whitespace as `{" "}` when outputting this element over multiple lines.
+ if (child === jsxWhitespace) {
+ if (i === 1 && children[i - 1] === "") {
+ if (children.length === 2) {
+ // Solitary whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } // Leading whitespace
+
+
+ multilineChildren.push(concat$d([rawJsxWhitespace, hardline$9]));
+ return;
+ } else if (i === children.length - 1) {
+ // Trailing whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } else if (children[i - 1] === "" && children[i - 2] === hardline$9) {
+ // Whitespace after line break
multilineChildren.push(rawJsxWhitespace);
return;
- } // Leading whitespace
+ }
+ }
+ multilineChildren.push(child);
- multilineChildren.push(concat$11([rawJsxWhitespace, hardline$8]));
- return;
- } else if (i === children.length - 1) {
- // Trailing whitespace
- multilineChildren.push(rawJsxWhitespace);
- return;
- } else if (children[i - 1] === "" && children[i - 2] === hardline$8) {
- // Whitespace after line break
- multilineChildren.push(rawJsxWhitespace);
- return;
+ if (willBreak$1(child)) {
+ forcedBreak = true;
}
- }
+ }); // If there is text we use `fill` to fit as much onto each line as possible.
+ // When there is no text (just tags and expressions) we use `group`
+ // to output each on a separate line.
- multilineChildren.push(child);
+ var content = containsText ? fill$4(multilineChildren) : group$b(concat$d(multilineChildren), {
+ shouldBreak: true
+ });
+ var multiLineElem = group$b(concat$d([openingLines, indent$7(concat$d([hardline$9, content])), hardline$9, closingLines]));
- if (willBreak$1(child)) {
- forcedBreak = true;
+ if (forcedBreak) {
+ return multiLineElem;
}
- }); // If there is text we use `fill` to fit as much onto each line as possible.
- // When there is no text (just tags and expressions) we use `group`
- // to output each on a separate line.
-
- var content = containsText ? fill$4(multilineChildren) : group$10(concat$11(multilineChildren), {
- shouldBreak: true
- });
- var multiLineElem = group$10(concat$11([openingLines, indent$6(concat$11([hardline$8, content])), hardline$8, closingLines]));
- if (forcedBreak) {
- return multiLineElem;
+ return conditionalGroup$1([group$b(concat$d([openingLines, concat$d(children), closingLines])), multiLineElem]);
}
- return conditionalGroup$1([group$10(concat$11([openingLines, concat$11(children), closingLines])), multiLineElem]);
-}
-
-function maybeWrapJSXElementInParens(path, elem) {
- var parent = path.getParentNode();
+ function maybeWrapJSXElementInParens(path, elem, options) {
+ var parent = path.getParentNode();
- if (!parent) {
- return elem;
- }
+ if (!parent) {
+ return elem;
+ }
+
+ var NO_WRAP_PARENTS = {
+ ArrayExpression: true,
+ JSXAttribute: true,
+ JSXElement: true,
+ JSXExpressionContainer: true,
+ JSXFragment: true,
+ ExpressionStatement: true,
+ CallExpression: true,
+ OptionalCallExpression: true,
+ ConditionalExpression: true,
+ JsExpressionRoot: true
+ };
- var NO_WRAP_PARENTS = {
- ArrayExpression: true,
- JSXAttribute: true,
- JSXElement: true,
- JSXExpressionContainer: true,
- JSXFragment: true,
- ExpressionStatement: true,
- CallExpression: true,
- OptionalCallExpression: true,
- ConditionalExpression: true,
- JsExpressionRoot: true
- };
+ if (NO_WRAP_PARENTS[parent.type]) {
+ return elem;
+ }
- if (NO_WRAP_PARENTS[parent.type]) {
- return elem;
+ var shouldBreak = matchAncestorTypes$1(path, ["ArrowFunctionExpression", "CallExpression", "JSXExpressionContainer"]) || matchAncestorTypes$1(path, ["ArrowFunctionExpression", "OptionalCallExpression", "JSXExpressionContainer"]);
+ var needsParens = needsParens_1(path, options);
+ return group$b(concat$d([needsParens ? "" : ifBreak$6("("), indent$7(concat$d([softline$6, elem])), softline$6, needsParens ? "" : ifBreak$6(")")]), {
+ shouldBreak: shouldBreak
+ });
}
- var shouldBreak = matchAncestorTypes$1(path, ["ArrowFunctionExpression", "CallExpression", "JSXExpressionContainer"]);
- return group$10(concat$11([ifBreak$6("("), indent$6(concat$11([softline$5, elem])), softline$5, ifBreak$6(")")]), {
- shouldBreak: shouldBreak
- });
-}
+ function shouldInlineLogicalExpression(node) {
+ if (node.type !== "LogicalExpression") {
+ return false;
+ }
+
+ if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) {
+ return true;
+ }
-function isBinaryish(node) {
- return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression";
-}
+ if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) {
+ return true;
+ }
-function isMemberish(node) {
- return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object;
-}
+ if (isJSXNode$1(node.right)) {
+ return true;
+ }
-function shouldInlineLogicalExpression(node) {
- if (node.type !== "LogicalExpression") {
return false;
- }
+ } // For binary expressions to be consistent, we need to group
+ // subsequent operators with the same precedence level under a single
+ // group. Otherwise they will be nested such that some of them break
+ // onto new lines but not all. Operators with the same precedence
+ // level should either all break or not. Because we group them by
+ // precedence level and the AST is structured based on precedence
+ // level, things are naturally broken up correctly, i.e. `&&` is
+ // broken before `+`.
- if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) {
- return true;
- }
- if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) {
- return true;
- }
+ function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {
+ var parts = [];
+ var node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.
+
+ if (isBinaryish$1(node)) {
+ // Put all operators with the same precedence level in the same
+ // group. The reason we only need to do this with the `left`
+ // expression is because given an expression like `1 + 2 - 3`, it
+ // is always parsed like `((1 + 2) - 3)`, meaning the `left` side
+ // is where the rest of the expression will exist. Binary
+ // expressions on the right side mean they have a difference
+ // precedence level and should be treated as a separate group, so
+ // print them normally. (This doesn't hold for the `**` operator,
+ // which is unique in that it is right-associative.)
+ if (shouldFlatten$1(node.operator, node.left.operator)) {
+ // Flatten them out by recursively calling this function.
+ parts = parts.concat(path.call(function (left) {
+ return printBinaryishExpressions(left, print, options,
+ /* isNested */
+ true, isInsideParenthesis);
+ }, "left"));
+ } else {
+ parts.push(path.call(print, "left"));
+ }
+
+ var shouldInline = shouldInlineLogicalExpression(node);
+ var lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment$1(options.originalText, node.right, options);
+ var operator = node.type === "NGPipeExpression" ? "|" : node.operator;
+ var rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$b(indent$7(concat$d([softline$6, ": ", join$9(concat$d([softline$6, ":", ifBreak$6(" ")]), path.map(print, "arguments").map(function (arg) {
+ return align$1(2, group$b(arg));
+ }))]))) : "";
+ var right = shouldInline ? concat$d([operator, " ", path.call(print, "right"), rightSuffix]) : concat$d([lineBeforeOperator ? softline$6 : "", operator, lineBeforeOperator ? " " : line$7, path.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group
+ // in order to avoid having a small right part like -1 be on its own line.
+
+ var parent = path.getParentNode();
+ var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;
+ parts.push(" ", shouldGroup ? group$b(right) : right); // The root comments are already printed, but we need to manually print
+ // the other ones since we don't call the normal print on BinaryExpression,
+ // only for the left and right parts
+
+ if (isNested && node.comments) {
+ parts = comments.printComments(path, function () {
+ return concat$d(parts);
+ }, options);
+ }
+ } else {
+ // Our stopping case. Simply print the node normally.
+ parts.push(path.call(print));
+ }
- if (isJSXNode(node.right)) {
- return true;
+ return parts;
}
- return false;
-} // For binary expressions to be consistent, we need to group
-// subsequent operators with the same precedence level under a single
-// group. Otherwise they will be nested such that some of them break
-// onto new lines but not all. Operators with the same precedence
-// level should either all break or not. Because we group them by
-// precedence level and the AST is structured based on precedence
-// level, things are naturally broken up correctly, i.e. `&&` is
-// broken before `+`.
-
-
-function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {
- var parts = [];
- var node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.
-
- if (isBinaryish(node)) {
- // Put all operators with the same precedence level in the same
- // group. The reason we only need to do this with the `left`
- // expression is because given an expression like `1 + 2 - 3`, it
- // is always parsed like `((1 + 2) - 3)`, meaning the `left` side
- // is where the rest of the expression will exist. Binary
- // expressions on the right side mean they have a difference
- // precedence level and should be treated as a separate group, so
- // print them normally. (This doesn't hold for the `**` operator,
- // which is unique in that it is right-associative.)
- if (shouldFlatten$1(node.operator, node.left.operator)) {
- // Flatten them out by recursively calling this function.
- parts = parts.concat(path.call(function (left) {
- return printBinaryishExpressions(left, print, options,
- /* isNested */
- true, isInsideParenthesis);
- }, "left"));
- } else {
- parts.push(path.call(print, "left"));
+ function printAssignmentRight(leftNode, rightNode, printedRight, options) {
+ if (hasLeadingOwnLineComment$1(options.originalText, rightNode, options)) {
+ return indent$7(concat$d([hardline$9, printedRight]));
}
- var shouldInline = shouldInlineLogicalExpression(node);
- var lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment(options.originalText, node.right, options);
- var operator = node.type === "NGPipeExpression" ? "|" : node.operator;
- var rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$10(indent$6(concat$11([softline$5, ": ", join$7(concat$11([softline$5, ":", ifBreak$6(" ")]), path.map(print, "arguments").map(function (arg) {
- return align$1(2, group$10(arg));
- }))]))) : "";
- var right = shouldInline ? concat$11([operator, " ", path.call(print, "right"), rightSuffix]) : concat$11([lineBeforeOperator ? softline$5 : "", operator, lineBeforeOperator ? " " : line$8, path.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group
- // in order to avoid having a small right part like -1 be on its own line.
+ var canBreak = isBinaryish$1(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish$1(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral$1(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral$1(rightNode) || isMemberExpressionChain$1(rightNode)) && // do not put values on a separate line from the key in json
+ options.parser !== "json" && options.parser !== "json5" || rightNode.type === "SequenceExpression";
- var parent = path.getParentNode();
- var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;
- parts.push(" ", shouldGroup ? group$10(right) : right); // The root comments are already printed, but we need to manually print
- // the other ones since we don't call the normal print on BinaryExpression,
- // only for the left and right parts
-
- if (isNested && node.comments) {
- parts = comments.printComments(path, function () {
- return concat$11(parts);
- }, options);
+ if (canBreak) {
+ return group$b(indent$7(concat$d([line$7, printedRight])));
}
- } else {
- // Our stopping case. Simply print the node normally.
- parts.push(path.call(print));
- }
-
- return parts;
-}
-function printAssignmentRight(leftNode, rightNode, printedRight, options) {
- if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) {
- return indent$6(concat$11([hardline$8, printedRight]));
+ return concat$d([" ", printedRight]);
}
- var canBreak = isBinaryish(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral(rightNode) || isMemberExpressionChain(rightNode)) && // do not put values on a separate line from the key in json
- options.parser !== "json" && options.parser !== "json5" || rightNode.type === "SequenceExpression";
+ function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) {
+ if (!rightNode) {
+ return printedLeft;
+ }
- if (canBreak) {
- return group$10(indent$6(concat$11([line$8, printedRight])));
+ var printed = printAssignmentRight(leftNode, rightNode, printedRight, options);
+ return group$b(concat$d([printedLeft, operator, printed]));
}
- return concat$11([" ", printedRight]);
-}
-
-function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) {
- if (!rightNode) {
- return printedLeft;
- }
+ function adjustClause(node, clause, forceSpace) {
+ if (node.type === "EmptyStatement") {
+ return ";";
+ }
- var printed = printAssignmentRight(leftNode, rightNode, printedRight, options);
- return group$10(concat$11([printedLeft, operator, printed]));
-}
+ if (node.type === "BlockStatement" || forceSpace) {
+ return concat$d([" ", clause]);
+ }
-function adjustClause(node, clause, forceSpace) {
- if (node.type === "EmptyStatement") {
- return ";";
+ return indent$7(concat$d([line$7, clause]));
}
- if (node.type === "BlockStatement" || forceSpace) {
- return concat$11([" ", clause]);
+ function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) {
+ var raw = rawText$1(node);
+ var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral";
+ return printString$2(raw, options, isDirectiveLiteral);
}
- return indent$6(concat$11([line$8, clause]));
-}
-
-function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) {
- var raw = rawText(node);
- var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral";
- return printString$2(raw, options, isDirectiveLiteral);
-}
-
-function printRegex(node) {
- var flags = node.flags.split("").sort().join("");
- return "/".concat(node.pattern, "/").concat(flags);
-}
-
-function isLastStatement(path) {
- var parent = path.getParentNode();
-
- if (!parent) {
- return true;
+ function printRegex(node) {
+ var flags = node.flags.split("").sort().join("");
+ return "/".concat(node.pattern, "/").concat(flags);
}
- var node = path.getValue();
- var body = (parent.body || parent.consequent).filter(function (stmt) {
- return stmt.type !== "EmptyStatement";
- });
- return body && body[body.length - 1] === node;
-}
+ function exprNeedsASIProtection(path, options) {
+ var node = path.getValue();
+ var maybeASIProblem = needsParens_1(path, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode$1(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex;
-function hasLeadingComment(node) {
- return node.comments && node.comments.some(function (comment) {
- return comment.leading;
- });
-}
+ if (maybeASIProblem) {
+ return true;
+ }
-function hasTrailingComment(node) {
- return node.comments && node.comments.some(function (comment) {
- return comment.trailing;
- });
-}
+ if (!hasNakedLeftSide$2(node)) {
+ return false;
+ }
-function hasLeadingOwnLineComment(text, node, options) {
- if (isJSXNode(node)) {
- return hasNodeIgnoreComment$1(node);
+ return path.call.apply(path, [function (childPath) {
+ return exprNeedsASIProtection(childPath, options);
+ }].concat(getLeftSidePathName$2(path, node)));
}
- var res = node.comments && node.comments.some(function (comment) {
- return comment.leading && hasNewline$3(text, options.locEnd(comment));
- });
- return res;
-}
+ function stmtNeedsASIProtection(path, options) {
+ var node = path.getNode();
-function isFlowAnnotationComment(text, typeAnnotation, options) {
- var start = options.locStart(typeAnnotation);
- var end = skipWhitespace$1(text, options.locEnd(typeAnnotation));
- return text.substr(start, 2) === "/*" && text.substr(end, 2) === "*/";
-}
-
-function exprNeedsASIProtection(path, options) {
- var node = path.getValue();
- var maybeASIProblem = needsParens_1(path, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex;
+ if (node.type !== "ExpressionStatement") {
+ return false;
+ }
- if (maybeASIProblem) {
- return true;
+ return path.call(function (childPath) {
+ return exprNeedsASIProtection(childPath, options);
+ }, "expression");
}
- if (!hasNakedLeftSide(node)) {
- return false;
- }
+ function shouldHugType(node) {
+ if (isSimpleFlowType$1(node) || isObjectType$1(node)) {
+ return true;
+ }
- return path.call.apply(path, [function (childPath) {
- return exprNeedsASIProtection(childPath, options);
- }].concat(getLeftSidePathName(path, node)));
-}
+ if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") {
+ var voidCount = node.types.filter(function (n) {
+ return n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword";
+ }).length;
+ var objectCount = node.types.filter(function (n) {
+ return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}>
+ n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference";
+ }).length;
-function stmtNeedsASIProtection(path, options) {
- var node = path.getNode();
+ if (node.types.length - 1 === voidCount && objectCount > 0) {
+ return true;
+ }
+ }
- if (node.type !== "ExpressionStatement") {
return false;
}
- return path.call(function (childPath) {
- return exprNeedsASIProtection(childPath, options);
- }, "expression");
-}
-
-function classPropMayCauseASIProblems(path) {
- var node = path.getNode();
-
- if (node.type !== "ClassProperty") {
- return false;
+ function shouldHugArguments(fun) {
+ return fun && fun.params && fun.params.length === 1 && !fun.params[0].comments && (fun.params[0].type === "ObjectPattern" || fun.params[0].type === "ArrayPattern" || fun.params[0].type === "Identifier" && fun.params[0].typeAnnotation && (fun.params[0].typeAnnotation.type === "TypeAnnotation" || fun.params[0].typeAnnotation.type === "TSTypeAnnotation") && isObjectType$1(fun.params[0].typeAnnotation.typeAnnotation) || fun.params[0].type === "FunctionTypeParam" && isObjectType$1(fun.params[0].typeAnnotation) || fun.params[0].type === "AssignmentPattern" && (fun.params[0].left.type === "ObjectPattern" || fun.params[0].left.type === "ArrayPattern") && (fun.params[0].right.type === "Identifier" || fun.params[0].right.type === "ObjectExpression" && fun.params[0].right.properties.length === 0 || fun.params[0].right.type === "ArrayExpression" && fun.params[0].right.elements.length === 0)) && !fun.rest;
}
- var name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today
- // so isn't properly tested yet.
+ function printArrayItems(path, options, printPath, print) {
+ var printedElements = [];
+ var separatorParts = [];
+ path.each(function (childPath) {
+ printedElements.push(concat$d(separatorParts));
+ printedElements.push(group$b(print(childPath)));
+ separatorParts = [",", line$7];
- if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) {
- return true;
- }
-}
-
-function classChildNeedsASIProtection(node) {
- if (!node) {
- return;
+ if (childPath.getValue() && isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) {
+ separatorParts.push(softline$6);
+ }
+ }, printPath);
+ return concat$d(printedElements);
}
- if (node.static || node.accessibility // TypeScript
+ function willPrintOwnComments(path
+ /*, options */
) {
- return false;
- }
-
- if (!node.computed) {
- var name = node.key && node.key.name;
-
- if (name === "in" || name === "instanceof") {
- return true;
- }
+ var node = path.getValue();
+ var parent = path.getParentNode();
+ return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$4(path);
}
- switch (node.type) {
- case "ClassProperty":
- case "TSAbstractClassProperty":
- return node.computed;
+ function canAttachComment$1(node) {
+ return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import";
+ }
- case "MethodDefinition": // Flow
+ function printComment$2(commentPath, options) {
+ var comment = commentPath.getValue();
- case "TSAbstractMethodDefinition": // TypeScript
+ switch (comment.type) {
+ case "CommentBlock":
+ case "Block":
+ {
+ if (isIndentableBlockComment(comment)) {
+ var printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment
+ // printed as a `lineSuffix` which causes the comments to be
+ // interleaved. See https://github.com/prettier/prettier/issues/4412
+
+ if (comment.trailing && !hasNewline$4(options.originalText, options.locStart(comment), {
+ backwards: true
+ })) {
+ return concat$d([hardline$9, printed]);
+ }
- case "ClassMethod":
- case "ClassPrivateMethod":
- {
- // Babel
- var isAsync = node.value ? node.value.async : node.async;
- var isGenerator = node.value ? node.value.generator : node.generator;
+ return printed;
+ }
- if (isAsync || node.kind === "get" || node.kind === "set") {
- return false;
+ var isInsideFlowComment = options.originalText.substr(options.locEnd(comment) - 3, 3) === "*-/";
+ return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/");
}
- if (node.computed || isGenerator) {
- return true;
+ case "CommentLine":
+ case "Line":
+ // Print shebangs with the proper comment characters
+ if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) {
+ return "#!" + comment.value.trimRight();
}
- return false;
- }
+ return "//" + comment.value.trimRight();
- default:
- /* istanbul ignore next */
- return false;
+ default:
+ throw new Error("Not a comment: " + JSON.stringify(comment));
+ }
}
-} // This recurses the return argument, looking for the first token
-// (the leftmost leaf node) and, if it (or its parents) has any
-// leadingComments, returns true (so it can be wrapped in parens).
-
-function returnArgumentHasLeadingComment(options, argument) {
- if (hasLeadingOwnLineComment(options.originalText, argument, options)) {
- return true;
+ function isIndentableBlockComment(comment) {
+ // If the comment has multiple lines and every line starts with a star
+ // we can fix the indentation of each line. The stars in the `/*` and
+ // `*/` delimiters are not included in the comment value, so add them
+ // back first.
+ var lines = "*".concat(comment.value, "*").split("\n");
+ return lines.length > 1 && lines.every(function (line) {
+ return line.trim()[0] === "*";
+ });
}
- if (hasNakedLeftSide(argument)) {
- var leftMost = argument;
- var newLeftMost;
-
- while (newLeftMost = getLeftSide(leftMost)) {
- leftMost = newLeftMost;
-
- if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) {
- return true;
- }
+ function printIndentableBlockComment(comment) {
+ var lines = comment.value.split("\n");
+ return concat$d(["/*", join$9(hardline$9, lines.map(function (line, index) {
+ return index === 0 ? line.trimRight() : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft());
+ })), "*/"]);
+ }
+
+ var printerEstree = {
+ preprocess: preprocess_1$1,
+ print: genericPrint$3,
+ embed: embed_1$1,
+ insertPragma: insertPragma$7,
+ massageAstNode: clean_1$1,
+ hasPrettierIgnore: hasPrettierIgnore$3,
+ willPrintOwnComments: willPrintOwnComments,
+ canAttachComment: canAttachComment$1,
+ printComment: printComment$2,
+ isBlockComment: comments$1.isBlockComment,
+ handleComments: {
+ ownLine: comments$1.handleOwnLineComment,
+ endOfLine: comments$1.handleEndOfLineComment,
+ remaining: comments$1.handleRemainingComment
}
- }
+ };
- return false;
-}
+ var _require$$0$builders$7 = doc.builders,
+ concat$e = _require$$0$builders$7.concat,
+ hardline$a = _require$$0$builders$7.hardline,
+ indent$8 = _require$$0$builders$7.indent,
+ join$a = _require$$0$builders$7.join;
-function isMemberExpressionChain(node) {
- if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") {
- return false;
- }
-
- if (node.object.type === "Identifier") {
- return true;
- }
+ function genericPrint$4(path, options, print) {
+ var node = path.getValue();
- return isMemberExpressionChain(node.object);
-} // Hack to differentiate between the following two which have the same ast
-// type T = { method: () => void };
-// type T = { method(): void };
+ switch (node.type) {
+ case "JsonRoot":
+ return concat$e([path.call(print, "node"), hardline$a]);
+ case "ArrayExpression":
+ return node.elements.length === 0 ? "[]" : concat$e(["[", indent$8(concat$e([hardline$a, join$a(concat$e([",", hardline$a]), path.map(print, "elements"))])), hardline$a, "]"]);
-function isObjectTypePropertyAFunction(node, options) {
- return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options);
-} // TODO: This is a bad hack and we need a better way to distinguish between
-// arrow functions and otherwise
+ case "ObjectExpression":
+ return node.properties.length === 0 ? "{}" : concat$e(["{", indent$8(concat$e([hardline$a, join$a(concat$e([",", hardline$a]), path.map(print, "properties"))])), hardline$a, "}"]);
+ case "ObjectProperty":
+ return concat$e([path.call(print, "key"), ": ", path.call(print, "value")]);
-function isFunctionNotation(node, options) {
- return isGetterOrSetter(node) || sameLocStart(node, node.value, options);
-}
+ case "UnaryExpression":
+ return concat$e([node.operator === "+" ? "" : node.operator, path.call(print, "argument")]);
-function isGetterOrSetter(node) {
- return node.kind === "get" || node.kind === "set";
-}
+ case "NullLiteral":
+ return "null";
-function sameLocStart(nodeA, nodeB, options) {
- return options.locStart(nodeA) === options.locStart(nodeB);
-} // Hack to differentiate between the following two which have the same ast
-// declare function f(a): void;
-// var f: (a) => void;
+ case "BooleanLiteral":
+ return node.value ? "true" : "false";
+ case "StringLiteral":
+ case "NumericLiteral":
+ return JSON.stringify(node.value);
-function isTypeAnnotationAFunction(node, options) {
- return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
-}
+ case "Identifier":
+ return JSON.stringify(node.name);
-function isNodeStartingWithDeclare(node, options) {
- if (!(options.parser === "flow" || options.parser === "typescript")) {
- return false;
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(node.type));
+ }
}
- return options.originalText.slice(0, options.locStart(node)).match(/declare[ \t]*$/) || options.originalText.slice(node.range[0], node.range[1]).startsWith("declare ");
-}
+ function clean$5(node, newNode
+ /*, parent*/
+ ) {
+ delete newNode.start;
+ delete newNode.end;
+ delete newNode.extra;
+ delete newNode.loc;
+ delete newNode.comments;
+ delete newNode.errors;
+
+ if (node.type === "Identifier") {
+ return {
+ type: "StringLiteral",
+ value: node.name
+ };
+ }
-function shouldHugType(node) {
- if (isSimpleFlowType(node) || isObjectType(node)) {
- return true;
+ if (node.type === "UnaryExpression" && node.operator === "+") {
+ return newNode.argument;
+ }
}
- if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") {
- var voidCount = node.types.filter(function (n) {
- return n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword";
- }).length;
- var objectCount = node.types.filter(function (n) {
- return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}>
- n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference";
- }).length;
+ var printerEstreeJson = {
+ preprocess: preprocess_1$1,
+ print: genericPrint$4,
+ massageAstNode: clean$5
+ };
- if (node.types.length - 1 === voidCount && objectCount > 0) {
- return true;
- }
- }
+ var CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
- return false;
-}
+ var options$5 = {
+ arrowParens: {
+ since: "1.9.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "choice",
+ default: "avoid",
+ description: "Include parentheses around a sole arrow function parameter.",
+ choices: [{
+ value: "avoid",
+ description: "Omit parens when possible. Example: `x => x`"
+ }, {
+ value: "always",
+ description: "Always include parens. Example: `(x) => x`"
+ }]
+ },
+ bracketSpacing: commonOptions.bracketSpacing,
+ jsxBracketSameLine: {
+ since: "0.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Put > on the last line instead of at a new line."
+ },
+ semi: {
+ since: "1.0.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: true,
+ description: "Print semicolons.",
+ oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them."
+ },
+ singleQuote: commonOptions.singleQuote,
+ jsxSingleQuote: {
+ since: "1.15.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes in JSX."
+ },
+ quoteProps: {
+ since: "1.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "choice",
+ default: "as-needed",
+ description: "Change when properties in objects are quoted.",
+ choices: [{
+ value: "as-needed",
+ description: "Only add quotes around object properties where required."
+ }, {
+ value: "consistent",
+ description: "If at least one property in an object requires quotes, quote all properties."
+ }, {
+ value: "preserve",
+ description: "Respect the input use of quotes in object properties."
+ }]
+ },
+ trailingComma: {
+ since: "0.0.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "choice",
+ default: [{
+ since: "0.0.0",
+ value: false
+ }, {
+ since: "0.19.0",
+ value: "none"
+ }],
+ description: "Print trailing commas wherever possible when multi-line.",
+ choices: [{
+ value: "none",
+ description: "No trailing commas."
+ }, {
+ value: "es5",
+ description: "Trailing commas where valid in ES5 (objects, arrays, etc.)"
+ }, {
+ value: "all",
+ description: "Trailing commas wherever possible (including function arguments)."
+ }, {
+ value: true,
+ deprecated: "0.19.0",
+ redirect: "es5"
+ }, {
+ value: false,
+ deprecated: "0.19.0",
+ redirect: "none"
+ }]
+ }
+ };
-function shouldHugArguments(fun) {
- return fun && fun.params && fun.params.length === 1 && !fun.params[0].comments && (fun.params[0].type === "ObjectPattern" || fun.params[0].type === "ArrayPattern" || fun.params[0].type === "Identifier" && fun.params[0].typeAnnotation && (fun.params[0].typeAnnotation.type === "TypeAnnotation" || fun.params[0].typeAnnotation.type === "TSTypeAnnotation") && isObjectType(fun.params[0].typeAnnotation.typeAnnotation) || fun.params[0].type === "FunctionTypeParam" && isObjectType(fun.params[0].typeAnnotation) || fun.params[0].type === "AssignmentPattern" && (fun.params[0].left.type === "ObjectPattern" || fun.params[0].left.type === "ArrayPattern") && (fun.params[0].right.type === "Identifier" || fun.params[0].right.type === "ObjectExpression" && fun.params[0].right.properties.length === 0 || fun.params[0].right.type === "ArrayExpression" && fun.params[0].right.elements.length === 0)) && !fun.rest;
-}
+ var name$9 = "JavaScript";
+ var type$8 = "programming";
+ var tmScope$8 = "source.js";
+ var aceMode$8 = "javascript";
+ var codemirrorMode$4 = "javascript";
+ var codemirrorMimeType$4 = "text/javascript";
+ var color$3 = "#f1e05a";
+ var aliases$2 = [
+ "js",
+ "node"
+ ];
+ var extensions$8 = [
+ ".js",
+ "._js",
+ ".bones",
+ ".es",
+ ".es6",
+ ".frag",
+ ".gs",
+ ".jake",
+ ".jsb",
+ ".jscad",
+ ".jsfl",
+ ".jsm",
+ ".jss",
+ ".mjs",
+ ".njs",
+ ".pac",
+ ".sjs",
+ ".ssjs",
+ ".xsjs",
+ ".xsjslib"
+ ];
+ var filenames = [
+ "Jakefile"
+ ];
+ var interpreters = [
+ "chakra",
+ "d8",
+ "js",
+ "node",
+ "rhino",
+ "v8",
+ "v8-shell"
+ ];
+ var languageId$8 = 183;
+ var JavaScript = {
+ name: name$9,
+ type: type$8,
+ tmScope: tmScope$8,
+ aceMode: aceMode$8,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ color: color$3,
+ aliases: aliases$2,
+ extensions: extensions$8,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId$8
+ };
-function templateLiteralHasNewLines(template) {
- return template.quasis.some(function (quasi) {
- return quasi.value.raw.includes("\n");
+ var JavaScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$9,
+ type: type$8,
+ tmScope: tmScope$8,
+ aceMode: aceMode$8,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ color: color$3,
+ aliases: aliases$2,
+ extensions: extensions$8,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId$8,
+ 'default': JavaScript
});
-}
-function isTemplateOnItsOwnLine(n, text, options) {
- return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$3(text, options.locStart(n), {
- backwards: true
- });
-}
-
-function printArrayItems(path, options, printPath, print) {
- var printedElements = [];
- var separatorParts = [];
- path.each(function (childPath) {
- printedElements.push(concat$11(separatorParts));
- printedElements.push(group$10(print(childPath)));
- separatorParts = [",", line$8];
-
- if (childPath.getValue() && isNextLineEmpty$4(options.originalText, childPath.getValue(), options)) {
- separatorParts.push(softline$5);
- }
- }, printPath);
- return concat$11(printedElements);
-}
-
-function hasDanglingComments(node) {
- return node.comments && node.comments.some(function (comment) {
- return !comment.leading && !comment.trailing;
- });
-}
+ var name$a = "JSX";
+ var type$9 = "programming";
+ var group$c = "JavaScript";
+ var extensions$9 = [
+ ".jsx"
+ ];
+ var tmScope$9 = "source.js.jsx";
+ var aceMode$9 = "javascript";
+ var codemirrorMode$5 = "jsx";
+ var codemirrorMimeType$5 = "text/jsx";
+ var languageId$9 = 178;
+ var JSX = {
+ name: name$a,
+ type: type$9,
+ group: group$c,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ languageId: languageId$9
+ };
-function needsHardlineAfterDanglingComment(node) {
- if (!node.comments) {
- return false;
- }
+ var JSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$a,
+ type: type$9,
+ group: group$c,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ languageId: languageId$9,
+ 'default': JSX
+ });
- var lastDanglingComment = getLast$3(node.comments.filter(function (comment) {
- return !comment.leading && !comment.trailing;
- }));
- return lastDanglingComment && !comments$3.isBlockComment(lastDanglingComment);
-}
+ var name$b = "TypeScript";
+ var type$a = "programming";
+ var color$4 = "#2b7489";
+ var aliases$3 = [
+ "ts"
+ ];
+ var interpreters$1 = [
+ "deno",
+ "ts-node"
+ ];
+ var extensions$a = [
+ ".ts"
+ ];
+ var tmScope$a = "source.ts";
+ var aceMode$a = "typescript";
+ var codemirrorMode$6 = "javascript";
+ var codemirrorMimeType$6 = "application/typescript";
+ var languageId$a = 378;
+ var TypeScript = {
+ name: name$b,
+ type: type$a,
+ color: color$4,
+ aliases: aliases$3,
+ interpreters: interpreters$1,
+ extensions: extensions$a,
+ tmScope: tmScope$a,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$a
+ };
-function isLiteral(node) {
- return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText";
-}
+ var TypeScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$b,
+ type: type$a,
+ color: color$4,
+ aliases: aliases$3,
+ interpreters: interpreters$1,
+ extensions: extensions$a,
+ tmScope: tmScope$a,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$a,
+ 'default': TypeScript
+ });
-function isStringPropSafeToCoerceToIdentifier(node, options) {
- return isStringLiteral(node.key) && isIdentifierName(node.key.value) && options.parser !== "json" && !(options.parser === "typescript" && node.type === "ClassProperty");
-}
+ var name$c = "TSX";
+ var type$b = "programming";
+ var group$d = "TypeScript";
+ var extensions$b = [
+ ".tsx"
+ ];
+ var tmScope$b = "source.tsx";
+ var aceMode$b = "javascript";
+ var codemirrorMode$7 = "jsx";
+ var codemirrorMimeType$7 = "text/jsx";
+ var languageId$b = 94901924;
+ var TSX = {
+ name: name$c,
+ type: type$b,
+ group: group$d,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ languageId: languageId$b
+ };
-function isNumericLiteral(node) {
- return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number";
-}
+ var TSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$c,
+ type: type$b,
+ group: group$d,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ languageId: languageId$b,
+ 'default': TSX
+ });
-function isStringLiteral(node) {
- return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string";
-}
+ var name$d = "JSON";
+ var type$c = "data";
+ var tmScope$c = "source.json";
+ var aceMode$c = "json";
+ var codemirrorMode$8 = "javascript";
+ var codemirrorMimeType$8 = "application/json";
+ var searchable = false;
+ var extensions$c = [
+ ".json",
+ ".avsc",
+ ".geojson",
+ ".gltf",
+ ".har",
+ ".ice",
+ ".JSON-tmLanguage",
+ ".jsonl",
+ ".mcmeta",
+ ".tfstate",
+ ".tfstate.backup",
+ ".topojson",
+ ".webapp",
+ ".webmanifest",
+ ".yy",
+ ".yyp"
+ ];
+ var filenames$1 = [
+ ".arcconfig",
+ ".htmlhintrc",
+ ".tern-config",
+ ".tern-project",
+ ".watchmanconfig",
+ "composer.lock",
+ "mcmod.info"
+ ];
+ var languageId$c = 174;
+ var _JSON = {
+ name: name$d,
+ type: type$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ searchable: searchable,
+ extensions: extensions$c,
+ filenames: filenames$1,
+ languageId: languageId$c
+ };
-function isObjectType(n) {
- return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral";
-}
+ var _JSON$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$d,
+ type: type$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ searchable: searchable,
+ extensions: extensions$c,
+ filenames: filenames$1,
+ languageId: languageId$c,
+ 'default': _JSON
+ });
-var unitTestRe = /^(skip|[fx]?(it|describe|test))$/; // eg; `describe("some string", (done) => {})`
+ var name$e = "JSON with Comments";
+ var type$d = "data";
+ var group$e = "JSON";
+ var tmScope$d = "source.js";
+ var aceMode$d = "javascript";
+ var codemirrorMode$9 = "javascript";
+ var codemirrorMimeType$9 = "text/javascript";
+ var aliases$4 = [
+ "jsonc"
+ ];
+ var extensions$d = [
+ ".sublime-build",
+ ".sublime-commands",
+ ".sublime-completions",
+ ".sublime-keymap",
+ ".sublime-macro",
+ ".sublime-menu",
+ ".sublime-mousemap",
+ ".sublime-project",
+ ".sublime-settings",
+ ".sublime-theme",
+ ".sublime-workspace",
+ ".sublime_metrics",
+ ".sublime_session"
+ ];
+ var filenames$2 = [
+ ".babelrc",
+ ".eslintrc.json",
+ ".jscsrc",
+ ".jshintrc",
+ ".jslintrc",
+ "jsconfig.json",
+ "language-configuration.json",
+ "tsconfig.json"
+ ];
+ var languageId$d = 423;
+ var JSON_with_Comments = {
+ name: name$e,
+ type: type$d,
+ group: group$e,
+ tmScope: tmScope$d,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ aliases: aliases$4,
+ extensions: extensions$d,
+ filenames: filenames$2,
+ languageId: languageId$d
+ };
-function isTestCall(n, parent) {
- if (n.type !== "CallExpression") {
- return false;
- }
+ var JSON_with_Comments$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$e,
+ type: type$d,
+ group: group$e,
+ tmScope: tmScope$d,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ aliases: aliases$4,
+ extensions: extensions$d,
+ filenames: filenames$2,
+ languageId: languageId$d,
+ 'default': JSON_with_Comments
+ });
- if (n.arguments.length === 1) {
- if (isAngularTestWrapper(n) && parent && isTestCall(parent)) {
- return isFunctionOrArrowExpression(n.arguments[0]);
- }
+ var name$f = "JSON5";
+ var type$e = "data";
+ var extensions$e = [
+ ".json5"
+ ];
+ var tmScope$e = "source.js";
+ var aceMode$e = "javascript";
+ var codemirrorMode$a = "javascript";
+ var codemirrorMimeType$a = "application/json";
+ var languageId$e = 175;
+ var JSON5 = {
+ name: name$f,
+ type: type$e,
+ extensions: extensions$e,
+ tmScope: tmScope$e,
+ aceMode: aceMode$e,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ languageId: languageId$e
+ };
- if (isUnitTestSetUp(n)) {
- return isAngularTestWrapper(n.arguments[0]);
- }
- } else if (n.arguments.length === 2 || n.arguments.length === 3) {
- if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) {
- // it("name", () => { ... }, 2500)
- if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) {
- return false;
- }
+ var JSON5$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$f,
+ type: type$e,
+ extensions: extensions$e,
+ tmScope: tmScope$e,
+ aceMode: aceMode$e,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ languageId: languageId$e,
+ 'default': JSON5
+ });
- return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]);
- }
- }
+ var require$$0$6 = getCjsExportFromNamespace(JavaScript$1);
- return false;
-}
+ var require$$1$2 = getCjsExportFromNamespace(JSX$1);
-function isSkipOrOnlyBlock(node) {
- return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip");
-}
+ var require$$2$1 = getCjsExportFromNamespace(TypeScript$1);
-function isTemplateLiteral(node) {
- return node.type === "TemplateLiteral";
-} // `inject` is used in AngularJS 1.x, `async` in Angular 2+
-// example: https://docs.angularjs.org/guide/unit-testing#using-beforeall-
+ var require$$3$1 = getCjsExportFromNamespace(TSX$1);
+ var require$$4 = getCjsExportFromNamespace(_JSON$1);
-function isAngularTestWrapper(node) {
- return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync");
-}
+ var require$$5 = getCjsExportFromNamespace(JSON_with_Comments$1);
-function isFunctionOrArrowExpression(node) {
- return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
-}
+ var require$$6 = getCjsExportFromNamespace(JSON5$1);
-function isFunctionOrArrowExpressionWithBody(node) {
- return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement";
-}
+ var languages$4 = [createLanguage(require$$0$6, function (data) {
+ return Object.assign(data, {
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript", "mongo"],
+ interpreters: data.interpreters.concat(["nodejs"])
+ });
+ }), createLanguage(require$$0$6, function (data) {
+ return Object.assign(data, {
+ name: "Flow",
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript"],
+ aliases: [],
+ filenames: [],
+ extensions: [".js.flow"]
+ });
+ }), createLanguage(require$$1$2, function (data) {
+ return Object.assign(data, {
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascriptreact"]
+ });
+ }), createLanguage(require$$2$1, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["typescript"],
+ vscodeLanguageIds: ["typescript"]
+ });
+ }), createLanguage(require$$3$1, function (data) {
+ return Object.assign(data, {
+ since: "1.4.0",
+ parsers: ["typescript"],
+ vscodeLanguageIds: ["typescriptreact"]
+ });
+ }), createLanguage(require$$4, function (data) {
+ return Object.assign(data, {
+ name: "JSON.stringify",
+ since: "1.13.0",
+ parsers: ["json-stringify"],
+ vscodeLanguageIds: ["json"],
+ extensions: [],
+ // .json file defaults to json instead of json-stringify
+ filenames: ["package.json", "package-lock.json", "composer.json"]
+ });
+ }), createLanguage(require$$4, function (data) {
+ return Object.assign(data, {
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["json"],
+ filenames: data.filenames.concat([".prettierrc"])
+ });
+ }), createLanguage(require$$5, function (data) {
+ return Object.assign(data, {
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["jsonc"],
+ filenames: data.filenames.concat([".eslintrc"])
+ });
+ }), createLanguage(require$$6, function (data) {
+ return Object.assign(data, {
+ since: "1.13.0",
+ parsers: ["json5"],
+ vscodeLanguageIds: ["json5"]
+ });
+ })];
+ var printers$4 = {
+ estree: printerEstree,
+ "estree-json": printerEstreeJson
+ };
+ var languageJs = {
+ languages: languages$4,
+ options: options$5,
+ printers: printers$4
+ };
-function isUnitTestSetUp(n) {
- var unitTestSetUpRe = /^(before|after)(Each|All)$/;
- return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1;
-}
+ var json$1 = {
+ "cjkPattern": "[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]",
+ "kPattern": "[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]",
+ "punctuationPattern": "[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"
+ };
-function isTheOnlyJSXElementInMarkdown(options, path) {
- if (options.parentParser !== "markdown" && options.parentParser !== "mdx") {
- return false;
- }
+ var cjkPattern = json$1.cjkPattern,
+ kPattern = json$1.kPattern,
+ punctuationPattern = json$1.punctuationPattern;
+ var getLast$3 = util.getLast;
+ var INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"];
+ var INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]);
+ var kRegex = new RegExp(kPattern);
+ var punctuationRegex = new RegExp(punctuationPattern);
+ /**
+ * split text into whitespaces and words
+ * @param {string} text
+ * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>}
+ */
- var node = path.getNode();
+ function splitText(text, options) {
+ var KIND_NON_CJK = "non-cjk";
+ var KIND_CJ_LETTER = "cj-letter";
+ var KIND_K_LETTER = "k-letter";
+ var KIND_CJK_PUNCTUATION = "cjk-punctuation";
+ var nodes = [];
+ (options.proseWrap === "preserve" ? text : text.replace(new RegExp("(".concat(cjkPattern, ")\n(").concat(cjkPattern, ")"), "g"), "$1$2")).split(/([ \t\n]+)/).forEach(function (token, index, tokens) {
+ // whitespace
+ if (index % 2 === 1) {
+ nodes.push({
+ type: "whitespace",
+ value: /\n/.test(token) ? "\n" : " "
+ });
+ return;
+ } // word separated by whitespace
- if (!node.expression || !isJSXNode(node.expression)) {
- return false;
- }
- var parent = path.getParentNode();
- return parent.type === "Program" && parent.body.length == 1;
-}
+ if ((index === 0 || index === tokens.length - 1) && token === "") {
+ return;
+ }
-function willPrintOwnComments(path
-/*, options */
-) {
- var node = path.getValue();
- var parent = path.getParentNode();
- return (node && (isJSXNode(node) || hasFlowShorthandAnnotationComment(node) || parent && parent.type === "CallExpression" && (hasFlowAnnotationComment(node.leadingComments) || hasFlowAnnotationComment(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$3(path);
-}
+ token.split(new RegExp("(".concat(cjkPattern, ")"))).forEach(function (innerToken, innerIndex, innerTokens) {
+ if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") {
+ return;
+ } // non-CJK word
-function canAttachComment$1(node) {
- return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import";
-}
-function printComment$2(commentPath, options) {
- var comment = commentPath.getValue();
+ if (innerIndex % 2 === 0) {
+ if (innerToken !== "") {
+ appendNode({
+ type: "word",
+ value: innerToken,
+ kind: KIND_NON_CJK,
+ hasLeadingPunctuation: punctuationRegex.test(innerToken[0]),
+ hasTrailingPunctuation: punctuationRegex.test(getLast$3(innerToken))
+ });
+ }
- switch (comment.type) {
- case "CommentBlock":
- case "Block":
- {
- if (isIndentableBlockComment(comment)) {
- var printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment
- // printed as a `lineSuffix` which causes the comments to be
- // interleaved. See https://github.com/prettier/prettier/issues/4412
+ return;
+ } // CJK character
- if (comment.trailing && !hasNewline$3(options.originalText, options.locStart(comment), {
- backwards: true
- })) {
- return concat$11([hardline$8, printed]);
- }
- return printed;
- }
+ appendNode(punctuationRegex.test(innerToken) ? {
+ type: "word",
+ value: innerToken,
+ kind: KIND_CJK_PUNCTUATION,
+ hasLeadingPunctuation: true,
+ hasTrailingPunctuation: true
+ } : {
+ type: "word",
+ value: innerToken,
+ kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER,
+ hasLeadingPunctuation: false,
+ hasTrailingPunctuation: false
+ });
+ });
+ });
+ return nodes;
- var isInsideFlowComment = options.originalText.substr(options.locEnd(comment) - 3, 3) === "*-/";
- return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/");
- }
+ function appendNode(node) {
+ var lastNode = getLast$3(nodes);
- case "CommentLine":
- case "Line":
- // Print shebangs with the proper comment characters
- if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) {
- return "#!" + comment.value.trimRight();
+ if (lastNode && lastNode.type === "word") {
+ if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) {
+ nodes.push({
+ type: "whitespace",
+ value: " "
+ });
+ } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace
+ ![lastNode.value, node.value].some(function (value) {
+ return /\u3000/.test(value);
+ })) {
+ nodes.push({
+ type: "whitespace",
+ value: ""
+ });
+ }
}
- return "//" + comment.value.trimRight();
-
- default:
- throw new Error("Not a comment: " + JSON.stringify(comment));
- }
-}
+ nodes.push(node);
-function isIndentableBlockComment(comment) {
- // If the comment has multiple lines and every line starts with a star
- // we can fix the indentation of each line. The stars in the `/*` and
- // `*/` delimiters are not included in the comment value, so add them
- // back first.
- var lines = "*".concat(comment.value, "*").split("\n");
- return lines.length > 1 && lines.every(function (line) {
- return line.trim()[0] === "*";
- });
-}
-
-function printIndentableBlockComment(comment) {
- var lines = comment.value.split("\n");
- return concat$11(["/*", join$7(hardline$8, lines.map(function (line, index) {
- return index === 0 ? line.trimRight() : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft());
- })), "*/"]);
-}
-
-function rawText(node) {
- return node.extra ? node.extra.raw : node.raw;
-}
-
-function identity$1(x) {
- return x;
-}
-
-var printerEstree = {
- preprocess: preprocess_1$2,
- print: genericPrint$3,
- embed: embed_1$2,
- insertPragma: insertPragma$7,
- massageAstNode: clean_1$2,
- hasPrettierIgnore: hasPrettierIgnore$2,
- willPrintOwnComments: willPrintOwnComments,
- canAttachComment: canAttachComment$1,
- printComment: printComment$2,
- isBlockComment: comments$3.isBlockComment,
- handleComments: {
- ownLine: comments$3.handleOwnLineComment,
- endOfLine: comments$3.handleEndOfLineComment,
- remaining: comments$3.handleRemainingComment
- }
-};
-
-var _require$$0$builders$7 = doc.builders;
-var concat$14 = _require$$0$builders$7.concat;
-var hardline$10 = _require$$0$builders$7.hardline;
-var indent$8 = _require$$0$builders$7.indent;
-var join$10 = _require$$0$builders$7.join;
-
-function genericPrint$4(path, options, print) {
- var node = path.getValue();
-
- switch (node.type) {
- case "JsonRoot":
- return concat$14([path.call(print, "node"), hardline$10]);
-
- case "ArrayExpression":
- return node.elements.length === 0 ? "[]" : concat$14(["[", indent$8(concat$14([hardline$10, join$10(concat$14([",", hardline$10]), path.map(print, "elements"))])), hardline$10, "]"]);
-
- case "ObjectExpression":
- return node.properties.length === 0 ? "{}" : concat$14(["{", indent$8(concat$14([hardline$10, join$10(concat$14([",", hardline$10]), path.map(print, "properties"))])), hardline$10, "}"]);
-
- case "ObjectProperty":
- return concat$14([path.call(print, "key"), ": ", path.call(print, "value")]);
-
- case "UnaryExpression":
- return concat$14([node.operator === "+" ? "" : node.operator, path.call(print, "argument")]);
-
- case "NullLiteral":
- return "null";
-
- case "BooleanLiteral":
- return node.value ? "true" : "false";
-
- case "StringLiteral":
- case "NumericLiteral":
- return JSON.stringify(node.value);
-
- case "Identifier":
- return JSON.stringify(node.name);
-
- default:
- /* istanbul ignore next */
- throw new Error("unknown type: " + JSON.stringify(node.type));
+ function isBetween(kind1, kind2) {
+ return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1;
+ }
+ }
}
-}
-function clean$9(node, newNode
-/*, parent*/
-) {
- delete newNode.start;
- delete newNode.end;
- delete newNode.extra;
- delete newNode.loc;
- delete newNode.comments;
+ function getOrderedListItemInfo(orderListItem, originalText) {
+ var _originalText$slice$m = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),
+ _originalText$slice$m2 = _slicedToArray(_originalText$slice$m, 4),
+ numberText = _originalText$slice$m2[1],
+ marker = _originalText$slice$m2[2],
+ leadingSpaces = _originalText$slice$m2[3];
- if (node.type === "Identifier") {
return {
- type: "StringLiteral",
- value: node.name
+ numberText: numberText,
+ marker: marker,
+ leadingSpaces: leadingSpaces
};
- }
-
- if (node.type === "UnaryExpression" && node.operator === "+") {
- return newNode.argument;
- }
-}
-
-var printerEstreeJson = {
- preprocess: preprocess_1$2,
- print: genericPrint$4,
- massageAstNode: clean$9
-};
+ } // workaround for https://github.com/remarkjs/remark/issues/351
+ // leading and trailing newlines are stripped by remark
-var CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
-var options$12 = {
- arrowParens: {
- since: "1.9.0",
- category: CATEGORY_JAVASCRIPT,
- type: "choice",
- default: "avoid",
- description: "Include parentheses around a sole arrow function parameter.",
- choices: [{
- value: "avoid",
- description: "Omit parens when possible. Example: `x => x`"
- }, {
- value: "always",
- description: "Always include parens. Example: `(x) => x`"
- }]
- },
- bracketSpacing: commonOptions.bracketSpacing,
- jsxBracketSameLine: {
- since: "0.17.0",
- category: CATEGORY_JAVASCRIPT,
- type: "boolean",
- default: false,
- description: "Put > on the last line instead of at a new line."
- },
- semi: {
- since: "1.0.0",
- category: CATEGORY_JAVASCRIPT,
- type: "boolean",
- default: true,
- description: "Print semicolons.",
- oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them."
- },
- singleQuote: commonOptions.singleQuote,
- jsxSingleQuote: {
- since: "1.15.0",
- category: CATEGORY_JAVASCRIPT,
- type: "boolean",
- default: false,
- description: "Use single quotes in JSX."
- },
- quoteProps: {
- since: "1.17.0",
- category: CATEGORY_JAVASCRIPT,
- type: "choice",
- default: "as-needed",
- description: "Change when properties in objects are quoted.",
- choices: [{
- value: "as-needed",
- description: "Only add quotes around object properties where required."
- }, {
- value: "consistent",
- description: "If at least one property in an object requires quotes, quote all properties."
- }, {
- value: "preserve",
- description: "Respect the input use of quotes in object properties."
- }]
- },
- trailingComma: {
- since: "0.0.0",
- category: CATEGORY_JAVASCRIPT,
- type: "choice",
- default: [{
- since: "0.0.0",
- value: false
- }, {
- since: "0.19.0",
- value: "none"
- }],
- description: "Print trailing commas wherever possible when multi-line.",
- choices: [{
- value: "none",
- description: "No trailing commas."
- }, {
- value: "es5",
- description: "Trailing commas where valid in ES5 (objects, arrays, etc.)"
- }, {
- value: "all",
- description: "Trailing commas wherever possible (including function arguments)."
- }, {
- value: true,
- deprecated: "0.19.0",
- redirect: "es5"
- }, {
- value: false,
- deprecated: "0.19.0",
- redirect: "none"
- }]
- }
-};
-
-var name$9 = "JavaScript";
-var type$8 = "programming";
-var tmScope$8 = "source.js";
-var aceMode$8 = "javascript";
-var codemirrorMode$4 = "javascript";
-var codemirrorMimeType$4 = "text/javascript";
-var color$3 = "#f1e05a";
-var aliases$2 = ["js", "node"];
-var extensions$8 = [".js", "._js", ".bones", ".es", ".es6", ".frag", ".gs", ".jake", ".jsb", ".jscad", ".jsfl", ".jsm", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"];
-var filenames = ["Jakefile"];
-var interpreters = ["node"];
-var languageId$8 = 183;
-var javascript = {
- name: name$9,
- type: type$8,
- tmScope: tmScope$8,
- aceMode: aceMode$8,
- codemirrorMode: codemirrorMode$4,
- codemirrorMimeType: codemirrorMimeType$4,
- color: color$3,
- aliases: aliases$2,
- extensions: extensions$8,
- filenames: filenames,
- interpreters: interpreters,
- languageId: languageId$8
-};
-
-var javascript$1 = Object.freeze({
- name: name$9,
- type: type$8,
- tmScope: tmScope$8,
- aceMode: aceMode$8,
- codemirrorMode: codemirrorMode$4,
- codemirrorMimeType: codemirrorMimeType$4,
- color: color$3,
- aliases: aliases$2,
- extensions: extensions$8,
- filenames: filenames,
- interpreters: interpreters,
- languageId: languageId$8,
- default: javascript
-});
-
-var name$10 = "JSX";
-var type$9 = "programming";
-var group$12 = "JavaScript";
-var extensions$9 = [".jsx"];
-var tmScope$9 = "source.js.jsx";
-var aceMode$9 = "javascript";
-var codemirrorMode$5 = "jsx";
-var codemirrorMimeType$5 = "text/jsx";
-var languageId$9 = 178;
-var jsx = {
- name: name$10,
- type: type$9,
- group: group$12,
- extensions: extensions$9,
- tmScope: tmScope$9,
- aceMode: aceMode$9,
- codemirrorMode: codemirrorMode$5,
- codemirrorMimeType: codemirrorMimeType$5,
- languageId: languageId$9
-};
-
-var jsx$1 = Object.freeze({
- name: name$10,
- type: type$9,
- group: group$12,
- extensions: extensions$9,
- tmScope: tmScope$9,
- aceMode: aceMode$9,
- codemirrorMode: codemirrorMode$5,
- codemirrorMimeType: codemirrorMimeType$5,
- languageId: languageId$9,
- default: jsx
-});
-
-var name$11 = "TypeScript";
-var type$10 = "programming";
-var color$4 = "#2b7489";
-var aliases$3 = ["ts"];
-var extensions$10 = [".ts", ".tsx"];
-var tmScope$10 = "source.ts";
-var aceMode$10 = "typescript";
-var codemirrorMode$6 = "javascript";
-var codemirrorMimeType$6 = "application/typescript";
-var languageId$10 = 378;
-var typescript = {
- name: name$11,
- type: type$10,
- color: color$4,
- aliases: aliases$3,
- extensions: extensions$10,
- tmScope: tmScope$10,
- aceMode: aceMode$10,
- codemirrorMode: codemirrorMode$6,
- codemirrorMimeType: codemirrorMimeType$6,
- languageId: languageId$10
-};
-
-var typescript$1 = Object.freeze({
- name: name$11,
- type: type$10,
- color: color$4,
- aliases: aliases$3,
- extensions: extensions$10,
- tmScope: tmScope$10,
- aceMode: aceMode$10,
- codemirrorMode: codemirrorMode$6,
- codemirrorMimeType: codemirrorMimeType$6,
- languageId: languageId$10,
- default: typescript
-});
-
-var name$12 = "JSON";
-var type$11 = "data";
-var tmScope$11 = "source.json";
-var group$13 = "JavaScript";
-var aceMode$11 = "json";
-var codemirrorMode$7 = "javascript";
-var codemirrorMimeType$7 = "application/json";
-var searchable = false;
-var extensions$11 = [".json", ".avsc", ".geojson", ".gltf", ".JSON-tmLanguage", ".jsonl", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest"];
-var filenames$1 = [".arcconfig", ".htmlhintrc", ".tern-config", ".tern-project", "composer.lock", "mcmod.info"];
-var languageId$11 = 174;
-var json$5 = {
- name: name$12,
- type: type$11,
- tmScope: tmScope$11,
- group: group$13,
- aceMode: aceMode$11,
- codemirrorMode: codemirrorMode$7,
- codemirrorMimeType: codemirrorMimeType$7,
- searchable: searchable,
- extensions: extensions$11,
- filenames: filenames$1,
- languageId: languageId$11
-};
-
-var json$6 = Object.freeze({
- name: name$12,
- type: type$11,
- tmScope: tmScope$11,
- group: group$13,
- aceMode: aceMode$11,
- codemirrorMode: codemirrorMode$7,
- codemirrorMimeType: codemirrorMimeType$7,
- searchable: searchable,
- extensions: extensions$11,
- filenames: filenames$1,
- languageId: languageId$11,
- default: json$5
-});
-
-var name$13 = "JSON with Comments";
-var type$12 = "data";
-var group$14 = "JSON";
-var tmScope$12 = "source.js";
-var aceMode$12 = "javascript";
-var codemirrorMode$8 = "javascript";
-var codemirrorMimeType$8 = "text/javascript";
-var aliases$4 = ["jsonc"];
-var extensions$12 = [".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"];
-var filenames$2 = [".babelrc", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "tsconfig.json"];
-var languageId$12 = 423;
-var jsonWithComments = {
- name: name$13,
- type: type$12,
- group: group$14,
- tmScope: tmScope$12,
- aceMode: aceMode$12,
- codemirrorMode: codemirrorMode$8,
- codemirrorMimeType: codemirrorMimeType$8,
- aliases: aliases$4,
- extensions: extensions$12,
- filenames: filenames$2,
- languageId: languageId$12
-};
-
-var jsonWithComments$1 = Object.freeze({
- name: name$13,
- type: type$12,
- group: group$14,
- tmScope: tmScope$12,
- aceMode: aceMode$12,
- codemirrorMode: codemirrorMode$8,
- codemirrorMimeType: codemirrorMimeType$8,
- aliases: aliases$4,
- extensions: extensions$12,
- filenames: filenames$2,
- languageId: languageId$12,
- default: jsonWithComments
-});
-
-var name$14 = "JSON5";
-var type$13 = "data";
-var extensions$13 = [".json5"];
-var tmScope$13 = "source.js";
-var aceMode$13 = "javascript";
-var codemirrorMode$9 = "javascript";
-var codemirrorMimeType$9 = "application/json";
-var languageId$13 = 175;
-var json5 = {
- name: name$14,
- type: type$13,
- extensions: extensions$13,
- tmScope: tmScope$13,
- aceMode: aceMode$13,
- codemirrorMode: codemirrorMode$9,
- codemirrorMimeType: codemirrorMimeType$9,
- languageId: languageId$13
-};
-
-var json5$1 = Object.freeze({
- name: name$14,
- type: type$13,
- extensions: extensions$13,
- tmScope: tmScope$13,
- aceMode: aceMode$13,
- codemirrorMode: codemirrorMode$9,
- codemirrorMimeType: codemirrorMimeType$9,
- languageId: languageId$13,
- default: json5
-});
-
-var require$$0$24 = ( javascript$1 && javascript ) || javascript$1;
-
-var require$$1$10 = ( jsx$1 && jsx ) || jsx$1;
-
-var require$$2$10 = ( typescript$1 && typescript ) || typescript$1;
-
-var require$$3$7 = ( json$6 && json$5 ) || json$6;
-
-var require$$4$4 = ( jsonWithComments$1 && jsonWithComments ) || jsonWithComments$1;
-
-var require$$5$2 = ( json5$1 && json5 ) || json5$1;
-
-var languages$4 = [createLanguage(require$$0$24, {
- override: {
- since: "0.0.0",
- parsers: ["babel", "flow"],
- vscodeLanguageIds: ["javascript"]
- },
- extend: {
- interpreters: ["nodejs"]
- }
-}), createLanguage(require$$0$24, {
- override: {
- name: "Flow",
- since: "0.0.0",
- parsers: ["babel", "flow"],
- vscodeLanguageIds: ["javascript"],
- aliases: [],
- filenames: [],
- extensions: [".js.flow"]
- }
-}), createLanguage(require$$1$10, {
- override: {
- since: "0.0.0",
- parsers: ["babel", "flow"],
- vscodeLanguageIds: ["javascriptreact"]
- }
-}), createLanguage(require$$2$10, {
- override: {
- since: "1.4.0",
- parsers: ["typescript"],
- vscodeLanguageIds: ["typescript", "typescriptreact"]
- }
-}), createLanguage(require$$3$7, {
- override: {
- name: "JSON.stringify",
- since: "1.13.0",
- parsers: ["json-stringify"],
- vscodeLanguageIds: ["json"],
- extensions: [],
- // .json file defaults to json instead of json-stringify
- filenames: ["package.json", "package-lock.json", "composer.json"]
- }
-}), createLanguage(require$$3$7, {
- override: {
- since: "1.5.0",
- parsers: ["json"],
- vscodeLanguageIds: ["json"]
- },
- extend: {
- filenames: [".prettierrc"]
- }
-}), createLanguage(require$$4$4, {
- override: {
- since: "1.5.0",
- parsers: ["json"],
- vscodeLanguageIds: ["jsonc"]
- },
- extend: {
- filenames: [".eslintrc"]
- }
-}), createLanguage(require$$5$2, {
- override: {
- since: "1.13.0",
- parsers: ["json5"],
- vscodeLanguageIds: ["json5"]
- }
-})];
-var printers$4 = {
- estree: printerEstree,
- "estree-json": printerEstreeJson
-};
-var languageJs = {
- languages: languages$4,
- options: options$12,
- printers: printers$4
-};
-
-var json$9 = {"cjkPattern":"[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312e\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fea\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]","kPattern":"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]","punctuationPattern":"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0af0\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166d-\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e49\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc9\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"};
-
-var cjkPattern = json$9.cjkPattern;
-var kPattern = json$9.kPattern;
-var punctuationPattern$1 = json$9.punctuationPattern;
-var getLast$4 = util.getLast;
-var INLINE_NODE_TYPES$1 = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"];
-var INLINE_NODE_WRAPPER_TYPES$1 = INLINE_NODE_TYPES$1.concat(["tableCell", "paragraph", "heading"]);
-var kRegex = new RegExp(kPattern);
-var punctuationRegex = new RegExp(punctuationPattern$1);
-/**
- * split text into whitespaces and words
- * @param {string} text
- * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>}
- */
+ function getFencedCodeBlockValue(node, originalText) {
+ var text = originalText.slice(node.position.start.offset, node.position.end.offset);
+ var leadingSpaceCount = text.match(/^\s*/)[0].length;
+ var replaceRegex = new RegExp("^\\s{0,".concat(leadingSpaceCount, "}"));
+ var lineContents = text.split("\n");
+ var markerStyle = text[leadingSpaceCount]; // ` or ~
-function splitText$1(text, options) {
- var KIND_NON_CJK = "non-cjk";
- var KIND_CJ_LETTER = "cj-letter";
- var KIND_K_LETTER = "k-letter";
- var KIND_CJK_PUNCTUATION = "cjk-punctuation";
- var nodes = [];
- (options.proseWrap === "preserve" ? text : text.replace(new RegExp("(".concat(cjkPattern, ")\n(").concat(cjkPattern, ")"), "g"), "$1$2")).split(/([ \t\n]+)/).forEach(function (token, index, tokens) {
- // whitespace
- if (index % 2 === 1) {
- nodes.push({
- type: "whitespace",
- value: /\n/.test(token) ? "\n" : " "
- });
- return;
- } // word separated by whitespace
+ var marker = text.slice(leadingSpaceCount).match(new RegExp("^[".concat(markerStyle, "]+")))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces
+ // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence
+ var hasEndMarker = new RegExp("^\\s{0,3}".concat(marker)).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1)));
+ return lineContents.slice(1, hasEndMarker ? -1 : undefined).map(function (x, i) {
+ return x.slice(getIndent(i + 1)).replace(replaceRegex, "");
+ }).join("\n");
- if ((index === 0 || index === tokens.length - 1) && token === "") {
- return;
+ function getIndent(lineIndex) {
+ return node.position.indent[lineIndex - 1] - 1;
}
+ }
- token.split(new RegExp("(".concat(cjkPattern, ")"))).forEach(function (innerToken, innerIndex, innerTokens) {
- if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") {
- return;
- } // non-CJK word
-
-
- if (innerIndex % 2 === 0) {
- if (innerToken !== "") {
- appendNode({
- type: "word",
- value: innerToken,
- kind: KIND_NON_CJK,
- hasLeadingPunctuation: punctuationRegex.test(innerToken[0]),
- hasTrailingPunctuation: punctuationRegex.test(getLast$4(innerToken))
- });
- }
+ function mapAst(ast, handler) {
+ return function preorder(node, index, parentStack) {
+ parentStack = parentStack || [];
+ var newNode = handler(node, index, parentStack);
- return;
- } // CJK character
+ if (Array.isArray(newNode)) {
+ return newNode;
+ }
+ newNode = Object.assign({}, newNode);
- appendNode(punctuationRegex.test(innerToken) ? {
- type: "word",
- value: innerToken,
- kind: KIND_CJK_PUNCTUATION,
- hasLeadingPunctuation: true,
- hasTrailingPunctuation: true
- } : {
- type: "word",
- value: innerToken,
- kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER,
- hasLeadingPunctuation: false,
- hasTrailingPunctuation: false
- });
- });
- });
- return nodes;
+ if (newNode.children) {
+ newNode.children = newNode.children.reduce(function (nodes, child, index) {
+ var newNodes = preorder(child, index, [newNode].concat(parentStack));
- function appendNode(node) {
- var lastNode = getLast$4(nodes);
+ if (!Array.isArray(newNodes)) {
+ newNodes = [newNodes];
+ }
- if (lastNode && lastNode.type === "word") {
- if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) {
- nodes.push({
- type: "whitespace",
- value: " "
- });
- } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace
- ![lastNode.value, node.value].some(function (value) {
- return /\u3000/.test(value);
- })) {
- nodes.push({
- type: "whitespace",
- value: ""
- });
+ nodes.push.apply(nodes, newNodes);
+ return nodes;
+ }, []);
}
- }
-
- nodes.push(node);
- function isBetween(kind1, kind2) {
- return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1;
- }
+ return newNode;
+ }(ast, null, null);
}
-}
-
-function getOrderedListItemInfo$1(orderListItem, originalText) {
- var _originalText$slice$m = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),
- _originalText$slice$m2 = _slicedToArray(_originalText$slice$m, 4),
- numberText = _originalText$slice$m2[1],
- marker = _originalText$slice$m2[2],
- leadingSpaces = _originalText$slice$m2[3];
- return {
- numberText: numberText,
- marker: marker,
- leadingSpaces: leadingSpaces
+ var utils$5 = {
+ mapAst: mapAst,
+ splitText: splitText,
+ punctuationPattern: punctuationPattern,
+ getFencedCodeBlockValue: getFencedCodeBlockValue,
+ getOrderedListItemInfo: getOrderedListItemInfo,
+ INLINE_NODE_TYPES: INLINE_NODE_TYPES,
+ INLINE_NODE_WRAPPER_TYPES: INLINE_NODE_WRAPPER_TYPES
};
-} // workaround for https://github.com/remarkjs/remark/issues/351
-// leading and trailing newlines are stripped by remark
+ var _require$$0$builders$8 = doc.builders,
+ hardline$b = _require$$0$builders$8.hardline,
+ literalline$5 = _require$$0$builders$8.literalline,
+ concat$f = _require$$0$builders$8.concat,
+ markAsRoot$3 = _require$$0$builders$8.markAsRoot,
+ mapDoc$6 = doc.utils.mapDoc;
+ var getFencedCodeBlockValue$1 = utils$5.getFencedCodeBlockValue;
-function getFencedCodeBlockValue$2(node, originalText) {
- var text = originalText.slice(node.position.start.offset, node.position.end.offset);
- var leadingSpaceCount = text.match(/^\s*/)[0].length;
- var replaceRegex = new RegExp("^\\s{0,".concat(leadingSpaceCount, "}"));
- var lineContents = text.split("\n");
- var markerStyle = text[leadingSpaceCount]; // ` or ~
+ function embed$4(path, print, textToDoc, options) {
+ var node = path.getValue();
- var marker = text.slice(leadingSpaceCount).match(new RegExp("^[".concat(markerStyle, "]+")))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces
- // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence
+ if (node.type === "code" && node.lang !== null) {
+ // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk)
+ var langMatch = node.lang.match(/^[A-Za-z0-9_-]+/);
+ var lang = langMatch ? langMatch[0] : "";
+ var parser = getParserName(lang);
- var hasEndMarker = new RegExp("^\\s{0,3}".concat(marker)).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1)));
- return lineContents.slice(1, hasEndMarker ? -1 : undefined).map(function (x, i) {
- return x.slice(getIndent(i + 1)).replace(replaceRegex, "");
- }).join("\n");
+ if (parser) {
+ var styleUnit = options.__inJsTemplate ? "~" : "`";
+ var style = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1));
+ var doc = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), {
+ parser: parser
+ });
+ return markAsRoot$3(concat$f([style, node.lang, hardline$b, replaceNewlinesWithLiterallines(doc), style]));
+ }
+ }
- function getIndent(lineIndex) {
- return node.position.indent[lineIndex - 1] - 1;
- }
-}
+ if (node.type === "yaml") {
+ return markAsRoot$3(concat$f(["---", hardline$b, node.value && node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---"]));
+ } // MDX
-function mapAst(ast, handler) {
- return function preorder(node, index, parentStack) {
- parentStack = parentStack || [];
- var newNode = Object.assign({}, handler(node, index, parentStack));
- if (newNode.children) {
- newNode.children = newNode.children.map(function (child, index) {
- return preorder(child, index, [newNode].concat(parentStack));
- });
- }
+ switch (node.type) {
+ case "importExport":
+ return textToDoc(node.value, {
+ parser: "babel"
+ });
- return newNode;
- }(ast, null, null);
-}
-
-var utils$10 = {
- mapAst: mapAst,
- splitText: splitText$1,
- punctuationPattern: punctuationPattern$1,
- getFencedCodeBlockValue: getFencedCodeBlockValue$2,
- getOrderedListItemInfo: getOrderedListItemInfo$1,
- INLINE_NODE_TYPES: INLINE_NODE_TYPES$1,
- INLINE_NODE_WRAPPER_TYPES: INLINE_NODE_WRAPPER_TYPES$1
-};
-
-var _require$$0$builders$9 = doc.builders;
-var hardline$12 = _require$$0$builders$9.hardline;
-var literalline$6 = _require$$0$builders$9.literalline;
-var concat$16 = _require$$0$builders$9.concat;
-var markAsRoot$4 = _require$$0$builders$9.markAsRoot;
-var mapDoc$7 = doc.utils.mapDoc;
-var getFencedCodeBlockValue$1 = utils$10.getFencedCodeBlockValue;
-
-function embed$6(path, print, textToDoc, options) {
- var node = path.getValue();
-
- if (node.type === "code" && node.lang !== null) {
- // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk)
- var langMatch = node.lang.match(/^[A-Za-z0-9_-]+/);
- var lang = langMatch ? langMatch[0] : "";
- var parser = getParserName(lang);
-
- if (parser) {
- var styleUnit = options.__inJsTemplate ? "~" : "`";
- var style = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1));
- var doc$$2 = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), {
- parser: parser
- });
- return markAsRoot$4(concat$16([style, node.lang, hardline$12, replaceNewlinesWithLiterallines(doc$$2), style]));
+ case "jsx":
+ return textToDoc(node.value, {
+ parser: "__js_expression"
+ });
}
- }
-
- if (node.type === "yaml") {
- return markAsRoot$4(concat$16(["---", hardline$12, node.value && node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
- parser: "yaml"
- })) : "", "---"]));
- } // MDX
+ return null;
- switch (node.type) {
- case "importExport":
- return textToDoc(node.value, {
- parser: "babel"
+ function getParserName(lang) {
+ var supportInfo = support.getSupportInfo(null, {
+ plugins: options.plugins
});
-
- case "jsx":
- return textToDoc(node.value, {
- parser: "__js_expression"
+ var language = supportInfo.languages.find(function (language) {
+ return language.name.toLowerCase() === lang || language.aliases && language.aliases.indexOf(lang) !== -1 || language.extensions && language.extensions.find(function (ext) {
+ return ext.substring(1) === lang;
+ });
});
- }
-
- return null;
- function getParserName(lang) {
- var supportInfo = support.getSupportInfo(null, {
- plugins: options.plugins
- });
- var language = supportInfo.languages.find(function (language) {
- return language.name.toLowerCase() === lang || language.aliases && language.aliases.indexOf(lang) !== -1 || language.extensions && language.extensions.find(function (ext) {
- return ext.substring(1) === lang;
- });
- });
+ if (language) {
+ return language.parsers[0];
+ }
- if (language) {
- return language.parsers[0];
+ return null;
}
- return null;
- }
-
- function replaceNewlinesWithLiterallines(doc$$2) {
- return mapDoc$7(doc$$2, function (currentDoc) {
- return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$16(currentDoc.split(/(\n)/g).map(function (v, i) {
- return i % 2 === 0 ? v : literalline$6;
- })) : currentDoc;
- });
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$6(doc, function (currentDoc) {
+ return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$f(currentDoc.split(/(\n)/g).map(function (v, i) {
+ return i % 2 === 0 ? v : literalline$5;
+ })) : currentDoc;
+ });
+ }
}
-}
-var embed_1$4 = embed$6;
-
-var pragma$8 = createCommonjsModule(function (module) {
- "use strict";
+ var embed_1$2 = embed$4;
var pragmas = ["format", "prettier"];
@@ -29072,7 +29822,7 @@ var pragma$8 = createCommonjsModule(function (module) {
return matched && matched.index === 0;
}
- module.exports = {
+ var pragma$4 = {
startWithPragma: startWithPragma,
hasPragma: function hasPragma(text) {
return startWithPragma(frontMatter(text).content.trimLeft());
@@ -29083,1950 +29833,2003 @@ var pragma$8 = createCommonjsModule(function (module) {
return extracted.frontMatter ? "".concat(extracted.frontMatter.raw, "\n\n").concat(pragma, "\n\n").concat(extracted.content) : "".concat(pragma, "\n\n").concat(extracted.content);
}
};
-});
-
-var getOrderedListItemInfo$2 = utils$10.getOrderedListItemInfo;
-var mapAst$1 = utils$10.mapAst;
-var splitText$2 = utils$10.splitText; // 0x0 ~ 0x10ffff
-
-var isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/;
-
-function preprocess$4(ast, options) {
- ast = restoreUnescapedCharacter(ast, options);
- ast = mergeContinuousTexts(ast);
- ast = transformInlineCode(ast);
- ast = transformIndentedCodeblockAndMarkItsParentList(ast, options);
- ast = markAlignedList(ast, options);
- ast = splitTextIntoSentences(ast, options);
- ast = transformImportExport(ast);
- ast = mergeContinuousImportExport(ast);
- return ast;
-}
-
-function transformImportExport(ast) {
- return mapAst$1(ast, function (node) {
- if (node.type !== "import" && node.type !== "export") {
- return node;
- }
- return Object.assign({}, node, {
- type: "importExport"
+ var getOrderedListItemInfo$1 = utils$5.getOrderedListItemInfo,
+ mapAst$1 = utils$5.mapAst,
+ splitText$1 = utils$5.splitText; // 0x0 ~ 0x10ffff
+ // eslint-disable-next-line no-control-regex
+
+ var isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/;
+
+ function preprocess$2(ast, options) {
+ ast = restoreUnescapedCharacter(ast, options);
+ ast = mergeContinuousTexts(ast);
+ ast = transformInlineCode(ast);
+ ast = transformIndentedCodeblockAndMarkItsParentList(ast, options);
+ ast = markAlignedList(ast, options);
+ ast = splitTextIntoSentences(ast, options);
+ ast = transformImportExport(ast);
+ ast = mergeContinuousImportExport(ast);
+ return ast;
+ }
+
+ function transformImportExport(ast) {
+ return mapAst$1(ast, function (node) {
+ if (node.type !== "import" && node.type !== "export") {
+ return node;
+ }
+
+ return Object.assign({}, node, {
+ type: "importExport"
+ });
});
- });
-}
+ }
-function transformInlineCode(ast) {
- return mapAst$1(ast, function (node) {
- if (node.type !== "inlineCode") {
- return node;
- }
+ function transformInlineCode(ast) {
+ return mapAst$1(ast, function (node) {
+ if (node.type !== "inlineCode") {
+ return node;
+ }
- return Object.assign({}, node, {
- value: node.value.replace(/\s+/g, " ")
+ return Object.assign({}, node, {
+ value: node.value.replace(/\s+/g, " ")
+ });
});
- });
-}
+ }
-function restoreUnescapedCharacter(ast, options) {
- return mapAst$1(ast, function (node) {
- return node.type !== "text" ? node : Object.assign({}, node, {
- value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer
- isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value
+ function restoreUnescapedCharacter(ast, options) {
+ return mapAst$1(ast, function (node) {
+ return node.type !== "text" ? node : Object.assign({}, node, {
+ value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer
+ isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value
+ });
});
- });
-}
+ }
-function mergeContinuousImportExport(ast) {
- return mergeChildren(ast, function (prevNode, node) {
- return prevNode.type === "importExport" && node.type === "importExport";
- }, function (prevNode, node) {
- return {
- type: "importExport",
- value: prevNode.value + "\n\n" + node.value,
- position: {
- start: prevNode.position.start,
- end: node.position.end
- }
- };
- });
-}
+ function mergeContinuousImportExport(ast) {
+ return mergeChildren(ast, function (prevNode, node) {
+ return prevNode.type === "importExport" && node.type === "importExport";
+ }, function (prevNode, node) {
+ return {
+ type: "importExport",
+ value: prevNode.value + "\n\n" + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ };
+ });
+ }
-function mergeChildren(ast, shouldMerge, mergeNode) {
- return mapAst$1(ast, function (node) {
- if (!node.children) {
- return node;
- }
+ function mergeChildren(ast, shouldMerge, mergeNode) {
+ return mapAst$1(ast, function (node) {
+ if (!node.children) {
+ return node;
+ }
- var children = node.children.reduce(function (current, child) {
- var lastChild = current[current.length - 1];
+ var children = node.children.reduce(function (current, child) {
+ var lastChild = current[current.length - 1];
- if (lastChild && shouldMerge(lastChild, child)) {
- current.splice(-1, 1, mergeNode(lastChild, child));
- } else {
- current.push(child);
- }
+ if (lastChild && shouldMerge(lastChild, child)) {
+ current.splice(-1, 1, mergeNode(lastChild, child));
+ } else {
+ current.push(child);
+ }
- return current;
- }, []);
- return Object.assign({}, node, {
- children: children
+ return current;
+ }, []);
+ return Object.assign({}, node, {
+ children: children
+ });
});
- });
-}
+ }
-function mergeContinuousTexts(ast) {
- return mergeChildren(ast, function (prevNode, node) {
- return prevNode.type === "text" && node.type === "text";
- }, function (prevNode, node) {
- return {
- type: "text",
- value: prevNode.value + node.value,
- position: {
- start: prevNode.position.start,
- end: node.position.end
- }
- };
- });
-}
+ function mergeContinuousTexts(ast) {
+ return mergeChildren(ast, function (prevNode, node) {
+ return prevNode.type === "text" && node.type === "text";
+ }, function (prevNode, node) {
+ return {
+ type: "text",
+ value: prevNode.value + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ };
+ });
+ }
-function splitTextIntoSentences(ast, options) {
- return mapAst$1(ast, function (node, index, _ref) {
- var _ref2 = _slicedToArray(_ref, 1),
- parentNode = _ref2[0];
+ function splitTextIntoSentences(ast, options) {
+ return mapAst$1(ast, function (node, index, _ref) {
+ var _ref2 = _slicedToArray(_ref, 1),
+ parentNode = _ref2[0];
- if (node.type !== "text") {
- return node;
- }
+ if (node.type !== "text") {
+ return node;
+ }
- var value = node.value;
+ var value = node.value;
- if (parentNode.type === "paragraph") {
- if (index === 0) {
- value = value.trimLeft();
- }
+ if (parentNode.type === "paragraph") {
+ if (index === 0) {
+ value = value.trimLeft();
+ }
- if (index === parentNode.children.length - 1) {
- value = value.trimRight();
+ if (index === parentNode.children.length - 1) {
+ value = value.trimRight();
+ }
}
- }
- return {
- type: "sentence",
- position: node.position,
- children: splitText$2(value, options)
- };
- });
-}
+ return {
+ type: "sentence",
+ position: node.position,
+ children: splitText$1(value, options)
+ };
+ });
+ }
-function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
- return mapAst$1(ast, function (node, index, parentStack) {
- if (node.type === "code") {
- // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it
- var isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
- node.isIndented = isIndented;
+ function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
+ return mapAst$1(ast, function (node, index, parentStack) {
+ if (node.type === "code") {
+ // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it
+ var isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
+ node.isIndented = isIndented;
- if (isIndented) {
- for (var i = 0; i < parentStack.length; i++) {
- var parent = parentStack[i]; // no need to check checked items
+ if (isIndented) {
+ for (var i = 0; i < parentStack.length; i++) {
+ var parent = parentStack[i]; // no need to check checked items
- if (parent.hasIndentedCodeblock) {
- break;
- }
+ if (parent.hasIndentedCodeblock) {
+ break;
+ }
- if (parent.type === "list") {
- parent.hasIndentedCodeblock = true;
+ if (parent.type === "list") {
+ parent.hasIndentedCodeblock = true;
+ }
}
}
}
- }
- return node;
- });
-}
+ return node;
+ });
+ }
-function markAlignedList(ast, options) {
- return mapAst$1(ast, function (node, index, parentStack) {
- if (node.type === "list" && node.children.length !== 0) {
- // if one of its parents is not aligned, it's not possible to be aligned in sub-lists
- for (var i = 0; i < parentStack.length; i++) {
- var parent = parentStack[i];
+ function markAlignedList(ast, options) {
+ return mapAst$1(ast, function (node, index, parentStack) {
+ if (node.type === "list" && node.children.length !== 0) {
+ // if one of its parents is not aligned, it's not possible to be aligned in sub-lists
+ for (var i = 0; i < parentStack.length; i++) {
+ var parent = parentStack[i];
- if (parent.type === "list" && !parent.isAligned) {
- node.isAligned = false;
- return node;
+ if (parent.type === "list" && !parent.isAligned) {
+ node.isAligned = false;
+ return node;
+ }
}
+
+ node.isAligned = isAligned(node);
}
- node.isAligned = isAligned(node);
+ return node;
+ });
+
+ function getListItemStart(listItem) {
+ return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1;
}
- return node;
- });
+ function isAligned(list) {
+ if (!list.ordered) {
+ /**
+ * - 123
+ * - 123
+ */
+ return true;
+ }
- function getListItemStart(listItem) {
- return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1;
- }
+ var _list$children = _slicedToArray(list.children, 2),
+ firstItem = _list$children[0],
+ secondItem = _list$children[1];
- function isAligned(list) {
- if (!list.ordered) {
- /**
- * - 123
- * - 123
- */
- return true;
- }
+ var firstInfo = getOrderedListItemInfo$1(firstItem, options.originalText);
- var _list$children = _slicedToArray(list.children, 2),
- firstItem = _list$children[0],
- secondItem = _list$children[1];
+ if (firstInfo.leadingSpaces.length > 1) {
+ /**
+ * 1. 123
+ *
+ * 1. 123
+ * 1. 123
+ */
+ return true;
+ }
- var firstInfo = getOrderedListItemInfo$2(firstItem, options.originalText);
+ var firstStart = getListItemStart(firstItem);
- if (firstInfo.leadingSpaces.length > 1) {
- /**
- * 1. 123
- *
- * 1. 123
- * 1. 123
- */
- return true;
- }
+ if (firstStart === -1) {
+ /**
+ * 1.
+ *
+ * 1.
+ * 1.
+ */
+ return false;
+ }
- var firstStart = getListItemStart(firstItem);
+ if (list.children.length === 1) {
+ /**
+ * aligned:
+ *
+ * 11. 123
+ *
+ * not aligned:
+ *
+ * 1. 123
+ */
+ return firstStart % options.tabWidth === 0;
+ }
- if (firstStart === -1) {
- /**
- * 1.
- *
- * 1.
- * 1.
- */
- return false;
- }
+ var secondStart = getListItemStart(secondItem);
+
+ if (firstStart !== secondStart) {
+ /**
+ * 11. 123
+ * 1. 123
+ *
+ * 1. 123
+ * 11. 123
+ */
+ return false;
+ }
- if (list.children.length === 1) {
+ if (firstStart % options.tabWidth === 0) {
+ /**
+ * 11. 123
+ * 12. 123
+ */
+ return true;
+ }
/**
* aligned:
*
* 11. 123
+ * 1. 123
*
* not aligned:
*
* 1. 123
+ * 2. 123
*/
- return firstStart % options.tabWidth === 0;
- }
- var secondStart = getListItemStart(secondItem);
- if (firstStart !== secondStart) {
- /**
- * 11. 123
- * 1. 123
- *
- * 1. 123
- * 11. 123
- */
- return false;
- }
+ var secondInfo = getOrderedListItemInfo$1(secondItem, options.originalText);
+ return secondInfo.leadingSpaces.length > 1;
+ }
+ }
+
+ var preprocess_1$2 = preprocess$2;
+
+ var _require$$0$builders$9 = doc.builders,
+ breakParent$4 = _require$$0$builders$9.breakParent,
+ concat$g = _require$$0$builders$9.concat,
+ join$b = _require$$0$builders$9.join,
+ line$8 = _require$$0$builders$9.line,
+ literalline$6 = _require$$0$builders$9.literalline,
+ markAsRoot$4 = _require$$0$builders$9.markAsRoot,
+ hardline$c = _require$$0$builders$9.hardline,
+ softline$7 = _require$$0$builders$9.softline,
+ ifBreak$7 = _require$$0$builders$9.ifBreak,
+ fill$5 = _require$$0$builders$9.fill,
+ align$2 = _require$$0$builders$9.align,
+ indent$9 = _require$$0$builders$9.indent,
+ group$f = _require$$0$builders$9.group,
+ mapDoc$7 = doc.utils.mapDoc,
+ printDocToString$2 = doc.printer.printDocToString;
+ var getFencedCodeBlockValue$2 = utils$5.getFencedCodeBlockValue,
+ getOrderedListItemInfo$2 = utils$5.getOrderedListItemInfo,
+ splitText$2 = utils$5.splitText,
+ punctuationPattern$1 = utils$5.punctuationPattern,
+ INLINE_NODE_TYPES$1 = utils$5.INLINE_NODE_TYPES,
+ INLINE_NODE_WRAPPER_TYPES$1 = utils$5.INLINE_NODE_WRAPPER_TYPES;
+ var replaceEndOfLineWith$2 = util.replaceEndOfLineWith;
+ var TRAILING_HARDLINE_NODES = ["importExport"];
+ var SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"];
+ var SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition", "jsx"];
+
+ function genericPrint$5(path, options, print) {
+ var node = path.getValue();
- if (firstStart % options.tabWidth === 0) {
- /**
- * 11. 123
- * 12. 123
- */
- return true;
+ if (shouldRemainTheSameContent(path)) {
+ return concat$g(splitText$2(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(function (node) {
+ return node.type === "word" ? node.value : node.value === "" ? "" : printLine(path, node.value, options);
+ }));
}
- /**
- * aligned:
- *
- * 11. 123
- * 1. 123
- *
- * not aligned:
- *
- * 1. 123
- * 2. 123
- */
+ switch (node.type) {
+ case "root":
+ if (node.children.length === 0) {
+ return "";
+ }
- var secondInfo = getOrderedListItemInfo$2(secondItem, options.originalText);
- return secondInfo.leadingSpaces.length > 1;
- }
-}
-
-var preprocess_1$4 = preprocess$4;
-
-var _require$$0$builders$8 = doc.builders;
-var breakParent$4 = _require$$0$builders$8.breakParent;
-var concat$15 = _require$$0$builders$8.concat;
-var join$11 = _require$$0$builders$8.join;
-var line$10 = _require$$0$builders$8.line;
-var literalline$5 = _require$$0$builders$8.literalline;
-var markAsRoot$3 = _require$$0$builders$8.markAsRoot;
-var hardline$11 = _require$$0$builders$8.hardline;
-var softline$7 = _require$$0$builders$8.softline;
-var ifBreak$7 = _require$$0$builders$8.ifBreak;
-var fill$5 = _require$$0$builders$8.fill;
-var align$2 = _require$$0$builders$8.align;
-var indent$9 = _require$$0$builders$8.indent;
-var group$15 = _require$$0$builders$8.group;
-var mapDoc$6 = doc.utils.mapDoc;
-var printDocToString$2 = doc.printer.printDocToString;
-var getFencedCodeBlockValue = utils$10.getFencedCodeBlockValue;
-var getOrderedListItemInfo = utils$10.getOrderedListItemInfo;
-var splitText = utils$10.splitText;
-var punctuationPattern = utils$10.punctuationPattern;
-var INLINE_NODE_TYPES = utils$10.INLINE_NODE_TYPES;
-var INLINE_NODE_WRAPPER_TYPES = utils$10.INLINE_NODE_WRAPPER_TYPES;
-var replaceEndOfLineWith$2 = util.replaceEndOfLineWith;
-var TRAILING_HARDLINE_NODES = ["importExport"];
-var SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"];
-var SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"];
-
-function genericPrint$5(path, options, print) {
- var node = path.getValue();
-
- if (shouldRemainTheSameContent(path)) {
- return concat$15(splitText(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(function (node) {
- return node.type === "word" ? node.value : node.value === "" ? "" : printLine(path, node.value, options);
- }));
- }
+ return concat$g([normalizeDoc(printRoot(path, options, print)), TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 ? hardline$c : ""]);
- switch (node.type) {
- case "root":
- if (node.children.length === 0) {
- return "";
- }
+ case "paragraph":
+ return printChildren$2(path, options, print, {
+ postprocessor: fill$5
+ });
- return concat$15([normalizeDoc(printRoot(path, options, print)), TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 ? hardline$11 : ""]);
+ case "sentence":
+ return printChildren$2(path, options, print);
- case "paragraph":
- return printChildren$1(path, options, print, {
- postprocessor: fill$5
- });
+ case "word":
+ return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math)
+ .replace(new RegExp(["(^|".concat(punctuationPattern$1, ")(_+)"), "(_+)(".concat(punctuationPattern$1, "|$)")].join("|"), "g"), function (_, text1, underscore1, underscore2, text2) {
+ return (underscore1 ? "".concat(text1).concat(underscore1) : "".concat(underscore2).concat(text2)).replace(/_/g, "\\_");
+ });
+ // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis
+
+ case "whitespace":
+ {
+ var parentNode = path.getParentNode();
+ var index = parentNode.children.indexOf(node);
+ var nextNode = parentNode.children[index + 1];
+ var proseWrap = // leading char that may cause different syntax
+ nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap;
+ return printLine(path, node.value, {
+ proseWrap: proseWrap
+ });
+ }
- case "sentence":
- return printChildren$1(path, options, print);
+ case "emphasis":
+ {
+ var _parentNode = path.getParentNode();
- case "word":
- return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math)
- .replace(new RegExp(["(^|".concat(punctuationPattern, ")(_+)"), "(_+)(".concat(punctuationPattern, "|$)")].join("|"), "g"), function (_, text1, underscore1, underscore2, text2) {
- return (underscore1 ? "".concat(text1).concat(underscore1) : "".concat(underscore2).concat(text2)).replace(/_/g, "\\_");
- });
- // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis
+ var _index = _parentNode.children.indexOf(node);
- case "whitespace":
- {
- var parentNode = path.getParentNode();
- var index = parentNode.children.indexOf(node);
- var nextNode = parentNode.children[index + 1];
- var proseWrap = // leading char that may cause different syntax
- nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap;
- return printLine(path, node.value, {
- proseWrap: proseWrap
- });
- }
+ var prevNode = _parentNode.children[_index - 1];
+ var _nextNode = _parentNode.children[_index + 1];
+ var hasPrevOrNextWord = // `1*2*3` is considered emphasis but `1_2_3` is not
+ prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util.getLast(prevNode.children).type === "word" && !util.getLast(prevNode.children).hasTrailingPunctuation || _nextNode && _nextNode.type === "sentence" && _nextNode.children.length > 0 && _nextNode.children[0].type === "word" && !_nextNode.children[0].hasLeadingPunctuation;
+ var style = hasPrevOrNextWord || getAncestorNode$2(path, "emphasis") ? "*" : "_";
+ return concat$g([style, printChildren$2(path, options, print), style]);
+ }
- case "emphasis":
- {
- var _parentNode = path.getParentNode();
+ case "strong":
+ return concat$g(["**", printChildren$2(path, options, print), "**"]);
- var _index = _parentNode.children.indexOf(node);
+ case "delete":
+ return concat$g(["~~", printChildren$2(path, options, print), "~~"]);
- var prevNode = _parentNode.children[_index - 1];
- var _nextNode = _parentNode.children[_index + 1];
- var hasPrevOrNextWord = // `1*2*3` is considered emphais but `1_2_3` is not
- prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util.getLast(prevNode.children).type === "word" && !util.getLast(prevNode.children).hasTrailingPunctuation || _nextNode && _nextNode.type === "sentence" && _nextNode.children.length > 0 && _nextNode.children[0].type === "word" && !_nextNode.children[0].hasLeadingPunctuation;
- var style = hasPrevOrNextWord || getAncestorNode$2(path, "emphasis") ? "*" : "_";
- return concat$15([style, printChildren$1(path, options, print), style]);
- }
+ case "inlineCode":
+ {
+ var backtickCount = util.getMinNotPresentContinuousCount(node.value, "`");
- case "strong":
- return concat$15(["**", printChildren$1(path, options, print), "**"]);
+ var _style = "`".repeat(backtickCount || 1);
- case "delete":
- return concat$15(["~~", printChildren$1(path, options, print), "~~"]);
+ var gap = backtickCount ? " " : "";
+ return concat$g([_style, gap, node.value, gap, _style]);
+ }
- case "inlineCode":
- {
- var backtickCount = util.getMinNotPresentContinuousCount(node.value, "`");
+ case "link":
+ switch (options.originalText[node.position.start.offset]) {
+ case "<":
+ {
+ var mailto = "mailto:";
+ var url = // <hello@example.com> is parsed as { url: "mailto:hello@example.com" }
+ node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url;
+ return concat$g(["<", url, ">"]);
+ }
- var _style = "`".repeat(backtickCount || 1);
+ case "[":
+ return concat$g(["[", printChildren$2(path, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
- var gap = backtickCount ? " " : "";
- return concat$15([_style, gap, node.value, gap, _style]);
- }
+ default:
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+ }
- case "link":
- switch (options.originalText[node.position.start.offset]) {
- case "<":
- {
- var mailto = "mailto:";
- var url = // <hello@example.com> is parsed as { url: "mailto:hello@example.com" }
- node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url;
- return concat$15(["<", url, ">"]);
- }
+ case "image":
+ return concat$g(["![", node.alt || "", "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
- case "[":
- return concat$15(["[", printChildren$1(path, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
+ case "blockquote":
+ return concat$g(["> ", align$2("> ", printChildren$2(path, options, print))]);
- default:
- return options.originalText.slice(node.position.start.offset, node.position.end.offset);
- }
+ case "heading":
+ return concat$g(["#".repeat(node.depth) + " ", printChildren$2(path, options, print)]);
- case "image":
- return concat$15(["![", node.alt || "", "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
+ case "code":
+ {
+ if (node.isIndented) {
+ // indented code block
+ var alignment = " ".repeat(4);
+ return align$2(alignment, concat$g([alignment, concat$g(replaceEndOfLineWith$2(node.value, hardline$c))]));
+ } // fenced code block
- case "blockquote":
- return concat$15(["> ", align$2("> ", printChildren$1(path, options, print))]);
- case "heading":
- return concat$15(["#".repeat(node.depth) + " ", printChildren$1(path, options, print)]);
+ var styleUnit = options.__inJsTemplate ? "~" : "`";
- case "code":
- {
- if (node.isIndented) {
- // indented code block
- var alignment = " ".repeat(4);
- return align$2(alignment, concat$15([alignment, concat$15(replaceEndOfLineWith$2(node.value, hardline$11))]));
- } // fenced code block
+ var _style2 = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1));
+ return concat$g([_style2, node.lang || "", hardline$c, concat$g(replaceEndOfLineWith$2(getFencedCodeBlockValue$2(node, options.originalText), hardline$c)), hardline$c, _style2]);
+ }
- var styleUnit = options.__inJsTemplate ? "~" : "`";
+ case "yaml":
+ case "toml":
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
- var _style2 = styleUnit.repeat(Math.max(3, util.getMaxContinuousCount(node.value, styleUnit) + 1));
+ case "html":
+ {
+ var _parentNode2 = path.getParentNode();
- return concat$15([_style2, node.lang || "", hardline$11, concat$15(replaceEndOfLineWith$2(getFencedCodeBlockValue(node, options.originalText), hardline$11)), hardline$11, _style2]);
- }
+ var value = _parentNode2.type === "root" && util.getLast(_parentNode2.children) === node ? node.value.trimRight() : node.value;
+ var isHtmlComment = /^<!--[\s\S]*-->$/.test(value);
+ return concat$g(replaceEndOfLineWith$2(value, isHtmlComment ? hardline$c : markAsRoot$4(literalline$6)));
+ }
- case "yaml":
- case "toml":
- return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+ case "list":
+ {
+ var nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
+ var isGitDiffFriendlyOrderedList = node.ordered && node.children.length > 1 && +getOrderedListItemInfo$2(node.children[1], options.originalText).numberText === 1;
+ return printChildren$2(path, options, print, {
+ processor: function processor(childPath, index) {
+ var prefix = getPrefix();
+ return concat$g([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]);
- case "html":
- {
- var _parentNode2 = path.getParentNode();
+ function getPrefix() {
+ var rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
+ return node.isAligned ||
+ /* workaround for https://github.com/remarkjs/remark/issues/315 */
+ node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
+ }
+ }
+ });
+ }
- var value = _parentNode2.type === "root" && util.getLast(_parentNode2.children) === node ? node.value.trimRight() : node.value;
- var isHtmlComment = /^<!--[\s\S]*-->$/.test(value);
- return concat$15(replaceEndOfLineWith$2(value, isHtmlComment ? hardline$11 : markAsRoot$3(literalline$5)));
- }
+ case "thematicBreak":
+ {
+ var counter = getAncestorCounter$1(path, "list");
- case "list":
- {
- var nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
- var isGitDiffFriendlyOrderedList = node.ordered && node.children.length > 1 && +getOrderedListItemInfo(node.children[1], options.originalText).numberText === 1;
- return printChildren$1(path, options, print, {
- processor: function processor(childPath, index) {
- var prefix = getPrefix();
- return concat$15([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]);
-
- function getPrefix() {
- var rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
- return node.isAligned ||
- /* workaround for https://github.com/remarkjs/remark/issues/315 */
- node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
- }
+ if (counter === -1) {
+ return "---";
}
- });
- }
- case "thematicBreak":
- {
- var counter = getAncestorCounter$1(path, "list");
+ var _nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1));
- if (counter === -1) {
- return "---";
+ return _nthSiblingIndex % 2 === 0 ? "***" : "---";
}
- var _nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1));
+ case "linkReference":
+ return concat$g(["[", printChildren$2(path, options, print), "]", node.referenceType === "full" ? concat$g(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]);
- return _nthSiblingIndex % 2 === 0 ? "***" : "---";
- }
+ case "imageReference":
+ switch (node.referenceType) {
+ case "full":
+ return concat$g(["![", node.alt || "", "][", node.identifier, "]"]);
- case "linkReference":
- return concat$15(["[", printChildren$1(path, options, print), "]", node.referenceType === "full" ? concat$15(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]);
+ default:
+ return concat$g(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]);
+ }
- case "imageReference":
- switch (node.referenceType) {
- case "full":
- return concat$15(["![", node.alt || "", "][", node.identifier, "]"]);
+ case "definition":
+ {
+ var lineOrSpace = options.proseWrap === "always" ? line$8 : " ";
+ return group$f(concat$g([concat$g(["[", node.identifier, "]:"]), indent$9(concat$g([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$g([lineOrSpace, printTitle(node.title, options, false)])]))]));
+ }
- default:
- return concat$15(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]);
- }
+ case "footnote":
+ return concat$g(["[^", printChildren$2(path, options, print), "]"]);
- case "definition":
- {
- var lineOrSpace = options.proseWrap === "always" ? line$10 : " ";
- return group$15(concat$15([concat$15(["[", node.identifier, "]:"]), indent$9(concat$15([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$15([lineOrSpace, printTitle(node.title, options, false)])]))]));
- }
+ case "footnoteReference":
+ return concat$g(["[^", node.identifier, "]"]);
- case "footnote":
- return concat$15(["[^", printChildren$1(path, options, print), "]"]);
+ case "footnoteDefinition":
+ {
+ var _nextNode2 = path.getParentNode().children[path.getName() + 1];
+ var shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
+ return concat$g(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren$2(path, options, print) : group$f(concat$g([align$2(" ".repeat(options.tabWidth), printChildren$2(path, options, print, {
+ processor: function processor(childPath, index) {
+ return index === 0 ? group$f(concat$g([softline$7, softline$7, childPath.call(print)])) : childPath.call(print);
+ }
+ })), _nextNode2 && _nextNode2.type === "footnoteDefinition" ? softline$7 : ""]))]);
+ }
- case "footnoteReference":
- return concat$15(["[^", node.identifier, "]"]);
+ case "table":
+ return printTable(path, options, print);
- case "footnoteDefinition":
- {
- var _nextNode2 = path.getParentNode().children[path.getName() + 1];
- var shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
- return concat$15(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren$1(path, options, print) : group$15(concat$15([align$2(" ".repeat(options.tabWidth), printChildren$1(path, options, print, {
- processor: function processor(childPath, index) {
- return index === 0 ? group$15(concat$15([softline$7, softline$7, childPath.call(print)])) : childPath.call(print);
- }
- })), _nextNode2 && _nextNode2.type === "footnoteDefinition" ? softline$7 : ""]))]);
- }
+ case "tableCell":
+ return printChildren$2(path, options, print);
- case "table":
- return printTable(path, options, print);
+ case "break":
+ return /\s/.test(options.originalText[node.position.start.offset]) ? concat$g([" ", markAsRoot$4(literalline$6)]) : concat$g(["\\", hardline$c]);
- case "tableCell":
- return printChildren$1(path, options, print);
+ case "liquidNode":
+ return concat$g(replaceEndOfLineWith$2(node.value, hardline$c));
+ // MDX
- case "break":
- return /\s/.test(options.originalText[node.position.start.offset]) ? concat$15([" ", markAsRoot$3(literalline$5)]) : concat$15(["\\", hardline$11]);
+ case "importExport":
+ case "jsx":
+ return node.value;
+ // fallback to the original text if multiparser failed
- case "liquidNode":
- return concat$15(replaceEndOfLineWith$2(node.value, hardline$11));
- // MDX
+ case "math":
+ return concat$g(["$$", hardline$c, node.value ? concat$g([concat$g(replaceEndOfLineWith$2(node.value, hardline$c)), hardline$c]) : "", "$$"]);
- case "importExport":
- case "jsx":
- return node.value;
- // fallback to the original text if multiparser failed
+ case "inlineMath":
+ {
+ // remark-math trims content but we don't want to remove whitespaces
+ // since it's very possible that it's recognized as math accidentally
+ return options.originalText.slice(options.locStart(node), options.locEnd(node));
+ }
- case "math":
- return concat$15(["$$", hardline$11, node.value ? concat$15([concat$15(replaceEndOfLineWith$2(node.value, hardline$11)), hardline$11]) : "", "$$"]);
+ case "tableRow": // handled in "table"
- case "inlineMath":
- {
- // remark-math trims content but we don't want to remove whitespaces
- // since it's very possible that it's recognized as math accidentally
- return options.originalText.slice(options.locStart(node), options.locEnd(node));
- }
+ case "listItem": // handled in "list"
- case "tableRow": // handled in "table"
+ default:
+ throw new Error("Unknown markdown type ".concat(JSON.stringify(node.type)));
+ }
+ }
- case "listItem": // handled in "list"
+ function printListItem(path, options, print, listPrefix) {
+ var node = path.getValue();
+ var prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
+ return concat$g([prefix, printChildren$2(path, options, print, {
+ processor: function processor(childPath, index) {
+ if (index === 0 && childPath.getValue().type !== "list") {
+ return align$2(" ".repeat(prefix.length), childPath.call(print));
+ }
- default:
- throw new Error("Unknown markdown type ".concat(JSON.stringify(node.type)));
+ var alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block
+ );
+ return concat$g([alignment, align$2(alignment, childPath.call(print))]);
+ }
+ })]);
}
-}
-function printListItem(path, options, print, listPrefix) {
- var node = path.getValue();
- var prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
- return concat$15([prefix, printChildren$1(path, options, print, {
- processor: function processor(childPath, index) {
- if (index === 0 && childPath.getValue().type !== "list") {
- return align$2(" ".repeat(prefix.length), childPath.call(print));
- }
+ function alignListPrefix(prefix, options) {
+ var additionalSpaces = getAdditionalSpaces();
+ return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block
+ );
- var alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block
- );
- return concat$15([alignment, align$2(alignment, childPath.call(print))]);
+ function getAdditionalSpaces() {
+ var restSpaces = prefix.length % options.tabWidth;
+ return restSpaces === 0 ? 0 : options.tabWidth - restSpaces;
}
- })]);
-}
-
-function alignListPrefix(prefix, options) {
- var additionalSpaces = getAdditionalSpaces();
- return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block
- );
-
- function getAdditionalSpaces() {
- var restSpaces = prefix.length % options.tabWidth;
- return restSpaces === 0 ? 0 : options.tabWidth - restSpaces;
}
-}
-function getNthListSiblingIndex(node, parentNode) {
- return getNthSiblingIndex(node, parentNode, function (siblingNode) {
- return siblingNode.ordered === node.ordered;
- });
-}
+ function getNthListSiblingIndex(node, parentNode) {
+ return getNthSiblingIndex(node, parentNode, function (siblingNode) {
+ return siblingNode.ordered === node.ordered;
+ });
+ }
-function getNthSiblingIndex(node, parentNode, condition) {
- condition = condition || function () {
- return true;
- };
+ function getNthSiblingIndex(node, parentNode, condition) {
+ condition = condition || function () {
+ return true;
+ };
- var index = -1;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var index = -1;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- try {
- for (var _iterator = parentNode.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var childNode = _step.value;
+ try {
+ for (var _iterator = parentNode.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var childNode = _step.value;
- if (childNode.type === node.type && condition(childNode)) {
- index++;
- } else {
- index = -1;
- }
+ if (childNode.type === node.type && condition(childNode)) {
+ index++;
+ } else {
+ index = -1;
+ }
- if (childNode === node) {
- return index;
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ if (childNode === node) {
+ return index;
+ }
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
}
-}
-function getAncestorCounter$1(path, typeOrTypes) {
- var types = [].concat(typeOrTypes);
- var counter = -1;
- var ancestorNode;
+ function getAncestorCounter$1(path, typeOrTypes) {
+ var types = [].concat(typeOrTypes);
+ var counter = -1;
+ var ancestorNode;
- while (ancestorNode = path.getParentNode(++counter)) {
- if (types.indexOf(ancestorNode.type) !== -1) {
- return counter;
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.indexOf(ancestorNode.type) !== -1) {
+ return counter;
+ }
}
+
+ return -1;
}
- return -1;
-}
+ function getAncestorNode$2(path, typeOrTypes) {
+ var counter = getAncestorCounter$1(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+ }
-function getAncestorNode$2(path, typeOrTypes) {
- var counter = getAncestorCounter$1(path, typeOrTypes);
- return counter === -1 ? null : path.getParentNode(counter);
-}
+ function printLine(path, value, options) {
+ if (options.proseWrap === "preserve" && value === "\n") {
+ return hardline$c;
+ }
-function printLine(path, value, options) {
- if (options.proseWrap === "preserve" && value === "\n") {
- return hardline$11;
+ var isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES);
+ return value !== "" ? isBreakable ? line$8 : " " : isBreakable ? softline$7 : "";
}
- var isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES);
- return value !== "" ? isBreakable ? line$10 : " " : isBreakable ? softline$7 : "";
-}
+ function printTable(path, options, print) {
+ var hardlineWithoutBreakParent = hardline$c.parts[0];
+ var node = path.getValue();
+ var contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } }
+
+ path.map(function (rowPath) {
+ var rowContents = [];
+ rowPath.map(function (cellPath) {
+ rowContents.push(printDocToString$2(cellPath.call(print), options).formatted);
+ }, "children");
+ contents.push(rowContents);
+ }, "children"); // Get the width of each column
+
+ var columnMaxWidths = contents.reduce(function (currentWidths, rowContents) {
+ return currentWidths.map(function (width, columnIndex) {
+ return Math.max(width, util.getStringWidth(rowContents[columnIndex]));
+ });
+ }, contents[0].map(function () {
+ return 3;
+ }) // minimum width = 3 (---, :--, :-:, --:)
+ );
+ var alignedTable = join$b(hardlineWithoutBreakParent, [printRow(contents[0]), printSeparator(), join$b(hardlineWithoutBreakParent, contents.slice(1).map(function (rowContents) {
+ return printRow(rowContents);
+ }))]);
-function printTable(path, options, print) {
- var hardlineWithoutBreakParent = hardline$11.parts[0];
- var node = path.getValue();
- var contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } }
+ if (options.proseWrap !== "never") {
+ return concat$g([breakParent$4, alignedTable]);
+ } // Only if the --prose-wrap never is set and it exceeds the print width.
- path.map(function (rowPath) {
- var rowContents = [];
- rowPath.map(function (cellPath) {
- rowContents.push(printDocToString$2(cellPath.call(print), options).formatted);
- }, "children");
- contents.push(rowContents);
- }, "children"); // Get the width of each column
- var columnMaxWidths = contents.reduce(function (currentWidths, rowContents) {
- return currentWidths.map(function (width, columnIndex) {
- return Math.max(width, util.getStringWidth(rowContents[columnIndex]));
- });
- }, contents[0].map(function () {
- return 3;
- }) // minimum width = 3 (---, :--, :-:, --:)
- );
- var alignedTable = join$11(hardlineWithoutBreakParent, [printRow(contents[0]), printSeparator(), join$11(hardlineWithoutBreakParent, contents.slice(1).map(function (rowContents) {
- return printRow(rowContents);
- }))]);
-
- if (options.proseWrap !== "never") {
- return concat$15([breakParent$4, alignedTable]);
- } // Only if the --prose-wrap never is set and it exceeds the print width.
-
-
- var compactTable = join$11(hardlineWithoutBreakParent, [printRow(contents[0],
- /* isCompact */
- true), printSeparator(
- /* isCompact */
- true), join$11(hardlineWithoutBreakParent, contents.slice(1).map(function (rowContents) {
- return printRow(rowContents,
+ var compactTable = join$b(hardlineWithoutBreakParent, [printRow(contents[0],
/* isCompact */
- true);
- }))]);
- return concat$15([breakParent$4, group$15(ifBreak$7(compactTable, alignedTable))]);
+ true), printSeparator(
+ /* isCompact */
+ true), join$b(hardlineWithoutBreakParent, contents.slice(1).map(function (rowContents) {
+ return printRow(rowContents,
+ /* isCompact */
+ true);
+ }))]);
+ return concat$g([breakParent$4, group$f(ifBreak$7(compactTable, alignedTable))]);
- function printSeparator(isCompact) {
- return concat$15(["| ", join$11(" | ", columnMaxWidths.map(function (width, index) {
- var spaces = isCompact ? 3 : width;
+ function printSeparator(isCompact) {
+ return concat$g(["| ", join$b(" | ", columnMaxWidths.map(function (width, index) {
+ var spaces = isCompact ? 3 : width;
- switch (node.align[index]) {
- case "left":
- return ":" + "-".repeat(spaces - 1);
+ switch (node.align[index]) {
+ case "left":
+ return ":" + "-".repeat(spaces - 1);
- case "right":
- return "-".repeat(spaces - 1) + ":";
+ case "right":
+ return "-".repeat(spaces - 1) + ":";
- case "center":
- return ":" + "-".repeat(spaces - 2) + ":";
+ case "center":
+ return ":" + "-".repeat(spaces - 2) + ":";
- default:
- return "-".repeat(spaces);
- }
- })), " |"]);
- }
+ default:
+ return "-".repeat(spaces);
+ }
+ })), " |"]);
+ }
- function printRow(rowContents, isCompact) {
- return concat$15(["| ", join$11(" | ", isCompact ? rowContents : rowContents.map(function (rowContent, columnIndex) {
- switch (node.align[columnIndex]) {
- case "right":
- return alignRight(rowContent, columnMaxWidths[columnIndex]);
+ function printRow(rowContents, isCompact) {
+ return concat$g(["| ", join$b(" | ", isCompact ? rowContents : rowContents.map(function (rowContent, columnIndex) {
+ switch (node.align[columnIndex]) {
+ case "right":
+ return alignRight(rowContent, columnMaxWidths[columnIndex]);
- case "center":
- return alignCenter(rowContent, columnMaxWidths[columnIndex]);
+ case "center":
+ return alignCenter(rowContent, columnMaxWidths[columnIndex]);
- default:
- return alignLeft(rowContent, columnMaxWidths[columnIndex]);
- }
- })), " |"]);
- }
+ default:
+ return alignLeft(rowContent, columnMaxWidths[columnIndex]);
+ }
+ })), " |"]);
+ }
- function alignLeft(text, width) {
- var spaces = width - util.getStringWidth(text);
- return concat$15([text, " ".repeat(spaces)]);
- }
+ function alignLeft(text, width) {
+ var spaces = width - util.getStringWidth(text);
+ return concat$g([text, " ".repeat(spaces)]);
+ }
- function alignRight(text, width) {
- var spaces = width - util.getStringWidth(text);
- return concat$15([" ".repeat(spaces), text]);
- }
+ function alignRight(text, width) {
+ var spaces = width - util.getStringWidth(text);
+ return concat$g([" ".repeat(spaces), text]);
+ }
- function alignCenter(text, width) {
- var spaces = width - util.getStringWidth(text);
- var left = Math.floor(spaces / 2);
- var right = spaces - left;
- return concat$15([" ".repeat(left), text, " ".repeat(right)]);
+ function alignCenter(text, width) {
+ var spaces = width - util.getStringWidth(text);
+ var left = Math.floor(spaces / 2);
+ var right = spaces - left;
+ return concat$g([" ".repeat(left), text, " ".repeat(right)]);
+ }
}
-}
-function printRoot(path, options, print) {
- /** @typedef {{ index: number, offset: number }} IgnorePosition */
+ function printRoot(path, options, print) {
+ /** @typedef {{ index: number, offset: number }} IgnorePosition */
- /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */
- var ignoreRanges = [];
- /** @type {IgnorePosition | null} */
+ /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */
+ var ignoreRanges = [];
+ /** @type {IgnorePosition | null} */
- var ignoreStart = null;
- var children = path.getValue().children;
- children.forEach(function (childNode, index) {
- switch (isPrettierIgnore$1(childNode)) {
- case "start":
- if (ignoreStart === null) {
- ignoreStart = {
- index: index,
- offset: childNode.position.end.offset
- };
- }
+ var ignoreStart = null;
+ var children = path.getValue().children;
+ children.forEach(function (childNode, index) {
+ switch (isPrettierIgnore$1(childNode)) {
+ case "start":
+ if (ignoreStart === null) {
+ ignoreStart = {
+ index: index,
+ offset: childNode.position.end.offset
+ };
+ }
- break;
+ break;
- case "end":
- if (ignoreStart !== null) {
- ignoreRanges.push({
- start: ignoreStart,
- end: {
- index: index,
- offset: childNode.position.start.offset
- }
- });
- ignoreStart = null;
- }
+ case "end":
+ if (ignoreStart !== null) {
+ ignoreRanges.push({
+ start: ignoreStart,
+ end: {
+ index: index,
+ offset: childNode.position.start.offset
+ }
+ });
+ ignoreStart = null;
+ }
- break;
+ break;
+ }
+ });
+ return printChildren$2(path, options, print, {
+ processor: function processor(childPath, index) {
+ if (ignoreRanges.length !== 0) {
+ var ignoreRange = ignoreRanges[0];
- default:
- // do nothing
- break;
- }
- });
- return printChildren$1(path, options, print, {
- processor: function processor(childPath, index) {
- if (ignoreRanges.length !== 0) {
- var ignoreRange = ignoreRanges[0];
+ if (index === ignoreRange.start.index) {
+ return concat$g([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]);
+ }
- if (index === ignoreRange.start.index) {
- return concat$15([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]);
- }
+ if (ignoreRange.start.index < index && index < ignoreRange.end.index) {
+ return false;
+ }
- if (ignoreRange.start.index < index && index < ignoreRange.end.index) {
- return false;
+ if (index === ignoreRange.end.index) {
+ ignoreRanges.shift();
+ return false;
+ }
}
- if (index === ignoreRange.end.index) {
- ignoreRanges.shift();
- return false;
- }
+ return childPath.call(print);
}
+ });
+ }
- return childPath.call(print);
- }
- });
-}
+ function printChildren$2(path, options, print, events) {
+ events = events || {};
+ var postprocessor = events.postprocessor || concat$g;
-function printChildren$1(path, options, print, events) {
- events = events || {};
- var postprocessor = events.postprocessor || concat$15;
+ var processor = events.processor || function (childPath) {
+ return childPath.call(print);
+ };
- var processor = events.processor || function (childPath) {
- return childPath.call(print);
- };
+ var node = path.getValue();
+ var parts = [];
+ var lastChildNode;
+ path.map(function (childPath, index) {
+ var childNode = childPath.getValue();
+ var result = processor(childPath, index);
- var node = path.getValue();
- var parts = [];
- var lastChildNode;
- path.map(function (childPath, index) {
- var childNode = childPath.getValue();
- var result = processor(childPath, index);
-
- if (result !== false) {
- var data = {
- parts: parts,
- prevNode: lastChildNode,
- parentNode: node,
- options: options
- };
+ if (result !== false) {
+ var data = {
+ parts: parts,
+ prevNode: lastChildNode,
+ parentNode: node,
+ options: options
+ };
- if (!shouldNotPrePrintHardline(childNode, data)) {
- parts.push(hardline$11);
+ if (!shouldNotPrePrintHardline(childNode, data)) {
+ parts.push(hardline$c);
- if (lastChildNode && TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1) {
- if (shouldPrePrintTripleHardline(childNode, data)) {
- parts.push(hardline$11);
- }
- } else {
- if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) {
- parts.push(hardline$11);
- }
+ if (lastChildNode && TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1) {
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$c);
+ }
+ } else {
+ if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$c);
+ }
- if (shouldPrePrintTripleHardline(childNode, data)) {
- parts.push(hardline$11);
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$c);
+ }
}
}
+
+ parts.push(result);
+ lastChildNode = childNode;
}
+ }, "children");
+ return postprocessor(parts);
+ }
- parts.push(result);
- lastChildNode = childNode;
+ function getLastDescendantNode(node) {
+ var current = node;
+
+ while (current.children && current.children.length !== 0) {
+ current = current.children[current.children.length - 1];
}
- }, "children");
- return postprocessor(parts);
-}
-function getLastDescendantNode(node) {
- var current = node;
+ return current;
+ }
+ /** @return {false | 'next' | 'start' | 'end'} */
- while (current.children && current.children.length !== 0) {
- current = current.children[current.children.length - 1];
+
+ function isPrettierIgnore$1(node) {
+ if (node.type !== "html") {
+ return false;
+ }
+
+ var match = node.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/);
+ return match === null ? false : match[1] ? match[1] : "next";
}
- return current;
-}
-/** @return {false | 'next' | 'start' | 'end'} */
+ function isInlineNode(node) {
+ return node && INLINE_NODE_TYPES$1.indexOf(node.type) !== -1;
+ }
+ function isEndsWithHardLine(node) {
+ return node && /\n+$/.test(node.value);
+ }
-function isPrettierIgnore$1(node) {
- if (node.type !== "html") {
- return false;
+ function last(nodes) {
+ return nodes && nodes[nodes.length - 1];
}
- var match = node.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/);
- return match === null ? false : match[1] ? match[1] : "next";
-}
+ function shouldNotPrePrintHardline(node, _ref) {
+ var parentNode = _ref.parentNode,
+ parts = _ref.parts,
+ prevNode = _ref.prevNode;
+ var isFirstNode = parts.length === 0;
+ var isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES$1.indexOf(parentNode.type) !== -1;
+ var isAfterHardlineNode = prevNode && (isEndsWithHardLine(prevNode) || isEndsWithHardLine(last(prevNode.children)));
+ return isFirstNode || isInlineNode(node) || isInlineHTML || isAfterHardlineNode;
+ }
-function shouldNotPrePrintHardline(node, data) {
- var isFirstNode = data.parts.length === 0;
- var isInlineNode = INLINE_NODE_TYPES.indexOf(node.type) !== -1;
- var isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES.indexOf(data.parentNode.type) !== -1;
- return isFirstNode || isInlineNode || isInlineHTML;
-}
+ function shouldPrePrintDoubleHardline(node, _ref2) {
+ var parentNode = _ref2.parentNode,
+ prevNode = _ref2.prevNode;
+ var prevNodeType = prevNode && prevNode.type;
+ var nodeType = node.type;
+ var isSequence = prevNodeType === nodeType;
+ var isSiblingNode = isSequence && SIBLING_NODE_TYPES.indexOf(nodeType) !== -1;
+ var isInTightListItem = parentNode.type === "listItem" && !parentNode.loose;
+ var isPrevNodeLooseListItem = prevNodeType === "listItem" && prevNode.loose;
+ var isPrevNodePrettierIgnore = isPrettierIgnore$1(prevNode) === "next";
+ var isBlockHtmlWithoutBlankLineBetweenPrevHtml = nodeType === "html" && prevNodeType === "html" && prevNode.position.end.line + 1 === node.position.start.line;
+ var isJsxInlineSibling = prevNodeType === "jsx" && isInlineNode(node) || nodeType === "jsx" && isInlineNode(prevNode);
+ return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml || isJsxInlineSibling);
+ }
-function shouldPrePrintDoubleHardline(node, data) {
- var isSequence = (data.prevNode && data.prevNode.type) === node.type;
- var isSiblingNode = isSequence && SIBLING_NODE_TYPES.indexOf(node.type) !== -1;
- var isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose;
- var isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose;
- var isPrevNodePrettierIgnore = isPrettierIgnore$1(data.prevNode) === "next";
- var isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line;
- return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml);
-}
+ function shouldPrePrintTripleHardline(node, data) {
+ var isPrevNodeList = data.prevNode && data.prevNode.type === "list";
+ var isIndentedCode = node.type === "code" && node.isIndented;
+ return isPrevNodeList && isIndentedCode;
+ }
-function shouldPrePrintTripleHardline(node, data) {
- var isPrevNodeList = data.prevNode && data.prevNode.type === "list";
- var isIndentedCode = node.type === "code" && node.isIndented;
- return isPrevNodeList && isIndentedCode;
-}
+ function shouldRemainTheSameContent(path) {
+ var ancestorNode = getAncestorNode$2(path, ["linkReference", "imageReference"]);
+ return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full");
+ }
-function shouldRemainTheSameContent(path) {
- var ancestorNode = getAncestorNode$2(path, ["linkReference", "imageReference"]);
- return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full");
-}
+ function normalizeDoc(doc) {
+ return mapDoc$7(doc, function (currentDoc) {
+ if (!currentDoc.parts) {
+ return currentDoc;
+ }
-function normalizeDoc(doc$$2) {
- return mapDoc$6(doc$$2, function (currentDoc) {
- if (!currentDoc.parts) {
- return currentDoc;
+ if (currentDoc.type === "concat" && currentDoc.parts.length === 1) {
+ return currentDoc.parts[0];
+ }
+
+ var parts = [];
+ currentDoc.parts.forEach(function (part) {
+ if (part.type === "concat") {
+ parts.push.apply(parts, part.parts);
+ } else if (part !== "") {
+ parts.push(part);
+ }
+ });
+ return Object.assign({}, currentDoc, {
+ parts: normalizeParts$2(parts)
+ });
+ });
+ }
+
+ function printUrl(url, dangerousCharOrChars) {
+ var dangerousChars = [" "].concat(dangerousCharOrChars || []);
+ return new RegExp(dangerousChars.map(function (x) {
+ return "\\".concat(x);
+ }).join("|")).test(url) ? "<".concat(url, ">") : url;
+ }
+
+ function printTitle(title, options, printSpace) {
+ if (printSpace == null) {
+ printSpace = true;
}
- if (currentDoc.type === "concat" && currentDoc.parts.length === 1) {
- return currentDoc.parts[0];
+ if (!title) {
+ return "";
}
- var parts = [];
- currentDoc.parts.forEach(function (part) {
- if (part.type === "concat") {
- parts.push.apply(parts, part.parts);
- } else if (part !== "") {
- parts.push(part);
- }
- });
- return Object.assign({}, currentDoc, {
- parts: normalizeParts$2(parts)
- });
- });
-}
+ if (printSpace) {
+ return " " + printTitle(title, options, false);
+ }
+
+ if (title.includes('"') && title.includes("'") && !title.includes(")")) {
+ return "(".concat(title, ")"); // avoid escaped quotes
+ } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split
-function printUrl(url, dangerousCharOrChars) {
- var dangerousChars = [" "].concat(dangerousCharOrChars || []);
- return new RegExp(dangerousChars.map(function (x) {
- return "\\".concat(x);
- }).join("|")).test(url) ? "<".concat(url, ">") : url;
-}
-function printTitle(title, options, printSpace) {
- if (printSpace == null) {
- printSpace = true;
+ var singleCount = title.split("'").length - 1;
+ var doubleCount = title.split('"').length - 1;
+ var quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"';
+ title = title.replace(new RegExp("(".concat(quote, ")"), "g"), "\\$1");
+ return "".concat(quote).concat(title).concat(quote);
}
- if (!title) {
- return "";
+ function normalizeParts$2(parts) {
+ return parts.reduce(function (current, part) {
+ var lastPart = util.getLast(current);
+
+ if (typeof lastPart === "string" && typeof part === "string") {
+ current.splice(-1, 1, lastPart + part);
+ } else {
+ current.push(part);
+ }
+
+ return current;
+ }, []);
}
- if (printSpace) {
- return " " + printTitle(title, options, false);
+ function clamp(value, min, max) {
+ return value < min ? min : value > max ? max : value;
}
- if (title.includes('"') && title.includes("'") && !title.includes(")")) {
- return "(".concat(title, ")"); // avoid escaped quotes
- } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split
+ function clean$6(ast, newObj, parent) {
+ delete newObj.position;
+ delete newObj.raw; // front-matter
+ // for codeblock
+ if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") {
+ delete newObj.value;
+ }
- var singleCount = title.split("'").length - 1;
- var doubleCount = title.split('"').length - 1;
- var quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"';
- title = title.replace(new RegExp("(".concat(quote, ")"), "g"), "\\$1");
- return "".concat(quote).concat(title).concat(quote);
-}
+ if (ast.type === "list") {
+ delete newObj.isAligned;
+ } // texts can be splitted or merged
-function normalizeParts$2(parts) {
- return parts.reduce(function (current, part) {
- var lastPart = util.getLast(current);
- if (typeof lastPart === "string" && typeof part === "string") {
- current.splice(-1, 1, lastPart + part);
- } else {
- current.push(part);
+ if (ast.type === "text") {
+ return null;
}
- return current;
- }, []);
-}
-
-function clamp(value, min, max) {
- return value < min ? min : value > max ? max : value;
-}
+ if (ast.type === "inlineCode") {
+ newObj.value = ast.value.replace(/[ \t\n]+/g, " ");
+ } // for insert pragma
-function clean$10(ast, newObj, parent) {
- delete newObj.position;
- delete newObj.raw; // front-matter
- // for codeblock
- if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") {
- delete newObj.value;
+ if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$4.startWithPragma(ast.value)) {
+ return null;
+ }
}
- if (ast.type === "list") {
- delete newObj.isAligned;
- } // texts can be splitted or merged
+ function hasPrettierIgnore$4(path) {
+ var index = +path.getName();
+ if (index === 0) {
+ return false;
+ }
- if (ast.type === "text") {
- return null;
+ var prevNode = path.getParentNode().children[index - 1];
+ return isPrettierIgnore$1(prevNode) === "next";
}
- if (ast.type === "inlineCode") {
- newObj.value = ast.value.replace(/[ \t\n]+/g, " ");
- } // for insert pragma
+ var printerMarkdown = {
+ preprocess: preprocess_1$2,
+ print: genericPrint$5,
+ embed: embed_1$2,
+ massageAstNode: clean$6,
+ hasPrettierIgnore: hasPrettierIgnore$4,
+ insertPragma: pragma$4.insertPragma
+ };
+ var options$6 = {
+ proseWrap: commonOptions.proseWrap,
+ singleQuote: commonOptions.singleQuote
+ };
- if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$8.startWithPragma(ast.value)) {
- return null;
- }
-}
+ var name$g = "Markdown";
+ var type$f = "prose";
+ var aliases$5 = [
+ "pandoc"
+ ];
+ var aceMode$f = "markdown";
+ var codemirrorMode$b = "gfm";
+ var codemirrorMimeType$b = "text/x-gfm";
+ var wrap = true;
+ var extensions$f = [
+ ".md",
+ ".markdown",
+ ".mdown",
+ ".mdwn",
+ ".mdx",
+ ".mkd",
+ ".mkdn",
+ ".mkdown",
+ ".ronn",
+ ".workbook"
+ ];
+ var filenames$3 = [
+ "contents.lr"
+ ];
+ var tmScope$f = "source.gfm";
+ var languageId$f = 222;
+ var Markdown = {
+ name: name$g,
+ type: type$f,
+ aliases: aliases$5,
+ aceMode: aceMode$f,
+ codemirrorMode: codemirrorMode$b,
+ codemirrorMimeType: codemirrorMimeType$b,
+ wrap: wrap,
+ extensions: extensions$f,
+ filenames: filenames$3,
+ tmScope: tmScope$f,
+ languageId: languageId$f
+ };
-function hasPrettierIgnore$3(path) {
- var index = +path.getName();
+ var Markdown$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$g,
+ type: type$f,
+ aliases: aliases$5,
+ aceMode: aceMode$f,
+ codemirrorMode: codemirrorMode$b,
+ codemirrorMimeType: codemirrorMimeType$b,
+ wrap: wrap,
+ extensions: extensions$f,
+ filenames: filenames$3,
+ tmScope: tmScope$f,
+ languageId: languageId$f,
+ 'default': Markdown
+ });
- if (index === 0) {
- return false;
- }
+ var require$$0$7 = getCjsExportFromNamespace(Markdown$1);
- var prevNode = path.getParentNode().children[index - 1];
- return isPrettierIgnore$1(prevNode) === "next";
-}
-
-var printerMarkdown = {
- preprocess: preprocess_1$4,
- print: genericPrint$5,
- embed: embed_1$4,
- massageAstNode: clean$10,
- hasPrettierIgnore: hasPrettierIgnore$3,
- insertPragma: pragma$8.insertPragma
-};
-
-var options$15 = {
- proseWrap: commonOptions.proseWrap,
- singleQuote: commonOptions.singleQuote
-};
-
-var name$15 = "Markdown";
-var type$14 = "prose";
-var aliases$5 = ["pandoc"];
-var aceMode$14 = "markdown";
-var codemirrorMode$10 = "gfm";
-var codemirrorMimeType$10 = "text/x-gfm";
-var wrap = true;
-var extensions$14 = [".md", ".markdown", ".mdown", ".mdwn", ".mkd", ".mkdn", ".mkdown", ".ronn", ".workbook"];
-var tmScope$14 = "source.gfm";
-var languageId$14 = 222;
-var markdown = {
- name: name$15,
- type: type$14,
- aliases: aliases$5,
- aceMode: aceMode$14,
- codemirrorMode: codemirrorMode$10,
- codemirrorMimeType: codemirrorMimeType$10,
- wrap: wrap,
- extensions: extensions$14,
- tmScope: tmScope$14,
- languageId: languageId$14
-};
-
-var markdown$1 = Object.freeze({
- name: name$15,
- type: type$14,
- aliases: aliases$5,
- aceMode: aceMode$14,
- codemirrorMode: codemirrorMode$10,
- codemirrorMimeType: codemirrorMimeType$10,
- wrap: wrap,
- extensions: extensions$14,
- tmScope: tmScope$14,
- languageId: languageId$14,
- default: markdown
-});
-
-var require$$0$27 = ( markdown$1 && markdown ) || markdown$1;
-
-var languages$5 = [createLanguage(require$$0$27, {
- override: {
- since: "1.8.0",
- parsers: ["remark"],
- vscodeLanguageIds: ["markdown"]
- },
- extend: {
- filenames: ["README"]
- }
-}), createLanguage({
- name: "MDX",
- extensions: [".mdx"]
-}, // TODO: use linguist data
-{
- override: {
- since: "1.15.0",
- parsers: ["mdx"],
- vscodeLanguageIds: ["mdx"]
- }
-})];
-var printers$5 = {
- mdast: printerMarkdown
-};
-var languageMarkdown = {
- languages: languages$5,
- options: options$15,
- printers: printers$5
-};
-
-function isPragma$1(text) {
- return /^\s*@(prettier|format)\s*$/.test(text);
-}
-
-function hasPragma$4(text) {
- return /^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(text);
-}
-
-function insertPragma$9(text) {
- return "# @format\n\n".concat(text);
-}
-
-var pragma$11 = {
- isPragma: isPragma$1,
- hasPragma: hasPragma$4,
- insertPragma: insertPragma$9
-};
-
-var getLast$6 = util.getLast;
-
-function getAncestorCount$1(path, filter) {
- var counter = 0;
- var pathStackLength = path.stack.length - 1;
-
- for (var i = 0; i < pathStackLength; i++) {
- var value = path.stack[i];
-
- if (isNode$1(value) && filter(value)) {
- counter++;
- }
- }
-
- return counter;
-}
-/**
- * @param {any} value
- * @param {string[]=} types
- */
+ var languages$5 = [createLanguage(require$$0$7, function (data) {
+ return Object.assign(data, {
+ since: "1.8.0",
+ parsers: ["remark"],
+ vscodeLanguageIds: ["markdown"],
+ filenames: data.filenames.concat(["README"]),
+ extensions: data.extensions.filter(function (extension) {
+ return extension !== ".mdx";
+ })
+ });
+ }), createLanguage(require$$0$7, function (data) {
+ return Object.assign(data, {
+ name: "MDX",
+ since: "1.15.0",
+ parsers: ["mdx"],
+ vscodeLanguageIds: ["mdx"],
+ filenames: [],
+ extensions: [".mdx"]
+ });
+ })];
+ var printers$5 = {
+ mdast: printerMarkdown
+ };
+ var languageMarkdown = {
+ languages: languages$5,
+ options: options$6,
+ printers: printers$5
+ };
+ function isPragma(text) {
+ return /^\s*@(prettier|format)\s*$/.test(text);
+ }
-function isNode$1(value, types) {
- return value && typeof value.type === "string" && (!types || types.indexOf(value.type) !== -1);
-}
+ function hasPragma$4(text) {
+ return /^\s*#[^\n\S]*@(prettier|format)\s*?(\n|$)/.test(text);
+ }
-function mapNode$1(node, callback, parent) {
- return callback("children" in node ? Object.assign({}, node, {
- children: node.children.map(function (childNode) {
- return mapNode$1(childNode, callback, node);
- })
- }) : node, parent);
-}
+ function insertPragma$8(text) {
+ return "# @format\n\n".concat(text);
+ }
-function defineShortcut$1(x, key, getter) {
- Object.defineProperty(x, key, {
- get: getter,
- enumerable: false
- });
-}
+ var pragma$5 = {
+ isPragma: isPragma,
+ hasPragma: hasPragma$4,
+ insertPragma: insertPragma$8
+ };
-function isNextLineEmpty$6(node, text) {
- var newlineCount = 0;
- var textLength = text.length;
+ var getLast$4 = util.getLast;
- for (var i = node.position.end.offset - 1; i < textLength; i++) {
- var char = text[i];
+ function getAncestorCount(path, filter) {
+ var counter = 0;
+ var pathStackLength = path.stack.length - 1;
- if (char === "\n") {
- newlineCount++;
- }
+ for (var i = 0; i < pathStackLength; i++) {
+ var value = path.stack[i];
- if (newlineCount === 1 && /\S/.test(char)) {
- return false;
+ if (isNode(value) && filter(value)) {
+ counter++;
+ }
}
- if (newlineCount === 2) {
- return true;
- }
+ return counter;
}
+ /**
+ * @param {any} value
+ * @param {string[]=} types
+ */
- return false;
-}
-function isLastDescendantNode$1(path) {
- var node = path.getValue();
+ function isNode(value, types) {
+ return value && typeof value.type === "string" && (!types || types.indexOf(value.type) !== -1);
+ }
- switch (node.type) {
- case "tag":
- case "anchor":
- case "comment":
- return false;
+ function mapNode(node, callback, parent) {
+ return callback("children" in node ? Object.assign({}, node, {
+ children: node.children.map(function (childNode) {
+ return mapNode(childNode, callback, node);
+ })
+ }) : node, parent);
}
- var pathStackLength = path.stack.length;
+ function defineShortcut(x, key, getter) {
+ Object.defineProperty(x, key, {
+ get: getter,
+ enumerable: false
+ });
+ }
- for (var i = 1; i < pathStackLength; i++) {
- var item = path.stack[i];
- var parentItem = path.stack[i - 1];
+ function isNextLineEmpty$5(node, text) {
+ var newlineCount = 0;
+ var textLength = text.length;
- if (Array.isArray(parentItem) && typeof item === "number" && item !== parentItem.length - 1) {
- return false;
+ for (var i = node.position.end.offset - 1; i < textLength; i++) {
+ var char = text[i];
+
+ if (char === "\n") {
+ newlineCount++;
+ }
+
+ if (newlineCount === 1 && /\S/.test(char)) {
+ return false;
+ }
+
+ if (newlineCount === 2) {
+ return true;
+ }
}
+
+ return false;
}
- return true;
-}
+ function isLastDescendantNode(path) {
+ var node = path.getValue();
-function getLastDescendantNode$2(node) {
- return "children" in node && node.children.length !== 0 ? getLastDescendantNode$2(getLast$6(node.children)) : node;
-}
+ switch (node.type) {
+ case "tag":
+ case "anchor":
+ case "comment":
+ return false;
+ }
-function isPrettierIgnore$2(comment) {
- return comment.value.trim() === "prettier-ignore";
-}
+ var pathStackLength = path.stack.length;
-function hasPrettierIgnore$5(path) {
- var node = path.getValue();
+ for (var i = 1; i < pathStackLength; i++) {
+ var item = path.stack[i];
+ var parentItem = path.stack[i - 1];
- if (node.type === "documentBody") {
- var document = path.getParentNode();
- return hasEndComments$1(document.head) && isPrettierIgnore$2(getLast$6(document.head.endComments));
+ if (Array.isArray(parentItem) && typeof item === "number" && item !== parentItem.length - 1) {
+ return false;
+ }
+ }
+
+ return true;
}
- return hasLeadingComments$1(node) && isPrettierIgnore$2(getLast$6(node.leadingComments));
-}
+ function getLastDescendantNode$1(node) {
+ return "children" in node && node.children.length !== 0 ? getLastDescendantNode$1(getLast$4(node.children)) : node;
+ }
-function isEmptyNode$1(node) {
- return (!node.children || node.children.length === 0) && !hasComments(node);
-}
+ function isPrettierIgnore$2(comment) {
+ return comment.value.trim() === "prettier-ignore";
+ }
-function hasComments(node) {
- return hasLeadingComments$1(node) || hasMiddleComments$1(node) || hasIndicatorComment$1(node) || hasTrailingComment$2(node) || hasEndComments$1(node);
-}
+ function hasPrettierIgnore$5(path) {
+ var node = path.getValue();
-function hasLeadingComments$1(node) {
- return node && node.leadingComments && node.leadingComments.length !== 0;
-}
+ if (node.type === "documentBody") {
+ var document = path.getParentNode();
+ return hasEndComments(document.head) && isPrettierIgnore$2(getLast$4(document.head.endComments));
+ }
-function hasMiddleComments$1(node) {
- return node && node.middleComments && node.middleComments.length !== 0;
-}
+ return hasLeadingComments(node) && isPrettierIgnore$2(getLast$4(node.leadingComments));
+ }
-function hasIndicatorComment$1(node) {
- return node && node.indicatorComment;
-}
+ function isEmptyNode(node) {
+ return (!node.children || node.children.length === 0) && !hasComments(node);
+ }
-function hasTrailingComment$2(node) {
- return node && node.trailingComment;
-}
+ function hasComments(node) {
+ return hasLeadingComments(node) || hasMiddleComments(node) || hasIndicatorComment(node) || hasTrailingComment$2(node) || hasEndComments(node);
+ }
-function hasEndComments$1(node) {
- return node && node.endComments && node.endComments.length !== 0;
-}
-/**
- * " a b c d e f " -> [" a b", "c d", "e f "]
- */
+ function hasLeadingComments(node) {
+ return node && node.leadingComments && node.leadingComments.length !== 0;
+ }
+ function hasMiddleComments(node) {
+ return node && node.middleComments && node.middleComments.length !== 0;
+ }
-function splitWithSingleSpace(text) {
- var parts = [];
- var lastPart = undefined;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ function hasIndicatorComment(node) {
+ return node && node.indicatorComment;
+ }
- try {
- for (var _iterator = text.split(/( +)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var part = _step.value;
+ function hasTrailingComment$2(node) {
+ return node && node.trailingComment;
+ }
- if (part !== " ") {
- if (lastPart === " ") {
- parts.push(part);
- } else {
- parts.push((parts.pop() || "") + part);
- }
- } else if (lastPart === undefined) {
- parts.unshift("");
- }
+ function hasEndComments(node) {
+ return node && node.endComments && node.endComments.length !== 0;
+ }
+ /**
+ * " a b c d e f " -> [" a b", "c d", "e f "]
+ */
+
+
+ function splitWithSingleSpace(text) {
+ var parts = [];
+ var lastPart = undefined;
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- lastPart = part;
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
+ for (var _iterator = text.split(/( +)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var part = _step.value;
+
+ if (part !== " ") {
+ if (lastPart === " ") {
+ parts.push(part);
+ } else {
+ parts.push((parts.pop() || "") + part);
+ }
+ } else if (lastPart === undefined) {
+ parts.unshift("");
+ }
+
+ lastPart = part;
}
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
- if (_didIteratorError) {
- throw _iteratorError;
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
}
}
- }
- if (lastPart === " ") {
- parts.push((parts.pop() || "") + " ");
- }
+ if (lastPart === " ") {
+ parts.push((parts.pop() || "") + " ");
+ }
- if (parts[0] === "") {
- parts.shift();
- parts.unshift(" " + (parts.shift() || ""));
+ if (parts[0] === "") {
+ parts.shift();
+ parts.unshift(" " + (parts.shift() || ""));
+ }
+
+ return parts;
}
- return parts;
-}
+ function getFlowScalarLineContents(nodeType, content, options) {
+ var rawLineContents = content.split("\n").map(function (lineContent, index, lineContents) {
+ return index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimRight() : lineContent.trimLeft();
+ });
-function getFlowScalarLineContents$1(nodeType, content, options) {
- var rawLineContents = content.split("\n").map(function (lineContent, index, lineContents) {
- return index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimRight() : lineContent.trimLeft();
- });
+ if (options.proseWrap === "preserve") {
+ return rawLineContents.map(function (lineContent) {
+ return lineContent.length === 0 ? [] : [lineContent];
+ });
+ }
- if (options.proseWrap === "preserve") {
return rawLineContents.map(function (lineContent) {
- return lineContent.length === 0 ? [] : [lineContent];
+ return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent);
+ }).reduce(function (reduced, lineContentWords, index) {
+ return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved
+ nodeType === "quoteDouble" && getLast$4(getLast$4(reduced)).endsWith("\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]);
+ }, []).map(function (lineContentWords) {
+ return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords;
});
}
- return rawLineContents.map(function (lineContent) {
- return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent);
- }).reduce(function (reduced, lineContentWords, index) {
- return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved
- nodeType === "quoteDouble" && getLast$6(getLast$6(reduced)).endsWith("\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]);
- }, []).map(function (lineContentWords) {
- return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords;
- });
-}
-
-function getBlockValueLineContents$1(node, _ref) {
- var parentIndent = _ref.parentIndent,
- isLastDescendant = _ref.isLastDescendant,
- options = _ref.options;
- var content = node.position.start.line === node.position.end.line ? "" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|`
- .match(/^[^\n]*?\n([\s\S]*)$/)[1];
- var leadingSpaceCount = node.indent === null ? function (match) {
- return match ? match[1].length : Infinity;
- }(content.match(/^( *)\S/m)) : node.indent - 1 + parentIndent;
- var rawLineContents = content.split("\n").map(function (lineContent) {
- return lineContent.slice(leadingSpaceCount);
- });
+ function getBlockValueLineContents(node, _ref) {
+ var parentIndent = _ref.parentIndent,
+ isLastDescendant = _ref.isLastDescendant,
+ options = _ref.options;
+ var content = node.position.start.line === node.position.end.line ? "" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|`
+ .match(/^[^\n]*?\n([\s\S]*)$/)[1];
+ var leadingSpaceCount = node.indent === null ? function (match) {
+ return match ? match[1].length : Infinity;
+ }(content.match(/^( *)\S/m)) : node.indent - 1 + parentIndent;
+ var rawLineContents = content.split("\n").map(function (lineContent) {
+ return lineContent.slice(leadingSpaceCount);
+ });
+
+ if (options.proseWrap === "preserve" || node.type === "blockLiteral") {
+ return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) {
+ return lineContent.length === 0 ? [] : [lineContent];
+ }));
+ }
- if (options.proseWrap === "preserve" || node.type === "blockLiteral") {
return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) {
- return lineContent.length === 0 ? [] : [lineContent];
+ return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent);
+ }).reduce(function (reduced, lineContentWords, index) {
+ return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast$4(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]);
+ }, []).map(function (lineContentWords) {
+ return lineContentWords.reduce(function (reduced, word) {
+ return (// disallow trailing spaces
+ reduced.length !== 0 && /\s$/.test(getLast$4(reduced)) ? reduced.concat(reduced.pop() + " " + word) : reduced.concat(word)
+ );
+ }, []);
+ }).map(function (lineContentWords) {
+ return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords;
}));
- }
- return removeUnnecessaryTrailingNewlines(rawLineContents.map(function (lineContent) {
- return lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent);
- }).reduce(function (reduced, lineContentWords, index) {
- return index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast$6(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]);
- }, []).map(function (lineContentWords) {
- return lineContentWords.reduce(function (reduced, word) {
- return (// disallow trailing spaces
- reduced.length !== 0 && /\s$/.test(getLast$6(reduced)) ? reduced.concat(reduced.pop() + " " + word) : reduced.concat(word)
- );
- }, []);
- }).map(function (lineContentWords) {
- return options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords;
- }));
+ function removeUnnecessaryTrailingNewlines(lineContents) {
+ if (node.chomping === "keep") {
+ return getLast$4(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents;
+ }
- function removeUnnecessaryTrailingNewlines(lineContents) {
- if (node.chomping === "keep") {
- return getLast$6(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents;
+ var trailingNewlineCount = 0;
+
+ for (var i = lineContents.length - 1; i >= 0; i--) {
+ if (lineContents[i].length === 0) {
+ trailingNewlineCount++;
+ } else {
+ break;
+ }
+ }
+
+ return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line
+ lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount);
}
+ }
- var trailingNewlineCount = 0;
+ var utils$6 = {
+ getLast: getLast$4,
+ getAncestorCount: getAncestorCount,
+ isNode: isNode,
+ isEmptyNode: isEmptyNode,
+ mapNode: mapNode,
+ defineShortcut: defineShortcut,
+ isNextLineEmpty: isNextLineEmpty$5,
+ isLastDescendantNode: isLastDescendantNode,
+ getBlockValueLineContents: getBlockValueLineContents,
+ getFlowScalarLineContents: getFlowScalarLineContents,
+ getLastDescendantNode: getLastDescendantNode$1,
+ hasPrettierIgnore: hasPrettierIgnore$5,
+ hasLeadingComments: hasLeadingComments,
+ hasMiddleComments: hasMiddleComments,
+ hasIndicatorComment: hasIndicatorComment,
+ hasTrailingComment: hasTrailingComment$2,
+ hasEndComments: hasEndComments
+ };
- for (var i = lineContents.length - 1; i >= 0; i--) {
- if (lineContents[i].length === 0) {
- trailingNewlineCount++;
- } else {
+ var insertPragma$9 = pragma$5.insertPragma,
+ isPragma$1 = pragma$5.isPragma;
+ var getAncestorCount$1 = utils$6.getAncestorCount,
+ getBlockValueLineContents$1 = utils$6.getBlockValueLineContents,
+ getFlowScalarLineContents$1 = utils$6.getFlowScalarLineContents,
+ getLast$5 = utils$6.getLast,
+ getLastDescendantNode$2 = utils$6.getLastDescendantNode,
+ hasLeadingComments$1 = utils$6.hasLeadingComments,
+ hasMiddleComments$1 = utils$6.hasMiddleComments,
+ hasIndicatorComment$1 = utils$6.hasIndicatorComment,
+ hasTrailingComment$3 = utils$6.hasTrailingComment,
+ hasEndComments$1 = utils$6.hasEndComments,
+ hasPrettierIgnore$6 = utils$6.hasPrettierIgnore,
+ isLastDescendantNode$1 = utils$6.isLastDescendantNode,
+ isNextLineEmpty$6 = utils$6.isNextLineEmpty,
+ isNode$1 = utils$6.isNode,
+ isEmptyNode$1 = utils$6.isEmptyNode,
+ defineShortcut$1 = utils$6.defineShortcut,
+ mapNode$1 = utils$6.mapNode;
+ var docBuilders$2 = doc.builders;
+ var conditionalGroup$2 = docBuilders$2.conditionalGroup,
+ breakParent$5 = docBuilders$2.breakParent,
+ concat$h = docBuilders$2.concat,
+ dedent$3 = docBuilders$2.dedent,
+ dedentToRoot$3 = docBuilders$2.dedentToRoot,
+ fill$6 = docBuilders$2.fill,
+ group$g = docBuilders$2.group,
+ hardline$d = docBuilders$2.hardline,
+ ifBreak$8 = docBuilders$2.ifBreak,
+ join$c = docBuilders$2.join,
+ line$9 = docBuilders$2.line,
+ lineSuffix$2 = docBuilders$2.lineSuffix,
+ literalline$7 = docBuilders$2.literalline,
+ markAsRoot$5 = docBuilders$2.markAsRoot,
+ softline$8 = docBuilders$2.softline;
+ var replaceEndOfLineWith$3 = util.replaceEndOfLineWith;
+
+ function preprocess$3(ast) {
+ return mapNode$1(ast, defineShortcuts);
+ }
+
+ function defineShortcuts(node) {
+ switch (node.type) {
+ case "document":
+ defineShortcut$1(node, "head", function () {
+ return node.children[0];
+ });
+ defineShortcut$1(node, "body", function () {
+ return node.children[1];
+ });
break;
- }
- }
- return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line
- lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount);
- }
-}
-
-var utils$12 = {
- getLast: getLast$6,
- getAncestorCount: getAncestorCount$1,
- isNode: isNode$1,
- isEmptyNode: isEmptyNode$1,
- mapNode: mapNode$1,
- defineShortcut: defineShortcut$1,
- isNextLineEmpty: isNextLineEmpty$6,
- isLastDescendantNode: isLastDescendantNode$1,
- getBlockValueLineContents: getBlockValueLineContents$1,
- getFlowScalarLineContents: getFlowScalarLineContents$1,
- getLastDescendantNode: getLastDescendantNode$2,
- hasPrettierIgnore: hasPrettierIgnore$5,
- hasLeadingComments: hasLeadingComments$1,
- hasMiddleComments: hasMiddleComments$1,
- hasIndicatorComment: hasIndicatorComment$1,
- hasTrailingComment: hasTrailingComment$2,
- hasEndComments: hasEndComments$1
-};
-
-var insertPragma$8 = pragma$11.insertPragma;
-var isPragma = pragma$11.isPragma;
-var getAncestorCount = utils$12.getAncestorCount;
-var getBlockValueLineContents = utils$12.getBlockValueLineContents;
-var getFlowScalarLineContents = utils$12.getFlowScalarLineContents;
-var getLast$5 = utils$12.getLast;
-var getLastDescendantNode$1 = utils$12.getLastDescendantNode;
-var hasLeadingComments = utils$12.hasLeadingComments;
-var hasMiddleComments = utils$12.hasMiddleComments;
-var hasIndicatorComment = utils$12.hasIndicatorComment;
-var hasTrailingComment$1 = utils$12.hasTrailingComment;
-var hasEndComments = utils$12.hasEndComments;
-var hasPrettierIgnore$4 = utils$12.hasPrettierIgnore;
-var isLastDescendantNode = utils$12.isLastDescendantNode;
-var isNextLineEmpty$5 = utils$12.isNextLineEmpty;
-var isNode = utils$12.isNode;
-var isEmptyNode = utils$12.isEmptyNode;
-var defineShortcut = utils$12.defineShortcut;
-var mapNode = utils$12.mapNode;
-var docBuilders$3 = doc.builders;
-var conditionalGroup$2 = docBuilders$3.conditionalGroup;
-var breakParent$5 = docBuilders$3.breakParent;
-var concat$17 = docBuilders$3.concat;
-var dedent$4 = docBuilders$3.dedent;
-var dedentToRoot$3 = docBuilders$3.dedentToRoot;
-var fill$6 = docBuilders$3.fill;
-var group$16 = docBuilders$3.group;
-var hardline$13 = docBuilders$3.hardline;
-var ifBreak$8 = docBuilders$3.ifBreak;
-var join$12 = docBuilders$3.join;
-var line$11 = docBuilders$3.line;
-var lineSuffix$2 = docBuilders$3.lineSuffix;
-var literalline$7 = docBuilders$3.literalline;
-var markAsRoot$5 = docBuilders$3.markAsRoot;
-var softline$8 = docBuilders$3.softline;
-var replaceEndOfLineWith$3 = util.replaceEndOfLineWith;
-
-function preprocess$6(ast) {
- return mapNode(ast, defineShortcuts);
-}
-
-function defineShortcuts(node) {
- switch (node.type) {
- case "document":
- defineShortcut(node, "head", function () {
- return node.children[0];
- });
- defineShortcut(node, "body", function () {
- return node.children[1];
- });
- break;
+ case "documentBody":
+ case "sequenceItem":
+ case "flowSequenceItem":
+ case "mappingKey":
+ case "mappingValue":
+ defineShortcut$1(node, "content", function () {
+ return node.children[0];
+ });
+ break;
- case "documentBody":
- case "sequenceItem":
- case "flowSequenceItem":
- case "mappingKey":
- case "mappingValue":
- defineShortcut(node, "content", function () {
- return node.children[0];
- });
- break;
+ case "mappingItem":
+ case "flowMappingItem":
+ defineShortcut$1(node, "key", function () {
+ return node.children[0];
+ });
+ defineShortcut$1(node, "value", function () {
+ return node.children[1];
+ });
+ break;
+ }
- case "mappingItem":
- case "flowMappingItem":
- defineShortcut(node, "key", function () {
- return node.children[0];
- });
- defineShortcut(node, "value", function () {
- return node.children[1];
- });
- break;
+ return node;
}
- return node;
-}
-
-function genericPrint$6(path, options, print) {
- var node = path.getValue();
- var parentNode = path.getParentNode();
- var tag = !node.tag ? "" : path.call(print, "tag");
- var anchor = !node.anchor ? "" : path.call(print, "anchor");
- var nextEmptyLine = isNode(node, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !isLastDescendantNode(path) ? printNextEmptyLine(path, options.originalText) : "";
- return concat$17([node.type !== "mappingValue" && hasLeadingComments(node) ? concat$17([join$12(hardline$13, path.map(print, "leadingComments")), hardline$13]) : "", tag, tag && anchor ? " " : "", anchor, tag || anchor ? isNode(node, ["sequence", "mapping"]) && !hasMiddleComments(node) ? hardline$13 : " " : "", hasMiddleComments(node) ? concat$17([node.middleComments.length === 1 ? "" : hardline$13, join$12(hardline$13, path.map(print, "middleComments")), hardline$13]) : "", hasPrettierIgnore$4(path) ? concat$17(replaceEndOfLineWith$3(options.originalText.slice(node.position.start.offset, node.position.end.offset), literalline$7)) : group$16(_print(node, parentNode, path, options, print)), hasTrailingComment$1(node) && !isNode(node, ["document", "documentHead"]) ? lineSuffix$2(concat$17([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent$5, path.call(print, "trailingComment")])) : "", nextEmptyLine, hasEndComments(node) && !isNode(node, ["documentHead", "documentBody"]) ? align$3(node.type === "sequenceItem" ? 2 : 0, concat$17([hardline$13, join$12(hardline$13, path.map(print, "endComments"))])) : ""]);
-}
-
-function _print(node, parentNode, path, options, print) {
- switch (node.type) {
- case "root":
- return concat$17([join$12(hardline$13, path.map(function (childPath, index) {
- var document = node.children[index];
- var nextDocument = node.children[index + 1];
- return concat$17([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$17([hardline$13, "...", hasTrailingComment$1(document) ? concat$17([" ", path.call(print, "trailingComment")]) : ""]) : !nextDocument || hasTrailingComment$1(nextDocument.head) ? "" : concat$17([hardline$13, "---"])]);
- }, "children")), node.children.length === 0 || function (lastDescendantNode) {
- return isNode(lastDescendantNode, ["blockLiteral", "blockFolded"]) && lastDescendantNode.chomping === "keep";
- }(getLastDescendantNode$1(node)) ? "" : hardline$13]);
-
- case "document":
- {
- var nextDocument = parentNode.children[path.getName() + 1];
- return join$12(hardline$13, [shouldPrintDocumentHeadEndMarker(node, nextDocument, parentNode, options) === "head" ? join$12(hardline$13, [node.head.children.length === 0 && node.head.endComments.length === 0 ? "" : path.call(print, "head"), concat$17(["---", hasTrailingComment$1(node.head) ? concat$17([" ", path.call(print, "head", "trailingComment")]) : ""])].filter(Boolean)) : "", shouldPrintDocumentBody(node) ? path.call(print, "body") : ""].filter(Boolean));
- }
-
- case "documentHead":
- return join$12(hardline$13, [].concat(path.map(print, "children"), path.map(print, "endComments")));
+ function genericPrint$6(path, options, print) {
+ var node = path.getValue();
+ var parentNode = path.getParentNode();
+ var tag = !node.tag ? "" : path.call(print, "tag");
+ var anchor = !node.anchor ? "" : path.call(print, "anchor");
+ var nextEmptyLine = isNode$1(node, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !isLastDescendantNode$1(path) ? printNextEmptyLine(path, options.originalText) : "";
+ return concat$h([node.type !== "mappingValue" && hasLeadingComments$1(node) ? concat$h([join$c(hardline$d, path.map(print, "leadingComments")), hardline$d]) : "", tag, tag && anchor ? " " : "", anchor, tag || anchor ? isNode$1(node, ["sequence", "mapping"]) && !hasMiddleComments$1(node) ? hardline$d : " " : "", hasMiddleComments$1(node) ? concat$h([node.middleComments.length === 1 ? "" : hardline$d, join$c(hardline$d, path.map(print, "middleComments")), hardline$d]) : "", hasPrettierIgnore$6(path) ? concat$h(replaceEndOfLineWith$3(options.originalText.slice(node.position.start.offset, node.position.end.offset), literalline$7)) : group$g(_print(node, parentNode, path, options, print)), hasTrailingComment$3(node) && !isNode$1(node, ["document", "documentHead"]) ? lineSuffix$2(concat$h([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path.getParentNode(2).type === "mapping" && isInlineNode$1(node) ? "" : breakParent$5, path.call(print, "trailingComment")])) : "", nextEmptyLine, hasEndComments$1(node) && !isNode$1(node, ["documentHead", "documentBody"]) ? align$3(node.type === "sequenceItem" ? 2 : 0, concat$h([hardline$d, join$c(hardline$d, path.map(print, "endComments"))])) : ""]);
+ }
- case "documentBody":
- {
- var children = join$12(hardline$13, path.map(print, "children")).parts;
- var endComments = join$12(hardline$13, path.map(print, "endComments")).parts;
- var separator = children.length === 0 || endComments.length === 0 ? "" : function (lastDescendantNode) {
- return isNode(lastDescendantNode, ["blockFolded", "blockLiteral"]) ? lastDescendantNode.chomping === "keep" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true)
- "" : // an extra newline for better readability
- concat$17([hardline$13, hardline$13]) : hardline$13;
- }(getLastDescendantNode$1(node));
- return concat$17([].concat(children, separator, endComments));
- }
+ function _print(node, parentNode, path, options, print) {
+ switch (node.type) {
+ case "root":
+ return concat$h([join$c(hardline$d, path.map(function (childPath, index) {
+ var document = node.children[index];
+ var nextDocument = node.children[index + 1];
+ return concat$h([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$h([hardline$d, "...", hasTrailingComment$3(document) ? concat$h([" ", path.call(print, "trailingComment")]) : ""]) : !nextDocument || hasTrailingComment$3(nextDocument.head) ? "" : concat$h([hardline$d, "---"])]);
+ }, "children")), node.children.length === 0 || function (lastDescendantNode) {
+ return isNode$1(lastDescendantNode, ["blockLiteral", "blockFolded"]) && lastDescendantNode.chomping === "keep";
+ }(getLastDescendantNode$2(node)) ? "" : hardline$d]);
+
+ case "document":
+ {
+ var nextDocument = parentNode.children[path.getName() + 1];
+ return join$c(hardline$d, [shouldPrintDocumentHeadEndMarker(node, nextDocument, parentNode, options) === "head" ? join$c(hardline$d, [node.head.children.length === 0 && node.head.endComments.length === 0 ? "" : path.call(print, "head"), concat$h(["---", hasTrailingComment$3(node.head) ? concat$h([" ", path.call(print, "head", "trailingComment")]) : ""])].filter(Boolean)) : "", shouldPrintDocumentBody(node) ? path.call(print, "body") : ""].filter(Boolean));
+ }
+
+ case "documentHead":
+ return join$c(hardline$d, [].concat(path.map(print, "children"), path.map(print, "endComments")));
+
+ case "documentBody":
+ {
+ var children = join$c(hardline$d, path.map(print, "children")).parts;
+ var endComments = join$c(hardline$d, path.map(print, "endComments")).parts;
+ var separator = children.length === 0 || endComments.length === 0 ? "" : function (lastDescendantNode) {
+ return isNode$1(lastDescendantNode, ["blockFolded", "blockLiteral"]) ? lastDescendantNode.chomping === "keep" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true)
+ "" : // an extra newline for better readability
+ concat$h([hardline$d, hardline$d]) : hardline$d;
+ }(getLastDescendantNode$2(node));
+ return concat$h([].concat(children, separator, endComments));
+ }
+
+ case "directive":
+ return concat$h(["%", join$c(" ", [node.name].concat(node.parameters))]);
- case "directive":
- return concat$17(["%", join$12(" ", [node.name].concat(node.parameters))]);
+ case "comment":
+ return concat$h(["#", node.value]);
- case "comment":
- return concat$17(["#", node.value]);
+ case "alias":
+ return concat$h(["*", node.value]);
- case "alias":
- return concat$17(["*", node.value]);
+ case "tag":
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
- case "tag":
- return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+ case "anchor":
+ return concat$h(["&", node.value]);
- case "anchor":
- return concat$17(["&", node.value]);
+ case "plain":
+ return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options);
- case "plain":
- return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options);
+ case "quoteDouble":
+ case "quoteSingle":
+ {
+ var singleQuote = "'";
+ var doubleQuote = '"';
+ var raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1);
+
+ if (node.type === "quoteSingle" && raw.includes("\\") || node.type === "quoteDouble" && /\\[^"]/.test(raw)) {
+ // only quoteDouble can use escape chars
+ // and quoteSingle do not need to escape backslashes
+ var originalQuote = node.type === "quoteDouble" ? doubleQuote : singleQuote;
+ return concat$h([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]);
+ } else if (raw.includes(doubleQuote)) {
+ return concat$h([singleQuote, printFlowScalarContent(node.type, node.type === "quoteDouble" ? raw // double quote needs to be escaped by backslash in quoteDouble
+ .replace(/\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]);
+ }
- case "quoteDouble":
- case "quoteSingle":
- {
- var singleQuote = "'";
- var doubleQuote = '"';
- var raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1);
+ if (raw.includes(singleQuote)) {
+ return concat$h([doubleQuote, printFlowScalarContent(node.type, node.type === "quoteSingle" ? // single quote needs to be escaped by 2 single quotes in quoteSingle
+ raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]);
+ }
- if (node.type === "quoteSingle" && raw.includes("\\") || node.type === "quoteDouble" && /\\[^"]/.test(raw)) {
- // only quoteDouble can use escape chars
- // and quoteSingle do not need to escape backslashes
- var originalQuote = node.type === "quoteDouble" ? doubleQuote : singleQuote;
- return concat$17([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]);
- } else if (raw.includes(doubleQuote)) {
- return concat$17([singleQuote, printFlowScalarContent(node.type, node.type === "quoteDouble" ? raw // double quote needs to be escaped by backslash in quoteDouble
- .replace(/\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]);
+ var quote = options.singleQuote ? singleQuote : doubleQuote;
+ return concat$h([quote, printFlowScalarContent(node.type, raw, options), quote]);
}
- if (raw.includes(singleQuote)) {
- return concat$17([doubleQuote, printFlowScalarContent(node.type, node.type === "quoteSingle" ? // single quote needs to be escaped by 2 single quotes in quoteSingle
- raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]);
+ case "blockFolded":
+ case "blockLiteral":
+ {
+ var parentIndent = getAncestorCount$1(path, function (ancestorNode) {
+ return isNode$1(ancestorNode, ["sequence", "mapping"]);
+ });
+ var isLastDescendant = isLastDescendantNode$1(path);
+ return concat$h([node.type === "blockFolded" ? ">" : "|", node.indent === null ? "" : node.indent.toString(), node.chomping === "clip" ? "" : node.chomping === "keep" ? "+" : "-", hasIndicatorComment$1(node) ? concat$h([" ", path.call(print, "indicatorComment")]) : "", (node.indent === null ? dedent$3 : dedentToRoot$3)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$h(getBlockValueLineContents$1(node, {
+ parentIndent: parentIndent,
+ isLastDescendant: isLastDescendant,
+ options: options
+ }).reduce(function (reduced, lineWords, index, lineContents) {
+ return reduced.concat(index === 0 ? hardline$d : "", fill$6(join$c(line$9, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$d : markAsRoot$5(literalline$7) : node.chomping === "keep" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$3(hardline$d) : dedentToRoot$3(literalline$7) : "");
+ }, []))))]);
}
- var quote = options.singleQuote ? singleQuote : doubleQuote;
- return concat$17([quote, printFlowScalarContent(node.type, raw, options), quote]);
- }
-
- case "blockFolded":
- case "blockLiteral":
- {
- var parentIndent = getAncestorCount(path, function (ancestorNode) {
- return isNode(ancestorNode, ["sequence", "mapping"]);
- });
- var isLastDescendant = isLastDescendantNode(path);
- return concat$17([node.type === "blockFolded" ? ">" : "|", node.indent === null ? "" : node.indent.toString(), node.chomping === "clip" ? "" : node.chomping === "keep" ? "+" : "-", hasIndicatorComment(node) ? concat$17([" ", path.call(print, "indicatorComment")]) : "", (node.indent === null ? dedent$4 : dedentToRoot$3)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$17(getBlockValueLineContents(node, {
- parentIndent: parentIndent,
- isLastDescendant: isLastDescendant,
- options: options
- }).reduce(function (reduced, lineWords, index, lineContents) {
- return reduced.concat(index === 0 ? hardline$13 : "", fill$6(join$12(line$11, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$13 : markAsRoot$5(literalline$7) : node.chomping === "keep" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$3(hardline$13) : dedentToRoot$3(literalline$7) : "");
- }, []))))]);
- }
+ case "sequence":
+ return join$c(hardline$d, path.map(print, "children"));
- case "sequence":
- return join$12(hardline$13, path.map(print, "children"));
+ case "sequenceItem":
+ return concat$h(["- ", align$3(2, !node.content ? "" : path.call(print, "content"))]);
- case "sequenceItem":
- return concat$17(["- ", align$3(2, !node.content ? "" : path.call(print, "content"))]);
+ case "mappingKey":
+ return !node.content ? "" : path.call(print, "content");
- case "mappingKey":
- return !node.content ? "" : path.call(print, "content");
+ case "mappingValue":
+ return !node.content ? "" : path.call(print, "content");
- case "mappingValue":
- return !node.content ? "" : path.call(print, "content");
+ case "mapping":
+ return join$c(hardline$d, path.map(print, "children"));
- case "mapping":
- return join$12(hardline$13, path.map(print, "children"));
+ case "mappingItem":
+ case "flowMappingItem":
+ {
+ var isEmptyMappingKey = isEmptyNode$1(node.key);
+ var isEmptyMappingValue = isEmptyNode$1(node.value);
- case "mappingItem":
- case "flowMappingItem":
- {
- var isEmptyMappingKey = isEmptyNode(node.key);
- var isEmptyMappingValue = isEmptyNode(node.value);
+ if (isEmptyMappingKey && isEmptyMappingValue) {
+ return concat$h([": "]);
+ }
- if (isEmptyMappingKey && isEmptyMappingValue) {
- return concat$17([": "]);
- }
+ var key = path.call(print, "key");
+ var value = path.call(print, "value");
- var key = path.call(print, "key");
- var value = path.call(print, "value");
+ if (isEmptyMappingValue) {
+ return node.type === "flowMappingItem" && parentNode.type === "flowMapping" ? key : node.type === "mappingItem" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$3(node.key.content) && (!parentNode.tag || parentNode.tag.value !== "tag:yaml.org,2002:set") ? concat$h([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ":"]) : concat$h(["? ", align$3(2, key)]);
+ }
- if (isEmptyMappingValue) {
- return node.type === "flowMappingItem" && parentNode.type === "flowMapping" ? key : node.type === "mappingItem" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$1(node.key.content) && (!parentNode.tag || parentNode.tag.value !== "tag:yaml.org,2002:set") ? concat$17([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ":"]) : concat$17(["? ", align$3(2, key)]);
- }
+ if (isEmptyMappingKey) {
+ return concat$h([": ", align$3(2, value)]);
+ }
- if (isEmptyMappingKey) {
- return concat$17([": ", align$3(2, value)]);
+ var groupId = Symbol("mappingKey");
+ var forceExplicitKey = hasLeadingComments$1(node.value) || !isInlineNode$1(node.key.content);
+ return forceExplicitKey ? concat$h(["? ", align$3(2, key), hardline$d, join$c("", path.map(print, "value", "leadingComments").map(function (comment) {
+ return concat$h([comment, hardline$d]);
+ })), ": ", align$3(2, value)]) : // force singleline
+ isSingleLineNode(node.key.content) && !hasLeadingComments$1(node.key.content) && !hasMiddleComments$1(node.key.content) && !hasTrailingComment$3(node.key.content) && !hasEndComments$1(node.key) && !hasLeadingComments$1(node.value.content) && !hasMiddleComments$1(node.value.content) && !hasEndComments$1(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$h([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ": ", value]) : conditionalGroup$2([concat$h([group$g(concat$h([ifBreak$8("? "), group$g(align$3(2, key), {
+ id: groupId
+ })])), ifBreak$8(concat$h([hardline$d, ": ", align$3(2, value)]), indent(concat$h([needsSpaceInFrontOfMappingValue(node) ? " " : "", ":", hasLeadingComments$1(node.value.content) || hasEndComments$1(node.value) && node.value.content && !isNode$1(node.value.content, ["mapping", "sequence"]) || parentNode.type === "mapping" && hasTrailingComment$3(node.key.content) && isInlineNode$1(node.value.content) || isNode$1(node.value.content, ["mapping", "sequence"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$d : !node.value.content ? "" : line$9, value])), {
+ groupId: groupId
+ })])]);
}
- var groupId = Symbol("mappingKey");
- var forceExplicitKey = hasLeadingComments(node.value) || !isInlineNode(node.key.content);
- return forceExplicitKey ? concat$17(["? ", align$3(2, key), hardline$13, join$12("", path.map(print, "value", "leadingComments").map(function (comment) {
- return concat$17([comment, hardline$13]);
- })), ": ", align$3(2, value)]) : // force singleline
- isSingleLineNode(node.key.content) && !hasLeadingComments(node.key.content) && !hasMiddleComments(node.key.content) && !hasTrailingComment$1(node.key.content) && !hasEndComments(node.key) && !hasLeadingComments(node.value.content) && !hasMiddleComments(node.value.content) && !hasEndComments(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$17([key, needsSpaceInFrontOfMappingValue(node) ? " " : "", ": ", value]) : conditionalGroup$2([concat$17([group$16(concat$17([ifBreak$8("? "), group$16(align$3(2, key), {
- id: groupId
- })])), ifBreak$8(concat$17([hardline$13, ": ", align$3(2, value)]), indent(concat$17([needsSpaceInFrontOfMappingValue(node) ? " " : "", ":", hasLeadingComments(node.value.content) || hasEndComments(node.value) && node.value.content && !isNode(node.value.content, ["mapping", "sequence"]) || parentNode.type === "mapping" && hasTrailingComment$1(node.key.content) && isInlineNode(node.value.content) || isNode(node.value.content, ["mapping", "sequence"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$13 : !node.value.content ? "" : line$11, value])), {
- groupId: groupId
- })])]);
- }
+ case "flowMapping":
+ case "flowSequence":
+ {
+ var openMarker = node.type === "flowMapping" ? "{" : "[";
+ var closeMarker = node.type === "flowMapping" ? "}" : "]";
+ var bracketSpacing = node.type === "flowMapping" && node.children.length !== 0 && options.bracketSpacing ? line$9 : softline$8;
- case "flowMapping":
- case "flowSequence":
- {
- var openMarker = node.type === "flowMapping" ? "{" : "[";
- var closeMarker = node.type === "flowMapping" ? "}" : "]";
- var bracketSpacing = node.type === "flowMapping" && node.children.length !== 0 && options.bracketSpacing ? line$11 : softline$8;
+ var isLastItemEmptyMappingItem = node.children.length !== 0 && function (lastItem) {
+ return lastItem.type === "flowMappingItem" && isEmptyNode$1(lastItem.key) && isEmptyNode$1(lastItem.value);
+ }(getLast$5(node.children));
- var isLastItemEmptyMappingItem = node.children.length !== 0 && function (lastItem) {
- return lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value);
- }(getLast$5(node.children));
+ return concat$h([openMarker, indent(concat$h([bracketSpacing, concat$h(path.map(function (childPath, index) {
+ return concat$h([print(childPath), index === node.children.length - 1 ? "" : concat$h([",", line$9, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""])]);
+ }, "children")), ifBreak$8(",", "")])), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker]);
+ }
- return concat$17([openMarker, indent(concat$17([bracketSpacing, concat$17(path.map(function (childPath, index) {
- return concat$17([print(childPath), index === node.children.length - 1 ? "" : concat$17([",", line$11, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""])]);
- }, "children")), ifBreak$8(",", "")])), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker]);
- }
+ case "flowSequenceItem":
+ return path.call(print, "content");
+ // istanbul ignore next
- case "flowSequenceItem":
- return path.call(print, "content");
- // istanbul ignore next
+ default:
+ throw new Error("Unexpected node type ".concat(node.type));
+ }
- default:
- throw new Error("Unexpected node type ".concat(node.type));
+ function indent(doc) {
+ return docBuilders$2.align(" ".repeat(options.tabWidth), doc);
+ }
}
- function indent(doc$$2) {
- return docBuilders$3.align(" ".repeat(options.tabWidth), doc$$2);
+ function align$3(n, doc) {
+ return typeof n === "number" && n > 0 ? docBuilders$2.align(" ".repeat(n), doc) : docBuilders$2.align(n, doc);
}
-}
-function align$3(n, doc$$2) {
- return typeof n === "number" && n > 0 ? docBuilders$3.align(" ".repeat(n), doc$$2) : docBuilders$3.align(n, doc$$2);
-}
+ function isInlineNode$1(node) {
+ if (!node) {
+ return true;
+ }
-function isInlineNode(node) {
- if (!node) {
- return true;
+ switch (node.type) {
+ case "plain":
+ case "quoteDouble":
+ case "quoteSingle":
+ case "alias":
+ case "flowMapping":
+ case "flowSequence":
+ return true;
+
+ default:
+ return false;
+ }
}
- switch (node.type) {
- case "plain":
- case "quoteDouble":
- case "quoteSingle":
- case "alias":
- case "flowMapping":
- case "flowSequence":
+ function isSingleLineNode(node) {
+ if (!node) {
return true;
+ }
- default:
- return false;
- }
-}
-
-function isSingleLineNode(node) {
- if (!node) {
- return true;
- }
+ switch (node.type) {
+ case "plain":
+ case "quoteDouble":
+ case "quoteSingle":
+ return node.position.start.line === node.position.end.line;
- switch (node.type) {
- case "plain":
- case "quoteDouble":
- case "quoteSingle":
- return node.position.start.line === node.position.end.line;
+ case "alias":
+ return true;
- case "alias":
- return true;
+ default:
+ return false;
+ }
+ }
- default:
- return false;
+ function shouldPrintDocumentBody(document) {
+ return document.body.children.length !== 0 || hasEndComments$1(document.body);
}
-}
-function shouldPrintDocumentBody(document) {
- return document.body.children.length !== 0 || hasEndComments(document.body);
-}
+ function shouldPrintDocumentEndMarker(document, nextDocument) {
+ return (
+ /**
+ *... # trailingComment
+ */
+ hasTrailingComment$3(document) || nextDocument && (
+ /**
+ * ...
+ * %DIRECTIVE
+ * ---
+ */
+ nextDocument.head.children.length !== 0 ||
+ /**
+ * ...
+ * # endComment
+ * ---
+ */
+ hasEndComments$1(nextDocument.head))
+ );
+ }
-function shouldPrintDocumentEndMarker(document, nextDocument) {
- return (
+ function shouldPrintDocumentHeadEndMarker(document, nextDocument, root, options) {
+ if (
/**
- *... # trailingComment
+ * ---
+ * preserve the first document head end marker
*/
- hasTrailingComment$1(document) || nextDocument && (
+ root.children[0] === document && /---(\s|$)/.test(options.originalText.slice(options.locStart(document), options.locStart(document) + 4)) ||
/**
- * ...
* %DIRECTIVE
* ---
*/
- nextDocument.head.children.length !== 0 ||
+ document.head.children.length !== 0 ||
/**
- * ...
- * # endComment
+ * # end comment
* ---
*/
- hasEndComments(nextDocument.head))
- );
-}
+ hasEndComments$1(document.head) ||
+ /**
+ * --- # trailing comment
+ */
+ hasTrailingComment$3(document.head)) {
+ return "head";
+ }
-function shouldPrintDocumentHeadEndMarker(document, nextDocument, root, options) {
- if (
- /**
- * ---
- * preserve the first document head end marker
- */
- root.children[0] === document && /---(\s|$)/.test(options.originalText.slice(options.locStart(document), options.locStart(document) + 4)) ||
- /**
- * %DIRECTIVE
- * ---
- */
- document.head.children.length !== 0 ||
- /**
- * # end comment
- * ---
- */
- hasEndComments(document.head) ||
- /**
- * --- # trailing comment
- */
- hasTrailingComment$1(document.head)) {
- return "head";
- }
+ if (shouldPrintDocumentEndMarker(document, nextDocument)) {
+ return false;
+ }
- if (shouldPrintDocumentEndMarker(document, nextDocument)) {
- return false;
+ return nextDocument ? "root" : false;
}
- return nextDocument ? "root" : false;
-}
+ function isAbsolutelyPrintedAsSingleLineNode(node, options) {
+ if (!node) {
+ return true;
+ }
-function isAbsolutelyPrintedAsSingleLineNode(node, options) {
- if (!node) {
- return true;
- }
+ switch (node.type) {
+ case "plain":
+ case "quoteSingle":
+ case "quoteDouble":
+ break;
- switch (node.type) {
- case "plain":
- case "quoteSingle":
- case "quoteDouble":
- break;
+ case "alias":
+ return true;
- case "alias":
- return true;
+ default:
+ return false;
+ }
+
+ if (options.proseWrap === "preserve") {
+ return node.position.start.line === node.position.end.line;
+ }
- default:
+ if ( // backslash-newline
+ /\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) {
return false;
- }
+ }
+
+ switch (options.proseWrap) {
+ case "never":
+ return node.value.indexOf("\n") === -1;
- if (options.proseWrap === "preserve") {
- return node.position.start.line === node.position.end.line;
+ case "always":
+ return !/[\n ]/.test(node.value);
+ // istanbul ignore next
+
+ default:
+ return false;
+ }
}
- if ( // backslash-newline
- /\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) {
- return false;
+ function needsSpaceInFrontOfMappingValue(node) {
+ return node.key.content && node.key.content.type === "alias";
}
- switch (options.proseWrap) {
- case "never":
- return node.value.indexOf("\n") === -1;
+ function printNextEmptyLine(path, originalText) {
+ var node = path.getValue();
+ var root = path.stack[0];
+ root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || [];
- case "always":
- return !/[\n ]/.test(node.value);
- // istanbul ignore next
+ if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) {
+ if (isNextLineEmpty$6(node, originalText)) {
+ root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true;
+ return softline$8;
+ }
+ }
- default:
- return false;
+ return "";
}
-}
-function needsSpaceInFrontOfMappingValue(node) {
- return node.key.content && node.key.content.type === "alias";
-}
+ function printFlowScalarContent(nodeType, content, options) {
+ var lineContents = getFlowScalarLineContents$1(nodeType, content, options);
+ return join$c(hardline$d, lineContents.map(function (lineContentWords) {
+ return fill$6(join$c(line$9, lineContentWords).parts);
+ }));
+ }
-function printNextEmptyLine(path, originalText) {
- var node = path.getValue();
- var root = path.stack[0];
- root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || [];
+ function clean$7(node, newNode
+ /*, parent */
+ ) {
+ if (isNode$1(newNode)) {
+ delete newNode.position;
+
+ switch (newNode.type) {
+ case "comment":
+ // insert pragma
+ if (isPragma$1(newNode.value)) {
+ return null;
+ }
+
+ break;
- if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) {
- if (isNextLineEmpty$5(node, originalText)) {
- root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true;
- return softline$8;
+ case "quoteDouble":
+ case "quoteSingle":
+ newNode.type = "quote";
+ break;
+ }
}
}
- return "";
-}
+ var printerYaml = {
+ preprocess: preprocess$3,
+ print: genericPrint$6,
+ massageAstNode: clean$7,
+ insertPragma: insertPragma$9
+ };
-function printFlowScalarContent(nodeType, content, options) {
- var lineContents = getFlowScalarLineContents(nodeType, content, options);
- return join$12(hardline$13, lineContents.map(function (lineContentWords) {
- return fill$6(join$12(line$11, lineContentWords).parts);
- }));
-}
+ var options$7 = {
+ bracketSpacing: commonOptions.bracketSpacing,
+ singleQuote: commonOptions.singleQuote,
+ proseWrap: commonOptions.proseWrap
+ };
-function clean$11(node, newNode
-/*, parent */
-) {
- if (isNode(newNode)) {
- delete newNode.position;
+ var name$h = "YAML";
+ var type$g = "data";
+ var tmScope$g = "source.yaml";
+ var aliases$6 = [
+ "yml"
+ ];
+ var extensions$g = [
+ ".yml",
+ ".mir",
+ ".reek",
+ ".rviz",
+ ".sublime-syntax",
+ ".syntax",
+ ".yaml",
+ ".yaml-tmlanguage",
+ ".yml.mysql"
+ ];
+ var filenames$4 = [
+ ".clang-format",
+ ".clang-tidy",
+ ".gemrc",
+ "glide.lock"
+ ];
+ var aceMode$g = "yaml";
+ var codemirrorMode$c = "yaml";
+ var codemirrorMimeType$c = "text/x-yaml";
+ var languageId$g = 407;
+ var YAML = {
+ name: name$h,
+ type: type$g,
+ tmScope: tmScope$g,
+ aliases: aliases$6,
+ extensions: extensions$g,
+ filenames: filenames$4,
+ aceMode: aceMode$g,
+ codemirrorMode: codemirrorMode$c,
+ codemirrorMimeType: codemirrorMimeType$c,
+ languageId: languageId$g
+ };
- switch (newNode.type) {
- case "comment":
- // insert pragma
- if (isPragma(newNode.value)) {
- return null;
- }
+ var YAML$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$h,
+ type: type$g,
+ tmScope: tmScope$g,
+ aliases: aliases$6,
+ extensions: extensions$g,
+ filenames: filenames$4,
+ aceMode: aceMode$g,
+ codemirrorMode: codemirrorMode$c,
+ codemirrorMimeType: codemirrorMimeType$c,
+ languageId: languageId$g,
+ 'default': YAML
+ });
- break;
+ var require$$0$8 = getCjsExportFromNamespace(YAML$1);
- case "quoteDouble":
- case "quoteSingle":
- newNode.type = "quote";
- break;
- }
- }
-}
-
-var printerYaml = {
- preprocess: preprocess$6,
- print: genericPrint$6,
- massageAstNode: clean$11,
- insertPragma: insertPragma$8
-};
-
-var options$18 = {
- bracketSpacing: commonOptions.bracketSpacing,
- singleQuote: commonOptions.singleQuote,
- proseWrap: commonOptions.proseWrap
-};
-
-var name$16 = "YAML";
-var type$15 = "data";
-var tmScope$15 = "source.yaml";
-var aliases$6 = ["yml"];
-var extensions$15 = [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yml.mysql"];
-var filenames$3 = [".clang-format", ".clang-tidy", ".gemrc", "glide.lock"];
-var aceMode$15 = "yaml";
-var codemirrorMode$11 = "yaml";
-var codemirrorMimeType$11 = "text/x-yaml";
-var languageId$15 = 407;
-var yaml = {
- name: name$16,
- type: type$15,
- tmScope: tmScope$15,
- aliases: aliases$6,
- extensions: extensions$15,
- filenames: filenames$3,
- aceMode: aceMode$15,
- codemirrorMode: codemirrorMode$11,
- codemirrorMimeType: codemirrorMimeType$11,
- languageId: languageId$15
-};
-
-var yaml$1 = Object.freeze({
- name: name$16,
- type: type$15,
- tmScope: tmScope$15,
- aliases: aliases$6,
- extensions: extensions$15,
- filenames: filenames$3,
- aceMode: aceMode$15,
- codemirrorMode: codemirrorMode$11,
- codemirrorMimeType: codemirrorMimeType$11,
- languageId: languageId$15,
- default: yaml
-});
-
-var require$$0$29 = ( yaml$1 && yaml ) || yaml$1;
-
-var languages$6 = [createLanguage(require$$0$29, {
- override: {
- since: "1.14.0",
- parsers: ["yaml"],
- vscodeLanguageIds: ["yaml"]
- }
-})];
-var languageYaml = {
- languages: languages$6,
- printers: {
- yaml: printerYaml
- },
- options: options$18
-};
-
-var version = require$$0.version;
-var getSupportInfo = support.getSupportInfo;
-var internalPlugins = [languageCss, languageGraphql, languageHandlebars, languageHtml, languageJs, languageMarkdown, languageYaml];
-
-var isArray = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) === "[object Array]";
-}; // Luckily `opts` is always the 2nd argument
-
-
-function withPlugins(fn) {
- return function () {
- var args = Array.from(arguments);
- var plugins = args[1] && args[1].plugins || [];
-
- if (!isArray(plugins)) {
- plugins = Object.values(plugins);
- }
-
- args[1] = Object.assign({}, args[1], {
- plugins: internalPlugins.concat(plugins)
+ var languages$6 = [createLanguage(require$$0$8, function (data) {
+ return Object.assign(data, {
+ since: "1.14.0",
+ parsers: ["yaml"],
+ vscodeLanguageIds: ["yaml"]
});
- return fn.apply(null, args);
+ })];
+ var languageYaml = {
+ languages: languages$6,
+ printers: {
+ yaml: printerYaml
+ },
+ options: options$7
+ };
+
+ var version$2 = require$$0.version;
+ var getSupportInfo$2 = support.getSupportInfo;
+ var internalPlugins = [languageCss, languageGraphql, languageHandlebars, languageHtml, languageJs, languageMarkdown, languageYaml];
+
+ var isArray$1 = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) === "[object Array]";
+ }; // Luckily `opts` is always the 2nd argument
+
+
+ function withPlugins(fn) {
+ return function () {
+ var args = Array.from(arguments);
+ var plugins = args[1] && args[1].plugins || [];
+
+ if (!isArray$1(plugins)) {
+ plugins = Object.values(plugins);
+ }
+
+ args[1] = Object.assign({}, args[1], {
+ plugins: internalPlugins.concat(plugins)
+ });
+ return fn.apply(null, args);
+ };
+ }
+
+ var formatWithCursor = withPlugins(core.formatWithCursor);
+ var standalone = {
+ formatWithCursor: formatWithCursor,
+ format: function format(text, opts) {
+ return formatWithCursor(text, opts).formatted;
+ },
+ check: function check(text, opts) {
+ var formatted = formatWithCursor(text, opts).formatted;
+ return formatted === text;
+ },
+ doc: doc,
+ getSupportInfo: withPlugins(getSupportInfo$2),
+ version: version$2,
+ util: utilShared,
+ __debug: {
+ parse: withPlugins(core.parse),
+ formatAST: withPlugins(core.formatAST),
+ formatDoc: withPlugins(core.formatDoc),
+ printToDoc: withPlugins(core.printToDoc),
+ printDocToString: withPlugins(core.printDocToString)
+ }
};
-}
-
-var formatWithCursor = withPlugins(core.formatWithCursor);
-var standalone$2 = {
- formatWithCursor: formatWithCursor,
- format: function format(text, opts) {
- return formatWithCursor(text, opts).formatted;
- },
- check: function check(text, opts) {
- var formatted = formatWithCursor(text, opts).formatted;
- return formatted === text;
- },
- doc: doc,
- getSupportInfo: withPlugins(getSupportInfo),
- version: version,
- util: utilShared,
- __debug: {
- parse: withPlugins(core.parse),
- formatAST: withPlugins(core.formatAST),
- formatDoc: withPlugins(core.formatDoc),
- printToDoc: withPlugins(core.printToDoc),
- printDocToString: withPlugins(core.printDocToString)
- }
-};
-
-var standalone = standalone$2;
-
-return standalone;
+
+ var standalone$1 = standalone;
+
+ return standalone$1;
})));