@cedarjs/web 6.0.0-canary.2780 → 6.0.0-canary.2781

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