{"ast":null,"code":"import { ContextualKeyword } from \"./keywords\";\nimport { TokenType as tt } from \"./types\";\nexport class Scope {\n  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {\n    this.startTokenIndex = startTokenIndex;\n    this.endTokenIndex = endTokenIndex;\n    this.isFunctionScope = isFunctionScope;\n  }\n}\nexport class StateSnapshot {\n  constructor(potentialArrowAt, noAnonFunctionType, inDisallowConditionalTypesContext, tokensLength, scopesLength, pos, type, contextualKeyword, start, end, isType, scopeDepth, error) {\n    ;\n    this.potentialArrowAt = potentialArrowAt;\n    this.noAnonFunctionType = noAnonFunctionType;\n    this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;\n    this.tokensLength = tokensLength;\n    this.scopesLength = scopesLength;\n    this.pos = pos;\n    this.type = type;\n    this.contextualKeyword = contextualKeyword;\n    this.start = start;\n    this.end = end;\n    this.isType = isType;\n    this.scopeDepth = scopeDepth;\n    this.error = error;\n  }\n}\nexport default class State {\n  constructor() {\n    State.prototype.__init.call(this);\n    State.prototype.__init2.call(this);\n    State.prototype.__init3.call(this);\n    State.prototype.__init4.call(this);\n    State.prototype.__init5.call(this);\n    State.prototype.__init6.call(this);\n    State.prototype.__init7.call(this);\n    State.prototype.__init8.call(this);\n    State.prototype.__init9.call(this);\n    State.prototype.__init10.call(this);\n    State.prototype.__init11.call(this);\n    State.prototype.__init12.call(this);\n    State.prototype.__init13.call(this);\n  }\n  // Used to signify the start of a potential arrow function\n  __init() {\n    this.potentialArrowAt = -1;\n  }\n\n  // Used by Flow to handle an edge case involving function type parsing.\n  __init2() {\n    this.noAnonFunctionType = false;\n  }\n\n  // Used by TypeScript to handle ambiguities when parsing conditional types.\n  __init3() {\n    this.inDisallowConditionalTypesContext = false;\n  }\n\n  // Token store.\n  __init4() {\n    this.tokens = [];\n  }\n\n  // Array of all observed scopes, ordered by their ending position.\n  __init5() {\n    this.scopes = [];\n  }\n\n  // The current position of the tokenizer in the input.\n  __init6() {\n    this.pos = 0;\n  }\n\n  // Information about the current token.\n  __init7() {\n    this.type = tt.eof;\n  }\n  __init8() {\n    this.contextualKeyword = ContextualKeyword.NONE;\n  }\n  __init9() {\n    this.start = 0;\n  }\n  __init10() {\n    this.end = 0;\n  }\n  __init11() {\n    this.isType = false;\n  }\n  __init12() {\n    this.scopeDepth = 0;\n  }\n\n  /**\n   * If the parser is in an error state, then the token is always tt.eof and all functions can\n   * keep executing but should be written so they don't get into an infinite loop in this situation.\n   *\n   * This approach, combined with the ability to snapshot and restore state, allows us to implement\n   * backtracking without exceptions and without needing to explicitly propagate error states\n   * everywhere.\n   */\n  __init13() {\n    this.error = null;\n  }\n  snapshot() {\n    return new StateSnapshot(this.potentialArrowAt, this.noAnonFunctionType, this.inDisallowConditionalTypesContext, this.tokens.length, this.scopes.length, this.pos, this.type, this.contextualKeyword, this.start, this.end, this.isType, this.scopeDepth, this.error);\n  }\n  restoreFromSnapshot(snapshot) {\n    this.potentialArrowAt = snapshot.potentialArrowAt;\n    this.noAnonFunctionType = snapshot.noAnonFunctionType;\n    this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;\n    this.tokens.length = snapshot.tokensLength;\n    this.scopes.length = snapshot.scopesLength;\n    this.pos = snapshot.pos;\n    this.type = snapshot.type;\n    this.contextualKeyword = snapshot.contextualKeyword;\n    this.start = snapshot.start;\n    this.end = snapshot.end;\n    this.isType = snapshot.isType;\n    this.scopeDepth = snapshot.scopeDepth;\n    this.error = snapshot.error;\n  }\n}","map":{"version":3,"names":["ContextualKeyword","TokenType","tt","Scope","constructor","startTokenIndex","endTokenIndex","isFunctionScope","StateSnapshot","potentialArrowAt","noAnonFunctionType","inDisallowConditionalTypesContext","tokensLength","scopesLength","pos","type","contextualKeyword","start","end","isType","scopeDepth","error","State","prototype","__init","call","__init2","__init3","__init4","__init5","__init6","__init7","__init8","__init9","__init10","__init11","__init12","__init13","tokens","scopes","eof","NONE","snapshot","length","restoreFromSnapshot"],"sources":["C:/Users/user/Desktop/000newport/node_modules/sucrase/dist/esm/parser/tokenizer/state.js"],"sourcesContent":["\nimport {ContextualKeyword} from \"./keywords\";\nimport { TokenType as tt} from \"./types\";\n\nexport class Scope {\n  \n  \n  \n\n  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {\n    this.startTokenIndex = startTokenIndex;\n    this.endTokenIndex = endTokenIndex;\n    this.isFunctionScope = isFunctionScope;\n  }\n}\n\nexport class StateSnapshot {\n  constructor(\n     potentialArrowAt,\n     noAnonFunctionType,\n     inDisallowConditionalTypesContext,\n     tokensLength,\n     scopesLength,\n     pos,\n     type,\n     contextualKeyword,\n     start,\n     end,\n     isType,\n     scopeDepth,\n     error,\n  ) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;}\n}\n\nexport default class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); }\n  // Used to signify the start of a potential arrow function\n  __init() {this.potentialArrowAt = -1}\n\n  // Used by Flow to handle an edge case involving function type parsing.\n  __init2() {this.noAnonFunctionType = false}\n\n  // Used by TypeScript to handle ambiguities when parsing conditional types.\n  __init3() {this.inDisallowConditionalTypesContext = false}\n\n  // Token store.\n  __init4() {this.tokens = []}\n\n  // Array of all observed scopes, ordered by their ending position.\n  __init5() {this.scopes = []}\n\n  // The current position of the tokenizer in the input.\n  __init6() {this.pos = 0}\n\n  // Information about the current token.\n  __init7() {this.type = tt.eof}\n  __init8() {this.contextualKeyword = ContextualKeyword.NONE}\n  __init9() {this.start = 0}\n  __init10() {this.end = 0}\n\n  __init11() {this.isType = false}\n  __init12() {this.scopeDepth = 0}\n\n  /**\n   * If the parser is in an error state, then the token is always tt.eof and all functions can\n   * keep executing but should be written so they don't get into an infinite loop in this situation.\n   *\n   * This approach, combined with the ability to snapshot and restore state, allows us to implement\n   * backtracking without exceptions and without needing to explicitly propagate error states\n   * everywhere.\n   */\n  __init13() {this.error = null}\n\n  snapshot() {\n    return new StateSnapshot(\n      this.potentialArrowAt,\n      this.noAnonFunctionType,\n      this.inDisallowConditionalTypesContext,\n      this.tokens.length,\n      this.scopes.length,\n      this.pos,\n      this.type,\n      this.contextualKeyword,\n      this.start,\n      this.end,\n      this.isType,\n      this.scopeDepth,\n      this.error,\n    );\n  }\n\n  restoreFromSnapshot(snapshot) {\n    this.potentialArrowAt = snapshot.potentialArrowAt;\n    this.noAnonFunctionType = snapshot.noAnonFunctionType;\n    this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;\n    this.tokens.length = snapshot.tokensLength;\n    this.scopes.length = snapshot.scopesLength;\n    this.pos = snapshot.pos;\n    this.type = snapshot.type;\n    this.contextualKeyword = snapshot.contextualKeyword;\n    this.start = snapshot.start;\n    this.end = snapshot.end;\n    this.isType = snapshot.isType;\n    this.scopeDepth = snapshot.scopeDepth;\n    this.error = snapshot.error;\n  }\n}\n"],"mappings":"AACA,SAAQA,iBAAiB,QAAO,YAAY;AAC5C,SAASC,SAAS,IAAIC,EAAE,QAAO,SAAS;AAExC,OAAO,MAAMC,KAAK,CAAC;EAKjBC,WAAWA,CAACC,eAAe,EAAEC,aAAa,EAAEC,eAAe,EAAE;IAC3D,IAAI,CAACF,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,eAAe,GAAGA,eAAe;EACxC;AACF;AAEA,OAAO,MAAMC,aAAa,CAAC;EACzBJ,WAAWA,CACRK,gBAAgB,EAChBC,kBAAkB,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