@cedarjs/web 5.0.3 → 5.0.4-next.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/apollo/ApolloProviderWithFetchConfig.d.ts +15 -0
  2. package/dist/apollo/ApolloProviderWithFetchConfig.d.ts.map +1 -0
  3. package/dist/apollo/ApolloProviderWithFetchConfig.js +134 -0
  4. package/dist/apollo/CedarApolloProvider.d.ts +14 -0
  5. package/dist/apollo/CedarApolloProvider.d.ts.map +1 -0
  6. package/dist/apollo/CedarApolloProvider.js +35 -0
  7. package/dist/apollo/ErrorBoundary.d.ts +13 -0
  8. package/dist/apollo/ErrorBoundary.d.ts.map +1 -0
  9. package/dist/apollo/ErrorBoundary.js +13 -0
  10. package/dist/{cjs/apollo/suspense.d.ts → apollo/apolloLinkTypes.d.ts} +22 -22
  11. package/dist/apollo/apolloLinkTypes.d.ts.map +1 -0
  12. package/dist/apollo/fragmentRegistry.d.ts +25 -0
  13. package/dist/apollo/fragmentRegistry.d.ts.map +1 -1
  14. package/dist/apollo/fragmentRegistry.js +19 -1
  15. package/dist/apollo/index.d.ts +50 -70
  16. package/dist/apollo/index.d.ts.map +1 -1
  17. package/dist/apollo/index.js +2 -184
  18. package/dist/apollo/suspense.d.ts +16 -7
  19. package/dist/apollo/suspense.d.ts.map +1 -1
  20. package/dist/apollo/suspense.js +9 -26
  21. package/dist/bins/cedar.js +14 -0
  22. package/dist/bins/cfw.js +14 -0
  23. package/dist/bins/cross-env.js +8 -0
  24. package/dist/bins/msw.js +6 -0
  25. package/dist/bins/redwood.js +14 -0
  26. package/dist/bins/storybook.js +27 -0
  27. package/dist/bins/tsc.js +8 -0
  28. package/dist/bundled/apollo-upload-client.js +2899 -1
  29. package/dist/components/FetchConfigProvider.d.ts +3 -2
  30. package/dist/components/FetchConfigProvider.d.ts.map +1 -1
  31. package/dist/components/cell/CellErrorBoundary.d.ts +3 -2
  32. package/dist/components/cell/CellErrorBoundary.d.ts.map +1 -1
  33. package/dist/components/cell/cellTypes.d.ts +17 -4
  34. package/dist/components/cell/cellTypes.d.ts.map +1 -1
  35. package/dist/components/cell/createCell.d.ts +1 -7
  36. package/dist/components/cell/createCell.d.ts.map +1 -1
  37. package/dist/components/cell/createCell.js +22 -3
  38. package/dist/components/cell/createFragmentCell.d.ts +19 -0
  39. package/dist/components/cell/createFragmentCell.d.ts.map +1 -0
  40. package/dist/components/cell/createFragmentCell.js +73 -0
  41. package/dist/components/cell/createSuspendingCell.d.ts.map +1 -1
  42. package/dist/components/cell/createSuspendingCell.js +12 -3
  43. package/dist/global.web-auto-imports.d.ts +0 -16
  44. package/dist/global.web-auto-imports.d.ts.map +1 -1
  45. package/dist/index.d.ts +5 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +5 -3
  48. package/package.json +48 -106
  49. package/dist/apollo/typeOverride.d.ts +0 -21
  50. package/dist/apollo/typeOverride.d.ts.map +0 -1
  51. package/dist/cjs/apollo/fragmentRegistry.d.ts +0 -43
  52. package/dist/cjs/apollo/fragmentRegistry.d.ts.map +0 -1
  53. package/dist/cjs/apollo/fragmentRegistry.js +0 -75
  54. package/dist/cjs/apollo/index.d.ts +0 -76
  55. package/dist/cjs/apollo/index.d.ts.map +0 -1
  56. package/dist/cjs/apollo/index.js +0 -218
  57. package/dist/cjs/apollo/links.d.ts +0 -27
  58. package/dist/cjs/apollo/links.d.ts.map +0 -1
  59. package/dist/cjs/apollo/links.js +0 -122
  60. package/dist/cjs/apollo/sseLink.d.ts +0 -29
  61. package/dist/cjs/apollo/sseLink.d.ts.map +0 -1
  62. package/dist/cjs/apollo/sseLink.js +0 -120
  63. package/dist/cjs/apollo/suspense.d.ts.map +0 -1
  64. package/dist/cjs/apollo/suspense.js +0 -127
  65. package/dist/cjs/apollo/typeOverride.d.ts +0 -21
  66. package/dist/cjs/apollo/typeOverride.d.ts.map +0 -1
  67. package/dist/cjs/apollo/typeOverride.js +0 -16
  68. package/dist/cjs/apollo/useCache.d.ts +0 -22
  69. package/dist/cjs/apollo/useCache.d.ts.map +0 -1
  70. package/dist/cjs/apollo/useCache.js +0 -49
  71. package/dist/cjs/bins/cedar.d.ts +0 -9
  72. package/dist/cjs/bins/cedar.d.ts.map +0 -1
  73. package/dist/cjs/bins/cedar.js +0 -36
  74. package/dist/cjs/bins/cfw.d.ts +0 -3
  75. package/dist/cjs/bins/cfw.d.ts.map +0 -1
  76. package/dist/cjs/bins/cfw.js +0 -36
  77. package/dist/cjs/bins/cross-env.d.ts +0 -3
  78. package/dist/cjs/bins/cross-env.d.ts.map +0 -1
  79. package/dist/cjs/bins/cross-env.js +0 -30
  80. package/dist/cjs/bins/msw.d.ts +0 -3
  81. package/dist/cjs/bins/msw.d.ts.map +0 -1
  82. package/dist/cjs/bins/msw.js +0 -28
  83. package/dist/cjs/bins/redwood.d.ts +0 -9
  84. package/dist/cjs/bins/redwood.d.ts.map +0 -1
  85. package/dist/cjs/bins/redwood.js +0 -36
  86. package/dist/cjs/bins/storybook.d.ts +0 -3
  87. package/dist/cjs/bins/storybook.d.ts.map +0 -1
  88. package/dist/cjs/bins/storybook.js +0 -49
  89. package/dist/cjs/bins/tsc.d.ts +0 -3
  90. package/dist/cjs/bins/tsc.d.ts.map +0 -1
  91. package/dist/cjs/bins/tsc.js +0 -30
  92. package/dist/cjs/bundled/apollo-upload-client.d.ts +0 -3
  93. package/dist/cjs/bundled/apollo-upload-client.d.ts.map +0 -1
  94. package/dist/cjs/bundled/apollo-upload-client.js +0 -2925
  95. package/dist/cjs/components/DevFatalErrorPage.d.ts +0 -21
  96. package/dist/cjs/components/DevFatalErrorPage.d.ts.map +0 -1
  97. package/dist/cjs/components/DevFatalErrorPage.js +0 -552
  98. package/dist/cjs/components/FatalErrorBoundary.d.ts +0 -24
  99. package/dist/cjs/components/FatalErrorBoundary.d.ts.map +0 -1
  100. package/dist/cjs/components/FatalErrorBoundary.js +0 -63
  101. package/dist/cjs/components/FetchConfigProvider.d.ts +0 -25
  102. package/dist/cjs/components/FetchConfigProvider.d.ts.map +0 -1
  103. package/dist/cjs/components/FetchConfigProvider.js +0 -80
  104. package/dist/cjs/components/GraphQLHooksProvider.d.ts +0 -45
  105. package/dist/cjs/components/GraphQLHooksProvider.d.ts.map +0 -1
  106. package/dist/cjs/components/GraphQLHooksProvider.js +0 -135
  107. package/dist/cjs/components/MetaTags.d.ts +0 -52
  108. package/dist/cjs/components/MetaTags.d.ts.map +0 -1
  109. package/dist/cjs/components/MetaTags.js +0 -68
  110. package/dist/cjs/components/Metadata.d.ts +0 -9
  111. package/dist/cjs/components/Metadata.d.ts.map +0 -1
  112. package/dist/cjs/components/Metadata.js +0 -94
  113. package/dist/cjs/components/PortalHead.d.ts +0 -4
  114. package/dist/cjs/components/PortalHead.d.ts.map +0 -1
  115. package/dist/cjs/components/PortalHead.js +0 -59
  116. package/dist/cjs/components/RedwoodProvider.d.ts +0 -9
  117. package/dist/cjs/components/RedwoodProvider.d.ts.map +0 -1
  118. package/dist/cjs/components/RedwoodProvider.js +0 -57
  119. package/dist/cjs/components/ServerInject.d.ts +0 -26
  120. package/dist/cjs/components/ServerInject.d.ts.map +0 -1
  121. package/dist/cjs/components/ServerInject.js +0 -75
  122. package/dist/cjs/components/cell/CellCacheContext.d.ts +0 -20
  123. package/dist/cjs/components/cell/CellCacheContext.d.ts.map +0 -1
  124. package/dist/cjs/components/cell/CellCacheContext.js +0 -53
  125. package/dist/cjs/components/cell/CellErrorBoundary.d.ts +0 -25
  126. package/dist/cjs/components/cell/CellErrorBoundary.d.ts.map +0 -1
  127. package/dist/cjs/components/cell/CellErrorBoundary.js +0 -66
  128. package/dist/cjs/components/cell/cellTypes.d.ts +0 -152
  129. package/dist/cjs/components/cell/cellTypes.d.ts.map +0 -1
  130. package/dist/cjs/components/cell/cellTypes.js +0 -16
  131. package/dist/cjs/components/cell/createCell.d.ts +0 -10
  132. package/dist/cjs/components/cell/createCell.d.ts.map +0 -1
  133. package/dist/cjs/components/cell/createCell.js +0 -165
  134. package/dist/cjs/components/cell/createCell.test.js +0 -351
  135. package/dist/cjs/components/cell/createServerCell.d.ts +0 -15
  136. package/dist/cjs/components/cell/createServerCell.d.ts.map +0 -1
  137. package/dist/cjs/components/cell/createServerCell.js +0 -91
  138. package/dist/cjs/components/cell/createSuspendingCell.d.ts +0 -11
  139. package/dist/cjs/components/cell/createSuspendingCell.d.ts.map +0 -1
  140. package/dist/cjs/components/cell/createSuspendingCell.js +0 -152
  141. package/dist/cjs/components/cell/createSuspendingCell.test.js +0 -115
  142. package/dist/cjs/components/cell/isCellEmpty.d.ts +0 -41
  143. package/dist/cjs/components/cell/isCellEmpty.d.ts.map +0 -1
  144. package/dist/cjs/components/cell/isCellEmpty.js +0 -35
  145. package/dist/cjs/components/htmlTags.d.ts +0 -52
  146. package/dist/cjs/components/htmlTags.d.ts.map +0 -1
  147. package/dist/cjs/components/htmlTags.js +0 -88
  148. package/dist/cjs/config.d.ts +0 -2
  149. package/dist/cjs/config.d.ts.map +0 -1
  150. package/dist/cjs/config.js +0 -6
  151. package/dist/cjs/global.web-auto-imports.d.ts +0 -30
  152. package/dist/cjs/global.web-auto-imports.d.ts.map +0 -1
  153. package/dist/cjs/global.web-auto-imports.js +0 -16
  154. package/dist/cjs/graphql.d.ts +0 -23
  155. package/dist/cjs/graphql.d.ts.map +0 -1
  156. package/dist/cjs/graphql.js +0 -36
  157. package/dist/cjs/index.d.ts +0 -19
  158. package/dist/cjs/index.d.ts.map +0 -1
  159. package/dist/cjs/index.js +0 -69
  160. package/dist/cjs/package.json +0 -1
  161. package/dist/cjs/routeHooks.types.d.ts +0 -12
  162. package/dist/cjs/routeHooks.types.d.ts.map +0 -1
  163. package/dist/cjs/routeHooks.types.js +0 -16
  164. package/dist/cjs/server/MiddlewareRequest.d.ts +0 -28
  165. package/dist/cjs/server/MiddlewareRequest.d.ts.map +0 -1
  166. package/dist/cjs/server/MiddlewareRequest.js +0 -71
  167. package/dist/cjs/server/MiddlewareResponse.d.ts +0 -44
  168. package/dist/cjs/server/MiddlewareResponse.d.ts.map +0 -1
  169. package/dist/cjs/server/MiddlewareResponse.js +0 -130
  170. package/dist/cjs/server/middleware.d.ts +0 -17
  171. package/dist/cjs/server/middleware.d.ts.map +0 -1
  172. package/dist/cjs/server/middleware.js +0 -24
  173. package/dist/cjs/server/request.d.ts +0 -2
  174. package/dist/cjs/server/request.d.ts.map +0 -1
  175. package/dist/cjs/server/request.js +0 -34
  176. package/dist/cjs/streamUtils/useDocumentReady.d.ts +0 -11
  177. package/dist/cjs/streamUtils/useDocumentReady.d.ts.map +0 -1
  178. package/dist/cjs/streamUtils/useDocumentReady.js +0 -41
  179. package/dist/cjs/toast/index.d.ts +0 -3
  180. package/dist/cjs/toast/index.d.ts.map +0 -1
  181. package/dist/cjs/toast/index.js +0 -41
  182. package/dist/components/GraphQLHooksProvider.d.ts +0 -45
  183. package/dist/components/GraphQLHooksProvider.d.ts.map +0 -1
  184. package/dist/components/GraphQLHooksProvider.js +0 -94
  185. package/dist/components/cell/createCell.test.js +0 -328
  186. package/dist/components/cell/createSuspendingCell.test.js +0 -92
  187. package/dist/package.json +0 -1
  188. /package/dist/apollo/{typeOverride.js → apolloLinkTypes.js} +0 -0
