{"version":3,"sources":["webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/reactiveVars.js","webpack:///./app/javascript/src/util/locales/antd.js","webpack:///./app/javascript/src/util/locales/numeral.js","webpack:///./.yarn/cache/ts-invariant-npm-0.5.1-4c1fbe72bd-8c904450fb.zip/node_modules/ts-invariant/lib/invariant.esm.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/index.js","webpack:///./.yarn/cache/tslib-npm-2.6.3-0fd136b3be-74fce0e100.zip/node_modules/tslib/tslib.es6.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/isObjectLike.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/polyfills/symbols.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/location.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/printLocation.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/error/GraphQLError.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/error/syntaxError.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/kinds.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/tokenKind.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/devAssert.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/instanceOf.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/source.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/directiveLocation.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/lexer.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/parser.mjs","webpack:///./.yarn/__virtual__/graphql-tag-virtual-e9b988e522/0/cache/graphql-tag-npm-2.12.6-99a5a7f6de-b15162a3d6.zip/node_modules/graphql-tag/lib/index.js","webpack:///./app/javascript/src/analytics/helpers/mapClientSizeToLTV.ts","webpack:///./app/javascript/src/commons/api/graphql/mutations.ts","webpack:///./app/javascript/src/util/getEmploymentMetaData.ts","webpack:///./app/javascript/src/util/readMetaTagObject.ts","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/inspect.mjs","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/policies.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/nodejsCustomInspectSymbol.mjs","webpack:///./app/javascript/src/util/waitForCallBackNextTick.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/core/cache.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/core/types/common.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/serializeFetchParameter.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/printer.mjs","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/createHttpLink.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/checkFetcher.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/selectURI.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/createSignalIfSupported.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/rewriteURIForGET.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/http/HttpLink.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/Reobserver.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/ObservableQuery.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/blockString.mjs","webpack:///./.yarn/cache/tslib-npm-1.14.1-102499115e-dbe628ef87.zip/node_modules/tslib/tslib.es6.js","webpack:///./app/javascript/src/analytics/events.ts","webpack:///./app/javascript/src/analytics/containers/WonProbabilityEvent.tsx","webpack:///./app/javascript/src/analytics/hooks/useSetClientMarketingEventSent.ts","webpack:///./app/javascript/src/analytics/initializer.tsx","webpack:///./app/javascript/src/analytics/index.ts","webpack:///./.yarn/cache/zen-observable-npm-0.8.15-3bec99c19c-b7289084bc.zip/node_modules/zen-observable/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/helpers.js","webpack:///./.yarn/cache/@wry-equality-npm-0.2.0-db7d0ba29d-5d4715ae70.zip/node_modules/@wry/equality/lib/equality.esm.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/networkStatus.js","webpack:///./app/javascript/src/commons/api/apollo/client.ts","webpack:///./app/javascript/src/commons/api/apollo/index.ts","webpack:///./app/javascript/src/analytics/fireEvent.ts","webpack:///./.yarn/cache/fast-json-stable-stringify-npm-2.1.0-02e8905fda-b191531e36.zip/node_modules/fast-json-stable-stringify/index.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/defineInspect.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/jsutils/invariant.mjs","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/ast.mjs","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/empty.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/from.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/split.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/concat.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/execute.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/graphql/directives.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/graphql/fragments.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/graphql/storeUtils.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/graphql/getFromAST.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/filterInPlace.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/graphql/transform.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/mergeDeep.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/policies/pagination.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/observables/Observable.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/cloneDeep.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/observables/iteration.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/observables/asyncMap.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/observables/Concast.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/arrays.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/errorHandling.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/canUse.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/compact.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/core/types/Cache.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/data/OperationData.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/data/SubscriptionData.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/data/MutationData.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/data/QueryData.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/hooks/utils/useBaseQuery.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/hooks/utils/useDeepMemo.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/hooks/useLazyQuery.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/hooks/useMutation.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/hooks/useQuery.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/MutationStore.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/LocalState.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/QueryInfo.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/QueryManager.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/core/ApolloClient.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/version.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/entityStore.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/readFromStore.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/writeToStore.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js","webpack:///./.yarn/cache/graphql-npm-15.9.0-5ebe7a07df-fecf48b878.zip/node_modules/graphql/language/visitor.mjs","webpack:///./.yarn/cache/symbol-observable-npm-2.0.3-d54dcee558-533dcf7a79.zip/node_modules/symbol-observable/es/ponyfill.js","webpack:///./app/javascript/src/util/changecaseKeys.ts","webpack:///./app/javascript/src/util/activateMenuItem.ts","webpack:///./app/javascript/src/util/addBrazilianCountryCode.ts","webpack:///./app/javascript/src/util/formatDateElements.ts","webpack:///./app/javascript/src/util/GeolocationService.js","webpack:///./app/javascript/src/util/getFilenameFromContentDisposition.js","webpack:///./app/javascript/src/util/getHubspotUserToken.ts","webpack:///./app/javascript/src/util/getMobileOperatingSystem.js","webpack:///./app/javascript/src/util/getURLParameters.ts","webpack:///./app/javascript/src/util/camelizeKeys.ts","webpack:///./app/javascript/src/util/hourValid.js","webpack:///./app/javascript/src/util/localizedWrittenDate.js","webpack:///./app/javascript/src/util/pageReadyListener.js","webpack:///./app/javascript/src/commons/urls.js","webpack:///./app/javascript/src/util/redirectToAppStore.js","webpack:///./app/javascript/src/util/sanitizePhoneNumber.ts","webpack:///./app/javascript/src/util/capitalizeFirstLetter.ts","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./.yarn/cache/moment-npm-2.30.1-1c51a5c631-859236bab1.zip/node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./.yarn/cache/zen-observable-npm-0.8.15-3bec99c19c-b7289084bc.zip/node_modules/zen-observable/lib/Observable.js","webpack:///./.yarn/cache/symbol-observable-npm-2.0.3-d54dcee558-533dcf7a79.zip/node_modules/symbol-observable/es/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/utilities/common/environment.js","webpack:///./app/javascript/src/analytics/triggerAnalyticsOnJQueryEvent.ts","webpack:///./app/javascript/src/commons/api/graphql/fragments.ts","webpack:///./.yarn/cache/optimism-npm-0.13.2-dfc096dbe5-2a121737a3.zip/node_modules/optimism/lib/bundle.esm.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/utils/fromError.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/utils/throwServerError.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/utils/validateOperation.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/utils/createOperation.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/utils/transformOperation.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/errors/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/context/ApolloContext.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/context/ApolloConsumer.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/context/ApolloProvider.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/react/parser/index.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/ApolloLink.js","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/link/core/index.js","webpack:///./app/javascript/src/analytics/initializeDataLayer.ts","webpack:///./app/javascript/src/analytics/setupTagManagerScript.ts","webpack:///./app/javascript/src/analytics/initializeTagging.ts","webpack:///./.yarn/__virtual__/@apollo-client-virtual-920b389cde/0/cache/@apollo-client-npm-3.2.9-c09eb32ed6-476b51cc4f.zip/node_modules/@apollo/client/cache/index.js","webpack:///./.yarn/cache/@wry-context-npm-0.5.4-f231538ab5-57a7b00e37.zip/node_modules/@wry/context/lib/context.esm.js","webpack:///./app/javascript/src/util/getMetaContent.js"],"names":["varDep","cacheSlot","makeVar","value","caches","Set","listeners","rv","newValue","arguments","length","dirty","forEach","broadcast","callback","listener","items","set","item","push","clear","cache","getValue","add","onNextChange","delete","broadcastWatches","deepMerge","ptBR","DatePicker","lang","dateFormat","dateTimeFormat","dayFormat","monthBeforeYear","Empty","description","numeralLocale","delimiters","thousands","decimal","ordinal","currency","symbol","genericMessage","_a","Object","setPrototypeOf","obj","proto","__proto__","InvariantError","_super","message","_this","call","this","framesToPop","name","prototype","Error","invariant","condition","verbosityLevels","verbosityLevel","indexOf","wrapConsoleMethod","method","console","apply","log","warn","error","processStub","env","process","Function","atLeastWeTried","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","__assign","assign","t","s","i","n","p","hasOwnProperty","create","SuppressedError","_typeof","Symbol","iterator","constructor","asyncIterator","SYMBOL_TO_STRING_TAG","toStringTag","getLocation","source","position","match","lineRegexp","line","column","exec","body","index","printLocation","location","printSourceLocation","start","sourceLocation","firstLineColumnOffset","locationOffset","whitespace","lineIndex","lineOffset","lineNum","columnOffset","columnNum","locationStr","concat","lines","split","locationLine","subLineIndex","Math","floor","subLineColumnNum","subLines","slice","printPrefixedLines","map","subLine","existingLines","filter","_ref","undefined","padLen","max","_ref2","_ref3","str","prefix","join","len","Array","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","_defineProperty","key","defineProperty","configurable","writable","_defineProperties","target","props","descriptor","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","Map","fn","toString","TypeError","has","get","Wrapper","_construct","_getPrototypeOf","_setPrototypeOf","Parent","args","_isNativeReflectConstruct","Reflect","construct","a","instance","bind","sham","Proxy","Date","e","o","getPrototypeOf","_Error","subClass","superClass","_inherits","GraphQLError","Derived","hasNativeReflectConstruct","Constructor","protoProps","staticProps","result","Super","NewTarget","nodes","positions","path","originalError","extensions","_nodeLocations","_nodeLocations2","_nodeLocations3","_classCallCheck","undefinedIfEmpty","isArray","nodeLocations","_i2","_this$nodes","loc","locations","pos","originalExtensions","getOwnPropertyDescriptors","defineProperties","_objectSpread","stack","captureStackTrace","output","_i4","_error$nodes2","node","_i6","_error$locations2","printError","array","syntaxError","Kind","freeze","NAME","DOCUMENT","OPERATION_DEFINITION","VARIABLE_DEFINITION","SELECTION_SET","FIELD","ARGUMENT","FRAGMENT_SPREAD","INLINE_FRAGMENT","FRAGMENT_DEFINITION","VARIABLE","INT","FLOAT","STRING","BOOLEAN","NULL","ENUM","LIST","OBJECT","OBJECT_FIELD","DIRECTIVE","NAMED_TYPE","LIST_TYPE","NON_NULL_TYPE","SCHEMA_DEFINITION","OPERATION_TYPE_DEFINITION","SCALAR_TYPE_DEFINITION","OBJECT_TYPE_DEFINITION","FIELD_DEFINITION","INPUT_VALUE_DEFINITION","INTERFACE_TYPE_DEFINITION","UNION_TYPE_DEFINITION","ENUM_TYPE_DEFINITION","ENUM_VALUE_DEFINITION","INPUT_OBJECT_TYPE_DEFINITION","DIRECTIVE_DEFINITION","SCHEMA_EXTENSION","SCALAR_TYPE_EXTENSION","OBJECT_TYPE_EXTENSION","INTERFACE_TYPE_EXTENSION","UNION_TYPE_EXTENSION","ENUM_TYPE_EXTENSION","INPUT_OBJECT_TYPE_EXTENSION","TokenKind","SOF","EOF","BANG","DOLLAR","AMP","PAREN_L","PAREN_R","SPREAD","COLON","EQUALS","AT","BRACKET_L","BRACKET_R","BRACE_L","PIPE","BRACE_R","BLOCK_STRING","COMMENT","devAssert","Boolean","Source","inspect","DirectiveLocation","QUERY","MUTATION","SUBSCRIPTION","SCHEMA","SCALAR","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","Lexer","startOfFileToken","lastToken","token","lineStart","_proto","advance","lookahead","kind","_token$next","next","readToken","printCharCode","code","isNaN","JSON","stringify","String","fromCharCode","toUpperCase","lexer","prev","bodyLength","end","charCodeAt","_line","_col","readComment","readBlockString","readString","readNumber","readName","unexpectedCharacterMessage","col","firstCode","isFloat","readDigits","isNameStart","b","c","d","chunkStart","charCode","char2hex","invalidSequence","rawValue","Parser","options","sourceObj","instanceOf","isSource","_lexer","_options","parseName","expectToken","parseDocument","definitions","many","parseDefinition","peek","parseOperationDefinition","parseFragmentDefinition","parseTypeSystemDefinition","parseTypeSystemExtension","peekDescription","unexpected","operation","variableDefinitions","directives","selectionSet","parseSelectionSet","parseOperationType","parseVariableDefinitions","parseDirectives","operationToken","optionalMany","parseVariableDefinition","variable","parseVariable","type","parseTypeReference","defaultValue","expectOptionalToken","parseValueLiteral","selections","parseSelection","parseFragment","parseField","alias","nameOrAlias","parseArguments","isConst","parseConstArgument","parseArgument","hasTypeCondition","expectOptionalKeyword","parseFragmentName","typeCondition","parseNamedType","_this$_options","expectKeyword","experimentalFragmentVariables","parseList","parseObject","parseStringLiteral","block","values","any","_this2","fields","parseObjectField","parseDirective","keywordToken","parseSchemaDefinition","parseScalarTypeDefinition","parseObjectTypeDefinition","parseInterfaceTypeDefinition","parseUnionTypeDefinition","parseEnumTypeDefinition","parseInputObjectTypeDefinition","parseDirectiveDefinition","parseDescription","operationTypes","parseOperationTypeDefinition","interfaces","parseImplementsInterfaces","parseFieldsDefinition","_this$_options2","allowLegacySDLImplementsInterfaces","types","delimitedMany","_this$_options3","allowLegacySDLEmptyFields","parseFieldDefinition","parseArgumentDefs","parseInputValueDef","parseUnionMemberTypes","parseEnumValuesDefinition","parseEnumValueDefinition","parseInputFieldsDefinition","parseSchemaExtension","parseScalarTypeExtension","parseObjectTypeExtension","parseInterfaceTypeExtension","parseUnionTypeExtension","parseEnumTypeExtension","parseInputObjectTypeExtension","repeatable","parseDirectiveLocations","parseDirectiveLocation","startToken","_this$_options4","noLocation","getTokenKindDesc","getTokenDesc","atToken","openKind","parseFn","closeKind","delimiterKind","isPunctuatorTokenKind","docCache","fragmentSourceMap","printFragmentWarnings","normalize","string","replace","trim","processFragments","ast","seenKeys","fragmentDefinition","fragmentName","sourceKey","substring","sourceKeySet","cacheKey","parsed","parse","allowLegacyFragmentVariables","doc","workSet","endToken","stripLoc","gql","literals","_i","arg","gql_1","extras","SIZE_TO_VALUE","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge","size","ADJUST_EMPLOYMENT_HOUR_BANK","_templateObject","_taggedTemplateLiteral","errorData","ADJUST_EMPLOYMENT_HOURS","_templateObject2","RESET_INITIAL_HOUR_BANK","_templateObject3","ASSOCIATE_WORK_SCHEDULE_EMPLOYMENTS","_templateObject4","OVERRIDE_OR_CREATE_WITH_NAME_WORK_SCHEDULE","_templateObject5","UPDATE_COMPANY_DATA","_templateObject6","UPDATE_COMPANY_EMPLOYMENTS_DATA","_templateObject7","REQUEST_BENEFIT","_templateObject8","benefitErrorData","CHANGE_PLAN","_templateObject9","START_TRIAL","_templateObject10","WAIVE_RANGE","_templateObject11","DELETE_VACATION","_templateObject12","CREATE_VACATION","_templateObject13","ACCEPT_VACATION_REQUEST","_templateObject14","REJECT_VACATION_REQUEST","_templateObject15","VALIDATE_CREATE_VACATION","_templateObject16","VALIDATE_POSTAL_CODE","_templateObject17","SET_CLIENT_MARKETING_EVENT_SENT","_templateObject18","GENERATE_TECHNICAL_CERTIFICATE","_templateObject19","SIGNUP_USER","_templateObject20","VALIDATE_EMAIL","_templateObject21","VALIDATE_PHONE_NUMBER","_templateObject22","AUTHENTICATE_USER","_templateObject23","RESET_USER_PASSWORD","_templateObject24","UPDATE_USER_PASSWORD","_templateObject25","VALIDATE_RESET_PASSWORD_TOKEN","_templateObject26","SIGNOUT_USER","_templateObject27","CREATE_FIRST_ACCOUNTING_FIRM","_templateObject28","ACCEPT_ACCOUNTING_FIRM_INVITATION","_templateObject29","SHARE_ADJUSTMENT_REPORT_COMPRESSED","_templateObject30","INVITE_ACCOUNTANT","_templateObject31","CREATE_ACCOUNTANT_USER","_templateObject32","CREATE_ACCOUNTING_FIRM_INVITATION","_templateObject33","DELETE_COMPANY_MEDICAL_CERTIFICATE","_templateObject34","REJECT_MEDICAL_CERTIFICATE","_templateObject35","APPROVE_MEDICAL_CERTIFICATE","_templateObject36","SHOW_MEDICAL_CERTIFICATES_INTEREST","_templateObject37","EMPLOYMENT_META_DATA_TAG","getEmploymentMetaData","_readMetaTagObject","readMetaTagObject","tagName","accountStage","account_stage","billingStage","billing_stage","clientId","client_id","companyHasAddress","company_has_address","companyId","company_id","companyName","company_name","companyHasAnyActiveAccountingContract","company_has_any_active_accounting_contract","companyHasAnyAdjustmentReportShared","company_has_any_adjustment_report_shared","companyOldExcelReportsAndHourBankPageEnabled","company_old_excel_reports_and_hour_bank_page_enabled","clientSize","client_size","employmentId","employment_id","employmentRole","employment_role","firstAttachedUserId","first_attached_user_id","hasAcceptedTerms","has_accepted_terms","marketingEventSent","marketing_event_sent","overrideFeatureTimetrackingExcelReports","override_feature_timetracking_excel_reports","userCpf","user_cpf","userEmail","user_email","userFirstName","user_first_name","metaData","userCreatedAt","user_created_at","userHash","user_hash","userHasActiveAccountant","user_has_active_accountant","userId","user_id","userPhoneNumber","user_phone_number","wonProbability","won_probability","healthAccessEnabled","health_access_enabled","omitBy","isUndefined","content","getMetaContent","isEmpty","decodeURIComponent","atob","character","b64DecodeUnicode","MAX_ARRAY_LENGTH","MAX_RECURSIVE_DEPTH","formatValue","seenValues","previouslySeenValues","customInspectFn","getCustomFn","customValue","min","remaining","formatArray","tag","getObjectTag","properties","formatObject","formatObjectValue","argsFromFieldSpecifier","spec","field","variables","defaultDataIdFromObject","context","__typename","id","_id","keyObject","nullKeyFieldsFn","simpleKeyArgsFn","_args","fieldName","mergeTrueFn","existing","incoming","mergeObjects","mergeFalseFn","_","Policies","config","typePolicies","supertypeMap","fuzzySubtypes","rootIdsByTypename","rootTypenamesById","usingPossibleTypes","dataIdFromObject","setRootTypename","possibleTypes","addPossibleTypes","addTypePolicies","identify","fragmentMap","typename","ROOT_QUERY","policy","getTypePolicy","keyFn","specifierOrId","keyFieldsFnFromSpecifier","keyFields","queryType","mutationType","subscriptionType","getFieldPolicy","read","keyArgs","merge","keyArgsFnFromSpecifier","which","rootId","old","supertype","getSupertypeSet","subtype","RegExp","createIfMissing","typePolicy","fieldPolicies","supertypeSet","fragmentMatches","fragment","typenameSupertypeSet","workQueue_1","maybeEnqueue_1","needToCheckFuzzySubtypes","regExp","fuzzyString","getStoreFieldName","fieldSpec","storeFieldName","specifierOrString","readField","objectOrReference","from","store","getFieldValue","readOptions","makeFieldFunctionOptions","getStorage","__ref","withValue","hasMergeFunction","applyMerges","storageKeys","__field","__value","newFields_1","e_1","i_1","firstStorageKey_1","incomingValue","appliedValue","policies","storage","toReference","canRead","isReference","fieldNameOrOptions","eType","iType","typesDiffer","applied","specifier","computeKeyObject","trie","aliasMap","info","lookupArray","makeAliasMap","workQueue","selection","responseKey","storeKey","aliases","subsets","response","prevKey","keyObj","subset","responseName","nodejsCustomInspectSymbol","for","ApolloCache","getFragmentDoc","recordOptimisticTransaction","transaction","optimisticId","performTransaction","transformDocument","document","gc","modify","transformForLink","readQuery","optimistic","query","readFragment","writeQuery","write","dataId","data","writeFragment","MissingFieldError","clientOnly","serializeFetchParameter","label","serialized","parseError","printDocASTReducer","Name","Variable","Document","OperationDefinition","op","varDefs","wrap","VariableDefinition","SelectionSet","Field","argsLine","indent","Argument","_ref4","FragmentSpread","_ref5","InlineFragment","_ref6","FragmentDefinition","_ref7","IntValue","_ref8","FloatValue","_ref9","StringValue","_ref10","BooleanValue","_ref11","NullValue","EnumValue","_ref12","ListValue","_ref13","ObjectValue","_ref14","ObjectField","_ref15","Directive","_ref16","NamedType","_ref17","ListType","_ref18","NonNullType","_ref19","SchemaDefinition","addDescription","_ref20","OperationTypeDefinition","_ref21","ScalarTypeDefinition","_ref22","ObjectTypeDefinition","_ref23","FieldDefinition","_ref24","hasMultilineItems","InputValueDefinition","_ref25","InterfaceTypeDefinition","_ref26","UnionTypeDefinition","_ref27","EnumTypeDefinition","_ref28","EnumValueDefinition","_ref29","InputObjectTypeDefinition","_ref30","DirectiveDefinition","_ref31","SchemaExtension","_ref32","ScalarTypeExtension","_ref33","ObjectTypeExtension","_ref34","InterfaceTypeExtension","_ref35","UnionTypeExtension","_ref36","EnumTypeExtension","_ref37","InputObjectTypeExtension","_ref38","cb","maybeArray","_maybeArray$filter$jo","separator","x","maybeString","isMultiline","some","fallbackHttpConfig","http","includeQuery","includeExtensions","headers","accept","selectHttpOptionsAndBody","fallbackConfig","configs","credentials","operationName","leave","createHttpLink","linkOptions","uri","fetcher","fetch","useGETForQueries","requestOptions","checkFetcher","linkConfig","fetchOptions","chosenURI","fallbackURI","contextURI","getContext","selectURI","clientAwarenessHeaders","clientAwareness","name_1","version","controller","contextHeaders","contextConfig","_b","signal","_c","AbortController","createSignalIfSupported","_controller","_d","queryParams","addQueryParam","encodeURIComponent","serializedVariables","serializedExtensions","preFragment","fragmentStart","substr","queryParamsPrefix","newURI","rewriteURIForGET","observer","operations","then","setContext","text","bodyText","err","statusCode","status","complete","catch","errors","abort","HttpLink","request","Reobserver","shouldFetch","reobserve","newOptions","newNetworkStatus","updateOptions","updatePolling","concast","removeObserver","addObserver","promise","stop","pollingInfo","clearTimeout","timeout","pollInterval","interval","maybeFetch","fetchPolicy","nextFetchPolicy","poll","setTimeout","ObservableQuery","queryManager","queryInfo","onSubscribe","observers","subscriptions","lastError","isDifferentFromLastResult","updateLastResult","lastResult","graphQLErrors","networkStatus","loading","isTornDown","queryId","generateQueryId","opDef","queryName","Promise","resolve","reject","removeQuery","subscription","unsubscribe","subscribe","getCurrentResult","saveAsLastResult","ready","partial","transform","hasForcedResolvers","diff","getDiff","returnPartialData","newResult","lastResultSnapshot","getLastResult","getLastError","resetLastResults","resetQueryStoreErrors","resetErrors","refetch","reobserveOptions","newReobserver","fetchMore","fetchMoreOptions","combinedOptions","qid","notifyOnNetworkStatusChange","observe","fetchQuery","fetchMoreResult","updateQuery","previous","finally","stopQuery","subscribeToMore","startGraphQLSubscription","subscriptionData","onError","setOptions","setVariables","mapFn","previousResult","broadcastQueries","startPolling","getReobserver","stopPolling","reobserver","assumeImmutableResults","subObserver","_subscription","_observer","defaultSubscriptionObserverErrorCallback","first","tearDownQuery","shareOptions","setObservableQuery","currentOptions","fetchQueryObservable","ssrMode","hasObservers","sub","dedentBlockStringValue","rawString","commonIndent","_commonIndent","isFirstLine","isEmptyLine","getBlockStringIndentation","startLine","isBlank","endLine","printBlockString","indentation","preferMultipleLines","isSingleLine","hasLeadingSpace","hasTrailingQuote","hasTrailingSlash","printAsMultipleLines","extendStatics","__extends","__","__rest","propertyIsEnumerable","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","rejected","done","__generator","f","y","g","sent","trys","ops","verb","v","pop","__spreadArrays","il","r","k","j","jl","subscriptionOpenModal","event","category","action","wonProbabilityThresholdReached","WonProbabilityEvent","_useMutation2","execute","_useSetClientMarketin","_slicedToArray","useMutation","setClientMarketingEventSent","input","employmentMetaData","React","createElement","Fragment","_employmentMetaData$m","useEffect","expectedClientLTV","mapClientSizeToLTV","fireEvent","Initializer","pageReadyListener","initializeTagging","triggerAnalyticsOnJQueryEvent","elementSelector","analyticsEvent","jQueryEvent","container","found","getElementById","WON_PROBABILITY_EVENT_CONTAINER_ID","created","setAttribute","appendChild","findOrCreateContainer","ReactDOM","render","ApolloProvider","client","module","exports","Observable","hasOwn","TypeOrFieldNameRegExp","fieldNameFromStoreName","selectionSetMatchesResult","every","storeValueIsStoreObject","isFieldValueToBeMerged","makeProcessedFieldsMerger","reconcileProcessedFields","existingObject","incomingObject","property","fnToStr","previousComparisons","equal","check","full","suffix","fromIndex","aTag","previouslyCompared","aKeys","bKeys","keyCount","aIterator","entries","isMap","aKey","aValue","aCode","nativeCodeSuffix","bSet","NetworkStatus","isNetworkRequestInFlight","ApolloClient","InMemoryCache","attributes","window","dataLayer","originalCallback","eventCallback","eventTimeout","opts","cmp","cycles","aobj","bobj","seen","toJSON","isFinite","out","seenIndex","sort","splice","defineInspect","classObject","Location","Token","isNode","maybeNode","empty","shouldInclude","directive","isInclusionDirective","directiveArguments","ifArgument","ifValue","getInclusionDirectives","evaledValue","hasDirectives","names","root","getDirectiveNames","hasClientExports","getFragmentQueryDocument","actualFragmentName","fragments","definition","createFragmentMap","symTable","getFragmentFromSelection","makeReference","valueToObjectRepresentation","argObj","isIntValue","isFloatValue","Number","isBooleanValue","isStringValue","isObjectValue","nestedArgObj_1","isVariable","variableValue","isListValue","listValue","nestedArgArrayObj","isEnumValue","isNullValue","storeKeyNameFromField","directivesObj","getStoreKeyName","KNOWN_DIRECTIVES","filterKeys","filteredArgs_1","completeFieldName","stringifiedArgs","argumentsObjectFromField","argObj_1","resultKeyNameFromField","getTypenameFromResult","isField","isInlineFragment","checkDocument","getOperationDefinition","getOperationName","getFragmentDefinitions","getQueryDefinition","queryDef","getMainDefinition","queryDoc","getDefaultValues","defaultValues","defs","def","filterInPlace","test","elem","TYPENAME_FIELD","nullIfDocIsEmpty","fragmentDef","getFragmentDefinition","getDirectiveMatcher","dir","removeDirectivesFromDocument","variablesInUse","variablesToRemove","fragmentSpreadsInUse","fragmentSpreadsToRemove","modifiedDoc","enter","_key","parent","remove","getAllFragmentSpreadsFromSelectionSet","frag","argMatcher","argument","aConfig","getArgumentMatcher","varDef","argConfig","argMatchCount_1","removeArgumentsFromDocument","fs","removeFragmentSpreadFromDocument","addTypenameToDocument","lastIndexOf","added","connectionRemoveConfig","willRemove","removeConnectionDirectiveFromDocument","allFragments","buildQueryFromSelectionSet","removeClientSetsFromDocument","mergeDeep","sources","mergeDeepArray","count","merger","isObject","defaultReconciler","DeepMerger","reconciler","pastCopies","targetValue","shallowCopyForMerge","relayStylePagination","edges","startCursor","endCursor","edge","cursor","getExtras","pageInfo","hasPreviousPage","hasNextPage","incomingEdges","pageInfo_1","firstEdge","lastEdge","firstCursor","lastCursor","after","findIndex","before","notExtras","cloneDeep","cloneDeepHelper","val","copy_1","child","copy_2","maybeDeepFreeze","iterateObserversSafely","observersWithMethod","obs","asyncMap","observable","catchFn","activeCallbackCount","completed","makeCallback","examiner","delegate","handler","isPromiseLike","Concast","handlers","latest","shift","cancel","reason","iterable","nextOrError","quietly","cleanup","called","once","isNonEmptyArray","graphQLResultHasError","species","canUseWeakMap","WeakMap","navigator","product","compact","objects","Cache","OperationData","isMounted","previousOptions","getOptions","storePrevious","unmount","refreshClient","isNew","verifyDocumentType","parser","SubscriptionData","setResult","currentObservable","initialize","skip","currentResult","getLoadingResult","shouldResubscribe","startSubscription","afterExecute","endSubscription","updateCurrentData","updateError","completeSubscription","updateResult","onSubscriptionData","onSubscriptionComplete","MutationData","runMutation","mutationFunctionOptions","onMutationStart","mutationId","generateNewMutationId","mutate","onMutationCompleted","onMutationError","mutation","Mutation","mostRecentMutationId","ignoreResults","onCompleted","isMostRecentMutation","QueryData","onNewData","previousData","runLazy","runLazyQuery","lazyOptions","getQueryResult","observableQueryFields","partialRefetch","obsRefetch","obsFetchMore","obsUpdateQuery","obsStartPolling","obsStopPolling","obsSubscribeToMore","removeQuerySubscription","updateObservableQuery","startQuerySubscription","getExecuteSsrResult","getExecuteResult","executeLazy","fetchData","ssr","lazy","handleErrorOrCompleted","ssrInitiated","renderPromises","ssrDisabled","fetchDisabled","disableNetworkFetches","ssrLoading","stale","addQueryPromise","prepareObservableQueryOptions","Query","displayName","initializeObservableQuery","getSSRObservable","observableQueryOptions","children","watchQuery","registerSSRObservable","newObservableQueryOptions","currentSubscription","resubscribeToQuery","useBaseQuery","tick","forceUpdate","updatedOptions","queryDataRef","queryData","current","memoFn","ref","memo","queryResult","useLazyQuery","mutationDataRef","mutationData","useQuery","MutationStore","getStore","initMutation","markMutationError","markMutationResult","reset","LocalState","resolvers","fragmentMatcher","addResolvers","setFragmentMatcher","resolverGroup","setResolvers","getResolvers","runResolvers","remoteResult","onlyRunForcedResolvers","resolveDocument","localResult","getFragmentMatcher","clientQuery","serverQuery","prepareContext","getCacheKey","addExportedVariables","buildRootValueFromCache","exportedVariables","shouldForceResolvers","forceResolvers","rootValue","mainDefinition","definitionOperation","defaultOperationType","execContext","charAt","resolveSelectionSet","resultsToMerge","resolveField","fieldResult","fragmentResult","all","aliasedFieldName","aliasUsed","defaultResult","resultPromise","resolverType","resolverMap","resolveSubSelectedArray","destructiveMethodCounts","wrapDestructiveCacheMethod","methodName","original","QueryInfo","lastRequestId","stopped","observableQuery","init","networkError","updateWatch","setDiff","oldDiff","notifyTimeout","notify","oq","oqListener","fromOptimisticTransaction","shouldNotify","lastWatch","watch","shouldWrite","lastWrite","dmCount","markResult","allowCacheWrite","shouldWriteResult","errorPolicy","markReady","markError","ignoreErrors","writeWithErrors","QueryManager","link","queryDeduplication","onBroadcast","_e","localState","mutationStore","queries","fetchCancelFns","transformCache","queryIdCounter","requestIdCounter","mutationIdCounter","inFlightLinkObservables","_info","stopQueryNoBroadcast","cancelPendingFetches","optimisticResponse","updateQueriesByName","updateQueries","refetchQueries","awaitRefetchQueries","updateWithProxyFn","update","generateUpdateQueriesInfo","optimistic_1","_f","generateMutationId","getVariables","ret","updater","queryUpdatersById","storeResult","getObservableFromLink","removeOptimistic","refetchQueryPromises","refetchQuery","queryOptions","getQueryStore","transformed","forLink","cacheEntry_1","defaultVars","generateRequestId","stopQueryInStore","stopQueryInStoreNoBroadcast","clearStore","resetStore","reFetchObservableQueries","includeStandby","observableQueryPromises","getQuery","makeObservable","observablePromise_1","getLocalState","deduplication","inFlightLinkObservables_1","forceFetch","byVariables_1","varJson_1","of","getResultsFromLink","hasErrors","aqr","oldNetworkStatus","normalized","fromVariables","fetchQueryByPolicy","readCache","resultsFromCache","fromData","resolved","resultsFromLink","newContext","cacheWrites_1","queryUpdatersById_1","currentQueryResult","nextQueryResult","mutationResult","queryVariables","defaultOptions","resetStoreCallbacks","clearStoreCallbacks","ssrForceFetchDelay","connectToDevTools","typeDefs","clientAwarenessName","clientAwarenessVersion","__APOLLO_CLIENT__","devToolsHookCb","state","mutations","dataWithOptimisticResults","extract","__actionHookForDevTools","__requestRaw","payload","onResetStore","onClearStore","restore","serializedState","setLocalStateFragmentMatcher","setLink","newLink","EntityStore","Root","DELETE","delModifier","INVALIDATE","group","rootIds","refs","objOrRef","objOrIdOrRef","mergeIntoStore","toObject","lookup","depend","storeObject","dependOnExistence","merged","storeObjectReconciler","caching","fieldsToDirty_1","__exists","changedFields_1","needToMerge_1","allDeleted_1","sharedDetails_1","fieldValue","evict","evicted","newData","retain","release","getRootIdSet","ids","snapshot","findChildRefIds","idsToRemove","root_1","found_1","workSet_1","canTraverse_1","makeCacheKey","keyMaker","CacheGroup","makeDepKey","resultCaching","seed","storageTrie","sharedLayerGroup","addLayer","layerId","replay","removeLayer","idOrObj","Layer","fromParent","existingValue","supportsResultCaching","missingFromInvariant","StoreReader","executeSelectionSet","execSelectionSetImpl","varString","knownResults","executeSubSelectedArray","execSubSelectedArrayImpl","addTypename","diffQueryAgainstStore","execResult","hasMissingFields","missing","isFresh","objectsToMerge","finalResult","getMissing","handleMissing","resultName","wasClientOnly","childResult","StoreWriter","reader","writeToStore","operationDefinition","processSelectionSet","written","shouldApplyMerges","sets","mergedFields","resultFieldKey","processFieldValue","entityRef_1","defaultConfig","watches","typenameDocumentCache","txCount","maybeBroadcastWatch","broadcastWatch","optimisticData","watchDep","storeWriter","storeReader","immediate","forget","idToRemove","newOptimisticData","perform","layer","QueryDocumentKeys","BREAK","visit","visitor","visitorKeys","inArray","edits","ancestors","newRoot","isLeaving","isEdited","clone","_Object$keys2","editOffset","ii","editKey","editValue","_visitorKeys$node$kin","visitFn","getVisitFn","kindVisitor","kindSpecificVisitor","specificVisitor","specificKindVisitor","symbolObservablePonyfill","isSimpleObject","isObjectCastable","isComplexObject","isFunction","toCamel","matchedSubstring","toSnake","toLowerCase","changecaseKeys","changecaseFunction","arrayItem","camelcaseKeys","snakecaseKeys","activateMenuItem","menuItemId","activeMenuClass","activeMenuItems","querySelectorAll","menuItem","classList","addBrazilianCountryCode","phoneNumber","moment","locale","language","formatDateElements","selector","element","_element$dataset","dataset","isoDate","format","innerText","local","defaultPositionOptions","enableHighAccuracy","maximumAge","GeolocationService","locationStatus","successAction","errorAction","positionOptions","geolocation","getCurrentPosition","contentDisposition","needsEncodingFixup","tmp","toParamRegExp","filename","rfc2616unquote","fixupEncoding","rfc2047decode","rfc5987decode","unescape","matches","iter","_match2","quot","part","parseInt","parts","_matches$_n","rfc2231getparam","attributePattern","flags","textdecode","encoding","decoder","TextDecoder","fatal","bytes","decode","Uint8Array","startsWith","quotindex","extvalue","encodingend","charset","hex","getHubspotUserToken","hubspotUserTokenObject","cookie","find","row","getMobileOperatingSystem","userAgent","vendor","opera","MSStream","getURLParameters","windowURL","search","urlSearchParams","URLSearchParams","paramsObject","reduce","accumulated","_toConsumableArray","mapKeys","camelCase","validTimeFormats","hourValid","hour","isValid","localizedWrittenDate","date","functionToRun","attachEvent","readyState","addEventListener","apple","google","appStoreURL","urls","android","ios","redirectToAppStore","OS","sanitizePhoneNumber","capitalizeFirstLetter","originalModule","webpackPolyfill","l","webpackContext","req","webpackContextResolve","__webpack_require__","_createClass","hasSymbols","hasSymbol","getSymbol","SymbolIterator","SymbolObservable","SymbolSpecies","getMethod","getSpecies","ctor","isObservable","hostReportError","enqueue","cleanupSubscription","_cleanup","closeSubscription","_queue","_state","notifySubscription","m","onNotify","queue","flushSubscription","Subscription","subscriber","subscriptionObserver","SubscriptionObserver","_subscriber","_this3","_this4","C","hasSeed","hasValue","acc","_this5","_len","startNext","_this6","outer","inner","completeIfDone","closed","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","_item","return","_len2","_key2","global","jQuery","$","on","defaultDispose","dispose","Infinity","newest","oldest","entry","getEntry","older","newer","clean","parentEntrySlot","maybeUnsubscribe","entryOrDep","emptySetPool","POOL_TARGET_SIZE","assert","optionalMessage","valueGet","Entry","parents","childValues","dirtyChildren","recomputing","deps","mightBeDirty","recompute","reportDirtyChild","reportCleanChild","rememberParent","forgetChildren","recomputeNewValue","setDirty","maybeSubscribe","reportClean","setClean","reallyRecompute","reportDirty","forgetChild","dependOn","dep","forgetDeps","childValue","removeDirtyChild","dc","_value","defaultMakeData","KeyTrie","weakness","makeData","getChildTrie","isObjRef","weak","strong","depsByKey","dep_1","keyTrie","defaultMakeCacheKey","originalFunction","pow","fromError","errorValue","throwServerError","validateOperation","OPERATION_FIELDS","createOperation","starting","transformOperation","transformedOperation","isApolloError","ApolloError","errorMessage","extraInfo","graphQLError","getApolloContext","createContext","ApolloContext","Consumer","Provider","DocumentType","cached","passthrough","forward","toLink","ApolloLink","isTerminating","LinkError","links","left","right","leftLink","rightLink","second","firstLink","nextLink","setOnError","meta","otherEvents","_objectWithoutProperties","_excluded","gtmScriptTagId","gtmSnippet","initializeDataLayer","script","async","head","setupTagManagerScript","currentContext","MISSING_VALUE","idCounter","globalKey","host","Slot","now","random","context_1","slots","saved","noContext","metaName","metaElement","querySelector","getAttribute"],"mappings":";4FAAA,qkC,mCCAA,wFAEIA,EAAS,cACFC,EAAY,IAAI,IAOpB,SAASC,EAAQC,GACpB,IAAIC,EAAS,IAAIC,IACbC,EAAY,IAAID,IAChBE,EAAK,SAAUC,GACf,GAAIC,UAAUC,OAAS,EACfP,IAAUK,IACVL,EAAQK,EACRR,EAAOW,MAAMJ,GACbH,EAAOQ,QAAQC,GAdCC,EAea,SAAUC,GAAY,OAAOA,EAASZ,EAAQ,EAdnFa,EAAQ,IADWC,EAeOX,GAb1BM,SAAQ,SAAUM,GAAQ,OAAOF,EAAMG,KAAKD,EAAO,IACvDD,EAAIG,QACJJ,EAAMJ,QAAQE,QAcL,CACD,IAAIO,EAAQpB,EAAUqB,WAClBD,GACAjB,EAAOmB,IAAIF,GACfrB,EAAOO,EACX,CAvBR,IAA2BU,EAAKH,EACxBE,EAuBA,OAAOb,CACX,EAOA,OANAI,EAAGiB,aAAe,SAAUT,GAExB,OADAT,EAAUiB,IAAIR,GACP,WACHT,EAAUmB,OAAOV,EACrB,CACJ,EACOR,CACX,CACA,SAASM,EAAUQ,GACXA,EAAMK,kBACNL,EAAMK,kBAEd,C,oICzBeC,kBAAUC,IAdN,CACjBC,WAAY,CACVC,KAAM,CACJC,WAAY,aACZC,eAAgB,sBAChBC,UAAW,KACXC,iBAAiB,IAGrBC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AAKynB,IAAM9qB,EACd0C,GACAuwC,EAASkyB,EACbA,EAAiB,CAAElyB,OAAQA,EAAQ2yB,MAAOA,GAC1C,IAGI,OAAOjlE,EAASuD,MAAM8hC,EAAS16B,EACnC,CACA,QACI65D,EAAiBlyB,CACrB,CACJ,EAGAuyB,EAAK55D,KAAO,SAAUjL,GAClB,IAAIiqB,EAAUu6C,EACd,OAAO,WACH,IAAIU,EAAQV,EACZ,IAEI,OADAA,EAAiBv6C,EACVjqB,EAASuD,MAAMb,KAAM/C,UAChC,CACA,QACI6kE,EAAiBU,CACrB,CACJ,CACJ,EAEAL,EAAKM,UAAY,SAAUnlE,EAG3B2K,EAAM06B,GACF,IAAIm/B,EAaA,OAAOxkE,EAASuD,MAAM8hC,EAAS16B,GAZ/B,IAAIu6D,EAAQV,EACZ,IAII,OAHAA,EAAiB,KAGVxkE,EAASuD,MAAM8hC,EAAS16B,EACnC,CACA,QACI65D,EAAiBU,CACrB,CAKR,EACOL,CACX,CApGuD,GAiHnD,IACI7iE,OAAOkH,eAAe07D,EAAMD,EAAW,CACnCtlE,MAAOulE,EAAKD,GAAaE,EACzB97D,YAAY,EACZK,UAAU,EACVD,cAAc,GAEtB,CACA,QACI,OAAO07D,CACX,CACJ,CAb8B,GAenBA,EAAK55D,KAAkB45D,EAAKM,S,kCCzIxB,SAAS78C,EAAe88C,GACrC,IAAMC,EAAcrzC,SAASszC,cAAc,cAADz+D,OAAeu+D,EAAQ,OAEjE,OAAIC,EAAoBA,EAAYE,aAAa,WAE1C,EACT,CANA,iC","file":"js/analytics-fe8828619a3f65be00b7.chunk.js","sourcesContent":["export * from \"./core/index.js\";\nexport * from \"./react/index.js\";\n//# sourceMappingURL=index.js.map","import { Slot } from \"@wry/context\";\nimport { dep } from \"optimism\";\nvar varDep = dep();\nexport var cacheSlot = new Slot();\nfunction consumeAndIterate(set, callback) {\n var items = [];\n set.forEach(function (item) { return items.push(item); });\n set.clear();\n items.forEach(callback);\n}\nexport function makeVar(value) {\n var caches = new Set();\n var listeners = new Set();\n var rv = function (newValue) {\n if (arguments.length > 0) {\n if (value !== newValue) {\n value = newValue;\n varDep.dirty(rv);\n caches.forEach(broadcast);\n consumeAndIterate(listeners, function (listener) { return listener(value); });\n }\n }\n else {\n var cache = cacheSlot.getValue();\n if (cache)\n caches.add(cache);\n varDep(rv);\n }\n return value;\n };\n rv.onNextChange = function (listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n };\n return rv;\n}\nfunction broadcast(cache) {\n if (cache.broadcastWatches) {\n cache.broadcastWatches();\n }\n}\n//# sourceMappingURL=reactiveVars.js.map","import ptBR from 'antd/lib/locale-provider/pt_BR';\nimport { merge as deepMerge } from 'lodash';\n\nconst antdLocale = {\n DatePicker: {\n lang: {\n dateFormat: 'DD/MM/YYYY',\n dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',\n dayFormat: 'DD',\n monthBeforeYear: true,\n },\n },\n Empty: {\n description: 'Nenhum dado encontrado para o filtro aplicado',\n },\n};\n\nexport default deepMerge(ptBR, antdLocale);\n","const numeralLocale = {\n delimiters: {\n thousands: '.',\n decimal: ',',\n },\n ordinal: () => 'º',\n currency: {\n symbol: 'R$',\n },\n};\n\nexport default numeralLocale;\n","import { __extends } from 'tslib';\n\nvar genericMessage = \"Invariant Violation\";\r\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\r\n obj.__proto__ = proto;\r\n return obj;\r\n} : _a;\r\nvar InvariantError = /** @class */ (function (_super) {\r\n __extends(InvariantError, _super);\r\n function InvariantError(message) {\r\n if (message === void 0) { message = genericMessage; }\r\n var _this = _super.call(this, typeof message === \"number\"\r\n ? genericMessage + \": \" + message + \" (see https://github.com/apollographql/invariant-packages)\"\r\n : message) || this;\r\n _this.framesToPop = 1;\r\n _this.name = genericMessage;\r\n setPrototypeOf(_this, InvariantError.prototype);\r\n return _this;\r\n }\r\n return InvariantError;\r\n}(Error));\r\nfunction invariant(condition, message) {\r\n if (!condition) {\r\n throw new InvariantError(message);\r\n }\r\n}\r\nvar verbosityLevels = [\"log\", \"warn\", \"error\", \"silent\"];\r\nvar verbosityLevel = verbosityLevels.indexOf(\"log\");\r\nfunction wrapConsoleMethod(method) {\r\n return function () {\r\n if (verbosityLevels.indexOf(method) >= verbosityLevel) {\r\n return console[method].apply(console, arguments);\r\n }\r\n };\r\n}\r\n(function (invariant) {\r\n invariant.log = wrapConsoleMethod(\"log\");\r\n invariant.warn = wrapConsoleMethod(\"warn\");\r\n invariant.error = wrapConsoleMethod(\"error\");\r\n})(invariant || (invariant = {}));\r\nfunction setVerbosity(level) {\r\n var old = verbosityLevels[verbosityLevel];\r\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\r\n return old;\r\n}\r\n// Code that uses ts-invariant with rollup-plugin-invariant may want to\r\n// import this process stub to avoid errors evaluating process.env.NODE_ENV.\r\n// However, because most ESM-to-CJS compilers will rewrite the process import\r\n// as tsInvariant.process, which prevents proper replacement by minifiers, we\r\n// also attempt to define the stub globally when it is not already defined.\r\nvar processStub = { env: {} };\r\nif (typeof process === \"object\") {\r\n processStub = process;\r\n}\r\nelse\r\n try {\r\n // Using Function to evaluate this assignment in global scope also escapes\r\n // the strict mode of the current module, thereby allowing the assignment.\r\n // Inspired by https://github.com/facebook/regenerator/pull/369.\r\n Function(\"stub\", \"process = stub\")(processStub);\r\n }\r\n catch (atLeastWeTried) {\r\n // The assignment can fail if a Content Security Policy heavy-handedly\r\n // forbids Function usage. In those environments, developers should take\r\n // extra care to replace process.env.NODE_ENV in their production builds,\r\n // or define an appropriate global.process polyfill.\r\n }\r\nvar invariant$1 = invariant;\n\nexport default invariant$1;\nexport { InvariantError, invariant, processStub as process, setVerbosity };\n//# sourceMappingURL=invariant.esm.js.map\n","export { ApolloClient, } from \"./ApolloClient.js\";\nexport { ObservableQuery, } from \"./ObservableQuery.js\";\nexport { NetworkStatus } from \"./networkStatus.js\";\nexport * from \"./types.js\";\nexport { isApolloError, ApolloError } from \"../errors/index.js\";\nexport { Cache, ApolloCache, InMemoryCache, MissingFieldError, defaultDataIdFromObject, makeVar, } from \"../cache/index.js\";\nexport * from \"../cache/inmemory/types.js\";\nexport * from \"../link/core/index.js\";\nexport * from \"../link/http/index.js\";\nexport { fromError, toPromise, fromPromise, throwServerError, } from \"../link/utils/index.js\";\nexport { Observable, isReference, makeReference, } from \"../utilities/index.js\";\nimport gql from 'graphql-tag';\nexport var resetCaches = gql.resetCaches, disableFragmentWarnings = gql.disableFragmentWarnings, enableExperimentalFragmentVariables = gql.enableExperimentalFragmentVariables, disableExperimentalFragmentVariables = gql.disableExperimentalFragmentVariables;\nexport { gql };\n//# sourceMappingURL=index.js.map","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport default function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}\n","// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nexport var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';\n","/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match;\n\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n\n return {\n line: line,\n column: column\n };\n}\n","import { getLocation } from \"./location.mjs\";\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printLocation(location) {\n return printSourceLocation(location.source, getLocation(location.source, location.start));\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n var firstLineColumnOffset = source.locationOffset.column - 1;\n var body = whitespace(firstLineColumnOffset) + source.body;\n var lineIndex = sourceLocation.line - 1;\n var lineOffset = source.locationOffset.line - 1;\n var lineNum = sourceLocation.line + lineOffset;\n var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n var columnNum = sourceLocation.column + columnOffset;\n var locationStr = \"\".concat(source.name, \":\").concat(lineNum, \":\").concat(columnNum, \"\\n\");\n var lines = body.split(/\\r\\n|[\\n\\r]/g);\n var locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n var subLineIndex = Math.floor(columnNum / 80);\n var subLineColumnNum = columnNum % 80;\n var subLines = [];\n\n for (var i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return locationStr + printPrefixedLines([[\"\".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {\n return ['', subLine];\n }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));\n }\n\n return locationStr + printPrefixedLines([// Lines specified like this: [\"prefix\", \"string\"],\n [\"\".concat(lineNum - 1), lines[lineIndex - 1]], [\"\".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], [\"\".concat(lineNum + 1), lines[lineIndex + 1]]]);\n}\n\nfunction printPrefixedLines(lines) {\n var existingLines = lines.filter(function (_ref) {\n var _ = _ref[0],\n line = _ref[1];\n return line !== undefined;\n });\n var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {\n var prefix = _ref2[0];\n return prefix.length;\n }));\n return existingLines.map(function (_ref3) {\n var prefix = _ref3[0],\n line = _ref3[1];\n return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');\n }).join('\\n');\n}\n\nfunction whitespace(len) {\n return Array(len + 1).join(' ');\n}\n\nfunction leftPad(len, str) {\n return whitespace(len - str.length) + str;\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport { getLocation } from \"../language/location.mjs\";\nimport { printLocation, printSourceLocation } from \"../language/printLocation.mjs\";\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport var GraphQLError = /*#__PURE__*/function (_Error) {\n _inherits(GraphQLError, _Error);\n\n var _super = _createSuper(GraphQLError);\n\n /**\n * An array of { line, column } locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {\n var _nodeLocations, _nodeLocations2, _nodeLocations3;\n\n var _this;\n\n _classCallCheck(this, GraphQLError);\n\n _this = _super.call(this, message);\n _this.name = 'GraphQLError';\n _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.\n\n _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);\n var nodeLocations = [];\n\n for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {\n var _this$nodes;\n\n var _ref4 = _ref3[_i2];\n var loc = _ref4.loc;\n\n if (loc != null) {\n nodeLocations.push(loc);\n }\n }\n\n nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.\n\n _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;\n _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {\n return loc.start;\n });\n _this.locations = positions && source ? positions.map(function (pos) {\n return getLocation(source, pos);\n }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {\n return getLocation(loc.source, loc.start);\n });\n _this.path = path !== null && path !== void 0 ? path : undefined;\n var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;\n\n if (extensions == null && isObjectLike(originalExtensions)) {\n _this.extensions = _objectSpread({}, originalExtensions);\n } else {\n _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};\n } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.\n // This ensures that the simplest possible GraphQL service adheres to the spec.\n\n\n Object.defineProperties(_assertThisInitialized(_this), {\n message: {\n enumerable: true\n },\n locations: {\n enumerable: _this.locations != null\n },\n path: {\n enumerable: _this.path != null\n },\n extensions: {\n enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0\n },\n name: {\n enumerable: false\n },\n nodes: {\n enumerable: false\n },\n source: {\n enumerable: false\n },\n positions: {\n enumerable: false\n },\n originalError: {\n enumerable: false\n }\n }); // Include (non-enumerable) stack trace.\n\n if (originalError !== null && originalError !== void 0 && originalError.stack) {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true\n });\n return _possibleConstructorReturn(_this);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);\n } else {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true\n });\n }\n\n return _this;\n }\n\n _createClass(GraphQLError, [{\n key: \"toString\",\n value: function toString() {\n return printError(this);\n } // FIXME: workaround to not break chai comparisons, should be remove in v16\n // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n }, {\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Object';\n }\n }]);\n\n return GraphQLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n */\n\n\nexport function printError(error) {\n var output = error.message;\n\n if (error.nodes) {\n for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {\n var node = _error$nodes2[_i4];\n\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (error.source && error.locations) {\n for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {\n var location = _error$locations2[_i6];\n output += '\\n\\n' + printSourceLocation(error.source, location);\n }\n }\n\n return output;\n}\n","import { GraphQLError } from \"./GraphQLError.mjs\";\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(\"Syntax Error: \".concat(description), undefined, source, [position]);\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nexport var Kind = Object.freeze({\n // Name\n NAME: 'Name',\n // Document\n DOCUMENT: 'Document',\n OPERATION_DEFINITION: 'OperationDefinition',\n VARIABLE_DEFINITION: 'VariableDefinition',\n SELECTION_SET: 'SelectionSet',\n FIELD: 'Field',\n ARGUMENT: 'Argument',\n // Fragments\n FRAGMENT_SPREAD: 'FragmentSpread',\n INLINE_FRAGMENT: 'InlineFragment',\n FRAGMENT_DEFINITION: 'FragmentDefinition',\n // Values\n VARIABLE: 'Variable',\n INT: 'IntValue',\n FLOAT: 'FloatValue',\n STRING: 'StringValue',\n BOOLEAN: 'BooleanValue',\n NULL: 'NullValue',\n ENUM: 'EnumValue',\n LIST: 'ListValue',\n OBJECT: 'ObjectValue',\n OBJECT_FIELD: 'ObjectField',\n // Directives\n DIRECTIVE: 'Directive',\n // Types\n NAMED_TYPE: 'NamedType',\n LIST_TYPE: 'ListType',\n NON_NULL_TYPE: 'NonNullType',\n // Type System Definitions\n SCHEMA_DEFINITION: 'SchemaDefinition',\n OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',\n // Type Definitions\n SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',\n OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',\n FIELD_DEFINITION: 'FieldDefinition',\n INPUT_VALUE_DEFINITION: 'InputValueDefinition',\n INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',\n UNION_TYPE_DEFINITION: 'UnionTypeDefinition',\n ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',\n ENUM_VALUE_DEFINITION: 'EnumValueDefinition',\n INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',\n // Directive Definitions\n DIRECTIVE_DEFINITION: 'DirectiveDefinition',\n // Type System Extensions\n SCHEMA_EXTENSION: 'SchemaExtension',\n // Type Extensions\n SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',\n OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',\n INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',\n UNION_TYPE_EXTENSION: 'UnionTypeExtension',\n ENUM_TYPE_EXTENSION: 'EnumTypeExtension',\n INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'\n});\n/**\n * The enum type representing the possible kind values of AST nodes.\n */\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport var TokenKind = Object.freeze({\n SOF: '',\n EOF: '',\n BANG: '!',\n DOLLAR: '$',\n AMP: '&',\n PAREN_L: '(',\n PAREN_R: ')',\n SPREAD: '...',\n COLON: ':',\n EQUALS: '=',\n AT: '@',\n BRACKET_L: '[',\n BRACKET_R: ']',\n BRACE_L: '{',\n PIPE: '|',\n BRACE_R: '}',\n NAME: 'Name',\n INT: 'Int',\n FLOAT: 'Float',\n STRING: 'String',\n BLOCK_STRING: 'BlockString',\n COMMENT: 'Comment'\n});\n/**\n * The enum type representing the token kinds values.\n */\n","export default function devAssert(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport inspect from \"./inspect.mjs\";\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n */\n\n// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n// See: https://webpack.js.org/guides/production/\nexport default process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n// eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n return value instanceof constructor;\n} : // eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (_typeof(value) === 'object' && value !== null) {\n var _value$constructor;\n\n var className = constructor.prototype[Symbol.toStringTag];\n var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;\n\n if (className === valueClassName) {\n var stringifiedValue = inspect(value);\n throw new Error(\"Cannot use \".concat(className, \" \\\"\").concat(stringifiedValue, \"\\\" from another module or realm.\\n\\nEnsure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory. If different versions of \\\"graphql\\\" are the dependencies of other\\nrelied on modules, use \\\"resolutions\\\" to ensure only one version is installed.\\n\\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\\n\\nDuplicate \\\"graphql\\\" modules cannot be used at the same time since different\\nversions may have different capabilities and behavior. The data from one\\nversion used in the function from another could produce confusing and\\nspurious results.\"));\n }\n }\n\n return false;\n};\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport var Source = /*#__PURE__*/function () {\n function Source(body) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';\n var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n line: 1,\n column: 1\n };\n typeof body === 'string' || devAssert(0, \"Body must be a string. Received: \".concat(inspect(body), \".\"));\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive.');\n this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive.');\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n\n _createClass(Source, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Source';\n }\n }]);\n\n return Source;\n}();\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","/**\n * The set of allowed directive location values.\n */\nexport var DirectiveLocation = Object.freeze({\n // Request Definitions\n QUERY: 'QUERY',\n MUTATION: 'MUTATION',\n SUBSCRIPTION: 'SUBSCRIPTION',\n FIELD: 'FIELD',\n FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',\n FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',\n INLINE_FRAGMENT: 'INLINE_FRAGMENT',\n VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',\n // Type System Definitions\n SCHEMA: 'SCHEMA',\n SCALAR: 'SCALAR',\n OBJECT: 'OBJECT',\n FIELD_DEFINITION: 'FIELD_DEFINITION',\n ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',\n INTERFACE: 'INTERFACE',\n UNION: 'UNION',\n ENUM: 'ENUM',\n ENUM_VALUE: 'ENUM_VALUE',\n INPUT_OBJECT: 'INPUT_OBJECT',\n INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'\n});\n/**\n * The enum type representing the directive location values.\n */\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Token } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { dedentBlockStringValue } from \"./blockString.mjs\";\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport var Lexer = /*#__PURE__*/function () {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n function Lexer(source) {\n var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n\n var _proto = Lexer.prototype;\n\n _proto.advance = function advance() {\n this.lastToken = this.token;\n var token = this.token = this.lookahead();\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n ;\n\n _proto.lookahead = function lookahead() {\n var token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n var _token$next;\n\n // Note: next is only mutable during parsing, so we cast to allow this.\n token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n };\n\n return Lexer;\n}();\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;\n}\n\nfunction printCharCode(code) {\n return (// NaN/undefined represents access beyond the end of the file.\n isNaN(code) ? TokenKind.EOF : // Trust JSON for ASCII.\n code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.\n \"\\\"\\\\u\".concat(('00' + code.toString(16).toUpperCase()).slice(-4), \"\\\"\")\n );\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\n\nfunction readToken(lexer, prev) {\n var source = lexer.source;\n var body = source.body;\n var bodyLength = body.length;\n var pos = prev.end;\n\n while (pos < bodyLength) {\n var code = body.charCodeAt(pos);\n var _line = lexer.line;\n\n var _col = 1 + pos - lexer.lineStart; // SourceCharacter\n\n\n switch (code) {\n case 0xfeff: // \n\n case 9: // \\t\n\n case 32: // \n\n case 44:\n // ,\n ++pos;\n continue;\n\n case 10:\n // \\n\n ++pos;\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 13:\n // \\r\n if (body.charCodeAt(pos + 1) === 10) {\n pos += 2;\n } else {\n ++pos;\n }\n\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 33:\n // !\n return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);\n\n case 35:\n // #\n return readComment(source, pos, _line, _col, prev);\n\n case 36:\n // $\n return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);\n\n case 38:\n // &\n return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);\n\n case 40:\n // (\n return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);\n\n case 41:\n // )\n return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);\n\n case 46:\n // .\n if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {\n return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);\n }\n\n break;\n\n case 58:\n // :\n return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);\n\n case 61:\n // =\n return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);\n\n case 64:\n // @\n return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);\n\n case 91:\n // [\n return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);\n\n case 93:\n // ]\n return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);\n\n case 123:\n // {\n return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);\n\n case 124:\n // |\n return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);\n\n case 125:\n // }\n return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);\n\n case 34:\n // \"\n if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {\n return readBlockString(source, pos, _line, _col, prev, lexer);\n }\n\n return readString(source, pos, _line, _col, prev);\n\n case 45: // -\n\n case 48: // 0\n\n case 49: // 1\n\n case 50: // 2\n\n case 51: // 3\n\n case 52: // 4\n\n case 53: // 5\n\n case 54: // 6\n\n case 55: // 7\n\n case 56: // 8\n\n case 57:\n // 9\n return readNumber(source, pos, code, _line, _col, prev);\n\n case 65: // A\n\n case 66: // B\n\n case 67: // C\n\n case 68: // D\n\n case 69: // E\n\n case 70: // F\n\n case 71: // G\n\n case 72: // H\n\n case 73: // I\n\n case 74: // J\n\n case 75: // K\n\n case 76: // L\n\n case 77: // M\n\n case 78: // N\n\n case 79: // O\n\n case 80: // P\n\n case 81: // Q\n\n case 82: // R\n\n case 83: // S\n\n case 84: // T\n\n case 85: // U\n\n case 86: // V\n\n case 87: // W\n\n case 88: // X\n\n case 89: // Y\n\n case 90: // Z\n\n case 95: // _\n\n case 97: // a\n\n case 98: // b\n\n case 99: // c\n\n case 100: // d\n\n case 101: // e\n\n case 102: // f\n\n case 103: // g\n\n case 104: // h\n\n case 105: // i\n\n case 106: // j\n\n case 107: // k\n\n case 108: // l\n\n case 109: // m\n\n case 110: // n\n\n case 111: // o\n\n case 112: // p\n\n case 113: // q\n\n case 114: // r\n\n case 115: // s\n\n case 116: // t\n\n case 117: // u\n\n case 118: // v\n\n case 119: // w\n\n case 120: // x\n\n case 121: // y\n\n case 122:\n // z\n return readName(source, pos, _line, _col, prev);\n }\n\n throw syntaxError(source, pos, unexpectedCharacterMessage(code));\n }\n\n var line = lexer.line;\n var col = 1 + pos - lexer.lineStart;\n return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);\n}\n/**\n * Report a message that an unexpected character was encountered.\n */\n\n\nfunction unexpectedCharacterMessage(code) {\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n return \"Cannot contain the invalid character \".concat(printCharCode(code), \".\");\n }\n\n if (code === 39) {\n // '\n return 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?';\n }\n\n return \"Cannot parse the unexpected character \".concat(printCharCode(code), \".\");\n}\n/**\n * Reads a comment token from the source file.\n *\n * #[\\u0009\\u0020-\\uFFFF]*\n */\n\n\nfunction readComment(source, start, line, col, prev) {\n var body = source.body;\n var code;\n var position = start;\n\n do {\n code = body.charCodeAt(++position);\n } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator\n code > 0x001f || code === 0x0009));\n\n return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));\n}\n/**\n * Reads a number token from the source file, either a float\n * or an int depending on whether a decimal point appears.\n *\n * Int: -?(0|[1-9][0-9]*)\n * Float: -?(0|[1-9][0-9]*)(\\.[0-9]+)?((E|e)(+|-)?[0-9]+)?\n */\n\n\nfunction readNumber(source, start, firstCode, line, col, prev) {\n var body = source.body;\n var code = firstCode;\n var position = start;\n var isFloat = false;\n\n if (code === 45) {\n // -\n code = body.charCodeAt(++position);\n }\n\n if (code === 48) {\n // 0\n code = body.charCodeAt(++position);\n\n if (code >= 48 && code <= 57) {\n throw syntaxError(source, position, \"Invalid number, unexpected digit after 0: \".concat(printCharCode(code), \".\"));\n }\n } else {\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 46) {\n // .\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 69 || code === 101) {\n // E e\n isFloat = true;\n code = body.charCodeAt(++position);\n\n if (code === 43 || code === 45) {\n // + -\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n\n if (code === 46 || isNameStart(code)) {\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n }\n\n return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));\n}\n/**\n * Returns the new position in the source after reading digits.\n */\n\n\nfunction readDigits(source, start, firstCode) {\n var body = source.body;\n var position = start;\n var code = firstCode;\n\n if (code >= 48 && code <= 57) {\n // 0 - 9\n do {\n code = body.charCodeAt(++position);\n } while (code >= 48 && code <= 57); // 0 - 9\n\n\n return position;\n }\n\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n}\n/**\n * Reads a string token from the source file.\n *\n * \"([^\"\\\\\\u000A\\u000D]|(\\\\(u[0-9a-fA-F]{4}|[\"\\\\/bfnrt])))*\"\n */\n\n\nfunction readString(source, start, line, col, prev) {\n var body = source.body;\n var position = start + 1;\n var chunkStart = position;\n var code = 0;\n var value = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator\n code !== 0x000a && code !== 0x000d) {\n // Closing Quote (\")\n if (code === 34) {\n value += body.slice(chunkStart, position);\n return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n ++position;\n\n if (code === 92) {\n // \\\n value += body.slice(chunkStart, position - 1);\n code = body.charCodeAt(position);\n\n switch (code) {\n case 34:\n value += '\"';\n break;\n\n case 47:\n value += '/';\n break;\n\n case 92:\n value += '\\\\';\n break;\n\n case 98:\n value += '\\b';\n break;\n\n case 102:\n value += '\\f';\n break;\n\n case 110:\n value += '\\n';\n break;\n\n case 114:\n value += '\\r';\n break;\n\n case 116:\n value += '\\t';\n break;\n\n case 117:\n {\n // uXXXX\n var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));\n\n if (charCode < 0) {\n var invalidSequence = body.slice(position + 1, position + 5);\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\u\".concat(invalidSequence, \".\"));\n }\n\n value += String.fromCharCode(charCode);\n position += 4;\n break;\n }\n\n default:\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\\".concat(String.fromCharCode(code), \".\"));\n }\n\n ++position;\n chunkStart = position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Reads a block string token from the source file.\n *\n * \"\"\"(\"?\"?(\\\\\"\"\"|\\\\(?!=\"\"\")|[^\"\\\\]))*\"\"\"\n */\n\n\nfunction readBlockString(source, start, line, col, prev, lexer) {\n var body = source.body;\n var position = start + 3;\n var chunkStart = position;\n var code = 0;\n var rawValue = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position))) {\n // Closing Triple-Quote (\"\"\")\n if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {\n rawValue += body.slice(chunkStart, position);\n return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n if (code === 10) {\n // new line\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n } else if (code === 13) {\n // carriage return\n if (body.charCodeAt(position + 1) === 10) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n } else if ( // Escape Triple-Quote (\\\"\"\")\n code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {\n rawValue += body.slice(chunkStart, position) + '\"\"\"';\n position += 4;\n chunkStart = position;\n } else {\n ++position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Converts four hexadecimal chars to the integer that the\n * string represents. For example, uniCharCode('0','0','0','f')\n * will return 15, and uniCharCode('0','0','f','f') returns 255.\n *\n * Returns a negative number on error, if a char was invalid.\n *\n * This is implemented by noting that char2hex() returns -1 on error,\n * which means the result of ORing the char2hex() will also be negative.\n */\n\n\nfunction uniCharCode(a, b, c, d) {\n return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n}\n/**\n * Converts a hex character to its integer value.\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 on error.\n */\n\n\nfunction char2hex(a) {\n return a >= 48 && a <= 57 ? a - 48 // 0-9\n : a >= 65 && a <= 70 ? a - 55 // A-F\n : a >= 97 && a <= 102 ? a - 87 // a-f\n : -1;\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * [_A-Za-z][_0-9A-Za-z]*\n */\n\n\nfunction readName(source, start, line, col, prev) {\n var body = source.body;\n var bodyLength = body.length;\n var position = start + 1;\n var code = 0;\n\n while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _\n code >= 48 && code <= 57 || // 0-9\n code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122) // a-z\n ) {\n ++position;\n }\n\n return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));\n} // _ A-Z a-z\n\n\nfunction isNameStart(code) {\n return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;\n}\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Kind } from \"./kinds.mjs\";\nimport { Location } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { Source, isSource } from \"./source.mjs\";\nimport { DirectiveLocation } from \"./directiveLocation.mjs\";\nimport { Lexer, isPunctuatorTokenKind } from \"./lexer.mjs\";\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n var parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport var Parser = /*#__PURE__*/function () {\n function Parser(source, options) {\n var sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n\n var _proto = Parser.prototype;\n\n _proto.parseName = function parseName() {\n var token = this.expectToken(TokenKind.NAME);\n return {\n kind: Kind.NAME,\n value: token.value,\n loc: this.loc(token)\n };\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n ;\n\n _proto.parseDocument = function parseDocument() {\n var start = this._lexer.token;\n return {\n kind: Kind.DOCUMENT,\n definitions: this.many(TokenKind.SOF, this.parseDefinition, TokenKind.EOF),\n loc: this.loc(start)\n };\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n */\n ;\n\n _proto.parseDefinition = function parseDefinition() {\n if (this.peek(TokenKind.NAME)) {\n switch (this._lexer.token.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'schema':\n case 'scalar':\n case 'type':\n case 'interface':\n case 'union':\n case 'enum':\n case 'input':\n case 'directive':\n return this.parseTypeSystemDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n } else if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } else if (this.peekDescription()) {\n return this.parseTypeSystemDefinition();\n }\n\n throw this.unexpected();\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n ;\n\n _proto.parseOperationDefinition = function parseOperationDefinition() {\n var start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: 'query',\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n var operation = this.parseOperationType();\n var name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: operation,\n name: name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * OperationType : one of query mutation subscription\n */\n ;\n\n _proto.parseOperationType = function parseOperationType() {\n var operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return 'query';\n\n case 'mutation':\n return 'mutation';\n\n case 'subscription':\n return 'subscription';\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n ;\n\n _proto.parseVariableDefinitions = function parseVariableDefinitions() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseVariableDefinition, TokenKind.PAREN_R);\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseVariableDefinition = function parseVariableDefinition() {\n var start = this._lexer.token;\n return {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined,\n directives: this.parseDirectives(true),\n loc: this.loc(start)\n };\n }\n /**\n * Variable : $ Name\n */\n ;\n\n _proto.parseVariable = function parseVariable() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n }\n /**\n * SelectionSet : { Selection+ }\n */\n ;\n\n _proto.parseSelectionSet = function parseSelectionSet() {\n var start = this._lexer.token;\n return {\n kind: Kind.SELECTION_SET,\n selections: this.many(TokenKind.BRACE_L, this.parseSelection, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n ;\n\n _proto.parseSelection = function parseSelection() {\n return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n ;\n\n _proto.parseField = function parseField() {\n var start = this._lexer.token;\n var nameOrAlias = this.parseName();\n var alias;\n var name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return {\n kind: Kind.FIELD,\n alias: alias,\n name: name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined,\n loc: this.loc(start)\n };\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n ;\n\n _proto.parseArguments = function parseArguments(isConst) {\n var item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseArgument = function parseArgument() {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.ARGUMENT,\n name: name,\n value: this.parseValueLiteral(false),\n loc: this.loc(start)\n };\n };\n\n _proto.parseConstArgument = function parseConstArgument() {\n var start = this._lexer.token;\n return {\n kind: Kind.ARGUMENT,\n name: this.parseName(),\n value: (this.expectToken(TokenKind.COLON), this.parseValueLiteral(true)),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n ;\n\n _proto.parseFragment = function parseFragment() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n var hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n ;\n\n _proto.parseFragmentDefinition = function parseFragmentDefinition() {\n var _this$_options;\n\n var start = this._lexer.token;\n this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentName : Name but not `on`\n */\n ;\n\n _proto.parseFragmentName = function parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n ;\n\n _proto.parseValueLiteral = function parseValueLiteral(isConst) {\n var token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this._lexer.advance();\n\n return {\n kind: Kind.INT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.FLOAT:\n this._lexer.advance();\n\n return {\n kind: Kind.FLOAT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this._lexer.advance();\n\n switch (token.value) {\n case 'true':\n return {\n kind: Kind.BOOLEAN,\n value: true,\n loc: this.loc(token)\n };\n\n case 'false':\n return {\n kind: Kind.BOOLEAN,\n value: false,\n loc: this.loc(token)\n };\n\n case 'null':\n return {\n kind: Kind.NULL,\n loc: this.loc(token)\n };\n\n default:\n return {\n kind: Kind.ENUM,\n value: token.value,\n loc: this.loc(token)\n };\n }\n\n case TokenKind.DOLLAR:\n if (!isConst) {\n return this.parseVariable();\n }\n\n break;\n }\n\n throw this.unexpected();\n };\n\n _proto.parseStringLiteral = function parseStringLiteral() {\n var token = this._lexer.token;\n\n this._lexer.advance();\n\n return {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n loc: this.loc(token)\n };\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n ;\n\n _proto.parseList = function parseList(isConst) {\n var _this = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this.parseValueLiteral(isConst);\n };\n\n return {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n */\n ;\n\n _proto.parseObject = function parseObject(isConst) {\n var _this2 = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this2.parseObjectField(isConst);\n };\n\n return {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseObjectField = function parseObjectField(isConst) {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.OBJECT_FIELD,\n name: name,\n value: this.parseValueLiteral(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n ;\n\n _proto.parseDirectives = function parseDirectives(isConst) {\n var directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n /**\n * Directive[Const] : @ Name Arguments[?Const]?\n */\n ;\n\n _proto.parseDirective = function parseDirective(isConst) {\n var start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n ;\n\n _proto.parseTypeReference = function parseTypeReference() {\n var start = this._lexer.token;\n var type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n type = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = {\n kind: Kind.LIST_TYPE,\n type: type,\n loc: this.loc(start)\n };\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return {\n kind: Kind.NON_NULL_TYPE,\n type: type,\n loc: this.loc(start)\n };\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n ;\n\n _proto.parseNamedType = function parseNamedType() {\n var start = this._lexer.token;\n return {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Type Definition section.\n\n /**\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {\n // Many definitions begin with a description and require a lookahead.\n var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n }\n\n throw this.unexpected(keywordToken);\n };\n\n _proto.peekDescription = function peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n ;\n\n _proto.parseDescription = function parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n */\n ;\n\n _proto.parseSchemaDefinition = function parseSchemaDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.many(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n return {\n kind: Kind.SCHEMA_DEFINITION,\n description: description,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n ;\n\n _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {\n var start = this._lexer.token;\n var operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n var type = this.parseNamedType();\n return {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation: operation,\n type: type,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n ;\n\n _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n ;\n\n _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {\n var _this$_options2;\n\n if (!this.expectOptionalKeyword('implements')) {\n return [];\n }\n\n if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {\n var types = []; // Optional leading ampersand\n\n this.expectOptionalToken(TokenKind.AMP);\n\n do {\n types.push(this.parseNamedType());\n } while (this.expectOptionalToken(TokenKind.AMP) || this.peek(TokenKind.NAME));\n\n return types;\n }\n\n return this.delimitedMany(TokenKind.AMP, this.parseNamedType);\n }\n /**\n * FieldsDefinition : { FieldDefinition+ }\n */\n ;\n\n _proto.parseFieldsDefinition = function parseFieldsDefinition() {\n var _this$_options3;\n\n // Legacy support for the SDL?\n if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(TokenKind.BRACE_L) && this._lexer.lookahead().kind === TokenKind.BRACE_R) {\n this._lexer.advance();\n\n this._lexer.advance();\n\n return [];\n }\n\n return this.optionalMany(TokenKind.BRACE_L, this.parseFieldDefinition, TokenKind.BRACE_R);\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n ;\n\n _proto.parseFieldDefinition = function parseFieldDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.FIELD_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n type: type,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n ;\n\n _proto.parseArgumentDefs = function parseArgumentDefs() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseInputValueDef, TokenKind.PAREN_R);\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseInputValueDef = function parseInputValueDef() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseValueLiteral(true);\n }\n\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description: description,\n name: name,\n type: type,\n defaultValue: defaultValue,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n ;\n\n _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n return {\n kind: Kind.UNION_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n ;\n\n _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n ;\n\n _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n return {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * EnumValuesDefinition : { EnumValueDefinition+ }\n */\n ;\n\n _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseEnumValueDefinition, TokenKind.BRACE_R);\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * EnumValue : Name\n */\n ;\n\n _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n ;\n\n _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n return {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InputFieldsDefinition : { InputValueDefinition+ }\n */\n ;\n\n _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseInputValueDef, TokenKind.BRACE_R);\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {\n var keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n */\n ;\n\n _proto.parseSchemaExtension = function parseSchemaExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.optionalMany(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCHEMA_EXTENSION,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n ;\n\n _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n ;\n\n _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n ;\n\n _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n ;\n\n _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.UNION_TYPE_EXTENSION,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n ;\n\n _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n ;\n\n _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n */\n ;\n\n _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n var repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n var locations = this.parseDirectiveLocations();\n return {\n kind: Kind.DIRECTIVE_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n repeatable: repeatable,\n locations: locations,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n ;\n\n _proto.parseDirectiveLocations = function parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n ;\n\n _proto.parseDirectiveLocation = function parseDirectiveLocation() {\n var start = this._lexer.token;\n var name = this.parseName();\n\n if (DirectiveLocation[name.value] !== undefined) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a location object, used to identify the place in the source that created a given parsed object.\n */\n ;\n\n _proto.loc = function loc(startToken) {\n var _this$_options4;\n\n if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {\n return new Location(startToken, this._lexer.lastToken, this._lexer.source);\n }\n }\n /**\n * Determines if the next token is of a given kind\n */\n ;\n\n _proto.peek = function peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectToken = function expectToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n throw syntaxError(this._lexer.source, token.start, \"Expected \".concat(getTokenKindDesc(kind), \", found \").concat(getTokenDesc(token), \".\"));\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and return undefined.\n */\n ;\n\n _proto.expectOptionalToken = function expectOptionalToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n return undefined;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectKeyword = function expectKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n } else {\n throw syntaxError(this._lexer.source, token.start, \"Expected \\\"\".concat(value, \"\\\", found \").concat(getTokenDesc(token), \".\"));\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n ;\n\n _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n ;\n\n _proto.unexpected = function unexpected(atToken) {\n var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(this._lexer.source, token.start, \"Unexpected \".concat(getTokenDesc(token), \".\"));\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.any = function any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.many = function many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n ;\n\n _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n };\n\n return Parser;\n}();\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n var value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? \" \\\"\".concat(value, \"\\\"\") : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? \"\\\"\".concat(kind, \"\\\"\") : kind;\n}\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","export type ClientSize =\n | 'xsmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xlarge'\n | 'xxlarge'\n | 'xxxlarge';\n\nexport const SIZE_TO_VALUE: { [K in ClientSize]?: number } = {\n xsmall: 11795.64,\n small: 29425.54,\n medium: 25382.91,\n large: 22528.67,\n xlarge: 61414,\n xxlarge: 53518.65,\n xxxlarge: 53518.65,\n};\n\nexport default function (size?: ClientSize) {\n if (!size) return undefined;\n\n return SIZE_TO_VALUE[size];\n}\n","import { gql } from '@apollo/client';\n\nimport { Nullable } from '../../../commons/types';\n\nimport { benefitErrorData, errorData } from './fragments';\nimport {\n AccountingFirm,\n BasicError,\n CalculatedDay,\n CompanyAttributes,\n WorkSchedule,\n WorkDay,\n Benefit,\n Employment,\n Subscription,\n Vacation,\n VacationRequest,\n ValidatedAddress,\n User,\n ResetPasswordTokenStatus,\n AdjustmentReportCompressed,\n MedicalCertificate,\n} from './types';\n\nexport interface AdjustEmploymentHourBankMutation {\n adjustEmploymentHourBank: Nullable<{\n errors: Nullable;\n workDay: WorkDay;\n }>;\n}\n\nexport const ADJUST_EMPLOYMENT_HOUR_BANK = gql`\n mutation AdjustEmploymentHourBank($input: AdjustEmploymentHourBankInput!) {\n adjustEmploymentHourBank(input: $input) {\n errors {\n ...ErrorData\n }\n workDay {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface AdjustEmploymentHoursMutation {\n adjustEmploymentHours: Nullable<{\n errors: Nullable;\n calculatedDay: CalculatedDay;\n }>;\n}\n\nexport const ADJUST_EMPLOYMENT_HOURS = gql`\n mutation AdjustEmploymentHours($input: AdjustEmploymentHoursInput!) {\n adjustEmploymentHours(input: $input) {\n errors {\n ...ErrorData\n }\n calculatedDay {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface ResetInitialHourBankMutation {\n resetInitialHourBank: Nullable<{\n errors: Nullable;\n calculatedDay: CalculatedDay;\n }>;\n}\n\nexport const RESET_INITIAL_HOUR_BANK = gql`\n mutation ResetInitialHourBank($input: ResetInitialHourBankInput!) {\n resetInitialHourBank(input: $input) {\n errors {\n ...ErrorData\n }\n calculatedDay {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface AssociateWorkScheduleEmploymentsMutation {\n associateWorkScheduleEmployments: Nullable<{\n errors: Nullable;\n }>;\n}\n\nexport interface OverrideOrCreateWithNameWorkScheduleMutation {\n overrideOrCreateWithNameWorkSchedule: Nullable<{\n created: Nullable;\n errors: Nullable;\n workSchedule: Nullable;\n }>;\n}\n\nexport const ASSOCIATE_WORK_SCHEDULE_EMPLOYMENTS = gql`\n mutation AssociateWorkScheduleEmployments(\n $input: AssociateWorkScheduleEmploymentsInput!\n ) {\n associateWorkScheduleEmployments(input: $input) {\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport const OVERRIDE_OR_CREATE_WITH_NAME_WORK_SCHEDULE = gql`\n mutation OverrideOrCreateWithNameWorkSchedule(\n $input: OverrideOrCreateWithNameWorkScheduleInput!\n ) {\n overrideOrCreateWithNameWorkSchedule(input: $input) {\n created\n errors {\n ...ErrorData\n }\n workSchedule {\n id\n name\n fingerprint\n nextStartDate\n companyId\n workScheduleDays {\n dayOrder\n flexIntervalMinutes\n flexScheduleMinutes\n overnight\n preAssigned\n workScheduleHours {\n hourOrder\n scheduleTime\n }\n }\n }\n }\n }\n ${errorData}\n`;\n\nexport type UpdateCompanyData = Nullable<{\n errors: Nullable;\n company: CompanyAttributes;\n}>;\n\nexport interface UpdateCompanyDataMutation {\n updateCompanyData: UpdateCompanyData;\n}\n\nexport const UPDATE_COMPANY_DATA = gql`\n mutation UpdateCompanyData($input: UpdateCompanyInput!) {\n updateCompany(input: $input) {\n errors {\n ...ErrorData\n }\n company {\n adjustedTimetrackingSuggestionEnabled\n clockOnly\n clockPhotoEnabled\n cnpj\n customizeReportLogo\n defaultDebitTimeAllocation\n geoPermissions\n hourBankBalanceEnabled\n name\n reminderEnabled\n timetrackingPhotoEnabled\n vacationRequestEnabled\n timezoneId\n timezone {\n id\n name\n }\n address {\n city\n complement\n country\n name\n neighborhood\n number\n postalCode\n state\n }\n }\n }\n }\n ${errorData}\n`;\n\nexport interface UpdateCompanyEmploymentsDataMutation {\n updateCompanyEmploymentsData: Nullable<{\n errors: Nullable;\n updated: boolean;\n }>;\n}\n\nexport const UPDATE_COMPANY_EMPLOYMENTS_DATA = gql`\n mutation UpdateCompanyEmploymentsData(\n $input: UpdateAllCompanyEmploymentsInput!\n ) {\n updateAllCompanyEmployments(input: $input) {\n errors {\n ...ErrorData\n }\n updated\n }\n }\n ${errorData}\n`;\n\nexport interface RequestBenefitMutation {\n requestBenefit: Nullable<{\n errors: Nullable;\n benefit: Nullable;\n formData: string;\n }>;\n}\n\nexport const REQUEST_BENEFIT = gql`\n mutation RequestBenefit($input: RequestBenefitInput!, $companyId: ID!) {\n requestBenefit(input: $input, companyId: $companyId) {\n errors {\n ...BenefitErrorData\n }\n formData\n benefit {\n id\n active\n baseRedirectUrl\n category\n description\n externalOnly\n formSchema\n productName\n provider\n redirect\n redirectUrlParameters\n shortDescription\n thumbnailUrl\n }\n }\n }\n ${benefitErrorData}\n`;\n\nexport interface ChangePlanMutation {\n changePlan: Nullable<{\n errors: Nullable;\n updated: boolean;\n }>;\n}\n\nexport const CHANGE_PLAN = gql`\n mutation ChangePlan($input: ChangePlanInput!) {\n changePlan(input: $input) {\n subscription {\n id\n beginTesting\n daysOfTesting\n testing\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface StartTrialMutation {\n startTrial: Nullable<{\n errors: Nullable;\n subscription: Nullable;\n }>;\n}\n\nexport const START_TRIAL = gql`\n mutation StartTrial($input: StartTrialInput!) {\n startTrial(input: $input) {\n subscription {\n beginTesting\n createdAt\n daysOfTesting\n id\n testing\n updatedAt\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\ntype EmploymentConnection = {\n edges: Array<{\n node: Employment;\n }>;\n totalCount: number;\n};\n\nexport interface WaiveRangeMutation {\n waiveRange: Nullable<{\n employments: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const WAIVE_RANGE = gql`\n mutation WaiveRange($input: WaiveRangeInput!) {\n waiveRange(input: $input) {\n employments {\n edges {\n node {\n id\n }\n }\n totalCount\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface DeleteVacation {\n deleteVacation: {\n errors: Nullable;\n deletedVacation: Nullable;\n };\n}\n\nexport const DELETE_VACATION = gql`\n mutation DeleteVacation($input: DeleteVacationInput!) {\n deleteVacation(input: $input) {\n errors {\n message\n path\n }\n deletedVacation {\n id\n status\n startDate\n endDate\n }\n }\n }\n`;\nexport interface CreateVacationMutation {\n createVacation: Nullable<{\n vacation: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const CREATE_VACATION = gql`\n mutation CreateVacation($input: CreateVacationInput!) {\n createVacation(input: $input) {\n vacation {\n id\n startDate\n endDate\n status\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface AcceptVacationRequestMutation {\n acceptVacationRequest: {\n vacationRequest: Nullable;\n errors: Nullable;\n };\n}\n\nexport const ACCEPT_VACATION_REQUEST = gql`\n mutation AcceptVacationRequest($input: AcceptVacationRequestInput!) {\n acceptVacationRequest(input: $input) {\n vacationRequest {\n createdAt\n endDate\n id\n requestReason\n requesterId\n reviewReason\n reviewedAt\n reviewerId\n startDate\n status\n updatedAt\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface RejectVacationRequestMutation {\n rejectVacationRequest: {\n vacationRequest: Nullable;\n errors: Nullable;\n };\n}\n\nexport const REJECT_VACATION_REQUEST = gql`\n mutation RejectVacationRequest($input: RejectVacationRequestInput!) {\n rejectVacationRequest(input: $input) {\n vacationRequest {\n createdAt\n endDate\n id\n requestReason\n requesterId\n reviewReason\n reviewedAt\n reviewerId\n startDate\n status\n updatedAt\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface ValidateCreateVacationMutation {\n validateCreateVacation: Nullable<{\n valid: boolean;\n errors: Nullable;\n }>;\n}\n\nexport const VALIDATE_CREATE_VACATION = gql`\n mutation ValidateCreateVacation($input: ValidateCreateVacationInput!) {\n validateCreateVacation(input: $input) {\n valid\n errors {\n extensions {\n code\n validation\n }\n message\n path\n }\n }\n }\n`;\n\nexport interface ValidatePostalCodeMutation {\n validatePostalCode: Nullable<{\n validatedAddress: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const VALIDATE_POSTAL_CODE = gql`\n mutation ValidatePostalCode($input: ValidatePostalCodeInput!) {\n validatePostalCode(input: $input) {\n validatedAddress {\n city\n neighborhood\n cep\n state\n street\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface SetClientMarketingEventSentMutation {\n setClientMarketingEventSent: Nullable<{\n errors: Nullable;\n success: boolean;\n }>;\n}\n\nexport const SET_CLIENT_MARKETING_EVENT_SENT = gql`\n mutation SetClientMarketingEventSent(\n $input: SetClientMarketingEventSentInput!\n ) {\n setClientMarketingEventSent(input: $input) {\n errors {\n ...ErrorData\n }\n success\n }\n }\n ${errorData}\n`;\n\nexport interface GenerateTechnicalCertificateMutation {\n generateTechnicalCertificate: Nullable<{\n company: Nullable<{\n id: string;\n name: string;\n }>;\n errors: Nullable;\n }>;\n}\nexport const GENERATE_TECHNICAL_CERTIFICATE = gql`\n mutation generateTechnicalCertificate(\n $input: GenerateTechnicalCertificateInput!\n ) {\n generateTechnicalCertificate(input: $input) {\n errors {\n ...ErrorData\n }\n company {\n id\n name\n }\n }\n }\n ${errorData}\n`;\n\nexport interface SignupUserMutation {\n signupUser: Nullable<{\n errors: Nullable;\n user: Nullable<{\n id: string;\n }>;\n }>;\n}\nexport const SIGNUP_USER = gql`\n mutation SignupUser($input: SignupUserInput!) {\n signupUser(input: $input) {\n errors {\n ...ErrorData\n }\n user {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface ValidateEmailMutation {\n validateEmail: Nullable<{\n errors: Nullable;\n valid: boolean;\n }>;\n}\n\nexport const VALIDATE_EMAIL = gql`\n mutation ValidateEmail($input: ValidateEmailInput!) {\n validateEmail(input: $input) {\n errors {\n ...ErrorData\n }\n valid\n }\n }\n ${errorData}\n`;\n\nexport interface ValidatePhoneNumberMutation {\n validatePhoneNumber: Nullable<{\n errors: Nullable;\n valid: boolean;\n }>;\n}\n\nexport const VALIDATE_PHONE_NUMBER = gql`\n mutation ValidatePhoneNumber($input: ValidatePhoneNumberInput!) {\n validatePhoneNumber(input: $input) {\n errors {\n ...ErrorData\n }\n valid\n }\n }\n ${errorData}\n`;\n\nexport interface AuthenticateUserMutation {\n authenticateUser: Nullable<{\n errors: Nullable;\n user: Nullable;\n }>;\n}\n\nexport const AUTHENTICATE_USER = gql`\n mutation AuthenticateUser($input: AuthenticateUserInput!) {\n authenticateUser(input: $input) {\n errors {\n ...ErrorData\n }\n user {\n status\n authenticationToken\n }\n }\n }\n ${errorData}\n`;\n\nexport interface ResetUserPasswordMutation {\n resetUserPassword: Nullable<{\n errors: Nullable;\n user: Nullable;\n }>;\n}\n\nexport const RESET_USER_PASSWORD = gql`\n mutation ResetUserPassword($input: ResetUserPasswordInput!) {\n resetUserPassword(input: $input) {\n errors {\n ...ErrorData\n }\n user {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface UpdateUserPasswordMutation {\n updateUserPassword: Nullable<{\n errors: Nullable;\n user: Nullable;\n }>;\n}\n\nexport const UPDATE_USER_PASSWORD = gql`\n mutation UpdateUserPassword($input: UpdateUserPasswordInput!) {\n updateUserPassword(input: $input) {\n errors {\n message\n }\n user {\n id\n }\n }\n }\n`;\n\nexport interface ValidateResetPasswordTokenMutation {\n validateResetPasswordToken: Nullable<{\n resetPasswordTokenStatus: Nullable;\n }>;\n}\n\nexport const VALIDATE_RESET_PASSWORD_TOKEN = gql`\n mutation ValidateResetPasswordToken(\n $input: ValidateResetPasswordTokenInput!\n ) {\n validateResetPasswordToken(input: $input) {\n resetPasswordTokenStatus\n }\n }\n`;\n\nexport interface SignoutUserMutation {\n signoutUser: Nullable<{\n errors: Nullable;\n user: Nullable<{\n id: string;\n }>;\n }>;\n}\n\nexport const SIGNOUT_USER = gql`\n mutation SignoutUser {\n signoutUser(input: {}) {\n errors {\n ...ErrorData\n }\n user {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface CreateFirstAccountingFirmMutation {\n createFirstAccountingFirm: Nullable<{\n accountingFirm: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const CREATE_FIRST_ACCOUNTING_FIRM = gql`\n mutation CreateFirstAccountingFirm($input: CreateFirstAccountingFirmInput!) {\n createFirstAccountingFirm(input: $input) {\n errors {\n ...ErrorData\n }\n accountingFirm {\n id\n active\n name\n size\n }\n }\n }\n ${errorData}\n`;\n\nexport interface AcceptAccountingFirmInvitationMutation {\n acceptAccountingFirmInvitation: Nullable<{\n accountingFirmInvitations: Array<{\n status: string;\n }>;\n errors: Nullable;\n }>;\n}\nexport const ACCEPT_ACCOUNTING_FIRM_INVITATION = gql`\n mutation AcceptAccountingFirmInvitation(\n $input: AcceptAccountingFirmInvitationInput!\n ) {\n acceptAccountingFirmInvitation(input: $input) {\n errors {\n ...ErrorData\n }\n accountingFirmInvitations {\n status\n }\n }\n }\n ${errorData}\n`;\n\nexport interface ShareAdjustmentReportCompressedMutation {\n shareAdjustmentReportCompressed: Nullable<{\n adjustmentReportCompressed: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const SHARE_ADJUSTMENT_REPORT_COMPRESSED = gql`\n mutation ShareAdjustmentReportCompressed(\n $input: ShareAdjustmentReportCompressedInput!\n ) {\n shareAdjustmentReportCompressed(input: $input) {\n adjustmentReportCompressed {\n createdAt\n id\n requester {\n id\n }\n requesterId\n s3ObjectKey\n shared\n sharedAt\n sharedBy {\n id\n }\n sharedById\n startDate\n status\n statusMessage\n updatedAt\n }\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface InviteAccountantMutation {\n inviteAccountant: Nullable<{\n adjustmentReportCompressed: Nullable;\n invitationUrl: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const INVITE_ACCOUNTANT = gql`\n mutation InviteAccountantMutation($input: InviteAccountantInput!) {\n inviteAccountant(input: $input) {\n adjustmentReportCompressed {\n createdAt\n id\n requester {\n id\n }\n requesterId\n s3ObjectKey\n shared\n sharedAt\n sharedBy {\n id\n }\n sharedById\n startDate\n status\n statusMessage\n updatedAt\n }\n invitationUrl\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\n\nexport interface CreateAccountantUserMutation {\n createAccountantUser: Nullable<{\n errors: Nullable;\n user: Nullable;\n }>;\n}\n\nexport const CREATE_ACCOUNTANT_USER = gql`\n mutation CreateAccountantUser($input: CreateAccountantUserInput!) {\n createAccountantUser(input: $input) {\n errors {\n ...ErrorData\n }\n user {\n id\n }\n }\n }\n ${errorData}\n`;\n\nexport interface CreateAccountingFirmInvitationMutation {\n createAccountingFirmInvitation: Nullable<{\n invitationUrl: Nullable;\n errors: Nullable;\n }>;\n}\n\nexport const CREATE_ACCOUNTING_FIRM_INVITATION = gql`\n mutation CreateAccountingFirmInvitationMutation(\n $input: CreateAccountingFirmInvitationInput!\n ) {\n createAccountingFirmInvitation(input: $input) {\n invitationUrl\n errors {\n ...ErrorData\n }\n }\n }\n ${errorData}\n`;\nexport interface DeleteCompanyMedicalCertificate {\n deleteCompanyMedicalCertificate: {\n errors: Nullable;\n deletedCompanyMedicalCertificate: Nullable;\n };\n}\n\nexport const DELETE_COMPANY_MEDICAL_CERTIFICATE = gql`\n mutation DeleteCompanyMedicalCertificate($id: ID!) {\n deleteCompanyMedicalCertificate(input: { id: $id }) {\n errors {\n message\n }\n deletedCompanyMedicalCertificate {\n id\n }\n }\n }\n`;\n\nexport interface RejectMedicalCertificateProps {\n rejectMedicalCertificate: {\n errors: Nullable;\n rejectedMedicalCertificate: Nullable;\n };\n}\n\nexport const REJECT_MEDICAL_CERTIFICATE = gql`\n mutation RejectMedicalCertificate($input: RejectInput!) {\n rejectMedicalCertificate(input: $input) {\n medicalCertificate {\n id\n status\n }\n errors {\n message\n }\n }\n }\n`;\n\nexport interface ApproveMedicalCertificateProps {\n approveMedicalCertificate: {\n errors: Nullable;\n approvedMedicalCertificate: Nullable;\n };\n}\n\nexport const APPROVE_MEDICAL_CERTIFICATE = gql`\n mutation ApproveMedicalCertificate($input: ApproveInput!) {\n approveMedicalCertificate(input: $input) {\n medicalCertificate {\n id\n status\n }\n errors {\n message\n }\n }\n }\n`;\n\nexport interface ShowMedicalCertificatesInterestProps {\n showMedicalCertificatesInterest: {\n message: boolean;\n };\n}\n\nexport const SHOW_MEDICAL_CERTIFICATES_INTEREST = gql`\n mutation ShowCertificatesInterest($companyId: ID!) {\n showCertificatesInterest(input: { companyId: $companyId }) {\n message\n }\n }\n`;\n","/* eslint-disable camelcase */\nimport { isUndefined, omitBy } from 'lodash';\n\nimport { AccountStage, BillingStage } from '../commons/api/v1/company';\nimport { EmploymentMetaData } from '../employment/store/types';\nimport { Role } from '../employment/types';\nimport { ClientSize } from '../analytics/helpers/mapClientSizeToLTV';\n\nimport readMetaTagObject from './readMetaTagObject';\n\nexport const EMPLOYMENT_META_DATA_TAG = 'x-employment-meta-data';\n\nexport type XEmploymentMetaData = {\n account_stage: AccountStage;\n billing_stage: BillingStage;\n client_id: number;\n company_has_address: boolean;\n company_id: number;\n company_name: string;\n company_has_any_active_accounting_contract: boolean;\n company_has_any_adjustment_report_shared: boolean;\n company_old_excel_reports_and_hour_bank_page_enabled: boolean;\n client_size?: ClientSize;\n employment_id: number;\n employment_role: Role;\n first_attached_user_id: number;\n has_accepted_terms: boolean;\n marketing_event_sent: boolean;\n override_feature_timetracking_excel_reports: boolean;\n user_cpf: string;\n user_email: string;\n user_created_at: string;\n user_first_name: string;\n user_hash: string;\n user_has_active_accountant: boolean;\n user_id: number;\n user_phone_number: string;\n won_probability: number;\n health_access_enabled: boolean;\n};\n\nexport default function getEmploymentMetaData() {\n const {\n account_stage: accountStage,\n billing_stage: billingStage,\n client_id: clientId,\n company_has_address: companyHasAddress,\n company_id: companyId,\n company_name: companyName,\n company_has_any_active_accounting_contract: companyHasAnyActiveAccountingContract,\n company_has_any_adjustment_report_shared: companyHasAnyAdjustmentReportShared,\n company_old_excel_reports_and_hour_bank_page_enabled: companyOldExcelReportsAndHourBankPageEnabled,\n client_size: clientSize,\n employment_id: employmentId,\n employment_role: employmentRole,\n first_attached_user_id: firstAttachedUserId,\n has_accepted_terms: hasAcceptedTerms,\n marketing_event_sent: marketingEventSent,\n override_feature_timetracking_excel_reports: overrideFeatureTimetrackingExcelReports,\n user_cpf: userCpf,\n user_email: userEmail,\n user_first_name: userFirstName,\n user_created_at: userCreatedAt,\n user_hash: userHash,\n user_has_active_accountant: userHasActiveAccountant,\n user_id: userId,\n user_phone_number: userPhoneNumber,\n won_probability: wonProbability,\n health_access_enabled: healthAccessEnabled,\n }: XEmploymentMetaData = readMetaTagObject({\n tagName: EMPLOYMENT_META_DATA_TAG,\n });\n\n const metaData = {\n accountStage,\n billingStage,\n clientId,\n companyHasAddress,\n companyId,\n companyName,\n companyHasAnyActiveAccountingContract,\n companyHasAnyAdjustmentReportShared,\n companyOldExcelReportsAndHourBankPageEnabled,\n clientSize,\n employmentId,\n employmentRole,\n firstAttachedUserId,\n hasAcceptedTerms,\n marketingEventSent,\n overrideFeatureTimetrackingExcelReports,\n userCpf,\n userEmail,\n userCreatedAt,\n userFirstName,\n userHash,\n userHasActiveAccountant,\n userId,\n userPhoneNumber,\n wonProbability,\n healthAccessEnabled,\n };\n\n return omitBy(metaData, isUndefined) as EmploymentMetaData;\n}\n","import { isEmpty } from 'lodash';\n\nimport getMetaContent from './getMetaContent';\n\nexport default function readMetaTagObject({ tagName }: { tagName: string }) {\n const content = getMetaContent(tagName);\n if (isEmpty(content)) return {};\n\n return JSON.parse(b64DecodeUnicode(content));\n}\n\nfunction b64DecodeUnicode(content: string) {\n return decodeURIComponent(\n Array.prototype.map\n .call(\n atob(content),\n (character: string) =>\n `%${`00${character.charCodeAt(0).toString(16)}`.slice(-2)}`,\n )\n .join(''),\n );\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable flowtype/no-weak-types */\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\nvar MAX_ARRAY_LENGTH = 10;\nvar MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport default function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (_typeof(value)) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? \"[function \".concat(value.name, \"]\") : '[function]';\n\n case 'object':\n if (value === null) {\n return 'null';\n }\n\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (previouslySeenValues.indexOf(value) !== -1) {\n return '[Circular]';\n }\n\n var seenValues = [].concat(previouslySeenValues, [value]);\n var customInspectFn = getCustomFn(value);\n\n if (customInspectFn !== undefined) {\n var customValue = customInspectFn.call(value); // check for infinite recursion\n\n if (customValue !== value) {\n return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction formatObject(object, seenValues) {\n var keys = Object.keys(object);\n\n if (keys.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n var properties = keys.map(function (key) {\n var value = formatValue(object[key], seenValues);\n return key + ': ' + value;\n });\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n var len = Math.min(MAX_ARRAY_LENGTH, array.length);\n var remaining = array.length - len;\n var items = [];\n\n for (var i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(\"... \".concat(remaining, \" more items\"));\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getCustomFn(object) {\n var customInspectFn = object[String(nodejsCustomInspectSymbol)];\n\n if (typeof customInspectFn === 'function') {\n return customInspectFn;\n }\n\n if (typeof object.inspect === 'function') {\n return object.inspect;\n }\n}\n\nfunction getObjectTag(object) {\n var tag = Object.prototype.toString.call(object).replace(/^\\[object /, '').replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n var name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { __assign } from \"tslib\";\nimport { KeyTrie } from 'optimism';\nimport { invariant, InvariantError } from 'ts-invariant';\nimport { getFragmentFromSelection, isField, getTypenameFromResult, storeKeyNameFromField, argumentsObjectFromField, isReference, getStoreKeyName, canUseWeakMap, } from \"../../utilities/index.js\";\nimport { hasOwn, fieldNameFromStoreName, isFieldValueToBeMerged, storeValueIsStoreObject, selectionSetMatchesResult, TypeOrFieldNameRegExp, } from \"./helpers.js\";\nimport { cacheSlot } from \"./reactiveVars.js\";\nfunction argsFromFieldSpecifier(spec) {\n return spec.args !== void 0 ? spec.args :\n spec.field ? argumentsObjectFromField(spec.field, spec.variables) : null;\n}\nexport var defaultDataIdFromObject = function (_a, context) {\n var __typename = _a.__typename, id = _a.id, _id = _a._id;\n if (typeof __typename === \"string\") {\n if (context) {\n context.keyObject =\n id !== void 0 ? { id: id } :\n _id !== void 0 ? { _id: _id } :\n void 0;\n }\n if (id === void 0)\n id = _id;\n if (id !== void 0) {\n return __typename + \":\" + ((typeof id === \"number\" ||\n typeof id === \"string\") ? id : JSON.stringify(id));\n }\n }\n};\nvar nullKeyFieldsFn = function () { return void 0; };\nvar simpleKeyArgsFn = function (_args, context) { return context.fieldName; };\nvar mergeTrueFn = function (existing, incoming, _a) {\n var mergeObjects = _a.mergeObjects;\n return mergeObjects(existing, incoming);\n};\nvar mergeFalseFn = function (_, incoming) { return incoming; };\nvar Policies = (function () {\n function Policies(config) {\n this.config = config;\n this.typePolicies = Object.create(null);\n this.supertypeMap = new Map();\n this.fuzzySubtypes = new Map();\n this.rootIdsByTypename = Object.create(null);\n this.rootTypenamesById = Object.create(null);\n this.usingPossibleTypes = false;\n this.config = __assign({ dataIdFromObject: defaultDataIdFromObject }, config);\n this.cache = this.config.cache;\n this.setRootTypename(\"Query\");\n this.setRootTypename(\"Mutation\");\n this.setRootTypename(\"Subscription\");\n if (config.possibleTypes) {\n this.addPossibleTypes(config.possibleTypes);\n }\n if (config.typePolicies) {\n this.addTypePolicies(config.typePolicies);\n }\n }\n Policies.prototype.identify = function (object, selectionSet, fragmentMap) {\n var typename = selectionSet && fragmentMap\n ? getTypenameFromResult(object, selectionSet, fragmentMap)\n : object.__typename;\n if (typename === this.rootTypenamesById.ROOT_QUERY) {\n return [\"ROOT_QUERY\"];\n }\n var context = {\n typename: typename,\n selectionSet: selectionSet,\n fragmentMap: fragmentMap,\n };\n var id;\n var policy = this.getTypePolicy(typename, false);\n var keyFn = policy && policy.keyFn || this.config.dataIdFromObject;\n while (keyFn) {\n var specifierOrId = keyFn(object, context);\n if (Array.isArray(specifierOrId)) {\n keyFn = keyFieldsFnFromSpecifier(specifierOrId);\n }\n else {\n id = specifierOrId;\n break;\n }\n }\n id = id && String(id);\n return context.keyObject ? [id, context.keyObject] : [id];\n };\n Policies.prototype.addTypePolicies = function (typePolicies) {\n var _this = this;\n Object.keys(typePolicies).forEach(function (typename) {\n var existing = _this.getTypePolicy(typename, true);\n var incoming = typePolicies[typename];\n var keyFields = incoming.keyFields, fields = incoming.fields;\n if (incoming.queryType)\n _this.setRootTypename(\"Query\", typename);\n if (incoming.mutationType)\n _this.setRootTypename(\"Mutation\", typename);\n if (incoming.subscriptionType)\n _this.setRootTypename(\"Subscription\", typename);\n existing.keyFn =\n keyFields === false ? nullKeyFieldsFn :\n Array.isArray(keyFields) ? keyFieldsFnFromSpecifier(keyFields) :\n typeof keyFields === \"function\" ? keyFields :\n existing.keyFn;\n if (fields) {\n Object.keys(fields).forEach(function (fieldName) {\n var existing = _this.getFieldPolicy(typename, fieldName, true);\n var incoming = fields[fieldName];\n if (typeof incoming === \"function\") {\n existing.read = incoming;\n }\n else {\n var keyArgs = incoming.keyArgs, read = incoming.read, merge = incoming.merge;\n existing.keyFn =\n keyArgs === false ? simpleKeyArgsFn :\n Array.isArray(keyArgs) ? keyArgsFnFromSpecifier(keyArgs) :\n typeof keyArgs === \"function\" ? keyArgs :\n existing.keyFn;\n if (typeof read === \"function\")\n existing.read = read;\n existing.merge =\n typeof merge === \"function\" ? merge :\n merge === true ? mergeTrueFn :\n merge === false ? mergeFalseFn :\n existing.merge;\n }\n if (existing.read && existing.merge) {\n existing.keyFn = existing.keyFn || simpleKeyArgsFn;\n }\n });\n }\n });\n };\n Policies.prototype.setRootTypename = function (which, typename) {\n if (typename === void 0) { typename = which; }\n var rootId = \"ROOT_\" + which.toUpperCase();\n var old = this.rootTypenamesById[rootId];\n if (typename !== old) {\n process.env.NODE_ENV === \"production\" ? invariant(!old || old === which, 1) : invariant(!old || old === which, \"Cannot change root \" + which + \" __typename more than once\");\n if (old)\n delete this.rootIdsByTypename[old];\n this.rootIdsByTypename[typename] = rootId;\n this.rootTypenamesById[rootId] = typename;\n }\n };\n Policies.prototype.addPossibleTypes = function (possibleTypes) {\n var _this = this;\n this.usingPossibleTypes = true;\n Object.keys(possibleTypes).forEach(function (supertype) {\n _this.getSupertypeSet(supertype, true);\n possibleTypes[supertype].forEach(function (subtype) {\n _this.getSupertypeSet(subtype, true).add(supertype);\n var match = subtype.match(TypeOrFieldNameRegExp);\n if (!match || match[0] !== subtype) {\n _this.fuzzySubtypes.set(subtype, new RegExp(subtype));\n }\n });\n });\n };\n Policies.prototype.getTypePolicy = function (typename, createIfMissing) {\n if (typename) {\n return this.typePolicies[typename] || (createIfMissing && (this.typePolicies[typename] = Object.create(null)));\n }\n };\n Policies.prototype.getFieldPolicy = function (typename, fieldName, createIfMissing) {\n var typePolicy = this.getTypePolicy(typename, createIfMissing);\n if (typePolicy) {\n var fieldPolicies = typePolicy.fields || (createIfMissing && (typePolicy.fields = Object.create(null)));\n if (fieldPolicies) {\n return fieldPolicies[fieldName] || (createIfMissing && (fieldPolicies[fieldName] = Object.create(null)));\n }\n }\n };\n Policies.prototype.getSupertypeSet = function (subtype, createIfMissing) {\n var supertypeSet = this.supertypeMap.get(subtype);\n if (!supertypeSet && createIfMissing) {\n this.supertypeMap.set(subtype, supertypeSet = new Set());\n }\n return supertypeSet;\n };\n Policies.prototype.fragmentMatches = function (fragment, typename, result, variables) {\n var _this = this;\n if (!fragment.typeCondition)\n return true;\n if (!typename)\n return false;\n var supertype = fragment.typeCondition.name.value;\n if (typename === supertype)\n return true;\n if (this.usingPossibleTypes &&\n this.supertypeMap.has(supertype)) {\n var typenameSupertypeSet = this.getSupertypeSet(typename, true);\n var workQueue_1 = [typenameSupertypeSet];\n var maybeEnqueue_1 = function (subtype) {\n var supertypeSet = _this.getSupertypeSet(subtype, false);\n if (supertypeSet &&\n supertypeSet.size &&\n workQueue_1.indexOf(supertypeSet) < 0) {\n workQueue_1.push(supertypeSet);\n }\n };\n var needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);\n var checkingFuzzySubtypes = false;\n for (var i = 0; i < workQueue_1.length; ++i) {\n var supertypeSet = workQueue_1[i];\n if (supertypeSet.has(supertype)) {\n if (!typenameSupertypeSet.has(supertype)) {\n if (checkingFuzzySubtypes) {\n process.env.NODE_ENV === \"production\" || invariant.warn(\"Inferring subtype \" + typename + \" of supertype \" + supertype);\n }\n typenameSupertypeSet.add(supertype);\n }\n return true;\n }\n supertypeSet.forEach(maybeEnqueue_1);\n if (needToCheckFuzzySubtypes &&\n i === workQueue_1.length - 1 &&\n selectionSetMatchesResult(fragment.selectionSet, result, variables)) {\n needToCheckFuzzySubtypes = false;\n checkingFuzzySubtypes = true;\n this.fuzzySubtypes.forEach(function (regExp, fuzzyString) {\n var match = typename.match(regExp);\n if (match && match[0] === typename) {\n maybeEnqueue_1(fuzzyString);\n }\n });\n }\n }\n }\n return false;\n };\n Policies.prototype.getStoreFieldName = function (fieldSpec) {\n var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;\n var policy = this.getFieldPolicy(typename, fieldName, false);\n var storeFieldName;\n var keyFn = policy && policy.keyFn;\n if (keyFn && typename) {\n var context = {\n typename: typename,\n fieldName: fieldName,\n field: fieldSpec.field || null,\n variables: fieldSpec.variables,\n };\n var args = argsFromFieldSpecifier(fieldSpec);\n while (keyFn) {\n var specifierOrString = keyFn(args, context);\n if (Array.isArray(specifierOrString)) {\n keyFn = keyArgsFnFromSpecifier(specifierOrString);\n }\n else {\n storeFieldName = specifierOrString || fieldName;\n break;\n }\n }\n }\n if (storeFieldName === void 0) {\n storeFieldName = fieldSpec.field\n ? storeKeyNameFromField(fieldSpec.field, fieldSpec.variables)\n : getStoreKeyName(fieldName, argsFromFieldSpecifier(fieldSpec));\n }\n return fieldName === fieldNameFromStoreName(storeFieldName)\n ? storeFieldName\n : fieldName + \":\" + storeFieldName;\n };\n Policies.prototype.readField = function (options, context) {\n var objectOrReference = options.from;\n if (!objectOrReference)\n return;\n var nameOrField = options.field || options.fieldName;\n if (!nameOrField)\n return;\n if (options.typename === void 0) {\n var typename = context.store.getFieldValue(objectOrReference, \"__typename\");\n if (typename)\n options.typename = typename;\n }\n var storeFieldName = this.getStoreFieldName(options);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var existing = context.store.getFieldValue(objectOrReference, storeFieldName);\n var policy = this.getFieldPolicy(options.typename, fieldName, false);\n var read = policy && policy.read;\n if (read) {\n var readOptions = makeFieldFunctionOptions(this, objectOrReference, options, context, context.store.getStorage(isReference(objectOrReference)\n ? objectOrReference.__ref\n : objectOrReference, storeFieldName));\n return cacheSlot.withValue(this.cache, read, [existing, readOptions]);\n }\n return existing;\n };\n Policies.prototype.hasMergeFunction = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return !!(policy && policy.merge);\n };\n Policies.prototype.applyMerges = function (existing, incoming, context, storageKeys) {\n var _a;\n var _this = this;\n if (isFieldValueToBeMerged(incoming)) {\n var field = incoming.__field;\n var fieldName = field.name.value;\n var merge = this.getFieldPolicy(incoming.__typename, fieldName, false).merge;\n incoming = merge(existing, incoming.__value, makeFieldFunctionOptions(this, void 0, { typename: incoming.__typename, fieldName: fieldName,\n field: field, variables: context.variables }, context, storageKeys\n ? (_a = context.store).getStorage.apply(_a, storageKeys) : Object.create(null)));\n }\n if (Array.isArray(incoming)) {\n return incoming.map(function (item) { return _this.applyMerges(void 0, item, context); });\n }\n if (storeValueIsStoreObject(incoming)) {\n var e_1 = existing;\n var i_1 = incoming;\n var firstStorageKey_1 = isReference(e_1)\n ? e_1.__ref\n : typeof e_1 === \"object\" && e_1;\n var newFields_1;\n Object.keys(i_1).forEach(function (storeFieldName) {\n var incomingValue = i_1[storeFieldName];\n var appliedValue = _this.applyMerges(context.store.getFieldValue(e_1, storeFieldName), incomingValue, context, firstStorageKey_1 ? [firstStorageKey_1, storeFieldName] : void 0);\n if (appliedValue !== incomingValue) {\n newFields_1 = newFields_1 || Object.create(null);\n newFields_1[storeFieldName] = appliedValue;\n }\n });\n if (newFields_1) {\n return __assign(__assign({}, i_1), newFields_1);\n }\n }\n return incoming;\n };\n return Policies;\n}());\nexport { Policies };\nfunction makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {\n var storeFieldName = policies.getStoreFieldName(fieldSpec);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var variables = fieldSpec.variables || context.variables;\n var _a = context.store, getFieldValue = _a.getFieldValue, toReference = _a.toReference, canRead = _a.canRead;\n return {\n args: argsFromFieldSpecifier(fieldSpec),\n field: fieldSpec.field || null,\n fieldName: fieldName,\n storeFieldName: storeFieldName,\n variables: variables,\n isReference: isReference,\n toReference: toReference,\n storage: storage,\n cache: policies.cache,\n canRead: canRead,\n readField: function (fieldNameOrOptions, from) {\n var options = typeof fieldNameOrOptions === \"string\" ? {\n fieldName: fieldNameOrOptions,\n from: from,\n } : __assign({}, fieldNameOrOptions);\n if (void 0 === options.from) {\n options.from = objectOrReference;\n }\n if (void 0 === options.variables) {\n options.variables = variables;\n }\n return policies.readField(options, context);\n },\n mergeObjects: function (existing, incoming) {\n if (Array.isArray(existing) || Array.isArray(incoming)) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(2) : new InvariantError(\"Cannot automatically merge arrays\");\n }\n if (existing && typeof existing === \"object\" &&\n incoming && typeof incoming === \"object\") {\n var eType = getFieldValue(existing, \"__typename\");\n var iType = getFieldValue(incoming, \"__typename\");\n var typesDiffer = eType && iType && eType !== iType;\n var applied = policies.applyMerges(typesDiffer ? void 0 : existing, incoming, context);\n if (typesDiffer ||\n !storeValueIsStoreObject(existing) ||\n !storeValueIsStoreObject(applied)) {\n return applied;\n }\n return __assign(__assign({}, existing), applied);\n }\n return incoming;\n }\n };\n}\nfunction keyArgsFnFromSpecifier(specifier) {\n return function (args, context) {\n return args ? context.fieldName + \":\" + JSON.stringify(computeKeyObject(args, specifier)) : context.fieldName;\n };\n}\nfunction keyFieldsFnFromSpecifier(specifier) {\n var trie = new KeyTrie(canUseWeakMap);\n return function (object, context) {\n var aliasMap;\n if (context.selectionSet && context.fragmentMap) {\n var info = trie.lookupArray([\n context.selectionSet,\n context.fragmentMap,\n ]);\n aliasMap = info.aliasMap || (info.aliasMap = makeAliasMap(context.selectionSet, context.fragmentMap));\n }\n var keyObject = context.keyObject =\n computeKeyObject(object, specifier, aliasMap);\n return context.typename + \":\" + JSON.stringify(keyObject);\n };\n}\nfunction makeAliasMap(selectionSet, fragmentMap) {\n var map = Object.create(null);\n var workQueue = new Set([selectionSet]);\n workQueue.forEach(function (selectionSet) {\n selectionSet.selections.forEach(function (selection) {\n if (isField(selection)) {\n if (selection.alias) {\n var responseKey = selection.alias.value;\n var storeKey = selection.name.value;\n if (storeKey !== responseKey) {\n var aliases = map.aliases || (map.aliases = Object.create(null));\n aliases[storeKey] = responseKey;\n }\n }\n if (selection.selectionSet) {\n var subsets = map.subsets || (map.subsets = Object.create(null));\n subsets[selection.name.value] =\n makeAliasMap(selection.selectionSet, fragmentMap);\n }\n }\n else {\n var fragment = getFragmentFromSelection(selection, fragmentMap);\n if (fragment) {\n workQueue.add(fragment.selectionSet);\n }\n }\n });\n });\n return map;\n}\nfunction computeKeyObject(response, specifier, aliasMap) {\n var keyObj = Object.create(null);\n var prevKey;\n specifier.forEach(function (s) {\n if (Array.isArray(s)) {\n if (typeof prevKey === \"string\") {\n var subsets = aliasMap && aliasMap.subsets;\n var subset = subsets && subsets[prevKey];\n keyObj[prevKey] = computeKeyObject(response[prevKey], s, subset);\n }\n }\n else {\n var aliases = aliasMap && aliasMap.aliases;\n var responseName = aliases && aliases[s] || s;\n process.env.NODE_ENV === \"production\" ? invariant(hasOwn.call(response, responseName), 3) : invariant(hasOwn.call(response, responseName), \"Missing field '\" + responseName + \"' while computing key fields\");\n keyObj[prevKey = s] = response[responseName];\n }\n });\n return keyObj;\n}\n//# sourceMappingURL=policies.js.map","// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nvar nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;\nexport default nodejsCustomInspectSymbol;\n","export default function waitForCallBackNextTick() {\n return new Promise((resolve) => setImmediate(resolve));\n}\n","import { wrap } from 'optimism';\nimport { getFragmentQueryDocument, } from \"../../utilities/index.js\";\nvar ApolloCache = (function () {\n function ApolloCache() {\n this.getFragmentDoc = wrap(getFragmentQueryDocument);\n }\n ApolloCache.prototype.recordOptimisticTransaction = function (transaction, optimisticId) {\n this.performTransaction(transaction, optimisticId);\n };\n ApolloCache.prototype.transformDocument = function (document) {\n return document;\n };\n ApolloCache.prototype.identify = function (object) {\n return;\n };\n ApolloCache.prototype.gc = function () {\n return [];\n };\n ApolloCache.prototype.modify = function (options) {\n return false;\n };\n ApolloCache.prototype.transformForLink = function (document) {\n return document;\n };\n ApolloCache.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.read({\n rootId: options.id || 'ROOT_QUERY',\n query: options.query,\n variables: options.variables,\n optimistic: optimistic,\n });\n };\n ApolloCache.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.read({\n query: this.getFragmentDoc(options.fragment, options.fragmentName),\n variables: options.variables,\n rootId: options.id,\n optimistic: optimistic,\n });\n };\n ApolloCache.prototype.writeQuery = function (options) {\n return this.write({\n dataId: options.id || 'ROOT_QUERY',\n result: options.data,\n query: options.query,\n variables: options.variables,\n broadcast: options.broadcast,\n });\n };\n ApolloCache.prototype.writeFragment = function (options) {\n return this.write({\n dataId: options.id,\n result: options.data,\n variables: options.variables,\n query: this.getFragmentDoc(options.fragment, options.fragmentName),\n broadcast: options.broadcast,\n });\n };\n return ApolloCache;\n}());\nexport { ApolloCache };\n//# sourceMappingURL=cache.js.map","var MissingFieldError = (function () {\n function MissingFieldError(message, path, query, clientOnly, variables) {\n this.message = message;\n this.path = path;\n this.query = query;\n this.clientOnly = clientOnly;\n this.variables = variables;\n }\n return MissingFieldError;\n}());\nexport { MissingFieldError };\n//# sourceMappingURL=common.js.map","import { throwServerError } from \"../utils/index.js\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function parseAndCheckHttpResponse(operations) {\n return function (response) { return response\n .text()\n .then(function (bodyText) {\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n var parseError = err;\n parseError.name = 'ServerParseError';\n parseError.response = response;\n parseError.statusCode = response.status;\n parseError.bodyText = bodyText;\n throw parseError;\n }\n })\n .then(function (result) {\n if (response.status >= 300) {\n throwServerError(response, result, \"Response not successful: Received status code \" + response.status);\n }\n if (!Array.isArray(result) &&\n !hasOwnProperty.call(result, 'data') &&\n !hasOwnProperty.call(result, 'errors')) {\n throwServerError(response, result, \"Server response was missing for query '\" + (Array.isArray(operations)\n ? operations.map(function (op) { return op.operationName; })\n : operations.operationName) + \"'.\");\n }\n return result;\n }); };\n}\n//# sourceMappingURL=parseAndCheckHttpResponse.js.map","import { InvariantError } from 'ts-invariant';\nexport var serializeFetchParameter = function (p, label) {\n var serialized;\n try {\n serialized = JSON.stringify(p);\n }\n catch (e) {\n var parseError = process.env.NODE_ENV === \"production\" ? new InvariantError(23) : new InvariantError(\"Network request failed. \" + label + \" is not serializable: \" + e.message);\n parseError.parseError = e;\n throw parseError;\n }\n return serialized;\n};\n//# sourceMappingURL=serializeFetchParameter.js.map","import { visit } from \"./visitor.mjs\";\nimport { printBlockString } from \"./blockString.mjs\";\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, {\n leave: printDocASTReducer\n });\n}\nvar MAX_LINE_LENGTH = 80; // TODO: provide better type coverage in future\n\nvar printDocASTReducer = {\n Name: function Name(node) {\n return node.value;\n },\n Variable: function Variable(node) {\n return '$' + node.name;\n },\n // Document\n Document: function Document(node) {\n return join(node.definitions, '\\n\\n') + '\\n';\n },\n OperationDefinition: function OperationDefinition(node) {\n var op = node.operation;\n var name = node.name;\n var varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n var directives = join(node.directives, ' ');\n var selectionSet = node.selectionSet; // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return !name && !directives && !varDefs && op === 'query' ? selectionSet : join([op, join([name, varDefs]), directives, selectionSet], ' ');\n },\n VariableDefinition: function VariableDefinition(_ref) {\n var variable = _ref.variable,\n type = _ref.type,\n defaultValue = _ref.defaultValue,\n directives = _ref.directives;\n return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' '));\n },\n SelectionSet: function SelectionSet(_ref2) {\n var selections = _ref2.selections;\n return block(selections);\n },\n Field: function Field(_ref3) {\n var alias = _ref3.alias,\n name = _ref3.name,\n args = _ref3.arguments,\n directives = _ref3.directives,\n selectionSet = _ref3.selectionSet;\n var prefix = wrap('', alias, ': ') + name;\n var argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n Argument: function Argument(_ref4) {\n var name = _ref4.name,\n value = _ref4.value;\n return name + ': ' + value;\n },\n // Fragments\n FragmentSpread: function FragmentSpread(_ref5) {\n var name = _ref5.name,\n directives = _ref5.directives;\n return '...' + name + wrap(' ', join(directives, ' '));\n },\n InlineFragment: function InlineFragment(_ref6) {\n var typeCondition = _ref6.typeCondition,\n directives = _ref6.directives,\n selectionSet = _ref6.selectionSet;\n return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ');\n },\n FragmentDefinition: function FragmentDefinition(_ref7) {\n var name = _ref7.name,\n typeCondition = _ref7.typeCondition,\n variableDefinitions = _ref7.variableDefinitions,\n directives = _ref7.directives,\n selectionSet = _ref7.selectionSet;\n return (// Note: fragment variable definitions are experimental and may be changed\n // or removed in the future.\n \"fragment \".concat(name).concat(wrap('(', join(variableDefinitions, ', '), ')'), \" \") + \"on \".concat(typeCondition, \" \").concat(wrap('', join(directives, ' '), ' ')) + selectionSet\n );\n },\n // Value\n IntValue: function IntValue(_ref8) {\n var value = _ref8.value;\n return value;\n },\n FloatValue: function FloatValue(_ref9) {\n var value = _ref9.value;\n return value;\n },\n StringValue: function StringValue(_ref10, key) {\n var value = _ref10.value,\n isBlockString = _ref10.block;\n return isBlockString ? printBlockString(value, key === 'description' ? '' : ' ') : JSON.stringify(value);\n },\n BooleanValue: function BooleanValue(_ref11) {\n var value = _ref11.value;\n return value ? 'true' : 'false';\n },\n NullValue: function NullValue() {\n return 'null';\n },\n EnumValue: function EnumValue(_ref12) {\n var value = _ref12.value;\n return value;\n },\n ListValue: function ListValue(_ref13) {\n var values = _ref13.values;\n return '[' + join(values, ', ') + ']';\n },\n ObjectValue: function ObjectValue(_ref14) {\n var fields = _ref14.fields;\n return '{' + join(fields, ', ') + '}';\n },\n ObjectField: function ObjectField(_ref15) {\n var name = _ref15.name,\n value = _ref15.value;\n return name + ': ' + value;\n },\n // Directive\n Directive: function Directive(_ref16) {\n var name = _ref16.name,\n args = _ref16.arguments;\n return '@' + name + wrap('(', join(args, ', '), ')');\n },\n // Type\n NamedType: function NamedType(_ref17) {\n var name = _ref17.name;\n return name;\n },\n ListType: function ListType(_ref18) {\n var type = _ref18.type;\n return '[' + type + ']';\n },\n NonNullType: function NonNullType(_ref19) {\n var type = _ref19.type;\n return type + '!';\n },\n // Type System Definitions\n SchemaDefinition: addDescription(function (_ref20) {\n var directives = _ref20.directives,\n operationTypes = _ref20.operationTypes;\n return join(['schema', join(directives, ' '), block(operationTypes)], ' ');\n }),\n OperationTypeDefinition: function OperationTypeDefinition(_ref21) {\n var operation = _ref21.operation,\n type = _ref21.type;\n return operation + ': ' + type;\n },\n ScalarTypeDefinition: addDescription(function (_ref22) {\n var name = _ref22.name,\n directives = _ref22.directives;\n return join(['scalar', name, join(directives, ' ')], ' ');\n }),\n ObjectTypeDefinition: addDescription(function (_ref23) {\n var name = _ref23.name,\n interfaces = _ref23.interfaces,\n directives = _ref23.directives,\n fields = _ref23.fields;\n return join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n }),\n FieldDefinition: addDescription(function (_ref24) {\n var name = _ref24.name,\n args = _ref24.arguments,\n type = _ref24.type,\n directives = _ref24.directives;\n return name + (hasMultilineItems(args) ? wrap('(\\n', indent(join(args, '\\n')), '\\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' '));\n }),\n InputValueDefinition: addDescription(function (_ref25) {\n var name = _ref25.name,\n type = _ref25.type,\n defaultValue = _ref25.defaultValue,\n directives = _ref25.directives;\n return join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ');\n }),\n InterfaceTypeDefinition: addDescription(function (_ref26) {\n var name = _ref26.name,\n interfaces = _ref26.interfaces,\n directives = _ref26.directives,\n fields = _ref26.fields;\n return join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n }),\n UnionTypeDefinition: addDescription(function (_ref27) {\n var name = _ref27.name,\n directives = _ref27.directives,\n types = _ref27.types;\n return join(['union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');\n }),\n EnumTypeDefinition: addDescription(function (_ref28) {\n var name = _ref28.name,\n directives = _ref28.directives,\n values = _ref28.values;\n return join(['enum', name, join(directives, ' '), block(values)], ' ');\n }),\n EnumValueDefinition: addDescription(function (_ref29) {\n var name = _ref29.name,\n directives = _ref29.directives;\n return join([name, join(directives, ' ')], ' ');\n }),\n InputObjectTypeDefinition: addDescription(function (_ref30) {\n var name = _ref30.name,\n directives = _ref30.directives,\n fields = _ref30.fields;\n return join(['input', name, join(directives, ' '), block(fields)], ' ');\n }),\n DirectiveDefinition: addDescription(function (_ref31) {\n var name = _ref31.name,\n args = _ref31.arguments,\n repeatable = _ref31.repeatable,\n locations = _ref31.locations;\n return 'directive @' + name + (hasMultilineItems(args) ? wrap('(\\n', indent(join(args, '\\n')), '\\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ');\n }),\n SchemaExtension: function SchemaExtension(_ref32) {\n var directives = _ref32.directives,\n operationTypes = _ref32.operationTypes;\n return join(['extend schema', join(directives, ' '), block(operationTypes)], ' ');\n },\n ScalarTypeExtension: function ScalarTypeExtension(_ref33) {\n var name = _ref33.name,\n directives = _ref33.directives;\n return join(['extend scalar', name, join(directives, ' ')], ' ');\n },\n ObjectTypeExtension: function ObjectTypeExtension(_ref34) {\n var name = _ref34.name,\n interfaces = _ref34.interfaces,\n directives = _ref34.directives,\n fields = _ref34.fields;\n return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n },\n InterfaceTypeExtension: function InterfaceTypeExtension(_ref35) {\n var name = _ref35.name,\n interfaces = _ref35.interfaces,\n directives = _ref35.directives,\n fields = _ref35.fields;\n return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n },\n UnionTypeExtension: function UnionTypeExtension(_ref36) {\n var name = _ref36.name,\n directives = _ref36.directives,\n types = _ref36.types;\n return join(['extend union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');\n },\n EnumTypeExtension: function EnumTypeExtension(_ref37) {\n var name = _ref37.name,\n directives = _ref37.directives,\n values = _ref37.values;\n return join(['extend enum', name, join(directives, ' '), block(values)], ' ');\n },\n InputObjectTypeExtension: function InputObjectTypeExtension(_ref38) {\n var name = _ref38.name,\n directives = _ref38.directives,\n fields = _ref38.fields;\n return join(['extend input', name, join(directives, ' '), block(fields)], ' ');\n }\n};\n\nfunction addDescription(cb) {\n return function (node) {\n return join([node.description, cb(node)], '\\n');\n };\n}\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\n\nfunction join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an\n * indented \"{ }\" block.\n */\n\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\n\nfunction wrap(start, maybeString) {\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n return maybeString != null && maybeString !== '' ? start + maybeString + end : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction isMultiline(str) {\n return str.indexOf('\\n') !== -1;\n}\n\nfunction hasMultilineItems(maybeArray) {\n return maybeArray != null && maybeArray.some(isMultiline);\n}\n","import { __assign } from \"tslib\";\nimport { print } from 'graphql';\nvar defaultHttpOptions = {\n includeQuery: true,\n includeExtensions: false,\n};\nvar defaultHeaders = {\n accept: '*/*',\n 'content-type': 'application/json',\n};\nvar defaultOptions = {\n method: 'POST',\n};\nexport var fallbackHttpConfig = {\n http: defaultHttpOptions,\n headers: defaultHeaders,\n options: defaultOptions,\n};\nexport var selectHttpOptionsAndBody = function (operation, fallbackConfig) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n var options = __assign(__assign({}, fallbackConfig.options), { headers: fallbackConfig.headers, credentials: fallbackConfig.credentials });\n var http = fallbackConfig.http || {};\n configs.forEach(function (config) {\n options = __assign(__assign(__assign({}, options), config.options), { headers: __assign(__assign({}, options.headers), config.headers) });\n if (config.credentials)\n options.credentials = config.credentials;\n http = __assign(__assign({}, http), config.http);\n });\n var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;\n var body = { operationName: operationName, variables: variables };\n if (http.includeExtensions)\n body.extensions = extensions;\n if (http.includeQuery)\n body.query = print(query);\n return {\n options: options,\n body: body,\n };\n};\n//# sourceMappingURL=selectHttpOptionsAndBody.js.map","import { __assign, __rest } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { Observable } from \"../../utilities/index.js\";\nimport { serializeFetchParameter } from \"./serializeFetchParameter.js\";\nimport { selectURI } from \"./selectURI.js\";\nimport { parseAndCheckHttpResponse } from \"./parseAndCheckHttpResponse.js\";\nimport { checkFetcher } from \"./checkFetcher.js\";\nimport { selectHttpOptionsAndBody, fallbackHttpConfig } from \"./selectHttpOptionsAndBody.js\";\nimport { createSignalIfSupported } from \"./createSignalIfSupported.js\";\nimport { rewriteURIForGET } from \"./rewriteURIForGET.js\";\nimport { fromError } from \"../utils/index.js\";\nexport var createHttpLink = function (linkOptions) {\n if (linkOptions === void 0) { linkOptions = {}; }\n var _a = linkOptions.uri, uri = _a === void 0 ? '/graphql' : _a, fetcher = linkOptions.fetch, includeExtensions = linkOptions.includeExtensions, useGETForQueries = linkOptions.useGETForQueries, requestOptions = __rest(linkOptions, [\"uri\", \"fetch\", \"includeExtensions\", \"useGETForQueries\"]);\n checkFetcher(fetcher);\n if (!fetcher) {\n fetcher = fetch;\n }\n var linkConfig = {\n http: { includeExtensions: includeExtensions },\n options: requestOptions.fetchOptions,\n credentials: requestOptions.credentials,\n headers: requestOptions.headers,\n };\n return new ApolloLink(function (operation) {\n var chosenURI = selectURI(operation, uri);\n var context = operation.getContext();\n var clientAwarenessHeaders = {};\n if (context.clientAwareness) {\n var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;\n if (name_1) {\n clientAwarenessHeaders['apollographql-client-name'] = name_1;\n }\n if (version) {\n clientAwarenessHeaders['apollographql-client-version'] = version;\n }\n }\n var contextHeaders = __assign(__assign({}, clientAwarenessHeaders), context.headers);\n var contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: contextHeaders,\n };\n var _b = selectHttpOptionsAndBody(operation, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;\n var controller;\n if (!options.signal) {\n var _c = createSignalIfSupported(), _controller = _c.controller, signal = _c.signal;\n controller = _controller;\n if (controller)\n options.signal = signal;\n }\n var definitionIsMutation = function (d) {\n return d.kind === 'OperationDefinition' && d.operation === 'mutation';\n };\n if (useGETForQueries &&\n !operation.query.definitions.some(definitionIsMutation)) {\n options.method = 'GET';\n }\n if (options.method === 'GET') {\n var _d = rewriteURIForGET(chosenURI, body), newURI = _d.newURI, parseError = _d.parseError;\n if (parseError) {\n return fromError(parseError);\n }\n chosenURI = newURI;\n }\n else {\n try {\n options.body = serializeFetchParameter(body, 'Payload');\n }\n catch (parseError) {\n return fromError(parseError);\n }\n }\n return new Observable(function (observer) {\n fetcher(chosenURI, options)\n .then(function (response) {\n operation.setContext({ response: response });\n return response;\n })\n .then(parseAndCheckHttpResponse(operation))\n .then(function (result) {\n observer.next(result);\n observer.complete();\n return result;\n })\n .catch(function (err) {\n if (err.name === 'AbortError')\n return;\n if (err.result && err.result.errors && err.result.data) {\n observer.next(err.result);\n }\n observer.error(err);\n });\n return function () {\n if (controller)\n controller.abort();\n };\n });\n });\n};\n//# sourceMappingURL=createHttpLink.js.map","import { InvariantError } from 'ts-invariant';\nexport var checkFetcher = function (fetcher) {\n if (!fetcher && typeof fetch === 'undefined') {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(22) : new InvariantError(\"\\n\\\"fetch\\\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\\n\\nimport fetch from 'cross-fetch';\\nimport { ApolloClient, HttpLink } from '@apollo/client';\\nconst client = new ApolloClient({\\n link: new HttpLink({ uri: '/graphql', fetch })\\n});\\n \");\n }\n};\n//# sourceMappingURL=checkFetcher.js.map","export var selectURI = function (operation, fallbackURI) {\n var context = operation.getContext();\n var contextURI = context.uri;\n if (contextURI) {\n return contextURI;\n }\n else if (typeof fallbackURI === 'function') {\n return fallbackURI(operation);\n }\n else {\n return fallbackURI || '/graphql';\n }\n};\n//# sourceMappingURL=selectURI.js.map","export var createSignalIfSupported = function () {\n if (typeof AbortController === 'undefined')\n return { controller: false, signal: false };\n var controller = new AbortController();\n var signal = controller.signal;\n return { controller: controller, signal: signal };\n};\n//# sourceMappingURL=createSignalIfSupported.js.map","import { serializeFetchParameter } from \"./serializeFetchParameter.js\";\nexport function rewriteURIForGET(chosenURI, body) {\n var queryParams = [];\n var addQueryParam = function (key, value) {\n queryParams.push(key + \"=\" + encodeURIComponent(value));\n };\n if ('query' in body) {\n addQueryParam('query', body.query);\n }\n if (body.operationName) {\n addQueryParam('operationName', body.operationName);\n }\n if (body.variables) {\n var serializedVariables = void 0;\n try {\n serializedVariables = serializeFetchParameter(body.variables, 'Variables map');\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam('variables', serializedVariables);\n }\n if (body.extensions) {\n var serializedExtensions = void 0;\n try {\n serializedExtensions = serializeFetchParameter(body.extensions, 'Extensions map');\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam('extensions', serializedExtensions);\n }\n var fragment = '', preFragment = chosenURI;\n var fragmentStart = chosenURI.indexOf('#');\n if (fragmentStart !== -1) {\n fragment = chosenURI.substr(fragmentStart);\n preFragment = chosenURI.substr(0, fragmentStart);\n }\n var queryParamsPrefix = preFragment.indexOf('?') === -1 ? '?' : '&';\n var newURI = preFragment + queryParamsPrefix + queryParams.join('&') + fragment;\n return { newURI: newURI };\n}\n//# sourceMappingURL=rewriteURIForGET.js.map","import { __extends } from \"tslib\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { createHttpLink } from \"./createHttpLink.js\";\nvar HttpLink = (function (_super) {\n __extends(HttpLink, _super);\n function HttpLink(options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, createHttpLink(options).request) || this;\n _this.options = options;\n return _this;\n }\n return HttpLink;\n}(ApolloLink));\nexport { HttpLink };\n//# sourceMappingURL=HttpLink.js.map","import { NetworkStatus } from \"./networkStatus.js\";\nimport { compact } from \"../utilities/index.js\";\nimport { invariant } from 'ts-invariant';\nvar Reobserver = (function () {\n function Reobserver(observer, options, fetch, shouldFetch) {\n this.observer = observer;\n this.options = options;\n this.fetch = fetch;\n this.shouldFetch = shouldFetch;\n }\n Reobserver.prototype.reobserve = function (newOptions, newNetworkStatus) {\n if (newOptions) {\n this.updateOptions(newOptions);\n }\n else {\n this.updatePolling();\n }\n var concast = this.fetch(this.options, newNetworkStatus);\n if (this.concast) {\n this.concast.removeObserver(this.observer, true);\n }\n concast.addObserver(this.observer);\n return (this.concast = concast).promise;\n };\n Reobserver.prototype.updateOptions = function (newOptions) {\n Object.assign(this.options, compact(newOptions));\n this.updatePolling();\n return this;\n };\n Reobserver.prototype.stop = function () {\n if (this.concast) {\n this.concast.removeObserver(this.observer);\n delete this.concast;\n }\n if (this.pollingInfo) {\n clearTimeout(this.pollingInfo.timeout);\n this.options.pollInterval = 0;\n this.updatePolling();\n }\n };\n Reobserver.prototype.updatePolling = function () {\n var _this = this;\n var _a = this, pollingInfo = _a.pollingInfo, pollInterval = _a.options.pollInterval;\n if (!pollInterval) {\n if (pollingInfo) {\n clearTimeout(pollingInfo.timeout);\n delete this.pollingInfo;\n }\n return;\n }\n if (pollingInfo &&\n pollingInfo.interval === pollInterval) {\n return;\n }\n process.env.NODE_ENV === \"production\" ? invariant(pollInterval, 20) : invariant(pollInterval, 'Attempted to start a polling query without a polling interval.');\n if (this.shouldFetch === false) {\n return;\n }\n var info = pollingInfo || (this.pollingInfo = {});\n info.interval = pollInterval;\n var maybeFetch = function () {\n if (_this.pollingInfo) {\n if (_this.shouldFetch && _this.shouldFetch()) {\n _this.reobserve({\n fetchPolicy: \"network-only\",\n nextFetchPolicy: _this.options.fetchPolicy || \"cache-first\",\n }, NetworkStatus.poll).then(poll, poll);\n }\n else {\n poll();\n }\n }\n ;\n };\n var poll = function () {\n var info = _this.pollingInfo;\n if (info) {\n clearTimeout(info.timeout);\n info.timeout = setTimeout(maybeFetch, info.interval);\n }\n };\n poll();\n };\n return Reobserver;\n}());\nexport { Reobserver };\n//# sourceMappingURL=Reobserver.js.map","import { __assign, __extends } from \"tslib\";\nimport { invariant } from 'ts-invariant';\nimport { equal } from '@wry/equality';\nimport { NetworkStatus, isNetworkRequestInFlight } from \"./networkStatus.js\";\nimport { cloneDeep, getOperationDefinition, Observable, iterateObserversSafely, isNonEmptyArray, } from \"../utilities/index.js\";\nimport { Reobserver } from \"./Reobserver.js\";\nvar warnedAboutUpdateQuery = false;\nvar ObservableQuery = (function (_super) {\n __extends(ObservableQuery, _super);\n function ObservableQuery(_a) {\n var queryManager = _a.queryManager, queryInfo = _a.queryInfo, options = _a.options;\n var _this = _super.call(this, function (observer) {\n return _this.onSubscribe(observer);\n }) || this;\n _this.observers = new Set();\n _this.subscriptions = new Set();\n _this.observer = {\n next: function (result) {\n if (_this.lastError || _this.isDifferentFromLastResult(result)) {\n _this.updateLastResult(result);\n iterateObserversSafely(_this.observers, 'next', result);\n }\n },\n error: function (error) {\n _this.updateLastResult(__assign(__assign({}, _this.lastResult), { error: error, errors: error.graphQLErrors, networkStatus: NetworkStatus.error, loading: false }));\n iterateObserversSafely(_this.observers, 'error', _this.lastError = error);\n },\n };\n _this.isTornDown = false;\n _this.options = options;\n _this.queryId = queryManager.generateQueryId();\n var opDef = getOperationDefinition(options.query);\n _this.queryName = opDef && opDef.name && opDef.name.value;\n _this.queryManager = queryManager;\n _this.queryInfo = queryInfo;\n return _this;\n }\n Object.defineProperty(ObservableQuery.prototype, \"variables\", {\n get: function () {\n return this.options.variables;\n },\n enumerable: false,\n configurable: true\n });\n ObservableQuery.prototype.result = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var observer = {\n next: function (result) {\n resolve(result);\n _this.observers.delete(observer);\n if (!_this.observers.size) {\n _this.queryManager.removeQuery(_this.queryId);\n }\n setTimeout(function () {\n subscription.unsubscribe();\n }, 0);\n },\n error: reject,\n };\n var subscription = _this.subscribe(observer);\n });\n };\n ObservableQuery.prototype.getCurrentResult = function (saveAsLastResult) {\n if (saveAsLastResult === void 0) { saveAsLastResult = true; }\n var lastResult = this.lastResult;\n var networkStatus = this.queryInfo.networkStatus ||\n (lastResult && lastResult.networkStatus) ||\n NetworkStatus.ready;\n var result = __assign(__assign({}, lastResult), { loading: isNetworkRequestInFlight(networkStatus), networkStatus: networkStatus });\n if (this.isTornDown) {\n return result;\n }\n var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? 'cache-first' : _a;\n if (fetchPolicy === 'no-cache' ||\n fetchPolicy === 'network-only') {\n delete result.partial;\n }\n else if (!result.data ||\n !this.queryManager.transform(this.options.query).hasForcedResolvers) {\n var diff = this.queryInfo.getDiff();\n result.data = (diff.complete ||\n this.options.returnPartialData) ? diff.result : void 0;\n if (diff.complete) {\n if (result.networkStatus === NetworkStatus.loading &&\n (fetchPolicy === 'cache-first' ||\n fetchPolicy === 'cache-only')) {\n result.networkStatus = NetworkStatus.ready;\n result.loading = false;\n }\n delete result.partial;\n }\n else {\n result.partial = true;\n }\n }\n if (saveAsLastResult) {\n this.updateLastResult(result);\n }\n return result;\n };\n ObservableQuery.prototype.isDifferentFromLastResult = function (newResult) {\n return !equal(this.lastResultSnapshot, newResult);\n };\n ObservableQuery.prototype.getLastResult = function () {\n return this.lastResult;\n };\n ObservableQuery.prototype.getLastError = function () {\n return this.lastError;\n };\n ObservableQuery.prototype.resetLastResults = function () {\n delete this.lastResult;\n delete this.lastResultSnapshot;\n delete this.lastError;\n this.isTornDown = false;\n };\n ObservableQuery.prototype.resetQueryStoreErrors = function () {\n this.queryManager.resetErrors(this.queryId);\n };\n ObservableQuery.prototype.refetch = function (variables) {\n var reobserveOptions = {\n pollInterval: 0,\n };\n var fetchPolicy = this.options.fetchPolicy;\n if (fetchPolicy !== 'no-cache' &&\n fetchPolicy !== 'cache-and-network') {\n reobserveOptions.fetchPolicy = 'network-only';\n reobserveOptions.nextFetchPolicy = fetchPolicy || \"cache-first\";\n }\n if (variables && !equal(this.options.variables, variables)) {\n reobserveOptions.variables = this.options.variables = __assign(__assign({}, this.options.variables), variables);\n }\n return this.newReobserver(false).reobserve(reobserveOptions, NetworkStatus.refetch);\n };\n ObservableQuery.prototype.fetchMore = function (fetchMoreOptions) {\n var _this = this;\n var combinedOptions = __assign(__assign({}, (fetchMoreOptions.query ? fetchMoreOptions : __assign(__assign(__assign({}, this.options), fetchMoreOptions), { variables: __assign(__assign({}, this.options.variables), fetchMoreOptions.variables) }))), { fetchPolicy: \"no-cache\" });\n var qid = this.queryManager.generateQueryId();\n if (combinedOptions.notifyOnNetworkStatusChange) {\n this.queryInfo.networkStatus = NetworkStatus.fetchMore;\n this.observe();\n }\n return this.queryManager.fetchQuery(qid, combinedOptions, NetworkStatus.fetchMore).then(function (fetchMoreResult) {\n var data = fetchMoreResult.data;\n var updateQuery = fetchMoreOptions.updateQuery;\n if (updateQuery) {\n if (process.env.NODE_ENV !== \"production\" &&\n !warnedAboutUpdateQuery) {\n process.env.NODE_ENV === \"production\" || invariant.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.\");\n warnedAboutUpdateQuery = true;\n }\n _this.updateQuery(function (previous) { return updateQuery(previous, {\n fetchMoreResult: data,\n variables: combinedOptions.variables,\n }); });\n }\n else {\n _this.queryManager.cache.writeQuery({\n query: combinedOptions.query,\n variables: combinedOptions.variables,\n data: data,\n });\n }\n return fetchMoreResult;\n }).finally(function () {\n _this.queryManager.stopQuery(qid);\n _this.reobserve();\n });\n };\n ObservableQuery.prototype.subscribeToMore = function (options) {\n var _this = this;\n var subscription = this.queryManager\n .startGraphQLSubscription({\n query: options.document,\n variables: options.variables,\n context: options.context,\n })\n .subscribe({\n next: function (subscriptionData) {\n var updateQuery = options.updateQuery;\n if (updateQuery) {\n _this.updateQuery(function (previous, _a) {\n var variables = _a.variables;\n return updateQuery(previous, {\n subscriptionData: subscriptionData,\n variables: variables,\n });\n });\n }\n },\n error: function (err) {\n if (options.onError) {\n options.onError(err);\n return;\n }\n process.env.NODE_ENV === \"production\" || invariant.error('Unhandled GraphQL subscription error', err);\n },\n });\n this.subscriptions.add(subscription);\n return function () {\n if (_this.subscriptions.delete(subscription)) {\n subscription.unsubscribe();\n }\n };\n };\n ObservableQuery.prototype.setOptions = function (newOptions) {\n return this.reobserve(newOptions);\n };\n ObservableQuery.prototype.setVariables = function (variables) {\n if (equal(this.variables, variables)) {\n return this.observers.size\n ? this.result()\n : Promise.resolve();\n }\n this.options.variables = variables;\n if (!this.observers.size) {\n return Promise.resolve();\n }\n var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? 'cache-first' : _a;\n var reobserveOptions = {\n fetchPolicy: fetchPolicy,\n variables: variables,\n };\n if (fetchPolicy !== 'cache-first' &&\n fetchPolicy !== 'no-cache' &&\n fetchPolicy !== 'network-only') {\n reobserveOptions.fetchPolicy = 'cache-and-network';\n reobserveOptions.nextFetchPolicy = fetchPolicy;\n }\n return this.reobserve(reobserveOptions, NetworkStatus.setVariables);\n };\n ObservableQuery.prototype.updateQuery = function (mapFn) {\n var _a;\n var queryManager = this.queryManager;\n var result = queryManager.cache.diff({\n query: this.options.query,\n variables: this.variables,\n previousResult: (_a = this.lastResult) === null || _a === void 0 ? void 0 : _a.data,\n returnPartialData: true,\n optimistic: false,\n }).result;\n var newResult = mapFn(result, {\n variables: this.variables,\n });\n if (newResult) {\n queryManager.cache.writeQuery({\n query: this.options.query,\n data: newResult,\n variables: this.variables,\n });\n queryManager.broadcastQueries();\n }\n };\n ObservableQuery.prototype.startPolling = function (pollInterval) {\n this.getReobserver().updateOptions({ pollInterval: pollInterval });\n };\n ObservableQuery.prototype.stopPolling = function () {\n if (this.reobserver) {\n this.reobserver.updateOptions({ pollInterval: 0 });\n }\n };\n ObservableQuery.prototype.updateLastResult = function (newResult) {\n var previousResult = this.lastResult;\n this.lastResult = newResult;\n this.lastResultSnapshot = this.queryManager.assumeImmutableResults\n ? newResult\n : cloneDeep(newResult);\n if (!isNonEmptyArray(newResult.errors)) {\n delete this.lastError;\n }\n return previousResult;\n };\n ObservableQuery.prototype.onSubscribe = function (observer) {\n var _this = this;\n if (observer === this.observer) {\n return function () { };\n }\n try {\n var subObserver = observer._subscription._observer;\n if (subObserver && !subObserver.error) {\n subObserver.error = defaultSubscriptionObserverErrorCallback;\n }\n }\n catch (_a) { }\n var first = !this.observers.size;\n this.observers.add(observer);\n if (this.lastError) {\n observer.error && observer.error(this.lastError);\n }\n else if (this.lastResult) {\n observer.next && observer.next(this.lastResult);\n }\n if (first) {\n this.reobserve().catch(function (_) {\n });\n }\n return function () {\n if (_this.observers.delete(observer) && !_this.observers.size) {\n _this.tearDownQuery();\n }\n };\n };\n ObservableQuery.prototype.getReobserver = function () {\n return this.reobserver || (this.reobserver = this.newReobserver(true));\n };\n ObservableQuery.prototype.newReobserver = function (shareOptions) {\n var _this = this;\n var _a = this, queryManager = _a.queryManager, queryId = _a.queryId;\n queryManager.setObservableQuery(this);\n return new Reobserver(this.observer, shareOptions ? this.options : __assign({}, this.options), function (currentOptions, newNetworkStatus) {\n queryManager.setObservableQuery(_this);\n return queryManager.fetchQueryObservable(queryId, currentOptions, newNetworkStatus);\n }, !queryManager.ssrMode && (function () { return !isNetworkRequestInFlight(_this.queryInfo.networkStatus); }));\n };\n ObservableQuery.prototype.reobserve = function (newOptions, newNetworkStatus) {\n this.isTornDown = false;\n return this.getReobserver().reobserve(newOptions, newNetworkStatus);\n };\n ObservableQuery.prototype.observe = function () {\n this.observer.next(this.getCurrentResult(false));\n };\n ObservableQuery.prototype.hasObservers = function () {\n return this.observers.size > 0;\n };\n ObservableQuery.prototype.tearDownQuery = function () {\n var queryManager = this.queryManager;\n if (this.reobserver) {\n this.reobserver.stop();\n delete this.reobserver;\n }\n this.isTornDown = true;\n this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });\n this.subscriptions.clear();\n queryManager.stopQuery(this.queryId);\n this.observers.clear();\n };\n return ObservableQuery;\n}(Observable));\nexport { ObservableQuery };\nfunction defaultSubscriptionObserverErrorCallback(error) {\n process.env.NODE_ENV === \"production\" || invariant.error('Unhandled error', error.message, error.stack);\n}\n//# sourceMappingURL=ObservableQuery.js.map","/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\nexport function dedentBlockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g); // Remove common indentation from all lines but first.\n\n var commonIndent = getBlockStringIndentation(rawString);\n\n if (commonIndent !== 0) {\n for (var i = 1; i < lines.length; i++) {\n lines[i] = lines[i].slice(commonIndent);\n }\n } // Remove leading and trailing blank lines.\n\n\n var startLine = 0;\n\n while (startLine < lines.length && isBlank(lines[startLine])) {\n ++startLine;\n }\n\n var endLine = lines.length;\n\n while (endLine > startLine && isBlank(lines[endLine - 1])) {\n --endLine;\n } // Return a string of the lines joined with U+000A.\n\n\n return lines.slice(startLine, endLine).join('\\n');\n}\n\nfunction isBlank(str) {\n for (var i = 0; i < str.length; ++i) {\n if (str[i] !== ' ' && str[i] !== '\\t') {\n return false;\n }\n }\n\n return true;\n}\n/**\n * @internal\n */\n\n\nexport function getBlockStringIndentation(value) {\n var _commonIndent;\n\n var isFirstLine = true;\n var isEmptyLine = true;\n var indent = 0;\n var commonIndent = null;\n\n for (var i = 0; i < value.length; ++i) {\n switch (value.charCodeAt(i)) {\n case 13:\n // \\r\n if (value.charCodeAt(i + 1) === 10) {\n ++i; // skip \\r\\n as one symbol\n }\n\n // falls through\n\n case 10:\n // \\n\n isFirstLine = false;\n isEmptyLine = true;\n indent = 0;\n break;\n\n case 9: // \\t\n\n case 32:\n // \n ++indent;\n break;\n\n default:\n if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {\n commonIndent = indent;\n }\n\n isEmptyLine = false;\n }\n }\n\n return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value) {\n var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isSingleLine = value.indexOf('\\n') === -1;\n var hasLeadingSpace = value[0] === ' ' || value[0] === '\\t';\n var hasTrailingQuote = value[value.length - 1] === '\"';\n var hasTrailingSlash = value[value.length - 1] === '\\\\';\n var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines;\n var result = ''; // Format a multi-line block quote to account for leading space.\n\n if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {\n result += '\\n' + indentation;\n }\n\n result += indentation ? value.replace(/\\n/g, '\\n' + indentation) : value;\n\n if (printAsMultipleLines) {\n result += '\\n';\n }\n\n return '\"\"\"' + result.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"';\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { AnalyticsEvent } from './types';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const subscriptionOpenModal: AnalyticsEvent = {\n event: 'subscription_open_modal',\n category: 'subscription',\n action: 'open_modal',\n};\n\nexport const wonProbabilityThresholdReached: AnalyticsEvent = {\n event: 'engagement_won_prob_threshold_reached',\n category: 'engagement',\n action: 'won_prob_threshold_reached',\n};\n","import React, { useEffect } from 'react';\n\nimport { getEmploymentMetaData } from '../../util';\nimport { wonProbabilityThresholdReached } from '../events';\nimport fireEvent from '../fireEvent';\nimport mapClientSizeToLTV from '../helpers/mapClientSizeToLTV';\nimport useSetClientMarketingEventSent from '../hooks/useSetClientMarketingEventSent';\n\nconst WON_PROBABILITY_THRESHOLD = 0.3;\n\nexport default function WonProbabilityEvent() {\n const { setClientMarketingEventSent } = useSetClientMarketingEventSent();\n const employmentMetaData = getEmploymentMetaData();\n\n if (!employmentMetaData) return <>;\n\n const {\n accountStage,\n clientId,\n clientSize,\n firstAttachedUserId,\n marketingEventSent = false,\n userId,\n wonProbability,\n } = employmentMetaData;\n\n const isDataMissing =\n !clientId ||\n !firstAttachedUserId ||\n marketingEventSent === undefined ||\n !userId ||\n !wonProbability;\n\n const isNotCompanyLeadAndPilot =\n accountStage !== 'lead' && accountStage !== 'pilot';\n\n if (isDataMissing || marketingEventSent || isNotCompanyLeadAndPilot)\n return <>;\n\n const currentUserIsNotFirstAttatched = userId !== firstAttachedUserId;\n const isWonProbabilityBellowThreshold =\n wonProbability <= WON_PROBABILITY_THRESHOLD;\n\n if (currentUserIsNotFirstAttatched || isWonProbabilityBellowThreshold)\n return <>;\n\n useEffect(() => {\n const expectedClientLTV = mapClientSizeToLTV(clientSize) || 0;\n\n fireEvent({\n ...wonProbabilityThresholdReached,\n label: wonProbability.toString(),\n value: wonProbability * expectedClientLTV,\n });\n setClientMarketingEventSent({ clientId });\n }, []);\n\n return <>;\n}\n","import { useMutation } from '@apollo/client';\n\nimport {\n SetClientMarketingEventSentMutation,\n SET_CLIENT_MARKETING_EVENT_SENT,\n} from '../../commons/api/graphql/mutations';\n\ntype SetClientMarketingEventSentMutationParams = {\n clientId: number;\n};\n\nexport default function useChangePlan() {\n const [\n execute,\n { loading },\n ] = useMutation(\n SET_CLIENT_MARKETING_EVENT_SENT,\n );\n\n const setClientMarketingEventSent = ({\n clientId,\n }: SetClientMarketingEventSentMutationParams) =>\n execute({\n variables: {\n input: { clientId },\n },\n });\n\n return { loading, setClientMarketingEventSent };\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ApolloProvider } from '@apollo/client';\n\nimport { pageReadyListener } from 'src/util';\nimport client from 'src/commons/api/apollo';\n\nimport initializeTagging from './initializeTagging';\nimport { subscriptionOpenModal } from './events';\nimport triggerAnalyticsOnJQueryEvent from './triggerAnalyticsOnJQueryEvent';\nimport WonProbabilityEvent from './containers/WonProbabilityEvent';\n\nexport default class Initializer {\n static render() {\n pageReadyListener(() => {\n initializeTagging();\n\n triggerAnalyticsOnJQueryEvent({\n elementSelector: '#subscribe-modal',\n analyticsEvent: subscriptionOpenModal,\n jQueryEvent: 'shown.bs.modal',\n });\n\n const container = findOrCreateContainer();\n\n ReactDOM.render(\n \n \n ,\n container,\n );\n });\n }\n}\n\nconst WON_PROBABILITY_EVENT_CONTAINER_ID = 'won-probability-event-container';\n\nfunction findOrCreateContainer() {\n const found = document.getElementById(WON_PROBABILITY_EVENT_CONTAINER_ID);\n\n if (found) return found;\n\n const created = document.createElement('div');\n created.setAttribute('id', WON_PROBABILITY_EVENT_CONTAINER_ID);\n document.body.appendChild(created);\n return created;\n}\n","import Initializer from './initializer';\n\nInitializer.render();\n","module.exports = require('./lib/Observable.js').Observable;\n","import { isReference, isField, DeepMerger, resultKeyNameFromField, shouldInclude, } from \"../../utilities/index.js\";\nexport var hasOwn = Object.prototype.hasOwnProperty;\nexport function getTypenameFromStoreObject(store, objectOrReference) {\n return isReference(objectOrReference)\n ? store.get(objectOrReference.__ref, \"__typename\")\n : objectOrReference && objectOrReference.__typename;\n}\nexport var TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\nexport function fieldNameFromStoreName(storeFieldName) {\n var match = storeFieldName.match(TypeOrFieldNameRegExp);\n return match ? match[0] : storeFieldName;\n}\nexport function selectionSetMatchesResult(selectionSet, result, variables) {\n if (result && typeof result === \"object\") {\n return Array.isArray(result)\n ? result.every(function (item) { return selectionSetMatchesResult(selectionSet, item, variables); })\n : selectionSet.selections.every(function (field) {\n if (isField(field) && shouldInclude(field, variables)) {\n var key = resultKeyNameFromField(field);\n return hasOwn.call(result, key) &&\n (!field.selectionSet ||\n selectionSetMatchesResult(field.selectionSet, result[key], variables));\n }\n return true;\n });\n }\n return false;\n}\nexport function storeValueIsStoreObject(value) {\n return value !== null &&\n typeof value === \"object\" &&\n !isReference(value) &&\n !Array.isArray(value);\n}\nexport function isFieldValueToBeMerged(value) {\n var field = value && value.__field;\n return field && isField(field);\n}\nexport function makeProcessedFieldsMerger() {\n return new DeepMerger(reconcileProcessedFields);\n}\nvar reconcileProcessedFields = function (existingObject, incomingObject, property) {\n var existing = existingObject[property];\n var incoming = incomingObject[property];\n if (isFieldValueToBeMerged(existing)) {\n existing.__value = this.merge(existing.__value, isFieldValueToBeMerged(incoming)\n ? incoming.__value\n : incoming);\n return existing;\n }\n if (isFieldValueToBeMerged(incoming)) {\n incoming.__value = this.merge(existing, incoming.__value);\n return incoming;\n }\n return this.merge(existing, incoming);\n};\n//# sourceMappingURL=helpers.js.map","var _a = Object.prototype, toString = _a.toString, hasOwnProperty = _a.hasOwnProperty;\r\nvar fnToStr = Function.prototype.toString;\r\nvar previousComparisons = new Map();\r\n/**\r\n * Performs a deep equality check on two JavaScript values, tolerating cycles.\r\n */\r\nfunction equal(a, b) {\r\n try {\r\n return check(a, b);\r\n }\r\n finally {\r\n previousComparisons.clear();\r\n }\r\n}\r\nfunction check(a, b) {\r\n // If the two values are strictly equal, our job is easy.\r\n if (a === b) {\r\n return true;\r\n }\r\n // Object.prototype.toString returns a representation of the runtime type of\r\n // the given value that is considerably more precise than typeof.\r\n var aTag = toString.call(a);\r\n var bTag = toString.call(b);\r\n // If the runtime types of a and b are different, they could maybe be equal\r\n // under some interpretation of equality, but for simplicity and performance\r\n // we just return false instead.\r\n if (aTag !== bTag) {\r\n return false;\r\n }\r\n switch (aTag) {\r\n case '[object Array]':\r\n // Arrays are a lot like other objects, but we can cheaply compare their\r\n // lengths as a short-cut before comparing their elements.\r\n if (a.length !== b.length)\r\n return false;\r\n // Fall through to object case...\r\n case '[object Object]': {\r\n if (previouslyCompared(a, b))\r\n return true;\r\n var aKeys = Object.keys(a);\r\n var bKeys = Object.keys(b);\r\n // If `a` and `b` have a different number of enumerable keys, they\r\n // must be different.\r\n var keyCount = aKeys.length;\r\n if (keyCount !== bKeys.length)\r\n return false;\r\n // Now make sure they have the same keys.\r\n for (var k = 0; k < keyCount; ++k) {\r\n if (!hasOwnProperty.call(b, aKeys[k])) {\r\n return false;\r\n }\r\n }\r\n // Finally, check deep equality of all child properties.\r\n for (var k = 0; k < keyCount; ++k) {\r\n var key = aKeys[k];\r\n if (!check(a[key], b[key])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n case '[object Error]':\r\n return a.name === b.name && a.message === b.message;\r\n case '[object Number]':\r\n // Handle NaN, which is !== itself.\r\n if (a !== a)\r\n return b !== b;\r\n // Fall through to shared +a === +b case...\r\n case '[object Boolean]':\r\n case '[object Date]':\r\n return +a === +b;\r\n case '[object RegExp]':\r\n case '[object String]':\r\n return a == \"\" + b;\r\n case '[object Map]':\r\n case '[object Set]': {\r\n if (a.size !== b.size)\r\n return false;\r\n if (previouslyCompared(a, b))\r\n return true;\r\n var aIterator = a.entries();\r\n var isMap = aTag === '[object Map]';\r\n while (true) {\r\n var info = aIterator.next();\r\n if (info.done)\r\n break;\r\n // If a instanceof Set, aValue === aKey.\r\n var _a = info.value, aKey = _a[0], aValue = _a[1];\r\n // So this works the same way for both Set and Map.\r\n if (!b.has(aKey)) {\r\n return false;\r\n }\r\n // However, we care about deep equality of values only when dealing\r\n // with Map structures.\r\n if (isMap && !check(aValue, b.get(aKey))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n case '[object Function]': {\r\n var aCode = fnToStr.call(a);\r\n if (aCode !== fnToStr.call(b)) {\r\n return false;\r\n }\r\n // We consider non-native functions equal if they have the same code\r\n // (native functions require === because their code is censored).\r\n // Note that this behavior is not entirely sound, since !== function\r\n // objects with the same code can behave differently depending on\r\n // their closure scope. However, any function can behave differently\r\n // depending on the values of its input arguments (including this)\r\n // and its calling context (including its closure scope), even\r\n // though the function object is === to itself; and it is entirely\r\n // possible for functions that are not === to behave exactly the\r\n // same under all conceivable circumstances. Because none of these\r\n // factors are statically decidable in JavaScript, JS function\r\n // equality is not well-defined. This ambiguity allows us to\r\n // consider the best possible heuristic among various imperfect\r\n // options, and equating non-native functions that have the same\r\n // code has enormous practical benefits, such as when comparing\r\n // functions that are repeatedly passed as fresh function\r\n // expressions within objects that are otherwise deeply equal. Since\r\n // any function created from the same syntactic expression (in the\r\n // same code location) will always stringify to the same code\r\n // according to fnToStr.call, we can reasonably expect these\r\n // repeatedly passed function expressions to have the same code, and\r\n // thus behave \"the same\" (with all the caveats mentioned above),\r\n // even though the runtime function objects are !== to one another.\r\n return !endsWith(aCode, nativeCodeSuffix);\r\n }\r\n }\r\n // Otherwise the values are not equal.\r\n return false;\r\n}\r\nvar nativeCodeSuffix = \"{ [native code] }\";\r\nfunction endsWith(full, suffix) {\r\n var fromIndex = full.length - suffix.length;\r\n return fromIndex >= 0 &&\r\n full.indexOf(suffix, fromIndex) === fromIndex;\r\n}\r\nfunction previouslyCompared(a, b) {\r\n // Though cyclic references can make an object graph appear infinite from the\r\n // perspective of a depth-first traversal, the graph still contains a finite\r\n // number of distinct object references. We use the previousComparisons cache\r\n // to avoid comparing the same pair of object references more than once, which\r\n // guarantees termination (even if we end up comparing every object in one\r\n // graph to every object in the other graph, which is extremely unlikely),\r\n // while still allowing weird isomorphic structures (like rings with different\r\n // lengths) a chance to pass the equality test.\r\n var bSet = previousComparisons.get(a);\r\n if (bSet) {\r\n // Return true here because we can be sure false will be returned somewhere\r\n // else if the objects are not equivalent.\r\n if (bSet.has(b))\r\n return true;\r\n }\r\n else {\r\n previousComparisons.set(a, bSet = new Set);\r\n }\r\n bSet.add(b);\r\n return false;\r\n}\n\nexport default equal;\nexport { equal };\n//# sourceMappingURL=equality.esm.js.map\n","export var NetworkStatus;\n(function (NetworkStatus) {\n NetworkStatus[NetworkStatus[\"loading\"] = 1] = \"loading\";\n NetworkStatus[NetworkStatus[\"setVariables\"] = 2] = \"setVariables\";\n NetworkStatus[NetworkStatus[\"fetchMore\"] = 3] = \"fetchMore\";\n NetworkStatus[NetworkStatus[\"refetch\"] = 4] = \"refetch\";\n NetworkStatus[NetworkStatus[\"poll\"] = 6] = \"poll\";\n NetworkStatus[NetworkStatus[\"ready\"] = 7] = \"ready\";\n NetworkStatus[NetworkStatus[\"error\"] = 8] = \"error\";\n})(NetworkStatus || (NetworkStatus = {}));\nexport function isNetworkRequestInFlight(networkStatus) {\n return networkStatus ? networkStatus < 7 : false;\n}\n//# sourceMappingURL=networkStatus.js.map","import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n cache: new InMemoryCache(),\n uri: '/graphql',\n});\n\nexport default client;\n","import client from './client';\n\nexport default client;\n","import { AnalyticsEvent } from './types';\n\nexport default (attributes: AnalyticsEvent) => {\n if (!window.dataLayer) window.dataLayer = [];\n\n const { eventCallback: originalCallback } = attributes;\n\n return new Promise((resolve) => {\n window.dataLayer.push({\n ...attributes,\n eventCallback: () => {\n if (originalCallback) originalCallback();\n\n resolve();\n },\n eventTimeout: 2000,\n });\n });\n};\n","'use strict';\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (node) {\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if (node === undefined) return;\n if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if (typeof node !== 'object') return JSON.stringify(node);\n\n var i, out;\n if (Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if (i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if (node === null) return 'null';\n\n if (seen.indexOf(node) !== -1) {\n if (cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n var seenIndex = seen.push(node) - 1;\n var keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node[key]);\n\n if (!value) continue;\n if (out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n};\n","import invariant from \"./invariant.mjs\";\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\n/**\n * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`\n */\n\nexport default function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol) {\n classObject.prototype[nodejsCustomInspectSymbol] = fn;\n }\n}\n","export default function invariant(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message != null ? message : 'Unexpected invariant triggered.');\n }\n}\n","import defineInspect from \"../jsutils/defineInspect.mjs\";\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport var Location = /*#__PURE__*/function () {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n function Location(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n var _proto = Location.prototype;\n\n _proto.toJSON = function toJSON() {\n return {\n start: this.start,\n end: this.end\n };\n };\n\n return Location;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Location);\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport var Token = /*#__PURE__*/function () {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. is always the first node and \n * the last.\n */\n function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }\n\n var _proto2 = Token.prototype;\n\n _proto2.toJSON = function toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column\n };\n };\n\n return Token;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Token);\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n return maybeNode != null && typeof maybeNode.kind === 'string';\n}\n/**\n * The list of all possible AST node types.\n */\n","import { ApolloLink } from \"./ApolloLink.js\";\nexport var empty = ApolloLink.empty;\n//# sourceMappingURL=empty.js.map","import { ApolloLink } from \"./ApolloLink.js\";\nexport var from = ApolloLink.from;\n//# sourceMappingURL=from.js.map","import { ApolloLink } from \"./ApolloLink.js\";\nexport var split = ApolloLink.split;\n//# sourceMappingURL=split.js.map","import { ApolloLink } from \"./ApolloLink.js\";\nexport var concat = ApolloLink.concat;\n//# sourceMappingURL=concat.js.map","import { ApolloLink } from \"./ApolloLink.js\";\nexport var execute = ApolloLink.execute;\n//# sourceMappingURL=execute.js.map","import { visit, } from 'graphql';\nimport { invariant } from 'ts-invariant';\nexport function shouldInclude(_a, variables) {\n var directives = _a.directives;\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(function (_a) {\n var directive = _a.directive, ifArgument = _a.ifArgument;\n var evaledValue = false;\n if (ifArgument.value.kind === 'Variable') {\n evaledValue = variables && variables[ifArgument.value.name.value];\n process.env.NODE_ENV === \"production\" ? invariant(evaledValue !== void 0, 38) : invariant(evaledValue !== void 0, \"Invalid variable referenced in @\" + directive.name.value + \" directive.\");\n }\n else {\n evaledValue = ifArgument.value.value;\n }\n return directive.name.value === 'skip' ? !evaledValue : evaledValue;\n });\n}\nexport function getDirectiveNames(root) {\n var names = [];\n visit(root, {\n Directive: function (node) {\n names.push(node.name.value);\n },\n });\n return names;\n}\nexport function hasDirectives(names, root) {\n return getDirectiveNames(root).some(function (name) { return names.indexOf(name) > -1; });\n}\nexport function hasClientExports(document) {\n return (document &&\n hasDirectives(['client'], document) &&\n hasDirectives(['export'], document));\n}\nfunction isInclusionDirective(_a) {\n var value = _a.name.value;\n return value === 'skip' || value === 'include';\n}\nexport function getInclusionDirectives(directives) {\n var result = [];\n if (directives && directives.length) {\n directives.forEach(function (directive) {\n if (!isInclusionDirective(directive))\n return;\n var directiveArguments = directive.arguments;\n var directiveName = directive.name.value;\n process.env.NODE_ENV === \"production\" ? invariant(directiveArguments && directiveArguments.length === 1, 39) : invariant(directiveArguments && directiveArguments.length === 1, \"Incorrect number of arguments for the @\" + directiveName + \" directive.\");\n var ifArgument = directiveArguments[0];\n process.env.NODE_ENV === \"production\" ? invariant(ifArgument.name && ifArgument.name.value === 'if', 40) : invariant(ifArgument.name && ifArgument.name.value === 'if', \"Invalid argument for the @\" + directiveName + \" directive.\");\n var ifValue = ifArgument.value;\n process.env.NODE_ENV === \"production\" ? invariant(ifValue &&\n (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 41) : invariant(ifValue &&\n (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), \"Argument for the @\" + directiveName + \" directive must be a variable or a boolean value.\");\n result.push({ directive: directive, ifArgument: ifArgument });\n });\n }\n return result;\n}\n//# sourceMappingURL=directives.js.map","import { __assign, __spreadArrays } from \"tslib\";\nimport { invariant, InvariantError } from 'ts-invariant';\nexport function getFragmentQueryDocument(document, fragmentName) {\n var actualFragmentName = fragmentName;\n var fragments = [];\n document.definitions.forEach(function (definition) {\n if (definition.kind === 'OperationDefinition') {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(42) : new InvariantError(\"Found a \" + definition.operation + \" operation\" + (definition.name ? \" named '\" + definition.name.value + \"'\" : '') + \". \" +\n 'No operations are allowed when using a fragment as a query. Only fragments are allowed.');\n }\n if (definition.kind === 'FragmentDefinition') {\n fragments.push(definition);\n }\n });\n if (typeof actualFragmentName === 'undefined') {\n process.env.NODE_ENV === \"production\" ? invariant(fragments.length === 1, 43) : invariant(fragments.length === 1, \"Found \" + fragments.length + \" fragments. `fragmentName` must be provided when there is not exactly 1 fragment.\");\n actualFragmentName = fragments[0].name.value;\n }\n var query = __assign(__assign({}, document), { definitions: __spreadArrays([\n {\n kind: 'OperationDefinition',\n operation: 'query',\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'FragmentSpread',\n name: {\n kind: 'Name',\n value: actualFragmentName,\n },\n },\n ],\n },\n }\n ], document.definitions) });\n return query;\n}\nexport function createFragmentMap(fragments) {\n if (fragments === void 0) { fragments = []; }\n var symTable = {};\n fragments.forEach(function (fragment) {\n symTable[fragment.name.value] = fragment;\n });\n return symTable;\n}\nexport function getFragmentFromSelection(selection, fragmentMap) {\n switch (selection.kind) {\n case 'InlineFragment':\n return selection;\n case 'FragmentSpread': {\n var fragment = fragmentMap && fragmentMap[selection.name.value];\n process.env.NODE_ENV === \"production\" ? invariant(fragment, 44) : invariant(fragment, \"No fragment named \" + selection.name.value + \".\");\n return fragment;\n }\n default:\n return null;\n }\n}\n//# sourceMappingURL=fragments.js.map","import stringify from 'fast-json-stable-stringify';\nimport { InvariantError } from 'ts-invariant';\nimport { getFragmentFromSelection } from \"./fragments.js\";\nexport function makeReference(id) {\n return { __ref: String(id) };\n}\nexport function isReference(obj) {\n return Boolean(obj && typeof obj === 'object' && typeof obj.__ref === 'string');\n}\nfunction isStringValue(value) {\n return value.kind === 'StringValue';\n}\nfunction isBooleanValue(value) {\n return value.kind === 'BooleanValue';\n}\nfunction isIntValue(value) {\n return value.kind === 'IntValue';\n}\nfunction isFloatValue(value) {\n return value.kind === 'FloatValue';\n}\nfunction isVariable(value) {\n return value.kind === 'Variable';\n}\nfunction isObjectValue(value) {\n return value.kind === 'ObjectValue';\n}\nfunction isListValue(value) {\n return value.kind === 'ListValue';\n}\nfunction isEnumValue(value) {\n return value.kind === 'EnumValue';\n}\nfunction isNullValue(value) {\n return value.kind === 'NullValue';\n}\nexport function valueToObjectRepresentation(argObj, name, value, variables) {\n if (isIntValue(value) || isFloatValue(value)) {\n argObj[name.value] = Number(value.value);\n }\n else if (isBooleanValue(value) || isStringValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isObjectValue(value)) {\n var nestedArgObj_1 = {};\n value.fields.map(function (obj) {\n return valueToObjectRepresentation(nestedArgObj_1, obj.name, obj.value, variables);\n });\n argObj[name.value] = nestedArgObj_1;\n }\n else if (isVariable(value)) {\n var variableValue = (variables || {})[value.name.value];\n argObj[name.value] = variableValue;\n }\n else if (isListValue(value)) {\n argObj[name.value] = value.values.map(function (listValue) {\n var nestedArgArrayObj = {};\n valueToObjectRepresentation(nestedArgArrayObj, name, listValue, variables);\n return nestedArgArrayObj[name.value];\n });\n }\n else if (isEnumValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isNullValue(value)) {\n argObj[name.value] = null;\n }\n else {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(53) : new InvariantError(\"The inline argument \\\"\" + name.value + \"\\\" of kind \\\"\" + value.kind + \"\\\"\" +\n 'is not supported. Use variables instead of inline arguments to ' +\n 'overcome this limitation.');\n }\n}\nexport function storeKeyNameFromField(field, variables) {\n var directivesObj = null;\n if (field.directives) {\n directivesObj = {};\n field.directives.forEach(function (directive) {\n directivesObj[directive.name.value] = {};\n if (directive.arguments) {\n directive.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(directivesObj[directive.name.value], name, value, variables);\n });\n }\n });\n }\n var argObj = null;\n if (field.arguments && field.arguments.length) {\n argObj = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj, name, value, variables);\n });\n }\n return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\nvar KNOWN_DIRECTIVES = [\n 'connection',\n 'include',\n 'skip',\n 'client',\n 'rest',\n 'export',\n];\nexport function getStoreKeyName(fieldName, args, directives) {\n if (args &&\n directives &&\n directives['connection'] &&\n directives['connection']['key']) {\n if (directives['connection']['filter'] &&\n directives['connection']['filter'].length > 0) {\n var filterKeys = directives['connection']['filter']\n ? directives['connection']['filter']\n : [];\n filterKeys.sort();\n var filteredArgs_1 = {};\n filterKeys.forEach(function (key) {\n filteredArgs_1[key] = args[key];\n });\n return directives['connection']['key'] + \"(\" + JSON.stringify(filteredArgs_1) + \")\";\n }\n else {\n return directives['connection']['key'];\n }\n }\n var completeFieldName = fieldName;\n if (args) {\n var stringifiedArgs = stringify(args);\n completeFieldName += \"(\" + stringifiedArgs + \")\";\n }\n if (directives) {\n Object.keys(directives).forEach(function (key) {\n if (KNOWN_DIRECTIVES.indexOf(key) !== -1)\n return;\n if (directives[key] && Object.keys(directives[key]).length) {\n completeFieldName += \"@\" + key + \"(\" + JSON.stringify(directives[key]) + \")\";\n }\n else {\n completeFieldName += \"@\" + key;\n }\n });\n }\n return completeFieldName;\n}\nexport function argumentsObjectFromField(field, variables) {\n if (field.arguments && field.arguments.length) {\n var argObj_1 = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj_1, name, value, variables);\n });\n return argObj_1;\n }\n return null;\n}\nexport function resultKeyNameFromField(field) {\n return field.alias ? field.alias.value : field.name.value;\n}\nexport function getTypenameFromResult(result, selectionSet, fragmentMap) {\n if (typeof result.__typename === 'string') {\n return result.__typename;\n }\n for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {\n var selection = _a[_i];\n if (isField(selection)) {\n if (selection.name.value === '__typename') {\n return result[resultKeyNameFromField(selection)];\n }\n }\n else {\n var typename = getTypenameFromResult(result, getFragmentFromSelection(selection, fragmentMap).selectionSet, fragmentMap);\n if (typeof typename === 'string') {\n return typename;\n }\n }\n }\n}\nexport function isField(selection) {\n return selection.kind === 'Field';\n}\nexport function isInlineFragment(selection) {\n return selection.kind === 'InlineFragment';\n}\n//# sourceMappingURL=storeUtils.js.map","import { invariant, InvariantError } from 'ts-invariant';\nimport { valueToObjectRepresentation } from \"./storeUtils.js\";\nexport function checkDocument(doc) {\n process.env.NODE_ENV === \"production\" ? invariant(doc && doc.kind === 'Document', 45) : invariant(doc && doc.kind === 'Document', \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(46) : new InvariantError(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n process.env.NODE_ENV === \"production\" ? invariant(operations.length <= 1, 47) : invariant(operations.length <= 1, \"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n return doc;\n}\nexport function getOperationDefinition(doc) {\n checkDocument(doc);\n return doc.definitions.filter(function (definition) { return definition.kind === 'OperationDefinition'; })[0];\n}\nexport function getOperationName(doc) {\n return (doc.definitions\n .filter(function (definition) {\n return definition.kind === 'OperationDefinition' && definition.name;\n })\n .map(function (x) { return x.name.value; })[0] || null);\n}\nexport function getFragmentDefinitions(doc) {\n return doc.definitions.filter(function (definition) { return definition.kind === 'FragmentDefinition'; });\n}\nexport function getQueryDefinition(doc) {\n var queryDef = getOperationDefinition(doc);\n process.env.NODE_ENV === \"production\" ? invariant(queryDef && queryDef.operation === 'query', 48) : invariant(queryDef && queryDef.operation === 'query', 'Must contain a query definition.');\n return queryDef;\n}\nexport function getFragmentDefinition(doc) {\n process.env.NODE_ENV === \"production\" ? invariant(doc.kind === 'Document', 49) : invariant(doc.kind === 'Document', \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n process.env.NODE_ENV === \"production\" ? invariant(doc.definitions.length <= 1, 50) : invariant(doc.definitions.length <= 1, 'Fragment must have exactly one definition.');\n var fragmentDef = doc.definitions[0];\n process.env.NODE_ENV === \"production\" ? invariant(fragmentDef.kind === 'FragmentDefinition', 51) : invariant(fragmentDef.kind === 'FragmentDefinition', 'Must be a fragment definition.');\n return fragmentDef;\n}\nexport function getMainDefinition(queryDoc) {\n checkDocument(queryDoc);\n var fragmentDefinition;\n for (var _i = 0, _a = queryDoc.definitions; _i < _a.length; _i++) {\n var definition = _a[_i];\n if (definition.kind === 'OperationDefinition') {\n var operation = definition.operation;\n if (operation === 'query' ||\n operation === 'mutation' ||\n operation === 'subscription') {\n return definition;\n }\n }\n if (definition.kind === 'FragmentDefinition' && !fragmentDefinition) {\n fragmentDefinition = definition;\n }\n }\n if (fragmentDefinition) {\n return fragmentDefinition;\n }\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(52) : new InvariantError('Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.');\n}\nexport function getDefaultValues(definition) {\n var defaultValues = Object.create(null);\n var defs = definition && definition.variableDefinitions;\n if (defs && defs.length) {\n defs.forEach(function (def) {\n if (def.defaultValue) {\n valueToObjectRepresentation(defaultValues, def.variable.name, def.defaultValue);\n }\n });\n }\n return defaultValues;\n}\n//# sourceMappingURL=getFromAST.js.map","export function filterInPlace(array, test, context) {\n var target = 0;\n array.forEach(function (elem, i) {\n if (test.call(this, elem, i, array)) {\n array[target++] = elem;\n }\n }, context);\n array.length = target;\n return array;\n}\n//# sourceMappingURL=filterInPlace.js.map","import { __assign, __spreadArrays } from \"tslib\";\nimport { visit, } from 'graphql';\nimport { invariant } from 'ts-invariant';\nimport { checkDocument, getOperationDefinition, getFragmentDefinition, getFragmentDefinitions, getMainDefinition, } from \"./getFromAST.js\";\nimport { filterInPlace } from \"../common/filterInPlace.js\";\nimport { isField, isInlineFragment } from \"./storeUtils.js\";\nimport { createFragmentMap, } from \"./fragments.js\";\nvar TYPENAME_FIELD = {\n kind: 'Field',\n name: {\n kind: 'Name',\n value: '__typename',\n },\n};\nfunction isEmpty(op, fragments) {\n return op.selectionSet.selections.every(function (selection) {\n return selection.kind === 'FragmentSpread' &&\n isEmpty(fragments[selection.name.value], fragments);\n });\n}\nfunction nullIfDocIsEmpty(doc) {\n return isEmpty(getOperationDefinition(doc) || getFragmentDefinition(doc), createFragmentMap(getFragmentDefinitions(doc)))\n ? null\n : doc;\n}\nfunction getDirectiveMatcher(directives) {\n return function directiveMatcher(directive) {\n return directives.some(function (dir) {\n return (dir.name && dir.name === directive.name.value) ||\n (dir.test && dir.test(directive));\n });\n };\n}\nexport function removeDirectivesFromDocument(directives, doc) {\n var variablesInUse = Object.create(null);\n var variablesToRemove = [];\n var fragmentSpreadsInUse = Object.create(null);\n var fragmentSpreadsToRemove = [];\n var modifiedDoc = nullIfDocIsEmpty(visit(doc, {\n Variable: {\n enter: function (node, _key, parent) {\n if (parent.kind !== 'VariableDefinition') {\n variablesInUse[node.name.value] = true;\n }\n },\n },\n Field: {\n enter: function (node) {\n if (directives && node.directives) {\n var shouldRemoveField = directives.some(function (directive) { return directive.remove; });\n if (shouldRemoveField &&\n node.directives &&\n node.directives.some(getDirectiveMatcher(directives))) {\n if (node.arguments) {\n node.arguments.forEach(function (arg) {\n if (arg.value.kind === 'Variable') {\n variablesToRemove.push({\n name: arg.value.name.value,\n });\n }\n });\n }\n if (node.selectionSet) {\n getAllFragmentSpreadsFromSelectionSet(node.selectionSet).forEach(function (frag) {\n fragmentSpreadsToRemove.push({\n name: frag.name.value,\n });\n });\n }\n return null;\n }\n }\n },\n },\n FragmentSpread: {\n enter: function (node) {\n fragmentSpreadsInUse[node.name.value] = true;\n },\n },\n Directive: {\n enter: function (node) {\n if (getDirectiveMatcher(directives)(node)) {\n return null;\n }\n },\n },\n }));\n if (modifiedDoc &&\n filterInPlace(variablesToRemove, function (v) { return !!v.name && !variablesInUse[v.name]; }).length) {\n modifiedDoc = removeArgumentsFromDocument(variablesToRemove, modifiedDoc);\n }\n if (modifiedDoc &&\n filterInPlace(fragmentSpreadsToRemove, function (fs) { return !!fs.name && !fragmentSpreadsInUse[fs.name]; })\n .length) {\n modifiedDoc = removeFragmentSpreadFromDocument(fragmentSpreadsToRemove, modifiedDoc);\n }\n return modifiedDoc;\n}\nexport function addTypenameToDocument(doc) {\n return visit(checkDocument(doc), {\n SelectionSet: {\n enter: function (node, _key, parent) {\n if (parent &&\n parent.kind === 'OperationDefinition') {\n return;\n }\n var selections = node.selections;\n if (!selections) {\n return;\n }\n var skip = selections.some(function (selection) {\n return (isField(selection) &&\n (selection.name.value === '__typename' ||\n selection.name.value.lastIndexOf('__', 0) === 0));\n });\n if (skip) {\n return;\n }\n var field = parent;\n if (isField(field) &&\n field.directives &&\n field.directives.some(function (d) { return d.name.value === 'export'; })) {\n return;\n }\n return __assign(__assign({}, node), { selections: __spreadArrays(selections, [TYPENAME_FIELD]) });\n },\n },\n });\n}\naddTypenameToDocument.added = function (field) {\n return field === TYPENAME_FIELD;\n};\nvar connectionRemoveConfig = {\n test: function (directive) {\n var willRemove = directive.name.value === 'connection';\n if (willRemove) {\n if (!directive.arguments ||\n !directive.arguments.some(function (arg) { return arg.name.value === 'key'; })) {\n process.env.NODE_ENV === \"production\" || invariant.warn('Removing an @connection directive even though it does not have a key. ' +\n 'You may want to use the key parameter to specify a store key.');\n }\n }\n return willRemove;\n },\n};\nexport function removeConnectionDirectiveFromDocument(doc) {\n return removeDirectivesFromDocument([connectionRemoveConfig], checkDocument(doc));\n}\nfunction hasDirectivesInSelectionSet(directives, selectionSet, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n return (!!selectionSet &&\n selectionSet.selections &&\n selectionSet.selections.some(function (selection) {\n return hasDirectivesInSelection(directives, selection, nestedCheck);\n }));\n}\nfunction hasDirectivesInSelection(directives, selection, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n if (!isField(selection)) {\n return true;\n }\n if (!selection.directives) {\n return false;\n }\n return (selection.directives.some(getDirectiveMatcher(directives)) ||\n (nestedCheck &&\n hasDirectivesInSelectionSet(directives, selection.selectionSet, nestedCheck)));\n}\nfunction getArgumentMatcher(config) {\n return function argumentMatcher(argument) {\n return config.some(function (aConfig) {\n return argument.value &&\n argument.value.kind === 'Variable' &&\n argument.value.name &&\n (aConfig.name === argument.value.name.value ||\n (aConfig.test && aConfig.test(argument)));\n });\n };\n}\nexport function removeArgumentsFromDocument(config, doc) {\n var argMatcher = getArgumentMatcher(config);\n return nullIfDocIsEmpty(visit(doc, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { variableDefinitions: node.variableDefinitions ? node.variableDefinitions.filter(function (varDef) {\n return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });\n }) : [] });\n },\n },\n Field: {\n enter: function (node) {\n var shouldRemoveField = config.some(function (argConfig) { return argConfig.remove; });\n if (shouldRemoveField) {\n var argMatchCount_1 = 0;\n if (node.arguments) {\n node.arguments.forEach(function (arg) {\n if (argMatcher(arg)) {\n argMatchCount_1 += 1;\n }\n });\n }\n if (argMatchCount_1 === 1) {\n return null;\n }\n }\n },\n },\n Argument: {\n enter: function (node) {\n if (argMatcher(node)) {\n return null;\n }\n },\n },\n }));\n}\nexport function removeFragmentSpreadFromDocument(config, doc) {\n function enter(node) {\n if (config.some(function (def) { return def.name === node.name.value; })) {\n return null;\n }\n }\n return nullIfDocIsEmpty(visit(doc, {\n FragmentSpread: { enter: enter },\n FragmentDefinition: { enter: enter },\n }));\n}\nfunction getAllFragmentSpreadsFromSelectionSet(selectionSet) {\n var allFragments = [];\n selectionSet.selections.forEach(function (selection) {\n if ((isField(selection) || isInlineFragment(selection)) &&\n selection.selectionSet) {\n getAllFragmentSpreadsFromSelectionSet(selection.selectionSet).forEach(function (frag) { return allFragments.push(frag); });\n }\n else if (selection.kind === 'FragmentSpread') {\n allFragments.push(selection);\n }\n });\n return allFragments;\n}\nexport function buildQueryFromSelectionSet(document) {\n var definition = getMainDefinition(document);\n var definitionOperation = definition.operation;\n if (definitionOperation === 'query') {\n return document;\n }\n var modifiedDoc = visit(document, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { operation: 'query' });\n },\n },\n });\n return modifiedDoc;\n}\nexport function removeClientSetsFromDocument(document) {\n checkDocument(document);\n var modifiedDoc = removeDirectivesFromDocument([\n {\n test: function (directive) { return directive.name.value === 'client'; },\n remove: true,\n },\n ], document);\n if (modifiedDoc) {\n modifiedDoc = visit(modifiedDoc, {\n FragmentDefinition: {\n enter: function (node) {\n if (node.selectionSet) {\n var isTypenameOnly = node.selectionSet.selections.every(function (selection) {\n return isField(selection) && selection.name.value === '__typename';\n });\n if (isTypenameOnly) {\n return null;\n }\n }\n },\n },\n });\n }\n return modifiedDoc;\n}\n//# sourceMappingURL=transform.js.map","import { __assign, __spreadArrays } from \"tslib\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function mergeDeep() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return mergeDeepArray(sources);\n}\nexport function mergeDeepArray(sources) {\n var target = sources[0] || {};\n var count = sources.length;\n if (count > 1) {\n var merger = new DeepMerger();\n for (var i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object';\n}\nvar defaultReconciler = function (target, source, property) {\n return this.merge(target[property], source[property]);\n};\nvar DeepMerger = (function () {\n function DeepMerger(reconciler) {\n if (reconciler === void 0) { reconciler = defaultReconciler; }\n this.reconciler = reconciler;\n this.isObject = isObject;\n this.pastCopies = new Set();\n }\n DeepMerger.prototype.merge = function (target, source) {\n var _this = this;\n var context = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n context[_i - 2] = arguments[_i];\n }\n if (isObject(source) && isObject(target)) {\n Object.keys(source).forEach(function (sourceKey) {\n if (hasOwnProperty.call(target, sourceKey)) {\n var targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n var result = _this.reconciler.apply(_this, __spreadArrays([target, source, sourceKey], context));\n if (result !== targetValue) {\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n }\n else {\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n return target;\n }\n return source;\n };\n DeepMerger.prototype.shallowCopyForMerge = function (value) {\n if (isObject(value) && !this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = value.slice(0);\n }\n else {\n value = __assign({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n this.pastCopies.add(value);\n }\n return value;\n };\n return DeepMerger;\n}());\nexport { DeepMerger };\n//# sourceMappingURL=mergeDeep.js.map","import { __assign, __spreadArrays } from \"tslib\";\nimport { __rest } from \"tslib\";\nimport { mergeDeep } from \"../common/mergeDeep.js\";\nexport function concatPagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n merge: function (existing, incoming) {\n return existing ? __spreadArrays(existing, incoming) : incoming;\n },\n };\n}\nexport function offsetLimitPagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n merge: function (existing, incoming, _a) {\n var args = _a.args;\n var merged = existing ? existing.slice(0) : [];\n if (args) {\n var _b = args.offset, offset = _b === void 0 ? 0 : _b;\n for (var i = 0; i < incoming.length; ++i) {\n merged[offset + i] = incoming[i];\n }\n }\n else {\n merged.push.apply(merged, incoming);\n }\n return merged;\n },\n };\n}\nexport function relayStylePagination(keyArgs) {\n if (keyArgs === void 0) { keyArgs = false; }\n return {\n keyArgs: keyArgs,\n read: function (existing, _a) {\n var canRead = _a.canRead, readField = _a.readField;\n if (!existing)\n return;\n var edges = [];\n var startCursor = \"\";\n var endCursor = \"\";\n existing.edges.forEach(function (edge) {\n if (canRead(readField(\"node\", edge))) {\n edges.push(edge);\n if (edge.cursor) {\n startCursor = startCursor || edge.cursor;\n endCursor = edge.cursor;\n }\n }\n });\n return __assign(__assign({}, getExtras(existing)), { edges: edges, pageInfo: __assign(__assign({}, existing.pageInfo), { startCursor: startCursor,\n endCursor: endCursor }) });\n },\n merge: function (existing, incoming, _a) {\n if (existing === void 0) { existing = makeEmptyData(); }\n var args = _a.args, isReference = _a.isReference, readField = _a.readField;\n var incomingEdges = incoming.edges ? incoming.edges.map(function (edge) {\n if (isReference(edge = __assign({}, edge))) {\n edge.cursor = readField(\"cursor\", edge);\n }\n return edge;\n }) : [];\n if (incoming.pageInfo) {\n var pageInfo_1 = incoming.pageInfo;\n var startCursor = pageInfo_1.startCursor, endCursor = pageInfo_1.endCursor;\n var firstEdge = incomingEdges[0];\n var lastEdge = incomingEdges[incomingEdges.length - 1];\n if (firstEdge && startCursor) {\n firstEdge.cursor = startCursor;\n }\n if (lastEdge && endCursor) {\n lastEdge.cursor = endCursor;\n }\n var firstCursor = firstEdge && firstEdge.cursor;\n if (firstCursor && !startCursor) {\n incoming = mergeDeep(incoming, {\n pageInfo: {\n startCursor: firstCursor,\n },\n });\n }\n var lastCursor = lastEdge && lastEdge.cursor;\n if (lastCursor && !endCursor) {\n incoming = mergeDeep(incoming, {\n pageInfo: {\n endCursor: lastCursor,\n },\n });\n }\n }\n var prefix = existing.edges;\n var suffix = [];\n if (args && args.after) {\n var index = prefix.findIndex(function (edge) { return edge.cursor === args.after; });\n if (index >= 0) {\n prefix = prefix.slice(0, index + 1);\n }\n }\n else if (args && args.before) {\n var index = prefix.findIndex(function (edge) { return edge.cursor === args.before; });\n suffix = index < 0 ? prefix : prefix.slice(index);\n prefix = [];\n }\n else if (incoming.edges) {\n prefix = [];\n }\n var edges = __spreadArrays(prefix, incomingEdges, suffix);\n var pageInfo = __assign(__assign({}, incoming.pageInfo), existing.pageInfo);\n if (incoming.pageInfo) {\n var _b = incoming.pageInfo, hasPreviousPage = _b.hasPreviousPage, hasNextPage = _b.hasNextPage, startCursor = _b.startCursor, endCursor = _b.endCursor;\n if (!prefix.length) {\n if (void 0 !== hasPreviousPage)\n pageInfo.hasPreviousPage = hasPreviousPage;\n if (void 0 !== startCursor)\n pageInfo.startCursor = startCursor;\n }\n if (!suffix.length) {\n if (void 0 !== hasNextPage)\n pageInfo.hasNextPage = hasNextPage;\n if (void 0 !== endCursor)\n pageInfo.endCursor = endCursor;\n }\n }\n return __assign(__assign(__assign({}, getExtras(existing)), getExtras(incoming)), { edges: edges,\n pageInfo: pageInfo });\n },\n };\n}\nvar getExtras = function (obj) { return __rest(obj, notExtras); };\nvar notExtras = [\"edges\", \"pageInfo\"];\nfunction makeEmptyData() {\n return {\n edges: [],\n pageInfo: {\n hasPreviousPage: false,\n hasNextPage: true,\n startCursor: \"\",\n endCursor: \"\",\n },\n };\n}\n//# sourceMappingURL=pagination.js.map","import Observable from 'zen-observable';\nimport 'symbol-observable';\nObservable.prototype['@@observable'] = function () { return this; };\nexport { Observable };\n//# sourceMappingURL=Observable.js.map","var toString = Object.prototype.toString;\nexport function cloneDeep(value) {\n return cloneDeepHelper(value);\n}\nfunction cloneDeepHelper(val, seen) {\n switch (toString.call(val)) {\n case \"[object Array]\": {\n seen = seen || new Map;\n if (seen.has(val))\n return seen.get(val);\n var copy_1 = val.slice(0);\n seen.set(val, copy_1);\n copy_1.forEach(function (child, i) {\n copy_1[i] = cloneDeepHelper(child, seen);\n });\n return copy_1;\n }\n case \"[object Object]\": {\n seen = seen || new Map;\n if (seen.has(val))\n return seen.get(val);\n var copy_2 = Object.create(Object.getPrototypeOf(val));\n seen.set(val, copy_2);\n Object.keys(val).forEach(function (key) {\n copy_2[key] = cloneDeepHelper(val[key], seen);\n });\n return copy_2;\n }\n default:\n return val;\n }\n}\n//# sourceMappingURL=cloneDeep.js.map","import { isDevelopment, isTest } from \"./environment.js\";\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction deepFreeze(value) {\n var workSet = new Set([value]);\n workSet.forEach(function (obj) {\n if (isObject(obj)) {\n if (!Object.isFrozen(obj))\n Object.freeze(obj);\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if (isObject(obj[name]))\n workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\nexport function maybeDeepFreeze(obj) {\n if (process.env.NODE_ENV !== \"production\" && (isDevelopment() || isTest())) {\n deepFreeze(obj);\n }\n return obj;\n}\n//# sourceMappingURL=maybeDeepFreeze.js.map","export function iterateObserversSafely(observers, method, argument) {\n var observersWithMethod = [];\n observers.forEach(function (obs) { return obs[method] && observersWithMethod.push(obs); });\n observersWithMethod.forEach(function (obs) { return obs[method](argument); });\n}\n//# sourceMappingURL=iteration.js.map","import { Observable } from \"./Observable.js\";\nexport function asyncMap(observable, mapFn, catchFn) {\n return new Observable(function (observer) {\n var next = observer.next, error = observer.error, complete = observer.complete;\n var activeCallbackCount = 0;\n var completed = false;\n function makeCallback(examiner, delegate) {\n if (examiner) {\n return function (arg) {\n ++activeCallbackCount;\n new Promise(function (resolve) { return resolve(examiner(arg)); }).then(function (result) {\n --activeCallbackCount;\n next && next.call(observer, result);\n if (completed) {\n handler.complete();\n }\n }, function (e) {\n --activeCallbackCount;\n error && error.call(observer, e);\n });\n };\n }\n else {\n return function (arg) { return delegate && delegate.call(observer, arg); };\n }\n }\n var handler = {\n next: makeCallback(mapFn, next),\n error: makeCallback(catchFn, error),\n complete: function () {\n completed = true;\n if (!activeCallbackCount) {\n complete && complete.call(observer);\n }\n },\n };\n var sub = observable.subscribe(handler);\n return function () { return sub.unsubscribe(); };\n });\n}\n//# sourceMappingURL=asyncMap.js.map","import { __extends } from \"tslib\";\nimport { Observable } from \"./Observable.js\";\nimport { iterateObserversSafely } from \"./iteration.js\";\nfunction isPromiseLike(value) {\n return value && typeof value.then === \"function\";\n}\nvar Concast = (function (_super) {\n __extends(Concast, _super);\n function Concast(sources) {\n var _this = _super.call(this, function (observer) {\n _this.addObserver(observer);\n return function () { return _this.removeObserver(observer); };\n }) || this;\n _this.observers = new Set();\n _this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n _this.handlers = {\n next: function (result) {\n if (_this.sub !== null) {\n _this.latest = [\"next\", result];\n iterateObserversSafely(_this.observers, \"next\", result);\n }\n },\n error: function (error) {\n if (_this.sub !== null) {\n if (_this.sub)\n _this.sub.unsubscribe();\n _this.sub = null;\n _this.latest = [\"error\", error];\n _this.reject(error);\n iterateObserversSafely(_this.observers, \"error\", error);\n }\n },\n complete: function () {\n if (_this.sub !== null) {\n var value = _this.sources.shift();\n if (!value) {\n _this.sub = null;\n if (_this.latest &&\n _this.latest[0] === \"next\") {\n _this.resolve(_this.latest[1]);\n }\n else {\n _this.resolve();\n }\n iterateObserversSafely(_this.observers, \"complete\");\n }\n else if (isPromiseLike(value)) {\n value.then(function (obs) { return _this.sub = obs.subscribe(_this.handlers); });\n }\n else {\n _this.sub = value.subscribe(_this.handlers);\n }\n }\n },\n };\n _this.cancel = function (reason) {\n _this.reject(reason);\n _this.sources = [];\n _this.handlers.complete();\n };\n _this.promise.catch(function (_) { });\n if (isPromiseLike(sources)) {\n sources.then(function (iterable) { return _this.start(iterable); }, _this.handlers.error);\n }\n else {\n _this.start(sources);\n }\n return _this;\n }\n Concast.prototype.start = function (sources) {\n if (this.sub !== void 0)\n return;\n this.sources = Array.from(sources);\n this.handlers.complete();\n };\n Concast.prototype.addObserver = function (observer) {\n if (!this.observers.has(observer)) {\n if (this.latest) {\n var nextOrError = this.latest[0];\n var method = observer[nextOrError];\n if (method) {\n method.call(observer, this.latest[1]);\n }\n if (this.sub === null &&\n nextOrError === \"next\" &&\n observer.complete) {\n observer.complete();\n }\n }\n this.observers.add(observer);\n }\n };\n Concast.prototype.removeObserver = function (observer, quietly) {\n if (this.observers.delete(observer) &&\n this.observers.size < 1) {\n if (quietly)\n return;\n if (this.sub) {\n this.sub.unsubscribe();\n this.reject(new Error(\"Observable cancelled prematurely\"));\n }\n this.sub = null;\n }\n };\n Concast.prototype.cleanup = function (callback) {\n var _this = this;\n var called = false;\n var once = function () {\n if (!called) {\n called = true;\n _this.observers.delete(observer);\n callback();\n }\n };\n var observer = {\n next: once,\n error: once,\n complete: once,\n };\n this.addObserver(observer);\n };\n return Concast;\n}(Observable));\nexport { Concast };\nif (typeof Symbol === \"function\" && Symbol.species) {\n Object.defineProperty(Concast, Symbol.species, {\n value: Observable,\n });\n}\n//# sourceMappingURL=Concast.js.map","export function isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\n//# sourceMappingURL=arrays.js.map","export function graphQLResultHasError(result) {\n return (result.errors && result.errors.length > 0) || false;\n}\n//# sourceMappingURL=errorHandling.js.map","export var canUseWeakMap = typeof WeakMap === 'function' && !(typeof navigator === 'object' &&\n navigator.product === 'ReactNative');\n//# sourceMappingURL=canUse.js.map","export function compact() {\n var objects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n objects[_i] = arguments[_i];\n }\n var result = Object.create(null);\n objects.forEach(function (obj) {\n if (!obj)\n return;\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n if (value !== void 0) {\n result[key] = value;\n }\n });\n });\n return result;\n}\n//# sourceMappingURL=compact.js.map","export var Cache;\n(function (Cache) {\n})(Cache || (Cache = {}));\n//# sourceMappingURL=Cache.js.map","export { ApolloProvider, ApolloConsumer, getApolloContext, resetApolloContext } from \"./context/index.js\";\nexport * from \"./hooks/index.js\";\nexport { DocumentType, operationName, parser } from \"./parser/index.js\";\nexport * from \"./types/types.js\";\n//# sourceMappingURL=index.js.map","import { equal } from '@wry/equality';\nimport { invariant } from 'ts-invariant';\nimport { parser, operationName } from \"../parser/index.js\";\nvar OperationData = (function () {\n function OperationData(options, context) {\n this.isMounted = false;\n this.previousOptions = {};\n this.context = {};\n this.options = {};\n this.options = options || {};\n this.context = context || {};\n }\n OperationData.prototype.getOptions = function () {\n return this.options;\n };\n OperationData.prototype.setOptions = function (newOptions, storePrevious) {\n if (storePrevious === void 0) { storePrevious = false; }\n if (storePrevious && !equal(this.options, newOptions)) {\n this.previousOptions = this.options;\n }\n this.options = newOptions;\n };\n OperationData.prototype.unmount = function () {\n this.isMounted = false;\n };\n OperationData.prototype.refreshClient = function () {\n var client = (this.options && this.options.client) ||\n (this.context && this.context.client);\n process.env.NODE_ENV === \"production\" ? invariant(!!client, 29) : invariant(!!client, 'Could not find \"client\" in the context or passed in as an option. ' +\n 'Wrap the root component in an , or pass an ' +\n 'ApolloClient instance in via options.');\n var isNew = false;\n if (client !== this.client) {\n isNew = true;\n this.client = client;\n this.cleanup();\n }\n return {\n client: this.client,\n isNew: isNew\n };\n };\n OperationData.prototype.verifyDocumentType = function (document, type) {\n var operation = parser(document);\n var requiredOperationName = operationName(type);\n var usedOperationName = operationName(operation.type);\n process.env.NODE_ENV === \"production\" ? invariant(operation.type === type, 30) : invariant(operation.type === type, \"Running a \" + requiredOperationName + \" requires a graphql \" +\n (requiredOperationName + \", but a \" + usedOperationName + \" was used instead.\"));\n };\n return OperationData;\n}());\nexport { OperationData };\n//# sourceMappingURL=OperationData.js.map","import { __assign, __extends } from \"tslib\";\nimport { equal } from '@wry/equality';\nimport { OperationData } from \"./OperationData.js\";\nvar SubscriptionData = (function (_super) {\n __extends(SubscriptionData, _super);\n function SubscriptionData(_a) {\n var options = _a.options, context = _a.context, setResult = _a.setResult;\n var _this = _super.call(this, options, context) || this;\n _this.currentObservable = {};\n _this.setResult = setResult;\n _this.initialize(options);\n return _this;\n }\n SubscriptionData.prototype.execute = function (result) {\n if (this.getOptions().skip === true) {\n this.cleanup();\n return {\n loading: false,\n error: undefined,\n data: undefined,\n variables: this.getOptions().variables\n };\n }\n var currentResult = result;\n if (this.refreshClient().isNew) {\n currentResult = this.getLoadingResult();\n }\n var shouldResubscribe = this.getOptions().shouldResubscribe;\n if (typeof shouldResubscribe === 'function') {\n shouldResubscribe = !!shouldResubscribe(this.getOptions());\n }\n if (shouldResubscribe !== false &&\n this.previousOptions &&\n Object.keys(this.previousOptions).length > 0 &&\n (this.previousOptions.subscription !== this.getOptions().subscription ||\n !equal(this.previousOptions.variables, this.getOptions().variables) ||\n this.previousOptions.skip !== this.getOptions().skip)) {\n this.cleanup();\n currentResult = this.getLoadingResult();\n }\n this.initialize(this.getOptions());\n this.startSubscription();\n this.previousOptions = this.getOptions();\n return __assign(__assign({}, currentResult), { variables: this.getOptions().variables });\n };\n SubscriptionData.prototype.afterExecute = function () {\n this.isMounted = true;\n };\n SubscriptionData.prototype.cleanup = function () {\n this.endSubscription();\n delete this.currentObservable.query;\n };\n SubscriptionData.prototype.initialize = function (options) {\n if (this.currentObservable.query || this.getOptions().skip === true)\n return;\n this.currentObservable.query = this.refreshClient().client.subscribe({\n query: options.subscription,\n variables: options.variables,\n fetchPolicy: options.fetchPolicy\n });\n };\n SubscriptionData.prototype.startSubscription = function () {\n if (this.currentObservable.subscription)\n return;\n this.currentObservable.subscription = this.currentObservable.query.subscribe({\n next: this.updateCurrentData.bind(this),\n error: this.updateError.bind(this),\n complete: this.completeSubscription.bind(this)\n });\n };\n SubscriptionData.prototype.getLoadingResult = function () {\n return {\n loading: true,\n error: undefined,\n data: undefined\n };\n };\n SubscriptionData.prototype.updateResult = function (result) {\n if (this.isMounted) {\n this.setResult(result);\n }\n };\n SubscriptionData.prototype.updateCurrentData = function (result) {\n var onSubscriptionData = this.getOptions().onSubscriptionData;\n this.updateResult({\n data: result.data,\n loading: false,\n error: undefined\n });\n if (onSubscriptionData) {\n onSubscriptionData({\n client: this.refreshClient().client,\n subscriptionData: result\n });\n }\n };\n SubscriptionData.prototype.updateError = function (error) {\n this.updateResult({\n error: error,\n loading: false\n });\n };\n SubscriptionData.prototype.completeSubscription = function () {\n var onSubscriptionComplete = this.getOptions().onSubscriptionComplete;\n if (onSubscriptionComplete)\n onSubscriptionComplete();\n this.endSubscription();\n };\n SubscriptionData.prototype.endSubscription = function () {\n if (this.currentObservable.subscription) {\n this.currentObservable.subscription.unsubscribe();\n delete this.currentObservable.subscription;\n }\n };\n return SubscriptionData;\n}(OperationData));\nexport { SubscriptionData };\n//# sourceMappingURL=SubscriptionData.js.map","import { __assign, __extends } from \"tslib\";\nimport { equal } from '@wry/equality';\nimport { DocumentType } from \"../parser/index.js\";\nimport { ApolloError } from \"../../errors/index.js\";\nimport { OperationData } from \"./OperationData.js\";\nimport { compact } from \"../../utilities/index.js\";\nvar MutationData = (function (_super) {\n __extends(MutationData, _super);\n function MutationData(_a) {\n var options = _a.options, context = _a.context, result = _a.result, setResult = _a.setResult;\n var _this = _super.call(this, options, context) || this;\n _this.runMutation = function (mutationFunctionOptions) {\n if (mutationFunctionOptions === void 0) { mutationFunctionOptions = {}; }\n _this.onMutationStart();\n var mutationId = _this.generateNewMutationId();\n return _this.mutate(mutationFunctionOptions)\n .then(function (response) {\n _this.onMutationCompleted(response, mutationId);\n return response;\n })\n .catch(function (error) {\n _this.onMutationError(error, mutationId);\n if (!_this.getOptions().onError)\n throw error;\n });\n };\n _this.verifyDocumentType(options.mutation, DocumentType.Mutation);\n _this.result = result;\n _this.setResult = setResult;\n _this.mostRecentMutationId = 0;\n return _this;\n }\n MutationData.prototype.execute = function (result) {\n this.isMounted = true;\n this.verifyDocumentType(this.getOptions().mutation, DocumentType.Mutation);\n return [\n this.runMutation,\n __assign(__assign({}, result), { client: this.refreshClient().client })\n ];\n };\n MutationData.prototype.afterExecute = function () {\n this.isMounted = true;\n return this.unmount.bind(this);\n };\n MutationData.prototype.cleanup = function () {\n };\n MutationData.prototype.mutate = function (mutationFunctionOptions) {\n return this.refreshClient().client.mutate(compact(this.getOptions(), mutationFunctionOptions));\n };\n MutationData.prototype.onMutationStart = function () {\n if (!this.result.loading && !this.getOptions().ignoreResults) {\n this.updateResult({\n loading: true,\n error: undefined,\n data: undefined,\n called: true\n });\n }\n };\n MutationData.prototype.onMutationCompleted = function (response, mutationId) {\n var _a = this.getOptions(), onCompleted = _a.onCompleted, ignoreResults = _a.ignoreResults;\n var data = response.data, errors = response.errors;\n var error = errors && errors.length > 0\n ? new ApolloError({ graphQLErrors: errors })\n : undefined;\n var callOncomplete = function () {\n return onCompleted ? onCompleted(data) : null;\n };\n if (this.isMostRecentMutation(mutationId) && !ignoreResults) {\n this.updateResult({\n called: true,\n loading: false,\n data: data,\n error: error\n });\n }\n callOncomplete();\n };\n MutationData.prototype.onMutationError = function (error, mutationId) {\n var onError = this.getOptions().onError;\n if (this.isMostRecentMutation(mutationId)) {\n this.updateResult({\n loading: false,\n error: error,\n data: undefined,\n called: true\n });\n }\n if (onError) {\n onError(error);\n }\n };\n MutationData.prototype.generateNewMutationId = function () {\n return ++this.mostRecentMutationId;\n };\n MutationData.prototype.isMostRecentMutation = function (mutationId) {\n return this.mostRecentMutationId === mutationId;\n };\n MutationData.prototype.updateResult = function (result) {\n if (this.isMounted &&\n (!this.previousResult || !equal(this.previousResult, result))) {\n this.setResult(result);\n this.previousResult = result;\n }\n };\n return MutationData;\n}(OperationData));\nexport { MutationData };\n//# sourceMappingURL=MutationData.js.map","import { __assign, __extends } from \"tslib\";\nimport { equal } from '@wry/equality';\nimport { ApolloError } from \"../../errors/index.js\";\nimport { NetworkStatus } from \"../../core/index.js\";\nimport { DocumentType } from \"../parser/index.js\";\nimport { OperationData } from \"./OperationData.js\";\nvar QueryData = (function (_super) {\n __extends(QueryData, _super);\n function QueryData(_a) {\n var options = _a.options, context = _a.context, onNewData = _a.onNewData;\n var _this = _super.call(this, options, context) || this;\n _this.previousData = {};\n _this.runLazy = false;\n _this.runLazyQuery = function (options) {\n _this.cleanup();\n _this.runLazy = true;\n _this.lazyOptions = options;\n _this.onNewData();\n };\n _this.getQueryResult = function () {\n var result = _this.observableQueryFields();\n var options = _this.getOptions();\n if (options.skip) {\n result = __assign(__assign({}, result), { data: undefined, error: undefined, loading: false, called: true });\n }\n else if (_this.currentObservable) {\n var currentResult = _this.currentObservable.getCurrentResult();\n var data = currentResult.data, loading = currentResult.loading, partial = currentResult.partial, networkStatus = currentResult.networkStatus, errors = currentResult.errors;\n var error = currentResult.error;\n if (errors && errors.length > 0) {\n error = new ApolloError({ graphQLErrors: errors });\n }\n result = __assign(__assign({}, result), { data: data,\n loading: loading,\n networkStatus: networkStatus,\n error: error, called: true });\n if (loading) {\n }\n else if (error) {\n Object.assign(result, {\n data: (_this.currentObservable.getLastResult() || {})\n .data\n });\n }\n else {\n var fetchPolicy = _this.currentObservable.options.fetchPolicy;\n var partialRefetch = options.partialRefetch;\n if (partialRefetch &&\n partial &&\n (!data || Object.keys(data).length === 0) &&\n fetchPolicy !== 'cache-only') {\n Object.assign(result, {\n loading: true,\n networkStatus: NetworkStatus.loading\n });\n result.refetch();\n return result;\n }\n }\n }\n result.client = _this.client;\n _this.setOptions(options, true);\n _this.previousData.loading =\n _this.previousData.result && _this.previousData.result.loading || false;\n _this.previousData.result = result;\n _this.currentObservable && _this.currentObservable.resetQueryStoreErrors();\n return result;\n };\n _this.obsRefetch = function (variables) { var _a; return (_a = _this.currentObservable) === null || _a === void 0 ? void 0 : _a.refetch(variables); };\n _this.obsFetchMore = function (fetchMoreOptions) { return _this.currentObservable.fetchMore(fetchMoreOptions); };\n _this.obsUpdateQuery = function (mapFn) { return _this.currentObservable.updateQuery(mapFn); };\n _this.obsStartPolling = function (pollInterval) {\n var _a;\n (_a = _this.currentObservable) === null || _a === void 0 ? void 0 : _a.startPolling(pollInterval);\n };\n _this.obsStopPolling = function () {\n var _a;\n (_a = _this.currentObservable) === null || _a === void 0 ? void 0 : _a.stopPolling();\n };\n _this.obsSubscribeToMore = function (options) { return _this.currentObservable.subscribeToMore(options); };\n _this.onNewData = onNewData;\n return _this;\n }\n QueryData.prototype.execute = function () {\n this.refreshClient();\n var _a = this.getOptions(), skip = _a.skip, query = _a.query;\n if (skip || query !== this.previousData.query) {\n this.removeQuerySubscription();\n this.previousData.query = query;\n }\n this.updateObservableQuery();\n if (this.isMounted)\n this.startQuerySubscription();\n return this.getExecuteSsrResult() || this.getExecuteResult();\n };\n QueryData.prototype.executeLazy = function () {\n return !this.runLazy\n ? [\n this.runLazyQuery,\n {\n loading: false,\n networkStatus: NetworkStatus.ready,\n called: false,\n data: undefined\n }\n ]\n : [this.runLazyQuery, this.execute()];\n };\n QueryData.prototype.fetchData = function () {\n var _this = this;\n var options = this.getOptions();\n if (options.skip || options.ssr === false)\n return false;\n return new Promise(function (resolve) { return _this.startQuerySubscription(resolve); });\n };\n QueryData.prototype.afterExecute = function (_a) {\n var _b = (_a === void 0 ? {} : _a).lazy, lazy = _b === void 0 ? false : _b;\n this.isMounted = true;\n if (!lazy || this.runLazy) {\n this.handleErrorOrCompleted();\n }\n this.previousOptions = this.getOptions();\n return this.unmount.bind(this);\n };\n QueryData.prototype.cleanup = function () {\n this.removeQuerySubscription();\n delete this.currentObservable;\n delete this.previousData.result;\n };\n QueryData.prototype.getOptions = function () {\n var options = _super.prototype.getOptions.call(this);\n if (this.lazyOptions) {\n options.variables = __assign(__assign({}, options.variables), this.lazyOptions.variables);\n options.context = __assign(__assign({}, options.context), this.lazyOptions.context);\n }\n if (this.runLazy) {\n delete options.skip;\n }\n return options;\n };\n QueryData.prototype.ssrInitiated = function () {\n return this.context && this.context.renderPromises;\n };\n QueryData.prototype.getExecuteResult = function () {\n var result = this.getQueryResult();\n this.startQuerySubscription();\n return result;\n };\n ;\n QueryData.prototype.getExecuteSsrResult = function () {\n var ssrDisabled = this.getOptions().ssr === false;\n var fetchDisabled = this.refreshClient().client.disableNetworkFetches;\n var ssrLoading = __assign({ loading: true, networkStatus: NetworkStatus.loading, called: true, data: undefined, stale: false, client: this.client }, this.observableQueryFields());\n if (ssrDisabled && (this.ssrInitiated() || fetchDisabled)) {\n this.previousData.result = ssrLoading;\n return ssrLoading;\n }\n var result;\n if (this.ssrInitiated()) {\n result =\n this.context.renderPromises.addQueryPromise(this, this.getQueryResult) || ssrLoading;\n }\n return result;\n };\n QueryData.prototype.prepareObservableQueryOptions = function () {\n var options = this.getOptions();\n this.verifyDocumentType(options.query, DocumentType.Query);\n var displayName = options.displayName || 'Query';\n if (this.ssrInitiated() &&\n (options.fetchPolicy === 'network-only' ||\n options.fetchPolicy === 'cache-and-network')) {\n options.fetchPolicy = 'cache-first';\n }\n return __assign(__assign({}, options), { displayName: displayName, context: options.context });\n };\n QueryData.prototype.initializeObservableQuery = function () {\n if (this.ssrInitiated()) {\n this.currentObservable = this.context.renderPromises.getSSRObservable(this.getOptions());\n }\n if (!this.currentObservable) {\n var observableQueryOptions = this.prepareObservableQueryOptions();\n this.previousData.observableQueryOptions = __assign(__assign({}, observableQueryOptions), { children: null });\n this.currentObservable = this.refreshClient().client.watchQuery(__assign({}, observableQueryOptions));\n if (this.ssrInitiated()) {\n this.context.renderPromises.registerSSRObservable(this.currentObservable, observableQueryOptions);\n }\n }\n };\n QueryData.prototype.updateObservableQuery = function () {\n if (!this.currentObservable) {\n this.initializeObservableQuery();\n return;\n }\n if (this.getOptions().skip)\n return;\n var newObservableQueryOptions = __assign(__assign({}, this.prepareObservableQueryOptions()), { children: null });\n if (!equal(newObservableQueryOptions, this.previousData.observableQueryOptions)) {\n this.previousData.observableQueryOptions = newObservableQueryOptions;\n this.currentObservable\n .setOptions(newObservableQueryOptions)\n .catch(function () { });\n }\n };\n QueryData.prototype.startQuerySubscription = function (onNewData) {\n var _this = this;\n if (onNewData === void 0) { onNewData = this.onNewData; }\n if (this.currentSubscription || this.getOptions().skip)\n return;\n this.currentSubscription = this.currentObservable.subscribe({\n next: function (_a) {\n var loading = _a.loading, networkStatus = _a.networkStatus, data = _a.data;\n var previousResult = _this.previousData.result;\n if (previousResult &&\n previousResult.loading === loading &&\n previousResult.networkStatus === networkStatus &&\n equal(previousResult.data, data)) {\n return;\n }\n onNewData();\n },\n error: function (error) {\n _this.resubscribeToQuery();\n if (!error.hasOwnProperty('graphQLErrors'))\n throw error;\n var previousResult = _this.previousData.result;\n if ((previousResult && previousResult.loading) ||\n !equal(error, _this.previousData.error)) {\n _this.previousData.error = error;\n onNewData();\n }\n }\n });\n };\n QueryData.prototype.resubscribeToQuery = function () {\n this.removeQuerySubscription();\n var currentObservable = this.currentObservable;\n if (currentObservable) {\n var lastError = currentObservable.getLastError();\n var lastResult = currentObservable.getLastResult();\n currentObservable.resetLastResults();\n this.startQuerySubscription();\n Object.assign(currentObservable, {\n lastError: lastError,\n lastResult: lastResult\n });\n }\n };\n QueryData.prototype.handleErrorOrCompleted = function () {\n if (!this.currentObservable || !this.previousData.result)\n return;\n var _a = this.previousData.result, data = _a.data, loading = _a.loading, error = _a.error;\n if (!loading) {\n var _b = this.getOptions(), query = _b.query, variables = _b.variables, onCompleted = _b.onCompleted, onError = _b.onError, skip = _b.skip;\n if (this.previousOptions &&\n !this.previousData.loading &&\n equal(this.previousOptions.query, query) &&\n equal(this.previousOptions.variables, variables)) {\n return;\n }\n if (onCompleted && !error && !skip) {\n onCompleted(data);\n }\n else if (onError && error) {\n onError(error);\n }\n }\n };\n QueryData.prototype.removeQuerySubscription = function () {\n if (this.currentSubscription) {\n this.currentSubscription.unsubscribe();\n delete this.currentSubscription;\n }\n };\n QueryData.prototype.observableQueryFields = function () {\n var _a;\n return {\n variables: (_a = this.currentObservable) === null || _a === void 0 ? void 0 : _a.variables,\n refetch: this.obsRefetch,\n fetchMore: this.obsFetchMore,\n updateQuery: this.obsUpdateQuery,\n startPolling: this.obsStartPolling,\n stopPolling: this.obsStopPolling,\n subscribeToMore: this.obsSubscribeToMore\n };\n };\n return QueryData;\n}(OperationData));\nexport { QueryData };\n//# sourceMappingURL=QueryData.js.map","import { __assign } from \"tslib\";\nimport { useContext, useEffect, useReducer, useRef } from 'react';\nimport { QueryData } from \"../../data/index.js\";\nimport { useDeepMemo } from \"./useDeepMemo.js\";\nimport { getApolloContext } from \"../../context/index.js\";\nexport function useBaseQuery(query, options, lazy) {\n if (lazy === void 0) { lazy = false; }\n var context = useContext(getApolloContext());\n var _a = useReducer(function (x) { return x + 1; }, 0), tick = _a[0], forceUpdate = _a[1];\n var updatedOptions = options ? __assign(__assign({}, options), { query: query }) : { query: query };\n var queryDataRef = useRef();\n var queryData = queryDataRef.current ||\n new QueryData({\n options: updatedOptions,\n context: context,\n onNewData: function () {\n if (!queryData.ssrInitiated()) {\n Promise.resolve().then(forceUpdate);\n }\n else {\n forceUpdate();\n }\n }\n });\n queryData.setOptions(updatedOptions);\n queryData.context = context;\n if (queryData.ssrInitiated() && !queryDataRef.current) {\n queryDataRef.current = queryData;\n }\n var memo = {\n options: __assign(__assign({}, updatedOptions), { onError: undefined, onCompleted: undefined }),\n context: context,\n tick: tick\n };\n var result = useDeepMemo(function () { return (lazy ? queryData.executeLazy() : queryData.execute()); }, memo);\n var queryResult = lazy\n ? result[1]\n : result;\n useEffect(function () {\n if (!queryDataRef.current) {\n queryDataRef.current = queryData;\n }\n return function () { return queryData.cleanup(); };\n }, []);\n useEffect(function () { return queryData.afterExecute({ lazy: lazy }); }, [\n queryResult.loading,\n queryResult.networkStatus,\n queryResult.error,\n queryResult.data,\n ]);\n return result;\n}\n//# sourceMappingURL=useBaseQuery.js.map","import { useRef } from 'react';\nimport { equal } from '@wry/equality';\nexport function useDeepMemo(memoFn, key) {\n var ref = useRef();\n if (!ref.current || !equal(key, ref.current.key)) {\n ref.current = { key: key, value: memoFn() };\n }\n return ref.current.value;\n}\n//# sourceMappingURL=useDeepMemo.js.map","import { useBaseQuery } from \"./utils/useBaseQuery.js\";\nexport function useLazyQuery(query, options) {\n return useBaseQuery(query, options, true);\n}\n//# sourceMappingURL=useLazyQuery.js.map","import { __assign } from \"tslib\";\nimport { useContext, useState, useRef, useEffect } from 'react';\nimport { MutationData } from \"../data/index.js\";\nimport { getApolloContext } from \"../context/index.js\";\nexport function useMutation(mutation, options) {\n var context = useContext(getApolloContext());\n var _a = useState({ called: false, loading: false }), result = _a[0], setResult = _a[1];\n var updatedOptions = options ? __assign(__assign({}, options), { mutation: mutation }) : { mutation: mutation };\n var mutationDataRef = useRef();\n function getMutationDataRef() {\n if (!mutationDataRef.current) {\n mutationDataRef.current = new MutationData({\n options: updatedOptions,\n context: context,\n result: result,\n setResult: setResult\n });\n }\n return mutationDataRef.current;\n }\n var mutationData = getMutationDataRef();\n mutationData.setOptions(updatedOptions);\n mutationData.context = context;\n useEffect(function () { return mutationData.afterExecute(); });\n return mutationData.execute(result);\n}\n//# sourceMappingURL=useMutation.js.map","import { useBaseQuery } from \"./utils/useBaseQuery.js\";\nexport function useQuery(query, options) {\n return useBaseQuery(query, options, false);\n}\n//# sourceMappingURL=useQuery.js.map","var MutationStore = (function () {\n function MutationStore() {\n this.store = {};\n }\n MutationStore.prototype.getStore = function () {\n return this.store;\n };\n MutationStore.prototype.get = function (mutationId) {\n return this.store[mutationId];\n };\n MutationStore.prototype.initMutation = function (mutationId, mutation, variables) {\n this.store[mutationId] = {\n mutation: mutation,\n variables: variables || {},\n loading: true,\n error: null,\n };\n };\n MutationStore.prototype.markMutationError = function (mutationId, error) {\n var mutation = this.store[mutationId];\n if (mutation) {\n mutation.loading = false;\n mutation.error = error;\n }\n };\n MutationStore.prototype.markMutationResult = function (mutationId) {\n var mutation = this.store[mutationId];\n if (mutation) {\n mutation.loading = false;\n mutation.error = null;\n }\n };\n MutationStore.prototype.reset = function () {\n this.store = {};\n };\n return MutationStore;\n}());\nexport { MutationStore };\n//# sourceMappingURL=MutationStore.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { visit, BREAK, } from 'graphql';\nimport { invariant } from 'ts-invariant';\nimport { argumentsObjectFromField, buildQueryFromSelectionSet, createFragmentMap, getFragmentDefinitions, getMainDefinition, hasDirectives, isField, isInlineFragment, mergeDeep, mergeDeepArray, removeClientSetsFromDocument, resultKeyNameFromField, shouldInclude, } from \"../utilities/index.js\";\nimport { cacheSlot } from \"../cache/index.js\";\nvar LocalState = (function () {\n function LocalState(_a) {\n var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;\n this.cache = cache;\n if (client) {\n this.client = client;\n }\n if (resolvers) {\n this.addResolvers(resolvers);\n }\n if (fragmentMatcher) {\n this.setFragmentMatcher(fragmentMatcher);\n }\n }\n LocalState.prototype.addResolvers = function (resolvers) {\n var _this = this;\n this.resolvers = this.resolvers || {};\n if (Array.isArray(resolvers)) {\n resolvers.forEach(function (resolverGroup) {\n _this.resolvers = mergeDeep(_this.resolvers, resolverGroup);\n });\n }\n else {\n this.resolvers = mergeDeep(this.resolvers, resolvers);\n }\n };\n LocalState.prototype.setResolvers = function (resolvers) {\n this.resolvers = {};\n this.addResolvers(resolvers);\n };\n LocalState.prototype.getResolvers = function () {\n return this.resolvers || {};\n };\n LocalState.prototype.runResolvers = function (_a) {\n var document = _a.document, remoteResult = _a.remoteResult, context = _a.context, variables = _a.variables, _b = _a.onlyRunForcedResolvers, onlyRunForcedResolvers = _b === void 0 ? false : _b;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_c) {\n if (document) {\n return [2, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return (__assign(__assign({}, remoteResult), { data: localResult.result })); })];\n }\n return [2, remoteResult];\n });\n });\n };\n LocalState.prototype.setFragmentMatcher = function (fragmentMatcher) {\n this.fragmentMatcher = fragmentMatcher;\n };\n LocalState.prototype.getFragmentMatcher = function () {\n return this.fragmentMatcher;\n };\n LocalState.prototype.clientQuery = function (document) {\n if (hasDirectives(['client'], document)) {\n if (this.resolvers) {\n return document;\n }\n }\n return null;\n };\n LocalState.prototype.serverQuery = function (document) {\n return removeClientSetsFromDocument(document);\n };\n LocalState.prototype.prepareContext = function (context) {\n var cache = this.cache;\n return __assign(__assign({}, context), { cache: cache,\n getCacheKey: function (obj) {\n return cache.identify(obj);\n } });\n };\n LocalState.prototype.addExportedVariables = function (document, variables, context) {\n if (variables === void 0) { variables = {}; }\n if (context === void 0) { context = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (document) {\n return [2, this.resolveDocument(document, this.buildRootValueFromCache(document, variables) || {}, this.prepareContext(context), variables).then(function (data) { return (__assign(__assign({}, variables), data.exportedVariables)); })];\n }\n return [2, __assign({}, variables)];\n });\n });\n };\n LocalState.prototype.shouldForceResolvers = function (document) {\n var forceResolvers = false;\n visit(document, {\n Directive: {\n enter: function (node) {\n if (node.name.value === 'client' && node.arguments) {\n forceResolvers = node.arguments.some(function (arg) {\n return arg.name.value === 'always' &&\n arg.value.kind === 'BooleanValue' &&\n arg.value.value === true;\n });\n if (forceResolvers) {\n return BREAK;\n }\n }\n },\n },\n });\n return forceResolvers;\n };\n LocalState.prototype.buildRootValueFromCache = function (document, variables) {\n return this.cache.diff({\n query: buildQueryFromSelectionSet(document),\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n };\n LocalState.prototype.resolveDocument = function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {\n if (context === void 0) { context = {}; }\n if (variables === void 0) { variables = {}; }\n if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }\n if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }\n return __awaiter(this, void 0, void 0, function () {\n var mainDefinition, fragments, fragmentMap, definitionOperation, defaultOperationType, _a, cache, client, execContext;\n return __generator(this, function (_b) {\n mainDefinition = getMainDefinition(document);\n fragments = getFragmentDefinitions(document);\n fragmentMap = createFragmentMap(fragments);\n definitionOperation = mainDefinition\n .operation;\n defaultOperationType = definitionOperation\n ? definitionOperation.charAt(0).toUpperCase() +\n definitionOperation.slice(1)\n : 'Query';\n _a = this, cache = _a.cache, client = _a.client;\n execContext = {\n fragmentMap: fragmentMap,\n context: __assign(__assign({}, context), { cache: cache,\n client: client }),\n variables: variables,\n fragmentMatcher: fragmentMatcher,\n defaultOperationType: defaultOperationType,\n exportedVariables: {},\n onlyRunForcedResolvers: onlyRunForcedResolvers,\n };\n return [2, this.resolveSelectionSet(mainDefinition.selectionSet, rootValue, execContext).then(function (result) { return ({\n result: result,\n exportedVariables: execContext.exportedVariables,\n }); })];\n });\n });\n };\n LocalState.prototype.resolveSelectionSet = function (selectionSet, rootValue, execContext) {\n return __awaiter(this, void 0, void 0, function () {\n var fragmentMap, context, variables, resultsToMerge, execute;\n var _this = this;\n return __generator(this, function (_a) {\n fragmentMap = execContext.fragmentMap, context = execContext.context, variables = execContext.variables;\n resultsToMerge = [rootValue];\n execute = function (selection) { return __awaiter(_this, void 0, void 0, function () {\n var fragment, typeCondition;\n return __generator(this, function (_a) {\n if (!shouldInclude(selection, variables)) {\n return [2];\n }\n if (isField(selection)) {\n return [2, this.resolveField(selection, rootValue, execContext).then(function (fieldResult) {\n var _a;\n if (typeof fieldResult !== 'undefined') {\n resultsToMerge.push((_a = {},\n _a[resultKeyNameFromField(selection)] = fieldResult,\n _a));\n }\n })];\n }\n if (isInlineFragment(selection)) {\n fragment = selection;\n }\n else {\n fragment = fragmentMap[selection.name.value];\n process.env.NODE_ENV === \"production\" ? invariant(fragment, 11) : invariant(fragment, \"No fragment named \" + selection.name.value);\n }\n if (fragment && fragment.typeCondition) {\n typeCondition = fragment.typeCondition.name.value;\n if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {\n return [2, this.resolveSelectionSet(fragment.selectionSet, rootValue, execContext).then(function (fragmentResult) {\n resultsToMerge.push(fragmentResult);\n })];\n }\n }\n return [2];\n });\n }); };\n return [2, Promise.all(selectionSet.selections.map(execute)).then(function () {\n return mergeDeepArray(resultsToMerge);\n })];\n });\n });\n };\n LocalState.prototype.resolveField = function (field, rootValue, execContext) {\n return __awaiter(this, void 0, void 0, function () {\n var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;\n var _this = this;\n return __generator(this, function (_a) {\n variables = execContext.variables;\n fieldName = field.name.value;\n aliasedFieldName = resultKeyNameFromField(field);\n aliasUsed = fieldName !== aliasedFieldName;\n defaultResult = rootValue[aliasedFieldName] || rootValue[fieldName];\n resultPromise = Promise.resolve(defaultResult);\n if (!execContext.onlyRunForcedResolvers ||\n this.shouldForceResolvers(field)) {\n resolverType = rootValue.__typename || execContext.defaultOperationType;\n resolverMap = this.resolvers && this.resolvers[resolverType];\n if (resolverMap) {\n resolve = resolverMap[aliasUsed ? fieldName : aliasedFieldName];\n if (resolve) {\n resultPromise = Promise.resolve(cacheSlot.withValue(this.cache, resolve, [\n rootValue,\n argumentsObjectFromField(field, variables),\n execContext.context,\n { field: field, fragmentMap: execContext.fragmentMap },\n ]));\n }\n }\n }\n return [2, resultPromise.then(function (result) {\n if (result === void 0) { result = defaultResult; }\n if (field.directives) {\n field.directives.forEach(function (directive) {\n if (directive.name.value === 'export' && directive.arguments) {\n directive.arguments.forEach(function (arg) {\n if (arg.name.value === 'as' && arg.value.kind === 'StringValue') {\n execContext.exportedVariables[arg.value.value] = result;\n }\n });\n }\n });\n }\n if (!field.selectionSet) {\n return result;\n }\n if (result == null) {\n return result;\n }\n if (Array.isArray(result)) {\n return _this.resolveSubSelectedArray(field, result, execContext);\n }\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, result, execContext);\n }\n })];\n });\n });\n };\n LocalState.prototype.resolveSubSelectedArray = function (field, result, execContext) {\n var _this = this;\n return Promise.all(result.map(function (item) {\n if (item === null) {\n return null;\n }\n if (Array.isArray(item)) {\n return _this.resolveSubSelectedArray(field, item, execContext);\n }\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, item, execContext);\n }\n }));\n };\n return LocalState;\n}());\nexport { LocalState };\n//# sourceMappingURL=LocalState.js.map","import { equal } from \"@wry/equality\";\nimport { isNonEmptyArray, graphQLResultHasError, canUseWeakMap, } from \"../utilities/index.js\";\nimport { NetworkStatus, isNetworkRequestInFlight, } from \"./networkStatus.js\";\nvar destructiveMethodCounts = new (canUseWeakMap ? WeakMap : Map)();\nfunction wrapDestructiveCacheMethod(cache, methodName) {\n var original = cache[methodName];\n if (typeof original === \"function\") {\n cache[methodName] = function () {\n destructiveMethodCounts.set(cache, (destructiveMethodCounts.get(cache) + 1) % 1e15);\n return original.apply(this, arguments);\n };\n }\n}\nvar QueryInfo = (function () {\n function QueryInfo(cache) {\n this.cache = cache;\n this.listeners = new Set();\n this.document = null;\n this.lastRequestId = 1;\n this.subscriptions = new Set();\n this.stopped = false;\n this.dirty = false;\n this.diff = null;\n this.observableQuery = null;\n if (!destructiveMethodCounts.has(cache)) {\n destructiveMethodCounts.set(cache, 0);\n wrapDestructiveCacheMethod(cache, \"evict\");\n wrapDestructiveCacheMethod(cache, \"modify\");\n wrapDestructiveCacheMethod(cache, \"reset\");\n }\n }\n QueryInfo.prototype.init = function (query) {\n var networkStatus = query.networkStatus || NetworkStatus.loading;\n if (this.variables &&\n this.networkStatus !== NetworkStatus.loading &&\n !equal(this.variables, query.variables)) {\n networkStatus = NetworkStatus.setVariables;\n }\n if (!equal(query.variables, this.variables)) {\n this.diff = null;\n }\n Object.assign(this, {\n document: query.document,\n variables: query.variables,\n networkError: null,\n graphQLErrors: this.graphQLErrors || [],\n networkStatus: networkStatus,\n });\n if (query.observableQuery) {\n this.setObservableQuery(query.observableQuery);\n }\n if (query.lastRequestId) {\n this.lastRequestId = query.lastRequestId;\n }\n return this;\n };\n QueryInfo.prototype.getDiff = function (variables) {\n if (variables === void 0) { variables = this.variables; }\n if (this.diff && equal(variables, this.variables)) {\n return this.diff;\n }\n this.updateWatch(this.variables = variables);\n return this.diff = this.cache.diff({\n query: this.document,\n variables: variables,\n returnPartialData: true,\n optimistic: true,\n });\n };\n QueryInfo.prototype.setDiff = function (diff) {\n var _this = this;\n var oldDiff = this.diff;\n this.diff = diff;\n if (!this.dirty &&\n (diff && diff.result) !== (oldDiff && oldDiff.result)) {\n this.dirty = true;\n if (!this.notifyTimeout) {\n this.notifyTimeout = setTimeout(function () { return _this.notify(); }, 0);\n }\n }\n };\n QueryInfo.prototype.setObservableQuery = function (oq) {\n var _this = this;\n if (oq === this.observableQuery)\n return;\n if (this.oqListener) {\n this.listeners.delete(this.oqListener);\n }\n this.observableQuery = oq;\n if (oq) {\n oq[\"queryInfo\"] = this;\n this.listeners.add(this.oqListener = function () {\n if (_this.getDiff().fromOptimisticTransaction) {\n oq[\"observe\"]();\n }\n else {\n oq.reobserve();\n }\n });\n }\n else {\n delete this.oqListener;\n }\n };\n QueryInfo.prototype.notify = function () {\n var _this = this;\n if (this.notifyTimeout) {\n clearTimeout(this.notifyTimeout);\n this.notifyTimeout = void 0;\n }\n if (this.shouldNotify()) {\n this.listeners.forEach(function (listener) { return listener(_this); });\n }\n this.dirty = false;\n };\n QueryInfo.prototype.shouldNotify = function () {\n if (!this.dirty || !this.listeners.size) {\n return false;\n }\n if (isNetworkRequestInFlight(this.networkStatus) &&\n this.observableQuery) {\n var fetchPolicy = this.observableQuery.options.fetchPolicy;\n if (fetchPolicy !== \"cache-only\" &&\n fetchPolicy !== \"cache-and-network\") {\n return false;\n }\n }\n return true;\n };\n QueryInfo.prototype.stop = function () {\n if (!this.stopped) {\n this.stopped = true;\n this.cancel();\n delete this.cancel;\n this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });\n var oq = this.observableQuery;\n if (oq)\n oq.stopPolling();\n }\n };\n QueryInfo.prototype.cancel = function () { };\n QueryInfo.prototype.updateWatch = function (variables) {\n var _this = this;\n if (variables === void 0) { variables = this.variables; }\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === \"no-cache\") {\n return;\n }\n if (!this.lastWatch ||\n this.lastWatch.query !== this.document ||\n !equal(variables, this.lastWatch.variables)) {\n this.cancel();\n this.cancel = this.cache.watch(this.lastWatch = {\n query: this.document,\n variables: variables,\n optimistic: true,\n callback: function (diff) { return _this.setDiff(diff); },\n });\n }\n };\n QueryInfo.prototype.shouldWrite = function (result, variables) {\n var lastWrite = this.lastWrite;\n return !(lastWrite &&\n lastWrite.dmCount === destructiveMethodCounts.get(this.cache) &&\n equal(variables, lastWrite.variables) &&\n equal(result.data, lastWrite.result.data));\n };\n QueryInfo.prototype.markResult = function (result, options, allowCacheWrite) {\n var _this = this;\n this.graphQLErrors = isNonEmptyArray(result.errors) ? result.errors : [];\n if (options.fetchPolicy === 'no-cache') {\n this.diff = { result: result.data, complete: true };\n }\n else if (allowCacheWrite) {\n if (shouldWriteResult(result, options.errorPolicy)) {\n this.cache.performTransaction(function (cache) {\n if (_this.shouldWrite(result, options.variables)) {\n cache.writeQuery({\n query: _this.document,\n data: result.data,\n variables: options.variables,\n });\n _this.lastWrite = {\n result: result,\n variables: options.variables,\n dmCount: destructiveMethodCounts.get(_this.cache),\n };\n }\n else {\n if (_this.diff && _this.diff.complete) {\n result.data = _this.diff.result;\n return;\n }\n }\n var diff = cache.diff({\n query: _this.document,\n variables: options.variables,\n returnPartialData: true,\n optimistic: true,\n });\n if (!_this.stopped) {\n _this.updateWatch(options.variables);\n }\n _this.diff = diff;\n if (diff.complete) {\n result.data = diff.result;\n }\n });\n }\n else {\n this.lastWrite = void 0;\n }\n }\n };\n QueryInfo.prototype.markReady = function () {\n this.networkError = null;\n return this.networkStatus = NetworkStatus.ready;\n };\n QueryInfo.prototype.markError = function (error) {\n this.networkStatus = NetworkStatus.error;\n this.lastWrite = void 0;\n if (error.graphQLErrors) {\n this.graphQLErrors = error.graphQLErrors;\n }\n if (error.networkError) {\n this.networkError = error.networkError;\n }\n return error;\n };\n return QueryInfo;\n}());\nexport { QueryInfo };\nexport function shouldWriteResult(result, errorPolicy) {\n if (errorPolicy === void 0) { errorPolicy = \"none\"; }\n var ignoreErrors = errorPolicy === \"ignore\" ||\n errorPolicy === \"all\";\n var writeWithErrors = !graphQLResultHasError(result);\n if (!writeWithErrors && ignoreErrors && result.data) {\n writeWithErrors = true;\n }\n return writeWithErrors;\n}\n//# sourceMappingURL=QueryInfo.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { invariant, InvariantError } from 'ts-invariant';\nimport { equal } from '@wry/equality';\nimport { execute } from \"../link/core/index.js\";\nimport { getDefaultValues, getOperationDefinition, getOperationName, hasClientExports, graphQLResultHasError, removeConnectionDirectiveFromDocument, canUseWeakMap, Observable, asyncMap, isNonEmptyArray, Concast, } from \"../utilities/index.js\";\nimport { ApolloError, isApolloError } from \"../errors/index.js\";\nimport { MutationStore } from \"./MutationStore.js\";\nimport { ObservableQuery } from \"./ObservableQuery.js\";\nimport { NetworkStatus, isNetworkRequestInFlight } from \"./networkStatus.js\";\nimport { LocalState } from \"./LocalState.js\";\nimport { QueryInfo, shouldWriteResult } from \"./QueryInfo.js\";\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar QueryManager = (function () {\n function QueryManager(_a) {\n var cache = _a.cache, link = _a.link, _b = _a.queryDeduplication, queryDeduplication = _b === void 0 ? false : _b, _c = _a.onBroadcast, onBroadcast = _c === void 0 ? function () { return undefined; } : _c, _d = _a.ssrMode, ssrMode = _d === void 0 ? false : _d, _e = _a.clientAwareness, clientAwareness = _e === void 0 ? {} : _e, localState = _a.localState, assumeImmutableResults = _a.assumeImmutableResults;\n this.mutationStore = new MutationStore();\n this.clientAwareness = {};\n this.queries = new Map();\n this.fetchCancelFns = new Map();\n this.transformCache = new (canUseWeakMap ? WeakMap : Map)();\n this.queryIdCounter = 1;\n this.requestIdCounter = 1;\n this.mutationIdCounter = 1;\n this.inFlightLinkObservables = new Map();\n this.cache = cache;\n this.link = link;\n this.queryDeduplication = queryDeduplication;\n this.onBroadcast = onBroadcast;\n this.clientAwareness = clientAwareness;\n this.localState = localState || new LocalState({ cache: cache });\n this.ssrMode = ssrMode;\n this.assumeImmutableResults = !!assumeImmutableResults;\n }\n QueryManager.prototype.stop = function () {\n var _this = this;\n this.queries.forEach(function (_info, queryId) {\n _this.stopQueryNoBroadcast(queryId);\n });\n this.cancelPendingFetches(process.env.NODE_ENV === \"production\" ? new InvariantError(12) : new InvariantError('QueryManager stopped while query was in flight'));\n };\n QueryManager.prototype.cancelPendingFetches = function (error) {\n this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });\n this.fetchCancelFns.clear();\n };\n QueryManager.prototype.mutate = function (_a) {\n var mutation = _a.mutation, variables = _a.variables, optimisticResponse = _a.optimisticResponse, updateQueriesByName = _a.updateQueries, _b = _a.refetchQueries, refetchQueries = _b === void 0 ? [] : _b, _c = _a.awaitRefetchQueries, awaitRefetchQueries = _c === void 0 ? false : _c, updateWithProxyFn = _a.update, _d = _a.errorPolicy, errorPolicy = _d === void 0 ? 'none' : _d, fetchPolicy = _a.fetchPolicy, _e = _a.context, context = _e === void 0 ? {} : _e;\n return __awaiter(this, void 0, void 0, function () {\n var mutationId, generateUpdateQueriesInfo, optimistic_1, self;\n var _this = this;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0:\n process.env.NODE_ENV === \"production\" ? invariant(mutation, 13) : invariant(mutation, 'mutation option is required. You must specify your GraphQL document in the mutation option.');\n process.env.NODE_ENV === \"production\" ? invariant(!fetchPolicy || fetchPolicy === 'no-cache', 14) : invariant(!fetchPolicy || fetchPolicy === 'no-cache', \"Mutations only support a 'no-cache' fetchPolicy. If you don't want to disable the cache, remove your fetchPolicy setting to proceed with the default mutation behavior.\");\n mutationId = this.generateMutationId();\n mutation = this.transform(mutation).document;\n variables = this.getVariables(mutation, variables);\n if (!this.transform(mutation).hasClientExports) return [3, 2];\n return [4, this.localState.addExportedVariables(mutation, variables, context)];\n case 1:\n variables = _f.sent();\n _f.label = 2;\n case 2:\n generateUpdateQueriesInfo = function () {\n var ret = {};\n if (updateQueriesByName) {\n _this.queries.forEach(function (_a, queryId) {\n var observableQuery = _a.observableQuery;\n if (observableQuery) {\n var queryName = observableQuery.queryName;\n if (queryName &&\n hasOwnProperty.call(updateQueriesByName, queryName)) {\n ret[queryId] = {\n updater: updateQueriesByName[queryName],\n queryInfo: _this.queries.get(queryId),\n };\n }\n }\n });\n }\n return ret;\n };\n this.mutationStore.initMutation(mutationId, mutation, variables);\n if (optimisticResponse) {\n optimistic_1 = typeof optimisticResponse === 'function'\n ? optimisticResponse(variables)\n : optimisticResponse;\n this.cache.recordOptimisticTransaction(function (cache) {\n try {\n markMutationResult({\n mutationId: mutationId,\n result: { data: optimistic_1 },\n document: mutation,\n variables: variables,\n errorPolicy: errorPolicy,\n queryUpdatersById: generateUpdateQueriesInfo(),\n update: updateWithProxyFn,\n }, cache);\n }\n catch (error) {\n process.env.NODE_ENV === \"production\" || invariant.error(error);\n }\n }, mutationId);\n }\n this.broadcastQueries();\n self = this;\n return [2, new Promise(function (resolve, reject) {\n var storeResult;\n var error;\n self.getObservableFromLink(mutation, __assign(__assign({}, context), { optimisticResponse: optimisticResponse }), variables, false).subscribe({\n next: function (result) {\n if (graphQLResultHasError(result) && errorPolicy === 'none') {\n error = new ApolloError({\n graphQLErrors: result.errors,\n });\n return;\n }\n self.mutationStore.markMutationResult(mutationId);\n if (fetchPolicy !== 'no-cache') {\n try {\n markMutationResult({\n mutationId: mutationId,\n result: result,\n document: mutation,\n variables: variables,\n errorPolicy: errorPolicy,\n queryUpdatersById: generateUpdateQueriesInfo(),\n update: updateWithProxyFn,\n }, self.cache);\n }\n catch (e) {\n error = new ApolloError({\n networkError: e,\n });\n return;\n }\n }\n storeResult = result;\n },\n error: function (err) {\n self.mutationStore.markMutationError(mutationId, err);\n if (optimisticResponse) {\n self.cache.removeOptimistic(mutationId);\n }\n self.broadcastQueries();\n reject(new ApolloError({\n networkError: err,\n }));\n },\n complete: function () {\n if (error) {\n self.mutationStore.markMutationError(mutationId, error);\n }\n if (optimisticResponse) {\n self.cache.removeOptimistic(mutationId);\n }\n self.broadcastQueries();\n if (error) {\n reject(error);\n return;\n }\n if (typeof refetchQueries === 'function') {\n refetchQueries = refetchQueries(storeResult);\n }\n var refetchQueryPromises = [];\n if (isNonEmptyArray(refetchQueries)) {\n refetchQueries.forEach(function (refetchQuery) {\n if (typeof refetchQuery === 'string') {\n self.queries.forEach(function (_a) {\n var observableQuery = _a.observableQuery;\n if (observableQuery &&\n observableQuery.queryName === refetchQuery) {\n refetchQueryPromises.push(observableQuery.refetch());\n }\n });\n }\n else {\n var queryOptions = {\n query: refetchQuery.query,\n variables: refetchQuery.variables,\n fetchPolicy: 'network-only',\n };\n if (refetchQuery.context) {\n queryOptions.context = refetchQuery.context;\n }\n refetchQueryPromises.push(self.query(queryOptions));\n }\n });\n }\n Promise.all(awaitRefetchQueries ? refetchQueryPromises : []).then(function () {\n if (errorPolicy === 'ignore' &&\n storeResult &&\n graphQLResultHasError(storeResult)) {\n delete storeResult.errors;\n }\n resolve(storeResult);\n }, reject);\n },\n });\n })];\n }\n });\n });\n };\n QueryManager.prototype.fetchQuery = function (queryId, options, networkStatus) {\n return this.fetchQueryObservable(queryId, options, networkStatus).promise;\n };\n QueryManager.prototype.getQueryStore = function () {\n var store = Object.create(null);\n this.queries.forEach(function (info, queryId) {\n store[queryId] = {\n variables: info.variables,\n networkStatus: info.networkStatus,\n networkError: info.networkError,\n graphQLErrors: info.graphQLErrors,\n };\n });\n return store;\n };\n QueryManager.prototype.resetErrors = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo) {\n queryInfo.networkError = undefined;\n queryInfo.graphQLErrors = [];\n }\n };\n QueryManager.prototype.transform = function (document) {\n var transformCache = this.transformCache;\n if (!transformCache.has(document)) {\n var transformed = this.cache.transformDocument(document);\n var forLink = removeConnectionDirectiveFromDocument(this.cache.transformForLink(transformed));\n var clientQuery = this.localState.clientQuery(transformed);\n var serverQuery = forLink && this.localState.serverQuery(forLink);\n var cacheEntry_1 = {\n document: transformed,\n hasClientExports: hasClientExports(transformed),\n hasForcedResolvers: this.localState.shouldForceResolvers(transformed),\n clientQuery: clientQuery,\n serverQuery: serverQuery,\n defaultVars: getDefaultValues(getOperationDefinition(transformed)),\n };\n var add = function (doc) {\n if (doc && !transformCache.has(doc)) {\n transformCache.set(doc, cacheEntry_1);\n }\n };\n add(document);\n add(transformed);\n add(clientQuery);\n add(serverQuery);\n }\n return transformCache.get(document);\n };\n QueryManager.prototype.getVariables = function (document, variables) {\n return __assign(__assign({}, this.transform(document).defaultVars), variables);\n };\n QueryManager.prototype.watchQuery = function (options) {\n options = __assign(__assign({}, options), { variables: this.getVariables(options.query, options.variables) });\n if (typeof options.notifyOnNetworkStatusChange === 'undefined') {\n options.notifyOnNetworkStatusChange = false;\n }\n var queryInfo = new QueryInfo(this.cache);\n var observable = new ObservableQuery({\n queryManager: this,\n queryInfo: queryInfo,\n options: options,\n });\n this.queries.set(observable.queryId, queryInfo);\n queryInfo.init({\n document: options.query,\n observableQuery: observable,\n variables: options.variables,\n });\n return observable;\n };\n QueryManager.prototype.query = function (options) {\n var _this = this;\n process.env.NODE_ENV === \"production\" ? invariant(options.query, 15) : invariant(options.query, 'query option is required. You must specify your GraphQL document ' +\n 'in the query option.');\n process.env.NODE_ENV === \"production\" ? invariant(options.query.kind === 'Document', 16) : invariant(options.query.kind === 'Document', 'You must wrap the query string in a \"gql\" tag.');\n process.env.NODE_ENV === \"production\" ? invariant(!options.returnPartialData, 17) : invariant(!options.returnPartialData, 'returnPartialData option only supported on watchQuery.');\n process.env.NODE_ENV === \"production\" ? invariant(!options.pollInterval, 18) : invariant(!options.pollInterval, 'pollInterval option only supported on watchQuery.');\n var queryId = this.generateQueryId();\n return this.fetchQuery(queryId, options).finally(function () { return _this.stopQuery(queryId); });\n };\n QueryManager.prototype.generateQueryId = function () {\n return String(this.queryIdCounter++);\n };\n QueryManager.prototype.generateRequestId = function () {\n return this.requestIdCounter++;\n };\n QueryManager.prototype.generateMutationId = function () {\n return String(this.mutationIdCounter++);\n };\n QueryManager.prototype.stopQueryInStore = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryInStoreNoBroadcast = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo)\n queryInfo.stop();\n };\n QueryManager.prototype.clearStore = function () {\n this.cancelPendingFetches(process.env.NODE_ENV === \"production\" ? new InvariantError(19) : new InvariantError('Store reset while query was in flight (not completed in link chain)'));\n this.queries.forEach(function (queryInfo) {\n if (queryInfo.observableQuery) {\n queryInfo.networkStatus = NetworkStatus.loading;\n }\n else {\n queryInfo.stop();\n }\n });\n this.mutationStore.reset();\n return this.cache.reset();\n };\n QueryManager.prototype.resetStore = function () {\n var _this = this;\n return this.clearStore().then(function () {\n return _this.reFetchObservableQueries();\n });\n };\n QueryManager.prototype.reFetchObservableQueries = function (includeStandby) {\n var _this = this;\n if (includeStandby === void 0) { includeStandby = false; }\n var observableQueryPromises = [];\n this.queries.forEach(function (_a, queryId) {\n var observableQuery = _a.observableQuery;\n if (observableQuery && observableQuery.hasObservers()) {\n var fetchPolicy = observableQuery.options.fetchPolicy;\n observableQuery.resetLastResults();\n if (fetchPolicy !== 'cache-only' &&\n (includeStandby || fetchPolicy !== 'standby')) {\n observableQueryPromises.push(observableQuery.refetch());\n }\n _this.getQuery(queryId).setDiff(null);\n }\n });\n this.broadcastQueries();\n return Promise.all(observableQueryPromises);\n };\n QueryManager.prototype.setObservableQuery = function (observableQuery) {\n this.getQuery(observableQuery.queryId).setObservableQuery(observableQuery);\n };\n QueryManager.prototype.startGraphQLSubscription = function (_a) {\n var _this = this;\n var query = _a.query, fetchPolicy = _a.fetchPolicy, errorPolicy = _a.errorPolicy, variables = _a.variables, _b = _a.context, context = _b === void 0 ? {} : _b;\n query = this.transform(query).document;\n variables = this.getVariables(query, variables);\n var makeObservable = function (variables) {\n return _this.getObservableFromLink(query, context, variables, false).map(function (result) {\n if (fetchPolicy !== 'no-cache') {\n if (shouldWriteResult(result, errorPolicy)) {\n _this.cache.write({\n query: query,\n result: result.data,\n dataId: 'ROOT_SUBSCRIPTION',\n variables: variables,\n });\n }\n _this.broadcastQueries();\n }\n if (graphQLResultHasError(result)) {\n throw new ApolloError({\n graphQLErrors: result.errors,\n });\n }\n return result;\n });\n };\n if (this.transform(query).hasClientExports) {\n var observablePromise_1 = this.localState.addExportedVariables(query, variables, context).then(makeObservable);\n return new Observable(function (observer) {\n var sub = null;\n observablePromise_1.then(function (observable) { return sub = observable.subscribe(observer); }, observer.error);\n return function () { return sub && sub.unsubscribe(); };\n });\n }\n return makeObservable(variables);\n };\n QueryManager.prototype.stopQuery = function (queryId) {\n this.stopQueryNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryNoBroadcast = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.removeQuery(queryId);\n };\n QueryManager.prototype.removeQuery = function (queryId) {\n this.fetchCancelFns.delete(queryId);\n this.getQuery(queryId).stop();\n this.queries.delete(queryId);\n };\n QueryManager.prototype.broadcastQueries = function () {\n this.onBroadcast();\n this.queries.forEach(function (info) { return info.notify(); });\n };\n QueryManager.prototype.getLocalState = function () {\n return this.localState;\n };\n QueryManager.prototype.getObservableFromLink = function (query, context, variables, deduplication) {\n var _this = this;\n var _a;\n if (deduplication === void 0) { deduplication = (_a = context === null || context === void 0 ? void 0 : context.queryDeduplication) !== null && _a !== void 0 ? _a : this.queryDeduplication; }\n var observable;\n var serverQuery = this.transform(query).serverQuery;\n if (serverQuery) {\n var _b = this, inFlightLinkObservables_1 = _b.inFlightLinkObservables, link = _b.link;\n var operation = {\n query: serverQuery,\n variables: variables,\n operationName: getOperationName(serverQuery) || void 0,\n context: this.prepareContext(__assign(__assign({}, context), { forceFetch: !deduplication })),\n };\n context = operation.context;\n if (deduplication) {\n var byVariables_1 = inFlightLinkObservables_1.get(serverQuery) || new Map();\n inFlightLinkObservables_1.set(serverQuery, byVariables_1);\n var varJson_1 = JSON.stringify(variables);\n observable = byVariables_1.get(varJson_1);\n if (!observable) {\n var concast = new Concast([\n execute(link, operation)\n ]);\n byVariables_1.set(varJson_1, observable = concast);\n concast.cleanup(function () {\n if (byVariables_1.delete(varJson_1) &&\n byVariables_1.size < 1) {\n inFlightLinkObservables_1.delete(serverQuery);\n }\n });\n }\n }\n else {\n observable = new Concast([\n execute(link, operation)\n ]);\n }\n }\n else {\n observable = new Concast([\n Observable.of({ data: {} })\n ]);\n context = this.prepareContext(context);\n }\n var clientQuery = this.transform(query).clientQuery;\n if (clientQuery) {\n observable = asyncMap(observable, function (result) {\n return _this.localState.runResolvers({\n document: clientQuery,\n remoteResult: result,\n context: context,\n variables: variables,\n });\n });\n }\n return observable;\n };\n QueryManager.prototype.getResultsFromLink = function (queryInfo, allowCacheWrite, options) {\n var lastRequestId = queryInfo.lastRequestId;\n return asyncMap(this.getObservableFromLink(queryInfo.document, options.context, options.variables), function (result) {\n var hasErrors = isNonEmptyArray(result.errors);\n if (lastRequestId >= queryInfo.lastRequestId) {\n if (hasErrors && options.errorPolicy === \"none\") {\n throw queryInfo.markError(new ApolloError({\n graphQLErrors: result.errors,\n }));\n }\n queryInfo.markResult(result, options, allowCacheWrite);\n queryInfo.markReady();\n }\n var aqr = {\n data: result.data,\n loading: false,\n networkStatus: queryInfo.networkStatus || NetworkStatus.ready,\n };\n if (hasErrors && options.errorPolicy !== \"ignore\") {\n aqr.errors = result.errors;\n }\n return aqr;\n }, function (networkError) {\n var error = isApolloError(networkError)\n ? networkError\n : new ApolloError({ networkError: networkError });\n if (lastRequestId >= queryInfo.lastRequestId) {\n queryInfo.markError(error);\n }\n throw error;\n });\n };\n QueryManager.prototype.fetchQueryObservable = function (queryId, options, networkStatus) {\n var _this = this;\n if (networkStatus === void 0) { networkStatus = NetworkStatus.loading; }\n var query = this.transform(options.query).document;\n var variables = this.getVariables(query, options.variables);\n var queryInfo = this.getQuery(queryId);\n var oldNetworkStatus = queryInfo.networkStatus;\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? \"cache-first\" : _a, _b = options.errorPolicy, errorPolicy = _b === void 0 ? \"none\" : _b, _c = options.returnPartialData, returnPartialData = _c === void 0 ? false : _c, _d = options.notifyOnNetworkStatusChange, notifyOnNetworkStatusChange = _d === void 0 ? false : _d, _e = options.context, context = _e === void 0 ? {} : _e;\n var mightUseNetwork = fetchPolicy === \"cache-first\" ||\n fetchPolicy === \"cache-and-network\" ||\n fetchPolicy === \"network-only\" ||\n fetchPolicy === \"no-cache\";\n if (mightUseNetwork &&\n notifyOnNetworkStatusChange &&\n typeof oldNetworkStatus === \"number\" &&\n oldNetworkStatus !== networkStatus &&\n isNetworkRequestInFlight(networkStatus)) {\n if (fetchPolicy !== \"cache-first\") {\n fetchPolicy = \"cache-and-network\";\n }\n returnPartialData = true;\n }\n var normalized = Object.assign({}, options, {\n query: query,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n returnPartialData: returnPartialData,\n notifyOnNetworkStatusChange: notifyOnNetworkStatusChange,\n context: context,\n });\n var fromVariables = function (variables) {\n normalized.variables = variables;\n return _this.fetchQueryByPolicy(queryInfo, normalized, networkStatus);\n };\n this.fetchCancelFns.set(queryId, function (reason) {\n Promise.resolve().then(function () { return concast.cancel(reason); });\n });\n var concast = new Concast(this.transform(normalized.query).hasClientExports\n ? this.localState.addExportedVariables(normalized.query, normalized.variables, normalized.context).then(fromVariables)\n : fromVariables(normalized.variables));\n concast.cleanup(function () {\n _this.fetchCancelFns.delete(queryId);\n var nextFetchPolicy = options.nextFetchPolicy;\n if (nextFetchPolicy) {\n options.nextFetchPolicy = void 0;\n options.fetchPolicy = typeof nextFetchPolicy === \"function\"\n ? nextFetchPolicy.call(options, options.fetchPolicy || \"cache-first\")\n : nextFetchPolicy;\n }\n });\n return concast;\n };\n QueryManager.prototype.fetchQueryByPolicy = function (queryInfo, options, networkStatus) {\n var _this = this;\n var query = options.query, variables = options.variables, fetchPolicy = options.fetchPolicy, errorPolicy = options.errorPolicy, returnPartialData = options.returnPartialData, context = options.context;\n queryInfo.init({\n document: query,\n variables: variables,\n lastRequestId: this.generateRequestId(),\n networkStatus: networkStatus,\n });\n var readCache = function () { return queryInfo.getDiff(variables); };\n var resultsFromCache = function (diff, networkStatus) {\n if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || NetworkStatus.loading; }\n var data = diff.result;\n if (process.env.NODE_ENV !== 'production' &&\n isNonEmptyArray(diff.missing) &&\n !equal(data, {}) &&\n !returnPartialData) {\n process.env.NODE_ENV === \"production\" || invariant.warn(\"Missing cache result fields: \" + diff.missing.map(function (m) { return m.path.join('.'); }).join(', '), diff.missing);\n }\n var fromData = function (data) { return Observable.of(__assign({ data: data, loading: isNetworkRequestInFlight(networkStatus), networkStatus: networkStatus }, (diff.complete ? null : { partial: true }))); };\n if (_this.transform(query).hasForcedResolvers) {\n return _this.localState.runResolvers({\n document: query,\n remoteResult: { data: data },\n context: context,\n variables: variables,\n onlyRunForcedResolvers: true,\n }).then(function (resolved) { return fromData(resolved.data); });\n }\n return fromData(data);\n };\n var resultsFromLink = function (allowCacheWrite) {\n return _this.getResultsFromLink(queryInfo, allowCacheWrite, {\n variables: variables,\n context: context,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n });\n };\n switch (fetchPolicy) {\n default:\n case \"cache-first\": {\n var diff = readCache();\n if (diff.complete) {\n return [\n resultsFromCache(diff, queryInfo.markReady()),\n ];\n }\n if (returnPartialData) {\n return [\n resultsFromCache(diff),\n resultsFromLink(true),\n ];\n }\n return [\n resultsFromLink(true),\n ];\n }\n case \"cache-and-network\": {\n var diff = readCache();\n if (diff.complete || returnPartialData) {\n return [\n resultsFromCache(diff),\n resultsFromLink(true),\n ];\n }\n return [\n resultsFromLink(true),\n ];\n }\n case \"cache-only\":\n return [\n resultsFromCache(readCache(), queryInfo.markReady()),\n ];\n case \"network-only\":\n return [resultsFromLink(true)];\n case \"no-cache\":\n return [resultsFromLink(false)];\n case \"standby\":\n return [];\n }\n };\n QueryManager.prototype.getQuery = function (queryId) {\n if (queryId && !this.queries.has(queryId)) {\n this.queries.set(queryId, new QueryInfo(this.cache));\n }\n return this.queries.get(queryId);\n };\n QueryManager.prototype.prepareContext = function (context) {\n if (context === void 0) { context = {}; }\n var newContext = this.localState.prepareContext(context);\n return __assign(__assign({}, newContext), { clientAwareness: this.clientAwareness });\n };\n return QueryManager;\n}());\nexport { QueryManager };\nfunction markMutationResult(mutation, cache) {\n if (shouldWriteResult(mutation.result, mutation.errorPolicy)) {\n var cacheWrites_1 = [{\n result: mutation.result.data,\n dataId: 'ROOT_MUTATION',\n query: mutation.document,\n variables: mutation.variables,\n }];\n var queryUpdatersById_1 = mutation.queryUpdatersById;\n if (queryUpdatersById_1) {\n Object.keys(queryUpdatersById_1).forEach(function (id) {\n var _a = queryUpdatersById_1[id], updater = _a.updater, _b = _a.queryInfo, document = _b.document, variables = _b.variables;\n var _c = cache.diff({\n query: document,\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }), currentQueryResult = _c.result, complete = _c.complete;\n if (complete && currentQueryResult) {\n var nextQueryResult = updater(currentQueryResult, {\n mutationResult: mutation.result,\n queryName: getOperationName(document) || undefined,\n queryVariables: variables,\n });\n if (nextQueryResult) {\n cacheWrites_1.push({\n result: nextQueryResult,\n dataId: 'ROOT_QUERY',\n query: document,\n variables: variables,\n });\n }\n }\n });\n }\n cache.performTransaction(function (c) {\n cacheWrites_1.forEach(function (write) { return c.write(write); });\n var update = mutation.update;\n if (update) {\n update(c, mutation.result);\n }\n }, null);\n }\n}\n//# sourceMappingURL=QueryManager.js.map","import { __assign } from \"tslib\";\nimport { invariant, InvariantError } from 'ts-invariant';\nimport { ApolloLink, execute } from \"../link/core/index.js\";\nimport { compact } from \"../utilities/index.js\";\nimport { version } from \"../version.js\";\nimport { HttpLink } from \"../link/http/index.js\";\nimport { QueryManager } from \"./QueryManager.js\";\nimport { LocalState, } from \"./LocalState.js\";\nvar hasSuggestedDevtools = false;\nvar ApolloClient = (function () {\n function ApolloClient(options) {\n var _this = this;\n this.defaultOptions = {};\n this.resetStoreCallbacks = [];\n this.clearStoreCallbacks = [];\n var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, connectToDevTools = options.connectToDevTools, _c = options.queryDeduplication, queryDeduplication = _c === void 0 ? true : _c, defaultOptions = options.defaultOptions, _d = options.assumeImmutableResults, assumeImmutableResults = _d === void 0 ? false : _d, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;\n var link = options.link;\n if (!link) {\n link = uri\n ? new HttpLink({ uri: uri, credentials: credentials, headers: headers })\n : ApolloLink.empty();\n }\n if (!cache) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(9) : new InvariantError(\"To initialize Apollo Client, you must specify a 'cache' property \" +\n \"in the options object. \\n\" +\n \"For more information, please visit: https://go.apollo.dev/c/docs\");\n }\n this.link = link;\n this.cache = cache;\n this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;\n this.queryDeduplication = queryDeduplication;\n this.defaultOptions = defaultOptions || {};\n this.typeDefs = typeDefs;\n if (ssrForceFetchDelay) {\n setTimeout(function () { return (_this.disableNetworkFetches = false); }, ssrForceFetchDelay);\n }\n this.watchQuery = this.watchQuery.bind(this);\n this.query = this.query.bind(this);\n this.mutate = this.mutate.bind(this);\n this.resetStore = this.resetStore.bind(this);\n this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this);\n var defaultConnectToDevTools = process.env.NODE_ENV !== 'production' &&\n typeof window !== 'undefined' &&\n !window.__APOLLO_CLIENT__;\n if (typeof connectToDevTools === 'undefined'\n ? defaultConnectToDevTools\n : connectToDevTools && typeof window !== 'undefined') {\n window.__APOLLO_CLIENT__ = this;\n }\n if (!hasSuggestedDevtools && process.env.NODE_ENV !== 'production') {\n hasSuggestedDevtools = true;\n if (typeof window !== 'undefined' &&\n window.document &&\n window.top === window.self) {\n if (typeof window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n if (window.navigator &&\n window.navigator.userAgent &&\n window.navigator.userAgent.indexOf('Chrome') > -1) {\n console.debug('Download the Apollo DevTools ' +\n 'for a better development experience: ' +\n 'https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm');\n }\n }\n }\n }\n this.version = version;\n this.localState = new LocalState({\n cache: cache,\n client: this,\n resolvers: resolvers,\n fragmentMatcher: fragmentMatcher,\n });\n this.queryManager = new QueryManager({\n cache: this.cache,\n link: this.link,\n queryDeduplication: queryDeduplication,\n ssrMode: ssrMode,\n clientAwareness: {\n name: clientAwarenessName,\n version: clientAwarenessVersion,\n },\n localState: this.localState,\n assumeImmutableResults: assumeImmutableResults,\n onBroadcast: function () {\n if (_this.devToolsHookCb) {\n _this.devToolsHookCb({\n action: {},\n state: {\n queries: _this.queryManager.getQueryStore(),\n mutations: _this.queryManager.mutationStore.getStore(),\n },\n dataWithOptimisticResults: _this.cache.extract(true),\n });\n }\n },\n });\n }\n ApolloClient.prototype.stop = function () {\n this.queryManager.stop();\n };\n ApolloClient.prototype.watchQuery = function (options) {\n if (this.defaultOptions.watchQuery) {\n options = compact(this.defaultOptions.watchQuery, options);\n }\n if (this.disableNetworkFetches &&\n (options.fetchPolicy === 'network-only' ||\n options.fetchPolicy === 'cache-and-network')) {\n options = __assign(__assign({}, options), { fetchPolicy: 'cache-first' });\n }\n return this.queryManager.watchQuery(options);\n };\n ApolloClient.prototype.query = function (options) {\n if (this.defaultOptions.query) {\n options = compact(this.defaultOptions.query, options);\n }\n process.env.NODE_ENV === \"production\" ? invariant(options.fetchPolicy !== 'cache-and-network', 10) : invariant(options.fetchPolicy !== 'cache-and-network', 'The cache-and-network fetchPolicy does not work with client.query, because ' +\n 'client.query can only return a single result. Please use client.watchQuery ' +\n 'to receive multiple results from the cache and the network, or consider ' +\n 'using a different fetchPolicy, such as cache-first or network-only.');\n if (this.disableNetworkFetches && options.fetchPolicy === 'network-only') {\n options = __assign(__assign({}, options), { fetchPolicy: 'cache-first' });\n }\n return this.queryManager.query(options);\n };\n ApolloClient.prototype.mutate = function (options) {\n if (this.defaultOptions.mutate) {\n options = compact(this.defaultOptions.mutate, options);\n }\n return this.queryManager.mutate(options);\n };\n ApolloClient.prototype.subscribe = function (options) {\n return this.queryManager.startGraphQLSubscription(options);\n };\n ApolloClient.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readQuery(options, optimistic);\n };\n ApolloClient.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readFragment(options, optimistic);\n };\n ApolloClient.prototype.writeQuery = function (options) {\n this.cache.writeQuery(options);\n this.queryManager.broadcastQueries();\n };\n ApolloClient.prototype.writeFragment = function (options) {\n this.cache.writeFragment(options);\n this.queryManager.broadcastQueries();\n };\n ApolloClient.prototype.__actionHookForDevTools = function (cb) {\n this.devToolsHookCb = cb;\n };\n ApolloClient.prototype.__requestRaw = function (payload) {\n return execute(this.link, payload);\n };\n ApolloClient.prototype.resetStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () { return _this.queryManager.clearStore(); })\n .then(function () { return Promise.all(_this.resetStoreCallbacks.map(function (fn) { return fn(); })); })\n .then(function () { return _this.reFetchObservableQueries(); });\n };\n ApolloClient.prototype.clearStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () { return _this.queryManager.clearStore(); })\n .then(function () { return Promise.all(_this.clearStoreCallbacks.map(function (fn) { return fn(); })); });\n };\n ApolloClient.prototype.onResetStore = function (cb) {\n var _this = this;\n this.resetStoreCallbacks.push(cb);\n return function () {\n _this.resetStoreCallbacks = _this.resetStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n ApolloClient.prototype.onClearStore = function (cb) {\n var _this = this;\n this.clearStoreCallbacks.push(cb);\n return function () {\n _this.clearStoreCallbacks = _this.clearStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n ApolloClient.prototype.reFetchObservableQueries = function (includeStandby) {\n return this.queryManager.reFetchObservableQueries(includeStandby);\n };\n ApolloClient.prototype.extract = function (optimistic) {\n return this.cache.extract(optimistic);\n };\n ApolloClient.prototype.restore = function (serializedState) {\n return this.cache.restore(serializedState);\n };\n ApolloClient.prototype.addResolvers = function (resolvers) {\n this.localState.addResolvers(resolvers);\n };\n ApolloClient.prototype.setResolvers = function (resolvers) {\n this.localState.setResolvers(resolvers);\n };\n ApolloClient.prototype.getResolvers = function () {\n return this.localState.getResolvers();\n };\n ApolloClient.prototype.setLocalStateFragmentMatcher = function (fragmentMatcher) {\n this.localState.setFragmentMatcher(fragmentMatcher);\n };\n ApolloClient.prototype.setLink = function (newLink) {\n this.link = this.queryManager.link = newLink;\n };\n return ApolloClient;\n}());\nexport { ApolloClient };\n//# sourceMappingURL=ApolloClient.js.map","export var version = 'local';\n//# sourceMappingURL=version.js.map","import { __assign, __extends } from \"tslib\";\nimport { dep, KeyTrie } from 'optimism';\nimport { equal } from '@wry/equality';\nimport { isReference, makeReference, DeepMerger, maybeDeepFreeze, canUseWeakMap, } from \"../../utilities/index.js\";\nimport { hasOwn, fieldNameFromStoreName } from \"./helpers.js\";\nvar DELETE = Object.create(null);\nvar delModifier = function () { return DELETE; };\nvar INVALIDATE = Object.create(null);\nvar EntityStore = (function () {\n function EntityStore(policies, group) {\n var _this = this;\n this.policies = policies;\n this.group = group;\n this.data = Object.create(null);\n this.rootIds = Object.create(null);\n this.refs = Object.create(null);\n this.getFieldValue = function (objectOrReference, storeFieldName) { return maybeDeepFreeze(isReference(objectOrReference)\n ? _this.get(objectOrReference.__ref, storeFieldName)\n : objectOrReference && objectOrReference[storeFieldName]); };\n this.canRead = function (objOrRef) {\n return isReference(objOrRef)\n ? _this.has(objOrRef.__ref)\n : typeof objOrRef === \"object\";\n };\n this.toReference = function (objOrIdOrRef, mergeIntoStore) {\n if (typeof objOrIdOrRef === \"string\") {\n return makeReference(objOrIdOrRef);\n }\n if (isReference(objOrIdOrRef)) {\n return objOrIdOrRef;\n }\n var id = _this.policies.identify(objOrIdOrRef)[0];\n if (id) {\n var ref = makeReference(id);\n if (mergeIntoStore) {\n _this.merge(id, objOrIdOrRef);\n }\n return ref;\n }\n };\n }\n EntityStore.prototype.toObject = function () {\n return __assign({}, this.data);\n };\n EntityStore.prototype.has = function (dataId) {\n return this.lookup(dataId, true) !== void 0;\n };\n EntityStore.prototype.get = function (dataId, fieldName) {\n this.group.depend(dataId, fieldName);\n if (hasOwn.call(this.data, dataId)) {\n var storeObject = this.data[dataId];\n if (storeObject && hasOwn.call(storeObject, fieldName)) {\n return storeObject[fieldName];\n }\n }\n if (fieldName === \"__typename\" &&\n hasOwn.call(this.policies.rootTypenamesById, dataId)) {\n return this.policies.rootTypenamesById[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.get(dataId, fieldName);\n }\n };\n EntityStore.prototype.lookup = function (dataId, dependOnExistence) {\n if (dependOnExistence)\n this.group.depend(dataId, \"__exists\");\n return hasOwn.call(this.data, dataId) ? this.data[dataId] :\n this instanceof Layer ? this.parent.lookup(dataId, dependOnExistence) : void 0;\n };\n EntityStore.prototype.merge = function (dataId, incoming) {\n var _this = this;\n var existing = this.lookup(dataId);\n var merged = new DeepMerger(storeObjectReconciler).merge(existing, incoming);\n this.data[dataId] = merged;\n if (merged !== existing) {\n delete this.refs[dataId];\n if (this.group.caching) {\n var fieldsToDirty_1 = Object.create(null);\n if (!existing)\n fieldsToDirty_1.__exists = 1;\n Object.keys(incoming).forEach(function (storeFieldName) {\n if (!existing || existing[storeFieldName] !== merged[storeFieldName]) {\n fieldsToDirty_1[fieldNameFromStoreName(storeFieldName)] = 1;\n if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {\n delete merged[storeFieldName];\n }\n }\n });\n Object.keys(fieldsToDirty_1).forEach(function (fieldName) { return _this.group.dirty(dataId, fieldName); });\n }\n }\n };\n EntityStore.prototype.modify = function (dataId, fields) {\n var _this = this;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var changedFields_1 = Object.create(null);\n var needToMerge_1 = false;\n var allDeleted_1 = true;\n var sharedDetails_1 = {\n DELETE: DELETE,\n INVALIDATE: INVALIDATE,\n isReference: isReference,\n toReference: this.toReference,\n canRead: this.canRead,\n readField: function (fieldNameOrOptions, from) { return _this.policies.readField(typeof fieldNameOrOptions === \"string\" ? {\n fieldName: fieldNameOrOptions,\n from: from || makeReference(dataId),\n } : fieldNameOrOptions, { store: _this }); },\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var fieldValue = storeObject[storeFieldName];\n if (fieldValue === void 0)\n return;\n var modify = typeof fields === \"function\"\n ? fields\n : fields[storeFieldName] || fields[fieldName];\n if (modify) {\n var newValue = modify === delModifier ? DELETE :\n modify(maybeDeepFreeze(fieldValue), __assign(__assign({}, sharedDetails_1), { fieldName: fieldName,\n storeFieldName: storeFieldName, storage: _this.getStorage(dataId, storeFieldName) }));\n if (newValue === INVALIDATE) {\n _this.group.dirty(dataId, storeFieldName);\n }\n else {\n if (newValue === DELETE)\n newValue = void 0;\n if (newValue !== fieldValue) {\n changedFields_1[storeFieldName] = newValue;\n needToMerge_1 = true;\n fieldValue = newValue;\n }\n }\n }\n if (fieldValue !== void 0) {\n allDeleted_1 = false;\n }\n });\n if (needToMerge_1) {\n this.merge(dataId, changedFields_1);\n if (allDeleted_1) {\n if (this instanceof Layer) {\n this.data[dataId] = void 0;\n }\n else {\n delete this.data[dataId];\n }\n this.group.dirty(dataId, \"__exists\");\n }\n return true;\n }\n }\n return false;\n };\n EntityStore.prototype.delete = function (dataId, fieldName, args) {\n var _a;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var typename = this.getFieldValue(storeObject, \"__typename\");\n var storeFieldName = fieldName && args\n ? this.policies.getStoreFieldName({ typename: typename, fieldName: fieldName, args: args })\n : fieldName;\n return this.modify(dataId, storeFieldName ? (_a = {},\n _a[storeFieldName] = delModifier,\n _a) : delModifier);\n }\n return false;\n };\n EntityStore.prototype.evict = function (options) {\n var evicted = false;\n if (options.id) {\n if (hasOwn.call(this.data, options.id)) {\n evicted = this.delete(options.id, options.fieldName, options.args);\n }\n if (this instanceof Layer) {\n evicted = this.parent.evict(options) || evicted;\n }\n if (options.fieldName || evicted) {\n this.group.dirty(options.id, options.fieldName || \"__exists\");\n }\n }\n return evicted;\n };\n EntityStore.prototype.clear = function () {\n this.replace(null);\n };\n EntityStore.prototype.replace = function (newData) {\n var _this = this;\n Object.keys(this.data).forEach(function (dataId) {\n if (!(newData && hasOwn.call(newData, dataId))) {\n _this.delete(dataId);\n }\n });\n if (newData) {\n Object.keys(newData).forEach(function (dataId) {\n _this.merge(dataId, newData[dataId]);\n });\n }\n };\n EntityStore.prototype.retain = function (rootId) {\n return this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1;\n };\n EntityStore.prototype.release = function (rootId) {\n if (this.rootIds[rootId] > 0) {\n var count = --this.rootIds[rootId];\n if (!count)\n delete this.rootIds[rootId];\n return count;\n }\n return 0;\n };\n EntityStore.prototype.getRootIdSet = function (ids) {\n if (ids === void 0) { ids = new Set(); }\n Object.keys(this.rootIds).forEach(ids.add, ids);\n if (this instanceof Layer) {\n this.parent.getRootIdSet(ids);\n }\n else {\n Object.keys(this.policies.rootTypenamesById).forEach(ids.add, ids);\n }\n return ids;\n };\n EntityStore.prototype.gc = function () {\n var _this = this;\n var ids = this.getRootIdSet();\n var snapshot = this.toObject();\n ids.forEach(function (id) {\n if (hasOwn.call(snapshot, id)) {\n Object.keys(_this.findChildRefIds(id)).forEach(ids.add, ids);\n delete snapshot[id];\n }\n });\n var idsToRemove = Object.keys(snapshot);\n if (idsToRemove.length) {\n var root_1 = this;\n while (root_1 instanceof Layer)\n root_1 = root_1.parent;\n idsToRemove.forEach(function (id) { return root_1.delete(id); });\n }\n return idsToRemove;\n };\n EntityStore.prototype.findChildRefIds = function (dataId) {\n if (!hasOwn.call(this.refs, dataId)) {\n var found_1 = this.refs[dataId] = Object.create(null);\n var workSet_1 = new Set([this.data[dataId]]);\n var canTraverse_1 = function (obj) { return obj !== null && typeof obj === 'object'; };\n workSet_1.forEach(function (obj) {\n if (isReference(obj)) {\n found_1[obj.__ref] = true;\n }\n else if (canTraverse_1(obj)) {\n Object.values(obj)\n .filter(canTraverse_1)\n .forEach(workSet_1.add, workSet_1);\n }\n });\n }\n return this.refs[dataId];\n };\n EntityStore.prototype.makeCacheKey = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return this.group.keyMaker.lookupArray(args);\n };\n return EntityStore;\n}());\nexport { EntityStore };\nvar CacheGroup = (function () {\n function CacheGroup(caching) {\n this.caching = caching;\n this.d = null;\n this.keyMaker = new KeyTrie(canUseWeakMap);\n this.d = caching ? dep() : null;\n }\n CacheGroup.prototype.depend = function (dataId, storeFieldName) {\n if (this.d) {\n this.d(makeDepKey(dataId, storeFieldName));\n }\n };\n CacheGroup.prototype.dirty = function (dataId, storeFieldName) {\n if (this.d) {\n this.d.dirty(makeDepKey(dataId, storeFieldName));\n }\n };\n return CacheGroup;\n}());\nfunction makeDepKey(dataId, storeFieldName) {\n return fieldNameFromStoreName(storeFieldName) + '#' + dataId;\n}\n(function (EntityStore) {\n var Root = (function (_super) {\n __extends(Root, _super);\n function Root(_a) {\n var policies = _a.policies, _b = _a.resultCaching, resultCaching = _b === void 0 ? true : _b, seed = _a.seed;\n var _this = _super.call(this, policies, new CacheGroup(resultCaching)) || this;\n _this.storageTrie = new KeyTrie(canUseWeakMap);\n _this.sharedLayerGroup = new CacheGroup(resultCaching);\n if (seed)\n _this.replace(seed);\n return _this;\n }\n Root.prototype.addLayer = function (layerId, replay) {\n return new Layer(layerId, this, replay, this.sharedLayerGroup);\n };\n Root.prototype.removeLayer = function () {\n return this;\n };\n Root.prototype.getStorage = function (idOrObj, storeFieldName) {\n return this.storageTrie.lookup(idOrObj, storeFieldName);\n };\n return Root;\n }(EntityStore));\n EntityStore.Root = Root;\n})(EntityStore || (EntityStore = {}));\nvar Layer = (function (_super) {\n __extends(Layer, _super);\n function Layer(id, parent, replay, group) {\n var _this = _super.call(this, parent.policies, group) || this;\n _this.id = id;\n _this.parent = parent;\n _this.replay = replay;\n _this.group = group;\n replay(_this);\n return _this;\n }\n Layer.prototype.addLayer = function (layerId, replay) {\n return new Layer(layerId, this, replay, this.group);\n };\n Layer.prototype.removeLayer = function (layerId) {\n var _this = this;\n var parent = this.parent.removeLayer(layerId);\n if (layerId === this.id) {\n if (this.group.caching) {\n Object.keys(this.data).forEach(function (dataId) {\n if (_this.data[dataId] !== parent.lookup(dataId)) {\n _this.delete(dataId);\n }\n });\n }\n return parent;\n }\n if (parent === this.parent)\n return this;\n return parent.addLayer(this.id, this.replay);\n };\n Layer.prototype.toObject = function () {\n return __assign(__assign({}, this.parent.toObject()), this.data);\n };\n Layer.prototype.findChildRefIds = function (dataId) {\n var fromParent = this.parent.findChildRefIds(dataId);\n return hasOwn.call(this.data, dataId) ? __assign(__assign({}, fromParent), _super.prototype.findChildRefIds.call(this, dataId)) : fromParent;\n };\n Layer.prototype.getStorage = function (idOrObj, storeFieldName) {\n return this.parent.getStorage(idOrObj, storeFieldName);\n };\n return Layer;\n}(EntityStore));\nfunction storeObjectReconciler(existingObject, incomingObject, property) {\n var existingValue = existingObject[property];\n var incomingValue = incomingObject[property];\n return equal(existingValue, incomingValue) ? existingValue : incomingValue;\n}\nexport function supportsResultCaching(store) {\n return !!(store instanceof EntityStore && store.group.caching);\n}\n//# sourceMappingURL=entityStore.js.map","import { __assign } from \"tslib\";\nimport { wrap } from 'optimism';\nimport { invariant, InvariantError } from 'ts-invariant';\nimport { isField, resultKeyNameFromField, isReference, makeReference, createFragmentMap, shouldInclude, addTypenameToDocument, getDefaultValues, getFragmentDefinitions, getMainDefinition, getQueryDefinition, maybeDeepFreeze, mergeDeepArray, getFragmentFromSelection, } from \"../../utilities/index.js\";\nimport { supportsResultCaching } from \"./entityStore.js\";\nimport { getTypenameFromStoreObject } from \"./helpers.js\";\nimport { MissingFieldError } from \"../core/types/common.js\";\n;\nfunction missingFromInvariant(err, context) {\n return new MissingFieldError(err.message, context.path.slice(), context.query, context.clientOnly, context.variables);\n}\nvar StoreReader = (function () {\n function StoreReader(config) {\n var _this = this;\n this.config = config;\n this.executeSelectionSet = wrap(function (options) { return _this.execSelectionSetImpl(options); }, {\n keyArgs: function (options) {\n return [\n options.selectionSet,\n options.objectOrReference,\n options.context,\n ];\n },\n makeCacheKey: function (selectionSet, parent, context) {\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(selectionSet, isReference(parent) ? parent.__ref : parent, context.varString);\n }\n }\n });\n this.knownResults = new WeakMap();\n this.executeSubSelectedArray = wrap(function (options) {\n return _this.execSubSelectedArrayImpl(options);\n }, {\n makeCacheKey: function (_a) {\n var field = _a.field, array = _a.array, context = _a.context;\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(field, array, context.varString);\n }\n }\n });\n this.config = __assign({ addTypename: true }, config);\n }\n StoreReader.prototype.diffQueryAgainstStore = function (_a) {\n var store = _a.store, query = _a.query, _b = _a.rootId, rootId = _b === void 0 ? 'ROOT_QUERY' : _b, variables = _a.variables, _c = _a.returnPartialData, returnPartialData = _c === void 0 ? true : _c;\n var policies = this.config.cache.policies;\n variables = __assign(__assign({}, getDefaultValues(getQueryDefinition(query))), variables);\n var execResult = this.executeSelectionSet({\n selectionSet: getMainDefinition(query).selectionSet,\n objectOrReference: makeReference(rootId),\n context: {\n store: store,\n query: query,\n policies: policies,\n variables: variables,\n varString: JSON.stringify(variables),\n fragmentMap: createFragmentMap(getFragmentDefinitions(query)),\n path: [],\n clientOnly: false,\n },\n });\n var hasMissingFields = execResult.missing && execResult.missing.length > 0;\n if (hasMissingFields && !returnPartialData) {\n throw execResult.missing[0];\n }\n return {\n result: execResult.result,\n missing: execResult.missing,\n complete: !hasMissingFields,\n };\n };\n StoreReader.prototype.isFresh = function (result, parent, selectionSet, context) {\n if (supportsResultCaching(context.store) &&\n this.knownResults.get(result) === selectionSet) {\n var latest = this.executeSelectionSet.peek(selectionSet, parent, context);\n if (latest && result === latest.result) {\n return true;\n }\n }\n return false;\n };\n StoreReader.prototype.execSelectionSetImpl = function (_a) {\n var _this = this;\n var selectionSet = _a.selectionSet, objectOrReference = _a.objectOrReference, context = _a.context;\n if (isReference(objectOrReference) &&\n !context.policies.rootTypenamesById[objectOrReference.__ref] &&\n !context.store.has(objectOrReference.__ref)) {\n return {\n result: {},\n missing: [missingFromInvariant(process.env.NODE_ENV === \"production\" ? new InvariantError(4) : new InvariantError(\"Dangling reference to missing \" + objectOrReference.__ref + \" object\"), context)],\n };\n }\n var variables = context.variables, policies = context.policies, store = context.store;\n var objectsToMerge = [];\n var finalResult = { result: null };\n var typename = store.getFieldValue(objectOrReference, \"__typename\");\n if (this.config.addTypename &&\n typeof typename === \"string\" &&\n !policies.rootIdsByTypename[typename]) {\n objectsToMerge.push({ __typename: typename });\n }\n function getMissing() {\n return finalResult.missing || (finalResult.missing = []);\n }\n function handleMissing(result) {\n var _a;\n if (result.missing)\n (_a = getMissing()).push.apply(_a, result.missing);\n return result.result;\n }\n var workSet = new Set(selectionSet.selections);\n workSet.forEach(function (selection) {\n var _a;\n if (!shouldInclude(selection, variables))\n return;\n if (isField(selection)) {\n var fieldValue = policies.readField({\n fieldName: selection.name.value,\n field: selection,\n variables: context.variables,\n from: objectOrReference,\n }, context);\n var resultName = resultKeyNameFromField(selection);\n context.path.push(resultName);\n var wasClientOnly = context.clientOnly;\n context.clientOnly = wasClientOnly || !!(selection.directives &&\n selection.directives.some(function (d) { return d.name.value === \"client\"; }));\n if (fieldValue === void 0) {\n if (!addTypenameToDocument.added(selection)) {\n getMissing().push(missingFromInvariant(process.env.NODE_ENV === \"production\" ? new InvariantError(5) : new InvariantError(\"Can't find field '\" + selection.name.value + \"' on \" + (isReference(objectOrReference)\n ? objectOrReference.__ref + \" object\"\n : \"object \" + JSON.stringify(objectOrReference, null, 2))), context));\n }\n }\n else if (Array.isArray(fieldValue)) {\n fieldValue = handleMissing(_this.executeSubSelectedArray({\n field: selection,\n array: fieldValue,\n context: context,\n }));\n }\n else if (!selection.selectionSet) {\n if (process.env.NODE_ENV !== 'production') {\n assertSelectionSetForIdValue(context.store, selection, fieldValue);\n maybeDeepFreeze(fieldValue);\n }\n }\n else if (fieldValue != null) {\n fieldValue = handleMissing(_this.executeSelectionSet({\n selectionSet: selection.selectionSet,\n objectOrReference: fieldValue,\n context: context,\n }));\n }\n if (fieldValue !== void 0) {\n objectsToMerge.push((_a = {}, _a[resultName] = fieldValue, _a));\n }\n context.clientOnly = wasClientOnly;\n invariant(context.path.pop() === resultName);\n }\n else {\n var fragment = getFragmentFromSelection(selection, context.fragmentMap);\n if (fragment && policies.fragmentMatches(fragment, typename)) {\n fragment.selectionSet.selections.forEach(workSet.add, workSet);\n }\n }\n });\n finalResult.result = mergeDeepArray(objectsToMerge);\n if (process.env.NODE_ENV !== 'production') {\n Object.freeze(finalResult.result);\n }\n this.knownResults.set(finalResult.result, selectionSet);\n return finalResult;\n };\n StoreReader.prototype.execSubSelectedArrayImpl = function (_a) {\n var _this = this;\n var field = _a.field, array = _a.array, context = _a.context;\n var missing;\n function handleMissing(childResult, i) {\n if (childResult.missing) {\n missing = missing || [];\n missing.push.apply(missing, childResult.missing);\n }\n invariant(context.path.pop() === i);\n return childResult.result;\n }\n if (field.selectionSet) {\n array = array.filter(context.store.canRead);\n }\n array = array.map(function (item, i) {\n if (item === null) {\n return null;\n }\n context.path.push(i);\n if (Array.isArray(item)) {\n return handleMissing(_this.executeSubSelectedArray({\n field: field,\n array: item,\n context: context,\n }), i);\n }\n if (field.selectionSet) {\n return handleMissing(_this.executeSelectionSet({\n selectionSet: field.selectionSet,\n objectOrReference: item,\n context: context,\n }), i);\n }\n if (process.env.NODE_ENV !== 'production') {\n assertSelectionSetForIdValue(context.store, field, item);\n }\n invariant(context.path.pop() === i);\n return item;\n });\n if (process.env.NODE_ENV !== 'production') {\n Object.freeze(array);\n }\n return { result: array, missing: missing };\n };\n return StoreReader;\n}());\nexport { StoreReader };\nfunction assertSelectionSetForIdValue(store, field, fieldValue) {\n if (!field.selectionSet) {\n var workSet_1 = new Set([fieldValue]);\n workSet_1.forEach(function (value) {\n if (value && typeof value === \"object\") {\n process.env.NODE_ENV === \"production\" ? invariant(!isReference(value), 6) : invariant(!isReference(value), \"Missing selection set for object of type \" + getTypenameFromStoreObject(store, value) + \" returned for query field \" + field.name.value);\n Object.values(value).forEach(workSet_1.add, workSet_1);\n }\n });\n }\n}\n//# sourceMappingURL=readFromStore.js.map","import { __assign } from \"tslib\";\nimport { invariant, InvariantError } from 'ts-invariant';\nimport { equal } from '@wry/equality';\nimport { createFragmentMap, getFragmentFromSelection, getDefaultValues, getFragmentDefinitions, getOperationDefinition, getTypenameFromResult, makeReference, isField, resultKeyNameFromField, isReference, shouldInclude, hasDirectives, cloneDeep, } from \"../../utilities/index.js\";\nimport { makeProcessedFieldsMerger, fieldNameFromStoreName } from \"./helpers.js\";\n;\nvar StoreWriter = (function () {\n function StoreWriter(cache, reader) {\n this.cache = cache;\n this.reader = reader;\n }\n StoreWriter.prototype.writeToStore = function (_a) {\n var query = _a.query, result = _a.result, dataId = _a.dataId, store = _a.store, variables = _a.variables;\n var operationDefinition = getOperationDefinition(query);\n var merger = makeProcessedFieldsMerger();\n variables = __assign(__assign({}, getDefaultValues(operationDefinition)), variables);\n var ref = this.processSelectionSet({\n result: result || Object.create(null),\n dataId: dataId,\n selectionSet: operationDefinition.selectionSet,\n context: {\n store: store,\n written: Object.create(null),\n merge: function (existing, incoming) {\n return merger.merge(existing, incoming);\n },\n variables: variables,\n varString: JSON.stringify(variables),\n fragmentMap: createFragmentMap(getFragmentDefinitions(query)),\n },\n });\n if (!isReference(ref)) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(7) : new InvariantError(\"Could not identify object \" + JSON.stringify(result));\n }\n store.retain(ref.__ref);\n return ref;\n };\n StoreWriter.prototype.processSelectionSet = function (_a) {\n var _this = this;\n var dataId = _a.dataId, result = _a.result, selectionSet = _a.selectionSet, context = _a.context, _b = _a.out, out = _b === void 0 ? {\n shouldApplyMerges: false,\n } : _b;\n var policies = this.cache.policies;\n var _c = policies.identify(result, selectionSet, context.fragmentMap), id = _c[0], keyObject = _c[1];\n dataId = dataId || id;\n if (\"string\" === typeof dataId) {\n var sets = context.written[dataId] || (context.written[dataId] = []);\n var ref = makeReference(dataId);\n if (sets.indexOf(selectionSet) >= 0)\n return ref;\n sets.push(selectionSet);\n if (this.reader && this.reader.isFresh(result, ref, selectionSet, context)) {\n return ref;\n }\n }\n var mergedFields = Object.create(null);\n if (keyObject) {\n mergedFields = context.merge(mergedFields, keyObject);\n }\n var typename = (dataId && policies.rootTypenamesById[dataId]) ||\n getTypenameFromResult(result, selectionSet, context.fragmentMap) ||\n (dataId && context.store.get(dataId, \"__typename\"));\n if (\"string\" === typeof typename) {\n mergedFields.__typename = typename;\n }\n var workSet = new Set(selectionSet.selections);\n workSet.forEach(function (selection) {\n var _a;\n if (!shouldInclude(selection, context.variables))\n return;\n if (isField(selection)) {\n var resultFieldKey = resultKeyNameFromField(selection);\n var value = result[resultFieldKey];\n if (typeof value !== 'undefined') {\n var storeFieldName = policies.getStoreFieldName({\n typename: typename,\n fieldName: selection.name.value,\n field: selection,\n variables: context.variables,\n });\n var incomingValue = _this.processFieldValue(value, selection, context, out);\n if (policies.hasMergeFunction(typename, selection.name.value)) {\n incomingValue = {\n __field: selection,\n __typename: typename,\n __value: incomingValue,\n };\n out.shouldApplyMerges = true;\n }\n mergedFields = context.merge(mergedFields, (_a = {},\n _a[storeFieldName] = incomingValue,\n _a));\n }\n else if (policies.usingPossibleTypes &&\n !hasDirectives([\"defer\", \"client\"], selection)) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(8) : new InvariantError(\"Missing field '\" + resultFieldKey + \"' in \" + JSON.stringify(result, null, 2).substring(0, 100));\n }\n }\n else {\n var fragment = getFragmentFromSelection(selection, context.fragmentMap);\n if (fragment &&\n policies.fragmentMatches(fragment, typename, result, context.variables)) {\n fragment.selectionSet.selections.forEach(workSet.add, workSet);\n }\n }\n });\n if (\"string\" === typeof dataId) {\n var entityRef_1 = makeReference(dataId);\n if (out.shouldApplyMerges) {\n mergedFields = policies.applyMerges(entityRef_1, mergedFields, context);\n }\n if (process.env.NODE_ENV !== \"production\") {\n Object.keys(mergedFields).forEach(function (storeFieldName) {\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (!policies.hasMergeFunction(typename, fieldName)) {\n warnAboutDataLoss(entityRef_1, mergedFields, storeFieldName, context.store);\n }\n });\n }\n context.store.merge(dataId, mergedFields);\n return entityRef_1;\n }\n return mergedFields;\n };\n StoreWriter.prototype.processFieldValue = function (value, field, context, out) {\n var _this = this;\n if (!field.selectionSet || value === null) {\n return process.env.NODE_ENV === 'production' ? value : cloneDeep(value);\n }\n if (Array.isArray(value)) {\n return value.map(function (item) { return _this.processFieldValue(item, field, context, out); });\n }\n return this.processSelectionSet({\n result: value,\n selectionSet: field.selectionSet,\n context: context,\n out: out,\n });\n };\n return StoreWriter;\n}());\nexport { StoreWriter };\nvar warnings = new Set();\nfunction warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {\n var getChild = function (objOrRef) {\n var child = store.getFieldValue(objOrRef, storeFieldName);\n return typeof child === \"object\" && child;\n };\n var existing = getChild(existingRef);\n if (!existing)\n return;\n var incoming = getChild(incomingObj);\n if (!incoming)\n return;\n if (isReference(existing))\n return;\n if (equal(existing, incoming))\n return;\n if (Object.keys(existing).every(function (key) { return store.getFieldValue(incoming, key) !== void 0; })) {\n return;\n }\n var parentType = store.getFieldValue(existingRef, \"__typename\") ||\n store.getFieldValue(incomingObj, \"__typename\");\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var typeDotName = parentType + \".\" + fieldName;\n if (warnings.has(typeDotName))\n return;\n warnings.add(typeDotName);\n var childTypenames = [];\n if (!Array.isArray(existing) &&\n !Array.isArray(incoming)) {\n [existing, incoming].forEach(function (child) {\n var typename = store.getFieldValue(child, \"__typename\");\n if (typeof typename === \"string\" &&\n !childTypenames.includes(typename)) {\n childTypenames.push(typename);\n }\n });\n }\n process.env.NODE_ENV === \"production\" || invariant.warn(\"Cache data may be lost when replacing the \" + fieldName + \" field of a \" + parentType + \" object.\\n\\nTo address this problem (which is not a bug in Apollo Client), \" + (childTypenames.length\n ? \"either ensure all objects of type \" +\n childTypenames.join(\" and \") + \" have IDs, or \"\n : \"\") + \"define a custom merge function for the \" + typeDotName + \" field, so InMemoryCache can safely merge these objects:\\n\\n existing: \" + JSON.stringify(existing).slice(0, 1000) + \"\\n incoming: \" + JSON.stringify(incoming).slice(0, 1000) + \"\\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\");\n}\n//# sourceMappingURL=writeToStore.js.map","import { __assign, __extends } from \"tslib\";\nimport \"./fixPolyfills.js\";\nimport { dep, wrap } from 'optimism';\nimport { ApolloCache } from \"../core/cache.js\";\nimport { addTypenameToDocument, isReference, } from \"../../utilities/index.js\";\nimport { StoreReader } from \"./readFromStore.js\";\nimport { StoreWriter } from \"./writeToStore.js\";\nimport { EntityStore, supportsResultCaching } from \"./entityStore.js\";\nimport { makeVar } from \"./reactiveVars.js\";\nimport { defaultDataIdFromObject, Policies, } from \"./policies.js\";\nimport { hasOwn } from \"./helpers.js\";\nvar defaultConfig = {\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n typePolicies: {},\n};\nvar InMemoryCache = (function (_super) {\n __extends(InMemoryCache, _super);\n function InMemoryCache(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this) || this;\n _this.watches = new Set();\n _this.typenameDocumentCache = new Map();\n _this.makeVar = makeVar;\n _this.txCount = 0;\n _this.maybeBroadcastWatch = wrap(function (c, fromOptimisticTransaction) {\n return _this.broadcastWatch.call(_this, c, !!fromOptimisticTransaction);\n }, {\n makeCacheKey: function (c) {\n var store = c.optimistic ? _this.optimisticData : _this.data;\n if (supportsResultCaching(store)) {\n var optimistic = c.optimistic, rootId = c.rootId, variables = c.variables;\n return store.makeCacheKey(c.query, c.callback, JSON.stringify({ optimistic: optimistic, rootId: rootId, variables: variables }));\n }\n }\n });\n _this.watchDep = dep();\n _this.config = __assign(__assign({}, defaultConfig), config);\n _this.addTypename = !!_this.config.addTypename;\n _this.policies = new Policies({\n cache: _this,\n dataIdFromObject: _this.config.dataIdFromObject,\n possibleTypes: _this.config.possibleTypes,\n typePolicies: _this.config.typePolicies,\n });\n _this.data = new EntityStore.Root({\n policies: _this.policies,\n resultCaching: _this.config.resultCaching,\n });\n _this.optimisticData = _this.data;\n _this.storeWriter = new StoreWriter(_this, _this.storeReader = new StoreReader({\n cache: _this,\n addTypename: _this.addTypename,\n }));\n return _this;\n }\n InMemoryCache.prototype.restore = function (data) {\n if (data)\n this.data.replace(data);\n return this;\n };\n InMemoryCache.prototype.extract = function (optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return (optimistic ? this.optimisticData : this.data).toObject();\n };\n InMemoryCache.prototype.read = function (options) {\n var store = options.optimistic ? this.optimisticData : this.data;\n if (typeof options.rootId === 'string' && !store.has(options.rootId)) {\n return null;\n }\n return this.storeReader.diffQueryAgainstStore({\n store: store,\n query: options.query,\n variables: options.variables,\n rootId: options.rootId,\n config: this.config,\n returnPartialData: false,\n }).result || null;\n };\n InMemoryCache.prototype.write = function (options) {\n try {\n ++this.txCount;\n return this.storeWriter.writeToStore({\n store: this.data,\n query: options.query,\n result: options.result,\n dataId: options.dataId,\n variables: options.variables,\n });\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.modify = function (options) {\n if (hasOwn.call(options, \"id\") && !options.id) {\n return false;\n }\n var store = options.optimistic\n ? this.optimisticData\n : this.data;\n try {\n ++this.txCount;\n return store.modify(options.id || \"ROOT_QUERY\", options.fields);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.diff = function (options) {\n return this.storeReader.diffQueryAgainstStore({\n store: options.optimistic ? this.optimisticData : this.data,\n rootId: options.id || \"ROOT_QUERY\",\n query: options.query,\n variables: options.variables,\n returnPartialData: options.returnPartialData,\n config: this.config,\n });\n };\n InMemoryCache.prototype.watch = function (watch) {\n var _this = this;\n this.watches.add(watch);\n if (watch.immediate) {\n this.maybeBroadcastWatch(watch);\n }\n return function () {\n _this.watches.delete(watch);\n _this.watchDep.dirty(watch);\n _this.maybeBroadcastWatch.forget(watch);\n };\n };\n InMemoryCache.prototype.gc = function () {\n return this.optimisticData.gc();\n };\n InMemoryCache.prototype.retain = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).retain(rootId);\n };\n InMemoryCache.prototype.release = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).release(rootId);\n };\n InMemoryCache.prototype.identify = function (object) {\n return isReference(object) ? object.__ref :\n this.policies.identify(object)[0];\n };\n InMemoryCache.prototype.evict = function (options) {\n if (!options.id) {\n if (hasOwn.call(options, \"id\")) {\n return false;\n }\n options = __assign(__assign({}, options), { id: \"ROOT_QUERY\" });\n }\n try {\n ++this.txCount;\n return this.optimisticData.evict(options);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.reset = function () {\n this.data.clear();\n this.optimisticData = this.data;\n this.broadcastWatches();\n return Promise.resolve();\n };\n InMemoryCache.prototype.removeOptimistic = function (idToRemove) {\n var newOptimisticData = this.optimisticData.removeLayer(idToRemove);\n if (newOptimisticData !== this.optimisticData) {\n this.optimisticData = newOptimisticData;\n this.broadcastWatches();\n }\n };\n InMemoryCache.prototype.performTransaction = function (transaction, optimisticId) {\n var _this = this;\n var perform = function (layer) {\n var _a = _this, data = _a.data, optimisticData = _a.optimisticData;\n ++_this.txCount;\n if (layer) {\n _this.data = _this.optimisticData = layer;\n }\n try {\n transaction(_this);\n }\n finally {\n --_this.txCount;\n _this.data = data;\n _this.optimisticData = optimisticData;\n }\n };\n var fromOptimisticTransaction = false;\n if (typeof optimisticId === 'string') {\n this.optimisticData = this.optimisticData.addLayer(optimisticId, perform);\n fromOptimisticTransaction = true;\n }\n else if (optimisticId === null) {\n perform(this.data);\n }\n else {\n perform();\n }\n this.broadcastWatches(fromOptimisticTransaction);\n };\n InMemoryCache.prototype.transformDocument = function (document) {\n if (this.addTypename) {\n var result = this.typenameDocumentCache.get(document);\n if (!result) {\n result = addTypenameToDocument(document);\n this.typenameDocumentCache.set(document, result);\n this.typenameDocumentCache.set(result, result);\n }\n return result;\n }\n return document;\n };\n InMemoryCache.prototype.broadcastWatches = function (fromOptimisticTransaction) {\n var _this = this;\n if (!this.txCount) {\n this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c, fromOptimisticTransaction); });\n }\n };\n InMemoryCache.prototype.broadcastWatch = function (c, fromOptimisticTransaction) {\n this.watchDep.dirty(c);\n this.watchDep(c);\n var diff = this.diff({\n query: c.query,\n variables: c.variables,\n optimistic: c.optimistic,\n });\n if (c.optimistic && fromOptimisticTransaction) {\n diff.fromOptimisticTransaction = true;\n }\n c.callback(diff);\n };\n return InMemoryCache;\n}(ApolloCache));\nexport { InMemoryCache };\n//# sourceMappingURL=inMemoryCache.js.map","import inspect from \"../jsutils/inspect.mjs\";\nimport { isNode } from \"./ast.mjs\";\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport var QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: ['name', // Note: fragment variable definitions are experimental and may be changed\n // or removed in the future.\n 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],\n InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields']\n};\nexport var BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to four permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n *\n * 2) Named visitors that trigger upon entering and leaving a node of\n * a specific kind.\n *\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n *\n * 4) Parallel visitors for entering and leaving nodes of a specific kind.\n *\n * visit(ast, {\n * enter: {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * },\n * leave: {\n * Kind(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n */\n\nexport function visit(root, visitor) {\n var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys;\n\n /* eslint-disable no-undef-init */\n var stack = undefined;\n var inArray = Array.isArray(root);\n var keys = [root];\n var index = -1;\n var edits = [];\n var node = undefined;\n var key = undefined;\n var parent = undefined;\n var path = [];\n var ancestors = [];\n var newRoot = root;\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n var isLeaving = index === keys.length;\n var isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n } else {\n var clone = {};\n\n for (var _i2 = 0, _Object$keys2 = Object.keys(node); _i2 < _Object$keys2.length; _i2++) {\n var k = _Object$keys2[_i2];\n clone[k] = node[k];\n }\n\n node = clone;\n }\n\n var editOffset = 0;\n\n for (var ii = 0; ii < edits.length; ii++) {\n var editKey = edits[ii][0];\n var editValue = edits[ii][1];\n\n if (inArray) {\n editKey -= editOffset;\n }\n\n if (inArray && editValue === null) {\n node.splice(editKey, 1);\n editOffset++;\n } else {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else {\n key = parent ? inArray ? index : keys[index] : undefined;\n node = parent ? parent[key] : newRoot;\n\n if (node === null || node === undefined) {\n continue;\n }\n\n if (parent) {\n path.push(key);\n }\n }\n\n var result = void 0;\n\n if (!Array.isArray(node)) {\n if (!isNode(node)) {\n throw new Error(\"Invalid AST Node: \".concat(inspect(node), \".\"));\n }\n\n var visitFn = getVisitFn(visitor, node.kind, isLeaving);\n\n if (visitFn) {\n result = visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _visitorKeys$node$kin;\n\n stack = {\n inArray: inArray,\n index: index,\n keys: keys,\n edits: edits,\n prev: stack\n };\n inArray = Array.isArray(node);\n keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n newRoot = edits[edits.length - 1][1];\n }\n\n return newRoot;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n var skipping = new Array(visitors.length);\n return {\n enter: function enter(node) {\n for (var i = 0; i < visitors.length; i++) {\n if (skipping[i] == null) {\n var fn = getVisitFn(visitors[i], node.kind,\n /* isLeaving */\n false);\n\n if (fn) {\n var result = fn.apply(visitors[i], arguments);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n }\n },\n leave: function leave(node) {\n for (var i = 0; i < visitors.length; i++) {\n if (skipping[i] == null) {\n var fn = getVisitFn(visitors[i], node.kind,\n /* isLeaving */\n true);\n\n if (fn) {\n var result = fn.apply(visitors[i], arguments);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n }\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n var kindVisitor = visitor[kind];\n\n if (kindVisitor) {\n if (!isLeaving && typeof kindVisitor === 'function') {\n // { Kind() {} }\n return kindVisitor;\n }\n\n var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter;\n\n if (typeof kindSpecificVisitor === 'function') {\n // { Kind: { enter() {}, leave() {} } }\n return kindSpecificVisitor;\n }\n } else {\n var specificVisitor = isLeaving ? visitor.leave : visitor.enter;\n\n if (specificVisitor) {\n if (typeof specificVisitor === 'function') {\n // { enter() {}, leave() {} }\n return specificVisitor;\n }\n\n var specificKindVisitor = specificVisitor[kind];\n\n if (typeof specificKindVisitor === 'function') {\n // { enter: { Kind() {} }, leave: { Kind() {} } }\n return specificKindVisitor;\n }\n }\n }\n}\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\n\t\t\t// This just needs to be something that won't trample other user's Symbol.for use\n\t\t\t// It also will guide people to the source of their issues, if this is problematic.\n\t\t\t// META: It's a resource locator!\n\t\t\tresult = Symbol.for('https://github.com/benlesh/symbol-observable');\n\t\t\ttry {\n\t\t\t\tSymbol.observable = result;\n\t\t\t} catch (err) {\n\t\t\t\t// Do nothing. In some environments, users have frozen `Symbol` for security reasons,\n\t\t\t\t// if it is frozen assigning to it will throw. In this case, we don't care, because\n\t\t\t\t// they will need to use the returned value from the ponyfill.\n\t\t\t}\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","import { CamelCasedProperties, SnakeCasedProperties } from 'type-fest';\n\nconst isArray = (object: unknown): object is unknown[] => Array.isArray(object);\nconst isObjectCastable = (object: unknown) => object === Object(object);\nconst isFunction = (object: unknown) => typeof object === 'function';\nconst isComplexObject = (object: unknown) =>\n Object.getPrototypeOf(object) !== Object.prototype;\n\nconst isSimpleObject = (object: unknown): object is Record =>\n isObjectCastable(object) &&\n !isComplexObject(object) &&\n !isArray(object) &&\n !isFunction(object);\n\nconst toCamel = (string: string) => {\n const snakeRegex = /([-_][a-z])/gi;\n\n return string.replace(snakeRegex, (matchedSubstring) =>\n matchedSubstring.toUpperCase().replace('-', '').replace('_', ''),\n );\n};\n\nconst toSnake = (string: string) => {\n const camelRegex = /([A-Z])/g;\n\n return string.replace(camelRegex, (matchedSubstring) =>\n matchedSubstring\n .replace(matchedSubstring, `_${matchedSubstring}`)\n .toLowerCase(),\n );\n};\n\nconst changecaseKeys = (\n object: unknown,\n changecaseFunction: (string: string) => string,\n) => {\n if (isSimpleObject(object)) {\n const nodes = {};\n\n Object.keys(object).forEach((key) => {\n nodes[changecaseFunction(key)] = changecaseKeys(\n object[key],\n changecaseFunction,\n );\n });\n\n return nodes;\n }\n\n if (isArray(object)) {\n return object.map((arrayItem) =>\n changecaseKeys(arrayItem, changecaseFunction),\n );\n }\n\n return object;\n};\n\nconst camelcaseKeys = (object: T): CamelCasedProperties =>\n changecaseKeys(object, toCamel);\nconst snakecaseKeys = (object: T): SnakeCasedProperties =>\n changecaseKeys(object, toSnake);\n\nexport { camelcaseKeys, snakecaseKeys, toSnake, toCamel };\n","export default function activateMenuItem(menuItemId: string) {\n const menuSidebarCSS = '.sidebar .active';\n const activeMenuClass = 'active';\n\n const activeMenuItems = Array.from(document.querySelectorAll(menuSidebarCSS));\n\n if (activeMenuItems.length > 0) {\n activeMenuItems.map((menuItem) =>\n menuItem.classList.remove(activeMenuClass),\n );\n }\n\n const menuItem = document.getElementById(menuItemId);\n if (!menuItem) return;\n\n menuItem.classList.add(activeMenuClass);\n}\n","export default function addBrazilianCountryCode(phoneNumber?: string) {\n if (!phoneNumber) return undefined;\n\n return `+55${phoneNumber}`;\n}\n","import moment from 'moment';\n\nmoment.locale(window.navigator.language);\n\nconst formatDateElements = (selector: string) => {\n document.querySelectorAll(selector).forEach((element: HTMLElement) => {\n const { isoDate, format } = element.dataset;\n if (format === undefined || isoDate === undefined) return;\n\n // eslint-disable-next-line no-param-reassign\n element.innerText = moment(isoDate).local().format(format);\n });\n};\n\nexport default formatDateElements;\n","const defaultPositionOptions = {\n enableHighAccuracy: true,\n timeout: 10000,\n maximumAge: 30000,\n};\n\nexport default class GeolocationService {\n static checkGeolocationObj() {\n if ('geolocation' in navigator) {\n return { locationStatus: 'disponível' };\n }\n\n return { locationStatus: 'indisponível' };\n }\n\n static getLocation(successAction, errorAction, positionOptions) {\n navigator.geolocation.getCurrentPosition(successAction, errorAction, {\n ...defaultPositionOptions,\n positionOptions,\n });\n }\n\n static cacheLocation() {\n navigator.geolocation.getCurrentPosition(\n () => {},\n () => {},\n {\n ...defaultPositionOptions,\n timeout: 5000,\n },\n );\n }\n}\n","/* eslint-disable */\nexport default function (contentDisposition) {\n // This parser is designed to be tolerant and accepting of headers that do\n // not comply with the standard, but accepted by Firefox.\n\n let needsEncodingFixup = true;\n\n // filename*=ext-value (\"ext-value\" from RFC 5987, referenced by RFC 6266).\n let tmp = toParamRegExp('filename\\\\*', 'i').exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n\n // Continuations (RFC 2231 section 3, referenced by RFC 5987 section 3.1).\n // filename*n*=part\n // filename*n=part\n tmp = rfc2231getparam(contentDisposition);\n if (tmp) {\n // RFC 2047, section\n let filename = rfc2047decode(tmp);\n return fixupEncoding(filename);\n }\n\n // filename=value (RFC 5987, section 4.1).\n tmp = toParamRegExp('filename', 'i').exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n return '';\n\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\n '(?:^|;)\\\\s*' +\n attributePattern +\n '\\\\s*=\\\\s*' +\n // Captures: value = token | quoted-string\n // (RFC 2616, section 3.6 and referenced by RFC 6266 4.1)\n '(' +\n '[^\";\\\\s][^;\\\\s]*' +\n '|' +\n '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' +\n ')',\n flags,\n );\n }\n\n function textdecode(encoding, value) {\n if (encoding) {\n try {\n let decoder = new TextDecoder(encoding, { fatal: true });\n let bytes = Array.from(value, (c) => c.charCodeAt(0));\n if (bytes.every((code) => code <= 0xff)) {\n value = decoder.decode(new Uint8Array(bytes));\n needsEncodingFixup = false;\n }\n } catch (e) {\n // TextDecoder constructor threw - unrecognized encoding.\n }\n }\n return value;\n }\n\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n // Maybe multi-byte UTF-8.\n value = textdecode('utf-8', value);\n if (needsEncodingFixup) {\n // Try iso-8859-1 encoding.\n value = textdecode('iso-8859-1', value);\n }\n }\n return value;\n }\n\n function rfc2231getparam(contentDisposition) {\n let matches = [],\n match;\n // Iterate over all filename*n= and filename*n*= with n being an integer\n // of at least zero. Any non-zero number must not start with '0'.\n let iter = toParamRegExp('filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)', 'ig');\n\n while ((match = iter.exec(contentDisposition)) !== null) {\n let [, n, quot, part] = match;\n n = parseInt(n, 10);\n if (n in matches) {\n // Ignore anything after the invalid second filename*0.\n if (n === 0) break;\n continue;\n }\n matches[n] = [quot, part];\n }\n\n let parts = [];\n for (let n = 0; n < matches.length; ++n) {\n if (!(n in matches)) {\n // Numbers must be consecutive. Truncate when there is a hole.\n break;\n }\n let [quot, part] = matches[n];\n part = rfc2616unquote(part);\n if (quot) {\n part = unescape(part);\n if (n === 0) {\n part = rfc5987decode(part);\n }\n }\n parts.push(part);\n }\n return parts.join('');\n }\n\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n let parts = value.slice(1).split('\\\\\"');\n // Find the first unescaped \" and terminate there.\n for (let i = 0; i < parts.length; ++i) {\n let quotindex = parts[i].indexOf('\"');\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1; // Truncates and stop the iteration.\n }\n parts[i] = parts[i].replace(/\\\\(.)/g, '$1');\n }\n value = parts.join('\"');\n }\n return value;\n }\n function rfc5987decode(extvalue) {\n // Decodes \"ext-value\" from RFC 5987.\n let encodingend = extvalue.indexOf(\"'\");\n if (encodingend === -1) {\n // Some servers send \"filename*=\" without encoding'language' prefix,\n // e.g. in https://github.com/Rob--W/open-in-browser/issues/26\n // Let's accept the value like Firefox (57) (Chrome 62 rejects it).\n return extvalue;\n }\n let encoding = extvalue.slice(0, encodingend);\n let langvalue = extvalue.slice(encodingend + 1);\n // Ignore language (RFC 5987 section 3.2.1, and RFC 6266 section 4.1 ).\n let value = langvalue.replace(/^[^']*'/, '');\n return textdecode(encoding, value);\n }\n function rfc2047decode(value) {\n // RFC 2047-decode the result. Firefox tried to drop support for it, but\n // backed out because some servers use it - https://bugzil.la/875615\n // Firefox's condition for decoding is here: https://searchfox.org/mozilla-central/rev/4a590a5a15e35d88a3b23dd6ac3c471cf85b04a8/netwerk/mime/nsMIMEHeaderParamImpl.cpp#742-748\n\n // We are more strict and only recognize RFC 2047-encoding if the value\n // starts with \"=?\", since then it is likely that the full value is\n // RFC 2047-encoded.\n\n // Firefox also decodes words even where RFC 2047 section 5 states:\n // \"An 'encoded-word' MUST NOT appear within a 'quoted-string'.\"\n\n // eslint-disable-next-line no-control-regex\n if (!value.startsWith('=?') || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n // RFC 2047, section 2.4\n // encoded-word = \"=?\" charset \"?\" encoding \"?\" encoded-text \"?=\"\n // charset = token (but let's restrict to characters that denote a\n // possibly valid encoding).\n // encoding = q or b\n // encoded-text = any printable ASCII character other than ? or space.\n // ... but Firefox permits ? and space.\n return value.replace(\n /=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g,\n function (_, charset, encoding, text) {\n if (encoding === 'q' || encoding === 'Q') {\n // RFC 2047 section 4.2.\n text = text.replace(/_/g, ' ');\n text = text.replace(/=([0-9a-fA-F]{2})/g, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16)),\n );\n return textdecode(charset, text);\n } // else encoding is b or B - base64 (RFC 2047 section 4.1)\n try {\n text = atob(text);\n } catch (e) {}\n return textdecode(charset, text);\n },\n );\n }\n}\n","export default function getHubspotUserToken() {\n const hubspotUserTokenObject = document.cookie\n .split(';')\n .find((row) => row.startsWith('hubspotutk='));\n\n if (!hubspotUserTokenObject) return undefined;\n\n return hubspotUserTokenObject.split('=')[1].trim();\n}\n","export default function getMobileOperatingSystem() {\n const userAgent = navigator.userAgent || navigator.vendor || window.opera;\n\n if (/windows phone/i.test(userAgent)) return 'windows phone';\n\n if (/android/i.test(userAgent)) return 'android';\n\n if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) return 'ios';\n\n return 'unknown';\n}\n","import camelizeKeys from './camelizeKeys';\n\nexport default function getURLParameters() {\n const windowURL = window.location.search;\n const urlSearchParams = new URLSearchParams(windowURL);\n\n const entries = Array.from(urlSearchParams.entries());\n\n const initialObject: Record = {};\n\n const paramsObject = entries.reduce((accumulated, [key, value]) => {\n if (!accumulated[key]) return { ...accumulated, [key]: value };\n\n return {\n ...accumulated,\n [key]: [...accumulated[key], value],\n };\n }, initialObject);\n\n return camelizeKeys(paramsObject);\n}\n","import { camelCase, mapKeys } from 'lodash';\n\nexport default function camelizeKeys(object: Record) {\n return mapKeys(object, (_, key) => camelCase(key));\n}\n","import moment from 'moment';\n\nconst validTimeFormats = ['HH:mm', 'H:mm'];\n\nexport default function hourValid(hour) {\n return moment(hour, validTimeFormats, true).isValid();\n}\n","import moment from 'moment';\nimport 'moment/locale/pt-br';\n\nexport default function localizedWrittenDate(date) {\n const dateStr = moment(date)\n .locale('pt-br')\n .format('DD [de] MMMM [de] YYYY')\n .toLowerCase();\n\n return dateStr;\n}\n","export default function pageReadyListener(functionToRun) {\n if (\n document.attachEvent\n ? document.readyState === 'complete'\n : document.readyState !== 'loading'\n ) {\n functionToRun();\n } else {\n document.addEventListener('DOMContentLoaded', functionToRun);\n }\n}\n","export default {\n appStore: {\n apple: 'https://itunes.apple.com/app/id1448606032',\n google: 'market://details?id=com.myworkapp',\n },\n};\n","import { getMobileOperatingSystem } from '../util';\nimport urls from '../commons/urls';\n\nconst appStoreURL = {\n 'windows phone': urls.appStore.google,\n android: urls.appStore.google,\n ios: urls.appStore.apple,\n};\n\nexport default function redirectToAppStore(timeout = 0) {\n const OS = getMobileOperatingSystem();\n\n if (OS === 'unknown') return;\n\n setTimeout(() => {\n window.location.assign(appStoreURL[OS]);\n }, timeout);\n}\n","export default function sanitizePhoneNumber(phoneNumber?: string) {\n if (!phoneNumber) return undefined;\n\n return phoneNumber.replace(/\\D/g, '');\n}\n","const capitalizeFirstLetter = (string: string) =>\n string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n\nexport default capitalizeFirstLetter;\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","var map = {\n\t\"./af\": 213,\n\t\"./af.js\": 213,\n\t\"./ar\": 214,\n\t\"./ar-dz\": 215,\n\t\"./ar-dz.js\": 215,\n\t\"./ar-kw\": 216,\n\t\"./ar-kw.js\": 216,\n\t\"./ar-ly\": 217,\n\t\"./ar-ly.js\": 217,\n\t\"./ar-ma\": 218,\n\t\"./ar-ma.js\": 218,\n\t\"./ar-ps\": 219,\n\t\"./ar-ps.js\": 219,\n\t\"./ar-sa\": 220,\n\t\"./ar-sa.js\": 220,\n\t\"./ar-tn\": 221,\n\t\"./ar-tn.js\": 221,\n\t\"./ar.js\": 214,\n\t\"./az\": 222,\n\t\"./az.js\": 222,\n\t\"./be\": 223,\n\t\"./be.js\": 223,\n\t\"./bg\": 224,\n\t\"./bg.js\": 224,\n\t\"./bm\": 225,\n\t\"./bm.js\": 225,\n\t\"./bn\": 226,\n\t\"./bn-bd\": 227,\n\t\"./bn-bd.js\": 227,\n\t\"./bn.js\": 226,\n\t\"./bo\": 228,\n\t\"./bo.js\": 228,\n\t\"./br\": 229,\n\t\"./br.js\": 229,\n\t\"./bs\": 230,\n\t\"./bs.js\": 230,\n\t\"./ca\": 231,\n\t\"./ca.js\": 231,\n\t\"./cs\": 232,\n\t\"./cs.js\": 232,\n\t\"./cv\": 233,\n\t\"./cv.js\": 233,\n\t\"./cy\": 234,\n\t\"./cy.js\": 234,\n\t\"./da\": 235,\n\t\"./da.js\": 235,\n\t\"./de\": 236,\n\t\"./de-at\": 237,\n\t\"./de-at.js\": 237,\n\t\"./de-ch\": 238,\n\t\"./de-ch.js\": 238,\n\t\"./de.js\": 236,\n\t\"./dv\": 239,\n\t\"./dv.js\": 239,\n\t\"./el\": 240,\n\t\"./el.js\": 240,\n\t\"./en-au\": 241,\n\t\"./en-au.js\": 241,\n\t\"./en-ca\": 242,\n\t\"./en-ca.js\": 242,\n\t\"./en-gb\": 243,\n\t\"./en-gb.js\": 243,\n\t\"./en-ie\": 244,\n\t\"./en-ie.js\": 244,\n\t\"./en-il\": 245,\n\t\"./en-il.js\": 245,\n\t\"./en-in\": 246,\n\t\"./en-in.js\": 246,\n\t\"./en-nz\": 247,\n\t\"./en-nz.js\": 247,\n\t\"./en-sg\": 248,\n\t\"./en-sg.js\": 248,\n\t\"./eo\": 249,\n\t\"./eo.js\": 249,\n\t\"./es\": 250,\n\t\"./es-do\": 251,\n\t\"./es-do.js\": 251,\n\t\"./es-mx\": 252,\n\t\"./es-mx.js\": 252,\n\t\"./es-us\": 253,\n\t\"./es-us.js\": 253,\n\t\"./es.js\": 250,\n\t\"./et\": 254,\n\t\"./et.js\": 254,\n\t\"./eu\": 255,\n\t\"./eu.js\": 255,\n\t\"./fa\": 256,\n\t\"./fa.js\": 256,\n\t\"./fi\": 257,\n\t\"./fi.js\": 257,\n\t\"./fil\": 258,\n\t\"./fil.js\": 258,\n\t\"./fo\": 259,\n\t\"./fo.js\": 259,\n\t\"./fr\": 260,\n\t\"./fr-ca\": 261,\n\t\"./fr-ca.js\": 261,\n\t\"./fr-ch\": 262,\n\t\"./fr-ch.js\": 262,\n\t\"./fr.js\": 260,\n\t\"./fy\": 263,\n\t\"./fy.js\": 263,\n\t\"./ga\": 264,\n\t\"./ga.js\": 264,\n\t\"./gd\": 265,\n\t\"./gd.js\": 265,\n\t\"./gl\": 266,\n\t\"./gl.js\": 266,\n\t\"./gom-deva\": 267,\n\t\"./gom-deva.js\": 267,\n\t\"./gom-latn\": 268,\n\t\"./gom-latn.js\": 268,\n\t\"./gu\": 269,\n\t\"./gu.js\": 269,\n\t\"./he\": 270,\n\t\"./he.js\": 270,\n\t\"./hi\": 271,\n\t\"./hi.js\": 271,\n\t\"./hr\": 272,\n\t\"./hr.js\": 272,\n\t\"./hu\": 273,\n\t\"./hu.js\": 273,\n\t\"./hy-am\": 274,\n\t\"./hy-am.js\": 274,\n\t\"./id\": 275,\n\t\"./id.js\": 275,\n\t\"./is\": 276,\n\t\"./is.js\": 276,\n\t\"./it\": 277,\n\t\"./it-ch\": 278,\n\t\"./it-ch.js\": 278,\n\t\"./it.js\": 277,\n\t\"./ja\": 279,\n\t\"./ja.js\": 279,\n\t\"./jv\": 280,\n\t\"./jv.js\": 280,\n\t\"./ka\": 281,\n\t\"./ka.js\": 281,\n\t\"./kk\": 282,\n\t\"./kk.js\": 282,\n\t\"./km\": 283,\n\t\"./km.js\": 283,\n\t\"./kn\": 284,\n\t\"./kn.js\": 284,\n\t\"./ko\": 285,\n\t\"./ko.js\": 285,\n\t\"./ku\": 286,\n\t\"./ku-kmr\": 287,\n\t\"./ku-kmr.js\": 287,\n\t\"./ku.js\": 286,\n\t\"./ky\": 288,\n\t\"./ky.js\": 288,\n\t\"./lb\": 289,\n\t\"./lb.js\": 289,\n\t\"./lo\": 290,\n\t\"./lo.js\": 290,\n\t\"./lt\": 291,\n\t\"./lt.js\": 291,\n\t\"./lv\": 292,\n\t\"./lv.js\": 292,\n\t\"./me\": 293,\n\t\"./me.js\": 293,\n\t\"./mi\": 294,\n\t\"./mi.js\": 294,\n\t\"./mk\": 295,\n\t\"./mk.js\": 295,\n\t\"./ml\": 296,\n\t\"./ml.js\": 296,\n\t\"./mn\": 297,\n\t\"./mn.js\": 297,\n\t\"./mr\": 298,\n\t\"./mr.js\": 298,\n\t\"./ms\": 299,\n\t\"./ms-my\": 300,\n\t\"./ms-my.js\": 300,\n\t\"./ms.js\": 299,\n\t\"./mt\": 301,\n\t\"./mt.js\": 301,\n\t\"./my\": 302,\n\t\"./my.js\": 302,\n\t\"./nb\": 303,\n\t\"./nb.js\": 303,\n\t\"./ne\": 304,\n\t\"./ne.js\": 304,\n\t\"./nl\": 305,\n\t\"./nl-be\": 306,\n\t\"./nl-be.js\": 306,\n\t\"./nl.js\": 305,\n\t\"./nn\": 307,\n\t\"./nn.js\": 307,\n\t\"./oc-lnc\": 308,\n\t\"./oc-lnc.js\": 308,\n\t\"./pa-in\": 309,\n\t\"./pa-in.js\": 309,\n\t\"./pl\": 310,\n\t\"./pl.js\": 310,\n\t\"./pt\": 311,\n\t\"./pt-br\": 151,\n\t\"./pt-br.js\": 151,\n\t\"./pt.js\": 311,\n\t\"./ro\": 312,\n\t\"./ro.js\": 312,\n\t\"./ru\": 313,\n\t\"./ru.js\": 313,\n\t\"./sd\": 314,\n\t\"./sd.js\": 314,\n\t\"./se\": 315,\n\t\"./se.js\": 315,\n\t\"./si\": 316,\n\t\"./si.js\": 316,\n\t\"./sk\": 317,\n\t\"./sk.js\": 317,\n\t\"./sl\": 318,\n\t\"./sl.js\": 318,\n\t\"./sq\": 319,\n\t\"./sq.js\": 319,\n\t\"./sr\": 320,\n\t\"./sr-cyrl\": 321,\n\t\"./sr-cyrl.js\": 321,\n\t\"./sr.js\": 320,\n\t\"./ss\": 322,\n\t\"./ss.js\": 322,\n\t\"./sv\": 323,\n\t\"./sv.js\": 323,\n\t\"./sw\": 324,\n\t\"./sw.js\": 324,\n\t\"./ta\": 325,\n\t\"./ta.js\": 325,\n\t\"./te\": 326,\n\t\"./te.js\": 326,\n\t\"./tet\": 327,\n\t\"./tet.js\": 327,\n\t\"./tg\": 328,\n\t\"./tg.js\": 328,\n\t\"./th\": 329,\n\t\"./th.js\": 329,\n\t\"./tk\": 330,\n\t\"./tk.js\": 330,\n\t\"./tl-ph\": 331,\n\t\"./tl-ph.js\": 331,\n\t\"./tlh\": 332,\n\t\"./tlh.js\": 332,\n\t\"./tr\": 333,\n\t\"./tr.js\": 333,\n\t\"./tzl\": 334,\n\t\"./tzl.js\": 334,\n\t\"./tzm\": 335,\n\t\"./tzm-latn\": 336,\n\t\"./tzm-latn.js\": 336,\n\t\"./tzm.js\": 335,\n\t\"./ug-cn\": 337,\n\t\"./ug-cn.js\": 337,\n\t\"./uk\": 338,\n\t\"./uk.js\": 338,\n\t\"./ur\": 339,\n\t\"./ur.js\": 339,\n\t\"./uz\": 340,\n\t\"./uz-latn\": 341,\n\t\"./uz-latn.js\": 341,\n\t\"./uz.js\": 340,\n\t\"./vi\": 342,\n\t\"./vi.js\": 342,\n\t\"./x-pseudo\": 343,\n\t\"./x-pseudo.js\": 343,\n\t\"./yo\": 344,\n\t\"./yo.js\": 344,\n\t\"./zh-cn\": 345,\n\t\"./zh-cn.js\": 345,\n\t\"./zh-hk\": 346,\n\t\"./zh-hk.js\": 346,\n\t\"./zh-mo\": 347,\n\t\"./zh-mo.js\": 347,\n\t\"./zh-tw\": 348,\n\t\"./zh-tw.js\": 348\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 511;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Observable = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription =\n/*#__PURE__*/\nfunction () {\n function Subscription(observer, subscriber) {\n _classCallCheck(this, Subscription);\n\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n _createClass(Subscription, [{\n key: \"unsubscribe\",\n value: function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n }\n }, {\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver =\n/*#__PURE__*/\nfunction () {\n function SubscriptionObserver(subscription) {\n _classCallCheck(this, SubscriptionObserver);\n\n this._subscription = subscription;\n }\n\n _createClass(SubscriptionObserver, [{\n key: \"next\",\n value: function next(value) {\n onNotify(this._subscription, 'next', value);\n }\n }, {\n key: \"error\",\n value: function error(value) {\n onNotify(this._subscription, 'error', value);\n }\n }, {\n key: \"complete\",\n value: function complete() {\n onNotify(this._subscription, 'complete');\n }\n }, {\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable =\n/*#__PURE__*/\nfunction () {\n function Observable(subscriber) {\n _classCallCheck(this, Observable);\n\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n _createClass(Observable, [{\n key: \"subscribe\",\n value: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n }\n }, {\n key: \"forEach\",\n value: function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n }\n }, {\n key: \"map\",\n value: function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n }\n }, {\n key: \"filter\",\n value: function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n }\n }, {\n key: \"reduce\",\n value: function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n }\n }, {\n key: \"concat\",\n value: function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n }\n }, {\n key: \"flatMap\",\n value: function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n }\n }, {\n key: SymbolObservable,\n value: function () {\n return this;\n }\n }], [{\n key: \"from\",\n value: function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = method.call(x)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _item = _step.value;\n observer.next(_item);\n if (observer.closed) return;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n }\n }, {\n key: \"of\",\n value: function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }, {\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nexports.Observable = Observable;\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","export function getEnv() {\n if (typeof process !== 'undefined' && process.env.NODE_ENV) {\n return process.env.NODE_ENV;\n }\n return 'development';\n}\nexport function isEnv(env) {\n return getEnv() === env;\n}\nexport function isDevelopment() {\n return isEnv('development') === true;\n}\nexport function isTest() {\n return isEnv('test') === true;\n}\n//# sourceMappingURL=environment.js.map","import fireEvent from 'src/analytics/fireEvent';\n\nimport { AnalyticsEvent } from './types';\n\ntype AddEventListenerAttributes = {\n elementSelector: string;\n analyticsEvent: AnalyticsEvent;\n jQueryEvent: string;\n label?: string;\n};\n\nexport default ({\n elementSelector,\n analyticsEvent,\n jQueryEvent,\n label,\n}: AddEventListenerAttributes) => {\n if (!window.jQuery) return;\n\n $(elementSelector).on(jQueryEvent, () => {\n fireEvent({\n ...analyticsEvent,\n label,\n });\n });\n};\n","import { gql } from '@apollo/client';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const errorData = gql`\n fragment ErrorData on BasicError {\n message\n path\n extensions {\n code\n validation\n }\n }\n`;\n\nexport const benefitErrorData = gql`\n fragment BenefitErrorData on BenefitBasicError {\n message\n path\n extensions {\n code\n }\n }\n`;\n","import { Slot } from '@wry/context';\nexport { asyncFromGen, bind as bindContext, noContext, setTimeout } from '@wry/context';\n\nfunction defaultDispose() { }\r\nvar Cache = /** @class */ (function () {\r\n function Cache(max, dispose) {\r\n if (max === void 0) { max = Infinity; }\r\n if (dispose === void 0) { dispose = defaultDispose; }\r\n this.max = max;\r\n this.dispose = dispose;\r\n this.map = new Map();\r\n this.newest = null;\r\n this.oldest = null;\r\n }\r\n Cache.prototype.has = function (key) {\r\n return this.map.has(key);\r\n };\r\n Cache.prototype.get = function (key) {\r\n var entry = this.getEntry(key);\r\n return entry && entry.value;\r\n };\r\n Cache.prototype.getEntry = function (key) {\r\n var entry = this.map.get(key);\r\n if (entry && entry !== this.newest) {\r\n var older = entry.older, newer = entry.newer;\r\n if (newer) {\r\n newer.older = older;\r\n }\r\n if (older) {\r\n older.newer = newer;\r\n }\r\n entry.older = this.newest;\r\n entry.older.newer = entry;\r\n entry.newer = null;\r\n this.newest = entry;\r\n if (entry === this.oldest) {\r\n this.oldest = newer;\r\n }\r\n }\r\n return entry;\r\n };\r\n Cache.prototype.set = function (key, value) {\r\n var entry = this.getEntry(key);\r\n if (entry) {\r\n return entry.value = value;\r\n }\r\n entry = {\r\n key: key,\r\n value: value,\r\n newer: null,\r\n older: this.newest\r\n };\r\n if (this.newest) {\r\n this.newest.newer = entry;\r\n }\r\n this.newest = entry;\r\n this.oldest = this.oldest || entry;\r\n this.map.set(key, entry);\r\n return entry.value;\r\n };\r\n Cache.prototype.clean = function () {\r\n while (this.oldest && this.map.size > this.max) {\r\n this.delete(this.oldest.key);\r\n }\r\n };\r\n Cache.prototype.delete = function (key) {\r\n var entry = this.map.get(key);\r\n if (entry) {\r\n if (entry === this.newest) {\r\n this.newest = entry.older;\r\n }\r\n if (entry === this.oldest) {\r\n this.oldest = entry.newer;\r\n }\r\n if (entry.newer) {\r\n entry.newer.older = entry.older;\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer;\r\n }\r\n this.map.delete(key);\r\n this.dispose(entry.value, key);\r\n return true;\r\n }\r\n return false;\r\n };\r\n return Cache;\r\n}());\n\nvar parentEntrySlot = new Slot();\n\nfunction maybeUnsubscribe(entryOrDep) {\r\n var unsubscribe = entryOrDep.unsubscribe;\r\n if (typeof unsubscribe === \"function\") {\r\n entryOrDep.unsubscribe = void 0;\r\n unsubscribe();\r\n }\r\n}\n\nvar emptySetPool = [];\r\nvar POOL_TARGET_SIZE = 100;\r\n// Since this package might be used browsers, we should avoid using the\r\n// Node built-in assert module.\r\nfunction assert(condition, optionalMessage) {\r\n if (!condition) {\r\n throw new Error(optionalMessage || \"assertion failure\");\r\n }\r\n}\r\nfunction valueIs(a, b) {\r\n var len = a.length;\r\n return (\r\n // Unknown values are not equal to each other.\r\n len > 0 &&\r\n // Both values must be ordinary (or both exceptional) to be equal.\r\n len === b.length &&\r\n // The underlying value or exception must be the same.\r\n a[len - 1] === b[len - 1]);\r\n}\r\nfunction valueGet(value) {\r\n switch (value.length) {\r\n case 0: throw new Error(\"unknown value\");\r\n case 1: return value[0];\r\n case 2: throw value[1];\r\n }\r\n}\r\nfunction valueCopy(value) {\r\n return value.slice(0);\r\n}\r\nvar Entry = /** @class */ (function () {\r\n function Entry(fn) {\r\n this.fn = fn;\r\n this.parents = new Set();\r\n this.childValues = new Map();\r\n // When this Entry has children that are dirty, this property becomes\r\n // a Set containing other Entry objects, borrowed from emptySetPool.\r\n // When the set becomes empty, it gets recycled back to emptySetPool.\r\n this.dirtyChildren = null;\r\n this.dirty = true;\r\n this.recomputing = false;\r\n this.value = [];\r\n this.deps = null;\r\n ++Entry.count;\r\n }\r\n Entry.prototype.peek = function () {\r\n if (this.value.length === 1 && !mightBeDirty(this)) {\r\n return this.value[0];\r\n }\r\n };\r\n // This is the most important method of the Entry API, because it\r\n // determines whether the cached this.value can be returned immediately,\r\n // or must be recomputed. The overall performance of the caching system\r\n // depends on the truth of the following observations: (1) this.dirty is\r\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\r\n // (3) valueGet(this.value) is usually returned without recomputation.\r\n Entry.prototype.recompute = function (args) {\r\n assert(!this.recomputing, \"already recomputing\");\r\n rememberParent(this);\r\n return mightBeDirty(this)\r\n ? reallyRecompute(this, args)\r\n : valueGet(this.value);\r\n };\r\n Entry.prototype.setDirty = function () {\r\n if (this.dirty)\r\n return;\r\n this.dirty = true;\r\n this.value.length = 0;\r\n reportDirty(this);\r\n forgetChildren(this);\r\n // We can go ahead and unsubscribe here, since any further dirty\r\n // notifications we receive will be redundant, and unsubscribing may\r\n // free up some resources, e.g. file watchers.\r\n maybeUnsubscribe(this);\r\n };\r\n Entry.prototype.dispose = function () {\r\n var _this = this;\r\n forgetChildren(this);\r\n maybeUnsubscribe(this);\r\n // Because this entry has been kicked out of the cache (in index.js),\r\n // we've lost the ability to find out if/when this entry becomes dirty,\r\n // whether that happens through a subscription, because of a direct call\r\n // to entry.setDirty(), or because one of its children becomes dirty.\r\n // Because of this loss of future information, we have to assume the\r\n // worst (that this entry might have become dirty very soon), so we must\r\n // immediately mark this entry's parents as dirty. Normally we could\r\n // just call entry.setDirty() rather than calling parent.setDirty() for\r\n // each parent, but that would leave this entry in parent.childValues\r\n // and parent.dirtyChildren, which would prevent the child from being\r\n // truly forgotten.\r\n this.parents.forEach(function (parent) {\r\n parent.setDirty();\r\n forgetChild(parent, _this);\r\n });\r\n };\r\n Entry.prototype.dependOn = function (dep) {\r\n dep.add(this);\r\n if (!this.deps) {\r\n this.deps = emptySetPool.pop() || new Set();\r\n }\r\n this.deps.add(dep);\r\n };\r\n Entry.prototype.forgetDeps = function () {\r\n var _this = this;\r\n if (this.deps) {\r\n this.deps.forEach(function (dep) { return dep.delete(_this); });\r\n this.deps.clear();\r\n emptySetPool.push(this.deps);\r\n this.deps = null;\r\n }\r\n };\r\n Entry.count = 0;\r\n return Entry;\r\n}());\r\nfunction rememberParent(child) {\r\n var parent = parentEntrySlot.getValue();\r\n if (parent) {\r\n child.parents.add(parent);\r\n if (!parent.childValues.has(child)) {\r\n parent.childValues.set(child, []);\r\n }\r\n if (mightBeDirty(child)) {\r\n reportDirtyChild(parent, child);\r\n }\r\n else {\r\n reportCleanChild(parent, child);\r\n }\r\n return parent;\r\n }\r\n}\r\nfunction reallyRecompute(entry, args) {\r\n forgetChildren(entry);\r\n // Set entry as the parent entry while calling recomputeNewValue(entry).\r\n parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);\r\n if (maybeSubscribe(entry, args)) {\r\n // If we successfully recomputed entry.value and did not fail to\r\n // (re)subscribe, then this Entry is no longer explicitly dirty.\r\n setClean(entry);\r\n }\r\n return valueGet(entry.value);\r\n}\r\nfunction recomputeNewValue(entry, args) {\r\n entry.recomputing = true;\r\n // Set entry.value as unknown.\r\n entry.value.length = 0;\r\n try {\r\n // If entry.fn succeeds, entry.value will become a normal Value.\r\n entry.value[0] = entry.fn.apply(null, args);\r\n }\r\n catch (e) {\r\n // If entry.fn throws, entry.value will become exceptional.\r\n entry.value[1] = e;\r\n }\r\n // Either way, this line is always reached.\r\n entry.recomputing = false;\r\n}\r\nfunction mightBeDirty(entry) {\r\n return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);\r\n}\r\nfunction setClean(entry) {\r\n entry.dirty = false;\r\n if (mightBeDirty(entry)) {\r\n // This Entry may still have dirty children, in which case we can't\r\n // let our parents know we're clean just yet.\r\n return;\r\n }\r\n reportClean(entry);\r\n}\r\nfunction reportDirty(child) {\r\n child.parents.forEach(function (parent) { return reportDirtyChild(parent, child); });\r\n}\r\nfunction reportClean(child) {\r\n child.parents.forEach(function (parent) { return reportCleanChild(parent, child); });\r\n}\r\n// Let a parent Entry know that one of its children may be dirty.\r\nfunction reportDirtyChild(parent, child) {\r\n // Must have called rememberParent(child) before calling\r\n // reportDirtyChild(parent, child).\r\n assert(parent.childValues.has(child));\r\n assert(mightBeDirty(child));\r\n if (!parent.dirtyChildren) {\r\n parent.dirtyChildren = emptySetPool.pop() || new Set;\r\n }\r\n else if (parent.dirtyChildren.has(child)) {\r\n // If we already know this child is dirty, then we must have already\r\n // informed our own parents that we are dirty, so we can terminate\r\n // the recursion early.\r\n return;\r\n }\r\n parent.dirtyChildren.add(child);\r\n reportDirty(parent);\r\n}\r\n// Let a parent Entry know that one of its children is no longer dirty.\r\nfunction reportCleanChild(parent, child) {\r\n // Must have called rememberChild(child) before calling\r\n // reportCleanChild(parent, child).\r\n assert(parent.childValues.has(child));\r\n assert(!mightBeDirty(child));\r\n var childValue = parent.childValues.get(child);\r\n if (childValue.length === 0) {\r\n parent.childValues.set(child, valueCopy(child.value));\r\n }\r\n else if (!valueIs(childValue, child.value)) {\r\n parent.setDirty();\r\n }\r\n removeDirtyChild(parent, child);\r\n if (mightBeDirty(parent)) {\r\n return;\r\n }\r\n reportClean(parent);\r\n}\r\nfunction removeDirtyChild(parent, child) {\r\n var dc = parent.dirtyChildren;\r\n if (dc) {\r\n dc.delete(child);\r\n if (dc.size === 0) {\r\n if (emptySetPool.length < POOL_TARGET_SIZE) {\r\n emptySetPool.push(dc);\r\n }\r\n parent.dirtyChildren = null;\r\n }\r\n }\r\n}\r\n// Removes all children from this entry and returns an array of the\r\n// removed children.\r\nfunction forgetChildren(parent) {\r\n if (parent.childValues.size > 0) {\r\n parent.childValues.forEach(function (_value, child) {\r\n forgetChild(parent, child);\r\n });\r\n }\r\n // Remove this parent Entry from any sets to which it was added by the\r\n // addToSet method.\r\n parent.forgetDeps();\r\n // After we forget all our children, this.dirtyChildren must be empty\r\n // and therefore must have been reset to null.\r\n assert(parent.dirtyChildren === null);\r\n}\r\nfunction forgetChild(parent, child) {\r\n child.parents.delete(parent);\r\n parent.childValues.delete(child);\r\n removeDirtyChild(parent, child);\r\n}\r\nfunction maybeSubscribe(entry, args) {\r\n if (typeof entry.subscribe === \"function\") {\r\n try {\r\n maybeUnsubscribe(entry); // Prevent double subscriptions.\r\n entry.unsubscribe = entry.subscribe.apply(null, args);\r\n }\r\n catch (e) {\r\n // If this Entry has a subscribe function and it threw an exception\r\n // (or an unsubscribe function it previously returned now throws),\r\n // return false to indicate that we were not able to subscribe (or\r\n // unsubscribe), and this Entry should remain dirty.\r\n entry.setDirty();\r\n return false;\r\n }\r\n }\r\n // Returning true indicates either that there was no entry.subscribe\r\n // function or that it succeeded.\r\n return true;\r\n}\n\n// A trie data structure that holds object keys weakly, yet can also hold\r\n// non-object keys, unlike the native `WeakMap`.\r\n// If no makeData function is supplied, the looked-up data will be an empty,\r\n// no-prototype Object.\r\nvar defaultMakeData = function () { return Object.create(null); };\r\n// Useful for processing arguments objects as well as arrays.\r\nvar _a = Array.prototype, forEach = _a.forEach, slice = _a.slice;\r\nvar KeyTrie = /** @class */ (function () {\r\n function KeyTrie(weakness, makeData) {\r\n if (makeData === void 0) { makeData = defaultMakeData; }\r\n this.weakness = weakness;\r\n this.makeData = makeData;\r\n }\r\n KeyTrie.prototype.lookup = function () {\r\n var array = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n array[_i] = arguments[_i];\r\n }\r\n return this.lookupArray(array);\r\n };\r\n KeyTrie.prototype.lookupArray = function (array) {\r\n var node = this;\r\n forEach.call(array, function (key) { return node = node.getChildTrie(key); });\r\n return node.data || (node.data = this.makeData(slice.call(array)));\r\n };\r\n KeyTrie.prototype.getChildTrie = function (key) {\r\n var map = this.weakness && isObjRef(key)\r\n ? this.weak || (this.weak = new WeakMap())\r\n : this.strong || (this.strong = new Map());\r\n var child = map.get(key);\r\n if (!child)\r\n map.set(key, child = new KeyTrie(this.weakness, this.makeData));\r\n return child;\r\n };\r\n return KeyTrie;\r\n}());\r\nfunction isObjRef(value) {\r\n switch (typeof value) {\r\n case \"object\":\r\n if (value === null)\r\n break;\r\n // Fall through to return true...\r\n case \"function\":\r\n return true;\r\n }\r\n return false;\r\n}\n\nfunction dep(options) {\r\n var depsByKey = new Map();\r\n var subscribe = options && options.subscribe;\r\n function depend(key) {\r\n var parent = parentEntrySlot.getValue();\r\n if (parent) {\r\n var dep_1 = depsByKey.get(key);\r\n if (!dep_1) {\r\n depsByKey.set(key, dep_1 = new Set);\r\n }\r\n parent.dependOn(dep_1);\r\n if (typeof subscribe === \"function\") {\r\n maybeUnsubscribe(dep_1);\r\n dep_1.unsubscribe = subscribe(key);\r\n }\r\n }\r\n }\r\n depend.dirty = function dirty(key) {\r\n var dep = depsByKey.get(key);\r\n if (dep) {\r\n dep.forEach(function (entry) { return entry.setDirty(); });\r\n depsByKey.delete(key);\r\n maybeUnsubscribe(dep);\r\n }\r\n };\r\n return depend;\r\n}\n\n// The defaultMakeCacheKey function is remarkably powerful, because it gives\r\n// a unique object for any shallow-identical list of arguments. If you need\r\n// to implement a custom makeCacheKey function, you may find it helpful to\r\n// delegate the final work to defaultMakeCacheKey, which is why we export it\r\n// here. However, you may want to avoid defaultMakeCacheKey if your runtime\r\n// does not support WeakMap, or you have the ability to return a string key.\r\n// In those cases, just write your own custom makeCacheKey functions.\r\nvar keyTrie = new KeyTrie(typeof WeakMap === \"function\");\r\nfunction defaultMakeCacheKey() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return keyTrie.lookupArray(args);\r\n}\r\nvar caches = new Set();\r\nfunction wrap(originalFunction, options) {\r\n if (options === void 0) { options = Object.create(null); }\r\n var cache = new Cache(options.max || Math.pow(2, 16), function (entry) { return entry.dispose(); });\r\n var keyArgs = options.keyArgs || (function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return args;\r\n });\r\n var makeCacheKey = options.makeCacheKey || defaultMakeCacheKey;\r\n function optimistic() {\r\n var key = makeCacheKey.apply(null, keyArgs.apply(null, arguments));\r\n if (key === void 0) {\r\n return originalFunction.apply(null, arguments);\r\n }\r\n var entry = cache.get(key);\r\n if (!entry) {\r\n cache.set(key, entry = new Entry(originalFunction));\r\n entry.subscribe = options.subscribe;\r\n }\r\n var value = entry.recompute(Array.prototype.slice.call(arguments));\r\n // Move this entry to the front of the least-recently used queue,\r\n // since we just finished computing its value.\r\n cache.set(key, entry);\r\n caches.add(cache);\r\n // Clean up any excess entries in the cache, but only if there is no\r\n // active parent entry, meaning we're not in the middle of a larger\r\n // computation that might be flummoxed by the cleaning.\r\n if (!parentEntrySlot.hasValue()) {\r\n caches.forEach(function (cache) { return cache.clean(); });\r\n caches.clear();\r\n }\r\n return value;\r\n }\r\n function lookup() {\r\n var key = makeCacheKey.apply(null, arguments);\r\n if (key !== void 0) {\r\n return cache.get(key);\r\n }\r\n }\r\n optimistic.dirty = function () {\r\n var entry = lookup.apply(null, arguments);\r\n if (entry) {\r\n entry.setDirty();\r\n }\r\n };\r\n optimistic.peek = function () {\r\n var entry = lookup.apply(null, arguments);\r\n if (entry) {\r\n return entry.peek();\r\n }\r\n };\r\n optimistic.forget = function () {\r\n var key = makeCacheKey.apply(null, arguments);\r\n return key !== void 0 && cache.delete(key);\r\n };\r\n return optimistic;\r\n}\n\nexport { KeyTrie, defaultMakeCacheKey, dep, wrap };\n//# sourceMappingURL=bundle.esm.js.map\n","import { Observable } from \"../../utilities/index.js\";\nexport function fromError(errorValue) {\n return new Observable(function (observer) {\n observer.error(errorValue);\n });\n}\n//# sourceMappingURL=fromError.js.map","export var throwServerError = function (response, result, message) {\n var error = new Error(message);\n error.name = 'ServerError';\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n//# sourceMappingURL=throwServerError.js.map","import { InvariantError } from 'ts-invariant';\nexport function validateOperation(operation) {\n var OPERATION_FIELDS = [\n 'query',\n 'operationName',\n 'variables',\n 'extensions',\n 'context',\n ];\n for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(26) : new InvariantError(\"illegal argument: \" + key);\n }\n }\n return operation;\n}\n//# sourceMappingURL=validateOperation.js.map","import { __assign } from \"tslib\";\nexport function createOperation(starting, operation) {\n var context = __assign({}, starting);\n var setContext = function (next) {\n if (typeof next === 'function') {\n context = __assign(__assign({}, context), next(context));\n }\n else {\n context = __assign(__assign({}, context), next);\n }\n };\n var getContext = function () { return (__assign({}, context)); };\n Object.defineProperty(operation, 'setContext', {\n enumerable: false,\n value: setContext,\n });\n Object.defineProperty(operation, 'getContext', {\n enumerable: false,\n value: getContext,\n });\n return operation;\n}\n//# sourceMappingURL=createOperation.js.map","import { getOperationName } from \"../../utilities/index.js\";\nexport function transformOperation(operation) {\n var transformedOperation = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== 'string'\n ? getOperationName(transformedOperation.query) || undefined\n : '';\n }\n return transformedOperation;\n}\n//# sourceMappingURL=transformOperation.js.map","import { __extends } from \"tslib\";\nimport { isNonEmptyArray } from \"../utilities/index.js\";\nexport function isApolloError(err) {\n return err.hasOwnProperty('graphQLErrors');\n}\nvar generateErrorMessage = function (err) {\n var message = '';\n if (isNonEmptyArray(err.graphQLErrors)) {\n err.graphQLErrors.forEach(function (graphQLError) {\n var errorMessage = graphQLError\n ? graphQLError.message\n : 'Error message not found.';\n message += errorMessage + \"\\n\";\n });\n }\n if (err.networkError) {\n message += err.networkError.message + \"\\n\";\n }\n message = message.replace(/\\n$/, '');\n return message;\n};\nvar ApolloError = (function (_super) {\n __extends(ApolloError, _super);\n function ApolloError(_a) {\n var graphQLErrors = _a.graphQLErrors, networkError = _a.networkError, errorMessage = _a.errorMessage, extraInfo = _a.extraInfo;\n var _this = _super.call(this, errorMessage) || this;\n _this.graphQLErrors = graphQLErrors || [];\n _this.networkError = networkError || null;\n _this.message = errorMessage || generateErrorMessage(_this);\n _this.extraInfo = extraInfo;\n _this.__proto__ = ApolloError.prototype;\n return _this;\n }\n return ApolloError;\n}(Error));\nexport { ApolloError };\n//# sourceMappingURL=index.js.map","import React from 'react';\nimport { canUseWeakMap } from \"../../utilities/index.js\";\nvar cache = new (canUseWeakMap ? WeakMap : Map)();\nexport function getApolloContext() {\n var context = cache.get(React.createContext);\n if (!context) {\n context = React.createContext({});\n cache.set(React.createContext, context);\n }\n return context;\n}\nexport { getApolloContext as resetApolloContext };\n//# sourceMappingURL=ApolloContext.js.map","import React from 'react';\nimport { invariant } from 'ts-invariant';\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloConsumer = function (props) {\n var ApolloContext = getApolloContext();\n return React.createElement(ApolloContext.Consumer, null, function (context) {\n process.env.NODE_ENV === \"production\" ? invariant(context && context.client, 27) : invariant(context && context.client, 'Could not find \"client\" in the context of ApolloConsumer. ' +\n 'Wrap the root component in an .');\n return props.children(context.client);\n });\n};\n//# sourceMappingURL=ApolloConsumer.js.map","import React from 'react';\nimport { invariant } from 'ts-invariant';\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloProvider = function (_a) {\n var client = _a.client, children = _a.children;\n var ApolloContext = getApolloContext();\n return React.createElement(ApolloContext.Consumer, null, function (context) {\n if (context === void 0) { context = {}; }\n if (client && context.client !== client) {\n context = Object.assign({}, context, { client: client });\n }\n process.env.NODE_ENV === \"production\" ? invariant(context.client, 28) : invariant(context.client, 'ApolloProvider was not passed a client instance. Make ' +\n 'sure you pass in your client via the \"client\" prop.');\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n });\n};\n//# sourceMappingURL=ApolloProvider.js.map","import { invariant } from 'ts-invariant';\nexport var DocumentType;\n(function (DocumentType) {\n DocumentType[DocumentType[\"Query\"] = 0] = \"Query\";\n DocumentType[DocumentType[\"Mutation\"] = 1] = \"Mutation\";\n DocumentType[DocumentType[\"Subscription\"] = 2] = \"Subscription\";\n})(DocumentType || (DocumentType = {}));\nvar cache = new Map();\nexport function operationName(type) {\n var name;\n switch (type) {\n case DocumentType.Query:\n name = 'Query';\n break;\n case DocumentType.Mutation:\n name = 'Mutation';\n break;\n case DocumentType.Subscription:\n name = 'Subscription';\n break;\n }\n return name;\n}\nexport function parser(document) {\n var cached = cache.get(document);\n if (cached)\n return cached;\n var variables, type, name;\n process.env.NODE_ENV === \"production\" ? invariant(!!document && !!document.kind, 34) : invariant(!!document && !!document.kind, \"Argument of \" + document + \" passed to parser was not a valid GraphQL \" +\n \"DocumentNode. You may need to use 'graphql-tag' or another method \" +\n \"to convert your operation into a document\");\n var fragments = document.definitions.filter(function (x) { return x.kind === 'FragmentDefinition'; });\n var queries = document.definitions.filter(function (x) {\n return x.kind === 'OperationDefinition' && x.operation === 'query';\n });\n var mutations = document.definitions.filter(function (x) {\n return x.kind === 'OperationDefinition' && x.operation === 'mutation';\n });\n var subscriptions = document.definitions.filter(function (x) {\n return x.kind === 'OperationDefinition' && x.operation === 'subscription';\n });\n process.env.NODE_ENV === \"production\" ? invariant(!fragments.length ||\n (queries.length || mutations.length || subscriptions.length), 35) : invariant(!fragments.length ||\n (queries.length || mutations.length || subscriptions.length), \"Passing only a fragment to 'graphql' is not yet supported. \" +\n \"You must include a query, subscription or mutation as well\");\n process.env.NODE_ENV === \"production\" ? invariant(queries.length + mutations.length + subscriptions.length <= 1, 36) : invariant(queries.length + mutations.length + subscriptions.length <= 1, \"react-apollo only supports a query, subscription, or a mutation per HOC. \" +\n (document + \" had \" + queries.length + \" queries, \" + subscriptions.length + \" \") +\n (\"subscriptions and \" + mutations.length + \" mutations. \") +\n \"You can use 'compose' to join multiple operation types to a component\");\n type = queries.length ? DocumentType.Query : DocumentType.Mutation;\n if (!queries.length && !mutations.length)\n type = DocumentType.Subscription;\n var definitions = queries.length\n ? queries\n : mutations.length\n ? mutations\n : subscriptions;\n process.env.NODE_ENV === \"production\" ? invariant(definitions.length === 1, 37) : invariant(definitions.length === 1, \"react-apollo only supports one definition per HOC. \" + document + \" had \" +\n (definitions.length + \" definitions. \") +\n \"You can use 'compose' to join multiple operation types to a component\");\n var definition = definitions[0];\n variables = definition.variableDefinitions || [];\n if (definition.name && definition.name.kind === 'Name') {\n name = definition.name.value;\n }\n else {\n name = 'data';\n }\n var payload = { name: name, type: type, variables: variables };\n cache.set(document, payload);\n return payload;\n}\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { InvariantError, invariant } from 'ts-invariant';\nimport { Observable } from \"../../utilities/index.js\";\nimport { validateOperation, createOperation, transformOperation, } from \"../utils/index.js\";\nfunction passthrough(op, forward) {\n return (forward ? forward(op) : Observable.of());\n}\nfunction toLink(handler) {\n return typeof handler === 'function' ? new ApolloLink(handler) : handler;\n}\nfunction isTerminating(link) {\n return link.request.length <= 1;\n}\nvar LinkError = (function (_super) {\n __extends(LinkError, _super);\n function LinkError(message, link) {\n var _this = _super.call(this, message) || this;\n _this.link = link;\n return _this;\n }\n return LinkError;\n}(Error));\nvar ApolloLink = (function () {\n function ApolloLink(request) {\n if (request)\n this.request = request;\n }\n ApolloLink.empty = function () {\n return new ApolloLink(function () { return Observable.of(); });\n };\n ApolloLink.from = function (links) {\n if (links.length === 0)\n return ApolloLink.empty();\n return links.map(toLink).reduce(function (x, y) { return x.concat(y); });\n };\n ApolloLink.split = function (test, left, right) {\n var leftLink = toLink(left);\n var rightLink = toLink(right || new ApolloLink(passthrough));\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n return new ApolloLink(function (operation) {\n return test(operation)\n ? leftLink.request(operation) || Observable.of()\n : rightLink.request(operation) || Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return test(operation)\n ? leftLink.request(operation, forward) || Observable.of()\n : rightLink.request(operation, forward) || Observable.of();\n });\n }\n };\n ApolloLink.execute = function (link, operation) {\n return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());\n };\n ApolloLink.concat = function (first, second) {\n var firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n process.env.NODE_ENV === \"production\" || invariant.warn(new LinkError(\"You are calling concat on a terminating link, which will have no effect\", firstLink));\n return firstLink;\n }\n var nextLink = toLink(second);\n if (isTerminating(nextLink)) {\n return new ApolloLink(function (operation) {\n return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();\n });\n }\n else {\n return new ApolloLink(function (operation, forward) {\n return (firstLink.request(operation, function (op) {\n return nextLink.request(op, forward) || Observable.of();\n }) || Observable.of());\n });\n }\n };\n ApolloLink.prototype.split = function (test, left, right) {\n return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));\n };\n ApolloLink.prototype.concat = function (next) {\n return ApolloLink.concat(this, next);\n };\n ApolloLink.prototype.request = function (operation, forward) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(21) : new InvariantError('request is not implemented');\n };\n ApolloLink.prototype.onError = function (reason) {\n throw reason;\n };\n ApolloLink.prototype.setOnError = function (fn) {\n this.onError = fn;\n return this;\n };\n return ApolloLink;\n}());\nexport { ApolloLink };\n//# sourceMappingURL=ApolloLink.js.map","export { empty } from \"./empty.js\";\nexport { from } from \"./from.js\";\nexport { split } from \"./split.js\";\nexport { concat } from \"./concat.js\";\nexport { execute } from \"./execute.js\";\nexport { ApolloLink } from \"./ApolloLink.js\";\nexport * from \"./types.js\";\n//# sourceMappingURL=index.js.map","import { isEmpty, forEach } from 'lodash';\n\nimport { camelcaseKeys } from 'src/util/changecaseKeys';\n\nimport readMetaTagObject from '../util/readMetaTagObject';\nimport fireEvent from './fireEvent';\n\nconst TAG_NAME = 'x-triggers';\n\nexport default () => {\n const payload = readMetaTagObject({ tagName: TAG_NAME });\n\n if (isEmpty(payload)) return;\n\n const { meta, ...otherEvents } = payload;\n\n if (meta) fireEvent({ event: 'meta', ...camelcaseKeys(meta) });\n forEach(otherEvents, (value, key) =>\n fireEvent({ event: key, ...camelcaseKeys(value) }),\n );\n};\n","export const gtmAuth = process.env.GTM_AUTH;\nexport const gtmPreview = process.env.GTM_PREVIEW;\nexport const gtmId = process.env.GTM_ID;\n\nexport const gtmScriptTagId = 'mywork-gtm';\n\nexport const gtmSnippet = `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=${gtmAuth}>m_preview=${gtmPreview}>m_cookies_win=x';f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','${gtmId}');`;\n\nexport default function setupTagManagerScript() {\n if (document.getElementById(gtmScriptTagId)) return;\n\n const script = document.createElement('script');\n\n const attributes = {\n id: gtmScriptTagId,\n async: true,\n type: 'text/javascript',\n text: gtmSnippet,\n };\n\n Object.assign(script, attributes);\n\n document.head.appendChild(script);\n}\n","import initializeDataLayer from './initializeDataLayer';\nimport setupTagManagerScript from './setupTagManagerScript';\n\nexport default () => {\n initializeDataLayer();\n setupTagManagerScript();\n};\n","export { ApolloCache } from \"./core/cache.js\";\nexport { Cache } from \"./core/types/Cache.js\";\nexport { MissingFieldError } from \"./core/types/common.js\";\nexport { isReference, makeReference, } from \"../utilities/index.js\";\nexport { InMemoryCache, } from \"./inmemory/inMemoryCache.js\";\nexport { makeVar, cacheSlot, } from \"./inmemory/reactiveVars.js\";\nexport { defaultDataIdFromObject, } from \"./inmemory/policies.js\";\nexport * from \"./inmemory/types.js\";\n//# sourceMappingURL=index.js.map","// This currentContext variable will only be used if the makeSlotClass\r\n// function is called, which happens only if this is the first copy of the\r\n// @wry/context package to be imported.\r\nvar currentContext = null;\r\n// This unique internal object is used to denote the absence of a value\r\n// for a given Slot, and is never exposed to outside code.\r\nvar MISSING_VALUE = {};\r\nvar idCounter = 1;\r\n// Although we can't do anything about the cost of duplicated code from\r\n// accidentally bundling multiple copies of the @wry/context package, we can\r\n// avoid creating the Slot class more than once using makeSlotClass.\r\nvar makeSlotClass = function () { return /** @class */ (function () {\r\n function Slot() {\r\n // If you have a Slot object, you can find out its slot.id, but you cannot\r\n // guess the slot.id of a Slot you don't have access to, thanks to the\r\n // randomized suffix.\r\n this.id = [\r\n \"slot\",\r\n idCounter++,\r\n Date.now(),\r\n Math.random().toString(36).slice(2),\r\n ].join(\":\");\r\n }\r\n Slot.prototype.hasValue = function () {\r\n for (var context_1 = currentContext; context_1; context_1 = context_1.parent) {\r\n // We use the Slot object iself as a key to its value, which means the\r\n // value cannot be obtained without a reference to the Slot object.\r\n if (this.id in context_1.slots) {\r\n var value = context_1.slots[this.id];\r\n if (value === MISSING_VALUE)\r\n break;\r\n if (context_1 !== currentContext) {\r\n // Cache the value in currentContext.slots so the next lookup will\r\n // be faster. This caching is safe because the tree of contexts and\r\n // the values of the slots are logically immutable.\r\n currentContext.slots[this.id] = value;\r\n }\r\n return true;\r\n }\r\n }\r\n if (currentContext) {\r\n // If a value was not found for this Slot, it's never going to be found\r\n // no matter how many times we look it up, so we might as well cache\r\n // the absence of the value, too.\r\n currentContext.slots[this.id] = MISSING_VALUE;\r\n }\r\n return false;\r\n };\r\n Slot.prototype.getValue = function () {\r\n if (this.hasValue()) {\r\n return currentContext.slots[this.id];\r\n }\r\n };\r\n Slot.prototype.withValue = function (value, callback, \r\n // Given the prevalence of arrow functions, specifying arguments is likely\r\n // to be much more common than specifying `this`, hence this ordering:\r\n args, thisArg) {\r\n var _a;\r\n var slots = (_a = {\r\n __proto__: null\r\n },\r\n _a[this.id] = value,\r\n _a);\r\n var parent = currentContext;\r\n currentContext = { parent: parent, slots: slots };\r\n try {\r\n // Function.prototype.apply allows the arguments array argument to be\r\n // omitted or undefined, so args! is fine here.\r\n return callback.apply(thisArg, args);\r\n }\r\n finally {\r\n currentContext = parent;\r\n }\r\n };\r\n // Capture the current context and wrap a callback function so that it\r\n // reestablishes the captured context when called.\r\n Slot.bind = function (callback) {\r\n var context = currentContext;\r\n return function () {\r\n var saved = currentContext;\r\n try {\r\n currentContext = context;\r\n return callback.apply(this, arguments);\r\n }\r\n finally {\r\n currentContext = saved;\r\n }\r\n };\r\n };\r\n // Immediately run a callback function without any captured context.\r\n Slot.noContext = function (callback, \r\n // Given the prevalence of arrow functions, specifying arguments is likely\r\n // to be much more common than specifying `this`, hence this ordering:\r\n args, thisArg) {\r\n if (currentContext) {\r\n var saved = currentContext;\r\n try {\r\n currentContext = null;\r\n // Function.prototype.apply allows the arguments array argument to be\r\n // omitted or undefined, so args! is fine here.\r\n return callback.apply(thisArg, args);\r\n }\r\n finally {\r\n currentContext = saved;\r\n }\r\n }\r\n else {\r\n return callback.apply(thisArg, args);\r\n }\r\n };\r\n return Slot;\r\n}()); };\r\n// We store a single global implementation of the Slot class as a permanent\r\n// non-enumerable symbol property of the Array constructor. This obfuscation\r\n// does nothing to prevent access to the Slot class, but at least it ensures\r\n// the implementation (i.e. currentContext) cannot be tampered with, and all\r\n// copies of the @wry/context package (hopefully just one) will share the\r\n// same Slot implementation. Since the first copy of the @wry/context package\r\n// to be imported wins, this technique imposes a very high cost for any\r\n// future breaking changes to the Slot class.\r\nvar globalKey = \"@wry/context:Slot\";\r\nvar host = Array;\r\nvar Slot = host[globalKey] || function () {\r\n var Slot = makeSlotClass();\r\n try {\r\n Object.defineProperty(host, globalKey, {\r\n value: host[globalKey] = Slot,\r\n enumerable: false,\r\n writable: false,\r\n configurable: false,\r\n });\r\n }\r\n finally {\r\n return Slot;\r\n }\r\n}();\n\nvar bind = Slot.bind, noContext = Slot.noContext;\r\nfunction setTimeoutWithContext(callback, delay) {\r\n return setTimeout(bind(callback), delay);\r\n}\r\n// Turn any generator function into an async function (using yield instead\r\n// of await), with context automatically preserved across yields.\r\nfunction asyncFromGen(genFn) {\r\n return function () {\r\n var gen = genFn.apply(this, arguments);\r\n var boundNext = bind(gen.next);\r\n var boundThrow = bind(gen.throw);\r\n return new Promise(function (resolve, reject) {\r\n function invoke(method, argument) {\r\n try {\r\n var result = method.call(gen, argument);\r\n }\r\n catch (error) {\r\n return reject(error);\r\n }\r\n var next = result.done ? resolve : invokeNext;\r\n if (isPromiseLike(result.value)) {\r\n result.value.then(next, result.done ? reject : invokeThrow);\r\n }\r\n else {\r\n next(result.value);\r\n }\r\n }\r\n var invokeNext = function (value) { return invoke(boundNext, value); };\r\n var invokeThrow = function (error) { return invoke(boundThrow, error); };\r\n invokeNext();\r\n });\r\n };\r\n}\r\nfunction isPromiseLike(value) {\r\n return value && typeof value.then === \"function\";\r\n}\r\n// If you use the fibers npm package to implement coroutines in Node.js,\r\n// you should call this function at least once to ensure context management\r\n// remains coherent across any yields.\r\nvar wrappedFibers = [];\r\nfunction wrapYieldingFiberMethods(Fiber) {\r\n // There can be only one implementation of Fiber per process, so this array\r\n // should never grow longer than one element.\r\n if (wrappedFibers.indexOf(Fiber) < 0) {\r\n var wrap = function (obj, method) {\r\n var fn = obj[method];\r\n obj[method] = function () {\r\n return noContext(fn, arguments, this);\r\n };\r\n };\r\n // These methods can yield, according to\r\n // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100\r\n wrap(Fiber, \"yield\");\r\n wrap(Fiber.prototype, \"run\");\r\n wrap(Fiber.prototype, \"throwInto\");\r\n wrappedFibers.push(Fiber);\r\n }\r\n return Fiber;\r\n}\n\nexport { Slot, asyncFromGen, bind, noContext, setTimeoutWithContext as setTimeout, wrapYieldingFiberMethods };\n//# sourceMappingURL=context.esm.js.map\n","export default function getMetaContent(metaName) {\n const metaElement = document.querySelector(`meta[name='${metaName}']`);\n\n if (metaElement) return metaElement.getAttribute('content');\n\n return '';\n}\n"],"sourceRoot":""}