/** * Relay v2.0.0 * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=85)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("fbjs/lib/invariant")},function(e,t,n){"use strict";var r=n(9),i=n(2),a=n(94).createUserError,s=n(20).OrderedMap,o=function(){function e(e,t){this._isMutable=!1,this._documents=new s,this._withTransform=new WeakMap,this.serverSchema=e,this.clientSchema=t||e}var t=e.prototype;return t.documents=function(){return this._documents.toArray()},t.forEachDocument=function(e){this._documents.forEach(e)},t.replace=function(e){return this._update(this._documents.update(e.name,function(t){return t||i(!1),e}))},t.add=function(e){return this._update(this._documents.update(e.name,function(t){return t&&i(!1),e}))},t.addAll=function(e){return this.withMutations(function(t){return e.reduce(function(e,t){return e.add(t)},t)})},t.applyTransforms=function(e,t){var n=this;return r.run("applyTransforms",function(){return e.reduce(function(e,n){return e.applyTransform(n,t)},n)})},t.applyTransform=function(e,t){var n=this._withTransform.get(e);if(!n){var i=process.hrtime();n=r.instrument(e)(this);var a=process.hrtime(i),s=Math.round((1e9*a[0]+a[1])/1e6);t&&t.reportTime(e.name,s),this._withTransform.set(e,n)}return n},t.get=function(e){return this._documents.get(e)},t.getFragment=function(e){var t=this._get(e);if("Fragment"!==t.kind){var n=e.substring(0,e.lastIndexOf("_"));throw a("GraphQLCompilerContext: Cannot find fragment `%s`. Please make sure the fragment exists in `%s`.",e,n)}return t},t.getRoot=function(e){var t=this._get(e);return"Root"!==t.kind&&i(!1),t},t.remove=function(e){return this._update(this._documents.delete(e))},t.withMutations=function(e){var t=this._update(this._documents.asMutable());t._isMutable=!0;var n=e(t);return n._isMutable=!1,n._documents=n._documents.asImmutable(),this._documents===n._documents?this:n},t._get=function(e){var t=this._documents.get(e);return t||i(!1),t},t._update=function(t){var n=this._isMutable?this:new e(this.serverSchema,this.clientSchema);return n._documents=t,n},e}();e.exports=o},function(e,t,n){var r=n(46);e.exports=function(e){for(var t=1;t{s[t]=s[t]||[],s[t].push(e)}),g[e]=t},t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36));const i={};t.VISITOR_KEYS=i;const a={};t.ALIAS_KEYS=a;const s={};t.FLIPPED_ALIAS_KEYS=s;const o={};t.NODE_FIELDS=o;const l={};t.BUILDER_KEYS=l;const u={};function c(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":typeof e}function p(e){return{validate:e}}function f(e){return"string"==typeof e?y(e):y(...e)}function d(e){return T(v("array"),m(e))}function h(e){return d(f(e))}function m(e){function t(t,n,r){if(Array.isArray(r))for(let i=0;i","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=r;const i=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=i;const a=[...i,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=a;const s=[...a,...r];t.BOOLEAN_BINARY_OPERATORS=s;const o=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=o;const l=["+",...o,...s];t.BINARY_OPERATORS=l;const u=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=u;const c=["+","-","~"];t.NUMBER_UNARY_OPERATORS=c;const p=["typeof"];t.STRING_UNARY_OPERATORS=p;const f=["void","throw",...u,...c,...p];t.UNARY_OPERATORS=f;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};const d=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=d;const h=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=h},function(e,t){e.exports=require("relay-runtime")},function(e,t){e.exports=require("immutable")},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";function r(){const e=function(e){return e&&e.__esModule?e:{default:e}}(n(122));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&!r().default.keyword.isReservedWordES6(e,!0)&&("await"!==e&&r().default.keyword.isIdentifierNameES6(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(13);const i=Function.call.bind(Object.prototype.hasOwnProperty);function a(e,t){return e&&"string"==typeof e.type&&"CommentLine"!==e.type&&"CommentBlock"!==e.type?o(e,t):e}function s(e,t){return Array.isArray(e)?e.map(e=>a(e,t)):a(e,t)}function o(e,t=!0){if(!e)return e;const{type:n}=e,a={type:n};if("Identifier"===n)a.name=e.name;else{if(!i(r.NODE_FIELDS,n))throw new Error(`Unknown node type: "${n}"`);for(const o of Object.keys(r.NODE_FIELDS[n]))i(e,o)&&(a[o]=t?s(e[o],!0):e[o])}return i(e,"loc")&&(a.loc=e.loc),i(e,"leadingComments")&&(a.leadingComments=e.leadingComments),i(e,"innerComments")&&(a.innerComments=e.innerCmments),i(e,"trailingComments")&&(a.trailingComments=e.trailingComments),i(e,"extra")&&(a.extra=Object.assign({},e.extra)),a}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){var t={};return e.forEach(function(e){"Literal"!==e.value.kind&&r(!1),t[e.name]=e.value.value}),t}},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("nullthrows")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(8);function i(e,t,n){let a=[].concat(e);const s=Object.create(null);for(;a.length;){const e=a.shift();if(!e)continue;const o=i.keys[e.type];if((0,r.isIdentifier)(e))if(t){(s[e.name]=s[e.name]||[]).push(e)}else s[e.name]=e;else if((0,r.isExportDeclaration)(e))(0,r.isDeclaration)(e.declaration)&&a.push(e.declaration);else{if(n){if((0,r.isFunctionDeclaration)(e)){a.push(e.id);continue}if((0,r.isFunctionExpression)(e))continue}if(o)for(let t=0;t0||e.updated.length>0||e.deleted.length>0},e.printChanges=function(e,t){s.run("CodegenDirectory.printChanges",function(){var n=[];function r(e,t){t.length>0&&(n.push(e+":"),t.forEach(function(e){n.push(" - "+e)}))}t.onlyValidate?(r("Missing",e.created),r("Out of date",e.updated),r("Extra",e.deleted)):(r("Created",e.created),r("Updated",e.updated),r("Deleted",e.deleted),n.push("Unchanged: ".concat(e.unchanged.length," files"))),console.log(n.join("\n"))})},e.getAddedRemovedFiles=function(e){var t=[],n=[];return e.forEach(function(e){e.changes.created.forEach(function(n){t.push(e.getPath(n))}),e.changes.deleted.forEach(function(t){n.push(e.getPath(t))})}),{added:t,removed:n}},e.sourceControlAddRemove=function(){var t=i(function*(t,n){var r=e.getAddedRemovedFiles(n),i=r.added,a=r.removed;t.addRemove(i,a)});return function(e,n){return t.apply(this,arguments)}}();var t=e.prototype;return t.printChanges=function(){e.printChanges(this.changes,{onlyValidate:this.onlyValidate})},t.read=function(e){var t=l.join(this._dir,e);return this._filesystem.existsSync(t)?this._filesystem.readFileSync(t,"utf8"):null},t.markUnchanged=function(e){this._addGenerated(e),this.changes.unchanged.push(e)},t.markUpdated=function(e){this._addGenerated(e),this.changes.updated.push(e)},t.writeFile=function(e,t){var n=this;s.run("CodegenDirectory.writeFile",function(){n._addGenerated(e);var r=l.join(n._dir,e);n._filesystem.existsSync(r)?n._filesystem.readFileSync(r,"utf8")===t?n.changes.unchanged.push(e):(n._writeFile(r,t),n.changes.updated.push(e)):(n._writeFile(r,t),n.changes.created.push(e))})},t._writeFile=function(e,t){this.onlyValidate||this._filesystem.writeFileSync(e,t,"utf8")},t.deleteExtraFiles=function(e){var t=this;s.run("CodegenDirectory.deleteExtraFiles",function(){t._filesystem.readdirSync(t._dir).forEach(function(n){if(!(t._files.has(n)||/^\./.test(n)||null!=e&&e.test(n))){if(!t.onlyValidate)try{t._filesystem.unlinkSync(l.join(t._dir,n))}catch(e){throw new Error("CodegenDirectory: Failed to delete `"+n+"` in `"+t._dir+"`.")}t.changes.deleted.push(n)}})})},t.getPath=function(e){return l.join(this._dir,e)},t._addGenerated=function(e){this._files.has(e)&&o(!1),this._files.add(e)},e}();e.exports=u},function(e,t,n){"use strict";var r=n(15),i=n(90),a=5;function s(e){return new Promise(function(t){return setTimeout(t,e)})}var o=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._client=new i.Client,this._attemptLimit=Math.max(Math.min(a,e),0)}e.isAvailable=function(){return new Promise(function(t){var n=new e(a);n.on("error",function(){t(!1),n.end()}),n.hasCapability("relative_root").then(function(e){t(e),n.end()},function(){t(!1),n.end()})})};var t=e.prototype;return t._command=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;rthis._attemptLimit)throw t;yield s(500*Math.pow(2,e)),this._client.end(),this._client=new i.Client}});return function(){return e.apply(this,arguments)}}(),t.hasCapability=function(){var e=r(function*(e){return(yield this.command("list-capabilities")).capabilities.includes(e)});return function(t){return e.apply(this,arguments)}}(),t.watchProject=function(){var e=r(function*(e){var t=yield this.command("watch-project",e);return"warning"in t&&console.error("Warning:",t.warning),{root:t.watch,relativePath:t.relative_path}});return function(t){return e.apply(this,arguments)}}(),t.on=function(e,t){this._client.on(e,t)},t.end=function(){this._client.end()},e}();e.exports=o},function(e,t,n){"use strict";var r=n(2),i=n(45).DEFAULT_HANDLE_KEY,a=n(1),s=a.GraphQLEnumType,o=a.GraphQLInputObjectType,l=a.GraphQLScalarType,u=a.GraphQLList,c=a.GraphQLNonNull,p=" ";function f(e,t,n){var i=e.selections;if(null==i)return"";var a=i.map(function(e){return function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";var a;if("LinkedField"===t.kind)a=d(t,i),a+=f(t,n+p);else if("MatchField"===t.kind)a=d(t,i),a+=f(t,n+p);else if("MatchBranch"===t.kind)a=t.selections.map(function(t){return e(t,n)}).join("\n"+n+p);else if("ScalarField"===t.kind)a=d(t,i);else if("InlineFragment"===t.kind)a="... on "+t.typeCondition.toString(),a+=i,a+=h(t.directives),a+=f(t,n+p);else if("FragmentSpread"===t.kind)a="..."+t.name,a+=i,a+=function(e){var t=m(e);if(!t.length)return"";return" @arguments".concat(t)}(t.args),a+=h(t.directives);else if("Condition"===t.kind){var s=y(t.condition);null==s&&r(!1);var o=t.passingValue?" @include":" @skip";o+="(if: "+s+")",o+=i;var l=t.selections.map(function(t){return e(t,n,o)});a=l.join("\n"+p)}else if("Stream"===t.kind){var u,c,v=' @stream(label: "'.concat(t.label,'"');if(null!==t.if)v+=", if: ".concat(null!==(u=y(t.if))&&void 0!==u?u:"");if(null!==t.initialCount)v+=", initial_count: ".concat(null!==(c=y(t.initialCount))&&void 0!==c?c:"");v+=")",v+=i;var T=t.selections.map(function(t){return e(t,n,v)});a=T.join("\n"+p)}else if("Defer"===t.kind){var g,S=' @defer(label: "'.concat(t.label,'"');if(null!==t.if)S+=", if: ".concat(null!==(g=y(t.if))&&void 0!==g?g:"");S+=")",S+=i;var x=t.selections.map(function(t){return e(t,n,S)});a=x.join("\n"+p)}else r(!1);return a}(e,t,n)});return a.length?" {\n".concat(t+p).concat(a.join("\n"+t+p),"\n").concat(t,"}"):""}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(null!=e.alias?e.alias+": "+e.name:e.name)+m(e.args)+t+h(e.directives)+function(e){if(!e.handles)return"";var t=e.handles.map(function(e){var t=e.key===i?"":', key: "'.concat(e.key,'"'),n=null==e.filters?"":", filters: ".concat(JSON.stringify(Array.from(e.filters).sort()));return'@__clientField(handle: "'.concat(e.name,'"').concat(t).concat(n,")")});return t.length?" "+t.join(" "):""}(e)}function h(e){var t=e.map(function(e){return"@"+e.name+m(e.args)});return t.length?" "+t.join(" "):""}function m(e){var t=[];return e.forEach(function(e){var n=y(e.value,e.type);null!=n&&t.push(e.name+": "+n)}),t.length?"("+t.join(", ")+")":""}function y(e,t){if(t instanceof c&&(t=t.ofType),"Variable"===e.kind)return"$"+e.variableName;if("ObjectValue"===e.kind){t instanceof o||r(!1);var n=t.getFields();return"{"+e.fields.map(function(e){var t=y(e.value,n[e.name].type);return null==t?null:e.name+": "+t}).filter(Boolean).join(", ")+"}"}if("ListValue"===e.kind){t instanceof u||r(!1);var i=t.ofType;return"[".concat(e.items.map(function(e){return y(e,i)}).join(", "),"]")}return null!=e.value?v(e.value,t):null}function v(e,t){if(t instanceof c&&(t=t.ofType),t instanceof s){var n=t.serialize(e);return"string"!=typeof n&&r(!1),n}if(t instanceof l&&null!=e){var i=t.serialize(e);return JSON.stringify(i)}if(Array.isArray(e)){t instanceof u||r(!1);var a=t.ofType;return"["+e.map(function(e){return v(e,a)}).join(", ")+"]"}if("object"==typeof e&&null!=e){var p=[];t instanceof o||r(!1);var f=t.getFields();for(var d in e)e.hasOwnProperty(d)&&p.push(d+": "+v(e[d],f[d].type));return"{"+p.join(", ")+"}"}return t instanceof u&&null!=e?v(e,t.ofType):JSON.stringify(e)}e.exports={print:function(e){switch(e.kind){case"Fragment":return"fragment ".concat(e.name," on ").concat(String(e.type))+function(e){var t;return e.forEach(function(e){if("LocalArgumentDefinition"===e.kind){t=t||[];var n="".concat(e.name,': {type: "').concat(e.type.toString(),'"');null!=e.defaultValue&&(n+=", defaultValue: ".concat(v(e.defaultValue,e.type))),n+="}",t.push(n)}}),t&&t.length?" @argumentDefinitions(\n".concat(p).concat(t.join("\n"+p),"\n)"):""}(e.argumentDefinitions)+h(e.directives)+f(e,"")+"\n";case"Root":return"".concat(e.operation," ").concat(e.name)+function(e){var t=e.map(function(e){var t="$".concat(e.name,": ").concat(e.type.toString());return null!=e.defaultValue&&(t+=" = "+v(e.defaultValue,e.type)),t});return t.length?"(\n".concat(p).concat(t.join("\n"+p),"\n)"):""}(e.argumentDefinitions)+h(e.directives)+f(e,"")+"\n";case"SplitOperation":return"SplitOperation ".concat(e.name," on ").concat(String(e.type))+f(e,"")+"\n";default:r(!1)}},printField:d,printArguments:m,printDirectives:h}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=n(9),o=n(45).DEFAULT_HANDLE_KEY,l=n(6),u=l.getNullableType,c=l.getTypeFromAST,p=l.isExecutableDefinitionAST,f=n(10),d=f.createCombinedError,h=f.createCompilerError,m=f.createUserError,y=f.eachWithErrors,v=n(101).getFieldDefinitionLegacy,T=n(1),g=T.assertCompositeType,S=T.assertInputType,x=T.assertOutputType,b=T.extendSchema,E=T.getNamedType,P=T.GraphQLEnumType,A=T.GraphQLID,w=T.GraphQLInputObjectType,k=T.GraphQLList,N=T.GraphQLNonNull,_=T.GraphQLScalarType,C=T.isLeafType,O=T.isTypeSubTypeOf,D=T.parse,I=T.parseType,L=T.Source;var F=function(){function e(e,t){var n=this;this._definitions=new Map,this._getFieldDefinition=v,this._schema=e;var r=new Set;if(t.forEach(function(e){if(p(e)){var t=V(e);if(n._definitions.has(t))return void r.add(t);n._definitions.set(t,e)}}),r.size)throw new Error("RelayParser: Encountered duplicate defintitions for one or more documents: each document must have a unique name. Duplicated documents:\n"+Array.from(r,function(e){return"- ".concat(e)}).join("\n"))}var t=e.prototype;return t.transform=function(){var e,t=this,n=[],r=new Map;if(null==(e=y(this._definitions,function(e){var n=e[0],i=e[1],a=t._buildArgumentDefinitions(i);r.set(n,{definition:i,variableDefinitions:a})}))&&(e=y(r.values(),function(e){var i=e.definition,a=e.variableDefinitions,s=function(e,t,n,r,i){return new M(e,t,n,r,i).transform()}(t._schema,t._getFieldDefinition,r,i,a);n.push(s)})),null!=e&&0!==e.length)throw d(e,"RelayParser");return n},t._buildArgumentDefinitions=function(e){switch(e.kind){case"OperationDefinition":return this._buildOperationArgumentDefinitions(e);case"FragmentDefinition":return this._buildFragmentArgumentDefinitions(e);default:throw h("Unexpected ast kind '".concat(e.kind,"'."),[e])}},t._buildFragmentArgumentDefinitions=function(e){var t=this,n=(e.directives||[]).filter(function(e){return"argumentDefinitions"===V(e)});if(!n.length)return new Map;if(1!==n.length)throw m("Directive @".concat("argumentDefinitions"," may be defined at most once per ")+"fragment.",null,n);var r=n[0],i=r.arguments;if(null==r||!Array.isArray(i))return new Map;if(!i.length)throw m("Directive @".concat("argumentDefinitions"," requires arguments: remove the ")+"directive to skip defining local variables for this fragment.",null,[r]);var a=new Map;return i.forEach(function(e){var n=V(e),r=a.get(n);if(null!=r)throw m("Duplicate definition for variable '$".concat(n,"'."),null,[r.ast,e]);var i=j(e.value,e);if(Array.isArray(i)||"object"!=typeof i||null===i||"string"!=typeof i.type)throw m("Expected definition for variable '$".concat(n,"' to be an object ")+"with the shape: '{type: string, defaultValue?: mixed, nonNull?: boolean, list?: boolean}'.",null,[e.value]);var s=Object.keys(i).filter(function(e){return"type"!==e&&"defaultValue"!==e&&"nonNull"!==e&&"list"!==e});if(0!==s.length){var o="'"+s.join("', '")+"'";throw m("Expected definition for variable '$".concat(n,"' to be an object ")+"with the following shape: '{type: string, defaultValue?: mixed, nonNull?: boolean, list?: boolean}', got unknown key(s) "+"".concat(o,"."),null,[e])}var l=I(String(i.type)),u=S(c(t._schema,l));a.set(n,{ast:e,defaultValue:null!=i.defaultValue?i.defaultValue:null,defined:!0,name:n,type:u})}),a},t._buildOperationArgumentDefinitions=function(e){var t=this,n=new Map;return(e.variableDefinitions||[]).forEach(function(e){var r=V(e.variable),i=S(c(t._schema,e.type)),a=e.defaultValue?j(e.defaultValue,e):null,s=n.get(r);if(null!=s)throw m("Duplicate definition for variable '$".concat(r,"'."),null,[s.ast,e]);n.set(r,{ast:e,defaultValue:a,defined:!0,name:r,type:i})}),n},e}();var M=function(){function e(e,t,n,r,i){this._definition=r,this._entries=n,this._getFieldDefinition=t,this._schema=e,this._variableDefinitions=i,this._unknownVariables=new Map}var t=e.prototype;return t.transform=function(){var e=this._definition;switch(e.kind){case"OperationDefinition":return this._transformOperation(e);case"FragmentDefinition":return this._transformFragment(e);default:throw h("Unsupported definition type ".concat(e.kind),[e])}},t._getErrorContext=function(){var e="document `".concat(V(this._definition),"`");return this._definition.loc&&this._definition.loc.source&&(e+=" file: `".concat(this._definition.loc.source.name,"`")),e},t._recordAndVerifyVariableReference=function(e,t,n){if(null!=n){var r=this._variableDefinitions.get(t);if(null!=r){var i=r.type;if(null!=r.defaultValue&&(i=new N(u(i))),!O(this._schema,i,n))throw m("Variable '$".concat(t,"' was defined as type '").concat(String(r.type),"' but used in a location expecting the type '").concat(String(n),"'"),null,[r.ast,e])}else{var a=this._unknownVariables.get(t);if(a&&a.type){var s=a.type,o=a.ast;if(!O(this._schema,n,s)&&!O(this._schema,s,n))throw m("Variable '$".concat(t,"' was used in locations expecting the conflicting types '").concat(String(s),"' and '").concat(String(n),"'. Source: ").concat(this._getErrorContext()),null,[o,e]);O(this._schema,n,s)&&this._unknownVariables.set(t,{ast:e,type:n})}else this._unknownVariables.set(t,{ast:e,type:n})}}else this._variableDefinitions.has(t)||this._unknownVariables.has(t)||this._unknownVariables.set(t,{ast:e,type:null})},t._transformFragment=function(e){var t=this._transformDirectives((e.directives||[]).filter(function(e){return"argumentDefinitions"!==V(e)})),n=g(c(this._schema,e.typeCondition)),r=this._transformSelections(e.selectionSet,n),i=(0,a.default)(R(this._variableDefinitions)),s=!0,o=!1,l=void 0;try{for(var u,p=this._unknownVariables[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value,d=f[0],h=f[1];i.push({kind:"RootArgumentDefinition",loc:B(h.ast.loc),metadata:null,name:d,type:h.type})}}catch(e){o=!0,l=e}finally{try{s||null==p.return||p.return()}finally{if(o)throw l}}return{kind:"Fragment",directives:t,loc:B(e.loc),metadata:null,name:V(e),selections:r,type:n,argumentDefinitions:i}},t._transformOperation=function(e){var t,n,r=V(e),i=this._transformDirectives(e.directives||[]);switch(e.operation){case"query":n="query",t=g(this._schema.getQueryType());break;case"mutation":n="mutation",t=g(this._schema.getMutationType());break;case"subscription":n="subscription",t=g(this._schema.getSubscriptionType());break;default:throw e.operation,h("Unknown ast kind '".concat(e.operation,"'. Source: ").concat(this._getErrorContext(),"."),null,[e])}if(!e.selectionSet)throw m("Expected operation to have selections. Source: ".concat(this._getErrorContext()),null,[e]);var a=this._transformSelections(e.selectionSet,t),s=R(this._variableDefinitions);if(0!==this._unknownVariables.size)throw m("Query '".concat(r,"' references undefined variables."),null,Array.from(this._unknownVariables.values(),function(e){return e.ast}));return{kind:"Root",operation:n,loc:B(e.loc),metadata:null,name:r,argumentDefinitions:s,directives:i,selections:a,type:t}},t._transformSelections=function(e,t){var n=this;return e.selections.map(function(e){var r;if("Field"===e.kind)r=n._transformField(e,t);else if("FragmentSpread"===e.kind)r=n._transformFragmentSpread(e,t);else{if("InlineFragment"!==e.kind)throw e.kind,h("Unknown ast kind '".concat(e.kind,"'. Source: ").concat(n._getErrorContext(),"."),[e]);r=n._transformInlineFragment(e,t)}var a=n._splitConditions(r.directives),s=a[0],o=a[1],l=function(e,t){var n=t;return e.forEach(function(e){n=[(0,i.default)({},e,{selections:n})]}),n}(s,[(0,i.default)({},r,{directives:o})]);if(1!==l.length)throw h("Expected exactly one condition node. Source: ".concat(n._getErrorContext()),null,e.directives);return l[0]})},t._transformInlineFragment=function(e,t){var n=g(e.typeCondition?c(this._schema,e.typeCondition):t),r=this._transformDirectives(e.directives||[]),i=this._transformSelections(e.selectionSet,n);return{kind:"InlineFragment",directives:r,loc:B(e.loc),metadata:null,selections:i,typeCondition:n}},t._transformFragmentSpread=function(e,t){var n=this,r=V(e),i=q(e.directives||[],function(e){return"arguments"!==V(e)}),a=i[0],s=i[1];if(s.length>1)throw m("Directive @".concat("arguments"," may be used at most once per a fragment spread. ")+"Source: ".concat(this._getErrorContext()),null,s);var o,l=this._entries.get(r),u=null===l||void 0===l?void 0:l.variableDefinitions;s.length&&(o=(s[0].arguments||[]).map(function(e){var t,i,a=V(e),s=e.value,o=null!=u?u.get(a):null,l=null!==(t=null===o||void 0===o?void 0:o.type)&&void 0!==t?t:null;if("Variable"===s.kind)return{kind:"Argument",loc:B(e.loc),metadata:null,name:a,value:n._transformVariable(s,null),type:null};if(null==l)throw m("Literal @".concat("arguments"," values are only supported when the ")+"argument is defined with @".concat("argumentDefinitions",". Check ")+"the definition of fragment '".concat(r,"'."),null,[e.value,null===(i=n._entries.get(r))||void 0===i?void 0:i.definition].filter(Boolean));var c=n._transformValue(s,l);return{kind:"Argument",loc:B(e.loc),metadata:null,name:a,value:c,type:l}}));var c=this._transformDirectives(a);return{kind:"FragmentSpread",args:o||[],metadata:null,loc:B(e.loc),name:r,directives:c}},t._transformField=function(e,t){var n=V(e),r=this._getFieldDefinition(this._schema,t,n,e);if(null==r)throw m("Unknown field '".concat(n,"' on type '").concat(String(t),"'. Source: ").concat(this._getErrorContext()),null,[e]);var i=e.alias?e.alias.value:null,a=this._transformArguments(e.arguments||[],r.args),s=q(e.directives||[],function(e){return"__clientField"!==V(e)}),o=s[0],l=s[1],u=this._transformDirectives(o),c=x(r.type),p=this._transformHandle(n,a,l);if(C(E(c))){if(e.selectionSet&&e.selectionSet.selections&&e.selectionSet.selections.length)throw m("Expected no selections for scalar field '".concat(n,"'. Source: ").concat(this._getErrorContext()),null,[e]);return{kind:"ScalarField",alias:i,args:a,directives:u,handles:p,loc:B(e.loc),metadata:null,name:n,type:function(e){if(!function(e){var t=E(e);return t instanceof _||t instanceof P}(e))throw m("Expected a scalar field type, got type '".concat(String(e),"'."));return e}(c)}}var f=e.selectionSet?this._transformSelections(e.selectionSet,c):null;if(null==f||0===f.length)throw m("Expected at least one selection for non-scalar field '".concat(n,"' on type '").concat(String(c),"'. Source: ").concat(this._getErrorContext(),"."),null,[e]);return{kind:"LinkedField",alias:i,args:a,directives:u,handles:p,loc:B(e.loc),metadata:null,name:n,selections:f,type:c}},t._transformHandle=function(e,t,n){var r,i=this;return n.forEach(function(n){var a=(n.arguments||[]).find(function(e){return"handle"===V(e)});if(a){var s,l=o,u=null,c=j(a.value,a);if("string"!=typeof c)throw m("Expected a string literal argument for the @".concat("__clientField"," directive. ")+"Source: ".concat(i._getErrorContext()),null,[a.value]);s=c;var p=(n.arguments||[]).find(function(e){return"key"===V(e)});if(p){var f=j(p.value,p);if("string"!=typeof f)throw m("Expected a string literal argument for the @".concat("__clientField"," directive. ")+"Source: ".concat(i._getErrorContext()),null,[p.value]);l=f}var d=(n.arguments||[]).find(function(e){return"filters"===V(e)});if(d){var h=j(d.value,d);if(!Array.isArray(h)||!h.every(function(e){return"string"==typeof e&&t.some(function(t){return t.name===e})}))throw m("Expected an array of argument names on field '".concat(e,"'. ")+"Source: ".concat(i._getErrorContext()),null,[d.value]);u=h}(r=r||[]).push({name:s,key:l,filters:u})}}),r},t._transformDirectives=function(e){var t=this;return e.map(function(e){var n=V(e),r=t._schema.getDirective(n);if(null==r)throw m("Unknown directive '".concat(n,"'. Source: ").concat(t._getErrorContext()),null,[e]);var i=t._transformArguments(e.arguments||[],r.args);return{kind:"Directive",loc:B(e.loc),metadata:null,name:n,args:i}})},t._transformArguments=function(e,t){var n=this;return e.map(function(e){var r=V(e),i=t.find(function(e){return e.name===r});if(null==i)throw m("Unknown argument '".concat(r,"'. Source: ").concat(n._getErrorContext()),null,[e]);var a=n._transformValue(e.value,i.type);return{kind:"Argument",loc:B(e.loc),metadata:null,name:r,value:a,type:i.type}})},t._splitConditions=function(e){var t=this,n=q(e,function(e){return"include"===e.name||"skip"===e.name}),r=n[0],i=n[1];return[r.map(function(e){var n="include"===e.name,r=e.args[0];if(null==r||"if"!==r.name)throw m("Expected an 'if' argument to @".concat(e.name,". Source: ").concat(t._getErrorContext()),[e.loc]);if("Variable"!==r.value.kind&&"Literal"!==r.value.kind)throw m("Expected the 'if' argument to @".concat(e.name," to be a variable or literal. Source: ").concat(t._getErrorContext()),[e.loc]);return{kind:"Condition",condition:r.value,loc:e.loc,metadata:null,passingValue:n,selections:[]}}).sort(function(e,t){return"Variable"===e.condition.kind&&"Variable"===t.condition.kind?e.condition.variableNamet.condition.variableName?1:0:"Variable"===e.condition.kind?1:"Variable"===t.condition.kind?-1:0}),i]},t._transformVariable=function(e,t){var n=V(e);return this._recordAndVerifyVariableReference(e,n,t),{kind:"Variable",loc:B(e.loc),metadata:null,variableName:n,type:t}},t._transformValue=function(e,t){if("Variable"===e.kind)return this._transformVariable(e,t);if("NullValue"===e.kind){if(t instanceof N)throw m("Expected a value matching type '".concat(String(t),"'."),null,[e]);return{kind:"Literal",loc:B(e.loc),metadata:null,value:null}}return this._transformNonNullLiteral(e,t)},t._transformNonNullLiteral=function(e,t){var n=this,r=u(t);if(r instanceof k){if("ListValue"!==e.kind)return this._transformValue(e,r.ofType);var i=S(r.ofType),a=[],s=[],o=!0;return e.values.forEach(function(e){var t=n._transformValue(e,i);"Literal"===t.kind&&a.push(t.value),s.push(t),o=o&&"Literal"===t.kind}),o?{kind:"Literal",loc:B(e.loc),metadata:null,value:a}:{kind:"ListValue",loc:B(e.loc),metadata:null,items:s}}if(r instanceof w){var l=r;if("ObjectValue"!==e.kind)throw m("Expected a value matching type '".concat(String(t),"'."),null,[e]);var c={},p=[],f=!0;return e.fields.forEach(function(e){var r=V(e),i=l.getFields()[r];if(null==i)throw m("Uknown field '".concat(r,"' on type '").concat(String(t),"'."),null,[e]);var a=S(i.type),s=n._transformValue(e.value,a);"Literal"===s.kind&&(c[e.name.value]=s.value),p.push({kind:"ObjectFieldValue",loc:B(e.loc),metadata:null,name:r,value:s}),f=f&&"Literal"===s.kind}),f?{kind:"Literal",loc:B(e.loc),metadata:null,value:c}:{kind:"ObjectValue",loc:B(e.loc),metadata:null,fields:p}}if(r===A){if("IntValue"===e.kind)return{kind:"Literal",loc:B(e.loc),metadata:null,value:parseInt(e.value,10)};if("StringValue"===e.kind)return{kind:"Literal",loc:B(e.loc),metadata:null,value:e.value};throw m("Invalid value, expected a value matching type '".concat(String(t),"'."),null,[e])}if(r instanceof _||r instanceof P){var d=r.parseLiteral(e);if(null==d)throw m("Expected a value matching type '".concat(String(t),"'."),null,[e]);return{kind:"Literal",loc:B(e.loc),metadata:null,value:d}}throw h("Unsupported type '".concat(String(t),"' for input value, expected a GraphQLList, ")+"GraphQLInputObjectType, GraphQLEnumType, or GraphQLScalarType.",null,[e])},e}();function j(e,t){switch(e.kind){case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"StringValue":case"BooleanValue":case"EnumValue":return e.value;case"ListValue":return e.values.map(function(e){return j(e,t)});case"NullValue":return null;case"ObjectValue":var n={};return e.fields.forEach(function(e){var r=V(e),i=j(e.value,t);n[r]=i}),n;case"Variable":throw m("Unexpected variable where a literal (static) value is required.",null,[e,t]);default:throw e.kind,h("Unknown ast kind '".concat(e.kind,"'."),[e])}}function R(e){return Array.from(e.values(),function(e){var t=e.ast,n=e.name,r=e.type,i=e.defaultValue;return{kind:"LocalArgumentDefinition",loc:B(t.loc),metadata:null,name:n,type:r,defaultValue:i}})}function B(e){return null==e?{kind:"Unknown"}:{kind:"Source",start:e.start,end:e.end,source:e.source}}function V(e){var t,n=null===(t=e.name)||void 0===t?void 0:t.value;if("string"!=typeof n)throw h("Expected ast node to have a 'name'.",null,[e]);return n}function q(e,t){for(var n=[],r=[],i=0;i{this.word(e.name)})},t.SpreadElement=t.RestElement=function(e){this.token("..."),this.print(e.argument,e)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space());this.token("}")},t.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._methodHead(e),this.space(),this.print(e.body,e)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(r().isAssignmentPattern(e.value)&&r().isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&r().isIdentifier(e.key)&&r().isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,n=t.length;this.token("["),this.printInnerComments(e);for(let r=0;r0&&this.space(),this.print(i,e),r0;){var p=c.pop(),m=p.name&&p.name.value;if(m)if(l.has(m)){if(l.get(m)!==p)throw new Error("Duplicate definition of '".concat(m,"'."))}else l.set(m,p),f(p,{FragmentSpread:function(e){var t=u.get(e.name.value);t&&c.push(t)}})}var y=[];return l.forEach(function(e){return y.push(e)}),d(e,y,r,a)})},extendASTSchema:function(e,t){return i.run("ASTConvert.extendASTSchema",function(){var n=[];if(t.forEach(function(e){e.definitions.forEach(function(e){o(e)&&n.push(e)})}),0===n.length)return e;var r=n.map(p).join("\n");return y(e,r,function(){return u(e,{kind:"Document",definitions:n},{assumeValid:!0})})})},transformASTSchema:function(e,t){return i.run("ASTConvert.transformASTSchema",function(){if(0===t.length)return e;var n=t.join("\n");return y(e,n,function(){return u(e,c(n))})})}}},function(e,t,n){"use strict";var r=n(9),i=n(29),a=n(1),s=a.formatError,o=a.FragmentsOnCompositeTypesRule,l=a.KnownArgumentNamesRule,u=a.KnownTypeNamesRule,c=a.LoneAnonymousOperationRule,p=a.NoUnusedVariablesRule,f=a.PossibleFragmentSpreadsRule,d=a.UniqueArgumentNamesRule,h=a.UniqueFragmentNamesRule,m=a.UniqueInputFieldNamesRule,y=a.UniqueOperationNamesRule,v=a.UniqueVariableNamesRule,T=a.validate,g=a.ValuesOfCorrectTypeRule,S=a.VariablesAreInputTypesRule,x=a.VariablesInAllowedPositionRule;e.exports={GLOBAL_RULES:[l,p,d,h,m,y,v],LOCAL_RULES:[o,u,c,f,g,S,x],validate:r.instrument(function(e,t,n){var r=T(t,e,n);if(r&&r.length>0){var a=r.map(s),o=r.map(function(e){return e.toString()}),l=new Error(i.format("You supplied a GraphQL document with validation errors:\n%s",o.join("\n")));throw l.validationErrors=a,l}},"GraphQLValidator.validate")}},function(e,t,n){"use strict";e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Got unexpected null or undefined";if(null!=e)return e;var n=new Error(t);throw n.framesToPop=1,n}},function(e,t,n){"use strict";var r=n(15),i=n(31),a=n(9),s=n(25),o=n(21),l=n(14),u="graphql-codegen",c=3;function p(){return(p=r(function*(e,t,n){return yield a.waitFor("Watchman:query",r(function*(){var r=new i(c),a=yield Promise.all([r.watchProject(e),d(r)]),s=a[0],o=a[1],l=yield r.command("query",s.root,{expression:t,fields:o,relative_root:s.relativePath});return r.end(),b(new Set,e,n,l.files)}))})).apply(this,arguments)}function f(){return(f=r(function*(e,t){return yield a.waitFor("Watchman:query",r(function*(){var n=new i,r=yield n.watchProject(e),a=yield n.command("query",r.root,{expression:t,fields:["name"],relative_root:r.relativePath});return n.end(),a.files}))})).apply(this,arguments)}function d(e){return h.apply(this,arguments)}function h(){return(h=r(function*(e){var t=["name","exists"];return(yield e.hasCapability("field-content.sha1hex"))&&t.push("content.sha1hex"),t})).apply(this,arguments)}function m(){return(m=r(function*(e,t,n){var r=t.map(function(e){return{name:e,exists:!0,"content.sha1hex":null}});return b(new Set,e,n,r)})).apply(this,arguments)}function y(e,t,n){return v.apply(this,arguments)}function v(){return(v=r(function*(e,t,n){return yield a.waitFor("Watchman:subscribe",r(function*(){var r=new i,a=yield r.watchProject(e);yield function(e,t,n,r,i){return T.apply(this,arguments)}(r,a.root,a.relativePath,t,n)}))})).apply(this,arguments)}function T(){return(T=r(function*(e,t,n,r,i){e.on("subscription",function(e){e.subscription===u&&i(e)});var a=yield d(e);yield e.command("subscribe",t,u,{expression:r,fields:a,relative_root:n})})).apply(this,arguments)}function g(e,t,n,r){return S.apply(this,arguments)}function S(){return(S=r(function*(e,t,n,r){var i=new Set;yield y(e,t,function(t){t.files&&(i=b(i,e,n,t.files),r(i))})})).apply(this,arguments)}function x(){return(x=r(function*(e,t,n,i){var a=!1,s=!1,o=null;g(e,t,n,function(){var e=r(function*(e){if(s=!0,o=e,!a){for(a=!0;s;)s=!1,yield i(o);a=!1}});return function(t){return e.apply(this,arguments)}}())})).apply(this,arguments)}function b(e,t,n,r){var i=new Map;return e.forEach(function(e){e.exists&&i.set(e.relPath,e)}),r.forEach(function(e){var r=e.name,a=e.exists,u=e["content.sha1hex"],c=!a;if(!c){var p={exists:!0,relPath:r,hash:u||function(e){var t=o.readFileSync(e);return s.createHash("sha1").update(t).digest("hex")}(l.join(t,r))};n(p)?i.set(r,p):c=!0}c&&i.set(r,{exists:!1,relPath:r})}),new Set(i.values())}e.exports={queryDirectories:function(e,t){return f.apply(this,arguments)},queryFiles:function(e,t,n){return p.apply(this,arguments)},queryFilepaths:function(e,t,n){return m.apply(this,arguments)},watch:y,watchFiles:g,watchCompile:function(e,t,n,r){return x.apply(this,arguments)}}},function(e,t,n){"use strict";e.exports={DEFAULT_HANDLE_KEY:""}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var r=n(98),i=n(99),a=n(10).createCompilerError;e.exports={generate:function(e){switch(e.kind){case"Fragment":return i.generate(e);case"Request":return{kind:"Request",fragment:i.generate(e.fragment),operation:r.generate(e.root),params:{operationKind:e.root.operation,name:e.name,id:e.id,text:e.text,metadata:e.metadata}};case"SplitOperation":return r.generate(e)}throw a("RelayCodeGenerator: Unknown AST kind '".concat(e.kind,"'."),[e.loc])}}},function(e,t,n){"use strict";e.exports={moduleDependency:function(e){return"@@MODULE_START@@".concat(e,"@@MODULE_END@@")},postProcess:function(e,t){return e.replace(/"@@MODULE_START@@(.*?)@@MODULE_END@@"/g,function(e,n){return t(n)})}}},function(e,t,n){"use strict";var r=n(0)(n(7)),i=n(42),a=i.GLOBAL_RULES,s=i.LOCAL_RULES,o=i.validate;var l=a,u=(0,r.default)(s).concat([function(e){return{Field:function(e){if(e.alias&&"id"===e.alias.value&&"id"!==e.name.value)throw new Error("RelayValidator: Relay does not allow aliasing fields to `id`. This name is reserved for the globally unique `id` field on `Node`.")}}}]);e.exports={GLOBAL_RULES:l,LOCAL_RULES:u,validate:o}},function(e,t,n){"use strict";var r=n(0)(n(7)),i=n(32),a=n(9),s=n(47),o=n(51);function l(e,t){var n=e.getRoot(t);return o(n,e).documents().map(i.print).join("\n")}e.exports=function(e,t,n){return a.run("GraphQLCompiler.compile",function(){var i=e.applyTransforms((0,r.default)(t.commonTransforms).concat((0,r.default)(t.fragmentTransforms)),n),a=e.applyTransforms((0,r.default)(t.commonTransforms).concat((0,r.default)(t.queryTransforms),(0,r.default)(t.printTransforms)),n),o=e.applyTransforms((0,r.default)(t.commonTransforms).concat((0,r.default)(t.queryTransforms),(0,r.default)(t.codegenTransforms)),n),u=[],c=!0,p=!1,f=void 0;try{for(var d,h=o.documents()[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var m=d.value;if("Root"===m.kind){var y=i.getRoot(m.name);u.push(s.generate({kind:"Request",fragment:{kind:"Fragment",argumentDefinitions:y.argumentDefinitions,directives:y.directives,loc:{kind:"Derived",source:m.loc},metadata:null,name:y.name,selections:y.selections,type:y.type},id:null,loc:m.loc,metadata:m.metadata||{},name:y.name,root:m,text:l(a,y.name)}))}else u.push(s.generate(m))}}catch(e){p=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(p)throw f}}var v=!0,T=!1,g=void 0;try{for(var S,x=i.documents()[Symbol.iterator]();!(v=(S=x.next()).done);v=!0){var b=S.value;"Fragment"===b.kind&&u.push(s.generate(b))}}catch(e){T=!0,g=e}finally{try{v||null==x.return||x.return()}finally{if(T)throw g}}return u})}},function(e,t,n){"use strict";var r=n(3),i=n(17).visit;e.exports=function(e,t){for(var n=[e],a=new r(t.serverSchema,t.clientSchema).add(e),s={FragmentSpread:function(e){!function(e){var r=e.name;if(!a.get(r)){var i=t.getFragment(r);a=a.add(i),n.push(i)}}(e)}};n.length;)i(n.pop(),s);return a}},function(e,t,n){"use strict";var r=n(0),i=n(15),a=r(n(4)),s=r(n(102)),o=n(48),l=n(9),u=n(25),c=n(103),p=n(104),f=n(2),d=(n(26),n(19).RelayConcreteNode);function h(e){return"require('".concat(e,"')")}function m(){return(m=i(function*(e,t,n,r,i,m,y,v){var T,g=arguments.length>8&&void 0!==arguments[8]?arguments[8]:h,S=t,x=i,b=("Request"===S.kind?S.params.name:S.name)+".graphql",E=(null!=m&&m.length>0?b+"."+m:b)+"."+v,P=function(e){switch(e.kind){case d.FRAGMENT:return"ReaderFragment";case d.REQUEST:return"ConcreteRequest";case d.SPLIT_OPERATION:return"NormalizationSplitOperation";default:f(!1)}}(S),A={};S.kind===d.REQUEST&&(T=S.params.text);var w=null;if(S.kind===d.REQUEST){var k=l.run("RelayFileWriter:compareHash",function(){var t=e.read(E),n=u.createHash("md5");return n.update("cache-breaker-9"),n.update(JSON.stringify(S)),n.update(y),r&&n.update(r),x&&n.update("persisted"),w=n.digest("hex"),function(e){if(null==e||0===e.length)return null;if(/<<<<<|>>>>>/.test(e))return null;var t=e.match(/@relayHash (\w{32})\b/m);return t&&t[1]}(t)});if(w===k)return e.markUnchanged(E),null;if(e.onlyValidate)return e.markUpdated(E),null;if(x)switch(S.kind){case d.REQUEST:var N=S.params,_=(N.id,N.text),C=(0,s.default)(N,["id","text"]);null==_&&f(!1),A.params={text:_},S=(0,a.default)({},S,{params:(0,a.default)({id:yield x(_,y),text:null},C)});break;case d.FRAGMENT:break;default:S.kind}}var O=p("(node/*: any*/)",A),D=n({moduleName:b,documentType:P,kind:S.kind,docText:T,typeText:r,hash:w?"@relayHash ".concat(w):null,concreteText:o.postProcess(c(S),g),devOnlyAssignments:O,sourceHash:y});return e.writeFile(E,D),S})).apply(this,arguments)}e.exports=function(e,t,n,r,i,a,s,o){return m.apply(this,arguments)}},function(e,t,n){"use strict";e.exports={getReaderSourceDefinitionName:function(e){var t,n,r="Request"===e.kind?[e.params.name,null===(t=e.params.metadata)||void 0===t?void 0:t.derivedFrom]:"SplitOperation"===e.kind?[e.name,null===(n=e.metadata)||void 0===n?void 0:n.derivedFrom]:[e.name,null],i=r[1];return"string"==typeof i?i:r[0]},getSourceDefinitionName:function(e){var t,n="Request"===e.kind||"Root"===e.kind||"SplitOperation"===e.kind?null===(t=e.metadata)||void 0===t?void 0:t.derivedFrom:null;return"string"==typeof n?n:e.name}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.needsWhitespace=p,t.needsWhitespaceBefore=function(e,t){return p(e,t,"before")},t.needsWhitespaceAfter=function(e,t){return p(e,t,"after")},t.needsParens=function(e,t,n){if(!t)return!1;if(i().isNewExpression(t)&&t.callee===e&&function e(t){if(i().isCallExpression(t))return!0;return!!i().isMemberExpression(t)&&(e(t.object)||!t.computed&&e(t.property))}(e))return!0;return c(o,e,t,n)};var r=a(n(114));function i(){const e=a(n(11));return i=function(){return e},e}function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function s(e){const t={};function n(e,n){const r=t[e];t[e]=r?function(e,t,i){const a=r(e,t,i);return null==a?n(e,t,i):a}:n}for(const t of Object.keys(e)){const r=i().FLIPPED_ALIAS_KEYS[t];if(r)for(const i of r)n(i,e[t]);else n(t,e[t])}return t}const o=s(a(n(163))),l=s(r.nodes),u=s(r.list);function c(e,t,n,r){const i=e[t.type];return i?i(t,n,r):null}function p(e,t,n){if(!e)return 0;i().isExpressionStatement(e)&&(e=e.expression);let r=c(l,e,t);if(!r){const i=c(u,e,t);if(i)for(let t=0;t(0,r.default)(e,n,t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(56))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!(0,r.isMemberExpression)(e))return!1;const i=Array.isArray(t)?t:t.split("."),a=[];let s;for(s=e;(0,r.isMemberExpression)(s);s=s.object)a.push(s.property);if(a.push(s),a.lengthi.length)return!1;for(let e=0,t=a.length-1;e=0)){if((0,r.isAnyTypeAnnotation)(l))return[l];if((0,r.isFlowBaseAnnotation)(l))i[l.type]=l;else if((0,r.isUnionTypeAnnotation)(l))a.indexOf(l.types)<0&&(t=t.concat(l.types),a.push(l.types));else if((0,r.isGenericTypeAnnotation)(l)){const t=l.id.name;if(n[t]){let r=n[t];r.typeParameters?l.typeParameters&&(r.typeParameters.params=e(r.typeParameters.params.concat(l.typeParameters.params))):r=l.typeParameters}else n[t]=l}else s.push(l)}}for(const e in i)s.push(i[e]);for(const e in n)s.push(n[e]);return s};var r=n(8)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!1)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(23))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!n||!e)return e;const r=`${t}Comments`;e[r]?e[r]="leading"===t?n.concat(e[r]):e[r].concat(n):e[r]=n;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)("innerComments",e,t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(39))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)("leadingComments",e,t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(39))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(e,t),(0,i.default)(e,t),(0,a.default)(e,t),e};var r=s(n(65)),i=s(n(63)),a=s(n(62));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)("trailingComments",e,t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(39))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.isBlockStatement)(e))return e;let n=[];(0,r.isEmptyStatement)(e)?n=[]:((0,r.isStatement)(e)||(e=(0,r.isFunction)(t)?(0,i.returnStatement)(e):(0,i.expressionStatement)(e)),n=[e]);return(0,i.blockStatement)(n)};var r=n(8),i=n(12)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e=(e=(e=(e+="").replace(/[^a-zA-Z0-9$_]/g,"-")).replace(/^[-0-9]+/,"")).replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),(0,r.default)(e)||(e=`_${e}`);return e||"_"};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(22))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(e,i.default,t),e};var r=a(n(69)),i=a(n(70));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,i){if(!t)return;const a=r.VISITOR_KEYS[t.type];if(!a)return;i=i||{};n(t,i);for(const r of a){const a=t[r];if(Array.isArray(a))for(const t of a)e(t,n,i);else e(a,n,i)}};var r=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){const n=t.preserveComments?r:i;for(const t of n)null!=e[t]&&(e[t]=void 0);for(const t in e)"_"===t[0]&&null!=e[t]&&(e[t]=void 0);const a=Object.getOwnPropertySymbols(e);for(const t of a)e[t]=null};const r=["tokens","start","end","loc","raw","rawValue"],i=n(18).COMMENT_KEYS.concat(["comments"]).concat(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isVariableDeclaration)(e)&&("var"!==e.kind||e[i.BLOCK_SCOPED_SYMBOL])};var r=n(8),i=n(18)},function(e,t,n){"use strict";function r(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(11));return r=function(){return e},e}function i(e){if(e.declaration){const t=e.declaration;this.print(t,e),r().isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());const t=e.specifiers.slice(0);let n=!1;for(;;){const i=t[0];if(!r().isExportDefaultSpecifier(i)&&!r().isExportNamespaceSpecifier(i))break;n=!0,this.print(t.shift(),e),t.length&&(this.token(","),this.space())}(t.length||!t.length&&!n)&&(this.token("{"),t.length&&(this.space(),this.printList(t,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}Object.defineProperty(t,"__esModule",{value:!0}),t.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))},t.ImportDefaultSpecifier=function(e){this.print(e.local,e)},t.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},t.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))},t.ExportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)},t.ExportAllDeclaration=function(e){this.word("export"),this.space(),"type"===e.exportKind&&(this.word("type"),this.space());this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()},t.ExportNamedDeclaration=function(e){this.format.decoratorsBeforeExport&&r().isClassDeclaration(e.declaration)&&this.printJoin(e.declaration.decorators,e);this.word("export"),this.space(),i.apply(this,arguments)},t.ExportDefaultDeclaration=function(e){this.format.decoratorsBeforeExport&&r().isClassDeclaration(e.declaration)&&this.printJoin(e.declaration.decorators,e);this.word("export"),this.space(),this.word("default"),this.space(),i.apply(this,arguments)},t.ImportDeclaration=function(e){this.word("import"),this.space(),("type"===e.importKind||"typeof"===e.importKind)&&(this.word(e.importKind),this.space());const t=e.specifiers.slice(0);if(t&&t.length){for(;;){const n=t[0];if(!r().isImportDefaultSpecifier(n)&&!r().isImportNamespaceSpecifier(n))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()},t.ImportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5)),a=n(6),s=n(175),o=n(74),l=n(10),u=l.createUserError,c=l.createCompilerError,p=a.getRawType,f=a.isAbstractType;function d(e,t){var n=t.parentType,i="Condition"===e.kind||"Defer"===e.kind||"Stream"===e.kind?n:"InlineFragment"===e.kind?e.typeCondition:e.type;if(null==i)throw c("FlattenTransform: Expected a parent type.",[e.loc]);var a=new Map,s=h(a,e,t,i)?(0,r.default)({},e,{selections:Array.from(a.values())}):e;t.parentType=i;var o=this.traverse(s,t);return t.parentType=n,o}function h(e,t,n,i){var a=!1;return t.selections.forEach(function(t){if("InlineFragment"===t.kind&&function(e,t,n){return t.flattenInlineFragments||e.typeCondition.name===p(n).name||t.flattenAbstractTypes&&f(e.typeCondition)}(t,n,i))return a=!0,void h(e,t,n,i);var s=o(t),l=e.get(s);if(l)if(a=!0,"InlineFragment"===l.kind){if("InlineFragment"!==t.kind)throw c("FlattenTransform: Expected an InlineFragment, got a '".concat(t.kind,"'"),[t.loc]);e.set(s,(0,r.default)({},l,{selections:m(l,t,n,t.typeCondition)}))}else if("Condition"===l.kind){if("Condition"!==t.kind)throw c("FlattenTransform: Expected a Condition, got a '".concat(t.kind,"'"),[t.loc]);e.set(s,(0,r.default)({},l,{selections:m(l,t,n,i)}))}else if("FragmentSpread"===l.kind);else if("MatchField"===l.kind||"MatchBranch"===l.kind);else if("Defer"===l.kind){if("Defer"!==t.kind)throw c("FlattenTransform: Expected a Defer, got a '".concat(t.kind,"'"),[t.loc]);e.set(s,(0,r.default)({kind:"Defer"},l,{selections:m(l,t,n,i)}))}else if("Stream"===l.kind){if("Stream"!==t.kind)throw c("FlattenTransform: Expected a Stream, got a '".concat(t.kind,"'"),[t.loc]);e.set(s,(0,r.default)({kind:"Stream"},l,{selections:m(l,t,n,i)}))}else if("LinkedField"===l.kind){if("LinkedField"!==t.kind)throw c("FlattenTransform: Expected a LinkedField, got a '".concat(t.kind,"'"),[t.loc]);y(t,l),e.set(s,(0,r.default)({kind:"LinkedField"},l,{handles:v(l,t),selections:m(l,t,n,t.type)}))}else{if("ScalarField"!==l.kind)throw l.kind,c("FlattenTransform: Unknown kind '".concat(l.kind,"'"));if("ScalarField"!==t.kind)throw c("FlattenTransform: Expected a ScalarField, got a '".concat(t.kind,"'"),[t.loc]);y(t,l),e.set(s,(0,r.default)({kind:"ScalarField"},l,{handles:v(t,l)}))}else e.set(s,t)}),a}function m(e,t,n,r){var i=new Map;return h(i,e,n,r),h(i,t,n,r),Array.from(i.values())}function y(e,t){var n;if(!function(e,t){return e.kind===t.kind&&e.name===t.name&&e.alias===t.alias&&function(e,t){return e.length===t.length&&e.every(function(e,n){var r=t[n];return e.name===r.name&&e.value.kind===r.value.kind&&e.value.variableName===r.value.variableName&&s(e.value.value,r.value.value)})}(e.args,t.args)}(e,t))throw u("Expected all fields on the same parent with "+"the name or alias '".concat(null!==(n=e.alias)&&void 0!==n?n:e.name,"' to have the same name and arguments."),[e.loc,t.loc])}function v(e,t){if(!e.handles)return t.handles;if(!t.handles)return e.handles;var n=new Map;return e.handles.concat(t.handles).forEach(function(e){return n.set(e.name+e.key,e)}),Array.from(n.values())}e.exports={transformWithOptions:function(e){return function(t){return function(e,t){var n={flattenAbstractTypes:!(!t||!t.flattenAbstractTypes),flattenInlineFragments:!(!t||!t.flattenInlineFragments),parentType:null};return i.transform(e,{Root:d,Fragment:d,Condition:d,InlineFragment:d,LinkedField:d,MatchField:d},function(){return n})}(t,e)}}}},function(e,t,n){"use strict";var r=n(2),i=n(32),a=i.printArguments,s=i.printDirectives;e.exports=function(e){if("LinkedField"===e.kind||"ScalarField"===e.kind)return 0===e.directives.length?e.alias||e.name:(e.alias||e.name)+s(e.directives);if("FragmentSpread"===e.kind)return 0===e.args.length?"..."+e.name:"..."+e.name+a(e.args);if("MatchField"===e.kind){var t,n=null===(t=e.metadata)||void 0===t?void 0:t.storageKey;return"string"!=typeof n&&r(!1),"M:"+n}return"MatchBranch"===e.kind?"B:"+e.name+"$"+e.module:"Defer"===e.kind?"D:"+e.label:"Stream"===e.kind?"S:"+e.label:"InlineFragment"===e.kind?"I:"+e.typeCondition.name:"Condition"===e.kind?"C:"+("Variable"===e.condition.kind?"$"+e.condition.variableName:String(e.condition.value))+String(e.passingValue):void r(!1)}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5)),a=n(2),s=n(1),o=s.isTypeSubTypeOf;s.GraphQLSchema;function l(e,t){var n=this.traverse(e,t);if(0===t.reachableArguments.length)return n;var i=function(e,t,n){var r=new Map;t.argumentDefinitions.forEach(function(e){r.set(e.name,e)});var i=[];if(n.forEach(function(t){var n=t.argDef,a=t.source,s=r.get(n.name);if(s){var l=function(e,t,n){return t.kind!==n.kind||t.name!==n.name||t.defaultValue!==n.defaultValue?null:o(e,n.type,t.type)?n:o(e,t.type,n.type)?t:null}(e,s,n);null===l?i.push("Variable `$".concat(n.name,"` in `").concat(a,"`")):r.set(l.name,l)}else r.set(n.name,n)}),i.length)throw new Error("RelayMaskTransform: Cannot unmask one or more fragments in "+"`".concat(t.name,"`, the following variables are referenced more ")+"than once with incompatible kinds/types:\n"+i.map(function(e){return"* ".concat(e)}).join("\n"));return Array.from(r.values())}(this.getContext().serverSchema,e,t.reachableArguments);return(0,r.default)({},n,{argumentDefinitions:i})}function u(e,t){if(!function(e){return Boolean(e.metadata&&!1===e.metadata.mask)}(e))return e;0!==e.args.length&&a(!1);var n=this.getContext().getFragment(e.name),r={kind:"InlineFragment",directives:e.directives,loc:{kind:"Derived",source:e.loc},metadata:e.metadata,selections:n.selections,typeCondition:n.type};n.argumentDefinitions.find(function(e){return"LocalArgumentDefinition"===e.kind})&&a(!1);var i=!0,s=!1,o=void 0;try{for(var l,u=n.argumentDefinitions[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;t.reachableArguments.push({argDef:c,source:e.name})}}catch(e){s=!0,o=e}finally{try{i||null==u.return||u.return()}finally{if(s)throw o}}return this.traverse(r,t)}e.exports={transform:function(e){return i.transform(e,{FragmentSpread:u,Fragment:l},function(){return{reachableArguments:[]}})}}},function(e,t,n){"use strict";n(3);var r=n(5),i=n(24),a=n(77),s=n(6).getRawType,o=n(10).createUserError,l=n(1),u=l.GraphQLObjectType,c=l.GraphQLScalarType,p=l.GraphQLInterfaceType,f=l.GraphQLUnionType,d=l.GraphQLList,h=l.GraphQLString,m=l.getNullableType,y="supported",v="JSDependency",T="module",g="js";function S(e,t){return this.traverse(e,e.typeCondition)}function x(e,t){var n,r=this.traverse(e,e.type);if(null==r.directives.find(function(e){return"match"===e.name}))return r;var l=s(t);if(!(l instanceof p||l instanceof u))throw o("@match may only be used on fields whose parent type is an interface "+"or object, field '".concat(e.name,"' has invalid type '").concat(String(t),"'"),[e.loc]);var S=this.getContext(),x=S.serverSchema.getType(v);if(null==x||!(x instanceof c))throw new Error("RelayMatchTransform: Expected schema to define a scalar '".concat(v,"' type."));var b=l.getFields()[r.name].args.find(function(e){e.name;return y}),E=null!=b?m(b.type):null,P=null!=E&&E instanceof d?E.ofType:null;if(null==b||null==E||null==P||m(P)!==h)throw new Error("RelayMatchTransform: @match used on an incompatible "+"field '".concat(r.name,"'. @match may only ")+"be used with fields that can accept '".concat(y,"' ")+"argument with type '[String!]!'.");var A=r.type;if(!(A instanceof f))throw new Error("RelayMatchTransform: You are trying to apply @match "+"directive to a field '".concat(r.name,"' that has unsupported ")+"output type. '".concat(r.name,"' output type should be union ")+"type of object types.");var w=new Map,k={},N=[];r.selections.forEach(function(e){var t,n;if("FragmentSpread"!==e.kind)throw new Error("RelayMatchTransform: all selections in a @match field should be "+"fragment spreads, got '".concat(e.kind,"'."));var r=S.getFragment(e.name);if(!(r.type instanceof u))throw new Error("RelayMatchTransform: all fragment spreads in a @match field should be for fragments on an object type. Union or interface type "+"'".concat(r.type.name,"' for '...").concat(r.name,"' is not supported."));var s=r.type;if(w.has(s))throw new Error('RelayMatchTransform: Each "match" type has to appear at-most once. '+"Type '".concat(s.name,"' was matched in both ")+"'...".concat(e.name,"' and '...").concat(w.get(s)||"(unknown)","'."));if(w.set(s,e.name),!A.getTypes().includes(s))throw new Error("RelayMatchTransform: Unsupported type '".concat(s.toString(),"' in ")+"the list of matches in the @match. Type "+'"'.concat(s.toString(),'" does not belong to the union ')+'"'.concat(A.toString(),'".'));var o=s.getFields()[g],l=o?o.args.find(function(e){return e.name===T}):null;if(null==o||null==l||m(l.type)!==h||o.type.name!==x.name)throw new Error("RelayMatchTransform: expcted type '".concat(s.name,"' to have a '").concat(g,"(").concat(T,": String!): ").concat(v,"' field ."));var c=e.directives.find(function(e){return"module"===e.name});if(null==c||1!==e.directives.length)throw new Error("RelayMatchTransform: Fragment spreads in a @match field must have a '@module' directive and no other directives, got invalid directives "+"on fragment spread '...".concat(e.name,"'"));var p=i(c.args);k[String(s)]={component:p.name,fragment:e.name};var f=a(e.name)+".graphql",d={alias:"__match_component",args:[{kind:"Argument",name:T,type:l.type,value:{kind:"Literal",loc:null!==(t=null===(n=c.args[0])||void 0===n?void 0:n.loc)&&void 0!==t?t:c.loc,metadata:{},value:p.name},loc:c.loc,metadata:{}}],directives:[],handles:null,kind:"ScalarField",loc:c.loc,metadata:{storageKey:"__match_component"},name:g,type:x},y={alias:"__match_fragment",args:[{kind:"Argument",name:T,type:l.type,value:{kind:"Literal",loc:e.loc,metadata:{},value:f},loc:e.loc,metadata:{}}],directives:[],handles:null,kind:"ScalarField",loc:e.loc,metadata:{storageKey:"__match_fragment"},name:g,type:x};N.push({kind:"MatchBranch",loc:e.loc,module:p.name,name:e.name,selections:[{args:[],directives:[],kind:"FragmentSpread",loc:e.loc,metadata:{},name:e.name},{directives:[],kind:"InlineFragment",loc:e.loc,metadata:{},selections:[d,y],typeCondition:s}],type:s})});var _=[];Object.keys(k).sort().forEach(function(e){var t=k[e],n=t.component,r=t.fragment;_.push("".concat(r,":").concat(n))});var C=(null!==(n=r.alias)&&void 0!==n?n:r.name)+"(".concat(_.join(","),")");return{kind:"MatchField",alias:r.alias,args:[{kind:"Argument",name:y,type:b.type,value:{kind:"Literal",loc:e.loc,metadata:{},value:Array.from(w.keys()).map(function(e){return e.name})},loc:e.loc,metadata:{}}],directives:[],handles:null,loc:e.loc,metadata:{storageKey:C},name:r.name,type:A,selections:N}}e.exports={SCHEMA_EXTENSION:"\n directive @match on FIELD\n\n directive @module(\n name: String!\n ) on FRAGMENT_SPREAD\n",transform:function(e){return r.transform(e,{LinkedField:x,InlineFragment:S},function(e){return e.type})}}},function(e,t,n){"use strict";e.exports=function(e){return"".concat(e,"$normalization")}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(17)),o=n(24),l=n(79),u=n(80),c=n(26),p=n(10),f=p.createCombinedError,d=p.createCompilerError,h=p.createUserError,m=p.eachWithErrors,y=n(1),v=y.getNullableType,T=y.GraphQLID,g=y.GraphQLInterfaceType,S=y.GraphQLList,x=y.GraphQLNonNull,b=y.GraphQLObjectType,E=(y.GraphQLSchema,"Viewer"),P="viewer",A="Node",w="node";function k(e){return e.map(function(e){return"LocalArgumentDefinition"===e.kind?e:{kind:"LocalArgumentDefinition",name:e.name,type:e.type,defaultValue:null,loc:e.loc,metadata:null}})}function N(e){var t=[],n=!0,r=!1,i=void 0;try{for(var a,s=e.argumentDefinitions[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;"LocalArgumentDefinition"===o.kind&&t.push({kind:"Argument",loc:{kind:"Derived",source:o.loc},metadata:null,name:o.name,type:o.type,value:{kind:"Variable",loc:{kind:"Derived",source:o.loc},metadata:null,variableName:o.name,type:o.type}})}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return{args:t,directives:[],kind:"FragmentSpread",loc:{kind:"Derived",source:e.loc},metadata:null,name:e.name}}function _(e,t){var n;return null!==(n=e.args.find(function(e){return e.name===t}))&&void 0!==n?n:null}e.exports={SCHEMA_EXTENSION:"\n directive @refetchable(\n queryName: String!\n ) on FRAGMENT_DEFINITION\n",transform:function(e){var t=e.serverSchema,n=t.getQueryType();if(null==n)throw h("Expected the schema to define a query type.");var r=function(e){var t=new Map,n=m(e.documents(),function(e){if("Fragment"===e.kind){var n=function(e){var t=e.directives.find(function(e){return"refetchable"===e.name});if(null==t)return null;var n=o(t.args).queryName;if("string"!=typeof n){var r,i=t.args.find(function(e){return"queryName"===e.name});throw d("Expected the 'name' argument of @refetchable to be a string, got '".concat(String(n),"'."),[null!==(r=null===i||void 0===i?void 0:i.loc)&&void 0!==r?r:t.loc])}return n}(e);if(null!==n){var r=t.get(n);if(null!=r)throw h("Duplicate definition for @refetchable operation '".concat(n,"' from fragments '").concat(e.name,"' and '").concat(r.name,"'"),[e.loc,r.loc]);t.set(n,e)}}});if(null!=n&&0!==n.length)throw f(n,"RelayRefetchableFragmentTransform");var r=l(e);return new Map(Array.from(t.entries(),function(e){var t=e[0],n=e[1];return[t,r.getFragment(n.name)]}))}(e),p=e,y=m(r,function(e){var r,o=e[0],l=e[1];if(u(l.type,n))r=function(e,t,n){var r=c(e.getQueryType());return{path:[],node:{argumentDefinitions:k(t.argumentDefinitions),directives:[],kind:"Root",loc:{kind:"Derived",source:t.loc},metadata:null,name:n,operation:"query",selections:[N(t)],type:r}}}(t,l,o);else if(String(l.type)===E)r=function(e,t,n){var r=c(e.getQueryType()),i=e.getType(E),a=r.getFields()[P];if(!(i instanceof b&&null!=a&&a.type instanceof b&&u(a.type,i)&&0===a.args.length&&u(t.type,i)))throw h("Invalid use of @refetchable on fragment '".concat(t.name,"', check that your schema defines a 'Viewer' object type and has a 'viewer: Viewer' field on the query type."),[t.loc]);return{path:[P],node:{argumentDefinitions:k(t.argumentDefinitions),directives:[],kind:"Root",loc:{kind:"Derived",source:t.loc},metadata:null,name:n,operation:"query",selections:[{alias:null,args:[],directives:[],handles:null,kind:"LinkedField",loc:{kind:"Derived",source:t.loc},metadata:null,name:P,selections:[N(t)],type:i}],type:r}}}(t,l,o);else{if(!(String(l.type)===A||l.type instanceof b&&l.type.getInterfaces().some(function(e){return String(e)===A})))throw h("Invalid use of @refetchable on fragment '".concat(l.name,"', only fragments on the Query type, Viewer type, Node type, or types implementing Node are supported."),[l.loc]);r=function(e,t,n){var r=c(e.getQueryType()),i=e.getType(A),s=r.getFields()[w];if(!(i instanceof g&&null!=s&&s.type instanceof g&&u(s.type,i)&&1===s.args.length&&"id"===s.args[0].name&&u(v(s.args[0].type),T)&&(t.type instanceof g&&u(t.type,i)||t.type instanceof b&&t.type.getInterfaces().some(function(e){return u(e,i)}))))throw h("Invalid use of @refetchable on fragment '".concat(t.name,"', check that your schema defines a 'Node { id: ID }' interface and has a 'node(id: ID): Node' field on the query type (the id argument may also be non-null)."),[t.loc]);var o=k(t.argumentDefinitions),l=o.find(function(e){return"id"===e.name});if(null!=l)throw h("Invalid use of @refetchable on fragment '".concat(t.name,"', this fragment already has an '$id' variable in scope."),[l.loc]);if(null==t.selections.find(function(e){return"ScalarField"===e.kind&&"id"===e.name&&null==e.alias&&u(v(e.type),T)}))throw h("Invalid use of @refetchable on fragment '".concat(t.name,"', refetchable fragments on Node (or types implementing Node) must fetch the 'id' field without an alias."),[t.loc]);var p=new x(T),f=(0,a.default)(o).concat([{defaultValue:null,kind:"LocalArgumentDefinition",loc:{kind:"Derived",source:t.loc},metadata:null,name:"id",type:p}]);return{path:[w],node:{argumentDefinitions:f,directives:[],kind:"Root",loc:{kind:"Derived",source:t.loc},metadata:null,name:n,operation:"query",selections:[{alias:null,args:[{kind:"Argument",loc:{kind:"Derived",source:t.loc},metadata:null,name:"id",type:p,value:{kind:"Variable",loc:{kind:"Derived",source:t.loc},metadata:null,variableName:"id",type:p}}],directives:[],handles:null,kind:"LinkedField",loc:{kind:"Derived",source:t.loc},metadata:null,name:w,selections:[N(t)],type:i}],type:r}}}(t,l,o)}if(null!=r){var f,d=r,m=d.path,y=d.node,C=function(e){var t=[],n=null,r=null;if(s.visit(e,{LinkedField:{enter:function(i){if(t.push(i),i.handles&&i.handles.some(function(e){return"connection"===e.name})||i.directives.some(function(e){return"connection"===e.name})){if(null!=n)throw h("Invalid use of @refetchable with @connection in fragment '".concat(e.name,"', at most once @connection can appear in a refetchable fragment."),[i.loc]);var a=t.find(function(e){return v(e.type)instanceof S});if(a)throw h("Invalid use of @refetchable with @connection in fragment '".concat(e.name,"', refetchable connections cannot appear inside plural fields."),[i.loc,a.loc]);n=i,r=t.map(function(e){var t;return null!==(t=e.alias)&&void 0!==t?t:e.name})}}},leave:function(){t.pop()}}),null!=n&&null!=r){var i=null,a=_(n,"before"),o=_(n,"last");if(a||o){if(!a||!o||"Variable"!==a.value.kind||"Variable"!==o.value.kind)throw h("Invalid use of @refetchable with @connection in fragment '".concat(e.name,"', refetchable connections must use variables for the before and last arguments."),[n.loc,a&&"Variable"!==a.value.kind?a.value.loc:null,o&&"Variable"!==o.value.kind?o.value.loc:null].filter(Boolean));i={count:o.value.variableName,cursor:a.value.variableName}}var l=null,u=_(n,"after"),c=_(n,"first");if(u||c){if(!u||!c||"Variable"!==u.value.kind||"Variable"!==c.value.kind)throw h("Invalid use of @refetchable with @connection in fragment '".concat(e.name,"', refetchable connections must use variables for the after and first arguments."),[n.loc,u&&"Variable"!==u.value.kind?u.value.loc:null,c&&"Variable"!==c.value.kind?c.value.loc:null].filter(Boolean));l={count:c.value.variableName,cursor:u.value.variableName}}return{forward:l,backward:i,path:r}}}(l);p=(p=p.replace((0,i.default)({},l,{metadata:(0,i.default)({},l.metadata||{},{refetch:{connection:null!==(f=C)&&void 0!==f?f:null,operation:o,fragmentPathInResult:m}})}))).add((0,i.default)({},y,{metadata:(0,i.default)({},y.metadata||{},{derivedFrom:l.name})}))}});if(null!=y&&y.length)throw f(y,"RelayRefetchableFragmentTransform");return p}}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=n(3),a=n(17),s=n(10).createCompilerError,o=n(1),l=o.GraphQLNonNull,u=o.GraphQLBoolean;function c(e,t,n){var r=n.name,i=t.get(r);if(null!=i)return i;var a=new Map;return n.argumentDefinitions.forEach(function(e){"LocalArgumentDefinition"===e.kind&&a.set(e.name,e)}),t.set(r,a),p(e,t,a,n),t.set(r,a),a}function p(e,t,n,r){a.visit(r,{FragmentSpread:function(r){var i;try{i=e.getFragment(r.name)}catch(e){return!1}var a=c(e,t,i);r.args.forEach(function(e){var t=a.get(e.name);null==t||"Variable"!==e.value.kind||n.has(e.value.variableName)||n.set(e.value.variableName,{kind:"RootArgumentDefinition",loc:{kind:"Derived",source:e.loc},metadata:null,name:e.value.variableName,type:t.type})});var s=!0,o=!1,l=void 0;try{for(var u,p=a.values()[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value;"RootArgumentDefinition"!==f.kind||n.has(f.name)||n.set(f.name,f)}}catch(e){o=!0,l=e}finally{try{s||null==p.return||p.return()}finally{if(o)throw l}}return!1},Argument:function(e){if("Variable"!==e.value.kind)return!1;var t=e.value;return null!=e.type||null!=t.type?(n.has(t.variableName)||n.set(t.variableName,{kind:"RootArgumentDefinition",loc:{kind:"Derived",source:e.loc},metadata:null,name:t.variableName,type:t.type||e.type}),!1):void 0},Condition:function(e){var t;if("Variable"===e.condition.kind){var r=e.condition,i=null!==(t=r.type)&&void 0!==t?t:new l(u);n.has(r.variableName)||n.set(r.variableName,{kind:"RootArgumentDefinition",loc:{kind:"Derived",source:e.loc},metadata:null,name:r.variableName,type:i})}}})}e.exports=function(e){var t=new Map;return new i(e.serverSchema,e.clientSchema).addAll(Array.from(e.documents(),function(n){switch(n.kind){case"Fragment":var i=c(e,t,n);return(0,r.default)({},n,{argumentDefinitions:Array.from(i.values())});case"Root":return function(e,t,n){var i=new Map,a=new Map,o=!0,l=!1,u=void 0;try{for(var c,f=n.argumentDefinitions.entries()[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){var d=c.value,h=d[0],m=d[1];"LocalArgumentDefinition"===m.kind&&a.set(h,m)}}catch(e){l=!0,u=e}finally{try{o||null==f.return||f.return()}finally{if(l)throw u}}return p(e,t,i,n),(0,r.default)({},n,{argumentDefinitions:Array.from(i.values(),function(e){var t,n;if("RootArgumentDefinition"!==e.kind)throw s("inferRootArgumentDefinitions: Expected inferred variable '$".concat(e.name,"' to be a root variables."),[e.loc]);var r=a.get(e.name);return{defaultValue:null!==(t=null===r||void 0===r?void 0:r.defaultValue)&&void 0!==t?t:null,kind:"LocalArgumentDefinition",loc:e.loc,metadata:null,name:e.name,type:null!==(n=null===r||void 0===r?void 0:r.type)&&void 0!==n?n:e.type}})})}(e,t,n);case"SplitOperation":return n;default:throw s("inferRootArgumentDefinitions: Unsupported kind '".concat(n.kind,"'."))}}))}},function(e,t,n){"use strict";var r=n(6).getRawType,i=n(1),a=i.GraphQLNonNull,s=i.GraphQLList;e.exports=function e(t,n){if(t===n)return!0;if(t instanceof a&&n instanceof a)return e(t.ofType,n.ofType);if(t instanceof s&&n instanceof s)return e(t.ofType,n.ofType);if(t.constructor.name===n.constructor.name){var i=r(t),o=r(n);return i.name===o.name}return!1}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5)),a=n(24),s=n(2),o="relay";function l(e){return function(t){var n=t.directives.find(function(e){return e.name===o});if(!n)return this.traverse(t);var i=a(n.args),s=e(i);return this.traverse((0,r.default)({},t,{directives:t.directives.filter(function(e){return e!==n}),metadata:(0,r.default)({},t.metadata||{},s)}))}}function u(e){var t=e.mask,n=e.plural;return void 0!==n&&"boolean"!=typeof n&&s(!1),void 0!==t&&"boolean"!=typeof t&&s(!1),{mask:t,plural:n}}function c(e){var t=e.mask;return void 0!==t&&"boolean"!=typeof t&&s(!1),{mask:t}}e.exports={RELAY:o,SCHEMA_EXTENSION:"\ndirective @relay(\n # Marks a connection field as containing nodes without 'id' fields.\n # This is used to silence the warning when diffing connections.\n isConnectionWithoutNodeID: Boolean,\n\n # Marks a fragment as intended for pattern matching (as opposed to fetching).\n # Used in Classic only.\n pattern: Boolean,\n\n # Marks a fragment as being backed by a GraphQLList.\n plural: Boolean,\n\n # Marks a fragment spread which should be unmasked if provided false\n mask: Boolean = true,\n\n # Selectively pass variables down into a fragment. Only used in Classic.\n variables: [String!],\n) on FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | FIELD\n",transform:function(e){return i.transform(e,{Fragment:l(u),FragmentSpread:l(c)})}}},function(e,t,n){"use strict";var r=n(2),i=n(11);e.exports={anyTypeAlias:function(e){return i.typeAlias(i.identifier(e),null,i.anyTypeAnnotation())},exactObjectTypeAnnotation:function(e){var t=i.objectTypeAnnotation(e);return t.exact=!0,t},exportType:function(e,t){return i.exportNamedDeclaration(i.typeAlias(i.identifier(e),null,t),[],null)},importTypes:function(e,t){var n=i.importDeclaration(e.map(function(e){return i.importSpecifier(i.identifier(e),i.identifier(e))}),i.stringLiteral(t));return n.importKind="type",n},intersectionTypeAnnotation:function(e){return e.length>0||r(!1),1===e.length?e[0]:i.intersectionTypeAnnotation(e)},lineComments:function(){for(var e=arguments.length,t=new Array(e),n=0;n0||r(!1),1===e.length?e[0]:i.unionTypeAnnotation(e)}}},function(e,t,n){"use strict";var r=n(2);e.exports=function e(t){switch(t.kind){case"Variable":return{variable:t.variableName};case"Literal":return{value:t.value};case"ListValue":return{list:t.items.map(function(t){return e(t)})};case"ObjectValue":return{object:t.fields.map(function(t){return{name:t.name,value:e(t.value)}})};default:r(!1)}}},function(e,t,n){"use strict";e.exports={hasUnaliasedSelection:function(e,t){return e.selections.some(function(e){return"ScalarField"===e.kind&&null==e.alias&&e.name===t})}}},function(e,t,n){"use strict";var r=n(28),i=n(41),a=n(30),s=n(89),o=n(44),l=n(91),u=n(92),c=n(3),p=n(9),f=n(95),d=n(32),h=n(5),m=n(17),y=n(97),v=n(6),T=n(31),g=n(47),S=n(100),x=n(105),b=n(177),E=n(33),P=n(196),A=n(49),w=n(50),k=n(51),N=n(201),_=n(83),C=n(24),O=n(80),D=n(43),I=n(52),L=n(202).SourceControlMercurial,F=n(53),M=F.getReaderSourceDefinitionName,j=F.getSourceDefinitionName,R=P(u.find);e.exports={ASTConvert:i,CodegenDirectory:a,CodegenRunner:s,CodegenWatcher:o,CompilerContext:c,ConsoleReporter:f,DotGraphQLParser:l,ASTCache:r,IRTransformer:h,IRVisitor:m,Printer:d,Profiler:p,SchemaUtils:v,SourceControlMercurial:L,WatchmanClient:T,filterContextForNode:k,getIdentifierForArgumentValue:_,getLiteralArgumentValues:C,isEquivalentType:O,nullthrows:D,Parser:E,Validator:A,CodeGenerator:g,FlowGenerator:x,GraphQLCompilerContext:c,FileIRParser:R,FileWriter:S,IRTransforms:b,JSModuleParser:R,MultiReporter:y,Runner:s,compileRelayArtifacts:w,formatGeneratedModule:N,convertASTDocuments:i.convertASTDocuments,transformASTSchema:i.transformASTSchema,getReaderSourceDefinitionName:M,getSourceDefinitionName:j,writeRelayGeneratedFile:I}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&t.parserWriters[r].forEach(function(e){return n.add(e)})}))})),n}))},t.parseEverything=function(){var e=i(function*(e){if(!this.parsers[e]){var t=this.parserConfigs[e];this.parsers[e]=t.getParser(t.baseDir);var n,r=t.getFileFilter?t.getFileFilter(t.baseDir):h;if(t.filepaths&&t.watchmanExpression)throw new Error("Provide either `watchmanExpression` or `filepaths` but not both.");if(t.watchmanExpression)n=yield o.queryFiles(t.baseDir,t.watchmanExpression,r);else{if(!t.filepaths)throw new Error("Either `watchmanExpression` or `filepaths` is required to query files");n=yield o.queryFilepaths(t.baseDir,t.filepaths,r)}this.parseFileChanges(e,n)}});return function(t){return e.apply(this,arguments)}}(),t.parseFileChanges=function(e,t){var n=this;return u.run("CodegenRunner.parseFileChanges",function(){n.parsers[e].parseFiles(t)})},t.write=function(e){var t=this;return u.asyncContext("CodegenRunner.write",i(function*(){try{t._reporter.reportMessage("\nWriting ".concat(e));var n=t.writerConfigs[e],r=n.writeFiles,i=n.parser,l=n.baseParsers,d=n.isGeneratedFile,h=f();l&&l.forEach(function(e){t.parsers[e]||c(!1),h=h.merge(t.parsers[e].documents())});var m=t.parserConfigs[i],y=m.baseDir,v=m.generatedDirectoriesWatchmanExpression,T=[];if(v)T=(yield o.queryDirectories(y,v)).map(function(e){return p.join(y,e)});var g=t.parsers[i].documents(),S=u.run("getSchema",function(){return t.parserConfigs[i].getSchema()}),x=yield r({onlyValidate:t.onlyValidate,schema:S,documents:g,baseDocuments:h,generatedDirectories:T,sourceControl:t._sourceControl,reporter:t._reporter}),b=!0,E=!1,P=void 0;try{for(var A,w=x.values()[Symbol.iterator]();!(b=(A=w.next()).done);b=!0){var k=A.value,N=(0,a.default)(k.changes.created).concat((0,a.default)(k.changes.updated),(0,a.default)(k.changes.deleted),(0,a.default)(k.changes.unchanged)),_=!0,C=!1,O=void 0;try{for(var D,I=N[Symbol.iterator]();!(_=(D=I.next()).done);_=!0){var L=D.value;d(k.getPath(L))||c(!1)}}catch(e){C=!0,O=e}finally{try{_||null==I.return||I.return()}finally{if(C)throw O}}}}catch(e){E=!0,P=e}finally{try{b||null==w.return||w.return()}finally{if(E)throw P}}var F=t.onComplete;null!=F&&F(Array.from(x.values()));var M=s.combineChanges(Array.from(x.values()));return s.printChanges(M,{onlyValidate:t.onlyValidate}),s.hasChanges(M)?"HAS_CHANGES":"NO_CHANGES"}catch(e){return t._reporter.reportError("CodegenRunner.write",e),"ERROR"}}))},t.watchAll=function(){var e=i(function*(){for(var e in yield this.compileAll(),this.parserConfigs)yield this.watch(e)});return function(){return e.apply(this,arguments)}}(),t.watch=function(){var e=i(function*(e){var t=this,n=this.parserConfigs[e];if(!n.watchmanExpression)throw new Error("`watchmanExpression` is required to watch files");var r=!0;yield o.watchCompile(n.baseDir,n.watchmanExpression,n.getFileFilter?n.getFileFilter(n.baseDir):h,function(){var n=i(function*(n){if(t.parsers[e]||c(!1),r)r=!1;else{var i=[];t.parserWriters[e].forEach(function(e){return i.push(e)});try{t.parsers[e]?t.parseFileChanges(e,n):yield t.parseEverything(e),yield Promise.all(i.map(function(e){return t.write(e)}))}catch(e){t._reporter.reportError("CodegenRunner.watch",e)}t._reporter.reportMessage("Watching for changes to ".concat(e,"..."))}});return function(e){return n.apply(this,arguments)}}()),this._reporter.reportMessage("Watching for changes to ".concat(e,"..."))});return function(t){return e.apply(this,arguments)}}(),e}();function h(e){return!0}e.exports=d},function(e,t){e.exports=require("fb-watchman")},function(e,t,n){"use strict";var r=n(28),i=n(21),a=n(14),s=n(1),o=s.parse,l=s.Source;function u(e,t){var n=i.readFileSync(a.join(e,t.relPath),"utf8");return o(new l(n,t.relPath),{experimentalFragmentVariables:!0})}e.exports={parseFile:u,getParser:function(e){return new r({baseDir:e,parse:u})}}},function(e,t,n){"use strict";var r=n(9),i=n(93),a=n(29),s={allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,sourceType:"module",plugins:["asyncGenerators","classProperties",["decorators",{decoratorsBeforeExport:!0}],"doExpressions","dynamicImport","exportExtensions","flow","functionBind","functionSent","jsx","nullishCoalescingOperator","objectRestSpread","optionalChaining","optionalCatchBinding"],strictMode:!1};var o=Object.create(null,{createFragmentContainer:{value:!0},createPaginationContainer:{value:!0},createRefetchContainer:{value:!0}}),l={comments:!0,end:!0,leadingComments:!0,loc:!0,name:!0,start:!0,trailingComments:!0,type:!0};function u(e){return"Identifier"===e.type&&"graphql"===e.name}function c(e){var t=e.quasis;return t&&1===t.length||d(!1),t[0]}function p(e){return c(e).value.raw}function f(e){var t=c(e).loc.start;return{line:t.line,column:t.column+1}}function d(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i",{beforeExpr:a}),template:new s("template"),ellipsis:new s("...",{beforeExpr:a}),backQuote:new s("`",{startsExpr:!0}),dollarBraceL:new s("${",{beforeExpr:a,startsExpr:!0}),at:new s("@"),hash:new s("#"),interpreterDirective:new s("#!..."),eq:new s("=",{beforeExpr:a,isAssign:!0}),assign:new s("_=",{beforeExpr:a,isAssign:!0}),incDec:new s("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new s("!",{beforeExpr:a,prefix:!0,startsExpr:!0}),tilde:new s("~",{beforeExpr:a,prefix:!0,startsExpr:!0}),pipeline:new l("|>",0),nullishCoalescing:new l("??",1),logicalOR:new l("||",1),logicalAND:new l("&&",2),bitwiseOR:new l("|",3),bitwiseXOR:new l("^",4),bitwiseAND:new l("&",5),equality:new l("==/!=",6),relational:new l("",7),bitShift:new l("<>",8),plusMin:new s("+/-",{beforeExpr:a,binop:9,prefix:!0,startsExpr:!0}),modulo:new l("%",10),star:new l("*",10),slash:new l("/",10),exponent:new s("**",{beforeExpr:a,binop:11,rightAssociative:!0})},c={break:new o("break"),case:new o("case",{beforeExpr:a}),catch:new o("catch"),continue:new o("continue"),debugger:new o("debugger"),default:new o("default",{beforeExpr:a}),do:new o("do",{isLoop:!0,beforeExpr:a}),else:new o("else",{beforeExpr:a}),finally:new o("finally"),for:new o("for",{isLoop:!0}),function:new o("function",{startsExpr:!0}),if:new o("if"),return:new o("return",{beforeExpr:a}),switch:new o("switch"),throw:new o("throw",{beforeExpr:a,prefix:!0,startsExpr:!0}),try:new o("try"),var:new o("var"),let:new o("let"),const:new o("const"),while:new o("while",{isLoop:!0}),with:new o("with"),new:new o("new",{beforeExpr:a,startsExpr:!0}),this:new o("this",{startsExpr:!0}),super:new o("super",{startsExpr:!0}),class:new o("class"),extends:new o("extends",{beforeExpr:a}),export:new o("export"),import:new o("import",{startsExpr:!0}),yield:new o("yield",{beforeExpr:a,startsExpr:!0}),null:new o("null",{startsExpr:!0}),true:new o("true",{startsExpr:!0}),false:new o("false",{startsExpr:!0}),in:new o("in",{beforeExpr:a,binop:7}),instanceof:new o("instanceof",{beforeExpr:a,binop:7}),typeof:new o("typeof",{beforeExpr:a,prefix:!0,startsExpr:!0}),void:new o("void",{beforeExpr:a,prefix:!0,startsExpr:!0}),delete:new o("delete",{beforeExpr:a,prefix:!0,startsExpr:!0})};function p(e){return null!=e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}Object.keys(c).forEach(function(e){u["_"+e]=c[e]});function f(e){var t=e.split(" ");return function(e){return t.indexOf(e)>=0}}var d={6:f("enum await"),strict:f("implements interface let package private protected public static yield"),strictBind:f("eval arguments")},h=f("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"),m="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",y="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",v=new RegExp("["+m+"]"),T=new RegExp("["+m+y+"]");m=y=null;var g=[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],S=[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 x(e,t){for(var n=65536,r=0;re)return!1;if((n+=t[r+1])>=e)return!0}return!1}function b(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&v.test(String.fromCharCode(e)):x(e,g)))}function E(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&T.test(String.fromCharCode(e)):x(e,g)||x(e,S))))}var P=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void"];function A(e){return"type"===e.importKind||"typeof"===e.importKind}function w(e){return(e.type===u.name||!!e.type.keyword)&&"from"!==e.value}var k={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var N=/\*?\s*@((?:no)?flow)\b/,_={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:"♦"},C=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(C.source,"g");function D(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function I(e){switch(e){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 L=function(e,t,n,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r},F={braceStatement:new L("{",!1),braceExpression:new L("{",!0),templateQuasi:new L("${",!0),parenStatement:new L("(",!1),parenExpression:new L("(",!0),template:new L("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new L("function",!0)};u.parenR.updateContext=u.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===F.braceStatement&&this.curContext()===F.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===F.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},u.name.updateContext=function(e){"of"!==this.state.value||this.curContext()!==F.parenStatement?(this.state.exprAllowed=!1,e!==u._let&&e!==u._const&&e!==u._var||C.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0),this.state.isIterator&&(this.state.isIterator=!1)):this.state.exprAllowed=!e.beforeExpr},u.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?F.braceStatement:F.braceExpression),this.state.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.state.context.push(F.templateQuasi),this.state.exprAllowed=!0},u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.state.context.push(t?F.parenStatement:F.parenExpression),this.state.exprAllowed=!0},u.incDec.updateContext=function(){},u._function.updateContext=function(e){this.state.exprAllowed&&!this.braceIsBlock(e)&&this.state.context.push(F.functionExpression),this.state.exprAllowed=!1},u.backQuote.updateContext=function(){this.curContext()===F.template?this.state.context.pop():this.state.context.push(F.template),this.state.exprAllowed=!1};var M=/^[\da-fA-F]+$/,j=/^\d+$/;function R(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function B(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return B(e.object)+"."+B(e.property);throw new Error("Node had unexpected type: "+e.type)}F.j_oTag=new L("...",!0,!0),u.jsxName=new s("jsxName"),u.jsxText=new s("jsxText",{beforeExpr:!0}),u.jsxTagStart=new s("jsxTagStart",{startsExpr:!0}),u.jsxTagEnd=new s("jsxTagEnd"),u.jsxTagStart.updateContext=function(){this.state.context.push(F.j_expr),this.state.context.push(F.j_oTag),this.state.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===F.j_oTag&&e===u.slash||t===F.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===F.j_expr):this.state.exprAllowed=!0};var V={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1};var q=function(e,t){this.line=e,this.column=t},K=function(e,t){this.start=e,this.end=t};function U(e){return e[e.length-1]}var J=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.raise=function(e,t,n){var r=void 0===n?{}:n,i=r.missingPluginNames,a=r.code,s=function(e,t){var n,r=1,i=0;for(O.lastIndex=0;(n=O.exec(e))&&n.index0)){var t,n,r,i,a,s=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(s.length>0){var o=U(s);o.trailingComments&&o.trailingComments[0].start>=e.end&&(r=o.trailingComments,delete o.trailingComments)}for(s.length>0&&U(s).start>=e.start&&(t=s.pop());s.length>0&&U(s).start>=e.start;)n=s.pop();if(!n&&t&&(n=t),t&&this.state.leadingComments.length>0){var l=U(this.state.leadingComments);if("ObjectProperty"===t.type){if(l.start>=e.start&&this.state.commentPreviousNode){for(a=0;a0&&(t.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var u=U(e.arguments);if(u&&l.start>=u.start&&l.end<=e.end&&this.state.commentPreviousNode){for(a=0;a0&&(u.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}}if(n){if(n.leadingComments)if(n!==e&&n.leadingComments.length>0&&U(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,delete n.leadingComments;else for(i=n.leadingComments.length-2;i>=0;--i)if(n.leadingComments[i].end<=e.start){e.leadingComments=n.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(U(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;ie.start);i++);var c=this.state.leadingComments.slice(0,i);c.length&&(e.leadingComments=c),0===(r=this.state.leadingComments.slice(i)).length&&(r=null)}this.state.commentPreviousNode=e,r&&(r.length&&r[0].start>=e.start&&U(r).end<=e.end?e.innerComments=r:e.trailingComments=r),s.push(e)}},t}(function(){function e(){this.sawUnambiguousESM=!1}var t=e.prototype;return t.isReservedWord=function(e){return"await"===e?this.inModule:d[6](e)},t.hasPlugin=function(e){return Object.hasOwnProperty.call(this.plugins,e)},t.getPluginOption=function(e,t){if(this.hasPlugin(e))return this.plugins[e][t]},e}())),X=function(){function e(){}var t=e.prototype;return t.init=function(e,t){this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,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.inPropertyName=!1,this.inType=!1,this.inClassProperty=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isIterator=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldInPossibleArrowParameters=null,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=u.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=[F.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},t.curPosition=function(){return new q(this.curLine,this.pos-this.lineStart)},t.clone=function(t){var n=this,r=new e;return Object.keys(this).forEach(function(e){var i=n[e];t&&"context"!==e||!Array.isArray(i)||(i=i.slice()),r[e]=i}),r},e}(),Y=function(e){return e>=48&&e<=57},W={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},G={bin:[48,49]};G.oct=G.bin.concat([50,51,52,53,54,55]),G.dec=G.oct.concat([56,57]),G.hex=G.dec.concat([65,66,67,68,69,70,97,98,99,100,101,102]);var Q=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.addExtra=function(e,t,n){e&&((e.extra=e.extra||{})[t]=n)},n.isRelational=function(e){return this.match(u.relational)&&this.state.value===e},n.isLookaheadRelational=function(e){var t=this.lookahead();return t.type==u.relational&&t.value==e},n.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,u.relational)},n.eatRelational=function(e){return!!this.isRelational(e)&&(this.next(),!0)},n.isContextual=function(e){return this.match(u.name)&&this.state.value===e&&!this.state.containsEsc},n.isLookaheadContextual=function(e){var t=this.lookahead();return t.type===u.name&&t.value===e},n.eatContextual=function(e){return this.isContextual(e)&&this.eat(u.name)},n.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},n.canInsertSemicolon=function(){return this.match(u.eof)||this.match(u.braceR)||this.hasPrecedingLineBreak()},n.hasPrecedingLineBreak=function(){return C.test(this.input.slice(this.state.lastTokEnd,this.state.start))},n.isLineTerminator=function(){return this.eat(u.semi)||this.canInsertSemicolon()},n.semicolon=function(){this.isLineTerminator()||this.unexpected(null,u.semi)},n.expect=function(e,t){this.eat(e)||this.unexpected(t,e)},n.unexpected=function(e,t){throw void 0===t&&(t="Unexpected token"),"string"!=typeof t&&(t='Unexpected token, expected "'+t.label+'"'),this.raise(null!=e?e:this.state.start,t)},n.expectPlugin=function(e,t){if(!this.hasPlugin(e))throw this.raise(null!=t?t:this.state.start,"This experimental syntax requires enabling the parser plugin: '"+e+"'",{missingPluginNames:[e]});return!0},n.expectOnePlugin=function(e,t){var n=this;if(!e.some(function(e){return n.hasPlugin(e)}))throw this.raise(null!=t?t:this.state.start,"This experimental syntax requires enabling one of the following parser plugin(s): '"+e.join(", ")+"'",{missingPluginNames:e})},t}(function(e){function t(t,n){var r;return(r=e.call(this)||this).state=new X,r.state.init(t,n),r.isLookahead=!1,r}i(t,e);var n=t.prototype;return n.next=function(){this.options.tokens&&!this.isLookahead&&this.state.tokens.push(new function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new K(e.startLoc,e.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()},n.eat=function(e){return!!this.match(e)&&(this.next(),!0)},n.match=function(e){return this.state.type===e},n.isKeyword=function(e){return h(e)},n.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state;return this.state=e,t},n.setStrict=function(e){if(this.state.strict=e,this.match(u.num)||this.match(u.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(u.eof):e.override?e.override(this):this.readToken(this.input.codePointAt(this.state.pos))},n.readToken=function(e){b(e)||92===e?this.readWord():this.getTokenFromCode(e)},n.pushComment=function(e,t,n,r,i,a){var s={type:e?"CommentBlock":"CommentLine",value:t,start:n,end:r,loc:new K(i,a)};this.isLookahead||(this.options.tokens&&this.state.tokens.push(s),this.state.comments.push(s),this.addComment(s))},n.skipBlockComment=function(){var e,t=this.state.curPosition(),n=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);for(-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,O.lastIndex=n;(e=O.exec(this.input))&&e.index=48&&e<=57)this.readNumber(!0);else{var t=this.input.charCodeAt(this.state.pos+2);46===e&&46===t?(this.state.pos+=3,this.finishToken(u.ellipsis)):(++this.state.pos,this.finishToken(u.dot))}},n.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(u.assign,2):this.finishOp(u.slash,1)},n.readToken_interpreter=function(){if(0!==this.state.pos||this.state.input.length<2)return!1;var e=this.state.pos;this.state.pos+=1;var t=this.input.charCodeAt(this.state.pos);if(33!==t)return!1;for(;10!==t&&13!==t&&8232!==t&&8233!==t&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(u.question)):(this.state.pos+=2,this.finishToken(u.questionDot)):61===t?this.finishOp(u.assign,3):this.finishOp(u.nullishCoalescing,2)},n.getTokenFromCode=function(e){switch(e){case 35:if(0===this.state.pos&&this.readToken_interpreter())return;if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(u.hash);this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(e)+"'");case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(u.parenL);case 41:return++this.state.pos,void this.finishToken(u.parenR);case 59:return++this.state.pos,void this.finishToken(u.semi);case 44:return++this.state.pos,void this.finishToken(u.comma);case 91:return++this.state.pos,void this.finishToken(u.bracketL);case 93:return++this.state.pos,void this.finishToken(u.bracketR);case 123:return void(this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.braceBarL,2):(++this.state.pos,this.finishToken(u.braceL)));case 125:return++this.state.pos,void this.finishToken(u.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.doubleColon,2):(++this.state.pos,this.finishToken(u.colon)));case 63:return void this.readToken_question();case 64:return++this.state.pos,void this.finishToken(u.at);case 96:return++this.state.pos,void this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)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(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(u.tilde,1)}this.raise(this.state.pos,"Unexpected character '"+String.fromCodePoint(e)+"'")},n.finishOp=function(e,t){var n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)},n.readRegexp=function(){for(var e,t,n=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.state.pos);if(C.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.state.pos}var i=this.input.slice(n,this.state.pos);++this.state.pos;for(var a="";this.state.pos-1)a.indexOf(s)>-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag"),++this.state.pos,a+=s;else{if(!E(o)&&92!==o)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}}this.finishToken(u.regexp,{pattern:i,flags:a})},n.readInt=function(e,t){for(var n=this.state.pos,r=16===e?W.hex:W.decBinOct,i=16===e?G.hex:10===e?G.dec:8===e?G.oct:G.bin,a=0,s=0,o=null==t?1/0:t;s-1||r.indexOf(p)>-1||Number.isNaN(p))&&this.raise(this.state.pos,"Invalid or unexpected token"),++this.state.pos;continue}}if((u=l>=97?l-97+10:l>=65?l-65+10:Y(l)?l-48:1/0)>=e)break;++this.state.pos,a=a*e+u}return this.state.pos===n||null!=t&&this.state.pos-n!==t?null:a},n.readRadixNumber=function(e){var t=this.state.pos,n=!1;this.state.pos+=2;var r=this.readInt(e);if(null==r&&this.raise(this.state.start+2,"Expected number in radix "+e),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,n=!0),b(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number"),n){var i=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(u.bigint,i)}else this.finishToken(u.num,r)},n.readNumber=function(e){var t=this.state.pos,n=48===this.input.charCodeAt(t),r=!1,i=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),n&&this.state.pos==t+1&&(n=!1);var a=this.input.charCodeAt(this.state.pos);46!==a||n||(++this.state.pos,this.readInt(10),r=!0,a=this.input.charCodeAt(this.state.pos)),69!==a&&101!==a||n||(43!==(a=this.input.charCodeAt(++this.state.pos))&&45!==a||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0,a=this.input.charCodeAt(this.state.pos)),this.hasPlugin("bigInt")&&110===a&&((r||n)&&this.raise(t,"Invalid BigIntLiteral"),++this.state.pos,i=!0),b(this.input.codePointAt(this.state.pos))&&this.raise(this.state.pos,"Identifier directly after number");var s,o=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");i?this.finishToken(u.bigint,o):(r?s=parseFloat(o):n&&1!==o.length?this.state.strict?this.raise(t,"Invalid number"):s=/[89]/.test(o)?parseInt(o,10):parseInt(o,8):s=parseInt(o,10),this.finishToken(u.num,s))},n.readCodePoint=function(e){var t;if(123===this.input.charCodeAt(this.state.pos)){var n=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=n-2,null;this.raise(n,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},n.readString=function(e){for(var t="",n=++this.state.pos,r=this.hasPlugin("jsonStrings");;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.state.pos),t+=this.readEscapedChar(!1),n=this.state.pos):(!r||8232!==i&&8233!==i)&&D(i)?this.raise(this.state.start,"Unterminated string constant"):++this.state.pos}t+=this.input.slice(n,this.state.pos++),this.finishToken(u.string,t)},n.readTmplToken=function(){for(var e="",t=this.state.pos,n=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(u.template)?36===r?(this.state.pos+=2,void this.finishToken(u.dollarBraceL)):(++this.state.pos,void this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(u.template,n?null:e));if(92===r){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?n=!0:e+=i,t=this.state.pos}else if(D(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},n.readEscapedChar=function(e){var t=!e,n=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,n){case 110:return"\n";case 114:return"\r";case 120:var r=this.readHexChar(2,t);return null===r?null:String.fromCharCode(r);case 117:var i=this.readCodePoint(t);return null===i?null:String.fromCodePoint(i);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(n>=48&&n<=55){var a=this.state.pos-1,s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(s,8);if(o>255&&(s=s.slice(0,-1),o=parseInt(s,8)),o>0){if(e)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+=s.length-1,String.fromCharCode(o)}return String.fromCharCode(n)}},n.readHexChar=function(e,t){var n=this.state.pos,r=this.readInt(16,e);return null===r&&(t?this.raise(n,"Bad character escape sequence"):(this.state.pos=n-1,this.state.invalidTemplateEscapePosition=n-1)),r},n.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,n=this.state.pos;this.state.pos=0;s--){var o=this.state.labels[s];if(o.statementStart!==e.start)break;o.statementStart=this.state.start,o.kind=a}return this.state.labels.push({name:t,kind:a,statementStart:this.state.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!==e.body.kind||"FunctionDeclaration"==e.body.type&&(this.state.strict||e.body.generator||e.body.async))&&this.raise(e.body.start,"Invalid labeled declaration"),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},n.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},n.parseBlock=function(e){var t=this.startNode();return this.expect(u.braceL),this.parseBlockBody(t,e,!1,u.braceR),this.finishNode(t,"BlockStatement")},n.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},n.parseBlockBody=function(e,t,n,r){var i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,n,r)},n.parseBlockOrModuleBlockBody=function(e,t,n,r){for(var i,a,s=!1;!this.eat(r);){s||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,n);if(t&&!s&&this.isValidDirective(o)){var l=this.stmtToDirective(o);t.push(l),void 0===i&&"use strict"===l.value.value&&(i=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else s=!0,e.push(o)}!1===i&&this.setStrict(!1)},n.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.match(u.semi)?null:this.parseExpression(),this.expect(u.semi),e.update=this.match(u.parenR)?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},n.parseForIn=function(e,t,n){var r=this.match(u._in)?"ForInStatement":"ForOfStatement";return n?this.eatContextual("of"):this.next(),"ForOfStatement"===r&&(e.await=!!n),e.left=t,e.right=this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,r)},n.parseVar=function(e,t,n){var r=e.declarations=[];for(e.kind=n.keyword;;){var i=this.startNode();if(this.parseVarHead(i),this.eat(u.eq)?i.init=this.parseMaybeAssign(t):(n!==u._const||this.match(u._in)||this.isContextual("of")?"Identifier"===i.id.type||t&&(this.match(u._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.hasPlugin("typescript")||this.unexpected(),i.init=null),r.push(this.finishNode(i,"VariableDeclarator")),!this.eat(u.comma))break}return e},n.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},n.parseFunction=function(e,t,n,r,i){var a=this.state.inFunction,s=this.state.inMethod,o=this.state.inGenerator,l=this.state.inClassProperty;return this.state.inFunction=!0,this.state.inMethod=!1,this.state.inClassProperty=!1,this.initFunction(e,r),this.match(u.star)&&(e.async&&this.expectPlugin("asyncGenerators"),e.generator=!0,this.next()),!t||i||this.match(u.name)||this.match(u._yield)||this.unexpected(),t||(this.state.inGenerator=e.generator),(this.match(u.name)||this.match(u._yield))&&(e.id=this.parseBindingIdentifier()),t&&(this.state.inGenerator=e.generator),this.parseFunctionParams(e),this.parseFunctionBodyAndFinish(e,t?"FunctionDeclaration":"FunctionExpression",n),this.state.inFunction=a,this.state.inMethod=s,this.state.inGenerator=o,this.state.inClassProperty=l,e},n.parseFunctionParams=function(e,t){var n=this.state.inParameters;this.state.inParameters=!0,this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,t),this.state.inParameters=n},n.parseClass=function(e,t,n){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,n),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},n.isClassProperty=function(){return this.match(u.eq)||this.match(u.semi)||this.match(u.braceR)},n.isClassMethod=function(){return this.match(u.parenL)},n.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},n.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0,this.state.classLevel++;var n={hadConstructor:!1},r=[],i=this.startNode();for(i.body=[],this.expect(u.braceL);!this.eat(u.braceR);)if(this.eat(u.semi))r.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(u.at))r.push(this.parseDecorator());else{var a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(i,a,n),"constructor"===a.kind&&a.decorators&&a.decorators.length>0&&this.raise(a.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"),e.body=this.finishNode(i,"ClassBody"),this.state.classLevel--,this.state.strict=t},n.parseClassMember=function(e,t,n){var r=!1,i=this.state.containsEsc;if(this.match(u.name)&&"static"===this.state.value){var a=this.parseIdentifier(!0);if(this.isClassMethod()){var s=t;return s.kind="method",s.computed=!1,s.key=a,s.static=!1,void this.pushClassMethod(e,s,!1,!1,!1)}if(this.isClassProperty()){var o=t;return o.computed=!1,o.key=a,o.static=!1,void e.body.push(this.parseClassProperty(o))}if(i)throw this.unexpected();r=!0}this.parseClassMemberWithIsStatic(e,t,n,r)},n.parseClassMemberWithIsStatic=function(e,t,n,r){var i=t,a=t,s=t,o=t,l=i,c=i;if(t.static=r,this.eat(u.star))return l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?void this.pushClassPrivateMethod(e,a,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be a generator"),void this.pushClassMethod(e,i,!0,!1,!1));var p=this.parseClassPropertyName(t),f="PrivateName"===p.type,d="Identifier"===p.type;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",f)return void this.pushClassPrivateMethod(e,a,!1,!1);var h=this.isNonstaticConstructor(i);h&&(i.kind="constructor",i.decorators&&this.raise(i.start,"You can't attach decorators to a class constructor"),n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.start,"Duplicate constructor in the same class"),n.hadConstructor=!0),this.pushClassMethod(e,i,!1,!1,h)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,s);else if(d&&"async"===p.name&&!this.isLineTerminator()){var m=this.match(u.star);m&&(this.expectPlugin("asyncGenerators"),this.next()),l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,a,m,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't be an async function"),this.pushClassMethod(e,i,m,!0,!1))}else!d||"get"!==p.name&&"set"!==p.name||this.isLineTerminator()&&this.match(u.star)?this.isLineTerminator()?f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,s):this.unexpected():(l.kind=p.name,this.parseClassPropertyName(i),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(e,i,!1,!1,!1)),this.checkGetterSetterParams(i))},n.parseClassPropertyName=function(e){var t=this.parsePropertyName(e);return e.computed||!e.static||"prototype"!==t.name&&"prototype"!==t.value||this.raise(t.start,"Classes may not have static property named prototype"),"PrivateName"===t.type&&"constructor"===t.id.name&&this.raise(t.start,"Classes may not have a private field named '#constructor'"),t},n.pushClassProperty=function(e,t){this.isNonstaticConstructor(t)&&this.raise(t.key.start,"Classes may not have a non-static field named 'constructor'"),e.body.push(this.parseClassProperty(t))},n.pushClassPrivateProperty=function(e,t){this.expectPlugin("classPrivateProperties",t.key.start),e.body.push(this.parseClassPrivateProperty(t))},n.pushClassMethod=function(e,t,n,r,i){e.body.push(this.parseMethod(t,n,r,i,"ClassMethod"))},n.pushClassPrivateMethod=function(e,t,n,r){this.expectPlugin("classPrivateMethods",t.key.start),e.body.push(this.parseMethod(t,n,r,!1,"ClassPrivateMethod"))},n.parsePostMemberNameModifiers=function(e){},n.parseAccessModifier=function(){},n.parseClassPrivateProperty=function(e){var t=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,e.value=this.eat(u.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=t,this.finishNode(e,"ClassPrivateProperty")},n.parseClassProperty=function(e){e.typeAnnotation||this.expectPlugin("classProperties");var t=this.state.inMethod;return this.state.inMethod=!1,this.state.inClassProperty=!0,this.match(u.eq)?(this.expectPlugin("classProperties"),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.state.inMethod=t,this.finishNode(e,"ClassProperty")},n.parseClassId=function(e,t,n){this.match(u.name)?e.id=this.parseIdentifier():n||!t?e.id=null:this.unexpected(null,"A class name is required")},n.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts():null},n.parseExport=function(e){if(this.shouldParseExportStar()){if(this.parseExportStar(e),"ExportAllDeclaration"===e.type)return e}else if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var t=this.startNode();t.exported=this.parseIdentifier(!0);var n=[this.finishNode(t,"ExportDefaultSpecifier")];if(e.specifiers=n,this.match(u.comma)&&this.lookahead().type===u.star){this.expect(u.comma);var r=this.startNode();this.expect(u.star),this.expectContextual("as"),r.exported=this.parseIdentifier(),n.push(this.finishNode(r,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(u._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var i=this.lookahead();i.type!==u._function&&this.unexpected(i.start,'Unexpected token, expected "function"')}e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)}else e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e)}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},n.parseExportDefaultExpression=function(){var e=this.startNode();if(this.eat(u._function))return this.parseFunction(e,!0,!1,!1,!0);if(this.isContextual("async")&&this.lookahead().type===u._function)return this.eatContextual("async"),this.eat(u._function),this.parseFunction(e,!0,!1,!0,!0);if(this.match(u._class))return this.parseClass(e,!0,!0);if(this.match(u.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(e,!0,!0);if(this.match(u._let)||this.match(u._const)||this.match(u._var))return this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var t=this.parseMaybeAssign();return this.semicolon(),t},n.parseExportDeclaration=function(e){return this.parseStatement(!0)},n.isExportDefaultSpecifier=function(){if(this.match(u.name))return"async"!==this.state.value;if(!this.match(u._default))return!1;var e=this.lookahead();return e.type===u.comma||e.type===u.name&&"from"===e.value},n.parseExportSpecifiersMaybe=function(e){this.eat(u.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},n.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(u.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},n.shouldParseExportStar=function(){return this.match(u.star)},n.parseExportStar=function(e){this.expect(u.star),this.isContextual("as")?this.parseExportNamespace(e):(this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration"))},n.parseExportNamespace=function(e){this.expectPlugin("exportNamespaceFrom");var t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next(),t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)},n.shouldParseExportDeclaration=function(){if(this.match(u.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.isContextual("async")},n.checkExport=function(e,t,n){if(t)if(n)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var r=0,i=e.specifiers;r-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},n.raiseDuplicateExportError=function(e,t){throw this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},n.parseExportSpecifiers=function(){var e,t=[],n=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(n)n=!1;else if(this.expect(u.comma),this.eat(u.braceR))break;var r=this.match(u._default);r&&!e&&(e=!0);var i=this.startNode();i.local=this.parseIdentifier(r),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),t.push(this.finishNode(i,"ExportSpecifier"))}return e&&!this.isContextual("from")&&this.unexpected(),t},n.parseImport=function(e){return this.match(u.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(u.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},n.shouldParseDefaultImport=function(e){return this.match(u.name)},n.parseImportSpecifierLocal=function(e,t,n,r){t.local=this.parseIdentifier(),this.checkLVal(t.local,!0,void 0,r),e.specifiers.push(this.finishNode(t,n))},n.parseImportSpecifiers=function(e){var t=!0;if(!this.shouldParseDefaultImport(e)||(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),this.eat(u.comma))){if(this.match(u.star)){var n=this.startNode();return this.next(),this.expectContextual("as"),void this.parseImportSpecifierLocal(e,n,"ImportNamespaceSpecifier","import namespace specifier")}for(this.expect(u.braceL);!this.eat(u.braceR);){if(t)t=!1;else if(this.eat(u.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(u.comma),this.eat(u.braceR))break;this.parseImportSpecifier(e)}}},n.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},t}(function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var n=e.key;"__proto__"===("Identifier"===n.type?n.name:String(n.value))&&(t.proto&&this.raise(n.start,"Redefinition of __proto__ property"),t.proto=!0)}},n.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(u.eof)||this.unexpected(),e.comments=this.state.comments,e},n.parseExpression=function(e,t){var n=this.state.start,r=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(u.comma)){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(u.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return i},n.parseMaybeAssign=function(e,t,n,r){var i,a=this.state.start,s=this.state.startLoc;if(this.match(u._yield)&&this.state.inGenerator){var o=this.parseYield();return n&&(o=n.call(this,o,a,s)),o}t?i=!1:(t={start:0},i=!0),(this.match(u.parenL)||this.match(u.name)||this.match(u._yield))&&(this.state.potentialArrowAt=this.state.start);var l=this.parseMaybeConditional(e,t,r);if(n&&(l=n.call(this,l,a,s)),this.state.type.isAssign){var c,p=this.startNodeAt(a,s),f=this.state.value;if(p.operator=f,"??="===f&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==f&&"&&="!==f||this.expectPlugin("logicalAssignment"),p.left=this.match(u.eq)?this.toAssignable(l,void 0,"assignment expression"):l,t.start=0,this.checkLVal(l,void 0,void 0,"assignment expression"),l.extra&&l.extra.parenthesized)"ObjectPattern"===l.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===l.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(l.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c);return this.next(),p.right=this.parseMaybeAssign(e),this.finishNode(p,"AssignmentExpression")}return i&&t.start&&this.unexpected(t.start),l},n.parseMaybeConditional=function(e,t,n){var r=this.state.start,i=this.state.startLoc,a=this.state.potentialArrowAt,s=this.parseExprOps(e,t);return"ArrowFunctionExpression"===s.type&&s.start===a?s:t&&t.start?s:this.parseConditional(s,e,r,i,n)},n.parseConditional=function(e,t,n,r,i){if(this.eat(u.question)){var a=this.startNodeAt(n,r);return a.test=e,a.consequent=this.parseMaybeAssign(),this.expect(u.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return e},n.parseExprOps=function(e,t){var n=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseMaybeUnary(t);return"ArrowFunctionExpression"===a.type&&a.start===i?a:t&&t.start?a:this.parseExprOp(a,n,r,-1,e)},n.parseExprOp=function(e,t,n,r,i){var a=this.state.type.binop;if(!(null==a||i&&this.match(u._in))&&a>r){var s=this.startNodeAt(t,n),o=this.state.value;s.left=e,s.operator=o,"**"!==o||"UnaryExpression"!==e.type||e.extra&&e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var l=this.state.type;l===u.nullishCoalescing?this.expectPlugin("nullishCoalescingOperator"):l===u.pipeline&&this.expectPlugin("pipelineOperator"),this.next();var c=this.state.start,p=this.state.startLoc;if(l===u.pipeline&&this.match(u.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 s.right=this.parseExprOp(this.parseMaybeUnary(),c,p,l.rightAssociative?a-1:a,i),this.finishNode(s,l===u.logicalOR||l===u.logicalAND||l===u.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(s,t,n,r,i)}return e},n.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),n=this.match(u.incDec);if(t.operator=this.state.value,t.prefix=!0,"throw"===t.operator&&this.expectPlugin("throwExpressions"),this.next(),t.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),n)this.checkLVal(t.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===t.operator){var r=t.argument;"Identifier"===r.type?this.raise(t.start,"Deleting local variable in strict mode"):"MemberExpression"===r.type&&"PrivateName"===r.property.type&&this.raise(t.start,"Deleting a private field is not allowed")}return this.finishNode(t,n?"UpdateExpression":"UnaryExpression")}var i=this.state.start,a=this.state.startLoc,s=this.parseExprSubscripts(e);if(e&&e.start)return s;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,a);o.operator=this.state.value,o.prefix=!1,o.argument=s,this.checkLVal(s,void 0,void 0,"postfix operation"),this.next(),s=this.finishNode(o,"UpdateExpression")}return s},n.parseExprSubscripts=function(e){var t=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===r?i:e&&e.start?i:this.parseSubscripts(i,t,n)},n.parseSubscripts=function(e,t,n,r){var i={optionalChainMember:!1,stop:!1};do{e=this.parseSubscript(e,t,n,r,i)}while(!i.stop);return e},n.parseSubscript=function(e,t,n,r,i){if(!r&&this.eat(u.doubleColon)){var a=this.startNodeAt(t,n);return a.object=e,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),t,n,r)}if(this.match(u.questionDot)){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,r&&this.lookahead().type==u.parenL)return i.stop=!0,e;this.next();var s=this.startNodeAt(t,n);if(this.eat(u.bracketL))return s.object=e,s.property=this.parseExpression(),s.computed=!0,s.optional=!0,this.expect(u.bracketR),this.finishNode(s,"OptionalMemberExpression");if(this.eat(u.parenL)){var o=this.atPossibleAsync(e);return s.callee=e,s.arguments=this.parseCallExpressionArguments(u.parenR,o),s.optional=!0,this.finishNode(s,"OptionalCallExpression")}return s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,s.optional=!0,this.finishNode(s,"OptionalMemberExpression")}if(this.eat(u.dot)){var l=this.startNodeAt(t,n);return l.object=e,l.property=this.parseMaybePrivateName(),l.computed=!1,i.optionalChainMember?(l.optional=!1,this.finishNode(l,"OptionalMemberExpression")):this.finishNode(l,"MemberExpression")}if(this.eat(u.bracketL)){var c=this.startNodeAt(t,n);return c.object=e,c.property=this.parseExpression(),c.computed=!0,this.expect(u.bracketR),i.optionalChainMember?(c.optional=!1,this.finishNode(c,"OptionalMemberExpression")):this.finishNode(c,"MemberExpression")}if(!r&&this.match(u.parenL)){var p=this.atPossibleAsync(e);this.next();var f=this.startNodeAt(t,n);f.callee=e;var d={start:-1};return f.arguments=this.parseCallExpressionArguments(u.parenR,p,d),i.optionalChainMember?this.finishOptionalCallExpression(f):this.finishCallExpression(f),p&&this.shouldParseAsyncArrow()?(i.stop=!0,d.start>-1&&this.raise(d.start,"A trailing comma is not permitted after the rest element"),this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,n),f)):(this.toReferencedList(f.arguments),f)}return this.match(u.backQuote)?this.parseTaggedTemplateExpression(t,n,e,i):(i.stop=!0,e)},n.parseTaggedTemplateExpression=function(e,t,n,r,i){var a=this.startNodeAt(e,t);return a.tag=n,a.quasi=this.parseTemplate(!0),i&&(a.typeParameters=i),r.optionalChainMember&&this.raise(e,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(a,"TaggedTemplateExpression")},n.atPossibleAsync=function(e){return!this.state.containsEsc&&this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon()},n.finishCallExpression=function(e){if("Import"===e.callee.type){1!==e.arguments.length&&this.raise(e.start,"import() requires exactly one argument");var t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,"CallExpression")},n.finishOptionalCallExpression=function(e){if("Import"===e.callee.type){1!==e.arguments.length&&this.raise(e.start,"import() requires exactly one argument");var t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,"OptionalCallExpression")},n.parseCallExpressionArguments=function(e,t,n){for(var r,i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(u.comma),this.eat(e))break;this.match(u.parenL)&&!r&&(r=this.state.start),i.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0,t?n:void 0))}return t&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),i},n.shouldParseAsyncArrow=function(){return this.match(u.arrow)},n.parseAsyncArrowFromCallExpression=function(e,t){var n=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.expect(u.arrow),this.parseArrowExpression(e,t.arguments,!0),this.state.yieldInPossibleArrowParameters=n,e},n.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},n.parseExprAtom=function(e){var t,n=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case u._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"),t=this.startNode(),this.next(),this.match(u.parenL)||this.match(u.bracketL)||this.match(u.dot)||this.unexpected(),this.match(u.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(t.start,"super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'."),this.finishNode(t,"Super");case u._import:return this.lookahead().type===u.dot?this.parseImportMetaProperty():(this.expectPlugin("dynamicImport"),t=this.startNode(),this.next(),this.match(u.parenL)||this.unexpected(null,u.parenL),this.finishNode(t,"Import"));case u._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case u._yield:this.state.inGenerator&&this.unexpected();case u.name:t=this.startNode();var r="await"===this.state.value&&(this.state.inAsync||!this.state.inFunction&&this.options.allowAwaitOutsideFunction),i=this.state.containsEsc,a=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(r||a);if("await"===s.name){if(this.state.inAsync||this.inModule||!this.state.inFunction&&this.options.allowAwaitOutsideFunction)return this.parseAwait(t)}else{if(!i&&"async"===s.name&&this.match(u._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(t,!1,!1,!0);if(n&&"async"===s.name&&this.match(u.name)){var o=this.state.yieldInPossibleArrowParameters;this.state.yieldInPossibleArrowParameters=null;var l=[this.parseIdentifier()];return this.expect(u.arrow),this.parseArrowExpression(t,l,!0),this.state.yieldInPossibleArrowParameters=o,t}}if(n&&!this.canInsertSemicolon()&&this.eat(u.arrow)){var c=this.state.yieldInPossibleArrowParameters;return this.state.yieldInPossibleArrowParameters=null,this.parseArrowExpression(t,[s]),this.state.yieldInPossibleArrowParameters=c,t}return s;case u._do:this.expectPlugin("doExpressions");var p=this.startNode();this.next();var f=this.state.inFunction,d=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,p.body=this.parseBlock(!1),this.state.inFunction=f,this.state.labels=d,this.finishNode(p,"DoExpression");case u.regexp:var h=this.state.value;return(t=this.parseLiteral(h.value,"RegExpLiteral")).pattern=h.pattern,t.flags=h.flags,t;case u.num:return this.parseLiteral(this.state.value,"NumericLiteral");case u.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case u.string:return this.parseLiteral(this.state.value,"StringLiteral");case u._null:return t=this.startNode(),this.next(),this.finishNode(t,"NullLiteral");case u._true:case u._false:return this.parseBooleanLiteral();case u.parenL:return this.parseParenAndDistinguishExpression(n);case u.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(u.bracketR,!0,e),this.toReferencedList(t.elements),this.finishNode(t,"ArrayExpression");case u.braceL:return this.parseObj(!1,e);case u._function:return this.parseFunctionExpression();case u.at:this.parseDecorators();case u._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate(!1);case u.doubleColon:t=this.startNode(),this.next(),t.object=null;var m=t.callee=this.parseNoCallExpr();if("MemberExpression"===m.type)return this.finishNode(t,"BindExpression");throw this.raise(m.start,"Binding should be performed on object property.");default:throw this.unexpected()}},n.parseBooleanLiteral=function(){var e=this.startNode();return e.value=this.match(u._true),this.next(),this.finishNode(e,"BooleanLiteral")},n.parseMaybePrivateName=function(){if(this.match(u.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var e=this.startNode();return this.next(),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)},n.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(u.dot)?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},n.parseMetaProperty=function(e,t,n){e.meta=t,"function"===t.name&&"sent"===n&&(this.isContextual(n)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(e.property.start,"The only valid meta property for "+t.name+" is "+t.name+"."+n),this.finishNode(e,"MetaProperty")},n.parseImportMetaProperty=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.expect(u.dot),"import"===t.name&&(this.isContextual("meta")?this.expectPlugin("importMeta"):this.hasPlugin("importMeta")||this.raise(t.start,"Dynamic imports require a parameter: import('a.js')")),this.inModule||this.raise(t.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0,this.parseMetaProperty(e,t,"meta")},n.parseLiteral=function(e,t,n,r){n=n||this.state.start,r=r||this.state.startLoc;var i=this.startNodeAt(n,r);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(n,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},n.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},n.parseParenAndDistinguishExpression=function(e){var t,n=this.state.start,r=this.state.startLoc;this.expect(u.parenL);var i=this.state.maybeInArrowParameters,a=this.state.yieldInPossibleArrowParameters;this.state.maybeInArrowParameters=!0,this.state.yieldInPossibleArrowParameters=null;for(var s,o,l=this.state.start,c=this.state.startLoc,p=[],f={start:0},d={start:0},h=!0;!this.match(u.parenR);){if(h)h=!1;else if(this.expect(u.comma,d.start||null),this.match(u.parenR)){o=this.state.start;break}if(this.match(u.ellipsis)){var m=this.state.start,y=this.state.startLoc;s=this.state.start,p.push(this.parseParenItem(this.parseRest(),m,y)),this.match(u.comma)&&this.lookahead().type===u.parenR&&this.raise(this.state.start,"A trailing comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,f,this.parseParenItem,d))}var v=this.state.start,T=this.state.startLoc;this.expect(u.parenR),this.state.maybeInArrowParameters=i;var g=this.startNodeAt(n,r);if(e&&this.shouldParseArrow()&&(g=this.parseArrow(g))){for(var S=0;S1?((t=this.startNodeAt(l,c)).expressions=p,this.toReferencedList(t.expressions),this.finishNodeAt(t,"SequenceExpression",v,T)):t=p[0],this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",n),t},n.shouldParseArrow=function(){return!this.canInsertSemicolon()},n.parseArrow=function(e){if(this.eat(u.arrow))return e},n.parseParenItem=function(e,t,n){return e},n.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(u.dot)){var n=this.parseMetaProperty(e,t,"target");if(!this.state.inFunction&&!this.state.inClassProperty){var r="new.target can only be used in functions";this.hasPlugin("classProperties")&&(r+=" or class properties"),this.raise(n.start,r)}return n}return e.callee=this.parseNoCallExpr(),"OptionalMemberExpression"!==e.callee.type&&"OptionalCallExpression"!==e.callee.type||this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"),this.eat(u.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(e),this.finishNode(e,"NewExpression")},n.parseNewArguments=function(e){if(this.eat(u.parenL)){var t=this.parseExprList(u.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]},n.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(u.backQuote),this.finishNode(t,"TemplateElement")},n.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement(e);for(t.quasis=[n];!n.tail;)this.expect(u.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(u.braceR),t.quasis.push(n=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},n.parseObj=function(e,t){var n=[],r=Object.create(null),i=!0,a=this.startNode();a.properties=[],this.next();for(var s=null;!this.eat(u.braceR);){if(i)i=!1;else if(this.expect(u.comma),this.eat(u.braceR))break;if(this.match(u.at))if(this.hasPlugin("decorators"))this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");else for(;this.match(u.at);)n.push(this.parseDecorator());var o=this.startNode(),l=!1,c=!1,p=void 0,f=void 0;if(n.length&&(o.decorators=n,n=[]),this.match(u.ellipsis)){if(this.expectPlugin("objectRestSpread"),o=this.parseSpread(e?{start:0}:void 0),e&&this.toAssignable(o,!0,"object pattern"),a.properties.push(o),!e)continue;var d=this.state.start;if(null!==s)this.unexpected(s,"Cannot have multiple rest elements when destructuring");else{if(this.eat(u.braceR))break;if(!this.match(u.comma)||this.lookahead().type!==u.braceR){s=d;continue}this.unexpected(d,"A trailing comma is not permitted after the rest element")}}o.method=!1,(e||t)&&(p=this.state.start,f=this.state.startLoc),e||(l=this.eat(u.star));var h=this.state.containsEsc;if(!e&&this.isContextual("async")){l&&this.unexpected();var m=this.parseIdentifier();this.match(u.colon)||this.match(u.parenL)||this.match(u.braceR)||this.match(u.eq)||this.match(u.comma)?(o.key=m,o.computed=!1):(c=!0,this.match(u.star)&&(this.expectPlugin("asyncGenerators"),this.next(),l=!0),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,p,f,l,c,e,t,h),this.checkPropClash(o,r),o.shorthand&&this.addExtra(o,"shorthand",!0),a.properties.push(o)}return null!==s&&this.unexpected(s,"The rest element has to be the last element when destructuring"),n.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(a,e?"ObjectPattern":"ObjectExpression")},n.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(u.string)||this.match(u.num)||this.match(u.bracketL)||this.match(u.name)||!!this.state.type.keyword)},n.checkGetterSetterParams=function(e){var t="get"===e.kind?0:1,n=e.start;e.params.length!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.params[0].type&&this.raise(n,"setter function argument must not be a rest parameter")},n.parseObjectMethod=function(e,t,n,r,i){return n||t||this.match(u.parenL)?(r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,"ObjectMethod")):!i&&this.isGetterOrSetterMethod(e,r)?((t||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):void 0},n.parseObjectProperty=function(e,t,n,r,i){return e.shorthand=!1,this.eat(u.colon)?(e.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),r?e.value=this.parseMaybeDefault(t,n,e.key.__clone()):this.match(u.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,n,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},n.parseObjPropValue=function(e,t,n,r,i,a,s,o){var l=this.parseObjectMethod(e,r,i,a,o)||this.parseObjectProperty(e,t,n,a,s);return l||this.unexpected(),l},n.parsePropertyName=function(e){if(this.eat(u.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR);else{var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(u.num)||this.match(u.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==e.key.type&&(e.computed=!1),this.state.inPropertyName=t}return e.key},n.initFunction=function(e,t){e.id=null,e.generator=!1,e.async=!!t},n.parseMethod=function(e,t,n,r,i){var a=this.state.inFunction,s=this.state.inMethod,o=this.state.inGenerator;this.state.inFunction=!0,this.state.inMethod=e.kind||!0,this.state.inGenerator=t,this.initFunction(e,n),e.generator=!!t;var l=r;return this.parseFunctionParams(e,l),this.parseFunctionBodyAndFinish(e,i),this.state.inFunction=a,this.state.inMethod=s,this.state.inGenerator=o,e},n.parseArrowExpression=function(e,t,n){this.state.yieldInPossibleArrowParameters&&this.raise(this.state.yieldInPossibleArrowParameters.start,"yield is not allowed in the parameters of an arrow function inside a generator");var r=this.state.inFunction;this.state.inFunction=!0,this.initFunction(e,n),t&&this.setArrowFunctionParameters(e,t);var i=this.state.inGenerator,a=this.state.maybeInArrowParameters;return this.state.inGenerator=!1,this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.state.inGenerator=i,this.state.inFunction=r,this.state.maybeInArrowParameters=a,this.finishNode(e,"ArrowFunctionExpression")},n.setArrowFunctionParameters=function(e,t){e.params=this.toAssignableList(t,!0,"arrow function parameters")},n.isStrictBody=function(e){if("BlockStatement"===e.body.type&&e.body.directives.length)for(var t=0,n=e.body.directives;t0)for(var t=0,n=e.body.body;t=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?60===n&&this.state.exprAllowed?(++this.state.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.state.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:D(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},n.jsxReadNewLine=function(e){var t,n=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===n&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,t},n.jsxReadString=function(e){for(var t="",n=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):D(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}return t+=this.input.slice(n,this.state.pos++),this.finishToken(u.string,t)},n.jsxReadEntity=function(){for(var e,t="",n=0,r=this.input[this.state.pos],i=++this.state.pos;this.state.pos"):!R(i)&&R(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+B(i.name)+">"):R(i)||R(a)||B(a.name)!==B(i.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+B(i.name)+">")}return R(i)?(n.openingFragment=i,n.closingFragment=a):(n.openingElement=i,n.closingElement=a),n.children=r,this.match(u.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(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")},n.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)},n.parseExprAtom=function(t){return this.match(u.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(u.jsxTagStart)?this.jsxParseElement():e.prototype.parseExprAtom.call(this,t)},n.readToken=function(t){if(this.state.inPropertyName)return e.prototype.readToken.call(this,t);var n=this.curContext();if(n===F.j_expr)return this.jsxReadToken();if(n===F.j_oTag||n===F.j_cTag){if(b(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(u.jsxTagEnd);if((34===t||39===t)&&n===F.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(u.jsxTagStart)):e.prototype.readToken.call(this,t)},n.updateContext=function(t){if(this.match(u.braceL)){var n=this.curContext();n===F.j_oTag?this.state.context.push(F.braceExpression):n===F.j_expr?this.state.context.push(F.templateQuasi):e.prototype.updateContext.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(u.slash)||t!==u.jsxTagStart)return e.prototype.updateContext.call(this,t);this.state.context.length-=2,this.state.context.push(F.j_cTag),this.state.exprAllowed=!1}},t}(e)},flow:function(e){return function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).flowPragma=void 0,r}i(t,e);var n=t.prototype;return n.shouldParseTypes=function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma},n.addComment=function(t){if(void 0===this.flowPragma){var n=N.exec(t.value);if(n)if("flow"===n[1])this.flowPragma="flow";else{if("noflow"!==n[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else this.flowPragma=null}return e.prototype.addComment.call(this,t)},n.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||u.colon);var n=this.flowParseType();return this.state.inType=t,n},n.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,n=this.state.start;this.expect(u.modulo);var r=this.state.startLoc;return this.expectContextual("checks"),t.line===r.line&&t.column===r.column-1||this.raise(n,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(u.parenL)?(e.value=this.parseExpression(),this.expect(u.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},n.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(u.colon);var t=null,n=null;return this.match(u.modulo)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(u.modulo)&&(n=this.flowParsePredicate())),[t,n]},n.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},n.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(u.parenL);var i=this.flowParseFunctionTypeParams();n.params=i.params,n.rest=i.rest,this.expect(u.parenR);var a=this.flowParseTypeAndPredicateInitialiser();return n.returnType=a[0],e.predicate=a[1],r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},n.flowParseDeclare=function(e,t){if(this.match(u._class))return this.flowParseDeclareClass(e);if(this.match(u._function))return this.flowParseDeclareFunction(e);if(this.match(u._var))return this.flowParseDeclareVariable(e);if(this.isContextual("module"))return this.lookahead().type===u.dot?this.flowParseDeclareModuleExports(e):(t&&this.unexpected(null,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(e));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual("interface"))return this.flowParseDeclareInterface(e);if(this.match(u._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()},n.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.semicolon(),this.finishNode(e,"DeclareVariable")},n.flowParseDeclareModule=function(e){var t=this;this.next(),this.match(u.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var n=e.body=this.startNode(),r=n.body=[];for(this.expect(u.braceL);!this.match(u.braceR);){var i=this.startNode();if(this.match(u._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(i)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),i=this.flowParseDeclare(i,!0);r.push(i)}this.expect(u.braceR),this.finishNode(n,"BlockStatement");var s=null,o=!1,l="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 r.forEach(function(e){!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(o&&t.unexpected(e.start,"Duplicate `declare module.exports` statement"),"ES"===s&&t.unexpected(e.start,l),s="CommonJS",o=!0):("CommonJS"===s&&t.unexpected(e.start,l),s="ES")}),e.kind=s||"CommonJS",this.finishNode(e,"DeclareModule")},n.flowParseDeclareExportDeclaration=function(e,t){if(this.expect(u._export),this.eat(u._default))return this.match(u._function)||this.match(u._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(u._const)||this.match(u._let)||(this.isContextual("type")||this.isContextual("interface"))&&!t){var n=this.state.value,r=k[n];this.unexpected(this.state.start,"`declare export "+n+"` is not supported. Use `"+r+"` instead")}if(this.match(u._var)||this.match(u._function)||this.match(u._class)||this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(u.star)||this.match(u.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(e=this.parseExport(e)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()},n.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(u.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},n.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},n.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},n.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},n.flowParseInterfaceish=function(e,t){if(void 0===t&&(t=!1),e.id=this.flowParseRestrictedIdentifier(!t),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(u._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(u.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma))}e.body=this.flowParseObjectType(t,!1,!1,t)},n.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},n.flowParseInterface=function(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")},n.checkReservedType=function(e,t){P.indexOf(e)>-1&&this.raise(t,"Cannot overwrite primitive type "+e)},n.flowParseRestrictedIdentifier=function(e){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(e)},n.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(u.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},n.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(u.colon)&&(e.supertype=this.flowParseTypeInitialiser(u.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(u.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},n.flowParseTypeParameter=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!1),!e&&t)throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).");var n=this.state.start,r=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=i,r.bound=a.typeAnnotation,this.match(u.eq)?e?(this.eat(u.eq),r.default=this.flowParseType()):this.unexpected():t&&this.unexpected(n,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(r,"TypeParameter")},n.flowParseTypeParameterDeclaration=function(e){void 0===e&&(e=!0);var t=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.isRelational("<")||this.match(u.jsxTagStart)?this.next():this.unexpected();var r=!1;do{var i=this.flowParseTypeParameter(e,r);n.params.push(i),i.default&&(r=!0),this.isRelational(">")||this.expect(u.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(n,"TypeParameterDeclaration")},n.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(u.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},n.flowParseInterfaceType=function(){var e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(u._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(u.comma));return e.body=this.flowParseObjectType(!1,!1,!1,!1),this.finishNode(e,"InterfaceTypeAnnotation")},n.flowParseObjectPropertyKey=function(){return this.match(u.num)||this.match(u.string)?this.parseExprAtom():this.parseIdentifier(!0)},n.flowParseObjectTypeIndexer=function(e,t,n){return e.static=t,this.lookahead().type===u.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(u.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")},n.flowParseObjectTypeInternalSlot=function(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(u.bracketR),this.expect(u.bracketR),this.isRelational("<")||this.match(u.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(u.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")},n.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration(!1)),this.expect(u.parenL);!this.match(u.parenR)&&!this.match(u.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(u.parenR)||this.expect(u.comma);return this.eat(u.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(u.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},n.flowParseObjectTypeCallProperty=function(e,t){var n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")},n.flowParseObjectType=function(e,t,n,r){var i=this.state.inType;this.state.inType=!0;var a,s,o=this.startNode();for(o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[],t&&this.match(u.braceBarL)?(this.expect(u.braceBarL),a=u.braceBarR,s=!0):(this.expect(u.braceL),a=u.braceR,s=!1),o.exact=s;!this.match(a);){var l=!1,c=null,p=this.startNode();if(r&&this.isContextual("proto")){var f=this.lookahead();f.type!==u.colon&&f.type!==u.question&&(this.next(),c=this.state.start,e=!1)}if(e&&this.isContextual("static")){var d=this.lookahead();d.type!==u.colon&&d.type!==u.question&&(this.next(),l=!0)}var h=this.flowParseVariance();if(this.eat(u.bracketL))null!=c&&this.unexpected(c),this.eat(u.bracketL)?(h&&this.unexpected(h.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(p,l))):o.indexers.push(this.flowParseObjectTypeIndexer(p,l,h));else if(this.match(u.parenL)||this.isRelational("<"))null!=c&&this.unexpected(c),h&&this.unexpected(h.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(p,l));else{var m="init";if(this.isContextual("get")||this.isContextual("set")){var y=this.lookahead();y.type!==u.name&&y.type!==u.string&&y.type!==u.num||(m=this.state.value,this.next())}o.properties.push(this.flowParseObjectTypeProperty(p,l,c,h,m,n))}this.flowObjectTypeSemicolon()}this.expect(a);var v=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=i,v},n.flowParseObjectTypeProperty=function(e,t,n,r,i,a){if(this.match(u.ellipsis))return a||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),null!=n&&this.unexpected(n),r&&this.unexpected(r.start,"Spread properties cannot have variance"),this.expect(u.ellipsis),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty");e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=n,e.kind=i;var s=!1;return this.isRelational("<")||this.match(u.parenL)?(e.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(u.question)&&(s=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=s,this.finishNode(e,"ObjectTypeProperty")},n.flowCheckGetterSetterParams=function(e){var t="get"===e.kind?0:1,n=e.start;e.value.params.length+(e.value.rest?1:0)!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&e.value.rest&&this.raise(n,"setter function argument must not be a rest parameter")},n.flowObjectTypeSemicolon=function(){this.eat(u.semi)||this.eat(u.comma)||this.match(u.braceR)||this.match(u.braceBarR)||this.unexpected()},n.flowParseQualifiedTypeIdentifier=function(e,t,n){e=e||this.state.start,t=t||this.state.startLoc;for(var r=n||this.parseIdentifier();this.eat(u.dot);){var i=this.startNodeAt(e,t);i.qualification=r,i.id=this.parseIdentifier(),r=this.finishNode(i,"QualifiedTypeIdentifier")}return r},n.flowParseGenericType=function(e,t,n){var r=this.startNodeAt(e,t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t,n),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")},n.flowParseTypeofType=function(){var e=this.startNode();return this.expect(u._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},n.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(u.bracketL);this.state.pos0){var T=c.concat();if(v.length>0){this.state=l,this.state.noArrowAt=T;for(var g=0;g1&&this.raise(l.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),h&&1===y.length){this.state=l,this.state.noArrowAt=T.concat(y[0].start);var b=this.tryParseConditionalConsequent();d=b.consequent,h=b.failed}this.getArrowLikeExpressions(d,!0)}return this.state.noArrowAt=c,this.expect(u.colon),p.test=t,p.consequent=d,p.alternate=this.forwardNoArrowParamsConversionAt(p,function(){return s.parseMaybeAssign(n,void 0,void 0,void 0)}),this.finishNode(p,"ConditionalExpression")},n.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var e=this.parseMaybeAssign(),t=!this.match(u.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}},n.getArrowLikeExpressions=function(t,n){for(var r=this,i=[t],a=[];0!==i.length;){var s=i.pop();"ArrowFunctionExpression"===s.type?(s.typeParameters||!s.returnType?(this.toAssignableList(s.params,!0,"arrow function parameters"),e.prototype.checkFunctionNameAndParams.call(this,s,!0)):a.push(s),i.push(s.body)):"ConditionalExpression"===s.type&&(i.push(s.consequent),i.push(s.alternate))}if(n){for(var o=0;o")}throw new Error("Unreachable")},n.tsParseList=function(e,t){for(var n=[];!this.tsIsListTerminator(e);)n.push(t());return n},n.tsParseDelimitedList=function(e,t){return ne(this.tsParseDelimitedListWorker(e,t,!0))},n.tsTryParseDelimitedList=function(e,t){return this.tsParseDelimitedListWorker(e,t,!1)},n.tsParseDelimitedListWorker=function(e,t,n){for(var r=[];!this.tsIsListTerminator(e);){var i=t();if(null==i)return;if(r.push(i),!this.eat(u.comma)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(u.comma))}}return r},n.tsParseBracketedList=function(e,t,n,r){r||(n?this.expect(u.bracketL):this.expectRelational("<"));var i=this.tsParseDelimitedList(e,t);return n?this.expect(u.bracketR):this.expectRelational(">"),i},n.tsParseEntityName=function(e){for(var t=this.parseIdentifier();this.eat(u.dot);){var n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(e),t=this.finishNode(n,"TSQualifiedName")}return t},n.tsParseTypeReference=function(){var e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")},n.tsParseThisTypePredicate=function(e){this.next();var t=this.startNode();return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(t,"TSTypePredicate")},n.tsParseThisTypeNode=function(){var e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")},n.tsParseTypeQuery=function(){var e=this.startNode();return this.expect(u._typeof),e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")},n.tsParseTypeParameter=function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(u._extends),e.default=this.tsEatThenParseType(u.eq),this.finishNode(e,"TSTypeParameter")},n.tsTryParseTypeParameters=function(){if(this.isRelational("<"))return this.tsParseTypeParameters()},n.tsParseTypeParameters=function(){var e=this.startNode();return this.isRelational("<")||this.match(u.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(e,"TSTypeParameterDeclaration")},n.tsFillSignature=function(e,t){var n=e===u.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(u.parenL),t.parameters=this.tsParseBindingListForSignature(),n?t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))},n.tsParseBindingListForSignature=function(){var e=this;return this.parseBindingList(u.parenR).map(function(t){if("Identifier"!==t.type&&"RestElement"!==t.type)throw e.unexpected(t.start,"Name in a signature must be an Identifier.");return t})},n.tsParseTypeMemberSemicolon=function(){this.eat(u.comma)||this.semicolon()},n.tsParseSignatureMember=function(e){var t=this.startNode();return"TSConstructSignatureDeclaration"===e&&this.expect(u._new),this.tsFillSignature(u.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)},n.tsIsUnambiguouslyIndexSignature=function(){return this.next(),this.eat(u.name)&&this.match(u.colon)},n.tsTryParseIndexSignature=function(e){if(this.match(u.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(u.bracketL);var t=this.parseIdentifier();this.expect(u.colon),t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.expect(u.bracketR),e.parameters=[t];var n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}},n.tsParsePropertyOrMethodSignature=function(e,t){this.parsePropertyName(e),this.eat(u.question)&&(e.optional=!0);var n=e;if(t||!this.match(u.parenL)&&!this.isRelational("<")){var r=n;t&&(r.readonly=!0);var i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}var a=n;return this.tsFillSignature(u.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")},n.tsParseTypeMember=function(){if(this.match(u.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration");if(this.match(u._new)&&this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this)))return this.tsParseSignatureMember("TSConstructSignatureDeclaration");var e=this.startNode(),t=!!this.tsParseModifier(["readonly"]),n=this.tsTryParseIndexSignature(e);return n?(t&&(e.readonly=!0),n):this.tsParsePropertyOrMethodSignature(e,t)},n.tsIsStartOfConstructSignature=function(){return this.next(),this.match(u.parenL)||this.isRelational("<")},n.tsParseTypeLiteral=function(){var e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")},n.tsParseObjectTypeMembers=function(){this.expect(u.braceL);var e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(u.braceR),e},n.tsIsStartOfMappedType=function(){return this.next(),this.eat(u.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(u.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(u._in))))},n.tsParseMappedTypeParameter=function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(u._in),this.finishNode(e,"TSTypeParameter")},n.tsParseMappedType=function(){var e=this.startNode();return this.expect(u.braceL),this.match(u.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(u.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),this.expect(u.bracketR),this.match(u.plusMin)?(e.optional=this.state.value,this.next(),this.expect(u.question)):this.eat(u.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(u.braceR),this.finishNode(e,"TSMappedType")},n.tsParseTupleType=function(){var e=this.startNode();return e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseType.bind(this),!0,!1),this.finishNode(e,"TSTupleType")},n.tsParseParenthesizedType=function(){var e=this.startNode();return this.expect(u.parenL),e.typeAnnotation=this.tsParseType(),this.expect(u.parenR),this.finishNode(e,"TSParenthesizedType")},n.tsParseFunctionOrConstructorType=function(e){var t=this.startNode();return"TSConstructorType"===e&&this.expect(u._new),this.tsFillSignature(u.arrow,t),this.finishNode(t,e)},n.tsParseLiteralTypeNode=function(){var e=this,t=this.startNode();return t.literal=function(){switch(e.state.type){case u.num:return e.parseLiteral(e.state.value,"NumericLiteral");case u.string:return e.parseLiteral(e.state.value,"StringLiteral");case u._true:case u._false:return e.parseBooleanLiteral();default:throw e.unexpected()}}(),this.finishNode(t,"TSLiteralType")},n.tsParseNonArrayType=function(){switch(this.state.type){case u.name:case u._void:case u._null:var e=this.match(u._void)?"TSVoidKeyword":this.match(u._null)?"TSNullKeyword":function(e){switch(e){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";default:return}}(this.state.value);if(void 0!==e&&this.lookahead().type!==u.dot){var t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference();case u.string:case u.num:case u._true:case u._false:return this.tsParseLiteralTypeNode();case u.plusMin:if("-"===this.state.value){var n=this.startNode();if(this.next(),!this.match(u.num))throw this.unexpected();return n.literal=this.parseLiteral(-this.state.value,"NumericLiteral",n.start,n.loc.start),this.finishNode(n,"TSLiteralType")}break;case u._this:var r=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r;case u._typeof:return this.tsParseTypeQuery();case u.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case u.bracketL:return this.tsParseTupleType();case u.parenL:return this.tsParseParenthesizedType()}throw this.unexpected()},n.tsParseArrayTypeOrHigher=function(){for(var e=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(u.bracketL);)if(this.match(u.bracketR)){var t=this.startNodeAtNode(e);t.elementType=e,this.expect(u.bracketR),e=this.finishNode(t,"TSArrayType")}else{var n=this.startNodeAtNode(e);n.objectType=e,n.indexType=this.tsParseType(),this.expect(u.bracketR),e=this.finishNode(n,"TSIndexedAccessType")}return e},n.tsParseTypeOperator=function(e){var t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),this.finishNode(t,"TSTypeOperator")},n.tsParseInferType=function(){var e=this.startNode();this.expectContextual("infer");var t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")},n.tsParseTypeOperatorOrHigher=function(){var e=this,t=["keyof","unique"].find(function(t){return e.isContextual(t)});return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()},n.tsParseUnionOrIntersectionType=function(e,t,n){this.eat(n);var r=t();if(this.match(n)){for(var i=[r];this.eat(n);)i.push(t());var a=this.startNodeAtNode(r);a.types=i,r=this.finishNode(a,e)}return r},n.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),u.bitwiseAND)},n.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),u.bitwiseOR)},n.tsIsStartOfFunctionType=function(){return!!this.isRelational("<")||this.match(u.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},n.tsSkipParameterStart=function(){return!(!this.match(u.name)&&!this.match(u._this)||(this.next(),0))},n.tsIsUnambiguouslyStartOfFunctionType=function(){if(this.next(),this.match(u.parenR)||this.match(u.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(u.colon)||this.match(u.comma)||this.match(u.question)||this.match(u.eq))return!0;if(this.match(u.parenR)&&(this.next(),this.match(u.arrow)))return!0}return!1},n.tsParseTypeOrTypePredicateAnnotation=function(e){var t=this;return this.tsInType(function(){var n=t.startNode();t.expect(e);var r=t.tsIsIdentifier()&&t.tsTryParse(t.tsParseTypePredicatePrefix.bind(t));if(!r)return t.tsParseTypeAnnotation(!1,n);var i=t.tsParseTypeAnnotation(!1),a=t.startNodeAtNode(r);return a.parameterName=r,a.typeAnnotation=i,n.typeAnnotation=t.finishNode(a,"TSTypePredicate"),t.finishNode(n,"TSTypeAnnotation")})},n.tsTryParseTypeOrTypePredicateAnnotation=function(){return this.match(u.colon)?this.tsParseTypeOrTypePredicateAnnotation(u.colon):void 0},n.tsTryParseTypeAnnotation=function(){return this.match(u.colon)?this.tsParseTypeAnnotation():void 0},n.tsTryParseType=function(){return this.tsEatThenParseType(u.colon)},n.tsParseTypePredicatePrefix=function(){var e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e},n.tsParseTypeAnnotation=function(e,t){var n=this;return void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),this.tsInType(function(){e&&n.expect(u.colon),t.typeAnnotation=n.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")},n.tsParseType=function(){re(this.state.inType);var e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(u._extends))return e;var t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(u.question),t.trueType=this.tsParseType(),this.expect(u.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")},n.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(u._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()},n.tsParseTypeAssertion=function(){var e=this,t=this.startNode();return t.typeAnnotation=this.tsInType(function(){return e.tsParseType()}),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")},n.tsParseHeritageClause=function(){return this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this))},n.tsParseExpressionWithTypeArguments=function(){var e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")},n.tsParseInterfaceDeclaration=function(e){e.id=this.parseIdentifier(),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(u._extends)&&(e.extends=this.tsParseHeritageClause());var t=this.startNode();return t.body=this.tsParseObjectTypeMembers(),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")},n.tsParseTypeAliasDeclaration=function(e){return e.id=this.parseIdentifier(),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsExpectThenParseType(u.eq),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")},n.tsInNoContext=function(e){var t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}},n.tsInType=function(e){var t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}},n.tsEatThenParseType=function(e){return this.match(e)?this.tsNextThenParseType():void 0},n.tsExpectThenParseType=function(e){var t=this;return this.tsDoThenParseType(function(){return t.expect(e)})},n.tsNextThenParseType=function(){var e=this;return this.tsDoThenParseType(function(){return e.next()})},n.tsDoThenParseType=function(e){var t=this;return this.tsInType(function(){return e(),t.tsParseType()})},n.tsParseEnumMember=function(){var e=this.startNode();return e.id=this.match(u.string)?this.parseLiteral(this.state.value,"StringLiteral"):this.parseIdentifier(!0),this.eat(u.eq)&&(e.initializer=this.parseMaybeAssign()),this.finishNode(e,"TSEnumMember")},n.tsParseEnumDeclaration=function(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.expect(u.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(u.braceR),this.finishNode(e,"TSEnumDeclaration")},n.tsParseModuleBlock=function(){var e=this.startNode();return this.expect(u.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,u.braceR),this.finishNode(e,"TSModuleBlock")},n.tsParseModuleOrNamespaceDeclaration=function(e){if(e.id=this.parseIdentifier(),this.eat(u.dot)){var t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t),e.body=t}else e.body=this.tsParseModuleBlock();return this.finishNode(e,"TSModuleDeclaration")},n.tsParseAmbientExternalModuleDeclaration=function(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(u.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(u.braceL)?e.body=this.tsParseModuleBlock():this.semicolon(),this.finishNode(e,"TSModuleDeclaration")},n.tsParseImportEqualsDeclaration=function(e,t){return e.isExport=t||!1,e.id=this.parseIdentifier(),this.expect(u.eq),e.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")},n.tsIsExternalModuleReference=function(){return this.isContextual("require")&&this.lookahead().type===u.parenL},n.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},n.tsParseExternalModuleReference=function(){var e=this.startNode();if(this.expectContextual("require"),this.expect(u.parenL),!this.match(u.string))throw this.unexpected();return e.expression=this.parseLiteral(this.state.value,"StringLiteral"),this.expect(u.parenR),this.finishNode(e,"TSExternalModuleReference")},n.tsLookAhead=function(e){var t=this.state.clone(),n=e();return this.state=t,n},n.tsTryParseAndCatch=function(e){var t=this.state.clone();try{return e()}catch(e){if(e instanceof SyntaxError)return void(this.state=t);throw e}},n.tsTryParse=function(e){var t=this.state.clone(),n=e();return void 0!==n&&!1!==n?n:void(this.state=t)},n.nodeWithSamePosition=function(e,t){var n=this.startNodeAtNode(e);return n.type=t,n.end=e.end,n.loc.end=e.loc.end,e.leadingComments&&(n.leadingComments=e.leadingComments),e.trailingComments&&(n.trailingComments=e.trailingComments),e.innerComments&&(n.innerComments=e.innerComments),n},n.tsTryParseDeclare=function(e){switch(this.state.type){case u._function:return this.next(),this.parseFunction(e,!0);case u._class:return this.parseClass(e,!0,!1);case u._const:if(this.match(u._const)&&this.isLookaheadContextual("enum"))return this.expect(u._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0);case u._var:case u._let:return this.parseVarStatement(e,this.state.type);case u.name:var t=this.state.value;return"global"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}},n.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)},n.tsParseExpressionStatement=function(e,t){switch(t.name){case"declare":var n=this.tsTryParseDeclare(e);if(n)return n.declare=!0,n;break;case"global":if(this.match(u.braceL)){var r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}},n.tsParseDeclaration=function(e,t,n){switch(t){case"abstract":if(n||this.match(u._class)){var r=e;return r.abstract=!0,n&&this.next(),this.parseClass(r,!0,!1)}break;case"enum":if(n||this.match(u.name))return n&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(n||this.match(u.name))return n&&this.next(),this.tsParseInterfaceDeclaration(e);break;case"module":if(n&&this.next(),this.match(u.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(n||this.match(u.name))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"namespace":if(n||this.match(u.name))return n&&this.next(),this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(n||this.match(u.name))return n&&this.next(),this.tsParseTypeAliasDeclaration(e)}},n.tsTryParseGenericAsyncArrowFunction=function(t,n){var r=this,i=this.tsTryParseAndCatch(function(){var i=r.startNodeAt(t,n);return i.typeParameters=r.tsParseTypeParameters(),e.prototype.parseFunctionParams.call(r,i),i.returnType=r.tsTryParseTypeOrTypePredicateAnnotation(),r.expect(u.arrow),i});if(i)return i.id=null,i.generator=!1,i.expression=!0,i.async=!0,this.parseFunctionBody(i,!0),this.finishNode(i,"ArrowFunctionExpression")},n.tsParseTypeArguments=function(){var e=this,t=this.startNode();return t.params=this.tsInType(function(){return e.tsInNoContext(function(){return e.expectRelational("<"),e.tsParseDelimitedList("TypeParametersOrArguments",e.tsParseType.bind(e))})}),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")},n.tsIsDeclarationStart=function(){if(this.match(u.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1},n.isExportDefaultSpecifier=function(){return!this.tsIsDeclarationStart()&&e.prototype.isExportDefaultSpecifier.call(this)},n.parseAssignableListItem=function(e,t){var n,r=!1;e&&(n=this.parseAccessModifier(),r=!!this.tsParseModifier(["readonly"]));var i=this.parseMaybeDefault();this.parseAssignableListItemTypes(i);var a=this.parseMaybeDefault(i.start,i.loc.start,i);if(n||r){var s=this.startNodeAtNode(a);if(t.length&&(s.decorators=t),n&&(s.accessibility=n),r&&(s.readonly=r),"Identifier"!==a.type&&"AssignmentPattern"!==a.type)throw this.raise(s.start,"A parameter property may not be declared using a binding pattern.");return s.parameter=a,this.finishNode(s,"TSParameterProperty")}return t.length&&(i.decorators=t),a},n.parseFunctionBodyAndFinish=function(t,n,r){!r&&this.match(u.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(u.colon));var i="FunctionDeclaration"===n?"TSDeclareFunction":"ClassMethod"===n?"TSDeclareMethod":void 0;i&&!this.match(u.braceL)&&this.isLineTerminator()?this.finishNode(t,i):e.prototype.parseFunctionBodyAndFinish.call(this,t,n,r)},n.parseSubscript=function(t,n,r,i,a){var s=this;if(!this.hasPrecedingLineBreak()&&this.match(u.bang)){this.state.exprAllowed=!1,this.next();var o=this.startNodeAt(n,r);return o.expression=t,this.finishNode(o,"TSNonNullExpression")}var l=this.tsTryParseAndCatch(function(){if(s.isRelational("<")){if(!i&&s.atPossibleAsync(t)){var e=s.tsTryParseGenericAsyncArrowFunction(n,r);if(e)return e}var o=s.startNodeAt(n,r);o.callee=t;var l=s.tsParseTypeArguments();if(l){if(!i&&s.eat(u.parenL))return o.arguments=s.parseCallExpressionArguments(u.parenR,!1),o.typeParameters=l,s.finishCallExpression(o);if(s.match(u.backQuote))return s.parseTaggedTemplateExpression(n,r,t,a,l)}}s.unexpected()});return l||e.prototype.parseSubscript.call(this,t,n,r,i,a)},n.parseNewArguments=function(t){var n=this;if(this.isRelational("<")){var r=this.tsTryParseAndCatch(function(){var e=n.tsParseTypeArguments();return n.match(u.parenL)||n.unexpected(),e});r&&(t.typeParameters=r)}e.prototype.parseNewArguments.call(this,t)},n.parseExprOp=function(t,n,r,i,a){if(ne(u._in.binop)>i&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var s=this.startNodeAt(n,r);return s.expression=t,s.typeAnnotation=this.tsNextThenParseType(),this.finishNode(s,"TSAsExpression"),this.parseExprOp(s,n,r,i,a)}return e.prototype.parseExprOp.call(this,t,n,r,i,a)},n.checkReservedWord=function(e,t,n,r){},n.checkDuplicateExports=function(){},n.parseImport=function(t){return this.match(u.name)&&this.lookahead().type===u.eq?this.tsParseImportEqualsDeclaration(t):e.prototype.parseImport.call(this,t)},n.parseExport=function(t){if(this.match(u._import))return this.expect(u._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(u.eq)){var n=t;return n.expression=this.parseExpression(),this.semicolon(),this.finishNode(n,"TSExportAssignment")}if(this.eatContextual("as")){var r=t;return this.expectContextual("namespace"),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}return e.prototype.parseExport.call(this,t)},n.isAbstractClass=function(){return this.isContextual("abstract")&&this.lookahead().type===u._class},n.parseExportDefaultExpression=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 n=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(n)return n}return e.prototype.parseExportDefaultExpression.call(this)},n.parseStatementContent=function(t,n){if(this.state.type===u._const){var r=this.lookahead();if(r.type===u.name&&"enum"===r.value){var i=this.startNode();return this.expect(u._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(i,!0)}}return e.prototype.parseStatementContent.call(this,t,n)},n.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},n.parseClassMember=function(t,n,r){var i=this.parseAccessModifier();i&&(n.accessibility=i),e.prototype.parseClassMember.call(this,t,n,r)},n.parseClassMemberWithIsStatic=function(t,n,r,i){var a=n,s=n,o=n,l=!1,u=!1;switch(this.tsParseModifier(["abstract","readonly"])){case"readonly":u=!0,l=!!this.tsParseModifier(["abstract"]);break;case"abstract":l=!0,u=!!this.tsParseModifier(["readonly"])}if(l&&(a.abstract=!0),u&&(o.readonly=!0),!l&&!i&&!a.accessibility){var c=this.tsTryParseIndexSignature(n);if(c)return void t.body.push(c)}if(u)return a.static=i,this.parseClassPropertyName(s),this.parsePostMemberNameModifiers(a),void this.pushClassProperty(t,s);e.prototype.parseClassMemberWithIsStatic.call(this,t,n,r,i)},n.parsePostMemberNameModifiers=function(e){this.eat(u.question)&&(e.optional=!0)},n.parseExpressionStatement=function(t,n){return("Identifier"===n.type?this.tsParseExpressionStatement(t,n):void 0)||e.prototype.parseExpressionStatement.call(this,t,n)},n.shouldParseExportDeclaration=function(){return!!this.tsIsDeclarationStart()||e.prototype.shouldParseExportDeclaration.call(this)},n.parseConditional=function(t,n,r,i,a){if(!a||!this.match(u.question))return e.prototype.parseConditional.call(this,t,n,r,i,a);var s=this.state.clone();try{return e.prototype.parseConditional.call(this,t,n,r,i)}catch(e){if(!(e instanceof SyntaxError))throw e;return this.state=s,a.start=e.pos||this.state.start,t}},n.parseParenItem=function(t,n,r){if(t=e.prototype.parseParenItem.call(this,t,n,r),this.eat(u.question)&&(t.optional=!0),this.match(u.colon)){var i=this.startNodeAt(n,r);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t},n.parseExportDeclaration=function(t){var n,r=this.eatContextual("declare");return this.match(u.name)&&(n=this.tsTryParseExportDeclaration()),n||(n=e.prototype.parseExportDeclaration.call(this,t)),n&&r&&(n.declare=!0),n},n.parseClassId=function(t,n,r){if(n&&!r||!this.isContextual("implements")){e.prototype.parseClassId.apply(this,arguments);var i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i)}},n.parseClassProperty=function(t){!t.optional&&this.eat(u.bang)&&(t.definite=!0);var n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),e.prototype.parseClassProperty.call(this,t)},n.pushClassMethod=function(t,n,r,i,a){var s=this.tsTryParseTypeParameters();s&&(n.typeParameters=s),e.prototype.pushClassMethod.call(this,t,n,r,i,a)},n.pushClassPrivateMethod=function(t,n,r,i){var a=this.tsTryParseTypeParameters();a&&(n.typeParameters=a),e.prototype.pushClassPrivateMethod.call(this,t,n,r,i)},n.parseClassSuper=function(t){e.prototype.parseClassSuper.call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause())},n.parseObjPropValue=function(t){var n;if(this.isRelational("<"))throw new Error("TODO");for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a1?t-1:0),r=1;rt.name?1:0}):e}function S(e,t){var n=null===t||void 0===t?void 0:t.storageKey;return"string"==typeof n?n:!e.args||0===e.args.length||e.args.some(function(e){return"Literal"!==e.kind})?null:p(e,{})}e.exports={generate:function(e){if("Root"!==e.kind&&"SplitOperation"!==e.kind)throw o("NormalizationCodeGenerator: Unsupported AST kind '".concat(e.kind,"'."),[e.loc]);return i.visit(e,y)}}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=n(48),a=n(17),s=n(6),o=n(10),l=o.createCompilerError,u=o.createUserError,c=n(1).GraphQLList,p=n(19),f=p.getStorageKey,d=p.stableCopy,h=s.getRawType,m=s.isAbstractType,y=s.getNullableType;var v={leave:{Request:function(e){throw l("ReaderCodeGenerator: unexpeted Request node.")},Fragment:function(e){var t=null;if(null!=e.metadata){var n,r,a,s,o=e.metadata,l=o.mask,u=o.plural,c=o.connection,p=o.refetch;if(Array.isArray(c))(t=null!==(n=t)&&void 0!==n?n:{}).connection=c;if("boolean"==typeof l)(t=null!==(r=t)&&void 0!==r?r:{}).mask=l;if("boolean"==typeof u)(t=null!==(a=t)&&void 0!==a?a:{}).plural=u;if("object"==typeof p)(t=null!==(s=t)&&void 0!==s?s:{}).refetch={connection:p.connection,operation:i.moduleDependency(p.operation+".graphql"),fragmentPathInResult:p.fragmentPathInResult}}return{kind:"Fragment",name:e.name,type:e.type.toString(),metadata:t,argumentDefinitions:e.argumentDefinitions,selections:e.selections}},LocalArgumentDefinition:function(e){return{kind:"LocalArgument",name:e.name,type:e.type.toString(),defaultValue:e.defaultValue}},RootArgumentDefinition:function(e){return{kind:"RootArgument",name:e.name,type:e.type?e.type.toString():null}},Condition:function(e,t,n,r){if("Variable"!==e.condition.kind)throw l("ReaderCodeGenerator: Expected 'Condition' with static value to be pruned or inlined",[e.condition.loc]);return{kind:"Condition",passingValue:e.passingValue,condition:e.condition.variableName,selections:e.selections}},FragmentSpread:function(e){return{kind:"FragmentSpread",name:e.name,args:T(g(e.args))}},InlineFragment:function(e){return{kind:"InlineFragment",type:e.typeCondition.toString(),selections:e.selections}},LinkedField:function(e){var t=h(e.type),n={kind:"LinkedField",alias:e.alias,name:e.name,storageKey:null,args:T(g(e.args)),concreteType:m(t)?null:t.toString(),plural:function(e){return y(e)instanceof c}(e.type),selections:e.selections},i=S(n,e.metadata);return i&&(n=(0,r.default)({},n,{storageKey:i})),n},MatchField:function(e,t,n,i){var a={};e.selections.forEach(function(t){var n;if("ScalarField"!==t.kind||"__typename"!==t.name){if("MatchBranch"!==t.kind)throw l("ReaderCodeGenerator: Expected selection for MatchField '".concat(e.name,"' to be a 'MatchBranch', got '").concat(t.kind,"'."),[t.loc]);if(a.hasOwnProperty(t.type))throw l("ReaderCodeGenerator: Each @match type can appear at-most once. "+"Type '".concat(String(t.type),"' was duplicated."),t.type,[t.loc]);var r=t.name,i=r.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:_([a-zA-Z][_a-zA-Z0-9]*))?$/);if(!i)throw l("ReaderCodeGenerator: @match fragments should be named "+"'FragmentName_propName', got '".concat(r,"'."),[t.loc]);var s=null!==(n=i[2])&&void 0!==n?n:"matchData";a[t.type]={fragmentPropName:s,fragmentName:r}}});var s={kind:"MatchField",alias:e.alias,name:e.name,storageKey:null,args:T(g(e.args)),matchesByType:a},o=S(s,e.metadata);return o&&(s=(0,r.default)({},s,{storageKey:o})),s},ScalarField:function(e){var t={kind:"ScalarField",alias:e.alias,name:e.name,args:T(g(e.args)),storageKey:null},n=S(t,e.metadata);return n&&(t=(0,r.default)({},t,{storageKey:n})),t},SplitOperation:function(e,t,n){return{kind:"SplitOperation",name:e.name,metadata:null,selections:e.selections}},Variable:function(e,t,n){return{kind:"Variable",name:n.name,variableName:e.variableName,type:n.type?n.type.toString():null}},Literal:function(e,t,n){return{kind:"Literal",name:n.name,value:d(e.value),type:n.type?n.type.toString():null}},Argument:function(e,t,n,r){if(!["Variable","Literal"].includes(e.value.kind)){JSON.stringify(e.value,null,2);throw u("ReaderCodeGenerator: Complex argument values (Lists or InputObjects with nested variables) are not supported.",[e.value.loc])}return null!==e.value.value?e.value:null}}};function T(e){return e&&0!==e.length?e:null}function g(e){return e instanceof Array?e.slice().sort(function(e,t){return e.namet.name?1:0}):e}function S(e,t){var n=null===t||void 0===t?void 0:t.storageKey;return"string"==typeof n?n:!e.args||0===e.args.length||e.args.some(function(e){return"Literal"!==e.kind})?null:f(e,{})}e.exports={generate:function(e){return a.visit(e,v)}}},function(e,t,n){"use strict";var r=n(0),i=n(15),a=r(n(7)),s=n(41),o=n(30),l=n(3),u=n(9),c=n(33),p=n(49),f=n(6),d=n(50),h=n(25),m=n(1),y=n(2),v=n(26),T=n(14),g=n(52),S=n(53).getReaderSourceDefinitionName,x=(n(20).Map,f.isExecutableDefinitionAST);e.exports={writeAll:function(e){var t=e.config,n=e.onlyValidate,r=e.baseDocuments,f=e.documents,b=e.schema,E=e.reporter,P=e.sourceControl;return u.asyncContext("RelayFileWriter.writeAll",i(function*(){var e=function(e){e.baseDir;var t=e.baseDocuments,n=e.baseSchema,r=e.compilerTransforms,i=e.documents,o=e.extraValidationRules,u=e.reporter,f=e.schemaExtensions,h=e.typeGenerator,m=s.transformASTSchema(n,f),y=s.extendASTSchema(m,(0,a.default)(t).concat((0,a.default)(i))),v=(0,a.default)(p.LOCAL_RULES).concat((0,a.default)(p.GLOBAL_RULES));o&&(v=(0,a.default)(v).concat((0,a.default)(o.LOCAL_RULES||[]),(0,a.default)(o.GLOBAL_RULES||[])));var T=s.convertASTDocumentsWithBase(y,t,i,v,c.transform),g=new l(n,y).addAll(T),S=g.applyTransforms(h.transforms,u),x=g.applyTransforms((0,a.default)(r.commonTransforms).concat((0,a.default)(r.queryTransforms)),u);return{artifacts:d(g,r,u),definitions:T,transformedQueryContext:x,transformedTypeContext:S}}({baseDir:t.baseDir,baseDocuments:r.valueSeq().toArray(),baseSchema:b,compilerTransforms:t.compilerTransforms,documents:f.valueSeq().toArray(),extraValidationRules:t.validationRules,reporter:E,schemaExtensions:t.schemaExtensions,typeGenerator:t.typeGenerator}),A=e.artifacts,w=e.definitions,k=e.transformedTypeContext,N=e.transformedQueryContext,_=new Set;r.forEach(function(e){e.definitions.forEach(function(e){x(e)&&e.name&&_.add(e.name.value)})});var C=A.filter(function(e){var t=S(e);return!_.has(t)}),O=new Map(C.map(function(e){return["Request"===e.kind?e.params.name:e.name,e]})),D=new Set(w.map(function(e){return e.name})),I=new Map,L=function(e){var t=v(O.get(e)),n=S(t),r=I.get(n);return r||y(!1),r};f.forEach(function(e,n){e.definitions.forEach(function(e){e.name&&I.set(e.name.value,{dir:T.join(t.baseDir,T.dirname(n)),ast:e})})}),_.forEach(function(e){D.delete(e)});var F,M=new Map,j=function(e){var t=new o(e,{onlyValidate:n});return M.set(e,t),t},R=!0,B=!1,V=void 0;try{for(var q,K=(t.generatedDirectories||[])[Symbol.iterator]();!(R=(q=K.next()).done);R=!0){var U=q.value;j(U)}}catch(e){B=!0,V=e}finally{try{R||null==K.return||K.return()}finally{if(B)throw V}}t.outputDir&&(F=j(t.outputDir));var J=function(e){if(F)return F;var t=T.join(L(e).dir,"__generated__"),n=M.get(t);return n||(n=j(t)),n},X=u.instrument(t.formatModule,"RelayFileWriter:formatModule"),Y=t.persistQuery?u.instrumentWait(t.persistQuery,"RelayFileWriter:persistQuery"):null;try{yield Promise.all(C.map(function(){var e=i(function*(e){var n="Request"===e.kind?e.params.name:e.name;if(!_.has(n)){var r=k.get(n),i=r?t.typeGenerator.generate(r,{customScalars:t.customScalars,enumsHasteModule:t.enumsHasteModule,existingFragmentNames:D,optionalInputFields:t.optionalInputFieldsForFlow,useHaste:t.useHaste,useSingleArtifactDirectory:!!t.outputDir,noFutureProofEnums:t.noFutureProofEnums}):"",a=u.run("hashGraphQL",function(){return function(e){return h.createHash("md5").update(e,"utf8").digest("hex")}(m.print(L(n).ast))});yield g(J(n),e,X,i,Y,t.platform,a,t.extension,t.printModuleDependency)}});return function(t){return e.apply(this,arguments)}}()));var W=t.generateExtraFiles;W&&u.run("RelayFileWriter:generateExtraFiles",function(){var e=t.outputDir;W(function(t){var n=t||e;n||y(!1);var r=M.get(n);return r||(r=j(n)),r},N,J)}),!0!==t.experimental_noDeleteExtraFiles&&M.forEach(function(e){e.deleteExtraFiles(t.experimental_extraFilesPatternToKeep)}),P&&!n&&(yield o.sourceControlAddRemove(P,Array.from(M.values())))}catch(e){var G;try{G=JSON.parse(e.message)}catch(e){}if(G&&"GraphQL2Exception"===G.name&&G.message)throw new Error("GraphQL error writing modules:\n"+G.message);throw new Error("Error writing modules:\n"+String(e.stack||e))}return M}))}}},function(e,t,n){"use strict";var r=n(6).getRawType,i=n(10).createCompilerError,a=n(1),s=a.assertAbstractType,o=a.GraphQLInterfaceType,l=a.GraphQLObjectType,u=a.GraphQLUnionType,c=a.isAbstractType,p=a.SchemaMetaFieldDef,f=a.TypeMetaFieldDef,d=a.TypeNameMetaFieldDef;function h(e,t,n,i){var a,s=r(t),c=s===e.getQueryType(),h=s instanceof l||s instanceof o||s instanceof u;return c&&n===p.name?a=p:c&&n===f.name?a=f:h&&n===d.name?a=d:(s instanceof o||s instanceof l)&&(a=s.getFields()[n]),a}function m(e){var t=e.name?e.name.value:null;if("string"!=typeof t)throw i("Expected ast node to have a 'name'.",null,[e]);return t}e.exports={getFieldDefinitionLegacy:function(e,t,n,i){var a=h(e,t,n);return a||(a=function(e,t,n,r){if(c(t)&&r&&r.directives&&r.directives.some(function(e){return"fixme_fat_interface"===m(e)})){for(var i,a=e.getPossibleTypes(s(t)),o=function(e){var t=a[e].getFields()[n];if(t&&(i=t,r&&r.arguments)){var s=r.arguments.every(function(e){return t.args.find(function(t){return t.name===m(e)})});if(s)return"break"}},l=0;l=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";e.exports=function(e){e=JSON.parse(JSON.stringify(e));var t=new Map,n=new WeakMap,r=[];!function e(r){if(null==r||"object"!=typeof r)return JSON.stringify(r);var i;if(Array.isArray(r)){i="[";for(var a=0;a2)r.isDuplicate=!0;else if(Array.isArray(t))for(var i=0;i0){var r=E(n.map(function(e){return y.genericTypeAnnotation(y.identifier(X(e)))}));t.push({key:"$fragmentRefs",conditional:!1,value:r})}return t}function U(e){var t=[];if(e.usedFragments.size>0){var n=Array.from(e.usedFragments).sort(),r=!0,i=!1,a=void 0;try{for(var s,o=n[Symbol.iterator]();!(r=(s=o.next()).done);r=!0){var l=s.value,u=X(l);e.generatedFragments.has(l)||(e.useHaste&&e.existingFragmentNames.has(l)?t.push(b([u],l+".graphql")):e.useSingleArtifactDirectory&&e.existingFragmentNames.has(l)?t.push(b([u],"./"+l+".graphql")):t.push(g(u)))}}catch(e){i=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(i)throw a}}}return t}function J(e){var t=e.enumsHasteModule,n=e.usedEnums,r=e.noFutureProofEnums,i=Object.keys(n).sort();return 0===i.length?[]:t?[b(i,t)]:i.map(function(e){var t=n[e].getValues().map(function(e){return e.value});return t.sort(),r||t.push("%future added value"),x(e,y.unionTypeAnnotation(t.map(function(e){return y.stringLiteralTypeAnnotation(e)})))})}function X(e){return"".concat(e,"$ref")}var Y=[d.transform,c.transform,p.transform,o.transformWithOptions({}),f.transform];e.exports={generate:u.instrument(function(e,t){var n=l.visit(e,function(e){var t={customScalars:e.customScalars,enumsHasteModule:e.enumsHasteModule,existingFragmentNames:e.existingFragmentNames,generatedFragments:new Set,generatedInputObjectTypes:{},optionalInputFields:e.optionalInputFields,usedEnums:{},usedFragments:new Set,useHaste:e.useHaste,useSingleArtifactDirectory:e.useSingleArtifactDirectory,noFutureProofEnums:e.noFutureProofEnums},n=!1;return{leave:{Root:function(e){var r=function(e,t){return x("".concat(e.name,"Variables"),S(e.argumentDefinitions.map(function(e){var n=y.objectTypeProperty(y.identifier(e.name),C(e.type,t));return e.type instanceof D||(n.optional=!0),n})))}(e,t),i=function(e){return Object.keys(e.generatedInputObjectTypes).map(function(t){var n=e.generatedInputObjectTypes[t];return"string"==typeof n&&h(!1),x(t,n)})}(t),s=x("".concat(e.name,"Response"),j(e.selections,t,!1)),o=x(e.name,S([y.objectTypeProperty(y.identifier("variables"),y.genericTypeAnnotation(y.identifier("".concat(e.name,"Variables")))),y.objectTypeProperty(y.identifier("response"),y.genericTypeAnnotation(y.identifier("".concat(e.name,"Response"))))])),l=[];return n&&l.push("MatchPointer"),y.program((0,a.default)(U(t)).concat((0,a.default)(J(t)),[l.length?b(l,"relay-runtime"):null],(0,a.default)(i),[r,s,o]).filter(Boolean))},Fragment:function(e){var r=q(e.selections),s=r.filter(function(e){return e.concreteType}).length;r=r.map(function(t){return s<=1&&L(t)&&!v(e.type)?[(0,i.default)({},t,{concreteType:e.type.toString()})]:[t]}),t.generatedFragments.add(e.name);var o=X(e.name),l=y.declareExportDeclaration(y.declareOpaqueType(y.identifier(o),null,y.genericTypeAnnotation(y.identifier("FragmentReference")))),u=e.metadata&&!1===e.metadata.mask,c=j(r,t,u,u?void 0:o),p=function(e){return Boolean(e.metadata&&e.metadata.plural)}(e)?A(c):c,f=["FragmentReference"];return n&&f.push("MatchPointer"),y.program((0,a.default)(U(t)).concat((0,a.default)(J(t)),[b(f,"relay-runtime"),l,x(e.name,p)]))},InlineFragment:function(e){var t=e.typeCondition;return q(e.selections).map(function(e){return v(t)?(0,i.default)({},e,{conditional:!0}):(0,i.default)({},e,{concreteType:t.toString()})})},Condition:function(e){return q(e.selections).map(function(e){return(0,i.default)({},e,{conditional:!0})})},ScalarField:function(e){var n;return[{key:null!==(n=e.alias)&&void 0!==n?n:e.name,schemaName:e.name,value:_(e.type,t)}]},LinkedField:function(e){var t;return[{key:null!==(t=e.alias)&&void 0!==t?t:e.name,schemaName:e.name,nodeType:e.type,nodeSelections:V(q(e.selections))}]},MatchField:function(e){var t;return n=!0,[{key:null!==(t=e.alias)&&void 0!==t?t:e.name,schemaName:e.name,value:y.nullableTypeAnnotation(y.genericTypeAnnotation(y.identifier("MatchPointer")))}]},FragmentSpread:function(e){return t.usedFragments.add(e.name),[{key:"__fragments_"+e.name,ref:e.name}]}}}}(t));return s(n).code},"RelayFlowGenerator.generate"),transforms:Y}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return new s(e,t,n).generate()},t.CodeGenerator=void 0;var r=a(n(107)),i=a(n(109));function a(e){return e&&e.__esModule?e:{default:e}}class s extends i.default{constructor(e,t={},n){super(function(e,t){const n={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:" ",base:0},decoratorsBeforeExport:!!t.decoratorsBeforeExport,jsescOption:Object.assign({quotes:"double",wrap:!0},t.jsescOption)};n.minified?(n.compact=!0,n.shouldPrintComment=n.shouldPrintComment||(()=>n.comments)):n.shouldPrintComment=n.shouldPrintComment||(e=>n.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0);"auto"===n.compact&&(n.compact=e.length>5e5,n.compact&&console.error("[BABEL] Note: The code generator has deoptimised the styling of "+`${t.filename} as it exceeds the max of 500KB.`));n.compact&&(n.indent.adjustMultilineComment=!1);return n}(n,t),t.sourceMaps?new r.default(t,n):null),this.ast=e}generate(){return super.generate(this.ast)}}t.CodeGenerator=class{constructor(e,t,n){this._generator=new s(e,t,n)}generate(){return this._generator.generate()}}},function(e,t,n){"use strict";function r(){const e=function(e){return e&&e.__esModule?e:{default:e}}(n(108));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e,t){this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new(r().default.SourceMapGenerator)({sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"==typeof t&&Object.keys(t).forEach(n=>{e.setSourceContent(n,t[n])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,n,r,i,a,s){this._lastGenLine!==e&&null===n||(s||this._lastGenLine!==e||this._lastSourceLine!==n||this._lastSourceColumn!==r)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=n,this._lastSourceColumn=r,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==n?void 0:a||this._opts.sourceFileName,original:null==n?void 0:{line:n,column:r}}))}}},function(e,t){e.exports=require("source-map")},function(e,t,n){"use strict";function r(){const e=c(n(110));return r=function(){return e},e}function i(){const e=c(n(111));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n(112)),s=u(n(54));function o(){const e=u(n(11));return o=function(){return e},e}var l=u(n(164));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}const p=/e/i,f=/\.0+$/,d=/^0[box]/;class h{constructor(e,t){this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._noLineTerminator=!1,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new WeakSet,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=e||{},this._buf=new a.default(t)}generate(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(){this.format.compact||this.format.concise||this._indent++}dedent(){this.format.compact||this.format.concise||this._indent--}semicolon(e=!1){this._maybeAddAuxComment(),this._append(";",!e)}rightBrace(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")}space(e=!1){this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()}word(e){(this._endsWithWord||this.endsWith("/")&&0===e.indexOf("/"))&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0}number(e){this.word(e),this._endsWithInteger=(0,r().default)(+e)&&!d.test(e)&&!p.test(e)&&!f.test(e)&&"."!==e[e.length-1]}token(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)}newline(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(let t=0;t{this[e.type](e,t)}),this._printTrailingComments(e,t),i&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=r}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,n={}){if(!e||!e.length)return;n.indent&&this.indent();const r={addNewlines:n.addNewlines};for(let i=0;i0;n&&this.indent(),this.print(e,t),n&&this.dedent()}printBlock(e){const t=e.body;o().isEmptyStatement(t)||this.space(),this.print(t,e)}_printTrailingComments(e,t){this._printComments(this._getComments(!1,e,t))}_printLeadingComments(e,t){this._printComments(this._getComments(!0,e,t))}printInnerComments(e,t=!0){e.innerComments&&e.innerComments.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,n={}){return n.statement=!0,this.printJoin(e,t,n)}printList(e,t,n={}){return null==n.separator&&(n.separator=m),this.printJoin(e,t,n)}_printNewline(e,t,n,r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;if(this._buf.hasContent()){e||i++,r.addNewlines&&(i+=r.addNewlines(e,t)||0),(e?s.needsWhitespaceBefore:s.needsWhitespaceAfter)(t,n)&&i++}this.newline(i)}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}const t="CommentBlock"===e.type;this.newline(this._buf.hasContent()&&!this._noLineTerminator&&t?1:0),this.endsWith("[")||this.endsWith("{")||this.space();let n=t||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\n`;if(t&&this.format.indent.adjustMultilineComment){const t=e.loc&&e.loc.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");n=n.replace(e,"\n")}const r=Math.max(this._getIndent().length,this._buf.getCurrentColumn());n=n.replace(/\n(?!$)/g,`\n${(0,i().default)(" ",r)}`)}this.endsWith("/")&&this._space(),this.withSource("start",e.loc,()=>{this._append(n)}),this.newline(t&&!this._noLineTerminator?1:0)}_printComments(e){if(e&&e.length)for(const t of e)this._printComment(t)}}function m(){this.token(","),this.space()}t.default=h,Object.assign(h.prototype,l)},function(e,t){e.exports=require("lodash/isInteger")},function(e,t){e.exports=require("lodash/repeat")},function(e,t,n){"use strict";function r(){const e=function(e){return e&&e.__esModule?e:{default:e}}(n(113));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=/^[ \t]+$/;t.default=class{constructor(e){this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:(0,r().default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:n,filename:r,identifierName:i,force:a}=this._sourcePosition;this._append(e,t,n,i,r,a)}queue(e){if("\n"===e)for(;this._queue.length>0&&i.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:n,filename:r,identifierName:a,force:s}=this._sourcePosition;this._queue.unshift([e,t,n,a,r,s])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,n,r,i,a){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,n,r,i,a),this._buf.push(e),this._last=e[e.length-1];for(let t=0;t0&&"\n"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()}endsWith(e){if(1===e.length){let t;if(this._queue.length>0){const e=this._queue[0][0];t=e[e.length-1]}else t=this._last;return t===e}const t=this._last+this._queue.reduce((e,t)=>t[0]+e,"");return e.length<=t.length&&t.slice(-e.length)===e}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source("start",e,!0),t(),this.source("end",e),this._disallowPop("start",e)}source(e,t,n){e&&!t||this._normalizePosition(e,t,this._sourcePosition,n)}withSource(e,t,n){if(!this._map)return n();const r=this._sourcePosition.line,i=this._sourcePosition.column,a=this._sourcePosition.filename,s=this._sourcePosition.identifierName;this.source(e,t),n(),this._sourcePosition.force&&this._sourcePosition.line===r&&this._sourcePosition.column===i&&this._sourcePosition.filename===a||this._disallowedPop&&this._disallowedPop.line===r&&this._disallowedPop.column===i&&this._disallowedPop.filename===a||(this._sourcePosition.line=r,this._sourcePosition.column=i,this._sourcePosition.filename=a,this._sourcePosition.identifierName=s,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,n,r){const i=t?t[e]:null;void 0===n&&(n={identifierName:null,line:null,column:null,filename:null,force:!1});const a=n.line,s=n.column,o=n.filename;return n.identifierName="start"===e&&t&&t.identifierName||null,n.line=i?i.line:null,n.column=i?i.column:null,n.filename=t&&t.filename||null,(r||n.line!==a||n.column!==s||n.filename!==o)&&(n.force=r),n}getCurrentColumn(){const e=this._queue.reduce((e,t)=>t[0]+e,""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce((e,t)=>t[0]+e,"");let t=0;for(let n=0;n({before:e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(r().isFunction(e.left)||r().isFunction(e.right))return{after:!0}},Literal(e){if("use strict"===e.value)return{after:!0}},CallExpression(e){if(r().isFunction(e.callee)||a(e))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;te.declarations.map(e=>e.init),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties};t.list=l,[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function([e,t]){"boolean"==typeof t&&(t={after:t,before:t}),[e].concat(r().FLIPPED_ALIAS_KEYS[e]||[]).forEach(function(e){o[e]=function(){return t}})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,function(e){return e&&e.__esModule?e:{default:e}}(n(55)).default)("React.Component");t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let n=0;nn.length)throw new Error(`${e}: Too many arguments passed. Received ${s} but can receive no more than ${n.length}`);const o={type:e};let l=0;n.forEach(n=>{const a=i.NODE_FIELDS[e][n];let u;l{(0,r.default)(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)(t),extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),mixins:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),implements:(0,r.validateOptional)((0,r.arrayOfType)("ClassImplements")),body:(0,r.validateType)("ObjectTypeAnnotation")}})};(0,r.default)("AnyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow","FlowType"],fields:{elementType:(0,r.validateType)("FlowType")}}),(0,r.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),i("DeclareClass","TypeParameterInstantiation"),(0,r.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),predicate:(0,r.validateOptionalType)("DeclaredPredicate")}}),i("DeclareInterface"),(0,r.default)("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)("BlockStatement"),kind:(0,r.validateOptional)((0,r.assertOneOf)("CommonJS","ES"))}}),(0,r.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),(0,r.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),(0,r.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType")}}),(0,r.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier")}}),(0,r.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,r.validateOptionalType)("Flow"),specifiers:(0,r.validateOptional)((0,r.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,r.validateOptionalType)("StringLiteral"),default:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),(0,r.default)("DeclareExportAllDeclaration",{visitor:["source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{source:(0,r.validateType)("StringLiteral"),exportKind:(0,r.validateOptional)((0,r.assertOneOf)(["type","value"]))}}),(0,r.default)("DeclaredPredicate",{visitor:["value"],aliases:["Flow","FlowPredicate"],fields:{value:(0,r.validateType)("Flow")}}),(0,r.default)("ExistsTypeAnnotation",{aliases:["Flow","FlowType"]}),(0,r.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow","FlowType"],fields:{typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),params:(0,r.validate)((0,r.arrayOfType)("FunctionTypeParam")),rest:(0,r.validateOptionalType)("FunctionTypeParam"),returnType:(0,r.validateType)("FlowType")}}),(0,r.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{name:(0,r.validateOptionalType)("Identifier"),typeAnnotation:(0,r.validateType)("FlowType"),optional:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),(0,r.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow","FlowType"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),(0,r.default)("InferredPredicate",{aliases:["Flow","FlowPredicate"]}),(0,r.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),i("InterfaceDeclaration"),(0,r.default)("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["Flow","FlowType"],fields:{extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),body:(0,r.validateType)("ObjectTypeAnnotation")}}),(0,r.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("MixedTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow","FlowType"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),(0,r.default)("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("number"))}}),(0,r.default)("NumberTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["Flow","FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,r.validate)((0,r.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,r.assertValueType)("boolean"),default:!1}}}),(0,r.default)("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,r.validateType)("Identifier"),value:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean")),static:(0,r.validate)((0,r.assertValueType)("boolean")),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,r.validateOptionalType)("Identifier"),key:(0,r.validateType)("FlowType"),value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{key:(0,r.validateType)(["Identifier","StringLiteral"]),value:(0,r.validateType)("FlowType"),kind:(0,r.validate)((0,r.assertOneOf)("init","get","set")),static:(0,r.validate)((0,r.assertValueType)("boolean")),proto:(0,r.validate)((0,r.assertValueType)("boolean")),optional:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{argument:(0,r.validateType)("FlowType")}}),(0,r.default)("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateType)("FlowType")}}),(0,r.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{id:(0,r.validateType)("Identifier"),qualification:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"])}}),(0,r.default)("StringLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("string"))}}),(0,r.default)("StringTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ThisTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow","FlowType"],fields:{argument:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeAnnotation",{aliases:["Flow"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),(0,r.default)("TypeParameter",{aliases:["Flow"],visitor:["bound","default","variance"],fields:{name:(0,r.validate)((0,r.assertValueType)("string")),bound:(0,r.validateOptionalType)("TypeAnnotation"),default:(0,r.validateOptionalType)("FlowType"),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("TypeParameterDeclaration",{aliases:["Flow"],visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("TypeParameter"))}}),(0,r.default)("TypeParameterInstantiation",{aliases:["Flow"],visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("Variance",{aliases:["Flow"],builder:["kind"],fields:{kind:(0,r.validate)((0,r.assertOneOf)("minus","plus"))}}),(0,r.default)("VoidTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(16));(0,r.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,r.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),(0,r.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,r.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,r.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,r.assertNodeType)("JSXClosingElement")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,r.default)("JSXEmptyExpression",{aliases:["JSX"]}),(0,r.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("JSXIdentifier",{builder:["name"],aliases:["JSX"],fields:{name:{validate:(0,r.assertValueType)("string")}}}),(0,r.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX"],fields:{object:{validate:(0,r.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),(0,r.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,r.assertNodeType)("JSXIdentifier")},name:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),(0,r.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,r.assertValueType)("boolean")},attributes:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}}}),(0,r.default)("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["JSX","Immutable","Expression"],fields:{openingFragment:{validate:(0,r.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,r.assertNodeType)("JSXClosingFragment")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,r.default)("JSXOpeningFragment",{aliases:["JSX","Immutable"]}),(0,r.default)("JSXClosingFragment",{aliases:["JSX","Immutable"]})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(16));(0,r.default)("Noop",{visitor:[]}),(0,r.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(16)),i=n(38);(0,r.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,r.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:Object.assign({},i.classMethodOrPropertyCommon,{value:{validate:(0,r.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,r.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,r.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0}})}),(0,r.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},property:{validate:function(){const e=(0,r.assertNodeType)("Identifier"),t=(0,r.assertNodeType)("Expression");return function(n,r,i){(n.computed?t:e)(n,r,i)}}()},computed:{default:!1},optional:{validate:(0,r.assertValueType)("boolean")}}}),(0,r.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,r.assertNodeType)("Expression")},arguments:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression","SpreadElement","JSXNamespacedName")))},optional:{validate:(0,r.assertValueType)("boolean")},typeArguments:{validate:(0,r.assertNodeType)("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("ClassPrivateProperty",{visitor:["key","value"],builder:["key","value"],aliases:["Property","Private"],fields:{key:{validate:(0,r.assertNodeType)("PrivateName")},value:{validate:(0,r.assertNodeType)("Expression"),optional:!0}}}),(0,r.default)("Import",{aliases:["Expression"]}),(0,r.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,r.assertNodeType)("BlockStatement")}}}),(0,r.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(16)),i=n(35),a=n(38);const s=(0,r.assertValueType)("boolean"),o={returnType:{validate:(0,r.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}};(0,r.default)("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,r.assertNodeType)("Identifier","AssignmentPattern")}}}),(0,r.default)("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},i.functionDeclarationCommon,o)}),(0,r.default)("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},a.classMethodOrDeclareMethodCommon,o)}),(0,r.default)("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,r.validateType)("TSEntityName"),right:(0,r.validateType)("Identifier")}});const l={typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,r.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")},u={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:l};(0,r.default)("TSCallSignatureDeclaration",u),(0,r.default)("TSConstructSignatureDeclaration",u);const c={key:(0,r.validateType)("Expression"),computed:(0,r.validate)(s),optional:(0,r.validateOptional)(s)};(0,r.default)("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},c,{readonly:(0,r.validateOptional)(s),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),initializer:(0,r.validateOptionalType)("Expression")})}),(0,r.default)("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},l,c)}),(0,r.default)("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(s),parameters:(0,r.validateArrayOfType)("Identifier"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}});const p=["TSAnyKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword"];for(const e of p)(0,r.default)(e,{aliases:["TSType"],visitor:[],fields:{}});(0,r.default)("TSThisType",{aliases:["TSType"],visitor:[],fields:{}});const f={aliases:["TSType"],visitor:["typeParameters","typeAnnotation"],fields:l};(0,r.default)("TSFunctionType",f),(0,r.default)("TSConstructorType",f),(0,r.default)("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,r.default)("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],fields:{parameterName:(0,r.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,r.validateType)("TSTypeAnnotation")}}),(0,r.default)("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,r.validateType)("TSEntityName")}}),(0,r.default)("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSTypeElement")}}),(0,r.default)("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,r.validateType)("TSType")}}),(0,r.default)("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,r.validateArrayOfType)("TSType")}});const d={aliases:["TSType"],visitor:["types"],fields:{types:(0,r.validateArrayOfType)("TSType")}};(0,r.default)("TSUnionType",d),(0,r.default)("TSIntersectionType",d),(0,r.default)("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,r.validateType)("TSType"),extendsType:(0,r.validateType)("TSType"),trueType:(0,r.validateType)("TSType"),falseType:(0,r.validateType)("TSType")}}),(0,r.default)("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,r.validateType)("TSTypeParameter")}}),(0,r.default)("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,r.validate)((0,r.assertValueType)("string")),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,r.validateType)("TSType"),indexType:(0,r.validateType)("TSType")}}),(0,r.default)("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(s),typeParameter:(0,r.validateType)("TSTypeParameter"),optional:(0,r.validateOptional)(s),typeAnnotation:(0,r.validateOptionalType)("TSType")}}),(0,r.default)("TSLiteralType",{aliases:["TSType"],visitor:["literal"],fields:{literal:(0,r.validateType)(["NumericLiteral","StringLiteral","BooleanLiteral"])}}),(0,r.default)("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,r.default)("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,r.validateOptional)((0,r.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,r.validateType)("TSInterfaceBody")}}),(0,r.default)("TSInterfaceBody",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("TSTypeElement")}}),(0,r.default)("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,r.validateType)("TSType"),expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,r.validateOptional)(s),const:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),members:(0,r.validateArrayOfType)("TSEnumMember"),initializer:(0,r.validateOptionalType)("Expression")}}),(0,r.default)("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),initializer:(0,r.validateOptionalType)("Expression")}}),(0,r.default)("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,r.validateOptional)(s),global:(0,r.validateOptional)(s),id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)(["TSModuleBlock","TSModuleDeclaration"])}}),(0,r.default)("TSModuleBlock",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("Statement")}}),(0,r.default)("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,r.validate)(s),id:(0,r.validateType)("Identifier"),moduleReference:(0,r.validateType)(["TSEntityName","TSExternalModuleReference"])}}),(0,r.default)("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,r.validateType)("StringLiteral")}}),(0,r.default)("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),(0,r.default)("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,r.assertNodeType)("TSType")}}}),(0,r.default)("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSType")))}}}),(0,r.default)("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSTypeParameter")))}}}),(0,r.default)("TSTypeParameter",{visitor:["constraint","default"],fields:{name:{validate:(0,r.assertValueType)("string")},constraint:{validate:(0,r.assertNodeType)("TSType"),optional:!0},default:{validate:(0,r.assertNodeType)("TSType"),optional:!0}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,r.default)(e)){const t=e&&e.type||JSON.stringify(e);throw new TypeError(`Not a valid node of type "${t}"`)}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(58))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayExpression=function(e,t={}){i("ArrayExpression",e,t)},t.assertAssignmentExpression=function(e,t={}){i("AssignmentExpression",e,t)},t.assertBinaryExpression=function(e,t={}){i("BinaryExpression",e,t)},t.assertInterpreterDirective=function(e,t={}){i("InterpreterDirective",e,t)},t.assertDirective=function(e,t={}){i("Directive",e,t)},t.assertDirectiveLiteral=function(e,t={}){i("DirectiveLiteral",e,t)},t.assertBlockStatement=function(e,t={}){i("BlockStatement",e,t)},t.assertBreakStatement=function(e,t={}){i("BreakStatement",e,t)},t.assertCallExpression=function(e,t={}){i("CallExpression",e,t)},t.assertCatchClause=function(e,t={}){i("CatchClause",e,t)},t.assertConditionalExpression=function(e,t={}){i("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t={}){i("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t={}){i("DebuggerStatement",e,t)},t.assertDoWhileStatement=function(e,t={}){i("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t={}){i("EmptyStatement",e,t)},t.assertExpressionStatement=function(e,t={}){i("ExpressionStatement",e,t)},t.assertFile=function(e,t={}){i("File",e,t)},t.assertForInStatement=function(e,t={}){i("ForInStatement",e,t)},t.assertForStatement=function(e,t={}){i("ForStatement",e,t)},t.assertFunctionDeclaration=function(e,t={}){i("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t={}){i("FunctionExpression",e,t)},t.assertIdentifier=function(e,t={}){i("Identifier",e,t)},t.assertIfStatement=function(e,t={}){i("IfStatement",e,t)},t.assertLabeledStatement=function(e,t={}){i("LabeledStatement",e,t)},t.assertStringLiteral=function(e,t={}){i("StringLiteral",e,t)},t.assertNumericLiteral=function(e,t={}){i("NumericLiteral",e,t)},t.assertNullLiteral=function(e,t={}){i("NullLiteral",e,t)},t.assertBooleanLiteral=function(e,t={}){i("BooleanLiteral",e,t)},t.assertRegExpLiteral=function(e,t={}){i("RegExpLiteral",e,t)},t.assertLogicalExpression=function(e,t={}){i("LogicalExpression",e,t)},t.assertMemberExpression=function(e,t={}){i("MemberExpression",e,t)},t.assertNewExpression=function(e,t={}){i("NewExpression",e,t)},t.assertProgram=function(e,t={}){i("Program",e,t)},t.assertObjectExpression=function(e,t={}){i("ObjectExpression",e,t)},t.assertObjectMethod=function(e,t={}){i("ObjectMethod",e,t)},t.assertObjectProperty=function(e,t={}){i("ObjectProperty",e,t)},t.assertRestElement=function(e,t={}){i("RestElement",e,t)},t.assertReturnStatement=function(e,t={}){i("ReturnStatement",e,t)},t.assertSequenceExpression=function(e,t={}){i("SequenceExpression",e,t)},t.assertSwitchCase=function(e,t={}){i("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t={}){i("SwitchStatement",e,t)},t.assertThisExpression=function(e,t={}){i("ThisExpression",e,t)},t.assertThrowStatement=function(e,t={}){i("ThrowStatement",e,t)},t.assertTryStatement=function(e,t={}){i("TryStatement",e,t)},t.assertUnaryExpression=function(e,t={}){i("UnaryExpression",e,t)},t.assertUpdateExpression=function(e,t={}){i("UpdateExpression",e,t)},t.assertVariableDeclaration=function(e,t={}){i("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t={}){i("VariableDeclarator",e,t)},t.assertWhileStatement=function(e,t={}){i("WhileStatement",e,t)},t.assertWithStatement=function(e,t={}){i("WithStatement",e,t)},t.assertAssignmentPattern=function(e,t={}){i("AssignmentPattern",e,t)},t.assertArrayPattern=function(e,t={}){i("ArrayPattern",e,t)},t.assertArrowFunctionExpression=function(e,t={}){i("ArrowFunctionExpression",e,t)},t.assertClassBody=function(e,t={}){i("ClassBody",e,t)},t.assertClassDeclaration=function(e,t={}){i("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t={}){i("ClassExpression",e,t)},t.assertExportAllDeclaration=function(e,t={}){i("ExportAllDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t={}){i("ExportDefaultDeclaration",e,t)},t.assertExportNamedDeclaration=function(e,t={}){i("ExportNamedDeclaration",e,t)},t.assertExportSpecifier=function(e,t={}){i("ExportSpecifier",e,t)},t.assertForOfStatement=function(e,t={}){i("ForOfStatement",e,t)},t.assertImportDeclaration=function(e,t={}){i("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t={}){i("ImportDefaultSpecifier",e,t)},t.assertImportNamespaceSpecifier=function(e,t={}){i("ImportNamespaceSpecifier",e,t)},t.assertImportSpecifier=function(e,t={}){i("ImportSpecifier",e,t)},t.assertMetaProperty=function(e,t={}){i("MetaProperty",e,t)},t.assertClassMethod=function(e,t={}){i("ClassMethod",e,t)},t.assertObjectPattern=function(e,t={}){i("ObjectPattern",e,t)},t.assertSpreadElement=function(e,t={}){i("SpreadElement",e,t)},t.assertSuper=function(e,t={}){i("Super",e,t)},t.assertTaggedTemplateExpression=function(e,t={}){i("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t={}){i("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t={}){i("TemplateLiteral",e,t)},t.assertYieldExpression=function(e,t={}){i("YieldExpression",e,t)},t.assertAnyTypeAnnotation=function(e,t={}){i("AnyTypeAnnotation",e,t)},t.assertArrayTypeAnnotation=function(e,t={}){i("ArrayTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t={}){i("BooleanTypeAnnotation",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t={}){i("BooleanLiteralTypeAnnotation",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t={}){i("NullLiteralTypeAnnotation",e,t)},t.assertClassImplements=function(e,t={}){i("ClassImplements",e,t)},t.assertDeclareClass=function(e,t={}){i("DeclareClass",e,t)},t.assertDeclareFunction=function(e,t={}){i("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t={}){i("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t={}){i("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t={}){i("DeclareModuleExports",e,t)},t.assertDeclareTypeAlias=function(e,t={}){i("DeclareTypeAlias",e,t)},t.assertDeclareOpaqueType=function(e,t={}){i("DeclareOpaqueType",e,t)},t.assertDeclareVariable=function(e,t={}){i("DeclareVariable",e,t)},t.assertDeclareExportDeclaration=function(e,t={}){i("DeclareExportDeclaration",e,t)},t.assertDeclareExportAllDeclaration=function(e,t={}){i("DeclareExportAllDeclaration",e,t)},t.assertDeclaredPredicate=function(e,t={}){i("DeclaredPredicate",e,t)},t.assertExistsTypeAnnotation=function(e,t={}){i("ExistsTypeAnnotation",e,t)},t.assertFunctionTypeAnnotation=function(e,t={}){i("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t={}){i("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t={}){i("GenericTypeAnnotation",e,t)},t.assertInferredPredicate=function(e,t={}){i("InferredPredicate",e,t)},t.assertInterfaceExtends=function(e,t={}){i("InterfaceExtends",e,t)},t.assertInterfaceDeclaration=function(e,t={}){i("InterfaceDeclaration",e,t)},t.assertInterfaceTypeAnnotation=function(e,t={}){i("InterfaceTypeAnnotation",e,t)},t.assertIntersectionTypeAnnotation=function(e,t={}){i("IntersectionTypeAnnotation",e,t)},t.assertMixedTypeAnnotation=function(e,t={}){i("MixedTypeAnnotation",e,t)},t.assertEmptyTypeAnnotation=function(e,t={}){i("EmptyTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t={}){i("NullableTypeAnnotation",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t={}){i("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t={}){i("NumberTypeAnnotation",e,t)},t.assertObjectTypeAnnotation=function(e,t={}){i("ObjectTypeAnnotation",e,t)},t.assertObjectTypeInternalSlot=function(e,t={}){i("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeCallProperty=function(e,t={}){i("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t={}){i("ObjectTypeIndexer",e,t)},t.assertObjectTypeProperty=function(e,t={}){i("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t={}){i("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t={}){i("OpaqueType",e,t)},t.assertQualifiedTypeIdentifier=function(e,t={}){i("QualifiedTypeIdentifier",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t={}){i("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t={}){i("StringTypeAnnotation",e,t)},t.assertThisTypeAnnotation=function(e,t={}){i("ThisTypeAnnotation",e,t)},t.assertTupleTypeAnnotation=function(e,t={}){i("TupleTypeAnnotation",e,t)},t.assertTypeofTypeAnnotation=function(e,t={}){i("TypeofTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t={}){i("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t={}){i("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t={}){i("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t={}){i("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t={}){i("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t={}){i("TypeParameterInstantiation",e,t)},t.assertUnionTypeAnnotation=function(e,t={}){i("UnionTypeAnnotation",e,t)},t.assertVariance=function(e,t={}){i("Variance",e,t)},t.assertVoidTypeAnnotation=function(e,t={}){i("VoidTypeAnnotation",e,t)},t.assertJSXAttribute=function(e,t={}){i("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t={}){i("JSXClosingElement",e,t)},t.assertJSXElement=function(e,t={}){i("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t={}){i("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t={}){i("JSXExpressionContainer",e,t)},t.assertJSXSpreadChild=function(e,t={}){i("JSXSpreadChild",e,t)},t.assertJSXIdentifier=function(e,t={}){i("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t={}){i("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t={}){i("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t={}){i("JSXOpeningElement",e,t)},t.assertJSXSpreadAttribute=function(e,t={}){i("JSXSpreadAttribute",e,t)},t.assertJSXText=function(e,t={}){i("JSXText",e,t)},t.assertJSXFragment=function(e,t={}){i("JSXFragment",e,t)},t.assertJSXOpeningFragment=function(e,t={}){i("JSXOpeningFragment",e,t)},t.assertJSXClosingFragment=function(e,t={}){i("JSXClosingFragment",e,t)},t.assertNoop=function(e,t={}){i("Noop",e,t)},t.assertParenthesizedExpression=function(e,t={}){i("ParenthesizedExpression",e,t)},t.assertAwaitExpression=function(e,t={}){i("AwaitExpression",e,t)},t.assertBindExpression=function(e,t={}){i("BindExpression",e,t)},t.assertClassProperty=function(e,t={}){i("ClassProperty",e,t)},t.assertOptionalMemberExpression=function(e,t={}){i("OptionalMemberExpression",e,t)},t.assertOptionalCallExpression=function(e,t={}){i("OptionalCallExpression",e,t)},t.assertClassPrivateProperty=function(e,t={}){i("ClassPrivateProperty",e,t)},t.assertImport=function(e,t={}){i("Import",e,t)},t.assertDecorator=function(e,t={}){i("Decorator",e,t)},t.assertDoExpression=function(e,t={}){i("DoExpression",e,t)},t.assertExportDefaultSpecifier=function(e,t={}){i("ExportDefaultSpecifier",e,t)},t.assertExportNamespaceSpecifier=function(e,t={}){i("ExportNamespaceSpecifier",e,t)},t.assertPrivateName=function(e,t={}){i("PrivateName",e,t)},t.assertBigIntLiteral=function(e,t={}){i("BigIntLiteral",e,t)},t.assertTSParameterProperty=function(e,t={}){i("TSParameterProperty",e,t)},t.assertTSDeclareFunction=function(e,t={}){i("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t={}){i("TSDeclareMethod",e,t)},t.assertTSQualifiedName=function(e,t={}){i("TSQualifiedName",e,t)},t.assertTSCallSignatureDeclaration=function(e,t={}){i("TSCallSignatureDeclaration",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t={}){i("TSConstructSignatureDeclaration",e,t)},t.assertTSPropertySignature=function(e,t={}){i("TSPropertySignature",e,t)},t.assertTSMethodSignature=function(e,t={}){i("TSMethodSignature",e,t)},t.assertTSIndexSignature=function(e,t={}){i("TSIndexSignature",e,t)},t.assertTSAnyKeyword=function(e,t={}){i("TSAnyKeyword",e,t)},t.assertTSNumberKeyword=function(e,t={}){i("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t={}){i("TSObjectKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t={}){i("TSBooleanKeyword",e,t)},t.assertTSStringKeyword=function(e,t={}){i("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t={}){i("TSSymbolKeyword",e,t)},t.assertTSVoidKeyword=function(e,t={}){i("TSVoidKeyword",e,t)},t.assertTSUndefinedKeyword=function(e,t={}){i("TSUndefinedKeyword",e,t)},t.assertTSNullKeyword=function(e,t={}){i("TSNullKeyword",e,t)},t.assertTSNeverKeyword=function(e,t={}){i("TSNeverKeyword",e,t)},t.assertTSThisType=function(e,t={}){i("TSThisType",e,t)},t.assertTSFunctionType=function(e,t={}){i("TSFunctionType",e,t)},t.assertTSConstructorType=function(e,t={}){i("TSConstructorType",e,t)},t.assertTSTypeReference=function(e,t={}){i("TSTypeReference",e,t)},t.assertTSTypePredicate=function(e,t={}){i("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t={}){i("TSTypeQuery",e,t)},t.assertTSTypeLiteral=function(e,t={}){i("TSTypeLiteral",e,t)},t.assertTSArrayType=function(e,t={}){i("TSArrayType",e,t)},t.assertTSTupleType=function(e,t={}){i("TSTupleType",e,t)},t.assertTSUnionType=function(e,t={}){i("TSUnionType",e,t)},t.assertTSIntersectionType=function(e,t={}){i("TSIntersectionType",e,t)},t.assertTSConditionalType=function(e,t={}){i("TSConditionalType",e,t)},t.assertTSInferType=function(e,t={}){i("TSInferType",e,t)},t.assertTSParenthesizedType=function(e,t={}){i("TSParenthesizedType",e,t)},t.assertTSTypeOperator=function(e,t={}){i("TSTypeOperator",e,t)},t.assertTSIndexedAccessType=function(e,t={}){i("TSIndexedAccessType",e,t)},t.assertTSMappedType=function(e,t={}){i("TSMappedType",e,t)},t.assertTSLiteralType=function(e,t={}){i("TSLiteralType",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t={}){i("TSExpressionWithTypeArguments",e,t)},t.assertTSInterfaceDeclaration=function(e,t={}){i("TSInterfaceDeclaration",e,t)},t.assertTSInterfaceBody=function(e,t={}){i("TSInterfaceBody",e,t)},t.assertTSTypeAliasDeclaration=function(e,t={}){i("TSTypeAliasDeclaration",e,t)},t.assertTSAsExpression=function(e,t={}){i("TSAsExpression",e,t)},t.assertTSTypeAssertion=function(e,t={}){i("TSTypeAssertion",e,t)},t.assertTSEnumDeclaration=function(e,t={}){i("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t={}){i("TSEnumMember",e,t)},t.assertTSModuleDeclaration=function(e,t={}){i("TSModuleDeclaration",e,t)},t.assertTSModuleBlock=function(e,t={}){i("TSModuleBlock",e,t)},t.assertTSImportEqualsDeclaration=function(e,t={}){i("TSImportEqualsDeclaration",e,t)},t.assertTSExternalModuleReference=function(e,t={}){i("TSExternalModuleReference",e,t)},t.assertTSNonNullExpression=function(e,t={}){i("TSNonNullExpression",e,t)},t.assertTSExportAssignment=function(e,t={}){i("TSExportAssignment",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t={}){i("TSNamespaceExportDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t={}){i("TSTypeAnnotation",e,t)},t.assertTSTypeParameterInstantiation=function(e,t={}){i("TSTypeParameterInstantiation",e,t)},t.assertTSTypeParameterDeclaration=function(e,t={}){i("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameter=function(e,t={}){i("TSTypeParameter",e,t)},t.assertExpression=function(e,t={}){i("Expression",e,t)},t.assertBinary=function(e,t={}){i("Binary",e,t)},t.assertScopable=function(e,t={}){i("Scopable",e,t)},t.assertBlockParent=function(e,t={}){i("BlockParent",e,t)},t.assertBlock=function(e,t={}){i("Block",e,t)},t.assertStatement=function(e,t={}){i("Statement",e,t)},t.assertTerminatorless=function(e,t={}){i("Terminatorless",e,t)},t.assertCompletionStatement=function(e,t={}){i("CompletionStatement",e,t)},t.assertConditional=function(e,t={}){i("Conditional",e,t)},t.assertLoop=function(e,t={}){i("Loop",e,t)},t.assertWhile=function(e,t={}){i("While",e,t)},t.assertExpressionWrapper=function(e,t={}){i("ExpressionWrapper",e,t)},t.assertFor=function(e,t={}){i("For",e,t)},t.assertForXStatement=function(e,t={}){i("ForXStatement",e,t)},t.assertFunction=function(e,t={}){i("Function",e,t)},t.assertFunctionParent=function(e,t={}){i("FunctionParent",e,t)},t.assertPureish=function(e,t={}){i("Pureish",e,t)},t.assertDeclaration=function(e,t={}){i("Declaration",e,t)},t.assertPatternLike=function(e,t={}){i("PatternLike",e,t)},t.assertLVal=function(e,t={}){i("LVal",e,t)},t.assertTSEntityName=function(e,t={}){i("TSEntityName",e,t)},t.assertLiteral=function(e,t={}){i("Literal",e,t)},t.assertImmutable=function(e,t={}){i("Immutable",e,t)},t.assertUserWhitespacable=function(e,t={}){i("UserWhitespacable",e,t)},t.assertMethod=function(e,t={}){i("Method",e,t)},t.assertObjectMember=function(e,t={}){i("ObjectMember",e,t)},t.assertProperty=function(e,t={}){i("Property",e,t)},t.assertUnaryLike=function(e,t={}){i("UnaryLike",e,t)},t.assertPattern=function(e,t={}){i("Pattern",e,t)},t.assertClass=function(e,t={}){i("Class",e,t)},t.assertModuleDeclaration=function(e,t={}){i("ModuleDeclaration",e,t)},t.assertExportDeclaration=function(e,t={}){i("ExportDeclaration",e,t)},t.assertModuleSpecifier=function(e,t={}){i("ModuleSpecifier",e,t)},t.assertFlow=function(e,t={}){i("Flow",e,t)},t.assertFlowType=function(e,t={}){i("FlowType",e,t)},t.assertFlowBaseAnnotation=function(e,t={}){i("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t={}){i("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t={}){i("FlowPredicate",e,t)},t.assertJSX=function(e,t={}){i("JSX",e,t)},t.assertPrivate=function(e,t={}){i("Private",e,t)},t.assertTSTypeElement=function(e,t={}){i("TSTypeElement",e,t)},t.assertTSType=function(e,t={}){i("TSType",e,t)},t.assertNumberLiteral=function(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),i("NumberLiteral",e,t)},t.assertRegexLiteral=function(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),i("RegexLiteral",e,t)},t.assertRestProperty=function(e,t){console.trace("The node type RestProperty has been renamed to RestElement"),i("RestProperty",e,t)},t.assertSpreadProperty=function(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement"),i("SpreadProperty",e,t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(36));function i(e,t,n){if(!(0,r.default)(e,t,n))throw new Error(`Expected type "${e}" with option ${JSON.stringify(n)}, but instead got "${t.type}".`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"===e)return(0,r.stringTypeAnnotation)();if("number"===e)return(0,r.numberTypeAnnotation)();if("undefined"===e)return(0,r.voidTypeAnnotation)();if("boolean"===e)return(0,r.booleanTypeAnnotation)();if("function"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Function"));if("object"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Object"));if("symbol"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Symbol"));throw new Error("Invalid typeof value")};var r=n(12)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return 1===t.length?t[0]:(0,r.unionTypeAnnotation)(t)};var r=n(12),i=function(e){return e&&e.__esModule?e:{default:e}}(n(59))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(23))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,r.default)(e);return t.loc=null,t};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(60))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){return(0,r.default)(e,t,[{type:i?"CommentLine":"CommentBlock",value:n}])};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(61))},function(e,t){e.exports=require("lodash/uniq")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r.COMMENT_KEYS.forEach(t=>{e[t]=null}),e};var r=n(18)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var r=n(13);const i=r.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=i;const a=r.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=a;const s=r.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=s;const o=r.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=o;const l=r.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=l;const u=r.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=u;const c=r.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=c;const p=r.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=p;const f=r.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=f;const d=r.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=d;const h=r.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=h;const m=r.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=m;const y=r.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=y;const v=r.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=v;const T=r.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=T;const g=r.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=g;const S=r.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=S;const x=r.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=x;const b=r.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=b;const E=r.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=E;const P=r.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=P;const A=r.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=A;const w=r.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=w;const k=r.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=k;const N=r.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=N;const _=r.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=_;const C=r.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=C;const O=r.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=O;const D=r.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=D;const I=r.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=I;const L=r.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=L;const F=r.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=F;const M=r.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=M;const j=r.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=j;const R=r.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=R;const B=r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=B;const V=r.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=V;const q=r.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=q;const K=r.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=K;const U=r.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=U;const J=r.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=J;const X=r.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=X},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){return e[t]=(0,r.default)(e[t],e)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(66))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"eval"!==(e=(0,r.default)(e))&&"arguments"!==e||(e="_"+e);return e};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(67))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){!e.computed&&(0,r.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name));return t};var r=n(8),i=n(12)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.isExpressionStatement)(e)&&(e=e.expression);if((0,r.isExpression)(e))return e;(0,r.isClass)(e)?e.type="ClassExpression":(0,r.isFunction)(e)&&(e.type="FunctionExpression");if(!(0,r.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e};var r=n(8)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(8),i=s(n(23)),a=s(n(68));function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t=e.key){let n;return"method"===e.kind?o.increment()+"":(n=(0,r.isIdentifier)(t)?t.name:(0,r.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,a.default)((0,i.default)(t))),e.computed&&(n=`[${n}]`),e.static&&(n=`static:${n}`),n)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!e.length)return;const n=[],i=(0,r.default)(e,t,n);if(!i)return;for(const e of n)t.push(e);return i};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(144))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,o){const l=[];let u=!0;for(const c of t)if(u=!1,(0,i.isExpression)(c))l.push(c);else if((0,i.isExpressionStatement)(c))l.push(c.expression);else if((0,i.isVariableDeclaration)(c)){if("var"!==c.kind)return;for(const e of c.declarations){const t=(0,r.default)(e);for(const e in t)o.push({kind:c.kind,id:(0,s.default)(t[e])});e.init&&l.push((0,a.assignmentExpression)("=",e.id,e.init))}u=!0}else if((0,i.isIfStatement)(c)){const t=c.consequent?e([c.consequent],n,o):n.buildUndefinedNode(),r=c.alternate?e([c.alternate],n,o):n.buildUndefinedNode();if(!t||!r)return;l.push((0,a.conditionalExpression)(c.test,t,r))}else if((0,i.isBlockStatement)(c)){const t=e(c.body,n,o);if(!t)return;l.push(t)}else{if(!(0,i.isEmptyStatement)(c))return;u=!0}u&&l.push(n.buildUndefinedNode());return 1===l.length?l[0]:(0,a.sequenceExpression)(l)};var r=o(n(27)),i=n(8),a=n(12),s=o(n(23));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.isStatement)(e))return e;let n,a=!1;if((0,r.isClass)(e))a=!0,n="ClassDeclaration";else if((0,r.isFunction)(e))a=!0,n="FunctionDeclaration";else if((0,r.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);a&&!e.id&&(n=!1);if(!n){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=n,e};var r=n(8),i=n(12)},function(e,t,n){"use strict";function r(){const e=o(n(147));return r=function(){return e},e}function i(){const e=o(n(148));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){if(void 0===t)return(0,s.identifier)("undefined");if(!0===t||!1===t)return(0,s.booleanLiteral)(t);if(null===t)return(0,s.nullLiteral)();if("string"==typeof t)return(0,s.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,s.numericLiteral)(Math.abs(t));else{let n;n=Number.isNaN(t)?(0,s.numericLiteral)(0):(0,s.numericLiteral)(1),e=(0,s.binaryExpression)("/",n,(0,s.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,s.unaryExpression)("-",e)),e}if((0,i().default)(t)){const e=t.source,n=t.toString().match(/\/([a-z]+|)$/)[1];return(0,s.regExpLiteral)(e,n)}if(Array.isArray(t))return(0,s.arrayExpression)(t.map(e));if((0,r().default)(t)){const n=[];for(const r in t){let i;i=(0,a.default)(r)?(0,s.identifier)(r):(0,s.stringLiteral)(r),n.push((0,s.objectProperty)(i,e(t[r])))}return(0,s.objectExpression)(n)}throw new Error("don't know how to turn this value into a node")};var a=o(n(22)),s=n(12);function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=require("lodash/isPlainObject")},function(e,t){e.exports=require("lodash/isRegExp")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n=!1){return e.object=(0,r.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e};var r=n(12)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const n of r.INHERIT_KEYS.optional)null==e[n]&&(e[n]=t[n]);for(const n in t)"_"===n[0]&&"__clone"!==n&&(e[n]=t[n]);for(const n of r.INHERIT_KEYS.force)e[n]=t[n];return(0,i.default)(e,t),e};var r=n(18),i=function(e){return e&&e.__esModule?e:{default:e}}(n(64))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.object=(0,r.memberExpression)(t,e.object),e};var r=n(12)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(e,t,!0)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(27))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"function"==typeof t&&(t={enter:t});const{enter:i,exit:a}=t;!function e(t,n,i,a,s){const o=r.VISITOR_KEYS[t.type];if(!o)return;n&&n(t,s,a);for(const r of o){const o=t[r];if(Array.isArray(o))for(let l=0;l=0)return!0}else if(a===e)return!0}return!1};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(27))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isFunctionDeclaration)(e)||(0,r.isClassDeclaration)(e)||(0,i.default)(e)};var r=n(8),i=function(e){return e&&e.__esModule?e:{default:e}}(n(71))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e.type,"Immutable"))return!0;if((0,i.isIdentifier)(e))return"undefined"===e.name;return!1};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(37)),i=n(8)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if("object"!=typeof t||"object"!=typeof n||null==t||null==n)return t===n;if(t.type!==n.type)return!1;const i=Object.keys(r.NODE_FIELDS[t.type]||t.type);const a=r.VISITOR_KEYS[t.type];for(const r of i){if(typeof t[r]!=typeof n[r])return!1;if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(t[r].length!==n[r].length)return!1;for(let i=0;io)return!0}return!1},t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return r().isArrayTypeAnnotation(t)||r().isNullableTypeAnnotation(t)||r().isIntersectionTypeAnnotation(t)||r().isUnionTypeAnnotation(t)},t.TSAsExpression=function(){return!0},t.TSTypeAssertion=function(){return!0},t.BinaryExpression=function(e,t){return"in"===e.operator&&(r().isVariableDeclarator(t)||r().isFor(t))},t.SequenceExpression=function(e,t){if(r().isForStatement(t)||r().isThrowStatement(t)||r().isReturnStatement(t)||r().isIfStatement(t)&&t.test===e||r().isWhileStatement(t)&&t.test===e||r().isForInStatement(t)&&t.right===e||r().isSwitchStatement(t)&&t.discriminant===e||r().isExpressionStatement(t)&&t.expression===e)return!1;return!0},t.AwaitExpression=t.YieldExpression=function(e,t){return r().isBinary(t)||r().isUnaryLike(t)||r().isCallExpression(t)||r().isMemberExpression(t)||r().isNewExpression(t)||r().isConditionalExpression(t)&&e===t.test||a(e,t)},t.ClassExpression=function(e,t,n){return l(n,{considerDefaultExports:!0})},t.UnaryLike=s,t.FunctionExpression=function(e,t,n){return l(n,{considerDefaultExports:!0})},t.ArrowFunctionExpression=function(e,t){return r().isExportDeclaration(t)||o(e,t)},t.ConditionalExpression=o,t.AssignmentExpression=function(e){return!!r().isObjectPattern(e.left)||o(...arguments)},t.NewExpression=function(e,t){return a(e,t)};const i={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10},a=(e,t)=>(r().isClassDeclaration(t)||r().isClassExpression(t))&&t.superClass===e;function s(e,t){return r().isMemberExpression(t,{object:e})||r().isCallExpression(t,{callee:e})||r().isNewExpression(t,{callee:e})||r().isBinaryExpression(t,{operator:"**",left:e})||a(e,t)}function o(e,t){return!!(r().isUnaryLike(t)||r().isBinary(t)||r().isConditionalExpression(t,{test:e})||r().isAwaitExpression(t)||r().isTaggedTemplateExpression(t)||r().isTSTypeAssertion(t)||r().isTSAsExpression(t))||s(e,t)}function l(e,{considerArrow:t=!1,considerDefaultExports:n=!1}={}){let i=e.length-1,a=e[i],s=e[--i];for(;i>0;){if(r().isExpressionStatement(s,{expression:a})||r().isTaggedTemplateExpression(s)||n&&r().isExportDefaultDeclaration(s,{declaration:a})||t&&r().isArrowFunctionExpression(s,{body:a}))return!0;if(!(r().isCallExpression(s,{callee:a})||r().isSequenceExpression(s)&&s.expressions[0]===a||r().isMemberExpression(s,{object:a})||r().isConditional(s,{test:a})||r().isBinary(s,{left:a})||r().isAssignmentExpression(s,{left:a})))return!1;a=s,s=e[--i]}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(165);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(166);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var a=n(167);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var s=n(168);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var o=n(169);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var l=n(72);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var u=n(40);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var c=n(171);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})});var p=n(172);Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})});var f=n(173);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})});var d=n(174);Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const n=t.quasis[0]===e,r=t.quasis[t.quasis.length-1]===e,i=(n?"`":"}")+e.value.raw+(r?"`":"${");this.token(i)},t.TemplateLiteral=function(e){const t=e.quasis;for(let n=0;n"),this.space(),this.print(e.body,e)}},function(e,t){e.exports=require("jsesc")},function(e,t,n){"use strict";function r(){const e=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(11));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.AnyTypeAnnotation=function(){this.word("any")},t.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},t.BooleanTypeAnnotation=function(){this.word("boolean")},t.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},t.NullLiteralTypeAnnotation=function(){this.word("null")},t.DeclareClass=function(e,t){r().isDeclareExportDeclaration(t)||(this.word("declare"),this.space());this.word("class"),this.space(),this._interfaceish(e)},t.DeclareFunction=function(e,t){r().isDeclareExportDeclaration(t)||(this.word("declare"),this.space());this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),e.predicate&&(this.space(),this.print(e.predicate,e));this.semicolon()},t.InferredPredicate=function(){this.token("%"),this.word("checks")},t.DeclaredPredicate=function(e){this.token("%"),this.word("checks"),this.token("("),this.print(e.value,e),this.token(")")},t.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},t.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},t.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},t.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},t.DeclareOpaqueType=function(e,t){r().isDeclareExportDeclaration(t)||(this.word("declare"),this.space());this.OpaqueType(e)},t.DeclareVariable=function(e,t){r().isDeclareExportDeclaration(t)||(this.word("declare"),this.space());this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},t.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space());(function(e){if(e.declaration){const t=e.declaration;this.print(t,e),r().isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}).apply(this,arguments)},t.DeclareExportAllDeclaration=function(){this.word("declare"),this.space(),i.ExportAllDeclaration.apply(this,arguments)},t.ExistsTypeAnnotation=function(){this.token("*")},t.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e));this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type||"ObjectTypeProperty"===t.type&&t.method?this.token(":"):(this.space(),this.token("=>"));this.space(),this.print(e.returnType,e)},t.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?");e.name&&(this.token(":"),this.space());this.print(e.typeAnnotation,e)},t.GenericTypeAnnotation=t.ClassImplements=t.InterfaceExtends=function(e){this.print(e.id,e),this.print(e.typeParameters,e)},t._interfaceish=function(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e));e.implements&&e.implements.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e));this.space(),this.print(e.body,e)},t._variance=function(e){e.variance&&("plus"===e.variance.kind?this.token("+"):"minus"===e.variance.kind&&this.token("-"))},t.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},t.InterfaceTypeAnnotation=function(e){this.word("interface"),e.extends&&e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));this.space(),this.print(e.body,e)},t.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:s})},t.MixedTypeAnnotation=function(){this.word("mixed")},t.EmptyTypeAnnotation=function(){this.word("empty")},t.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)},t.NumberTypeAnnotation=function(){this.word("number")},t.StringTypeAnnotation=function(){this.word("string")},t.ThisTypeAnnotation=function(){this.word("this")},t.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},t.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},t.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},t.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TypeParameterDeclaration=t.TypeParameterInstantiation=function(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")},t.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e);e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e));e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e));this.semicolon()},t.ObjectTypeAnnotation=function(e){e.exact?this.token("{|"):this.token("{");const t=e.properties.concat(e.callProperties||[],e.indexers||[],e.internalSlots||[]);t.length&&(this.space(),this.printJoin(t,e,{addNewlines(e){if(e&&!t[0])return 1},indent:!0,statement:!0,iterator:()=>{1!==t.length&&(this.token(","),this.space())}}),this.space());e.exact?this.token("|}"):this.token("}")},t.ObjectTypeInternalSlot=function(e){e.static&&(this.word("static"),this.space());this.token("["),this.token("["),this.print(e.id,e),this.token("]"),this.token("]"),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space());this.print(e.value,e)},t.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space());this._variance(e),this.token("["),e.id&&(this.print(e.id,e),this.token(":"),this.space());this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},t.ObjectTypeProperty=function(e){e.proto&&(this.word("proto"),this.space());e.static&&(this.word("static"),this.space());this._variance(e),this.print(e.key,e),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},t.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},t.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:o})},t.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},t.Variance=function(e){"plus"===e.kind?this.token("+"):this.token("-")},t.VoidTypeAnnotation=function(){this.word("void")},Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return a.NumericLiteral}}),Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return a.StringLiteral}});var i=n(72),a=n(40);function s(){this.space(),this.token("&"),this.space()}function o(){this.space(),this.token("|"),this.space()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.File=function(e){e.program&&this.print(e.program.interpreter,e);this.print(e.program,e)},t.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline();this.printSequence(e.body,e)},t.BlockStatement=function(e){this.token("{"),this.printInnerComments(e);const t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))},t.Noop=function(){},t.Directive=function(e){this.print(e.value,e),this.semicolon()},t.InterpreterDirective=function(e){this.token(`#!${e.value}\n`)},Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return r.StringLiteral}});var r=n(40)},function(e,t,n){"use strict";function r(){this.space()}Object.defineProperty(t,"__esModule",{value:!0}),t.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},t.JSXIdentifier=function(e){this.word(e.name)},t.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},t.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},t.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},t.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},t.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},t.JSXText=function(e){const t=this.getPossibleRaw(e);null!=t?this.token(t):this.token(e.value)},t.JSXElement=function(e){const t=e.openingElement;if(this.print(t,e),t.selfClosing)return;this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingElement,e)},t.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),this.print(e.typeParameters,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:r}));e.selfClosing?(this.space(),this.token("/>")):this.token(">")},t.JSXClosingElement=function(e){this.token("")},t.JSXEmptyExpression=function(e){this.printInnerComments(e)},t.JSXFragment=function(e){this.print(e.openingFragment,e),this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingFragment,e)},t.JSXOpeningFragment=function(){this.token("<"),this.token(">")},t.JSXClosingFragment=function(){this.token("")}},function(e,t,n){"use strict";function r(e,t){!0!==t&&e.token(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TSTypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TSTypeParameterDeclaration=t.TSTypeParameterInstantiation=function(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")},t.TSTypeParameter=function(e){this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint,e));e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.TSParameterProperty=function(e){e.accessibility&&(this.word(e.accessibility),this.space());e.readonly&&(this.word("readonly"),this.space());this._param(e.parameter)},t.TSDeclareFunction=function(e){e.declare&&(this.word("declare"),this.space());this._functionHead(e),this.token(";")},t.TSDeclareMethod=function(e){this._classMethodHead(e),this.token(";")},t.TSQualifiedName=function(e){this.print(e.left,e),this.token("."),this.print(e.right,e)},t.TSCallSignatureDeclaration=function(e){this.tsPrintSignatureDeclarationBase(e)},t.TSConstructSignatureDeclaration=function(e){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(e)},t.TSPropertySignature=function(e){const{readonly:t,initializer:n}=e;t&&(this.word("readonly"),this.space());this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(";")},t.tsPrintPropertyOrMethodName=function(e){e.computed&&this.token("[");this.print(e.key,e),e.computed&&this.token("]");e.optional&&this.token("?")},t.TSMethodSignature=function(e){this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSIndexSignature=function(e){const{readonly:t}=e;t&&(this.word("readonly"),this.space());this.token("["),this._parameters(e.parameters,e),this.token("]"),this.print(e.typeAnnotation,e),this.token(";")},t.TSAnyKeyword=function(){this.word("any")},t.TSNumberKeyword=function(){this.word("number")},t.TSObjectKeyword=function(){this.word("object")},t.TSBooleanKeyword=function(){this.word("boolean")},t.TSStringKeyword=function(){this.word("string")},t.TSSymbolKeyword=function(){this.word("symbol")},t.TSVoidKeyword=function(){this.word("void")},t.TSUndefinedKeyword=function(){this.word("undefined")},t.TSNullKeyword=function(){this.word("null")},t.TSNeverKeyword=function(){this.word("never")},t.TSThisType=function(){this.word("this")},t.TSFunctionType=function(e){this.tsPrintFunctionOrConstructorType(e)},t.TSConstructorType=function(e){this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(e)},t.tsPrintFunctionOrConstructorType=function(e){const{typeParameters:t,parameters:n}=e;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")"),this.space(),this.token("=>"),this.space(),this.print(e.typeAnnotation.typeAnnotation,e)},t.TSTypeReference=function(e){this.print(e.typeName,e),this.print(e.typeParameters,e)},t.TSTypePredicate=function(e){this.print(e.parameterName),this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation)},t.TSTypeQuery=function(e){this.word("typeof"),this.space(),this.print(e.exprName)},t.TSTypeLiteral=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.members,e)},t.tsPrintTypeLiteralOrInterfaceBody=function(e,t){this.tsPrintBraced(e,t)},t.tsPrintBraced=function(e,t){if(this.token("{"),e.length){this.indent(),this.newline();for(const n of e)this.print(n,t),this.newline();this.dedent(),this.rightBrace()}else this.token("}")},t.TSArrayType=function(e){this.print(e.elementType),this.token("[]")},t.TSTupleType=function(e){this.token("["),this.printList(e.elementTypes,e),this.token("]")},t.TSUnionType=function(e){this.tsPrintUnionOrIntersectionType(e,"|")},t.TSIntersectionType=function(e){this.tsPrintUnionOrIntersectionType(e,"&")},t.tsPrintUnionOrIntersectionType=function(e,t){this.printJoin(e.types,e,{separator(){this.space(),this.token(t),this.space()}})},t.TSConditionalType=function(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.token("?"),this.space(),this.print(e.trueType),this.space(),this.token(":"),this.space(),this.print(e.falseType)},t.TSInferType=function(e){this.token("infer"),this.space(),this.print(e.typeParameter)},t.TSParenthesizedType=function(e){this.token("("),this.print(e.typeAnnotation,e),this.token(")")},t.TSTypeOperator=function(e){this.token(e.operator),this.space(),this.print(e.typeAnnotation,e)},t.TSIndexedAccessType=function(e){this.print(e.objectType,e),this.token("["),this.print(e.indexType,e),this.token("]")},t.TSMappedType=function(e){const{readonly:t,typeParameter:n,optional:i}=e;this.token("{"),this.space(),t&&(r(this,t),this.word("readonly"),this.space());this.token("["),this.word(n.name),this.space(),this.word("in"),this.space(),this.print(n.constraint,n),this.token("]"),i&&(r(this,i),this.token("?"));this.token(":"),this.space(),this.print(e.typeAnnotation,e),this.space(),this.token("}")},t.TSLiteralType=function(e){this.print(e.literal,e)},t.TSExpressionWithTypeArguments=function(e){this.print(e.expression,e),this.print(e.typeParameters,e)},t.TSInterfaceDeclaration=function(e){const{declare:t,id:n,typeParameters:r,extends:i,body:a}=e;t&&(this.word("declare"),this.space());this.word("interface"),this.space(),this.print(n,e),this.print(r,e),i&&(this.space(),this.word("extends"),this.space(),this.printList(i,e));this.space(),this.print(a,e)},t.TSInterfaceBody=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.body,e)},t.TSTypeAliasDeclaration=function(e){const{declare:t,id:n,typeParameters:r,typeAnnotation:i}=e;t&&(this.word("declare"),this.space());this.word("type"),this.space(),this.print(n,e),this.print(r,e),this.space(),this.token("="),this.space(),this.print(i,e),this.token(";")},t.TSAsExpression=function(e){const{expression:t,typeAnnotation:n}=e;this.print(t,e),this.space(),this.word("as"),this.space(),this.print(n,e)},t.TSTypeAssertion=function(e){const{typeAnnotation:t,expression:n}=e;this.token("<"),this.print(t,e),this.token(">"),this.space(),this.print(n,e)},t.TSEnumDeclaration=function(e){const{declare:t,const:n,id:r,members:i}=e;t&&(this.word("declare"),this.space());n&&(this.word("const"),this.space());this.word("enum"),this.space(),this.print(r,e),this.space(),this.tsPrintBraced(i,e)},t.TSEnumMember=function(e){const{id:t,initializer:n}=e;this.print(t,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(",")},t.TSModuleDeclaration=function(e){const{declare:t,id:n}=e;t&&(this.word("declare"),this.space());e.global||(this.word("Identifier"===n.type?"namespace":"module"),this.space());if(this.print(n,e),!e.body)return void this.token(";");let r=e.body;for(;"TSModuleDeclaration"===r.type;)this.token("."),this.print(r.id,r),r=r.body;this.space(),this.print(r,e)},t.TSModuleBlock=function(e){this.tsPrintBraced(e.body,e)},t.TSImportEqualsDeclaration=function(e){const{isExport:t,id:n,moduleReference:r}=e;t&&(this.word("export"),this.space());this.word("import"),this.space(),this.print(n,e),this.space(),this.token("="),this.space(),this.print(r,e),this.token(";")},t.TSExternalModuleReference=function(e){this.token("require("),this.print(e.expression,e),this.token(")")},t.TSNonNullExpression=function(e){this.print(e.expression,e),this.token("!")},t.TSExportAssignment=function(e){this.word("export"),this.space(),this.token("="),this.space(),this.print(e.expression,e),this.token(";")},t.TSNamespaceExportDeclaration=function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id,e)},t.tsPrintSignatureDeclarationBase=function(e){const{typeParameters:t,parameters:n}=e;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")"),this.print(e.typeAnnotation,e)}},function(e,t,n){"use strict";var r=[],i=[];e.exports= /** * Checks if two values are equal. Values may be primitives, arrays, or objects. * Returns true if both arguments have the same keys and values. * * @see http://underscorejs.org * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. * @license MIT */ function(e,t){var n=r.length?r.pop():[],a=i.length?i.pop():[],s=function e(t,n,r,i){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if("object"!=typeof t||"object"!=typeof n)return!1;var a=Object.prototype.toString,s=a.call(t);if(s!==a.call(n))return!1;switch(s){case"[object String]":return t===String(n);case"[object Number]":return!isNaN(t)&&!isNaN(n)&&t===Number(n);case"[object Date]":case"[object Boolean]":return+t==+n;case"[object RegExp]":return t.source===n.source&&t.global===n.global&&t.multiline===n.multiline&&t.ignoreCase===n.ignoreCase}for(var o=r.length;o--;)if(r[o]===t)return i[o]===n;r.push(t),i.push(n);var l=0;if("[object Array]"===s){if((l=t.length)!==n.length)return!1;for(;l--;)if(!e(t[l],n[l],r,i))return!1}else{if(t.constructor!==n.constructor)return!1;if(t.hasOwnProperty("valueOf")&&n.hasOwnProperty("valueOf"))return t.valueOf()===n.valueOf();var u=Object.keys(t);if(u.length!==Object.keys(n).length)return!1;for(var c=0;c=0)&&e.type instanceof f||(n.optional=!0),n});return t.generatedInputObjectTypes[n]=a(o),r.genericTypeAnnotation(r.identifier(n))}throw new Error("Could not convert from GraphQL type ".concat(e.toString()))}e.exports={transformInputType:S,transformScalarType:y}},function(e,t,n){"use strict";var r=n(178),i=n(73),a=n(179),s=n(180),o=n(181),l=n(184),u=n(186),c=n(187),p=n(188),f=n(189),d=n(75),h=n(76),m=n(78),y=n(81),v=n(190),T=n(191),g=n(192),S=n(193),x=n(194),b=n(195),E=[l.SCHEMA_EXTENSION,h.SCHEMA_EXTENSION,y.SCHEMA_EXTENSION,m.SCHEMA_EXTENSION],P=[l.transform,g.transform,y.transform,d.transform,h.transform,m.transform],A=[c.transform,i.transformWithOptions({flattenAbstractTypes:!0}),x.transform],w=[o.transform,S.transform,b.transform,p.transform],k=[T.transform,u.transform,a.transform,i.transformWithOptions({flattenAbstractTypes:!0}),x.transform,f.transform,r.transform],N=[i.transformWithOptions({}),f.transform,v.transform,r.transform,s.transform];e.exports={commonTransforms:P,codegenTransforms:k,fragmentTransforms:A,printTransforms:N,queryTransforms:w,schemaExtensions:E}},function(e,t,n){"use strict";n(3);var r=n(5);function i(e){return this.getContext().serverSchema.getDirectives().some(function(t){return t.name===e.name})?e:null}e.exports={transform:function(e){return r.transform(e,{Directive:i})}}},function(e,t,n){"use strict";n(3);var r=n(5),i=n(2);function a(e){return null}function s(e){0!==e.args.length&&i(!1);var t=this.getContext().getFragment(e.name),n={kind:"InlineFragment",directives:e.directives,loc:{kind:"Derived",source:e.loc},metadata:e.metadata,selections:t.selections,typeCondition:t.type};return this.traverse(n)}e.exports={transform:function(e){return r.transform(e,{Fragment:a,FragmentSpread:s})}}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(79)),a=n(10),s=a.createCombinedError,o=a.createUserError,l=a.eachWithErrors;function u(e){var t=new Map,n=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;t.set(o.name,o)}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}e.exports={transform:function(e){var t=i(e),n=e,a=l(e.documents(),function(e){if("Root"===e.kind){var i=t.getRoot(e.name),a=u(e.argumentDefinitions),s=u(i.argumentDefinitions),l=[],c=!0,p=!1,f=void 0;try{for(var d,h=s.values()[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var m=d.value;a.has(m.name)||l.push(m)}}catch(e){p=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(p)throw f}}if(0!==l.length)throw o("Operation '".concat(e.name,"' references undefined variable(s):\n").concat(l.map(function(e){return"- $".concat(e.name,": ").concat(String(e.type))}).join("\n"),"."),l.map(function(e){return e.loc}));n=n.replace((0,r.default)({},e,{argumentDefinitions:e.argumentDefinitions.filter(function(e){return s.has(e.name)})}))}});if(null!=a&&0!==a.length)throw s(a);return n}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=n(5),o=n(182),l=n(83),u=n(183),c=n(10),p=c.createCompilerError,f=c.createNonRecoverableUserError,d=o.getFragmentScope,h=o.getRootScope;function m(e,t,n,r,a){var s=v(e,t,n,r.selections,a);if(!s)return null;if(r.hasOwnProperty("directives")){var o=T(n,r.directives,a);return(0,i.default)({},r,{directives:o,selections:s})}return(0,i.default)({},r,{selections:s})}function y(e,t,n,r,s){var o=T(n,r.directives,s),c=function(e,t,n,r,s,o){var c=e.getFragment(r.name),p=function(e,t,n){if(!e.length)return null;var r=(0,a.default)(e).sort(function(e,t){return e.namet.name?1:0}),i=JSON.stringify(r.map(function(e){var n;if("Variable"===e.value.kind){if(null==(n=t[e.value.variableName]))throw f("Variable '$".concat(e.value.variableName,"' is not in scope."),[e.value.loc])}else n=e.value;return{name:e.name,value:l(n)}}));return u(i)}(s,n),h=p?"".concat(c.name,"_").concat(p):c.name,m=t.get(h);if(m)return m;var y=d(c.argumentDefinitions,s,n,r);if(null===t.get(h))throw f("Found a circular reference from fragment '".concat(c.name,"'."),o.map(function(e){return e.loc}));t.set(h,null);var T=null,g=v(e,t,y,c.selections,o);g&&(T=(0,i.default)({},c,{selections:g,name:h,argumentDefinitions:[]}));return t.set(h,T),T}(e,t,n,r,r.args,(0,a.default)(s).concat([r]));return c?(0,i.default)({},r,{kind:"FragmentSpread",args:[],directives:o,name:c.name}):null}function v(e,t,n,r,s){var o=null;return r.forEach(function(r){var l;if("InlineFragment"===r.kind||"MatchBranch"===r.kind)l=m(e,t,n,r,s);else if("FragmentSpread"===r.kind)l=y(e,t,n,r,s);else if("Condition"===r.kind){var u,c=function(e,t,n,r,a){var s=S(n,r.condition,a);if("Literal"!==s.kind&&"Variable"!==s.kind)throw f("A non-scalar value was applied to an @include or @skip directive, the `if` argument value must be a variable or a literal Boolean.",[s.loc]);if("Literal"===s.kind&&s.value!==r.passingValue)return null;var o=v(e,t,n,r.selections,a);return o?"Literal"===s.kind&&s.value===r.passingValue?o:[(0,i.default)({},r,{condition:s,selections:o})]:null}(e,t,n,r,s);if(c)(u=o=o||[]).push.apply(u,(0,a.default)(c))}else{if("LinkedField"!==r.kind&&"ScalarField"!==r.kind&&"MatchField"!==r.kind)throw"Defer"===r.kind||"Stream"===r.kind?p("RelayApplyFragmentArgumentTransform: Expected to be applied before processing @defer/@stream.",[r.loc]):p("RelayApplyFragmentArgumentTransform: Unsupported kind '".concat(r.kind,"'."),[r.loc]);l=function(e,t,n,r,a){var s=g(n,r.args,a),o=T(n,r.directives,a);if("LinkedField"===r.kind||"MatchField"===r.kind){var l=v(e,t,n,r.selections,a);return l?(0,i.default)({},r,{args:s,directives:o,selections:l}):null}return(0,i.default)({},r,{args:s,directives:o})}(e,t,n,r,s)}l&&(o=o||[]).push(l)}),o}function T(e,t,n){return t.map(function(t){var r=g(e,t.args,n);return(0,i.default)({},t,{args:r})})}function g(e,t,n){return t.map(function(t){var r=S(e,t.value,n);return r===t.value?t:(0,i.default)({},t,{value:r})})}function S(e,t,n){if("Variable"===t.kind){var r=e[t.variableName];if(null==r)throw f("Variable '$".concat(t.variableName,"' is not in scope."),[t.loc]);return r}return"ListValue"===t.kind?(0,i.default)({},t,{items:t.items.map(function(t){return S(e,t,n)})}):"ObjectValue"===t.kind?(0,i.default)({},t,{fields:t.fields.map(function(t){return(0,i.default)({},t,{value:S(e,t.value,n)})})}):t}e.exports={transform:function(e){var t=new Map,n=s.transform(e,{Root:function(n){var r=h(n.argumentDefinitions);return m(e,t,r,n,[n])},Fragment:function(){return null}});return Array.from(t.values()).reduce(function(e,t){return t?e.add(t):e},n)}}},function(e,t,n){"use strict";var r=n(10),i=r.createCombinedError,a=r.createUserError,s=r.eachWithErrors,o=n(1).GraphQLNonNull;e.exports={getFragmentScope:function(e,t,n,r){var l=new Map;t.forEach(function(e){"Literal"===e.value.kind?l.set(e.name,e.value):"Variable"===e.value.kind&&l.set(e.name,n[e.value.variableName])});var u={},c=s(e,function(e){if("RootArgumentDefinition"===e.kind){if(l.has(e.name)){var n,i=t.find(function(t){return t.name===e.name});throw a("Unexpected argument '".concat(e.name,"' supplied to fragment '").concat(r.name,"'. @arguments may only be provided for variables defined in the fragment's @argumentDefinitions."),[null!==(n=null===i||void 0===i?void 0:i.loc)&&void 0!==n?n:r.loc])}u[e.name]={kind:"Variable",metadata:null,variableName:e.name,type:e.type}}else{var s=l.get(e.name);if(null==s||"Literal"===s.kind&&null==s.value){if(null==e.defaultValue&&e.type instanceof o){var c,p=t.find(function(t){return t.name===e.name});throw a("No value found for required argument '".concat(e.name,": ").concat(String(e.type),"' on fragment '").concat(r.name,"'."),[null!==(c=null===p||void 0===p?void 0:p.loc)&&void 0!==c?c:r.loc])}u[e.name]={kind:"Literal",value:e.defaultValue}}else u[e.name]=s}});if(null!=c&&c.length)throw i(c);return u},getRootScope:function(e){var t={};return e.forEach(function(e){t[e.name]={kind:"Variable",metadata:null,variableName:e.name,type:e.type}}),t}}},function(e,t,n){"use strict";var r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";e.exports=function(e){for(var t,n=e.length,i=3&n,a=n^i,s=0,o=0;o!==a;){var l=e.charCodeAt(o+3);t=e.charCodeAt(o)^e.charCodeAt(o+1)<<8^e.charCodeAt(o+2)<<16^(255&l)<<24^(65280&l)>>8,o+=4,s=5*(s=(s^=t=13715*(t=(t=11601*t+3432906752*(65535&t)>>>0)<<15|t>>>17)+461832192*(65535&t)>>>0)<<13|s>>>19)+3864292196>>>0}switch(t=0,i){case 3:t^=e.charCodeAt(a+2)<<16;case 2:t^=e.charCodeAt(a+1)<<8;case 1:s^=t=13715*(t=(t=11601*(t^=e.charCodeAt(a))+3432906752*(65535&t)>>>0)<<15|t>>>17)+461832192*(65535&t)>>>0}if(s^=n,s=51819*(s^=s>>>16)+2246770688*(65535&s)>>>0,s=44597*(s^=s>>>13)+3266445312*(65535&s)>>>0,s^=s>>>16,!(s>>>=0))return"0";for(var u="";s;){var c=s%62;u=r[c]+u,s=(s-c)/62}return u}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=n(5),o=n(33),l=n(6),u=n(24),c=n(10),p=c.createCompilerError,f=c.createUserError,d=n(185),h=d.AFTER,m=d.BEFORE,y=d.FIRST,v=d.KEY,T=d.LAST,g=n(1),S=g.assertCompositeType,x=g.GraphQLInterfaceType,b=g.GraphQLList,E=g.GraphQLObjectType,P=g.GraphQLScalarType,A=g.GraphQLUnionType,w=g.parse,k=n(19).ConnectionInterface,N="connection",_="handler";function C(e,t){var n=this.traverse(e,t),r=t.connectionMetadata;return r.length?(0,i.default)({},n,{metadata:(0,i.default)({},n.metadata,{connection:r})}):n}function O(e,t){var n,r=l.getNullableType(e.type)instanceof b;t.path.push(r?null:e.alias||e.name);var s=this.traverse(e,t),c=e.directives.find(function(e){return e.name===N});if(!c)return t.path.pop(),s;var d=t.definitionName;!function(e,t){var n=k.get().EDGES;if(!D(t,y)&&!D(t,T))throw f("Expected field `".concat(t.name,": ")+"".concat(String(t.type),"` to have a ").concat(y," or ").concat(T," argument in ")+"document `".concat(e,"`."),[t.loc]);if(!t.selections.some(function(e){return"LinkedField"===e.kind&&e.name===n}))throw f("Expected field `".concat(t.name,": ")+"".concat(String(t.type),"` to have a ").concat(n," selection in document ")+"`".concat(e,"`."),[t.loc])}(d,s),function(e,t){var n=t.type,r=k.get(),i=r.CURSOR,a=r.EDGES,s=r.END_CURSOR,o=r.HAS_NEXT_PAGE,u=r.HAS_PREV_PAGE,c=r.NODE,p=r.PAGE_INFO,d=r.START_CURSOR,h=l.assertTypeWithFields(l.getNullableType(n)).getFields(),m=h[a];if(null==m)throw f("Expected type '".concat(String(n),"' to have an '").concat(a,"' field in document '").concat(e,"'."),[t.loc]);var y=l.getNullableType(m.type);if(!(y instanceof b))throw f("Expected '".concat(a,"' field on type '").concat(String(n),"' to be a list type in document '").concat(e,"'."),[t.loc]);var v=l.getNullableType(y.ofType);if(!(v instanceof E))throw f("Expected '".concat(a,"' field on type '").concat(String(n),"' to be a list of objects in document '").concat(e,"'."),[t.loc]);var T=v.getFields()[c];if(null==T)throw f("Expected type '".concat(String(n),"' to have have a '").concat(a," { ").concat(c," }' field in in document '").concat(e,"'."),[t.loc]);var g=l.getNullableType(T.type);if(!(g instanceof x||g instanceof A||g instanceof E))throw f("Expected type '".concat(String(n),"' to have a '").concat(a," { ").concat(c," }' field for which the type is an interface, object, or union in document '").concat(e,"'."),[t.loc]);var S=v.getFields()[i];if(null==S||!(l.getNullableType(S.type)instanceof P))throw f("Expected type '".concat(String(n),"' to have a '").concat(a," { ").concat(i," }' scalar field in document '").concat(e,"'."),[t.loc]);var w=h[p];if(null==w)throw f("Expected type '".concat(String(n),"' to have a '").concat(a," { ").concat(p," }' field in document '").concat(e,"'."),[t.loc]);var N=l.getNullableType(w.type);if(!(N instanceof E))throw f("Expected type '".concat(String(n),"' to have a '").concat(a," { ").concat(p," }' field with object type in document '").concat(e,"'."),[t.loc]);[s,o,u,d].forEach(function(n){var r=N.getFields()[n];if(null==r||!(l.getNullableType(r.type)instanceof P))throw f("Expected type '".concat(String(w.type),"' to have a '").concat(n,"' scalar field in document '").concat(e,"'."),[t.loc])})}(d,s);var g=t.path.includes(null),C=D(s,y),O=D(s,T),I=null,L=null,F=null;C&&!O?(I="forward",L=C,F=D(s,h)):O&&!C?(I="backward",L=O,F=D(s,m)):O&&C&&(I="bidirectional");var M=L&&"Variable"===L.value.kind?L.value.variableName:null,j=F&&"Variable"===F.value.kind?F.value.variableName:null;t.connectionMetadata.push({count:M,cursor:j,direction:I,path:g?null:(0,a.default)(t.path)}),t.path.pop();var R=u(c.args),B=R.handler,V=R.key,q=R.filters;if(null!=B&&"string"!=typeof B){var K,U,J=c.args.find(function(e){return"key"===e.name});throw f("Expected the ".concat(_," argument to ")+"@".concat(N," to be a string literal for field ").concat(e.name,"."),[null!==(K=null===J||void 0===J?void 0:null===(U=J.value)||void 0===U?void 0:U.loc)&&void 0!==K?K:c.loc])}if("string"!=typeof V){var X,Y,W=c.args.find(function(e){return"key"===e.name});throw f("Expected the ".concat(v," argument to ")+"@".concat(N," to be a string literal for field ").concat(e.name,"."),[null!==(X=null===W||void 0===W?void 0:null===(Y=W.value)||void 0===Y?void 0:Y.loc)&&void 0!==X?X:c.loc])}var G=e.alias||e.name;if(!V.endsWith("_"+G)){var Q,H,z=c.args.find(function(e){return"key"===e.name});throw f("Expected the ".concat(v," argument to ")+"@".concat(N," to be of form _").concat(G,", got '").concat(V,"'. ")+"For detailed explanation, check out https://facebook.github.io/relay/docs/en/pagination-container.html#connection",[null!==(Q=null===z||void 0===z?void 0:null===(H=z.value)||void 0===H?void 0:H.loc)&&void 0!==Q?Q:c.loc])}var $={name:null!==(n=B)&&void 0!==n?n:N,key:V,filters:q||function(){var t=e.args.filter(function(e){return!k.isConnectionCall({name:e.name,value:null})}).map(function(e){return e.name});return 0===t.length?null:t}()};if(null!==I){var Z=function(e,t,n,r){var i=k.get(),a=i.CURSOR,s=i.EDGES,u=i.END_CURSOR,c=i.HAS_NEXT_PAGE,f=i.HAS_PREV_PAGE,d=i.NODE,h=i.PAGE_INFO,m=i.START_CURSOR,y=S(l.getNullableType(n)),v=h;v+="forward"===r?"{\n ".concat(u,"\n ").concat(c,"\n }"):"backward"===r?"{\n ".concat(f,"\n ").concat(m,"\n }"):"{\n ".concat(u,"\n ").concat(c,"\n ").concat(f,"\n ").concat(m,"\n }");var T="fragment ConnectionFragment on ".concat(String(y)," {\n ").concat(s," {\n ").concat(a,"\n ").concat(d,' {\n __typename # rely on GenerateRequisiteFieldTransform to add "id"\n }\n }\n ').concat(v,"\n }"),g=w(T).definitions[0];if(null==g||"FragmentDefinition"!==g.kind)throw p("RelayConnectionTransform: Expected a fragment definition AST.",null,[g].filter(Boolean));var x=o.transform(e.clientSchema,[g])[0];if(null==x||"Fragment"!==x.kind)throw p("RelayConnectionTransform: Expected a connection fragment.",[null===x||void 0===x?void 0:x.loc].filter(Boolean));return{directives:[],kind:"InlineFragment",loc:{kind:"Derived",source:t},metadata:null,selections:x.selections,typeCondition:y}}(this.getContext(),s.loc,s.type,I);s=(0,i.default)({},s,{selections:s.selections.concat(Z)})}return(0,i.default)({},s,{directives:s.directives.filter(function(e){return e.name!==N}),handles:s.handles?(0,a.default)(s.handles).concat([$]):[$]})}function D(e,t){return e.args&&e.args.find(function(e){return e.name===t})}e.exports={CONNECTION:N,SCHEMA_EXTENSION:"directive @connection(key: String!, filters: [String], handler: String) on FIELD",transform:function(e){return s.transform(e,{Fragment:C,LinkedField:O,MatchField:O,Root:C},function(e){return{path:[],connectionMetadata:[],definitionName:e.name}})}}},function(e,t,n){"use strict";e.exports={AFTER:"after",BEFORE:"before",FIRST:"first",KEY:"key",LAST:"last"}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5)),a=n(6).getNullableType,s=n(10).createUserError,o=n(1).GraphQLList;function l(e,t){var n,i,l=this.traverse(e,t),u=l.directives.find(function(e){return"stream"===e.name});if(null==u)return l;if(!(a(e.type)instanceof o))throw s("Invalid use of @stream on non-plural field '".concat(e.name,"'"),[u.loc]);l=(0,r.default)({},l,{directives:l.directives.filter(function(e){return"stream"!==e.name})});var c=u.args.find(function(e){return"if"===e.name});if(h(c))return l;var p=u.args.find(function(e){return"initial_count"===e.name}),m=f(u,"label"),y=d(t.documentName,"stream",m);return{if:null!==(n=null===c||void 0===c?void 0:c.value)&&void 0!==n?n:null,initialCount:null!==(i=null===p||void 0===p?void 0:p.value)&&void 0!==i?i:null,kind:"Stream",label:y,loc:{kind:"Derived",source:u.loc},metadata:null,selections:[l]}}function u(e,t){var n=e.directives.find(function(e){return"stream"===e.name});if(null!=n)throw s("Invalid use of @stream on scalar field '".concat(e.name,"'"),[n.loc]);return this.traverse(e,t)}function c(e,t){var n,i=this.traverse(e,t),a=i.directives.find(function(e){return"defer"===e.name});if(null==a)return i;i=(0,r.default)({},i,{directives:i.directives.filter(function(e){return"defer"!==e.name})});var s=a.args.find(function(e){return"if"===e.name});if(h(s))return i;var o=f(a,"label"),l=d(t.documentName,"defer",o);return{if:null!==(n=null===s||void 0===s?void 0:s.value)&&void 0!==n?n:null,kind:"Defer",label:l,loc:{kind:"Derived",source:a.loc},metadata:null,selections:[i]}}function p(e,t){var n,i=this.traverse(e,t),a=i.directives.find(function(e){return"defer"===e.name});if(null==a)return i;i=(0,r.default)({},i,{directives:i.directives.filter(function(e){return"defer"!==e.name})});var s=a.args.find(function(e){return"if"===e.name});if(h(s))return i;var o=f(a,"label"),l=d(t.documentName,"defer",o);return{if:null!==(n=null===s||void 0===s?void 0:s.value)&&void 0!==n?n:null,kind:"Defer",label:l,loc:{kind:"Derived",source:a.loc},metadata:null,selections:[i]}}function f(e,t){var n,r=e.args.find(function(e){return e.name===t}),i=null!=r&&"Literal"===r.value.kind?r.value.value:null;if("string"!=typeof i)throw s("Expected the '".concat(t,"' value to @").concat(e.name," to be a string literal."),[null!==(n=null===r||void 0===r?void 0:r.value.loc)&&void 0!==n?n:e.loc]);return i}function d(e,t,n){return"".concat(e,"$").concat(t,"$").concat(n)}function h(e){return null!=e&&"Literal"===e.value.kind&&!1===e.value.value}e.exports={transform:function(e){return i.transform(e,{FragmentSpread:p,InlineFragment:c,LinkedField:l,ScalarField:u},function(e){return{documentName:e.name}})}}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5)),a=n(2),s=n(19).getRelayHandleKey;function o(e){"LinkedField"===e.kind&&(e=this.traverse(e));var t=e.handles;if(!t||!t.length)return e;1!==t.length&&a(!1);var n=e.alias||e.name,i=t[0],o=s(i.name,i.key,e.name),l=i.filters,u=l?e.args.filter(function(e){return l.indexOf(e.name)>-1}):[];return(0,r.default)({},e,{args:u,alias:n,name:o,handles:null})}e.exports={transform:function(e){return i.transform(e,{LinkedField:o,MatchField:o,ScalarField:o})}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(5)),o=n(6),l=n(84).hasUnaliasedSelection,u=n(1),c=u.assertAbstractType,p=u.assertCompositeType,f=u.assertLeafType,d=o.canHaveSelections,h=o.getRawType,m=o.hasID,y=o.implementsInterface,v=o.isAbstractType,T=o.mayImplement,g="id",S="ID",x="Node";function b(e,t){var n=this.traverse(e,t);if(l(e,g))return n;var r=this.getContext().serverSchema,s=p(h(e.type));if(d(s)&&m(r,s))return(0,i.default)({},n,{selections:(0,a.default)(n.selections).concat([t.idField])});if(v(s)){var o=(0,a.default)(n.selections);if(T(r,s,x)){var u=p(r.getType(x));o.push(E(u,t.idField))}var f=c(s);return r.getPossibleTypes(f).forEach(function(e){!y(e,x)&&m(r,e)&&o.push(E(e,t.idField))}),(0,i.default)({},n,{selections:o})}return n}function E(e,t){return{kind:"InlineFragment",directives:[],loc:{kind:"Generated"},metadata:null,typeCondition:e,selections:[t]}}e.exports={transform:function(e){var t=f(e.serverSchema.getType(S)),n={idField:{kind:"ScalarField",alias:null,args:[],directives:[],handles:null,loc:{kind:"Generated"},metadata:null,name:g,type:t}};return s.transform(e,{LinkedField:b,MatchField:b},function(){return n})}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(5)),o=n(6),l=n(84).hasUnaliasedSelection,u=n(1).assertLeafType,c=o.isAbstractType,p="__typename",f="String";function d(e,t){var n=this.traverse(e,t);return c(n.type)&&!l(n,p)?(0,i.default)({},n,{selections:[t.typenameField].concat((0,a.default)(n.selections))}):n}e.exports={transform:function(e){var t=u(e.serverSchema.getType(f)),n={typenameField:{kind:"ScalarField",alias:null,args:[],directives:[],handles:null,loc:{kind:"Generated"},metadata:null,name:p,type:t}};return s.transform(e,{LinkedField:d,MatchField:d},function(){return n})}}},function(e,t,n){"use strict";var r=n(0)(n(4)),i=(n(3),n(5));function a(e){var t=this.traverse(e);return t.handles?(0,r.default)({},t,{handles:null}):t}e.exports={transform:function(e){return i.transform(e,{LinkedField:a,MatchField:a,ScalarField:a})}}},function(e,t,n){"use strict";n(3);var r=n(5),i=n(77);function a(e,t){var n=this.traverse(e,t),r={kind:"SplitOperation",name:i(n.name),selections:n.selections,loc:{kind:"Derived",source:e.loc},metadata:{derivedFrom:n.name},type:n.type};return t.set(e.name,r),n}e.exports={transform:function(e){var t=new Map;return r.transform(e,{MatchBranch:a},function(){return t}).addAll(Array.from(t.values()))}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(5)),o=n(6),l=n(1).GraphQLObjectType,u=n(19).DEFAULT_HANDLE_KEY,c=o.getRawType,p="id",f="viewer",d="Viewer";function h(e){var t=this.traverse(e);if(c(e.type).name!==d)return t;var n=t.handles,r={name:f,key:u,filters:null};return n&&!n.find(function(e){return e.name===f})?n=(0,a.default)(n).concat([r]):n||(n=[r]),n!==t.handles?(0,i.default)({},t,{handles:n}):t}e.exports={transform:function(e){var t=e.serverSchema.getType(d);return null!=t&&t instanceof l&&null==t.getFields()[p]?s.transform(e,{LinkedField:h,MatchField:h}):e}}},function(e,t,n){"use strict";n(3);var r=n(5),i=n(2),a=n(6),s=a.assertTypeWithFields,o=a.canHaveSelections,l=a.getRawType,u=n(1),c=u.SchemaMetaFieldDef,p=u.TypeMetaFieldDef,f=u.TypeNameMetaFieldDef;function d(e,t){if(o(t)&&s(t).getFields()[e.name]||e.name===c.name||e.name===p.name||e.name===f.name||e.directives.some(function(e){return"fixme_fat_interface"===e.name})){var n=l(e.type),r=this.getContext().serverSchema.getType(n.name);return r||i(!1),this.traverse(e,r)}return null}function h(e,t){var n=this.getContext(),r=n.getFragment(e.name);return n.serverSchema.getType(r.type.name)?this.traverse(e,t):null}function m(e,t){var n=this.getContext().serverSchema.getType(e.typeCondition.name);return n?this.traverse(e,n):null}e.exports={transform:function(e){return r.transform(e,{FragmentSpread:h,InlineFragment:m,LinkedField:d,MatchField:d,ScalarField:d},function(t){return function(e,t){var n=e.serverSchema;switch(t.kind){case"Fragment":return n.getType(t.type.name);case"Root":switch(t.operation){case"query":return n.getQueryType();case"mutation":return n.getMutationType();case"subscription":return n.getSubscriptionType();default:t.operation}break;case"SplitOperation":return n.getType(t.type.name)}return null}(e,t)})}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(5)),o=n(20).Map,l=n(74),u=n(2);function c(e){return function e(t,n){var r=[];(function(e){return(0,a.default)(e).sort(function(e,t){return"InlineFragment"===e.kind||"Condition"===e.kind?1:"InlineFragment"===t.kind||"Condition"===t.kind?-1:0})})(t.selections).forEach(function(t){var i=l(t);switch(t.kind){case"ScalarField":case"FragmentSpread":n.has(i)||(r.push(t),n=n.set(i,null));break;case"Defer":case"Stream":case"MatchBranch":case"MatchField":case"LinkedField":var a=e(t,n.get(i)||new o);a.node&&(r.push(a.node),n=n.set(i,a.selectionMap));break;case"InlineFragment":case"Condition":var s=e(t,n.get(i)||n);s.node&&(r.push(s.node),n=n.set(i,s.selectionMap));break;default:u(!1)}});var s=r.length?(0,i.default)({},t,{selections:r}):null;return{selectionMap:n,node:s}}(e,new o).node}e.exports={transform:function(e){return s.transform(e,{Root:c,Fragment:c})}}},function(e,t,n){"use strict";var r=n(0),i=r(n(4)),a=r(n(7)),s=(n(3),n(5)),o=n(2),l="fail",u="pass",c="variable";function p(e){return"Variable"===e.condition.kind?c:e.condition.value===e.passingValue?u:l}e.exports={transform:function(e){var t=new Map,n=s.transform(e,{Root:function(n){return function e(t,n,r){for(var s,l=(0,a.default)(r.selections);l.length;){var f=l.shift(),d=void 0;switch(f.kind){case"Condition":var h=p(f);h===u?l.unshift.apply(l,(0,a.default)(f.selections)):h===c&&(d=e(t,n,f));break;case"FragmentSpread":if(!n.has(f.name)){var m=t.getFragment(f.name),y=e(t,n,m);n.set(f.name,y)}n.get(f.name)&&(d=f);break;case"MatchBranch":case"LinkedField":case"InlineFragment":case"Defer":case"Stream":d=e(t,n,f);break;case"ScalarField":d=f;break;case"MatchField":d=e(t,n,f);break;default:f.kind,o(!1)}d&&(s=s||[]).push(d)}return s?(0,i.default)({},r,{selections:s}):null}(e,t,n)},Fragment:function(e){return null}});return Array.from(t.values()).reduce(function(e,t){return t?e.add(t):e},n)}}},function(e,t,n){"use strict";var r=n(0)(n(7)),i=n(28),a=n(1),s=n(9),o=n(21),l=n(2),u=n(14),c=n(197).memoizedFind,p=s.instrument(a.parse,"GraphQL.parse"),f={validateNames:!0};e.exports=function(e){var t=c.bind(null,e);function n(e,t){var n=s(e,t);if(n)return n.document}function s(e,n){var i=o.readFileSync(u.join(e,n.relPath),"utf8");i.indexOf("graphql")>=0||l(!1);var s=[],c=[];return t(i,e,n,f).forEach(function(e){var t=new a.Source(e,n.relPath),i=p(t);i.definitions.length||l(!1),c.push(t.body),s.push.apply(s,(0,r.default)(i.definitions))}),{document:{kind:"Document",definitions:s},sources:c}}return{getParser:function(e){return new i({baseDir:e,parse:n})},getFileFilter:function(e){return function(t){return o.readFileSync(u.join(e,t.relPath),"utf8").indexOf("graphql")>=0}},parseFile:n,parseFileWithSources:s}}},function(e,t,n){"use strict";var r=n(198),i=n(200),a=n(1),s=n(14),o=n(29),l=new r("RelayFindGraphQLTags","v1");function u(e,t,n,r){var s=r.validateNames,o=e(t,n);if(s){var l=i(n);o.forEach(function(e){return function(e,t,n){var r=e.template,i=e.keyName,s=e.sourceLocationOffset;a.parse(new a.Source(r,n,s)).definitions.forEach(function(e){e.name||c(!1);var n=e.name.value;if("OperationDefinition"===e.kind){var r=n.match(/^(.*)(Mutation|Query|Subscription)$/);r&&n.startsWith(t)||c(!1)}else"FragmentDefinition"===e.kind&&(i?n!==t+"_"+i&&c(!1):n.startsWith(t)||c(!1))})}(e,l,n)})}return o.map(function(e){return e.template})}function c(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i0&&(yield o("hg",["add"].concat((0,a.default)(e)))),t.length>0&&(yield o("hg",["forget"].concat((0,a.default)(t))))});return function(t,n){return e.apply(this,arguments)}}()};e.exports={SourceControlMercurial:l}},function(e,t){e.exports=require("child_process")}]);