From 512344036bbbd359a44589a18e53d966382adb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kut=C3=A1=C4=8D?= Date: Fri, 26 Jan 2024 08:10:16 +0100 Subject: [PATCH] Add breaking/dangerous/safe messages to action output --- action.yml | 10 ++++ action/index.js | 43 ++++++++++++- action/package.json | 3 + package.json | 2 +- packages/action/helpers/types.ts | 6 ++ packages/action/helpers/utils.ts | 31 ++++++---- packages/action/src/run.ts | 70 +++++++++++++++------- pnpm-lock.yaml | 19 +++--- website/src/pages/docs/products/action.mdx | 27 +++++++++ 9 files changed, 165 insertions(+), 46 deletions(-) create mode 100644 action/package.json diff --git a/action.yml b/action.yml index 813284f209..0a68173af9 100644 --- a/action.yml +++ b/action.yml @@ -12,6 +12,10 @@ inputs: For example, "Check Public API" and "Check Internal API". annotations: description: Use annotation (enabled by default) + create-action-check: + description: | + Create Github Action check with summary. When disabled, annotations are disabled too. (enabled by default) + It can be useful to disable, when running on master branch or similar. And when subsequent step is using output and annotations nor check is required. fail-on-breaking: description: Fail on breaking changes (enabled by default) approve-label: @@ -56,6 +60,12 @@ inputs: outputs: changes: description: Total number of changes + breaking-changes: + description: List of breaking changes. Each item is message string. + dangerous-changes: + description: List of dangerous changes. Each item is message string. + safe-changes: + description: List of safe changes. Each item is message string. runs: using: node20 main: action/index.js diff --git a/action/index.js b/action/index.js index 9a06934fdb..49880bf07a 100644 --- a/action/index.js +++ b/action/index.js @@ -1 +1,42 @@ -module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var i=n[t]={i:t,l:false,exports:{}};var r=true;try{e[t].call(i.exports,i,i.exports,__webpack_require__);r=false}finally{if(r)delete n[t]}i.l=true;return i.exports}__webpack_require__.c=n;__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(__webpack_require__.s=868)}t(__webpack_require__);return startup()}([function(e,t,n){var i=n(745);function get(e,t,n){var r=e==null?undefined:i(e,t);return r===undefined?n:r}e.exports=get},,function(e){function matchesStrictComparable(e,t){return function(n){if(n==null){return false}return n[e]===t&&(t!==undefined||e in Object(n))}}e.exports=matchesStrictComparable},,function(e){e.exports=require("child_process")},function(e,t){function createDFS(e,t,n,r){var a={};return function(o){if(a[o]){return}var s={};var p=[];var c=[];c.push({node:o,processed:false});while(c.length>0){var u=c[c.length-1];var l=u.processed;var d=u.node;if(!l){if(a[d]){c.pop();continue}else if(s[d]){if(r){c.pop();continue}p.push(d);throw new i(p)}s[d]=true;p.push(d);var m=e[d];for(var f=m.length-1;f>=0;f--){c.push({node:m[f],processed:false})}u.processed=true}else{c.pop();p.pop();s[d]=false;a[d]=true;if(!t||e[d].length===0){n.push(d)}}}}}var n=t.DepGraph=function DepGraph(e){this.nodes={};this.outgoingEdges={};this.incomingEdges={};this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){if(!this.hasNode(e)){if(arguments.length===2){this.nodes[e]=t}else{this.nodes[e]=e}this.outgoingEdges[e]=[];this.incomingEdges[e]=[]}},removeNode:function(e){if(this.hasNode(e)){delete this.nodes[e];delete this.outgoingEdges[e];delete this.incomingEdges[e];[this.incomingEdges,this.outgoingEdges].forEach(function(t){Object.keys(t).forEach(function(n){var i=t[n].indexOf(e);if(i>=0){t[n].splice(i,1)}},this)})}},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e)){return this.nodes[e]}else{throw new Error("Node does not exist: "+e)}},setNodeData:function(e,t){if(this.hasNode(e)){this.nodes[e]=t}else{throw new Error("Node does not exist: "+e)}},addDependency:function(e,t){if(!this.hasNode(e)){throw new Error("Node does not exist: "+e)}if(!this.hasNode(t)){throw new Error("Node does not exist: "+t)}if(this.outgoingEdges[e].indexOf(t)===-1){this.outgoingEdges[e].push(t)}if(this.incomingEdges[t].indexOf(e)===-1){this.incomingEdges[t].push(e)}return true},removeDependency:function(e,t){var n;if(this.hasNode(e)){n=this.outgoingEdges[e].indexOf(t);if(n>=0){this.outgoingEdges[e].splice(n,1)}}if(this.hasNode(t)){n=this.incomingEdges[t].indexOf(e);if(n>=0){this.incomingEdges[t].splice(n,1)}}},clone:function(){var e=this;var t=new n;var i=Object.keys(e.nodes);i.forEach(function(n){t.nodes[n]=e.nodes[n];t.outgoingEdges[n]=e.outgoingEdges[n].slice(0);t.incomingEdges[n]=e.incomingEdges[n].slice(0)});return t},directDependenciesOf:function(e){if(this.hasNode(e)){return this.outgoingEdges[e].slice(0)}else{throw new Error("Node does not exist: "+e)}},directDependantsOf:function(e){if(this.hasNode(e)){return this.incomingEdges[e].slice(0)}else{throw new Error("Node does not exist: "+e)}},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];var i=createDFS(this.outgoingEdges,t,n,this.circular);i(e);var r=n.indexOf(e);if(r>=0){n.splice(r,1)}return n}else{throw new Error("Node does not exist: "+e)}},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];var i=createDFS(this.incomingEdges,t,n,this.circular);i(e);var r=n.indexOf(e);if(r>=0){n.splice(r,1)}return n}else{throw new Error("Node does not exist: "+e)}},overallOrder:function(e){var t=this;var n=[];var i=Object.keys(this.nodes);if(i.length===0){return n}else{if(!this.circular){var r=createDFS(this.outgoingEdges,false,[],this.circular);i.forEach(function(e){r(e)})}var a=createDFS(this.outgoingEdges,e,n,this.circular);i.filter(function(e){return t.incomingEdges[e].length===0}).forEach(function(e){a(e)});if(this.circular){i.filter(function(e){return n.indexOf(e)===-1}).forEach(function(e){a(e)})}return n}},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter(function(t){return e.incomingEdges[t].length===0})}};n.prototype.directDependentsOf=n.prototype.directDependantsOf;n.prototype.dependentsOf=n.prototype.dependantsOf;var i=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> ");var n=new Error(t);n.cyclePath=e;Object.setPrototypeOf(n,Object.getPrototypeOf(this));if(Error.captureStackTrace){Error.captureStackTrace(n,i)}return n};i.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:false,writable:true,configurable:true}});Object.setPrototypeOf(i,Error)},,,function(e,t,n){var i=n(405),r=n(937),a=n(275);var o=1,s=2;function equalArrays(e,t,n,p,c,u){var l=n&o,d=e.length,m=t.length;if(d!=m&&!(l&&m>d)){return false}var f=u.get(e);var h=u.get(t);if(f&&h){return f==t&&h==e}var v=-1,g=true,b=n&s?new i:undefined;u.set(e,t);u.set(t,e);while(++v>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var r=parse;t.default=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.versionInfo=t.version=void 0;const n="16.6.0";t.version=n;const i=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});t.versionInfo=i},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GraphQLError=void 0;t.formatError=formatError;t.printError=printError;var i=n(947);var r=n(683);var a=n(40);function toNormalizedOptions(e){const t=e[0];if(t==null||"kind"in t||"length"in t){return{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}}return t}class GraphQLError extends Error{constructor(e,...t){var n,a,o;const{nodes:s,source:p,positions:c,path:u,originalError:l,extensions:d}=toNormalizedOptions(t);super(e);this.name="GraphQLError";this.path=u!==null&&u!==void 0?u:undefined;this.originalError=l!==null&&l!==void 0?l:undefined;this.nodes=undefinedIfEmpty(Array.isArray(s)?s:s?[s]:undefined);const m=undefinedIfEmpty((n=this.nodes)===null||n===void 0?void 0:n.map(e=>e.loc).filter(e=>e!=null));this.source=p!==null&&p!==void 0?p:m===null||m===void 0?void 0:(a=m[0])===null||a===void 0?void 0:a.source;this.positions=c!==null&&c!==void 0?c:m===null||m===void 0?void 0:m.map(e=>e.start);this.locations=c&&p?c.map(e=>(0,r.getLocation)(p,e)):m===null||m===void 0?void 0:m.map(e=>(0,r.getLocation)(e.source,e.start));const f=(0,i.isObjectLike)(l===null||l===void 0?void 0:l.extensions)?l===null||l===void 0?void 0:l.extensions:undefined;this.extensions=(o=d!==null&&d!==void 0?d:f)!==null&&o!==void 0?o:Object.create(null);Object.defineProperties(this,{message:{writable:true,enumerable:true},name:{enumerable:false},nodes:{enumerable:false},source:{enumerable:false},positions:{enumerable:false},originalError:{enumerable:false}});if(l!==null&&l!==void 0&&l.stack){Object.defineProperty(this,"stack",{value:l.stack,writable:true,configurable:true})}else if(Error.captureStackTrace){Error.captureStackTrace(this,GraphQLError)}else{Object.defineProperty(this,"stack",{value:Error().stack,writable:true,configurable:true})}}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes){for(const t of this.nodes){if(t.loc){e+="\n\n"+(0,a.printLocation)(t.loc)}}}else if(this.source&&this.locations){for(const t of this.locations){e+="\n\n"+(0,a.printSourceLocation)(this.source,t)}}return e}toJSON(){const e={message:this.message};if(this.locations!=null){e.locations=this.locations}if(this.path!=null){e.path=this.path}if(this.extensions!=null&&Object.keys(this.extensions).length>0){e.extensions=this.extensions}return e}}t.GraphQLError=GraphQLError;function undefinedIfEmpty(e){return e===undefined||e.length===0?undefined:e}function printError(e){return e.toString()}function formatError(e){return e.toJSON()}},,,,,,function(e,t,n){"use strict";var i=n(35);var r=n(933);e.exports=function transformData(e,t,n){var a=this||r;i.forEach(n,function transform(n){e=n.call(a,e,t)});return e}},,,function(e,t,n){"use strict";var i=n(271);var r=Object.prototype.toString;var a=function(e){return function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function kindOfTest(e){e=e.toLowerCase();return function isKindOf(t){return a(t)===e}}function isArray(e){return Array.isArray(e)}function isUndefined(e){return typeof e==="undefined"}function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}var o=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&o(e.buffer)}return t}function isString(e){return typeof e==="string"}function isNumber(e){return typeof e==="number"}function isObject(e){return e!==null&&typeof e==="object"}function isPlainObject(e){if(a(e)!=="object"){return false}var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var s=kindOfTest("Date");var p=kindOfTest("File");var c=kindOfTest("Blob");var u=kindOfTest("FileList");function isFunction(e){return r.call(e)==="[object Function]"}function isStream(e){return isObject(e)&&isFunction(e.pipe)}function isFormData(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||r.call(e)===t||isFunction(e.toString)&&e.toString()===t)}var l=kindOfTest("URLSearchParams");function trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function isStandardBrowserEnv(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function forEach(e,t){if(e===null||typeof e==="undefined"){return}if(typeof e!=="object"){e=[e]}if(isArray(e)){for(var n=0,i=e.length;n0){a=i[r];if(!o[a]){t[a]=e[a];o[a]=true}}e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function endsWith(e,t,n){e=String(e);if(n===undefined||n>e.length){n=e.length}n-=t.length;var i=e.indexOf(t,n);return i!==-1&&i===n}function toArray(e){if(!e)return null;var t=e.length;if(isUndefined(t))return null;var n=new Array(t);while(t-- >0){n[t]=e[t]}return n}var d=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:isArray,isArrayBuffer:o,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:s,isFile:p,isBlob:c,isFunction:isFunction,isStream:isStream,isURLSearchParams:l,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:a,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,isTypedArray:d,isFileList:u}},,,function(e,t,n){"use strict";var i=n(561);e.exports=new i({explicit:[n(316),n(858),n(597)]})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.printLocation=printLocation;t.printSourceLocation=printSourceLocation;var i=n(683);function printLocation(e){return printSourceLocation(e.source,(0,i.getLocation)(e.source,e.start))}function printSourceLocation(e,t){const n=e.locationOffset.column-1;const i="".padStart(n)+e.body;const r=t.line-1;const a=e.locationOffset.line-1;const o=t.line+a;const s=t.line===1?n:0;const p=t.column+s;const c=`${e.name}:${o}:${p}\n`;const u=i.split(/\r\n|[\n\r]/g);const l=u[r];if(l.length>120){const e=Math.floor(p/80);const t=p%80;const n=[];for(let e=0;e["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return c+printPrefixedLines([[`${o-1} |`,u[r-1]],[`${o} |`,l],["|","^".padStart(p)],[`${o+1} |`,u[r+1]]])}function printPrefixedLines(e){const t=e.filter(([e,t])=>t!==undefined);const n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UniqueOperationTypesRule=UniqueOperationTypesRule;var i=n(26);function UniqueOperationTypesRule(e){const t=e.getSchema();const n=Object.create(null);const r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:checkOperationTypes,SchemaExtension:checkOperationTypes};function checkOperationTypes(t){var a;const o=(a=t.operationTypes)!==null&&a!==void 0?a:[];for(const t of o){const a=t.operation;const o=n[a];if(r[a]){e.reportError(new i.GraphQLError(`Type for ${a} already defined in the schema. It cannot be redefined.`,{nodes:t}))}else if(o){e.reportError(new i.GraphQLError(`There can be only one ${a} type in schema.`,{nodes:[o,t]}))}else{n[a]=t}}return false}}},,,function(e,t,n){var i=n(11);e.exports=i(once);e.exports.strict=i(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var n=e.name||"Function wrapped with `once`";t.onceError=n+" shouldn't be called more than once";t.called=false;return t}},,function(e,t,n){var i=n(934),r=n(985),a=n(602);var o="[object Null]",s="[object Undefined]";var p=i?i.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?s:o}return p&&p in Object(e)?r(e):a(e)}e.exports=baseGetTag},,function(e,t,n){e.exports=n(352)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Source=void 0;t.isSource=isSource;var i=n(371);var r=n(393);var a=n(174);class Source{constructor(e,t="GraphQL request",n={line:1,column:1}){typeof e==="string"||(0,i.devAssert)(false,`Body must be a string. Received: ${(0,r.inspect)(e)}.`);this.body=e;this.name=t;this.locationOffset=n;this.locationOffset.line>0||(0,i.devAssert)(false,"line in locationOffset is 1-indexed and must be positive.");this.locationOffset.column>0||(0,i.devAssert)(false,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}t.Source=Source;function isSource(e){return(0,a.instanceOf)(e,Source)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProvidedRequiredArgumentsOnDirectivesRule=ProvidedRequiredArgumentsOnDirectivesRule;t.ProvidedRequiredArgumentsRule=ProvidedRequiredArgumentsRule;var i=n(393);var r=n(589);var a=n(26);var o=n(326);var s=n(577);var p=n(75);var c=n(134);function ProvidedRequiredArgumentsRule(e){return{...ProvidedRequiredArgumentsOnDirectivesRule(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r){return false}const o=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(e=>e.name.value));for(const n of r.args){if(!o.has(n.name)&&(0,p.isRequiredArgument)(n)){const o=(0,i.inspect)(n.type);e.reportError(new a.GraphQLError(`Field "${r.name}" argument "${n.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}}function ProvidedRequiredArgumentsOnDirectivesRule(e){var t;const n=Object.create(null);const u=e.getSchema();const l=(t=u===null||u===void 0?void 0:u.getDirectives())!==null&&t!==void 0?t:c.specifiedDirectives;for(const e of l){n[e.name]=(0,r.keyMap)(e.args.filter(p.isRequiredArgument),e=>e.name)}const d=e.getDocument().definitions;for(const e of d){if(e.kind===o.Kind.DIRECTIVE_DEFINITION){var m;const t=(m=e.arguments)!==null&&m!==void 0?m:[];n[e.name.value]=(0,r.keyMap)(t.filter(isRequiredArgumentNode),e=>e.name.value)}}return{Directive:{leave(t){const r=t.name.value;const o=n[r];if(o){var c;const n=(c=t.arguments)!==null&&c!==void 0?c:[];const u=new Set(n.map(e=>e.name.value));for(const[n,c]of Object.entries(o)){if(!u.has(n)){const o=(0,p.isType)(c.type)?(0,i.inspect)(c.type):(0,s.print)(c.type);e.reportError(new a.GraphQLError(`Directive "@${r}" argument "${n}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}}}function isRequiredArgumentNode(e){return e.type.kind===o.Kind.NON_NULL_TYPE&&e.defaultValue==null}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return l.default}});var i=_interopRequireDefault(n(893));var r=_interopRequireDefault(n(209));var a=_interopRequireDefault(n(733));var o=_interopRequireDefault(n(384));var s=_interopRequireDefault(n(327));var p=_interopRequireDefault(n(695));var c=_interopRequireDefault(n(78));var u=_interopRequireDefault(n(411));var l=_interopRequireDefault(n(22));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},,function(e,t,n){"use strict";const i=n(884);const r=process.env;Object.defineProperty(t,"_vendors",{value:i.map(function(e){return e.constant})});t.name=null;t.isPR=null;i.forEach(function(e){const n=Array.isArray(e.env)?e.env:[e.env];const i=n.every(function(e){return checkEnv(e)});t[e.constant]=i;if(!i){return}t.name=e.name;switch(typeof e.pr){case"string":t.isPR=!!r[e.pr];break;case"object":if("env"in e.pr){t.isPR=e.pr.env in r&&r[e.pr.env]!==e.pr.ne}else if("any"in e.pr){t.isPR=e.pr.any.some(function(e){return!!r[e]})}else{t.isPR=checkEnv(e.pr)}break;default:t.isPR=null}});t.isCI=!!(r.CI!=="false"&&(r.BUILD_ID||r.BUILD_NUMBER||r.CI||r.CI_APP_ID||r.CI_BUILD_ID||r.CI_BUILD_NUMBER||r.CI_NAME||r.CONTINUOUS_INTEGRATION||r.RUN_ID||t.name||false));function checkEnv(e){if(typeof e==="string")return!!r[e];if("env"in e){return r[e.env]&&r[e.env].includes(e.includes)}if("any"in e){return e.any.some(function(e){return!!r[e]})}return Object.keys(e).every(function(t){return r[t]===e[t]})}},,function(e){"use strict";e.exports={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false}},,function(e){"use strict";e.exports=function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},function(e){e.exports=function(e,t){Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]});return e}},function(e,t,n){"use strict";t.URL=n(782).interface;t.serializeURL=n(936).serializeURL;t.serializeURLOrigin=n(936).serializeURLOrigin;t.basicURLParse=n(936).basicURLParse;t.setTheUsername=n(936).setTheUsername;t.setThePassword=n(936).setThePassword;t.serializeHost=n(936).serializeHost;t.serializeInteger=n(936).serializeInteger;t.parseURL=n(936).parseURL},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.typeFromAST=typeFromAST;var i=n(326);var r=n(75);function typeFromAST(e,t){switch(t.kind){case i.Kind.LIST_TYPE:{const n=typeFromAST(e,t.type);return n&&new r.GraphQLList(n)}case i.Kind.NON_NULL_TYPE:{const n=typeFromAST(e,t.type);return n&&new r.GraphQLNonNull(n)}case i.Kind.NAMED_TYPE:return e.getType(t.name.value)}}},function(e,t,n){var i=n(343);function mapCacheSet(e,t){var n=i(this,e),r=n.size;n.set(e,t);this.size+=n.size==r?0:1;return this}e.exports=mapCacheSet},function(e,t,n){"use strict";var i=n(35);e.exports=function normalizeHeaderName(e,t){i.forEach(e,function processHeader(n,i){if(i!==t&&i.toUpperCase()===t.toUpperCase()){e[t]=n;delete e[i]}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GraphQLUnionType=t.GraphQLScalarType=t.GraphQLObjectType=t.GraphQLNonNull=t.GraphQLList=t.GraphQLInterfaceType=t.GraphQLInputObjectType=t.GraphQLEnumType=void 0;t.argsToArgsConfig=argsToArgsConfig;t.assertAbstractType=assertAbstractType;t.assertCompositeType=assertCompositeType;t.assertEnumType=assertEnumType;t.assertInputObjectType=assertInputObjectType;t.assertInputType=assertInputType;t.assertInterfaceType=assertInterfaceType;t.assertLeafType=assertLeafType;t.assertListType=assertListType;t.assertNamedType=assertNamedType;t.assertNonNullType=assertNonNullType;t.assertNullableType=assertNullableType;t.assertObjectType=assertObjectType;t.assertOutputType=assertOutputType;t.assertScalarType=assertScalarType;t.assertType=assertType;t.assertUnionType=assertUnionType;t.assertWrappingType=assertWrappingType;t.defineArguments=defineArguments;t.getNamedType=getNamedType;t.getNullableType=getNullableType;t.isAbstractType=isAbstractType;t.isCompositeType=isCompositeType;t.isEnumType=isEnumType;t.isInputObjectType=isInputObjectType;t.isInputType=isInputType;t.isInterfaceType=isInterfaceType;t.isLeafType=isLeafType;t.isListType=isListType;t.isNamedType=isNamedType;t.isNonNullType=isNonNullType;t.isNullableType=isNullableType;t.isObjectType=isObjectType;t.isOutputType=isOutputType;t.isRequiredArgument=isRequiredArgument;t.isRequiredInputField=isRequiredInputField;t.isScalarType=isScalarType;t.isType=isType;t.isUnionType=isUnionType;t.isWrappingType=isWrappingType;t.resolveObjMapThunk=resolveObjMapThunk;t.resolveReadonlyArrayThunk=resolveReadonlyArrayThunk;var i=n(371);var r=n(841);var a=n(518);var o=n(393);var s=n(174);var p=n(947);var c=n(589);var u=n(857);var l=n(372);var d=n(150);var m=n(473);var f=n(26);var h=n(326);var v=n(577);var g=n(645);var b=n(655);function isType(e){return isScalarType(e)||isObjectType(e)||isInterfaceType(e)||isUnionType(e)||isEnumType(e)||isInputObjectType(e)||isListType(e)||isNonNullType(e)}function assertType(e){if(!isType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL type.`)}return e}function isScalarType(e){return(0,s.instanceOf)(e,GraphQLScalarType)}function assertScalarType(e){if(!isScalarType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Scalar type.`)}return e}function isObjectType(e){return(0,s.instanceOf)(e,GraphQLObjectType)}function assertObjectType(e){if(!isObjectType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Object type.`)}return e}function isInterfaceType(e){return(0,s.instanceOf)(e,GraphQLInterfaceType)}function assertInterfaceType(e){if(!isInterfaceType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Interface type.`)}return e}function isUnionType(e){return(0,s.instanceOf)(e,GraphQLUnionType)}function assertUnionType(e){if(!isUnionType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Union type.`)}return e}function isEnumType(e){return(0,s.instanceOf)(e,GraphQLEnumType)}function assertEnumType(e){if(!isEnumType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Enum type.`)}return e}function isInputObjectType(e){return(0,s.instanceOf)(e,GraphQLInputObjectType)}function assertInputObjectType(e){if(!isInputObjectType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Input Object type.`)}return e}function isListType(e){return(0,s.instanceOf)(e,GraphQLList)}function assertListType(e){if(!isListType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL List type.`)}return e}function isNonNullType(e){return(0,s.instanceOf)(e,GraphQLNonNull)}function assertNonNullType(e){if(!isNonNullType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL Non-Null type.`)}return e}function isInputType(e){return isScalarType(e)||isEnumType(e)||isInputObjectType(e)||isWrappingType(e)&&isInputType(e.ofType)}function assertInputType(e){if(!isInputType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL input type.`)}return e}function isOutputType(e){return isScalarType(e)||isObjectType(e)||isInterfaceType(e)||isUnionType(e)||isEnumType(e)||isWrappingType(e)&&isOutputType(e.ofType)}function assertOutputType(e){if(!isOutputType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL output type.`)}return e}function isLeafType(e){return isScalarType(e)||isEnumType(e)}function assertLeafType(e){if(!isLeafType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL leaf type.`)}return e}function isCompositeType(e){return isObjectType(e)||isInterfaceType(e)||isUnionType(e)}function assertCompositeType(e){if(!isCompositeType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL composite type.`)}return e}function isAbstractType(e){return isInterfaceType(e)||isUnionType(e)}function assertAbstractType(e){if(!isAbstractType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL abstract type.`)}return e}class GraphQLList{constructor(e){isType(e)||(0,i.devAssert)(false,`Expected ${(0,o.inspect)(e)} to be a GraphQL type.`);this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}t.GraphQLList=GraphQLList;class GraphQLNonNull{constructor(e){isNullableType(e)||(0,i.devAssert)(false,`Expected ${(0,o.inspect)(e)} to be a GraphQL nullable type.`);this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}t.GraphQLNonNull=GraphQLNonNull;function isWrappingType(e){return isListType(e)||isNonNullType(e)}function assertWrappingType(e){if(!isWrappingType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL wrapping type.`)}return e}function isNullableType(e){return isType(e)&&!isNonNullType(e)}function assertNullableType(e){if(!isNullableType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL nullable type.`)}return e}function getNullableType(e){if(e){return isNonNullType(e)?e.ofType:e}}function isNamedType(e){return isScalarType(e)||isObjectType(e)||isInterfaceType(e)||isUnionType(e)||isEnumType(e)||isInputObjectType(e)}function assertNamedType(e){if(!isNamedType(e)){throw new Error(`Expected ${(0,o.inspect)(e)} to be a GraphQL named type.`)}return e}function getNamedType(e){if(e){let t=e;while(isWrappingType(t)){t=t.ofType}return t}}function resolveReadonlyArrayThunk(e){return typeof e==="function"?e():e}function resolveObjMapThunk(e){return typeof e==="function"?e():e}class GraphQLScalarType{constructor(e){var t,n,r,s;const p=(t=e.parseValue)!==null&&t!==void 0?t:a.identityFunc;this.name=(0,b.assertName)(e.name);this.description=e.description;this.specifiedByURL=e.specifiedByURL;this.serialize=(n=e.serialize)!==null&&n!==void 0?n:a.identityFunc;this.parseValue=p;this.parseLiteral=(r=e.parseLiteral)!==null&&r!==void 0?r:(e,t)=>p((0,g.valueFromASTUntyped)(e,t));this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(s=e.extensionASTNodes)!==null&&s!==void 0?s:[];e.specifiedByURL==null||typeof e.specifiedByURL==="string"||(0,i.devAssert)(false,`${this.name} must provide "specifiedByURL" as a string, `+`but got: ${(0,o.inspect)(e.specifiedByURL)}.`);e.serialize==null||typeof e.serialize==="function"||(0,i.devAssert)(false,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`);if(e.parseLiteral){typeof e.parseValue==="function"&&typeof e.parseLiteral==="function"||(0,i.devAssert)(false,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)}}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLScalarType=GraphQLScalarType;class GraphQLObjectType{constructor(e){var t;this.name=(0,b.assertName)(e.name);this.description=e.description;this.isTypeOf=e.isTypeOf;this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[];this._fields=(()=>defineFieldMap(e));this._interfaces=(()=>defineInterfaces(e));e.isTypeOf==null||typeof e.isTypeOf==="function"||(0,i.devAssert)(false,`${this.name} must provide "isTypeOf" as a function, `+`but got: ${(0,o.inspect)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){if(typeof this._fields==="function"){this._fields=this._fields()}return this._fields}getInterfaces(){if(typeof this._interfaces==="function"){this._interfaces=this._interfaces()}return this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLObjectType=GraphQLObjectType;function defineInterfaces(e){var t;const n=resolveReadonlyArrayThunk((t=e.interfaces)!==null&&t!==void 0?t:[]);Array.isArray(n)||(0,i.devAssert)(false,`${e.name} interfaces must be an Array or a function which returns an Array.`);return n}function defineFieldMap(e){const t=resolveObjMapThunk(e.fields);isPlainObj(t)||(0,i.devAssert)(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`);return(0,l.mapValue)(t,(t,n)=>{var r;isPlainObj(t)||(0,i.devAssert)(false,`${e.name}.${n} field config must be an object.`);t.resolve==null||typeof t.resolve==="function"||(0,i.devAssert)(false,`${e.name}.${n} field resolver must be a function if `+`provided, but got: ${(0,o.inspect)(t.resolve)}.`);const a=(r=t.args)!==null&&r!==void 0?r:{};isPlainObj(a)||(0,i.devAssert)(false,`${e.name}.${n} args must be an object with argument names as keys.`);return{name:(0,b.assertName)(n),description:t.description,type:t.type,args:defineArguments(a),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:(0,m.toObjMap)(t.extensions),astNode:t.astNode}})}function defineArguments(e){return Object.entries(e).map(([e,t])=>({name:(0,b.assertName)(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:(0,m.toObjMap)(t.extensions),astNode:t.astNode}))}function isPlainObj(e){return(0,p.isObjectLike)(e)&&!Array.isArray(e)}function fieldsToFieldsConfig(e){return(0,l.mapValue)(e,e=>({description:e.description,type:e.type,args:argsToArgsConfig(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function argsToArgsConfig(e){return(0,u.keyValMap)(e,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function isRequiredArgument(e){return isNonNullType(e.type)&&e.defaultValue===undefined}class GraphQLInterfaceType{constructor(e){var t;this.name=(0,b.assertName)(e.name);this.description=e.description;this.resolveType=e.resolveType;this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[];this._fields=defineFieldMap.bind(undefined,e);this._interfaces=defineInterfaces.bind(undefined,e);e.resolveType==null||typeof e.resolveType==="function"||(0,i.devAssert)(false,`${this.name} must provide "resolveType" as a function, `+`but got: ${(0,o.inspect)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){if(typeof this._fields==="function"){this._fields=this._fields()}return this._fields}getInterfaces(){if(typeof this._interfaces==="function"){this._interfaces=this._interfaces()}return this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLInterfaceType=GraphQLInterfaceType;class GraphQLUnionType{constructor(e){var t;this.name=(0,b.assertName)(e.name);this.description=e.description;this.resolveType=e.resolveType;this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[];this._types=defineTypes.bind(undefined,e);e.resolveType==null||typeof e.resolveType==="function"||(0,i.devAssert)(false,`${this.name} must provide "resolveType" as a function, `+`but got: ${(0,o.inspect)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){if(typeof this._types==="function"){this._types=this._types()}return this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLUnionType=GraphQLUnionType;function defineTypes(e){const t=resolveReadonlyArrayThunk(e.types);Array.isArray(t)||(0,i.devAssert)(false,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`);return t}class GraphQLEnumType{constructor(e){var t;this.name=(0,b.assertName)(e.name);this.description=e.description;this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[];this._values=defineEnumValues(this.name,e.values);this._valueLookup=new Map(this._values.map(e=>[e.value,e]));this._nameLookup=(0,c.keyMap)(this._values,e=>e.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(t===undefined){throw new f.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,o.inspect)(e)}`)}return t.name}parseValue(e){if(typeof e!=="string"){const t=(0,o.inspect)(e);throw new f.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${t}.`+didYouMeanEnumValue(this,t))}const t=this.getValue(e);if(t==null){throw new f.GraphQLError(`Value "${e}" does not exist in "${this.name}" enum.`+didYouMeanEnumValue(this,e))}return t.value}parseLiteral(e,t){if(e.kind!==h.Kind.ENUM){const t=(0,v.print)(e);throw new f.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+didYouMeanEnumValue(this,t),{nodes:e})}const n=this.getValue(e.value);if(n==null){const t=(0,v.print)(e);throw new f.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+didYouMeanEnumValue(this,t),{nodes:e})}return n.value}toConfig(){const e=(0,u.keyValMap)(this.getValues(),e=>e.name,e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLEnumType=GraphQLEnumType;function didYouMeanEnumValue(e,t){const n=e.getValues().map(e=>e.name);const i=(0,d.suggestionList)(t,n);return(0,r.didYouMean)("the enum value",i)}function defineEnumValues(e,t){isPlainObj(t)||(0,i.devAssert)(false,`${e} values must be an object with value names as keys.`);return Object.entries(t).map(([t,n])=>{isPlainObj(n)||(0,i.devAssert)(false,`${e}.${t} must refer to an object with a "value" key `+`representing an internal value but got: ${(0,o.inspect)(n)}.`);return{name:(0,b.assertEnumValueName)(t),description:n.description,value:n.value!==undefined?n.value:t,deprecationReason:n.deprecationReason,extensions:(0,m.toObjMap)(n.extensions),astNode:n.astNode}})}class GraphQLInputObjectType{constructor(e){var t;this.name=(0,b.assertName)(e.name);this.description=e.description;this.extensions=(0,m.toObjMap)(e.extensions);this.astNode=e.astNode;this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[];this._fields=defineInputFieldMap.bind(undefined,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){if(typeof this._fields==="function"){this._fields=this._fields()}return this._fields}toConfig(){const e=(0,l.mapValue)(this.getFields(),e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}t.GraphQLInputObjectType=GraphQLInputObjectType;function defineInputFieldMap(e){const t=resolveObjMapThunk(e.fields);isPlainObj(t)||(0,i.devAssert)(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`);return(0,l.mapValue)(t,(t,n)=>{!("resolve"in t)||(0,i.devAssert)(false,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`);return{name:(0,b.assertName)(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:(0,m.toObjMap)(t.extensions),astNode:t.astNode}})}function isRequiredInputField(e){return isNonNullType(e.type)&&e.defaultValue===undefined}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var i=_interopRequireDefault(n(456));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var r=validate;t.default=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FragmentsOnCompositeTypesRule=FragmentsOnCompositeTypesRule;var i=n(26);var r=n(577);var a=n(75);var o=n(72);function FragmentsOnCompositeTypesRule(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const t=(0,o.typeFromAST)(e.getSchema(),n);if(t&&!(0,a.isCompositeType)(t)){const t=(0,r.print)(n);e.reportError(new i.GraphQLError(`Fragment cannot condition on non composite type "${t}".`,{nodes:n}))}}},FragmentDefinition(t){const n=(0,o.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,a.isCompositeType)(n)){const n=(0,r.print)(t.typeCondition);e.reportError(new i.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}},function(e,t,n){const i=n(867);const r=n(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=n(247);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>{return t.toUpperCase()});let i=process.env[t];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[n]=i;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:i}=this;if(i){const i=this.color;const r="[3"+(i<8?i:"8;5;"+i);const a=` ${r};1m${n} `;t[0]=a+t[0].split("\n").join("\n"+a);t.push(r+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(r.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let i=0;ie.trim()).join(" ")};a.O=function(e){this.inspectOpts.colors=this.useColors;return r.inspect(e,this.inspectOpts)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},function(e){function identity(e){return e}e.exports=identity},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LoneAnonymousOperationRule=LoneAnonymousOperationRule;var i=n(26);var r=n(326);function LoneAnonymousOperationRule(e){let t=0;return{Document(e){t=e.definitions.filter(e=>e.kind===r.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){if(!n.name&&t>1){e.reportError(new i.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}}},,function(e){e.exports=require("os")},,function(e){var t="__lodash_hash_undefined__";function setCacheAdd(e){this.__data__.set(e,t);return this}e.exports=setCacheAdd},function(e,t,n){"use strict";const i=n(436);e.exports=(e=>typeof e==="string"?e.replace(i(),""):e)},function(e,t,n){var i=n(904);e.exports=serial;function serial(e,t,n){return i(e,t,null,n)}},,,function(e,t,n){"use strict";e.exports=n(107)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){return new URL(n)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}const i=[e.hostname.toUpperCase()];if(typeof n==="number"){i.push(`${i[0]}:${n}`)}for(const e of t.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)){if(i.some(t=>t===e)){return true}}return false}t.checkBypass=checkBypass},,,,function(e,t,n){var i=n(934),r=n(766),a=n(143),o=n(186);var s=1/0;var p=i?i.prototype:undefined,c=p?p.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(a(e)){return r(e,baseToString)+""}if(o(e)){return c?c.call(e):""}var t=e+"";return t=="0"&&1/e==-s?"-0":t}e.exports=baseToString},,,function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))i(t,e,n);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=a(n(747));const s=a(n(87));const p=n(62);const c=n(82);function issueFileCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}o.appendFileSync(n,`${c.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const n=`ghadelimiter_${p.v4()}`;const i=c.toCommandValue(t);if(e.includes(n)){throw new Error(`Unexpected input: name should not contain the delimiter "${n}"`)}if(i.includes(n)){throw new Error(`Unexpected input: value should not contain the delimiter "${n}"`)}return`${e}<<${n}${s.EOL}${i}${s.EOL}${n}`}t.prepareKeyValueMessage=prepareKeyValueMessage},function(e,t,n){"use strict";const i=n(789);const r=n(191);const a=n(291);e.exports=function matchBody(e,t,n){if(t instanceof RegExp){return t.test(n)}if(Buffer.isBuffer(t)){const e=a.isUtf8Representable(t)?"utf8":"hex";t=t.toString(e)}const i=(e.headers&&(e.headers["Content-Type"]||e.headers["content-type"])||"").toString();const o=i.includes("multipart");const s=i.includes("application/x-www-form-urlencoded");let p;if(typeof t==="object"||typeof t==="function"){try{p=JSON.parse(n)}catch(e){}if(p!==undefined){n=p}else if(s){n=r.parse(n)}}if(typeof t==="function"){return t.call(e,n)}if(!o&&typeof n==="string"){n=n.replace(/\r?\n|\r/g,"")}if(!o&&typeof t==="string"){t=t.replace(/\r?\n|\r/g,"")}if(s){t=mapValuesDeep(t,e=>e instanceof RegExp?e:`${e}`)}return a.dataEqual(t,n)};function mapValuesDeep(e,t){if(Array.isArray(e)){return e.map(e=>mapValuesDeep(e,t))}if(a.isPlainObject(e)){return i(e,e=>mapValuesDeep(e,t))}return t(e)}},function(e,t,n){"use strict";var i=n(35);e.exports=function isAxiosError(e){return i.isObject(e)&&e.isAxiosError===true}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TypeInfo=void 0;t.visitWithTypeInfo=visitWithTypeInfo;var i=n(670);var r=n(326);var a=n(386);var o=n(75);var s=n(754);var p=n(72);class TypeInfo{constructor(e,t,n){this._schema=e;this._typeStack=[];this._parentTypeStack=[];this._inputTypeStack=[];this._fieldDefStack=[];this._defaultValueStack=[];this._directive=null;this._argument=null;this._enumValue=null;this._getFieldDef=n!==null&&n!==void 0?n:getFieldDef;if(t){if((0,o.isInputType)(t)){this._inputTypeStack.push(t)}if((0,o.isCompositeType)(t)){this._parentTypeStack.push(t)}if((0,o.isOutputType)(t)){this._typeStack.push(t)}}}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0){return this._typeStack[this._typeStack.length-1]}}getParentType(){if(this._parentTypeStack.length>0){return this._parentTypeStack[this._parentTypeStack.length-1]}}getInputType(){if(this._inputTypeStack.length>0){return this._inputTypeStack[this._inputTypeStack.length-1]}}getParentInputType(){if(this._inputTypeStack.length>1){return this._inputTypeStack[this._inputTypeStack.length-2]}}getFieldDef(){if(this._fieldDefStack.length>0){return this._fieldDefStack[this._fieldDefStack.length-1]}}getDefaultValue(){if(this._defaultValueStack.length>0){return this._defaultValueStack[this._defaultValueStack.length-1]}}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case r.Kind.SELECTION_SET:{const e=(0,o.getNamedType)(this.getType());this._parentTypeStack.push((0,o.isCompositeType)(e)?e:undefined);break}case r.Kind.FIELD:{const n=this.getParentType();let i;let r;if(n){i=this._getFieldDef(t,n,e);if(i){r=i.type}}this._fieldDefStack.push(i);this._typeStack.push((0,o.isOutputType)(r)?r:undefined);break}case r.Kind.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case r.Kind.OPERATION_DEFINITION:{const n=t.getRootType(e.operation);this._typeStack.push((0,o.isObjectType)(n)?n:undefined);break}case r.Kind.INLINE_FRAGMENT:case r.Kind.FRAGMENT_DEFINITION:{const n=e.typeCondition;const i=n?(0,p.typeFromAST)(t,n):(0,o.getNamedType)(this.getType());this._typeStack.push((0,o.isOutputType)(i)?i:undefined);break}case r.Kind.VARIABLE_DEFINITION:{const n=(0,p.typeFromAST)(t,e.type);this._inputTypeStack.push((0,o.isInputType)(n)?n:undefined);break}case r.Kind.ARGUMENT:{var n;let t;let i;const r=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();if(r){t=r.args.find(t=>t.name===e.name.value);if(t){i=t.type}}this._argument=t;this._defaultValueStack.push(t?t.defaultValue:undefined);this._inputTypeStack.push((0,o.isInputType)(i)?i:undefined);break}case r.Kind.LIST:{const e=(0,o.getNullableType)(this.getInputType());const t=(0,o.isListType)(e)?e.ofType:e;this._defaultValueStack.push(undefined);this._inputTypeStack.push((0,o.isInputType)(t)?t:undefined);break}case r.Kind.OBJECT_FIELD:{const t=(0,o.getNamedType)(this.getInputType());let n;let i;if((0,o.isInputObjectType)(t)){i=t.getFields()[e.name.value];if(i){n=i.type}}this._defaultValueStack.push(i?i.defaultValue:undefined);this._inputTypeStack.push((0,o.isInputType)(n)?n:undefined);break}case r.Kind.ENUM:{const t=(0,o.getNamedType)(this.getInputType());let n;if((0,o.isEnumType)(t)){n=t.getValue(e.value)}this._enumValue=n;break}default:}}leave(e){switch(e.kind){case r.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case r.Kind.FIELD:this._fieldDefStack.pop();this._typeStack.pop();break;case r.Kind.DIRECTIVE:this._directive=null;break;case r.Kind.OPERATION_DEFINITION:case r.Kind.INLINE_FRAGMENT:case r.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case r.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case r.Kind.ARGUMENT:this._argument=null;this._defaultValueStack.pop();this._inputTypeStack.pop();break;case r.Kind.LIST:case r.Kind.OBJECT_FIELD:this._defaultValueStack.pop();this._inputTypeStack.pop();break;case r.Kind.ENUM:this._enumValue=null;break;default:}}}t.TypeInfo=TypeInfo;function getFieldDef(e,t,n){const i=n.name.value;if(i===s.SchemaMetaFieldDef.name&&e.getQueryType()===t){return s.SchemaMetaFieldDef}if(i===s.TypeMetaFieldDef.name&&e.getQueryType()===t){return s.TypeMetaFieldDef}if(i===s.TypeNameMetaFieldDef.name&&(0,o.isCompositeType)(t)){return s.TypeNameMetaFieldDef}if((0,o.isObjectType)(t)||(0,o.isInterfaceType)(t)){return t.getFields()[i]}}function visitWithTypeInfo(e,t){return{enter(...n){const r=n[0];e.enter(r);const o=(0,a.getEnterLeaveForKind)(t,r.kind).enter;if(o){const a=o.apply(t,n);if(a!==undefined){e.leave(r);if((0,i.isNode)(a)){e.enter(a)}}return a}},leave(...n){const i=n[0];const r=(0,a.getEnterLeaveForKind)(t,i.kind).leave;let o;if(r){o=r.apply(t,n)}e.leave(i);return o}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.KnownFragmentNamesRule=KnownFragmentNamesRule;var i=n(26);function KnownFragmentNamesRule(e){return{FragmentSpread(t){const n=t.name.value;const r=e.getFragment(n);if(!r){e.reportError(new i.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}}},function(e,t,n){"use strict";e.exports=n(38).extend({implicit:[n(558),n(778),n(301),n(951)]})},function(e,t,n){var i={"./validate-command/__tests__/validate-command":132};function webpackContext(e){var t=webpackContextResolve(e);return n(t)}function webpackContextResolve(e){if(!Object.prototype.hasOwnProperty.call(i,e)){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}return i[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(i)};webpackContext.resolve=webpackContextResolve;e.exports=webpackContext;webpackContext.id=108},function(e,t,n){var i=n(258),r=n(863);function getMatchData(e){var t=r(e),n=t.length;while(n--){var a=t[n],o=e[a];t[n]=[a,o,i(o)]}return t}e.exports=getMatchData},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=n(986);var r=n(796);const a="4.5.6";class GraphqlError extends Error{constructor(e,t){const n=t.data.errors[0].message;super(n);Object.assign(this,t.data);Object.assign(this,{headers:t.headers});this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const o=["method","baseUrl","url","headers","request","query","mediaType"];const s=/\/api\/v3\/?$/;function graphql(e,t,n){if(typeof t==="string"&&n&&"query"in n){return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`))}const i=typeof t==="string"?Object.assign({query:t},n):t;const r=Object.keys(i).reduce((e,t)=>{if(o.includes(t)){e[t]=i[t];return e}if(!e.variables){e.variables={}}e.variables[t]=i[t];return e},{});const a=i.baseUrl||e.endpoint.DEFAULTS.baseUrl;if(s.test(a)){r.url=a.replace(s,"/api/graphql")}return e(r).then(e=>{if(e.data.errors){const t={};for(const n of Object.keys(e.headers)){t[n]=e.headers[n]}throw new GraphqlError(r,{headers:t,data:e.data})}return e.data.data})}function withDefaults(e,t){const n=e.defaults(t);const r=(e,t)=>{return graphql(n,e,t)};return Object.assign(r,{defaults:withDefaults.bind(null,n),endpoint:i.request.endpoint})}const p=withDefaults(i.request,{headers:{"user-agent":`octokit-graphql.js/${a} ${r.getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}t.graphql=p;t.withCustomRequest=withCustomRequest},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildASTSchema=buildASTSchema;t.buildSchema=buildSchema;var i=n(371);var r=n(326);var a=n(166);var o=n(134);var s=n(414);var p=n(344);var c=n(823);function buildASTSchema(e,t){e!=null&&e.kind===r.Kind.DOCUMENT||(0,i.devAssert)(false,"Must provide valid Document AST.");if((t===null||t===void 0?void 0:t.assumeValid)!==true&&(t===null||t===void 0?void 0:t.assumeValidSDL)!==true){(0,p.assertValidSDL)(e)}const n={description:undefined,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:false};const a=(0,c.extendSchemaImpl)(n,e,t);if(a.astNode==null){for(const e of a.types){switch(e.name){case"Query":a.query=e;break;case"Mutation":a.mutation=e;break;case"Subscription":a.subscription=e;break}}}const u=[...a.directives,...o.specifiedDirectives.filter(e=>a.directives.every(t=>t.name!==e.name))];return new s.GraphQLSchema({...a,directives:u})}function buildSchema(e,t){const n=(0,a.parse)(e,{noLocation:t===null||t===void 0?void 0:t.noLocation,allowLegacyFragmentVariables:t===null||t===void 0?void 0:t.allowLegacyFragmentVariables});return buildASTSchema(n,{assumeValidSDL:t===null||t===void 0?void 0:t.assumeValidSDL,assumeValid:t===null||t===void 0?void 0:t.assumeValid})}},,,,,,,function(e,t,n){var i=n(343);function mapCacheHas(e){return i(this,e).has(e)}e.exports=mapCacheHas},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isConstValueNode=isConstValueNode;t.isDefinitionNode=isDefinitionNode;t.isExecutableDefinitionNode=isExecutableDefinitionNode;t.isSelectionNode=isSelectionNode;t.isTypeDefinitionNode=isTypeDefinitionNode;t.isTypeExtensionNode=isTypeExtensionNode;t.isTypeNode=isTypeNode;t.isTypeSystemDefinitionNode=isTypeSystemDefinitionNode;t.isTypeSystemExtensionNode=isTypeSystemExtensionNode;t.isValueNode=isValueNode;var i=n(326);function isDefinitionNode(e){return isExecutableDefinitionNode(e)||isTypeSystemDefinitionNode(e)||isTypeSystemExtensionNode(e)}function isExecutableDefinitionNode(e){return e.kind===i.Kind.OPERATION_DEFINITION||e.kind===i.Kind.FRAGMENT_DEFINITION}function isSelectionNode(e){return e.kind===i.Kind.FIELD||e.kind===i.Kind.FRAGMENT_SPREAD||e.kind===i.Kind.INLINE_FRAGMENT}function isValueNode(e){return e.kind===i.Kind.VARIABLE||e.kind===i.Kind.INT||e.kind===i.Kind.FLOAT||e.kind===i.Kind.STRING||e.kind===i.Kind.BOOLEAN||e.kind===i.Kind.NULL||e.kind===i.Kind.ENUM||e.kind===i.Kind.LIST||e.kind===i.Kind.OBJECT}function isConstValueNode(e){return isValueNode(e)&&(e.kind===i.Kind.LIST?e.values.some(isConstValueNode):e.kind===i.Kind.OBJECT?e.fields.some(e=>isConstValueNode(e.value)):e.kind!==i.Kind.VARIABLE)}function isTypeNode(e){return e.kind===i.Kind.NAMED_TYPE||e.kind===i.Kind.LIST_TYPE||e.kind===i.Kind.NON_NULL_TYPE}function isTypeSystemDefinitionNode(e){return e.kind===i.Kind.SCHEMA_DEFINITION||isTypeDefinitionNode(e)||e.kind===i.Kind.DIRECTIVE_DEFINITION}function isTypeDefinitionNode(e){return e.kind===i.Kind.SCALAR_TYPE_DEFINITION||e.kind===i.Kind.OBJECT_TYPE_DEFINITION||e.kind===i.Kind.INTERFACE_TYPE_DEFINITION||e.kind===i.Kind.UNION_TYPE_DEFINITION||e.kind===i.Kind.ENUM_TYPE_DEFINITION||e.kind===i.Kind.INPUT_OBJECT_TYPE_DEFINITION}function isTypeSystemExtensionNode(e){return e.kind===i.Kind.SCHEMA_EXTENSION||isTypeExtensionNode(e)}function isTypeExtensionNode(e){return e.kind===i.Kind.SCALAR_TYPE_EXTENSION||e.kind===i.Kind.OBJECT_TYPE_EXTENSION||e.kind===i.Kind.INTERFACE_TYPE_EXTENSION||e.kind===i.Kind.UNION_TYPE_EXTENSION||e.kind===i.Kind.ENUM_TYPE_EXTENSION||e.kind===i.Kind.INPUT_OBJECT_TYPE_EXTENSION}},,,,function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))i(t,e,n);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getApiBaseUrl=t.getProxyAgent=t.getAuthString=void 0;const o=a(n(539));function getAuthString(e,t){if(!e&&!t.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&t.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof t.auth==="string"?t.auth:`token ${e}`}t.getAuthString=getAuthString;function getProxyAgent(e){const t=new o.HttpClient;return t.getAgent(e)}t.getProxyAgent=getProxyAgent;function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}t.getApiBaseUrl=getApiBaseUrl},,function(e){function listCacheClear(){this.__data__=[];this.size=0}e.exports=listCacheClear},function(e){function stubArray(){return[]}e.exports=stubArray},,function(e,t,n){"use strict";n.r(t);var i=n(422);var r=n(622);var a=n(232);var o=n(660);var s=n.n(o);var p=n(245);var c=n(843);var u=n.n(c);var l=n(20);var d=n.n(l);var m=n(517);var f=n(135);function bolderize(e){const t=/'([^']+)'/gim;const n=/"([^"]+)"/gim;return e.replace(t,(e,t)=>u().bold(t)).replace(n,(e,t)=>u().bold(t))}let h=null;const v=d.a.tty===true;const g={success(e){emit("success",e)},log(e){emit("log",e)},info(e){emit("info",e)},error(e){emit("error",e)},warn(e){emit("warn",e)}};function mockLogger(e){h=e}function unmockLogger(){h=null}function emit(e,t){if(h){return h(t)}if(!v){return console.log(`[${e}]`,t)}if(e==="success"){emitSuccess(t)}else if(e==="error"){emitError(t)}else if(e==="info"){emitInfo(t)}else if(e==="warn"){emitWarn(t)}else{console.log(t)}}function emitSuccess(e){console.log(u().green("success"),e)}function emitError(e){console.log(u().red("error"),e)}function emitInfo(e){console.log(u().blue("info"),e)}function emitWarn(e){console.log(u().yellow("warning"),e)}var b=n(202);var y=n.n(b);var D=n(90);var T=n.n(D);var w=n(924);var E=n.n(w);function mockGraphQLServer({schema:e,host:t,path:n,method:r="POST"}){const o=E()(t);if(r==="GET"){o.get(e=>e.startsWith(e)).reply((n,r)=>Object(i.__awaiter)(this,void 0,void 0,function*(){const i=new URL(t+n).searchParams.get("query");try{const t=yield Object(a.execute)({schema:e,document:Object(a.parse)(i||"")});return[200,t]}catch(e){return[500,e]}}))}else{o.post(n).reply((t,n)=>Object(i.__awaiter)(this,void 0,void 0,function*(){try{const t=yield Object(a.execute)({schema:e,document:Object(a.parse)(n.query),operationName:n.operationName,variableValues:n.variables});return[200,t]}catch(e){return[500,e]}}))}return()=>{o.done()}}function nonTTY(e){return T()(y()(T()(e)))}expect.extend({toHaveBeenCalledNormalized(e,t){const n=nonTTY(t);const i=e.mock.calls;const r=i.some(e=>nonTTY(e.join(" ")).includes(n));if(r){return{message:()=>`expected not to be a called with ${t}`,pass:true}}const a=`expected to be called with ${t}`;return{message:()=>a,pass:false}}});var _=n(747);var x=n(552);function handler({schema:e,documents:t,strictFragments:n,maxDepth:i,maxDirectiveCount:r,maxAliasCount:o,maxTokenCount:s,apollo:p,keepClientFields:c,failOnDeprecated:u,filter:l,onlyErrors:d,relativePaths:m,output:f,silent:h}){let v=Object(x.validate)(e,t.map(e=>new a.Source(Object(a.print)(e.document),e.location)),{strictFragments:n,maxDepth:i,maxAliasCount:o,maxDirectiveCount:r,maxTokenCount:s,apollo:p,keepClientFields:c});if(!v.length){g.success("All documents are valid");return}if(u){v=moveDeprecatedToErrors(v)}if(m){v=useRelativePaths(v)}const b=countErrors(v);const y=countDeprecated(v);const D=b>0;if(b){if(!h){g.log(`\nDetected ${b} invalid document${b>1?"s":""}:\n`)}printInvalidDocuments(useFilter(v,l),"errors",true,h)}else{g.success("All documents are valid")}if(y&&!d){if(!h){g.info(`\nDetected ${y} document${y>1?"s":""} with deprecated fields:\n`)}printInvalidDocuments(useFilter(v,l),"deprecated",false,h)}if(f){Object(_.writeFileSync)(f,JSON.stringify({status:!D,documents:useFilter(v,l)},null,2),"utf8")}if(D){process.exit(1)}}function moveDeprecatedToErrors(e){return e.map(e=>{var t,n;return{source:e.source,errors:[...(t=e.errors)!==null&&t!==void 0?t:[],...(n=e.deprecated)!==null&&n!==void 0?n:[]],deprecated:[]}})}function useRelativePaths(e){return e.map(e=>{e.source.name=Object(r.relative)(process.cwd(),e.source.name);return e})}function useFilter(e,t){if(!(t===null||t===void 0?void 0:t.length)){return e}return e.filter(e=>t.some(t=>e.source.name.includes(t)))}var O=Object(p.createCommand)(e=>{const{loaders:t}=e;return{command:"validate ",describe:"Validate Fragments and Operations",builder(e){return e.positional("schema",{describe:"Point to a schema",type:"string",demandOption:true}).positional("documents",{describe:"Point to documents",type:"string",demandOption:true}).options({deprecated:{alias:"d",describe:"Fail on deprecated usage",type:"boolean",default:false},noStrictFragments:{describe:"Do not fail on duplicated fragment names",type:"boolean",default:false},maxDepth:{describe:"Fail on deep operations",type:"number"},maxAliasCount:{describe:"Fail on operations with too many aliases",type:"number"},maxDirectiveCount:{describe:"Fail on operations with too many directives",type:"number"},maxTokenCount:{describe:"Fail on operations with too many tokens",type:"number"},apollo:{describe:"Support Apollo directives",type:"boolean",default:false},keepClientFields:{describe:"Keeps the fields with @client, but removes @client directive from them",type:"boolean",default:false},filter:{describe:"Show results only from a list of files (or file)",array:true,type:"string"},ignore:{describe:"Ignore and do not load these files (supports glob)",array:true,type:"string"},onlyErrors:{describe:"Show only errors",type:"boolean",default:false},relativePaths:{describe:"Show relative paths",type:"boolean",default:false},silent:{describe:"Do not print results",type:"boolean",default:false},output:{describe:"Output JSON file",type:"string"}})},handler(e){var n;return Object(i.__awaiter)(this,void 0,void 0,function*(){const{headers:i,token:r}=Object(p.parseGlobalArgs)(e);const a=e.apollo||false;const o=e.aws||false;const s=e.federation||false;const c=((n=e.method)===null||n===void 0?void 0:n.toUpperCase())||"POST";const u=e.maxDepth==null?undefined:e.maxDepth;const l=e.maxAliasCount==null?undefined:e.maxAliasCount;const d=e.maxDirectiveCount==null?undefined:e.maxDirectiveCount;const m=e.maxTokenCount==null?undefined:e.maxTokenCount;const f=!e.noStrictFragments;const h=e.keepClientFields||false;const v=e.deprecated;const g=e.output;const b=e.silent||false;const y=e.relativePaths||false;const D=e.onlyErrors||false;const T=e.ignore||[];const w=yield t.loadSchema(e.schema,{headers:i,token:r,method:c},s,o);const E=yield t.loadDocuments(e.documents,{ignore:T});return handler({schema:w,documents:E,apollo:a,maxDepth:u,maxAliasCount:l,maxDirectiveCount:d,maxTokenCount:m,strictFragments:f,keepClientFields:h,failOnDeprecated:v,filter:e.filter,silent:b,output:g,relativePaths:y,onlyErrors:D})})}}});function countErrors(e){if(e.length){return e.filter(e=>{var t;return(t=e.errors)===null||t===void 0?void 0:t.length}).length}return 0}function countDeprecated(e){if(e.length){return e.filter(e=>{var t;return(t=e.deprecated)===null||t===void 0?void 0:t.length}).length}return 0}function printInvalidDocuments(e,t,n=false,i=false){if(i){return}e.forEach(e=>{if(e.errors.length){renderErrors(e.source.name,e[t],n).forEach(e=>{g.log(e)})}})}function renderErrors(e,t,n=false){const i=t.map(e=>` - ${bolderize(e.message)}`).join("\n");return[n?u().redBright("error"):u().yellowBright("warn"),`in ${e}:\n\n`,i,"\n\n"]}const S=Object(a.buildSchema)(`\n type Post {\n id: ID\n title: String\n createdAt: String\n modifiedAt: String\n }\n\n type Query {\n post: Post!\n }\n`);const N=Object(a.parse)(`\n query post {\n post {\n id\n title\n createdAtSomePoint\n }\n }\n`);const A=O({config:{use:{commands:[],loaders:[]}},loaders:{loadSchema(){return Object(i.__awaiter)(this,void 0,void 0,function*(){return S})},loadDocuments(){return Object(i.__awaiter)(this,void 0,void 0,function*(){return[{document:N,location:"document.graphql"},{document:N,location:"document2.graphql"},{document:Object(a.parse)(`\n query post {\n post {\n id\n title\n }\n }\n `),location:"valid-document.graphql"}]})}}});describe("validate",()=>{let e;let t;let n;beforeEach(()=>{t=jest.spyOn(process,"exit");t.mockImplementation();n=jest.spyOn(process,"cwd").mockImplementation(()=>__dirname);e=jest.fn();mockLogger(e)});afterEach(()=>{t.mockRestore();n.mockRestore();e.mockRestore();unmockLogger();s()()});test("should load graphql files",()=>Object(i.__awaiter)(void 0,void 0,void 0,function*(){yield Object(p.mockCommand)(A,'validate "*.graphql" schema.graphql');expect(e).toHaveBeenCalledNormalized("Detected 2 invalid documents:");expect(e).toHaveBeenCalledNormalized("document.graphql:");expect(e).toHaveBeenCalledNormalized("Cannot query field createdAtSomePoint on type Post");expect(e).not.toHaveBeenCalledNormalized("All documents are valid")}));test("should allow to filter results by file paths",()=>Object(i.__awaiter)(void 0,void 0,void 0,function*(){yield Object(p.mockCommand)(A,'validate "*.graphql" schema.graphql --filter document2.graphql');expect(e).not.toHaveBeenCalledNormalized("document.graphql:");expect(e).toHaveBeenCalledNormalized("document2.graphql:")}));test("should allow to show relative paths",()=>Object(i.__awaiter)(void 0,void 0,void 0,function*(){yield Object(p.mockCommand)(A,'validate "*.graphql" schema.graphql --relativePaths');expect(e).toHaveBeenCalledNormalized(`in ${Object(r.relative)(process.cwd(),"document.graphql")}:`)}));test("should allow for silent mode",()=>Object(i.__awaiter)(void 0,void 0,void 0,function*(){yield Object(p.mockCommand)(A,'validate "*.graphql" schema.graphql --silent');expect(e).not.toHaveBeenCalledNormalized("document.graphql:")}))})},function(e,t,n){"use strict";var i=n(35);function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function buildURL(e,t,n){if(!t){return e}var r;if(n){r=n(t)}else if(i.isURLSearchParams(t)){r=t.toString()}else{var a=[];i.forEach(t,function serialize(e,t){if(e===null||typeof e==="undefined"){return}if(i.isArray(e)){t=t+"[]"}else{e=[e]}i.forEach(e,function parseValue(e){if(i.isDate(e)){e=e.toISOString()}else if(i.isObject(e)){e=JSON.stringify(e)}a.push(encode(t)+"="+encode(e))})});r=a.join("&")}if(r){var o=e.indexOf("#");if(o!==-1){e=e.slice(0,o)}e+=(e.indexOf("?")===-1?"?":"&")+r}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GraphQLSpecifiedByDirective=t.GraphQLSkipDirective=t.GraphQLIncludeDirective=t.GraphQLDirective=t.GraphQLDeprecatedDirective=t.DEFAULT_DEPRECATION_REASON=void 0;t.assertDirective=assertDirective;t.isDirective=isDirective;t.isSpecifiedDirective=isSpecifiedDirective;t.specifiedDirectives=void 0;var i=n(371);var r=n(393);var a=n(174);var o=n(947);var s=n(473);var p=n(380);var c=n(655);var u=n(75);var l=n(810);function isDirective(e){return(0,a.instanceOf)(e,GraphQLDirective)}function assertDirective(e){if(!isDirective(e)){throw new Error(`Expected ${(0,r.inspect)(e)} to be a GraphQL directive.`)}return e}class GraphQLDirective{constructor(e){var t,n;this.name=(0,c.assertName)(e.name);this.description=e.description;this.locations=e.locations;this.isRepeatable=(t=e.isRepeatable)!==null&&t!==void 0?t:false;this.extensions=(0,s.toObjMap)(e.extensions);this.astNode=e.astNode;Array.isArray(e.locations)||(0,i.devAssert)(false,`@${e.name} locations must be an Array.`);const r=(n=e.args)!==null&&n!==void 0?n:{};(0,o.isObjectLike)(r)&&!Array.isArray(r)||(0,i.devAssert)(false,`@${e.name} args must be an object with argument names as keys.`);this.args=(0,u.defineArguments)(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,u.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}t.GraphQLDirective=GraphQLDirective;const d=new GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[p.DirectiveLocation.FIELD,p.DirectiveLocation.FRAGMENT_SPREAD,p.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new u.GraphQLNonNull(l.GraphQLBoolean),description:"Included when true."}}});t.GraphQLIncludeDirective=d;const m=new GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[p.DirectiveLocation.FIELD,p.DirectiveLocation.FRAGMENT_SPREAD,p.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new u.GraphQLNonNull(l.GraphQLBoolean),description:"Skipped when true."}}});t.GraphQLSkipDirective=m;const f="No longer supported";t.DEFAULT_DEPRECATION_REASON=f;const h=new GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[p.DirectiveLocation.FIELD_DEFINITION,p.DirectiveLocation.ARGUMENT_DEFINITION,p.DirectiveLocation.INPUT_FIELD_DEFINITION,p.DirectiveLocation.ENUM_VALUE],args:{reason:{type:l.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:f}}});t.GraphQLDeprecatedDirective=h;const v=new GraphQLDirective({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[p.DirectiveLocation.SCALAR],args:{url:{type:new u.GraphQLNonNull(l.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});t.GraphQLSpecifiedByDirective=v;const g=Object.freeze([d,m,h,v]);t.specifiedDirectives=g;function isSpecifiedDirective(e){return g.some(({name:t})=>t===e.name)}},function(e,t,n){"use strict";const i=n(843);const r=n(632);const a={info:i.blue("ℹ"),success:i.green("✔"),warning:i.yellow("⚠"),error:i.red("✖")};const o={info:i.blue("i"),success:i.green("√"),warning:i.yellow("‼"),error:i.red("×")};e.exports=r()?a:o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createSourceEventStream=createSourceEventStream;t.subscribe=subscribe;var i=n(371);var r=n(393);var a=n(335);var o=n(691);var s=n(26);var p=n(635);var c=n(962);var u=n(466);var l=n(300);var d=n(740);async function subscribe(e){arguments.length<2||(0,i.devAssert)(false,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await createSourceEventStream(e);if(!(0,a.isAsyncIterable)(t)){return t}const n=t=>(0,u.execute)({...e,rootValue:t});return(0,l.mapAsyncIterator)(t,n)}function toNormalizedArgs(e){const t=e[0];if(t&&"document"in t){return t}return{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function createSourceEventStream(...e){const t=toNormalizedArgs(e);const{schema:n,document:i,variableValues:o}=t;(0,u.assertValidExecutionArguments)(n,i,o);const p=(0,u.buildExecutionContext)(t);if(!("schema"in p)){return{errors:p}}try{const e=await executeSubscription(p);if(!(0,a.isAsyncIterable)(e)){throw new Error("Subscription field must return Async Iterable. "+`Received: ${(0,r.inspect)(e)}.`)}return e}catch(e){if(e instanceof s.GraphQLError){return{errors:[e]}}throw e}}async function executeSubscription(e){const{schema:t,fragments:n,operation:i,variableValues:r,rootValue:a}=e;const l=t.getSubscriptionType();if(l==null){throw new s.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:i})}const m=(0,c.collectFields)(t,n,r,l,i.selectionSet);const[f,h]=[...m.entries()][0];const v=(0,u.getFieldDef)(t,l,h[0]);if(!v){const e=h[0].name.value;throw new s.GraphQLError(`The subscription field "${e}" is not defined.`,{nodes:h})}const g=(0,o.addPath)(undefined,f,l.name);const b=(0,u.buildResolveInfo)(e,v,h,l,g);try{var y;const t=(0,d.getArgumentValues)(v,h[0],r);const n=e.contextValue;const i=(y=v.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver;const s=await i(a,t,n,b);if(s instanceof Error){throw s}return s}catch(e){throw(0,p.locatedError)(e,h,(0,o.pathToArray)(g))}}},function(e,t,n){"use strict";var i=n(611);function CancelToken(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise(function promiseExecutor(e){t=e});var n=this;this.promise.then(function(e){if(!n._listeners)return;var t;var i=n._listeners.length;for(t=0;t=this.maxSockets){r.requests.push(a);return}r.createSocket(a,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){r.emit("free",t,a)}function onCloseOrRemove(e){r.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var n=this;var i={};n.sockets.push(i);var r=mergeOptions({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){r.localAddress=e.localAddress}if(r.proxyAuth){r.headers=r.headers||{};r.headers["Proxy-Authorization"]="Basic "+new Buffer(r.proxyAuth).toString("base64")}u("making CONNECT request");var a=n.request(r);a.useChunkedEncodingByDefault=false;a.once("response",onResponse);a.once("upgrade",onUpgrade);a.once("connect",onConnect);a.once("error",onError);a.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,n){process.nextTick(function(){onConnect(e,t,n)})}function onConnect(r,o,s){a.removeAllListeners();o.removeAllListeners();if(r.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",r.statusCode);o.destroy();var p=new Error("tunneling socket could not be established, "+"statusCode="+r.statusCode);p.code="ECONNRESET";e.request.emit("error",p);n.removeSocket(i);return}if(s.length>0){u("got illegal response body from proxy");o.destroy();var p=new Error("got illegal response body from proxy");p.code="ECONNRESET";e.request.emit("error",p);n.removeSocket(i);return}u("tunneling connection has established");n.sockets[n.sockets.indexOf(i)]=o;return t(o)}function onError(t){a.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=new Error("tunneling socket could not be established, "+"cause="+t.message);r.code="ECONNRESET";e.request.emit("error",r);n.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var n=this.requests.shift();if(n){this.createSocket(n,function(e){n.request.onSocket(e)})}};function createSecureSocket(e,t){var n=this;TunnelingAgent.prototype.createSocket.call(n,e,function(i){var a=e.request.getHeader("host");var o=mergeOptions({},n.options,{socket:i,servername:a?a.replace(/:.*$/,""):e.host});var s=r.connect(0,o);n.sockets[n.sockets.indexOf(i)]=s;t(s)})}function toOptions(e,t,n){if(typeof e==="string"){return{host:e,port:t,localAddress:n}}return e}function mergeOptions(e){for(var t=1,n=arguments.length;ti){throw new TypeError("Argument is not in byte range")}return s}if(!isNaN(s)&&o.clamp){s=evenRound(s);if(si)s=i;return s}if(!Number.isFinite(s)||s===0){return 0}s=sign(s)*Math.floor(Math.abs(s));s=s%r;if(!t.unsigned&&s>=a){return s-r}else if(t.unsigned){if(s<0){s+=r}else if(s===-0){return 0}}return s}}t["void"]=function(){return undefined};t["boolean"]=function(e){return!!e};t["byte"]=createNumberConversion(8,{unsigned:false});t["octet"]=createNumberConversion(8,{unsigned:true});t["short"]=createNumberConversion(16,{unsigned:false});t["unsigned short"]=createNumberConversion(16,{unsigned:true});t["long"]=createNumberConversion(32,{unsigned:false});t["unsigned long"]=createNumberConversion(32,{unsigned:true});t["long long"]=createNumberConversion(32,{unsigned:false,moduloBitLength:64});t["unsigned long long"]=createNumberConversion(32,{unsigned:true,moduloBitLength:64});t["double"]=function(e){const t=+e;if(!Number.isFinite(t)){throw new TypeError("Argument is not a finite floating-point value")}return t};t["unrestricted double"]=function(e){const t=+e;if(isNaN(t)){throw new TypeError("Argument is NaN")}return t};t["float"]=t["double"];t["unrestricted float"]=t["unrestricted double"];t["DOMString"]=function(e,t){if(!t)t={};if(t.treatNullAsEmptyString&&e===null){return""}return String(e)};t["ByteString"]=function(e,t){const n=String(e);let i=undefined;for(let e=0;(i=n.codePointAt(e))!==undefined;++e){if(i>255){throw new TypeError("Argument is not a valid bytestring")}}return n};t["USVString"]=function(e){const t=String(e);const n=t.length;const i=[];for(let e=0;e57343){i.push(String.fromCodePoint(r))}else if(56320<=r&&r<=57343){i.push(String.fromCodePoint(65533))}else{if(e===n-1){i.push(String.fromCodePoint(65533))}else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=r&1023;const a=n&1023;i.push(String.fromCodePoint((2<<15)+(2<<9)*t+a));++e}else{i.push(String.fromCodePoint(65533))}}}}return i.join("")};t["Date"]=function(e,t){if(!(e instanceof Date)){throw new TypeError("Argument is not a Date object")}if(isNaN(e)){return undefined}return e};t["RegExp"]=function(e,t){if(!(e instanceof RegExp)){e=new RegExp(e)}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.suggestionList=suggestionList;var i=n(587);function suggestionList(e,t){const n=Object.create(null);const r=new LexicalDistance(e);const a=Math.floor(e.length*.4)+1;for(const e of t){const t=r.measure(e,a);if(t!==undefined){n[e]=t}}return Object.keys(n).sort((e,t)=>{const r=n[e]-n[t];return r!==0?r:(0,i.naturalCompare)(e,t)})}class LexicalDistance{constructor(e){this._input=e;this._inputLowerCase=e.toLowerCase();this._inputArray=stringToArray(this._inputLowerCase);this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e){return 0}const n=e.toLowerCase();if(this._inputLowerCase===n){return 1}let i=stringToArray(n);let r=this._inputArray;if(i.lengtht){return undefined}const s=this._rows;for(let e=0;e<=o;e++){s[0][e]=e}for(let e=1;e<=a;e++){const n=s[(e-1)%3];const a=s[e%3];let p=a[0]=e;for(let t=1;t<=o;t++){const o=i[e-1]===r[t-1]?0:1;let c=Math.min(n[t]+1,a[t-1]+1,n[t-1]+o);if(e>1&&t>1&&i[e-1]===r[t-2]&&i[e-2]===r[t-1]){const n=s[(e-2)%3][t-2];c=Math.min(c,n+1)}if(ct){return undefined}}const p=s[a%3][o];return p<=t?p:undefined}}function stringToArray(e){const t=e.length;const n=new Array(t);for(let i=0;i{const n=Object.create(null);for(const[i,r]of Object.keys(e).entries()){n[r]=t[i]}return n})}},function(e,t,n){var i=n(129),r=n(906),a=n(755),o=n(903),s=n(268);function ListCache(e){var t=-1,n=e==null?0:e.length;this.clear();while(++t({...e,value:sortValueNode(e.value)})).sort((e,t)=>(0,i.naturalCompare)(e.name.value,t.name.value))}},function(e){function baseHasIn(e,t){return e!=null&&t in Object(e)}e.exports=baseHasIn},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Parser=void 0;t.parse=parse;t.parseConstValue=parseConstValue;t.parseType=parseType;t.parseValue=parseValue;var i=n(819);var r=n(670);var a=n(380);var o=n(326);var s=n(388);var p=n(55);var c=n(730);function parse(e,t){const n=new Parser(e,t);return n.parseDocument()}function parseValue(e,t){const n=new Parser(e,t);n.expectToken(c.TokenKind.SOF);const i=n.parseValueLiteral(false);n.expectToken(c.TokenKind.EOF);return i}function parseConstValue(e,t){const n=new Parser(e,t);n.expectToken(c.TokenKind.SOF);const i=n.parseConstValueLiteral();n.expectToken(c.TokenKind.EOF);return i}function parseType(e,t){const n=new Parser(e,t);n.expectToken(c.TokenKind.SOF);const i=n.parseTypeReference();n.expectToken(c.TokenKind.EOF);return i}class Parser{constructor(e,t={}){const n=(0,p.isSource)(e)?e:new p.Source(e);this._lexer=new s.Lexer(n);this._options=t;this._tokenCounter=0}parseName(){const e=this.expectToken(c.TokenKind.NAME);return this.node(e,{kind:o.Kind.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:o.Kind.DOCUMENT,definitions:this.many(c.TokenKind.SOF,this.parseDefinition,c.TokenKind.EOF)})}parseDefinition(){if(this.peek(c.TokenKind.BRACE_L)){return this.parseOperationDefinition()}const e=this.peekDescription();const t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===c.TokenKind.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e){throw(0,i.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.")}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(c.TokenKind.BRACE_L)){return this.node(e,{kind:o.Kind.OPERATION_DEFINITION,operation:r.OperationTypeNode.QUERY,name:undefined,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()})}const t=this.parseOperationType();let n;if(this.peek(c.TokenKind.NAME)){n=this.parseName()}return this.node(e,{kind:o.Kind.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(c.TokenKind.NAME);switch(e.value){case"query":return r.OperationTypeNode.QUERY;case"mutation":return r.OperationTypeNode.MUTATION;case"subscription":return r.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(c.TokenKind.PAREN_L,this.parseVariableDefinition,c.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:o.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(c.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(c.TokenKind.EQUALS)?this.parseConstValueLiteral():undefined,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;this.expectToken(c.TokenKind.DOLLAR);return this.node(e,{kind:o.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:o.Kind.SELECTION_SET,selections:this.many(c.TokenKind.BRACE_L,this.parseSelection,c.TokenKind.BRACE_R)})}parseSelection(){return this.peek(c.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token;const t=this.parseName();let n;let i;if(this.expectOptionalToken(c.TokenKind.COLON)){n=t;i=this.parseName()}else{i=t}return this.node(e,{kind:o.Kind.FIELD,alias:n,name:i,arguments:this.parseArguments(false),directives:this.parseDirectives(false),selectionSet:this.peek(c.TokenKind.BRACE_L)?this.parseSelectionSet():undefined})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(c.TokenKind.PAREN_L,t,c.TokenKind.PAREN_R)}parseArgument(e=false){const t=this._lexer.token;const n=this.parseName();this.expectToken(c.TokenKind.COLON);return this.node(t,{kind:o.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(true)}parseFragment(){const e=this._lexer.token;this.expectToken(c.TokenKind.SPREAD);const t=this.expectOptionalKeyword("on");if(!t&&this.peek(c.TokenKind.NAME)){return this.node(e,{kind:o.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(false)})}return this.node(e,{kind:o.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():undefined,directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;this.expectKeyword("fragment");if(this._options.allowLegacyFragmentVariables===true){return this.node(e,{kind:o.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}return this.node(e,{kind:o.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on"){throw this.unexpected()}return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case c.TokenKind.BRACKET_L:return this.parseList(e);case c.TokenKind.BRACE_L:return this.parseObject(e);case c.TokenKind.INT:this.advanceLexer();return this.node(t,{kind:o.Kind.INT,value:t.value});case c.TokenKind.FLOAT:this.advanceLexer();return this.node(t,{kind:o.Kind.FLOAT,value:t.value});case c.TokenKind.STRING:case c.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case c.TokenKind.NAME:this.advanceLexer();switch(t.value){case"true":return this.node(t,{kind:o.Kind.BOOLEAN,value:true});case"false":return this.node(t,{kind:o.Kind.BOOLEAN,value:false});case"null":return this.node(t,{kind:o.Kind.NULL});default:return this.node(t,{kind:o.Kind.ENUM,value:t.value})}case c.TokenKind.DOLLAR:if(e){this.expectToken(c.TokenKind.DOLLAR);if(this._lexer.token.kind===c.TokenKind.NAME){const e=this._lexer.token.value;throw(0,i.syntaxError)(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}else{throw this.unexpected(t)}}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(true)}parseStringLiteral(){const e=this._lexer.token;this.advanceLexer();return this.node(e,{kind:o.Kind.STRING,value:e.value,block:e.kind===c.TokenKind.BLOCK_STRING})}parseList(e){const t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:o.Kind.LIST,values:this.any(c.TokenKind.BRACKET_L,t,c.TokenKind.BRACKET_R)})}parseObject(e){const t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:o.Kind.OBJECT,fields:this.any(c.TokenKind.BRACE_L,t,c.TokenKind.BRACE_R)})}parseObjectField(e){const t=this._lexer.token;const n=this.parseName();this.expectToken(c.TokenKind.COLON);return this.node(t,{kind:o.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];while(this.peek(c.TokenKind.AT)){t.push(this.parseDirective(e))}return t}parseConstDirectives(){return this.parseDirectives(true)}parseDirective(e){const t=this._lexer.token;this.expectToken(c.TokenKind.AT);return this.node(t,{kind:o.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(c.TokenKind.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(c.TokenKind.BRACKET_R);t=this.node(e,{kind:o.Kind.LIST_TYPE,type:n})}else{t=this.parseNamedType()}if(this.expectOptionalToken(c.TokenKind.BANG)){return this.node(e,{kind:o.Kind.NON_NULL_TYPE,type:t})}return t}parseNamedType(){return this.node(this._lexer.token,{kind:o.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(c.TokenKind.STRING)||this.peek(c.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription()){return this.parseStringLiteral()}}parseSchemaDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives();const i=this.many(c.TokenKind.BRACE_L,this.parseOperationTypeDefinition,c.TokenKind.BRACE_R);return this.node(e,{kind:o.Kind.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token;const t=this.parseOperationType();this.expectToken(c.TokenKind.COLON);const n=this.parseNamedType();return this.node(e,{kind:o.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName();const i=this.parseConstDirectives();return this.node(e,{kind:o.Kind.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("type");const n=this.parseName();const i=this.parseImplementsInterfaces();const r=this.parseConstDirectives();const a=this.parseFieldsDefinition();return this.node(e,{kind:o.Kind.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(c.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(c.TokenKind.BRACE_L,this.parseFieldDefinition,c.TokenKind.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token;const t=this.parseDescription();const n=this.parseName();const i=this.parseArgumentDefs();this.expectToken(c.TokenKind.COLON);const r=this.parseTypeReference();const a=this.parseConstDirectives();return this.node(e,{kind:o.Kind.FIELD_DEFINITION,description:t,name:n,arguments:i,type:r,directives:a})}parseArgumentDefs(){return this.optionalMany(c.TokenKind.PAREN_L,this.parseInputValueDef,c.TokenKind.PAREN_R)}parseInputValueDef(){const e=this._lexer.token;const t=this.parseDescription();const n=this.parseName();this.expectToken(c.TokenKind.COLON);const i=this.parseTypeReference();let r;if(this.expectOptionalToken(c.TokenKind.EQUALS)){r=this.parseConstValueLiteral()}const a=this.parseConstDirectives();return this.node(e,{kind:o.Kind.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName();const i=this.parseImplementsInterfaces();const r=this.parseConstDirectives();const a=this.parseFieldsDefinition();return this.node(e,{kind:o.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("union");const n=this.parseName();const i=this.parseConstDirectives();const r=this.parseUnionMemberTypes();return this.node(e,{kind:o.Kind.UNION_TYPE_DEFINITION,description:t,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(c.TokenKind.EQUALS)?this.delimitedMany(c.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName();const i=this.parseConstDirectives();const r=this.parseEnumValuesDefinition();return this.node(e,{kind:o.Kind.ENUM_TYPE_DEFINITION,description:t,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(c.TokenKind.BRACE_L,this.parseEnumValueDefinition,c.TokenKind.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token;const t=this.parseDescription();const n=this.parseEnumValueName();const i=this.parseConstDirectives();return this.node(e,{kind:o.Kind.ENUM_VALUE_DEFINITION,description:t,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null"){throw(0,i.syntaxError)(this._lexer.source,this._lexer.token.start,`${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`)}return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("input");const n=this.parseName();const i=this.parseConstDirectives();const r=this.parseInputFieldsDefinition();return this.node(e,{kind:o.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(c.TokenKind.BRACE_L,this.parseInputValueDef,c.TokenKind.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===c.TokenKind.NAME){switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("schema");const t=this.parseConstDirectives();const n=this.optionalMany(c.TokenKind.BRACE_L,this.parseOperationTypeDefinition,c.TokenKind.BRACE_R);if(t.length===0&&n.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("scalar");const t=this.parseName();const n=this.parseConstDirectives();if(n.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("type");const t=this.parseName();const n=this.parseImplementsInterfaces();const i=this.parseConstDirectives();const r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("interface");const t=this.parseName();const n=this.parseImplementsInterfaces();const i=this.parseConstDirectives();const r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("union");const t=this.parseName();const n=this.parseConstDirectives();const i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.UNION_TYPE_EXTENSION,name:t,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("enum");const t=this.parseName();const n=this.parseConstDirectives();const i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.ENUM_TYPE_EXTENSION,name:t,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend");this.expectKeyword("input");const t=this.parseName();const n=this.parseConstDirectives();const i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0){throw this.unexpected()}return this.node(e,{kind:o.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token;const t=this.parseDescription();this.expectKeyword("directive");this.expectToken(c.TokenKind.AT);const n=this.parseName();const i=this.parseArgumentDefs();const r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:o.Kind.DIRECTIVE_DEFINITION,description:t,name:n,arguments:i,repeatable:r,locations:a})}parseDirectiveLocations(){return this.delimitedMany(c.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token;const t=this.parseName();if(Object.prototype.hasOwnProperty.call(a.DirectiveLocation,t.value)){return t}throw this.unexpected(e)}node(e,t){if(this._options.noLocation!==true){t.loc=new r.Location(e,this._lexer.lastToken,this._lexer.source)}return t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e){this.advanceLexer();return t}throw(0,i.syntaxError)(this._lexer.source,t.start,`Expected ${getTokenKindDesc(e)}, found ${getTokenDesc(t)}.`)}expectOptionalToken(e){const t=this._lexer.token;if(t.kind===e){this.advanceLexer();return true}return false}expectKeyword(e){const t=this._lexer.token;if(t.kind===c.TokenKind.NAME&&t.value===e){this.advanceLexer()}else{throw(0,i.syntaxError)(this._lexer.source,t.start,`Expected "${e}", found ${getTokenDesc(t)}.`)}}expectOptionalKeyword(e){const t=this._lexer.token;if(t.kind===c.TokenKind.NAME&&t.value===e){this.advanceLexer();return true}return false}unexpected(e){const t=e!==null&&e!==void 0?e:this._lexer.token;return(0,i.syntaxError)(this._lexer.source,t.start,`Unexpected ${getTokenDesc(t)}.`)}any(e,t,n){this.expectToken(e);const i=[];while(!this.expectOptionalToken(n)){i.push(t.call(this))}return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options;const t=this._lexer.advance();if(e!==undefined&&t.kind!==c.TokenKind.EOF){++this._tokenCounter;if(this._tokenCounter>e){throw(0,i.syntaxError)(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}}}t.Parser=Parser;function getTokenDesc(e){const t=e.value;return getTokenKindDesc(e.kind)+(t!=null?` "${t}"`:"")}function getTokenKindDesc(e){return(0,s.isPunctuatorTokenKind)(e)?`"${e}"`:e}},function(e){function webpackEmptyContext(e){if(typeof e==="number"&&__webpack_require__.m[e])return __webpack_require__(e);try{return require(e)}catch(t){if(t.code!=="MODULE_NOT_FOUND")throw t}var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}webpackEmptyContext.keys=function(){return[]};webpackEmptyContext.resolve=webpackEmptyContext;e.exports=webpackEmptyContext;webpackEmptyContext.id=167},function(e,t,n){"use strict";const i=n(341);const r=n(90);const a=n(697);const o=new Set(["","›"]);const s=39;const p="";const c="[";const u="]";const l="m";const d=`${u}8;;`;const m=e=>`${o.values().next().value}${c}${e}${l}`;const f=e=>`${o.values().next().value}${d}${e}${p}`;const h=e=>e.split(" ").map(e=>i(e));const v=(e,t,n)=>{const a=[...t];let s=false;let c=false;let u=i(r(e[e.length-1]));for(const[t,r]of a.entries()){const m=i(r);if(u+m<=n){e[e.length-1]+=r}else{e.push(r);u=0}if(o.has(r)){s=true;c=a.slice(t+1).join("").startsWith(d)}if(s){if(c){if(r===p){s=false;c=false}}else if(r===l){s=false}continue}u+=m;if(u===n&&t0&&e.length>1){e[e.length-2]+=e.pop()}};const g=e=>{const t=e.split(" ");let n=t.length;while(n>0){if(i(t[n-1])>0){break}n--}if(n===t.length){return e}return t.slice(0,n).join(" ")+t.slice(n).join("")};const b=(e,t,n={})=>{if(n.trim!==false&&e.trim()===""){return""}let r="";let u;let l;const b=h(e);let y=[""];for(const[r,a]of e.split(" ").entries()){if(n.trim!==false){y[y.length-1]=y[y.length-1].trimStart()}let e=i(y[y.length-1]);if(r!==0){if(e>=t&&(n.wordWrap===false||n.trim===false)){y.push("");e=0}if(e>0||n.trim===false){y[y.length-1]+=" ";e++}}if(n.hard&&b[r]>t){const n=t-e;const i=1+Math.floor((b[r]-n-1)/t);const o=Math.floor((b[r]-1)/t);if(ot&&e>0&&b[r]>0){if(n.wordWrap===false&&et&&n.wordWrap===false){v(y,a,t);continue}y[y.length-1]+=a}if(n.trim!==false){y=y.map(g)}const D=[...y.join("\n")];for(const[e,t]of D.entries()){r+=t;if(o.has(t)){const{groups:t}=new RegExp(`(?:\\${c}(?\\d+)m|\\${d}(?.*)${p})`).exec(D.slice(e).join(""))||{groups:{}};if(t.code!==undefined){const e=Number.parseFloat(t.code);u=e===s?undefined:e}else if(t.uri!==undefined){l=t.uri.length===0?undefined:t.uri}}const n=a.codes.get(Number(u));if(D[e+1]==="\n"){if(l){r+=f("")}if(u&&n){r+=m(n)}}else if(t==="\n"){if(u&&n){r+=m(u)}if(l){r+=f(l)}}}return r};e.exports=((e,t,n)=>{return String(e).normalize().replace(/\r\n/g,"\n").split("\n").map(e=>b(e,t,n)).join("\n")})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"BreakingChangeType",{enumerable:true,get:function(){return E.BreakingChangeType}});Object.defineProperty(t,"DangerousChangeType",{enumerable:true,get:function(){return E.DangerousChangeType}});Object.defineProperty(t,"TypeInfo",{enumerable:true,get:function(){return v.TypeInfo}});Object.defineProperty(t,"assertValidName",{enumerable:true,get:function(){return w.assertValidName}});Object.defineProperty(t,"astFromValue",{enumerable:true,get:function(){return h.astFromValue}});Object.defineProperty(t,"buildASTSchema",{enumerable:true,get:function(){return p.buildASTSchema}});Object.defineProperty(t,"buildClientSchema",{enumerable:true,get:function(){return s.buildClientSchema}});Object.defineProperty(t,"buildSchema",{enumerable:true,get:function(){return p.buildSchema}});Object.defineProperty(t,"coerceInputValue",{enumerable:true,get:function(){return g.coerceInputValue}});Object.defineProperty(t,"concatAST",{enumerable:true,get:function(){return b.concatAST}});Object.defineProperty(t,"doTypesOverlap",{enumerable:true,get:function(){return T.doTypesOverlap}});Object.defineProperty(t,"extendSchema",{enumerable:true,get:function(){return c.extendSchema}});Object.defineProperty(t,"findBreakingChanges",{enumerable:true,get:function(){return E.findBreakingChanges}});Object.defineProperty(t,"findDangerousChanges",{enumerable:true,get:function(){return E.findDangerousChanges}});Object.defineProperty(t,"getIntrospectionQuery",{enumerable:true,get:function(){return i.getIntrospectionQuery}});Object.defineProperty(t,"getOperationAST",{enumerable:true,get:function(){return r.getOperationAST}});Object.defineProperty(t,"getOperationRootType",{enumerable:true,get:function(){return a.getOperationRootType}});Object.defineProperty(t,"introspectionFromSchema",{enumerable:true,get:function(){return o.introspectionFromSchema}});Object.defineProperty(t,"isEqualType",{enumerable:true,get:function(){return T.isEqualType}});Object.defineProperty(t,"isTypeSubTypeOf",{enumerable:true,get:function(){return T.isTypeSubTypeOf}});Object.defineProperty(t,"isValidNameError",{enumerable:true,get:function(){return w.isValidNameError}});Object.defineProperty(t,"lexicographicSortSchema",{enumerable:true,get:function(){return u.lexicographicSortSchema}});Object.defineProperty(t,"printIntrospectionSchema",{enumerable:true,get:function(){return l.printIntrospectionSchema}});Object.defineProperty(t,"printSchema",{enumerable:true,get:function(){return l.printSchema}});Object.defineProperty(t,"printType",{enumerable:true,get:function(){return l.printType}});Object.defineProperty(t,"separateOperations",{enumerable:true,get:function(){return y.separateOperations}});Object.defineProperty(t,"stripIgnoredCharacters",{enumerable:true,get:function(){return D.stripIgnoredCharacters}});Object.defineProperty(t,"typeFromAST",{enumerable:true,get:function(){return d.typeFromAST}});Object.defineProperty(t,"valueFromAST",{enumerable:true,get:function(){return m.valueFromAST}});Object.defineProperty(t,"valueFromASTUntyped",{enumerable:true,get:function(){return f.valueFromASTUntyped}});Object.defineProperty(t,"visitWithTypeInfo",{enumerable:true,get:function(){return v.visitWithTypeInfo}});var i=n(462);var r=n(752);var a=n(580);var o=n(786);var s=n(559);var p=n(114);var c=n(823);var u=n(184);var l=n(696);var d=n(72);var m=n(820);var f=n(645);var h=n(835);var v=n(105);var g=n(702);var b=n(385);var y=n(854);var D=n(487);var T=n(441);var w=n(394);var E=n(495)},,function(e,t,n){"use strict";var i=n(747);var r=n(669);var a=n(622);let o;class Y18N{constructor(e){e=e||{};this.directory=e.directory||"./locales";this.updateFiles=typeof e.updateFiles==="boolean"?e.updateFiles:true;this.locale=e.locale||"en";this.fallbackToLanguage=typeof e.fallbackToLanguage==="boolean"?e.fallbackToLanguage:true;this.cache=Object.create(null);this.writeQueue=[]}__(...e){if(typeof arguments[0]!=="string"){return this._taggedLiteral(arguments[0],...arguments)}const t=e.shift();let n=function(){};if(typeof e[e.length-1]==="function")n=e.pop();n=n||function(){};if(!this.cache[this.locale])this._readLocaleFile();if(!this.cache[this.locale][t]&&this.updateFiles){this.cache[this.locale][t]=t;this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})}else{n()}return o.format.apply(o.format,[this.cache[this.locale][t]||t].concat(e))}__n(){const e=Array.prototype.slice.call(arguments);const t=e.shift();const n=e.shift();const i=e.shift();let r=function(){};if(typeof e[e.length-1]==="function")r=e.pop();if(!this.cache[this.locale])this._readLocaleFile();let a=i===1?t:n;if(this.cache[this.locale][t]){const e=this.cache[this.locale][t];a=e[i===1?"one":"other"]}if(!this.cache[this.locale][t]&&this.updateFiles){this.cache[this.locale][t]={one:t,other:n};this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})}else{r()}const s=[a];if(~a.indexOf("%d"))s.push(i);return o.format.apply(o.format,s.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){if(!this.cache[this.locale])this._readLocaleFile();for(const t in e){if(Object.prototype.hasOwnProperty.call(e,t)){this.cache[this.locale][t]=e[t]}}}_taggedLiteral(e,...t){let n="";e.forEach(function(e,i){const r=t[i+1];n+=e;if(typeof r!=="undefined"){n+="%s"}});return this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e);if(this.writeQueue.length===1)this._processWriteQueue()}_processWriteQueue(){const e=this;const t=this.writeQueue[0];const n=t.directory;const i=t.locale;const r=t.cb;const a=this._resolveLocaleFile(n,i);const s=JSON.stringify(this.cache[i],null,2);o.fs.writeFile(a,s,"utf-8",function(t){e.writeQueue.shift();if(e.writeQueue.length>0)e._processWriteQueue();r(t)})}_readLocaleFile(){let e={};const t=this._resolveLocaleFile(this.directory,this.locale);try{if(o.fs.readFileSync){e=JSON.parse(o.fs.readFileSync(t,"utf-8"))}}catch(n){if(n instanceof SyntaxError){n.message="syntax error in "+t}if(n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=o.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){const i=o.resolve(e,"./",t.split("_")[0]+".json");if(this._fileExistsSync(i))n=i}return n}_fileExistsSync(e){return o.exists(e)}}function y18n$1(e,t){o=t;const n=new Y18N(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var s={fs:{readFileSync:i.readFileSync,writeFile:i.writeFile},format:r.format,resolve:a.resolve,exists:e=>{try{return i.statSync(e).isFile()}catch(e){return false}}};const p=e=>{return y18n$1(e,s)};e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ExecutableDefinitionsRule=ExecutableDefinitionsRule;var i=n(26);var r=n(326);var a=n(123);function ExecutableDefinitionsRule(e){return{Document(t){for(const n of t.definitions){if(!(0,a.isExecutableDefinitionNode)(n)){const t=n.kind===r.Kind.SCHEMA_DEFINITION||n.kind===r.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new i.GraphQLError(`The ${t} definition is not executable.`,{nodes:n}))}}return false}}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.instanceOf=void 0;var i=n(393);const r=process.env.NODE_ENV==="production"?function instanceOf(e,t){return e instanceof t}:function instanceOf(e,t){if(e instanceof t){return true}if(typeof e==="object"&&e!==null){var n;const r=t.prototype[Symbol.toStringTag];const a=Symbol.toStringTag in e?e[Symbol.toStringTag]:(n=e.constructor)===null||n===void 0?void 0:n.name;if(r===a){const t=(0,i.inspect)(e);throw new Error(`Cannot use ${r} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return false};t.instanceOf=r},,,,,,function(e){function getValue(e,t){return e==null?undefined:e[t]}e.exports=getValue},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.lexicographicSortSchema=lexicographicSortSchema;var i=n(393);var r=n(932);var a=n(857);var o=n(587);var s=n(75);var p=n(134);var c=n(754);var u=n(414);function lexicographicSortSchema(e){const t=e.toConfig();const n=(0,a.keyValMap)(sortByName(t.types),e=>e.name,sortNamedType);return new u.GraphQLSchema({...t,types:Object.values(n),directives:sortByName(t.directives).map(sortDirective),query:replaceMaybeType(t.query),mutation:replaceMaybeType(t.mutation),subscription:replaceMaybeType(t.subscription)});function replaceType(e){if((0,s.isListType)(e)){return new s.GraphQLList(replaceType(e.ofType))}else if((0,s.isNonNullType)(e)){return new s.GraphQLNonNull(replaceType(e.ofType))}return replaceNamedType(e)}function replaceNamedType(e){return n[e.name]}function replaceMaybeType(e){return e&&replaceNamedType(e)}function sortDirective(e){const t=e.toConfig();return new p.GraphQLDirective({...t,locations:sortBy(t.locations,e=>e),args:sortArgs(t.args)})}function sortArgs(e){return sortObjMap(e,e=>({...e,type:replaceType(e.type)}))}function sortFields(e){return sortObjMap(e,e=>({...e,type:replaceType(e.type),args:e.args&&sortArgs(e.args)}))}function sortInputFields(e){return sortObjMap(e,e=>({...e,type:replaceType(e.type)}))}function sortTypes(e){return sortByName(e).map(replaceNamedType)}function sortNamedType(e){if((0,s.isScalarType)(e)||(0,c.isIntrospectionType)(e)){return e}if((0,s.isObjectType)(e)){const t=e.toConfig();return new s.GraphQLObjectType({...t,interfaces:()=>sortTypes(t.interfaces),fields:()=>sortFields(t.fields)})}if((0,s.isInterfaceType)(e)){const t=e.toConfig();return new s.GraphQLInterfaceType({...t,interfaces:()=>sortTypes(t.interfaces),fields:()=>sortFields(t.fields)})}if((0,s.isUnionType)(e)){const t=e.toConfig();return new s.GraphQLUnionType({...t,types:()=>sortTypes(t.types)})}if((0,s.isEnumType)(e)){const t=e.toConfig();return new s.GraphQLEnumType({...t,values:sortObjMap(t.values,e=>e)})}if((0,s.isInputObjectType)(e)){const t=e.toConfig();return new s.GraphQLInputObjectType({...t,fields:()=>sortInputFields(t.fields)})}false||(0,r.invariant)(false,"Unexpected type: "+(0,i.inspect)(e))}}function sortObjMap(e,t){const n=Object.create(null);for(const i of Object.keys(e).sort(o.naturalCompare)){n[i]=t(e[i])}return n}function sortByName(e){return sortBy(e,e=>e.name)}function sortBy(e,t){return e.slice().sort((e,n)=>{const i=t(e);const r=t(n);return(0,o.naturalCompare)(i,r)})}},,function(e,t,n){var i=n(51),r=n(337);var a="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||r(e)&&i(e)==a}e.exports=isSymbol},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.memoize3=memoize3;function memoize3(e){let t;return function memoized(n,i,r){if(t===undefined){t=new WeakMap}let a=t.get(n);if(a===undefined){a=new WeakMap;t.set(n,a)}let o=a.get(i);if(o===undefined){o=new WeakMap;a.set(i,o)}let s=o.get(r);if(s===undefined){s=e(n,i,r);o.set(r,s)}return s}}},,,function(e,t,n){var i=n(840),r=n(337);function baseIsEqual(e,t,n,a,o){if(e===t){return true}if(e==null||t==null||!r(e)&&!r(t)){return e!==e&&t!==t}return i(e,t,n,a,baseIsEqual,o)}e.exports=baseIsEqual},function(e){e.exports=require("querystring")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UniqueFieldDefinitionNamesRule=UniqueFieldDefinitionNamesRule;var i=n(26);var r=n(75);function UniqueFieldDefinitionNamesRule(e){const t=e.getSchema();const n=t?t.getTypeMap():Object.create(null);const r=Object.create(null);return{InputObjectTypeDefinition:checkFieldUniqueness,InputObjectTypeExtension:checkFieldUniqueness,InterfaceTypeDefinition:checkFieldUniqueness,InterfaceTypeExtension:checkFieldUniqueness,ObjectTypeDefinition:checkFieldUniqueness,ObjectTypeExtension:checkFieldUniqueness};function checkFieldUniqueness(t){var a;const o=t.name.value;if(!r[o]){r[o]=Object.create(null)}const s=(a=t.fields)!==null&&a!==void 0?a:[];const p=r[o];for(const t of s){const r=t.name.value;if(hasField(n[o],r)){e.reportError(new i.GraphQLError(`Field "${o}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name}))}else if(p[r]){e.reportError(new i.GraphQLError(`Field "${o}.${r}" can only be defined once.`,{nodes:[p[r],t.name]}))}else{p[r]=t.name}}return false}}function hasField(e,t){if((0,r.isObjectType)(e)||(0,r.isInterfaceType)(e)||(0,r.isInputObjectType)(e)){return e.getFields()[t]!=null}return false}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.graphql=graphql;t.graphqlSync=graphqlSync;var i=n(371);var r=n(649);var a=n(166);var o=n(839);var s=n(344);var p=n(466);function graphql(e){return new Promise(t=>t(graphqlImpl(e)))}function graphqlSync(e){const t=graphqlImpl(e);if((0,r.isPromise)(t)){throw new Error("GraphQL execution failed to complete synchronously.")}return t}function graphqlImpl(e){arguments.length<2||(0,i.devAssert)(false,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:c,variableValues:u,operationName:l,fieldResolver:d,typeResolver:m}=e;const f=(0,o.validateSchema)(t);if(f.length>0){return{errors:f}}let h;try{h=(0,a.parse)(n)}catch(e){return{errors:[e]}}const v=(0,s.validate)(t,h);if(v.length>0){return{errors:v}}return(0,p.execute)({schema:t,document:h,rootValue:r,contextValue:c,variableValues:u,operationName:l,fieldResolver:d,typeResolver:m})}},,,function(e,t,n){var i=n(934),r=n(161),a=n(338),o=n(8),s=n(664),p=n(438);var c=1,u=2;var l="[object Boolean]",d="[object Date]",m="[object Error]",f="[object Map]",h="[object Number]",v="[object RegExp]",g="[object Set]",b="[object String]",y="[object Symbol]";var D="[object ArrayBuffer]",T="[object DataView]";var w=i?i.prototype:undefined,E=w?w.valueOf:undefined;function equalByTag(e,t,n,i,w,_,x){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset){return false}e=e.buffer;t=t.buffer;case D:if(e.byteLength!=t.byteLength||!_(new r(e),new r(t))){return false}return true;case l:case d:case h:return a(+e,+t);case m:return e.name==t.name&&e.message==t.message;case v:case b:return e==t+"";case f:var O=s;case g:var S=i&c;O||(O=p);if(e.size!=t.size&&!S){return false}var N=x.get(e);if(N){return N==t}i|=u;x.set(e,t);var A=o(O(e),O(t),i,w,_,x);x["delete"](e);return A;case y:if(E){return E.call(e)==E.call(t)}}return false}e.exports=equalByTag},function(e,t,n){"use strict";const i=n(739);const r=n(191);const{URL:a,URLSearchParams:o}=n(673);const s=n(291);const{remove:p}=n(744);const c=n(103);let u;try{u=n(747)}catch(e){}e.exports=class Interceptor{constructor(e,t,n,i,r){const o=typeof t==="string";if(o&&!e.scopeOptions.filteringScope&&!e.basePathname&&!t.startsWith("/")&&!t.startsWith("*")){throw Error(`Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything) (got: ${t})`)}if(!n){throw new Error('The "method" parameter is required for an intercept call.')}this.scope=e;this.interceptorMatchHeaders=[];this.method=n.toUpperCase();this.uri=t;this._key=`${this.method} ${e.basePath}${e.basePathname}${o?"":"/"}${t}`;this.basePath=this.scope.basePath;this.path=o?e.basePathname+t:t;this.queries=null;this.options=r||{};this.counter=1;this._requestBody=i;this.reqheaders=s.headersFieldNamesToLowerCase(e.scopeOptions.reqheaders||{},true);this.badheaders=s.headersFieldsArrayToLowerCase(e.scopeOptions.badheaders||[]);this.delayBodyInMs=0;this.delayConnectionInMs=0;this.optional=false;if(o&&t.includes("?")){const t=new a(this.path,"http://localhost");this.path=t.pathname;this.query(t.searchParams);this._key=`${this.method} ${e.basePath}${this.path}`}}optionally(e=true){if(typeof e!=="boolean"){throw new Error("Invalid arguments: argument should be a boolean")}this.optional=e;return this}replyWithError(e){this.errorMessage=e;this.options={...this.scope.scopeOptions,...this.options};this.scope.add(this._key,this);return this.scope}reply(e,t,n){if(typeof e==="function"){if(arguments.length>1){throw Error("Invalid arguments. When providing a function for the first argument, .reply does not accept other arguments.")}this.statusCode=null;this.fullReplyFunction=e}else{if(e!==undefined&&!Number.isInteger(e)){throw new Error(`Invalid ${typeof e} value for status code`)}this.statusCode=e||200;if(typeof t==="function"){this.replyFunction=t;t=null}}this.options={...this.scope.scopeOptions,...this.options};this.rawHeaders=s.headersInputToRawArray(n);if(this.scope.date){this.rawHeaders.push("Date",this.scope.date.toUTCString())}this.headers=s.headersArrayToObject(this.rawHeaders.concat(this.scope._defaultReplyHeaders));if(t&&typeof t!=="string"&&!Buffer.isBuffer(t)&&!s.isStream(t)&&!s.isContentEncoded(this.headers)){try{t=i(t)}catch(e){throw new Error("Error encoding response body into JSON")}if(!this.headers["content-type"]){this.rawHeaders.push("Content-Type","application/json")}}if(this.scope.contentLen){if(typeof t==="string"){this.rawHeaders.push("Content-Length",t.length)}else if(Buffer.isBuffer(t)){this.rawHeaders.push("Content-Length",t.byteLength)}}this.scope.logger("reply.headers:",this.headers);this.scope.logger("reply.rawHeaders:",this.rawHeaders);this.body=t;this.scope.add(this._key,this);return this.scope}replyWithFile(e,t,n){if(!u){throw new Error("No fs")}const i=u.createReadStream(t);i.pause();this.filePath=t;return this.reply(e,i,n)}reqheaderMatches(e,t){const n=this.reqheaders[t];let i=e.headers[t];if(i&&typeof i!=="string"&&i.toString){i=i.toString()}if(t==="host"&&(i===undefined||n===undefined)){return true}if(n!==undefined&&i!==undefined){if(typeof n==="function"){return n(i)}else if(s.matchStringOrRegexp(i,n)){return true}}this.scope.logger("request header field doesn't match:",t,i,n);return false}match(e,t,n){if(this.scope.logger.enabled){this.scope.logger("attempting match %s, body = %s",i(t),i(n))}const r=(t.method||"GET").toUpperCase();let{path:a="/"}=t;let o;let p;const{proto:u}=t;if(this.method!==r){this.scope.logger(`Method did not match. Request ${r} Interceptor ${this.method}`);return false}if(this.scope.transformPathFunction){a=this.scope.transformPathFunction(a)}const l=({name:t,value:n})=>{const i=e.getHeader(t);if(typeof n==="function"){return n(i)}else{return s.matchStringOrRegexp(i,n)}};if(!this.scope.matchHeaders.every(l)||!this.interceptorMatchHeaders.every(l)){this.scope.logger("headers don't match");return false}const d=Object.keys(this.reqheaders).every(e=>this.reqheaderMatches(t,e));if(!d){this.scope.logger("headers don't match");return false}if(this.scope.scopeOptions.conditionally&&!this.scope.scopeOptions.conditionally()){this.scope.logger("matching failed because Scope.conditionally() did not validate");return false}const m=this.badheaders.filter(e=>e in t.headers);if(m.length){this.scope.logger("request contains bad headers",...m);return false}if(this.queries===null){this.scope.logger("query matching skipped")}else{const[e,t]=a.split("?");const n=this.matchQuery({search:t});this.scope.logger(n?"query matching succeeded":"query matching failed");if(!n){return false}a=e}if(this.__nock_filteredScope){p=this.__nock_filteredScope}else{p=s.normalizeOrigin(u,t.host,t.port)}if(typeof this.uri==="function"){o=s.matchStringOrRegexp(p,this.basePath)&&this.uri.call(this,a)}else{o=s.matchStringOrRegexp(p,this.basePath)&&s.matchStringOrRegexp(a,this.path)}this.scope.logger(`matching ${p}${a} to ${this._key}: ${o}`);if(o&&this._requestBody!==undefined){if(this.scope.transformRequestBodyFunction){n=this.scope.transformRequestBodyFunction(n,this._requestBody)}o=c(t,this._requestBody,n);if(!o){this.scope.logger("bodies don't match: \n",this._requestBody,"\n",n)}}return o}matchOrigin(e){const t=typeof this.path==="function";const n=this.path instanceof RegExp;const i=this.scope.basePath instanceof RegExp;const r=(e.method||"GET").toUpperCase();let{path:a}=e;const{proto:o}=e;if(!n){a=a?a.split("?")[0]:""}if(this.scope.transformPathFunction){a=this.scope.transformPathFunction(a)}const s=t||n?this.__nock_scopeKey:this._key;const p=`${r} ${o}://${e.host}${a}`;if(t){return!!(p.match(s)&&this.path(a))}if(n&&!i){return!!p.match(s)&&this.path.test(a)}if(i){return this.scope.basePath.test(p)&&!!a.match(this.path)}return s===p}matchHostName(e){const{basePath:t}=this.scope;if(t instanceof RegExp){return t.test(e.hostname)}return e.hostname===this.scope.urlParts.hostname}matchQuery(e){if(this.queries===true){return true}const t=r.parse(e.search);this.scope.logger("Interceptor queries: %j",this.queries);this.scope.logger(" Request queries: %j",t);if(typeof this.queries==="function"){return this.queries(t)}return s.dataEqual(this.queries,t)}filteringPath(...e){this.scope.filteringPath(...e);return this}markConsumed(){this.interceptionCounter++;if((this.scope.shouldPersist()||this.counter>0)&&this.interceptionCounter>1&&this.filePath){this.body=u.createReadStream(this.filePath);this.body.pause()}p(this);if(!this.scope.shouldPersist()&&this.counter<1){this.scope.remove(this._key,this)}}matchHeader(e,t){this.interceptorMatchHeaders.push({name:e,value:t});return this}basicAuth({user:e,pass:t=""}){const n=Buffer.from(`${e}:${t}`).toString("base64");this.matchHeader("authorization",`Basic ${n}`);return this}query(e){if(this.queries!==null){throw Error(`Query parameters have already been defined`)}if(e===true){this.queries=e;return this}if(typeof e==="function"){this.queries=e;return this}let t;if(this.scope.scopeOptions.encodedQueryParams){t=s.percentDecode}if(e instanceof o){e=r.parse(e.toString())}else if(!s.isPlainObject(e)){throw Error(`Argument Error: ${e}`)}this.queries={};for(const[n,i]of Object.entries(e)){const e=s.formatQueryValue(n,i,t);const[r,a]=e;this.queries[r]=a}return this}times(e){if(e<1){return this}this.counter=e;return this}once(){return this.times(1)}twice(){return this.times(2)}thrice(){return this.times(3)}delay(e){let t;let n;if(typeof e==="number"){t=e;n=0}else if(typeof e==="object"){t=e.head||0;n=e.body||0}else{throw new Error(`Unexpected input opts ${e}`)}return this.delayConnection(t).delayBody(n)}delayBody(e){this.delayBodyInMs=e;return this}delayConnection(e){this.delayConnectionInMs=e;return this}}},function(e){var t=9007199254740991;function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}e.exports=isLength},,,function(e,t,n){var i=n(707),r=n(824);var a=i(r,"Set");e.exports=a},function(e){"use strict";const t={};const n=t.hasOwnProperty;const i=(e,t)=>{for(const i in e){if(n.call(e,i)){t(i,e[i])}}};const r=(e,t)=>{if(!t){return e}i(t,(t,n)=>{e[t]=n});return e};const a=(e,t)=>{const n=e.length;let i=-1;while(++i{return"\\u"+("0000"+e).slice(-4)};const s=(e,t)=>{let n=e.toString(16);if(t)return n;return n.toUpperCase()};const p=t.toString;const c=Array.isArray;const u=e=>{return typeof Buffer==="function"&&Buffer.isBuffer(e)};const l=e=>{return p.call(e)=="[object Object]"};const d=e=>{return typeof e=="string"||p.call(e)=="[object String]"};const m=e=>{return typeof e=="number"||p.call(e)=="[object Number]"};const f=e=>{return typeof e=="function"};const h=e=>{return p.call(e)=="[object Map]"};const v=e=>{return p.call(e)=="[object Set]"};const g={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};const b=/[\\\b\f\n\r\t]/;const y=/[0-9]/;const D=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;const T=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g;const w=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g;const E=(e,t)=>{const n=()=>{A=N;++t.indentLevel;N=t.indent.repeat(t.indentLevel)};const p={escapeEverything:false,minimal:false,isScriptContext:false,quotes:"single",wrap:false,es6:false,json:false,compact:true,lowercaseHex:false,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:false,__inline2__:false};const _=t&&t.json;if(_){p.quotes="double";p.wrap=true}t=r(p,t);if(t.quotes!="single"&&t.quotes!="double"&&t.quotes!="backtick"){t.quotes="single"}const x=t.quotes=="double"?'"':t.quotes=="backtick"?"`":"'";const O=t.compact;const S=t.lowercaseHex;let N=t.indent.repeat(t.indentLevel);let A="";const C=t.__inline1__;const j=t.__inline2__;const F=O?"":"\n";let I;let R=true;const P=t.numbers=="binary";const k=t.numbers=="octal";const L=t.numbers=="decimal";const V=t.numbers=="hexadecimal";if(_&&e&&f(e.toJSON)){e=e.toJSON()}if(!d(e)){if(h(e)){if(e.size==0){return"new Map()"}if(!O){t.__inline1__=true;t.__inline2__=false}return"new Map("+E(Array.from(e),t)+")"}if(v(e)){if(e.size==0){return"new Set()"}return"new Set("+E(Array.from(e),t)+")"}if(u(e)){if(e.length==0){return"Buffer.from([])"}return"Buffer.from("+E(Array.from(e),t)+")"}if(c(e)){I=[];t.wrap=true;if(C){t.__inline1__=false;t.__inline2__=true}if(!j){n()}a(e,e=>{R=false;if(j){t.__inline2__=false}I.push((O||j?"":N)+E(e,t))});if(R){return"[]"}if(j){return"["+I.join(", ")+"]"}return"["+F+I.join(","+F)+F+(O?"":A)+"]"}else if(m(e)){if(_){return JSON.stringify(e)}if(L){return String(e)}if(V){let t=e.toString(16);if(!S){t=t.toUpperCase()}return"0x"+t}if(P){return"0b"+e.toString(2)}if(k){return"0o"+e.toString(8)}}else if(!l(e)){if(_){return JSON.stringify(e)||"null"}return String(e)}else{I=[];t.wrap=true;n();i(e,(e,n)=>{R=false;I.push((O?"":N)+E(e,t)+":"+(O?"":" ")+E(n,t))});if(R){return"{}"}return"{"+F+I.join(","+F)+F+(O?"":A)+"}"}}const U=t.escapeEverything?T:w;I=e.replace(U,(e,n,i,r,a,p)=>{if(n){if(t.minimal)return n;const e=n.charCodeAt(0);const i=n.charCodeAt(1);if(t.es6){const t=(e-55296)*1024+i-56320+65536;const n=s(t,S);return"\\u{"+n+"}"}return o(s(e,S))+o(s(i,S))}if(i){return o(s(i.charCodeAt(0),S))}if(e=="\0"&&!_&&!y.test(p.charAt(a+1))){return"\\0"}if(r){if(r==x||t.escapeEverything){return"\\"+r}return r}if(b.test(e)){return g[e]}if(t.minimal&&!D.test(e)){return e}const c=s(e.charCodeAt(0),S);if(_||c.length>2){return o(c)}return"\\x"+("00"+c).slice(-2)});if(x=="`"){I=I.replace(/\$\{/g,"\\${")}if(t.isScriptContext){I=I.replace(/<\/(script|style)/gi,"<\\/$1").replace(/