@@ -1,2925 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/bundled/apollo-upload-client.ts
21
- var apollo_upload_client_exports = {};
22
- __export(apollo_upload_client_exports, {
23
- createUploadLink: () => createUploadLink
24
- });
25
- module.exports = __toCommonJS(apollo_upload_client_exports);
26
-
27
- // ../../node_modules/tslib/tslib.es6.mjs
28
- var extendStatics = function(d, b) {
29
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
30
- d2.__proto__ = b2;
31
- } || function(d2, b2) {
32
- for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
33
- };
34
- return extendStatics(d, b);
35
- };
36
- function __extends(d, b) {
37
- if (typeof b !== "function" && b !== null)
38
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39
- extendStatics(d, b);
40
- function __() {
41
- this.constructor = d;
42
- }
43
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44
- }
45
- var __assign = function() {
46
- __assign = Object.assign || function __assign2(t) {
47
- for (var s, i = 1, n = arguments.length; i < n; i++) {
48
- s = arguments[i];
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
50
- }
51
- return t;
52
- };
53
- return __assign.apply(this, arguments);
54
- };
55
- function __spreadArray(to, from, pack) {
56
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
57
- if (ar || !(i in from)) {
58
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
59
- ar[i] = from[i];
60
- }
61
- }
62
- return to.concat(ar || Array.prototype.slice.call(from));
63
- }
64
-
65
- // ../../node_modules/ts-invariant/lib/invariant.js
66
- var genericMessage = "Invariant Violation";
67
- var _a = Object.setPrototypeOf;
68
- var setPrototypeOf = _a === void 0 ? function(obj, proto) {
69
- obj.__proto__ = proto;
70
- return obj;
71
- } : _a;
72
- var InvariantError = (
73
- /** @class */
74
- (function(_super) {
75
- __extends(InvariantError2, _super);
76
- function InvariantError2(message) {
77
- if (message === void 0) {
78
- message = genericMessage;
79
- }
80
- var _this = _super.call(this, typeof message === "number" ? genericMessage + ": " + message + " (see https://github.com/apollographql/invariant-packages)" : message) || this;
81
- _this.framesToPop = 1;
82
- _this.name = genericMessage;
83
- setPrototypeOf(_this, InvariantError2.prototype);
84
- return _this;
85
- }
86
- return InvariantError2;
87
- })(Error)
88
- );
89
- function invariant(condition, message) {
90
- if (!condition) {
91
- throw new InvariantError(message);
92
- }
93
- }
94
- var verbosityLevels = ["debug", "log", "warn", "error", "silent"];
95
- var verbosityLevel = verbosityLevels.indexOf("log");
96
- function wrapConsoleMethod(name) {
97
- return function() {
98
- if (verbosityLevels.indexOf(name) >= verbosityLevel) {
99
- var method = console[name] || console.log;
100
- return method.apply(console, arguments);
101
- }
102
- };
103
- }
104
- (function(invariant4) {
105
- invariant4.debug = wrapConsoleMethod("debug");
106
- invariant4.log = wrapConsoleMethod("log");
107
- invariant4.warn = wrapConsoleMethod("warn");
108
- invariant4.error = wrapConsoleMethod("error");
109
- })(invariant || (invariant = {}));
110
-
111
- // ../../node_modules/@apollo/client/version.js
112
- var version = "3.14.1";
113
-
114
- // ../../node_modules/@apollo/client/utilities/globals/maybe.js
115
- function maybe(thunk) {
116
- try {
117
- return thunk();
118
- } catch (_a3) {
119
- }
120
- }
121
-
122
- // ../../node_modules/@apollo/client/utilities/globals/global.js
123
- var global_default = maybe(function() {
124
- return globalThis;
125
- }) || maybe(function() {
126
- return window;
127
- }) || maybe(function() {
128
- return self;
129
- }) || maybe(function() {
130
- return global;
131
- }) || // We don't expect the Function constructor ever to be invoked at runtime, as
132
- // long as at least one of globalThis, window, self, or global is defined, so
133
- // we are under no obligation to make it easy for static analysis tools to
134
- // detect syntactic usage of the Function constructor. If you think you can
135
- // improve your static analysis to detect this obfuscation, think again. This
136
- // is an arms race you cannot win, at least not in JavaScript.
137
- maybe(function() {
138
- return maybe.constructor("return this")();
139
- });
140
-
141
- // ../../node_modules/@apollo/client/utilities/common/makeUniqueId.js
142
- var prefixCounts = /* @__PURE__ */ new Map();
143
- function makeUniqueId(prefix) {
144
- var count = prefixCounts.get(prefix) || 1;
145
- prefixCounts.set(prefix, count + 1);
146
- return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));
147
- }
148
-
149
- // ../../node_modules/@apollo/client/utilities/common/stringifyForDisplay.js
150
- function stringifyForDisplay(value, space) {
151
- if (space === void 0) {
152
- space = 0;
153
- }
154
- var undefId = makeUniqueId("stringifyForDisplay");
155
- return JSON.stringify(value, function(key, value2) {
156
- return value2 === void 0 ? undefId : value2;
157
- }, space).split(JSON.stringify(undefId)).join("<undefined>");
158
- }
159
-
160
- // ../../node_modules/@apollo/client/utilities/globals/invariantWrappers.js
161
- function wrap(fn) {
162
- return function(message) {
163
- var args = [];
164
- for (var _i = 1; _i < arguments.length; _i++) {
165
- args[_i - 1] = arguments[_i];
166
- }
167
- if (typeof message === "number") {
168
- var arg0 = message;
169
- message = getHandledErrorMsg(arg0);
170
- if (!message) {
171
- message = getFallbackErrorMsg(arg0, args);
172
- args = [];
173
- }
174
- }
175
- fn.apply(void 0, [message].concat(args));
176
- };
177
- }
178
- var invariant2 = Object.assign(function invariant3(condition, message) {
179
- var args = [];
180
- for (var _i = 2; _i < arguments.length; _i++) {
181
- args[_i - 2] = arguments[_i];
182
- }
183
- if (!condition) {
184
- invariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));
185
- }
186
- }, {
187
- debug: wrap(invariant.debug),
188
- log: wrap(invariant.log),
189
- warn: wrap(invariant.warn),
190
- error: wrap(invariant.error)
191
- });
192
- function newInvariantError(message) {
193
- var optionalParams = [];
194
- for (var _i = 1; _i < arguments.length; _i++) {
195
- optionalParams[_i - 1] = arguments[_i];
196
- }
197
- return new InvariantError(getHandledErrorMsg(message, optionalParams) || getFallbackErrorMsg(message, optionalParams));
198
- }
199
- var ApolloErrorMessageHandler = /* @__PURE__ */ Symbol.for("ApolloErrorMessageHandler_" + version);
200
- function stringify(arg) {
201
- if (typeof arg == "string") {
202
- return arg;
203
- }
204
- try {
205
- return stringifyForDisplay(arg, 2).slice(0, 1e3);
206
- } catch (_a3) {
207
- return "<non-serializable>";
208
- }
209
- }
210
- function getHandledErrorMsg(message, messageArgs) {
211
- if (messageArgs === void 0) {
212
- messageArgs = [];
213
- }
214
- if (!message)
215
- return;
216
- return global_default[ApolloErrorMessageHandler] && global_default[ApolloErrorMessageHandler](message, messageArgs.map(stringify));
217
- }
218
- function getFallbackErrorMsg(message, messageArgs) {
219
- if (messageArgs === void 0) {
220
- messageArgs = [];
221
- }
222
- if (!message)
223
- return;
224
- return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
225
- version,
226
- message,
227
- args: messageArgs.map(stringify)
228
- })));
229
- }
230
-
231
- // ../../node_modules/@apollo/client/utilities/globals/index.js
232
- var DEV = globalThis.__DEV__ !== false;
233
-
234
- // ../../node_modules/graphql/jsutils/devAssert.mjs
235
- function devAssert(condition, message) {
236
- const booleanCondition = Boolean(condition);
237
- if (!booleanCondition) {
238
- throw new Error(message);
239
- }
240
- }
241
-
242
- // ../../node_modules/graphql/language/ast.mjs
243
- var QueryDocumentKeys = {
244
- Name: [],
245
- Document: ["definitions"],
246
- OperationDefinition: [
247
- "description",
248
- "name",
249
- "variableDefinitions",
250
- "directives",
251
- "selectionSet"
252
- ],
253
- VariableDefinition: [
254
- "description",
255
- "variable",
256
- "type",
257
- "defaultValue",
258
- "directives"
259
- ],
260
- Variable: ["name"],
261
- SelectionSet: ["selections"],
262
- Field: ["alias", "name", "arguments", "directives", "selectionSet"],
263
- Argument: ["name", "value"],
264
- FragmentSpread: ["name", "directives"],
265
- InlineFragment: ["typeCondition", "directives", "selectionSet"],
266
- FragmentDefinition: [
267
- "description",
268
- "name",
269
- // Note: fragment variable definitions are deprecated and will removed in v17.0.0
270
- "variableDefinitions",
271
- "typeCondition",
272
- "directives",
273
- "selectionSet"
274
- ],
275
- IntValue: [],
276
- FloatValue: [],
277
- StringValue: [],
278
- BooleanValue: [],
279
- NullValue: [],
280
- EnumValue: [],
281
- ListValue: ["values"],
282
- ObjectValue: ["fields"],
283
- ObjectField: ["name", "value"],
284
- Directive: ["name", "arguments"],
285
- NamedType: ["name"],
286
- ListType: ["type"],
287
- NonNullType: ["type"],
288
- SchemaDefinition: ["description", "directives", "operationTypes"],
289
- OperationTypeDefinition: ["type"],
290
- ScalarTypeDefinition: ["description", "name", "directives"],
291
- ObjectTypeDefinition: [
292
- "description",
293
- "name",
294
- "interfaces",
295
- "directives",
296
- "fields"
297
- ],
298
- FieldDefinition: ["description", "name", "arguments", "type", "directives"],
299
- InputValueDefinition: [
300
- "description",
301
- "name",
302
- "type",
303
- "defaultValue",
304
- "directives"
305
- ],
306
- InterfaceTypeDefinition: [
307
- "description",
308
- "name",
309
- "interfaces",
310
- "directives",
311
- "fields"
312
- ],
313
- UnionTypeDefinition: ["description", "name", "directives", "types"],
314
- EnumTypeDefinition: ["description", "name", "directives", "values"],
315
- EnumValueDefinition: ["description", "name", "directives"],
316
- InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
317
- DirectiveDefinition: [
318
- "description",
319
- "name",
320
- "arguments",
321
- "directives",
322
- "locations"
323
- ],
324
- SchemaExtension: ["directives", "operationTypes"],
325
- DirectiveExtension: ["name", "directives"],
326
- ScalarTypeExtension: ["name", "directives"],
327
- ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
328
- InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
329
- UnionTypeExtension: ["name", "directives", "types"],
330
- EnumTypeExtension: ["name", "directives", "values"],
331
- InputObjectTypeExtension: ["name", "directives", "fields"],
332
- TypeCoordinate: ["name"],
333
- MemberCoordinate: ["name", "memberName"],
334
- ArgumentCoordinate: ["name", "fieldName", "argumentName"],
335
- DirectiveCoordinate: ["name"],
336
- DirectiveArgumentCoordinate: ["name", "argumentName"]
337
- };
338
- var kindValues = new Set(Object.keys(QueryDocumentKeys));
339
- function isNode(maybeNode) {
340
- const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
341
- return typeof maybeKind === "string" && kindValues.has(maybeKind);
342
- }
343
- var OperationTypeNode;
344
- (function(OperationTypeNode2) {
345
- OperationTypeNode2["QUERY"] = "query";
346
- OperationTypeNode2["MUTATION"] = "mutation";
347
- OperationTypeNode2["SUBSCRIPTION"] = "subscription";
348
- })(OperationTypeNode || (OperationTypeNode = {}));
349
-
350
- // ../../node_modules/graphql/language/kinds.mjs
351
- var Kind;
352
- (function(Kind2) {
353
- Kind2["NAME"] = "Name";
354
- Kind2["DOCUMENT"] = "Document";
355
- Kind2["OPERATION_DEFINITION"] = "OperationDefinition";
356
- Kind2["VARIABLE_DEFINITION"] = "VariableDefinition";
357
- Kind2["SELECTION_SET"] = "SelectionSet";
358
- Kind2["FIELD"] = "Field";
359
- Kind2["ARGUMENT"] = "Argument";
360
- Kind2["FRAGMENT_SPREAD"] = "FragmentSpread";
361
- Kind2["INLINE_FRAGMENT"] = "InlineFragment";
362
- Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition";
363
- Kind2["VARIABLE"] = "Variable";
364
- Kind2["INT"] = "IntValue";
365
- Kind2["FLOAT"] = "FloatValue";
366
- Kind2["STRING"] = "StringValue";
367
- Kind2["BOOLEAN"] = "BooleanValue";
368
- Kind2["NULL"] = "NullValue";
369
- Kind2["ENUM"] = "EnumValue";
370
- Kind2["LIST"] = "ListValue";
371
- Kind2["OBJECT"] = "ObjectValue";
372
- Kind2["OBJECT_FIELD"] = "ObjectField";
373
- Kind2["DIRECTIVE"] = "Directive";
374
- Kind2["NAMED_TYPE"] = "NamedType";
375
- Kind2["LIST_TYPE"] = "ListType";
376
- Kind2["NON_NULL_TYPE"] = "NonNullType";
377
- Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition";
378
- Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition";
379
- Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition";
380
- Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition";
381
- Kind2["FIELD_DEFINITION"] = "FieldDefinition";
382
- Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition";
383
- Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition";
384
- Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition";
385
- Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition";
386
- Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition";
387
- Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition";
388
- Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition";
389
- Kind2["SCHEMA_EXTENSION"] = "SchemaExtension";
390
- Kind2["DIRECTIVE_EXTENSION"] = "DirectiveExtension";
391
- Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension";
392
- Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension";
393
- Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension";
394
- Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension";
395
- Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
396
- Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
397
- Kind2["TYPE_COORDINATE"] = "TypeCoordinate";
398
- Kind2["MEMBER_COORDINATE"] = "MemberCoordinate";
399
- Kind2["ARGUMENT_COORDINATE"] = "ArgumentCoordinate";
400
- Kind2["DIRECTIVE_COORDINATE"] = "DirectiveCoordinate";
401
- Kind2["DIRECTIVE_ARGUMENT_COORDINATE"] = "DirectiveArgumentCoordinate";
402
- })(Kind || (Kind = {}));
403
-
404
- // ../../node_modules/graphql/language/characterClasses.mjs
405
- function isWhiteSpace(code) {
406
- return code === 9 || code === 32;
407
- }
408
-
409
- // ../../node_modules/graphql/language/blockString.mjs
410
- function printBlockString(value, options) {
411
- const escapedValue = value.replace(/"""/g, '\\"""');
412
- const lines = escapedValue.split(/\r\n|[\n\r]/g);
413
- const isSingleLine = lines.length === 1;
414
- const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0)));
415
- const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
416
- const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
417
- const hasTrailingSlash = value.endsWith("\\");
418
- const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
419
- const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability
420
- (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
421
- let result2 = "";
422
- const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));
423
- if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) {
424
- result2 += "\n";
425
- }
426
- result2 += escapedValue;
427
- if (printAsMultipleLines || forceTrailingNewline) {
428
- result2 += "\n";
429
- }
430
- return '"""' + result2 + '"""';
431
- }
432
-
433
- // ../../node_modules/graphql/jsutils/inspect.mjs
434
- var MAX_ARRAY_LENGTH = 10;
435
- var MAX_RECURSIVE_DEPTH = 2;
436
- function inspect(value) {
437
- return formatValue(value, []);
438
- }
439
- function formatValue(value, seenValues) {
440
- switch (typeof value) {
441
- case "string":
442
- return JSON.stringify(value);
443
- case "function":
444
- return value.name ? `[function ${value.name}]` : "[function]";
445
- case "object":
446
- return formatObjectValue(value, seenValues);
447
- default:
448
- return String(value);
449
- }
450
- }
451
- function formatObjectValue(value, previouslySeenValues) {
452
- if (value === null) {
453
- return "null";
454
- }
455
- if (previouslySeenValues.includes(value)) {
456
- return "[Circular]";
457
- }
458
- const seenValues = [...previouslySeenValues, value];
459
- if (isJSONable(value)) {
460
- const jsonValue = value.toJSON();
461
- if (jsonValue !== value) {
462
- return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues);
463
- }
464
- } else if (Array.isArray(value)) {
465
- return formatArray(value, seenValues);
466
- }
467
- return formatObject(value, seenValues);
468
- }
469
- function isJSONable(value) {
470
- return typeof value.toJSON === "function";
471
- }
472
- function formatObject(object, seenValues) {
473
- const entries = Object.entries(object);
474
- if (entries.length === 0) {
475
- return "{}";
476
- }
477
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
478
- return "[" + getObjectTag(object) + "]";
479
- }
480
- const properties = entries.map(
481
- ([key, value]) => key + ": " + formatValue(value, seenValues)
482
- );
483
- return "{ " + properties.join(", ") + " }";
484
- }
485
- function formatArray(array, seenValues) {
486
- if (array.length === 0) {
487
- return "[]";
488
- }
489
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
490
- return "[Array]";
491
- }
492
- const len = Math.min(MAX_ARRAY_LENGTH, array.length);
493
- const remaining = array.length - len;
494
- const items = [];
495
- for (let i = 0; i < len; ++i) {
496
- items.push(formatValue(array[i], seenValues));
497
- }
498
- if (remaining === 1) {
499
- items.push("... 1 more item");
500
- } else if (remaining > 1) {
501
- items.push(`... ${remaining} more items`);
502
- }
503
- return "[" + items.join(", ") + "]";
504
- }
505
- function getObjectTag(object) {
506
- const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
507
- if (tag === "Object" && typeof object.constructor === "function") {
508
- const name = object.constructor.name;
509
- if (typeof name === "string" && name !== "") {
510
- return name;
511
- }
512
- }
513
- return tag;
514
- }
515
-
516
- // ../../node_modules/graphql/language/printString.mjs
517
- function printString(str) {
518
- return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
519
- }
520
- var escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
521
- function escapedReplacer(str) {
522
- return escapeSequences[str.charCodeAt(0)];
523
- }
524
- var escapeSequences = [
525
- "\\u0000",
526
- "\\u0001",
527
- "\\u0002",
528
- "\\u0003",
529
- "\\u0004",
530
- "\\u0005",
531
- "\\u0006",
532
- "\\u0007",
533
- "\\b",
534
- "\\t",
535
- "\\n",
536
- "\\u000B",
537
- "\\f",
538
- "\\r",
539
- "\\u000E",
540
- "\\u000F",
541
- "\\u0010",
542
- "\\u0011",
543
- "\\u0012",
544
- "\\u0013",
545
- "\\u0014",
546
- "\\u0015",
547
- "\\u0016",
548
- "\\u0017",
549
- "\\u0018",
550
- "\\u0019",
551
- "\\u001A",
552
- "\\u001B",
553
- "\\u001C",
554
- "\\u001D",
555
- "\\u001E",
556
- "\\u001F",
557
- "",
558
- "",
559
- '\\"',
560
- "",
561
- "",
562
- "",
563
- "",
564
- "",
565
- "",
566
- "",
567
- "",
568
- "",
569
- "",
570
- "",
571
- "",
572
- "",
573
- // 2F
574
- "",
575
- "",
576
- "",
577
- "",
578
- "",
579
- "",
580
- "",
581
- "",
582
- "",
583
- "",
584
- "",
585
- "",
586
- "",
587
- "",
588
- "",
589
- "",
590
- // 3F
591
- "",
592
- "",
593
- "",
594
- "",
595
- "",
596
- "",
597
- "",
598
- "",
599
- "",
600
- "",
601
- "",
602
- "",
603
- "",
604
- "",
605
- "",
606
- "",
607
- // 4F
608
- "",
609
- "",
610
- "",
611
- "",
612
- "",
613
- "",
614
- "",
615
- "",
616
- "",
617
- "",
618
- "",
619
- "",
620
- "\\\\",
621
- "",
622
- "",
623
- "",
624
- // 5F
625
- "",
626
- "",
627
- "",
628
- "",
629
- "",
630
- "",
631
- "",
632
- "",
633
- "",
634
- "",
635
- "",
636
- "",
637
- "",
638
- "",
639
- "",
640
- "",
641
- // 6F
642
- "",
643
- "",
644
- "",
645
- "",
646
- "",
647
- "",
648
- "",
649
- "",
650
- "",
651
- "",
652
- "",
653
- "",
654
- "",
655
- "",
656
- "",
657
- "\\u007F",
658
- "\\u0080",
659
- "\\u0081",
660
- "\\u0082",
661
- "\\u0083",
662
- "\\u0084",
663
- "\\u0085",
664
- "\\u0086",
665
- "\\u0087",
666
- "\\u0088",
667
- "\\u0089",
668
- "\\u008A",
669
- "\\u008B",
670
- "\\u008C",
671
- "\\u008D",
672
- "\\u008E",
673
- "\\u008F",
674
- "\\u0090",
675
- "\\u0091",
676
- "\\u0092",
677
- "\\u0093",
678
- "\\u0094",
679
- "\\u0095",
680
- "\\u0096",
681
- "\\u0097",
682
- "\\u0098",
683
- "\\u0099",
684
- "\\u009A",
685
- "\\u009B",
686
- "\\u009C",
687
- "\\u009D",
688
- "\\u009E",
689
- "\\u009F"
690
- ];
691
-
692
- // ../../node_modules/graphql/language/visitor.mjs
693
- var BREAK = Object.freeze({});
694
- function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
695
- const enterLeaveMap = /* @__PURE__ */ new Map();
696
- for (const kind of Object.values(Kind)) {
697
- enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
698
- }
699
- let stack = void 0;
700
- let inArray = Array.isArray(root2);
701
- let keys = [root2];
702
- let index = -1;
703
- let edits = [];
704
- let node = root2;
705
- let key = void 0;
706
- let parent = void 0;
707
- const path = [];
708
- const ancestors = [];
709
- do {
710
- index++;
711
- const isLeaving = index === keys.length;
712
- const isEdited = isLeaving && edits.length !== 0;
713
- if (isLeaving) {
714
- key = ancestors.length === 0 ? void 0 : path[path.length - 1];
715
- node = parent;
716
- parent = ancestors.pop();
717
- if (isEdited) {
718
- if (inArray) {
719
- node = node.slice();
720
- let editOffset = 0;
721
- for (const [editKey, editValue] of edits) {
722
- const arrayKey = editKey - editOffset;
723
- if (editValue === null) {
724
- node.splice(arrayKey, 1);
725
- editOffset++;
726
- } else {
727
- node[arrayKey] = editValue;
728
- }
729
- }
730
- } else {
731
- node = { ...node };
732
- for (const [editKey, editValue] of edits) {
733
- node[editKey] = editValue;
734
- }
735
- }
736
- }
737
- index = stack.index;
738
- keys = stack.keys;
739
- edits = stack.edits;
740
- inArray = stack.inArray;
741
- stack = stack.prev;
742
- } else if (parent) {
743
- key = inArray ? index : keys[index];
744
- node = parent[key];
745
- if (node === null || node === void 0) {
746
- continue;
747
- }
748
- path.push(key);
749
- }
750
- let result2;
751
- if (!Array.isArray(node)) {
752
- var _enterLeaveMap$get, _enterLeaveMap$get2;
753
- isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);
754
- const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
755
- result2 = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
756
- if (result2 === BREAK) {
757
- break;
758
- }
759
- if (result2 === false) {
760
- if (!isLeaving) {
761
- path.pop();
762
- continue;
763
- }
764
- } else if (result2 !== void 0) {
765
- edits.push([key, result2]);
766
- if (!isLeaving) {
767
- if (isNode(result2)) {
768
- node = result2;
769
- } else {
770
- path.pop();
771
- continue;
772
- }
773
- }
774
- }
775
- }
776
- if (result2 === void 0 && isEdited) {
777
- edits.push([key, node]);
778
- }
779
- if (isLeaving) {
780
- path.pop();
781
- } else {
782
- var _node$kind;
783
- stack = {
784
- inArray,
785
- index,
786
- keys,
787
- edits,
788
- prev: stack
789
- };
790
- inArray = Array.isArray(node);
791
- keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
792
- index = -1;
793
- edits = [];
794
- if (parent) {
795
- ancestors.push(parent);
796
- }
797
- parent = node;
798
- }
799
- } while (stack !== void 0);
800
- if (edits.length !== 0) {
801
- return edits[edits.length - 1][1];
802
- }
803
- return root2;
804
- }
805
- function getEnterLeaveForKind(visitor, kind) {
806
- const kindVisitor = visitor[kind];
807
- if (typeof kindVisitor === "object") {
808
- return kindVisitor;
809
- } else if (typeof kindVisitor === "function") {
810
- return {
811
- enter: kindVisitor,
812
- leave: void 0
813
- };
814
- }
815
- return {
816
- enter: visitor.enter,
817
- leave: visitor.leave
818
- };
819
- }
820
-
821
- // ../../node_modules/graphql/language/printer.mjs
822
- function print(ast) {
823
- return visit(ast, printDocASTReducer);
824
- }
825
- var MAX_LINE_LENGTH = 80;
826
- var printDocASTReducer = {
827
- Name: {
828
- leave: (node) => node.value
829
- },
830
- Variable: {
831
- leave: (node) => "$" + node.name
832
- },
833
- // Document
834
- Document: {
835
- leave: (node) => join(node.definitions, "\n\n")
836
- },
837
- OperationDefinition: {
838
- leave(node) {
839
- const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap2("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap2("(", join(node.variableDefinitions, ", "), ")");
840
- const prefix = wrap2("", node.description, "\n") + join(
841
- [
842
- node.operation,
843
- join([node.name, varDefs]),
844
- join(node.directives, " ")
845
- ],
846
- " "
847
- );
848
- return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
849
- }
850
- },
851
- VariableDefinition: {
852
- leave: ({ variable, type, defaultValue, directives, description }) => wrap2("", description, "\n") + variable + ": " + type + wrap2(" = ", defaultValue) + wrap2(" ", join(directives, " "))
853
- },
854
- SelectionSet: {
855
- leave: ({ selections }) => block(selections)
856
- },
857
- Field: {
858
- leave({ alias, name, arguments: args, directives, selectionSet }) {
859
- const prefix = wrap2("", alias, ": ") + name;
860
- let argsLine = prefix + wrap2("(", join(args, ", "), ")");
861
- if (argsLine.length > MAX_LINE_LENGTH) {
862
- argsLine = prefix + wrap2("(\n", indent(join(args, "\n")), "\n)");
863
- }
864
- return join([argsLine, join(directives, " "), selectionSet], " ");
865
- }
866
- },
867
- Argument: {
868
- leave: ({ name, value }) => name + ": " + value
869
- },
870
- // Fragments
871
- FragmentSpread: {
872
- leave: ({ name, directives }) => "..." + name + wrap2(" ", join(directives, " "))
873
- },
874
- InlineFragment: {
875
- leave: ({ typeCondition, directives, selectionSet }) => join(
876
- [
877
- "...",
878
- wrap2("on ", typeCondition),
879
- join(directives, " "),
880
- selectionSet
881
- ],
882
- " "
883
- )
884
- },
885
- FragmentDefinition: {
886
- leave: ({
887
- name,
888
- typeCondition,
889
- variableDefinitions,
890
- directives,
891
- selectionSet,
892
- description
893
- }) => wrap2("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
894
- // or removed in the future.
895
- `fragment ${name}${wrap2("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join(directives, " "), " ")}` + selectionSet
896
- },
897
- // Value
898
- IntValue: {
899
- leave: ({ value }) => value
900
- },
901
- FloatValue: {
902
- leave: ({ value }) => value
903
- },
904
- StringValue: {
905
- leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value)
906
- },
907
- BooleanValue: {
908
- leave: ({ value }) => value ? "true" : "false"
909
- },
910
- NullValue: {
911
- leave: () => "null"
912
- },
913
- EnumValue: {
914
- leave: ({ value }) => value
915
- },
916
- ListValue: {
917
- leave: ({ values }) => "[" + join(values, ", ") + "]"
918
- },
919
- ObjectValue: {
920
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
921
- },
922
- ObjectField: {
923
- leave: ({ name, value }) => name + ": " + value
924
- },
925
- // Directive
926
- Directive: {
927
- leave: ({ name, arguments: args }) => "@" + name + wrap2("(", join(args, ", "), ")")
928
- },
929
- // Type
930
- NamedType: {
931
- leave: ({ name }) => name
932
- },
933
- ListType: {
934
- leave: ({ type }) => "[" + type + "]"
935
- },
936
- NonNullType: {
937
- leave: ({ type }) => type + "!"
938
- },
939
- // Type System Definitions
940
- SchemaDefinition: {
941
- leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
942
- },
943
- OperationTypeDefinition: {
944
- leave: ({ operation, type }) => operation + ": " + type
945
- },
946
- ScalarTypeDefinition: {
947
- leave: ({ description, name, directives }) => wrap2("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
948
- },
949
- ObjectTypeDefinition: {
950
- leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join(
951
- [
952
- "type",
953
- name,
954
- wrap2("implements ", join(interfaces, " & ")),
955
- join(directives, " "),
956
- block(fields)
957
- ],
958
- " "
959
- )
960
- },
961
- FieldDefinition: {
962
- leave: ({ description, name, arguments: args, type, directives }) => wrap2("", description, "\n") + name + (hasMultilineItems(args) ? wrap2("(\n", indent(join(args, "\n")), "\n)") : wrap2("(", join(args, ", "), ")")) + ": " + type + wrap2(" ", join(directives, " "))
963
- },
964
- InputValueDefinition: {
965
- leave: ({ description, name, type, defaultValue, directives }) => wrap2("", description, "\n") + join(
966
- [name + ": " + type, wrap2("= ", defaultValue), join(directives, " ")],
967
- " "
968
- )
969
- },
970
- InterfaceTypeDefinition: {
971
- leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join(
972
- [
973
- "interface",
974
- name,
975
- wrap2("implements ", join(interfaces, " & ")),
976
- join(directives, " "),
977
- block(fields)
978
- ],
979
- " "
980
- )
981
- },
982
- UnionTypeDefinition: {
983
- leave: ({ description, name, directives, types }) => wrap2("", description, "\n") + join(
984
- ["union", name, join(directives, " "), wrap2("= ", join(types, " | "))],
985
- " "
986
- )
987
- },
988
- EnumTypeDefinition: {
989
- leave: ({ description, name, directives, values }) => wrap2("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
990
- },
991
- EnumValueDefinition: {
992
- leave: ({ description, name, directives }) => wrap2("", description, "\n") + join([name, join(directives, " ")], " ")
993
- },
994
- InputObjectTypeDefinition: {
995
- leave: ({ description, name, directives, fields }) => wrap2("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
996
- },
997
- DirectiveDefinition: {
998
- leave: ({
999
- description,
1000
- name,
1001
- arguments: args,
1002
- directives,
1003
- repeatable,
1004
- locations
1005
- }) => wrap2("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap2("(\n", indent(join(args, "\n")), "\n)") : wrap2("(", join(args, ", "), ")")) + wrap2(" ", join(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
1006
- },
1007
- SchemaExtension: {
1008
- leave: ({ directives, operationTypes }) => join(
1009
- ["extend schema", join(directives, " "), block(operationTypes)],
1010
- " "
1011
- )
1012
- },
1013
- ScalarTypeExtension: {
1014
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
1015
- },
1016
- ObjectTypeExtension: {
1017
- leave: ({ name, interfaces, directives, fields }) => join(
1018
- [
1019
- "extend type",
1020
- name,
1021
- wrap2("implements ", join(interfaces, " & ")),
1022
- join(directives, " "),
1023
- block(fields)
1024
- ],
1025
- " "
1026
- )
1027
- },
1028
- InterfaceTypeExtension: {
1029
- leave: ({ name, interfaces, directives, fields }) => join(
1030
- [
1031
- "extend interface",
1032
- name,
1033
- wrap2("implements ", join(interfaces, " & ")),
1034
- join(directives, " "),
1035
- block(fields)
1036
- ],
1037
- " "
1038
- )
1039
- },
1040
- UnionTypeExtension: {
1041
- leave: ({ name, directives, types }) => join(
1042
- [
1043
- "extend union",
1044
- name,
1045
- join(directives, " "),
1046
- wrap2("= ", join(types, " | "))
1047
- ],
1048
- " "
1049
- )
1050
- },
1051
- EnumTypeExtension: {
1052
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
1053
- },
1054
- InputObjectTypeExtension: {
1055
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
1056
- },
1057
- DirectiveExtension: {
1058
- leave: ({ name, directives }) => join(["extend directive @" + name, join(directives, " ")], " ")
1059
- },
1060
- // Schema Coordinates
1061
- TypeCoordinate: {
1062
- leave: ({ name }) => name
1063
- },
1064
- MemberCoordinate: {
1065
- leave: ({ name, memberName }) => join([name, wrap2(".", memberName)])
1066
- },
1067
- ArgumentCoordinate: {
1068
- leave: ({ name, fieldName, argumentName }) => join([name, wrap2(".", fieldName), wrap2("(", argumentName, ":)")])
1069
- },
1070
- DirectiveCoordinate: {
1071
- leave: ({ name }) => join(["@", name])
1072
- },
1073
- DirectiveArgumentCoordinate: {
1074
- leave: ({ name, argumentName }) => join(["@", name, wrap2("(", argumentName, ":)")])
1075
- }
1076
- };
1077
- function join(maybeArray, separator = "") {
1078
- var _maybeArray$filter$jo;
1079
- return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
1080
- }
1081
- function block(array) {
1082
- return wrap2("{\n", indent(join(array, "\n")), "\n}");
1083
- }
1084
- function wrap2(start, maybeString, end = "") {
1085
- return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
1086
- }
1087
- function indent(str) {
1088
- return wrap2(" ", str.replace(/\n/g, "\n "));
1089
- }
1090
- function hasMultilineItems(maybeArray) {
1091
- var _maybeArray$some;
1092
- return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
1093
- }
1094
-
1095
- // ../../node_modules/@wry/caches/lib/weak.js
1096
- function noop() {
1097
- }
1098
- var defaultDispose = noop;
1099
- var _WeakRef = typeof WeakRef !== "undefined" ? WeakRef : function(value) {
1100
- return { deref: () => value };
1101
- };
1102
- var _WeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;
1103
- var _FinalizationRegistry = typeof FinalizationRegistry !== "undefined" ? FinalizationRegistry : function() {
1104
- return {
1105
- register: noop,
1106
- unregister: noop
1107
- };
1108
- };
1109
- var finalizationBatchSize = 10024;
1110
- var WeakCache = class {
1111
- constructor(max = Infinity, dispose = defaultDispose) {
1112
- this.max = max;
1113
- this.dispose = dispose;
1114
- this.map = new _WeakMap();
1115
- this.newest = null;
1116
- this.oldest = null;
1117
- this.unfinalizedNodes = /* @__PURE__ */ new Set();
1118
- this.finalizationScheduled = false;
1119
- this.size = 0;
1120
- this.finalize = () => {
1121
- const iterator = this.unfinalizedNodes.values();
1122
- for (let i = 0; i < finalizationBatchSize; i++) {
1123
- const node = iterator.next().value;
1124
- if (!node)
1125
- break;
1126
- this.unfinalizedNodes.delete(node);
1127
- const key = node.key;
1128
- delete node.key;
1129
- node.keyRef = new _WeakRef(key);
1130
- this.registry.register(key, node, node);
1131
- }
1132
- if (this.unfinalizedNodes.size > 0) {
1133
- queueMicrotask(this.finalize);
1134
- } else {
1135
- this.finalizationScheduled = false;
1136
- }
1137
- };
1138
- this.registry = new _FinalizationRegistry(this.deleteNode.bind(this));
1139
- }
1140
- has(key) {
1141
- return this.map.has(key);
1142
- }
1143
- get(key) {
1144
- const node = this.getNode(key);
1145
- return node && node.value;
1146
- }
1147
- getNode(key) {
1148
- const node = this.map.get(key);
1149
- if (node && node !== this.newest) {
1150
- const { older, newer } = node;
1151
- if (newer) {
1152
- newer.older = older;
1153
- }
1154
- if (older) {
1155
- older.newer = newer;
1156
- }
1157
- node.older = this.newest;
1158
- node.older.newer = node;
1159
- node.newer = null;
1160
- this.newest = node;
1161
- if (node === this.oldest) {
1162
- this.oldest = newer;
1163
- }
1164
- }
1165
- return node;
1166
- }
1167
- set(key, value) {
1168
- let node = this.getNode(key);
1169
- if (node) {
1170
- return node.value = value;
1171
- }
1172
- node = {
1173
- key,
1174
- value,
1175
- newer: null,
1176
- older: this.newest
1177
- };
1178
- if (this.newest) {
1179
- this.newest.newer = node;
1180
- }
1181
- this.newest = node;
1182
- this.oldest = this.oldest || node;
1183
- this.scheduleFinalization(node);
1184
- this.map.set(key, node);
1185
- this.size++;
1186
- return node.value;
1187
- }
1188
- clean() {
1189
- while (this.oldest && this.size > this.max) {
1190
- this.deleteNode(this.oldest);
1191
- }
1192
- }
1193
- deleteNode(node) {
1194
- if (node === this.newest) {
1195
- this.newest = node.older;
1196
- }
1197
- if (node === this.oldest) {
1198
- this.oldest = node.newer;
1199
- }
1200
- if (node.newer) {
1201
- node.newer.older = node.older;
1202
- }
1203
- if (node.older) {
1204
- node.older.newer = node.newer;
1205
- }
1206
- this.size--;
1207
- const key = node.key || node.keyRef && node.keyRef.deref();
1208
- this.dispose(node.value, key);
1209
- if (!node.keyRef) {
1210
- this.unfinalizedNodes.delete(node);
1211
- } else {
1212
- this.registry.unregister(node);
1213
- }
1214
- if (key)
1215
- this.map.delete(key);
1216
- }
1217
- delete(key) {
1218
- const node = this.map.get(key);
1219
- if (node) {
1220
- this.deleteNode(node);
1221
- return true;
1222
- }
1223
- return false;
1224
- }
1225
- scheduleFinalization(node) {
1226
- this.unfinalizedNodes.add(node);
1227
- if (!this.finalizationScheduled) {
1228
- this.finalizationScheduled = true;
1229
- queueMicrotask(this.finalize);
1230
- }
1231
- }
1232
- };
1233
-
1234
- // ../../node_modules/@apollo/client/utilities/caching/caches.js
1235
- var scheduledCleanup = /* @__PURE__ */ new WeakSet();
1236
- function schedule(cache) {
1237
- if (cache.size <= (cache.max || -1)) {
1238
- return;
1239
- }
1240
- if (!scheduledCleanup.has(cache)) {
1241
- scheduledCleanup.add(cache);
1242
- setTimeout(function() {
1243
- cache.clean();
1244
- scheduledCleanup.delete(cache);
1245
- }, 100);
1246
- }
1247
- }
1248
- var AutoCleanedWeakCache = function(max, dispose) {
1249
- var cache = new WeakCache(max, dispose);
1250
- cache.set = function(key, value) {
1251
- var ret = WeakCache.prototype.set.call(this, key, value);
1252
- schedule(this);
1253
- return ret;
1254
- };
1255
- return cache;
1256
- };
1257
-
1258
- // ../../node_modules/@apollo/client/utilities/caching/sizes.js
1259
- var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
1260
- var cacheSizes = __assign({}, global_default[cacheSizeSymbol]);
1261
-
1262
- // ../../node_modules/@apollo/client/utilities/caching/getMemoryInternals.js
1263
- var globalCaches = {};
1264
- function registerGlobalCache(name, getSize) {
1265
- globalCaches[name] = getSize;
1266
- }
1267
- var getApolloClientMemoryInternals = globalThis.__DEV__ !== false ? _getApolloClientMemoryInternals : void 0;
1268
- var getInMemoryCacheMemoryInternals = globalThis.__DEV__ !== false ? _getInMemoryCacheMemoryInternals : void 0;
1269
- var getApolloCacheMemoryInternals = globalThis.__DEV__ !== false ? _getApolloCacheMemoryInternals : void 0;
1270
- function getCurrentCacheSizes() {
1271
- var defaults = {
1272
- parser: 1e3,
1273
- canonicalStringify: 1e3,
1274
- print: 2e3,
1275
- "documentTransform.cache": 2e3,
1276
- "queryManager.getDocumentInfo": 2e3,
1277
- "PersistedQueryLink.persistedQueryHashes": 2e3,
1278
- "fragmentRegistry.transform": 2e3,
1279
- "fragmentRegistry.lookup": 1e3,
1280
- "fragmentRegistry.findFragmentSpreads": 4e3,
1281
- "cache.fragmentQueryDocuments": 1e3,
1282
- "removeTypenameFromVariables.getVariableDefinitions": 2e3,
1283
- "inMemoryCache.maybeBroadcastWatch": 5e3,
1284
- "inMemoryCache.executeSelectionSet": 5e4,
1285
- "inMemoryCache.executeSubSelectedArray": 1e4
1286
- };
1287
- return Object.fromEntries(Object.entries(defaults).map(function(_a3) {
1288
- var k = _a3[0], v = _a3[1];
1289
- return [
1290
- k,
1291
- cacheSizes[k] || v
1292
- ];
1293
- }));
1294
- }
1295
- function _getApolloClientMemoryInternals() {
1296
- var _a3, _b, _c, _d, _e;
1297
- if (!(globalThis.__DEV__ !== false))
1298
- throw new Error("only supported in development mode");
1299
- return {
1300
- limits: getCurrentCacheSizes(),
1301
- sizes: __assign({ print: (_a3 = globalCaches.print) === null || _a3 === void 0 ? void 0 : _a3.call(globalCaches), parser: (_b = globalCaches.parser) === null || _b === void 0 ? void 0 : _b.call(globalCaches), canonicalStringify: (_c = globalCaches.canonicalStringify) === null || _c === void 0 ? void 0 : _c.call(globalCaches), links: linkInfo(this.link), queryManager: {
1302
- getDocumentInfo: this["queryManager"]["transformCache"].size,
1303
- documentTransforms: transformInfo(this["queryManager"].documentTransform)
1304
- } }, (_e = (_d = this.cache).getMemoryInternals) === null || _e === void 0 ? void 0 : _e.call(_d))
1305
- };
1306
- }
1307
- function _getApolloCacheMemoryInternals() {
1308
- return {
1309
- cache: {
1310
- fragmentQueryDocuments: getWrapperInformation(this["getFragmentDoc"])
1311
- }
1312
- };
1313
- }
1314
- function _getInMemoryCacheMemoryInternals() {
1315
- var fragments = this.config.fragments;
1316
- return __assign(__assign({}, _getApolloCacheMemoryInternals.apply(this)), { addTypenameDocumentTransform: transformInfo(this["addTypenameTransform"]), inMemoryCache: {
1317
- executeSelectionSet: getWrapperInformation(this["storeReader"]["executeSelectionSet"]),
1318
- executeSubSelectedArray: getWrapperInformation(this["storeReader"]["executeSubSelectedArray"]),
1319
- maybeBroadcastWatch: getWrapperInformation(this["maybeBroadcastWatch"])
1320
- }, fragmentRegistry: {
1321
- findFragmentSpreads: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.findFragmentSpreads),
1322
- lookup: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.lookup),
1323
- transform: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.transform)
1324
- } });
1325
- }
1326
- function isWrapper(f) {
1327
- return !!f && "dirtyKey" in f;
1328
- }
1329
- function getWrapperInformation(f) {
1330
- return isWrapper(f) ? f.size : void 0;
1331
- }
1332
- function isDefined(value) {
1333
- return value != null;
1334
- }
1335
- function transformInfo(transform) {
1336
- return recurseTransformInfo(transform).map(function(cache) {
1337
- return { cache };
1338
- });
1339
- }
1340
- function recurseTransformInfo(transform) {
1341
- return transform ? __spreadArray(__spreadArray([
1342
- getWrapperInformation(transform === null || transform === void 0 ? void 0 : transform["performWork"])
1343
- ], recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["left"]), true), recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["right"]), true).filter(isDefined) : [];
1344
- }
1345
- function linkInfo(link) {
1346
- var _a3;
1347
- return link ? __spreadArray(__spreadArray([
1348
- (_a3 = link === null || link === void 0 ? void 0 : link.getMemoryInternals) === null || _a3 === void 0 ? void 0 : _a3.call(link)
1349
- ], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined) : [];
1350
- }
1351
-
1352
- // ../../node_modules/@apollo/client/utilities/graphql/getFromAST.js
1353
- function getOperationName(doc) {
1354
- return doc.definitions.filter(function(definition) {
1355
- return definition.kind === "OperationDefinition" && !!definition.name;
1356
- }).map(function(x) {
1357
- return x.name.value;
1358
- })[0] || null;
1359
- }
1360
-
1361
- // ../../node_modules/optimism/node_modules/@wry/trie/lib/index.js
1362
- var { forEach, slice } = Array.prototype;
1363
- var { hasOwnProperty } = Object.prototype;
1364
-
1365
- // ../../node_modules/@wry/context/lib/slot.js
1366
- var currentContext = null;
1367
- var MISSING_VALUE = {};
1368
- var idCounter = 1;
1369
- var makeSlotClass = () => class Slot {
1370
- constructor() {
1371
- this.id = [
1372
- "slot",
1373
- idCounter++,
1374
- Date.now(),
1375
- Math.random().toString(36).slice(2)
1376
- ].join(":");
1377
- }
1378
- hasValue() {
1379
- for (let context = currentContext; context; context = context.parent) {
1380
- if (this.id in context.slots) {
1381
- const value = context.slots[this.id];
1382
- if (value === MISSING_VALUE)
1383
- break;
1384
- if (context !== currentContext) {
1385
- currentContext.slots[this.id] = value;
1386
- }
1387
- return true;
1388
- }
1389
- }
1390
- if (currentContext) {
1391
- currentContext.slots[this.id] = MISSING_VALUE;
1392
- }
1393
- return false;
1394
- }
1395
- getValue() {
1396
- if (this.hasValue()) {
1397
- return currentContext.slots[this.id];
1398
- }
1399
- }
1400
- withValue(value, callback, args, thisArg) {
1401
- const slots = {
1402
- __proto__: null,
1403
- [this.id]: value
1404
- };
1405
- const parent = currentContext;
1406
- currentContext = { parent, slots };
1407
- try {
1408
- return callback.apply(thisArg, args);
1409
- } finally {
1410
- currentContext = parent;
1411
- }
1412
- }
1413
- // Capture the current context and wrap a callback function so that it
1414
- // reestablishes the captured context when called.
1415
- static bind(callback) {
1416
- const context = currentContext;
1417
- return function() {
1418
- const saved = currentContext;
1419
- try {
1420
- currentContext = context;
1421
- return callback.apply(this, arguments);
1422
- } finally {
1423
- currentContext = saved;
1424
- }
1425
- };
1426
- }
1427
- // Immediately run a callback function without any captured context.
1428
- static noContext(callback, args, thisArg) {
1429
- if (currentContext) {
1430
- const saved = currentContext;
1431
- try {
1432
- currentContext = null;
1433
- return callback.apply(thisArg, args);
1434
- } finally {
1435
- currentContext = saved;
1436
- }
1437
- } else {
1438
- return callback.apply(thisArg, args);
1439
- }
1440
- }
1441
- };
1442
- function maybe2(fn) {
1443
- try {
1444
- return fn();
1445
- } catch (ignored) {
1446
- }
1447
- }
1448
- var globalKey = "@wry/context:Slot";
1449
- var host = (
1450
- // Prefer globalThis when available.
1451
- // https://github.com/benjamn/wryware/issues/347
1452
- maybe2(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1453
- // bundlers to the appropriate identifier (window, self, ...) depending on the
1454
- // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1455
- maybe2(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1456
- // back to using the Array constructor as a namespace, but that was flagged in
1457
- // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1458
- /* @__PURE__ */ Object.create(null)
1459
- );
1460
- var globalHost = host;
1461
- var Slot = globalHost[globalKey] || // Earlier versions of this package stored the globalKey property on the Array
1462
- // constructor, so we check there as well, to prevent Slot class duplication.
1463
- Array[globalKey] || (function(Slot2) {
1464
- try {
1465
- Object.defineProperty(globalHost, globalKey, {
1466
- value: Slot2,
1467
- enumerable: false,
1468
- writable: false,
1469
- // When it was possible for globalHost to be the Array constructor (a
1470
- // legacy Slot dedup strategy), it was important for the property to be
1471
- // configurable:true so it could be deleted. That does not seem to be as
1472
- // important when globalHost is the global object, but I don't want to
1473
- // cause similar problems again, and configurable:true seems safest.
1474
- // https://github.com/endojs/endo/issues/576#issuecomment-1178274008
1475
- configurable: true
1476
- });
1477
- } finally {
1478
- return Slot2;
1479
- }
1480
- })(makeSlotClass());
1481
-
1482
- // ../../node_modules/@wry/context/lib/index.js
1483
- var { bind, noContext } = Slot;
1484
-
1485
- // ../../node_modules/optimism/lib/context.js
1486
- var parentEntrySlot = new Slot();
1487
-
1488
- // ../../node_modules/optimism/lib/helpers.js
1489
- var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
1490
- var arrayFromSet = Array.from || function(set) {
1491
- const array = [];
1492
- set.forEach((item) => array.push(item));
1493
- return array;
1494
- };
1495
- function maybeUnsubscribe(entryOrDep) {
1496
- const { unsubscribe } = entryOrDep;
1497
- if (typeof unsubscribe === "function") {
1498
- entryOrDep.unsubscribe = void 0;
1499
- unsubscribe();
1500
- }
1501
- }
1502
-
1503
- // ../../node_modules/optimism/lib/entry.js
1504
- var emptySetPool = [];
1505
- var POOL_TARGET_SIZE = 100;
1506
- function assert(condition, optionalMessage) {
1507
- if (!condition) {
1508
- throw new Error(optionalMessage || "assertion failure");
1509
- }
1510
- }
1511
- function valueIs(a, b) {
1512
- const len = a.length;
1513
- return (
1514
- // Unknown values are not equal to each other.
1515
- len > 0 && // Both values must be ordinary (or both exceptional) to be equal.
1516
- len === b.length && // The underlying value or exception must be the same.
1517
- a[len - 1] === b[len - 1]
1518
- );
1519
- }
1520
- function valueGet(value) {
1521
- switch (value.length) {
1522
- case 0:
1523
- throw new Error("unknown value");
1524
- case 1:
1525
- return value[0];
1526
- case 2:
1527
- throw value[1];
1528
- }
1529
- }
1530
- function valueCopy(value) {
1531
- return value.slice(0);
1532
- }
1533
- var Entry = class _Entry {
1534
- constructor(fn) {
1535
- this.fn = fn;
1536
- this.parents = /* @__PURE__ */ new Set();
1537
- this.childValues = /* @__PURE__ */ new Map();
1538
- this.dirtyChildren = null;
1539
- this.dirty = true;
1540
- this.recomputing = false;
1541
- this.value = [];
1542
- this.deps = null;
1543
- ++_Entry.count;
1544
- }
1545
- peek() {
1546
- if (this.value.length === 1 && !mightBeDirty(this)) {
1547
- rememberParent(this);
1548
- return this.value[0];
1549
- }
1550
- }
1551
- // This is the most important method of the Entry API, because it
1552
- // determines whether the cached this.value can be returned immediately,
1553
- // or must be recomputed. The overall performance of the caching system
1554
- // depends on the truth of the following observations: (1) this.dirty is
1555
- // usually false, (2) this.dirtyChildren is usually null/empty, and thus
1556
- // (3) valueGet(this.value) is usually returned without recomputation.
1557
- recompute(args) {
1558
- assert(!this.recomputing, "already recomputing");
1559
- rememberParent(this);
1560
- return mightBeDirty(this) ? reallyRecompute(this, args) : valueGet(this.value);
1561
- }
1562
- setDirty() {
1563
- if (this.dirty)
1564
- return;
1565
- this.dirty = true;
1566
- reportDirty(this);
1567
- maybeUnsubscribe(this);
1568
- }
1569
- dispose() {
1570
- this.setDirty();
1571
- forgetChildren(this);
1572
- eachParent(this, (parent, child) => {
1573
- parent.setDirty();
1574
- forgetChild(parent, this);
1575
- });
1576
- }
1577
- forget() {
1578
- this.dispose();
1579
- }
1580
- dependOn(dep2) {
1581
- dep2.add(this);
1582
- if (!this.deps) {
1583
- this.deps = emptySetPool.pop() || /* @__PURE__ */ new Set();
1584
- }
1585
- this.deps.add(dep2);
1586
- }
1587
- forgetDeps() {
1588
- if (this.deps) {
1589
- arrayFromSet(this.deps).forEach((dep2) => dep2.delete(this));
1590
- this.deps.clear();
1591
- emptySetPool.push(this.deps);
1592
- this.deps = null;
1593
- }
1594
- }
1595
- };
1596
- Entry.count = 0;
1597
- function rememberParent(child) {
1598
- const parent = parentEntrySlot.getValue();
1599
- if (parent) {
1600
- child.parents.add(parent);
1601
- if (!parent.childValues.has(child)) {
1602
- parent.childValues.set(child, []);
1603
- }
1604
- if (mightBeDirty(child)) {
1605
- reportDirtyChild(parent, child);
1606
- } else {
1607
- reportCleanChild(parent, child);
1608
- }
1609
- return parent;
1610
- }
1611
- }
1612
- function reallyRecompute(entry, args) {
1613
- forgetChildren(entry);
1614
- parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);
1615
- if (maybeSubscribe(entry, args)) {
1616
- setClean(entry);
1617
- }
1618
- return valueGet(entry.value);
1619
- }
1620
- function recomputeNewValue(entry, args) {
1621
- entry.recomputing = true;
1622
- const { normalizeResult } = entry;
1623
- let oldValueCopy;
1624
- if (normalizeResult && entry.value.length === 1) {
1625
- oldValueCopy = valueCopy(entry.value);
1626
- }
1627
- entry.value.length = 0;
1628
- try {
1629
- entry.value[0] = entry.fn.apply(null, args);
1630
- if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {
1631
- try {
1632
- entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);
1633
- } catch (_a3) {
1634
- }
1635
- }
1636
- } catch (e) {
1637
- entry.value[1] = e;
1638
- }
1639
- entry.recomputing = false;
1640
- }
1641
- function mightBeDirty(entry) {
1642
- return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);
1643
- }
1644
- function setClean(entry) {
1645
- entry.dirty = false;
1646
- if (mightBeDirty(entry)) {
1647
- return;
1648
- }
1649
- reportClean(entry);
1650
- }
1651
- function reportDirty(child) {
1652
- eachParent(child, reportDirtyChild);
1653
- }
1654
- function reportClean(child) {
1655
- eachParent(child, reportCleanChild);
1656
- }
1657
- function eachParent(child, callback) {
1658
- const parentCount = child.parents.size;
1659
- if (parentCount) {
1660
- const parents = arrayFromSet(child.parents);
1661
- for (let i = 0; i < parentCount; ++i) {
1662
- callback(parents[i], child);
1663
- }
1664
- }
1665
- }
1666
- function reportDirtyChild(parent, child) {
1667
- assert(parent.childValues.has(child));
1668
- assert(mightBeDirty(child));
1669
- const parentWasClean = !mightBeDirty(parent);
1670
- if (!parent.dirtyChildren) {
1671
- parent.dirtyChildren = emptySetPool.pop() || /* @__PURE__ */ new Set();
1672
- } else if (parent.dirtyChildren.has(child)) {
1673
- return;
1674
- }
1675
- parent.dirtyChildren.add(child);
1676
- if (parentWasClean) {
1677
- reportDirty(parent);
1678
- }
1679
- }
1680
- function reportCleanChild(parent, child) {
1681
- assert(parent.childValues.has(child));
1682
- assert(!mightBeDirty(child));
1683
- const childValue = parent.childValues.get(child);
1684
- if (childValue.length === 0) {
1685
- parent.childValues.set(child, valueCopy(child.value));
1686
- } else if (!valueIs(childValue, child.value)) {
1687
- parent.setDirty();
1688
- }
1689
- removeDirtyChild(parent, child);
1690
- if (mightBeDirty(parent)) {
1691
- return;
1692
- }
1693
- reportClean(parent);
1694
- }
1695
- function removeDirtyChild(parent, child) {
1696
- const dc = parent.dirtyChildren;
1697
- if (dc) {
1698
- dc.delete(child);
1699
- if (dc.size === 0) {
1700
- if (emptySetPool.length < POOL_TARGET_SIZE) {
1701
- emptySetPool.push(dc);
1702
- }
1703
- parent.dirtyChildren = null;
1704
- }
1705
- }
1706
- }
1707
- function forgetChildren(parent) {
1708
- if (parent.childValues.size > 0) {
1709
- parent.childValues.forEach((_value, child) => {
1710
- forgetChild(parent, child);
1711
- });
1712
- }
1713
- parent.forgetDeps();
1714
- assert(parent.dirtyChildren === null);
1715
- }
1716
- function forgetChild(parent, child) {
1717
- child.parents.delete(parent);
1718
- parent.childValues.delete(child);
1719
- removeDirtyChild(parent, child);
1720
- }
1721
- function maybeSubscribe(entry, args) {
1722
- if (typeof entry.subscribe === "function") {
1723
- try {
1724
- maybeUnsubscribe(entry);
1725
- entry.unsubscribe = entry.subscribe.apply(null, args);
1726
- } catch (e) {
1727
- entry.setDirty();
1728
- return false;
1729
- }
1730
- }
1731
- return true;
1732
- }
1733
-
1734
- // ../../node_modules/@apollo/client/utilities/graphql/print.js
1735
- var printCache;
1736
- var print2 = Object.assign(function(ast) {
1737
- var result2 = printCache.get(ast);
1738
- if (!result2) {
1739
- result2 = print(ast);
1740
- printCache.set(ast, result2);
1741
- }
1742
- return result2;
1743
- }, {
1744
- reset: function() {
1745
- printCache = new AutoCleanedWeakCache(
1746
- cacheSizes.print || 2e3
1747
- /* defaultCacheSizes.print */
1748
- );
1749
- }
1750
- });
1751
- print2.reset();
1752
- if (globalThis.__DEV__ !== false) {
1753
- registerGlobalCache("print", function() {
1754
- return printCache ? printCache.size : 0;
1755
- });
1756
- }
1757
-
1758
- // ../../node_modules/zen-observable-ts/module.js
1759
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
1760
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
1761
- if (it) return (it = it.call(o)).next.bind(it);
1762
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
1763
- if (it) o = it;
1764
- var i = 0;
1765
- return function() {
1766
- if (i >= o.length) return { done: true };
1767
- return { done: false, value: o[i++] };
1768
- };
1769
- }
1770
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1771
- }
1772
- function _unsupportedIterableToArray(o, minLen) {
1773
- if (!o) return;
1774
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1775
- var n = Object.prototype.toString.call(o).slice(8, -1);
1776
- if (n === "Object" && o.constructor) n = o.constructor.name;
1777
- if (n === "Map" || n === "Set") return Array.from(o);
1778
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1779
- }
1780
- function _arrayLikeToArray(arr, len) {
1781
- if (len == null || len > arr.length) len = arr.length;
1782
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
1783
- arr2[i] = arr[i];
1784
- }
1785
- return arr2;
1786
- }
1787
- function _defineProperties(target, props) {
1788
- for (var i = 0; i < props.length; i++) {
1789
- var descriptor = props[i];
1790
- descriptor.enumerable = descriptor.enumerable || false;
1791
- descriptor.configurable = true;
1792
- if ("value" in descriptor) descriptor.writable = true;
1793
- Object.defineProperty(target, descriptor.key, descriptor);
1794
- }
1795
- }
1796
- function _createClass(Constructor, protoProps, staticProps) {
1797
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1798
- if (staticProps) _defineProperties(Constructor, staticProps);
1799
- Object.defineProperty(Constructor, "prototype", { writable: false });
1800
- return Constructor;
1801
- }
1802
- var hasSymbols = function() {
1803
- return typeof Symbol === "function";
1804
- };
1805
- var hasSymbol = function(name) {
1806
- return hasSymbols() && Boolean(Symbol[name]);
1807
- };
1808
- var getSymbol = function(name) {
1809
- return hasSymbol(name) ? Symbol[name] : "@@" + name;
1810
- };
1811
- if (hasSymbols() && !hasSymbol("observable")) {
1812
- Symbol.observable = /* @__PURE__ */ Symbol("observable");
1813
- }
1814
- var SymbolIterator = getSymbol("iterator");
1815
- var SymbolObservable = getSymbol("observable");
1816
- var SymbolSpecies = getSymbol("species");
1817
- function getMethod(obj, key) {
1818
- var value = obj[key];
1819
- if (value == null) return void 0;
1820
- if (typeof value !== "function") throw new TypeError(value + " is not a function");
1821
- return value;
1822
- }
1823
- function getSpecies(obj) {
1824
- var ctor = obj.constructor;
1825
- if (ctor !== void 0) {
1826
- ctor = ctor[SymbolSpecies];
1827
- if (ctor === null) {
1828
- ctor = void 0;
1829
- }
1830
- }
1831
- return ctor !== void 0 ? ctor : Observable;
1832
- }
1833
- function isObservable(x) {
1834
- return x instanceof Observable;
1835
- }
1836
- function hostReportError(e) {
1837
- if (hostReportError.log) {
1838
- hostReportError.log(e);
1839
- } else {
1840
- setTimeout(function() {
1841
- throw e;
1842
- });
1843
- }
1844
- }
1845
- function enqueue(fn) {
1846
- Promise.resolve().then(function() {
1847
- try {
1848
- fn();
1849
- } catch (e) {
1850
- hostReportError(e);
1851
- }
1852
- });
1853
- }
1854
- function cleanupSubscription(subscription) {
1855
- var cleanup = subscription._cleanup;
1856
- if (cleanup === void 0) return;
1857
- subscription._cleanup = void 0;
1858
- if (!cleanup) {
1859
- return;
1860
- }
1861
- try {
1862
- if (typeof cleanup === "function") {
1863
- cleanup();
1864
- } else {
1865
- var unsubscribe = getMethod(cleanup, "unsubscribe");
1866
- if (unsubscribe) {
1867
- unsubscribe.call(cleanup);
1868
- }
1869
- }
1870
- } catch (e) {
1871
- hostReportError(e);
1872
- }
1873
- }
1874
- function closeSubscription(subscription) {
1875
- subscription._observer = void 0;
1876
- subscription._queue = void 0;
1877
- subscription._state = "closed";
1878
- }
1879
- function flushSubscription(subscription) {
1880
- var queue = subscription._queue;
1881
- if (!queue) {
1882
- return;
1883
- }
1884
- subscription._queue = void 0;
1885
- subscription._state = "ready";
1886
- for (var i = 0; i < queue.length; ++i) {
1887
- notifySubscription(subscription, queue[i].type, queue[i].value);
1888
- if (subscription._state === "closed") break;
1889
- }
1890
- }
1891
- function notifySubscription(subscription, type, value) {
1892
- subscription._state = "running";
1893
- var observer = subscription._observer;
1894
- try {
1895
- var m = getMethod(observer, type);
1896
- switch (type) {
1897
- case "next":
1898
- if (m) m.call(observer, value);
1899
- break;
1900
- case "error":
1901
- closeSubscription(subscription);
1902
- if (m) m.call(observer, value);
1903
- else throw value;
1904
- break;
1905
- case "complete":
1906
- closeSubscription(subscription);
1907
- if (m) m.call(observer);
1908
- break;
1909
- }
1910
- } catch (e) {
1911
- hostReportError(e);
1912
- }
1913
- if (subscription._state === "closed") cleanupSubscription(subscription);
1914
- else if (subscription._state === "running") subscription._state = "ready";
1915
- }
1916
- function onNotify(subscription, type, value) {
1917
- if (subscription._state === "closed") return;
1918
- if (subscription._state === "buffering") {
1919
- subscription._queue.push({
1920
- type,
1921
- value
1922
- });
1923
- return;
1924
- }
1925
- if (subscription._state !== "ready") {
1926
- subscription._state = "buffering";
1927
- subscription._queue = [{
1928
- type,
1929
- value
1930
- }];
1931
- enqueue(function() {
1932
- return flushSubscription(subscription);
1933
- });
1934
- return;
1935
- }
1936
- notifySubscription(subscription, type, value);
1937
- }
1938
- var Subscription = /* @__PURE__ */ (function() {
1939
- function Subscription2(observer, subscriber) {
1940
- this._cleanup = void 0;
1941
- this._observer = observer;
1942
- this._queue = void 0;
1943
- this._state = "initializing";
1944
- var subscriptionObserver = new SubscriptionObserver(this);
1945
- try {
1946
- this._cleanup = subscriber.call(void 0, subscriptionObserver);
1947
- } catch (e) {
1948
- subscriptionObserver.error(e);
1949
- }
1950
- if (this._state === "initializing") this._state = "ready";
1951
- }
1952
- var _proto = Subscription2.prototype;
1953
- _proto.unsubscribe = function unsubscribe() {
1954
- if (this._state !== "closed") {
1955
- closeSubscription(this);
1956
- cleanupSubscription(this);
1957
- }
1958
- };
1959
- _createClass(Subscription2, [{
1960
- key: "closed",
1961
- get: function() {
1962
- return this._state === "closed";
1963
- }
1964
- }]);
1965
- return Subscription2;
1966
- })();
1967
- var SubscriptionObserver = /* @__PURE__ */ (function() {
1968
- function SubscriptionObserver2(subscription) {
1969
- this._subscription = subscription;
1970
- }
1971
- var _proto2 = SubscriptionObserver2.prototype;
1972
- _proto2.next = function next(value) {
1973
- onNotify(this._subscription, "next", value);
1974
- };
1975
- _proto2.error = function error(value) {
1976
- onNotify(this._subscription, "error", value);
1977
- };
1978
- _proto2.complete = function complete() {
1979
- onNotify(this._subscription, "complete");
1980
- };
1981
- _createClass(SubscriptionObserver2, [{
1982
- key: "closed",
1983
- get: function() {
1984
- return this._subscription._state === "closed";
1985
- }
1986
- }]);
1987
- return SubscriptionObserver2;
1988
- })();
1989
- var Observable = /* @__PURE__ */ (function() {
1990
- function Observable2(subscriber) {
1991
- if (!(this instanceof Observable2)) throw new TypeError("Observable cannot be called as a function");
1992
- if (typeof subscriber !== "function") throw new TypeError("Observable initializer must be a function");
1993
- this._subscriber = subscriber;
1994
- }
1995
- var _proto3 = Observable2.prototype;
1996
- _proto3.subscribe = function subscribe(observer) {
1997
- if (typeof observer !== "object" || observer === null) {
1998
- observer = {
1999
- next: observer,
2000
- error: arguments[1],
2001
- complete: arguments[2]
2002
- };
2003
- }
2004
- return new Subscription(observer, this._subscriber);
2005
- };
2006
- _proto3.forEach = function forEach2(fn) {
2007
- var _this = this;
2008
- return new Promise(function(resolve, reject) {
2009
- if (typeof fn !== "function") {
2010
- reject(new TypeError(fn + " is not a function"));
2011
- return;
2012
- }
2013
- function done() {
2014
- subscription.unsubscribe();
2015
- resolve();
2016
- }
2017
- var subscription = _this.subscribe({
2018
- next: function(value) {
2019
- try {
2020
- fn(value, done);
2021
- } catch (e) {
2022
- reject(e);
2023
- subscription.unsubscribe();
2024
- }
2025
- },
2026
- error: reject,
2027
- complete: resolve
2028
- });
2029
- });
2030
- };
2031
- _proto3.map = function map(fn) {
2032
- var _this2 = this;
2033
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2034
- var C = getSpecies(this);
2035
- return new C(function(observer) {
2036
- return _this2.subscribe({
2037
- next: function(value) {
2038
- try {
2039
- value = fn(value);
2040
- } catch (e) {
2041
- return observer.error(e);
2042
- }
2043
- observer.next(value);
2044
- },
2045
- error: function(e) {
2046
- observer.error(e);
2047
- },
2048
- complete: function() {
2049
- observer.complete();
2050
- }
2051
- });
2052
- });
2053
- };
2054
- _proto3.filter = function filter(fn) {
2055
- var _this3 = this;
2056
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2057
- var C = getSpecies(this);
2058
- return new C(function(observer) {
2059
- return _this3.subscribe({
2060
- next: function(value) {
2061
- try {
2062
- if (!fn(value)) return;
2063
- } catch (e) {
2064
- return observer.error(e);
2065
- }
2066
- observer.next(value);
2067
- },
2068
- error: function(e) {
2069
- observer.error(e);
2070
- },
2071
- complete: function() {
2072
- observer.complete();
2073
- }
2074
- });
2075
- });
2076
- };
2077
- _proto3.reduce = function reduce(fn) {
2078
- var _this4 = this;
2079
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2080
- var C = getSpecies(this);
2081
- var hasSeed = arguments.length > 1;
2082
- var hasValue = false;
2083
- var seed = arguments[1];
2084
- var acc = seed;
2085
- return new C(function(observer) {
2086
- return _this4.subscribe({
2087
- next: function(value) {
2088
- var first = !hasValue;
2089
- hasValue = true;
2090
- if (!first || hasSeed) {
2091
- try {
2092
- acc = fn(acc, value);
2093
- } catch (e) {
2094
- return observer.error(e);
2095
- }
2096
- } else {
2097
- acc = value;
2098
- }
2099
- },
2100
- error: function(e) {
2101
- observer.error(e);
2102
- },
2103
- complete: function() {
2104
- if (!hasValue && !hasSeed) return observer.error(new TypeError("Cannot reduce an empty sequence"));
2105
- observer.next(acc);
2106
- observer.complete();
2107
- }
2108
- });
2109
- });
2110
- };
2111
- _proto3.concat = function concat() {
2112
- var _this5 = this;
2113
- for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
2114
- sources[_key] = arguments[_key];
2115
- }
2116
- var C = getSpecies(this);
2117
- return new C(function(observer) {
2118
- var subscription;
2119
- var index = 0;
2120
- function startNext(next) {
2121
- subscription = next.subscribe({
2122
- next: function(v) {
2123
- observer.next(v);
2124
- },
2125
- error: function(e) {
2126
- observer.error(e);
2127
- },
2128
- complete: function() {
2129
- if (index === sources.length) {
2130
- subscription = void 0;
2131
- observer.complete();
2132
- } else {
2133
- startNext(C.from(sources[index++]));
2134
- }
2135
- }
2136
- });
2137
- }
2138
- startNext(_this5);
2139
- return function() {
2140
- if (subscription) {
2141
- subscription.unsubscribe();
2142
- subscription = void 0;
2143
- }
2144
- };
2145
- });
2146
- };
2147
- _proto3.flatMap = function flatMap(fn) {
2148
- var _this6 = this;
2149
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2150
- var C = getSpecies(this);
2151
- return new C(function(observer) {
2152
- var subscriptions = [];
2153
- var outer = _this6.subscribe({
2154
- next: function(value) {
2155
- if (fn) {
2156
- try {
2157
- value = fn(value);
2158
- } catch (e) {
2159
- return observer.error(e);
2160
- }
2161
- }
2162
- var inner = C.from(value).subscribe({
2163
- next: function(value2) {
2164
- observer.next(value2);
2165
- },
2166
- error: function(e) {
2167
- observer.error(e);
2168
- },
2169
- complete: function() {
2170
- var i = subscriptions.indexOf(inner);
2171
- if (i >= 0) subscriptions.splice(i, 1);
2172
- completeIfDone();
2173
- }
2174
- });
2175
- subscriptions.push(inner);
2176
- },
2177
- error: function(e) {
2178
- observer.error(e);
2179
- },
2180
- complete: function() {
2181
- completeIfDone();
2182
- }
2183
- });
2184
- function completeIfDone() {
2185
- if (outer.closed && subscriptions.length === 0) observer.complete();
2186
- }
2187
- return function() {
2188
- subscriptions.forEach(function(s) {
2189
- return s.unsubscribe();
2190
- });
2191
- outer.unsubscribe();
2192
- };
2193
- });
2194
- };
2195
- _proto3[SymbolObservable] = function() {
2196
- return this;
2197
- };
2198
- Observable2.from = function from(x) {
2199
- var C = typeof this === "function" ? this : Observable2;
2200
- if (x == null) throw new TypeError(x + " is not an object");
2201
- var method = getMethod(x, SymbolObservable);
2202
- if (method) {
2203
- var observable = method.call(x);
2204
- if (Object(observable) !== observable) throw new TypeError(observable + " is not an object");
2205
- if (isObservable(observable) && observable.constructor === C) return observable;
2206
- return new C(function(observer) {
2207
- return observable.subscribe(observer);
2208
- });
2209
- }
2210
- if (hasSymbol("iterator")) {
2211
- method = getMethod(x, SymbolIterator);
2212
- if (method) {
2213
- return new C(function(observer) {
2214
- enqueue(function() {
2215
- if (observer.closed) return;
2216
- for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done; ) {
2217
- var item = _step.value;
2218
- observer.next(item);
2219
- if (observer.closed) return;
2220
- }
2221
- observer.complete();
2222
- });
2223
- });
2224
- }
2225
- }
2226
- if (Array.isArray(x)) {
2227
- return new C(function(observer) {
2228
- enqueue(function() {
2229
- if (observer.closed) return;
2230
- for (var i = 0; i < x.length; ++i) {
2231
- observer.next(x[i]);
2232
- if (observer.closed) return;
2233
- }
2234
- observer.complete();
2235
- });
2236
- });
2237
- }
2238
- throw new TypeError(x + " is not observable");
2239
- };
2240
- Observable2.of = function of() {
2241
- for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2242
- items[_key2] = arguments[_key2];
2243
- }
2244
- var C = typeof this === "function" ? this : Observable2;
2245
- return new C(function(observer) {
2246
- enqueue(function() {
2247
- if (observer.closed) return;
2248
- for (var i = 0; i < items.length; ++i) {
2249
- observer.next(items[i]);
2250
- if (observer.closed) return;
2251
- }
2252
- observer.complete();
2253
- });
2254
- });
2255
- };
2256
- _createClass(Observable2, null, [{
2257
- key: SymbolSpecies,
2258
- get: function() {
2259
- return this;
2260
- }
2261
- }]);
2262
- return Observable2;
2263
- })();
2264
- if (hasSymbols()) {
2265
- Object.defineProperty(Observable, /* @__PURE__ */ Symbol("extensions"), {
2266
- value: {
2267
- symbol: SymbolObservable,
2268
- hostReportError
2269
- },
2270
- configurable: true
2271
- });
2272
- }
2273
-
2274
- // ../../node_modules/symbol-observable/es/ponyfill.js
2275
- function symbolObservablePonyfill(root2) {
2276
- var result2;
2277
- var Symbol2 = root2.Symbol;
2278
- if (typeof Symbol2 === "function") {
2279
- if (Symbol2.observable) {
2280
- result2 = Symbol2.observable;
2281
- } else {
2282
- if (typeof Symbol2.for === "function") {
2283
- result2 = Symbol2.for("https://github.com/benlesh/symbol-observable");
2284
- } else {
2285
- result2 = Symbol2("https://github.com/benlesh/symbol-observable");
2286
- }
2287
- try {
2288
- Symbol2.observable = result2;
2289
- } catch (err) {
2290
- }
2291
- }
2292
- } else {
2293
- result2 = "@@observable";
2294
- }
2295
- return result2;
2296
- }
2297
-
2298
- // ../../node_modules/symbol-observable/es/index.js
2299
- var root;
2300
- if (typeof self !== "undefined") {
2301
- root = self;
2302
- } else if (typeof window !== "undefined") {
2303
- root = window;
2304
- } else if (typeof global !== "undefined") {
2305
- root = global;
2306
- } else if (typeof module !== "undefined") {
2307
- root = module;
2308
- } else {
2309
- root = Function("return this")();
2310
- }
2311
- var result = symbolObservablePonyfill(root);
2312
-
2313
- // ../../node_modules/@apollo/client/utilities/observables/Observable.js
2314
- var prototype = Observable.prototype;
2315
- var fakeObsSymbol = "@@observable";
2316
- if (!prototype[fakeObsSymbol]) {
2317
- prototype[fakeObsSymbol] = function() {
2318
- return this;
2319
- };
2320
- }
2321
-
2322
- // ../../node_modules/@apollo/client/utilities/deprecation/index.js
2323
- var _a2;
2324
- var muteAllDeprecations = /* @__PURE__ */ Symbol.for("apollo.deprecations");
2325
- var deprecationsSlot = /* @__PURE__ */ Symbol.for("apollo.deprecations.slot");
2326
- var global2 = global_default;
2327
- var slot = (_a2 = global2[deprecationsSlot]) !== null && _a2 !== void 0 ? _a2 : global2[deprecationsSlot] = new Slot();
2328
- function isMuted(name) {
2329
- return global2[muteAllDeprecations] || (slot.getValue() || []).includes(name);
2330
- }
2331
- function warnDeprecated(name, cb) {
2332
- if (!isMuted(name)) {
2333
- cb();
2334
- }
2335
- }
2336
-
2337
- // ../../node_modules/@apollo/client/link/utils/throwServerError.js
2338
- var throwServerError = function(response, result2, message) {
2339
- var error = new Error(message);
2340
- error.name = "ServerError";
2341
- error.response = response;
2342
- error.statusCode = response.status;
2343
- error.result = result2;
2344
- throw error;
2345
- };
2346
-
2347
- // ../../node_modules/@apollo/client/link/utils/validateOperation.js
2348
- function validateOperation(operation) {
2349
- var OPERATION_FIELDS = [
2350
- "query",
2351
- "operationName",
2352
- "variables",
2353
- "extensions",
2354
- "context"
2355
- ];
2356
- for (var _i = 0, _a3 = Object.keys(operation); _i < _a3.length; _i++) {
2357
- var key = _a3[_i];
2358
- if (OPERATION_FIELDS.indexOf(key) < 0) {
2359
- throw newInvariantError(58, key);
2360
- }
2361
- }
2362
- return operation;
2363
- }
2364
-
2365
- // ../../node_modules/@apollo/client/link/utils/createOperation.js
2366
- function createOperation(starting, operation) {
2367
- var context = __assign({}, starting);
2368
- var setContext = function(next) {
2369
- if (typeof next === "function") {
2370
- context = __assign(__assign({}, context), next(context));
2371
- } else {
2372
- context = __assign(__assign({}, context), next);
2373
- }
2374
- };
2375
- var getContext = function() {
2376
- return __assign({}, context);
2377
- };
2378
- Object.defineProperty(operation, "setContext", {
2379
- enumerable: false,
2380
- value: setContext
2381
- });
2382
- Object.defineProperty(operation, "getContext", {
2383
- enumerable: false,
2384
- value: getContext
2385
- });
2386
- return operation;
2387
- }
2388
-
2389
- // ../../node_modules/@apollo/client/link/utils/transformOperation.js
2390
- function transformOperation(operation) {
2391
- var transformedOperation = {
2392
- variables: operation.variables || {},
2393
- extensions: operation.extensions || {},
2394
- operationName: operation.operationName,
2395
- query: operation.query
2396
- };
2397
- if (!transformedOperation.operationName) {
2398
- transformedOperation.operationName = typeof transformedOperation.query !== "string" ? getOperationName(transformedOperation.query) || void 0 : "";
2399
- }
2400
- return transformedOperation;
2401
- }
2402
-
2403
- // ../../node_modules/@apollo/client/link/core/ApolloLink.js
2404
- function passthrough(op, forward) {
2405
- return forward ? forward(op) : Observable.of();
2406
- }
2407
- function toLink(handler) {
2408
- return typeof handler === "function" ? new ApolloLink(handler) : handler;
2409
- }
2410
- function isTerminating(link) {
2411
- return link.request.length <= 1;
2412
- }
2413
- var ApolloLink = (
2414
- /** @class */
2415
- (function() {
2416
- function ApolloLink2(request) {
2417
- if (request)
2418
- this.request = request;
2419
- }
2420
- ApolloLink2.empty = function() {
2421
- return new ApolloLink2(function() {
2422
- return Observable.of();
2423
- });
2424
- };
2425
- ApolloLink2.from = function(links) {
2426
- if (links.length === 0)
2427
- return ApolloLink2.empty();
2428
- return links.map(toLink).reduce(function(x, y) {
2429
- return x.concat(y);
2430
- });
2431
- };
2432
- ApolloLink2.split = function(test, left, right) {
2433
- var leftLink = toLink(left);
2434
- var rightLink = toLink(right || new ApolloLink2(passthrough));
2435
- var ret;
2436
- if (isTerminating(leftLink) && isTerminating(rightLink)) {
2437
- ret = new ApolloLink2(function(operation) {
2438
- return test(operation) ? leftLink.request(operation) || Observable.of() : rightLink.request(operation) || Observable.of();
2439
- });
2440
- } else {
2441
- ret = new ApolloLink2(function(operation, forward) {
2442
- return test(operation) ? leftLink.request(operation, forward) || Observable.of() : rightLink.request(operation, forward) || Observable.of();
2443
- });
2444
- }
2445
- return Object.assign(ret, { left: leftLink, right: rightLink });
2446
- };
2447
- ApolloLink2.execute = function(link, operation) {
2448
- return link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of();
2449
- };
2450
- ApolloLink2.concat = function(first, second) {
2451
- var firstLink = toLink(first);
2452
- if (isTerminating(firstLink)) {
2453
- globalThis.__DEV__ !== false && invariant2.warn(47, firstLink);
2454
- return firstLink;
2455
- }
2456
- var nextLink = toLink(second);
2457
- var ret;
2458
- if (isTerminating(nextLink)) {
2459
- ret = new ApolloLink2(function(operation) {
2460
- return firstLink.request(operation, function(op) {
2461
- return nextLink.request(op) || Observable.of();
2462
- }) || Observable.of();
2463
- });
2464
- } else {
2465
- ret = new ApolloLink2(function(operation, forward) {
2466
- return firstLink.request(operation, function(op) {
2467
- return nextLink.request(op, forward) || Observable.of();
2468
- }) || Observable.of();
2469
- });
2470
- }
2471
- return Object.assign(ret, { left: firstLink, right: nextLink });
2472
- };
2473
- ApolloLink2.prototype.split = function(test, left, right) {
2474
- return this.concat(ApolloLink2.split(test, left, right || new ApolloLink2(passthrough)));
2475
- };
2476
- ApolloLink2.prototype.concat = function(next) {
2477
- return ApolloLink2.concat(this, next);
2478
- };
2479
- ApolloLink2.prototype.request = function(operation, forward) {
2480
- throw newInvariantError(48);
2481
- };
2482
- ApolloLink2.prototype.onError = function(error, observer) {
2483
- if (globalThis.__DEV__ !== false) {
2484
- warnDeprecated("onError", function() {
2485
- globalThis.__DEV__ !== false && invariant2.warn(49);
2486
- });
2487
- }
2488
- if (observer && observer.error) {
2489
- observer.error(error);
2490
- return false;
2491
- }
2492
- throw error;
2493
- };
2494
- ApolloLink2.prototype.setOnError = function(fn) {
2495
- if (globalThis.__DEV__ !== false) {
2496
- globalThis.__DEV__ !== false && invariant2.warn(50);
2497
- }
2498
- this.onError = fn;
2499
- return this;
2500
- };
2501
- return ApolloLink2;
2502
- })()
2503
- );
2504
-
2505
- // ../../node_modules/@apollo/client/link/http/createSignalIfSupported.js
2506
- var createSignalIfSupported = function() {
2507
- if (typeof AbortController === "undefined")
2508
- return { controller: false, signal: false };
2509
- var controller = new AbortController();
2510
- var signal = controller.signal;
2511
- return { controller, signal };
2512
- };
2513
-
2514
- // ../../node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
2515
- var hasOwnProperty3 = Object.prototype.hasOwnProperty;
2516
- function parseJsonBody(response, bodyText) {
2517
- if (response.status >= 300) {
2518
- var getResult = function() {
2519
- try {
2520
- return JSON.parse(bodyText);
2521
- } catch (err) {
2522
- return bodyText;
2523
- }
2524
- };
2525
- throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));
2526
- }
2527
- try {
2528
- return JSON.parse(bodyText);
2529
- } catch (err) {
2530
- var parseError = err;
2531
- parseError.name = "ServerParseError";
2532
- parseError.response = response;
2533
- parseError.statusCode = response.status;
2534
- parseError.bodyText = bodyText;
2535
- throw parseError;
2536
- }
2537
- }
2538
- function parseAndCheckHttpResponse(operations) {
2539
- return function(response) {
2540
- return response.text().then(function(bodyText) {
2541
- return parseJsonBody(response, bodyText);
2542
- }).then(function(result2) {
2543
- if (!Array.isArray(result2) && !hasOwnProperty3.call(result2, "data") && !hasOwnProperty3.call(result2, "errors")) {
2544
- throwServerError(response, result2, "Server response was missing for query '".concat(Array.isArray(operations) ? operations.map(function(op) {
2545
- return op.operationName;
2546
- }) : operations.operationName, "'."));
2547
- }
2548
- return result2;
2549
- });
2550
- };
2551
- }
2552
-
2553
- // ../../node_modules/@apollo/client/link/http/serializeFetchParameter.js
2554
- var serializeFetchParameter = function(p, label) {
2555
- var serialized;
2556
- try {
2557
- serialized = JSON.stringify(p);
2558
- } catch (e) {
2559
- var parseError = newInvariantError(54, label, e.message);
2560
- parseError.parseError = e;
2561
- throw parseError;
2562
- }
2563
- return serialized;
2564
- };
2565
-
2566
- // ../../node_modules/@apollo/client/link/http/rewriteURIForGET.js
2567
- function rewriteURIForGET(chosenURI, body) {
2568
- var queryParams = [];
2569
- var addQueryParam = function(key, value) {
2570
- queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));
2571
- };
2572
- if ("query" in body) {
2573
- addQueryParam("query", body.query);
2574
- }
2575
- if (body.operationName) {
2576
- addQueryParam("operationName", body.operationName);
2577
- }
2578
- if (body.variables) {
2579
- var serializedVariables = void 0;
2580
- try {
2581
- serializedVariables = serializeFetchParameter(body.variables, "Variables map");
2582
- } catch (parseError) {
2583
- return { parseError };
2584
- }
2585
- addQueryParam("variables", serializedVariables);
2586
- }
2587
- if (body.extensions) {
2588
- var serializedExtensions = void 0;
2589
- try {
2590
- serializedExtensions = serializeFetchParameter(body.extensions, "Extensions map");
2591
- } catch (parseError) {
2592
- return { parseError };
2593
- }
2594
- addQueryParam("extensions", serializedExtensions);
2595
- }
2596
- var fragment = "", preFragment = chosenURI;
2597
- var fragmentStart = chosenURI.indexOf("#");
2598
- if (fragmentStart !== -1) {
2599
- fragment = chosenURI.substr(fragmentStart);
2600
- preFragment = chosenURI.substr(0, fragmentStart);
2601
- }
2602
- var queryParamsPrefix = preFragment.indexOf("?") === -1 ? "?" : "&";
2603
- var newURI = preFragment + queryParamsPrefix + queryParams.join("&") + fragment;
2604
- return { newURI };
2605
- }
2606
-
2607
- // ../../node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
2608
- var defaultHttpOptions = {
2609
- includeQuery: true,
2610
- includeExtensions: false,
2611
- preserveHeaderCase: false
2612
- };
2613
- var defaultHeaders = {
2614
- // headers are case insensitive (https://stackoverflow.com/a/5259004)
2615
- accept: "*/*",
2616
- // The content-type header describes the type of the body of the request, and
2617
- // so it typically only is sent with requests that actually have bodies. One
2618
- // could imagine that Apollo Client would remove this header when constructing
2619
- // a GET request (which has no body), but we historically have not done that.
2620
- // This means that browsers will preflight all Apollo Client requests (even
2621
- // GET requests). Apollo Server's CSRF prevention feature (introduced in
2622
- // AS3.7) takes advantage of this fact and does not block requests with this
2623
- // header. If you want to drop this header from GET requests, then you should
2624
- // probably replace it with a `apollo-require-preflight` header, or servers
2625
- // with CSRF prevention enabled might block your GET request. See
2626
- // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf
2627
- // for more details.
2628
- "content-type": "application/json"
2629
- };
2630
- var defaultOptions = {
2631
- method: "POST"
2632
- };
2633
- var fallbackHttpConfig = {
2634
- http: defaultHttpOptions,
2635
- headers: defaultHeaders,
2636
- options: defaultOptions
2637
- };
2638
- var defaultPrinter = function(ast, printer) {
2639
- return printer(ast);
2640
- };
2641
- function selectHttpOptionsAndBodyInternal(operation, printer) {
2642
- var configs = [];
2643
- for (var _i = 2; _i < arguments.length; _i++) {
2644
- configs[_i - 2] = arguments[_i];
2645
- }
2646
- var options = {};
2647
- var http = {};
2648
- configs.forEach(function(config) {
2649
- options = __assign(__assign(__assign({}, options), config.options), { headers: __assign(__assign({}, options.headers), config.headers) });
2650
- if (config.credentials) {
2651
- options.credentials = config.credentials;
2652
- }
2653
- http = __assign(__assign({}, http), config.http);
2654
- });
2655
- if (options.headers) {
2656
- options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);
2657
- }
2658
- var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;
2659
- var body = { operationName, variables };
2660
- if (http.includeExtensions)
2661
- body.extensions = extensions;
2662
- if (http.includeQuery)
2663
- body.query = printer(query, print2);
2664
- return {
2665
- options,
2666
- body
2667
- };
2668
- }
2669
- function removeDuplicateHeaders(headers, preserveHeaderCase) {
2670
- if (!preserveHeaderCase) {
2671
- var normalizedHeaders_1 = {};
2672
- Object.keys(Object(headers)).forEach(function(name) {
2673
- normalizedHeaders_1[name.toLowerCase()] = headers[name];
2674
- });
2675
- return normalizedHeaders_1;
2676
- }
2677
- var headerData = {};
2678
- Object.keys(Object(headers)).forEach(function(name) {
2679
- headerData[name.toLowerCase()] = {
2680
- originalName: name,
2681
- value: headers[name]
2682
- };
2683
- });
2684
- var normalizedHeaders = {};
2685
- Object.keys(headerData).forEach(function(name) {
2686
- normalizedHeaders[headerData[name].originalName] = headerData[name].value;
2687
- });
2688
- return normalizedHeaders;
2689
- }
2690
-
2691
- // ../../node_modules/@apollo/client/link/http/selectURI.js
2692
- var selectURI = function(operation, fallbackURI) {
2693
- var context = operation.getContext();
2694
- var contextURI = context.uri;
2695
- if (contextURI) {
2696
- return contextURI;
2697
- } else if (typeof fallbackURI === "function") {
2698
- return fallbackURI(operation);
2699
- } else {
2700
- return fallbackURI || "/graphql";
2701
- }
2702
- };
2703
-
2704
- // ../../node_modules/is-plain-obj/index.js
2705
- function isPlainObject(value) {
2706
- if (typeof value !== "object" || value === null) {
2707
- return false;
2708
- }
2709
- const prototype2 = Object.getPrototypeOf(value);
2710
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
2711
- }
2712
-
2713
- // ../../node_modules/extract-files/extractFiles.mjs
2714
- function extractFiles(value, isExtractable, path = "") {
2715
- if (!arguments.length) throw new TypeError("Argument 1 `value` is required.");
2716
- if (typeof isExtractable !== "function")
2717
- throw new TypeError("Argument 2 `isExtractable` must be a function.");
2718
- if (typeof path !== "string")
2719
- throw new TypeError("Argument 3 `path` must be a string.");
2720
- const clones = /* @__PURE__ */ new Map();
2721
- const files = /* @__PURE__ */ new Map();
2722
- function recurse(value2, path2, recursed) {
2723
- if (isExtractable(value2)) {
2724
- const filePaths = files.get(value2);
2725
- filePaths ? filePaths.push(path2) : files.set(value2, [path2]);
2726
- return null;
2727
- }
2728
- const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
2729
- const valueIsPlainObject = isPlainObject(value2);
2730
- if (valueIsList || valueIsPlainObject) {
2731
- let clone = clones.get(value2);
2732
- const uncloned = !clone;
2733
- if (uncloned) {
2734
- clone = valueIsList ? [] : (
2735
- // Replicate if the plain object is an `Object` instance.
2736
- value2 instanceof /** @type {any} */
2737
- Object ? {} : /* @__PURE__ */ Object.create(null)
2738
- );
2739
- clones.set(
2740
- value2,
2741
- /** @type {Clone} */
2742
- clone
2743
- );
2744
- }
2745
- if (!recursed.has(value2)) {
2746
- const pathPrefix = path2 ? `${path2}.` : "";
2747
- const recursedDeeper = new Set(recursed).add(value2);
2748
- if (valueIsList) {
2749
- let index = 0;
2750
- for (const item of value2) {
2751
- const itemClone = recurse(
2752
- item,
2753
- pathPrefix + index++,
2754
- recursedDeeper
2755
- );
2756
- if (uncloned) clone.push(itemClone);
2757
- }
2758
- } else
2759
- for (const key in value2) {
2760
- const propertyClone = recurse(
2761
- value2[key],
2762
- pathPrefix + key,
2763
- recursedDeeper
2764
- );
2765
- if (uncloned)
2766
- clone[key] = propertyClone;
2767
- }
2768
- }
2769
- return clone;
2770
- }
2771
- return value2;
2772
- }
2773
- return {
2774
- clone: recurse(value, path, /* @__PURE__ */ new Set()),
2775
- files
2776
- };
2777
- }
2778
-
2779
- // ../../node_modules/apollo-upload-client/formDataAppendFile.mjs
2780
- function formDataAppendFile(formData, fieldName, file) {
2781
- "name" in file ? formData.append(fieldName, file, file.name) : formData.append(fieldName, file);
2782
- }
2783
-
2784
- // ../../node_modules/extract-files/isExtractableFile.mjs
2785
- function isExtractableFile(value) {
2786
- return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
2787
- }
2788
-
2789
- // ../../node_modules/apollo-upload-client/createUploadLink.mjs
2790
- function createUploadLink({
2791
- uri: fetchUri = "/graphql",
2792
- useGETForQueries,
2793
- isExtractableFile: customIsExtractableFile = isExtractableFile,
2794
- FormData: CustomFormData,
2795
- formDataAppendFile: customFormDataAppendFile = formDataAppendFile,
2796
- print: print3 = defaultPrinter,
2797
- fetch: customFetch,
2798
- fetchOptions,
2799
- credentials,
2800
- headers,
2801
- includeExtensions
2802
- } = {}) {
2803
- const linkConfig = {
2804
- http: { includeExtensions },
2805
- options: fetchOptions,
2806
- credentials,
2807
- headers
2808
- };
2809
- return new ApolloLink((operation) => {
2810
- const context = (
2811
- /**
2812
- * @type {import("@apollo/client/core/types.js").DefaultContext & {
2813
- * clientAwareness?: {
2814
- * name?: string,
2815
- * version?: string,
2816
- * },
2817
- * }}
2818
- */
2819
- operation.getContext()
2820
- );
2821
- const {
2822
- // Apollo Studio client awareness `name` and `version` can be configured
2823
- // via `ApolloClient` constructor options:
2824
- // https://www.apollographql.com/docs/graphos/metrics/client-awareness/#setup
2825
- clientAwareness: { name, version: version2 } = {},
2826
- headers: headers2
2827
- } = context;
2828
- const contextConfig = {
2829
- http: context.http,
2830
- options: context.fetchOptions,
2831
- credentials: context.credentials,
2832
- headers: {
2833
- // Client awareness headers can be overridden by context `headers`.
2834
- ...name && { "apollographql-client-name": name },
2835
- ...version2 && { "apollographql-client-version": version2 },
2836
- ...headers2
2837
- }
2838
- };
2839
- const { options, body } = selectHttpOptionsAndBodyInternal(
2840
- operation,
2841
- print3,
2842
- fallbackHttpConfig,
2843
- linkConfig,
2844
- contextConfig
2845
- );
2846
- const { clone, files } = extractFiles(body, customIsExtractableFile, "");
2847
- let uri = selectURI(operation, fetchUri);
2848
- if (files.size) {
2849
- if (options.headers)
2850
- delete options.headers["content-type"];
2851
- const RuntimeFormData = CustomFormData || FormData;
2852
- const form = new RuntimeFormData();
2853
- form.append("operations", serializeFetchParameter(clone, "Payload"));
2854
- const map = {};
2855
- let i = 0;
2856
- files.forEach((paths) => {
2857
- map[++i] = paths;
2858
- });
2859
- form.append("map", JSON.stringify(map));
2860
- i = 0;
2861
- files.forEach((_paths, file) => {
2862
- customFormDataAppendFile(form, String(++i), file);
2863
- });
2864
- options.body = form;
2865
- } else {
2866
- if (useGETForQueries && // If the operation contains some mutations GET shouldn’t be used.
2867
- !operation.query.definitions.some(
2868
- (definition) => definition.kind === "OperationDefinition" && definition.operation === "mutation"
2869
- ))
2870
- options.method = "GET";
2871
- if (options.method === "GET") {
2872
- const { newURI, parseError } = rewriteURIForGET(uri, body);
2873
- if (parseError)
2874
- return new Observable((observer) => {
2875
- observer.error(parseError);
2876
- });
2877
- uri = newURI;
2878
- } else options.body = serializeFetchParameter(clone, "Payload");
2879
- }
2880
- const { controller } = createSignalIfSupported();
2881
- if (typeof controller !== "boolean") {
2882
- if (options.signal)
2883
- options.signal.aborted ? (
2884
- // Signal already aborted, so immediately abort.
2885
- controller.abort()
2886
- ) : (
2887
- // Signal not already aborted, so setup a listener to abort when it
2888
- // does.
2889
- options.signal.addEventListener(
2890
- "abort",
2891
- () => {
2892
- controller.abort();
2893
- },
2894
- {
2895
- // Prevent a memory leak if the user configured abort controller
2896
- // is long lasting, or controls multiple things.
2897
- once: true
2898
- }
2899
- )
2900
- );
2901
- options.signal = controller.signal;
2902
- }
2903
- const runtimeFetch = customFetch || fetch;
2904
- return new Observable((observer) => {
2905
- let cleaningUp;
2906
- runtimeFetch(uri, options).then((response) => {
2907
- operation.setContext({ response });
2908
- return response;
2909
- }).then(parseAndCheckHttpResponse(operation)).then((result2) => {
2910
- observer.next(result2);
2911
- observer.complete();
2912
- }).catch((error) => {
2913
- if (!cleaningUp) {
2914
- if (error.result && error.result.errors && error.result.data)
2915
- observer.next(error.result);
2916
- observer.error(error);
2917
- }
2918
- });
2919
- return () => {
2920
- cleaningUp = true;
2921
- if (typeof controller !== "boolean") controller.abort();
2922
- };
2923
- });
2924
- });
2925
- }