diff --git a/dist/index.js b/dist/index.js index 13c7145a..5cc35fd1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -77,7 +77,7 @@ n((function(e,t){}));var wu=n((function(e){!function e(){if("undefined"!=typeof LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function ku(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Eu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _u=function(){return _u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=Pu){var t=console[e]||console.log;return t.apply(console,arguments)}}}function Mu(e){try{return e()}catch(e){}}!function(e){e.debug=Fu("debug"),e.log=Fu("log"),e.warn=Fu("warn"),e.error=Fu("error")}(Iu||(Iu={}));var Lu=Mu((function(){return globalThis}))||Mu((function(){return window}))||Mu((function(){return self}))||Mu((function(){return global}))||Mu((function(){return Function("return this")()})),qu="__",ju=[qu,qu].join("DEV");var Vu=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(Lu,ju,{value:"production"!==Mu((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),Lu[ju]}}();function zu(e){try{return e()}catch(e){}}var $u=zu((function(){return globalThis}))||zu((function(){return window}))||zu((function(){return self}))||zu((function(){return global}))||zu((function(){return Function("return this")()})),Qu=!1;function Uu(){Qu&&(delete $u.process,Qu=!1)}function Bu(e){return Bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(e)}!$u||zu((function(){return"production"}))||zu((function(){return process}))||(Object.defineProperty($u,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Qu=!0);var Wu="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function Ku(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index120){for(var d=Math.floor(l/80),p=l%80,h=[],m=0;m0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=a&&a.stack?(Object.defineProperty(rc(d),"stack",{value:a.stack,writable:!0,configurable:!0}),nc(d)):(Error.captureStackTrace?Error.captureStackTrace(rc(d),s):Object.defineProperty(rc(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return r=s,(i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function bc(e){return bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bc(e)}function wc(e){return Ec(e,[])}function Ec(e,t){switch(bc(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(pc)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:Ec(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],a=0;a1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";var r=n.map((function(n){return n+": "+Ec(e[n],t)}));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function kc(e,t){if(!Boolean(e))throw new Error(t)}function _c(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||kc(0,"Body must be a string. Received: ".concat(wc(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||kc(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||kc(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:Wu,get:function(){return"Source"}}])&&_c(t.prototype,n),r&&_c(t,r),e}();var xc=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Tc(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;oi&&Oc(t[a-1]);)--a;return t.slice(i,a).join("\n")}function Oc(e){for(var t=0;t31||9===a));return new vc(gc.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function Ac(e,t,n,r,i,a){var o=e.body,s=n,l=t,u=!1;if(45===s&&(s=o.charCodeAt(++l)),48===s){if((s=o.charCodeAt(++l))>=48&&s<=57)throw fc(e,l,"Invalid number, unexpected digit after 0: ".concat(Nc(s),"."))}else l=Pc(e,l,s),s=o.charCodeAt(l);if(46===s&&(u=!0,s=o.charCodeAt(++l),l=Pc(e,l,s),s=o.charCodeAt(l)),69!==s&&101!==s||(u=!0,43!==(s=o.charCodeAt(++l))&&45!==s||(s=o.charCodeAt(++l)),l=Pc(e,l,s),s=o.charCodeAt(l)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw fc(e,l,"Invalid number, expected digit but got: ".concat(Nc(s),"."));return new vc(u?gc.FLOAT:gc.INT,t,l,r,i,a,o.slice(t,l))}function Pc(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw fc(e,i,"Invalid number, expected digit but got: ".concat(Nc(a),"."))}function Fc(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,l=0,u="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function jc(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,l=0;s!==o&&!isNaN(l=a.charCodeAt(s))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++s;return new vc(gc.NAME,t,s,n,r,i,a.slice(t,s))}var Vc=function(){function e(e,t){var n=function(e){return e instanceof Sc}(e)?e:new Sc(e);this._lexer=new Cc(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(gc.NAME);return{kind:dc.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:dc.DOCUMENT,definitions:this.many(gc.SOF,this.parseDefinition,gc.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(gc.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(gc.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(gc.BRACE_L))return{kind:dc.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(gc.NAME)&&(t=this.parseName()),{kind:dc.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(gc.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(gc.PAREN_L,this.parseVariableDefinition,gc.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:dc.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(gc.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(gc.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(gc.DOLLAR),{kind:dc.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:dc.SELECTION_SET,selections:this.many(gc.BRACE_L,this.parseSelection,gc.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(gc.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(gc.COLON)?(e=r,t=this.parseName()):t=r,{kind:dc.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(gc.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(gc.PAREN_L,t,gc.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(gc.COLON),{kind:dc.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:dc.ARGUMENT,name:this.parseName(),value:(this.expectToken(gc.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(gc.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(gc.NAME)?{kind:dc.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:dc.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:dc.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:dc.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case gc.BRACKET_L:return this.parseList(e);case gc.BRACE_L:return this.parseObject(e);case gc.INT:return this._lexer.advance(),{kind:dc.INT,value:t.value,loc:this.loc(t)};case gc.FLOAT:return this._lexer.advance(),{kind:dc.FLOAT,value:t.value,loc:this.loc(t)};case gc.STRING:case gc.BLOCK_STRING:return this.parseStringLiteral();case gc.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:dc.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:dc.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:dc.NULL,loc:this.loc(t)};default:return{kind:dc.ENUM,value:t.value,loc:this.loc(t)}}case gc.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:dc.STRING,value:e.value,block:e.kind===gc.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:dc.LIST,values:this.any(gc.BRACKET_L,(function(){return t.parseValueLiteral(e)}),gc.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:dc.OBJECT,fields:this.any(gc.BRACE_L,(function(){return t.parseObjectField(e)}),gc.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(gc.COLON),{kind:dc.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(gc.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(gc.AT),{kind:dc.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(gc.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(gc.BRACKET_R),e={kind:dc.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(gc.BANG)?{kind:dc.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:dc.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===gc.NAME)switch(e.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()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(gc.STRING)||this.peek(gc.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(gc.BRACE_L,this.parseOperationTypeDefinition,gc.BRACE_R);return{kind:dc.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(gc.COLON);var n=this.parseNamedType();return{kind:dc.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:dc.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:dc.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(gc.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(gc.AMP)||this.peek(gc.NAME));return t}return this.delimitedMany(gc.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(gc.BRACE_L)&&this._lexer.lookahead().kind===gc.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(gc.BRACE_L,this.parseFieldDefinition,gc.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(gc.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:dc.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(gc.PAREN_L,this.parseInputValueDef,gc.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(gc.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(gc.EQUALS)&&(r=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:dc.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:dc.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:dc.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(gc.EQUALS)?this.delimitedMany(gc.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:dc.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(gc.BRACE_L,this.parseEnumValueDefinition,gc.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:dc.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:dc.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(gc.BRACE_L,this.parseInputValueDef,gc.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===gc.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)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(gc.BRACE_L,this.parseOperationTypeDefinition,gc.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:dc.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:dc.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:dc.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:dc.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(gc.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:dc.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(gc.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==xc[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new mc(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw fc(this._lexer.source,t.start,"Expected ".concat($c(e),", found ").concat(zc(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==gc.NAME||t.value!==e)throw fc(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(zc(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===gc.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return fc(this._lexer.source,t.start,"Unexpected ".concat(zc(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function zc(e){var t=e.value;return $c(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function $c(e){return function(e){return e===gc.BANG||e===gc.DOLLAR||e===gc.AMP||e===gc.PAREN_L||e===gc.PAREN_R||e===gc.SPREAD||e===gc.COLON||e===gc.EQUALS||e===gc.AT||e===gc.BRACKET_L||e===gc.BRACKET_R||e===gc.BRACE_L||e===gc.PIPE||e===gc.BRACE_R}(e)?'"'.concat(e,'"'):e}var Qc={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Uc=Object.freeze({});function Bc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qc,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],l=void 0,u=void 0,c=void 0,f=[],d=[],p=e;do{var h=++o===a.length,m=h&&0!==s.length;if(h){if(u=0===d.length?void 0:f[f.length-1],l=c,c=d.pop(),m){if(i)l=l.slice();else{for(var v={},y=0,g=Object.keys(l);y80&&(s=o+Xc("(\n",Zc(Gc(r,"\n")),"\n)")),Gc([s,Gc(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+Xc(" ",Gc(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Gc(["...",Xc("on ",t),Gc(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(Xc("(",Gc(r,", "),")")," ")+"on ".concat(n," ").concat(Xc("",Gc(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,l="";return!s||r&&i||(l+="\n"+t),l+=t?e.replace(/\n/g,"\n"+t):e,s&&(l+="\n"),'"""'+l.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Gc(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Gc(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+Xc("(",Gc(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:Yc((function(e){var t=e.directives,n=e.operationTypes;return Gc(["schema",Gc(t," "),Jc(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:Yc((function(e){return Gc(["scalar",e.name,Gc(e.directives," ")]," ")})),ObjectTypeDefinition:Yc((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["type",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")})),FieldDefinition:Yc((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(tf(n)?Xc("(\n",Zc(Gc(n,"\n")),"\n)"):Xc("(",Gc(n,", "),")"))+": "+r+Xc(" ",Gc(i," "))})),InputValueDefinition:Yc((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Gc([t+": "+n,Xc("= ",r),Gc(i," ")]," ")})),InterfaceTypeDefinition:Yc((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["interface",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")})),UnionTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.types;return Gc(["union",t,Gc(n," "),r&&0!==r.length?"= "+Gc(r," | "):""]," ")})),EnumTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.values;return Gc(["enum",t,Gc(n," "),Jc(r)]," ")})),EnumValueDefinition:Yc((function(e){return Gc([e.name,Gc(e.directives," ")]," ")})),InputObjectTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.fields;return Gc(["input",t,Gc(n," "),Jc(r)]," ")})),DirectiveDefinition:Yc((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(tf(n)?Xc("(\n",Zc(Gc(n,"\n")),"\n)"):Xc("(",Gc(n,", "),")"))+(r?" repeatable":"")+" on "+Gc(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Gc(["extend schema",Gc(t," "),Jc(n)]," ")},ScalarTypeExtension:function(e){return Gc(["extend scalar",e.name,Gc(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["extend type",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["extend interface",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Gc(["extend union",t,Gc(n," "),r&&0!==r.length?"= "+Gc(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Gc(["extend enum",t,Gc(n," "),Jc(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Gc(["extend input",t,Gc(n," "),Jc(r)]," ")}};function Yc(e){return function(t){return Gc([t.description,e(t)],"\n")}}function Gc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Jc(e){return Xc("{\n",Zc(Gc(e,"\n")),"\n}")}function Xc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function Zc(e){return Xc(" ",e.replace(/\n/g,"\n "))}function ef(e){return-1!==e.indexOf("\n")}function tf(e){return null!=e&&e.some(ef)}function nf(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?Iu(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):Iu(n&&1===n.length,38);var i=n[0];__DEV__?Iu(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):Iu(i.name&&"if"===i.name.value,39);var a=i.value;__DEV__?Iu(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):Iu(a&&("Variable"===a.kind||"BooleanValue"===a.kind),40),t.push({directive:e,ifArgument:i})}}));return t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?Iu(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):Iu(void 0!==i,37)):i=r.value.value,"skip"===n.name.value?!i:i}))}function rf(e,t){return function(e){var t=[];return Bc(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function af(e){return e&&rf(["client"],e)&&rf(["export"],e)}function of(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Du("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new Du(41);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?Iu(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):Iu(1===r.length,42),n=r[0].name.value),_u(_u({},e),{definitions:Ou([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function sf(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function lf(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?Iu(n,"No fragment named ".concat(e.name.value,".")):Iu(n,43),n;default:return null}}function uf(e){return null!==e&&"object"==typeof e}function cf(e){return{__ref:String(e)}}function ff(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function df(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return df(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return df(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new Du('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new Du(52);e[t.value]=null}}Uu(),__DEV__?Iu("boolean"==typeof Vu,Vu):Iu("boolean"==typeof Vu,36);var pf=["connection","include","skip","client","rest","export"],hf=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),"".concat(n.connection.key,"(").concat(mf(i),")")}return n.connection.key}var a=e;if(t){var o=mf(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach((function(e){-1===pf.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(mf(n[e]),")"):a+="@".concat(e))})),a}),{setStringify:function(e){var t=mf;return mf=e,t}}),mf=function(e){return JSON.stringify(e,vf)};function vf(e,t){return uf(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function yf(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return df(n,r,i,t)})),n}return null}function gf(e){return e.alias?e.alias.value:e.name.value}function bf(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r1)for(var r=new Qf,i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1,i=!1,a=arguments[1],o=a;return new n((function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r=0&&i.splice(e,1),o()}});i.push(a)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),a.unsubscribe()}}))},t[Xf]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=ed(t,Xf);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return nd(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(Yf("iterator")&&(r=ed(t,Jf)))return new n((function(e){id((function(){if(!e.closed){for(var n,i=Uf(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){id((function(){if(!e.closed){for(var n=0;n0}function Cd(e){return e.errors&&e.errors.length>0||!1}function Nd(){for(var e=[],t=0;t, or pass an ApolloClientApolloClient instance in via options.'):Iu(!!n,29),n}var Md=Object.prototype,Ld=Md.toString,qd=Md.hasOwnProperty,jd=Function.prototype.toString,Vd=new Map;function zd(e,t){try{return $d(e,t)}finally{Vd.clear()}}function $d(e,t){if(e===t)return!0;var n,r,i,a=Ld.call(e);if(a!==Ld.call(t))return!1;switch(a){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Wd(e,t))return!0;var o=Qd(e),s=Qd(t),l=o.length;if(l!==s.length)return!1;for(var u=0;u=0&&n.indexOf(r,i)===i))}return!1}function Qd(e){return Object.keys(e).filter(Ud,e)}function Ud(e){return void 0!==this[e]}var Bd="{ [native code] }";function Wd(e,t){var n=Vd.get(e);if(n){if(n.has(t))return!0}else Vd.set(e,n=new Set);return n.add(t),!1}function Kd(e){return e.hasOwnProperty("graphQLErrors")}var Hd=function(e){function t(n){var r,i,a=n.graphQLErrors,o=n.clientErrors,s=n.networkError,l=n.errorMessage,u=n.extraInfo,c=e.call(this,l)||this;return c.graphQLErrors=a||[],c.clientErrors=o||[],c.networkError=s||null,c.message=l||(i="",(Od((r=c).graphQLErrors)||Od(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),r.networkError&&(i+="".concat(r.networkError.message,"\n")),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return ku(t,e),t}(Error);function Yd(e){return new fd((function(t){t.error(e)}))}var Gd=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r};function Jd(e,t){return t?t(e):fd.of()}function Xd(e){return"function"==typeof e?new tp(e):e}function Zd(e){return e.request.length<=1}var ep=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ku(t,e),t}(Error),tp=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return fd.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(Xd).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=Xd(n),a=Xd(r||new e(Jd));return Zd(i)&&Zd(a)?new e((function(e){return t(e)?i.request(e)||fd.of():a.request(e)||fd.of()})):new e((function(e,n){return t(e)?i.request(e,n)||fd.of():a.request(e,n)||fd.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=_u({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=_u(_u({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return _u({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Sf(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n=300&&Gd(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||sp.call(n,"data")||sp.call(n,"errors")||Gd(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),n}))}}var up=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new Du("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new Du(21);throw r.parseError=e,r}return n},cp={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},fp=function(e,t){return t(e)};function dp(e,t){for(var n=[],r=2;rthis.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Fp=new Dp,Mp=Object.prototype.hasOwnProperty,Lp=void 0===(Ap=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Ap;function qp(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var jp=[];function Vp(e,t){if(!e)throw new Error(t||"assertion failure")}function zp(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var $p=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Bp(this))return Qp(this),this.value[0]},e.prototype.recompute=function(e){return Vp(!this.recomputing,"already recomputing"),Qp(this),Bp(this)?function(e,t){Xp(e),Fp.withValue(e,Up,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{qp(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,Bp(e))return;Kp(e)}(e);return zp(e.value)}(this,e):zp(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Wp(this),qp(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),Xp(this),Hp(this,(function(t,n){t.setDirty(),Zp(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=jp.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Lp(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),jp.push(this.deps),this.deps=null)},e.count=0,e}();function Qp(e){var t=Fp.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Bp(e)?Yp(t,e):Gp(t,e),t}function Up(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Bp(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Wp(e){Hp(e,Yp)}function Kp(e){Hp(e,Gp)}function Hp(e,t){var n=e.parents.size;if(n)for(var r=Lp(e.parents),i=0;i0&&n===t.length&&e[n-1]===t[n-1]}(n,t.value)||e.setDirty(),Jp(e,t),Bp(e)||Kp(e)}function Jp(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(jp.length<100&&jp.push(n),e.dirtyChildren=null))}function Xp(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Zp(e,n)})),e.forgetDeps(),Vp(null===e.dirtyChildren)}function Zp(e,t){t.parents.delete(e),e.childValues.delete(t),Jp(e,t)}var eh={setDirty:!0,dispose:!0,forget:!0};function th(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Fp.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(qp(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Mp.call(eh,n)?n:"setDirty";Lp(r).forEach((function(e){return e[i]()})),t.delete(e),qp(r)}},r}function nh(){var e=new xp("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}nh();var rh=new Set;function ih(e,t){void 0===t&&(t=Object.create(null));var n=new Pp(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||nh(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new $p(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rh.add(n),Fp.hasValue()||(rh.forEach((function(e){return e.clean()})),rh.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function l(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=l,a.forget=function(){return l(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var ah,oh=function(){function e(){this.getFragmentDoc=ih(of)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(_u(_u({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(_u(_u({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=Su(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=Su(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery(_u(_u({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment(_u(_u({},e),{data:i})),i)}})},e}();ah||(ah={});var sh=function(e,t,n,r){this.message=e,this.path=t,this.query=n,this.variables=r},lh=Object.prototype.hasOwnProperty;function uh(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ch={dataIdFromObject:uh,addTypename:!0,resultCaching:!0,canonizeResults:!1};function fh(e){var t=e.canonizeResults;return void 0===t?ch.canonizeResults:t}var dh=/^[_a-z][_0-9a-z]*/i;function ph(e){var t=e.match(dh);return t?t[0]:e}function hh(e,t,n){return!!uf(t)&&(Array.isArray(t)?t.every((function(t){return hh(e,t,n)})):e.selections.every((function(e){if(wf(e)&&nf(e,n)){var r=gf(e);return lh.call(t,r)&&(!e.selectionSet||hh(e.selectionSet,t[r],n))}return!0})))}function mh(e){return uf(e)&&!ff(e)&&!Array.isArray(e)}var vh=Object.create(null),yh=function(){return vh},gh=Object.create(null),bh=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return gd(ff(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return ff(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return cf(e);if(ff(e))return e;var r=n.policies.identify(e)[0];if(r){var i=cf(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return _u({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),lh.call(this.data,e)){var n=this.data[e];if(n&&lh.call(n,t))return n[t]}return"__typename"===t&&lh.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof _h?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),lh.call(this.data,e)?this.data[e]:this instanceof _h?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;ff(e)&&(e=e.__ref),ff(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?Iu("string"==typeof n,"store.merge expects a string ID"):Iu("string"==typeof n,1);var o=new Qf(xh).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach((function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=ph(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof _h||delete o[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==o.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:vh,INVALIDATE:gh,isReference:ff,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||cf(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(l){var u=ph(l),c=r[l];if(void 0!==c){var f="function"==typeof t?t:t[l]||t[u];if(f){var d=f===yh?vh:f(gd(c),_u(_u({},s),{fieldName:u,storeFieldName:l,storage:n.getStorage(e,l)}));d===gh?n.group.dirty(e,l):(d===vh&&(d=void 0),d!==c&&(i[l]=d,a=!0,c=d))}void 0!==c&&(o=!1)}})),a)return this.merge(e,i),o&&(this instanceof _h?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=yh,r):yh)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(lh.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof _h&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){lh.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&lh.call(e,n)||t.delete(n)})),e){var n=e.__META,r=Su(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof _h?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){lh.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof _h;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!lh.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){ff(e)&&(t[e.__ref]=!0),uf(e)&&Object.keys(e).forEach((function(t){var n=e[t];uf(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),wh=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?th():null,this.keyMaker=new xp(Ed)},e.prototype.depend=function(e,t){if(this.d){this.d(Eh(e,t));var n=ph(t);n!==t&&this.d(Eh(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Eh(e,t),"__exists"===t?"forget":"setDirty")},e}();function Eh(e,t){return t+"#"+e}function kh(e,t){Th(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new wh(i))||this;return o.stump=new Sh(o),o.storageTrie=new xp(Ed),a&&o.replace(a),o}return ku(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(bh||(bh={}));var _h=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return ku(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){zd(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return _u(_u({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return lh.call(this.data,t)?_u(_u({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(bh),Sh=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new wh(t.group.caching,t.group))||this}return ku(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(_h);function xh(e,t,n){var r=e[n],i=t[n];return zd(r,i)?r:i}function Th(e){return!!(e instanceof bh&&e.group.caching)}var Oh,Ch,Nh=function(){function e(){this.known=new(kd?WeakSet:Set),this.pool=new xp(Ed),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return uf(e)&&this.known.has(e)},e.prototype.pass=function(e){if(uf(e)){var t=function(e){return uf(e)?Array.isArray(e)?e.slice(0):_u({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(uf(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),a=[i],o=this.sortedKeys(e);a.push(o.json);var s,l=a.length;if(o.sorted.forEach((function(n){a.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(a)).object){var u=s.object=Object.create(i);this.known.add(u),o.sorted.forEach((function(e,t){u[e]=a[l+t]})),__DEV__&&Object.freeze(u)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),Rh=Object.assign((function(e){if(uf(e)){void 0===Oh&&Dh();var t=Oh.admit(e),n=Ch.get(t);return void 0===n&&Ch.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:Dh});function Dh(){Oh=new Nh,Ch=new(Ed?WeakMap:Map)}function Ih(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Ah=function(){function e(e){var t=this;this.knownResults=new(Ed?WeakMap:Map),this.config=Nd(e,{addTypename:!1!==e.addTypename,canonizeResults:fh(e)}),this.canon=e.canon||new Nh,this.executeSelectionSet=ih((function(e){var n,r=e.context.canonizeResults,i=Ih(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?_u(_u({},a),{result:t.canon.admit(a.result)}):a:(kh(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Ih,makeCacheKey:function(e,t,n,r){if(Th(n.store))return n.store.makeCacheKey(e,ff(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=ih((function(e){return kh(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(Th(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Nh},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,a=e.variables,o=e.returnPartialData,s=void 0===o||o,l=e.canonizeResults,u=void 0===l?this.config.canonizeResults:l,c=this.config.cache.policies;a=_u(_u({},Cf(Tf(n))),a);var f,d=cf(i),p=new Qf,h=this.executeSelectionSet({selectionSet:Of(n).selectionSet,objectOrReference:d,enclosingRef:d,context:{store:t,query:n,policies:c,variables:a,varString:Rh(a),canonizeResults:u,fragmentMap:sf(xf(n)),merge:function(e,t){return p.merge(e,t)}}});if(h.missing&&(f=[new sh(Ph(h.missing),h.missing,n,a)],!s))throw f[0];return{result:h.result,complete:!f,missing:f}},e.prototype.isFresh=function(e,t,n,r){if(Th(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,a=e.context;if(ff(r)&&!a.policies.rootTypenamesById[r.__ref]&&!a.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var o,s=a.variables,l=a.policies,u=a.store.getFieldValue(r,"__typename"),c={};function f(e,t){var n;return e.missing&&(o=a.merge(o,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof u&&!l.rootIdsByTypename[u]&&(c={__typename:u});var d=new Set(n.selections);d.forEach((function(e){var n,p;if(nf(e,s))if(wf(e)){var h=l.readField({fieldName:e.name.value,field:e,variables:a.variables,from:r},a),m=gf(e);void 0===h?Ff.added(e)||(o=a.merge(o,((n={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(ff(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):Array.isArray(h)?h=f(t.executeSubSelectedArray({field:e,array:h,enclosingRef:i,context:a}),m):e.selectionSet?null!=h&&(h=f(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:h,enclosingRef:ff(h)?h:i,context:a}),m)):a.canonizeResults&&(h=t.canon.pass(h)),void 0!==h&&(c=a.merge(c,((p={})[m]=h,p)))}else{var v=lf(e,a.fragmentMap);v&&l.fragmentMatches(v,u)&&v.selectionSet.selections.forEach(d.add,d)}}));var p={result:c,missing:o},h=a.canonizeResults?this.canon.admit(p):gd(p);return h.result&&this.knownResults.set(h.result,n),h},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context;function s(e,n){var r;return e.missing&&(t=o.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map((function(e,t){return null===e?null:Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:ff(e)?e:a,context:o}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){uf(n)&&(__DEV__?Iu(!ff(n),"Missing selection set for object of type ".concat(function(e,t){return ff(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)," returned for query field ").concat(t.name.value)):Iu(!ff(n),5),Object.values(n).forEach(r.add,r))}))}}(o.store,r,e),e)})),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function Ph(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var Fh=new Dp,Mh=new WeakMap;function Lh(e){var t=Mh.get(e);return t||Mh.set(e,t={vars:new Set,dep:th()}),t}function qh(e){Lh(e).vars.forEach((function(t){return t.forgetCache(e)}))}function jh(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach((function(e){Lh(e).dep.dirty(r),Vh(e)}));var o=Array.from(n);n.clear(),o.forEach((function(t){return t(e)}))}}else{var s=Fh.getValue();s&&(i(s),Lh(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Lh(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function Vh(e){e.broadcastWatches&&e.broadcastWatches()}var zh=Object.create(null);function $h(e){var t=JSON.stringify(e);return zh[t]||(zh[t]=Object.create(null))}function Qh(e){var t=$h(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=Bh(e,(function(e){var i=Hh(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&lh.call(t,e[0])&&(i=Hh(t,e,Kh)),__DEV__?Iu(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):Iu(void 0!==i,2),i}));return"".concat(n.typename,":").concat(JSON.stringify(i))})}function Uh(e){var t=$h(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=Bh(e,(function(e){var n=e[0],a=n.charAt(0);if("@"!==a)if("$"!==a){if(t)return Hh(t,e)}else{var o=n.slice(1);if(i&&lh.call(i,o)){var s=e.slice(0);return s[0]=o,Hh(i,s)}}else if(r&&Od(r.directives)){var l=n.slice(1),u=r.directives.find((function(e){return e.name.value===l})),c=u&&yf(u,i);return c&&Hh(c,e.slice(1))}})),s=JSON.stringify(o);return(t||"{}"!==s)&&(a+=":"+s),a})}function Bh(e,t){var n=new Qf;return Wh(e).reduce((function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)(i={})[r[o]]=a,a=i;e=n.merge(e,a)}return e}),Object.create(null))}function Wh(e){var t=$h(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,i){Array.isArray(t)?(Wh(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),Array.isArray(e[i+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function Kh(e,t){return e[t]}function Hh(e,t,n){return n=n||Kh,Yh(t.reduce((function e(t,r){return Array.isArray(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function Yh(e){return uf(e)?Array.isArray(e)?e.map(Yh):Bh(Object.keys(e).sort(),(function(t){return Hh(e,t)})):e}function Gh(e){return void 0!==e.args?e.args:e.field?yf(e.field,e.variables):null}hf.setStringify(Rh);var Jh=function(){},Xh=function(e,t){return t.fieldName},Zh=function(e,t,n){return(0,n.mergeObjects)(e,t)},em=function(e,t){return t},tm=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=_u({dataIdFromObject:uh},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r=this,i=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,o=t&&t.storeObject||e,s=_u(_u({},t),{typename:i,storeObject:o,readField:t&&t.readField||function(){var e=rm(arguments,o);return r.readField(e,{store:r.cache.data,variables:e.variables})}}),l=i&&this.getTypePolicy(i),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var c=u(e,s);if(!Array.isArray(c)){a=c;break}u=Qh(c)}return a=a?String(a):void 0,s.keyObject?[a,s.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=Su(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),lh.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?Zh:!1===t?em:e.merge}o(r,t.merge),r.keyFn=!1===i?Jh:Array.isArray(i)?Qh(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,l=i.read,u=i.merge;r.keyFn=!1===s?Xh:Array.isArray(s)?Uh(s):"function"==typeof s?s:r.keyFn,"function"==typeof l&&(r.read=l),o(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||Xh)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?Iu(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):Iu(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(dh);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!lh.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,a=Su(r,["fields"]);Object.assign(n,a),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],l=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},u=!(!n||!this.fuzzySubtypes.size),c=!1,f=0;f1?s:t}:(r=_u({},o),lh.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Iu.warn("Undefined 'from' passed to readField with arguments ".concat((i=Array.from(e),a=Dd("stringifyForDisplay"),JSON.stringify(i,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("")))),void 0===r.variables&&(r.variables=n),r}function im(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new Du("Cannot automatically merge arrays"):new Du(4);if(uf(t)&&uf(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(ff(t)&&mh(n))return e.merge(t.__ref,n),t;if(mh(t)&&ff(n))return e.merge(t,n.__ref),n;if(mh(t)&&mh(n))return _u(_u({},t),n)}return n}}function am(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:_u(_u({},e),{clientOnly:t,deferred:n})),i}var om=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,l=_f(r),u=new Qf;o=_u(_u({},Cf(l)),o);var c={store:e,written:Object.create(null),merge:function(e,t){return u.merge(e,t)},variables:o,varString:Rh(o),fragmentMap:sf(xf(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map},f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:c});if(!ff(f))throw __DEV__?new Du("Could not identify object ".concat(JSON.stringify(i))):new Du(6);return c.incomingById.forEach((function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=cf(r);if(a&&a.map.size){var l=n.applyMerges(a,s,i,c);if(ff(l))return;i=l}if(__DEV__&&!c.overwrite){var u=Object.create(null);o.forEach((function(e){e.selectionSet&&(u[e.name.value]=!0)}));Object.keys(i).forEach((function(e){(function(e){return!0===u[ph(e)]})(e)&&!function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(!a)return;var o=i(t);if(!o)return;if(ff(a))return;if(zd(a,o))return;if(Object.keys(a).every((function(e){return void 0!==r.getFieldValue(o,e)})))return;var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),l=ph(n),u="".concat(s,".").concat(l);if(dm.has(u))return;dm.add(u);var c=[];Array.isArray(a)||Array.isArray(o)||[a,o].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||c.includes(t)||c.push(t)}));__DEV__&&Iu.warn("Cache data may be lost when replacing the ".concat(l," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(u," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}(s,i,e,c.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,l=Object.create(null),u=n&&s.rootTypenamesById[n]||bf(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof u&&(l.__typename=u);var c=function(){var e=rm(arguments,l,a.variables);if(ff(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField(_u(_u({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,u).forEach((function(e,n){var i,a=gf(n),d=r[a];if(f.add(n),void 0!==d){var p=s.getStoreFieldName({typename:u,fieldName:n.name.value,field:n,variables:e.variables}),h=lm(o,p),m=t.processFieldValue(d,n,n.selectionSet?am(e,!1,!1):e,h),v=void 0;n.selectionSet&&(ff(m)||mh(m))&&(v=c("__typename",m));var y=s.getMergeFunction(u,n.name.value,v);y?h.info={field:n,typename:u,merge:y}:fm(o,p),l=e.merge(l,((i={})[p]=m,i))}else!__DEV__||e.clientOnly||e.deferred||Ff.added(n)||s.getReadFunction(u,n.name.value)||__DEV__&&Iu.error("Missing field '".concat(gf(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))}));try{var d=s.identify(r,{typename:u,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:l,readField:c}),p=d[0],h=d[1];n=n||p,h&&(l=a.merge(l,h))}catch(e){if(!n)throw e}if("string"==typeof n){var m=cf(n),v=a.written[n]||(a.written[n]=[]);if(v.indexOf(i)>=0)return m;if(v.push(i),this.reader&&this.reader.isFresh(r,m,i,a))return m;var y=a.incomingById.get(n);return y?(y.storeObject=a.merge(y.storeObject,l),y.mergeTree=um(y.mergeTree,o),f.forEach((function(e){return y.fieldNodeSet.add(e)}))):a.incomingById.set(n,{storeObject:l,mergeTree:cm(o)?void 0:o,fieldNodeSet:f}),m}return l},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,a){var o=i.processFieldValue(e,t,n,lm(r,a));return fm(r,a),o})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?md(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=bf(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new xp(!1);return function e(s,l){var u=o.lookup(s,l.clientOnly,l.deferred);u.visited||(u.visited=!0,s.selections.forEach((function(o){if(nf(o,n.variables)){var s=l.clientOnly,u=l.deferred;if(s&&u||!Od(o.directives)||o.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=yf(e,n.variables);r&&!1===r.if||(u=!0)}})),wf(o)){var c=i.get(o);c&&(s=s&&c.clientOnly,u=u&&c.deferred),i.set(o,am(n,s,u))}else{var f=lf(o,n.fragmentMap);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,am(n,s,u))}}})))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a,o=this;if(e.map.size&&!ff(n)){var s,l=Array.isArray(n)||!ff(t)&&!mh(t)?void 0:t,u=n;l&&!i&&(i=[ff(l)?l.__ref:l]);var c=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=c(l,t),a=c(u,t);if(void 0!==a){i&&i.push(t);var f=o.applyMerges(e,n,a,r,i);f!==a&&(s=s||new Map).set(t,f),i&&Iu(i.pop()===t)}})),s&&(n=Array.isArray(u)?u.slice(0):_u({},u),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(a=r.store).getStorage.apply(a,i)):n},e}(),sm=[];function lm(e,t){var n=e.map;return n.has(t)||n.set(t,sm.pop()||{map:new Map}),n.get(t)}function um(e,t){if(e===t||!t||cm(t))return e;if(!e||cm(e))return t;var n=e.info&&t.info?_u(_u({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var a=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,um(e,t.map.get(n))),a.delete(n)})),a.forEach((function(n){i.map.set(n,um(t.map.get(n),e.map.get(n)))}))}return i}function cm(e){return!e||!(e.info||e.map.size)}function fm(e,t){var n=e.map,r=n.get(t);r&&cm(r)&&(sm.push(r),n.delete(t))}var dm=new Set;var pm,hm=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=jh,n.txCount=0,n.config=function(e){return Nd(ch,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new tm({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ku(t,e),t.prototype.init=function(){var e=this.data=new bh.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new om(this,this.storeReader=new Ah({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:fh(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=ih((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(Th(n)){var r=e.optimistic,i=e.rootId,a=e.variables;return n.makeCacheKey(e.query,e.callback,Rh({optimistic:r,rootId:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(_u(_u({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof sh)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(lh.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(_u(_u({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){Lh(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&qh(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Rh.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(ff(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&Iu.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(lh.call(e,"id"))return!1;e=_u(_u({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Rh.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),qh(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,l=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},u=new Set;return s&&!this.txCount&&this.broadcastWatches(_u(_u({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,l):!1===a?l(this.data):l(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&u.size?(this.broadcastWatches(_u(_u({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Ff(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&zd(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(oh);function mm(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(pm||(pm={}));var vm=Object.assign,ym=Object.hasOwnProperty,gm=!1,bm=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,a=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=wm)}catch(e){}var n=!a.observers.size;a.observers.add(e);var r=a.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&a.reobserve().catch((function(){})),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}}))||this;a.observers=new Set,a.subscriptions=new Set,a.isTornDown=!1,a.options=i,a.queryId=r.queryId||n.generateQueryId();var o=_f(i.query);return a.queryName=o&&o.name&&o.name.value,a.initialFetchPolicy=i.fetchPolicy||"cache-first",a.queryManager=n,a.queryInfo=r,a}return ku(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||pm.ready,r=_u(_u({},t),{loading:mm(n),networkStatus:n}),i=this.options.fetchPolicy,a=void 0===i?"cache-first":i;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var o=this.queryInfo.getDiff();(o.complete||this.options.returnPartialData)&&(r.data=o.result),zd(r.data,{})&&(r.data=void 0),o.complete?(delete r.partial,!o.complete||r.networkStatus!==pm.loading||"cache-first"!==a&&"cache-only"!==a||(r.networkStatus=pm.ready,r.loading=!1)):r.partial=!0,!__DEV__||o.complete||this.options.partialRefetch||r.loading||r.data||r.error||Em(o.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!zd(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||zd(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if(n.fetchPolicy="standby"===r||"cache-and-network"===r?r:"no-cache"===r?"no-cache":"network-only",__DEV__&&e&&ym.call(e,"variables")){var i=Tf(this.options.query),a=i.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&Iu.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!zd(this.options.variables,e)&&(n.variables=this.options.variables=_u(_u({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,pm.refetch)},t.prototype.fetchMore=function(e){var t=this,n=_u(_u({},e.query?e:_u(_u(_u({},this.options),e),{variables:_u(_u({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=pm.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,pm.fetchMore).then((function(r){var i=r.data,a=e.updateQuery;return a?(__DEV__&&!gm&&(__DEV__&&Iu.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),gm=!0),t.updateQuery((function(e){return a(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&Iu.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return zd(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},pm.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?Iu(n,"Attempted to start a polling query without a polling interval."):Iu(n,10),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(mm(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},pm.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=_u(_u({},this.last),{result:this.queryManager.assumeImmutableResults?e:md(e),variables:t}),Od(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===pm.refetch||t===pm.fetchMore||t===pm.poll,i=this.options.variables,a=r?Nd(this.options,e):vm(this.options,Nd(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!zd(e.variables,i)&&(a.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=pm.setVariables)));var o=a.variables&&_u({},a.variables),s=this.fetch(a,t),l={next:function(e){n.reportResult(e,o)},error:function(e){n.reportError(e,o)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=l),s.addObserver(l),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),bd(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=_u(_u({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:pm.error,loading:!1});this.updateLastResult(n,t),bd(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(fd);function wm(e){__DEV__&&Iu.error("Unhandled error",e.message,e.stack)}function Em(e){__DEV__&&e&&__DEV__&&Iu.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function km(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}Sd(bm);var _m=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Vf(t.resolvers,e)})):this.resolvers=Vf(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return xu(this,void 0,void 0,(function(){return Tu(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then((function(e){return _u(_u({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return rf(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){kf(e);var t=Pf([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Bc(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return wf(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return _u(_u({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),xu(this,void 0,void 0,(function(){return Tu(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return _u(_u({},t),e.exportedVariables)}))]:[2,_u({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Bc(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Uc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:qf(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),xu(this,void 0,void 0,(function(){var o,s,l,u,c,f,d,p,h;return Tu(this,(function(m){return o=Of(e),s=xf(e),l=sf(s),u=o.operation,c=u?u.charAt(0).toUpperCase()+u.slice(1):"Query",d=(f=this).cache,p=f.client,h={fragmentMap:l,context:_u(_u({},n),{cache:d,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:c,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(o.selectionSet,t,h).then((function(e){return{result:e,exportedVariables:h.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return xu(this,void 0,void 0,(function(){var r,i,a,o,s,l=this;return Tu(this,(function(u){return r=n.fragmentMap,i=n.context,a=n.variables,o=[t],s=function(e){return xu(l,void 0,void 0,(function(){var s,l;return Tu(this,(function(u){return nf(e,a)?wf(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&o.push(((n={})[gf(e)]=t,n))}))]:(Ef(e)?s=e:(s=r[e.name.value],__DEV__?Iu(s,"No fragment named ".concat(e.name.value)):Iu(s,9)),s&&s.typeCondition&&(l=s.typeCondition.name.value,n.fragmentMatcher(t,l,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){o.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return zf(o)}))]}))}))},e.prototype.resolveField=function(e,t,n){return xu(this,void 0,void 0,(function(){var r,i,a,o,s,l,u,c,f,d=this;return Tu(this,(function(p){return r=n.variables,i=e.name.value,a=gf(e),o=i!==a,s=t[a]||t[i],l=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(u=t.__typename||n.defaultOperationType,(c=this.resolvers&&this.resolvers[u])&&(f=c[o?i:a])&&(l=Promise.resolve(Fh.withValue(this.cache,f,[t,yf(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,l.then((function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?d.resolveSubSelectedArray(e,t,n):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Sm=new(Ed?WeakMap:Map);function xm(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Sm.set(e,(Sm.get(e)+1)%1e15),n.apply(this,arguments)})}function Tm(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Om=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Sm.has(n)||(Sm.set(n,0),xm(n,"evict"),xm(n,"modify"),xm(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||pm.loading;return this.variables&&this.networkStatus!==pm.loading&&!zd(this.variables,e.variables)&&(t=pm.setVariables),zd(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Tm(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&zd(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||zd(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Tm(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(mm(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=_u(_u({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&zd(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Sm.get(this.cache)&&zd(t,n.variables)&&zd(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=Od(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Cm(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Sm.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var a=r.getDiffOptions(t.variables),o=i.diff(a);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(o,a),o.complete&&(e.data=o.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=pm.ready},e.prototype.markError=function(e){return this.networkStatus=pm.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Cm(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!Cd(e);return!r&&n&&e.data&&(r=!0),r}var Nm=Object.prototype.hasOwnProperty,Rm=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,a=e.onBroadcast,o=e.ssrMode,s=void 0!==o&&o,l=e.clientAwareness,u=void 0===l?{}:l,c=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ed?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=u,this.localState=c||new _m({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new Du("QueryManager stopped while query was in flight"):new Du(11))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,a=e.refetchQueries,o=void 0===a?[]:a,s=e.awaitRefetchQueries,l=void 0!==s&&s,u=e.update,c=e.onQueryUpdated,f=e.errorPolicy,d=void 0===f?"none":f,p=e.fetchPolicy,h=void 0===p?"network-only":p,m=e.keepRootFields,v=e.context;return xu(this,void 0,void 0,(function(){var e,a,s;return Tu(this,(function(f){switch(f.label){case 0:return __DEV__?Iu(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):Iu(t,12),__DEV__?Iu("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):Iu("network-only"===h||"no-cache"===h,13),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,v)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:h,errorPolicy:d,context:v,updateQueries:i,update:u,keepRootFields:m}),this.broadcastQueries(),s=this,[2,new Promise((function(f,p){return wd(s.getObservableFromLink(t,_u(_u({},v),{optimisticResponse:r}),n,!1),(function(f){if(Cd(f)&&"none"===d)throw new Hd({graphQLErrors:f.errors});a&&(a.loading=!1,a.error=null);var p=_u({},f);return"function"==typeof o&&(o=o(p)),"ignore"===d&&Cd(p)&&delete p.errors,s.markMutationResult({mutationId:e,result:p,document:t,variables:n,fetchPolicy:h,errorPolicy:d,context:v,update:u,updateQueries:i,awaitRefetchQueries:l,refetchQueries:o,removeOptimistic:r?e:void 0,onQueryUpdated:c,keepRootFields:m})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){a&&(a.loading=!1,a.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),p(t instanceof Hd?t:new Hd({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&Cm(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var o=e.updateQueries;o&&this.queries.forEach((function(e,a){var s=e.observableQuery,l=s&&s.queryName;if(l&&Nm.call(o,l)){var u=o[l],c=n.queries.get(a),f=c.document,d=c.variables,p=t.diff({query:f,variables:d,returnPartialData:!0,optimistic:!1}),h=p.result;if(p.complete&&h){var m=u(h,{mutationResult:r,queryName:f&&Sf(f)||void 0,queryVariables:d});m&&i.push({result:m,dataId:"ROOT_QUERY",query:f,variables:d})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach((function(e){return t.write(e)}));var o=e.update;if(o){if(!a){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=_u(_u({},r),{data:s.result}))}o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(_u(_u({},t),{result:{data:r}}),e)}catch(e){__DEV__&&Iu.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),Pf([Mf],kf(t))),a=this.localState.clientQuery(r),o=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:af(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:a,serverQuery:o,defaultVars:Cf(_f(r)),asQuery:_u(_u({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?_u(_u({},e),{operation:"query"}):e}))})},l=function(e){e&&!n.has(e)&&n.set(e,s)};l(e),l(r),l(a),l(o)}return n.get(e)},e.prototype.getVariables=function(e,t){return _u(_u({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=_u(_u({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new Om(this),n=new bm({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?Iu(e.query,"query option is required. You must specify your GraphQL document in the query option."):Iu(e.query,14),__DEV__?Iu("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):Iu("Document"===e.query.kind,15),__DEV__?Iu(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):Iu(!e.returnPartialData,16),__DEV__?Iu(!e.pollInterval,"pollInterval option only supported on watchQuery."):Iu(!e.pollInterval,17),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Du("Store reset while query was in flight (not completed in link chain)"):new Du(18)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=pm.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):uf(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):uf(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e)return void n.set(i,a);var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}})),i.size&&i.forEach((function(e){var r=Dd("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new bm({queryManager:t,queryInfo:i,options:_u(_u({},e),{fetchPolicy:"network-only"})});Iu(a.queryId===r),i.setObservableQuery(a),n.set(r,a)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&Iu.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var l=function(e){return t.getObservableFromLink(n,s,e).map((function(a){if("no-cache"!==r&&(Cm(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Cd(a))throw new Hd({graphQLErrors:a.errors});return a}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,a,s).then(l);return new fd((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return l(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var l=this.inFlightLinkObservables,u=this.link,c={query:s,variables:n,operationName:Sf(s)||void 0,context:this.prepareContext(_u(_u({},t),{forceFetch:!r}))};if(t=c.context,r){var f=l.get(s)||new Map;l.set(s,f);var d=Rh(n);if(!(a=f.get(d))){var p=new Td([op(u,c)]);f.set(d,a=p),p.cleanup((function(){f.delete(d)&&f.size<1&&l.delete(s)}))}}else a=new Td([op(u,c)])}else a=new Td([fd.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(a=wd(a,(function(e){return o.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})}))),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return wd(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var a=Od(i.errors);if(r>=e.lastRequestId){if(a&&"none"===n.errorPolicy)throw e.markError(new Hd({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var o={data:i.data,loading:!1,networkStatus:e.networkStatus||pm.ready};return a&&"ignore"!==n.errorPolicy&&(o.errors=i.errors),o}),(function(t){var n=Kd(t)?t:new Hd({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=pm.loading);var i=this.transform(t.query).document,a=this.getVariables(i,t.variables),o=this.getQuery(e),s=t.fetchPolicy,l=void 0===s?"cache-first":s,u=t.errorPolicy,c=void 0===u?"none":u,f=t.returnPartialData,d=void 0!==f&&f,p=t.notifyOnNetworkStatusChange,h=void 0!==p&&p,m=t.context,v=void 0===m?{}:m,y=Object.assign({},t,{query:i,variables:a,fetchPolicy:l,errorPolicy:c,returnPartialData:d,notifyOnNetworkStatusChange:h,context:v}),g=function(e){return y.variables=e,r.fetchQueryByPolicy(o,y,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new Td(this.transform(y.query).hasClientExports?this.localState.addExportedVariables(y.query,y.variables,y.context).then(g):g(y.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),km(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?Dd("refetchQueries"):void 0:o,l=e.onQueryUpdated,u=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){u.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var c=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof Om&&e.watcher.observableQuery;if(r){if(l){u.delete(r.queryId);var i=l(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&c.set(r,i),i}null!==l&&u.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),u.size&&u.forEach((function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(l){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=l(i,o,a)}l&&!0!==r||(r=i.refetch()),!1!==r&&c.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),c},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,l=t.errorPolicy,u=t.returnPartialData,c=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:i,variables:a,networkStatus:n});var p=function(){return e.getDiff(a)},h=function(t,n){void 0===n&&(n=e.networkStatus||pm.loading);var o=t.result;!__DEV__||u||zd(o,{})||Em(t.missing);var s=function(e){return fd.of(_u({data:e,loading:mm(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:c,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(o)},m="no-cache"===o?0:n===pm.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,m,{variables:a,context:c,fetchPolicy:o,errorPolicy:l})},y=f&&"number"==typeof d&&d!==n&&mm(n);switch(o){default:case"cache-first":return(g=p()).complete?[h(g,e.markReady())]:u||y?[h(g),v()]:[v()];case"cache-and-network":var g;return(g=p()).complete||u||y?[h(g),v()]:[v()];case"cache-only":return[h(p(),e.markReady())];case"network-only":return y?[h(p()),v()]:[v()];case"no-cache":return y?[h(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new Om(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return _u(_u({},t),{clientAwareness:this.clientAwareness})},e}(),Dm=!1;function Im(e,t){return Nd(e,t,t.variables&&{variables:_u(_u({},e.variables),t.variables)})}var Am=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,l=e.ssrForceFetchDelay,u=void 0===l?0:l,c=e.connectToDevTools,f=void 0===c?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:c,d=e.queryDeduplication,p=void 0===d||d,h=e.defaultOptions,m=e.assumeImmutableResults,v=void 0!==m&&m,y=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,w=e.name,E=e.version,k=e.link;if(k||(k=n?new wp({uri:n,credentials:r,headers:i}):tp.empty()),!a)throw __DEV__?new Du("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Du(7);if(this.link=k,this.cache=a,this.disableNetworkFetches=s||u>0,this.queryDeduplication=p,this.defaultOptions=h||{},this.typeDefs=g,u&&setTimeout((function(){return t.disableNetworkFetches=!1}),u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Dm&&__DEV__&&(Dm=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var _=window.navigator,S=_&&_.userAgent,x=void 0;"string"==typeof S&&(S.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":S.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Iu.log("Download the Apollo DevTools for a better development experience: "+x)}this.version="3.5.5",this.localState=new _m({cache:a,client:this,resolvers:y,fragmentMatcher:b}),this.queryManager=new Rm({cache:this.cache,link:this.link,queryDeduplication:p,ssrMode:s,clientAwareness:{name:w,version:E},localState:this.localState,assumeImmutableResults:v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Im(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=_u(_u({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Im(this.defaultOptions.query,e)),__DEV__?Iu("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):Iu("cache-and-network"!==e.fetchPolicy,8),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=_u(_u({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Im(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return op(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&Iu.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Pm=new Map,Fm=new Map,Mm=!0,Lm=!1;function qm(e){return e.replace(/[\s,]+/g," ").trim()}function jm(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=qm((o=e.loc).source.body.substring(o.start,o.end)),a=Fm.get(r);a&&!a.has(i)?Mm&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||Fm.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),_u(_u({},e),{definitions:n})}function Vm(e){var t=qm(e);if(!Pm.has(t)){var n=function(e,t){return new Vc(e,t).parseDocument()}(e,{experimentalFragmentVariables:Lm,allowLegacyFragmentVariables:Lm});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");Pm.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(jm(n)))}return Pm.get(t)}function zm(e){for(var t=[],n=1;n0?new Hd({graphQLErrors:f}):void 0;if(s===o.current.mutationId&&!l.ignoreResults){var p={called:!0,loading:!1,data:c,error:d,client:n};o.current.isMounted&&!zd(o.current.result,p)&&a(o.current.result=p)}return null===(t=i.onCompleted)||void 0===t||t.call(i,e.data),null===(u=r.onCompleted)||void 0===u||u.call(r,e.data),e})).catch((function(e){var t,u;if(s===o.current.mutationId&&o.current.isMounted){var c={loading:!1,error:e,data:void 0,called:!0,client:n};zd(o.current.result,c)||a(o.current.result=c)}if(i.onError||l.onError)return null===(t=i.onError)||void 0===t||t.call(i,e),null===(u=r.onError)||void 0===u||u.call(r,e),{data:void 0,errors:e};throw e}))}),o.current.execute}),[n,e,t]),l=u.useCallback((function(){a({called:!1,loading:!1,client:n})}),[]);return u.useEffect((function(){return function(){o.current.isMounted=!1}}),[]),[s,_u({reset:l},i)]}var sv=Object.freeze({__proto__:null,ApolloClient:Am,mergeOptions:Im,ObservableQuery:bm,applyNextFetchPolicy:km,get NetworkStatus(){return pm},isApolloError:Kd,ApolloError:Hd,get Cache(){return ah},ApolloCache:oh,InMemoryCache:hm,MissingFieldError:sh,defaultDataIdFromObject:uh,makeVar:jh,fromError:Yd,toPromise:function(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t?__DEV__&&Iu.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,n(e))},error:r})}))},fromPromise:function(e){return new fd((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))},throwServerError:Gd,Observable:fd,isReference:ff,makeReference:cf,get gql(){return zm},resetCaches:$m,disableFragmentWarnings:Qm,enableExperimentalFragmentVariables:Um,disableExperimentalFragmentVariables:Bm,empty:np,from:rp,split:ip,concat:ap,execute:op,ApolloLink:tp,parseAndCheckHttpResponse:lp,serializeFetchParameter:up,fallbackHttpConfig:cp,defaultPrinter:fp,selectHttpOptionsAndBody:function(e,t){for(var n=[],r=2;r.'):Iu(t&&t.client,25),e.children(t.client)}))},getApolloContext:Ad,resetApolloContext:Ad,get DocumentType(){return Km},operationName:ev,parser:tv,useApolloClient:Fd,useLazyQuery:function(e,t){var n=u.useState({called:!1,resolves:[]}),r=n[0],i=n[1],a=u.useCallback((function(e){var t,n=new Promise((function(e){return t=e}));return i((function(n){return n.called&&o&&o.refetch(null==e?void 0:e.variables),{called:!0,resolves:Ou(Ou([],n.resolves,!0),[t],!1),options:e}})),n}),[]),o=rv(e,_u(_u(_u({},t),r.options),{fetchPolicy:r.called?null==t?void 0:t.fetchPolicy:"standby",skip:void 0}));if(u.useEffect((function(){var e=r.resolves;!o.loading&&e.length&&(i((function(e){return _u(_u({},e),{resolves:[]})})),e.forEach((function(e){return e(o)})))}),[o,r]),!r.called){o=_u(_u({},o),{loading:!1,data:void 0,error:void 0,called:!1});for(var s=function(e){var t=o[e];o[e]=function(){for(var e=[],n=0;n{switch(t.type){case uv.ActionTypes.REQUEST:return e+1;case uv.ActionTypes.ERROR:case uv.ActionTypes.SUCCESS:case uv.ActionTypes.CANCEL:return Math.max(e-1,0);default:return e}},fv=(e,t)=>{switch(t.type){case uv.ActionTypes.REQUEST:return[];case uv.ActionTypes.ERROR:const{networkError:n}=t.payload;return[n];case uv.ActionTypes.SUCCESS:const{result:r}=t.payload;return!0===(null!=r&&null!=r.errors)?[...r.errors]:e;default:return e}};var dv="3.3.0",pv="https://github.com/electerious/Ackee",hv=(e,t)=>({get:()=>{const n=localStorage.getItem(e);return null==n?t:JSON.parse(n)},set:t=>{const n=JSON.stringify(t);return localStorage.setItem(e,n),t},reset:()=>(localStorage.removeItem(e),t)});const mv=Symbol(),vv=Symbol(),{get:yv,set:gv,reset:bv}=hv("ackee_token_3.3.0"),wv=(e,t)=>{switch(t.type){case mv:return gv(t.token);case vv:return bv();default:return e}};var Ev=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,a=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=a||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=_u({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new fd((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),a=[],o=[],s=[],l=[];n.forEach((function(e,t){a.push(e.observable),o.push(e.next),s.push(e.error),l.push(e.complete)}));var u=this.batchHandler(r,i)||fd.of(),c=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return u.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),o.length!==e.length){var t=new Error("server returned results with length ".concat(e.length,", expected length of ").concat(o.length));return t.result=e,c(t)}e.forEach((function(e,t){o[t]&&o[t].forEach((function(t){return t(e)}))}))},error:c,complete:function(){l.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),a}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),kv=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,a=r.batchInterval,o=void 0===a?10:a,s=r.batchMax,l=void 0===s?0:s,u=r.batchHandler,c=void 0===u?function(){return null}:u,f=r.batchKey,d=void 0===f?function(){return""}:f;return n.batcher=new Ev({batchDebounce:i,batchInterval:o,batchMax:l,batchHandler:c,batchKey:d}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return ku(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(tp),_v=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,a=void 0===i?"/graphql":i,o=r.fetch,s=r.print,l=void 0===s?fp:s,u=r.includeExtensions,c=r.batchInterval,f=r.batchDebounce,d=r.batchMax,p=r.batchKey,h=Su(r,["uri","fetch","print","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);hp(o),o||(o=fetch);var m={http:{includeExtensions:u},options:h.fetchOptions,credentials:h.credentials,headers:h.headers};n.batchDebounce=f,n.batchInterval=c||10,n.batchMax=d||10;return p=p||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return vp(e,a)+JSON.stringify(n)},n.batcher=new kv({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:p,batchHandler:function(e){var t=vp(e[0],a),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,u=i.version;s&&(r["apollographql-client-name"]=s),u&&(r["apollographql-client-version"]=u)}var c,f={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:_u(_u({},r),n.headers)},d=e.map((function(e){return dp(e,l,cp,m,f)})),p=d.map((function(e){return e.body})),h=d[0].options;if("GET"===h.method)return Yd(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=up(p,"Payload")}catch(e){return Yd(e)}if(!h.signal){var v=mp(),y=v.controller,g=v.signal;(c=y)&&(h.signal=g)}return new fd((function(n){return o(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(lp(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){c&&c.abort()}}))}}),n}return ku(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(tp),Sv=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function xv(){return xv=Object.assign||function(e){for(var t=1;t(Array.isArray(o)?o.length-1:0)))return a=Array.isArray(o)?o[i]:o,r&&(n[t]=i+1),a;if(r)throw new Error("too few values provided for key `"+t+"`")}else if(r)throw new Error("no values provided for key `"+t+"`")},n=function(e,t,r){var i,a;if(Array.isArray(e)){for(i=-1,a=e.length;++i!0===Wv.some((t=>null!=t.pattern.match(e)))?e:Kv.pattern.stringify();var Yv=()=>{const e=u.useMemo((()=>function(e){function t(){var e=Dv(s.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=l.state||{};return[r.idx,{pathname:void 0===t?"/":t,search:void 0===n?"":n,hash:void 0===e?"":e,state:r.usr||null,key:r.key||"default"}]}function n(){if(u)h.call(u),u=null;else{var e=Tv.Pop,n=t(),r=n[0];if(n=n[1],h.length){if(null!=r){var i=f-r;i&&(u={action:e,location:n,retry:function(){o(-1*i)}},o(i))}}else a(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=s.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:Rv(e))}function i(e,t){return void 0===t&&(t=null),xv({pathname:d.pathname,hash:"",search:""},"string"==typeof e?Dv(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),f=e[0],d=e[1],p.call({action:c,location:d})}function o(e){l.go(e)}void 0===e&&(e={});var s=void 0===(e=e.window)?document.defaultView:e,l=s.history,u=null;s.addEventListener("popstate",n),s.addEventListener("hashchange",(function(){Rv(t()[1])!==Rv(d)&&n()}));var c=Tv.Pop,f=(e=t())[0],d=e[1],p=Nv(),h=Nv();return null==f&&(f=0,l.replaceState(xv({},l.state,{idx:f}),"")),{get action(){return c},get location(){return d},createHref:r,push:function e(t,n){var o=Tv.Push,u=i(t,n);if(!h.length||(h.call({action:o,location:u,retry:function(){e(t,n)}}),0)){var c=[{usr:u.state,key:u.key,idx:f+1},r(u)];u=c[0],c=c[1];try{l.pushState(u,"",c)}catch(e){s.location.assign(c)}a(o)}},replace:function e(t,n){var o=Tv.Replace,s=i(t,n);h.length&&(h.call({action:o,location:s,retry:function(){e(t,n)}}),1)||(s=[{usr:s.state,key:s.key,idx:f},r(s)],l.replaceState(s[0],"",s[1]),a(o))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return p.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&s.addEventListener("beforeunload",Cv),function(){t(),h.length||s.removeEventListener("beforeunload",Cv)}}}}()),[]),[t,n]=u.useState(Hv(e.location));u.useEffect((()=>e.listen((({location:e})=>{n(Hv(e))}))),[e]);return{setRoute:u.useCallback((t=>{e.push({pathname:t})}),[e]),route:t}},Gv=1;var Jv,Xv,Zv,ey={nextValue:function(){return(Gv=(9301*Gv+49297)%233280)/233280},seed:function(e){Gv=e}},ty="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function ny(){Zv=!1}function ry(e){if(e){if(e!==Jv){if(e.length!==ty.length)throw new Error("Custom alphabet for shortid must be "+ty.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+ty.length+" unique characters. These characters were not unique: "+t.join(", "));Jv=e,ny()}}else Jv!==ty&&(Jv=ty,ny())}function iy(){return Zv||(Zv=function(){Jv||ry(ty);for(var e,t=Jv.split(""),n=[],r=ey.nextValue();t.length>0;)r=ey.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}(),Zv)}var ay={get:function(){return Jv||ty},characters:function(e){return ry(e),Jv},seed:function(e){ey.seed(e),Xv!==e&&(ny(),Xv=e)},lookup:function(e){return iy()[e]},shuffled:iy},oy="object"==typeof window&&(window.crypto||window.msCrypto),sy=oy&&oy.getRandomValues?function(e){return oy.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=fy(uy)),t+=fy(n)};var py=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+ay.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},hy=n((function(e){var t=0;function n(){return dy(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return ay.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&ay.characters(e),ay.shuffled()},e.exports.isValid=py})),my=hy,vy=()=>`_${my.generate()}`;const yy=Symbol(),gy=Symbol(),by=Symbol(),wy={},Ey=(e,t)=>{switch(t.type){case yy:return{...e,[t.modalId]:{id:t.modalId,type:t.payload.type,props:t.payload.props}};case gy:const n={...e};return delete n[t.modalId],n;case by:return wy;default:return e}};var ky="TOP",_y="NEW",Sy="RECENT";var xy="LAST_24_HOURS",Ty="LAST_7_DAYS",Oy="LAST_30_DAYS",Cy="LAST_6_MONTHS";var Ny="DAILY",Ry="MONTHLY",Dy="YEARLY";var Iy="UNIQUE",Ay="TOTAL";var Py="WITH_SOURCE",Fy="NO_SOURCE",My="ONLY_SOURCE";var Ly="WITH_MODEL",qy="NO_MODEL";var jy="WITH_VERSION",Vy="NO_VERSION";var zy="BROWSER_HEIGHT",$y="BROWSER_RESOLUTION",Qy="BROWSER_WIDTH",Uy="SCREEN_HEIGHT",By="SCREEN_RESOLUTION",Wy="SCREEN_WIDTH";var Ky="WITH_VERSION",Hy="NO_VERSION";const Yy=Symbol(),Gy=Symbol(),Jy=Symbol(),Xy=Symbol(),Zy=Symbol(),eg=Symbol(),tg=Symbol(),ng=Symbol(),rg=Symbol(),ig=Symbol(),{get:ag,set:og,reset:sg}=hv("ackee_filter_3.3.0",{sorting:ky,range:Ty,interval:Ny,viewsType:Iy,referrersType:Py,devicesType:Ly,browsersType:jy,sizesType:$y,systemsType:Ky}),lg=(e,t)=>{switch(t.type){case Yy:return og({...e,sorting:t.payload});case Gy:return og({...e,range:t.payload});case Jy:return og({...e,interval:t.payload});case Xy:return og({...e,viewsType:t.payload});case Zy:return og({...e,referrersType:t.payload});case eg:return og({...e,devicesType:t.payload});case tg:return og({...e,browsersType:t.payload});case ng:return og({...e,sizesType:t.payload});case rg:return og({...e,systemsType:t.payload});case ig:return sg();default:return e}};const ug=["Token invalid","Token missing","Username or password incorrect"];var cg=e=>!0===ug.includes(e.message),fg="function"==typeof Symbol&&Symbol.for,dg=fg?Symbol.for("react.element"):60103,pg=fg?Symbol.for("react.portal"):60106,hg=fg?Symbol.for("react.fragment"):60107,mg=fg?Symbol.for("react.strict_mode"):60108,vg=fg?Symbol.for("react.profiler"):60114,yg=fg?Symbol.for("react.provider"):60109,gg=fg?Symbol.for("react.context"):60110,bg=fg?Symbol.for("react.async_mode"):60111,wg=fg?Symbol.for("react.concurrent_mode"):60111,Eg=fg?Symbol.for("react.forward_ref"):60112,kg=fg?Symbol.for("react.suspense"):60113,_g=fg?Symbol.for("react.suspense_list"):60120,Sg=fg?Symbol.for("react.memo"):60115,xg=fg?Symbol.for("react.lazy"):60116,Tg=fg?Symbol.for("react.block"):60121,Og=fg?Symbol.for("react.fundamental"):60117,Cg=fg?Symbol.for("react.responder"):60118,Ng=fg?Symbol.for("react.scope"):60119;function Rg(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case dg:switch(e=e.type){case bg:case wg:case hg:case vg:case mg:case kg:return e;default:switch(e=e&&e.$$typeof){case gg:case Eg:case xg:case Sg:case yg:return e;default:return t}}case pg:return t}}}function Dg(e){return Rg(e)===wg}var Ig={AsyncMode:bg,ConcurrentMode:wg,ContextConsumer:gg,ContextProvider:yg,Element:dg,ForwardRef:Eg,Fragment:hg,Lazy:xg,Memo:Sg,Portal:pg,Profiler:vg,StrictMode:mg,Suspense:kg,isAsyncMode:function(e){return Dg(e)||Rg(e)===bg},isConcurrentMode:Dg,isContextConsumer:function(e){return Rg(e)===gg},isContextProvider:function(e){return Rg(e)===yg},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===dg},isForwardRef:function(e){return Rg(e)===Eg},isFragment:function(e){return Rg(e)===hg},isLazy:function(e){return Rg(e)===xg},isMemo:function(e){return Rg(e)===Sg},isPortal:function(e){return Rg(e)===pg},isProfiler:function(e){return Rg(e)===vg},isStrictMode:function(e){return Rg(e)===mg},isSuspense:function(e){return Rg(e)===kg},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===hg||e===wg||e===vg||e===mg||e===kg||e===_g||"object"==typeof e&&null!==e&&(e.$$typeof===xg||e.$$typeof===Sg||e.$$typeof===yg||e.$$typeof===gg||e.$$typeof===Eg||e.$$typeof===Og||e.$$typeof===Cg||e.$$typeof===Ng||e.$$typeof===Tg)},typeOf:Rg}; + ***************************************************************************** */function ku(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Eu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _u=function(){return _u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=Pu){var t=console[e]||console.log;return t.apply(console,arguments)}}}function Mu(e){try{return e()}catch(e){}}!function(e){e.debug=Fu("debug"),e.log=Fu("log"),e.warn=Fu("warn"),e.error=Fu("error")}(Iu||(Iu={}));var Lu=Mu((function(){return globalThis}))||Mu((function(){return window}))||Mu((function(){return self}))||Mu((function(){return global}))||Mu((function(){return Function("return this")()})),qu="__",ju=[qu,qu].join("DEV");var Vu=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(Lu,ju,{value:"production"!==Mu((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),Lu[ju]}}();function zu(e){try{return e()}catch(e){}}var $u=zu((function(){return globalThis}))||zu((function(){return window}))||zu((function(){return self}))||zu((function(){return global}))||zu((function(){return Function("return this")()})),Qu=!1;function Uu(){Qu&&(delete $u.process,Qu=!1)}function Bu(e){return Bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(e)}!$u||zu((function(){return"production"}))||zu((function(){return process}))||(Object.defineProperty($u,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Qu=!0);var Wu="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function Ku(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index120){for(var d=Math.floor(l/80),p=l%80,h=[],m=0;m0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=a&&a.stack?(Object.defineProperty(rc(d),"stack",{value:a.stack,writable:!0,configurable:!0}),nc(d)):(Error.captureStackTrace?Error.captureStackTrace(rc(d),s):Object.defineProperty(rc(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return r=s,(i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function bc(e){return bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bc(e)}function wc(e){return Ec(e,[])}function Ec(e,t){switch(bc(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(pc)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:Ec(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],a=0;a1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";var r=n.map((function(n){return n+": "+Ec(e[n],t)}));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function kc(e,t){if(!Boolean(e))throw new Error(t)}function _c(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||kc(0,"Body must be a string. Received: ".concat(wc(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||kc(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||kc(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:Wu,get:function(){return"Source"}}])&&_c(t.prototype,n),r&&_c(t,r),e}();var xc=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Tc(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;oi&&Oc(t[a-1]);)--a;return t.slice(i,a).join("\n")}function Oc(e){for(var t=0;t31||9===a));return new vc(gc.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function Ac(e,t,n,r,i,a){var o=e.body,s=n,l=t,u=!1;if(45===s&&(s=o.charCodeAt(++l)),48===s){if((s=o.charCodeAt(++l))>=48&&s<=57)throw fc(e,l,"Invalid number, unexpected digit after 0: ".concat(Nc(s),"."))}else l=Pc(e,l,s),s=o.charCodeAt(l);if(46===s&&(u=!0,s=o.charCodeAt(++l),l=Pc(e,l,s),s=o.charCodeAt(l)),69!==s&&101!==s||(u=!0,43!==(s=o.charCodeAt(++l))&&45!==s||(s=o.charCodeAt(++l)),l=Pc(e,l,s),s=o.charCodeAt(l)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw fc(e,l,"Invalid number, expected digit but got: ".concat(Nc(s),"."));return new vc(u?gc.FLOAT:gc.INT,t,l,r,i,a,o.slice(t,l))}function Pc(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw fc(e,i,"Invalid number, expected digit but got: ".concat(Nc(a),"."))}function Fc(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,l=0,u="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function jc(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,l=0;s!==o&&!isNaN(l=a.charCodeAt(s))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++s;return new vc(gc.NAME,t,s,n,r,i,a.slice(t,s))}var Vc=function(){function e(e,t){var n=function(e){return e instanceof Sc}(e)?e:new Sc(e);this._lexer=new Cc(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(gc.NAME);return{kind:dc.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:dc.DOCUMENT,definitions:this.many(gc.SOF,this.parseDefinition,gc.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(gc.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(gc.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(gc.BRACE_L))return{kind:dc.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(gc.NAME)&&(t=this.parseName()),{kind:dc.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(gc.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(gc.PAREN_L,this.parseVariableDefinition,gc.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:dc.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(gc.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(gc.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(gc.DOLLAR),{kind:dc.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:dc.SELECTION_SET,selections:this.many(gc.BRACE_L,this.parseSelection,gc.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(gc.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(gc.COLON)?(e=r,t=this.parseName()):t=r,{kind:dc.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(gc.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(gc.PAREN_L,t,gc.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(gc.COLON),{kind:dc.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:dc.ARGUMENT,name:this.parseName(),value:(this.expectToken(gc.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(gc.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(gc.NAME)?{kind:dc.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:dc.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:dc.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:dc.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case gc.BRACKET_L:return this.parseList(e);case gc.BRACE_L:return this.parseObject(e);case gc.INT:return this._lexer.advance(),{kind:dc.INT,value:t.value,loc:this.loc(t)};case gc.FLOAT:return this._lexer.advance(),{kind:dc.FLOAT,value:t.value,loc:this.loc(t)};case gc.STRING:case gc.BLOCK_STRING:return this.parseStringLiteral();case gc.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:dc.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:dc.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:dc.NULL,loc:this.loc(t)};default:return{kind:dc.ENUM,value:t.value,loc:this.loc(t)}}case gc.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:dc.STRING,value:e.value,block:e.kind===gc.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:dc.LIST,values:this.any(gc.BRACKET_L,(function(){return t.parseValueLiteral(e)}),gc.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:dc.OBJECT,fields:this.any(gc.BRACE_L,(function(){return t.parseObjectField(e)}),gc.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(gc.COLON),{kind:dc.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(gc.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(gc.AT),{kind:dc.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(gc.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(gc.BRACKET_R),e={kind:dc.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(gc.BANG)?{kind:dc.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:dc.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===gc.NAME)switch(e.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()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(gc.STRING)||this.peek(gc.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(gc.BRACE_L,this.parseOperationTypeDefinition,gc.BRACE_R);return{kind:dc.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(gc.COLON);var n=this.parseNamedType();return{kind:dc.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:dc.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:dc.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(gc.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(gc.AMP)||this.peek(gc.NAME));return t}return this.delimitedMany(gc.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(gc.BRACE_L)&&this._lexer.lookahead().kind===gc.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(gc.BRACE_L,this.parseFieldDefinition,gc.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(gc.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:dc.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(gc.PAREN_L,this.parseInputValueDef,gc.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(gc.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(gc.EQUALS)&&(r=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:dc.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:dc.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:dc.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(gc.EQUALS)?this.delimitedMany(gc.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:dc.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(gc.BRACE_L,this.parseEnumValueDefinition,gc.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:dc.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:dc.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(gc.BRACE_L,this.parseInputValueDef,gc.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===gc.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)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(gc.BRACE_L,this.parseOperationTypeDefinition,gc.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:dc.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:dc.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:dc.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:dc.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:dc.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(gc.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:dc.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(gc.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==xc[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new mc(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw fc(this._lexer.source,t.start,"Expected ".concat($c(e),", found ").concat(zc(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==gc.NAME||t.value!==e)throw fc(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(zc(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===gc.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return fc(this._lexer.source,t.start,"Unexpected ".concat(zc(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function zc(e){var t=e.value;return $c(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function $c(e){return function(e){return e===gc.BANG||e===gc.DOLLAR||e===gc.AMP||e===gc.PAREN_L||e===gc.PAREN_R||e===gc.SPREAD||e===gc.COLON||e===gc.EQUALS||e===gc.AT||e===gc.BRACKET_L||e===gc.BRACKET_R||e===gc.BRACE_L||e===gc.PIPE||e===gc.BRACE_R}(e)?'"'.concat(e,'"'):e}var Qc={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Uc=Object.freeze({});function Bc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qc,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],l=void 0,u=void 0,c=void 0,f=[],d=[],p=e;do{var h=++o===a.length,m=h&&0!==s.length;if(h){if(u=0===d.length?void 0:f[f.length-1],l=c,c=d.pop(),m){if(i)l=l.slice();else{for(var v={},y=0,g=Object.keys(l);y80&&(s=o+Xc("(\n",Zc(Gc(r,"\n")),"\n)")),Gc([s,Gc(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+Xc(" ",Gc(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Gc(["...",Xc("on ",t),Gc(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(Xc("(",Gc(r,", "),")")," ")+"on ".concat(n," ").concat(Xc("",Gc(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,l="";return!s||r&&i||(l+="\n"+t),l+=t?e.replace(/\n/g,"\n"+t):e,s&&(l+="\n"),'"""'+l.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Gc(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Gc(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+Xc("(",Gc(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:Yc((function(e){var t=e.directives,n=e.operationTypes;return Gc(["schema",Gc(t," "),Jc(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:Yc((function(e){return Gc(["scalar",e.name,Gc(e.directives," ")]," ")})),ObjectTypeDefinition:Yc((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["type",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")})),FieldDefinition:Yc((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(tf(n)?Xc("(\n",Zc(Gc(n,"\n")),"\n)"):Xc("(",Gc(n,", "),")"))+": "+r+Xc(" ",Gc(i," "))})),InputValueDefinition:Yc((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Gc([t+": "+n,Xc("= ",r),Gc(i," ")]," ")})),InterfaceTypeDefinition:Yc((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["interface",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")})),UnionTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.types;return Gc(["union",t,Gc(n," "),r&&0!==r.length?"= "+Gc(r," | "):""]," ")})),EnumTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.values;return Gc(["enum",t,Gc(n," "),Jc(r)]," ")})),EnumValueDefinition:Yc((function(e){return Gc([e.name,Gc(e.directives," ")]," ")})),InputObjectTypeDefinition:Yc((function(e){var t=e.name,n=e.directives,r=e.fields;return Gc(["input",t,Gc(n," "),Jc(r)]," ")})),DirectiveDefinition:Yc((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(tf(n)?Xc("(\n",Zc(Gc(n,"\n")),"\n)"):Xc("(",Gc(n,", "),")"))+(r?" repeatable":"")+" on "+Gc(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Gc(["extend schema",Gc(t," "),Jc(n)]," ")},ScalarTypeExtension:function(e){return Gc(["extend scalar",e.name,Gc(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["extend type",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Gc(["extend interface",t,Xc("implements ",Gc(n," & ")),Gc(r," "),Jc(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Gc(["extend union",t,Gc(n," "),r&&0!==r.length?"= "+Gc(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Gc(["extend enum",t,Gc(n," "),Jc(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Gc(["extend input",t,Gc(n," "),Jc(r)]," ")}};function Yc(e){return function(t){return Gc([t.description,e(t)],"\n")}}function Gc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Jc(e){return Xc("{\n",Zc(Gc(e,"\n")),"\n}")}function Xc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function Zc(e){return Xc(" ",e.replace(/\n/g,"\n "))}function ef(e){return-1!==e.indexOf("\n")}function tf(e){return null!=e&&e.some(ef)}function nf(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?Iu(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):Iu(n&&1===n.length,38);var i=n[0];__DEV__?Iu(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):Iu(i.name&&"if"===i.name.value,39);var a=i.value;__DEV__?Iu(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):Iu(a&&("Variable"===a.kind||"BooleanValue"===a.kind),40),t.push({directive:e,ifArgument:i})}}));return t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?Iu(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):Iu(void 0!==i,37)):i=r.value.value,"skip"===n.name.value?!i:i}))}function rf(e,t){return function(e){var t=[];return Bc(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function af(e){return e&&rf(["client"],e)&&rf(["export"],e)}function of(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new Du("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new Du(41);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?Iu(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):Iu(1===r.length,42),n=r[0].name.value),_u(_u({},e),{definitions:Ou([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function sf(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function lf(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?Iu(n,"No fragment named ".concat(e.name.value,".")):Iu(n,43),n;default:return null}}function uf(e){return null!==e&&"object"==typeof e}function cf(e){return{__ref:String(e)}}function ff(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function df(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return df(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return df(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new Du('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new Du(52);e[t.value]=null}}Uu(),__DEV__?Iu("boolean"==typeof Vu,Vu):Iu("boolean"==typeof Vu,36);var pf=["connection","include","skip","client","rest","export"],hf=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),"".concat(n.connection.key,"(").concat(mf(i),")")}return n.connection.key}var a=e;if(t){var o=mf(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach((function(e){-1===pf.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(mf(n[e]),")"):a+="@".concat(e))})),a}),{setStringify:function(e){var t=mf;return mf=e,t}}),mf=function(e){return JSON.stringify(e,vf)};function vf(e,t){return uf(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function yf(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return df(n,r,i,t)})),n}return null}function gf(e){return e.alias?e.alias.value:e.name.value}function bf(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r1)for(var r=new Qf,i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1,i=!1,a=arguments[1],o=a;return new n((function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r=0&&i.splice(e,1),o()}});i.push(a)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),a.unsubscribe()}}))},t[Xf]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=ed(t,Xf);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return nd(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(Yf("iterator")&&(r=ed(t,Jf)))return new n((function(e){id((function(){if(!e.closed){for(var n,i=Uf(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){id((function(){if(!e.closed){for(var n=0;n0}function Cd(e){return e.errors&&e.errors.length>0||!1}function Nd(){for(var e=[],t=0;t, or pass an ApolloClientApolloClient instance in via options.'):Iu(!!n,29),n}var Md=Object.prototype,Ld=Md.toString,qd=Md.hasOwnProperty,jd=Function.prototype.toString,Vd=new Map;function zd(e,t){try{return $d(e,t)}finally{Vd.clear()}}function $d(e,t){if(e===t)return!0;var n,r,i,a=Ld.call(e);if(a!==Ld.call(t))return!1;switch(a){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Wd(e,t))return!0;var o=Qd(e),s=Qd(t),l=o.length;if(l!==s.length)return!1;for(var u=0;u=0&&n.indexOf(r,i)===i))}return!1}function Qd(e){return Object.keys(e).filter(Ud,e)}function Ud(e){return void 0!==this[e]}var Bd="{ [native code] }";function Wd(e,t){var n=Vd.get(e);if(n){if(n.has(t))return!0}else Vd.set(e,n=new Set);return n.add(t),!1}function Kd(e){return e.hasOwnProperty("graphQLErrors")}var Hd=function(e){function t(n){var r,i,a=n.graphQLErrors,o=n.clientErrors,s=n.networkError,l=n.errorMessage,u=n.extraInfo,c=e.call(this,l)||this;return c.graphQLErrors=a||[],c.clientErrors=o||[],c.networkError=s||null,c.message=l||(i="",(Od((r=c).graphQLErrors)||Od(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),r.networkError&&(i+="".concat(r.networkError.message,"\n")),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return ku(t,e),t}(Error);function Yd(e){return new fd((function(t){t.error(e)}))}var Gd=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r};function Jd(e,t){return t?t(e):fd.of()}function Xd(e){return"function"==typeof e?new tp(e):e}function Zd(e){return e.request.length<=1}var ep=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ku(t,e),t}(Error),tp=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return fd.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(Xd).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=Xd(n),a=Xd(r||new e(Jd));return Zd(i)&&Zd(a)?new e((function(e){return t(e)?i.request(e)||fd.of():a.request(e)||fd.of()})):new e((function(e,n){return t(e)?i.request(e,n)||fd.of():a.request(e,n)||fd.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=_u({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=_u(_u({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return _u({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Sf(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n=300&&Gd(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||sp.call(n,"data")||sp.call(n,"errors")||Gd(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),n}))}}var up=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new Du("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new Du(21);throw r.parseError=e,r}return n},cp={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},fp=function(e,t){return t(e)};function dp(e,t){for(var n=[],r=2;rthis.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Fp=new Dp,Mp=Object.prototype.hasOwnProperty,Lp=void 0===(Ap=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Ap;function qp(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var jp=[];function Vp(e,t){if(!e)throw new Error(t||"assertion failure")}function zp(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var $p=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Bp(this))return Qp(this),this.value[0]},e.prototype.recompute=function(e){return Vp(!this.recomputing,"already recomputing"),Qp(this),Bp(this)?function(e,t){Xp(e),Fp.withValue(e,Up,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{qp(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,Bp(e))return;Kp(e)}(e);return zp(e.value)}(this,e):zp(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Wp(this),qp(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),Xp(this),Hp(this,(function(t,n){t.setDirty(),Zp(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=jp.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Lp(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),jp.push(this.deps),this.deps=null)},e.count=0,e}();function Qp(e){var t=Fp.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Bp(e)?Yp(t,e):Gp(t,e),t}function Up(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Bp(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Wp(e){Hp(e,Yp)}function Kp(e){Hp(e,Gp)}function Hp(e,t){var n=e.parents.size;if(n)for(var r=Lp(e.parents),i=0;i0&&n===t.length&&e[n-1]===t[n-1]}(n,t.value)||e.setDirty(),Jp(e,t),Bp(e)||Kp(e)}function Jp(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(jp.length<100&&jp.push(n),e.dirtyChildren=null))}function Xp(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Zp(e,n)})),e.forgetDeps(),Vp(null===e.dirtyChildren)}function Zp(e,t){t.parents.delete(e),e.childValues.delete(t),Jp(e,t)}var eh={setDirty:!0,dispose:!0,forget:!0};function th(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Fp.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(qp(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Mp.call(eh,n)?n:"setDirty";Lp(r).forEach((function(e){return e[i]()})),t.delete(e),qp(r)}},r}function nh(){var e=new xp("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}nh();var rh=new Set;function ih(e,t){void 0===t&&(t=Object.create(null));var n=new Pp(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||nh(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new $p(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rh.add(n),Fp.hasValue()||(rh.forEach((function(e){return e.clean()})),rh.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function l(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=l,a.forget=function(){return l(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var ah,oh=function(){function e(){this.getFragmentDoc=ih(of)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(_u(_u({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(_u(_u({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=Su(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=Su(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery(_u(_u({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment(_u(_u({},e),{data:i})),i)}})},e}();ah||(ah={});var sh=function(e,t,n,r){this.message=e,this.path=t,this.query=n,this.variables=r},lh=Object.prototype.hasOwnProperty;function uh(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ch={dataIdFromObject:uh,addTypename:!0,resultCaching:!0,canonizeResults:!1};function fh(e){var t=e.canonizeResults;return void 0===t?ch.canonizeResults:t}var dh=/^[_a-z][_0-9a-z]*/i;function ph(e){var t=e.match(dh);return t?t[0]:e}function hh(e,t,n){return!!uf(t)&&(Array.isArray(t)?t.every((function(t){return hh(e,t,n)})):e.selections.every((function(e){if(wf(e)&&nf(e,n)){var r=gf(e);return lh.call(t,r)&&(!e.selectionSet||hh(e.selectionSet,t[r],n))}return!0})))}function mh(e){return uf(e)&&!ff(e)&&!Array.isArray(e)}var vh=Object.create(null),yh=function(){return vh},gh=Object.create(null),bh=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return gd(ff(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return ff(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return cf(e);if(ff(e))return e;var r=n.policies.identify(e)[0];if(r){var i=cf(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return _u({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),lh.call(this.data,e)){var n=this.data[e];if(n&&lh.call(n,t))return n[t]}return"__typename"===t&&lh.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof _h?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),lh.call(this.data,e)?this.data[e]:this instanceof _h?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;ff(e)&&(e=e.__ref),ff(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?Iu("string"==typeof n,"store.merge expects a string ID"):Iu("string"==typeof n,1);var o=new Qf(xh).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach((function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=ph(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof _h||delete o[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==o.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:vh,INVALIDATE:gh,isReference:ff,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||cf(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(l){var u=ph(l),c=r[l];if(void 0!==c){var f="function"==typeof t?t:t[l]||t[u];if(f){var d=f===yh?vh:f(gd(c),_u(_u({},s),{fieldName:u,storeFieldName:l,storage:n.getStorage(e,l)}));d===gh?n.group.dirty(e,l):(d===vh&&(d=void 0),d!==c&&(i[l]=d,a=!0,c=d))}void 0!==c&&(o=!1)}})),a)return this.merge(e,i),o&&(this instanceof _h?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=yh,r):yh)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(lh.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof _h&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){lh.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&lh.call(e,n)||t.delete(n)})),e){var n=e.__META,r=Su(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof _h?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){lh.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof _h;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!lh.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){ff(e)&&(t[e.__ref]=!0),uf(e)&&Object.keys(e).forEach((function(t){var n=e[t];uf(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),wh=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?th():null,this.keyMaker=new xp(Ed)},e.prototype.depend=function(e,t){if(this.d){this.d(Eh(e,t));var n=ph(t);n!==t&&this.d(Eh(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Eh(e,t),"__exists"===t?"forget":"setDirty")},e}();function Eh(e,t){return t+"#"+e}function kh(e,t){Th(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new wh(i))||this;return o.stump=new Sh(o),o.storageTrie=new xp(Ed),a&&o.replace(a),o}return ku(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(bh||(bh={}));var _h=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return ku(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){zd(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return _u(_u({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return lh.call(this.data,t)?_u(_u({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(bh),Sh=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new wh(t.group.caching,t.group))||this}return ku(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(_h);function xh(e,t,n){var r=e[n],i=t[n];return zd(r,i)?r:i}function Th(e){return!!(e instanceof bh&&e.group.caching)}var Oh,Ch,Nh=function(){function e(){this.known=new(kd?WeakSet:Set),this.pool=new xp(Ed),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return uf(e)&&this.known.has(e)},e.prototype.pass=function(e){if(uf(e)){var t=function(e){return uf(e)?Array.isArray(e)?e.slice(0):_u({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(uf(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),a=[i],o=this.sortedKeys(e);a.push(o.json);var s,l=a.length;if(o.sorted.forEach((function(n){a.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(a)).object){var u=s.object=Object.create(i);this.known.add(u),o.sorted.forEach((function(e,t){u[e]=a[l+t]})),__DEV__&&Object.freeze(u)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),Rh=Object.assign((function(e){if(uf(e)){void 0===Oh&&Dh();var t=Oh.admit(e),n=Ch.get(t);return void 0===n&&Ch.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:Dh});function Dh(){Oh=new Nh,Ch=new(Ed?WeakMap:Map)}function Ih(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Ah=function(){function e(e){var t=this;this.knownResults=new(Ed?WeakMap:Map),this.config=Nd(e,{addTypename:!1!==e.addTypename,canonizeResults:fh(e)}),this.canon=e.canon||new Nh,this.executeSelectionSet=ih((function(e){var n,r=e.context.canonizeResults,i=Ih(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?_u(_u({},a),{result:t.canon.admit(a.result)}):a:(kh(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Ih,makeCacheKey:function(e,t,n,r){if(Th(n.store))return n.store.makeCacheKey(e,ff(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=ih((function(e){return kh(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(Th(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Nh},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,a=e.variables,o=e.returnPartialData,s=void 0===o||o,l=e.canonizeResults,u=void 0===l?this.config.canonizeResults:l,c=this.config.cache.policies;a=_u(_u({},Cf(Tf(n))),a);var f,d=cf(i),p=new Qf,h=this.executeSelectionSet({selectionSet:Of(n).selectionSet,objectOrReference:d,enclosingRef:d,context:{store:t,query:n,policies:c,variables:a,varString:Rh(a),canonizeResults:u,fragmentMap:sf(xf(n)),merge:function(e,t){return p.merge(e,t)}}});if(h.missing&&(f=[new sh(Ph(h.missing),h.missing,n,a)],!s))throw f[0];return{result:h.result,complete:!f,missing:f}},e.prototype.isFresh=function(e,t,n,r){if(Th(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,a=e.context;if(ff(r)&&!a.policies.rootTypenamesById[r.__ref]&&!a.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var o,s=a.variables,l=a.policies,u=a.store.getFieldValue(r,"__typename"),c={};function f(e,t){var n;return e.missing&&(o=a.merge(o,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof u&&!l.rootIdsByTypename[u]&&(c={__typename:u});var d=new Set(n.selections);d.forEach((function(e){var n,p;if(nf(e,s))if(wf(e)){var h=l.readField({fieldName:e.name.value,field:e,variables:a.variables,from:r},a),m=gf(e);void 0===h?Ff.added(e)||(o=a.merge(o,((n={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(ff(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):Array.isArray(h)?h=f(t.executeSubSelectedArray({field:e,array:h,enclosingRef:i,context:a}),m):e.selectionSet?null!=h&&(h=f(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:h,enclosingRef:ff(h)?h:i,context:a}),m)):a.canonizeResults&&(h=t.canon.pass(h)),void 0!==h&&(c=a.merge(c,((p={})[m]=h,p)))}else{var v=lf(e,a.fragmentMap);v&&l.fragmentMatches(v,u)&&v.selectionSet.selections.forEach(d.add,d)}}));var p={result:c,missing:o},h=a.canonizeResults?this.canon.admit(p):gd(p);return h.result&&this.knownResults.set(h.result,n),h},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context;function s(e,n){var r;return e.missing&&(t=o.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map((function(e,t){return null===e?null:Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:ff(e)?e:a,context:o}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){uf(n)&&(__DEV__?Iu(!ff(n),"Missing selection set for object of type ".concat(function(e,t){return ff(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)," returned for query field ").concat(t.name.value)):Iu(!ff(n),5),Object.values(n).forEach(r.add,r))}))}}(o.store,r,e),e)})),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function Ph(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var Fh=new Dp,Mh=new WeakMap;function Lh(e){var t=Mh.get(e);return t||Mh.set(e,t={vars:new Set,dep:th()}),t}function qh(e){Lh(e).vars.forEach((function(t){return t.forgetCache(e)}))}function jh(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach((function(e){Lh(e).dep.dirty(r),Vh(e)}));var o=Array.from(n);n.clear(),o.forEach((function(t){return t(e)}))}}else{var s=Fh.getValue();s&&(i(s),Lh(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Lh(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function Vh(e){e.broadcastWatches&&e.broadcastWatches()}var zh=Object.create(null);function $h(e){var t=JSON.stringify(e);return zh[t]||(zh[t]=Object.create(null))}function Qh(e){var t=$h(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=Bh(e,(function(e){var i=Hh(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&lh.call(t,e[0])&&(i=Hh(t,e,Kh)),__DEV__?Iu(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):Iu(void 0!==i,2),i}));return"".concat(n.typename,":").concat(JSON.stringify(i))})}function Uh(e){var t=$h(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=Bh(e,(function(e){var n=e[0],a=n.charAt(0);if("@"!==a)if("$"!==a){if(t)return Hh(t,e)}else{var o=n.slice(1);if(i&&lh.call(i,o)){var s=e.slice(0);return s[0]=o,Hh(i,s)}}else if(r&&Od(r.directives)){var l=n.slice(1),u=r.directives.find((function(e){return e.name.value===l})),c=u&&yf(u,i);return c&&Hh(c,e.slice(1))}})),s=JSON.stringify(o);return(t||"{}"!==s)&&(a+=":"+s),a})}function Bh(e,t){var n=new Qf;return Wh(e).reduce((function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)(i={})[r[o]]=a,a=i;e=n.merge(e,a)}return e}),Object.create(null))}function Wh(e){var t=$h(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,i){Array.isArray(t)?(Wh(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),Array.isArray(e[i+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function Kh(e,t){return e[t]}function Hh(e,t,n){return n=n||Kh,Yh(t.reduce((function e(t,r){return Array.isArray(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function Yh(e){return uf(e)?Array.isArray(e)?e.map(Yh):Bh(Object.keys(e).sort(),(function(t){return Hh(e,t)})):e}function Gh(e){return void 0!==e.args?e.args:e.field?yf(e.field,e.variables):null}hf.setStringify(Rh);var Jh=function(){},Xh=function(e,t){return t.fieldName},Zh=function(e,t,n){return(0,n.mergeObjects)(e,t)},em=function(e,t){return t},tm=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=_u({dataIdFromObject:uh},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r=this,i=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,o=t&&t.storeObject||e,s=_u(_u({},t),{typename:i,storeObject:o,readField:t&&t.readField||function(){var e=rm(arguments,o);return r.readField(e,{store:r.cache.data,variables:e.variables})}}),l=i&&this.getTypePolicy(i),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var c=u(e,s);if(!Array.isArray(c)){a=c;break}u=Qh(c)}return a=a?String(a):void 0,s.keyObject?[a,s.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=Su(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),lh.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?Zh:!1===t?em:e.merge}o(r,t.merge),r.keyFn=!1===i?Jh:Array.isArray(i)?Qh(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,l=i.read,u=i.merge;r.keyFn=!1===s?Xh:Array.isArray(s)?Uh(s):"function"==typeof s?s:r.keyFn,"function"==typeof l&&(r.read=l),o(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||Xh)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?Iu(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):Iu(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(dh);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!lh.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,a=Su(r,["fields"]);Object.assign(n,a),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],l=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},u=!(!n||!this.fuzzySubtypes.size),c=!1,f=0;f1?s:t}:(r=_u({},o),lh.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Iu.warn("Undefined 'from' passed to readField with arguments ".concat((i=Array.from(e),a=Dd("stringifyForDisplay"),JSON.stringify(i,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("")))),void 0===r.variables&&(r.variables=n),r}function im(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new Du("Cannot automatically merge arrays"):new Du(4);if(uf(t)&&uf(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(ff(t)&&mh(n))return e.merge(t.__ref,n),t;if(mh(t)&&ff(n))return e.merge(t,n.__ref),n;if(mh(t)&&mh(n))return _u(_u({},t),n)}return n}}function am(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:_u(_u({},e),{clientOnly:t,deferred:n})),i}var om=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,l=_f(r),u=new Qf;o=_u(_u({},Cf(l)),o);var c={store:e,written:Object.create(null),merge:function(e,t){return u.merge(e,t)},variables:o,varString:Rh(o),fragmentMap:sf(xf(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map},f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:c});if(!ff(f))throw __DEV__?new Du("Could not identify object ".concat(JSON.stringify(i))):new Du(6);return c.incomingById.forEach((function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=cf(r);if(a&&a.map.size){var l=n.applyMerges(a,s,i,c);if(ff(l))return;i=l}if(__DEV__&&!c.overwrite){var u=Object.create(null);o.forEach((function(e){e.selectionSet&&(u[e.name.value]=!0)}));Object.keys(i).forEach((function(e){(function(e){return!0===u[ph(e)]})(e)&&!function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(!a)return;var o=i(t);if(!o)return;if(ff(a))return;if(zd(a,o))return;if(Object.keys(a).every((function(e){return void 0!==r.getFieldValue(o,e)})))return;var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),l=ph(n),u="".concat(s,".").concat(l);if(dm.has(u))return;dm.add(u);var c=[];Array.isArray(a)||Array.isArray(o)||[a,o].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||c.includes(t)||c.push(t)}));__DEV__&&Iu.warn("Cache data may be lost when replacing the ".concat(l," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(u," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}(s,i,e,c.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,l=Object.create(null),u=n&&s.rootTypenamesById[n]||bf(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof u&&(l.__typename=u);var c=function(){var e=rm(arguments,l,a.variables);if(ff(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField(_u(_u({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,u).forEach((function(e,n){var i,a=gf(n),d=r[a];if(f.add(n),void 0!==d){var p=s.getStoreFieldName({typename:u,fieldName:n.name.value,field:n,variables:e.variables}),h=lm(o,p),m=t.processFieldValue(d,n,n.selectionSet?am(e,!1,!1):e,h),v=void 0;n.selectionSet&&(ff(m)||mh(m))&&(v=c("__typename",m));var y=s.getMergeFunction(u,n.name.value,v);y?h.info={field:n,typename:u,merge:y}:fm(o,p),l=e.merge(l,((i={})[p]=m,i))}else!__DEV__||e.clientOnly||e.deferred||Ff.added(n)||s.getReadFunction(u,n.name.value)||__DEV__&&Iu.error("Missing field '".concat(gf(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))}));try{var d=s.identify(r,{typename:u,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:l,readField:c}),p=d[0],h=d[1];n=n||p,h&&(l=a.merge(l,h))}catch(e){if(!n)throw e}if("string"==typeof n){var m=cf(n),v=a.written[n]||(a.written[n]=[]);if(v.indexOf(i)>=0)return m;if(v.push(i),this.reader&&this.reader.isFresh(r,m,i,a))return m;var y=a.incomingById.get(n);return y?(y.storeObject=a.merge(y.storeObject,l),y.mergeTree=um(y.mergeTree,o),f.forEach((function(e){return y.fieldNodeSet.add(e)}))):a.incomingById.set(n,{storeObject:l,mergeTree:cm(o)?void 0:o,fieldNodeSet:f}),m}return l},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,a){var o=i.processFieldValue(e,t,n,lm(r,a));return fm(r,a),o})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?md(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=bf(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new xp(!1);return function e(s,l){var u=o.lookup(s,l.clientOnly,l.deferred);u.visited||(u.visited=!0,s.selections.forEach((function(o){if(nf(o,n.variables)){var s=l.clientOnly,u=l.deferred;if(s&&u||!Od(o.directives)||o.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=yf(e,n.variables);r&&!1===r.if||(u=!0)}})),wf(o)){var c=i.get(o);c&&(s=s&&c.clientOnly,u=u&&c.deferred),i.set(o,am(n,s,u))}else{var f=lf(o,n.fragmentMap);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,am(n,s,u))}}})))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a,o=this;if(e.map.size&&!ff(n)){var s,l=Array.isArray(n)||!ff(t)&&!mh(t)?void 0:t,u=n;l&&!i&&(i=[ff(l)?l.__ref:l]);var c=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=c(l,t),a=c(u,t);if(void 0!==a){i&&i.push(t);var f=o.applyMerges(e,n,a,r,i);f!==a&&(s=s||new Map).set(t,f),i&&Iu(i.pop()===t)}})),s&&(n=Array.isArray(u)?u.slice(0):_u({},u),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(a=r.store).getStorage.apply(a,i)):n},e}(),sm=[];function lm(e,t){var n=e.map;return n.has(t)||n.set(t,sm.pop()||{map:new Map}),n.get(t)}function um(e,t){if(e===t||!t||cm(t))return e;if(!e||cm(e))return t;var n=e.info&&t.info?_u(_u({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var a=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,um(e,t.map.get(n))),a.delete(n)})),a.forEach((function(n){i.map.set(n,um(t.map.get(n),e.map.get(n)))}))}return i}function cm(e){return!e||!(e.info||e.map.size)}function fm(e,t){var n=e.map,r=n.get(t);r&&cm(r)&&(sm.push(r),n.delete(t))}var dm=new Set;var pm,hm=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=jh,n.txCount=0,n.config=function(e){return Nd(ch,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new tm({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ku(t,e),t.prototype.init=function(){var e=this.data=new bh.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new om(this,this.storeReader=new Ah({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:fh(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=ih((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(Th(n)){var r=e.optimistic,i=e.rootId,a=e.variables;return n.makeCacheKey(e.query,e.callback,Rh({optimistic:r,rootId:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(_u(_u({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof sh)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(lh.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(_u(_u({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){Lh(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&qh(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Rh.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(ff(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&Iu.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(lh.call(e,"id"))return!1;e=_u(_u({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Rh.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),qh(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,l=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},u=new Set;return s&&!this.txCount&&this.broadcastWatches(_u(_u({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,l):!1===a?l(this.data):l(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&u.size?(this.broadcastWatches(_u(_u({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Ff(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&zd(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(oh);function mm(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(pm||(pm={}));var vm=Object.assign,ym=Object.hasOwnProperty,gm=!1,bm=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,a=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=wm)}catch(e){}var n=!a.observers.size;a.observers.add(e);var r=a.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&a.reobserve().catch((function(){})),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}}))||this;a.observers=new Set,a.subscriptions=new Set,a.isTornDown=!1,a.options=i,a.queryId=r.queryId||n.generateQueryId();var o=_f(i.query);return a.queryName=o&&o.name&&o.name.value,a.initialFetchPolicy=i.fetchPolicy||"cache-first",a.queryManager=n,a.queryInfo=r,a}return ku(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||pm.ready,r=_u(_u({},t),{loading:mm(n),networkStatus:n}),i=this.options.fetchPolicy,a=void 0===i?"cache-first":i;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var o=this.queryInfo.getDiff();(o.complete||this.options.returnPartialData)&&(r.data=o.result),zd(r.data,{})&&(r.data=void 0),o.complete?(delete r.partial,!o.complete||r.networkStatus!==pm.loading||"cache-first"!==a&&"cache-only"!==a||(r.networkStatus=pm.ready,r.loading=!1)):r.partial=!0,!__DEV__||o.complete||this.options.partialRefetch||r.loading||r.data||r.error||Em(o.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!zd(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||zd(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if(n.fetchPolicy="standby"===r||"cache-and-network"===r?r:"no-cache"===r?"no-cache":"network-only",__DEV__&&e&&ym.call(e,"variables")){var i=Tf(this.options.query),a=i.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&Iu.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!zd(this.options.variables,e)&&(n.variables=this.options.variables=_u(_u({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,pm.refetch)},t.prototype.fetchMore=function(e){var t=this,n=_u(_u({},e.query?e:_u(_u(_u({},this.options),e),{variables:_u(_u({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=pm.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,pm.fetchMore).then((function(r){var i=r.data,a=e.updateQuery;return a?(__DEV__&&!gm&&(__DEV__&&Iu.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),gm=!0),t.updateQuery((function(e){return a(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&Iu.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return zd(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},pm.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?Iu(n,"Attempted to start a polling query without a polling interval."):Iu(n,10),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(mm(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},pm.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=_u(_u({},this.last),{result:this.queryManager.assumeImmutableResults?e:md(e),variables:t}),Od(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===pm.refetch||t===pm.fetchMore||t===pm.poll,i=this.options.variables,a=r?Nd(this.options,e):vm(this.options,Nd(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!zd(e.variables,i)&&(a.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=pm.setVariables)));var o=a.variables&&_u({},a.variables),s=this.fetch(a,t),l={next:function(e){n.reportResult(e,o)},error:function(e){n.reportError(e,o)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=l),s.addObserver(l),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),bd(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=_u(_u({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:pm.error,loading:!1});this.updateLastResult(n,t),bd(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(fd);function wm(e){__DEV__&&Iu.error("Unhandled error",e.message,e.stack)}function Em(e){__DEV__&&e&&__DEV__&&Iu.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function km(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}Sd(bm);var _m=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Vf(t.resolvers,e)})):this.resolvers=Vf(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return xu(this,void 0,void 0,(function(){return Tu(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then((function(e){return _u(_u({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return rf(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){kf(e);var t=Pf([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Bc(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return wf(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return _u(_u({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),xu(this,void 0,void 0,(function(){return Tu(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return _u(_u({},t),e.exportedVariables)}))]:[2,_u({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Bc(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Uc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:qf(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),xu(this,void 0,void 0,(function(){var o,s,l,u,c,f,d,p,h;return Tu(this,(function(m){return o=Of(e),s=xf(e),l=sf(s),u=o.operation,c=u?u.charAt(0).toUpperCase()+u.slice(1):"Query",d=(f=this).cache,p=f.client,h={fragmentMap:l,context:_u(_u({},n),{cache:d,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:c,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(o.selectionSet,t,h).then((function(e){return{result:e,exportedVariables:h.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return xu(this,void 0,void 0,(function(){var r,i,a,o,s,l=this;return Tu(this,(function(u){return r=n.fragmentMap,i=n.context,a=n.variables,o=[t],s=function(e){return xu(l,void 0,void 0,(function(){var s,l;return Tu(this,(function(u){return nf(e,a)?wf(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&o.push(((n={})[gf(e)]=t,n))}))]:(Ef(e)?s=e:(s=r[e.name.value],__DEV__?Iu(s,"No fragment named ".concat(e.name.value)):Iu(s,9)),s&&s.typeCondition&&(l=s.typeCondition.name.value,n.fragmentMatcher(t,l,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){o.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return zf(o)}))]}))}))},e.prototype.resolveField=function(e,t,n){return xu(this,void 0,void 0,(function(){var r,i,a,o,s,l,u,c,f,d=this;return Tu(this,(function(p){return r=n.variables,i=e.name.value,a=gf(e),o=i!==a,s=t[a]||t[i],l=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(u=t.__typename||n.defaultOperationType,(c=this.resolvers&&this.resolvers[u])&&(f=c[o?i:a])&&(l=Promise.resolve(Fh.withValue(this.cache,f,[t,yf(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,l.then((function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?d.resolveSubSelectedArray(e,t,n):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Sm=new(Ed?WeakMap:Map);function xm(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Sm.set(e,(Sm.get(e)+1)%1e15),n.apply(this,arguments)})}function Tm(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Om=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Sm.has(n)||(Sm.set(n,0),xm(n,"evict"),xm(n,"modify"),xm(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||pm.loading;return this.variables&&this.networkStatus!==pm.loading&&!zd(this.variables,e.variables)&&(t=pm.setVariables),zd(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Tm(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&zd(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||zd(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Tm(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(mm(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=_u(_u({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&zd(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Sm.get(this.cache)&&zd(t,n.variables)&&zd(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=Od(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Cm(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Sm.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var a=r.getDiffOptions(t.variables),o=i.diff(a);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(o,a),o.complete&&(e.data=o.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=pm.ready},e.prototype.markError=function(e){return this.networkStatus=pm.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Cm(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!Cd(e);return!r&&n&&e.data&&(r=!0),r}var Nm=Object.prototype.hasOwnProperty,Rm=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,a=e.onBroadcast,o=e.ssrMode,s=void 0!==o&&o,l=e.clientAwareness,u=void 0===l?{}:l,c=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ed?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=u,this.localState=c||new _m({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new Du("QueryManager stopped while query was in flight"):new Du(11))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,a=e.refetchQueries,o=void 0===a?[]:a,s=e.awaitRefetchQueries,l=void 0!==s&&s,u=e.update,c=e.onQueryUpdated,f=e.errorPolicy,d=void 0===f?"none":f,p=e.fetchPolicy,h=void 0===p?"network-only":p,m=e.keepRootFields,v=e.context;return xu(this,void 0,void 0,(function(){var e,a,s;return Tu(this,(function(f){switch(f.label){case 0:return __DEV__?Iu(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):Iu(t,12),__DEV__?Iu("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):Iu("network-only"===h||"no-cache"===h,13),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,v)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:h,errorPolicy:d,context:v,updateQueries:i,update:u,keepRootFields:m}),this.broadcastQueries(),s=this,[2,new Promise((function(f,p){return wd(s.getObservableFromLink(t,_u(_u({},v),{optimisticResponse:r}),n,!1),(function(f){if(Cd(f)&&"none"===d)throw new Hd({graphQLErrors:f.errors});a&&(a.loading=!1,a.error=null);var p=_u({},f);return"function"==typeof o&&(o=o(p)),"ignore"===d&&Cd(p)&&delete p.errors,s.markMutationResult({mutationId:e,result:p,document:t,variables:n,fetchPolicy:h,errorPolicy:d,context:v,update:u,updateQueries:i,awaitRefetchQueries:l,refetchQueries:o,removeOptimistic:r?e:void 0,onQueryUpdated:c,keepRootFields:m})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){a&&(a.loading=!1,a.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),p(t instanceof Hd?t:new Hd({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&Cm(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var o=e.updateQueries;o&&this.queries.forEach((function(e,a){var s=e.observableQuery,l=s&&s.queryName;if(l&&Nm.call(o,l)){var u=o[l],c=n.queries.get(a),f=c.document,d=c.variables,p=t.diff({query:f,variables:d,returnPartialData:!0,optimistic:!1}),h=p.result;if(p.complete&&h){var m=u(h,{mutationResult:r,queryName:f&&Sf(f)||void 0,queryVariables:d});m&&i.push({result:m,dataId:"ROOT_QUERY",query:f,variables:d})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach((function(e){return t.write(e)}));var o=e.update;if(o){if(!a){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=_u(_u({},r),{data:s.result}))}o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(_u(_u({},t),{result:{data:r}}),e)}catch(e){__DEV__&&Iu.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),Pf([Mf],kf(t))),a=this.localState.clientQuery(r),o=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:af(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:a,serverQuery:o,defaultVars:Cf(_f(r)),asQuery:_u(_u({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?_u(_u({},e),{operation:"query"}):e}))})},l=function(e){e&&!n.has(e)&&n.set(e,s)};l(e),l(r),l(a),l(o)}return n.get(e)},e.prototype.getVariables=function(e,t){return _u(_u({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=_u(_u({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new Om(this),n=new bm({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?Iu(e.query,"query option is required. You must specify your GraphQL document in the query option."):Iu(e.query,14),__DEV__?Iu("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):Iu("Document"===e.query.kind,15),__DEV__?Iu(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):Iu(!e.returnPartialData,16),__DEV__?Iu(!e.pollInterval,"pollInterval option only supported on watchQuery."):Iu(!e.pollInterval,17),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Du("Store reset while query was in flight (not completed in link chain)"):new Du(18)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=pm.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):uf(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):uf(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e)return void n.set(i,a);var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}})),i.size&&i.forEach((function(e){var r=Dd("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new bm({queryManager:t,queryInfo:i,options:_u(_u({},e),{fetchPolicy:"network-only"})});Iu(a.queryId===r),i.setObservableQuery(a),n.set(r,a)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&Iu.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var l=function(e){return t.getObservableFromLink(n,s,e).map((function(a){if("no-cache"!==r&&(Cm(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Cd(a))throw new Hd({graphQLErrors:a.errors});return a}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,a,s).then(l);return new fd((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return l(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var l=this.inFlightLinkObservables,u=this.link,c={query:s,variables:n,operationName:Sf(s)||void 0,context:this.prepareContext(_u(_u({},t),{forceFetch:!r}))};if(t=c.context,r){var f=l.get(s)||new Map;l.set(s,f);var d=Rh(n);if(!(a=f.get(d))){var p=new Td([op(u,c)]);f.set(d,a=p),p.cleanup((function(){f.delete(d)&&f.size<1&&l.delete(s)}))}}else a=new Td([op(u,c)])}else a=new Td([fd.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(a=wd(a,(function(e){return o.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})}))),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return wd(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var a=Od(i.errors);if(r>=e.lastRequestId){if(a&&"none"===n.errorPolicy)throw e.markError(new Hd({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var o={data:i.data,loading:!1,networkStatus:e.networkStatus||pm.ready};return a&&"ignore"!==n.errorPolicy&&(o.errors=i.errors),o}),(function(t){var n=Kd(t)?t:new Hd({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=pm.loading);var i=this.transform(t.query).document,a=this.getVariables(i,t.variables),o=this.getQuery(e),s=t.fetchPolicy,l=void 0===s?"cache-first":s,u=t.errorPolicy,c=void 0===u?"none":u,f=t.returnPartialData,d=void 0!==f&&f,p=t.notifyOnNetworkStatusChange,h=void 0!==p&&p,m=t.context,v=void 0===m?{}:m,y=Object.assign({},t,{query:i,variables:a,fetchPolicy:l,errorPolicy:c,returnPartialData:d,notifyOnNetworkStatusChange:h,context:v}),g=function(e){return y.variables=e,r.fetchQueryByPolicy(o,y,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new Td(this.transform(y.query).hasClientExports?this.localState.addExportedVariables(y.query,y.variables,y.context).then(g):g(y.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),km(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?Dd("refetchQueries"):void 0:o,l=e.onQueryUpdated,u=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){u.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var c=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof Om&&e.watcher.observableQuery;if(r){if(l){u.delete(r.queryId);var i=l(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&c.set(r,i),i}null!==l&&u.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),u.size&&u.forEach((function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(l){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=l(i,o,a)}l&&!0!==r||(r=i.refetch()),!1!==r&&c.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),c},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,l=t.errorPolicy,u=t.returnPartialData,c=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:i,variables:a,networkStatus:n});var p=function(){return e.getDiff(a)},h=function(t,n){void 0===n&&(n=e.networkStatus||pm.loading);var o=t.result;!__DEV__||u||zd(o,{})||Em(t.missing);var s=function(e){return fd.of(_u({data:e,loading:mm(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:c,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(o)},m="no-cache"===o?0:n===pm.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,m,{variables:a,context:c,fetchPolicy:o,errorPolicy:l})},y=f&&"number"==typeof d&&d!==n&&mm(n);switch(o){default:case"cache-first":return(g=p()).complete?[h(g,e.markReady())]:u||y?[h(g),v()]:[v()];case"cache-and-network":var g;return(g=p()).complete||u||y?[h(g),v()]:[v()];case"cache-only":return[h(p(),e.markReady())];case"network-only":return y?[h(p()),v()]:[v()];case"no-cache":return y?[h(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new Om(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return _u(_u({},t),{clientAwareness:this.clientAwareness})},e}(),Dm=!1;function Im(e,t){return Nd(e,t,t.variables&&{variables:_u(_u({},e.variables),t.variables)})}var Am=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,l=e.ssrForceFetchDelay,u=void 0===l?0:l,c=e.connectToDevTools,f=void 0===c?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:c,d=e.queryDeduplication,p=void 0===d||d,h=e.defaultOptions,m=e.assumeImmutableResults,v=void 0!==m&&m,y=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,w=e.name,E=e.version,k=e.link;if(k||(k=n?new wp({uri:n,credentials:r,headers:i}):tp.empty()),!a)throw __DEV__?new Du("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Du(7);if(this.link=k,this.cache=a,this.disableNetworkFetches=s||u>0,this.queryDeduplication=p,this.defaultOptions=h||{},this.typeDefs=g,u&&setTimeout((function(){return t.disableNetworkFetches=!1}),u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Dm&&__DEV__&&(Dm=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var _=window.navigator,S=_&&_.userAgent,x=void 0;"string"==typeof S&&(S.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":S.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Iu.log("Download the Apollo DevTools for a better development experience: "+x)}this.version="3.5.5",this.localState=new _m({cache:a,client:this,resolvers:y,fragmentMatcher:b}),this.queryManager=new Rm({cache:this.cache,link:this.link,queryDeduplication:p,ssrMode:s,clientAwareness:{name:w,version:E},localState:this.localState,assumeImmutableResults:v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Im(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=_u(_u({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Im(this.defaultOptions.query,e)),__DEV__?Iu("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):Iu("cache-and-network"!==e.fetchPolicy,8),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=_u(_u({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Im(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return op(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&Iu.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Pm=new Map,Fm=new Map,Mm=!0,Lm=!1;function qm(e){return e.replace(/[\s,]+/g," ").trim()}function jm(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=qm((o=e.loc).source.body.substring(o.start,o.end)),a=Fm.get(r);a&&!a.has(i)?Mm&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||Fm.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),_u(_u({},e),{definitions:n})}function Vm(e){var t=qm(e);if(!Pm.has(t)){var n=function(e,t){return new Vc(e,t).parseDocument()}(e,{experimentalFragmentVariables:Lm,allowLegacyFragmentVariables:Lm});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");Pm.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(jm(n)))}return Pm.get(t)}function zm(e){for(var t=[],n=1;n0?new Hd({graphQLErrors:f}):void 0;if(s===o.current.mutationId&&!l.ignoreResults){var p={called:!0,loading:!1,data:c,error:d,client:n};o.current.isMounted&&!zd(o.current.result,p)&&a(o.current.result=p)}return null===(t=i.onCompleted)||void 0===t||t.call(i,e.data),null===(u=r.onCompleted)||void 0===u||u.call(r,e.data),e})).catch((function(e){var t,u;if(s===o.current.mutationId&&o.current.isMounted){var c={loading:!1,error:e,data:void 0,called:!0,client:n};zd(o.current.result,c)||a(o.current.result=c)}if(i.onError||l.onError)return null===(t=i.onError)||void 0===t||t.call(i,e),null===(u=r.onError)||void 0===u||u.call(r,e),{data:void 0,errors:e};throw e}))}),o.current.execute}),[n,e,t]),l=u.useCallback((function(){a({called:!1,loading:!1,client:n})}),[]);return u.useEffect((function(){return function(){o.current.isMounted=!1}}),[]),[s,_u({reset:l},i)]}var sv=Object.freeze({__proto__:null,ApolloClient:Am,mergeOptions:Im,ObservableQuery:bm,applyNextFetchPolicy:km,get NetworkStatus(){return pm},isApolloError:Kd,ApolloError:Hd,get Cache(){return ah},ApolloCache:oh,InMemoryCache:hm,MissingFieldError:sh,defaultDataIdFromObject:uh,makeVar:jh,fromError:Yd,toPromise:function(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t?__DEV__&&Iu.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,n(e))},error:r})}))},fromPromise:function(e){return new fd((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))},throwServerError:Gd,Observable:fd,isReference:ff,makeReference:cf,get gql(){return zm},resetCaches:$m,disableFragmentWarnings:Qm,enableExperimentalFragmentVariables:Um,disableExperimentalFragmentVariables:Bm,empty:np,from:rp,split:ip,concat:ap,execute:op,ApolloLink:tp,parseAndCheckHttpResponse:lp,serializeFetchParameter:up,fallbackHttpConfig:cp,defaultPrinter:fp,selectHttpOptionsAndBody:function(e,t){for(var n=[],r=2;r.'):Iu(t&&t.client,25),e.children(t.client)}))},getApolloContext:Ad,resetApolloContext:Ad,get DocumentType(){return Km},operationName:ev,parser:tv,useApolloClient:Fd,useLazyQuery:function(e,t){var n=u.useState({called:!1,resolves:[]}),r=n[0],i=n[1],a=u.useCallback((function(e){var t,n=new Promise((function(e){return t=e}));return i((function(n){return n.called&&o&&o.refetch(null==e?void 0:e.variables),{called:!0,resolves:Ou(Ou([],n.resolves,!0),[t],!1),options:e}})),n}),[]),o=rv(e,_u(_u(_u({},t),r.options),{fetchPolicy:r.called?null==t?void 0:t.fetchPolicy:"standby",skip:void 0}));if(u.useEffect((function(){var e=r.resolves;!o.loading&&e.length&&(i((function(e){return _u(_u({},e),{resolves:[]})})),e.forEach((function(e){return e(o)})))}),[o,r]),!r.called){o=_u(_u({},o),{loading:!1,data:void 0,error:void 0,called:!1});for(var s=function(e){var t=o[e];o[e]=function(){for(var e=[],n=0;n{switch(t.type){case uv.ActionTypes.REQUEST:return e+1;case uv.ActionTypes.ERROR:case uv.ActionTypes.SUCCESS:case uv.ActionTypes.CANCEL:return Math.max(e-1,0);default:return e}},fv=(e,t)=>{switch(t.type){case uv.ActionTypes.REQUEST:return[];case uv.ActionTypes.ERROR:const{networkError:n}=t.payload;return[n];case uv.ActionTypes.SUCCESS:const{result:r}=t.payload;return!0===(null!=r&&null!=r.errors)?[...r.errors]:e;default:return e}};var dv="3.3.1",pv="https://github.com/electerious/Ackee",hv=(e,t)=>({get:()=>{const n=localStorage.getItem(e);return null==n?t:JSON.parse(n)},set:t=>{const n=JSON.stringify(t);return localStorage.setItem(e,n),t},reset:()=>(localStorage.removeItem(e),t)});const mv=Symbol(),vv=Symbol(),{get:yv,set:gv,reset:bv}=hv("ackee_token_3.3.1"),wv=(e,t)=>{switch(t.type){case mv:return gv(t.token);case vv:return bv();default:return e}};var Ev=function(){function e(e){var t=e.batchDebounce,n=e.batchInterval,r=e.batchMax,i=e.batchHandler,a=e.batchKey;this.queuedRequests=new Map,this.batchDebounce=t,this.batchInterval=n,this.batchMax=r||0,this.batchHandler=i,this.batchKey=a||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,n=_u({},e),r=!1,i=this.batchKey(e.operation);return n.observable||(n.observable=new fd((function(e){t.queuedRequests.has(i)||t.queuedRequests.set(i,[]),r||(t.queuedRequests.get(i).push(n),r=!0),n.next=n.next||[],e.next&&n.next.push(e.next.bind(e)),n.error=n.error||[],e.error&&n.error.push(e.error.bind(e)),n.complete=n.complete||[],e.complete&&n.complete.push(e.complete.bind(e)),1===t.queuedRequests.get(i).length?t.scheduleQueueConsumption(i):t.batchDebounce&&(clearTimeout(t.scheduledBatchTimer),t.scheduleQueueConsumption(i)),t.queuedRequests.get(i).length===t.batchMax&&t.consumeQueue(i)}))),n.observable},e.prototype.consumeQueue=function(e){var t=e||"",n=this.queuedRequests.get(t);if(n){this.queuedRequests.delete(t);var r=n.map((function(e){return e.operation})),i=n.map((function(e){return e.forward})),a=[],o=[],s=[],l=[];n.forEach((function(e,t){a.push(e.observable),o.push(e.next),s.push(e.error),l.push(e.complete)}));var u=this.batchHandler(r,i)||fd.of(),c=function(e){s.forEach((function(t){t&&t.forEach((function(t){return t(e)}))}))};return u.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),o.length!==e.length){var t=new Error("server returned results with length ".concat(e.length,", expected length of ").concat(o.length));return t.result=e,c(t)}e.forEach((function(e,t){o[t]&&o[t].forEach((function(t){return t(e)}))}))},error:c,complete:function(){l.forEach((function(e){e&&e.forEach((function(e){return e()}))}))}}),a}},e.prototype.scheduleQueueConsumption=function(e){var t=this,n=e||"";this.scheduledBatchTimer=setTimeout((function(){t.queuedRequests.get(n)&&t.queuedRequests.get(n).length&&t.consumeQueue(n)}),this.batchInterval)},e}(),kv=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.batchDebounce,a=r.batchInterval,o=void 0===a?10:a,s=r.batchMax,l=void 0===s?0:s,u=r.batchHandler,c=void 0===u?function(){return null}:u,f=r.batchKey,d=void 0===f?function(){return""}:f;return n.batcher=new Ev({batchDebounce:i,batchInterval:o,batchMax:l,batchHandler:c,batchKey:d}),t.batchHandler.length<=1&&(n.request=function(e){return n.batcher.enqueueRequest({operation:e})}),n}return ku(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(tp),_v=function(e){function t(t){var n=e.call(this)||this,r=t||{},i=r.uri,a=void 0===i?"/graphql":i,o=r.fetch,s=r.print,l=void 0===s?fp:s,u=r.includeExtensions,c=r.batchInterval,f=r.batchDebounce,d=r.batchMax,p=r.batchKey,h=Su(r,["uri","fetch","print","includeExtensions","batchInterval","batchDebounce","batchMax","batchKey"]);hp(o),o||(o=fetch);var m={http:{includeExtensions:u},options:h.fetchOptions,credentials:h.credentials,headers:h.headers};n.batchDebounce=f,n.batchInterval=c||10,n.batchMax=d||10;return p=p||function(e){var t=e.getContext(),n={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return vp(e,a)+JSON.stringify(n)},n.batcher=new kv({batchDebounce:n.batchDebounce,batchInterval:n.batchInterval,batchMax:n.batchMax,batchKey:p,batchHandler:function(e){var t=vp(e[0],a),n=e[0].getContext(),r={};if(n.clientAwareness){var i=n.clientAwareness,s=i.name,u=i.version;s&&(r["apollographql-client-name"]=s),u&&(r["apollographql-client-version"]=u)}var c,f={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:_u(_u({},r),n.headers)},d=e.map((function(e){return dp(e,l,cp,m,f)})),p=d.map((function(e){return e.body})),h=d[0].options;if("GET"===h.method)return Yd(new Error("apollo-link-batch-http does not support GET requests"));try{h.body=up(p,"Payload")}catch(e){return Yd(e)}if(!h.signal){var v=mp(),y=v.controller,g=v.signal;(c=y)&&(h.signal=g)}return new fd((function(n){return o(t,h).then((function(t){return e.forEach((function(e){return e.setContext({response:t})})),t})).then(lp(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){c&&c.abort()}}))}}),n}return ku(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(tp),Sv=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function xv(){return xv=Object.assign||function(e){for(var t=1;t(Array.isArray(o)?o.length-1:0)))return a=Array.isArray(o)?o[i]:o,r&&(n[t]=i+1),a;if(r)throw new Error("too few values provided for key `"+t+"`")}else if(r)throw new Error("no values provided for key `"+t+"`")},n=function(e,t,r){var i,a;if(Array.isArray(e)){for(i=-1,a=e.length;++i!0===Wv.some((t=>null!=t.pattern.match(e)))?e:Kv.pattern.stringify();var Yv=()=>{const e=u.useMemo((()=>function(e){function t(){var e=Dv(s.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var r=l.state||{};return[r.idx,{pathname:void 0===t?"/":t,search:void 0===n?"":n,hash:void 0===e?"":e,state:r.usr||null,key:r.key||"default"}]}function n(){if(u)h.call(u),u=null;else{var e=Tv.Pop,n=t(),r=n[0];if(n=n[1],h.length){if(null!=r){var i=f-r;i&&(u={action:e,location:n,retry:function(){o(-1*i)}},o(i))}}else a(e)}}function r(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=s.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:Rv(e))}function i(e,t){return void 0===t&&(t=null),xv({pathname:d.pathname,hash:"",search:""},"string"==typeof e?Dv(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),f=e[0],d=e[1],p.call({action:c,location:d})}function o(e){l.go(e)}void 0===e&&(e={});var s=void 0===(e=e.window)?document.defaultView:e,l=s.history,u=null;s.addEventListener("popstate",n),s.addEventListener("hashchange",(function(){Rv(t()[1])!==Rv(d)&&n()}));var c=Tv.Pop,f=(e=t())[0],d=e[1],p=Nv(),h=Nv();return null==f&&(f=0,l.replaceState(xv({},l.state,{idx:f}),"")),{get action(){return c},get location(){return d},createHref:r,push:function e(t,n){var o=Tv.Push,u=i(t,n);if(!h.length||(h.call({action:o,location:u,retry:function(){e(t,n)}}),0)){var c=[{usr:u.state,key:u.key,idx:f+1},r(u)];u=c[0],c=c[1];try{l.pushState(u,"",c)}catch(e){s.location.assign(c)}a(o)}},replace:function e(t,n){var o=Tv.Replace,s=i(t,n);h.length&&(h.call({action:o,location:s,retry:function(){e(t,n)}}),1)||(s=[{usr:s.state,key:s.key,idx:f},r(s)],l.replaceState(s[0],"",s[1]),a(o))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return p.push(e)},block:function(e){var t=h.push(e);return 1===h.length&&s.addEventListener("beforeunload",Cv),function(){t(),h.length||s.removeEventListener("beforeunload",Cv)}}}}()),[]),[t,n]=u.useState(Hv(e.location));u.useEffect((()=>e.listen((({location:e})=>{n(Hv(e))}))),[e]);return{setRoute:u.useCallback((t=>{e.push({pathname:t})}),[e]),route:t}},Gv=1;var Jv,Xv,Zv,ey={nextValue:function(){return(Gv=(9301*Gv+49297)%233280)/233280},seed:function(e){Gv=e}},ty="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function ny(){Zv=!1}function ry(e){if(e){if(e!==Jv){if(e.length!==ty.length)throw new Error("Custom alphabet for shortid must be "+ty.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+ty.length+" unique characters. These characters were not unique: "+t.join(", "));Jv=e,ny()}}else Jv!==ty&&(Jv=ty,ny())}function iy(){return Zv||(Zv=function(){Jv||ry(ty);for(var e,t=Jv.split(""),n=[],r=ey.nextValue();t.length>0;)r=ey.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}(),Zv)}var ay={get:function(){return Jv||ty},characters:function(e){return ry(e),Jv},seed:function(e){ey.seed(e),Xv!==e&&(ny(),Xv=e)},lookup:function(e){return iy()[e]},shuffled:iy},oy="object"==typeof window&&(window.crypto||window.msCrypto),sy=oy&&oy.getRandomValues?function(e){return oy.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=fy(uy)),t+=fy(n)};var py=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+ay.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},hy=n((function(e){var t=0;function n(){return dy(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return ay.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&ay.characters(e),ay.shuffled()},e.exports.isValid=py})),my=hy,vy=()=>`_${my.generate()}`;const yy=Symbol(),gy=Symbol(),by=Symbol(),wy={},Ey=(e,t)=>{switch(t.type){case yy:return{...e,[t.modalId]:{id:t.modalId,type:t.payload.type,props:t.payload.props}};case gy:const n={...e};return delete n[t.modalId],n;case by:return wy;default:return e}};var ky="TOP",_y="NEW",Sy="RECENT";var xy="LAST_24_HOURS",Ty="LAST_7_DAYS",Oy="LAST_30_DAYS",Cy="LAST_6_MONTHS";var Ny="DAILY",Ry="MONTHLY",Dy="YEARLY";var Iy="UNIQUE",Ay="TOTAL";var Py="WITH_SOURCE",Fy="NO_SOURCE",My="ONLY_SOURCE";var Ly="WITH_MODEL",qy="NO_MODEL";var jy="WITH_VERSION",Vy="NO_VERSION";var zy="BROWSER_HEIGHT",$y="BROWSER_RESOLUTION",Qy="BROWSER_WIDTH",Uy="SCREEN_HEIGHT",By="SCREEN_RESOLUTION",Wy="SCREEN_WIDTH";var Ky="WITH_VERSION",Hy="NO_VERSION";const Yy=Symbol(),Gy=Symbol(),Jy=Symbol(),Xy=Symbol(),Zy=Symbol(),eg=Symbol(),tg=Symbol(),ng=Symbol(),rg=Symbol(),ig=Symbol(),{get:ag,set:og,reset:sg}=hv("ackee_filter_3.3.1",{sorting:ky,range:Ty,interval:Ny,viewsType:Iy,referrersType:Py,devicesType:Ly,browsersType:jy,sizesType:$y,systemsType:Ky}),lg=(e,t)=>{switch(t.type){case Yy:return og({...e,sorting:t.payload});case Gy:return og({...e,range:t.payload});case Jy:return og({...e,interval:t.payload});case Xy:return og({...e,viewsType:t.payload});case Zy:return og({...e,referrersType:t.payload});case eg:return og({...e,devicesType:t.payload});case tg:return og({...e,browsersType:t.payload});case ng:return og({...e,sizesType:t.payload});case rg:return og({...e,systemsType:t.payload});case ig:return sg();default:return e}};const ug=["Token invalid","Token missing","Username or password incorrect"];var cg=e=>!0===ug.includes(e.message),fg="function"==typeof Symbol&&Symbol.for,dg=fg?Symbol.for("react.element"):60103,pg=fg?Symbol.for("react.portal"):60106,hg=fg?Symbol.for("react.fragment"):60107,mg=fg?Symbol.for("react.strict_mode"):60108,vg=fg?Symbol.for("react.profiler"):60114,yg=fg?Symbol.for("react.provider"):60109,gg=fg?Symbol.for("react.context"):60110,bg=fg?Symbol.for("react.async_mode"):60111,wg=fg?Symbol.for("react.concurrent_mode"):60111,Eg=fg?Symbol.for("react.forward_ref"):60112,kg=fg?Symbol.for("react.suspense"):60113,_g=fg?Symbol.for("react.suspense_list"):60120,Sg=fg?Symbol.for("react.memo"):60115,xg=fg?Symbol.for("react.lazy"):60116,Tg=fg?Symbol.for("react.block"):60121,Og=fg?Symbol.for("react.fundamental"):60117,Cg=fg?Symbol.for("react.responder"):60118,Ng=fg?Symbol.for("react.scope"):60119;function Rg(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case dg:switch(e=e.type){case bg:case wg:case hg:case vg:case mg:case kg:return e;default:switch(e=e&&e.$$typeof){case gg:case Eg:case xg:case Sg:case yg:return e;default:return t}}case pg:return t}}}function Dg(e){return Rg(e)===wg}var Ig={AsyncMode:bg,ConcurrentMode:wg,ContextConsumer:gg,ContextProvider:yg,Element:dg,ForwardRef:Eg,Fragment:hg,Lazy:xg,Memo:Sg,Portal:pg,Profiler:vg,StrictMode:mg,Suspense:kg,isAsyncMode:function(e){return Dg(e)||Rg(e)===bg},isConcurrentMode:Dg,isContextConsumer:function(e){return Rg(e)===gg},isContextProvider:function(e){return Rg(e)===yg},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===dg},isForwardRef:function(e){return Rg(e)===Eg},isFragment:function(e){return Rg(e)===hg},isLazy:function(e){return Rg(e)===xg},isMemo:function(e){return Rg(e)===Sg},isPortal:function(e){return Rg(e)===pg},isProfiler:function(e){return Rg(e)===vg},isStrictMode:function(e){return Rg(e)===mg},isSuspense:function(e){return Rg(e)===kg},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===hg||e===wg||e===vg||e===mg||e===kg||e===_g||"object"==typeof e&&null!==e&&(e.$$typeof===xg||e.$$typeof===Sg||e.$$typeof===yg||e.$$typeof===gg||e.$$typeof===Eg||e.$$typeof===Og||e.$$typeof===Cg||e.$$typeof===Ng||e.$$typeof===Tg)},typeOf:Rg}; /** @license React v16.13.1 * react-is.development.js * diff --git a/package.json b/package.json index a4ff364f..0407727d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ackee", "private": true, - "version": "3.3.0", + "version": "3.3.1", "authors": [ "Tobias Reich " ],